mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 23:19:33 +00:00
Added support to influxdb v.2 with compatible v.1 buckets (#3764)
This commit is contained in:
parent
344a2b4736
commit
d65b78ecbf
3 changed files with 138 additions and 105 deletions
|
|
@ -73,11 +73,19 @@ end
|
|||
-- ##############################################
|
||||
|
||||
function influxdb_export_api.exportStorageSize(when, influxdb)
|
||||
local disk_bytes = influxdb:getDiskUsage()
|
||||
local ifid = getSystemInterfaceId()
|
||||
local skip = ntop.getCache(influxdb:getSkipRetentionAndCreationKey())
|
||||
if isEmptyString(skip) then
|
||||
skip = false
|
||||
else
|
||||
skip = toboolean(skip) or false
|
||||
end
|
||||
|
||||
if(disk_bytes ~= nil) then
|
||||
ts_utils_core.append("influxdb:storage_size", { ifid = ifid, disk_bytes = disk_bytes }, when)
|
||||
if (not skip) then
|
||||
local disk_bytes = influxdb:getDiskUsage()
|
||||
local ifid = getSystemInterfaceId()
|
||||
if(disk_bytes ~= nil) then
|
||||
ts_utils_core.append("influxdb:storage_size", { ifid = ifid, disk_bytes = disk_bytes }, when)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue