]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: contrib/prometheus-exporter: Use dynamic labels instead of static ones
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 28 Jan 2021 10:24:17 +0000 (11:24 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 29 Jan 2021 12:42:43 +0000 (13:42 +0100)
commit5a2f938732126f43bbf4cea5482c01552b0d0314
treebff781be7bf86f345f1c01cb33edcd96774b9702
parentc6464591a365bfcf509b322bdaa4d608c9395d75
MEDIUM: contrib/prometheus-exporter: Use dynamic labels instead of static ones

Instead of using static labels for metrics, we now use an array of labels,
filled for each metrics if necessary and passed to the dump function. This
way, it is easier to extend the promex service. For now, there are at most 8
labels per metrics. This limit may be raised by changing PROMEX_MAX_LABELS
value. And to ease labels addition, a label is defined as a key/value
pair. The formatting is handled by the dump function.

For the proxies and servers, the first entry of the array is always the
proxy name. In addition, for the servers, the second entry is always the
server name.
contrib/prometheus-exporter/service-prometheus.c