Skip to content

Commit

Permalink
Lower logging level when unpacking config in autodiscover (#37816)
Browse files Browse the repository at this point in the history
When unpacking a config while applying the autodiscover config
template, sometimes a configuration template cannot be resolved at
that moment but will be resolved at a later stage. This commit brings
the logging level of this error back to debug as it can become too
verbose and not always means the config is invalid.
  • Loading branch information
belimawr authored Feb 1, 2024
1 parent 842c77c commit eae57f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Support Elastic Agent control protocol chunking support {pull}37343[37343]
- Upgrade elastic-agent-libs to v0.7.5. Removes obsolete "Treating the CommonName field on X.509 certificates as a host name..." deprecation warning for 8.0. {pull}37755[37755]
- aws: Add credential caching for `AssumeRole` session tokens. {issue}37787[37787]
- Lower logging level to debug when attempting to configure beats with unknown fields from autodiscovered events/environments {pull}[37816][37816]

*Auditbeat*

Expand Down
2 changes: 1 addition & 1 deletion libbeat/autodiscover/template/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func ApplyConfigTemplate(event bus.Event, configs []*conf.C, options ...ucfg.Opt
var unpacked map[string]interface{}
err = c.Unpack(&unpacked, opts...)
if err != nil {
logp.Warn("autodiscover: Configuration template cannot be resolved: %v", err)
logp.Debug("autodiscover", "Configuration template cannot be resolved: %v", err)
continue
}
// Repack again:
Expand Down

0 comments on commit eae57f9

Please sign in to comment.