nagios https proxy monitoring plugin or Bash website monitoring script

#!/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

4 comments:

Avishek Priyadarshi said...
This comment has been removed by a blog administrator.
kids photographer in delhi said...

I positively suits some points simply just have mentioned on this post. I appreciate simply just have shared some reliable recommendations on this review.

Anonymous said...

please share what is the command line argument to be supplied in the comments

chandu chinnu said...

i'm here to learn more about DevOps Thanks for Sharing
Here you can check best DevOps Online Training Institute
DevOps Online Training