Remove unused function host_pools_nedge.updateRRDs

This commit is contained in:
Alfredo Cardigliano 2023-05-10 11:19:33 +02:00
parent 68e719530e
commit 5233df4a51

View file

@ -530,39 +530,6 @@ function host_pools_nedge.getUndeletablePools()
return pools
end
function host_pools_nedge.updateRRDs(ifid, dump_ndpi, verbose)
local ts_utils = require "ts_utils"
require "ts_5min"
-- NOTE: requires graph_utils
for pool_id, pool_stats in pairs(interface.getHostPoolsStats() or {}) do
ts_utils.append("host_pool:traffic", {ifid=ifid, pool=pool_id,
bytes_sent=pool_stats["bytes.sent"], bytes_rcvd=pool_stats["bytes.rcvd"]}, when)
if pool_id ~= tonumber(host_pools_nedge.DEFAULT_POOL_ID) then
local flows_dropped = pool_stats["flows.dropped"] or 0
ts_utils.append("host_pool:blocked_flows", {ifid=ifid, pool=pool_id,
num_flows=flows_dropped}, when)
end
-- nDPI stats
if dump_ndpi then
for proto,v in pairs(pool_stats["ndpi"] or {}) do
ts_utils.append("host_pool:ndpi", {ifid=ifid, pool=pool_id, protocol=proto,
bytes_sent=v["bytes.sent"], bytes_rcvd=v["bytes.rcvd"]}, when)
end
end
end
-- Also write info on the number of members per pool, both in terms of hosts and l2 devices
local pools = interface.getHostPoolsInfo() or {}
for pool, info in pairs(pools.num_members_per_pool or {}) do
ts_utils.append("host_pool:hosts", {ifid = ifid, pool = pool, num_hosts = info["num_hosts"]}, when)
ts_utils.append("host_pool:devices", {ifid = ifid, pool = pool, num_devices = info["num_l2_devices"]}, when)
end
end
function host_pools_nedge.printQuotas(pool_id, host, page_params)
--[[
local pools_stats = interface.getHostPoolsStats()