Improve flow alert trigger logic and fix support for custom message

This commit is contained in:
emanuele-f 2019-10-15 18:35:48 +02:00
parent 8b9dd98b55
commit 9ea7ff01b8
8 changed files with 76 additions and 45 deletions

View file

@ -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