Added alert for log goodput flows

This commit is contained in:
Luca Deri 2020-11-14 00:23:35 +01:00
parent e7a6682aba
commit 2120bf2486
9 changed files with 130 additions and 15 deletions

View file

@ -0,0 +1,23 @@
--
-- (C) 2019-20 - ntop.org
--
local status_keys = require "flow_keys"
local alert_consts = require("alert_consts")
local format_utils = require("format_utils")
-- #################################################################
local function formatFlowLowGoodput(info)
return i18n("flow_details.flow_low_goodput", { ratio = format_utils.round(info.goodput_ratio,2) })
end
-- #################################################################
return {
status_key = status_keys.ntopng.status_low_goodput,
alert_type = alert_consts.alert_types.alert_flow_low_goodput,
i18n_title = "flow_details.flow_low_goodput",
i18n_description = formatFlowLowGoodput
}