Add experimental support for 5sec granularity for host timeseries

To enable it (only on *InfluxDB* right now):

- uncomment HOST_NUM_TIMESERIES_POINTS in ntop_defines.h
- run `redis-cli set ntopng.prefs.30_sec_dump 1` and restart ntopng
This commit is contained in:
emanuele-f 2018-08-23 18:02:19 +02:00
parent 413c265ecb
commit 0004e08191
24 changed files with 354 additions and 106 deletions

View file

@ -91,20 +91,10 @@ for _, ifname in pairs(interface.getIfNames()) do
-- Note: we do not delete this as quotas are persistent across ntopng restart
--deletePoolsQuotaExceededItemsKey(ifid)
end
-- ##################################################################
-- Clean old InfluxDB export cache
local valid_entries = swapKeysValues(ntop.lrangeCache("ntopng.influx_file_queue") or {})
local entries_dir = dirs.workingdir .. "/-1/ts_export"
local existing_entries = ntop.readdir(entries_dir)
for entry in pairs(existing_entries or {}) do
if not valid_entries[entry] then
local entry_path = os_utils.fixPath(entries_dir .. "/" .. entry)
os.remove(entry_path)
end
-- Clean old InfluxDB export cache
local export_dir = os_utils.fixPath(dirs.workingdir .. "/".. ifid .."/ts_export")
ntop.rmdir(export_dir)
end
-- ##################################################################