From ec0b35f59c5f2539005bd9ec07329fb26d57dac7 Mon Sep 17 00:00:00 2001 From: Steve Brunton Date: Thu, 6 May 2021 22:16:48 -0400 Subject: [PATCH] updated some descriptions and log output --- collector/collector.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/collector/collector.go b/collector/collector.go index 93cf1d3..bf2a04a 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -35,13 +35,13 @@ const ( var ( scrapeDurationDesc = prometheus.NewDesc( prometheus.BuildFQName(namespace, "scrape", "collector_duration_seconds"), - "mikrotik_exporter: duration of a collector scrape", + "mikrotik_exporter: duration of a device collector scrape", []string{"device"}, nil, ) scrapeSuccessDesc = prometheus.NewDesc( prometheus.BuildFQName(namespace, "scrape", "collector_success"), - "mikrotik_exporter: whether a collector succeeded", + "mikrotik_exporter: whether a device collector succeeded", []string{"device"}, nil, ) @@ -268,7 +268,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) { d.Address = strings.TrimRight(s.Target, ".") d.User = dev.User d.Password = dev.Password - c.getIdentity(&d) + _ := c.getIdentity(&d) realDevices = append(realDevices, d) } } @@ -295,7 +295,7 @@ func (c *collector) getIdentity(d *config.Device) error { log.WithFields(log.Fields{ "device": d.Name, "error": err, - }).Error("error dialing device") + }).Error("error dialing device fetching identity") return err } defer cl.Close()