Changes set_severity to set_score

This commit is contained in:
Simone Mainardi 2021-05-05 09:59:04 +02:00
parent ef65671794
commit bbe6a3de37
20 changed files with 26 additions and 81 deletions

View file

@ -6,7 +6,6 @@ require "lua_utils"
local sys_utils = require "sys_utils"
local json = require "dkjson"
local alerts_api = require "alerts_api"
local alert_severities = require "alert_severities"
local alert_consts = require "alert_consts"
local endpoint_key = "shell_alert_endpoint"
@ -16,7 +15,6 @@ local shell = {
name = "Shell Script",
endpoint_params = {
{ param_name = "shell_script" },
-- TODO: configure severity (Errors, Errors and Warnings, All)
},
endpoint_template = {
plugin_key = endpoint_key,
@ -103,7 +101,7 @@ function shell.runScript(alerts, settings)
alert_consts.alertTypeLabel(alert["alert_id"], true)
)
type_info:set_severity(alert_severities.notice)
type_info:set_score(10)
type_info:store(entity_info)
end -- for