lists.netmrg.net lists.netmrg.net
NetMRG discussion and support
 
FAQ :: Search :: Memberlist :: Usergroups :: Register
Profile :: Log in to check your private messages :: Log in

monitoring hp jet direct, graphs don't looks right

 
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support
Author Message
BryanRagon
Beginner


Joined: 09 Jun 2004
Posts: 8

PostPosted: Wed Jun 09, 2004 4:11 pm    Post subject: monitoring hp jet direct, graphs don't looks right Reply with quote

I'm trying to monitor the page output of our HP printers. I setup two new SNMP tests:
HP - Page Count .1.3.6.1.2.1.43.10.2.1.4.1.1
HP - Pages Count (reboot) .1.3.6.1.2.1.43.10.2.1.5.1.1

I then created a new device, new group, and added two monitors for those two SNMP tests. of type Counter, Min of undefined, maximum of 200000.

I then let it run for a half hour or so. The last value field (shown when in the groups->Devicename->subdevice page, which lists the monitors), shows the proper number, in my case 196.96k pages printed. However the graph doesn't look right at all. The Y axis has 1m 2m and 3m, and the graph goes up to 3.2M, but only when a page has printed, between prints it goes back to zero.

By using 'rrdtool dump mon_##.rrd' I get the following points of interest:

Code:

        <version> 0001 </version>
        <step> 300 </step> <!-- Seconds -->
        <lastupdate> 1086796801 </lastupdate> <!-- 2004-06-09 12:00:01 EDT -->

        <ds>
                <name> mon_19 </name>
                <type> COUNTER </type>
                <minimal_heartbeat> 600 </minimal_heartbeat>
                <min> NaN </min>
                <max> 2.0000000000e+05 </max>

                <!-- PDP Status -->
                <last_ds> 196967 </last_ds>
                <value> 0.0000000000e+00 </value>
                <unknown_sec> 0 </unknown_sec>
        </ds>

SNIP


                        <!-- 2004-06-09 11:35:00 EDT / 1086795300 --> <row><v> NaN </v></row>
                        <!-- 2004-06-09 11:40:00 EDT / 1086795600 --> <row><v> 0.0000000000e+00 </v></row>
                        <!-- 2004-06-09 11:45:00 EDT / 1086795900 --> <row><v> 0.0000000000e+00 </v></row>
                        <!-- 2004-06-09 11:50:00 EDT / 1086796200 --> <row><v> 3.3333333333e-03 </v></row>
                        <!-- 2004-06-09 11:55:00 EDT / 1086796500 --> <row><v> 0.0000000000e+00 </v></row>
                        <!-- 2004-06-09 12:00:00 EDT / 1086796800 --> <row><v> 0.0000000000e+00 </v></row>


Any thoughts?
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Wed Jun 09, 2004 5:45 pm    Post subject: Reply with quote

My best guess (without reading the mib) is that the 'page count' is a guage, not a counter. The spikes on your graphs sound like counter rollover events. If this is the case, you'll have to delete your monitor files to get the change from counter to guage to take effect.

-Doug
Back to top
BryanRagon
Beginner


Joined: 09 Jun 2004
Posts: 8

PostPosted: Wed Jun 09, 2004 5:54 pm    Post subject: Reply with quote

Code:

[root@ranger rrd]# snmpwalk -c pubstring -v 1 ptr-01-hp01.ze.zapeng.com .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: 196969


From my understanding, that means the MIB has defined the UID as a counter, not a guage.... or is that wrong?

Thanks for the fast reply!!!!

Bryan
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Wed Jun 09, 2004 6:05 pm    Post subject: Reply with quote

Yes, you're correct. I think I know what's going on here.

