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

in_systemd: treat multiple filters as ANDs, not ORs #588

Merged
merged 1 commit into from
May 21, 2018

Conversation

mikekap
Copy link
Contributor

@mikekap mikekap commented May 13, 2018

The docs seems to point to these being ANDs. You can always use multiple inputs to create ORs.

@edsiper
Copy link
Member

edsiper commented May 18, 2018

thanks for raising this.

I think we should not change the default behavior that it have as of now, otherwise we would break "a lot" of systems running Fluent Bit, what I propose is the following:

  • new configuration keys:
    • systemd_filter: use disjunction (to avoid break production systems)
    • systemd_filter_and: use conjunction
    • systemd_filter_or: use disjunction

@edsiper edsiper self-assigned this May 18, 2018
@edsiper edsiper added the waiting-for-user Waiting for more information, tests or requested changes label May 18, 2018
The docs seems to point to these being ANDs. You can always use multiple inputs to create ORs.

Signed-off-by: Mike Kaplinskiy <[email protected]>
@mikekap
Copy link
Contributor Author

mikekap commented May 21, 2018

Hmm sure - we can make this backwards compatible. My concern with your suggestion was that in theory you could use both systemd_filter_and and systemd_filter_or. Technically the C API supports that - but I didn't want to give folks an ability to make their filters indecipherable (there is some idea of precedence order - it scared me).

As an alternative I added systemd_filter_type that can be and or or. How does this version look? If you'd prefer the 3-option approach you suggested before - let me know and I'll switch to that. I might make it an exclusive set though.

@edsiper edsiper merged commit a71d3b8 into fluent:master May 21, 2018
@edsiper
Copy link
Member

edsiper commented May 21, 2018

I liked that approach, thanks for the PR.

rawahars pushed a commit to rawahars/fluent-bit that referenced this pull request Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting-for-user Waiting for more information, tests or requested changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants