mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 09:20:10 +00:00
Clean callback scripts code
This commit is contained in:
parent
e5e6ff6cd8
commit
2affcfb208
6 changed files with 157 additions and 142 deletions
|
|
@ -7,14 +7,18 @@ package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|||
|
||||
require "lua_utils"
|
||||
require "alert_utils"
|
||||
local callback_utils = require "callback_utils"
|
||||
|
||||
if (ntop.isPro()) then
|
||||
package.path = dirs.installdir .. "/pro/scripts/callbacks/?.lua;" .. package.path
|
||||
require("hourly")
|
||||
end
|
||||
|
||||
-- Scan "hour" alerts
|
||||
for _, ifname in pairs(interface.getIfNames()) do
|
||||
scanAlerts("hour", ifname)
|
||||
end
|
||||
local verbose = ntop.verboseTrace()
|
||||
local ifnames = interface.getIfNames()
|
||||
|
||||
-- Scan "hour" alerts
|
||||
callback_utils.foreachInterface(ifnames, verbose, function(ifname, ifstats)
|
||||
scanAlerts("hour", ifname)
|
||||
end)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue