fix(monitoring): prevent many-to-many match in util-per-watt recording rule

Address review feedback from coderabbitai on packages/system/monitoring-agents/alerts/gpu-recording.rules.yaml:119

Signed-off-by: Arsolitt <arsolitt@gmail.com>
This commit is contained in:
Arsolitt 2026-04-28 11:21:12 +03:00
parent 5718740ae3
commit aba5ae3fcd
No known key found for this signature in database
GPG key ID: 4D8302CE6A9247C4

View file

@ -109,13 +109,15 @@ spec:
# to GPU-identifying labels.
- record: gpu:util_per_watt:avg5m
expr: |
avg by (Hostname, gpu, UUID) (
max by (Hostname, gpu, UUID) (
avg_over_time(DCGM_FI_DEV_GPU_UTIL[5m])
/ on (Hostname, gpu, UUID)
clamp_min(
avg_over_time(DCGM_FI_DEV_POWER_USAGE[5m]),
1
)
)
/ on (Hostname, gpu, UUID)
clamp_min(
max by (Hostname, gpu, UUID) (
avg_over_time(DCGM_FI_DEV_POWER_USAGE[5m])
),
1
)
# Fraction of time power-throttled (TDP cap) — 1.0 = fully throttled.