check_http and unauthorized.

Jaap Hogenberg jaap.hogenberg at marketxs.com
Thu Aug 12 17:09:07 CEST 2004


What version of check_http are you using ? 
Mine is behaving correctly, I use "-e 401" as well.
I have version 1.54 (from the plugins 1.4alpha1)

Jaap


On Thu, 2004-08-12 at 16:24, Marc Powell wrote:
> ----Original Message----
> From: Jan Johansson [mailto:jan.johansson at se.nyklogistics.com]
> Sent: Thursday, August 12, 2004 3:16 AM
> To: Mark D. Nagel; nagios-users at lists.sourceforge.net
> Subject: RE: [Nagios-users] check_http and unauthorized.
> 
> > > Sure, just define your check command like so:
> > > 
> > > define command{
> > >     command_name    check_http_401
> > >     command_line    $USER1$/check_http -H $HOSTADDRESS$ -e 401 }
> > > 
> > > Then, you can use check_http_401, which will expect a 401 result
> > > code and exit with an OK status.
> > 
> > Thanks, but I still get the warning in this fashion.
> > 
> > hooch:/var/log/nagios# /usr/lib/netsaint/plugins/check_http -H
> > portal-1 -e 401 HTTP WARNING: HTTP/1.1 401 Unauthorized
> > hooch:/var/log/nagios# /usr/lib/netsaint/plugins/check_http -H
> > portal-1 -e 404 Invalid HTTP response received from host
> > hooch:/var/log/nagios#    
> 
> There are certain error codes that are hard-coded to produce WARNING or
> CRITICAL states. I ran into this when I wanted to make a 403 Forbidden
> an OK state. Check around line 1219 in check_http.c for
> 
>                 /* client errors result in a warning state */
>                 else if (http_status >= 400)
>                         die (STATE_WARNING, _("HTTP WARNING: %s\n"),
> status_line);
> 
> You can either modify that to suit your needs better or comment it out
> entirely. You'll need to recompile the plugins of course.
> 
> --
> Marc
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
> 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
> Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
> http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
> _______________________________________________
> 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



-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
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