Discussion:
[rrd-users] generating charts from multiples RRA
(too old to reply)
Alceu R. de Freitas Jr.
2015-09-09 22:25:16 UTC
Permalink
Hello there,
I'm a little lost here and I'm not use what I missing in the documentation to solve it.
I created a RRDTool database with the following command:
rrdtool create sample.rrd --step 3600 DS:sample:GAUGE:5400:U:U RRA:AVERAGE:0.5:4:28 RRA:AVERAGE:0.5:24:90 RRA:MAX:0.5:24:90
The database is being populated as expected, the problem is to generate a chart.
If want to generate a chart from the first RRA (a week interval, with the average calculated with 4 to 4 hours interval), that seems to be simple, I just need to specify the start and end of the week with the corresponding "--start" and "--end" command line options, for instance:
rrdtool graph "$HOME/week.png" "DEF:thisweek=$HOME/sample.rrd:sample:AVERAGE:step=4" "LINE1:thisweek#0000FF:rows average" --imgformat PNG --end 1440000000 --start 1439611200 --title='Backlog of Workflow Policies' --vertical-label 'Number of rows' --width 800 --height 600
That seems to be simple, but how do I specify to use the last two RRAa, which have an average and max (respective) for a whole day items checked? Ignoring the consolidation function (AVERAGE or MAX) specified in the graph command, how do I make sure I'm fetching from the correct RRA? Only by using "--start" or "--end", or do I have also to specify the step  (24)?
Thanks!
Alceu
Alex van den Bogaerdt
2015-09-10 06:01:19 UTC
Permalink
Post by Alceu R. de Freitas Jr.
That seems to be simple, but how do I specify to use the last two RRAa,
which have an average and max (respective) for a whole day items checked?
The difference between the two RRAs *is* the consolidation function ...
Post by Alceu R. de Freitas Jr.
Ignoring the consolidation function (AVERAGE or MAX) specified in the
graph command,
... so you should not ignore that. Specifying a consolidation function
makes a big the difference in the RRA selection process.
Post by Alceu R. de Freitas Jr.
how do I make sure I'm fetching from the correct RRA? Only
by using "--start" or "--end", or do I have also to specify the step 
(24)?
RRDtool tries (and mostly succeeds) to select the 'correct' RRA for the
purpose. RRDtool will try hard to find the best match.

In your case, your database has only one RRA with MAX data, so asking for
MAX will always select that RRA. There is no choice.

Only in the case of AVERAGE there is a choice to make. If you query for
more than 28x4 hours, the bigger RRA (90 rows of 1 day each) should be
selected.
I don't mean '... you should select...', I mean '... RRDtool should ...'


HTH
Alex

Loading...