mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
parent
149c1a0df1
commit
d4a2c23ddb
1 changed files with 4 additions and 3 deletions
|
|
@ -129,14 +129,15 @@ end
|
|||
|
||||
-- ########################################################
|
||||
|
||||
function graph_utils.getProtoVolume(ifName, start_time, end_time)
|
||||
function graph_utils.getProtoVolume(ifName, start_time, end_time, ts_options)
|
||||
ifId = getInterfaceId(ifName)
|
||||
local series = ts_utils.listSeries("iface:ndpi", {ifid=ifId}, start_time)
|
||||
local series = ts_utils.listSeries("iface:ndpi", {ifid = ifId}, start_time)
|
||||
|
||||
ret = { }
|
||||
|
||||
for _, tags in ipairs(series or {}) do
|
||||
-- NOTE: this could be optimized via a dedicated driver call
|
||||
local data = ts_utils.query("iface:ndpi", tags, start_time, end_time)
|
||||
local data = ts_utils.query("iface:ndpi", tags, start_time, end_time, ts_options)
|
||||
|
||||
if(data ~= nil) and (data.statistics.total > 0) then
|
||||
ret[tags.protocol] = data.statistics.total
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue