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://mkws.indexdata.com/service-proxy/"}
8 : ${mkws_username="mkws"}
9 : ${mkws_password="mkws"}
14 url="$mkws_host?command=auth&action=login&username=$mkws_username&password=$mkws_password"
15 if curl -sSf "$url" > $tempfile; then
16 if ! egrep -q '<status>OK</status>' $tempfile; then
20 if ! egrep -q '<response jsessionId="[0-9A-F]+"' $tempfile; then
21 echo "response jsessionId missing"
25 echo "URL: $url failed"
29 if [ $exit -gt 0 ]; then