Find the answer to your Linux question:
Results 1 to 7 of 7
Hello, I want to monitor a device which use the HTTP 1.0 version. If I try to use the check_http Nagios plugin it does not works because it use the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    9

    Post select HTTP version to monitor a device


    Hello,

    I want to monitor a device which use the HTTP 1.0 version. If I try to use the check_http Nagios plugin it does not works because it use the 1.1 version :

    HTTP CRITICAL: HTTP/1.1 505 HTTP Version Not Supported

    I also look arround wget in order to develop my own plugin but I find nothing more. It's just not possible to choose the HTTP version to use.

    Does have any suggestion about this problem?

    Thanks

  2. #2
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    you should be able to define what request is sent using the check_http module

    Code:
    check_http -H $HOSTNAME -s 'GET / HTTP/1.0'
    linux user # 503963

  3. #3
    Just Joined!
    Join Date
    May 2009
    Posts
    9
    Thanks for you answer

    Now I get this error message :

    Code:
     
    Connection refused
    Unable to open TCP socket
    Are you sure that the -s is the right option? I already looked into the http_check manpage : nagiosplugins.org/man/check_http

    -s, --string=STRING
    String to expect in the content



    "in the content" is ambiguous no?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    so what does the content say if you run it verbosely?
    Code:
    check_http -v -H www.blah.com
    I tested 2 versions of the plugin, both do something like this:

    Code:
    GET / HTTP/1.0                                                           
    User-Agent: check_http/v2053 (nagios-plugins 1.4.13)                     
    Connection: close
    ....
    ....
    ....
    maybe you should try using -e instead of -s, i believe -s is body content
    linux user # 503963

  6. #5
    Just Joined!
    Join Date
    May 2009
    Posts
    9
    I was just doing the same

    I activate the -v mode and get the same thing. And actually I understand that is the contrary about the version(my bad).http_check use 1.0 and the device 1.1

    Because when I launch http_check I got this :

    Code:
    GET / HTTP/1.0
    User-Agent: check_http/1.89 (nagios-plugins 1.4.3)
    
    
    https://172.24.1.4:443/ is 443 characters
    STATUS: HTTP/1.1 505 HTTP Version Not Supported
    [...]
    <TITLE>505 HTTP Version Not Supported</TITLE>
    </HEAD><BODY>
    <H1>HTTP Version Not Supported</H1>
    HTTP protocol shoud be above or equal 1.1

    I try other option but presently find nothing which change the request. Actually I have to get something like this :

    Code:
    GET / HTTP/1.1
    User-Agent: check_http/1.89 (nagios-plugins 1.4.3)
    I will keep searching, thanks for you help

  7. #6
    Linux Enthusiast scathefire's Avatar
    Join Date
    Jan 2010
    Location
    Western Kentucky
    Posts
    626
    am i mistaken or is that an SSL connection string I see there?

    perhaps you try adding --ssl if that is the case
    linux user # 503963

  8. #7
    Just Joined!
    Join Date
    May 2009
    Posts
    9
    Yeap you're right, actually I already use a -ssl option, that's why http_check is trying to access to an https address.

    I did not mention it because I think it is not usefull for the problem...

    I have ask the community mailing lists which develop this plugin, I guess they will be able to answer my question

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •