[8.x](backport #41061) Use journald for system module on Debian 12 #41227
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed commit message
This commit adds Debian 12 support to our system module, to support
Debian 12 we need to use the journald input to collect the system
logs.
To support it, a new, internal, input
system-logsis introduced, it is responsiblefor deciding whether the log input or journald must be used. If
var.pathsis definedin the module configuration,
system-logslooks at the files, if any of the globs resolvesto one or more files the
loginput is used, otherwise thejouranldinput is used.This behaviour can be overridden by setting
var.use_journaldorvar.use_files,which will force the use of journald or files.
Other changes:
TESTING_FILEBEAT_FILEPATTERNenvironment variable now is acomma separated list of globs, it defaults to
.log,*.journalChecklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Disruptive User Impact
## Author's ChecklistHow to test this PR locally
Run the tests
Run the system module
Package Filebeat from this PR.
Start the Debian 12 VM, run Filebeat
Ensure data is ingested (datastream
filebeat-9.0.0)Related issues
## Use cases## Screenshots## LogsThis is an automatic backport of pull request #41061 done by [Mergify](https://mergify.com).