MINOR: contrib/prometheus-exporter: Add the last heathcheck duration metric
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 27 Feb 2020 15:12:07 +0000 (16:12 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 28 Feb 2020 10:18:38 +0000 (11:18 +0100)
commit7b83c71dfa6c6b6d18a1f7e0fcbd563706bebb50
tree6e01b7b4b164f8e072b89e87fed405f5a67de883
parentf7d4218967314c5673fff2793e1a1e5681eb756b
MINOR: contrib/prometheus-exporter: Add the last heathcheck duration metric

ST_F_CHECK_DURATION is now part of exported server metrics, named
haproxy_server_check_duration_seconds and expressed in seconds. For a given
server, this value is exported only if the healthcheck is finished (the status
is greater or equal to HCHK_STATUS_CHECKED).

This patch fixes the issue #519. It may be backported as fat as 2.0.

(cherry picked from commit 2711e51016cfc408deb03e66f46bea0fa5bf954c)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
contrib/prometheus-exporter/README
contrib/prometheus-exporter/service-prometheus.c