Log influxdb queries in redis

This commit is contained in:
emanuele-f 2019-11-26 13:54:52 +01:00
parent a0775443a7
commit 2a04c8fe35

View file

@ -348,6 +348,10 @@ local function influx_query_multi(base_url, query, username, password, options)
traceError(TRACE_NORMAL, TRACE_CONSOLE, string.format("influx_query[#%u][%ds]: %s", num_queries+1, tdiff, query))
end
-- Log the query
local msg = os.date("%d/%b/%Y %H:%M:%S ") .. query
ntop.lpushCache("ntopng.trace.influxdb_queries", msg, 100 --[[ max queue elements ]])
if not res then
traceError(TRACE_ERROR, TRACE_CONSOLE, "Invalid response for query: " .. full_url)
return nil