Adds toggle to exclude one-way-traffic hosts from timeseries gen

This commit is contained in:
Simone Mainardi 2019-10-16 11:58:50 +02:00
parent 5e60fb19c9
commit d1600d0e9b
6 changed files with 49 additions and 7 deletions

View file

@ -415,8 +415,10 @@ function ts_dump.run_5min_dump(_ifname, ifstats, config, when, time_threshold, v
local dumped_hosts = {}
-- Save hosts stats (if enabled from the preferences)
if (is_rrd_creation_enabled and (config.host_rrd_creation ~= "0")) then
local in_time = callback_utils.foreachLocalRRDHost(_ifname, time_threshold, is_rrd_creation_enabled, function (hostname, host_ts)
if is_rrd_creation_enabled and config.host_rrd_creation ~= "0" then
local is_one_way_hosts_rrd_creation_enabled = (ntop.getPref("ntopng.prefs.ifid_"..ifstats.id..".interface_one_way_hosts_rrd_creation") ~= "false")
local in_time = callback_utils.foreachLocalRRDHost(_ifname, time_threshold, is_rrd_creation_enabled, is_one_way_hosts_rrd_creation_enabled, function (hostname, host_ts)
local host_key = host_ts.tskey
if(is_rrd_creation_enabled and (dumped_hosts[host_key] == nil)) then