mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 09:20:10 +00:00
Implements #4919 custom alert severity
This commit is contained in:
parent
89b21df6f6
commit
10fb8bbecc
64 changed files with 317 additions and 49 deletions
|
|
@ -16,6 +16,10 @@ local script = {
|
|||
-- NOTE: hooks defined below
|
||||
hooks = {},
|
||||
|
||||
default_value = {
|
||||
severity = alert_severities.error,
|
||||
},
|
||||
|
||||
gui = {
|
||||
i18n_title = "New Host Alert API Demo",
|
||||
i18n_description = "Demonstrate the use of the new API for host alerts",
|
||||
|
|
@ -31,7 +35,7 @@ function script.hooks.min(params)
|
|||
"another_param"
|
||||
)
|
||||
|
||||
alert:set_severity(alert_severities.error)
|
||||
alert:set_severity(params.user_script_config.severity)
|
||||
alert:set_granularity(params.granularity)
|
||||
|
||||
if cond then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue