Reworks alert counters (WIP)

Alert counters are now kept in sync only for engaged alerts.
Each host will show the current number of engaged alerts.
This alleviates the complexity of constantly keep the numbers
synchronized with the database.

Todo: see how to handle counters for flow alerts and past alerts.
This commit is contained in:
Simone Mainardi 2016-12-24 16:21:50 +01:00
parent b5defaa4b8
commit eca2c41049
15 changed files with 131 additions and 169 deletions

View file

@ -193,10 +193,12 @@ function printAlerts()
showElements = false
end
--[[ disabled, due to efficiency reasons limits are honoured only for flow alerts
prefsInputFieldPrefs("Maximum Number of Alerts per Entity",
"The maximum number of alerts per alarmable entity. Alarmable entities are hosts, networks, interfaces and flows. "..
"Once the maximum number of entity alerts is reached, oldest alerts will be overwritten. "..
"Default: 1024.", "ntopng.prefs.", "max_num_alerts_per_entity", prefs.max_num_alerts_per_entity, nil, showElements, false)
--]]
prefsInputFieldPrefs("Maximum Number of Flow Alerts",
"The maximum number of flow alerts. Once the maximum number of alerts is reached, oldest alerts will be overwritten. "..