Skip to content

Commit 1328088

Browse files
authored
Merge pull request #25 from qonto/fix-prom-alerts
fix(alert): fix sql-exporter is Down alert
2 parents 2845e74 + eb2ec4a commit 1328088

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

charts/prometheus-postgresql-alerts/prometheus_tests/SQLExporterDown.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,19 @@ tests:
2121
summary: "Exporter is down"
2222
description: "SQL Exporter is down"
2323
runbook_url: "https://qonto.github.io/database-monitoring-framework/0.0.0/runbooks/postgresql/SQLExporterDown"
24+
- name: SQLExporterDown
25+
interval: 1m
26+
input_series:
27+
- series: 'up{service="sql-exporter", target=""}'
28+
values: '0x00'
29+
alert_rule_test:
30+
- alertname: SQLExporterDown
31+
eval_time: 5m
32+
exp_alerts:
33+
- exp_labels:
34+
service: sql-exporter
35+
severity: critical
36+
exp_annotations:
37+
summary: "Exporter is down"
38+
description: "SQL Exporter is down"
39+
runbook_url: "https://qonto.github.io/database-monitoring-framework/0.0.0/runbooks/postgresql/SQLExporterDown"

charts/prometheus-postgresql-alerts/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ rulesGroupName: postgresql.rules
1111
rules:
1212

1313
SQLExporterDown:
14-
expr: absent(up{service="sql-exporter", target=""})
14+
expr: absent(up{service="sql-exporter", target=""}) or up{service="sql-exporter", target=""} <1
1515
for: 5m
1616
labels:
1717
severity: critical

0 commit comments

Comments
 (0)