Collect and DSL stats, collectd-exec module

Hi.

I have worked on converting a script from here to openwrt 19x format. I also enhanced the script adding additional metrics to collect.

I am at the point where the RRD files are generated correctly, and I have exec.lua script, but whenever I try to access the graphs, I get the following error.

/usr/lib/lua/luci/statistics/rrdtool.lua:77: attempt to index local 'list' (a nil value)
stack traceback:
	/usr/lib/lua/luci/statistics/rrdtool.lua:77: in function '_forcelol'
	/usr/lib/lua/luci/statistics/rrdtool.lua:554: in function 'render'
	.../luci/controller/luci_statistics/luci_statistics.lua:170: in function <.../luci/controller/luci_statistics/luci_statistics.lua:114>

I dont understand LUA, but I am guessing a specific vallue is null when it shouldnt be, but no idea what value that would be as I see nothing in logs.

I will attach the exec.lua file here.