From 4fad452db5a55bddc7fb1d663fdbac01ff2f648d Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Wed, 21 Dec 2022 09:13:37 -0500 Subject: [PATCH] Enable Anon memory alarming The starlingX collectd memory monitoring plugin is no longer alarming Anon memory overage due to this previous commit. https://opendev.org/ starlingx/monitoring/commit/fcc8ddda66b507e747a6e5f32c2300b84e4f7ad6 The Anon (Anonymous) memory 'val.type' dispatched also needs to be changed from 'percent' to 'memory' like the platform memory was in that commit so that the reading notification is sent to the fm_notifier which manages alarm and degrade. Test Plan: for both total and numa nodes PASS: Verify Anon memory major alarming and clear PASS: Verify Anon memory critical alarming, degrade and clear PASS: Verify Anon memory alarms/degrade clear over collectd restart PASS: Verify Anon memory degrade handling over multiple alarm severity threshold assertion/clear changes across different eids. Test for stuck degrade case. Closes-Bug: 2000251 Signed-off-by: Eric MacDonald Change-Id: I7c436a64886ecb619d2db751a1f92f2ffb1c4e9b --- collectd-extensions/src/memory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collectd-extensions/src/memory.py b/collectd-extensions/src/memory.py index d64f8de..16b8649 100755 --- a/collectd-extensions/src/memory.py +++ b/collectd-extensions/src/memory.py @@ -875,7 +875,7 @@ def read_func(): val.dispatch(values=[obj.normal['total_MiB']]) val = collectd.Values(host=obj.hostname) - val.type = 'percent' + val.type = 'memory' val.type_instance = 'used' val.plugin = 'memory' val.plugin_instance = 'total' @@ -884,7 +884,7 @@ def read_func(): # Dispatch per-numa normal memory usage values derived from meminfo for node in sorted(obj.normal_nodes.keys()): val = collectd.Values(host=obj.hostname) - val.type = 'percent' + val.type = 'memory' val.type_instance = 'used' val.plugin = 'memory' val.plugin_instance = node