1、超周期监测 增加开关:是否排除 握手监测 失败的节点
2、超周期监测数据 next_check_time=null
This commit is contained in:
@@ -19,6 +19,7 @@ import nis.nms.util.ConnectionOracle;
|
|||||||
public class DetectDatasTimeoutAlarmThread implements Runnable{
|
public class DetectDatasTimeoutAlarmThread implements Runnable{
|
||||||
private Logger logger = Logger.getLogger(DetectDatasTimeoutAlarmThread.class);
|
private Logger logger = Logger.getLogger(DetectDatasTimeoutAlarmThread.class);
|
||||||
private Date startTime = Calendar.getInstance().getTime();
|
private Date startTime = Calendar.getInstance().getTime();
|
||||||
|
private boolean detectDatasTimeoutOthers = false;//监测超时 是否 过滤 握手监测 节点
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
// Thread.currentThread().setName("监测数据超时告警线程");
|
// Thread.currentThread().setName("监测数据超时告警线程");
|
||||||
@@ -35,10 +36,15 @@ public class DetectDatasTimeoutAlarmThread implements Runnable{
|
|||||||
inStream = new FileInputStream(url2.getPath().replace("%20", " "));
|
inStream = new FileInputStream(url2.getPath().replace("%20", " "));
|
||||||
properties.load(inStream);
|
properties.load(inStream);
|
||||||
String checkTypeName = properties.getProperty("detec.nmsclient.str");
|
String checkTypeName = properties.getProperty("detec.nmsclient.str");
|
||||||
|
String detectOthers = properties.getProperty("detec.datastimeout.others");//监测超时 是否 过滤 握手监测 节点
|
||||||
// String checkTypeName = Constants.NMS_CLIENT_CHECKTYPENAME;
|
// String checkTypeName = Constants.NMS_CLIENT_CHECKTYPENAME;
|
||||||
if(StringUtils.isEmpty(checkTypeName)){
|
if(StringUtils.isEmpty(checkTypeName)){
|
||||||
checkTypeName = "NMSClient";
|
checkTypeName = "NMSClient";
|
||||||
}
|
}
|
||||||
|
//过滤 握手监测 超时 告警
|
||||||
|
if(StringUtils.isNotBlank(detectOthers) && "1".equalsIgnoreCase(detectOthers.trim())){
|
||||||
|
detectDatasTimeoutOthers = true;
|
||||||
|
}
|
||||||
SetInfo nmsClientSet = service.getSetInfoByCheckName(1,checkTypeName); //查询握手监测相关信息
|
SetInfo nmsClientSet = service.getSetInfoByCheckName(1,checkTypeName); //查询握手监测相关信息
|
||||||
|
|
||||||
List<String[]> alarm = new ArrayList<String[]>();
|
List<String[]> alarm = new ArrayList<String[]>();
|
||||||
@@ -73,7 +79,7 @@ public class DetectDatasTimeoutAlarmThread implements Runnable{
|
|||||||
|
|
||||||
List<SetInfo> setInfoList = service.getAllSetInfo(1,null); //查询有效SetInfo信息
|
List<SetInfo> setInfoList = service.getAllSetInfo(1,null); //查询有效SetInfo信息
|
||||||
for(SetInfo setInfo : setInfoList){
|
for(SetInfo setInfo : setInfoList){
|
||||||
List<String []> alarmInfoList = service.detectDatasTimeoutCheck(setInfo,startTime,errorSeqIds);//监测当前监测是否超时无数据
|
List<String []> alarmInfoList = service.detectDatasTimeoutCheck(setInfo,startTime,detectDatasTimeoutOthers?errorSeqIds:null);//监测当前监测是否超时无数据
|
||||||
if(alarmInfoList != null && alarmInfoList.size()>0){
|
if(alarmInfoList != null && alarmInfoList.size()>0){
|
||||||
alarm.addAll(alarmInfoList);
|
alarm.addAll(alarmInfoList);
|
||||||
/*for(String [] datas: alarmInfoList){
|
/*for(String [] datas: alarmInfoList){
|
||||||
|
|||||||
@@ -1253,11 +1253,11 @@ public class ThreadService {
|
|||||||
+ "performace_data ,current_times ,start_time ,"
|
+ "performace_data ,current_times ,start_time ,"
|
||||||
+ "police_level ,data_check_time ,data_arrive_time ,detectioned_state ,"
|
+ "police_level ,data_check_time ,data_arrive_time ,detectioned_state ,"
|
||||||
+ "status_change_time ,seq_id ,detection_info_id,data_check_time_digital,data_arrive_time_digital ,"
|
+ "status_change_time ,seq_id ,detection_info_id,data_check_time_digital,data_arrive_time_digital ,"
|
||||||
+ "POLICE_EMERGENT ) VALUES"
|
+ "POLICE_EMERGENT,NEXT_CHECK_TIME ) VALUES"
|
||||||
+"(?,?,"
|
+"(?,?,"
|
||||||
+ "?,?,?,"
|
+ "?,?,?,"
|
||||||
+ "?,?,?,?,"
|
+ "?,?,?,?,"
|
||||||
+ "?,?,?,?,?,?)";
|
+ "?,?,?,?,?,?,null)";
|
||||||
return sql;
|
return sql;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1287,6 +1287,7 @@ public class ThreadService {
|
|||||||
+" ,data_arrive_time_digital = ?"
|
+" ,data_arrive_time_digital = ?"
|
||||||
|
|
||||||
+" ,POLICE_EMERGENT = ?"
|
+" ,POLICE_EMERGENT = ?"
|
||||||
|
+" ,NEXT_CHECK_TIME = NULL"
|
||||||
|
|
||||||
+" where din.detection_set_info_id = ?"
|
+" where din.detection_set_info_id = ?"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user