From e5a26a250d4b7d1db03493493b77b2cc04e797ce Mon Sep 17 00:00:00 2001 From: William Dauchy Date: Mon, 1 Feb 2021 13:11:56 +0100 Subject: [PATCH] MINOR: contrib/prometheus-exporter: add uweight field this field was added in commit bd7151002437af1a034a9fdbb582b3cbef5a78d1 ("MINOR: stats: report server's user-configured weight next to effective weight") Signed-off-by: William Dauchy --- contrib/prometheus-exporter/README | 2 ++ contrib/prometheus-exporter/service-prometheus.c | 1 + 2 files changed, 3 insertions(+) diff --git a/contrib/prometheus-exporter/README b/contrib/prometheus-exporter/README index f948ac9..4e4bf05 100644 --- a/contrib/prometheus-exporter/README +++ b/contrib/prometheus-exporter/README @@ -243,6 +243,7 @@ Exported metrics | haproxy_backend_client_aborts_total | Total number of data transfers aborted by the client. | | haproxy_backend_server_aborts_total | Total number of data transfers aborted by the server. | | haproxy_backend_weight | Service weight. | +| haproxy_backend_uweight | Sum of active servers'user weights for a backend | | haproxy_backend_active_servers | Current number of active servers. | | haproxy_backend_backup_servers | Current number of backup servers. | | haproxy_backend_check_up_down_total | Total number of UP->DOWN transitions. | @@ -296,6 +297,7 @@ Exported metrics | haproxy_server_client_aborts_total | Total number of data transfers aborted by the client. | | haproxy_server_server_aborts_total | Total number of data transfers aborted by the server. | | haproxy_server_weight | Service weight. | +| haproxy_server_uweight | Server's user 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. | diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-prometheus.c index ff27df6..debe2f6 100644 --- a/contrib/prometheus-exporter/service-prometheus.c +++ b/contrib/prometheus-exporter/service-prometheus.c @@ -280,6 +280,7 @@ const struct promex_metric promex_st_metrics[ST_F_TOTAL_FIELDS] = { [ST_F_SAFE_CONN_CUR]= { .n = IST("safe_idle_connections_current"), .type = PROMEX_MT_GAUGE, .flags = ( PROMEX_FL_SRV_METRIC) }, [ST_F_USED_CONN_CUR] = { .n = IST("used_connections_current"), .type = PROMEX_MT_GAUGE, .flags = ( PROMEX_FL_SRV_METRIC) }, [ST_F_NEED_CONN_EST] = { .n = IST("need_connections_current"), .type = PROMEX_MT_GAUGE, .flags = ( PROMEX_FL_SRV_METRIC) }, + [ST_F_UWEIGHT] = { .n = IST("uweight"), .type = PROMEX_MT_GAUGE, .flags = ( PROMEX_FL_BACK_METRIC | PROMEX_FL_SRV_METRIC) }, }; /* Description of overriden stats fields */ -- 1.7.10.4