diff --git a/plugins/common/opcua/input/input_client.go b/plugins/common/opcua/input/input_client.go index 31501c6c0..29eb3c424 100644 --- a/plugins/common/opcua/input/input_client.go +++ b/plugins/common/opcua/input/input_client.go @@ -2,6 +2,7 @@ package input import ( "context" + "errors" "fmt" "sort" "strconv" @@ -75,6 +76,15 @@ func (o *InputClientConfig) Validate() error { o.TimestampFormat = time.RFC3339Nano } + if len(o.Groups) == 0 && len(o.RootNodes) == 0 { + return errors.New("no groups or root nodes provided to gather from") + } + for _, group := range o.Groups { + if len(group.Nodes) == 0 { + return errors.New("group has no nodes to collect from") + } + } + return nil }