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