diff options
| author | wangwei <[email protected]> | 2019-04-02 18:07:32 +0800 |
|---|---|---|
| committer | wangwei <[email protected]> | 2019-04-02 18:07:32 +0800 |
| commit | 2714bf963fe320b19f3447971446bb9aafedeb96 (patch) | |
| tree | 35b8e155bfc6b5b27a2a677af76205ac0dddd288 | |
| parent | ef5e07277d17d2489228ba47740c6e606f1dd455 (diff) | |
fix(ip.monitor):修改IP监控为TOP50develop
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | src/main/java/com/nis/galaxy/template/ForEventsInterface.java | 4 | ||||
| -rw-r--r-- | src/main/java/com/nis/galaxy/web/service/impl/EventsServiceImpl.java | 14 |
3 files changed, 14 insertions, 8 deletions
@@ -1,4 +1,6 @@ galaxy 数据推送服务,主要提供如下功能: 1.5分钟趋势数据汇聚推送 2.1小时TOPN数据汇聚推送 -3.运维数据汇聚推送
\ No newline at end of file +3.运维数据汇聚推送 + +推送接口界面访问地址:http://IP:Port/swagger-ui.html
\ No newline at end of file diff --git a/src/main/java/com/nis/galaxy/template/ForEventsInterface.java b/src/main/java/com/nis/galaxy/template/ForEventsInterface.java index 89718e9..d67042d 100644 --- a/src/main/java/com/nis/galaxy/template/ForEventsInterface.java +++ b/src/main/java/com/nis/galaxy/template/ForEventsInterface.java @@ -538,7 +538,7 @@ public class ForEventsInterface { } /** - * IP监控TOP10 + * IP监控TOP50 */ @Scheduled(cron = "${1h.scheduled.cron.plan}") @SchedulerLock(name = "ip.monitor", lockAtLeastForString = "PT20M", lockAtMostForString = "PT40M") @@ -546,7 +546,7 @@ public class ForEventsInterface { if (!Boolean.parseBoolean(scheduledEventsEnable)) { return; } - String logMark = "IP监控TOP10"; + String logMark = "IP监控TOP50"; Date end = DateUtil.getFormatHour(new Date()); Date start = DateUtil.getSomeHour(end, -1); List contentValue = null; diff --git a/src/main/java/com/nis/galaxy/web/service/impl/EventsServiceImpl.java b/src/main/java/com/nis/galaxy/web/service/impl/EventsServiceImpl.java index faacf6c..b1d1d3c 100644 --- a/src/main/java/com/nis/galaxy/web/service/impl/EventsServiceImpl.java +++ b/src/main/java/com/nis/galaxy/web/service/impl/EventsServiceImpl.java @@ -739,7 +739,7 @@ public class EventsServiceImpl implements EventsService { logMark = "HTTPS监控TOP10"; serviceId = 129; } else if ("IpMonitor".equals(type)) { - logMark = "IP监控TOP10"; + logMark = "IP监控TOP50"; serviceId = 128; } else if ("SpecificAppBlock".equals(type)) { logMark = "APP阻断TOP10"; @@ -760,8 +760,6 @@ public class EventsServiceImpl implements EventsService { } else { list = eventsDao.getHttpsMonitor(start, start, end, serviceId); } - - } catch (Exception e) { logger.error(logMark + "\t查询异常\tserviceImpl", e); } @@ -793,8 +791,14 @@ public class EventsServiceImpl implements EventsService { } } }); - if (list.size() > 10) { - list = list.subList(0, 10); + if ("IpMonitor".equals(type)) { + if (list.size() > 50) { + list = list.subList(0, 50); + } + } else { + if (list.size() > 10) { + list = list.subList(0, 10); + } } } logger.info(logMark + "\t耗时:" + (System.currentTimeMillis() - timeMillisStart)); |
