[Xymon] Monitoring multiple values
ralphmitchell at gmail.com
Wed Aug 20 05:29:16 CEST 2014
Now that I've had a chance to read the man page, I see I wasn't remembering
it properly. I thought the last bit:
# The data
included the timestamp for the RRD insert. So, here's another approach
that may work. Instead of echoing out the data, it could be directly
written to the rrd, like this:
MINUS1=`expr $TIME - 60`
MINUS2=`expr $MINUS1 - 60`
MINUS3=`expr $MINUS2 - 60`
MINUS4=`expr $MINUS3 - 60`
rrdtool update $RRD $MINUS4:$DATA4
rrdtool update $RRD $MINUS3:$DATA3
rrdtool update $RRD $MINUS2:$DATA2
rrdtool update $RRD $MINUS1:$DATA1
rrdtool update $RRD $TIME:$DATA0
You would need to break out the 5 data points from the original message as
DATA0 through DATA4. As long as you don't echo out the data values, I
*think* xymond_rrd won't update the rrd for itself. Even it it does enter
a NaN value, you've just fired off 5 real data points, which ought to be
more significant that the NaN. By updating the Xymon rrd for the server,
you still get the graphs in the trends column, with multiple time spreads,
I hope that makes sense. I don't have a handy test server to try it out on.
Another possibility, if you (or someone nearby) are handy with C. The
xymond_sample.c program is included in the Xymon source. It demonstrates
how to hook into the message flow and process incoming data. It ought to
be possible to achieve the above rrd updates by receiving the message and
dropping the data points back into the message stream at 60 second
intervals. Maybe. You *really* need a spare test server to try that
On Tue, Aug 19, 2014 at 11:22 AM, David Welker <dewelker at gmail.com> wrote:
> This sounded like a great idea, so I got the status showing up via the
> extra-scripts option, but the info on the data message is a little vague.
> According to the example, I just echo the DS statements, then the dataset
> name on a line by itself, followed by the data for one dataset on a line by
> itself, which doesn't seem to do anything in the way of creating any of the
> multiple rrds I need, nor does it address the time consideration for
> multple values (I need to insert 5 values a minute apart from 5 mins.
> before putting them into the rrd - I know this can be done with the rrdtool
> update command, but can it be done here somehow?) Anybody have an example
> of a multi-dataset case being run via the extra-scripts option of the
> xymond_rrd they'd be willing to share?
> On Fri, Aug 15, 2014 at 10:09 AM, Ralph Mitchell <ralphmitchell at gmail.com>
>> You could do that server-side. Look at the man page for xymond_rrd. The
>> --extra-script option allows you to pipe incoming data through a script to
>> process. You could take the report time and subtract 1 min, 2 min, etc,
>> then emit rrd updates as required. The client would still send all 5
>> values at the same time, but they'd be recorded as if received over the
>> preceding 5 minute block.
>> Ralph Mitchell
>> On Aug 15, 2014 9:55 AM, "David Welker" <dewelker at gmail.com> wrote:
>>> I've been looking, but haven't seen anything in the documentation, on
>>> the website, or in the mailing list that addresses this:
>>> I need to monitor 5 values that are received all at the same time. I'd
>>> like to insert the values at one minute intervals getting a consolidated
>>> data point (CDP) every 5 minutes that I can graph.
>>> For example, I ping a host via client script, 5 times, returning all of
>>> the data at one time. I want to put all 5 values in the database (rrd),
>>> but spaced apart every minute so I get a decent CDP. I could probably do
>>> this if this was on the server (could I?), but the script HAS to be on the
>>> client in this case. Is this even doable?
>>> Thanks, in advance, for any suggestions!
>>> Xymon mailing list
>>> Xymon at xymon.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Xymon