Forum Discussion

veredgfbll's avatar
Icon for Altocumulus rankAltocumulus
Mar 01, 2023

create an external monitor with curl to all nodes with different host names

Hi,    I would like help with the following scenario. We have a pool that consists of 10 servers. I need a monitor to check the existence of favicon.ico on each of them. The catch - I need to use...
  • Paulius's avatar
    Mar 01, 2023

    veredgfbll In order to come up with a solution for you it would be helpful to know the reasoning why a unique hostname is required per server for this health monitor. Typicall if you have more than one pool member in a pool with each pool member being a unique server they would load balance traffic for lets say which should exist on every pool member. In this case your file of "/favicon.ico" should exist in the directory for so that your health monitor could use the following to cover all pool members with a single monitor.

    Send String: HEAD /favicon.ico HTTP/1.1\r\nHost:\r\nConnection: Close\r\n
    Receive String: HTTP/1\.1 200 OK

    The reason this is a HEAD rather than a GET is because you are only interested in the HTTP head status code section so no reason to gather the body of the path that you are querying. If you require a health check to the hostname of the server as well as the main host that you are serving traffic for this seems a bit redundant because you can make that "/favicon.ico" available in the directory. Now you could achieve this with 11 health monitors, one for each pool member and then one for but this weeks a bit redundant and over complicated when you can make the "/favicon.ico" available in the directory and solve all the issues in one health monitor.

    If you must perform an external health monitor the following article should help you construct the external health monitor.