User Tools

Site Tools


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)
  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.)

docs/guide-user/luci/statistics.chart.public.txt · Last modified: 2018/03/04 07:46 by bobafetthotmail