diff --git a/packaging/snclient.ini b/packaging/snclient.ini index ebfbad1..2c1b0f7 100644 --- a/packaging/snclient.ini +++ b/packaging/snclient.ini @@ -369,6 +369,7 @@ metrics interval = 5s ; device filter - exclude matching network devices from gathering network counter metrics, ex. for temporary devices device filter = ^veth + ; Unix system - Section for non windows system checks [/settings/system/unix] diff --git a/pkg/snclient/config.go b/pkg/snclient/config.go index ad133b6..bc0984f 100644 --- a/pkg/snclient/config.go +++ b/pkg/snclient/config.go @@ -897,7 +897,7 @@ func (cs *ConfigSection) GetBytes(key string) (val uint64, ok bool, err error) { // If value is found but cannot be parsed, error is set. func (cs *ConfigSection) GetRegexp(key string) (val *regexp.Regexp, ok bool, err error) { raw, ok := cs.GetString(key) - if !ok { + if !ok || raw == "" { return nil, false, nil } re, err := regexp.Compile(raw)