[Nagiosplug-help] check_http HTTP Version

Franz, Jay Jay.Franz at ssa.gov
Wed Sep 14 18:43:24 CEST 2011


>-----Original Message-----
>From: lists [mailto:lists at catsnest.co.uk] 
>Sent: Wednesday, September 14, 2011 08:08
>To: Nagios Plugin Help List
>Subject: Re: [Nagiosplug-help] check_http HTTP Version
>
>On Wed, Sep 14, 2011 at 12:49 AM, Franz, Jay <Jay.Franz at ssa.gov> wrote:
>> One of the internal Web servers which we monitor recently underwent some additional hardening.  One of the hardening artifacts is that HTTP 1.0 requests are being refused, generating a 403 error.  Looking at the Web server logs, we can see that check_http is issuing a "GET / HTTP/1.0" request.  This has got to be in the FM somewhere, but I am at a loss to find it.  Is there any way to specify the HTTP version for a GET request?
>>
>
>Try using -H and supplying a host that does 1.1 requests for me...
>Also what is that "$ARG1$" doing in your config?

We defined a new check_http command, using "-H $HOSTNAME$", and ran it against the same host.  It worked like the proverbial.  That is, it issues a "GET / HTTP/1.1" request.  Thanks, for the suggestion.  We then tried using "-H $HOSTADDRESS$", and that worked as well.  As for the "$ARG1$", it is doing nothing.  It is an artifact of our default configuration and is not defined.  We omitted it from the new check_http definition.  For the record, our version of check_http is v1.4.15.

Understanding that it now works, I am not sure that I understand why.  I thought that the -H option was for virtual hosts?  And, why would it work with both "$HOSTNAME$" and "$HOSTADDRESS$"?  That is, from the plug-in's point of view, what is the difference between -I "$HOSTADDRESS$" and -H "$HOSTADDRESS$"?

>
>--
><-- http://23.me.uk/2 -->
><--Time flies like an arrow; fruit flies like a banana.  -->
>
>> Our current check_http definition and the host template which calls it follow
>>
>> --------------------
>>
>> commands.cfg:
>> define command{
>>        command_name    check_http
>>        command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
>>        }
>>
>> --------------------
>>
>> internal_host.cfg:
>> define service{
>>        use                             internal_host
>>        host_name                       some_internal_host
>>        service_description             HTTP
>>        check_command                   check_http
>>        }
>>
>> ====================


More information about the Help mailing list