Request for https monitoring script

Dan Yocum yocum at fnal.gov
Thu Nov 11 17:39:10 UTC 2010


Here's what I use.

Put this in a file called /usr/local/bin/lvs-check-https.sh and make it 
executable:

#####################################
#!/bin/bash


if [ $# -eq 0 ]; then
         echo "host not specified"
         exit 1
fi

curl -s --insecure \
	--cert /etc/crt/hostcert.pem \
	--key /etc/crt/hostkey.pem \
	https://${1}:443 | grep "<something you expect to find>" \
	&> /dev/null

if [ $? -eq 0 ]; then
         echo "up"
else
         echo "down"
fi
#####################################

- Change the path to the location of your hostcert/key.
- Change <something you expect to find> to well, a string you' expect
   to find.

You can run the script by hand to see if it works.

Cheers,
Dan


On 11/11/2010 10:55 AM, laehr mistry wrote:
> Hello All
>
> I would like to request for a monitoring script for https and the steps
> to test it.
>
> Hope someone can help me out on this.
>
> Thanks and Regards
> Laehr
>
>
>
> _______________________________________________
> Piranha-list mailing list
> Piranha-list at redhat.com
> https://www.redhat.com/mailman/listinfo/piranha-list

-- 
Dan Yocum
Fermilab  630.840.6509
yocum at fnal.gov, http://fermigrid.fnal.gov
"I fly because it releases my mind from the tyranny of petty things."




More information about the Piranha-list mailing list