[Filebeat] Refactor autodiscover default input settings handling#12193
Merged
exekias merged 5 commits intoelastic:masterfrom May 24, 2019
Merged
[Filebeat] Refactor autodiscover default input settings handling#12193exekias merged 5 commits intoelastic:masterfrom
exekias merged 5 commits intoelastic:masterfrom
Conversation
Contributor
Author
|
@alakahakai this changes a bit the default setting you added, would love your feedback here |
Contributor
Author
|
@vjsamuel FYI ^ |
Contributor
|
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
jsoriano
reviewed
May 23, 2019
Member
jsoriano
left a comment
There was a problem hiding this comment.
LGTM, please update the changelog to replace the change previously added
jsoriano
approved these changes
May 24, 2019
exekias
pushed a commit
to exekias/beats
that referenced
this pull request
May 24, 2019
…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)
exekias
pushed a commit
that referenced
this pull request
May 24, 2019
) (#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)
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
…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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
logsbuilder 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: trueannotation will be retrieved:Logs are read by default for all containers, using the given input
settings. Containers with
co.elastic.logs/enabled: falseannotationwill be ignored: