Page 1 of 2

Performance counter monitoring not working

Posted: Thu Nov 24, 2016 7:00 am
by jyoti22
Hi Team I am getting error for logicalDisk(_Total)\\Avg. Disk sec/Transfer parameter.

I have configured it like this

check command check_nrpe
command view $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
ARG1 CheckCounter
ARG2 -a "Counter=\\logicalDisk(_Total)\\Avg. Disk sec/Transfer" ShowAll MinWarn=40 MinCrit=45


Error : Failed to poll counter: \\logicalDisk(_Total)\\Avg. Disk sec/Transfer Failed to poll counter \\logicalDisk(_Total)\\Avg. Disk sec/Transfer: c0000bc6: The data is not valid.


Kindly help to fix it.

Target windows machine is Windows 2003 SP2. Screenshot of performance monitor is as attached.

Please note, same command works fine for win2008 servers onwards...

Re: Performance counter monitoring not working

Posted: Mon Nov 28, 2016 10:21 am
by rkennedy
What version of NSClient++ are you using? You may need to do some further escaping as this may be related - https://github.com/mickem/nscp/issues/4 ... t-63267894

The other option is trying to upgrade your NSClient++, or trying a different version.

Re: Performance counter monitoring not working

Posted: Thu Dec 01, 2016 4:55 am
by jyoti22
Hi,

We are using NSCP-0.5.0.62-Win32. And below is the command

[[email protected] ~]# /usr/local/nagios/libexec/check_nrpe -H xx.xx.xx.xx -t 30 -c CheckCounter -a "Counter=:logicalDisk(_Total):Avg. Disk sec/Transfer"

Failed to get value

Re: Performance counter monitoring not working

Posted: Thu Dec 01, 2016 1:28 pm
by tgriep
Try and rebuild the counters on your Windows server to see if that fixes the error.
Login as an administrator on that server and run this in a command prompt.

Code: Select all

cd c:\windows\system32
lodctr /R
Let us know if it works.

Re: Performance counter monitoring not working

Posted: Thu Dec 08, 2016 6:09 am
by jyoti22
I rebuilt the counters and tried again. But no luck. Its the same

Failed to get value

Re: Performance counter monitoring not working

Posted: Thu Dec 08, 2016 9:44 am
by tgriep
Try the examples below and see if you can get any results from your server for these counters.

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -t 30 -c CheckCounter -a "Counter=\\\\VNMSSCTX07\\logicalDisk(_Total)\\Avg. Disk sec/Transfer" ShowAll MinWarn=40 MinCrit=45
/usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -t 30 -c CheckCounter -a "Counter=\\logicalDisk(_Total)\\Avg. Disk sec/Transfer" ShowAll MinWarn=40 MinCrit=45

Re: Performance counter monitoring not working

Posted: Sun Dec 11, 2016 11:41 pm
by jyoti22
still the same,

[[email protected] libexec]# ./check_nrpe -H xx.xx.xx.xx -t 30 -c CheckCounter -a "Counter=\\\\VNMSSCTX07\\logicalDisk(_Total)\\Avg. Disk sec/Transfer" ShowAll MinWarn=40 MinCrit=45
Failed to poll counter: \\VNMSSCTX10\logicalDisk(_Total)\Avg. Disk sec/Transfer Failed to poll counter \\VNMSSCTX07\logicalDisk(_Total)\Avg. Disk sec/Transfer: c0000bc6: The data is not valid.

[[email protected] libexec]# ./check_nrpe -H xx.xx.xx.xx -t 30 -c CheckCounter -a "Counter=\\logicalDisk(_Total)\\Avg. Disk sec/Transfer" ShowAll MinWarn=40 MinCrit=45
Failed to poll counter: \logicalDisk(_Total)\Avg. Disk sec/Transfer Failed to poll counter \logicalDisk(_Total)\Avg. Disk sec/Transfer: c0000bc6: The data is not valid.

Re: Performance counter monitoring not working

Posted: Mon Dec 12, 2016 10:36 am
by rkennedy
I don't believe the newest NSClient++ is going to work well with Windows 2003 SP2, you will more than likely need to try 0.3.9 as a version which should work.

It appears to be working fine on my end -

Code: Select all

[root@localhost tmp]# /usr/local/nagios/libexec/check_nrpe -H 192.168.47.8 -t 30 -c CheckCounter -a "Counter=\\logicalDisk(_Total)\\Avg. Disk sec/Transfer" ShowAll MinWarn=40 MinCrit=45
CRITICAL: \logicalDisk(_Total)\Avg. Disk sec/Transfer = 0|'\logicalDisk(_Total)\Avg. Disk sec/Transfernone'=0;40;45

Re: Performance counter monitoring not working

Posted: Wed Dec 14, 2016 2:24 am
by jyoti22
Thanks,
I installed NSClient++ 0.3.9 and tried.

Avg. Disk sec/Transfer works fine with check_nt and not with check_nrpe.

The other services where we used check_nrpe is not working.

We have attached the NSC configuration file and the screen shot of other services using check_nrpe

getting error " UNKNOWN: No handler for that command"

Re: Performance counter monitoring not working

Posted: Wed Dec 14, 2016 10:43 am
by rkennedy
When you switched from 0.5.0 -> 0.3.9, the configuration file switched from nsclient.ini to NSC.ini - you'll want to take this into account and adjust your external commands accordingly.