mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 09:20:10 +00:00
Implements flow callbacks and alerts in C++
This commit is contained in:
parent
3659188002
commit
aea9138bfb
353 changed files with 10790 additions and 4455 deletions
|
|
@ -13,9 +13,6 @@ local script = {
|
|||
-- Script category
|
||||
category = user_scripts.script_categories.security,
|
||||
|
||||
-- NOTE: hooks defined below
|
||||
hooks = {},
|
||||
|
||||
filter = {
|
||||
-- Overrides filter.default_fields in the flow entry of user_scripts.available_subdirs
|
||||
-- This will make default filters populated only with the source IP
|
||||
|
|
@ -31,20 +28,4 @@ local script = {
|
|||
|
||||
-- #################################################################
|
||||
|
||||
function script.hooks.protocolDetected(now)
|
||||
if false then -- TODO: set to true to execute
|
||||
local cli_score, srv_score, flow_score = 10, 10, 10
|
||||
local alert = alert_consts.alert_types.alert_flow_new_api_demo.new(
|
||||
"one_flow_param",
|
||||
"another_flow_param"
|
||||
)
|
||||
|
||||
alert:set_severity(alert_severities.error)
|
||||
|
||||
alert:trigger_status(cli_score, srv_score, flow_score)
|
||||
end
|
||||
end
|
||||
|
||||
-- #################################################################
|
||||
|
||||
return script
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue