Test the IL probe
authorZdeněk Šustr <sustr4@cesnet.cz>
Mon, 11 Mar 2013 13:25:06 +0000 (13:25 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Tue, 12 Mar 2013 22:24:19 +0000 (23:24 +0100)
org.glite.testsuites.ctb/LB/tests/lb-test-nagios-probe.sh

index 66f69a5..c83e8ac 100755 (executable)
@@ -88,7 +88,7 @@ DEBUG=2
 test_start
 
 
-printf "Checking if the probe is available..."
+printf "Checking if the server probe is available..."
 
 PROBE="$GLITE_LOCATION/libexec/grid-monitoring/probes/emi.lb/LB-probe"
 
@@ -111,7 +111,7 @@ if [ -f "$PROBE" ]; then
                exit 2
        fi
 
-       printf "Running the nagios probe..."
+       printf "Running the L&B server nagios probe..."
        PROBEOUTPUT=`${PROBE} -H $GLITE_WMS_QUERY_SERVER 2> /dev/null`
        PROBECODE=$?
 
@@ -132,6 +132,33 @@ else
        test_skipped
 fi
 
+printf "Checking if the interlogger probe is available..."
+
+PROBE="$GLITE_LOCATION/libexec/grid-monitoring/probes/emi.lb/LB-probe"
+
+if [ -f "$PROBE" ]; then
+       test_done
+       printf "Running the L&B interlogger nagios probe..."
+        PROBEOUTPUT=`${PROBE} 2> /dev/null`
+        PROBECODE=$?
+
+        printf " \"$PROBEOUTPUT\", ret. code $PROBECODE"
+        $SYS_ECHO $PROBEOUTPUT | $SYS_GREP -E "^OK" > /dev/null 2> /dev/null
+        if [ $? -eq 0 -a $PROBECODE -eq 0 ]; then
+                test_done
+        else
+                if [ "$PROBEOUTPUT" != "" -a $PROBECODE -ne 0 ]; then
+                        test_warning
+                else
+                        test_failed
+                fi
+        fi
+
+else
+       printf " Probe not available"
+       test_skipped
+fi
+
 test_end
 }