mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-30 16:09:32 +00:00
Fix redundant interface path in RRD schemas
Affected schemas: - flow_script:lua_duration - flow_script:pending_calls - flow_script:skipped_calls - flow_script:successful_calls - process:num_alerts - process:resident_memory - redis:keys - redis:memory - system:cpu_load - system:cpu_states
This commit is contained in:
parent
fa45cb41cb
commit
a6bcf6e9e3
1 changed files with 9 additions and 1 deletions
|
|
@ -100,7 +100,15 @@ local function schema_get_path(schema, tags)
|
|||
|
||||
if((string.find(schema.name, "iface:") ~= 1) and -- interfaces are only identified by the first tag
|
||||
(#schema._tags >= 1)) then -- some schema do not have any tag, e.g. "process:*" schemas
|
||||
host_or_network = (HOST_PREFIX_MAP[parts[1]] or (parts[1] .. ":")) .. (tags[schema._tags[2] or schema._tags[1]] or tags[schema._tags[1]])
|
||||
local prefix = HOST_PREFIX_MAP[parts[1]] or (parts[1] .. ":")
|
||||
local suffix = tags[schema._tags[2] or schema._tags[1]] or tags[schema._tags[1]]
|
||||
|
||||
if(suffix ~= ifid) then
|
||||
host_or_network = prefix .. suffix
|
||||
else
|
||||
-- Avoid repeating the ifid suffix in the path
|
||||
host_or_network = prefix .. ""
|
||||
end
|
||||
end
|
||||
|
||||
-- Some exceptions to avoid conflicts / keep compatibility
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue