ntopng/scripts/callbacks/hourly.lua
Simone Mainardi 95a4618c17 Fixes alert scan that was causing possible issues in periodic scripts
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
2016-06-04 18:22:13 +02:00

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