diff --git a/collector/netdev_darwin.go b/collector/netdev_darwin.go index c07e7fa182..c45e868588 100644 --- a/collector/netdev_darwin.go +++ b/collector/netdev_darwin.go @@ -42,7 +42,7 @@ func getNetDevStats(ignore *regexp.Regexp, accept *regexp.Regexp) (map[string]ma continue } - if ignore.MatchString(iface.Name) { + if ignore != nil && ignore.MatchString(iface.Name) { log.Debugf("Ignoring device: %s", iface.Name) continue }