Skip to content

Commit 97e0ab5

Browse files
author
Jesse Eichar
committed
stupid mistake in check. need to test better
1 parent 0819bf3 commit 97e0ab5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

monitoring/nagios/healthcheck.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,9 @@ curl -s -c $COOKIE_FILE "$HOST/geonetwork/srv/eng/user.login?username=$USERNAME&
2727
CODE=`curl -sL --cookie $COOKIE_FILE -w "%{http_code}\\n" "$HOST/$CHECK" -o $OUT`
2828
rm -f $COOKIE_FILE
2929

30-
EXIT=$STATE_OK
30+
3131
RESPONSE="Health checks pass"
32+
EXIT=$STATE_OK
3233
if [ "x$CODE" != "x200" ]; then
3334
# Add line to file so that last line is processed by while loop
3435
echo "" >> $OUT
@@ -42,9 +43,9 @@ if [ "x$CODE" != "x200" ]; then
4243
fi
4344
done < $OUT
4445
45-
EXIT=$STATE_CRITICAL
4646
RESPONSE=$FAILURE
47+
EXIT=$STATE_CRITICAL
4748
fi
4849
49-
echo $EXIT
50-
exit $RESPONSE
50+
echo $RESPONSE
51+
exit $EXIT

0 commit comments

Comments
 (0)