<div class="gmail_quote"><div>Hello Ton,<br><br>Command line:<br>/nagios/libexec/check_nrpe -H <X> -c CheckServiceState -a AOS\$01 ShowAll=long<br>OK: AOS$01: started<br><br>Here is the host def:<br>define host {<br>
use X<br><br>host_name X<br>address X<br>alias X<br><br><br>hostgroups +CRM4<br><br>#max_check_attempts 3<br>#check_interval 2<br>
#retry_interval 1<br><br>#contact_groups +<br>#notifications_enabled 1<br><br>_CRM_SERVICES AOS\$01<br><br># Macros<br>_REQUESTOR<br><br>}<br><br>The service definition:<br>define service {<br># Which _template_* to use.<br>
# (e.g. standard-service-60)<br>use standard-service-1<br><br># Service spesific<br>service_description CRM Services<br>check_command check_nrpe_parameters!CheckServiceState!ShowAll=long $_HOSTCRM_SERVICES<br>
hostgroup_name CRM4<br><br># Per service options<br>first_notification_delay 10<br>process_perf_data 0<br>notifications_enabled 1<br>max_check_attempts 2<br>retry_interval 5<br>
}<br><br>The check command definition:<br>define command {<br> command_name check_nrpe_parameters<br> command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 15 -c $ARG1$ -a $ARG2$<br>}<br><br><br>It worked on Nagios 3.0.6. I've tried almost any combination of escaping the dollar sign, $$, \$, \\$$,\\\$.... You name it!<br>
<br>Thanks for your help,<br><br>Tore<br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Date: Tue, 23 Jun 2009 19:52:07 +0100<br>
From: Ton Voon <<a href="mailto:ton.voon@opsera.com">ton.voon@opsera.com</a>><br>
Subject: Re: [Nagios-users] Escaping broke i 3.1.1 ?<br>
To: Nagios Users Mailinglist <<a href="mailto:nagios-users@lists.sourceforge.net">nagios-users@lists.sourceforge.net</a>><br>
Message-ID: <<a href="mailto:864AF918-0779-4585-885D-AFE784E69C40@opsera.com">864AF918-0779-4585-885D-AFE784E69C40@opsera.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes<br>
<br>
Tore,<br>
<br>
Can you send the configuration for the host and service too? Can you<br>
also send the check_nrpe_parameters command definition.<br>
<br>
On the command line, what works?<br>
<br>
Also, you said a previous version of Nagios worked with this<br>
definition - which version of Nagios was that?<br>
<br>
Ton<br>
<br>
On 23 Jun 2009, at 15:09, Tore L?n?y wrote:<br>
<br>
> Let me see, this should be enough i think:<br>
><br>
> define host {<br>
> host_name X<br>
> alias X<br>
> address X<br>
> check_period 24x7<br>
> check_command check-host-alive<br>
> contact_groups<br>
> notification_period 24x7<br>
> initial_state o<br>
> check_interval 15.000000<br>
> retry_interval 5.000000<br>
> max_check_attempts 3<br>
> active_checks_enabled 1<br>
> passive_checks_enabled 0<br>
> obsess_over_host 1<br>
> event_handler_enabled 0<br>
> low_flap_threshold 0.000000<br>
> high_flap_threshold 0.000000<br>
> flap_detection_enabled 1<br>
> flap_detection_options o,d,u<br>
> freshness_threshold 0<br>
> check_freshness 0<br>
> notification_options d,r<br>
> notifications_enabled 1<br>
> notification_interval 60.000000<br>
> first_notification_delay 60.000000<br>
> stalking_options n<br>
> process_perf_data 1<br>
> failure_prediction_enabled 1<br>
> notes_url<br>
> retain_status_information 1<br>
> retain_nonstatus_information 1<br>
> _REQUESTOR<br>
> _CRM_SERVICES "AOS$\$01"<br>
> }<br>
><br>
> define service {<br>
> host_name X<br>
> service_description X<br>
> check_period 24x7<br>
> check_command check_nrpe_parameters!CheckServiceState!<br>
> ShowAll=long $_HOSTCRM_SERVICES<br>
> contact_groups<br>
> notification_period 24x7<br>
> initial_state o<br>
> check_interval 1.000000<br>
> retry_interval 5.000000<br>
> max_check_attempts 2<br>
> is_volatile 0<br>
> parallelize_check 1<br>
> active_checks_enabled 1<br>
> passive_checks_enabled 0<br>
> obsess_over_service 0<br>
> event_handler_enabled 0<br>
> low_flap_threshold 0.000000<br>
> high_flap_threshold 0.000000<br>
> flap_detection_enabled 1<br>
> flap_detection_options o,w,u,c<br>
> freshness_threshold 0<br>
> check_freshness 0<br>
> notification_options c,r<br>
> notifications_enabled 1<br>
> notification_interval 60.000000<br>
> first_notification_delay 10.000000<br>
> stalking_options n<br>
> process_perf_data 0<br>
> failure_prediction_enabled 1<br>
> notes<br>
> retain_status_information 1<br>
> retain_nonstatus_information 1<br>
> }<br>
><br>
> The problem for me it seems is when nagios is parsing the data just<br>
> before it is going to execute the command. It is no problem executes<br>
> check_nrpe with ah backslash (\) as the escape char. But the problem<br>
> for me is what escape char do i use in custom macros?<br>
<br>
<br>
<br>
</blockquote></div><br>