]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: contrib/prometheus-exporter: add uweight field
authorWilliam Dauchy <wdauchy@gmail.com>
Mon, 1 Feb 2021 12:11:56 +0000 (13:11 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Mon, 1 Feb 2021 14:16:33 +0000 (15:16 +0100)
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>
contrib/prometheus-exporter/README
contrib/prometheus-exporter/service-prometheus.c

index f948ac9b1a82066742b2aae65a1a06bde7f8c2aa..4e4bf053c3c7cd6687d60750fb72b56af025223f 100644 (file)
@@ -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.             |
index ff27df6475b914067a9c830ce127a50237978f89..debe2f60cb431b0deccbd777e771af4e155bce12 100644 (file)
@@ -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 */