eidas health check binary

This commit is contained in:
Leif Johansson 2018-02-13 09:32:57 +01:00
parent 63a07de7dd
commit 04a5ca91c4

View file

@ -0,0 +1,15 @@
#!/bin/bash
. /usr/lib/nagios/plugins/utils.sh
status=`wget --no-check-certificate -qO- https://$1:444/manage/health`
echo $status | jq -r '.status' | grep -q "UP"
if [ $? -ne 0 ]; then
echo "CRITICAL - Service FAIL"
echo $status
exit $STATE_CRITICAL
else
echo "OK - Service healthy"
echo $status
exit $STATE_OK
fi