MINOR: contrib/prometheus-exporter: use fill_sv_stats for server dump
authorWilliam Dauchy <wdauchy@gmail.com>
Mon, 25 Jan 2021 16:29:04 +0000 (17:29 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Tue, 26 Jan 2021 08:24:57 +0000 (09:24 +0100)
commitbde2bf6fd3455c372bccf139a703e81325367665
treeb54b73017abdadf999743c9d7d2b1e2791ba6151
parentd3a9a4992b0198b75caf0602016d8d90a3f6a6e9
MINOR: contrib/prometheus-exporter: use fill_sv_stats for server dump

use `stats_fill_sv_stats` when possible to avoid duplicating code.

the following metrics have a change of behaviour:

haproxy_server_limit_sessions
haproxy_server_queue_limit
haproxy_server_check_failures_total
haproxy_server_check_up_down_total
haproxy_server_downtime_seconds_total
haproxy_server_current_throttle
haproxy_server_idle_connections_limit

depending on cases, if the limit was not configured or enabled, NaN is
returned instead. It should not be an issue for users, even better than
before as it provides more precise info.

Signed-off-by: William Dauchy <wdauchy@gmail.com>
contrib/prometheus-exporter/service-prometheus.c