mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-07-21 14:31:10 -04:00
fix prometheus ConnectedIntelAMT crash #7168
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
baddb42664
commit
aa44cfb319
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user