MAJOR: contrib/prometheus-exporter: move ftd/bkd/srv states to labels
authorWilliam Dauchy <wdauchy@gmail.com>
Wed, 27 Jan 2021 21:40:17 +0000 (22:40 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 29 Jan 2021 12:42:43 +0000 (13:42 +0100)
commitc6464591a365bfcf509b322bdaa4d608c9395d75
treef63e1eeb02a3ea14c670867417a4f4b8b4d53ee8
parent5493821fe6d6d6f225a5065549c6438f7d64e879
MAJOR: contrib/prometheus-exporter: move ftd/bkd/srv states to labels

this patch is a breaking change between v2.3 and v2.4: we move from
using gauge value for frontend/backend/servers states to labels values.

the main motivation being I realised it is very difficult to make use of
it without hard coded quirks on prometheus client side; especially
because the main use is often to group by state, which is harder when
the state is the value of the metric.

in order to achieve that we iterate on the status metric to generate
labels, and so as many metrics.

this is the first step to resolve github issue #1029
A second step should address health check states.

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