Skip to content

Commit 3310fc7

Browse files
authored
Add cpu_capacity tenant replace for csmotb2onih42jsdolvg (#316)
1 parent 02ca9be commit 3310fc7

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

resources/prometheus/billing-rules.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,21 @@ spec:
99
groups:
1010
- name: rhacs-cluster-billing
1111
rules:
12-
- expr: |
12+
# Create a new rox_central_cluster_metrics_cpu_capacity metric for "csmotb2onih42jsdolvg" tenant because Central instance was previously deleted with AMS subscription and restored.
13+
# AMS subscription cannot be restored and thus new subscription was issued for this tenant. AMS use tenant ID for billing by default but for this tenant a differernt ID (not tenant ID) is assigned.
14+
# Thus ACSCS has to publish a new rox_central_cluster_metrics_cpu_capacity metrics for this tenant only
15+
# Related to ROX-28461
16+
- record: "rox_central_cluster_metrics_cpu_capacity"
17+
expr: |
18+
label_replace(
19+
rox_central_cluster_metrics_cpu_capacity{rhacs_instance_id="csmotb2onih42jsdolvg"},
20+
"rhacs_instance_id",
21+
"2dGIIEyaffP4fBW6RCPEPWqyCoBcsmotb2onih42jsdolvg",
22+
"rhacs_instance_id",
23+
".*"
24+
)
25+
- record: "rhacs:rox_central_cluster_metrics_cpu_capacity:avg_over_time1h"
26+
expr: |
1327
label_replace(
1428
sum by (rhacs_instance_id) (
1529
avg by (ClusterID, rhacs_instance_id) (
@@ -18,4 +32,3 @@ spec:
1832
),
1933
"_id", "$1", "rhacs_instance_id", "(.*)"
2034
)
21-
record: "rhacs:rox_central_cluster_metrics_cpu_capacity:avg_over_time1h"

0 commit comments

Comments
 (0)