Page 1 of 1

Unit Counters and PNP4Nagios

Posted: Thu Feb 16, 2012 10:29 am
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.

Re: Unit Counters and PNP4Nagios

Posted: Sat Feb 25, 2012 4:56 pm
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!

Re: Unit Counters and PNP4Nagios

Posted: Mon Feb 27, 2012 10:33 am
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