X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=blobdiff_plain;f=tools%2Fbin%2Fnagios-service-proxy.sh;h=0de766d7058f4717f70575b797f7a4af2db0e4d8;hp=9d58a31f144e76ba45121d80e7d17b6436ba2537;hb=75a12fc0c0da4845ce7dfc236ecee5b34dce91e3;hpb=051eae827f01f32715a5bd5129093df54192cc93 diff --git a/tools/bin/nagios-service-proxy.sh b/tools/bin/nagios-service-proxy.sh index 9d58a31..0de766d 100755 --- a/tools/bin/nagios-service-proxy.sh +++ b/tools/bin/nagios-service-proxy.sh @@ -4,15 +4,16 @@ # nagios test if the the service proxy is up and running set -e -: ${mkws_host="http://mkws.indexdata.com/service-proxy/"} +: ${mkws_host="http://sp-mkws.indexdata.com/service-proxy/"} : ${mkws_username="mkws"} : ${mkws_password="mkws"} +: ${user_agent="nagios service-proxy v0.9"} tempfile=$(mktemp) exit=0 url="$mkws_host?command=auth&action=login&username=$mkws_username&password=$mkws_password" -if curl -sSf "$url" > $tempfile; then +if curl -sSf -A "$user_agent" "$url" > $tempfile; then if ! egrep -q 'OK' $tempfile; then echo "status not OK" exit=1