[rrd-developers] rrd_graph and flush behavior
eduardo at bragatto.com
Tue May 25 20:24:10 CEST 2010
I contacted the rrd-users list with this issue and Mr. Oetiker asked
me to send it here.
I've started using rrdcached a week ago and everything is working just
fine, however I'm having problems to produce updated graphs.
Let me first describe my setup a little bit:
- All my "rrd update" and "rrd graph" calls are using the parameter "--
daemon" to take advantage of rrdcached;
- rrdcached is started with these parameters: rrdcached -F -t 16 -s
nobody -m 0666 -l unix:/tmp/rrdcached.sock -w 900 -l 127.0.0.1:12345
- All my "rrd update" calls, write to files in their real location,
while "rrd graph" reads the same RRD files in a different location
(either because there's some symlink or null mount in the path).
I have reviewed the "-b" option from rrdcached, and I understand
symlinks are not allowed on the base directory, however the symlink in
my case is not in the base directory. Additionally, I have replaced
the symlink with a null mount and the problem persists.
The problem I'm seeing, can be illustrated here:
with symlink or null mount:
0 Nothing to flush: /usr/local/rrd/myproject/repository/local/switches/
real file location:
0 Successfully flushed /usr/local/rrd/myproject/rrd/switches/myswitch/
/usr/local/rrd/myproject/reporsitory/local is a symlink (or null
mount) to /usr/local/rrd/myproject/rrd
I have the impression "rrdcached" is storing the full path of the RRD
files internally, and only accepts a FLUSH command if the path is
exactly the same as used in "rrd_update".
Can you please confirm if this is the correct behavior?
If that's just how rrdcached works, I believe we should update the
documentation to highlight the importance of using the exact same path
from "rrd_update" when flushing.
If that's not desirable, and rrdcached is meant to be able to handle
different paths, then I believe there's something wrong with the
software's logic somewhere in the code (sorry, I didn't really check
the source code).
I'm probably going to rewrite my application to use the same path both
in rrd_update and rrd_graph, however I think it would be better if the
path was not a problem for the flush command (i.e. if a flush command
is received and there's a symlinkt in the path, the real location
could be calculated in order to find the file that needs to be flushed).
Thanks for your attention,
More information about the rrd-developers