Hello,<br><br>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.<br>
<br>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.<br>
<br>1. Get lowest value.<br>2. Get highest value.<br>3. Subtract 1 from 2, and print.<br><br>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.<br>
<br>/***<br>report.mib2printer.lifeCount.command=--title="Total Pages Printed" \<br> --vertical-label="Pages Printed" \<br> DEF:val1={rrd1}:lifeCount:AVERAGE \<br> DEF:minVal1={rrd1}:lifeCount:MIN \<br>
DEF:maxVal1={rrd1}:lifeCount:MAX \<br> VDEF:start=minVal1:AVERAGE \<br> VDEF:endVal=maxVal1:AVERAGE \<br> LINE1:val1#00cc00:"Total" \<br> GPRINT:val1:AVERAGE:" Avg \\: %8.2lf %s" \<br> GPRINT:val1:MIN:"Min \\: %8.2lf %s" \<br>
GPRINT:val1:MAX:"Max \\: %8.2lf %s" \<br> GPRINT:endVal-start:" Pages Printed \\: %8.2lf %s" \<br>***/<br><br>This runs just fine if I delete the last line. If I replace the two VDEFs with<br><br>CDEF:pageCount=maxVal1,minVal1,-<br>
<br>and add a line<br><br>GPRINT:pageCount:AVERAGE:" Page Coutn \\: %8.2lf %s "<br><br>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?<br>
<br>Any assistance would be greatly appreciated.<br><br>Regards,<br>Travis<br><br>