mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-10-31 18:47:57 +00:00
Move the raising and clearing of the threshold alarms into the gateway controller when the device information is received in the MQTT device report. Update EquipmentAdminState alarms or clear if required.
Signed-off-by: Mike Hansen <mike.hansen@connectus.ai>
This commit is contained in:
@@ -989,7 +989,7 @@ public class MqttStatsPublisher {
|
|||||||
if (deviceReport.hasMemUtil() && deviceReport.getMemUtil().hasMemTotal() && deviceReport.getMemUtil().hasMemUsed()) {
|
if (deviceReport.hasMemUtil() && deviceReport.getMemUtil().hasMemTotal() && deviceReport.getMemUtil().hasMemUsed()) {
|
||||||
apPerformance.setFreeMemory(deviceReport.getMemUtil().getMemTotal() - deviceReport.getMemUtil().getMemUsed());
|
apPerformance.setFreeMemory(deviceReport.getMemUtil().getMemTotal() - deviceReport.getMemUtil().getMemUsed());
|
||||||
|
|
||||||
if (deviceReport.getMemUtil().getMemUsed()/deviceReport.getMemUtil().getMemTotal() > memoryUtilThresholdPct) {
|
if (deviceReport.getMemUtil().getMemUsed()/deviceReport.getMemUtil().getMemTotal() * 100 > memoryUtilThresholdPct) {
|
||||||
raiseDeviceThresholdAlarm(customerId, equipmentId, AlarmCode.MemoryUtilization, deviceReport.getTimestampMs());
|
raiseDeviceThresholdAlarm(customerId, equipmentId, AlarmCode.MemoryUtilization, deviceReport.getTimestampMs());
|
||||||
} else {
|
} else {
|
||||||
// Clear any existing cpuUtilization alarms
|
// Clear any existing cpuUtilization alarms
|
||||||
|
|||||||
Reference in New Issue
Block a user