<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<TITLE>RE: [Nagios-users] Using double slashes ?</TITLE>
<META content="MSHTML 6.00.2800.1264" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=132422823-11112003>Hi
Marc,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=132422823-11112003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=132422823-11112003>Thanks
for the reply...</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN
class=132422823-11112003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=132422823-11112003>Just
tried your second suggestion ( <FONT color=#000080>HTTP\/1.0\ 200\ OK ), without
quoting the -u <A href="http://and-so-on">http://and-so-on</A>, which works fine
too... </FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN class=132422823-11112003>Now, I
do have other check_http commands which use the same -e option, and they do
work. So it must be the combination of the -e and -u option that give the
problem...maybe a bug?</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN
class=132422823-11112003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN class=132422823-11112003>Thanks
again,</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN
class=132422823-11112003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN
class=132422823-11112003>Danny</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN
class=132422823-11112003></SPAN></FONT> </DIV>
<DIV><FONT face=Arial color=#000080 size=2><SPAN
class=132422823-11112003></SPAN></FONT> </DIV>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> Marc Powell
[mailto:mpowell@ena.com]<BR><B>Sent:</B> Wednesday, November 12, 2003
0:13<BR><B>To:</B> Danny Wigmans; David Olbersen;
nagios-users@lists.sourceforge.net<BR><B>Subject:</B> RE: [Nagios-users] Using
double slashes ?<BR><BR></FONT></DIV><!-- Converted from text/rtf format -->
<P align=left><SPAN lang=en-us><FONT face=Arial color=#000080 size=2>I think
the problem actually lies in</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us> <FONT face=Arial color=#000080 size=2>your</FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Arial color=#000080
size=2>–</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Arial color=#000080 size=2>e option</FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT face=Arial color=#000080 size=2>,
not</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Arial
color=#000080 size=2>–</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us><FONT face=Arial color=#000080 size=2>u. I have several commands
that look like </FONT></SPAN></P>
<P align=left><SPAN lang=en-us><FONT face=Arial color=#000080
size=2>
command_line $USER1$/check_http --onredirect follow -I
$HOSTADDRESS$ -u</FONT></SPAN><SPAN lang=en-us> </SPAN><A
href="http://$HOSTADDRESS$/login"><SPAN lang=en-us></SPAN><SPAN
lang=en-us><U><FONT face=Arial color=#0000ff
size=2>http://$HOSTADDRESS$/login</FONT></U></SPAN><SPAN
lang=en-us></SPAN></A><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Arial color=#000080 size=2> -s</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us> <FONT face=Arial color=#000080 size=2>\/html</FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us><FONT face=Arial color=#000080 size=2>That all
work with no problems.</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us><FONT face=Arial color=#000080 size=2> I would imagine that
it</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT face=Arial
color=#000080 size=2>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us><FONT face=Arial color=#000080 size=2>s having problems with two
aspects of it, the unescaped / and the fact that there are spaces. Putting it
in quotes would fix both of those as would</FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Arial color=#000080
size=2>‘</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Arial color=#000080 size=2>-e HTTP\/1.0\ 200\ OK</FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT face=Arial color=#000080
size=2>’</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Arial color=#000080 size=2> I would expect.</FONT></SPAN></P>
<P align=left><SPAN lang=en-us><FONT face=Arial color=#000080
size=2>--</FONT></SPAN></P>
<P align=left><SPAN lang=en-us><FONT face=Arial color=#000080
size=2>Marc</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us></SPAN></P><BR>
<P align=left><SPAN lang=en-us><B><FONT face=Tahoma
size=2>From:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Tahoma size=2> Danny Wigmans [<A
href="mailto:danny.wigmans@solcorp.com">mailto:danny.wigmans@solcorp.com</A>]<BR></FONT></SPAN><SPAN
lang=en-us><B></B></SPAN><SPAN lang=en-us><B><FONT face=Tahoma
size=2>Sent:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Tahoma size=2> Tuesday, November 11, 2003 4:51 PM<BR></FONT></SPAN><SPAN
lang=en-us><B></B></SPAN><SPAN lang=en-us><B><FONT face=Tahoma
size=2>To:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Tahoma size=2> 'David Olbersen';
nagios-users@lists.sourceforge.net</FONT></SPAN><SPAN lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us><FONT face=Arial color=#0000ff size=2>Hi
David,</FONT></SPAN><SPAN lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us></SPAN> </P>
<P align=left><SPAN lang=en-us><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><SPAN
lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us></SPAN> </P>
<P align=left><SPAN lang=en-us><FONT face=Arial color=#0000ff
size=2>Danny</FONT></SPAN><SPAN lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us><FONT face=Tahoma size=2>-----Original
Message-----<BR></FONT></SPAN><SPAN lang=en-us><B></B></SPAN><SPAN
lang=en-us><B><FONT face=Tahoma size=2>From:</FONT></B></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT face=Tahoma size=2> David Olbersen
[<A
href="mailto:DOlbersen@stbernard.com">mailto:DOlbersen@stbernard.com</A>]<BR></FONT></SPAN><SPAN
lang=en-us><B></B></SPAN><SPAN lang=en-us><B><FONT face=Tahoma
size=2>Sent:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Tahoma size=2> Tuesday, November 11, 2003 23:49<BR></FONT></SPAN><SPAN
lang=en-us><B></B></SPAN><SPAN lang=en-us><B><FONT face=Tahoma
size=2>To:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Tahoma size=2> Danny Wigmans;
nagios-users@lists.sourceforge.net<BR></FONT></SPAN><SPAN
lang=en-us><B></B></SPAN><SPAN lang=en-us><B><FONT face=Tahoma
size=2>Subject:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us><FONT face=Tahoma size=2> RE: [Nagios-users] Using double slashes
?</FONT></SPAN><SPAN lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us><FONT face=Tahoma color=#0000ff
size=2>Danny,</FONT></SPAN><SPAN lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us></SPAN> </P>
<P align=left><SPAN lang=en-us><FONT face=Tahoma color=#0000ff size=2>Put it
in single-quotes. An example from my configuration</FONT></SPAN><SPAN
lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us></SPAN> </P>
<P align=left><SPAN lang=en-us><FONT face=Tahoma color=#0000ff
size=2>command_line $USER1$/check_http $HOSTADDRESS$ -p
$ARG1$ -u '<A href="http://www.yahoo.com'">http://www.yahoo.com'</A> -e
'HTTP/1.0 200 OK' -w 10 -c 20</FONT></SPAN><SPAN lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us><FONT face=Tahoma size=2>David
Olbersen<BR>iGuard Engineer<BR>St. Bernard Software<BR>15015 Avenue of
Sciences<BR>San Diego, CA 92127<BR>x2152</FONT></SPAN></P>
<P align=left><SPAN lang=en-us><FONT face=Tahoma size=2>-----Original
Message-----<BR></FONT></SPAN><SPAN lang=en-us><B></B></SPAN><SPAN
lang=en-us><B><FONT face=Tahoma size=2>From:</FONT></B></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT face=Tahoma size=2> Danny Wigmans [<A
href="mailto:danny.wigmans@solcorp.com">mailto:danny.wigmans@solcorp.com</A>]<BR></FONT></SPAN><SPAN
lang=en-us><B></B></SPAN><SPAN lang=en-us><B><FONT face=Tahoma
size=2>Sent:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Tahoma size=2> Tuesday, November 11, 2003 1:17 PM<BR></FONT></SPAN><SPAN
lang=en-us><B></B></SPAN><SPAN lang=en-us><B><FONT face=Tahoma
size=2>To:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face=Tahoma size=2>
'nagios-users@lists.sourceforge.net'<BR></FONT></SPAN><SPAN
lang=en-us><B></B></SPAN><SPAN lang=en-us><B><FONT face=Tahoma
size=2>Subject:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us><FONT face=Tahoma size=2> [Nagios-users] Using double slashes
?</FONT></SPAN><SPAN lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>Hi,</FONT></SPAN><SPAN lang=en-us>
</SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>I am trying to get the check_http
plug-in to work, so I can check a proxy server.</FONT></SPAN><SPAN lang=en-us>
</SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>The command I try to use
is:</FONT></SPAN><SPAN lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>./check_http -H $HOSTADDRESS$
-u</FONT></SPAN><SPAN lang=en-us> </SPAN><A href="http://www.yahoo.com"><SPAN
lang=en-us></SPAN><SPAN lang=en-us><U><FONT color=#0000ff
size=2>http://www.yahoo.com</FONT></U></SPAN><SPAN lang=en-us></SPAN></A><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT size=2> -e HTTP/1.1
200</FONT></SPAN><SPAN lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><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></SPAN><SPAN lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>When executing from the shell I
get a HTTP Ok response, from the scripts it returns a HTTP
CRITICAL.</FONT></SPAN><SPAN lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>I am using nagios-1.1 and
nagios-plugins-1.3.1 (check_http (1.24.2.4) from
SourceForge...</FONT></SPAN><SPAN lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><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></SPAN><SPAN lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>Ideas anyone???</FONT></SPAN><SPAN
lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>Thanks,</FONT></SPAN><SPAN
lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>Danny</FONT></SPAN><SPAN
lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>My files look as
follows:</FONT></SPAN><SPAN lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT
size=2>checkcommands.cfg:</FONT></SPAN><SPAN lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>define command{</FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>
command_name check_http_proxy</FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>
command_line $USER1$/check_http -I $HOSTADDRESS$
-u</FONT></SPAN><SPAN lang=en-us> </SPAN><A href="http://www.yahoo.com"><SPAN
lang=en-us></SPAN><SPAN lang=en-us><U><FONT color=#0000ff
size=2>http://www.yahoo.com</FONT></U></SPAN><SPAN lang=en-us></SPAN></A><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT size=2> -e HTTP/1.1
200</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2> }</FONT></SPAN><SPAN
lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>services.cfg:</FONT></SPAN><SPAN
lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>define service
{</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>name
generic-service-template</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN
lang=en-us><FONT
size=2>active_checks_enabled
1 </FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>passive_checks_enabled
1 </FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>parallelize_check
1 </FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN
lang=en-us><FONT
size=2>obsess_over_service
1 </FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>check_freshness
0 </FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>notifications_enabled
1 </FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>event_handler_enabled
1 </FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>flap_detection_enabled
1 </FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN
lang=en-us><FONT
size=2>process_perf_data
1 </FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>retain_status_information
1 </FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>retain_nonstatus_information
1 </FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN
lang=en-us><FONT
size=2>max_check_attempts
3</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>normal_check_interval
5</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>retry_check_interval
2</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>check_period
24x7</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>notification_interval
240</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>notification_period
24x7</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>notification_options
w,c</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>register
0</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>}</FONT></SPAN><SPAN lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>define service
{</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>
name
http-proxy-template</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN
lang=en-us><FONT size=2>
service_description HTTP Proxy</FONT></SPAN><SPAN
lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>
check_command
check_http_proxy</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN
lang=en-us><FONT size=2>
use
generic-service-template</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN
lang=en-us><FONT size=2>
register
0</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2> }</FONT></SPAN><SPAN
lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us><FONT size=2>define service
{</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>
hostgroup_name
proxy-srv</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>
contact_groups
admin-group</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us><FONT
size=2>
use
http-proxy-template</FONT></SPAN><SPAN lang=en-us><BR></SPAN><SPAN
lang=en-us><FONT size=2>
}</FONT></SPAN><SPAN lang=en-us> </SPAN></P><BR><BR><BR>
<P align=left><SPAN lang=en-us>This e-mail message has been scanned for
Viruses and Content and cleared. </SPAN></P><BR>
<P align=left><SPAN lang=en-us><FONT color=#000000 size=4>Teach CanIt if this
mail (ID 182567) is spam:<BR></FONT></SPAN><SPAN lang=en-us></SPAN><A
href="http://mail02.stbernard.com/b.php?c=s&i=182567&m=1bf58beaf387"><SPAN
lang=en-us></SPAN><SPAN lang=en-us><U><FONT color=#0000ff
size=4>Spam</FONT></U></SPAN><SPAN lang=en-us></SPAN></A><SPAN
lang=en-us></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us></SPAN><A
href="http://mail02.stbernard.com/b.php?c=n&i=182567&m=1bf58beaf387"><SPAN
lang=en-us></SPAN><SPAN lang=en-us><U><FONT color=#0000ff size=4>Not
spam</FONT></U></SPAN><SPAN lang=en-us></SPAN></A><SPAN
lang=en-us></SPAN><SPAN lang=en-us><BR></SPAN><SPAN lang=en-us></SPAN><A
href="http://mail02.stbernard.com/b.php?c=f&i=182567&m=1bf58beaf387"><SPAN
lang=en-us></SPAN><SPAN lang=en-us><U><FONT color=#0000ff size=4>Forget
previous vote</FONT></U></SPAN><SPAN lang=en-us></SPAN></A><SPAN
lang=en-us></SPAN></P>
<P align=left><SPAN lang=en-us>This e-mail message has been scanned for
Viruses and Content and cleared. </SPAN></P><BR>
<P align=left><SPAN lang=en-us>This e-mail message has been scanned for
Viruses and Content and cleared. </SPAN></P>
<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>