<div class="gmail_quote">On Thu, Jul 23, 2009 at 8:34 AM, Torsten Richter <span dir="ltr"><<a href="mailto:bb4@richter-it.net" target="_blank">bb4@richter-it.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi all,<br>
<br>
as I've seen in the TODO testing https connections via a proxy is still under development.<br>
Does someone already have solution maybe with a script and curl that she/he wants to share?</blockquote><div><br></div><div><br></div><div><span style="border-collapse:collapse">Here's something I wrote to the mailing list on 11/24/08:</span></div>

<span style="border-collapse:collapse"><br></span></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="border-collapse: collapse; ">"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..."</span></blockquote>
<div class="gmail_quote"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></div><div class="gmail_quote"><span style="border-collapse:collapse">As far as curl is concerned, the url can be http:// or https://    -  you don't need to do anything special.</span></div>
<div class="gmail_quote"><span style="border-collapse:collapse"><br>Ralph Mitchell<br><br></span></div><div class="gmail_quote"><span style="border-collapse:collapse"><br>============= cut here ============<br>#!/bin/sh<br>
<br>TESTHOST=<a href="http://www.google.com" style="color:rgb(0, 0, 204)" target="_blank">www.google.com</a><br>TESTURL=https://$TESTHOST/<br>
<br>TIMEOUT=30<br><br># Grab *just* the headers, simulating Xymon's builtin http check<br>MESSAGE=`curl -x <a href="http://ourproxy.ourdomain.com:8080" style="color:rgb(0, 0, 204)" target="_blank">http://ourproxy.ourdomain.com:8080</a> \<div style="color:rgb(80, 0, 80)">
     --proxy-anyauth -U hobbituser:hobbitpassword \<br></div>     -m $TIMEOUT \<br>     -w 'Seconds:     %{time_total}\n' \<br>     -s -S -L -I $TESTURL | $GREP -v Set-Cookie`<div style="color:rgb(80, 0, 80)"><br>
if [ "$?" -eq "0" ]; then<br>  COLOR=green<br></div>else<br>  COLOR=red<br>fi<br><br># convert dots to commas in the hostname<br>MACHINE=`echo $TESTHOST | $SED -e 's/\./\,/g'`<br><br>$BB $BBDISP "status $MACHINE.home $COLOR `date`<br>

<br>$MESSAGE"<br>============= cut here ============</span></div>