check_nrep 3.2.0 , performance counter and nsclient 0.5

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

check_nrep 3.2.0 , performance counter and nsclient 0.5

Post 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
Attachments
perfcounter.png
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: check_nrep 3.2.0 , performance counter and nsclient 0.5

Post 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
Former Nagios employee
https://www.mcapra.com/
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: check_nrep 3.2.0 , performance counter and nsclient 0.5

Post by lmiltchev »

Emilio, did you try mcapra's suggestion? Were you able to resolve your issue?
Be sure to check out our Knowledgebase for helpful articles and solutions!
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: check_nrep 3.2.0 , performance counter and nsclient 0.5

Post 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
Locked