[hobbit] File status information in client-data
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 /301-903-2211
-----Original Message----- From: henrik at hswn.dk [mailto:henrik at hswn.dk] Sent: Tuesday, November 14, 2006 3:30 AM To: hobbit at hswn.dk 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.
On Tue, Nov 14, 2006 at 08:55:33AM -0500, Kern, Thomas wrote:
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?
If both are sent, and the client-data message is recognized and processed by hobbitd_client, then you will get "random" results. Internally, the client-data information results in status-messages being generated, so you would alternately see a status-message generated from the client-data, and one generated by your own system.
In other words, "don't do that".
Regards, Henrik
participants (2)
-
henrik@hswn.dk
-
Thomas.Kern@hq.doe.gov