From 059c6c947f22702d2eee8c7c8c5607458d806427 Mon Sep 17 00:00:00 2001 From: Ramunas Balukonis <95075496+ramunas-omnisend@users.noreply.github.com> Date: Fri, 16 Aug 2024 10:45:32 +0300 Subject: [PATCH] exclude system collections --- exporter/indexstats_collector.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/exporter/indexstats_collector.go b/exporter/indexstats_collector.go index 9f75bf2db..4d38546b1 100644 --- a/exporter/indexstats_collector.go +++ b/exporter/indexstats_collector.go @@ -87,6 +87,11 @@ func (d *indexstatsCollector) collect(ch chan<- prometheus.Metric) { database := parts[0] collection := strings.Join(parts[1:], ".") + // exclude system collections + if strings.HasPrefix(collection, "system.") { + continue + } + aggregation := bson.D{ {Key: "$indexStats", Value: bson.M{}}, }