Performance counter monitoring not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Performance counter monitoring not working

Post 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...
You do not have the required permissions to view the files attached to this post.
Last edited by dwhitfield on Thu Dec 15, 2016 10:24 am, edited 1 time in total.
Reason: marking with green check mark
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Performance counter monitoring not working

Post 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.
Former Nagios Employee
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: Performance counter monitoring not working

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Performance counter monitoring not working

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: Performance counter monitoring not working

Post by jyoti22 »

I rebuilt the counters and tried again. But no luck. Its the same

Failed to get value
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Performance counter monitoring not working

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: Performance counter monitoring not working

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Performance counter monitoring not working

Post 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
Former Nagios Employee
jyoti22
Posts: 254
Joined: Mon Mar 23, 2015 4:50 am

Re: Performance counter monitoring not working

Post 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"
You do not have the required permissions to view the files attached to this post.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Performance counter monitoring not working

Post 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.
Former Nagios Employee
Locked