[hobbit] Hobbit client data parsing

Henrik Stoerner henrik at hswn.dk
Tue Oct 25 07:43:24 CEST 2005


On Mon, Oct 24, 2005 at 11:31:01PM +0200, Arnoud Post wrote:
> I have just made a script which makes a copy of the clientdata file when 
> an alert is seen. Now I just have to wait and see...
> 
> #!/bin/sh
> #
> CP="/bin/cp"
> BBHOME="/usr/local/hobbit"
> DATE=`/bin/date "+%Y%M%d.%H%M%S"`
> $CP $BBHOME/client/tmp/msg.txt $BBHOME/client/logs/clientdata.$DATE  
> 
> and added in hobbit-alerts.cfg:
> HOST=www.foobar.com
>      SCRIPT /usr/local/hobbit/server/bin/copy_clientdata.sh       

This will only work on the Hobbit server itself, since that is the
only one running the hobbitd_alert module.

And there's a recipient parameter missing from your SCRIPT command.
Should be
      SCRIPT recipientname /usr/local/hobbit/server/bin/copy_clientdata.sh       

> >This happens me at least once a day at the hobbitserver. I have 
> >written abou this Aug 16. I think there are timing problems when the 
> >client-script is running. This is what I got.

I don't see how timing can influence the client-side script. Take
a look at that script - it really is a very simple series of 
shell commands that redirect their output into a file. And with the
exception of the vmstat command (which puts its output into a
separate file), all of the client side commands run one at a time.

The only explanation I can find for the messed up client file you
posted back in August is if you have more than one instance of the
client running on a box - e.g. both the client that is included with
the Hobbit server installation, and the stand-alone client.


Henrik




More information about the Xymon mailing list