What is the proper escaping I need to do if I want this in ARG2?
Code: Select all
-a ShowAll MSSQL$FENEVISION SQLAgent$FENEVISION ReportServer$FENEVISIONCode: Select all
-a ShowAll MSSQL$FENEVISION SQLAgent$FENEVISION ReportServer$FENEVISIONCode: Select all
-a ShowAll MSSQL\$FENEVISION SQLAgent\$FENEVISION ReportServer\$FENEVISIONCode: Select all
-a ShowAll MSSQL\$$FENEVISION SQLAgent\$$FENEVISION ReportServer\$$FENEVISIONCode: Select all
define service {
host_name simw-nh-pkbsql09
service_description FENEVISION - SQL Services
use simw_nh_generic-service-5
check_command check_nrpe_nested!CheckServiceState!-a ShowAll 'MSSQL\$FENEVISION' 'SQLAgent\$FENEVISION' 'ReportServer\$FENEVISION'!!!!!!172.30.0.44
check_period xi_timeperiod_24x7
notification_interval 0
notification_period xi_timeperiod_24x7
register 1
}
Code: Select all
/usr/local/nagios/libexec/check_by_ssh -H 172.30.0.44 -q -t 180 -C "/usr/local/nagios/libexec/check_nrpe -H 172.30.0.151 -t 180 -c CheckServiceState -a ShowAll 'MSSQL\$FENEVISION' 'SQLAgent\$FENEVISION' 'ReportServer\$FENEVISION'"
OK: MSSQL$FENEVISION: started, SQLAgent$FENEVISION: started, ReportServer$FENEVISION: startedCode: Select all
CRITICAL: MSSQL$FENEVISION: started, SQLAgent$FENEVISION: started, ReportServer$FENEVISION$: not found (critical)Code: Select all
command_name check_nrpe_nested
command_line $USER1$/check_by_ssh -H $ARG8$ -q -t 180 $ARG7$ -C "$USER1$/check_nrpe -H $HOSTADDRESS$ -t 180 -c $ARG1$ $ARG2$"Code: Select all
For Nagios 3, add two backslashes and a second dollar (\$) symbol, like this:
check_command check_command
check_nt!SERVICESTATE!-d SHOWALL -l MSSQL\\$$INSTANCEYes sirlmiltchev wrote:Whatever works.Sometimes dealing with escaping issues could be frustrating. Can we lock this one?