mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
Added remediation docs, modified function to get remediation url (#8674)
* Fixed telemetry response format, no impact on base ntopng, different endpoint * Fixed error * Added toboolean instead of string compare * Added ASN name in ASN timeseries page * Added exportes interfaces page * Exporters interfaces table config * Updated dist ref * Added remediation docs, modified function to get remediation url #8669 #8670 #8395
This commit is contained in:
parent
896315e568
commit
7ab51d5f12
8 changed files with 583 additions and 88 deletions
|
|
@ -387,8 +387,14 @@ function alert_utils.formatFlowAlertMessage(ifid, alert, alert_json, add_score,
|
|||
local alert_risk
|
||||
|
||||
if tonumber(alert.alert_id) then
|
||||
alert_risk = ntop.getFlowAlertRisk(tonumber(alert.alert_id))
|
||||
end
|
||||
alert_risk = ntop.getFlowAlertRisk(tonumber(alert.alert_id))
|
||||
|
||||
if (tonumber(alert_risk) == 0) then
|
||||
alert_src = "ntopng"
|
||||
else
|
||||
alert_src = "nDPI"
|
||||
end
|
||||
end
|
||||
|
||||
if not alert_json then
|
||||
alert_json = alert_utils.getAlertInfo(alert)
|
||||
|
|
@ -427,8 +433,8 @@ function alert_utils.formatFlowAlertMessage(ifid, alert, alert_json, add_score,
|
|||
-- Add the link to the documentation
|
||||
if alert_risk and alert_risk > 0 then
|
||||
msg = string.format("%s %s %s",
|
||||
msg, flow_risk_utils.get_documentation_link(alert_risk),
|
||||
flow_risk_utils.get_remediation_documentation_link(alert.alert_id))
|
||||
msg, flow_risk_utils.get_documentation_link(alert_risk, alert_src),
|
||||
flow_risk_utils.get_remediation_documentation_link(alert.alert_id, alert_src))
|
||||
local info_msg = alert_utils.get_flow_risk_info(alert_risk, alert_json)
|
||||
|
||||
-- Add check info_msg ~= alert.info to avoid duplicated in description msg
|
||||
|
|
@ -807,11 +813,12 @@ function alert_utils.format_other_alerts(alert_bitmap, predominant_alert, alert_
|
|||
message = alert_utils.format_score(message, alert_score)
|
||||
end
|
||||
|
||||
local alert_risk = ntop.getFlowAlertRisk(alert_id)
|
||||
if alert_risk > 0 then
|
||||
local alert_risk = ntop.getFlowAlertRisk(tonumber(alert_id))
|
||||
|
||||
if alert_risk > 0 then -- source is nDPI
|
||||
if not no_html then
|
||||
message = string.format("%s %s", message,
|
||||
flow_risk_utils.get_documentation_link(alert_risk))
|
||||
flow_risk_utils.get_documentation_link(alert_risk, "nDPI"))
|
||||
end
|
||||
local info_msg = alert_utils.get_flow_risk_info(alert_risk, alert_json)
|
||||
if not isEmptyString(info_msg) then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue