From 26df6caf217451b55f34efddacad165e38fd2cb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20He=C3=9Felmann?= Date: Sun, 27 Aug 2023 16:01:47 +0200 Subject: [PATCH] refactor(metrics): use prom bool comparison --- resources/prometheus/prometheus-rules.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/prometheus/prometheus-rules.yaml b/resources/prometheus/prometheus-rules.yaml index ca41ec24..0c9c2533 100644 --- a/resources/prometheus/prometheus-rules.yaml +++ b/resources/prometheus/prometheus-rules.yaml @@ -412,8 +412,8 @@ spec: # We keep the `namespace` and `rhacs_instance_id` labels to be consistent with other SLI metrics and for # reference in dashboards. - expr: | - sum by (namespace, rhacs_instance_id) ( - floor (central:success_rate10m + 0.35) + max by (namespace, rhacs_instance_id) ( + central:success_rate10m > bool 0.65 ) or on (namespace, rhacs_instance_id) central:sli:pod_ready record: central:sli:error_rate