mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Log influxdb queries in redis
This commit is contained in:
parent
a0775443a7
commit
2a04c8fe35
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue