From aa44cfb319e7d03f08250df8a6c0bf72be0cf99d Mon Sep 17 00:00:00 2001 From: si458 Date: Fri, 18 Jul 2025 13:53:03 +0100 Subject: [PATCH] fix prometheus ConnectedIntelAMT crash #7168 Signed-off-by: si458 --- monitoring.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/monitoring.js b/monitoring.js index d552af23..c73e688b 100644 --- a/monitoring.js +++ b/monitoring.js @@ -85,7 +85,8 @@ module.exports.CreateMonitoring = function (parent, args) { } } for (var i in parent.connectivityByNode) { - if (parent.connectivityByNode[i].connectivity == 4) { gauges.ConnectedIntelAMT++; } + const node = parent.connectivityByNode[i]; + if (node && typeof node.connectivity !== 'undefined' && node.connectivity === 4) { gauges.ConnectedIntelAMT++; } } for (const key in gauges) { obj.gaugeMetrics[key].prometheus.set(gauges[key]); } // Take a look at agent errors