Graphs data lost after reboot

I have now working graphs under LuCI->Statistics->Graphs but all the data is lost when the Omnia reboots and I restart with empty graphs. How to keep them when rebooting?

I notice that the directory configured under “Base Directory” is empty.

In LUCI select from dropdown menu Statistics - choose Setup and click there to Output plugins and go to RRDTool.
Change storage directory to somewhere else (it’s better to use some flash drive or any usb device), because right now is stored to /tmp (which you mention) data lost after reboot.
But I’m pretty much sure that this was mention somewhere.

1 Like

I discover that, anyway, on the Turris, /var is just a link to /tmp, which seems strange.

I changed the directoty of RRDTool Plugin to something stable. We’ll see.

It will work. Don’t worry :slight_smile:

1 Like

pretty standard for openWrt/LEDE… by using a tmpfs the flash doesn’t wear out so fast

@Pepe Indeed, it does, thanks.

@nerdpunk It is my first experience with OpenWRT. So, I should add a mSATA disk, or connect something through USB, to avoid banging on the flash drive?

not sure… on the one hand there’s plenty of flash space in the omnia, so if blocks wear out, the ubifs should take care of that… on the other hand i was always using external storage on my previous routers to spare the flash, so i’ll use an msata-drive…

but i’d like to hear more opinions from the other people, too

@nerdpunk discusses this issue of Flash (ab)use.

I’ve chosen to continue my habit of using a non-built in flash drive to hold frequently changing info that I want to carry through reboots - such as DHCP leases, activity logs etc). I used to stick a USB drive in the back of the old router but elected to use an mSata in the Omnia “Because I can” :wink:

I guess I could use the large capacity of of the built in flash and trust the wear levelling but why risk it ?

btw: after last update (v3.3) several services were untouched, several (including rrd,collectd) were set to default. For rrd/collectd i have to set all back again and restart both. This time no need to refresh individual rrd files. All wen automatic. Also individual plugins need to be manually enabled.

Indeed (i happened to me, too). Serious bug.

I have the same problem after the last update. Then I probably made a bad hit settings.
In setting has enabled what could be. In the settings, I see a lot of allowed module, but charts not yet.

Which packages (collect and rrd) must be installed so that the charts were functional? What do I need to check?

My instalated packages:

Odstranit collectd-mod-rrdtool 4.10.8-3
Odstranit librrd1 1.0.50-2
Odstranit lighttpd-mod-rrdtool 1.4.42-2
Odstranit rrdcgi1 1.0.50-2
Odstranit rrdtool1 1.0.50-2

Název balíčku Verze
Odstranit collectd 4.10.8-3
Odstranit collectd-mod-apcups 4.10.8-3
Odstranit collectd-mod-ascent 4.10.8-3
Odstranit collectd-mod-bind 4.10.8-3
Odstranit collectd-mod-conntrack 4.10.8-3
Odstranit collectd-mod-contextswitch 4.10.8-3
Odstranit collectd-mod-cpu 4.10.8-3
Odstranit collectd-mod-curl 4.10.8-3
Odstranit collectd-mod-df 4.10.8-3
Odstranit collectd-mod-dns 4.10.8-3
Odstranit collectd-mod-filecount 4.10.8-3
Odstranit collectd-mod-fscache 4.10.8-3
Odstranit collectd-mod-interface 4.10.8-3
Odstranit collectd-mod-iwinfo 4.10.8-3
Odstranit collectd-mod-load 4.10.8-3
Odstranit collectd-mod-logfile 4.10.8-3
Odstranit collectd-mod-madwifi 4.10.8-3
Odstranit collectd-mod-memory 4.10.8-3
Odstranit collectd-mod-netlink 4.10.8-3
Odstranit collectd-mod-network 4.10.8-3
Odstranit collectd-mod-rrdtool 4.10.8-3
Odstranit collectd-mod-snmp 4.10.8-3
Odstranit collectd-mod-thermal 4.10.8-3
Odstranit collectd-mod-uptime 4.10.8-3
Odstranit collectd-mod-users 4.10.8-3
Odstranit collectd-mod-wireless 4.10.8-3
Odstranit lcollect 117
Odstranit lcollect-majordomo 27
Odstranit ucollect-badconf 25
Odstranit ucollect-bandwidth 21
Odstranit ucollect-config 117
Odstranit ucollect-count 28
Odstranit ucollect-diffstore 1.2
Odstranit ucollect-fake 22
Odstranit ucollect-flow 32
Odstranit ucollect-fwup 12
Odstranit ucollect-lib 117
Odstranit ucollect-meta 6
Odstranit ucollect-prog 117
Odstranit ucollect-refused 13
Odstranit ucollect-sniff 18
Odstranit ucollect-spoof 8

Well, I have gleaned by using PuTTY and Midnight Commander for editing configuration files - jupíí


sometimes it is not so clear why some plugin is not running (even if configured correctly) …for example: openvpn, users, thermal plugins shows no graphs, no rrd files. No matter what i try (reconfigure, reload services…still nothing).

As i noted before (in several threads on this forum). If you start editing uci config directly, you might left some ‘white spaces’ , wrong EOL/EOF or empty options/values (which cause the config not to be parsed correctly during reload and what is below that point — is not activated/loaded — so no files, no graphs …but luci will read another config and tels you hey plugin is active but it is actually not loaded at all).

So in some cases it is better to use '‘uci’ tools to edit config properly (and to be honest, sometimes it is more efficient …:slight_smile: uci set <config>.<section>[.<option>]=<value> once done you just make uci commit <config>

Also ucollect and lcollect are not related to collectd/rrd and graphs. Those services are related to data-collect for turris project and for real-time-graphs in Luci. So just focus on luci_statistics and collectd/rrd configs.

I not start editing uci config directly. I am able editin it According to the precise instructions - or copy - paste. :slight_smile :slight_smile:
For Linux amater (as I am) must be precise instructions - dear Picmaus.

Don’t worry i like precise instruction as well. But i am too bad in creating such :slight_smile:

[details=not precise instructions … ]
Regarding the packages… you need luci_statistics, collectd, collect-mod-rrdtool (as initial start)
opkg install --force-reinstall <package name> will force the package to install with supplied configs and if there is some post-install step, it is also executed.

(if you just remove-install-again via Luci, it will use old config and new one(from package) is stored as *-opkg in same location so if you have wrong config; re-install won’t fix it) . You have to manually swap them (and check if and what is difference ; for nice diff output : vi -d <file1> <file2> ), if you just don’t care cp <configfile>-opkg <configfile> and start from scratch. Configs : /etc/config/luci_statistics is definition for collectd service (which actually use /etc/collectd.conf file).

Start with generic plugins (as they are not complicated for setup). and later on add one plugin at a time (if you add two , you never know which is causing the troubles). In my setup, NTPD, DNS plugins caused no-graph issue (not sure why, did not find the glitch). Not using them at all. In other situation Ping plugin has space before first hostname (caused no graphs at all) … After any changes, restart the services /etc/init.d/luci_statistics reload /etc/init.d/collectd reload .

Regarding the rrd files: you have to store them on permanent filesystem (which survive the boot :)[/details]

luci_statistics rrdtool entries

config statistics 'collectd’
option Include '/mnt/sdb1/collectd/conf.d’
option PIDFile '/var/run/’
option PluginDir '/usr/lib/collectd’
option TypesDB '/usr/share/collectd/types.db’
option Interval '30’
option ReadThreads '2’
option Hostname 'Node-42’
option BaseDir ‘/mnt/sdb1/collectd/’

config statistics 'rrdtool'
        option default_timespan '1hour'
        option image_width '600'
        option image_path '/tmp/rrdimg'

config statistics 'collectd_rrdtool'
        option enable '1'
        option RRARows '100'
        option RRASingle '1'
        option RRATimespans '1hour 1day 1week 1month 1year'
        option DataDir '/mnt/sdb1/rrd'
collectd.conf rrdtool entries
LoadPlugin rrdtool
    <Plugin rrdtool>
            DataDir "/mnt/sdb1/rrd"
            RRARows 100
            RRASingle true
            RRATimespan 3600
            RRATimespan 86400
            RRATimespan 604800
            RRATimespan 2678400
            RRATimespan 31622400

TL:DR: seems like several plugins, when enabled cause no-graphs, no-permanent-data (file cache is ok)

As an example … around 16h i installed collectd-mod-processes (configured and enabled) … later i found hey no data at all (for any plugin). So i disable “processes” and hit “save and use” for collectd and rrdtool plugin … Short data shown between 20:20-20:30 … uninstalled collectd-mod-processes (collectd services reloaded) … data shown 20:38-20:49. At that point i hit “enabled” for processes plugin (with limited list of processes). After reload of collectd (just one snapshot from rrd files). Reboot (no change). Removed again, checked both configs (removed plugins i don’t want use from both configs and also as package from system). Install back processes plugin (not enabled, not configured). Restart service around 21:00. All worked as expected. Set again processes plugin as enabled, no data. Hit disable (data are back).

So i am not sure what is now wrong, but surely several plugins are causing graphs to not show data, while plugins are actually working (some data are in rrd cache, but not written to permanent ones).

When i restart the collectd, it flushes the cache to file (that’s why there are those small peaks). In messages, there are no warnings/errors related to collectd/rrd …

I know it is not related purely to just reboot.

“Gott der gerechte” - This part of the interface is not well handled. Dependencies are very complicated.

Thank you for the very detailed information. When I have a quiet moment, I’ll try to apply. I will inform you of the result.

I tried to go back to the old config, but reports (bookmark backup file may be corrupted.), may not be able to use the config from the old version of the OS. I did go to the previous snapschot-restore still does not work.

If I am on the previous snapschot-how to run the update?