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

Remove timezone conditionals from pipeline template #12253

Merged

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented May 23, 2019

Some filebeat modules can optionally convert timezones, this option
works by:

  • Adding a field with the timezone to the generated events
  • Conditionally adding the timezone to the date processor in the ingest
    pipeline when installed

This results in two possible pipelines, that are going to depend on the
configuration used on setup. This is problematic because doesn't allow
multiple beats to have different settings, and is also problematic when
users want to change the setting, as the pipeline needs to be installed
again.

This change removes the condition from the template, and adds an
additional date processor that uses the timezone only if this value is
available. This way the installed pipeline is always the same, can be
used with filebeats with different configurations and doesn't need to be
updated if the setting changes in filebeat.

To be applied in other modules too if approved.

Some filebeat modules can optionally convert timezones, this option
works by:
* Adding a field with the timezone to the generated events
* Conditionally adding the timezone to the date processor in the ingest
  pipeline when installed

This results in two possible pipelines, that are going to depend on the
configuration used on setup. This is problematic because doesn't allow
multiple beats to have different settings, and is also problematic when
users want to change the setting, as the pipeline needs to be installed
again.

This change removes the condition from the template, and adds an
additional date processor that uses the timezone only if this value is
available. This way the installed pipeline is always the same, can be
used with filebeats with different configurations and doesn't need to be
updated if the setting changes in filebeat.
@jsoriano jsoriano added review [zube]: In Review Team:Integrations Label for the Integrations team labels May 23, 2019
@jsoriano jsoriano requested a review from a team as a code owner May 23, 2019 09:24
Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

++ on this approach. We should apply this to all conditions we have in the pipelines if possible.

I wonder if this deserves a changelog entry as in case someone had it disabled but has the field, it would do processing now. I would argue this is expected and would even fix some deployments which were broken before.

filebeat/module/system/syslog/ingest/pipeline.json Outdated Show resolved Hide resolved
@jsoriano jsoriano requested a review from a team as a code owner May 23, 2019 12:35
Copy link
Contributor

@ruflin ruflin left a comment

Choose a reason for hiding this comment

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

@jsoriano WDYT about the changelog?

filebeat/module/system/syslog/ingest/pipeline.json Outdated Show resolved Hide resolved
filebeat/fileset/fileset_test.go Show resolved Hide resolved
@jsoriano jsoriano force-pushed the convert-timezone-conditional-template branch from 5ee73a6 to 7a5c920 Compare May 24, 2019 10:08
@exekias
Copy link
Contributor

exekias commented May 24, 2019

This is great @jsoriano! This would allow us to close #11858 and similar

@jsoriano jsoriano self-assigned this May 28, 2019
@jsoriano jsoriano merged commit b733788 into elastic:master May 28, 2019
@jsoriano jsoriano deleted the convert-timezone-conditional-template branch May 28, 2019 11:00
jsoriano added a commit to jsoriano/beats that referenced this pull request May 28, 2019
jsoriano added a commit that referenced this pull request May 29, 2019
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.

5 participants