[rrd-users] Adding an element to a graph

Dan Cech dcech at phpwerx.net
Thu Mar 1 21:44:02 CET 2007

Cole Tuininga wrote:
 > Let's say my calling program was requesting a graph for dataset "A"
> where "A" is formed by the potential aggregation of zero or more rrd
> files and should have a label of "Dataset A".  In all cases where the
> number of rrd files is >= 1, there is no problem.  I generate the DEF
> lines, aggregate them with CDEFs, and then display them with LINE's or
> AREA's as appropriate.  No problem.
> The issue is that there are times where there are no rrd files
> containing data pertinent to dataset A.  In this scenario, I would
> still like to have a graph created, and to have "Dataset A" in the
> legend.  The problem is that I can't seem to find a way to do this
> when there are no rrd files to use as a source.  Just having a
> constant value of 0 would be fine.  I can't just use an HRULE because
> (correct me if I'm wrong) but that would not add the label into the
> legend.

Why don't you create an RRD and keep it updated with a zero value every
period?  Then if there is no data for the graph you can just use the
'dummy' rrd.


More information about the rrd-users mailing list