Forum Discussion

michael_trott_1's avatar
michael_trott_1
Icon for Nimbostratus rankNimbostratus
Jul 02, 2008

indepth analysis of comms for health check

hi all,

 

 

am performing basic health monitoring on a pool, confirming a http 200 from the pool, problem that is now appearing is that while the front end of the app is up, eg 200 returned, the backend is actually down and unable to handle requests.

 

 

The servers being monitored in the pool now display a nice error page describing that the server's backend is down, and lists the particular funciton that is down, eg DB.. , but still supplies a 200.

 

 

How could i monitor these 200's for an actual failure, i'm assuming an iRule is the way to go, still maintaing the current healthcheck to confirm actaul webservers are up, then use an irule to check the returned pages for particular fields, if they find, somehow mark the server as down???

 

 

any ideas or can point me in the right direction?

 

 

thanks

 

 

3 Replies

  • Hi

     

     

    The best method we have found is to have F5 monitor a specific page and look for a string in the html returned. This way you can set the page (asp, php etc) to do a do a few tests eg a simple database query that will check to see if the back end systems are functioning.

     

     

    If everything comes back ok then all the page has to do is display a message such as 'Success' or something similar or it if fails just have it return 'Fail'.

     

     

    Have F5 check to see if that string is in the page html. If the checks fail for any reason the string will not be found so the F5 monitor will report the system as down and if the front end webserver fails the string will not appear again so you will catch both types of failure.

     

     

    This works much better than checking for a 200 response as you can do an indepth check of the web application at all levels.

     

     

    Cheers

     

     

    Simon
  • Deb_Allen_18's avatar
    Deb_Allen_18
    Historic F5 Account
    It's worth mentioning as well that the response string should always be a phrase that would never be found in an error response.

     

     

    If you use "200", you will always get an UP status for a webserver unless it doesn't respond at all, since "200" is imbedded in the Date fields in the server response.

     

     

    /deb
  • If you want to logically OR a request, I think you can use a regex like (?:first_string|second_string). Else, if that doesn't work, you could use multiple monitors. This would be less efficient than a single monitor. The most functional and least efficient option would be to use an external monitor which greps through the response content and marks the pool member up if either string is found.

     

     

    If the first option doesn't work reply and we can provide you some additional links/examples for the second and third options.

     

     

    Aaron