From 81404ad53ec8752c52978e5af517c08aac20cf52 Mon Sep 17 00:00:00 2001 From: Jakub Surdej Date: Tue, 5 Mar 2024 14:21:02 +0100 Subject: [PATCH] Change event-related metrics from counters to gauges (#310) --- internal/collectors/nodestats/nodestats_collector.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/collectors/nodestats/nodestats_collector.go b/internal/collectors/nodestats/nodestats_collector.go index 13404b7e..167e7354 100644 --- a/internal/collectors/nodestats/nodestats_collector.go +++ b/internal/collectors/nodestats/nodestats_collector.go @@ -263,9 +263,9 @@ func (collector *NodestatsCollector) collectSingleInstance(client logstash_clien // ************ EVENTS ************ eventsStats := nodeStats.Events - metricsHelper.NewUInt64Metric(collector.EventsIn, prometheus.CounterValue, eventsStats.In) - metricsHelper.NewUInt64Metric(collector.EventsFiltered, prometheus.CounterValue, eventsStats.Filtered) - metricsHelper.NewUInt64Metric(collector.EventsOut, prometheus.CounterValue, eventsStats.Out) + metricsHelper.NewUInt64Metric(collector.EventsIn, prometheus.GaugeValue, eventsStats.In) + metricsHelper.NewUInt64Metric(collector.EventsFiltered, prometheus.GaugeValue, eventsStats.Filtered) + metricsHelper.NewUInt64Metric(collector.EventsOut, prometheus.GaugeValue, eventsStats.Out) metricsHelper.NewUInt64Metric(collector.EventsDurationInMillis, prometheus.GaugeValue, eventsStats.DurationInMillis) metricsHelper.NewUInt64Metric(collector.EventsQueuePushDurationInMillis, prometheus.GaugeValue, eventsStats.QueuePushDurationInMillis) // ********************************