...
|
...
|
@@ -277,13 +277,15 @@ public class ZabbixAlarm { |
|
|
}
|
|
|
//cpu 大于 90%
|
|
|
if (zabbixCpuAlarm < userCpu) {
|
|
|
String nowTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
|
|
|
String alarmInfo = String.format(ALARMTEMPLATE, nowTime, userCpuTime, ip, tags, userCpu, String.valueOf(avMem) + " / " + String.valueOf(toMem), inNet, outNet);
|
|
|
DEBUG.info("send alarm vm info {}", alarmInfo);
|
|
|
DEBUG.info("cpu Index is too high,the timestamp is:" + userCpuTimeStamp);
|
|
|
Constants.ERRORMAP.remove(ip);
|
|
|
//vm 性能告警
|
|
|
alarmMsgService.sendSms("vm-per-cpu", alarmInfo, mobile_yunwei);
|
|
|
if(!"bigdata".equals(tags)){
|
|
|
String nowTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
|
|
|
String alarmInfo = String.format(ALARMTEMPLATE, nowTime, userCpuTime, ip, tags, userCpu, String.valueOf(avMem) + " / " + String.valueOf(toMem), inNet, outNet);
|
|
|
DEBUG.info("send alarm vm info {}", alarmInfo);
|
|
|
DEBUG.info("cpu Index is too high,the timestamp is:" + userCpuTimeStamp);
|
|
|
Constants.ERRORMAP.remove(ip);
|
|
|
//vm 性能告警
|
|
|
alarmMsgService.sendSms("vm-per-cpu", alarmInfo, mobile_yunwei);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|