mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 08:50:12 +00:00
Delete old timeseries when monitoring granularity is changed
This commit is contained in:
parent
8fb749400b
commit
4bd04e7e4c
6 changed files with 53 additions and 33 deletions
|
|
@ -180,6 +180,12 @@ end
|
|||
|
||||
-- ##############################################
|
||||
|
||||
function am_utils.discardHostTimeseries(host, measurement)
|
||||
ts_utils.delete("am_host", {ifid=getSystemInterfaceId(), host=host, measure=measurement})
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function am_utils.deleteHost(host, measurement)
|
||||
local ts_utils = require("ts_utils")
|
||||
local alerts_api = require("alerts_api")
|
||||
|
|
@ -196,8 +202,7 @@ function am_utils.deleteHost(host, measurement)
|
|||
-- Release any engaged alerts of the host
|
||||
alerts_api.releaseEntityAlerts(rtt_host_entity)
|
||||
|
||||
-- Delete the host RRDs
|
||||
ts_utils.delete("am_host", {ifid=getSystemInterfaceId(), host=host, measure=measurement})
|
||||
am_utils.discardHostTimeseries(host, measurement)
|
||||
|
||||
-- Remove the redis keys of the host
|
||||
ntop.delCache(rtt_last_updates_key(host_key))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue