Authored by qinchao

bigdata标签不报警

@@ -265,7 +265,7 @@ public class ZabbixAlarm { @@ -265,7 +265,7 @@ public class ZabbixAlarm {
265 Double outNet = PointBuilder.findValueByKey(NetIfEnum.NET_IF_OUT.key(), itemInfos, historyList); 265 Double outNet = PointBuilder.findValueByKey(NetIfEnum.NET_IF_OUT.key(), itemInfos, historyList);
266 //网卡进出流量 大于 500m 266 //网卡进出流量 大于 500m
267 if (zabbixNetAlarm < inNet || zabbixNetAlarm < outNet) { 267 if (zabbixNetAlarm < inNet || zabbixNetAlarm < outNet) {
268 - if(!"bigdata".equals(tags)){ 268 + if(!"bigdata,".equals(tags)){
269 String nowTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss"); 269 String nowTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
270 String alarmInfo = String.format(ALARMTEMPLATE, nowTime, inNetTime, ip, tags, userCpu, String.valueOf(avMem) + " / " + String.valueOf(toMem), inNet, outNet); 270 String alarmInfo = String.format(ALARMTEMPLATE, nowTime, inNetTime, ip, tags, userCpu, String.valueOf(avMem) + " / " + String.valueOf(toMem), inNet, outNet);
271 DEBUG.info("send alarm vm info {}", alarmInfo); 271 DEBUG.info("send alarm vm info {}", alarmInfo);
@@ -277,7 +277,7 @@ public class ZabbixAlarm { @@ -277,7 +277,7 @@ public class ZabbixAlarm {
277 } 277 }
278 //cpu 大于 90% 278 //cpu 大于 90%
279 if (zabbixCpuAlarm < userCpu) { 279 if (zabbixCpuAlarm < userCpu) {
280 - if(!"bigdata".equals(tags)){ 280 + if(!"bigdata,".equals(tags)){
281 String nowTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss"); 281 String nowTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
282 String alarmInfo = String.format(ALARMTEMPLATE, nowTime, userCpuTime, ip, tags, userCpu, String.valueOf(avMem) + " / " + String.valueOf(toMem), inNet, outNet); 282 String alarmInfo = String.format(ALARMTEMPLATE, nowTime, userCpuTime, ip, tags, userCpu, String.valueOf(avMem) + " / " + String.valueOf(toMem), inNet, outNet);
283 DEBUG.info("send alarm vm info {}", alarmInfo); 283 DEBUG.info("send alarm vm info {}", alarmInfo);