From 2b7dbeaa53d5b905fc39e3f7f68073b9a3062574 Mon Sep 17 00:00:00 2001 From: Brian Dols Date: Mon, 23 Oct 2023 09:11:39 -0500 Subject: [PATCH] Raise logging level for autodiscover configuration errors Raise up logging level to warning when attempting to configure beats with unknown fields from autodiscover events/environments. --- CHANGELOG.next.asciidoc | 1 + libbeat/autodiscover/template/config.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 56e207a7afe..890675b2385 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -169,6 +169,7 @@ is collected by it. Setting environmental variable ELASTIC_NETINFO:false in Elastic Agent pod will disable the netinfo.enabled option of add_host_metadata processor - allow `queue` configuration settings to be set under the output. {issue}35615[35615] {pull}36788[36788] - Beats will now connect to older Elasticsearch instances by default {pull}36884[36884] +- Raise up logging level to warning when attempting to configure beats with unknown fields from autodiscovered events/environments *Auditbeat* diff --git a/libbeat/autodiscover/template/config.go b/libbeat/autodiscover/template/config.go index c050ff8acd8..3ba0db210de 100644 --- a/libbeat/autodiscover/template/config.go +++ b/libbeat/autodiscover/template/config.go @@ -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.Debug("autodiscover", "Configuration template cannot be resolved: %v", err) + logp.Warn("autodiscover: Configuration template cannot be resolved: %v", err) continue } // Repack again: