Implement alerts via email

Closes #272
This commit is contained in:
emanuele-f 2018-04-03 20:49:43 +02:00
parent 9889c291cc
commit 0f5d76ca74
14 changed files with 284 additions and 31 deletions

View file

@ -2546,8 +2546,32 @@ end
-- #################################
function alertNotificationActionToLabel(action)
local label = ""
if action == "engage" then
label = "Alert Engaged: "
elseif action == "release" then
label = "Alert Released: "
end
return label
end
-- #################################
--
-- Generic alerts extenral report
--
-- Guidelines:
--
-- - modules are enabled with the getAlertNotificationModuleEnableKey key
-- - module severity is defined with the getAlertNotificationModuleSeverityKey key
-- - A [module] name must have a corresponding modules/[module]_utils.lua script
--
local ALERT_NOTIFICATION_MODULES = {
"nagios", "slack"
"nagios", "email", "slack"
}
function getAlertNotificationModuleEnableKey(module_name, short)