Authored by qinchao

日志打印

... ... @@ -265,7 +265,7 @@ public class ZabbixAlarm {
Double outNet = PointBuilder.findValueByKey(NetIfEnum.NET_IF_OUT.key(), itemInfos, historyList);
//网卡进出流量 大于 500m
if (zabbixNetAlarm < inNet || zabbixNetAlarm < outNet) {
if(tags!=null&&tags.indexOf("bigdata,")>=0){
if(tags!=null&&tags.indexOf("bigdata,")<0){
String nowTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
String alarmInfo = String.format(ALARMTEMPLATE, nowTime, inNetTime, ip, tags, userCpu, String.valueOf(avMem) + " / " + String.valueOf(toMem), inNet, outNet);
DEBUG.info("send alarm vm info {}", alarmInfo);
... ... @@ -277,7 +277,7 @@ public class ZabbixAlarm {
}
//cpu 大于 90%
if (zabbixCpuAlarm < userCpu) {
if(tags!=null&&tags.indexOf("bigdata,")>=0){
if(tags!=null&&tags.indexOf("bigdata,")<0){
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);
... ...