Page 1 of 1

check_nrep 3.2.0 , performance counter and nsclient 0.5

Posted: Wed Jul 05, 2017 10:58 am
by emi65
Hi
I use
Nagios Core 4.2.1 on Red Hat Enterprise Linux Server release 6.7 (Santiago)
and I testing check_nrpe 3.2.0 client and NSCLIENT++ installed by package NSCP-0.5.0.62-x64.exe

With the check_nrep 2.15 anche nsclient 0.3.9 I used this comand to get
MSQL performance counter

/usr/lib/nagios/plugins/check_nrpe -H 10.209.40.199 -c CheckCounter -a '\MSSQL$INSTA4:SQL Statistics\"Batch Requests/sec"' ShowAll

after the updated the comand goes in error whit this message
No counters specified: add counter=<name of counter>

I attach an image where you can see how is defined the counter on the server

why I got the error ?

Thanks
Emilio

Re: check_nrep 3.2.0 , performance counter and nsclient 0.5

Posted: Wed Jul 05, 2017 11:16 am
by mcapra
$ is a reserved character in Bash as well as Nagios Core. You will need to appropriately escape that character in your Nagios command definition.

Though this KB article is directed at Nagios XI specifically, the same rules for escaping should apply to Nagios Core:
https://support.nagios.com/kb/article/n ... cters.html

Re: check_nrep 3.2.0 , performance counter and nsclient 0.5

Posted: Wed Jul 05, 2017 1:04 pm
by lmiltchev
Emilio, did you try mcapra's suggestion? Were you able to resolve your issue?

Re: check_nrep 3.2.0 , performance counter and nsclient 0.5

Posted: Thu Jul 06, 2017 4:27 am
by emi65
I solved with this syntax

/usr/lib/nagios/plugins/check_nrpe -H $1 -c CheckCounter -a "Counter:Batch Requests=\\MSSQL\$$INSTA4:SQL Statistics\\Batch Requests/sec" ShowAll

thanks
Emilio

You can consider close this thread