Added to double severity alert, single default alert

Implements #4919
This commit is contained in:
Matteo Biscosi 2021-01-28 18:17:27 +01:00
parent 055fbd5589
commit b1134b611f
7 changed files with 34 additions and 16 deletions

View file

@ -20,14 +20,14 @@ local handler = {}
-- @param flow_score An integer score that will be added to the total flow score
-- @param cli_score An integer score that will be added to the client score
-- @param srv_score An integer score that will be added to the server score
function handler.handle_risk(risk_id, flow_score, cli_score, srv_score)
function handler.handle_risk(conf, risk_id, flow_score, cli_score, srv_score)
-- Set a flow status for the generic flow_risk. This will also
-- cause an alert to be generated.
local alert = alert_consts.alert_types.alert_flow_risk.new(
risk_id
)
alert:set_severity(alert_severities.warning)
alert:set_severity(conf.severity)
alert:trigger_status(cli_score or 0, srv_score or 0, flow_score or 0)
end