Right on target! Just before I sent that last response, I figured out
Xymon wouldn't let me use the N-300, etc. notations and decided to try it
via Rrdtool directly, so at least I was thinking along the right lines!
Only three problems...
1) Minor problem - just an fyi, but trying to update a non-existent rrd
fails, so you have to add a bit more code to create.one first...no big
deal, but brings me to....
2.) If I want to eventually show all 5 figures, plus an average, min, max,
and last, how do I...
a.) define the rrd? I have:
DS:time:gauge:600:U:U
RRA:AVERAGE:0.5:1:1200
RRA:MIN:0.5:24:2400
RRA:MAX:0.5:24:2400
RRA:AVERAGE:0.5:24:2400
b.) define the graph? I have:
[tvalues]
TITLE Time Values
YAXIS Time (m/s)
DEF:t1=time.rrd:t1:AVERAGE
DEF:t2=time.rrd:t2:AVERAGE
DEF:t3=time.rrd:t3:AVERAGE
DEF:t4=time.rrd:t4:AVERAGE
DEF:t5=time.rrd:t5:AVERAGE
LINE2:
GPRINT:t1:%6.11f%s (cur)
GPRINT:t2::\: %6.11f%s (cur)
GPRINT:t3::\: %6.11f%s (cur)
GPRINT:t4::\: %6.11f%s (cur)
GPRINT:t5::\: %6.11f%s (cur)
GPRINT:t6: \: %6.11f%s (max)
GPRINT:t6: \: %6.11f%s (min)
GPRINT:t6: \: %6.11f%s (avg)
* Note: Assuming that defining the RRAs was correct, I really want the
RRA values for t6
3.) lastly, I set up the client-side script to collect the data via a
clientlaunch.cfg task, the clientlaunch xymond_rrd status then runs my
script to create the rrds (via the extra-script/extra-tests), so do I need
extra-script/extra-tests on the xymond_rrd data line?
Currently, both the rrds and the graph are being created, but empty.
Thanks for your suggestions!
Any and all help appreciated,
David
On Tue, Aug 19, 2014 at 11:29 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>
wrote:
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
echo "$TEMP:$WIND:$HMTY:$RAIN"
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:
RRD=/home/xymon/data/rrd/<hostname>/thing.rrd
TIME=`date +%s`
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,
zooming, etc.
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
out... :-)
Ralph Mitchell
On Tue, Aug 19, 2014 at 11:22 AM, David Welker <user-04cf53598626@xymon.invalid>
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?
Thanks!
David
On Fri, Aug 15, 2014 at 10:09 AM, Ralph Mitchell <
user-00a5e44c48c0@xymon.invalid> wrote:
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" <user-04cf53598626@xymon.invalid> 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!
David