1.修复上报的问题
2.修复chrome下节点配置页面的显示问题
This commit is contained in:
@@ -989,8 +989,8 @@
|
||||
|
||||
<tr>
|
||||
<td colspan="4" align="left" >
|
||||
<iframe id="Ich" name="Ich" height="300" width="100%" marginwidth="0" marginheight="0" align="top" style="background:#FFFFFF;"
|
||||
frameborder="0" src="<c:url value='/nodeGroupManage/nodeManage.do?action=queryChild'/>" scrolling="no">
|
||||
<iframe id="Ich" name="Ich" style="min-height:500px" width="100%" marginwidth="0" marginheight="0" align="top" style="background:#FFFFFF;"
|
||||
frameborder="0" src="<c:url value='/nodeGroupManage/nodeManage.do?action=queryChild'/>" scrolling="auto">
|
||||
i18n_nginfo.message.brower_n81i
|
||||
</iframe>
|
||||
</td>
|
||||
|
||||
@@ -114,19 +114,23 @@ public class AutoRunForSocketServerServlet extends HttpServlet implements Servle
|
||||
boolean open = StringUtil.isBlank(openStr) ? false : ("1".equals(openStr) ? true : false);
|
||||
if (open) {
|
||||
//nms上报
|
||||
String intervalStr = BaseAction.rb.getString("nms.report.interval");
|
||||
String sintervalStr = BaseAction.rb.getString("nms.report.status.interval");
|
||||
String rintervalStr = BaseAction.rb.getString("nms.report.rule.interval");
|
||||
String pintervalStr = BaseAction.rb.getString("nms.report.port.interval");
|
||||
//nms上报间隔
|
||||
long interval = StringUtil.isBlank(intervalStr) ? 300000 : Long.parseLong(intervalStr)*1000;
|
||||
long statusInterval = StringUtil.isBlank(sintervalStr) ? 300000 : Long.parseLong(sintervalStr)*1000;
|
||||
long ruleInterval = StringUtil.isBlank(rintervalStr) ? 900000 : Long.parseLong(rintervalStr)*1000;
|
||||
long portInterval = StringUtil.isBlank(pintervalStr) ? 300000 : Long.parseLong(pintervalStr)*1000;
|
||||
//nms初次上报延时
|
||||
long now = new Date().getTime();
|
||||
long initInterval = 0l;
|
||||
if(now%interval > 0) {
|
||||
initInterval = interval-(now%interval);
|
||||
if(now%statusInterval > 0) {
|
||||
initInterval = statusInterval-(now%statusInterval);
|
||||
}
|
||||
|
||||
ThreadPoolCommon.scheduled.scheduleAtFixedRate(new NmsStatusThread(), initInterval, interval, TimeUnit.MILLISECONDS);
|
||||
ThreadPoolCommon.scheduled.scheduleAtFixedRate(new NmsRuleThread(), initInterval, interval, TimeUnit.MILLISECONDS);
|
||||
ThreadPoolCommon.scheduled.scheduleAtFixedRate(new NmsPortThread(), initInterval, interval, TimeUnit.MILLISECONDS);
|
||||
ThreadPoolCommon.scheduled.scheduleAtFixedRate(new NmsStatusThread(), initInterval, statusInterval, TimeUnit.MILLISECONDS);
|
||||
ThreadPoolCommon.scheduled.scheduleAtFixedRate(new NmsRuleThread(), initInterval, ruleInterval, TimeUnit.MILLISECONDS);
|
||||
ThreadPoolCommon.scheduled.scheduleAtFixedRate(new NmsPortThread(), initInterval, portInterval, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,11 +21,13 @@ public class NmsPortThread implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Thread currentThread = Thread.currentThread();
|
||||
currentThread.setName("Port Report Thread");
|
||||
Date now = new Date();
|
||||
Long nowLong = now.getTime();
|
||||
Integer interval = null;
|
||||
try {
|
||||
interval = Integer.parseInt(BaseAction.rb.getString("nms.report.interval"));
|
||||
interval = Integer.parseInt(BaseAction.rb.getString("nms.report.port.interval"));
|
||||
} catch (Exception e) {
|
||||
interval = 300;
|
||||
}
|
||||
|
||||
@@ -22,11 +22,13 @@ public class NmsRuleThread implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Thread currentThread = Thread.currentThread();
|
||||
currentThread.setName("Rule Report Thread");
|
||||
Date now = new Date();
|
||||
Long nowLong = now.getTime();
|
||||
Integer interval = null;
|
||||
try {
|
||||
interval = Integer.parseInt(BaseAction.rb.getString("nms.report.interval"));
|
||||
interval = Integer.parseInt(BaseAction.rb.getString("nms.report.rule.interval"));
|
||||
} catch (Exception e) {
|
||||
interval = 300;
|
||||
}
|
||||
@@ -67,7 +69,6 @@ public class NmsRuleThread implements Runnable {
|
||||
HttpClientUtil httpUtil = new HttpClientUtil();
|
||||
JSONObject fromObject = JSONObject.fromObject(data);
|
||||
|
||||
logger.info(BaseAction.rb.getString("nms.rule.url"));
|
||||
httpUtil.post(BaseAction.rb.getString("nms.rule.url"), fromObject.toString());
|
||||
logger.info("rule上报完毕");
|
||||
} else {
|
||||
|
||||
@@ -23,6 +23,9 @@ public class NmsStatusThread implements Runnable {
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
Thread currentThread = Thread.currentThread();
|
||||
currentThread.setName("Status Report Thread");
|
||||
|
||||
String now = DateUtil.format.format(new Date());
|
||||
List<Map> results = new ArrayList<Map>();
|
||||
String setId = null;
|
||||
|
||||
@@ -94,10 +94,12 @@ dept.mk.id=280
|
||||
#1:open 0:close
|
||||
nms.report.open=0
|
||||
#unit:s
|
||||
nms.report.interval=20
|
||||
nms.report.status.interval=300
|
||||
nms.report.port.interval=300
|
||||
nms.report.rule.interval=900
|
||||
nms.status.setId=7
|
||||
nms.status.url=http\://192.168.11.64\:8080/galaxy-service/service/nms/v1/saveServerStatus
|
||||
nms.port.url=http\://192.168.11.64\:8080/galaxy-service/service/nms/v1/rafficNetflowPortInfo
|
||||
nms.port.url=http\://192.168.11.64\:8080/galaxy-service/service/nms/v1/trafficNetflowPortInfo
|
||||
nms.rule.url=http\://192.168.11.64\:8080/galaxy-service/service/nms/v1/saveNmsDiRule
|
||||
|
||||
default.nodeGroupId=100000
|
||||
|
||||
Reference in New Issue
Block a user