mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Check influxdb export file name
This commit is contained in:
parent
2b15b65f37
commit
12d5e6a8bf
3 changed files with 31 additions and 11 deletions
|
|
@ -242,13 +242,20 @@ function callback_utils.uploadTSdata()
|
|||
end
|
||||
|
||||
while(true) do
|
||||
local fname = ntop.lpopCache("ntopng.influx_file_queue")
|
||||
local name_id = ntop.lpopCache("ntopng.influx_file_queue")
|
||||
local ret
|
||||
|
||||
if((fname == nil) or (fname == "")) then
|
||||
if((name_id == nil) or (name_id == "")) then
|
||||
break
|
||||
end
|
||||
|
||||
if(tonumber(name_id) == nil) then
|
||||
print("[ERROR] Invalid name "..name_id.."\n")
|
||||
break
|
||||
end
|
||||
|
||||
local fname = os_utils.fixPath(dirs.workingdir .. "/" .. getInterfaceId(ifname) .. "/ts_export/" .. name_id)
|
||||
|
||||
-- Delete the file after POST
|
||||
local delete_file_after_post = true
|
||||
ret = ntop.postHTTPTextFile("", "", url, fname, delete_file_after_post)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue