Hi Jonathan, On 17-06-13 17:04:22, Jonathan Quinn wrote: > I'm trying to implement a health check within HAProxy but update the > host depending on the backend server the request is sent to: > > [...] > > Each machine would ideally be checked, so I was interested if there > was a way to dynamically update the host based on where the request > was being sent: > > option httpchk GET /arcgis/sharing/rest/ HTTP/1.1\r\nHost:\ %[req.hdr(host)] > > or something similar. Any help is appreciated!
Not sure if this is of any help, and there is a easier way, but the following comes to my mind: You could write a script which takes the server address, evaluates it and use curl (or something similar) and the appropriate host header (based on the server address). Call this script via 'external-check command' [1]; ensure to set both 'external-check' [2] and 'option external-check' [3]. All the best, Georg [1] http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#external-check%20command [2] http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#external-check [3] http://cbonte.github.io/haproxy-dconv/1.7/configuration.html#option%20external-check
signature.asc
Description: Digital signature