Unable to activate statistics in my TO!

Hi

I have read few threads here (unhappy most of them pretty old) about how to configure statistics in TO. I have installed a MSata drive into it and moved /srv via Storage plugin in Luci !
Now I’d like to activate stats in Luci but no chance right now ! I have done the command lines

/etc/init.d/collectd enable

and

/etc/init.d/luci_statistics enable

but both gives an error (probably outdated !). Searched too into turris doc online but nothing about it !

Thanks

Vincèn

It would be helpful to know how your statistics is set up and what are the errors you’re encountering.

A couple of the modules have persistent issues that I have to patch every time they get reinstalled by an update. Disk Space Usage, Interfaces and Ping are all broken and wont likely be fixed until the LuCI statistics package is updated.

I’ve got a few threads here that outline what I’ve needed to do to get things working right.

You’ve made sure that you’re running collectd_rrdtool and have set the Base Directory to somewhere in /srv (on your msata drive)?

The RRDTool Storage directory should also be pointing to somewhere in /srv.

Hello @vincen,

as @jklaas said it would be good to let us know how your statistics are set up and what are the errors you’re encountering.

BTW: @jklaas Would you tell us, which issues are you encountering with LuCi statistics?
I’m not familiar that they’re broken as you said. I couldn’t find any issue here even in support tickets, but we’re aware that you or some else requested to update collectd, which breaks some stuff, so we postponed it.
Anyway, I’m using interfaces, and disk space usage both are working for me. What I don’t use is ping.

I’m trying to reproduce one issue with luci-statistics as one user reported to us and first you need to enable plugins, which you want in LuCI → Statistics → Setup.
Click on General plugins or Network plugins, enable the plugins, which you want.

After it, it’s good to enable those two services, which you mention:

/etc/init.d/collectd enable
/etc/init.d/luci_statistics enable

After a while. you can see if hey’ve generated in LuCI → Statistics → Graphs. If they’re not or you’re in hurry reboot do the stuff.

I haven’t opened tickets as a package update would fix the ones I mentioned. LuCI statistics as with many other packages are now terribly out of date. I’m happy to fix what I need to fix and wait though.

In interface.lua and ping.lua in /usr/lib/lua/luci/statistics/rrdtool/definitions/, I found I had to use %di instead of %pi in order to get any data displayed. In df.lua, the changes are more complicated.

I think in all of these cases, I ended up using an older version than was installed.

I think the rest of the issues I had were with things like support files, /usr/bin/stat-genconfig and
/usr/lib/lua/luci/controller/luci_statistics/luci_statistics.lua, which were missing pieces for creating the configs for the graphs and space for the graphs and config areas for the graphs in the web interface. I’m happy to start another thread with all the things I’ve worked around with LuCI statistics if you like.

In interface.lua and ping.lua in /usr/lib/lua/luci/statistics/rrdtool/definitions/, I found I had to use %di instead of %pi in order to get any data displayed.

This is fixed since Turris OS 3.10.1
https://gitlab.labs.nic.cz/turris/openwrt/issues/189

as with many other packages are now terribly out of date.

We know about it and this state is just temporary.
You can request to update packages, which you like in this thread: Requesting new packages / new versions - #44 by Pepe - Testing branches - Turris forum
I don’t want to promise you that we’ll update all of them, but I’ll look at them if you want.

I think the rest of the issues I had were with things like support files, /usr/bin/stat-genconfig and
/usr/lib/lua/luci/controller/luci_statistics/luci_statistics.lua, which were missing pieces for creating the configs for the graphs and space for the graphs and config areas for the graphs in the web interface.

Will try to reproduce.

Great to hear.

Yeah, I know. Though, to be honest if I’d known the wait was going to be this long, I probably would have submitted tickets. C’est la vie.