Adapts old bytes and packets rrd RRAs to the new format

The new timeseries library now transparently tries and uses old RRA names
for bytes and packets.

Fixes #1882
This commit is contained in:
Simone Mainardi 2018-07-25 13:10:34 +02:00
parent 012f025c7d
commit d14fd57858

View file

@ -151,7 +151,10 @@ end
-- This is necessary to keep the current RRD format
local function map_rrd_column_to_metrics(schema, column_name)
if (column_name == "num") or (column_name == "sent") or (column_name == "ingress") then
if (column_name == "num") or (column_name == "num_flows")
or (column_name == "sent") or (column_name == "ingress")
or (column_name == "bytes") or (column_name == "packets")
then
return 1
elseif (column_name == "rcvd") or (column_name == "egress") then
return 2