ntopng/scripts/lua/modules/alert_definitions/alert_flow_risk.lua
Matteo Biscosi 0e341f3d0b
Modified flow scripts in view of the new trigger_status (#4710)
* Modified blacklisted script in view of the new flow_script API

* Modified plugins scripting in view of the new API

* Modified flow scripts with the new trigger API

* Fixed creators severity

Co-authored-by: matteo <biscosi@ntop.org>
2020-11-12 13:52:53 +01:00

30 lines
734 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 risk_id Integer nDPI flow risk identifier
-- @return A table with the alert built
local function createFlowRisk(risk_id)
local built = {
alert_type_params = {
risk_id = risk_id
},
}
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,
}