We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0819bf3 commit 97e0ab5Copy full SHA for 97e0ab5
monitoring/nagios/healthcheck.sh
@@ -27,8 +27,9 @@ curl -s -c $COOKIE_FILE "$HOST/geonetwork/srv/eng/user.login?username=$USERNAME&
27
CODE=`curl -sL --cookie $COOKIE_FILE -w "%{http_code}\\n" "$HOST/$CHECK" -o $OUT`
28
rm -f $COOKIE_FILE
29
30
-EXIT=$STATE_OK
+
31
RESPONSE="Health checks pass"
32
+EXIT=$STATE_OK
33
if [ "x$CODE" != "x200" ]; then
34
# Add line to file so that last line is processed by while loop
35
echo "" >> $OUT
@@ -42,9 +43,9 @@ if [ "x$CODE" != "x200" ]; then
42
43
fi
44
done < $OUT
45
- EXIT=$STATE_CRITICAL
46
RESPONSE=$FAILURE
47
+ EXIT=$STATE_CRITICAL
48
49
-echo $EXIT
50
-exit $RESPONSE
+echo $RESPONSE
51
+exit $EXIT
0 commit comments