1.web不再生成其他分中心下面节点的超周期告警

2.注意myconfig增加一条配置:system_id
This commit is contained in:
chenjinsong
2018-10-27 17:46:10 +08:00
parent c9eb4c4d15
commit 56b3ef4101
3 changed files with 11 additions and 5 deletions

View File

@@ -28,6 +28,7 @@ import nis.nms.bean.EmailInfo;
import nis.nms.bean.SetInfo;
import nis.nms.core.Constants;
import nis.nms.util.ConnectionOracle;
import nis.nms.util.Constant;
public class ThreadService {
Logger logger = Logger.getLogger(ThreadService.class);
@@ -301,9 +302,10 @@ public class ThreadService {
int periodTimes = ThreadPoolConfig.DETEC_TIMEOUT_ALARM_PERIOD_TIMES;
// periodTimes = 1;
//节点
String systemidSql = "-1".equals(Constant.CURRENT_SYSTEM_ID) ? "" : ("and nt.system_id=" + Constant.CURRENT_SYSTEM_ID);
if(StringUtils.isNotBlank(setInfo.getNodeIpsId())){
sql="select nt0.seq_id,nt0.node_ip,nt0.NODE_TYPE from " +
"(select distinct nt.seq_id,nt.node_ip,nt.NODE_TYPE from node_table nt left join nodegroup_table ngt on ngt.group_id = nt.node_group_id where nvl(ngt.is_valid, '1') = '1' and nt.node_id in (-9999,"+setInfo.getNodeIpsId()+", -9999) and nt.node_state = 0) nt0" +
"(select distinct nt.seq_id,nt.node_ip,nt.NODE_TYPE from node_table nt left join nodegroup_table ngt on ngt.group_id = nt.node_group_id where nvl(ngt.is_valid, '1') = '1' and nt.node_id in (-9999,"+setInfo.getNodeIpsId()+", -9999) and nt.node_state = 0 " + systemidSql + ") nt0" +
" where (not exists (select din.seq_id from detection_info_new din where nt0.seq_id = din.seq_id and din.detection_set_info_id = '"+setInfo.getId()+"') " +
" or exists (select din.seq_id from detection_info_new din where nt0.seq_id = din.seq_id and din.detection_set_info_id = '"+setInfo.getId()+"' and din.DATA_CHECK_TIME < sysdate - "+((setInfo.getCheckGap()==null?5:setInfo.getCheckGap())*periodTimes+5)+"/24/60 ))";
// sql = "select din.seq_id from detection_info_new din where " +
@@ -322,7 +324,7 @@ public class ThreadService {
e.printStackTrace();
}
sql="select nt0.seq_id,nt0.node_ip,nt0.NODE_TYPE from " +
"(select distinct nt.seq_id,nt.node_ip,nt.NODE_TYPE from node_table nt left join nodegroup_table ngt on ngt.group_id = nt.node_group_id where nvl(ngt.is_valid, '1') = '1' and nt.node_group_id in ("+ids+") and nt.node_state = 0) nt0" +
"(select distinct nt.seq_id,nt.node_ip,nt.NODE_TYPE from node_table nt left join nodegroup_table ngt on ngt.group_id = nt.node_group_id where nvl(ngt.is_valid, '1') = '1' and nt.node_group_id in ("+ids+") and nt.node_state = 0 " + systemidSql + ") nt0" +
" where (not exists (select din.seq_id from detection_info_new din where nt0.seq_id = din.seq_id and din.detection_set_info_id = '"+setInfo.getId()+"') " +
" or exists (select din.seq_id from detection_info_new din where nt0.seq_id = din.seq_id and din.detection_set_info_id = '"+setInfo.getId()+"' and din.DATA_CHECK_TIME < sysdate - "+((setInfo.getCheckGap()==null?5:setInfo.getCheckGap())*periodTimes+5)+"/24/60 ))";
/* sql="select nt0.seq_id,nt0.node_ip,nt0.NODE_TYPE from " +
@@ -336,7 +338,7 @@ public class ThreadService {
//全局
if(StringUtils.isBlank(setInfo.getNodeGroupsId())){
sql="select nt0.seq_id,nt0.node_ip,nt0.NODE_TYPE from " +
"(select distinct nt.seq_id,nt.node_ip,nt.NODE_TYPE from node_table nt left join nodegroup_table ngt on ngt.group_id = nt.node_group_id where nvl(ngt.is_valid, '1') = '1' and nt.node_state = 0 ) nt0" +
"(select distinct nt.seq_id,nt.node_ip,nt.NODE_TYPE from node_table nt left join nodegroup_table ngt on ngt.group_id = nt.node_group_id where nvl(ngt.is_valid, '1') = '1' and nt.node_state = 0 " + systemidSql + ") nt0" +
" where (not exists (select din.seq_id from detection_info_new din where nt0.seq_id = din.seq_id and din.detection_set_info_id = '"+setInfo.getId()+"') " +
" or exists (select din.seq_id from detection_info_new din where nt0.seq_id = din.seq_id and din.detection_set_info_id = '"+setInfo.getId()+"' and din.DATA_CHECK_TIME < sysdate - "+((setInfo.getCheckGap()==null?5:setInfo.getCheckGap())*periodTimes+5)+"/24/60))";

View File

@@ -11,8 +11,8 @@ email.password = wwr@intranet
email.host = 10.0.6.100
#file save path
uploadServerPath=D:/Java/apache-tomcat-7.0.61-windows-x86/webapps/nmsweb/download/
common.ssl.ks = C:\\Users\\Administrator\\git\\nmsweb\\src\\conf\\ssl\\client_ks
common.ssl.ts = C:\\Users\\Administrator\\git\\nmsweb\\src\\conf\\ssl\\client_ts
common.ssl.ks = C\:\\Users\\Administrator\\git\\nmsweb\\src\\conf\\ssl\\client_ks
common.ssl.ts = C\:\\Users\\Administrator\\git\\nmsweb\\src\\conf\\ssl\\client_ts
#--
common.single.socket.port = 60702
common.ssl.socket.port = 60703
@@ -86,6 +86,8 @@ currval_function_name=currval
nation.role.jsbh=224
#若系统为rc系统配置此配置菜单显示为rc的菜单 值为分中心角色id
#region.role.jsbh=21
#\u5206\u4E2D\u5FC3\u7684id, \u56FD\u5BB6\u4E2D\u5FC3\u586B-1
system.id=100003
dept.mk.id=280

View File

@@ -161,6 +161,8 @@ public class Constant {
public static final String ROLE_XML_FILE_NODE_MENU = "menuId";
// =============权限树xml的节点======结束===========================
public static final String CURRENT_SYSTEM_ID = rb.getString("system.id");//当前业务系统id-1时为国家中心
public static final String PACKAGE_NAME = rb.getString("packName").trim();//生成的javaBean的package
public static final String JAVABEAN_PATH = rb.getString("toPath").trim(); //生成的javaBean存放路径
public static final String COMMON_DATE_FORMAT = rb.getString("common.date.format").trim(); //公用日期格式化标准格式DEFAULT_DATE_FORMAT