mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Added severity to ntopng checks table
This commit is contained in:
parent
933e8339ec
commit
eda4cfb088
48 changed files with 406 additions and 340 deletions
|
|
@ -6,7 +6,19 @@ 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",
|
||||
}
|
||||
}
|
||||
|
||||
-- #################################################################
|
||||
|
||||
|
|
@ -21,8 +33,7 @@ local function check_slow_periodic_activity(params)
|
|||
(ps_stats["max_duration_secs"] or 0) * 1000
|
||||
)
|
||||
|
||||
alert:set_score_error()
|
||||
alert:set_granularity(params.granularity)
|
||||
alert:set_info(params)
|
||||
alert:set_subtype(ps_name)
|
||||
|
||||
if delta > 0 then
|
||||
|
|
@ -37,20 +48,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
|
||||
|
||||
-- #################################################################
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue