From: William Dauchy Date: Mon, 1 Feb 2021 12:11:57 +0000 (+0100) Subject: MINOR: contrib/prometheus-exporter: add recv logs_logs_total field X-Git-Tag: v2.4-dev7~30 X-Git-Url: http://git.haproxy.org/?a=commitdiff_plain;h=7741c337794d0301cb55f6f1e2cc756d4ef3be74;p=haproxy-2.5.git MINOR: contrib/prometheus-exporter: add recv logs_logs_total field this field was added by commit 45c457a62941a7c4a86ce4327d7755edcd4b230e ("MINOR: log: adds counters on received syslog messages.") Signed-off-by: William Dauchy --- diff --git a/contrib/prometheus-exporter/README b/contrib/prometheus-exporter/README index 4e4bf05..0b760cc 100644 --- a/contrib/prometheus-exporter/README +++ b/contrib/prometheus-exporter/README @@ -169,6 +169,8 @@ Exported metrics | haproxy_process_bytes_out_total | Total number of bytes emitted. | | haproxy_process_spliced_bytes_out_total | Total number of bytes emitted through a kernel pipe. | | haproxy_process_bytes_out_rate | Number of bytes emitted over the last elapsed second. | +| haproxy_process_recv_logs_total | Total number of log messages received by log-forwarding listeners on this | +| | worker process since started | +------------------------------------------------+-------------------------------------------------------------------------------+ * Frontend metrics diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-prometheus.c index debe2f6..e62ad94 100644 --- a/contrib/prometheus-exporter/service-prometheus.c +++ b/contrib/prometheus-exporter/service-prometheus.c @@ -177,6 +177,7 @@ const struct promex_metric promex_global_metrics[INF_TOTAL_FIELDS] = { [INF_TOTAL_SPLICED_BYTES_OUT] = { .n = IST("spliced_bytes_out_total"), .type = PROMEX_MT_COUNTER, .flags = PROMEX_FL_INFO_METRIC }, [INF_BYTES_OUT_RATE] = { .n = IST("bytes_out_rate"), .type = PROMEX_MT_GAUGE, .flags = PROMEX_FL_INFO_METRIC }, //[INF_DEBUG_COMMANDS_ISSUED] ignored + [INF_CUM_LOG_MSGS] = { .n = IST("recv_logs_total"), .type = PROMEX_MT_COUNTER, .flags = PROMEX_FL_INFO_METRIC }, }; /* frontend/backend/server fields */