<div class="gmail_quote">On Fri, Feb 6, 2009 at 4:45 PM, Asif Iqbal <span dir="ltr"><<a href="mailto:vadud3@gmail.com">vadud3@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="Wj3C7c">On Fri, Feb 6, 2009 at 3:48 PM, Ralph Mitchell <<a href="mailto:ralphmitchell@gmail.com">ralphmitchell@gmail.com</a>> wrote:<br>
> I don't think that's possible with Xymon right now, but it can be done if<br>
> you're up to a little scripting.  I had an aging, single 733MHz cpu DL380<br>
> running web page checkouts on 400+ hosts, generating around 2700 reports,<br>
> running at various intervals from 30 seconds to 24 hours.<br>
><br>
> The trick is to use cron for scheduling...<br>
><br>
> Something like this, for instance:<br>
><br>
> ============= cut here ============<br>
> #!/bin/sh<br>
><br>
> TESTHOST=<a href="http://www.google.com" target="_blank">www.google.com</a><br>
> TESTURL=http://$TESTHOST/<br>
><br>
> TIMEOUT=30<br>
><br>
> # Grab *just* the headers, simulating Xymon's builtin http check<br>
> MESSAGE=`curl -m $TIMEOUT \<br>
>      -w 'Seconds:     %{time_total}\n' \<br>
>      -s -S -L -I $TESTURL | $GREP -v Set-Cookie`<br>
> if [ "$?" -eq "0" ]; then<br>
>   COLOR=green<br>
> 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 ============<br>
<br>
</div></div>This curl command looks all I need as an extension script instead of<br>
http:// to get my host specific http timeout<br>
<br>
I could just use this instead of urlplus.pl, correct?<br>
</blockquote></div><br>Yes, you could do exactly that.  You'll probably want to make the above script into a function or child script and feed it the hostname, url & max time values pulled from a file.<br><br>Ralph Mitchell<br>