mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-03 01:10:10 +00:00
parent
fcdc69963f
commit
1cbdbbd339
11 changed files with 19 additions and 16 deletions
|
|
@ -11,7 +11,6 @@ local alert_consts = require("alert_consts")
|
|||
-- #################################################################
|
||||
|
||||
-- @brief This function is called each time this status should be formatted
|
||||
-- @param status the status_id
|
||||
-- @param flowstatus_info: the data passed in flow.triggerStatus by
|
||||
-- the triggering user_script (user_scripts/flow/example.lua in this plugin).
|
||||
-- @return a descriptive string of the flow status
|
||||
|
|
|
|||
|
|
@ -102,12 +102,12 @@ function script.hooks.protocolDetected(now, config)
|
|||
-- Check if the server port is not in the configured exclusion list
|
||||
if not config["exclude_ports"][flow_info["srv.port"]] then
|
||||
-- Set an invalid status on the flow and trigger the corresponding alert
|
||||
flow.triggerStatus(flow_consts.status_types.status_example.status_id, {
|
||||
flow.triggerStatus(flow_consts.status_types.status_example, {
|
||||
bad_port = flow_info["srv.port"]
|
||||
}, 60--[[ flow score]], 50--[[ cli score ]], 10--[[ srv score ]])
|
||||
else
|
||||
-- A previosly set status can be cleared
|
||||
-- flow.clearStatus(flow_consts.status_types.status_example.status_id)
|
||||
-- flow.clearStatus(flow_consts.status_types.status_example)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue