[rrd-users] Graphing potentially missing files

Steve Shipway s.shipway at auckland.ac.nz
Thu Dec 2 22:12:57 CET 2010

When you run rrdgraph in rrdcached mode (either via the environment variable, or using the --daemon option) then it flushes the cache data and also accesses the data over the rrdcached connection.  It doesnt use the local file.

RRdtool in rrdcached mode will use the local file only if (a) you're asking for a function not supported by the rrdcached, AND (b) you're using UNIX sockets (since if using TCP sockets, the rrd file is not on this server), AND (c) it can read/write the file (since you may have given permissions to allow the file to only be accessed by the rrdcached).  If using the trunk 1.4 version, then this means that the supported functions are update, first, last, create (with limitations), fetch, graph and info.  It is worth noting updatev and graphv will NOT work.

You can ask rrdcached to flush caches using 'rrdtool flushcached' (make sure to give details on the rrdcached address via command line or environment variable of course)  Sending a command into the socket could work, but you'd need to make sure youhave the rrdcached running locally and listening on a unix socket and not just on a TCP port!

With regard to keeping backup RRD files, this is why I'm working on the RRDCached Chaining module -- this should allow one rrdcached to pass updates on to another in a chain, so you can have (eg) a local rrdcached, which passes updates to a remote one.  Then, if the remote server dies, you can (manually) copy the more up-to-date rrd file from the local server to the remote one (provided they are the same architecture of course).  This patch is still in beta here, and only supports update (not create or info yet) but I'm hoping to get Tobi to accept it into trunk soon once its ready.

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
s.shipway at auckland.ac.nz
Ph: +64 9 373 7599 ext 86487

From: rrd-users-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch [rrd-users-bounces+s.shipway=auckland.ac.nz at lists.oetiker.ch] on behalf of Simon Hobson [linux at thehobsons.co.uk]
Sent: Friday, 3 December 2010 3:44 a.m.
To: rrd-users at lists.oetiker.ch
Subject: Re: [rrd-users] Graphing potentially missing files

Steve Shipway wrote:

>Why not use rrdcached in TCP mode to send the updates from your
>routers over to a central rrd file(s) held on the graphing server?
>Then no need for NFS or copying.

Well I had to install newer packages from Backports, but this is now
working. For belt and braces, I have the two routers updating a local
file as well as the remote one - so if the graphing server or network
are down for any length of time, I can copy the local files over and
"restore" the otherwise missing data.

A couple of points :

1) When I use the --daemon option to rrdgraph, that flushes the cache
but still accesses the local file doesn't it ?

2) Other than connecting to the socket, is there a way to trigger
caches to be written ? I tried :
>echo "FLUSH <some filename>" >> /var/run/rrdcached.sock
but all I got was :
>-bash: /var/run/rrdcached.sock: No such device or address

Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.

rrd-users mailing list
rrd-users at lists.oetiker.ch

More information about the rrd-users mailing list