mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Implements old RRD files deletion (frontend + partial backend)
This commit is contained in:
parent
5ebfb6f01c
commit
a99c7a9544
11 changed files with 117 additions and 6 deletions
|
|
@ -136,4 +136,14 @@ end
|
|||
|
||||
-- ########################################################
|
||||
|
||||
function callback_utils.harverstOldRRDFiles(ifname)
|
||||
-- currently this is only implemented for old devices files. It should actually be implemented for other rrds as well
|
||||
local rrd_max_days = ntop.getPref("ntopng.prefs.rrd_files_retention")
|
||||
if isEmptyString(rrd_max_days) then rrd_max_days = 30 end
|
||||
|
||||
ntop.deleteOldRRDs(getInterfaceId(ifname), tonumber(rrd_max_days) * 60 * 60 * 24)
|
||||
end
|
||||
|
||||
-- ########################################################
|
||||
|
||||
return callback_utils
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue