From e15e7d6a7b9e674d00357d471ff8fa332704231f Mon Sep 17 00:00:00 2001 From: Vitaly Zhuravlev Date: Tue, 28 Mar 2023 06:44:50 +0800 Subject: [PATCH] Fix NodeMemoryHighUtilization alert Signed-off-by: Vitaly Zhuravlev --- docs/node-mixin/alerts/alerts.libsonnet | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/node-mixin/alerts/alerts.libsonnet b/docs/node-mixin/alerts/alerts.libsonnet index 15f5db8f..2ea61ba1 100644 --- a/docs/node-mixin/alerts/alerts.libsonnet +++ b/docs/node-mixin/alerts/alerts.libsonnet @@ -326,7 +326,7 @@ { alert: 'NodeMemoryHighUtilization', expr: ||| - 100 - node_memory_MemAvailable_bytes{%(nodeExporterSelector)s} / node_memory_MemTotal_bytes{%(nodeExporterSelector)s} * 100 < 10 + 100 - (node_memory_MemAvailable_bytes{%(nodeExporterSelector)s} / node_memory_MemTotal_bytes{%(nodeExporterSelector)s} * 100) > 90 ||| % $._config, 'for': '15m', labels: { @@ -334,7 +334,9 @@ }, annotations: { summary: 'Host is running out of memory.', - description: 'Memory is filling up at {{ $labels.instance }}, has been above 90% for the last 15 minutes, is currently at {{ printf "%.2f" $value }}%.', + description: ||| + Memory is filling up at {{ $labels.instance }}, has been above 90% for the last 15 minutes, is currently at {{ printf "%.2f" $value }}%. + |||, }, }, {