Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: template config reload with environment label
  • Loading branch information
wbollock committed Jul 2, 2025
commit f1ba22103d6b3cd7aeef72b2e9073152fd4f61b4
6 changes: 4 additions & 2 deletions traefik-mixin/alerts/alerts.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
{
alert: 'TraefikConfigReloadFailuresIncreasing',
expr: |||
sum by (%(groupLabels)s) (rate(traefik_config_reloads_failure_total{%(filteringSelector)s}[5m])) > 0
sum by (%(groupLabels)s, environment) (rate(traefik_config_reloads_failure_total{%(filteringSelector)s}[5m])) > 0
||| % $._config,
'for': '5m',
labels: {
severity: 'critical',
} + std.get($._config, 'alertLabels', {}),
annotations: {
summary: 'Traefik is failing to reload its configuration.',
description: 'Traefik is failing to reload its config',
description: |||
Traefik is failing to reload its config in {{ $labels.environment }}.
|||,
} + std.get($._config, 'alertAnnotations', {}),
},
{
Expand Down
2 changes: 1 addition & 1 deletion traefik-mixin/config.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Example:
// filteringSelector: "component=\"traefik\",environment=\"production\"",
// for config reload alert
groupLabels: 'job, environment',
groupLabels: 'job',
// for TLS alerts
instanceLabels: 'instance',
alertLabels: {},
Expand Down
3 changes: 2 additions & 1 deletion traefik-mixin/prometheus_rules_out/prometheus_alerts.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.