]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: promex: expose ST_I_INF_WARNINGS (AKA total_warnings) metric
authorAurelien DARRAGON <adarragon@haproxy.com>
Tue, 18 Mar 2025 09:58:43 +0000 (10:58 +0100)
committerAurelien DARRAGON <adarragon@haproxy.com>
Thu, 20 Mar 2025 10:39:16 +0000 (11:39 +0100)
It has been requested to have the ST_I_INF_WARNINGS metric available from
prometheus, let's define it in promex_global_metrics ist array so that
prometheus starts advertising it.

addons/promex/service-prometheus.c

index 376ea39d8288db42bda5c69c104eac6ebd90ffb7..95a90ad526a4a22063c578cfe8eafbcfcb0220e5 100644 (file)
@@ -161,6 +161,7 @@ const struct ist promex_global_metrics[ST_I_INF_MAX] = {
        [ST_I_INF_BYTES_OUT_RATE]                 = IST("bytes_out_rate"),
        [ST_I_INF_CUM_LOG_MSGS]                   = IST("recv_logs_total"),
        [ST_I_INF_BUILD_INFO]                     = IST("build_info"),
+       [ST_I_INF_WARNINGS]                       = IST("total_warnings"),
 };
 
 static inline enum promex_mt_type promex_global_gettype(int index, enum field_nature nature)