Beware of spaces in checks with new NCPA

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Beware of spaces in checks with new NCPA

Post by vAJ »

I found something, not a bug, but an improvement, that doesn't appear to be referenced in the changelogs for check_ncpa (component) or NCPA (agent) 2.0.

Previous versions of check_ncpa you had to use %20 instead of spaces. This was most common in PerfMon counter checks. The newer script does not and allows spaces:

DOESN'T WORK (now just returns 0 value):

Code: Select all

 /usr/local/nagios/libexec/check_ncpa.py -H $HOST$ -t $TOKEN$ -P 5693 -M "windowscounters/MSMQ Queue(brhpmsgp1/private\$/p_ps2hrp_data)/Messages%20in%20Queue" 
Updated:

Code: Select all

/usr/local/nagios/libexec/check_ncpa.py -H $HOST$ -t $TOKEN$ -P 5693 -M "windowscounters/MSMQ Queue(brhpmsgp1/private$/p_ps2hrp_data)/Messages in Queue" 

FYI - Hope this helps. Check your service checks when upgrading this component. And MAJOR THANKS to the Devel team for releasing a much needed NCPA upgrade!

I feel like George Bailey running around the town yelling Merry Christmas ;)

**EDIT: reference to escaping characters was removed. I show in the updated check that I removed the escape for the $. This works both ways with check_ncpa.py v1.0.2
Andrew J. - Do you even grok?
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Beware of spaces in checks with new NCPA

Post by avandemore »

Thank you for the feedback. It has been reported to the developers.
Previous Nagios employee
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Beware of spaces in checks with new NCPA

Post by rkennedy »

In addition to what @avandemore mentioned, Jake said the documentation has been updated.
Former Nagios Employee
vAJ
Posts: 456
Joined: Thu Nov 08, 2012 5:09 pm
Location: Austin, TX

Re: Beware of spaces in checks with new NCPA

Post by vAJ »

Thanks guys.

And just to be clear, I'm glad for the change. This is in no way a bug. This is good design and moving the ball forward. Greatly appreciated.

Lock it!
Andrew J. - Do you even grok?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Beware of spaces in checks with new NCPA

Post by rkennedy »

We appreciate the feedback!

/locked
Former Nagios Employee
Locked