mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-05 10:41:34 +00:00
Rework network threshold alerts definition
This commit is contained in:
parent
55cf8ffcf4
commit
e26a7949ac
5 changed files with 105 additions and 129 deletions
29
scripts/callbacks/interface/alerts/network/egress.lua
Normal file
29
scripts/callbacks/interface/alerts/network/egress.lua
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
--
|
||||
-- (C) 2019 - ntop.org
|
||||
--
|
||||
|
||||
local alerts_api = require("alerts_api")
|
||||
local alert_consts = require("alert_consts")
|
||||
|
||||
local check_module = {
|
||||
key = "egress",
|
||||
alert_type = alert_consts.alert_types.threshold_cross,
|
||||
check_function = alerts_api.threshold_check_function,
|
||||
|
||||
gui = {
|
||||
i18n_title = "alerts_thresholds_config.egress_traffic",
|
||||
i18n_description = "alerts_thresholds_config.alert_network_egress_description",
|
||||
i18n_field_unit = alert_consts.field_units.bytes,
|
||||
input_builder = alerts_api.threshold_cross_input_builder,
|
||||
}
|
||||
}
|
||||
|
||||
-- #################################################################
|
||||
|
||||
function check_module.get_threshold_value(granularity, info)
|
||||
return alerts_api.network_delta_val(check_module.key, granularity, info["egress"])
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
return check_module
|
||||
Loading…
Add table
Add a link
Reference in a new issue