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

Cherry-pick #16348 to 7.x: Fix loading processors from autodiscover hints #16391

Merged
merged 3 commits into from
Feb 18, 2020

Conversation

blakerouse
Copy link
Contributor

@blakerouse blakerouse commented Feb 18, 2020

Cherry-pick of PR #16348 to 7.x branch. Original message:

What does this PR do?

Fixes an issue where processors from autodiscover hints where not convered into a common.MapStr.

Why is it important?

Allows processors to be defined in autodiscover hints.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works

Author's Checklist

  • Converts string to common.MapStr

How to test this PR locally

Run filebeat with:

filebeat.autodiscover:
  providers:
    - type: docker
      hints.enabled: true

output.console:
  pretty: true

Start container with processor:

docker run -l 'co.elastic.logs/processors.add_fields={"fields":{"foo":"bar"}}' busybox echo hello

Check that filebeat was able to start logging it the container with the fields added.

Related issues

Use cases

Screenshots

Logs

* Parse processors from hints as JSON.

* Add test.

* Add changelog entry.

(cherry picked from commit d1f383f)
@blakerouse blakerouse added backport review containers Related to containers use case Team:Platforms Label for the Integrations - Platforms team labels Feb 18, 2020
@blakerouse blakerouse merged commit edd9766 into elastic:7.x Feb 18, 2020
@blakerouse blakerouse deleted the backport_16348_7.x branch February 18, 2020 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport containers Related to containers use case review Team:Platforms Label for the Integrations - Platforms team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants