增加流量统计带宽流出流入统计

This commit is contained in:
zhanghongqing
2018-09-26 16:29:53 +08:00
parent dbafbea626
commit 59a36d63e1
4 changed files with 36 additions and 2 deletions

View File

@@ -8,4 +8,6 @@ import com.nis.web.dao.MyBatisDao;
public interface NtcTotalReportDao {
List<Map> getTotalReportList();
List<Map> getNetFlowPortInfoNew();
List<Map> getNetFlowPortInfoOld();
}

View File

@@ -19,6 +19,15 @@
<select id="getTotalReportList" resultType="java.util.HashMap">
SELECT SUM(reject_num) rejectNum,SUM(monitor_num) monitorNum,SUM(c2s_pkt_num) c2sPktNum,SUM(s2c_pkt_num) s2cPktNum,SUM(c2s_byte_len) c2sByteLen,SUM(s2c_byte_len) s2cByteLen,SUM(new_uni_conn_num) newUniConnNum,SUM(live_conn_num) liveConnNum,
SUM(drop_conn_num) dropConnNum,SUM(loop_conn_num) loopConnNum FROM galaxy.ntc_total_report
where report_time >= DATE_SUB((SELECT MAX(report_time) FROM ntc_total_report),INTERVAL 5 MINUTE)
where report_time >= DATE_SUB((SELECT MAX(report_time) FROM galaxy.ntc_total_report),INTERVAL 5 MINUTE)
</select>
<select id="getNetFlowPortInfoNew" resultType="java.util.HashMap">
SELECT SUM(INOCTETS) inoctets ,SUM(OUTOCTETS) outoctets FROM galaxy.TRAFFIC_NETFLOW_PORT_INFO
where RECV_TIME >= DATE_SUB((SELECT MAX(RECV_TIME) FROM galaxy.TRAFFIC_NETFLOW_PORT_INFO),INTERVAL 4 MINUTE)
</select>
<select id="getNetFlowPortInfoOld" resultType="java.util.HashMap">
SELECT SUM(INOCTETS) inoctets ,SUM(OUTOCTETS) outoctets FROM galaxy.TRAFFIC_NETFLOW_PORT_INFO
where RECV_TIME between DATE_SUB((SELECT MAX(RECV_TIME) FROM galaxy.TRAFFIC_NETFLOW_PORT_INFO),INTERVAL 9 MINUTE)
and DATE_SUB((SELECT MAX(RECV_TIME) FROM galaxy.TRAFFIC_NETFLOW_PORT_INFO),INTERVAL 4 MINUTE)
</select>
</mapper>

View File

@@ -19,7 +19,6 @@
<select id="getDomainByWebsiteList" resultType="com.nis.domain.restful.dashboard.TrafficHttpStatistic">
SELECT SUM(link_num) count, IFNULL( website_service_id, 268435455 ) websiteServiceId ,(SUM(c2s_pkt_num)+SUM(s2c_pkt_num)) pktNum,(SUM(c2s_byte_len)+SUM(s2c_byte_len)) byteLen
FROM galaxy.TRAFFIC_HTTP_STATISTIC t
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id = u.id
LEFT JOIN galaxy.ui_website_domain_topic u ON t.web_id = u.id
and t.stat_time >= DATE_SUB((SELECT MAX(stat_time) FROM galaxy.traffic_http_statistic),INTERVAL 5 MINUTE)
GROUP BY u.website_service_id ORDER BY count limit 0,10