mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Improve flow alert trigger logic and fix support for custom message
This commit is contained in:
parent
8b9dd98b55
commit
9ea7ff01b8
8 changed files with 76 additions and 45 deletions
|
|
@ -674,8 +674,8 @@ local function formatRawFlow(record, flow_json, skip_add_links)
|
|||
|
||||
local decoded = json.decode(flow_json)
|
||||
|
||||
if type(decoded["status_info"]) == "string" then
|
||||
-- This is for backward compatibility
|
||||
if(type(decoded["status_info"]) == "string") and (decoded["status_info"][1] == "{") then
|
||||
-- status_info may contain a JSON string or a plain message
|
||||
decoded["status_info"] = json.decode(decoded["status_info"])
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue