<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>You might try closing the “!”
in the service definition and putting double quotes around the $ARGn$
parameters in the command file.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<div>

<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>Mark Law<br>
Thomson Global Technology Infrastructure (TGTI)<br>
(734) 913-3775  Phone<br>
(734) 260-5740  Cell<br>
(734) 913- 3500 Fax<br>
mark.law@thomson.com</span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

</div>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
nagios-users-bounces@lists.sourceforge.net
[mailto:nagios-users-bounces@lists.sourceforge.net] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Jerad Riggin<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, June 25, 2007 10:05
AM<br>
<b><span style='font-weight:bold'>To:</span></b> GJP<br>
<b><span style='font-weight:bold'>Cc:</span></b>
nagios-users@lists.sourceforge.net<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [Nagios-users] Nagios
HTTP monitoring</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Any idea why this -a switch isn't working?<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>If I do this in a command prompt it works fine: ./check_http -S -H <a
href="http://url.com">url.com</a> -a username:password it returns an OK.<o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'> <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>The same command in nagios won't work (unauthorized).<br>
<br>
 <o:p></o:p></span></font></p>

</div>

<div>

<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 6/22/07, <b><span style='font-weight:bold'>Jerad
Riggin</span></b> <<a href="mailto:jriggin@gmail.com">jriggin@gmail.com</a>>
wrote:</span></font></span> <o:p></o:p></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>It's still giving me an unauthorized message.  I've verified the
credentials work for me to get in through a browser.  Is there something
else I could be missing?  <o:p></o:p></span></font></p>

<div><span id="q_11354c0ecb3ea1f4_1">

<p class=MsoNormal style='margin-bottom:12.0pt'><span class=e><font size=3
face="Times New Roman"><span style='font-size:12.0pt'><o:p> </o:p></span></font></span></p>

<div>

