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

@ -529,8 +529,26 @@ function printInterfaceIndex(idx)
end
end
-- ##############################################
-- NOTE: global nindex support may be enabled but some disable on some interfaces
function interfaceHasClickHouseSupport()
require "check_redis_prefs"
return(hasClickHouseSupport() and ntop.getPrefs()["is_dump_flows_to_clickhouse_enabled"])
end
-- ###########################################
function swapKeysValues(tbl)
local new_tbl = {}
for k, v in pairs(tbl or {}) do
new_tbl[v] = k
end
return new_tbl
end
if(trace_script_duration ~= nil) then
io.write(debug.getinfo(1,'S').source .." executed in ".. (os.clock()-clock_start)*1000 .. " ms\n")
end