fixed panic on missing label

This commit is contained in:
oGi4i 2020-12-08 20:39:03 +03:00
parent 4c50274ec7
commit fa09ac2436

View File

@ -17,7 +17,7 @@ type dhcpLeaseCollector struct {
func (c *dhcpLeaseCollector) init() {
c.props = []string{"active-mac-address", "server", "status", "expires-after", "active-address", "host-name"}
labelNames := []string{"name", "address", "activemacaddress", "status", "expiresafter", "activeaddress", "hostname"}
labelNames := []string{"name", "address", "activemacaddress", "server", "status", "expiresafter", "activeaddress", "hostname"}
c.descriptions = description("dhcp", "leases_metrics", "number of metrics", labelNames)
}