Data source not graphed correctly

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

jrohr
Posts: 23
Joined: Wed Sep 12, 2007 2:38 pm

Data source not graphed correctly

Post by jrohr »

Hello,
I'm trying to get a SNMP Generic OID template to return the total value but it keeps giving me an average. I setup a Data template w/ a Data Source item that uses COUNTER and has a max value of 500000000. Also, setup a Graph template w/ 3 graph items: Total (Line2, Average), Min (Gprint, Min) and Current (Gprint, Last).

The first time I set this up it worked fine for a day or so then I got NAN's on that graph. I went through the Debug NAN's tutorial and could not find any problems. At that point I removed that graph and data source and recreated them. I'm also getting the correct result if I run an snmpget from the command line.

How can I troubleshoot this further?

Thanks
jrohr
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post those findings from following the NaN debugging, step-by-step.
Reinhard
jrohr
Posts: 23
Joined: Wed Sep 12, 2007 2:38 pm

Post by jrohr »

I'm not currently getting NAN's on the graphs, I removed that graph and data source then recreated them. Now its just graphing the current average. I would like it to graph the total.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Data source not graphed correctly

Post by gandalf »

jrohr wrote:Hello,
I'm trying to get a SNMP Generic OID template to return the total value
Please post a screenshot of the Graph Template used
Reinhard
jrohr
Posts: 23
Joined: Wed Sep 12, 2007 2:38 pm

Post by jrohr »

Here are the screenshots
Attachments
Graph Template screenshot 2
Graph Template screenshot 2
cacti2.jpg (278.16 KiB) Viewed 4569 times
Graph Template screenshot 1
Graph Template screenshot 1
cacti1.jpg (372.46 KiB) Viewed 4569 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

So you want to graph the "pages printed" counter of that printer, correct? Not the "numbers of pages printed per minute"?
How did you read out the value? Using SNMP? Which OID? Please post result of an snmpwalk against the OID used.
How did you define the data source. For your goal, you need COUNTER!
Reinhard
jrohr
Posts: 23
Joined: Wed Sep 12, 2007 2:38 pm

Post by jrohr »

Yes, I want the total pages printed.

I'm using a generic SNMP template where I specify the OID. It is .1.3.6.1.2.1.43.10.2.1.4.1.1

C:\Net-SNMP>snmpwalk -c public -v1 65.89.140.84 .1.3.6.1.2.1.43.10.2.1.4.1.1
SNMPv2-SMI::mib-2.43.10.2.1.4.1.1 = Counter32: 269

I am already using a COUNTER but it doesn't graph as a counter. I'm including screenshots of the Data Template and Data Source. Can you check them to see if anything looks out of place?
Attachments
Data Source
Data Source
cacti ds.jpg (316.29 KiB) Viewed 4527 times
Data Template screen2
Data Template screen2
cacti dt2.jpg (318.21 KiB) Viewed 4527 times
Data Template screen1
Data Template screen1
cacti dt1.jpg (341.46 KiB) Viewed 4527 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

That's all fine. You should see the AVERAGE consolidation of that COUNTER; it should increase steadily. If you'd like to see LAST consolidation (which makes sense in this case), edit the first Graph Template Item and change AVERAGE to LAST. Make sure, that the RRAs used include LAST cf.
Post a screenshot of the Graph, please
Reinhard
jrohr
Posts: 23
Joined: Wed Sep 12, 2007 2:38 pm

Post by jrohr »

OK, I changed the first Graph Template item from AVERAGE to LAST and made sure the RRA's used include LAST cf. The graph was recreated after making these changes but it still only shows the AVERAGE.
Attachments
Graph
Graph
graph.jpg (70.05 KiB) Viewed 4460 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please select this graph from graph management, switch to debug and post resultrs
Reinhard
jrohr
Posts: 23
Joined: Wed Sep 12, 2007 2:38 pm

Post by jrohr »

Code: Select all

RRDTool Command:

c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="HP2800_Marketing Total Printed Pages (generic)" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="c\:/Inetpub/wwwroot/cacti/rra/hp2800_marketing_hp_pg_count3_212.rrd":hp_pg_count3:LAST \
DEF:b="c\:/Inetpub/wwwroot/cacti/rra/hp2800_marketing_hp_pg_count3_212.rrd":hp_pg_count3:AVERAGE \
LINE2:a#FF0000:"Total Pages"  \
GPRINT:b:MIN:"Min\:%8.0lf"  \
GPRINT:a:LAST:"Current\:%8.0lf" 
RRDTool Says:

OK
I'm not sure why this isn't working... eveything looks right. Let me know if there's something I should double or triple check.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Fine, now I need result of

Code: Select all

rrdtool info hp2800_marketing_hp_pg_count3_212.rrd
Post the first 30 lines only
Reinhard
jrohr
Posts: 23
Joined: Wed Sep 12, 2007 2:38 pm

Post by jrohr »

Code: Select all

C:\RRDTool>rrdtool info c:\Inetpub\wwwroot\cacti\rra\hp2800_marketing_hp_pg_count3_212.rrd
filename  "c:\Inetpub\wwwroot\cacti\rra\hp2800_marketing_hp_pg_count3_212.rrd"
rrd_version = "0003"
step = 300
last_update = 1209395294
ds[hp_pg_count3].type = "COUNTER"
ds[hp_pg_count3].minimal_heartbeat = 600
ds[hp_pg_count3].min = 0.0000000000e+00
ds[hp_pg_count3].max = 5.0000000000e+08
ds[hp_pg_count3].last_ds = "426"
ds[hp_pg_count3].value = 0.0000000000e+00
ds[hp_pg_count3].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 500
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[1].cf = "AVERAGE"
rra[1].rows = 600
rra[1].pdp_per_row = 1
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = NaN
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[2].cf = "AVERAGE"
rra[2].rows = 700
rra[2].pdp_per_row = 6
rra[2].xff = 5.0000000000e-01
rra[2].cdp_prep[0].value = 0.0000000000e+00
rra[2].cdp_prep[0].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 775
rra[3].pdp_per_row = 24
...
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

jrohr wrote:Yes, I want the total pages printed.
So you want to print the absolute value of the number of pages printed by this printer during his life?
I am already using a COUNTER but it doesn't graph as a counter.
I cannot confirm. You've set up each and everything as required by a COUNTER. But your assumption may go wrong when you assume, that a COUNTER will graph the grand total! It won't! A standard COUNTER will always print the "rate" only!

To sum up:
You may change the ds_type of the rrd file from COUNTER to GAUGE. In this case, rrdtool will NOT automatically compute the difference to the last update. You may achieve this by using rrdtool tune for the existing rrd file (Note: changing the data template is fine but this will NOT change existing rrd files).
But please pay attention to the devices behaviour. It's very likely that the print counter will be reset on printer reboot.

Hope we've got it now
Reinhard
jrohr
Posts: 23
Joined: Wed Sep 12, 2007 2:38 pm

Post by jrohr »

So you want to graph the "pages printed" counter of that printer, correct? Not the "numbers of pages printed per minute"? ... For your goal, you need COUNTER!
Your latest post clears up some things.

I duplicated the Graph Template, Graph Mgmt, created a new graph and Data Source, then changed the DS type from COUNTER to GAUGE. After doing this it is graphing correctly.

Also, the page count (impressions) is a total of pages printed through a JetDirect card. This number is not reset when powering off the printer or the JetDirect device. This is essentially what servicemen use to check the miles of a printer.

Thanks for your help!
Attachments
working graph
working graph
graph2.jpg (62.86 KiB) Viewed 4281 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest