mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 10:41:34 +00:00
parent
055fbd5589
commit
b1134b611f
7 changed files with 34 additions and 16 deletions
|
|
@ -5,13 +5,13 @@
|
|||
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
|
||||
|
||||
-- #################################################################
|
||||
|
||||
local function check_interface_drops(params)
|
||||
local alert_severities = require "alert_severities"
|
||||
local alert_consts = require "alert_consts"
|
||||
local info = params.entity_info
|
||||
local stats = info.stats_since_reset
|
||||
|
|
@ -24,7 +24,7 @@ local function check_interface_drops(params)
|
|||
threshold
|
||||
)
|
||||
|
||||
alert:set_severity(alert_severities.error)
|
||||
alert:set_severity(params.user_script_config.severity)
|
||||
alert:set_granularity(params.granularity)
|
||||
|
||||
if((stats.packets > 100) and (drop_perc > threshold)) then
|
||||
|
|
@ -45,6 +45,7 @@ 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