mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-09 07:39:03 +00:00
Method scanAlerts was called inside a loop over the interfaces in minute.lua. Since scanAlerts was looping over the interfaces as well, this was causing interfaces to be deselected from the outer loop. This commit fixes the issues by forcing scanAlerts to receive an input interface. Fixes #582
19 lines
414 B
Lua
19 lines
414 B
Lua
--
|
|
-- (C) 2013 - ntop.org
|
|
--
|
|
|
|
dirs = ntop.getDirs()
|
|
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|
|
|
require "lua_utils"
|
|
require "alert_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
|