Authored by qinchao

加gateway流量报警

... ... @@ -99,8 +99,12 @@ public class GatewayMonitorTask {
Double abs=Math.abs(meanValueFurther-meanValueClose);
Double compareAbs=Math.abs((meanValueFurther-meanValueClose)/meanValueFurther) ;
if(abs>200 || compareAbs>0.3){
String change="下降";
if(meanValueClose>meanValueFurther){
change="上升";
}
//报警
alarmMsgService.sendSms("service_exception","gateway流量变化异常,最近2分钟均值变化值 "+abs+ ",变化率 "+df.format(compareAbs*100)+"% influxdb :"+influxdbName,mobile);
alarmMsgService.sendSms("service_exception","gateway流量变化异常,最近2分钟"+change+" "+df.format(abs)+ ",变化率 "+df.format(compareAbs*100)+"% influxdb :"+influxdbName,mobile);
return ;
}
}
... ...