From f1f631de6303cfaeaf1f7055d00ad02c38fb4aa1 Mon Sep 17 00:00:00 2001 From: Jamison Lofthouse Date: Wed, 10 Aug 2022 16:01:04 -0700 Subject: [PATCH] monitoring: fix pool growth warning grouping Predict linear will continue to predict on exporter data from old pods. We can take the max value for every hour in the 2 day window before we linearly predict to get the most conservative estimate. This will only affect the hour in which a new mgr pod is started. Fixes #10691 Signed-off-by: Jamison Lofthouse (cherry picked from commit f553034351b81f6e2e83d7b61f24ff21c12a5d4e) --- deploy/charts/rook-ceph-cluster/prometheus/localrules.yaml | 2 +- deploy/examples/monitoring/localrules.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/charts/rook-ceph-cluster/prometheus/localrules.yaml b/deploy/charts/rook-ceph-cluster/prometheus/localrules.yaml index e7c749ce3..8f92b0519 100644 --- a/deploy/charts/rook-ceph-cluster/prometheus/localrules.yaml +++ b/deploy/charts/rook-ceph-cluster/prometheus/localrules.yaml @@ -727,7 +727,7 @@ groups: rules: - alert: CephPoolGrowthWarning expr: | - (predict_linear(ceph_pool_percent_used[2d], 3600 * 24 * 5) * on(pool_id) + (predict_linear((max(ceph_pool_percent_used) without (pod, instance))[2d:1h], 3600 * 24 * 5) * on(pool_id) group_right ceph_pool_metadata) >= 95 labels: severity: warning diff --git a/deploy/examples/monitoring/localrules.yaml b/deploy/examples/monitoring/localrules.yaml index 75a8fc73d..bc271b8b6 100644 --- a/deploy/examples/monitoring/localrules.yaml +++ b/deploy/examples/monitoring/localrules.yaml @@ -735,7 +735,7 @@ spec: rules: - alert: CephPoolGrowthWarning expr: | - (predict_linear(ceph_pool_percent_used[2d], 3600 * 24 * 5) * on(pool_id) + (predict_linear((max(ceph_pool_percent_used) without (pod, instance))[2d:1h], 3600 * 24 * 5) * on(pool_id) group_right ceph_pool_metadata) >= 95 labels: severity: warning