Page 1 of 1

Windows Counter checks failing after NCP Upgrade to 2.1.8

Posted: Tue Aug 20, 2019 11:13 am
by Sampath.Basireddy
We recently upgraded NCPA to 2.1.8 and now we are seeing Windows Counter checks failing.

Here is the command:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H <hostname> -t 'token' -P 5693 -M 'windowscounters/PhysicalDisk(0 C:)/Avg. Disk Queue Length'
Error message: The data is not valid. You may need to add the sleep=1 parameter.

Re: Windows Counter checks failing after NCP Upgrade to 2.1.

Posted: Tue Aug 20, 2019 12:15 pm
by mbellerue
That is odd that it would stop working after the upgrade. Did you try adding the sleep=1 parameter? Did it change anything?

Re: Windows Counter checks failing after NCP Upgrade to 2.1.

Posted: Tue Aug 20, 2019 2:58 pm
by Sampath.Basireddy
No luck with sleep=1 parameter either:

Code: Select all

root@nagios1:[~]: /usr/local/nagios/libexec/check_ncpa.py -H <server> -t 'token' -P 5693 -M '/windowscounters/PhysicalDisk(0 C:)/Avg. Disk Queue Length sleep=1'
The specified counter could not be found.

root@nagios1:[~]: /usr/local/nagios/libexec/check_ncpa.py -H <server> -t 'token' -P 5693 -M '/windowscounters/PhysicalDisk(0 C:)/Avg. Disk Queue Length?sleep=1'
The specified counter could not be found.

Re: Windows Counter checks failing after NCP Upgrade to 2.1.

Posted: Tue Aug 20, 2019 3:49 pm
by mbellerue
Okay, this one took me a moment to track down.

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H <server> -t 'token' -P 5693 -M '/windowscounters/PhysicalDisk(*)/Avg. Disk Queue Length' -q sleep=1
I was able to get the command above to run. It looks like there was a change to NCPA sometime after 2.1.2 that requires -q sleep=1. I could not get the command to work with PhysicalDisk(0 C:). Never mind this, I had a typo in my command. It does work with PhysicalDisk(0 C:)

Re: Windows Counter checks failing after NCP Upgrade to 2.1.

Posted: Fri Aug 23, 2019 11:51 am
by Sampath.Basireddy
Thanks @mbellerue, its working now.

In fact, 2.1.8 is not accepting '%20' in place of spaces any more.

Re: Windows Counter checks failing after NCP Upgrade to 2.1.

Posted: Fri Aug 23, 2019 12:47 pm
by mbellerue
Excellent, glad to hear it's working!

Regarding the %20 vs spaces, is that going to be a problem that needs to be solved?

Re: Windows Counter checks failing after NCP Upgrade to 2.1.

Posted: Mon Aug 26, 2019 10:01 am
by Sampath.Basireddy
Fortunately we didn't had a lot of checks with '%20', so it is not a problem.

But was curious to find out if that too was part of the new 2.1.8. Usually backwards compatibility should work, right?

Re: Windows Counter checks failing after NCP Upgrade to 2.1.

Posted: Mon Aug 26, 2019 12:03 pm
by mbellerue
Do you have an example of a command where %20 was working, and now it isn't? Also what version of NCPA did you upgrade from? I'll see if I can replicate the setup on my side.