I'm trying to convert all of my checks from using nsclient to ncpa. I only have two checks left that look at a performance counter and I'm having trouble making it work with ncpa.
This works with check_nt
/usr/local/nagios/libexec//check_nt -H host01 -p 12489 -s TOKEN -v COUNTER -l "\\MSMQ Queue(host01\private$\queue.reportdata)\Messages in Queue","Reportdata","Messages" -w 1 -c 2
According to this page
https://support.nagios.com/kb/article/p ... s-779.html
This should work
/usr/local/nagios/libexec/check_ncpa.py -H host01 -t TOKEN -M 'windowscounters/MSMQ Queue(host01\private$\queue.reportdata)\Messages in Queue'
However I"m getting this message
UNKNOWN: An error occured connecting to API. (HTTP error: '500 INTERNAL SERVER ERROR')
Running the example for available memory comes back fine with check_ncpa.py so it's something with the MSMQ counters it doesn't like. Is this a bug with check_ncpa?
performance counter not working with ncpa
Re: performance counter not working with ncpa
Sorry for responding to my on post, but since I know this will come up. I tried both \ and / for the path with no luck for either.
Re: performance counter not working with ncpa
Hi
There was one more "\" you didn't try reversing to "/"
on Windows:
from Nagios:
so change yours from:
to:
Thanks
There was one more "\" you didn't try reversing to "/"
on Windows:
Code: Select all
typeperf "\MSMQ Queue(win-0v5rl4ot9c4\private$\admin_queue$)\Messages in Queue"Code: Select all
./check_ncpa.py -H 192.168.23.87 -t 'gjstoken' -P 5693 -M "windowscounters/MSMQ Queue(WIN-0V5RL4OT9C4\private$\admin_queue$)/Messages in Queue" -w 1 -c 2Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H host01 -t TOKEN -M 'windowscounters/MSMQ Queue(host01\private$\queue.reportdata)\Messages in Queue'Code: Select all
/usr/local/nagios/libexec/check_ncpa.py -H host01 -t TOKEN -M 'windowscounters/MSMQ Queue(host01\private$\queue.reportdata)/Messages in Queue'