Skip to content

Commit d632ace

Browse files
committed
fix(cluster): fix scaling logic and dedup metrics (#2566)
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->
1 parent befcf6d commit d632ace

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

packages/core/services/cluster/src/ops/datacenter/topology_get/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ pub async fn cluster_datacenter_topology_get(
118118
FROM db_cluster.servers
119119
WHERE
120120
datacenter_id = ANY($1) AND
121-
cloud_destroy_ts IS NULL AND
122-
taint_ts IS NULL
121+
cloud_destroy_ts IS NULL
123122
",
124123
&input.datacenter_ids,
125124
)

packages/core/services/cluster/src/ops/datacenter/topology_get/pegboard.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,14 @@ pub async fn pegboard_client_usage_get(ctx: &OperationCtx, input: &Input) -> Glo
3737
r#"
3838
label_replace(
3939
sum by (client_id) (
40-
last_over_time(
41-
rivet_pegboard_client_cpu_allocated{{
42-
client_id=~"({client_ids})",
43-
}}
44-
[15m:15s]
45-
)
40+
rivet_pegboard_client_cpu_allocated{{client_id=~"({client_ids})"}}
4641
),
4742
"metric", "cpu", "", ""
4843
)
4944
OR
5045
label_replace(
5146
sum by (client_id) (
52-
last_over_time(
53-
rivet_pegboard_client_memory_allocated{{
54-
client_id=~"({client_ids})",
55-
}}
56-
[15m:15s]
57-
)
47+
rivet_pegboard_client_memory_allocated{{client_id=~"({client_ids})"}}
5848
),
5949
"metric", "mem", "", ""
6050
)

0 commit comments

Comments
 (0)