From: William Dauchy Date: Mon, 1 Feb 2021 12:11:56 +0000 (+0100) Subject: MINOR: contrib/prometheus-exporter: add uweight field X-Git-Tag: v2.4-dev7~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e5a26a250d4b7d1db03493493b77b2cc04e797ce;p=thirdparty%2Fhaproxy.git 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 --- diff --git a/contrib/prometheus-exporter/README b/contrib/prometheus-exporter/README index f948ac9b1a..4e4bf053c3 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 ff27df6475..debe2f60cb 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 */