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

Unset existing config blocks when they are missing #9023

Merged
merged 3 commits into from
Nov 12, 2018

Conversation

exekias
Copy link
Contributor

@exekias exekias commented Nov 9, 2018

When a configuration block type (ie output) is not set in Central
Management, Kibana doesn't return it in the payload.

Before this change, Beats was not taking that into account and missing
block types were not reloaded in case they changed. In particular that
means that if an output configuration exists and is removed, Beats won't
apply that change (disable the output).

This PR fixes that behavior by detecting missing types and applying nil
config to them.

Fixes #9010

@exekias exekias added bug review libbeat needs_backport PR is waiting to be backported to other branches. v6.5.0 labels Nov 9, 2018
@exekias
Copy link
Contributor Author

exekias commented Nov 9, 2018

I'm working on adding some tests for this on top of #8762

@exekias exekias requested a review from ph November 9, 2018 22:14
@ph
Copy link
Contributor

ph commented Nov 12, 2018

@exekias LGTM, I away from my laptop I will create binaries tomorrow and test it lets get that in 6.5 if possible.

@exekias exekias force-pushed the fix-cm-missing-blocks branch from 8289bf0 to 472fe98 Compare November 12, 2018 09:35
Carlos Pérez-Aradros Herce added 2 commits November 12, 2018 11:00
When a configuration block type (ie output) is not set in Central
Management, Kibana doesn't return it in the payload.

Before this change, Beats was not taking that into account os missing
block types were not reloaded in case they changed. In particular that
means that if an output configuration exists and is removed, Beats won't
apply that change.

This PR fixes that behavior by detecting missing types and applying nil
config to them.

Fixes elastic#9010
@exekias exekias force-pushed the fix-cm-missing-blocks branch from 472fe98 to ceba0b6 Compare November 12, 2018 10:02
@exekias
Copy link
Contributor Author

exekias commented Nov 12, 2018

Added a test and updated CHANGELOG

@ph
Copy link
Contributor

ph commented Nov 12, 2018

@exekias I've tested this PR with both Metricbeat and Filebeat with snapshots of ES and Kibana. This seems to work correctly as expected. 👍

@exekias exekias merged commit f805d6c into elastic:master Nov 12, 2018
exekias added a commit to exekias/beats that referenced this pull request Nov 12, 2018
* Unset existing config blocks when they are missing

When a configuration block type (ie output) is not set in Central
Management, Kibana doesn't return it in the payload.

Before this change, Beats was not taking that into account os missing
block types were not reloaded in case they changed. In particular that
means that if an output configuration exists and is removed, Beats won't
apply that change.

This PR fixes that behavior by detecting missing types and applying nil
config to them.

Fixes elastic#9010

(cherry picked from commit f805d6c)
@exekias exekias added v6.6.0 and removed needs_backport PR is waiting to be backported to other branches. labels Nov 12, 2018
exekias added a commit to exekias/beats that referenced this pull request Nov 12, 2018
* Unset existing config blocks when they are missing

When a configuration block type (ie output) is not set in Central
Management, Kibana doesn't return it in the payload.

Before this change, Beats was not taking that into account os missing
block types were not reloaded in case they changed. In particular that
means that if an output configuration exists and is removed, Beats won't
apply that change.

This PR fixes that behavior by detecting missing types and applying nil
config to them.

Fixes elastic#9010

(cherry picked from commit f805d6c)
exekias added a commit that referenced this pull request Nov 12, 2018
* Unset existing config blocks when they are missing

When a configuration block type (ie output) is not set in Central
Management, Kibana doesn't return it in the payload.

Before this change, Beats was not taking that into account os missing
block types were not reloaded in case they changed. In particular that
means that if an output configuration exists and is removed, Beats won't
apply that change.

This PR fixes that behavior by detecting missing types and applying nil
config to them.

Fixes #9010

(cherry picked from commit f805d6c)
exekias added a commit that referenced this pull request Nov 12, 2018
* Unset existing config blocks when they are missing

When a configuration block type (ie output) is not set in Central
Management, Kibana doesn't return it in the payload.

Before this change, Beats was not taking that into account os missing
block types were not reloaded in case they changed. In particular that
means that if an output configuration exists and is removed, Beats won't
apply that change.

This PR fixes that behavior by detecting missing types and applying nil
config to them.

Fixes #9010

(cherry picked from commit f805d6c)
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…astic#9042)

* Unset existing config blocks when they are missing

When a configuration block type (ie output) is not set in Central
Management, Kibana doesn't return it in the payload.

Before this change, Beats was not taking that into account os missing
block types were not reloaded in case they changed. In particular that
means that if an output configuration exists and is removed, Beats won't
apply that change.

This PR fixes that behavior by detecting missing types and applying nil
config to them.

Fixes elastic#9010

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

Successfully merging this pull request may close these issues.

Central management: When we remove all the inputs for a beat it still keep the original configuration.
2 participants