Splitted traffic directions in iface ndpi timeseries (#9137)

This commit is contained in:
Matteo Biscosi 2025-05-28 12:47:48 +02:00
parent 6fb4cdc448
commit a5f89e6357
17 changed files with 2203 additions and 2077 deletions

View file

@ -215,27 +215,6 @@ end
-- ########################################################
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)
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,
ts_options)
if (data ~= nil) and (data.statistics.total > 0) then
ret[tags.protocol] = data.statistics.total
end
end
return (ret)
end
-- ########################################################
function graph_utils.breakdownBar(sent, sentLabel, rcvd, rcvdLabel,
thresholdLow, thresholdHigh)
if ((sent + rcvd) > 0) then