Using CheckCounter to get PerfMon metrics always zero

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
cylindric
Posts: 40
Joined: Wed May 29, 2013 9:50 am

Using CheckCounter to get PerfMon metrics always zero

Post 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
Cyl
Nagios Core 4.3.4 on Ubuntu 16.04.3
cylindric
Posts: 40
Joined: Wed May 29, 2013 9:50 am

Re: Using CheckCounter to get PerfMon metrics always zero

Post 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 :(
Cyl
Nagios Core 4.3.4 on Ubuntu 16.04.3
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Using CheckCounter to get PerfMon metrics always zero

Post 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.
Locked