fix: correct invalid PromQL in ContainerHighMemory alert rule
Cannot use comparison operators inside label matchers {}.
Move the > 0 filter outside braces as a scalar filter on the
denominator — idiomatic Prometheus way to exclude unlimited containers.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fc6b1c0cec
commit
1f03022086
1 changed files with 1 additions and 1 deletions
|
|
@ -68,7 +68,7 @@ groups:
|
||||||
description: "Контейнер не отвечает более 2 минут."
|
description: "Контейнер не отвечает более 2 минут."
|
||||||
|
|
||||||
- alert: ContainerHighMemory
|
- alert: ContainerHighMemory
|
||||||
expr: (container_memory_usage_bytes{name=~".+"} / container_spec_memory_limit_bytes{name=~".+", container_spec_memory_limit_bytes > 0}) * 100 > 90
|
expr: (container_memory_usage_bytes{name=~".+"} / (container_spec_memory_limit_bytes{name=~".+"} > 0)) * 100 > 90
|
||||||
for: 5m
|
for: 5m
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue