[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Different timeouts per HTTP check
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Different timeouts per HTTP check
- From: Ralph Mitchell <ralphmitchell (at) gmail.com>
- Date: Wed, 29 Apr 2009 13:56:40 -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=3Np0dNbTwmQG3S8nM+yM6yunBS9xaPyUnYi4f63/1Fg=; b=CtR111xrV53yCFpP5RqB3rwz5CVcVDEW+NWg0D2lsKJtNsgw4o+58GNYVVYKOu3sju UySpwXPff43RUunlcrf9BbBJMFApr49oJwqVZEHbIMofFEBw7LVAbOGaSDhqPhaNaABk TKjyElxUOr0Rz0oAF6nKGBYCxMFAL1vGgSaCM=
- 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=hCkhHJrPpO46v4SJhJJJMdwH3GdUj0/MGmRAd7WeTyojSscgFL+GU2gneQENZnIpRq c0EhienR8pJ4p4QdLZy05UfAacidxcB8X2lw8iL7c/L52n0KEUqCfI4pbCCfgn3AYldQ OKU2JAkHKfzjhsMOKrsP4d4zzHZbb0RhhyApI=
- References: <49F803D7.2090209 (at) schoot.org> <997a524e0904291115u2d9e0fbax8079a1d90c16bc5 (at) mail.gmail.com> <961092e10904291133y248986f7v1b39c28f87ca4ff0 (at) mail.gmail.com>
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.
Ralph Mitchell
On Wed, Apr 29, 2009 at 1:33 PM, Josh Luthman
<josh (at) imaginenetworksllc.com>wrote:
> I'm graphing the output of server-status. Very good information!
>
> Josh Luthman
> Office: 937-552-2340
> Direct: 937-552-2343
> 1100 Wayne St
> Suite 1337
> Troy, OH 45373
>
> Those who don't understand UNIX are condemned to reinvent it, poorly.
> --- Henry Spencer
>
>
>
> On Wed, Apr 29, 2009 at 2:15 PM, Ralph Mitchell <ralphmitchell (at) gmail.com>wrote:
>
>> On Wed, Apr 29, 2009 at 2:37 AM, Wouter Schoot <wouter (at) schoot.org> wrote:
>>
>>> Hi,
>>>
>>> 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?
>>
>>
>> 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:
>>
>> Parent script:
>>
>> #!/bin/bash
>> /home/hobbit/server/ext/bb-url.sh 10 server1.domain.com
>> /home/hobbit/server/ext/bb-url.sh 20 server2.domain.com
>> ..... etc.....
>>
>>
>> Child script:
>>
>> #!/bin/bash
>> curl -s -S -L -m $1 -o /dev/null http://$2
>> if [ "$?" -ne "0" ]; then
>> COLOR=red
>> MESSAGE="something bad happened: url=http://$2"
>> else
>> COLOR=green
>> MESSAGE="everything is ok: url=http://$2"
>> fi
>> $BB $BBDISP "status $2.http $COLOR `date`
>> $MESSAGE"
>>
>>
>> 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.
>>
>> Ralph Mitchell
>>
>>
>