[Nagiosplug-devel] Check_http status codes bug

Karl DeBisschop karl at debisschop.net
Thu Sep 11 19:35:47 CEST 2003


On Thu, 2003-09-11 at 06:24, Chris Wilson wrote:
> Hi all,
> 
> We've been using Nagios and the associated plugins for a long time with 
> great success. Thank you all very much for your hard work.
> 
> We think we have found a problem with the check_http plugin. RFC 2616, for 
> HTTP/1.1, defines all codes such as 3xx as redirections, all 4xx as client 
> errors, and all 5xx as server errors. 
> [cf. http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1.1]
> 
> However, check_http only checks for certain specific values, for example,
> 301-304 for redirect codes. As a result, it will not always detect errors. 
> 
> For example, when our Sun/Chilisoft ASP servers go down, they start to
> return error 507, but the check_http plugin treats this as a completely
> normal status code and does not report an error to Nagios.
> 
> Please find attached a patch which, I believe, will tighten up the
> handling of status codes to more closely match the RFC. Also, it should no
> longer be possible for a status line like
> 
>   HTTP/1.1 200 OK i want to confuse you 404
> 
> to be treated as a 404 error, and some other invalid status lines will be 
> detected and flagged as errors, which previously were not.
> 

Thanks for the patch. Your read of the RFC seems corrct, and I will put
some variant of that patch into the CVS HEAD shortly

--
Karl






More information about the Devel mailing list