[rrd-users] Finding change in an RRD with OpenNMS

Travis Love travis.love at hope.edu
Mon Apr 20 16:34:28 CEST 2009


Hello,

I'm working with OpenNMS, a system which uses RRD for its graphing
capabilities. I want to be able to generate reports on printer usage, since
OpenNMS is already pulling in all that detailed SNMP data into RRDs, and it
would be great if I could make these accessible via the OpenNMS interface.
I've got everything on the OpenNMS end set up, but I'm having problems with
the graph scripts, which is why I'm here.

The printers track how many pages are printed over the printer's lifetime.
Obviously, this isn't particularly useful when you're interested in
frequency. What I need to do for each printer's Page Count RRA, then, should
be straightforward.

1. Get lowest value.
2. Get highest value.
3. Subtract 1 from 2, and print.

However, I'm not sure how to do this with RRD. I've tried a bunch of
different things, and here's what I've got. It's a snippet from the OpenNMS
config file, so it's not a pure command line script, but the only real
difference is that {rrd1} is a program variable. So here goes.

/***
report.mib2printer.lifeCount.command=--title="Total Pages Printed" \
 --vertical-label="Pages Printed" \
 DEF:val1={rrd1}:lifeCount:AVERAGE \
 DEF:minVal1={rrd1}:lifeCount:MIN \
 DEF:maxVal1={rrd1}:lifeCount:MAX \
 VDEF:start=minVal1:AVERAGE \
 VDEF:endVal=maxVal1:AVERAGE \
 LINE1:val1#00cc00:"Total" \
 GPRINT:val1:AVERAGE:" Avg \\: %8.2lf %s" \
 GPRINT:val1:MIN:"Min \\: %8.2lf %s" \
 GPRINT:val1:MAX:"Max \\: %8.2lf %s" \
 GPRINT:endVal-start:" Pages Printed \\: %8.2lf %s" \
***/

This runs just fine if I delete the last line. If I replace the two VDEFs
with

CDEF:pageCount=maxVal1,minVal1,-

and add a line

GPRINT:pageCount:AVERAGE:" Page Coutn \\: %8.2lf %s "

Then the script runs, but the results are extremely inconsistent with the
other numbers. It seems like it should be simple enough, and maybe I'm just
not looking at the right documentation, but I haven't had any luck with this
so far. Could someone tell me if what I'm trying to do is possible using RRD
exclusively, and if so, how to do it?

Any assistance would be greatly appreciated.

Regards,
Travis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20090420/efc18c63/attachment.html 


More information about the rrd-users mailing list