ntopng/scripts/lua/get_num_alerts.lua
Emanuele Faranda 5f9e8b17df
Implement System interface
The system interface now holds system wide alerts and timeseries
2019-06-03 08:53:26 +00:00

20 lines
395 B
Lua

--
-- (C) 2016-18 - ntop.org
--
dirs = ntop.getDirs()
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
require "lua_utils"
require "alert_utils"
if _GET["ifid"] ~= nil then
interface.select(_GET["ifid"])
end
sendHTTPContentTypeHeader('text/html')
if(_GET["status"] ~= nil) then
local num = getNumAlerts(_GET["status"], _GET)
print(tostring(num))
end