mirror of
https://github.com/nshttpd/mikrotik-exporter.git
synced 2024-11-24 11:37:04 +01:00
commit
8588952bb6
@ -76,7 +76,8 @@ func (c *dhcpLeaseCollector) collectMetric(ctx *collectorContext, re *proto.Sent
|
||||
server := re.Map["server"]
|
||||
status := re.Map["status"]
|
||||
activeaddress := re.Map["active-address"]
|
||||
hostname := re.Map["host-name"]
|
||||
// QuoteToASCII because of broken DHCP clients
|
||||
hostname := strconv.QuoteToASCII(re.Map["host-name"])
|
||||
|
||||
metric, err := prometheus.NewConstMetric(c.descriptions, prometheus.GaugeValue, v, ctx.device.Name, ctx.device.Address, activemacaddress, server, status, strconv.FormatFloat(f, 'f', 0, 64), activeaddress, hostname)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user