]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: promex: Add agent check status/code/duration metrics
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 22 May 2025 07:37:09 +0000 (09:37 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 22 May 2025 07:50:10 +0000 (09:50 +0200)
commit7244f16ac451fd796042b2184b5d90ed50f9d5af
treed3351c835713e9e115e550f5c4134c63286967e2
parent0ac41ff97e11985ec1cc8f87b7e851c308610d9d
MINOR: promex: Add agent check status/code/duration metrics

In the Prometheus exporter, the last health check status is already exposed,
with its code and duration in seconds. The server status is also exposed.
But the information about the agent check are not available. It is not
really handy because when a server status is changed because of the agent,
it is not obvious by looking to the Prometheus metrics. Indeed, the server
may reported as DOWN for instance, while the health check status still
reports a success. Being able to get the agent status in that case could be
valuable.

So now, the last agent check status is exposed, with its code and duration
in seconds. Following metrics can be grabbe now:

  * haproxy_server_agent_status
  * haproxy_server_agent_code
  * haproxy_server_agent_duration_seconds

Note that unlike the other metrics, no per-backend aggregated metric is
exposed.

This patch is related to issue #2983.
addons/promex/README
addons/promex/service-prometheus.c
src/stats-proxy.c