mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Alert improvements
- check areAlertsEnabled() result is now cached - housekeeping.lua skips alerts when disabled
This commit is contained in:
parent
7ffb4df9a6
commit
ab6455329a
3 changed files with 31 additions and 13 deletions
|
|
@ -564,14 +564,26 @@ function noHtml(s)
|
|||
return unescape(cleaned)
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function areAlertsEnabled()
|
||||
return (ntop.getPref("ntopng.prefs.disable_alerts_generation") ~= "1")
|
||||
if(__alert_enabled == nil) then
|
||||
-- Not too nice as changes will be read periodically as new VMs are reloaded
|
||||
-- but at least we avoid breaking up the performance
|
||||
__alert_enabled = (ntop.getPref("ntopng.prefs.disable_alerts_generation") ~= "1")
|
||||
end
|
||||
|
||||
return (__alert_enabled)
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function isScoreEnabled()
|
||||
return(ntop.isEnterpriseM())
|
||||
end
|
||||
|
||||
-- ##############################################
|
||||
|
||||
function hasTrafficReport()
|
||||
local ts_utils = require("ts_utils_core")
|
||||
local is_pcap_dump = interface.isPcapDumpInterface()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue