[rrd-users] How do I make a graph using more than one RRA?
Sam Umbach
sumbach at gmail.com
Tue Apr 10 02:09:23 CEST 2007
Kristinn,
> I've been sitting here for two days reading manuals and tutorials
> regarding rrdtool. I think I've got pretty much things covered that I
> need to know. There is one thing that I'm not sure how works, that is
> how can I select which RRA to use when forming a graph?
You can use the --step option to rrdtool graph to specify what step
size you prefer rrdtool to use when retrieving data for the graph
(somewhat similar to the --resolution option for rrdtool fetch,
although I'm not sure if it is affected by the start and end time in
the same way).
Generally, there is no reason to care which RRA the data is being
pulled from. rrdtool automatically fetches the data from the highest
resolution RRA containing the start and end times. If you've set up
your RRAs properly, you shouldn't need to worry which RRA the data is
fetched from.
> For instance:
> rrdtool create traffictest2.rrd --step 10 DS:traffic:GAUGE:20:0:U
> RRA:AVERAGE:0.5:30:360 RRA:AVERAGE:0.5:1:10
This RRA setup is probably not what you wanted to do. The second RRA
("RRA:AVERAGE:0.5:1:10") only stores 10 rows of 1 step (10 seconds)
each; this will store data for only the last 100 seconds. The first
RRA ("RRA:AVERAGE:0.5:30:360") stores 360 rows of 30 steps (300
seconds = 5 minutes) each.
If your graph lies entirely in the past 100 seconds, the higher
resolution RRA will be used. If your graph starts more than 100
seconds ago, the lower resolution RRA will be used.
> There are two RRAs each with different average values (even though there
> is nothing to average for the later one). Now I wan't to create a graph
> showing both RRAs.
As explained above, the first RRA contains the last 360*5 min = 1800
min = 30hrs of data and the second RRA contains the last 100 seconds,
it doesn't make sense to graph this data on the same chart (what would
the x-axis be?). If you're looking to graph today's data compared
with yesterday's data, you want to look at this:
http://www.vandenbogaerdt.nl/rrdtool/shift.php
-Sam
More information about the rrd-users
mailing list