With counters, the values gathered are averaged out over the gathered period. ie, if you're displaying graphs on a 5 minute interval and you only print one page in that five minutes, you're going to see a value of 1/300.
What we've done in the past here is increase the multiple in our template/custom graph for that monitor to something higher; usually a multiple of 60 (for 1 minute). You might want to try chaning it to 60, and if that's not high enough to see your data (ie, you don't print 1 page per minute), change it to 300.
Hopefully that will help you see your data here. I think the problem is just that the data isn't changing very often.

-Doug
Back to top
BryanRagon
Beginner


Joined: 09 Jun 2004
Posts: 8

PostPosted: Wed Jun 09, 2004 6:39 pm    Post subject: Reply with quote

So what you're saying is that it's trying to graph pages printed per minute? I was hoping for just a graph of how many pages have been printed. So the graph is constantly increasing as time goes on.

Average pages per minute (or hour) would possibly be another graph I'd like to do at some point also.
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Wed Jun 09, 2004 6:49 pm    Post subject: Reply with quote

Correct; that's how counters work. If you want to see an ever-increasing graph of pages printed, convert it to a guage. Again, delete your monitors first.

-Doug
Back to top
silfreed
Site Admin


Joined: 19 Jan 2003
Posts: 394
Location: Shippensburg, PA, USA

PostPosted: Wed Jun 09, 2004 6:50 pm    Post subject: Reply with quote

Er, let me qualify 'ever-increasing'. It will probably work on your HP printer since they keep their page count internally; most other devices have counters that 'roll over', that is, they will goto zero when they get too large (usually over 2^32).

-Doug
Back to top
BryanRagon
Beginner


Joined: 09 Jun 2004
Posts: 8

PostPosted: Wed Jun 09, 2004 7:17 pm    Post subject: Reply with quote

ah gotcha.... I was thinking of coutners/guages the other way around...

I was thinking a counter is tell me what that current count is

gauge made me think of a tachometer or speedometer.... pages/per minute, that kind of thing...

I'll change the montior, blow out the mon_XX.rrd give it some time and let you know.

Again, thanks!

Bryan
Back to top
BryanRagon
Beginner


Joined: 09 Jun 2004
Posts: 8

PostPosted: Wed Jun 09, 2004 7:33 pm    Post subject: Thanks!!!!! Reply with quote

:D

Thanks, works like a charm.

Now to keep setting up the rest of the printers in the office :-D


we have some historical data from when we used mrtg, is there any way to import that data using rrdtool from the commandline?

Thanks!
Back to top
balleman
Site Admin


Joined: 20 Jan 2003
Posts: 282

PostPosted: Wed Jun 09, 2004 7:58 pm    Post subject: Reply with quote

It should be possible import this data, however we have never written out a procedure for it.

You will want to first create monitors for the files, so that you have a monitor number to reference. You can then rename the rrd file, and use "rrdtool tune" to change the DS name to mon_1234 (or whatever).

There are a lot of potential issues. NetMRG only supports one DS per RRD file, but other programs (and probably MRTG) use more than one per file. I am not sure if these can be split easily... you might need to "rrdtool dump", split the DSes out of the XML, and then "rrdtool restore" them into separate files. Another issue is that other products will have a different geometry for their RRAs, but rrdtool should be pretty good at hiding that in most cases.

In any case, it is possible, but not trivial. Good luck, and let us know how it comes out if you decide to attempt it.
Back to top
BryanRagon
Beginner


Joined: 09 Jun 2004
Posts: 8

PostPosted: Wed Jun 09, 2004 8:51 pm    Post subject: Sure enough! Reply with quote

Sure enough did.

Code:

rrdtool dump old_data.rrd > old_data.xml


Sure enough, it recorded two values (in my example, page count, and page count since reboot).. I needed to split them into two different ones, so I did page count first).

There were two <ds> sections, so I removed the second. I also renamed the first one from <name> ds0 </name> to <name> mon_19 </name>.

Then down in the <rra><cdp_prep> there were two <ds> tags in there, I removed the second set in each <cdp_prep> in the xml file (there were only 8 so I did it manually).

Then in each of the <database> tags (8 database tags) there were hundres of rows of the form:

Code:

<!-- 2004-06-06 21:35:00 EDT / 1086572100 --> <row><v> NaN </v><v> NaN </v></row>


I needed to remove the second <v> tags, so I ran it through the following perl one-liner:

Code:


perl -p -e 's/<row><v>(.*)<\/v><v>(.*)<\/v><\/row>/<row><v>$1<\/v><\/row>/g' old_data.xml > old_data_next.xml


Then all I had to do was remove the "original" mon_19.rrd created by netmrg, and do a:

Code:

rrdtool restore old_data_next.xml /var/lib/netmrg/mon_19.rrd


Viola.

The only thing I noticed was that netmrg had several <cf> tags, four each of AVERAGE, LAST, and MAX. My rrd from the old program had only AVERAGE and MAX... everything appears to be working, but is it possible to use rrdtune to add the LAST tags? netmrg_gatherer has run several times and not "auto-added" it like I thought it might.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    lists.netmrg.net Forum Index -> Support All times are GMT
Page 1 of 1

 



smartBlue Style © 2002 Smartor
Powered by phpBB © 2001, 2002 phpBB Group