blackbox-exporter: create http unreachable alerting rule
And normalize time until we fire blackbox alerts at 15 minutes.
Martin Weinelt committed
Jan 6, 2025 at 01:50 UTC
0c2390982feb2d85064c19f5dee4363ac0af9208
1 file changed
+13
-2
build/pluto/prometheus/exporters/blackbox.nix
+13
-2
@@ -72,11 +72,22 @@ in
72
rules = [
73
{
74
alert = "CertificateExpiry";
75
- expr = "probe_ssl_earliest_cert_expiry - time() < 86400 * 14";
76
- for = "10m";
75
+ expr = ''
76
+ probe_ssl_earliest_cert_expiry - time() < 86400 * 14
77
+ '';
78
+ for = "15m";
79
labels.severity = "warning";
80
annotations.summary = "Certificate for {{ $labels.instance }} is expiring soon.";
81
}
82
+ {
83
+ alert = "HttpUnreachable";
84
+ expr = ''
85
+ probe_success{job="blackbox-https_success"} == 0
86
+ '';
87
+ for = "15m";
88
+ labels.severity = "warning";
89
+ annotations.summary = "Endpoint {{ $labels.instance }} is unreachable";
90
+ }
91
];
92
}
93
];