mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-02 00:40:10 +00:00
Modified flow scripts in view of the new trigger_status (#4710)
* Modified blacklisted script in view of the new flow_script API * Modified plugins scripting in view of the new API * Modified flow scripts with the new trigger API * Fixed creators severity Co-authored-by: matteo <biscosi@ntop.org>
This commit is contained in:
parent
283bd7179c
commit
0e341f3d0b
50 changed files with 146 additions and 209 deletions
|
|
@ -7,9 +7,8 @@ local alert_keys = require "alert_keys"
|
|||
-- #######################################################
|
||||
|
||||
-- Called by flow.triggerStatus() in zero_tcp_window.lua
|
||||
local function createZeroTcpWindow(alert_severity, is_client, is_server)
|
||||
local function createZeroTcpWindow(is_client, is_server)
|
||||
local zero_tcp_window_type = {
|
||||
alert_severity = alert_severity,
|
||||
alert_type_params = {
|
||||
is_client = is_client,
|
||||
is_server = is_server,
|
||||
|
|
|
|||
|
|
@ -51,17 +51,13 @@ local function check_tcp_window(now)
|
|||
server_score = high_score
|
||||
end
|
||||
|
||||
-- Now it's time to generate the alert
|
||||
flow.triggerStatus(
|
||||
flow_consts.status_types.status_zero_tcp_window.create(
|
||||
flow_consts.status_types.status_zero_tcp_window.alert_severity,
|
||||
zerowin.client,
|
||||
zerowin.server
|
||||
),
|
||||
high_score --[[ flow score]],
|
||||
client_score --[[ cli score ]],
|
||||
server_score --[[ srv score ]]
|
||||
-- Now it's time to generate the alert
|
||||
local zero_tcp_window_type = flow_consts.status_types.status_zero_tcp_window.create(
|
||||
zerowin.client,
|
||||
zerowin.server
|
||||
)
|
||||
|
||||
alerts_api.trigger_status(zero_tcp_window_type, alert_consts.alert_severities.warning, client_score, server_score, high_score)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue