-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Filebeat] Refactor autodiscover default input settings handling #12193
Conversation
@alakahakai this changes a bit the default setting you added, would love your feedback here |
@vjsamuel FYI ^ |
thanks I need to remember this :) |
@exekias The changes related to disabling default config LGTM |
a3659eb
to
a77e419
Compare
Autodiscover hints default config (unreleased) was done at the hints level, while it only makes sense for certain configs builder (logs). This change moves this logic to the `logs` builder and improves how users can define default settings for logs, ie: Enable hints but disable log retrieval by default: ``` filebeat.autodiscover: providers: - type: docker # or kubernetes hints.enabled: true hints.default_config.enabled: false ``` Only containers with the `co.elastic.logs/enabled: true` annotation will be retrieved. ``` filebeat.autodiscover: providers: - type: kubernetes # or docker hints.enabled: true hints.default_config: type: container paths: - /var/log/containers/*${data.container.id}.log ``` Logs are read by default for all containers, using the given input settings. Containers with `co.elastic.logs/enabled: false` annotation will be ignored.
a77e419
to
489b6f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, please update the changelog to replace the change previously added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these changes!
…stic#12193) Autodiscover hints default config (unreleased) was done at the hints level, while it only makes sense for certain configs builder (logs). This change moves this logic to the `logs` builder and improves how users can define default settings for logs, ie: Enable hints but disable log retrieval by default: ``` filebeat.autodiscover: providers: - type: docker # or kubernetes hints.enabled: true hints.default_config.enabled: false ``` Only containers with the `co.elastic.logs/enabled: true` annotation will be retrieved. ``` filebeat.autodiscover: providers: - type: kubernetes # or docker hints.enabled: true hints.default_config: type: container paths: - /var/log/containers/*${data.container.id}.log ``` Logs are read by default for all containers, using the given input settings. Containers with `co.elastic.logs/enabled: false` annotation will be ignored. (cherry picked from commit e5fd309)
) (#12272) Autodiscover hints default config (unreleased) was done at the hints level, while it only makes sense for certain configs builder (logs). This change moves this logic to the `logs` builder and improves how users can define default settings for logs, ie: Enable hints but disable log retrieval by default: ``` filebeat.autodiscover: providers: - type: docker # or kubernetes hints.enabled: true hints.default_config.enabled: false ``` Only containers with the `co.elastic.logs/enabled: true` annotation will be retrieved. ``` filebeat.autodiscover: providers: - type: kubernetes # or docker hints.enabled: true hints.default_config: type: container paths: - /var/log/containers/*${data.container.id}.log ``` Logs are read by default for all containers, using the given input settings. Containers with `co.elastic.logs/enabled: false` annotation will be ignored. (cherry picked from commit e5fd309)
…stic#12193) (elastic#12272) Autodiscover hints default config (unreleased) was done at the hints level, while it only makes sense for certain configs builder (logs). This change moves this logic to the `logs` builder and improves how users can define default settings for logs, ie: Enable hints but disable log retrieval by default: ``` filebeat.autodiscover: providers: - type: docker # or kubernetes hints.enabled: true hints.default_config.enabled: false ``` Only containers with the `co.elastic.logs/enabled: true` annotation will be retrieved. ``` filebeat.autodiscover: providers: - type: kubernetes # or docker hints.enabled: true hints.default_config: type: container paths: - /var/log/containers/*${data.container.id}.log ``` Logs are read by default for all containers, using the given input settings. Containers with `co.elastic.logs/enabled: false` annotation will be ignored. (cherry picked from commit 0d24fa2)
Autodiscover hints default config disable (unreleased) was done at the hints
level, while it only makes sense for certain configs builder (logs).
This change moves this logic to the
logs
builder and improves howusers can define default settings for logs, ie:
Enable hints but disable log retrieval by default, only containers with the
co.elastic.logs/enabled: true
annotation will be retrieved:Logs are read by default for all containers, using the given input
settings. Containers with
co.elastic.logs/enabled: false
annotationwill be ignored: