Add driver:deleteOldData and delete old RRDs

This commit is contained in:
emanuele-f 2018-12-10 17:41:41 +01:00
parent 773df632b4
commit 95713ddfc6
13 changed files with 125 additions and 89 deletions

View file

@ -251,16 +251,6 @@ 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
-- ########################################################
function callback_utils.uploadTSdata()
local ts_utils = require("ts_utils_core")
local drivers = ts_utils.listActiveDrivers()