Re: Request for https monitoring script

Robin Bowes <[email protected]> Thu, 11 Nov 2010 17:56:36 +0000
Newsgroups gmane.linux.redhat.piranha
Message-ID <[email protected]>
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/