Skip to content
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

Fix Filebeat autodiscover hints default settings #12348

Merged
merged 1 commit into from
May 29, 2019

Conversation

exekias
Copy link
Contributor

@exekias exekias commented May 29, 2019

Default settings were broken after #12162, this code updates them to the
new input and makes sure that enable/disable logic works correctly.

Tests have been added to make sure this changes still work.

Fixes #12346

Default settings were broken after elastic#12162, this code updates them to the
new input and makes sure that enable/disable logic works correctly.

Tests have been added to make sure this changes still work
@exekias exekias added bug review blocker needs_backport PR is waiting to be backported to other branches. containers Related to containers use case v7.2.0 labels May 29, 2019
@exekias exekias requested a review from a team as a code owner May 29, 2019 16:33
@exekias exekias self-assigned this May 29, 2019
} else {
// full config provided, discard default
c.DefaultConfig = config
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if a full config is provided, but also with the enabled setting set to true?
Would this work?

          hints.default_config:
            type: container
            enabled: true
            paths:
              - "/var/log/pods/${data.kubernetes.pod.uid}/${data.kubernetes.container.name}/*.log"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should, as I'm checking number of fields == 1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right

@exekias exekias merged commit 289c984 into elastic:master May 29, 2019
exekias pushed a commit to exekias/beats that referenced this pull request May 29, 2019
Default settings were broken after elastic#12162, this code updates them to the
new input and makes sure that enable/disable logic works correctly.

Tests have been added to make sure this changes still work

(cherry picked from commit 289c984)
@exekias exekias removed the needs_backport PR is waiting to be backported to other branches. label May 29, 2019
exekias pushed a commit that referenced this pull request May 29, 2019
Default settings were broken after #12162, this code updates them to the
new input and makes sure that enable/disable logic works correctly.

Tests have been added to make sure this changes still work

(cherry picked from commit 289c984)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…stic#12356)

Default settings were broken after elastic#12162, this code updates them to the
new input and makes sure that enable/disable logic works correctly.

Tests have been added to make sure this changes still work

(cherry picked from commit 66fe637)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filebeat autodiscover hints fail to create inputs
3 participants