From 2d482a596df8b48d403efc139b19da5090cf855f Mon Sep 17 00:00:00 2001 From: Itay Grudev Date: Fri, 24 May 2024 23:00:00 +0300 Subject: [PATCH] Bug Fix: CNPGClusterOffline false positives Signed-off-by: Itay Grudev --- charts/cluster/prometheus_rules/cluster-offline.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/cluster/prometheus_rules/cluster-offline.yaml b/charts/cluster/prometheus_rules/cluster-offline.yaml index 6a1e59ddc..aa4dc12ee 100644 --- a/charts/cluster/prometheus_rules/cluster-offline.yaml +++ b/charts/cluster/prometheus_rules/cluster-offline.yaml @@ -10,7 +10,7 @@ annotations: potential service disruption and/or data loss. runbook_url: https://github.com/cloudnative-pg/charts/blob/main/charts/cluster/docs/runbooks/CNPGClusterOffline.md expr: | - ({{ .Values.cluster.instances }} - count(cnpg_collector_up{namespace="{{ .namespace }}",pod=~"{{ .podSelector }}"}) OR vector(0)) > 0 + (count(cnpg_collector_up{namespace="{{ .namespace }}",pod=~"{{ .podSelector }}"}) OR on() vector(0)) == 0 for: 5m labels: severity: critical