mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-24 05:36:36 +00:00
Merge pull request #783 from breed808/msmq_remove_hardcoded_queue
Remove hard-coded "Computer Queues" filter
This commit is contained in:
@@ -93,29 +93,27 @@ func (c *Win32_PerfRawData_MSMQ_MSMQQueueCollector) collect(ch chan<- prometheus
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, msmq := range dst {
|
for _, msmq := range dst {
|
||||||
|
|
||||||
if msmq.Name == "Computer Queues" {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.BytesinJournalQueue,
|
c.BytesinJournalQueue,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(msmq.BytesinJournalQueue),
|
float64(msmq.BytesinJournalQueue),
|
||||||
strings.ToLower(msmq.Name),
|
strings.ToLower(msmq.Name),
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.BytesinQueue,
|
c.BytesinQueue,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(msmq.BytesinQueue),
|
float64(msmq.BytesinQueue),
|
||||||
strings.ToLower(msmq.Name),
|
strings.ToLower(msmq.Name),
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.MessagesinJournalQueue,
|
c.MessagesinJournalQueue,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
float64(msmq.MessagesinJournalQueue),
|
float64(msmq.MessagesinJournalQueue),
|
||||||
strings.ToLower(msmq.Name),
|
strings.ToLower(msmq.Name),
|
||||||
)
|
)
|
||||||
|
|
||||||
ch <- prometheus.MustNewConstMetric(
|
ch <- prometheus.MustNewConstMetric(
|
||||||
c.MessagesinQueue,
|
c.MessagesinQueue,
|
||||||
prometheus.GaugeValue,
|
prometheus.GaugeValue,
|
||||||
|
|||||||
Reference in New Issue
Block a user