check_http and HTTP Basic Authentication
Marc-André Doll
mad at b-care.net
Thu Mar 18 17:25:34 CET 2010
Le jeudi 18 mars 2010 à 09:39 -0500, Marc Powell a écrit :
> On Mar 18, 2010, at 8:29 AM, Marc-André Doll wrote:
>
> > Hi all,
> >
> >
> > I'm trying to reach a website hosted on a IIS webserver and supervise it
> > with check_http (from the nagios-plugins v1.4.13 bundle). This website
> > asks for a Basic HTTP authentication, so I tried
> >
> > check_http -H 'my.server' -a 'domain\user:pass' -f follow
>
> Are you *sure* you're using basic authentication. This looks more like NTLM authentication to me.
>
> > and got :
> >
> > HTTP WARNING - 401 Unauthorized
>
> check_http does not support NTLM authentication. I expect that your server log files will have more detail but all things being equal, I'd say that the server isn't accepting basic authentication.
>
> > So i tried this to check if the username/password was correct :
> >
> > wget http://my.server/ --http-user='domain\user' --http-passwd='pass'
>
> Modern versions of wget supports 3 authentication types: basic, digest and NTLM. It tries to figure out which one to use on-the-fly based on server responses.
>
> > and got :
> >
> > HTTP request sent, waiting response ... 401 Unauthorized
>
> Failed attempt using basic authentication (?)
>
> > Reusing existing connection to my.server:80
> > HTTP request sent, waiting response ... 401 Unauthorized
>
> Failed fallback attempt using digest authentication (?)
>
> > Reusing existing connection to my.server:80
> > HTTP request sent, waiting response ... 200 OK
>
> Fallback success using NTLM authentication (?).
>
> > What am I supposed to understand ? Is that a flawn in check_http Basic
> > Authentication implementation or a IIS configuration issue ?
>
> I'd say that your IIS server isn't using basic authentication. If you're not able to specify Basic authentication on the server side, you might want to look at http://exchange.nagios.org. I believe there are a number of check_http'ish plugins there that support NTLM (by way of curl or other external program).
Oops, you're right, sorry. It was NTML Authentication
>
> --
> Marc
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list