mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Lowered the maximum amount of alert for jailed host (#8311) and added cleanup at startup
This commit is contained in:
parent
260510289e
commit
d397d47555
2 changed files with 20 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ local drop_host_pool_utils = {}
|
|||
drop_host_pool_utils.ids_ips_jail_add_key = "ntopng.cache.ids_ips_jail_add"
|
||||
drop_host_pool_utils.ids_ips_jail_remove_key = "ntopng.cache.ids_ips_jail_remove"
|
||||
|
||||
drop_host_pool_utils.max_ids_ips_log_queue_len = 1024
|
||||
drop_host_pool_utils.max_ids_ips_log_queue_len = 256
|
||||
|
||||
-- ############################################
|
||||
|
||||
|
|
@ -144,4 +144,19 @@ end
|
|||
|
||||
-- ############################################
|
||||
|
||||
function drop_host_pool_utils.clean_list()
|
||||
if is_ids_ips_log_enabled then
|
||||
local alert = ntop.lpopCache(drop_host_pool_utils.ids_ips_jail_add_key)
|
||||
while(alert) do
|
||||
alert = ntop.lpopCache(drop_host_pool_utils.ids_ips_jail_add_key)
|
||||
end
|
||||
alert = ntop.lpopCache(drop_host_pool_utils.ids_ips_jail_remove_key)
|
||||
while(alert) do
|
||||
alert = ntop.lpopCache(drop_host_pool_utils.ids_ips_jail_remove_key)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- ############################################
|
||||
|
||||
return drop_host_pool_utils
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue