mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Reworks TCP issues flow user script
This commit is contained in:
parent
965198e928
commit
389f9c2beb
15 changed files with 273 additions and 127 deletions
|
|
@ -8,11 +8,24 @@ local alert_keys = require "alert_keys"
|
|||
|
||||
-- @brief Prepare an alert table used to generate the alert
|
||||
-- @param alert_severity A severity as defined in `alert_consts.alert_severities`
|
||||
-- @param tcp_stats A lua table with TCP stats obtained with flow.getTCPStats
|
||||
-- @param cli2srv_pkts Number of packets sent from the client to the server
|
||||
-- @param srv2cli_pkts Number of packets sent from the server to the client
|
||||
-- @param is_severe A boolean indicating whether connection issues are severe
|
||||
-- @param client_issues A boolean indicating if the client has connection issues
|
||||
-- @param server_issues A boolean indicating if the server has connection issues
|
||||
-- @return A table with the alert built
|
||||
local function createConnectionIssues(alert_severity)
|
||||
local function createConnectionIssues(alert_severity, tcp_stats, cli2srv_pkts, srv2cli_pkts, is_severe, client_issues, server_issues)
|
||||
local built = {
|
||||
alert_severity = alert_severity,
|
||||
alert_type_params = {},
|
||||
alert_type_params = {
|
||||
tcp_stats = tcp_stats,
|
||||
cli2srv_pkts = cli2srv_pkts,
|
||||
srv2cli_pkts = srv2cli_pkts,
|
||||
is_severe = is_severe,
|
||||
client_issues = client_issues,
|
||||
server_issues = server_issues,
|
||||
},
|
||||
}
|
||||
|
||||
return built
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue