updated some descriptions and log output

This commit is contained in:
Steve Brunton 2021-05-06 22:16:48 -04:00
parent 856665bc12
commit ec0b35f59c
1 changed files with 4 additions and 4 deletions

View File

@ -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()