[8.18](backport #46682) [Filebeat/Journald] Add support for watching folders #46715
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
I have made corresponding changes to the documentationI have made corresponding change to the default configuration filesCHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.## Disruptive User Impact## Author's ChecklistHow to test this PR locally
Testing in Kubernetes to ingest node logs
Start a Kind cluster
Deploy the Elastic Stack, make sure it will be accessible from inside the Kind cluster
I use my own fork of
elastic-package
to bind on all interfaces.Build Filebeat docker image
Load the image into your Kind cluster
Deploy Filebeat reading from
/run/log/journal
Note that the journald configuration points to the folder
/run/log/journal
filebeat-kubernetes.yaml
Ensure the logs are coming in in Kibana
filebeat-9.2.0
Using journal files
Decompress all
journal?.journal.gz
files and prepare the destination folderStart Filebeat with the following configuration
filebeat.yaml
Start monitoring the stats endpoint for published events
You will see a JSON like:
Keep an eye in the
done
counter, that's the number of published events.Move the first journal file to
/tmp/journald
and wait until all events are publishedWait untill the
done
counter is 10.Repeat the process for the other two journal files
There are 10 entries in each file, so at the end of the test, there should be 30 published files.
Related issues
## Use cases## Screenshots## LogsThis is an automatic backport of pull request #46682 done by [Mergify](https://mergify.com).