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 <wdauchy@gmail.com>
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 @@
| 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 @@
| 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 @@
[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 */