Bedis9 website

Extend HAProxy stats page with more stats for SSL, H2 and HTTP/1.1

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:

  • stats show-legends (documentation): enables extra information (provided as tooltips) about backend / frontend / server such as capabilities, mode, IPs.
  • stats show-modules (documentation): enables extra statistics for SSL, H2 and HTTP/1.1. A new column is added at the end of each line for each module. Stats are provided as tooltips.

Columns added for show-modules:



stats show-legends is available since HAProxy 1.4 and stats show-modules is available since HAProxy 2.3