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.
diff --git a/contrib/prometheus-exporter/README b/contrib/prometheus-exporter/README
index a0df4b2..a631020 100644
--- a/contrib/prometheus-exporter/README
+++ b/contrib/prometheus-exporter/README
@@ -272,6 +272,7 @@
| haproxy_server_weight | Service weight. |
| haproxy_server_check_status | Status of last health check, if enabled. (see below for the mapping) |
| haproxy_server_check_code | layer5-7 code, if available of the last health check. |
+| haproxy_server_check_duration_seconds | Total duration of the latest server health check, in seconds. |
| haproxy_server_check_failures_total | Total number of failed check (Only when the server is up). |
| haproxy_server_check_up_down_total | Total number of UP->DOWN transitions. |
| haproxy_server_downtime_seconds_total | Total downtime (in seconds) for the service. |