Skip to content

Commit abd31e5

Browse files
committed
prom alerts - replace bucket capacity alerts with BS capacity alert
Signed-off-by: Amit Prinz Setter <alphaprinz@gmail.com>
1 parent a351ab6 commit abd31e5

File tree

2 files changed

+11
-37
lines changed

2 files changed

+11
-37
lines changed

deploy/internal/prometheus-rules.yaml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -158,27 +158,14 @@ spec:
158158
for: 5m
159159
labels:
160160
severity: warning
161-
- alert: NooBaaBucketLowCapacityState
161+
- alert: NooBaaBackingStoreLowCapacityState
162162
annotations:
163-
description: A NooBaa bucket {{ $labels.bucket_name }} is using {{ printf
164-
"%0.0f" $value }}% of its capacity
165-
message: A NooBaa Bucket Is In Low Capacity State
166-
severity_level: warning
167-
storage_type: NooBaa
168-
expr: |
169-
NooBaa_bucket_capacity{bucket_name=~".*"} > 80
170-
for: 5m
171-
labels:
172-
severity: warning
173-
- alert: NooBaaBucketNoCapacityState
174-
annotations:
175-
description: A NooBaa bucket {{ $labels.bucket_name }} is using all of its
176-
capacity
177-
message: A NooBaa Bucket Is In No Capacity State
163+
description: A NooBaa backing store {{ $labels.backing_store_name }} is in low capacity.
164+
message: A NooBaa backing store is in low capacity state.
178165
severity_level: warning
179166
storage_type: NooBaa
180167
expr: |
181-
NooBaa_bucket_capacity{bucket_name=~".*"} > 95
168+
NooBaa_backing_store_low_capacity{resource_name=~".*"} == 1
182169
for: 5m
183170
labels:
184171
severity: warning

pkg/bundle/deploy.go

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4695,16 +4695,16 @@ spec:
46954695
secretName: AGENT_CONFIG_SECRET_NAME
46964696
`
46974697

4698-
const Sha256_deploy_internal_prometheus_rules_yaml = "9dba8cfe7b655d3467b091531c95e6d34e8bd179f36ece6eaf3cff8ef73df23d"
4698+
const Sha256_deploy_internal_prometheus_rules_yaml = "1c332a4c46ac1d12bc87694ee740dbdffca16d7576aa0df1be9876b04937d077"
46994699

47004700
const File_deploy_internal_prometheus_rules_yaml = `apiVersion: monitoring.coreos.com/v1
47014701
kind: PrometheusRule
47024702
metadata:
47034703
labels:
47044704
prometheus: k8s
47054705
role: alert-rules
4706-
name: prometheus-noobaa-rules
4707-
namespace: default
4706+
name: noobaa-prometheus-rules
4707+
namespace: openshift-storage
47084708
spec:
47094709
groups:
47104710
- name: noobaa-telemeter.rules
@@ -4857,27 +4857,14 @@ spec:
48574857
for: 5m
48584858
labels:
48594859
severity: warning
4860-
- alert: NooBaaBucketLowCapacityState
4861-
annotations:
4862-
description: A NooBaa bucket {{ $labels.bucket_name }} is using {{ printf
4863-
"%0.0f" $value }}% of its capacity
4864-
message: A NooBaa Bucket Is In Low Capacity State
4865-
severity_level: warning
4866-
storage_type: NooBaa
4867-
expr: |
4868-
NooBaa_bucket_capacity{bucket_name=~".*"} > 80
4869-
for: 5m
4870-
labels:
4871-
severity: warning
4872-
- alert: NooBaaBucketNoCapacityState
4860+
- alert: NooBaaBackingStoreLowCapacityState
48734861
annotations:
4874-
description: A NooBaa bucket {{ $labels.bucket_name }} is using all of its
4875-
capacity
4876-
message: A NooBaa Bucket Is In No Capacity State
4862+
description: A NooBaa backing store {{ $labels.backing_store_name }} is in low capacity.
4863+
message: A NooBaa backing store is in low capacity state.
48774864
severity_level: warning
48784865
storage_type: NooBaa
48794866
expr: |
4880-
NooBaa_bucket_capacity{bucket_name=~".*"} > 95
4867+
NooBaa_backing_store_low_capacity{resource_name=~".*"} == 1
48814868
for: 5m
48824869
labels:
48834870
severity: warning

0 commit comments

Comments
 (0)