]> git.kaiwu.me - haproxy.git/commit
MINOR: promex: expose the master and worker IDs as labels
authorWilly Tarreau <w@1wt.eu>
Tue, 15 Sep 2026 11:50:32 +0000 (13:50 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 16 Sep 2026 16:00:51 +0000 (18:00 +0200)
commit6da13fe8858006e42ac28c0bf879863c56679967
tree7852143ed2dcfccb6680ad4514ce50e83a157a4c
parent55506fce78e5f9262002fad0fc2ef2e9b3b9f14c
MINOR: promex: expose the master and worker IDs as labels

This adds support for emitting the master id when defined (when master
is running) and the worker id. Note that we add a check for the value
being a non-empty string, which remains valid for the few other field
that is always defined (node), so no impact on existing fields.

The output looks like this:

  $ curl -s 0:8181/metrics?metrics=haproxy_process_master_id,haproxy_process_worker_id
  haproxy_process_master_id{master_id="..."} 1
  haproxy_process_worker_id{worker_id="..."} 1
addons/promex/README
addons/promex/service-prometheus.c