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
docs: match new var names
  • Loading branch information
wbollock committed Jul 2, 2025
commit 0a440a61e3991b0b10f08c5772248ceb8840d392
22 changes: 17 additions & 5 deletions traefik-mixin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,32 @@ The following Prometheus alerts are included:

## Configuration

You can configure alert thresholds and labels in `config.libsonnet`:
You can configure alert thresholds, selectors, and labels in `config.libsonnet`:

```jsonnet
{
_config+:: {
traefik_tls_expiry_days_critical: 7, // critical threshold (days)
traefik_tls_expiry_days_warning: 14, // warning threshold (days)
filteringSelector: '', // optional metric label selector for all alerts
// Example:
// filteringSelector: "component=\"traefik\",environment=\"production\"",
groupLabels: 'job, environment', // for config reload alert (sum by)
instanceLabels: 'instance', // for TLS alerts (max by)
alertLabels: {}, // optional alert labels
// Example:
// alertLabels: {
// environment: 'production',
// component: 'traefik',
// },
alertAnnotations: {}, // optional alert annotations
timeSeriesLabels: "component=\"traefik\",environment=\"production\"", // optional time series labels
sumByLabels: "instance", // optional sum by labels
maxByLabels: "sans", // optional max by labels
// Example:
// alertAnnotations: {
// runbook: 'https://runbooks.example.com/traefik-tls',
// grafana: 'https://grafana.example.com/d/traefik',
// },
},
}
```

For more advanced uses of mixins, see https://github.com/monitoring-mixins/docs.
For more advanced uses of mixins, see [monitoring-mixins/docs](https://github.com/monitoring-mixins/docs).
3 changes: 0 additions & 3 deletions traefik-mixin/alerts/alerts.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
{
name: 'traefik',
rules: [
// TraefikConfigReloadFailuresIncreasing
{
alert: 'TraefikConfigReloadFailuresIncreasing',
expr: |||
Expand All @@ -18,7 +17,6 @@
description: 'Traefik is failing to reload its config',
} + std.get($._config, 'alertAnnotations', {}),
},
// TraefikTLSCertificatesExpiring (critical)
{
alert: 'TraefikTLSCertificatesExpiring',
expr: |||
Expand All @@ -34,7 +32,6 @@
||| % $._config,
} + std.get($._config, 'alertAnnotations', {}),
},
// TraefikTLSCertificatesExpiring (warning)
{
alert: 'TraefikTLSCertificatesExpiringSoon',
expr: |||
Expand Down