mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add isVSConfiguredHost and triggertHostNotConfiguredAlert. (#8051)
This commit is contained in:
parent
b1ae8ed1af
commit
a5a2146cfb
2 changed files with 44 additions and 4 deletions
|
|
@ -108,10 +108,16 @@ function alert_vulnerability_scan.format(ifid, alert, alert_type_params, local_e
|
|||
msg = msg .. i18n('vulnerability_scan.solved_issues', { num_issues = alert_type_params.num_cve_solved, cve_solved = cve_solved }) .. " "
|
||||
end
|
||||
|
||||
-- message for host unreachable alert
|
||||
if (alert_type_params.is_up_check_case) then
|
||||
msg = msg .. i18n("vulnerability_scan.host_down_case", { host = alert_type_params.host })
|
||||
end
|
||||
|
||||
-- message for host not configured alert
|
||||
if (alert_type_params.is_host_not_configured) then
|
||||
msg = msg .. i18n("vulnerability_scan.host_not_configured", {host = alert_type_params.host})
|
||||
end
|
||||
|
||||
local host = alert_type_params.host_name
|
||||
if isEmptyString(host) then
|
||||
host = alert_type_params.host
|
||||
|
|
@ -135,7 +141,7 @@ function alert_vulnerability_scan.format(ifid, alert, alert_type_params, local_e
|
|||
end
|
||||
|
||||
local alert_descr = i18n('vulnerability_scan.host_alert', { host = host, msg = msg, url = url, scan_type = scan_type_label })
|
||||
if(alert_type_params.is_up_check_case) then
|
||||
if(alert_type_params.is_up_check_case or alert_type_params.is_host_not_configured) then
|
||||
alert_descr = msg
|
||||
end
|
||||
return alert_descr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue