Skip to content

Commit acb38ff

Browse files
committed
Change q
1 parent f826ef6 commit acb38ff

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

internal/infrastructure/prometheus/volume_query.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,11 @@ func (self *PrometheusClient) getPrometheusUsageStats(ctx context.Context, pvcNa
7979
query := fmt.Sprintf(`
8080
(
8181
label_replace(
82-
max by (persistentvolumeclaim) (
83-
kubelet_volume_stats_used_bytes{persistentvolumeclaim=~"%s", job="kubelet"} / 1024 / 1024 / 1024
84-
),
82+
last_over_time(
83+
kubelet_volume_stats_used_bytes{
84+
persistentvolumeclaim=~"%s", job="kubelet"
85+
}[10m]
86+
) / 1024 / 1024 / 1024,
8587
"kind", "used", "persistentvolumeclaim", ".*"
8688
)
8789
)

0 commit comments

Comments
 (0)