[hobbit] randomizing execution of tests

Asif Iqbal vadud3 at gmail.com
Fri Feb 6 23:45:08 CET 2009


On Fri, Feb 6, 2009 at 3:48 PM, Ralph Mitchell <ralphmitchell at gmail.com> wrote:
> I don't think that's possible with Xymon right now, but it can be done if
> you're up to a little scripting.  I had an aging, single 733MHz cpu DL380
> running web page checkouts on 400+ hosts, generating around 2700 reports,
> running at various intervals from 30 seconds to 24 hours.
>
> The trick is to use cron for scheduling...
>
> Something like this, for instance:
>
> ============= cut here ============
> #!/bin/sh
>
> TESTHOST=www.google.com
> TESTURL=http://$TESTHOST/
>
> TIMEOUT=30
>
> # Grab *just* the headers, simulating Xymon's builtin http check
> MESSAGE=`curl -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 ============

This curl command looks all I need as an extension script instead of
http:// to get my host specific http timeout

I could just use this instead of urlplus.pl, correct?

>
> You'd run that from xymon's crontab using a command line like:
>
>      $HOME/server/bin/bbcmd $HOME/ping-google.sh > /tmp/ping-google.out 2>&1
>
> at whatever interval is appropriate for the target.
>
> Ralph Mitchell
>
>
> On Thu, Feb 5, 2009 at 11:25 AM, David Paper <hobbit at ginch.org> wrote:
>>
>> Greetings hobbit gurus [0],
>>
>> While I am still trying to search my way to an answer via the archives of
>> this list and google, I'm hoping someone could point me in the right
>> direction.
>>
>> I've got a bb-hosts file with 8 server process instances getting tested.
>>  Each instance gets tested with 3 HTTP requests (2 GET, 1 POST).  All 8
>> server processes live on the same physical OS instance.  This results in 24
>> HTTP requests getting sent from hobbit within 1/100th of a second.  This
>> causes the load on the host to spike, and generates contention w/in each
>> server to satisfy the requests.  This same setup is repeated for hundreds of
>> hosts and hundreds of processes.
>>
>> Is there a way to tell hobbit to take all of the entries in bb-hosts and
>> test them in a random order w/in the 1 minute testing interval?  This would
>> end up staggering the arrival of each HTTP test somewhat and lessen
>> contention within each HTTP server and on each host.
>>
>> Thanks,
>>
>> -dave
>>
>> [0] Of which I am not, but ... maybe one day.
>>
>> --
>> Dave Paper
>>
>> MCSE is to computers as McDonalds Certified Chef is to fine cuisine.
>>
>>
>>
>>
>> To unsubscribe from the hobbit list, send an e-mail to
>> hobbit-unsubscribe at hswn.dk
>>
>>
>
>



-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?



More information about the Xymon mailing list