mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Added http return code to http alerts (#5988)
This commit is contained in:
parent
cc375e5b24
commit
7eb1de3420
2 changed files with 15 additions and 6 deletions
|
|
@ -4627,12 +4627,20 @@ end
|
|||
-- ##############################################
|
||||
|
||||
function addHTTPInfoToAlertDescr(msg, alert_json)
|
||||
if (alert_json)
|
||||
and (table.len(alert_json["http"]) > 0)
|
||||
and (alert_json["http"]["protos.http.last_method"])then
|
||||
msg = msg .. string.format(" [%s: %s]",
|
||||
i18n("last_http_method"),
|
||||
alert_json["http"]["protos.http.last_method"])
|
||||
if ((alert_json)
|
||||
and (table.len(alert_json["http"]) > 0)) then
|
||||
|
||||
if alert_json["http"]["protos.http.last_method"] then
|
||||
msg = msg .. string.format(" [%s: %s]",
|
||||
i18n("last_http_method"),
|
||||
alert_json["http"]["protos.http.last_method"])
|
||||
end
|
||||
|
||||
if alert_json["http"]["protos.http.last_return_code"] then
|
||||
msg = msg .. string.format(" [%s: %s]",
|
||||
i18n("last_http_return_code"),
|
||||
alert_json["http"]["protos.http.last_return_code"])
|
||||
end
|
||||
end
|
||||
|
||||
return msg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue