Check low goodput for established connections (e.g. do not generate alerts for connection reset with 0 goodput) (#5068)

This commit is contained in:
Alfredo Cardigliano 2021-02-26 16:39:15 +01:00
parent 3ae569b594
commit 47b3c8a969

View file

@ -57,17 +57,18 @@ local script = {
-- #################################################################
local function checkFlowGoodput(now, conf)
local ratio = flow.getGoodputRatio()
if(ratio <= 60) then
local cli_score, srv_score, flow_score = 10, 10, 10
local alert = alert_consts.alert_types.alert_flow_low_goodput.new(
ratio
)
-- Check 3WHS - skip connection not established or with no data packet exchanged
if flow.isTwhOK() and flow.getPackets() > 3 then
-- Check Goodput/Bytes Ratio
local ratio = flow.getGoodputRatio()
if(ratio and ratio <= 60) then
local cli_score, srv_score, flow_score = 10, 10, 10
local alert = alert_consts.alert_types.alert_flow_low_goodput.new(ratio)
alert:set_severity(conf.severity)
alert:set_severity(conf.severity)
alert:trigger_status(cli_score, srv_score, flow_score)
alert:trigger_status(cli_score, srv_score, flow_score)
end
end
end