mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Refactors alerts and flow statuses in builtin and plugins
Implements #3811 Implements #3812 Refactors builtin alerts Refactors builtin flow statuses
This commit is contained in:
parent
1c76667b21
commit
78b334e4eb
89 changed files with 680 additions and 39 deletions
|
|
@ -0,0 +1,28 @@
|
|||
--
|
||||
-- (C) 2019-20 - ntop.org
|
||||
--
|
||||
|
||||
local alert_keys = require "alert_keys"
|
||||
|
||||
local function processNotificationFormatter(ifid, alert, info)
|
||||
if info.event_type == "start" then
|
||||
return string.format("%s %s", i18n("alert_messages.ntopng_start"), info.msg_details)
|
||||
elseif info.event_type == "stop" then
|
||||
return string.format("%s %s", i18n("alert_messages.ntopng_stop"), info.msg_details)
|
||||
elseif info.event_type == "update" then
|
||||
return string.format("%s %s", i18n("alert_messages.ntopng_update"), info.msg_details)
|
||||
elseif info.event_type == "anomalous_termination" then
|
||||
return string.format("%s %s", i18n("alert_messages.ntopng_anomalous_termination", {url="https://www.ntop.org/support/need-help-2/need-help/"}), info.msg_details)
|
||||
end
|
||||
|
||||
return "Unknown Process Event: " .. (info.event_type or "")
|
||||
end
|
||||
|
||||
-- #######################################################
|
||||
|
||||
return {
|
||||
alert_key = alert_keys.ntopng.alert_process_notification,
|
||||
i18n_title = "alerts_dashboard.process",
|
||||
i18n_description = processNotificationFormatter,
|
||||
icon = "fas fa-truck",
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue