Skip to content

Metrics: rule checks log under random container names #8365

Todo

Description

@DavidePrincipi

Steps to reproduce

  • Install an application that ships its own alert rules for the Metrics module, or change its rules, so Metrics checks them. For example, publish a rule in module/<module_id>/metrics_alert_rules and emit the metrics-alert-rules-changed event.
  • Look at the system log of the node that runs Metrics, e.g. journalctl --since -1h _UID=$(id -u metrics1).

Expected behavior

Log lines written while Metrics checks the alert rules carry a fixed log name (syslog identifier), like the other Metrics services, e.g. prometheus.

Actual behavior

Every rule check runs promtool in a new, unnamed container. Podman gives each one a random name, and that name becomes the log name of its output. In one hour, a node with a single application rule set logged under more than 20 different random names:

Nov 24 17:53:41 node1 agitated_lamport[664506]:       (time() - porthos_snapshot_last_timestamp_seconds{__ns8_rule_scope="1",module_id="porthos1"})
... gallant_ardinghelli, wonderful_hellman, xenodochial_black, elastic_edison, festive_khayyam, ...

The Loki log server indexes log names, so the number of indexed values grows with every rule check and never stops. The lines are also hard to find, because they do not carry the Metrics name.

Components

Metrics 1.7.1, core 3.25.1

See also


Reported with Claude Code:claude-opus-5-5 and nethserver-issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions