From a487fc6973e3a8717712ced15510341216d7cec9 Mon Sep 17 00:00:00 2001 From: Ben Ritcey Date: Wed, 8 Apr 2020 11:25:34 -0400 Subject: [PATCH] want both src. and source, dst. and destination metrics --- syslog_ng_exporter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/syslog_ng_exporter.go b/syslog_ng_exporter.go index 380c32f..ee4bdad 100644 --- a/syslog_ng_exporter.go +++ b/syslog_ng_exporter.go @@ -166,14 +166,14 @@ func (e *Exporter) collect(ch chan<- prometheus.Metric) error { log.Debugf("Successfully parsed STATS line: %v", stat) switch stat.objectType[0:4] { - case "src.": + case "src.", "sour": switch stat.metric { case "processed": ch <- prometheus.MustNewConstMetric(e.srcProcessed, prometheus.CounterValue, stat.value, stat.objectType, stat.id, stat.instance) } - case "dst.": + case "dst.", "dest": switch stat.metric { case "dropped": ch <- prometheus.MustNewConstMetric(e.dstDropped, prometheus.CounterValue,