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