mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Adds alert_flow_blacklisted.lua
This commit is contained in:
parent
b82738330c
commit
f9de2bdb8a
1 changed files with 29 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
--
|
||||
-- (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 createBlacklisted(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_blacklisted,
|
||||
i18n_title = "alerts_dashboard.blacklisted_flow",
|
||||
icon = "fas fa-exclamation",
|
||||
creator = createBlacklisted,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue