User Tools

Site Tools


doc:howto:statistics.chart.public

Make luci-app-statistics graphs public

You've configured luci-app-statistics to your liking and now you want to share the charts.

One way is to serve them via LuCI but without authentication:

  1. create /usr/lib/lua/luci/controller/public_stats.lua with the following content:
    module("luci.controller.public_stats", package.seeall)
    
    function index()
        assign({"graph"}, {"admin", "statistics", "graph"}, nil)
    end
  2. wipe out some caches that are now stale: rm -rf /tmp/luci-indexcache /tmp/luci-modulecache/
  3. log out from LuCI if you're still logged in
  4. add /usr/lib/lua/luci/controller/public_stats.lua to /etc/sysupgrade.conf so it survives upgrades

"Graph" will now appear in the page footer, including on the login page, so you shouldn't need a custom index.

Another way might be to use a collectd network output plugin and log the data to a more powerful remote host running something like Cacti.

(Thanks to jow for these instructions.)

doc/howto/statistics.chart.public.txt · Last modified: 2017/06/18 13:21 by tmomas