From 06d7bde9d1d5136172c03fa69733f2091bf73d52 Mon Sep 17 00:00:00 2001 From: Daniel Griggs Date: Fri, 29 May 2020 13:47:12 +0200 Subject: [PATCH] Add in recognition of more complex inputs. --- syslog_ng_exporter.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/syslog_ng_exporter.go b/syslog_ng_exporter.go index 380c32f..7f513af 100644 --- a/syslog_ng_exporter.go +++ b/syslog_ng_exporter.go @@ -173,6 +173,13 @@ func (e *Exporter) collect(ch chan<- prometheus.Metric) error { stat.value, stat.objectType, stat.id, stat.instance) } + case "sour": + switch stat.metric { + case "processed": + ch <- prometheus.MustNewConstMetric(e.srcProcessed, prometheus.CounterValue, + stat.value, stat.objectType, stat.id, stat.instance) + } + case "dst.": switch stat.metric { case "dropped":