Skip to content

Commit 8fa6455

Browse files
Remove system colections from index stats (#893)
1 parent e065c15 commit 8fa6455

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

exporter/indexstats_collector.go

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ func (d *indexstatsCollector) collect(ch chan<- prometheus.Metric) {
9494
database := parts[0]
9595
collection := strings.Join(parts[1:], ".")
9696

97+
// exclude system collections
98+
if strings.HasPrefix(collection, "system.") {
99+
continue
100+
}
101+
97102
aggregation := bson.D{
98103
{Key: "$indexStats", Value: bson.M{}},
99104
}

0 commit comments

Comments
 (0)