mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 10:41:34 +00:00
Refactors alert_severities into an independend Lua module
This commit is contained in:
parent
e683509dec
commit
b3dc39c641
109 changed files with 317 additions and 264 deletions
|
|
@ -7,7 +7,7 @@ local alert_keys = require "alert_keys"
|
|||
-- #######################################################
|
||||
|
||||
-- @brief Prepare an alert table used to generate the alert
|
||||
-- @param alert_severity A severity as defined in `alert_consts.alert_severities`
|
||||
-- @param alert_severity A severity as defined in `alert_severities`
|
||||
-- @return A table with the alert built
|
||||
local function createFlowLowGoodput(goodput_ratio)
|
||||
local built = {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
local flow_consts = require("flow_consts")
|
||||
local user_scripts = require("user_scripts")
|
||||
local alerts_api = require "alerts_api"
|
||||
local alert_consts = require("alert_consts")
|
||||
local alert_severities = require "alert_severities"
|
||||
|
||||
-- #################################################################
|
||||
|
||||
|
|
@ -34,7 +34,7 @@ local function checkFlowGoodput()
|
|||
if(ratio <= 60) then
|
||||
local cli_score, srv_score, flow_score = 10, 10, 10
|
||||
alerts_api.trigger_status(flow_consts.status_types.status_low_goodput.create(ratio),
|
||||
alert_consts.alert_severities.notice,
|
||||
alert_severities.notice,
|
||||
cli_score, srv_score, flow_score)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue