mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 17:00:10 +00:00
Drop hour stats when the host is edited
This commit is contained in:
parent
f6949452c3
commit
675d8ce8ab
2 changed files with 14 additions and 5 deletions
|
|
@ -163,10 +163,13 @@ elseif(action == "edit") then
|
|||
local old_iface = tostring(interface.getId())
|
||||
interface.select(getSystemInterfaceId())
|
||||
|
||||
-- Always release the old alert because:
|
||||
-- - If the granularity has changed, since the alert is bound to a specific granularity, it must be released
|
||||
-- - If the threshold has changed, we want to change the threshold in the alert message (if engaged)
|
||||
am_utils.releaseAlert(last_update.ip, key, value, threshold, old_granularity)
|
||||
-- Drop the hour stats
|
||||
am_utils.dropHourStats(key)
|
||||
|
||||
-- Always release the old alert because:
|
||||
-- - If the granularity has changed, since the alert is bound to a specific granularity, it must be released
|
||||
-- - If the threshold has changed, we want to change the threshold in the alert message (if engaged)
|
||||
am_utils.releaseAlert(last_update.ip, key, value, threshold, old_granularity)
|
||||
|
||||
if am_utils.hasExceededThreshold(threshold, m_info.operator, value) then
|
||||
am_utils.triggerAlert(last_update.ip, key, value, threshold, granularity)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue