[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [hobbit] randomizing execution of tests



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 ============

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
>
>
>