[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] https via proxy
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] https via proxy
- From: Ralph Mitchell <ralphmitchell (at) gmail.com>
- Date: Thu, 23 Jul 2009 10:53:41 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=YEN18m3KMmxC2m317RMZshTpXObZyEwRHuW192Jak3o=; b=mo+38czk4HiWovt3IIYSc//YkttTOkQYi4bNh2+f7gWmpqxaSVDOdE8IjhHLbTJIC8 BC4laS5/o/wT+cOqnxXbpT3bt1NJi2UFSdfhS7fSdBKQfgCUdl0JMJdTw2pkcmZd5yVr ydSwudZSrGfbA2Ahj+CixcYNxMqmrhka57rfc=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=Z+MdYLbdcgWZJ90DVaAb+lRf0JhRUzU9XxILdStB3vVrC6OE8oklqDOo2ZmhmOI8Fc p8xEJuu7tWi4jXSUs7J9Wa3NFcMIv0q9MkI2dRCq6HhbJpxYtIOEJCa3iybySq8c76tj dGGkrkfUfLBKNEXqH8gfQQnJ+YjN81Xagvnvo=
- References: <1592969.3200261248356041918.JavaMail.servlet (at) kundenserver>
On Thu, Jul 23, 2009 at 8:34 AM, Torsten Richter <bb4 (at) richter-it.net> wrote:
> Hi all,
>
> as I've seen in the TODO testing https connections via a proxy is still
> under development.
> Does someone already have solution maybe with a script and curl that she/he
> wants to share?
Here's something I wrote to the mailing list on 11/24/08:
"If that one was useful, here's something that may be a bit better. I added
a timeout for curl, otherwise it'll wait for a long time if the server
doesn't respond. Also, this format produces a message formatted just like
Xymon's internal http test, including the time taken to grab the headers.
You could extract the "Seconds" line to determine if the response is a bit
slow. With a bit more magic in Xymon's configs, you could even graph it..."
As far as curl is concerned, the url can be http:// or https:// - you
don't need to do anything special.
Ralph Mitchell
============= cut here ============
#!/bin/sh
TESTHOST=www.google.com
TESTURL=https://$TESTHOST/
TIMEOUT=30
# Grab *just* the headers, simulating Xymon's builtin http check
MESSAGE=`curl -x http://ourproxy.ourdomain.com:8080 \ --proxy-anyauth -U
hobbituser:hobbitpassword \
-m $TIMEOUT \
-w 'Seconds: %{time_total}\n' \
-s -S -L -I $TESTURL | $GREP -v Set-Cookie`
if [ "$?" -eq "0" ]; then
COLOR=green
else
COLOR=red
fi
# convert dots to commas in the hostname
MACHINE=`echo $TESTHOST | $SED -e 's/\./\,/g'`
$BB $BBDISP "status $MACHINE.home $COLOR `date`
$MESSAGE"
============= cut here ============