mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 16:30:10 +00:00
Changed alert serialization
This commit is contained in:
parent
084e295af8
commit
fb06400fe2
5 changed files with 29 additions and 40 deletions
|
|
@ -38,7 +38,7 @@ end
|
|||
-- ##############################################
|
||||
|
||||
function alert_blacklisted_server_contact:add_extra_info(alert_json)
|
||||
if alert_json and alert_json.custom_cat_file and not isEmptyString(alert_json.custom_cat_file) then
|
||||
if alert_json and alert_json.custom_cat_file and not isEmptyString(alert_json.custom_cat_file) then
|
||||
return " [ " .. i18n("flow_details.blacklist", { blacklist = alert_json.custom_cat_file or "" }) .. " ] "
|
||||
end
|
||||
return ""
|
||||
|
|
@ -54,7 +54,6 @@ end
|
|||
function alert_blacklisted_server_contact.format(ifid, alert, alert_type_params)
|
||||
local who = {}
|
||||
|
||||
tprint(alert)
|
||||
if alert_type_params["cli_blacklisted"] and alert_type_params["cli_blacklisted"] ~= "0" then
|
||||
who[#who + 1] = {
|
||||
type = i18n("client"),
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ function alert_flow_blacklisted.format(ifid, alert, alert_type_params)
|
|||
who = who_string,
|
||||
blacklist = black_list_names
|
||||
})
|
||||
|
||||
|
||||
if #who == 0 and alert_type_params["cat_blacklisted"] then
|
||||
if ntop.getCache(blacklist_debug) == '1' then
|
||||
traceError(TRACE_NORMAL, TRACE_CONSOLE, "Blacklisted flow with no blacklisted client nor server. Info:\n")
|
||||
|
|
@ -98,6 +98,8 @@ function alert_flow_blacklisted.format(ifid, alert, alert_type_params)
|
|||
})
|
||||
end
|
||||
|
||||
-- res = alert_type_params["custom_cat_file"]
|
||||
tprint(res)
|
||||
return res
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue