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.
Checklist
[x] My code follows the style guidelines of this project
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] I have made corresponding change to the default configuration files
[x] I have added tests that prove my fix is effective or that my feature works
[x] I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.
## Disruptive User Impact
Author's Checklist
[x] Ensure the journald input is ingesting data correctly
How to test this PR locally
Package Filebeat from this PR
Configure the ES output and Kibana credentials
Enable the system module (./filebeat modules enable system), set var.use_journald: true for both filesets (edit modules.d/system.yml)
Setup the assets: ./filebeat setup --modules system (this requires Kibana credentials correctly set)
Run Filebeat as root
Look at the logs in the filebeat-* data view, filter by event.dataset: system.syslog or event.dataset: system.auth, ensure the logs are correctly ingested
Look at the system module dashboards, ensure they're working/show data.
Proposed commit message
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.
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
![2024-11-08_10-54](https://github.com/user-attachments/assets/fa0c746a-1331-4ad1-86cd-bae0ec4d18fd) ![2024-11-08_10-54_1](https://github.com/user-attachments/assets/7eb221ee-d6f9-441f-938a-84d8d8118591) ![2024-11-08_10-55](https://github.com/user-attachments/assets/b0b8a554-8140-43f9-af14-4e18b1e3152a) ![2024-11-08_10-55_1](https://github.com/user-attachments/assets/b4f96dab-c634-4525-9d32-cba4f859b389)
Events, journald and logs side by side
![2024-11-08_10-59](https://github.com/user-attachments/assets/986e4f0e-4c1b-4672-9e58-f6fa22a199bd)
## LogsThis is an automatic backport of pull request #41555 done by Mergify.