[Nagiosplug-help] check_http

Holger Weiß holger at CIS.FU-Berlin.DE
Thu Nov 19 17:24:32 CET 2009


* Cary Ferbrache <CFerbrache at acosta.com> [2009-11-19 10:03]:
> When I use the check_http plugin it is placing the port number 80 in the header which is causing it to return HTTP WARNING: HTTP/1.1 400 Bad Request.
> 
> If there a way to keep it from putting the port number after the host name?

The 1.4.12 release always appends the port to the "Host:" header field
(if the "-H" option is specified), older and newer releases only do that
if a non-default port is used.

> /usr/local/nagios/libexec/check_http -v -H fl-jax-gw-01.acosta.com -u "/Acosta Sharp/webforms/wfindex.aspx" -a 'login:password'
> 
> GET /Acosta Sharp/webforms/wfindex.aspx HTTP/1.0
> User-Agent: check_http/v1.4.14 (nagios-plugins 1.4.14)
> Connection: close
> Authorization: Basic c2NoZWR1bGVyOkNhMTNuZGFS

This is the header generated by check_http.  As you can see, it doesn't
include a Host: header field at all.  At least the 1.4.14 release (which
you seem to use) would *only* omit the Host: header field (and request
HTTP/1.0 instead of HTTP/1.1) if you *don't* use the "-H" option.
Therefore, I cannot really believe that this is the output you got from
running the above command line.

Holger




More information about the Help mailing list