Xymon Mailing List Archive search

Collect RRD data just for specific host/test combinations?

2 messages in this thread

list Sebastian Auriol · Tue, 8 May 2012 16:03:14 +0100 ·
Hi list.  Is there a way of just telling Xymon to collect RRD data just for
specific host/test combinations?  (Rather than all hosts for a given test,
which is how the http://www.xymon.com/xymon/help/howtograph.html page says
is the way to do it.)

Kind regards, 

SebA
list Henrik Størner · Tue, 08 May 2012 18:23:16 +0200 ·
quoted from Sebastian Auriol
On 08-05-2012 17:03, SebA wrote:
Hi list. Is there a way of just telling Xymon to collect RRD data just
for specific host/test combinations? (Rather than all hosts for a given
test, which is how the http://www.xymon.com/xymon/help/howtograph.html
page says is the way to do it.)
Not out of the box.

Wouldn't be terribly difficult, though. The xymond_rrd module is fed with data by xymond_channel via it's standard input filestream. So you could whip up a simple script that you stuck in between xymond_channel and xymond_rrd - it would just look at the "@@status..." line which indicates the beginning of a new message, and if it matches the host+test spec then copy the data to standard output; if it doesn't match, just throw it away.

In pseudo code:

    while (true)
      grab_next_message();
      if (header_matches(firstLineOfMessage))
          print(message);

You can look at the "rootlogin.pl" script to see how you can grab a message from xymond_channel.

Then write a two-line script "rrdfilter.sh"

    #!/bin/sh
    myfilter | xymond_rrd $*
so you filter input through your filter program, and change tasks.cfg from
     CMD xymond_channel --channel=status xymond_rrd ...
to
     CMD xymond_channel --channel=status rrdfilter.sh ...


Regards,
Henrik