Skip to content

Commit c5a26cc

Browse files
authored
[st1-*] update customrules.yaml (#34)
1 parent cd83964 commit c5a26cc

1 file changed

Lines changed: 48 additions & 6 deletions

File tree

charts/ceph-operations/alerts/customrules.yaml

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,57 @@ groups:
55
- name: customrules
66
rules:
77
- record: objectstore_bytes_received_total
8-
expr: max by(bucket, project_id) (label_replace(radosgw_bucket_bytes_received_total, "project_id", "$1", "owner", "([a-f0-9]{32}).*"))
8+
expr: |
9+
sum by (bucket,project_id) (
10+
label_replace(
11+
radosgw_bytes_received,
12+
"project_id", "$1",
13+
"tenant", "(.*)"
14+
)
15+
)
916
- record: objectstore_bytes_sent_total
10-
expr: max by(bucket, project_id) (label_replace(radosgw_bucket_bytes_sent_total, "project_id", "$1", "owner", "([a-f0-9]{32}).*"))
17+
expr: |
18+
sum by (bucket,project_id) (
19+
label_replace(
20+
radosgw_bytes_sent,
21+
"project_id", "$1",
22+
"tenant", "(.*)"
23+
)
24+
)
1125
- record: objectstore_read_ops_total
12-
expr: max by(bucket, project_id) (label_replace(radosgw_bucket_read_ops_total, "project_id", "$1", "owner", "([a-f0-9]{32}).*"))
26+
expr: |
27+
sum by (bucket,project_id) (
28+
label_replace(
29+
radosgw_total_requests{method="GET"},
30+
"project_id", "$1",
31+
"tenant", "(.*)"
32+
)
33+
)
1334
- record: objectstore_write_ops_total
14-
expr: max by(bucket, project_id) (label_replace(radosgw_bucket_write_ops_total, "project_id", "$1", "owner", "([a-f0-9]{32}).*"))
35+
expr: |
36+
sum by (bucket,project_id) (
37+
label_replace(
38+
radosgw_total_requests{method=~"PUT|POST"},
39+
"project_id", "$1",
40+
"tenant", "(.*)"
41+
)
42+
)
1543
- record: objectstore_capacity_usage_bytes
16-
expr: max by(bucket, project_id) (label_replace(radosgw_usage_bucket_size, "project_id", "$1", "owner", "([a-f0-9]{32}).*"))
44+
expr: |
45+
max by (bucket,project_id) (
46+
label_replace(
47+
radosgw_usage_bucket_size,
48+
"project_id", "$1",
49+
"tenant", "(.*)"
50+
)
51+
)
1752
- record: objectstore_usage_objects
18-
expr: max by(bucket, project_id) (label_replace(radosgw_usage_bucket_objects, "project_id", "$1", "owner", "([a-f0-9]{32}).*"))
53+
expr: |
54+
max by(bucket,project_id) (
55+
label_replace(
56+
radosgw_usage_bucket_objects,
57+
"project_id", "$1",
58+
"tenant", "(.*)"
59+
)
60+
)
1961
{{- end }}

0 commit comments

Comments
 (0)