From 6104e91bba7800dec1f5d1af1ec2777b62494a41 Mon Sep 17 00:00:00 2001 From: ssb-jnk Date: Mon, 13 Jan 2025 09:19:55 +0100 Subject: [PATCH] use container_memory_working_set_bytes instead --- .nais/alerts.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nais/alerts.yaml b/.nais/alerts.yaml index 2f27d7b..7682a8e 100644 --- a/.nais/alerts.yaml +++ b/.nais/alerts.yaml @@ -37,7 +37,7 @@ spec: # This alert checks if memory usage exceeds 90% of the 12GB limit, which could cause instability. - alert: HighMemoryUsage - expr: process_resident_memory_bytes{app="pseudo-service"} > (0.9 * on(namespace, pod) kube_pod_container_resource_limits_memory_bytes{pod=~"pseudo-service-.*"}) + expr: sum by (namespace, pod) (container_memory_working_set_bytes{namespace="dapla-stat", pod=~"pseudo-service-.*"}) > 0.9 * sum by (namespace, pod) (kube_pod_container_resource_limits_memory_bytes{namespace="dapla-stat", pod=~"pseudo-service-.*"}) for: 5m annotations: title: "High memory usage detected"