ntopng/scripts/lua/modules/alert_definitions/alert_flow_risk.lua
2020-09-23 17:58:51 +02:00

29 lines
783 B
Lua

--
-- (C) 2019-20 - ntop.org
--
-- #######################################################
-- @brief Prepare an alert table used to generate the alert
-- @param alert_severity A severity as defined in `alert_consts.alert_severities`
-- @param info A flow info table fetched with `flow.getBlacklistedInfo()`
-- @return A table with the alert built
local function createFlowRisk(alert_severity, info)
local built = {
alert_severity = alert_severity,
alert_type_params = info,
}
return built
end
-- #######################################################
local alert_keys = require "alert_keys"
return {
alert_key = alert_keys.ntopng.alert_flow_risk,
i18n_title = "alerts_dashboard.flow_risk",
icon = "fas fa-exclamation",
creator = createFlowRisk,
}