<p class=MsoNormal><span class=gmailquote><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>On 6/22/07, <b><span style='font-weight:bold'>GJP</span></b>
<<a href="mailto:gjp@gpnet.nl" target="_blank">gjp@gpnet.nl</a>> wrote:</span></font></span>
<o:p></o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Jerad,<br>
<br>
No entirely, because you feed the arguments to the actual command with $ARGn$<br>
<br>
So in de service definition: <br>
<br>
check_http!site.com!5!admin:password<br>
<br>
And the command_line format in command definition (probably<br>
in: /etc/nagios-plugins/config/http.cfg) should be:<br>
<br>
command_line    /usr/lib/nagios/plugins/check_http -H
$ARG1$ -t $ARG2$ -a <br>
$ARG3$<br>
<br>
Be carefull with that "-t 5" btw. That is a very low value to
timeout.<br>
<br>
Hope it helps.<br>
<br>
Regards,<br>
<br>
Gerard.<br>
<br>
On Friday 22 June 2007 19:17:29 Jerad Riggin wrote:<br>
> So check_http!-H <a href="http://site.com/" target="_blank">site.com</a>
-t 5 -a admin:password<br>
><br>
> should be<br>
><br>
> check_http!-H site.com!-t 5!-a admin:password? <br>
><br>
> On 6/22/07, GJP <<a href="mailto:gjp@gpnet.nl" target="_blank">gjp@gpnet.nl
</a>> wrote:<br>
> > Jerad,<br>
> ><br>
> > I didn't understand that either. That's why I customized the the <br>
> > check_http<br>
> > command definition. That way (in my previous example) you can have
your <br>
> > http<br>
> > checks from any Nagios client. Usefull for instance
for  off-site checks.<br>
> > <br>
> > Regarding the -a switch. The -a $ARG1$ (or whatever) should be in
your<br>
> > command <br>
> > definition. And your parms as you 'feed' them to the command in your<br>
> > service<br>
> > definition seperated with "!".<br>
> ><br>
> > Regards,<br>
> ><br>
> > Gerard. <br>
> ><br>
> > On Friday 22 June 2007 16:59:30 Jerad Riggin wrote:<br>
> > > If I change the hosts.cfg from the IP of the server (<a
href="http://10.10.10.7/" target="_blank">10.10.10.7</a>) to the<br>
> ><br>
> > URL <br>
> ><br>
> > > I'm specifying in services.cfg, it works fine.  The
default site for<br>
> > > <a href="http://10.10.10.7/" target="_blank">10.10.10.7</a> is a
CRM site which requires basic auth.  So even though i'm <br>
> > > specifying a URL in services.cfg, it looks like it's be
overridden by<br>
> ><br>
> > the<br>
> ><br>
> > > hosts.cfg so it can't auth.  What is the point of the
-H switch in <br>
> > > services.cfg if it always uses the IP for the host in
hosts.cfg?  I<br>
> ><br>
> > tried<br>
> ><br>
> > > that format (-a admin:password) at the end of the check in<br>
> > > services.cfgbut it still failed with unauthorized.<br>
> > ><br>
> > > On 6/22/07, Marc Powell <<a href="mailto:marc@ena.com"
target="_blank">marc@ena.com </a>> wrote:<br>
> > > > > -----Original Message----- <br>
> > > > > From: <a
href="mailto:nagios-users-bounces@lists.sourceforge.net" target="_blank">nagios-users-bounces@lists.sourceforge.net</a>
[mailto:<br>
> ><br>
> > nagios-users-<br>
> ><br>
> > > > > <a href="mailto:bounces@lists.sourceforge.net"
target="_blank">bounces@lists.sourceforge.net</a>] On Behalf Of Jerad Riggin<br>
> > > > > Sent: Friday, June 22, 2007 8:41 AM<br>
> > > > > To: GJP<br>
> > > > > Cc: <a href="mailto:nagios-users@lists.sourceforge.net"
target="_blank">nagios-users@lists.sourceforge.net</a><br>
> > > > > Subject: Re: [Nagios-users] Nagios HTTP monitoring<br>
> > > > ><br>
> > > > > I have a check_http command that works perfectly at the
command <br>
> ><br>
> > prompt<br>
> ><br>
> > > > > ./check_http -H lagarde -t 5 -s "LaGarde Intranet
site"<br>
> > > > ><br>
> > > > > However in nagios, check_http!-H lagarde -t 5 -s
"LaGarde Intranet <br>
> > > ><br>
> > > > site"<br>
> > > ><br>
> > > > > still returns an unauthorized.  So basically
why would it work in a<br>
> > > > > command prompt but not in nagios? <br>
> > > ><br>
> > > > Perhaps some difference in environment? Did you test as the
nagios<br>
> ><br>
> > user?<br>
> ><br>
> > > > Is that the _exact_ way it's defined in the config? <br>
> > > ><br>
> > > > > And what is the syntax for the -a<br>
> > > > > (basic auth) switch?  Thanks again for
everyones help.<br>
> > > ><br>
> > > > -a username:password. <br>
> > > ><br>
> > > > --<br>
> > > > Marc<br>
> ><br>
> >
-------------------------------------------------------------------------<br>
> ><br>
> > > > This SF.net email is sponsored by DB2 Express<br>
> > > > Download DB2 Express C - the FREE version of DB2 express
and take<br>
> > > > control of your XML. No limits. Just data. Click to get it
now.<br>
> > > > <a href="http://sourceforge.net/powerbar/db2/"
target="_blank">http://sourceforge.net/powerbar/db2/</a><br>
> > > > _______________________________________________ <br>
> > > > Nagios-users mailing list<br>
> > > > <a href="mailto:Nagios-users@lists.sourceforge.net"
target="_blank">Nagios-users@lists.sourceforge.net </a><br>
> > > > <a
href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users
</a><br>
> > > ><br>
> > > > ::: Please include Nagios version, plugin version (-v) and
OS when<br>
> > > ><br>
> > > > reporting any issue.<br>
> > > ><br>
> > > > ::: Messages without supporting info will risk being sent
to <br>
> > > > ::: /dev/null<br>
<br>
<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><br>
<br>
<o:p></o:p></span></font></p>

</div>

</div>

</span>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

</body>

</html>