Problem with check_nrpe CheckCounters check from GUI
Posted: Thu Jan 31, 2013 4:27 pm
I am currently in the process of re-creating my organization's check_nt checks, using check_nrpe. I have gotten many of the checks migrated over now, but I am stumped right now in regards to creating checks for perfmon counters. I have gotten the check to work from the command line, but when I enter the parameters in the Nagios Core Config Manager, it fails.
Command works from the command line:
Command: ./check_nrpe -H 192.168.190.181 -p 5666 -c CheckCounter -a "\Print Queue(_Total)\Jobs Spooling" ShowAll MaxWarn=80 MaxCrit=90
Output: OK: \Print Queue(_Total)\Jobs Spooling: 0|'\Print Queue(_Total)\Jobs Spooling'=0;80;90
When testing from Core Config Manager it does not:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H 128.231.190.181 -t 30 -p 5666 -c CheckCounter -a "\\Print Queue\(_Total\)\\Jobs Spooling" ShowAll MaxWarn=2 MaxCrit=20
OUTPUT: CRIT: Counter not found: \Print Queue\(_Total\)\Jobs Spooling: The specified counter could not be found. (C0000BB9)
It seems to me like Core Config Manager is adding backslashes to all the special characters in the command. Do I have to escape these out somehow, or is there another way to fix this issue?
Command works from the command line:
Command: ./check_nrpe -H 192.168.190.181 -p 5666 -c CheckCounter -a "\Print Queue(_Total)\Jobs Spooling" ShowAll MaxWarn=80 MaxCrit=90
Output: OK: \Print Queue(_Total)\Jobs Spooling: 0|'\Print Queue(_Total)\Jobs Spooling'=0;80;90
When testing from Core Config Manager it does not:
COMMAND: /usr/local/nagios/libexec/check_nrpe -H 128.231.190.181 -t 30 -p 5666 -c CheckCounter -a "\\Print Queue\(_Total\)\\Jobs Spooling" ShowAll MaxWarn=2 MaxCrit=20
OUTPUT: CRIT: Counter not found: \Print Queue\(_Total\)\Jobs Spooling: The specified counter could not be found. (C0000BB9)
It seems to me like Core Config Manager is adding backslashes to all the special characters in the command. Do I have to escape these out somehow, or is there another way to fix this issue?