Forum Discussion

Wish_40049's avatar
Wish_40049
Icon for Nimbostratus rankNimbostratus
Nov 19, 2009

HTTP Health Monitor

I have a virtual server with 1 node which has 4 websites. The problem I am having is that because I am using the IP address I can't monitor if the application is up or down. Is there any way to monitor each individual site on the one server?

1 Reply

  • You could set up separate HTTP monitors on a single server or a pool in your case 4. However, keep in mind that since they are attach to one server in a pool, if one monitor fails, out of the rest, the server is marked down for every site.

    If that is not the behavior you want then there is another approach using irules. Where you would create 4 pools containing the same server and each pool has a separate monitor for each instance of the website. Then within i irules you could do the following:

       
          
       when HTTP_REQUEST {   
          if { [HTTP::host eq "www.app1.com"] and [active_members webpool1] > 0] } {   
           pool webpool1   
          } elseif { [HTTP::host eq "www.app2.com"] and [active_members webpool2] > 0] } {   
           pool webpool2   
          } elseif { [HTTP::host eq "www.app3.com"] and [active_members webpool3] > 0] } {   
           pool webpool3   
          } elseif { [HTTP::host eq "www.app4.com"] and [active_members webpool4] > 0] } {   
           pool webpool4   
          }   
       }   
       

    What this will do is divert the traffic to separate pools based on the domain but also check to see if there is active server in each pool(in your case it's the same server). However, the difference here is that since you have seperate monitors for each webserver it will ONLY mark down the relevant website and not all the webservers.

    I hope this example helps

    Bhattman