Implements old RRD files deletion (frontend + partial backend)

This commit is contained in:
Simone Mainardi 2017-10-04 19:39:32 +02:00
parent 5ebfb6f01c
commit a99c7a9544
11 changed files with 117 additions and 6 deletions

View file

@ -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