Fixed alert no activity on interface not correctly working (#6291)

This commit is contained in:
Matteo Biscosi 2022-02-08 14:35:15 +01:00
parent b5a7b1a11e
commit 7439f589d7
3 changed files with 8 additions and 6 deletions

View file

@ -19,10 +19,10 @@ local function check_interface_activity(params)
num_logs = params.entity_info.syslog.tot_events
end
local no_if_activity_type = alert_consts.alert_types.alert_no_if_activity.new()
local no_if_activity_type = alert_consts.alert_types.alert_no_if_activity.new(params.entity_info.name)
no_if_activity_type:set_score_error()
no_if_activity_type:set_subtype(getInterfaceName(interface.getId()))
no_if_activity_type:set_subtype(params.entity_info.name)
no_if_activity_type:set_granularity(params.granularity)
local delta_packets = alerts_api.interface_delta_val(params.check.key..".pkts" --[[ metric name --]], params.granularity, num_packets or 0)