mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 02:16:39 +00:00
Changes set_severity to set_score
This commit is contained in:
parent
ef65671794
commit
bbe6a3de37
20 changed files with 26 additions and 81 deletions
|
|
@ -5,7 +5,6 @@
|
|||
local alerts_api = require("alerts_api")
|
||||
local user_scripts = require("user_scripts")
|
||||
local alert_consts = require("alert_consts")
|
||||
local alert_severities = require "alert_severities"
|
||||
|
||||
local script
|
||||
|
||||
|
|
@ -24,7 +23,7 @@ local function check_interface_drops(params)
|
|||
threshold
|
||||
)
|
||||
|
||||
alert:set_severity(params.user_script_config.severity)
|
||||
alert:set_score(100)
|
||||
alert:set_granularity(params.granularity)
|
||||
|
||||
if((stats.packets > 100) and (drop_perc > threshold)) then
|
||||
|
|
@ -45,7 +44,6 @@ script = {
|
|||
-- "> 5%"
|
||||
operator = "gt",
|
||||
threshold = 5,
|
||||
severity = alert_severities.error,
|
||||
},
|
||||
|
||||
-- This script is only for alerts generation
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue