Authored by qinchao

zabbix报警,排除所有包含bigdata

... ... @@ -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(!"bigdata,".equals(tags)){
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(!"bigdata,".equals(tags)){
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);
... ...