Traffic report per "flow exporter" #6278

This commit is contained in:
uccidibuti 2022-03-25 21:50:49 +01:00
parent b5554d982e
commit 906eeb0fbd
3 changed files with 44 additions and 4 deletions

View file

@ -114,7 +114,6 @@ for key, value in ipairs(flows_stats) do
end
local formatted_res = {}
for _key, value in ipairs(flows_stats) do -- pairsByValues(vals, funct) do
local record = {}
local key = value["ntopng.key"]
@ -222,6 +221,13 @@ for _key, value in ipairs(flows_stats) do -- pairsByValues(vals, funct) do
record["key"] = string.format("%u", value["ntopng.key"])
record["hash_id"] = string.format("%u", value["hash_entry_id"])
record["key_and_hash"] = string.format("%s@%s", record["key"], record["hash_id"])
if (value["in_index"] ~= nil and value["out_index"] ~= nil) then
--record["column_in_index"] = tostring(value["in_index"])..' '
--record["column_out_index"] = tostring(value["out_index"])..' '
record["column_device_id"] = value["device_ip"]
record["in_index"] = value["in_index"]
record["out_index"] = value["out_index"]
end
local column_client = src_key