mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Adds the default host:traffic when checking host ts existance
This commit is contained in:
parent
661d942f22
commit
9ba746bd78
1 changed files with 11 additions and 9 deletions
|
|
@ -1452,17 +1452,19 @@ local function hostdetails_exists(host_info, hostdetails_params)
|
|||
if not areHostL7TimeseriesEnabled(interface.getId()) then
|
||||
return false
|
||||
end
|
||||
if not hostdetails_params["ts_schema"] then
|
||||
-- Default schema for hosts
|
||||
hostdetails_params["ts_schema"] = "host:traffic"
|
||||
end
|
||||
|
||||
if hostdetails_params["ts_schema"] then
|
||||
-- A ts_schema has been requested, let's see if it exists
|
||||
local ts_utils = require("ts_utils_core")
|
||||
local tags = table.merge(host_info, hostdetails_params)
|
||||
if not tags["ifid"] then tags["ifid"] = interface.getId() end
|
||||
-- A ts_schema has been requested, let's see if it exists
|
||||
local ts_utils = require("ts_utils_core")
|
||||
local tags = table.merge(host_info, hostdetails_params)
|
||||
if not tags["ifid"] then tags["ifid"] = interface.getId() end
|
||||
|
||||
if not ts_utils.exists(hostdetails_params["ts_schema"], tags) then
|
||||
-- If here, the requested schema, along with its hostdetails_params doesn't exist
|
||||
return false
|
||||
end
|
||||
if not ts_utils.exists(hostdetails_params["ts_schema"], tags) then
|
||||
-- If here, the requested schema, along with its hostdetails_params doesn't exist
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue