mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 09:20:10 +00:00
Implemented Report MAC address Traffic Information (#5920)
This commit is contained in:
parent
e9c26b79f8
commit
cbfdb7d9cf
2 changed files with 14 additions and 1 deletions
|
|
@ -150,6 +150,18 @@ if starts(ts_schema, "custom:") and graph_utils.performCustomQuery then
|
|||
compare_backward = nil
|
||||
else
|
||||
res = performQuery(tstart, tend)
|
||||
|
||||
-- if Mac address ts is requested, check if the serialize by mac is enabled and if no data is found, use the host timeseries.
|
||||
if (res.statistics) and (res.statistics.total == 0) then
|
||||
local serialize_by_mac = ntop.getPref(string.format("ntopng.prefs.ifid_" .. tags.ifid .. ".serialize_local_broadcast_hosts_as_macs")) == "1"
|
||||
local tmp = split(ts_schema, ":")
|
||||
|
||||
if (serialize_by_mac) and (tags.mac) then
|
||||
ts_schema = "host:" .. tmp[2]
|
||||
tags.host = tags.mac .. "_v4"
|
||||
res = performQuery(tstart, tend)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if res == nil then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue