mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 15:39:33 +00:00
[VA] fix add host
This commit is contained in:
parent
c6430b9d45
commit
c1ef6d1df0
1 changed files with 11 additions and 2 deletions
|
|
@ -35,6 +35,7 @@ local dirs = ntop.getDirs()
|
|||
package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
||||
package.path = dirs.installdir .. "/scripts/lua/pro/modules/?.lua;" .. package.path
|
||||
package.path = dirs.installdir .. "/scripts/lua/modules/vulnerability_scan/?.lua;" .. package.path
|
||||
--package.path = dirs.installdir .. "/scripts/lua/modules/recipients/?.lua;" .. package.path
|
||||
|
||||
require "lua_utils" -- used by tprint (debug)
|
||||
|
||||
|
|
@ -45,6 +46,7 @@ local scanned_hosts_changes_key = "ntopng.alerts.scanned_hosts_changes"
|
|||
|
||||
local json = require("dkjson")
|
||||
local format_utils = require("format_utils")
|
||||
--local recipients = require("recipients")
|
||||
|
||||
local debug_print = false
|
||||
local vs_utils = {}
|
||||
|
|
@ -424,8 +426,13 @@ function vs_utils.update_ts_counters()
|
|||
for _,item in ipairs(hosts_details) do
|
||||
|
||||
hosts_count = hosts_count + 1
|
||||
open_ports_count = open_ports_count + item.num_open_ports
|
||||
count_cve = count_cve + item.num_vulnerabilities_found
|
||||
|
||||
if item.num_open_ports ~= nil then
|
||||
open_ports_count = open_ports_count + item.num_open_ports
|
||||
end
|
||||
if item.num_vulnerabilities_found ~= nil then
|
||||
count_cve = count_cve + item.num_vulnerabilities_found
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
@ -699,6 +706,8 @@ function vs_utils.schedule_periodic_scan(periodicity)
|
|||
end
|
||||
end
|
||||
|
||||
--recipients.sendMessageByNotificationType(periodicity, "vulnerability_scans")
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue