mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Add aggregated flows data retention. (#7497)
This commit is contained in:
parent
c8bbb0196b
commit
73ea3b6dfc
5 changed files with 50 additions and 6 deletions
|
|
@ -7,6 +7,7 @@ package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
|
|||
|
||||
|
||||
local DEFAULT_DATA_RETENTION_DAYS = 30
|
||||
local DEFAULT_AGGREGATED_FLOWS_DATA_RETENTION_DAYS = 60
|
||||
local DEFAULT_DATA_RETENTION_DAYS_KEY = "ntopng.prefs.data_retention_days"
|
||||
local FLOWS_AND_ALERTS_DATA_RETENTION_DAYS_KEY = "ntopng.prefs.flows_and_alerts_data_retention_days"
|
||||
local TS_AND_STATS_DATA_RETENTION_DAYS_KEY = "ntopng.prefs.ts_and_stats_data_retention_days"
|
||||
|
|
@ -21,6 +22,12 @@ end
|
|||
|
||||
-- ########################################################
|
||||
|
||||
function data_retention_utils.getAggregatedFlowsDataRetention()
|
||||
return DEFAULT_AGGREGATED_FLOWS_DATA_RETENTION_DAYS
|
||||
end
|
||||
|
||||
-- ########################################################
|
||||
|
||||
function data_retention_utils.getFlowsAndAlertsDataRetentionDays()
|
||||
local data_retention = ntop.getCache(FLOWS_AND_ALERTS_DATA_RETENTION_DAYS_KEY) or ntop.getCache(DEFAULT_DATA_RETENTION_DAYS_KEY)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue