Hello Marcel,
On Sat, Jan 07, 2023 at 03:34:43PM +0100, Marcel Menzel wrote:
> Hello list,
>
> according to the documentation [1], there is an option to set an optional
> name for sockets that's being displayed on the stats page. I was hoping to
> receive per address family statistics without having to copy & paste a whole
> new frontend block by just setting a different name on a new bind directive:
>
> frontend fe_https
> bind 0.0.0.0:443 name fe_https_ipv4 tfo ssl curves
> X448:X25519:P-256 alpn h2,http/1.1 crt-list /etc/haproxy/certlist.txt
> bind [::]:443 v6only name fe_https_ipv6 tfo ssl curves
> X448:X25519:P-256 alpn h2,http/1.1 crt-list /etc/haproxy/certlist.txt
>
> But I am not seeing those names anywhere on the stats page, nor the builtin
> prometheus exporter:
>
> listen stats
> http-request set-log-level silent
> bind :9000
> mode http
> http-request use-service prometheus-exporter if { path /metrics }
> stats enable
> stats admin if TRUE
> stats realm Haproxy\ Statistics
> stats uri /
> stats show-legends
> stats show-desc
> stats show-node
> stats show-modules
>
> Am I missing something out here?
Indeed, you need "option socket-stats" in the frontend that has such
listeners, so that the stats are collected per-listening socket (this
is not the case by default).
Regards,
Willy