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
…37819)

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.

(cherry picked from commit eae57f9)

Co-authored-by: Tiago Queiroz <tiago.queiroz@elastic.co>
  • Loading branch information
mergify[bot] and belimawr authored Feb 1, 2024
1 parent c7ec8f6 commit 91673b1
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 @@ -52,6 +52,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff]
- Fix panic when MaxRetryInterval is specified, but RetryInterval is not {pull}35820[35820]
- Support build of projects outside of beats directory {pull}36126[36126]
- 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 91673b1

Please sign in to comment.