[Xymon] xymond_filestore - appending to files?

Henrik Størner henrik at hswn.dk
Fri Apr 20 22:51:59 CEST 2012


Hi John,

> I would like to use the 'xymond_filestore' command to append to
> files when receiving information from a 'data' channel.

[snip description of how it works]

As the man-page says, "[xymond_filestore] receives xymond messages from 
a xymond channel via stdin, and stores these in the filesystem in a 
manner that is compatible with the Big Brother daemon, bbd."

So it's a module that was written for compatibility with the way Big 
Brother works, and it isn't really intended for anything but that one 
purpose. And to be honest, I no longer remember the exact details of how 
Big Brother processed these messages; the last time I had a look at how 
BB worked was almost 10 years ago.

Going back to your original request: Having the data from "data" 
messages appended to a file. Like the other Xymon channels, information 
sent via the "data" channel is easily available to any server-side 
module you can think of. Just run a task out of tasks.cfg that picks up 
the data-channel messages:

    xymond_channel --channel=data mymodule.pl

and then write your "mymodule.pl" program to do what you like. It 
doesn't have to be Perl; feel free to use whatever scripting tool you 
fancy. I just used Perl as an example, because there is a little Perl 
program included with Xymon that shows how to do that - look at the 
xymond/xymond_rootlogin.pl program. The header-line of a "data" message 
is different from the "client" header that rootlogin.pl handles, but not 
very much so you should be able to work it out. You can see the messages 
by running

    xymoncmd xymond_channel --channel=data cat

while logged in as the Xymon user.

And feel free to use xymond_filestore as a starting point for writing 
your own data-handling program :-)


Regards,
Henrik



More information about the Xymon mailing list