Nagios XI: escaping () in service args
Posted: Mon Jan 27, 2014 11:22 pm
I'm setting up some nsclient++ nrpe checks against Windows 2012 servers, specifically checking some performance counters. I want to set this up as a new service on the Service Management screen. I'm using "check_nrpe" and passing in "CheckCounter" as $ARG1$, and the "-a" string as $ARG2$.
If I check a perfmon without parentheses, everything is fine (although the back slashes are escaped unnecessarily).
If I check a perfmon with parentheses, the call fails. Here is an example command, provided by the "Test Check Command" dialog:
As you can see, the parentheses are escaped, and this breaks the call. Running nsclient++ in test mode, I get the following error:
If I make the same call from the Linux shell, using my original command, it works. For reference, here is my original command:
I've tried single vs double quotes and have toggled on and off "allow nasty characters" in the nsclient.ini
Is there a way to tell XI not to escape the parentheses?
I am using the Nagios XI trial 2012R2.8c and nsclient++ version NSCP-0.4.1.102-x64.
Thanks.
000000014033E2C0, Version: 000000014033E268, Platform: 000000014033E238
If I check a perfmon without parentheses, everything is fine (although the back slashes are escaped unnecessarily).
If I check a perfmon with parentheses, the call fails. Here is an example command, provided by the "Test Check Command" dialog:
Code: Select all
COMMAND: /usr/local/nagios/libexec/check_nrpe -H my_host_name -t 30 -c CheckCounter -a "Counter:proc=\\Processor Information\(_Total\)\\% Processor Time"Code: Select all
\CheckSystem.cpp:1517 ERROR: Counter not found: \Processor Information\(_Total\)\% Processor Time: -1073738823: The specified counter could not be found.Code: Select all
./check_nrpe -H my_host_name -t 30 -c CheckCounter -a "Counter:proc=\Processor Information(_Total)\% Processor Time"Is there a way to tell XI not to escape the parentheses?
I am using the Nagios XI trial 2012R2.8c and nsclient++ version NSCP-0.4.1.102-x64.
Thanks.
000000014033E2C0, Version: 000000014033E268, Platform: 000000014033E238