]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: promex: Add global and proxies description as labels to all metrics
authorChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Nov 2024 13:15:43 +0000 (14:15 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 15 Nov 2024 13:25:13 +0000 (14:25 +0100)
commit25b05927456780aaca2d61f6b05b9a4ad4302eb3
treee76235c7f5b443e6a888ec6c4c25a8270f21ccee
parent451d216a5330c7d891c079c728e9be0a1744b388
MINOR: promex: Add global and proxies description as labels to all metrics

While the global description is exposed, when defined, in a dedicated
metric, it is not possible to dump the description defined in a
frontend/listen/backend sections. So, thanks to this patch, it is now
possible to dump it as a label of all metrics of the corresponding
section. To do so, "desc-labels" parameter must be provided on the URL:

    /metrics?desc-labels

When this parameter is set, if a description is provided in a section,
including the global one, the "desc" label will be added to all metrics of
this section. For instance:

  haproxy_frontend_current_sessions{proxy="front-http",desc="..."} 1

Note that servers metrics inherit the description of their backend/listen
section.

This patch should solve the issue #1531.
addons/promex/README
addons/promex/include/promex/promex.h
addons/promex/service-prometheus.c