Authored by qinchao

调整mysql的zabbix带宽的报警阈值

... ... @@ -265,9 +265,30 @@ 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){
boolean sendFlag=true;
if(tags!=null){
if(tags.indexOf("bigdata,")>=0){
//// 暂时不报警
if(tags.indexOf("mysql,")>=0){
if(700 < inNet || 700 < outNet){
sendFlag=true;
}else{
sendFlag=false;
}
}else{
sendFlag=false;
}
}else if(tags.indexOf("mysql,")>=0){
if(700 < inNet || 700 < outNet){
sendFlag=true;
}else{
sendFlag=false;
}
}
}
if(sendFlag){
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);
... ...