[hobbit] Summary/Total data from several hosts
Henrik Stoerner
henrik at hswn.dk
Wed Oct 3 13:06:33 CEST 2007
On Wed, Oct 03, 2007 at 11:36:49AM +0200, Darren.Cotton at ses-astra.com wrote:
>
> I have 5 hosts on which I have script monitoring connected users. This is
> then sent to hobbit and as a result I have 5 separate entries which I then
> want to total on the server.
>
> Currently I am parsing the tmp file to get the number of users as follows:
I'd use the hobbitdboard query against the server:
DSLGWS="^server[12345]\$"
RESULT=0
bb 127.0.0.1 "hobbitdboard host=${DSLGWS} test=pusers fields=msg" | \
while read L
do
NBUSERS=...whatever is needed to grab the number...
RESULT=`expr $RESULT + $NBUSERS`
done
Grabbing data from the checkpoint file suffers from the fact that by
default it is only updated once every 15 minutes, so it takes a long
time for changes to filter through to that file. By using the
hobbitdboard command, you always get the latest data that Hobbit has.
Regards,
Henrik
More information about the Xymon
mailing list