[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] randomizing execution of tests
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] randomizing execution of tests
- From: Ralph Mitchell <ralphmitchell (at) gmail.com>
- Date: Fri, 6 Feb 2009 21:29:25 -0600
- 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=nKludaWHMabbSJo3nGP5nY9t55Azb23ljuewBfAkmI0=; b=i+kftBtW7QO1zzq5Nac07o6wOaeEfOApU/8dkgtMXdtJT+IlgUQsstjbqCrkHpUhR9 5rFGN2Hcim4JqlmjKLFEP3x21SPlVFTNlZCLHF3ueCd/vQjiaPhdNOWsEAGfQRddOW91 poF19VQL9Y6trUIOVxZT8RUf9xeYkU7yUrVLk=
- 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=Cmz/3WByiBZ9q6QFqW+qgizra9baJ3eRm9Qj339Rx3Islu13ZNA722Bkj3LdnToPxU TUNe//8G9WrLAGLjc8F6EzsPnn5+Pfo8O/zrntTjt7ghxMZw5rHRHoQA5CvYyVCXOXV4 TucI/1TQef6pjxNqD0HtrAA1qeZHG3gijMVYs=
- References: <12177AF3-E15B-43E3-81FD-3BA1F805C764 (at) ginch.org> <997a524e0902061248o4f55df16gc717e181af17bfa (at) mail.gmail.com> <a60f25fc0902061445o5d87a2ecu199b19fa2329cc1a (at) mail.gmail.com>
On Fri, Feb 6, 2009 at 4:45 PM, Asif Iqbal <vadud3 (at) gmail.com> wrote:
> 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?
>
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.
Ralph Mitchell