Forum Discussion

stan_peachey_86's avatar
Oct 18, 2017
Solved

Is there a way to insert a HOST header in an HTTP 1.1 health monitor request?

I'm trying to create an HTTPS health monitor that verifies the same URL path (to an image file) for multiple pools. I'm trying to find a way to insert a host header of the pool members IPs being monitored. This is simply an attempt to create a generic health check that can be applied to many pools. HTTP 1.1 requests require a HOST header. A null value (Host: ) is valid unless the HTTP server requires them for virtual hosting, which is the case. FQDN of the virtual servers should not be used in this case because they are WideIPs (BIG-IP DNS) for datacenter failover services. Both virtual server and pool listen ports are HTTPS.

 

Leaving HOST header blank does not work: GET /path/image.svg HTTP/1.1\r\nHost: \r\nConnection: Close\r\n\r\n

 

Is there a way to insert the pool member IP in the GET? GET /path/image.svg HTTP/1.1\r\nHost: \r\nConnection: Close\r\n\r\n

 

Of course, this would have to work for multiple pool members. I don't think there is an easy way to accomplish this within the health monitor, but worth asking. Worst case, I have to create unique health monitors for each pool using the virtual server IP in the HOST header.

 

  • Due to concerns about the default vhost receiving health checks, I settled on using the correct service hostname in the GET and I can use the same health check on LTMs at both our datacenters. We will need to create a unique check/header for each new service, which is not terrible.

     

    current health check: GET /path/image.svg HTTP/1.1\r\nHost: service.domain.com\r\nConnection: Close\r\n\r\n

     

2 Replies

  • I've not tried this myself but I 'think' if you configure your pools as using FQDNs (Ephemeral pool) then the health monitor will attempt to use DNS.. whether this translates to the GET request in the monitor using the correct host name I don't know but I'd been curious to know.

     

    If I get chance I may test this later on this evening.

     

    MP

     

  • Due to concerns about the default vhost receiving health checks, I settled on using the correct service hostname in the GET and I can use the same health check on LTMs at both our datacenters. We will need to create a unique check/header for each new service, which is not terrible.

     

    current health check: GET /path/image.svg HTTP/1.1\r\nHost: service.domain.com\r\nConnection: Close\r\n\r\n