Opened 5 years ago

Closed 3 years ago

#12619 closed defect (moved_to_github)

Changing RRDTool Storage directory breaks LuCI Graphs

Reported by:… Owned by:
Priority: normal Milestone: Barrier Breaker 14.07
Component: luci Version: Attitude Adjustment 12.09 Beta
Keywords: Cc:


Changing RRDTool storage directory to an external drive makes statistics stop working.

My specs:

  • Netgear WNDR3800
  • Attitude Adjustment 12.09-beta2
  • luci-app-statistics 0.11+svn9402-1

Steps to reproduce

1) Enter LuCI and change
Statistics->Collectd->Output plugins->RRDTool->Storage directory
from /tmp/rrd to /mnt/sda1 (or other working usb directory)

2) Then go to

You'll receive this error

/usr/lib/lua/luci/dispatcher.lua:448: Failed to execute call dispatcher target for entry '/admin/statistics/graph/ping'.
The called action terminated with an exception:
/usr/lib/lua/luci/statistics/datatree.lua:163: bad argument #1 to 'pairs' (table expected, got nil)
stack traceback:
    [C]: in function 'assert'
    /usr/lib/lua/luci/dispatcher.lua:448: in function 'dispatch'
    /usr/lib/lua/luci/dispatcher.lua:195: in function </usr/lib/lua/luci/dispatcher.lua:194>

Here's my collectd.conf

BaseDir "/var/run/collectd"
Include "/etc/collectd/conf.d"
PIDFile "/var/run/"
PluginDir "/usr/lib/collectd"
TypesDB "/usr/share/collectd/types.db"
Interval 30
ReadThreads 2

LoadPlugin iptables

LoadPlugin conntrack

LoadPlugin tcpconns
<Plugin tcpconns>
	ListeningPorts false
	LocalPort 22
	LocalPort 80

LoadPlugin iwinfo
<Plugin iwinfo>
	IgnoreSelected false
	Interface wlan0
	Interface wlan1

LoadPlugin processes
<Plugin processes>
	Process uhttpd
	Process dnsmasq
	Process dropbear

LoadPlugin ping
<Plugin ping>
	TTL 64
	Interval 30
	Host ""

LoadPlugin rrdtool
<Plugin rrdtool>
	DataDir "/tmp/rrd"
	RRARows 100
	RRASingle true
	RRATimespan 3600
	RRATimespan 86400
	RRATimespan 604800
	RRATimespan 2678400
	RRATimespan 31622400

LoadPlugin olsrd
<Plugin olsrd>
	Host ""
	Port "2006"

LoadPlugin memory

LoadPlugin cpu

Attachments (0)

Change History (9)

comment:1 Changed 5 years ago by…

Still present in Attitude Adjustment 12.09-rc1

Also, standard deviation graph in ping is not working.

comment:2 Changed 4 years ago by…

Still present on AA stable.
Any idea how to fix this?

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:4 Changed 3 years ago by anonymous

Still present on Barrier Breaker 14.07.
Are there any people that have statistics graphs working with rrd files on external USB stick, or is this universally broken?

comment:5 Changed 3 years ago by stefan@…

I have the same idea. RDD stores data correctly onto the USB (ext4) but Luci graph fails with the mentioned error. That happens even when symlinking from /tmp to the usb (leaving the directory the same). Changing it back to any location on the OpenWRT filesystem resolves the problem.

So the problem seems to be related to the filesystem in use or a difference in local/external storage. I would be happy for a solution.

comment:6 Changed 3 years ago by stefan@…

P.S. I am running luci-app-statistics 0.12+svn-r10530-1 on Barrier Breaker 14.07

comment:7 Changed 3 years ago by jow

Is your external rrd storage directory readably by "nobody/nogroup" ?

comment:8 Changed 3 years ago by stefan@…

Thanks for pointing me towards permissions again. I've had it previously ruled out as I let the rrd folder be created by rrd itself (hence it had the same persmissions as in the tmp folder). The problem was lying in the mount directory which I had previously created with root. But somehow it had changed to this:
drwx------ 5 1000 1000 4096 Jan 31 14:11 usb

So I changed it to this:
drwxrwxr-x 5 root root 4096 Jan 31 14:11 usb

That fixed the problem. Looks like Luci is now able to traverse to the rrd files in /mnt/usb/stats/rrd. Thanks again, I just hope this setup survives a reboot too.

comment:9 Changed 3 years ago by nbd

  • Resolution set to moved_to_github
  • Status changed from new to closed

collectd is maintained here:

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.