mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 16:30:10 +00:00
Implements per-MAC RRDs (backend)
This commit is contained in:
parent
c54b2523a1
commit
e6da58e567
3 changed files with 30 additions and 6 deletions
|
|
@ -1113,7 +1113,7 @@ function singlerrd2json(ifid, host, rrdFile, start_time, end_time, rickshaw_json
|
|||
-- do not scale number, packets, and drops
|
||||
scaling_factor = 1
|
||||
end
|
||||
|
||||
|
||||
if(not ntop.notEmptyFile(rrdname)) then return '{}' end
|
||||
|
||||
local fstart, fstep, fnames, fdata = ntop.rrd_fetch(rrdname, 'AVERAGE', start_time, end_time)
|
||||
|
|
|
|||
|
|
@ -2115,10 +2115,10 @@ function getPathFromMac(addr)
|
|||
local manufacturer = {mac[1], mac[2], mac[3]}
|
||||
local nic = {mac[4], mac[5], mac[6]}
|
||||
|
||||
-- manufacturers go in a hierarchical structure
|
||||
local res = table.concat(manufacturer, "/")
|
||||
-- each manufacturer has its own directory
|
||||
local res = table.concat(manufacturer, "_")
|
||||
-- the nic identifier goes as-is because it is non structured
|
||||
res = fixPath(res.."/"..table.concat(nic, "_"))
|
||||
res = fixPath(res.."/"..table.concat(nic, "/"))
|
||||
-- finally the vlan
|
||||
res = res..vlan
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue