2 # Copyright (c) 2014 Index Data ApS, http://indexdata.com
4 # nagios test if the the service proxy is up and running
7 : ${mkws_host="http://sp-mkws.indexdata.com/service-proxy/"}
8 : ${mkws_username="mkws"}
9 : ${mkws_password="mkws"}
10 : ${user_agent="nagios service-proxy v0.9"}
15 url="$mkws_host?command=auth&action=login&username=$mkws_username&password=$mkws_password"
16 if curl -sSf -A "$user_agent" "$url" > $tempfile; then
17 if ! egrep -q '<status>OK</status>' $tempfile; then
21 if ! egrep -q '<response jsessionId="[0-9A-F]+"' $tempfile; then
22 echo "response jsessionId missing"
26 echo "URL: $url failed"
30 if [ $exit -gt 0 ]; then