]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: stats: fix stot metric for listeners
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 4 Apr 2024 16:15:42 +0000 (18:15 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Mon, 22 Apr 2024 08:35:18 +0000 (10:35 +0200)
commit282a8e9f52d214ec834001265a693ef6e850dd98
treef6636eaa94a0e0738d8110463c8b83a502cb0b43
parentc02ec9a9db205fda124a40a2a87913a0528b0e5b
BUG/MINOR: stats: fix stot metric for listeners

This commit is part of a series to align counters usage between
frontends/listeners on one side and backends/servers on the other.

On frontend side, "stot" is the total count of sessions for both proxies
and listeners. For proxies, fe_counters <cum_sess> is correctely used.
The bug is on listeners where <cum_conn> value is returned, which
instead indicates a number of connection. This commit fixes this by
returning <cum_sess> counter value for "stot" metric.

Along this fixes, use the opportunity to report "conn_tot" for listeners
using <cum_conn> value, as for frontend proxies.

This commit fixes a bug but must not be backported as stats output is
changed.
src/stats.c