Unit Counters and PNP4Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
TMitera
Posts: 1
Joined: Tue Feb 14, 2012 4:39 pm

Unit Counters and PNP4Nagios

Post by TMitera »

Hello all, I am having a pair of issues, centered on unit counters and getting pnp4nagios to graph them properly.

The unit counter issue stems from the command that I am using to check the current disk latency via the "Avg Disk/sec Transfer" Windows performance counter:

Code: Select all

check_nt -H X.X.X.X -p XXXX -v COUNTER -l "\\LogicalDisk(C:)\\Avg. Disk sec/Transfer","Response Time: %.3f"
Response Time: 0.001 | 'Response Time: %.3f'=0.000500%;0.000000;0.000000;
Admittedly I have some kinks to work out, as I doubt that the disk has a mere one millisecond latency, but you get the idea. I want to include up to three decimal places since the output is in seconds, and I'd like to have the measurement include the millisecond place. However, when I do this it includes the %.3f in the "Datasource" graph headers in PNP4Nagios, al la "Datasource: Response Time: %.3f". In addition, PNP4Nagios is trying to graph it as a percentage and not as a normal number, which makes it essentially worthless as I'm now graphing numbers vastly less than one on a scale that goes to 100.

Taking a step back, am I just going about this the wrong way, or is there a way that I can clean up the output and then create a template for the graphing? I've spent considerable time searching this forum as well as online in general, but I can't seem to grasp how to achieve this goal.
wintland
Posts: 9
Joined: Mon Feb 20, 2012 9:52 am

Re: Unit Counters and PNP4Nagios

Post by wintland »

I have the exact same problem and have spent hours reading on the pnp4nagios site as well as these forums to no avail. If anyone has an answer I would be most appreciative as well!
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Unit Counters and PNP4Nagios

Post by mguthrie »

If the % sign is in the performance data, the PNP graph will automatically scale to 100. You could try modifying the plugin to remove the % from the performance data string and see if that scales your graph better. However, just know that if you change the performance data format for that plugin, you'll probably lose your old rrd data for that service since it will create a new file for it.

http://nagiosplug.sourceforge.net/devel ... tml#AEN201
Locked