[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: Torsten Richter <bb4 (at) richter-it.net>
- Date: Thu, 23 Jul 2009 23:47:02 +0200
- Openpgp: id=899093AC
- References: <1592969.3200261248356041918.JavaMail.servlet (at) kundenserver> <997a524e0907230853p1d938899y58faab4a9f2557b6 (at) mail.gmail.com>
- User-agent: Thunderbird 2.0.0.22 (Windows/20090605)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Ralph,
thanks for the answer.
The script is working great.
Cheers
Torsten
Ralph Mitchell wrote:
> 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 ============
>
- --
+---------------------------------------------------------+
| Richter IT-Consulting |
| E-mail : bb4 [at] richter-it.net |
| |
| Homepage: http://www.richter-it.net/ |
+---------------------------------------------------------+
Download my public key from:
http://www.keyserver.net:11371/pks/lookup?op=get&search=0x899093AC
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3-nr1 (Windows XP)
iD8DBQFKaNpW7DlmxomQk6wRArQyAJwITkOoKTZ3Tw+98oGxPxePRoLscACgqfeC
/J6E/ZEfdhtoCFMukpPMUlQ=
=HIjF
-----END PGP SIGNATURE-----