...
|
...
|
@@ -60,12 +60,12 @@ public class GatewayMonitorTask { |
|
|
}
|
|
|
|
|
|
private void alarm(String influxdbName){
|
|
|
String mobile=snsMobileConfig.getTestMobile();
|
|
|
String mobile=snsMobileConfig.getBaseMobile();
|
|
|
QueryResult queryResultFurther = gatewayAccessAllMapper.selectMeanValue(influxdbName,4,2);
|
|
|
QueryResult queryResultClose = gatewayAccessAllMapper.selectMeanValue(influxdbName,2,0);
|
|
|
if(queryResultClose==null||queryResultFurther==null){
|
|
|
//报警
|
|
|
alarmMsgService.sendSms("service_exception","gateway流量获取为空,influxdb :"+influxdbName,mobile);
|
|
|
alarmMsgService.sendSms("service_exception",influxdbName+" gateway流量获取为空",mobile);
|
|
|
return ;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -89,7 +89,7 @@ public class GatewayMonitorTask { |
|
|
|
|
|
if(meanValueFurther>0&&meanValueClose==0){
|
|
|
//报警
|
|
|
alarmMsgService.sendSms("service_exception","gateway流量变化异常,最近2分钟均值的0,influxdb :"+influxdbName,mobile);
|
|
|
alarmMsgService.sendSms("service_exception",influxdbName+" gateway流量变化异常,最近2分钟均值的0 ",mobile);
|
|
|
return ;
|
|
|
}else if(meanValueFurther==0&&meanValueClose==0){
|
|
|
//不报警
|
...
|
...
|
@@ -104,7 +104,7 @@ public class GatewayMonitorTask { |
|
|
change="上升";
|
|
|
}
|
|
|
//报警
|
|
|
alarmMsgService.sendSms("service_exception","gateway流量变化异常,最近2分钟"+change+" "+df.format(abs)+ ",变化率 "+df.format(compareAbs*100)+"%, influxdb :"+influxdbName,mobile);
|
|
|
alarmMsgService.sendSms("service_exception",influxdbName+" gateway流量变化异常,最近2分钟"+change+" "+df.format(abs)+ ",变化率 "+df.format(compareAbs*100)+"%",mobile);
|
|
|
return ;
|
|
|
}
|
|
|
}
|
...
|
...
|
|