BUG/MEDIUM: promex: Fix dump of extra counters
authorChristopher Faulet <cfaulet@haproxy.com>
Tue, 5 Nov 2024 14:30:56 +0000 (15:30 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 6 Nov 2024 14:51:56 +0000 (15:51 +0100)
commit61ecd35113b4b8620981263d9c4482b9be7b2b3c
tree82fde014b6d05a20193ec024eec3a0808bd275c8
parent533b6f37ce6a4276bd8854cca7c3736147b026ec
BUG/MEDIUM: promex: Fix dump of extra counters

When extra counters are dumped for an entity (frontend, backend, server or
listener), there is a filter on capabilities. Some extra counters are not
available for all entities and must be ignored. However, when this was
performed, the field number, used as an index to dump the metric value, was
still incremented while it should not and leads to an overflow or a stats
mix-up.

This patch must be backported to 3.0.

(cherry picked from commit d1adfd9fe41b0f9f67944eec07348213a7debbf3)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
addons/promex/service-prometheus.c