-
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
Journald support for System module #41555
Journald support for System module #41555
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
|
I've been doing a comparison test between the system module with journald and log input, and they report a different amount of messages, there are more entries in the log files than in the journal. I did this test on a fresh Debian 11 VM that uses both: jouranld and traditional log files (via rsyslog):
The dashboards seem correctly populated (screenshots in the PR description). I'm still investigating this difference. |
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
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.
any reason for not placing it inside a testdata
folder?
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.
Yes, I placed it where the other test files are. Those are used by the python system tests.
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.
any reason for not placing it inside a testdata
folder?
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.
Yes, I placed it where the other test files are. Those are used by the python system tests.
so, that means the PR isn't yet ready to be merged, right? We don't wanna it to go in unless we're sure we're not loosing logs. Perhaps it should go back to draft? What do you think? |
Anyway I'll test it |
it works. I don't see the map |
@@ -334,6 +334,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] | |||
- Improved Azure Blob Storage input documentation. {pull}41252[41252] | |||
- Make ETW input GA. {pull}41389[41389] | |||
- Add support for Okta entity analytics provider to collect role and factor data for users. {pull}41460[41460] | |||
- Add support for Journald in the System module. {pull}41555[41555] |
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'm not sure where it needs to be placed, but if there is a difference between he number of logs collected between journald and the log input it might be good to have it documented somewhere.
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.
We're already collecting all the journald logs, to me the difference in the number of logs from journald and the files is a OS detail, also some OSes only use jouranld, which makes comparing impossible unless something like rsyslog
is installed and setup to generate the log files.
we had a call, the journald input consumes all the logs on journald, so I don't see it as a blocker here |
It's ready for review. I've investigated more and the system module can ingest without errors all logs in the journal, so any difference in the amount of logs available is at the OS level, outside of the scope of this PR. If needed, I could dig deeper to understand the difference. Let me know if you, or any other reviewer, believes it's necessary. |
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 don't see https://github.com/elastic/beats/pull/41555/files#r1842419453 as a blocker. We just need to check if we need to add any doc explaining the difference between the log input and journald. Also the whole point is to be able to have the system module on systems where there is only journald, so, again not a blocker
No, I don't. |
This pull request is now in conflicts. Could you fix it? 🙏
|
This commit adds journald support for the System module, both filesets now have a `use_journald` variable that can be set to force using Journald to ingest syslog and auth logs. The ingest pipelines are updated, now there is an entrypoint pipeline that selects the correct one according to the field `input.type`. System tests are also added. (cherry picked from commit f4b80fd)
This commit adds journald support for the System module, both filesets now have a `use_journald` variable that can be set to force using Journald to ingest syslog and auth logs. The ingest pipelines are updated, now there is an entrypoint pipeline that selects the correct one according to the field `input.type`. System tests are also added. (cherry picked from commit f4b80fd) Co-authored-by: Tiago Queiroz <[email protected]>
Proposed commit message
This commit adds journald support for the System module, both filesets now have a
use_journald
variablethat can be set to force using Journald to ingest syslog and auth logs.
The ingest pipelines are updated, now there is an entrypoint pipeline that selects the correct one according to the field
input.type
.System tests are also added.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.## Disruptive User ImpactAuthor's Checklist
How to test this PR locally
./filebeat modules enable system
), setvar.use_journald: true
for both filesets (editmodules.d/system.yml
)./filebeat setup --modules system
(this requires Kibana credentials correctly set)filebeat-*
data view, filter byevent.dataset: system.syslog
orevent.dataset: system.auth
, ensure the logs are correctly ingestedRelated issues
## Use casesScreenshots
Dashboards, journald and logs side by side
Events, journald and logs side by side