[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] bbd purple
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] bbd purple
- From: Wayne <lists2006.wayne (at) gmail.com>
- Date: Mon, 21 Jan 2008 12:01:54 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:reply-to:to:subject:date:user-agent:references:in-reply-to:mime-version:content-disposition:message-id:x-length:x-uid:content-type:content-transfer-encoding; bh=NiPhaU5ePUDmW02VqIdfmxXcDICRh+I07P3dhnQR4sY=; b=Jcrpj0/TnJ7kY4FpmsXgwkZip9OTxxOz3G1AB9sf5ZnLBOcijmyKgrEdwsu6/J55imIfjgMpdmICfCeExDJmRFPeg/EoAbaj4akgFOxSMUr4Ya66d65vUU8DDRVtH7SMV2C+8PcVcdNglXk75KIjzjN6e20D4gXYDSDa+xat3ms=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:reply-to:to:subject:date:user-agent:references:in-reply-to:mime-version:content-disposition:message-id:x-length:x-uid:content-type:content-transfer-encoding; b=e5KYX3kIi4XqF7n1AQYnuaDspj3wNdHxdSxZ41yGwwQVg+ufDhqxfXcUtcPt7HzjwhgwFhxPQHALzfqpgFNFTJ/DRYxV3C1syTrKi1fOpwAkSv99vW7hjjSRVq2JsIvdHpAPK/EnXbZXgrAerkhV91MxhPzbILvWOoYwgyTfdcE=
- References: <200801211116.46883.lists2006.wayne (at) gmail.com> <200801211141.06652.lists2006.wayne (at) gmail.com> <961092e10801210152k36173318l1a964f68b32761db (at) mail.gmail.com>
- User-agent: KMail/1.9.7
Its monitoring our USSD services. Its also very much hacked from the example.
I an having problems atm with the while loop but they weren't there when I
posted my first message. I've pasted it below. Thanks for the help.
#!/bin/bash
BBHTAG=servicemon # What we put in bb-hosts to trigger this test
COLUMN=servicemon # Name of the column, often same as tag in bb-hosts
echo "Starting: "
$BBHOME/bin/bbhostgrep $BBHTAG | while read L
do
set $L # To get one line of output from bbhostgrep
HOSTIP="$1"
MACHINEDOTS="$2"
MACHINE=`echo $2 | $SED -e's/\./,/g'`
echo $MACHINE
echo `date`
COLOR=green
TMPFILE=/tmp/servicemon$RANDOM.tmp
echo $TMPFILE
MSG="$BBHTAG status for host $MACHINEDOTS"
echo $MSG
#... do the test, perhaps modify COLOR and MSG
nc odin 8013 < $BBHOME/ext/ussdMtn.xml > $TMPFILE
while [ ! `grep "<code>1" $TMPFILE` ] || [ ! `grep "<code>2"
$TMPFILE` ];do
nc odin 8013 < $BBHOME/ext/ussdMtn.xml > $TMPFILE
sleep 5
done
if [ ! `grep iZone $TMPFILE` ];then
COLOR=red
MSG="mtn is down!!!"
fi
nc odin 8013 < $BBHOME/ext/ussdMtnEnd.xml > /dev/null
rm $TMPFILE
$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date` ${MSG}"
echo '$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date` ${MSG}"'
done
exit 0
On Monday 21 January 2008 11:52:01 Josh Luthman wrote:
> What custom script is it?
>
> On 1/21/08, Wayne <lists2006.wayne (at) gmail.com> wrote:
> > On Monday 21 January 2008 11:20:16 Josh Luthman wrote:
> > > Sounds to me like that script isn't reporting. What custom script is
> > > it? Is it client or server?
> >
> > server.
> >
> > Cheers
> > Wayne
> >
> > To unsubscribe from the hobbit list, send an e-mail to
> > hobbit-unsubscribe (at) hswn.dk