We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to override two alerts with the same name (see https://awesome-prometheus-alerts.grep.to/rules#rule-blackbox-1-5 and https://awesome-prometheus-alerts.grep.to/rules#rule-blackbox-1-6). I don't know how I would approach/deal with this anyhow, but I still wanted to report this issue, don't know if there could be a solution to it.
❯ cat bug-multiple-alerts-with-same-name.rules --- groups: - name: multiple_alerts_with_same_name rules: - alert: BlackboxSslCertificateWillExpireSoon expr: 'probe_ssl_earliest_cert_expiry - time() < 86400 * 30' for: 0m labels: severity: warning annotations: summary: Blackbox SSL certificate will expire soon (instance {{ $labels.instance }}) description: "SSL certificate expires in 30 days\n VALUE = {{ $value }}\n \ \ LABELS = {{ $labels }}" - alert: BlackboxSslCertificateWillExpireSoon expr: 'probe_ssl_earliest_cert_expiry - time() < 86400 * 3' for: 0m labels: severity: critical annotations: summary: Blackbox SSL certificate will expire soon (instance {{ $labels.instance }}) description: "SSL certificate expires in 3 days\n VALUE = {{ $value }}\n LABELS\ \ = {{ $labels }}" - alert: BlackboxSslCertificateWillExpireSoon_override override: ["BlackboxSslCertificateWillExpireSoon"] expr: 'probe_ssl_earliest_cert_expiry - time() < 86400 * 3' for: 5m labels: severity: critical annotations: summary: Blackbox SSL certificate will expire soon (instance {{ $labels.instance }}) description: "SSL certificate expires in 3 days\n VALUE = {{ $value }}\n LABELS\ \ = {{ $labels }}"
❯ prometheus-alert-overrider bug-multiple-alerts-with-same-name.rules panic: runtime error: index out of range [0] with length 0 goroutine 1 [running]: main.extractFilterExpressions({0xc0000f8380, 0x33}) /home/varac/projects/monitoring/prometheus/alerts/prometheus-alert-overrider/main.go:119 +0x68 main.NegateFilterExpression({0xc0000f8380?, 0x517214?}) /home/varac/projects/monitoring/prometheus/alerts/prometheus-alert-overrider/main.go:144 +0x25 main.AlertFile.Override({{0xc0000a0a80?, 0xc00004c670?, 0xc000093f70?}}, {{0xc0000b4120, 0x2d}, {0x0, 0x0}, {0xc0000f8380, 0x33}, {0xc0000c86b0, ...}, ...}) /home/varac/projects/monitoring/prometheus/alerts/prometheus-alert-overrider/main.go:92 +0x2ae main.main() /home/varac/projects/monitoring/prometheus/alerts/prometheus-alert-overrider/main.go:224 +0x4a5
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm trying to override two alerts with the same name (see https://awesome-prometheus-alerts.grep.to/rules#rule-blackbox-1-5 and https://awesome-prometheus-alerts.grep.to/rules#rule-blackbox-1-6).
I don't know how I would approach/deal with this anyhow, but I still wanted to report this issue, don't know if there could be a solution to it.
The text was updated successfully, but these errors were encountered: