Posted on 2022-12-03
HAProxy is a reverse-proxy software Load-Balancer. It is very famous for its high performance and reliability. That said, it also proposes as well very strong observability features: a stats page with many counters, a very versatile log line that can be tailored and augmented to your needs, etc... Today, we'll focus on the stats page.
To enable stats page in HAProxy, add the following configuration block to a frontend or a backend section, adjusting parameters accordingly. I personally add it into a backend and use a use-backend rule to route the traffic to it.
stats enable stats uri / stats auth USERNAME:******** stats show-legends stats show-modules
The first 3 lines are pretty common. We'll focus on the last 2 ones:
Columns added for show-modules:
Note
stats show-legends is available since HAProxy 1.4 and stats show-modules is available since HAProxy 2.3