Page 1 of 1

Using CheckCounter to get PerfMon metrics always zero

Posted: Tue Oct 14, 2014 7:12 am
by cylindric
I'm trying to get Nagios to monitor some perfmon counters, and am having a problem getting non-zero values out of it in some cases.

My first requirement was for IIS Current Connections, which was pretty straight forward and works as I hoped:

Code: Select all

[root@localhost libexec]# ./check_nrpe -H servername -c CheckCounter -a "Counter:con=\\Web Service(_total)\\Current Connections" ShowAll
OK: \Web Service(_total)\Current Connections = 412|'con_value'=412;0;0
But the same thing for IIS Requests per second always returns zero:

Code: Select all

[root@localhost libexec]# ./check_nrpe -H servername -c CheckCounter -a "Counter:con=\\Web Service(_total)\\Total Method Requests/sec" ShowAll
OK: \Web Service(_total)\Total Method Requests/sec = 0|'con_value'=0;0;0
I have tried with Averages=true and Averages=false.

NSClient++ is version 0.4.2.88 2014-03-16

Re: Using CheckCounter to get PerfMon metrics always zero

Posted: Tue Oct 14, 2014 7:20 am
by cylindric
Hmm. I just tried with NSClient++ version 0.4.2.93, and I now get an actual error:

Code: Select all

[root@localhost libexec]# ./check_nrpe -H servername -c CheckCounter -a "Counter:con=\\Web Service(_total)\\Total Method Requests/sec" ShowAll
Failed to poll counter: con Failed to poll counter \Web Service(_total)\Total Method Requests/sec: c0000bc6: The data is not valid.
Seems the new version breaks any perf counters with a "/" in the name :(

Re: Using CheckCounter to get PerfMon metrics always zero

Posted: Thu Oct 16, 2014 9:43 am
by slansing
Odd, and you've verified that "\Total Method Requests/sec" actually exists on that windows system? Is it's value above 0 in most cases? I'm curious as to why it is failing on a newer version of nsclient, but reporting back on the older one.