Implements historical floww search function for all host alerts

Addresses #5326
This commit is contained in:
Simone Mainardi 2021-07-28 18:16:32 +02:00
parent 8cc6353c63
commit de576aa999
14 changed files with 265 additions and 12 deletions

View file

@ -561,6 +561,12 @@ function alert_utils.getLinkToPastFlows(ifid, alert, alert_json)
-- Add a default end time, if not end time has been added by the filter-generation function
if not past_flows_filter["epoch_end"] then
local duration = tonumber(alert["duration"]) or (tonumber(alert["tstamp_end"]) - tonumber(alert["tstamp"]))
if duration > 300 then
-- Dont' make the interval too large by default
duration = 300
end
past_flows_filter["epoch_end"] = past_flows_filter["epoch_begin"] + duration
end