The service name is "AOS$01", not "AOS\$01". The backslash is added to escape the $.<br><br>I've tried the following combination:<br>$$<br>\$<br>\\$<br>$$$<br>\\\$<br>\\\$$<br><br>But no luck :(<br>
<br><br><br><div class="gmail_quote">2009/6/24 Mathew Walker <span dir="ltr"><<a href="mailto:lmw94002@hotmail.com">lmw94002@hotmail.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
I think you may need to escape the backslash itself with another backslash ... vaguely recall having to do that myself in some checks when passing values that had a backslash in it.<br>
<br>-- <br>Mat W. - <a href="http://www.techadre.com/" target="_blank">http://www.techadre.com</a><br><br><br> <br>
<hr>
Date: Wed, 24 Jun 2009 15:12:20 +0200<br>From: <a href="mailto:tore.lonoy@gmail.com" target="_blank">tore.lonoy@gmail.com</a><br>To: <a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a><br>
Subject: Re: [Nagios-users] Escaping broke i 3.1.1 ?<br><br>Hello,<br><br>Sorry for double posting, but wrong subject.<br>
<div>
<div><br>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
<div><br>check_command                   check_nrpe_parameters!CheckServiceState!ShowAll=long $_HOSTCRM_SERVICES<br></div>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><font color="#888888"><br>Tore<br><br> </font></div>
<div>
<div>
<blockquote style="padding-left: 1ex;">Date: Tue, 23 Jun 2009 19:52:07 +0100<br>From: Ton Voon <<a>ton.voon@opsera.com</a>><br>Subject: Re: [Nagios-users] Escaping broke i 3.1.1 ?<br>To: Nagios Users Mailinglist <<a>nagios-users@lists.sourceforge.net</a>><br>
Message-ID: <<a>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></div></div><br><br><br><hr>Lauren found her dream laptop. <a href="http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290" target="_blank">Find the PC that’s right for you.</a></div>
</blockquote></div><br>