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
belimawr
left a comment
There was a problem hiding this comment.
Oops, I selected the wrong option
|
This pull request is now in conflicts. Could you fix it? 🙏 |
belimawr
left a comment
There was a problem hiding this comment.
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.
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,transportsandsyslog_identifiersoptions for filtering.This PR also introduces a breaking change to
include_matchesoption. 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.asciidocorCHANGELOG-developer.next.asciidoc.Related issues
Supersedes #10985