mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Added interface anomalies timeseries
This commit is contained in:
parent
faa699328e
commit
53b27a023c
5 changed files with 73 additions and 15 deletions
|
|
@ -55,6 +55,19 @@ end
|
|||
|
||||
-- ########################################################
|
||||
|
||||
function ts_dump.iface_update_rrds(when, ifstats, verbose)
|
||||
local anomalies_info = interface.getAnomalies()
|
||||
anomalies_info = anomalies_info["anomalies"]
|
||||
|
||||
local anomalies_counter = (anomalies_info["tot_num_anomalies"]["local_hosts"] + anomalies_info["tot_num_anomalies"]["remote_hosts"]) - (anomalies_info["tot_num_old_anomalies"]["local_hosts"] + anomalies_info["tot_num_old_anomalies"]["remote_hosts"])
|
||||
|
||||
-- Save total anomalies delta counter
|
||||
ts_utils.append("iface:anomalies", {ifid=ifstats.id, anomalies=anomalies_counter}, when)
|
||||
|
||||
end
|
||||
|
||||
-- ########################################################
|
||||
|
||||
function ts_dump.asn_update_rrds(when, ifstats, verbose)
|
||||
local asn_info = interface.getASesInfo({detailsLevel = "higher"})
|
||||
|
||||
|
|
@ -633,6 +646,8 @@ function ts_dump.run_5min_dump(_ifname, ifstats, config, when)
|
|||
end
|
||||
end
|
||||
|
||||
ts_dump.iface_update_rrds(when, ifstats, verbose)
|
||||
|
||||
-- create RRD for ASN
|
||||
if config.asn_rrd_creation == "1" then
|
||||
ts_dump.asn_update_rrds(when, ifstats, verbose)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue