-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add more filtering options to journald input #29294
Add more filtering options to journald input #29294
Conversation
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
This pull request does not have a backport label. Could you fix it @kvch? 🙏
NOTE: |
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
Co-authored-by: Tiago Queiroz <contato@tiago.eti.br>
Co-authored-by: Tiago Queiroz <contato@tiago.eti.br>
Co-authored-by: Tiago Queiroz <contato@tiago.eti.br>
Co-authored-by: Andrew Kroh <andrew.kroh@elastic.co>
This comment has been minimized.
This comment has been minimized.
WDYT about doing this in a way to allows the old configs to continue to work:
Like if |
This pull request is now in conflicts. Could you fix it? 🙏
|
…journald-filtering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I selected the wrong option
This pull request is now in conflicts. Could you fix it? 🙏
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great, just need to solve the merge conflicts.
coreDumpMsgID = MustBuildMatcher("message_id=fc2e22bc6ee647b6b90729ab34a250b1") | ||
journaldUID = MustBuildMatcher("journald.uid=0") | ||
journaldPID = MustBuildMatcher("journald.pid=1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the comment you added to ApplyUnitMatchers
, however I think it could also be added here, so they don't look like magic strings to the reader.
Anyway, it's not a blocker ;)
Hi @kvch We need details around Acceptance Criteria here, so that we can validate same. As of now, I Have gone through Filebeat.yml file and could not find any updates or reference entries regarding journald been included under Filebeat from 8.0. Could you please help us with more details here. Thanks |
What does this PR do?
This PR adds support for
unit
,transports
andsyslog_identifiers
options for filtering.This PR also introduces a breaking change to
include_matches
option. From now on it does not accept a list of expressions. Now both conjunction (AND) and disjunctions (OR) are supported when applying matches to journals.Collecting entries of two different units:
Collecting entries using syslog transport for a unit
Although the configuration lets you write complex expressions, systemd does not provide full logical expression support.
Why is it important?
When this change merged, journald input can be marked either beta or GA. Furthermore, now it provides similar filtering capabilities as the good old community Journalbeat did.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Related issues
Supersedes #10985