Implements grafana support for interfaces

This commit is contained in:
Simone Mainardi 2017-06-07 19:02:28 +02:00
parent c2762fb2ee
commit c115271c5d
10 changed files with 303 additions and 14 deletions

View file

@ -1155,6 +1155,11 @@ function singlerrd2json(ifid, host, rrdFile, start_time, end_time, rickshaw_json
io.write('len(fdata): '..table.getn(fdata)..'\n')
--]]
local max_num_points = 600 -- This is to avoid having too many points and thus a fat graph
if tonumber(global_max_num_points) ~= nil then
max_num_points = global_max_num_points
end
local num_points_found = table.getn(fdata)
local sample_rate = round(num_points_found / max_num_points)
local port_mode = false