diff options
Diffstat (limited to '')
-rw-r--r-- | src/go/plugin/go.d/modules/smartctl/init.go (renamed from src/go/collectors/go.d.plugin/modules/smartctl/init.go) | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/go/collectors/go.d.plugin/modules/smartctl/init.go b/src/go/plugin/go.d/modules/smartctl/init.go index b5d4ebfe3..6d3731a18 100644 --- a/src/go/collectors/go.d.plugin/modules/smartctl/init.go +++ b/src/go/plugin/go.d/modules/smartctl/init.go @@ -7,8 +7,8 @@ import ( "os" "path/filepath" - "github.com/netdata/netdata/go/go.d.plugin/agent/executable" - "github.com/netdata/netdata/go/go.d.plugin/pkg/matcher" + "github.com/netdata/netdata/go/plugins/pkg/executable" + "github.com/netdata/netdata/go/plugins/plugin/go.d/pkg/matcher" ) func (s *Smartctl) validateConfig() error { @@ -17,6 +17,13 @@ func (s *Smartctl) validateConfig() error { default: return fmt.Errorf("invalid power mode '%s'", s.NoCheckPowerMode) } + + for _, v := range s.ExtraDevices { + if v.Name == "" || v.Type == "" { + return fmt.Errorf("invalid extra device: name and type must both be provided, got name='%s' type='%s'", v.Name, v.Type) + } + } + return nil } |