From 0fb7eec670d5cb4cf6a4ccd33aa665ae4b8ffb29 Mon Sep 17 00:00:00 2001 From: Ben Reedy Date: Sun, 16 May 2021 14:50:55 +1000 Subject: [PATCH] Remove hard-coded "Computer Queues" filter msmq collector would only collect from a hard-coded "Computer Queues" queue. Removal of filter allows other queues to be queried with the collector.msmq.msmq-where flag. Signed-off-by: Ben Reedy --- collector/msmq.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/collector/msmq.go b/collector/msmq.go index fc4d2e99..4ce49bd9 100644 --- a/collector/msmq.go +++ b/collector/msmq.go @@ -93,29 +93,27 @@ func (c *Win32_PerfRawData_MSMQ_MSMQQueueCollector) collect(ch chan<- prometheus } for _, msmq := range dst { - - if msmq.Name == "Computer Queues" { - continue - } - ch <- prometheus.MustNewConstMetric( c.BytesinJournalQueue, prometheus.GaugeValue, float64(msmq.BytesinJournalQueue), strings.ToLower(msmq.Name), ) + ch <- prometheus.MustNewConstMetric( c.BytesinQueue, prometheus.GaugeValue, float64(msmq.BytesinQueue), strings.ToLower(msmq.Name), ) + ch <- prometheus.MustNewConstMetric( c.MessagesinJournalQueue, prometheus.GaugeValue, float64(msmq.MessagesinJournalQueue), strings.ToLower(msmq.Name), ) + ch <- prometheus.MustNewConstMetric( c.MessagesinQueue, prometheus.GaugeValue,