Forum Discussion

buki_12593's avatar
buki_12593
Icon for Nimbostratus rankNimbostratus
Dec 30, 2007

The default HTTP monitor seems to be incorrectly defined

The default HTTP monitor seems to be incorrectly defined – instead of defining the “send string” properly (I.E., “GET / HTTP/1.0\r\n”), it is defined as “GET /”.

 

 

This approach does not work with standard-compliant HTTP servers (lighttpd, for example).

 

 

After creating a custom monitor that sends a proper HTTP request, the monitor works as expected.

 

5 Replies

  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    Hello,

     

     

    Per SOL3224 (Click here), the default HTTP monitor send string, 'GET /' is an HTTP 0.9 formatted request. As you found, some servers may not support this version/format. It would probably be helpful for the BIG-IP to use HTTP 1.0 or 1.1 by default. It might also be good to provide an HTTP 1.1 formatted HTTP and HTTPS monitor in the default BIG-IP configuration. If you think so, you might want to open a case with F5 support requesting this functionality be changed/added.

     

     

    Aaron
  • Hi, I am running into the same problem with a lighttpd server. In my telnet test I can run the following and it returns fine:

     
     GET / HTTP/1.1 
     Host: hostname 
     Connection: Close 
     

    HTTP/1.1 200 OK

     

    Content-Length: 5637

     

    Content-Type: text/html; charset=utf-8

     

    Connection: close

     

    Date: Fri, 20 Mar 2009 15:53:28 GMT

     

    Server: lighttpd/1.4.21

    However when I created a custom http monitor with the following, it doesn't work:

    GET / HTTP/1.1\n Host: hostname\n Connection: Close\n

    Based on the solution SOL3224, I tried taking out 'hostname' in the monitor but it doesn't help. (Even though typing anything for hostname in telnet is fine). Tried messing with the syntax and no luck. Any help would be great. I am using a LTM 1500 BIG-IP 9.3.0 Build 178.5 straight out of the box.

    Thanks.
  • hoolio's avatar
    hoolio
    Icon for Cirrostratus rankCirrostratus
    I'd guess the problem is that the send string lines are separated by \n (newline or linefeed character) but HTTP requires \r\n (carriage return and line feed). In older BIG-IP versions, the monitoring daemon translated \n's to \r\n automatically.

     

     

     

    For other tips on troubleshooting monitors, you can check this post:

     

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=32&tpage=1&view=topic&postid=3338133384 (Click here)

     

     

    Aaron
  • Great, thanks! Adding the \r to each new line helped.

     
     GET / HTTP/1.1\r\n Host: \r\n Connection: Close\r\n 
     

    Appreciate the quick response.
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    I have recently updated the solutions regarding this functionality:

     

     

    For information about the change in behavior regarding the terminating newline characters for HTTP monitors in version 9.x, refer to SOL10655: Change in Behavior: Double CR/LF appended to HTTP monitor send string. Click here

     

     

    For information about constructing Send Strings for HTTP or HTTPS application health monitors, refer to SOL2167: Writing HTTP requests for use with the HTTP or HTTPS application health monitor. Click here

     

     

    HTH

     

    :D