mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 03:45:26 +00:00
Implemented ASN traffic rules (#9531)
This commit is contained in:
parent
8ffa33cf6b
commit
5e48729f68
6 changed files with 221 additions and 5 deletions
|
|
@ -3712,6 +3712,19 @@ function timeseries_info.get_traffic_rules_schema(rule_type)
|
|||
end
|
||||
end
|
||||
|
||||
return metric_list
|
||||
elseif rule_type == "asn" then
|
||||
local metric_list = {}
|
||||
for _, item in ipairs(community_timeseries) do
|
||||
if (item.id == timeseries_id.asn) then
|
||||
-- When the custom threshold is added, remove this check to use all time series
|
||||
if(item.schema == "asn:traffic_rcvd" or
|
||||
item.schema == "asn:traffic_sent" or
|
||||
item.schema == "asn:traffic") then
|
||||
metric_list[#metric_list + 1] = item
|
||||
end
|
||||
end
|
||||
end
|
||||
return metric_list
|
||||
elseif rule_type == "interface" then
|
||||
local ifname_ts_enabled = ntop.getCache(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue