Fixes Error with 'P2P Traffic Alert' user script

Fixes #4447
This commit is contained in:
Simone Mainardi 2020-09-17 18:34:21 +02:00
parent a5078cd4f5
commit 020c1cd0a1
3 changed files with 7 additions and 6 deletions

View file

@ -34,10 +34,10 @@ local script = {
-- #################################################################
function script.hooks.all(params)
local value = alerts_api.host_delta_val(script.key, params.granularity, host.getCategoryBytes(script.env.p2p_app_id)["bytes"])
local value = alerts_api.host_delta_val(script.key, params.granularity, host.getCategoryBytes(script.env.p2p_app_id))
-- Check if the configured threshold is crossed by the value and possibly trigger an alert
alerts_api.checkThresholdAlert(params, alert_consts.alert_types.alert_threshold_cross, value)
-- Check if the configured threshold is crossed by the value and possibly trigger an alert
alerts_api.checkThresholdAlert(params, alert_consts.alert_types.alert_threshold_cross, value)
end
-- #################################################################