logging: prevent stalls on rotated journald entries#1712
Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom Jan 27, 2026
Merged
logging: prevent stalls on rotated journald entries#1712brianmcgillion merged 1 commit intotiiuae:mainfrom
brianmcgillion merged 1 commit intotiiuae:mainfrom
Conversation
- Fix journal access after rotation (tmpfiles + alloy supplementary groups). - Drop old log entries on admin-vm to keep ingestion moving. Signed-off-by: Everton de Matos <everton.dematos@tii.ae>
vunnyso
reviewed
Jan 27, 2026
vunnyso
approved these changes
Jan 27, 2026
brianmcgillion
approved these changes
Jan 27, 2026
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.
Description of Changes
This PR addresses cases where log forwarding could stall after journald rotation, resulting in no logs being sent to Grafana.
Fix journal access after rotation by enforcing persistent journal directory permissions via
systemd-tmpfilesand adding requiredSupplementaryGroups(systemd-journal,adm) to the Alloy service - as peerlokidocumentation https://grafana.com/docs/alloy/latest/reference/components/loki/loki.source.journal/Limit replay of stale journald entries by setting
max_age = "168h"on journal sources to avoid forwarding very old logs.Add batching and timeout tuning (
batch_size,max_backoff_period,remote_timeout) to improve resilience when the remote Loki endpoint is slow or unavailable, helping prevent pipeline stalls.Introduce a short
older_than = "15m"drop window for specific processing stages to keep ingestion moving under current remote Grafana/Loki constraints.Type of Change
Related Issues / Tickets
https://jira.tii.ae/browse/SSRCSP-7612
Checklist
make-checksand it passesTesting Instructions
Applicable Targets
aarch64aarch64x86_64x86_64x86_64Installation Method
nixos-rebuild ... switchTest Steps To Verify: