[rrd-users] wrong MAX value when graphing over "short", recent time period?
Dave Plonka
plonka at doit.wisc.edu
Thu Jul 13 17:16:38 MEST 2000
RRD users,
I getting some goofy results when I use rrdtool graph to PRINT values
from RRD files which don't have an initial MAX RRA: "RRA:MAX:0.5:1:600",
i.e. one that aggregates only 1 AVERAGE value for each MAX value.
We discussed this in the list previously and, I thought, we came to the
conclusion that it seemed redundant and unnecessary to define such an
RRA. (This has ramifications regarding the recent enhancements I did
to log2rrd. For background, see the fragment of the message from that
thread below.)
AN EXAMPLE -
The problem occurs when I "graph" over a relatively short time range,
such as one which I expect to include only one or two data points,
e.g. "-s -300". I often get an AVERAGE value that differs than the
MAX value! E.g.:
$ rrdtool graph /dev/null \
--start -300 \
'DEF:A=blah.rrd:ds0:AVERAGE' \
'DEF:B=blah.rrd:ds0:MAX' \
'PRINT:A:MAX:max=%.1lf' \
'PRINT:B:MAX:max=%.1lf'
0x0
max=5129577.9
max=4997236.7
$
RRDtool seems to be selecting and PRINTing the most recent MAX RRA
value, which may be based on a peak values observed some time ago
(certainly more than 300 seconds).
Is this the correct behavior? I certainly didn't expected a MAX value
from perhaps hours ago when my time range is constrained to the past 5
minutes. (As an aside, this seems to only be an issue for PRINT and
GPRINT - LINE, etc. plots are properly limited to time range specified
and no MAX value is plotted even though it is reported with [G]PRINT.)
I understand that it's probably unreasonable for me to expect RRDTOOL
to realize that, in some instances, the Right Thing would be for it to
return the most recent AVERAGE value when I ask for the MAX. For
RRDTOOL to do that it would have to have some sort of "holistic"
understanding of the relationship between AVERAGE and MAX RRAs.
In that example, perhaps it would be more acceptable for "rrdtool
graph" to have printed this?:
0x0
max=5129577.9
max=NaN
and possibly also issue a warning to STDERR (to explain the `NaN')
saying:
B: no MAX RRAs contain data points within the specified time range
Should I re-introduce MAX RRAs that have same time criteria as the
AVERAGE RRAs to work around this issue? If I did, the above example
would correctly print:
0x0
max=5129577.9
max=5129577.9
But it doesn't feel right, to me, to add the excess "baggage" of that
extra MAX RRA.
Dave
On Wed, Jun 28, 2000 at 02:27:34PM +0200, Rainer Bawidamann wrote:
> In article <20000627143634.A13050 at doit.wisc.edu>,
> plonka at doit.wisc.edu (Dave Plonka) writes:
> >
> > When "UseRRDTool Yes" is specified, why does MRTG create the RRD with
> > this RRA?:
> >
> > "RRA:MAX:0.5:1:600",
> >
> > Won't that RRA contain the same values as the initial AVERAGE RRA, and
> > therfore be redundant?:
> >
> > "RRA:AVERAGE:0.5:1:600",
>
> I believe it is redundant. In fact I copied the rrd-create command from
> log2rrd ;-) and changed only the rows.
>
> Currently 14all depends on them for "withpeak[...]: d". No, this setting
> won't make sense but mrtg permits it so I have to do it too. Without a
> step-1-max rra the peak line in the graph will be generated from the
> 30-minute rra (few samples, many steps, cf. example). I would have to
> handle daily-peaks differnently to use the step-1-average rra (or
> disallow it).
--
plonka at doit.wisc.edu http://net.doit.wisc.edu/~plonka ARS:N9HZF Madison, WI
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list