From laehr.mistry at gmail.com Thu Nov 11 16:55:08 2010 From: laehr.mistry at gmail.com (laehr mistry) Date: Thu, 11 Nov 2010 22:25:08 +0530 Subject: Request for https monitoring script Message-ID: 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 -------------- next part -------------- An HTML attachment was scrubbed... URL: From lists at brimer.org Thu Nov 11 17:32:07 2010 From: lists at brimer.org (Barry Brimer) Date: Thu, 11 Nov 2010 11:32:07 -0600 Subject: Request for https monitoring script In-Reply-To: References: Message-ID: <1289496727.4cdc28979bb8b@mail.toucanhost.com> Quoting laehr mistry : > 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. Here is the script that I use. Obviously you have to have links installed as well. ==== #!/bin/bash if links -dump -eval 'set connection.receive_timeout = 1' -eval 'set connection.retries = 1' -eval 'set connection.unrestartable_receive_timeout = 1' https://$1/ > /dev/null 2>&1; then echo "OK" else echo "FAILURE" fi exit 0 ==== In my lvs.cf I include the following in the virtual host configuration: ==== send_program = "/parh/to/https_check_443 %h" expect = "OK" use_regex = 0 ==== If you want to test it .. just firewall out your web server from the load balancer or just stop the web server and watch piranha or ipvsadm to see the results. Hope this helps, Barry From robin-lists at robinbowes.com Thu Nov 11 17:56:36 2010 From: robin-lists at robinbowes.com (Robin Bowes) Date: Thu, 11 Nov 2010 17:56:36 +0000 Subject: Request for https monitoring script In-Reply-To: References: Message-ID: <4CDC2E54.50906@robinbowes.com> On 11/11/10 16:55, 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. This is the script I use: #!/bin/sh TEST=$( wget \ --connect-timeout=2 \ --no-check-certificate \ --save-headers \ --server-response \ --spider \ https://$1 2>&1 \ | grep -c "HTTP/1.1 200 OK" ) if [ "$TEST" == "1" ] ; then echo "OK" else echo "FAIL" fi I'll leave you to work out the steps to test it. ;) R. -- "Feed that ego and you starve the soul" - Colonel J.D. Wilkes http://www.theshackshakers.com/ From yocum at fnal.gov Thu Nov 11 17:39:10 2010 From: yocum at fnal.gov (Dan Yocum) Date: Thu, 11 Nov 2010 11:39:10 -0600 Subject: Request for https monitoring script In-Reply-To: References: Message-ID: <4CDC2A3E.1000609@fnal.gov> 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 "" \ &> /dev/null if [ $? -eq 0 ]; then echo "up" else echo "down" fi ##################################### - Change the path to the location of your hostcert/key. - Change 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."