[Filebeat/Journald] Enable reading from all journals#46722
Merged
belimawr merged 8 commits intoelastic:mainfrom Sep 24, 2025
Merged
[Filebeat/Journald] Enable reading from all journals#46722belimawr merged 8 commits intoelastic:mainfrom
belimawr merged 8 commits intoelastic:mainfrom
Conversation
This commit adds the `merge` option to the Journald configuration, when enabled, it passes the `--merge` flag to `journalctl`, which enables reading from all journals, including remote ones.
Contributor
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Contributor
|
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Contributor
🔍 Preview links for changed docs |
Contributor
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
Co-authored-by: Visha Angelova <91186315+vishaangelova@users.noreply.github.com>
rdner
reviewed
Sep 23, 2025
Member
rdner
left a comment
There was a problem hiding this comment.
We should document and implement version constraints from the official journalctl documentation.
rdner
approved these changes
Sep 24, 2025
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.## Disruptive User Impact## Author's ChecklistHow to test this PR locally
Option 1: ensure
--mergeis added when callingjournalctlThat is the easiest way to test, run Filebeat with the following configuration:
filebeat.yaml
The following command will print only a few keys from the logs, making it easier to read them
Ensure
--mergeis in thejournalctlcommand, you should see the following log messageOption 2: Setup
systemd-journal-remoteandsystemd-journal-uploadusing VMsThe easiest way to test this is follow this tutorial to easily setup one VM sending journal logs to another. You'll need at least 2 VMs:
Once you have setup both (or more) VMs follow those steps to test Filebeat. All commands must be executed as root.
Deploy the Elastic Stack, make sure it will be accessible from inside the Kind cluster
I use my own fork of
elastic-packageto bind on all interfaces.Ensure the logs from VM2 are being shipped to VM1:
In VM1 run (it will block):
Then in VM2 run:
This will log to the journal, you should see the message appearing in VM1
Deploy Filebeat
Run Filebeat with the following configuration, adjust the output settings to your environment
Details
Generate some logs in both VMs:
echo "bla bla bla" | systemd-cat. Or use anyother message. Anything you send to the standard input of
systemd-catwill end up in journal logsEnsure the logs are coming in in Kibana
filebeat-9.2.0host.hostname,you'll see the different machine's hostname there.
Related issues
## Use cases## Screenshots## Logs