health check passthrough not 100% in combination with haproxy

Thomas Zajic zlatko-dovecot at zlatk0.net
Mon Oct 18 07:07:24 EEST 2021


* Marc, 17.10.21 01:15

> I have been trying to get a simple health check in haproxy to work. But somehome the haproxy request is differently handled then a curl request, which generates a socket error in haproxy.
> [...]

For stats, you can use "socat" to talk to haproxy's stat socket instead of using
its HTTP interface. For example, with "stats socket /var/lib/haproxy/stats" in
haproxy's config, you can then do:

echo "show stat" | socat - "UNIX-CONNECT:/var/lib/haproxy/stats"

Maybe there is a way to also expose your health check status on a local socket
instead of an HTTP listener? This would at least eliminate having to deal with
missing or superfluous CR/LFs, spaces, etc.

Just a thought.

HTH,
Thomas


More information about the dovecot mailing list