[rrd-users] rrdtool 1.3 and 'expiry' type graphs

Phil Stoneman rrd at galaxy.org.uk
Tue Nov 10 10:27:04 CET 2009

Hi guys

We're using rrdtool to generate expiry graphs, using something like this:

rrdtool graph - ";
      --imgformat=PNG ";
      --end=$graphend ";
      --title=\"$caption\" ";
      --base=1000 ";
      --height=120 ";
      --width=500 ";
      -l 0 ";
      --alt-autoscale-max ";
      -r ";
      --vertical-label=\"\" ";
      --slope-mode ";

AREA:a#4444FFFF:\"Power\:\" ";
VDEF:slope=a,LSLSLOPE ";
VDEF:int=a,LSLINT ";
CDEF: trend=a,POP,slope,COUNT,*,int,+ ";
COMMENT:\"Current limit 100\" ";
LINE:trend#FF00000:\"Predicted overflow\\:\" ";
CDEF:overlimit=trend,100,INF,LIMIT ";
VDEF:firstoverlimit=overlimit,FIRST ";
GPRINT:firstoverlimit\" %d %b %Y\\\n\":strftime ";

(Ignore the syntactic stuff at the ends of the lines, that's just our
generation script)

As you can see, I force the DEF to read a bunch of future data from
the rrd, in order that my data sets have data into the future. This
lets me get an expiry date even if it's beyond the right-hand side of
the graph. Otherwise, rrdtool will only read data as far as the --end
parameter, and the expiry value won't show properly.

The question is - this ability seems to be broken in rrdtool 1.3; my
expiry dates show as the epoch. I guess that rrdtool might be
truncating the data sets if they extend beyond the graph period...

This all works fine in rrdtool 1.2.

Can anyone shed any light on this, and let me know if I'm doing something wrong?



More information about the rrd-users mailing list