@cryptotaxi247 / infra / commits / 77bb22c3

prometheus: Catch false positive on domain expiry

Also add an alert when a whois query fails for more than three hours.

Dionysis Grigoropoulos committed Mar 14, 2025 at 19:14 UTC 77bb22c32915b5fdfc77ca25a9afa5f5c9cd2b7d
1 file changed +8 -1
build/pluto/prometheus/exporters/domain.nix
+8 -1
@@ -44,11 +44,18 @@
44 rules = [
45 {
46 alert = "DomainExpiry";
47 - expr = "domain_expiry_days < 30";
47 + expr = "domain_expiry_days != -1 and domain_expiry_days < 30";
48 for = "1h";
49 labels.severity = "warning";
50 annotations.summary = "Domain {{ $labels.domain }} will expire in less than 30 days";
51 }
52 + {
53 + alert = "DomainProbeFailure";
54 + expr = "domain_probe_success == 0";
55 + for = "3h";
56 + labels.severity = "warning";
57 + annotations.summary = "Domain {{ $labels.domain }} probe failing for more than 3 hours.";
58 + }
59 ];
60 }
61 ];