[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] [re-post] xymon notifications
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] [re-post] xymon notifications
- From: J Sloan <joe (at) tmsusa.com>
- Date: Wed, 03 Jun 2009 14:19:46 -0700
- References: <4A1D8E86.5060506 (at) tmsusa.com> <BAY138-W1318547BE629B324F644CB9F500 (at) phx.gbl> <4A257B0E.90502 (at) tmsusa.com> <997a524e0906030945p10190646o8c5fa892cbd18762 (at) mail.gmail.com>
- User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.21) Gecko/20090318 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666
Ralph Mitchell wrote:
>
> I once had a old Compaq desktop system and laptop, both running Gentoo
> Linux with 'heartbeat' installed. Whenever I shutdown the laptop,
> the Compaq 'acquired' its IP address, so that it wouldn't be given
> away to anyone else on that segment of the company network. It wasn't
> anything fancy, just heartbeat packets being exchanged over the
> network every few seconds.
I've played with heartbeat, it's a neat package - bit of overkill for
what we need here though.
>
> As long as your two xymon servers are sending each other status
> messages, you could use that for the heartbeat. Something like this
> in an external script:
>
> X=`server/bin/bb localhost 'hobbitdboard host=xymon1 test=bbd
> fields=logtime'`
> Y=`date +%s`
> Z=`expr $Y - $X`
> if [ $Z -ge 600 ]; then
> # do stuff to enable paging
> fi
>
> If you were using a script to send the pages out, enabling paging
> could be as simple as "touch $BBTMP/pager", then in the pager script,
> do this:
>
> if [ -f $BBTMP/pager ]; then
> # send the page
> fi
Now that is interesting - I wasn't familiar with the detail of
information available from the bb command using the hobbitboard
directive, but that definitely lends itself to the solution I'm looking
for. I'll play with it a bit and see what I can come up with.
Joe