[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Summary/Total data from several hosts
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Summary/Total data from several hosts
- From: henrik (at) hswn.dk (Henrik Stoerner)
- Date: Wed, 3 Oct 2007 13:06:33 +0200
- References: <OFAFAAB9F9.53A4673A-ONC1257369.0032FA24-C1257369.0034992C (at) ses-astra.com>
- User-agent: Mutt/1.5.13 (2006-08-11)
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