Forum Discussion

Terry_Yau_91196's avatar
Terry_Yau_91196
Icon for Nimbostratus rankNimbostratus
Aug 26, 2009

how to check the availablility of /index.html

Hi everyone, I would like to check the website availablility on /check.html. Are there any suggestions about it?

 

 

Terry

8 Replies

  • Hi Terry,

     

    If you referring to monitor a server for keeping the server marked up on a load balancer then the way you would do this is by creating a HTML monitor where the send string is GET /check.html HTTP/1.1\nHost: domain.domainsomething.com\nConnection: close\n\n and receive string: is whatever content is on /check.html page.

     

     

    I hope that helps

     

    CB
  • Hi CB

     

    Should I only copy the whole send string " GET /check.html HTTP/1.1\nHost: domain.domainsomething.com\nConnection: close\n\n " or need to modify the domain.domainsomething.com to our domain name?

     

    Besides, no HTML monitor can be created. I only create a HTTP monitor, is it correct?

     

    Thanks for your helps

     

    Terry
  • For html monitor to properly work you need the full string. The domain.domainsomthing.com is basically a host name that it's passing to the server that is listening on html port.

     

     

    However, you could as an alternative create a TCP monitor and sent the send string to GET /check.html and the recieve string to what ever you want to check in the check.html page is displaying.

     

     

    CB

     

  • I have chosen the alternative method and create a tcp monitor for checking the index.html. It seems work.

     

    However, I can only select the new TCP Monitor in Pool list level. It cannot select it in nodes level. Therefore, if only one server of the pool list cannot match the tcp monitor checking, it will change to unknown status. Can I select the TCP monitor in nodes level?

     

     

    Regards,

     

    Terry
  • Hi Terry,

     

     

    It shouldn't make much of a difference whether you use a TCP or an HTTP monitor as long as you send an HTTP request. Why don't you try using an HTTP monitor configured as cmbhatt has suggested? You shouldn't need to associate it with a node. You'll want to use it to check the health of each pool member. So it makes sense to add the HTTP monitor to the pool.

     

     

    The only change I'd suggest is using \r\n for new lines. RFC2616 states that the header delimiter is a CR LF not just a LF:

     

     

     

    ftp://ftp.rfc-editor.org/in-notes/rfc2616.txt

     

     

    HTTP/1.1 defines the sequence CR LF as the end-of-line marker for all

     

    protocol elements except the entity-body (see appendix 19.3 for

     

    tolerant applications). The end-of-line marker within an entity-body

     

    is defined by its associated media type, as described in section 3.7.

     

     

    CRLF = CR LF

     

     

     

     

    If the web server isn't configured to select the correct web app by host header value, you can probably just configure the send string without the value:

     

     

    GET /check.html HTTP/1.1\r\nHost: \r\nConnection: close\r\n

     

     

    Also, the monitor daemon, bigd, appends one or two \r\n's to the end of the send string depending on version. So you probably only need to explicitly add one.

     

     

    If this doesn't work, try checking the server access/error logs to see what it thinks is happening with the request. You can also enable debug on bigd by running 'b db bigd.debug enable' from the command line. Output is written to /var/log/bigdlog. Make sure to turn off the debug using 'b db bigd.debug disable' once you're done testing as it is very verbose and can eat up a lot of disk space.

     

     

    Aaron
  •  

    Hi F5's,

     

     

    I have tried this to check the web site availability

     

     

    My monitoring config is like below on GUI.

     

     

    Type HTTP

     

     

    Send String :

     

    GET /load_balance_is_on.html HTTP/1.1\r\nHost: \r\nConnection: close\r\n\r\n

     

     

    Recive String :

     

    The\x20load\x20balancer\x20ping\x20target\x20\x28this\x20file\x29\x20exists\x21

     

     

    I am monitoring pool using gateway_icmp now I would like to add this to the monitoring. So that I can have both gateway_icmp and http monitoring.

     

     

    But this is failing.

     

     

    Previously I have tried

     

     

    Recive String:

     

    The loadbalancer ping target (this file) exists!

     

    As I read this : https://support.f5.com/kb/en-us/solutions/public/4000/100/sol4186.html

     

    from Aaron I have changed it to special characters.

     

     

     

    Also appreciate if you can help me with https monitoring regards to this strings or setting please.

     

     

    Appreciate your help .

     

     

    Arun
  • Hi Arun,

     

     

    Which LTM version are you testing on? If you take out the receive string to test, does it work? If so, can you try this for your receive string?

     

     

    The load balancer ping target

     

     

    If that works, can you try this?

     

     

    The load balancer ping target (this file) exists!

     

     

    Aaron