mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 00:19:33 +00:00
parent
055fbd5589
commit
b1134b611f
7 changed files with 34 additions and 16 deletions
|
|
@ -16,6 +16,12 @@ local script = {
|
|||
|
||||
default_enabled = true,
|
||||
|
||||
is_alert = true,
|
||||
|
||||
default_value = {
|
||||
severity = alert_severities.error,
|
||||
},
|
||||
|
||||
-- NOTE: hooks defined below
|
||||
hooks = {},
|
||||
|
||||
|
|
@ -75,9 +81,9 @@ function script.hooks.protocolDetected(params)
|
|||
)
|
||||
|
||||
if cli_score >= (flow_consts.max_score // 2) then
|
||||
alert:set_severity(alert_severities.error)
|
||||
alert:set_severity(params.user_script_config.severity)
|
||||
else
|
||||
alert:set_severity(alert_severities.warning)
|
||||
alert:set_severity(params.user_script_config.severity)
|
||||
end
|
||||
|
||||
alert:trigger_status(cli_score, srv_score, flow_score)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue