Added severity to ntopng checks table

This commit is contained in:
MatteoBiscosi 2022-10-20 10:34:23 +02:00
parent 933e8339ec
commit eda4cfb088
48 changed files with 406 additions and 340 deletions

View file

@ -6,9 +6,18 @@ local alert_consts = require("alert_consts")
local alerts_api = require("alerts_api")
local checks = require("checks")
local script
local script = {
-- Script category
category = checks.check_categories.internals,
severity = alert_consts.get_printable_severities().error,
-- ##############################################
hooks = {},
gui = {
i18n_title = "alerts_dashboard.slow_periodic_activity",
i18n_description = "alerts_dashboard.slow_periodic_activity_descr",
}
}
-- #################################################################
@ -23,8 +32,7 @@ local function check_slow_periodic_activity(params)
ps_stats["max_duration_secs"] * 1000
)
alert:set_score_error()
alert:set_granularity(params.granularity)
alert:set_info(params)
alert:set_subtype(ps_name)
if delta > 0 then
@ -39,20 +47,7 @@ end
-- #################################################################
script = {
-- Script category
category = checks.check_categories.internals,
hooks = {
min = check_slow_periodic_activity,
},
gui = {
i18n_title = "alerts_dashboard.slow_periodic_activity",
i18n_description = "alerts_dashboard.slow_periodic_activity_descr",
}
}
script.hooks.min = check_slow_periodic_activity
-- #################################################################