[LearnAdmin] nagios https proxy monitoring plugin or Bash website monitoring script

2 views
Skip to first unread message

Naresh Surampudi

unread,
Mar 23, 2017, 7:01:37 AM3/23/17
to learnadmin+g...@googlegroups.com
#!/bin/bash

if [ $# -eq 0 ]
  then
    echo "No arguments supplied"
fi

if [ $# -eq 1  ]
then

output=`curl  -x 10.11.10.10:3128 -L $1 -m 10 -o /dev/null || echo "Website_down"`

if [ "$output" == "Website_down" ] ; then

echo "Website is down CRITICAL  "
exit 2

else

echo "Website_up $1  OK"
exit 0
fi

fi



--
Posted By Naresh Surampudi to LearnAdmin at 3/23/2017 04:31:00 PM
Reply all
Reply to author
Forward
0 new messages