mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-11-07 12:52:54 -05:00
seperate intel amt + amt cira in serverstats and monitoring #6549
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
@@ -33,7 +33,8 @@ module.exports.CreateMonitoring = function (parent, args) {
|
||||
blockedAgents: { description: "Blocked Agents" }, // blockedAgents
|
||||
};
|
||||
obj.gaugeMetrics = { // Gauge Metrics always start at 0 and can increase and decrease
|
||||
ConnectedIntelAMT: { description: "Connected Intel AMT" }, // parent.mpsserver.ciraConnections[i].length
|
||||
ConnectedIntelAMT: { description: "Connected Intel AMT" }, // parent.parent.connectivityByNode[i].connectivity == 4
|
||||
ConnectedIntelAMTCira: { description: "Connected Intel AMT CIRA" }, // parent.mpsserver.ciraConnections[i].length
|
||||
UserAccounts: { description: "User Accounts" }, // Object.keys(parent.webserver.users).length
|
||||
DeviceGroups: { description: "Device Groups" }, // parent.webserver.meshes (ONLY WHERE deleted=null)
|
||||
AgentSessions: { description: "Agent Sessions" }, // Object.keys(parent.webserver.wsagents).length
|
||||
@@ -79,10 +80,14 @@ module.exports.CreateMonitoring = function (parent, args) {
|
||||
ConnectedIntelAMT: 0
|
||||
};
|
||||
if (parent.mpsserver != null) {
|
||||
gauges.ConnectedIntelAMTCira = 0;
|
||||
for (var i in parent.mpsserver.ciraConnections) {
|
||||
gauges.ConnectedIntelAMT += parent.mpsserver.ciraConnections[i].length;
|
||||
gauges.ConnectedIntelAMTCira += parent.mpsserver.ciraConnections[i].length;
|
||||
}
|
||||
}
|
||||
for (var i in parent.connectivityByNode) {
|
||||
if (parent.connectivityByNode[i].connectivity == 4) { gauges.ConnectedIntelAMT++; }
|
||||
}
|
||||
for (const key in gauges) { obj.gaugeMetrics[key].prometheus.set(gauges[key]); }
|
||||
// Take a look at agent errors
|
||||
var agentstats = parent.webserver.getAgentStats();
|
||||
|
||||
Reference in New Issue
Block a user