From 9041f52b05dddaf7873f472becfdd1caea6b6408 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sun, 19 Apr 2026 22:15:55 +0000 Subject: [PATCH] =?UTF-8?q?monitoring:=20TechnitiumZoneCountMismatch=20?= =?UTF-8?q?=E2=80=94=20compare=20replicas=20only,=20exclude=20primary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Primary has only the Primary-type zones it owns (10). Replicas have those + built-in zones (localhost, in-addr.arpa reverse, etc.), so their count (14) can never match primary. Alert expr compared max-min across all instances, making it chronically firing. Fix: instance!="primary" filter. The real signal this alert wants is "did one replica drift from the others" — replica-to-replica comparison captures that; primary was never comparable. --- .../monitoring/modules/monitoring/prometheus_chart_values.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stacks/monitoring/modules/monitoring/prometheus_chart_values.tpl b/stacks/monitoring/modules/monitoring/prometheus_chart_values.tpl index d2508949..8142727f 100755 --- a/stacks/monitoring/modules/monitoring/prometheus_chart_values.tpl +++ b/stacks/monitoring/modules/monitoring/prometheus_chart_values.tpl @@ -1980,7 +1980,7 @@ serverFiles: annotations: summary: "Technitium zone-sync has not run successfully in >1h (last: {{ $value | humanizeDuration }} ago)" - alert: TechnitiumZoneCountMismatch - expr: (max(technitium_zone_count) - min(technitium_zone_count)) > 0 + expr: (max(technitium_zone_count{instance!="primary"}) - min(technitium_zone_count{instance!="primary"})) > 0 for: 15m labels: severity: warning