[rrd-users] Graphing potentially missing files

Simon Hobson linux at thehobsons.co.uk
Tue Nov 30 13:47:52 CET 2010

I'm upgrading our main router to include automatic failover. Up until 
now, I'm switched manually if one failed and copied the rrd files 
over to maintain data continuity.

Now I want to have both online and ready, keepalived should take care 
of switching in the backup if the master fails.

Managing two data sets should be too hard, I just need to modify my 
data sources so I can do :

if A is unknown
   if B is unknown
   then Unknown
   else B
   if B is unknown
   then A
   else A+B

Or in RPN (I think !):

However, if I have a router failure, then A or B may not be accessible.

At the moment I access the data files via NFS, so the graphing always 
uses the most current data.

My current thinking is to use rsync to copy the data files every few 
minutes from both routers to the graphing machine. That way, both 
sets of data files will always be available for graphing, and if a 
router is down, then the rsync will simply fail and that set of files 
will simply stop updating - returning unknown to the graphing code. 
The downside is that it will introduce a small extra delay before 
updates become available in the graphs, and it will incur load on all 
three machines whether I am doing any graphs or not.

Alternatively, I'd considered populating the mount point of the NFS 
share with dummy (empty) rrds. Then I could unmount the share and the 
graphing would just access the empty files. It won't give me 
historical data though. Could this unmount when the NFS share is 
unavailable be automated ?

Any other ideas ?

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.

More information about the rrd-users mailing list