Xymon Mailing List Archive search

Where is the client data stored in hobbit server?

list Ari Syrup
Thu, 11 Oct 2007 08:31:07 +0900
Message-Id: <user-8fa0785285dc@xymon.invalid>

Henrik,

Thank you very much!! The information is really helpful for me not only to
implement the script but to understand the hobbit design.

I really look forward to the version 4.3.0 release. ( Hope all the regex
work fine !! ).


2007/10/10, Henrik Stoerner <user-ce4a2c883f75@xymon.invalid>:
On Wed, Oct 10, 2007 at 07:40:05PM +0900, Ari Syrup wrote:
I would like to implement a customized script to parse all the lines of
the
"Client data" and send an alert if certain keyword matches. I think it
would
be nice because you don't have to implement it in all the client
sides.....Definitely there are many people who are interested in it ???
And I can't figure out where the data is stored in the hobbit server
side.

My question is,,,,Where is the "Client data" stored in the hobbit server
side? Please help me with finding it...
The client data are stored in memory.

There are two ways you can do this.

1) You can use the command
      bb 127.0.0.1 "clientlog HOSTNAME"
   to fetch the current client data, then do your processing.

2) (My recommended solution) Write your script as a Hobbit server-
   side extension, and run it on the server as
      bbcmd hobbitd_channel --channel=client YOURSCRIPT
   Your script would get all of the client data fed on STDIN,
   beginning with a line "@@client...|HOSTNAME|..." and
   ending with "@@". Try running (as the hobbit user)
      bbcmd hobbitd_channel --channel=client cat
   and watch the data that is generated.


Regards,
Henrik