Xymon Mailing List Archive search

File status information in client-data

list Thomas Kern
Tue, 14 Nov 2006 08:55:33 -0500
Message-Id: <user-e9e76382d074@xymon.invalid>

I will take a look at the logfetch.c to check on what it writes into the
client-data stream. 
If the hobbit server receives a complete client-data stream with file:
status information and a separate status message for machinename.files,
which one gets used for creating the files webpage? 
/Thomas Kern
/XXX-XXX-XXXX 
-----Original Message-----
From: user-ce4a2c883f75@xymon.invalid [mailto:user-ce4a2c883f75@xymon.invalid] Sent: Tuesday, November 14, 2006 3:30 AM
To: user-ae9b8668bcde@xymon.invalid
Subject: Re: [hobbit] File status information in client-data

You should take a look at the printfiledata() routine in
client/logfetch.c - this is where those [file:/foo/bar.baz] data are
generated.

However, that is only part of the picture. What you want to do is really
to build a more-or-less complete Hobbit client message. This begins with
a line that identifies the OS the message is from (see the
~client/tmp/msg.HOSTNAME.txt file on any Hobbit client); this in turn
determines how the data are processed by hobbitd_client. The catch here
is that if your OS name is not recognized, then no processing is done -
even though part of the message might be formatted just like another OS.

So to get your data recognized by Hobbit, you must add the OS to those
recognized, and write a back-end module for hobbitd_client that picks up
those parts of the client message you want to process and sends them
through Hobbit's built-in routines that match the data against the
hobbit-clients.cfg configuration settings. It's not a whole lot of code;
you can copy one of the existing files in the hobbitd/client/ directory,
and use it more or less unchanged for your OS. Then a couple of lines
must be added in hobbitd/hobbitd_client.c to call your new OS module,
and in lib/misc.c to recognize the OS name. I'll be happy to help you
with those bits if you need assistance.