mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Implement network matrix (#6679)
This commit is contained in:
parent
847d830b59
commit
bf080c9407
15 changed files with 155 additions and 17 deletions
|
|
@ -71,7 +71,21 @@ function ts_dump.subnet_update_rrds(when, ifstats, verbose)
|
|||
local subnet_stats = interface.getNetworksStats()
|
||||
|
||||
for subnet,sstats in pairs(subnet_stats) do
|
||||
if ntop.isPro() then
|
||||
if ntop.isPro() and not isEmptyString(ntop.getPref("ntopng.prefs.intranet_traffic_rrd_creation") or "") then
|
||||
for second_subnet, traffic in pairs(sstats["intranet_traffic"]) do
|
||||
if traffic.bytes_sent ~= 0 or traffic.bytes_rcvd ~= 0 then
|
||||
ts_utils.append("subnet:intranet_traffic",
|
||||
{ ifid = ifstats.id,
|
||||
subnet = subnet,
|
||||
subnet_2 = second_subnet,
|
||||
bytes_sent = traffic.bytes_sent,
|
||||
bytes_rcvd = traffic.bytes_rcvd }, when)
|
||||
end
|
||||
|
||||
network.select(sstats.network_id)
|
||||
network.resetTrafficBetweenNets()
|
||||
end
|
||||
|
||||
-- Check to see if the values are inserted
|
||||
if not sstats["score_behavior"] or
|
||||
not sstats["traffic_rx_behavior"] or
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue