Removing lua utils in storage utils (#8227)

* Removing lua_utils from storage_utils

* Remove profiling

* Add missing requires for the 'flowinfo2hostname' method.

* Move clickhouseSupport check to check_redis_prefs
This commit is contained in:
Nicolò Maio 2024-02-19 17:56:26 +01:00 committed by GitHub
parent 7cf91395df
commit 1e9524d483
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 109 additions and 96 deletions

View file

@ -1,5 +1,5 @@
local os_utils = require "os_utils"
require "lua_utils"
require "lua_utils_get"
require "ntop_utils"
require "rrd_paths"
SECONDS_IN_A_HOUR = 3600
@ -289,10 +289,11 @@ function rrd_utils.storageInfo(ifid, timeout)
local dirs = ntop.getDirs()
local paths = getRRDPaths()
local info = { total = 0 }
local os_utils = require "os_utils"
for _, path in pairs(paths) do
local absolute_path = os_utils.fixPath(dirs.workingdir .. "/" .. ifid .. "/".. path .."/")
info[path] = getFolderSize(absolute_path, timeout)
info[path] = getFolderSize(absolute_path, timeout, os_utils)
info["total"] = info["total"] + info[path]
end