Windows Counter checks failing after NCP Upgrade to 2.1.8

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

Windows Counter checks failing after NCP Upgrade to 2.1.8

Post 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.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

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

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

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

Post 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.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

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

Post 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:)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

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

Post by Sampath.Basireddy »

Thanks @mbellerue, its working now.

In fact, 2.1.8 is not accepting '%20' in place of spaces any more.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

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

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Sampath.Basireddy
Posts: 252
Joined: Wed Dec 14, 2016 12:30 pm

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

Post 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?
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked