Skip to content

Commit 2cd8c42

Browse files
chart: FlarePodMemoryHigh/Critical alerts on the POD cgroup slice
The pod slice (container="") is what the OOM killer enforces and the only series that includes the tmpfs data pages: container-level working_set misses most of them, and kubectl top sums containers and loses tmpfs charges reparented on container restarts (all observed live). On a tmpfs cluster an OOM is data loss on that node — warn at 85%/10m, page at 95%/2m.
1 parent c353edf commit 2cd8c42

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

helm/flare-operator/templates/prometheusrule.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,35 @@ spec:
5555
summary: "Flare cluster {{`{{ $labels.cluster }}`}}: draining master has NO successor — data-bearing node dies at grace expiry"
5656
runbook: docs/RUNBOOK.md#drain-no-successor
5757

58+
# Pod memory pressure vs the limit. The POD cgroup slice
59+
# (container="") is what the OOM killer enforces and is the only
60+
# series that includes the tmpfs data pages (container-level
61+
# working_set misses most of them; kubectl top sums containers and
62+
# misses reparented tmpfs charges after container restarts). On a
63+
# tmpfs cluster OOM = data loss on that node, so page before it.
64+
- alert: FlarePodMemoryHigh
65+
expr: >-
66+
100 * container_memory_working_set_bytes{container="", pod=~".+-nodes-.+"}
67+
/ on(namespace, pod) group_left()
68+
cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{container="flared"}
69+
> 85
70+
for: 10m
71+
labels:
72+
severity: warning
73+
annotations:
74+
summary: "Flare pod {{`{{ $labels.pod }}`}}: memory (incl. tmpfs data) above 85% of the limit"
75+
- alert: FlarePodMemoryCritical
76+
expr: >-
77+
100 * container_memory_working_set_bytes{container="", pod=~".+-nodes-.+"}
78+
/ on(namespace, pod) group_left()
79+
cluster:namespace:pod_memory:active:kube_pod_container_resource_limits{container="flared"}
80+
> 95
81+
for: 2m
82+
labels:
83+
severity: critical
84+
annotations:
85+
summary: "Flare pod {{`{{ $labels.pod }}`}}: memory above 95% of the limit — OOM (= tmpfs data loss) imminent"
86+
5887
# A node stuck in Prepare is reconstructing forever — it will never
5988
# serve and never be failed over (Prepare is exempt from dead
6089
# detection by design). Runbook: docs/RUNBOOK.md#prepare-stuck

0 commit comments

Comments
 (0)