diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 31e7779af97..953533ddaef 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -399,6 +399,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Fix Netflow module issue with missing `internal_networks` config parameter. {issue}24094[24094] {pull}24110[24110] - in httpjson input using encode_as "application/x-www-form-urlencoded" now sets Content-Type correctly {issue}24331[24331] {pull}24336[24336] - Fix netflow module ignoring detect_sequence_reset flag. {issue}24268[24268] {pull}24270[24270] +- Fix default `scope` in `add_nomad_metadata`. {issue}24559[24559] *Heartbeat* diff --git a/x-pack/libbeat/autodiscover/providers/nomad/config.go b/x-pack/libbeat/autodiscover/providers/nomad/config.go index 7108bf87943..1a611aceee3 100644 --- a/x-pack/libbeat/autodiscover/providers/nomad/config.go +++ b/x-pack/libbeat/autodiscover/providers/nomad/config.go @@ -64,7 +64,7 @@ func (c *Config) Validate() error { case ScopeNode: case ScopeCluster: default: - return fmt.Errorf("invalid value for `scope`, select `%s` or `%s`", ScopeNode, ScopeCluster) + return fmt.Errorf("invalid value for `scope`: %s, select `%s` or `%s`", c.Scope, ScopeNode, ScopeCluster) } return nil } diff --git a/x-pack/libbeat/processors/add_nomad_metadata/config.go b/x-pack/libbeat/processors/add_nomad_metadata/config.go index 6425f05550c..daeeccc6513 100644 --- a/x-pack/libbeat/processors/add_nomad_metadata/config.go +++ b/x-pack/libbeat/processors/add_nomad_metadata/config.go @@ -40,7 +40,7 @@ func (c *nomadAnnotatorConfig) Validate() error { case ScopeNode: case ScopeCluster: default: - return fmt.Errorf("invalid value for `scope`, select `local` or `global`") + return fmt.Errorf("invalid value for `scope`: %s, select `%s` or `%s`", c.Scope, ScopeNode, ScopeCluster) } return nil } @@ -57,7 +57,7 @@ func defaultNomadAnnotatorConfig() nomadAnnotatorConfig { Region: "", Namespace: "", SecretID: "", - Scope: "local", + Scope: ScopeNode, syncPeriod: 5 * time.Second, CleanupTimeout: 60 * time.Second, DefaultMatchers: Enabled{true},