<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Using double slashes ?</TITLE>

<META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=292105422-11112003><FONT face=Arial color=#0000ff size=2>Hi 
David,</FONT></SPAN></DIV>
<DIV><SPAN class=292105422-11112003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=292105422-11112003><FONT face=Arial color=#0000ff size=2>Thanks 
!! It works like a charm !! Does this go for other privileged chars as well?? 
Might solve a lot of headaches is this is put in the documentation ?? As far as 
I remember, the Nagios docs mention double quotes.....</FONT></SPAN></DIV>
<DIV><SPAN class=292105422-11112003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=292105422-11112003><FONT face=Arial color=#0000ff 
size=2>Danny</FONT></SPAN></DIV>
<BLOCKQUOTE>
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> David Olbersen 
  [mailto:DOlbersen@stbernard.com]<BR><B>Sent:</B> Tuesday, November 11, 2003 
  23:49<BR><B>To:</B> Danny Wigmans; 
  nagios-users@lists.sourceforge.net<BR><B>Subject:</B> RE: [Nagios-users] Using 
  double slashes ?<BR><BR></FONT></DIV>
  <DIV><SPAN class=896464722-11112003><FONT face=Tahoma color=#0000ff 
  size=2>Danny,</FONT></SPAN></DIV>
  <DIV><SPAN class=896464722-11112003><FONT face=Tahoma color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=896464722-11112003><FONT face=Tahoma color=#0000ff size=2>Put 
  it in single-quotes. An example from my configuration</FONT></SPAN></DIV>
  <DIV><SPAN class=896464722-11112003><FONT face=Tahoma color=#0000ff 
  size=2></FONT></SPAN> </DIV>
  <DIV><SPAN class=896464722-11112003><FONT face=Tahoma color=#0000ff 
  size=2>command_line    $USER1$/check_http $HOSTADDRESS$ -p 
  $ARG1$ -u 'http://www.yahoo.com' -e 'HTTP/1.0 200 OK' -w 10 -c 
  20</FONT></SPAN></DIV><FONT face=Tahoma size=2>
  <P>
  <HR align=left SIZE=1>
  David Olbersen<BR>iGuard Engineer<BR>St. Bernard Software<BR>15015 Avenue of 
  Sciences<BR>San Diego, CA 92127<BR>x2152<BR>
  <P></P></FONT>
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Danny Wigmans 
  [mailto:danny.wigmans@solcorp.com]<BR><B>Sent:</B> Tuesday, November 11, 2003 
  1:17 PM<BR><B>To:</B> 'nagios-users@lists.sourceforge.net'<BR><B>Subject:</B> 
  [Nagios-users] Using double slashes ?<BR><BR></FONT></DIV>
  <P><FONT size=2>Hi,</FONT> </P>
  <P><FONT size=2>I am trying to get the check_http plug-in to work, so I can 
  check a proxy server.</FONT> </P>
  <P><FONT size=2>The command I try to use is: </FONT></P>
  <P><FONT size=2>./check_http -H $HOSTADDRESS$ -u <A 
  href="http://www.yahoo.com" target=_blank>http://www.yahoo.com</A> -e HTTP/1.1 
  200</FONT> </P>
  <P><FONT size=2>Though the command works fine from the bash shell on RH 9 
  under the nagios user account, it doesn't work through the 
  scripts...</FONT></P>
  <P><FONT size=2>When executing from the shell I get a HTTP Ok response, from 
  the scripts it returns a HTTP CRITICAL.</FONT> </P>
  <P><FONT size=2>I am using nagios-1.1 and nagios-plugins-1.3.1 (check_http 
  (1.24.2.4) from SourceForge...</FONT> </P>
  <P><FONT size=2>My hunch is that the // in the URL are not taken literal but 
  are being interpreted by nagios. Anyone any ideas, or a possible workaround? I 
  have already tried using \ as escape char, using %47%47, creating a macro in 
  resources.cfg, double quoting the URL, and passing it from services to a 
  $ARG1$ macro in my check_command, and combinations of these. Nothing worked so 
  far..</FONT></P>
  <P><FONT size=2>Ideas anyone???</FONT> </P>
  <P><FONT size=2>Thanks,</FONT> </P>
  <P><FONT size=2>Danny</FONT> </P><BR><BR>
  <P><FONT size=2>My files look as follows:</FONT> </P>
  <P><FONT size=2>checkcommands.cfg:</FONT> </P>
  <P><FONT size=2>define command{</FONT> <BR><FONT 
  size=2>        
  command_name    check_http_proxy</FONT> <BR><FONT 
  size=2>        
  command_line    $USER1$/check_http -I $HOSTADDRESS$ -u <A 
  href="http://www.yahoo.com" target=_blank>http://www.yahoo.com</A> -e HTTP/1.1 
  200</FONT> <BR><FONT size=2>        
  }</FONT> </P>
  <P><FONT size=2>services.cfg:</FONT> </P>
  <P><FONT size=2>define service {</FONT> <BR><FONT 
  size=2>name                            
  generic-service-template</FONT> <BR><FONT 
  size=2>active_checks_enabled           
  1       </FONT><BR><FONT 
  size=2>passive_checks_enabled          
  1       </FONT><BR><FONT 
  size=2>parallelize_check               
  1      </FONT><BR><FONT 
  size=2>obsess_over_service             
  1       </FONT><BR><FONT 
  size=2>check_freshness                 
  0       </FONT><BR><FONT 
  size=2>notifications_enabled           
  1       </FONT><BR><FONT 
  size=2>event_handler_enabled           
  1       </FONT><BR><FONT 
  size=2>flap_detection_enabled          
  1      </FONT><BR><FONT 
  size=2>process_perf_data               
  1       </FONT><BR><FONT 
  size=2>retain_status_information       
  1       </FONT><BR><FONT 
  size=2>retain_nonstatus_information    
  1      </FONT><BR><FONT 
  size=2>max_check_attempts              
  3</FONT> <BR><FONT 
  size=2>normal_check_interval           
  5</FONT> <BR><FONT 
  size=2>retry_check_interval            
  2</FONT> <BR><FONT 
  size=2>check_period                    
  24x7</FONT> <BR><FONT 
  size=2>notification_interval           
  240</FONT> <BR><FONT 
  size=2>notification_period             
  24x7</FONT> <BR><FONT 
  size=2>notification_options            
  w,c</FONT> <BR><FONT 
  size=2>register                        
  0</FONT> <BR><FONT size=2>}</FONT> </P>
  <P><FONT size=2>define service {</FONT> <BR><FONT 
  size=2>        
  name                    
  http-proxy-template</FONT> <BR><FONT 
  size=2>        
  service_description     HTTP Proxy</FONT> <BR><FONT 
  size=2>        
  check_command           
  check_http_proxy</FONT> <BR><FONT 
  size=2>        
  use                     
  generic-service-template</FONT> <BR><FONT 
  size=2>        
  register                
  0</FONT> <BR><FONT size=2>        }</FONT> 
  </P>
  <P><FONT size=2>define service {</FONT> <BR><FONT 
  size=2>        
  hostgroup_name          
  proxy-srv</FONT> <BR><FONT size=2>        
  contact_groups          
  admin-group</FONT> <BR><FONT size=2>        
  use                     
  http-proxy-template</FONT> <BR><FONT 
  size=2>        }</FONT> 
</P><BR><BR><BR><BR>
  <HR>
  This e-mail message has been scanned for Viruses and Content and cleared. 
  <HR>

  <DIV><SPAN 
  style="DISPLAY: inline; FONT-WEIGHT: normal; FONT-SIZE: medium; COLOR: black; FONT-STYLE: normal; BACKGROUND-COLOR: white">
  <HR>
  Teach CanIt if this mail (ID 182567) is spam:<BR><A 
  href="http://mail02.stbernard.com/b.php?c=s&i=182567&m=1bf58beaf387">Spam</A><BR><A 
  href="http://mail02.stbernard.com/b.php?c=n&i=182567&m=1bf58beaf387">Not 
  spam</A><BR><A 
  href="http://mail02.stbernard.com/b.php?c=f&i=182567&m=1bf58beaf387">Forget 
  previous vote</A><BR></SPAN></DIV>
  <HR>
  This e-mail message has been scanned for Viruses and Content and cleared. 
  <HR>
</BLOCKQUOTE>
<HR>
This e-mail message has been scanned for Viruses and Content and cleared.
<HR>
</BODY></HTML>