From 95a88ee0b563f6882e4a4d909cdc3740490a06b1 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Sun, 18 Dec 2022 13:03:28 +0000
Subject: [PATCH] Add probe:probe_success:max retention

Rule that looks at a probe success ignoring failed prober_hosts.
---
 .../templates/rules/rules_base.conf.yml                       | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/roles/float-infra-prometheus/templates/rules/rules_base.conf.yml b/roles/float-infra-prometheus/templates/rules/rules_base.conf.yml
index c7df0691..bb20fb70 100644
--- a/roles/float-infra-prometheus/templates/rules/rules_base.conf.yml
+++ b/roles/float-infra-prometheus/templates/rules/rules_base.conf.yml
@@ -31,6 +31,10 @@ groups:
       - record: probe:probe_success:ratio
         expr: probe:probe_success:sum / probe:probe_success:count
 
+      # Separate SLI-oriented metric that looks at success across prober hosts.
+      - record: probe:probe_success:max
+        expr: max(probe_success) without (job,instance,prober_host,host)
+
       # Special metric for the ping probe.
       # The 'bool' qualifier makes the greater-than operation not act as a filter.
       - record: host_reachable
-- 
GitLab