[rrd-users] OpenWrt + Collectd + RRDTool

Simon Hobson linux at thehobsons.co.uk
Wed Jun 10 11:11:12 CEST 2015


Aizad Fauzi <redsan at gmail.com> wrote:

> I've installed these three components and my graph is working perfectly.
> I create a symlink of the PNG to the root of my www folder so that I can easily view the graph directly.
> However, in order for the graph to be updated, I need to log-on to the router and view from there in order to refresh the graph.
> 
> Are there any tricks that can make the graph automatically update by running some command to setup as crontab?

How are you generating the graph ? How are you viewing them when you log in to the router ?

There are two ways to do it - create graphs periodically in case you want to view them, or create them on demand.

The first of these means using some tool (eg cron) to run commands to generate the graphs periodically. The downside of this is that you expend resources generating graphs that you will most likely never look at.

The alternative is to trigger graph creation when you want to view it - typically by CGI scripts on the server.

I suspect that when you log onto the router (presumably via it's web UI) and view the graph, that's triggering a CGI script that generates the graph there and then - if you right click on the graph image and open in new window/tab, what URL do you get ?. This normally also creates an image file which hangs around until it gets over-written by the next version. If you statically link or view this image file, then it won't update on it's own.
The fix for this is probably to link to the CGI script rather than the static image file - that way, when you view it you'll always get an up to date version.



More information about the rrd-users mailing list