Authored by qinchao

报警

@@ -60,12 +60,12 @@ public class GatewayMonitorTask { @@ -60,12 +60,12 @@ public class GatewayMonitorTask {
60 } 60 }
61 61
62 private void alarm(String influxdbName){ 62 private void alarm(String influxdbName){
63 - String mobile=snsMobileConfig.getTestMobile(); 63 + String mobile=snsMobileConfig.getBaseMobile();
64 QueryResult queryResultFurther = gatewayAccessAllMapper.selectMeanValue(influxdbName,4,2); 64 QueryResult queryResultFurther = gatewayAccessAllMapper.selectMeanValue(influxdbName,4,2);
65 QueryResult queryResultClose = gatewayAccessAllMapper.selectMeanValue(influxdbName,2,0); 65 QueryResult queryResultClose = gatewayAccessAllMapper.selectMeanValue(influxdbName,2,0);
66 if(queryResultClose==null||queryResultFurther==null){ 66 if(queryResultClose==null||queryResultFurther==null){
67 //报警 67 //报警
68 - alarmMsgService.sendSms("service_exception","gateway流量获取为空,influxdb :"+influxdbName,mobile); 68 + alarmMsgService.sendSms("service_exception",influxdbName+" gateway流量获取为空",mobile);
69 return ; 69 return ;
70 } 70 }
71 71
@@ -89,7 +89,7 @@ public class GatewayMonitorTask { @@ -89,7 +89,7 @@ public class GatewayMonitorTask {
89 89
90 if(meanValueFurther>0&&meanValueClose==0){ 90 if(meanValueFurther>0&&meanValueClose==0){
91 //报警 91 //报警
92 - alarmMsgService.sendSms("service_exception","gateway流量变化异常,最近2分钟均值的0,influxdb :"+influxdbName,mobile); 92 + alarmMsgService.sendSms("service_exception",influxdbName+" gateway流量变化异常,最近2分钟均值的0 ",mobile);
93 return ; 93 return ;
94 }else if(meanValueFurther==0&&meanValueClose==0){ 94 }else if(meanValueFurther==0&&meanValueClose==0){
95 //不报警 95 //不报警
@@ -104,7 +104,7 @@ public class GatewayMonitorTask { @@ -104,7 +104,7 @@ public class GatewayMonitorTask {
104 change="上升"; 104 change="上升";
105 } 105 }
106 //报警 106 //报警
107 - alarmMsgService.sendSms("service_exception","gateway流量变化异常,最近2分钟"+change+" "+df.format(abs)+ ",变化率 "+df.format(compareAbs*100)+"%, influxdb :"+influxdbName,mobile); 107 + alarmMsgService.sendSms("service_exception",influxdbName+" gateway流量变化异常,最近2分钟"+change+" "+df.format(abs)+ ",变化率 "+df.format(compareAbs*100)+"%",mobile);
108 return ; 108 return ;
109 } 109 }
110 } 110 }