Forum Discussion

DanAvni's avatar
8 years ago

Add support for monitoring web servers in a load balanced environment

Imagine the following scenario

3 Web servers hosting multiple web sites, a load balancer facing the internet and distributing requests between the web servers. From the LM external web check I can see that the load balancer is working and that one of the web servers is working. However I still cannot make sure all servers are working and that other customers are not getting errors being redirected to a malfunctioning web site on another machine.

The internal web service check could be a candidate for solving this but because the web servers are hosting multiple sites, the request has to be for a specific host name (using the host header). This means that if I want to monitor site1 on the 3 web servers I will need to register in the hosts file of that machine 3 addresses Site1Web1, Site1Web2, Site1Web3. Configure the IIS to listen to these host names (Otherwise the request will not be served from the correct web site on the IIS), and then add internal web service check for that URL. This has to be done for each web site I want to monitor Maintenance of this as web servers are being added is long and error prune (and in theory if on one of the IIS sites someone removes by mistake the external domain binding I would not know about this as I am only monitoring a custom address).

I suggest expanding the internal web service check a bit and allowing me to add a field that specifies the machine to which the HTTP(S) tcp connection should be made (if set it ignores the domain). Basically the rest should be the same. This will allow me to define an internal web service check with the external URL but saying to run the check with a TCP connection to Web1 (And a clone to Web2 and Web3). This monitors the external URL is working on that machine, There is no custom configuration and all is good.

An added feature could be allowing me to set multiple machines to run the test against (i.e. one web service check would run against Web1, Web2 & Web3 as instances). This makes maintenance even easier