Repository navigation
fix: stop logging promtool runs to journald - #124
Merged
Merged
Conversation
Each alert rule check starts promtool in a new unnamed container. With the default journald log driver, its output was copied to the journal under the random container name, so the log server indexed a new log name at every check. The caller already captures promtool output and reports errors, so disable the container log driver for these runs. Assisted-by: Claude Code:claude-opus-5-5
gsanchietti
approved these changes
Dec 2, 2026
gsanchietti
pushed a commit
that referenced
this pull request
Dec 2, 2026
Each alert rule check starts promtool in a new unnamed container. With the default journald log driver, its output was copied to the journal under the random container name, so the log server indexed a new log name at every check. The caller already captures promtool output and reports errors, so disable the container log driver for these runs. Assisted-by: Claude Code:claude-opus-5-5
gsanchietti
pushed a commit
that referenced
this pull request
Dec 2, 2026
Each alert rule check starts promtool in a new unnamed container. With the default journald log driver, its output was copied to the journal under the random container name, so the log server indexed a new log name at every check. The caller already captures promtool output and reports errors, so disable the container log driver for these runs. Assisted-by: Claude Code:claude-opus-5-5
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.
Every time Metrics checks the alert rules of an application, it runs
promtoolin a new, unnamed container. The container output was also copied to the system log under the random container name, so the Loki log server indexed a new log name at every check, and the lines were hard to find. NethServer/dev#8365The container log copy is now disabled for these
promtoolruns. Nothing else changes: the script still reads thepromtooloutput directly, and rule errors are still logged by Prometheus provisioning as before.How to test
module/<module_id>/metrics_alert_rulesand emit themetrics-alert-rules-changedevent, or install an application that ships one, like Porthos.rules.d/and loaded by Prometheus.journalctl --since -10min _UID=$(id -u metrics1)shows no lines under random container names.See also
Generated by Claude Code:claude-opus-5-5 with nethserver-pr