I'm trying to execute the command below from the Nagios server using check_nrpe but the exclamation mark (!) is not getting passed to the remote host. I tried escaping it with a back slash (\) but that doesn't work either.
According to http://nagios.sourceforge.net/docs/3_0/whatsnew.html, escaping is supported in Nagios 3.0.
Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H xxx.xxx.xxx.xxx -c check_winservice -a '--startmode auto --state !running --verbose'
Service state(s): running
Service start modes: auto
Service(s): all
Number of services selected: 50
SERVICE OK - 50 service(s).|'services'=50
Code: Select all
# /usr/local/nagios/libexec/check_nrpe -H 10.44.1.85 -c check_winservice -a '--startmode auto --state \!running --verbose'
Service state(s): \
Service start modes: auto
Service(s): all
Number of services selected: 0
SERVICE OK - 0 service(s).|'services'=0
Code: Select all
check_winservice = scripts\check_winservice.exe $ARG1$ $ARG2$ $ARG3$ $ARG4$ $ARG5$ $ARG6$ $ARG7$
Thanks for any help.