It gets better - check out the "-w" option for curl.  You can get back the actual amount of time taken to set up the connection and several other things.<div><br></div><div>Ralph Mitchell</div><div><br><br><div class="gmail_quote">
On Wed, Apr 29, 2009 at 1:33 PM, Josh Luthman <span dir="ltr"><<a href="mailto:josh@imaginenetworksllc.com">josh@imaginenetworksllc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'm graphing the output of server-status.  Very good information!<br><br clear="all">Josh Luthman<br>Office: 937-552-2340<br>Direct: 937-552-2343<br>1100 Wayne St<br>Suite 1337<br>Troy, OH 45373<br><br>Those who don't understand UNIX are condemned to reinvent it, poorly.<br>


--- Henry Spencer<div><div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Wed, Apr 29, 2009 at 2:15 PM, Ralph Mitchell <span dir="ltr"><<a href="mailto:ralphmitchell@gmail.com" target="_blank">ralphmitchell@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 class="gmail_quote"><div>On Wed, Apr 29, 2009 at 2:37 AM, Wouter Schoot <span dir="ltr"><<a href="mailto:wouter@schoot.org" target="_blank">wouter@schoot.org</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">



Hi,<br>
<br>
I'm using a few HTTP checks to see how fast (and if) a website responds. However, some are known to be slower than others and I want therefor some sites not to trigger an alert or at least not if it doesn't respond in 10 seconds, but for instance 20 seconds. How can I achieve this for 1 check, not globally for all HTTP checks?</blockquote>



<div><br></div></div><div>I don't think you can do that at present, not with the builtin HTTP check.  On the other hand, an external script can do whatever you can dream up.  Here's something similar to what I set up for about 2500 web server checks:</div>



<div><br></div><div>Parent script:</div><div><br></div><div>   #!/bin/bash</div><div>   /home/hobbit/server/ext/bb-url.sh 10 <a href="http://server1.domain.com" target="_blank">server1.domain.com</a> </div><div>   /home/hobbit/server/ext/bb-url.sh 20 <a href="http://server2.domain.com" target="_blank">server2.domain.com</a> </div>



<div>   ..... etc.....</div><div><br></div><div><br></div><div>Child script:</div><div><br></div><div>   #!/bin/bash</div><div>   curl -s -S -L -m $1 -o /dev/null http://$2</div><div>   if [ "$?" -ne "0" ]; then</div>



<div>      COLOR=red</div><div>      MESSAGE="something bad happened: url=http://$2"</div><div>   else</div><div>      COLOR=green</div><div>      MESSAGE="everything is ok: url=http://$2"</div><div>   fi</div>



<div>   $BB $BBDISP "status $2.http $COLOR `date`</div><div>$MESSAGE"</div><div><br></div><div><br></div><div>Obviously that can get a lot more complicated.  You'd need to kick off the parent script by adding a section to the server/etc/hobbitlaunch.cfg file.  Or you could do what I did and have the parent script run by cron, which makes it easier to schedule the checks to run at specific times.</div>



<div><br></div><div>Ralph Mitchell</div><div><br></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br></div>