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

Allowing users to override pipeline ID in fileset input config #16561

Merged
merged 3 commits into from
Mar 4, 2020

Conversation

ycombinator
Copy link
Contributor

@ycombinator ycombinator commented Feb 25, 2020

What does this PR do?

This PR allows users to override the ingest pipeline for a fileset with their custom one. To do this, users must specify the pipeline configuration option (common to all Filebeat inputs) in their fileset configuration's input section. For example:

- module: nginx
  # Access logs
  access:
    enabled: true
    input:
      pipeline: my-custom-pipeline

Why is it important?

Allows users to perform custom processing instead of the default processing provided by the ingest pipelines that come out-of-the-box with module filesets.

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

Related issues

Use cases

See https://discuss.elastic.co/t/filebeat-cannot-change-pipeline-in-nginx-module/219360.

@ycombinator ycombinator requested review from ph and a team February 25, 2020 15:36
@ycombinator ycombinator added review Team:Integrations Label for the Integrations team enhancement Filebeat Filebeat needs_backport PR is waiting to be backported to other branches. v7.7.0 v8.0.0 [zube]: In Review labels Feb 25, 2020
@ycombinator
Copy link
Contributor Author

jenkins, test this

input map[string]interface{}
expectedFn require.ValueAssertionFunc
}{
"close_eof": {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

Copy link
Contributor

@sayden sayden left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@kaiyan-sheng kaiyan-sheng left a comment

Choose a reason for hiding this comment

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

maybe a changelog?

@ycombinator
Copy link
Contributor Author

CI failures are unrelated and also seen on master. Merging.

@ycombinator ycombinator removed the needs_backport PR is waiting to be backported to other branches. label Mar 4, 2020
ycombinator added a commit that referenced this pull request Mar 6, 2020
…16561) (#16788)

* Allowing users to override pipeline ID in fileset input config (#16561)

* Allowing users to override pipeline ID in module input config

* Removing redundant assertion

* Adding CHANGELOG entry

* Cleaning up CHANGELOG
@ycombinator ycombinator deleted the fb-mod-custom-pipeline branch March 18, 2020 11:56
@eedugon
Copy link
Contributor

eedugon commented Jul 3, 2020

@ycombinator : do we have this possibility explained and showed in any public doc? I haven't been able to find it.

@ycombinator
Copy link
Contributor Author

@eedugon We don't have a document specifically showing this option because it's just another input setting that can be overridden. We have this document that shows how to override input settings in general for any module: https://www.elastic.co/guide/en/beats/filebeat/master/advanced-settings.html#advanced-settings. And if you look at the settings under any input, pipeline is one of the settings common to all inputs: https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-log.html#_pipeline_7.

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.

Module should allow to override the pipeline id
5 participants