Beats: Improve logging when autodiscover configs fail

Created on 12 Aug 2020  路  2Comments  路  Source: elastic/beats

When using autodiscover with Filebeat, errors like the following occur:

ERROR [autodiscover] autodiscover/autodiscover.go:209 Auto discover config check failed for config '{
"docker-json": {
"cri_flags": true,
"format": "auto",
"partial": true,
"stream": "all"
},
"json": {
"add_error_key": true,
"keys_under_root": true,
"overwrite_keys": true
},
"symlinks": true,
"type": "container"
}', won't start runner: each input must have at least one path defined

This kind of errors can be considered as non-fatal since they came from Pod events introduced at https://github.com/elastic/beats/pull/18979/files#diff-3a3ae93d44b91ab240d462f8f7eddc2cR365.

However we should avoid logging them since it can be confusing when looking at the logs for actual errors.

Related to https://github.com/elastic/beats/issues/11834#issuecomment-672551945.

Filebeat Platforms autodiscovery bug

Most helpful comment

Ideally we should detect that the configuration is using an undefined variable (it would be kubernetes.container.id) and log something specific about this, maybe only at the debug level. But not sure if the templates used support this kind of fine-grained errors.

All 2 comments

Pinging @elastic/integrations-platforms (Team:Platforms)

Ideally we should detect that the configuration is using an undefined variable (it would be kubernetes.container.id) and log something specific about this, maybe only at the debug level. But not sure if the templates used support this kind of fine-grained errors.

Was this page helpful?
0 / 5 - 0 ratings