[rrd-users] RRDTool Aggregation Inaccuracies.

Nicholas Harris nicholas.kyle at gmail.com
Tue Jul 7 22:26:04 CEST 2009


On further inspection, it looks like the 24 hour graph is correct, while the
others are wrong (makes sense since that is RRDTools default time period).
To figure that out, I did a fetch on each database and laid each one out in
an Excel column, side by side. I summed up each row in a 7th column then
took the MAX value from the SUM column. For each time period, that value was
868 (matching the daily graph).

Can anyone explain to me why the graphs are putting out different data than
fetch?


---------------
- Nick Harris -
---------------


On Tue, Jul 7, 2009 at 12:46 PM, Nicholas Harris <nicholas.kyle at gmail.com>wrote:

> Looks like I did a poor job pasting the commands I've been using. Am I
> wrong to assume that I can add the max value from each independent RRD? This
> page seems to suggest so, but I do not understand why:
> http://www.vandenbogaerdt.nl/rrdtool/min-avg-max.php
>
> Straight from the command line:
>
> /usr/bin/rrdtool graph 1-day.png --end now --start e-1d --imgformat PNG \
> DEF:service_0=database_0.rrd:audience:MAX
> CDEF:users_0=service_0,UN,0,service_0,IF \
> DEF:service_1=database_1.rrd:audience:MAX
> CDEF:users_1=service_1,UN,0,service_1,IF \
> DEF:service_2=database_2.rrd:audience:MAX
> CDEF:users_2=service_2,UN,0,service_2,IF \
> DEF:service_3=database_3.rrd:audience:MAX
> CDEF:users_3=service_3,UN,0,service_3,IF \
> DEF:service_4=database_4.rrd:audience:MAX
> CDEF:users_4=service_4,UN,0,service_4,IF \
> DEF:service_5=database_5.rrd:audience:MAX
> CDEF:users_5=service_5,UN,0,service_5,IF \
> CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+
> \
> LINE1:aggregate_users#000000 \
> VDEF:peak_users=aggregate_users,MAXIMUM \
> VRULE:peak_users#0000FF COMMENT:\\n \
> GPRINT:peak_users:'Peak of %.0lf users' \
> GPRINT:peak_users:'%Y/%m/%d %I\:%M%p (%Z):strftime'
>
> OUTPUT: http://www.androidmilitia.com/rrdtool/1-day.png
>
>
> /usr/bin/rrdtool graph 1-week.png --end now --start e-1w --imgformat PNG \
> DEF:service_0=database_0.rrd:audience:MAX
> CDEF:users_0=service_0,UN,0,service_0,IF \
> DEF:service_1=database_1.rrd:audience:MAX
> CDEF:users_1=service_1,UN,0,service_1,IF \
> DEF:service_2=database_2.rrd:audience:MAX
> CDEF:users_2=service_2,UN,0,service_2,IF \
> DEF:service_3=database_3.rrd:audience:MAX
> CDEF:users_3=service_3,UN,0,service_3,IF \
> DEF:service_4=database_4.rrd:audience:MAX
> CDEF:users_4=service_4,UN,0,service_4,IF \
> DEF:service_5=database_5.rrd:audience:MAX
> CDEF:users_5=service_5,UN,0,service_5,IF \
> CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+
> \
> LINE1:aggregate_users#000000 \
> VDEF:peak_users=aggregate_users,MAXIMUM \
> VRULE:peak_users#0000FF COMMENT:\\n \
> GPRINT:peak_users:'Peak of %.0lf users' \
> GPRINT:peak_users:'%Y/%m/%d %I\:%M%p (%Z):strftime'
>
> OUTPUT: http://www.androidmilitia.com/rrdtool/1-week.png
>
>
> /usr/bin/rrdtool graph 1-month.png --end now --start e-1m --imgformat PNG \
> DEF:service_0=database_0.rrd:audience:MAX
> CDEF:users_0=service_0,UN,0,service_0,IF \
> DEF:service_1=database_1.rrd:audience:MAX
> CDEF:users_1=service_1,UN,0,service_1,IF \
> DEF:service_2=database_2.rrd:audience:MAX
> CDEF:users_2=service_2,UN,0,service_2,IF \
> DEF:service_3=database_3.rrd:audience:MAX
> CDEF:users_3=service_3,UN,0,service_3,IF \
> DEF:service_4=database_4.rrd:audience:MAX
> CDEF:users_4=service_4,UN,0,service_4,IF \
> DEF:service_5=database_5.rrd:audience:MAX
> CDEF:users_5=service_5,UN,0,service_5,IF \
> CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+
> \
> LINE1:aggregate_users#000000 \
> VDEF:peak_users=aggregate_users,MAXIMUM \
> VRULE:peak_users#0000FF COMMENT:\\n \
> GPRINT:peak_users:'Peak of %.0lf users' \
> GPRINT:peak_users:'%Y/%m/%d %I\:%M%p (%Z):strftime'
>
> OUTPUT: http://www.androidmilitia.com/rrdtool/1-month.png
>
> ---------------
> - Nick Harris -
> ---------------
>
>
>
> On Mon, Jul 6, 2009 at 9:23 PM, Nicholas Harris <nicholas.kyle at gmail.com>wrote:
>
>> Hello all,
>>
>> I've dug long and deep but I haven't found an answer to a problem I've run
>> into recently (though, I am pretty new at this, so please excuse my
>> ignorance).
>>
>> Here's the setup: I have a number of RRDs generated with the following
>> command:
>> '/usr/bin/rrdtool create DATABASE_NAME DS:audience:GAUGE:600:0:U
>> RRA:MAX:0.5:1:105120'
>>
>> Each database stores the number of users in our system, and is updated
>> every five minutes via Cron. Originally, I had more consolidation going on,
>> but I've been cutting bits out to try and solve this issue - now I just
>> store five minute snapshots over the course of a year.
>>
>> And here's the rub: when I try to graph out multiple RRDs together (single
>> graph), the numbers do not match up for different time periods. I'll run the
>> graph command for now-1day, now-1week and now-1month, and get three
>> different results for each.  When I do this for one RRD at a time, I get
>> consistent results (which leads me to believe something is wrong with my
>> command). Multiple RRDs at the same time goes bonkers.
>>
>> The data is pretty limited and should show the exact same data for each
>> time period. I only ran it for a small amount of time so I could compare
>> numbers over different periods.
>>
>> Any input on this would be greatly appreciated. Here are the commands I'm
>> using and sample outputs.
>>
>>
>> COMMAND:
>> /usr/bin/rrdtool graph 1-day.png --end now --start e-1d --imgformat PNG
>> DEF:service_0=database_0.rrd:audience:MAX
>> CDEF:users_0=service_0,UN,0,service_0,IF
>> DEF:service_1=database_1.rrd:audience:MAX
>> CDEF:users_1=service_1,UN,0,service_1,IF
>> DEF:service_2=database_2.rrd:audience:MAX
>> CDEF:users_2=service_2,UN,0,service_2,IF
>> DEF:service_3=database_3.rrd:audience:MAX
>> CDEF:users_3=service_3,UN,0,service_3,IF
>> DEF:service_4=database_4.rrd:audience:MAX
>> CDEF:users_4=service_4,UN,0,service_4,IF
>> DEF:service_5=database_5.rrd:audience:MAX
>> CDEF:users_5=service_5,UN,0,service_5,IF
>> CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+
>>
>> LINE1:aggregate_users#FF0000
>> VDEF:peak_users=concurrent_users,MAXIMUM
>> VRULE:peak_users#0000FF COMMENT:\\n
>> GPRINT:peak_users:'Peak of %.0lf users'
>> GPRINT:peak_users:'%Y/%m/%d %I\:%M%p (%Z):strftime'
>>
>> RESULT:
>> http://www.androidmilitia.com/rrdtool/1-day.png
>>
>>
>> COMMAND:
>> /usr/bin/rrdtool graph 1-week.png --end now --start e-1w --imgformat PNG
>> DEF:service_0=database_0.rrd:audience:MAX
>> CDEF:users_0=service_0,UN,0,service_0,IF
>> DEF:service_1=database_1.rrd:audience:MAX
>> CDEF:users_1=service_1,UN,0,service_1,IF
>> DEF:service_2=database_2.rrd:audience:MAX
>> CDEF:users_2=service_2,UN,0,service_2,IF
>> DEF:service_3=database_3.rrd:audience:MAX
>> CDEF:users_3=service_3,UN,0,service_3,IF
>> DEF:service_4=database_4.rrd:audience:MAX
>> CDEF:users_4=service_4,UN,0,service_4,IF
>> DEF:service_5=database_5.rrd:audience:MAX
>> CDEF:users_5=service_5,UN,0,service_5,IF
>> CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+
>>
>> LINE1:aggregate_users#FF0000
>> VDEF:peak_users=concurrent_users,MAXIMUM
>> VRULE:peak_users#0000FF COMMENT:\\n
>> GPRINT:peak_users:'Peak of %.0lf users'
>> GPRINT:peak_users:'%Y/%m/%d %I\:%M%p (%Z):strftime'
>>
>> RESULT:
>> http://www.androidmilitia.com/rrdtool/1-week.png
>>
>>
>> COMMAND:
>> /usr/bin/rrdtool graph 1-month.png --end now --start e-1m --imgformat PNG
>> DEF:service_0=database_0.rrd:audience:MAX
>> CDEF:users_0=service_0,UN,0,service_0,IF
>> DEF:service_1=database_1.rrd:audience:MAX
>> CDEF:users_1=service_1,UN,0,service_1,IF
>> DEF:service_2=database_2.rrd:audience:MAX
>> CDEF:users_2=service_2,UN,0,service_2,IF
>> DEF:service_3=database_3.rrd:audience:MAX
>> CDEF:users_3=service_3,UN,0,service_3,IF
>> DEF:service_4=database_4.rrd:audience:MAX
>> CDEF:users_4=service_4,UN,0,service_4,IF
>> DEF:service_5=database_5.rrd:audience:MAX
>> CDEF:users_5=service_5,UN,0,service_5,IF
>> CDEF:aggregate_users=users_0,users_1,users_2,users_3,users_4,users_5,+,+,+,+,+
>>
>> LINE1:aggregate_users#FF0000
>> VDEF:peak_users=concurrent_users,MAXIMUM
>> VRULE:peak_users#0000FF COMMENT:\\n
>> GPRINT:peak_users:'Peak of %.0lf users'
>> GPRINT:peak_users:'%Y/%m/%d %I\:%M%p (%Z):strftime'
>>
>> RESULT:
>> http://www.androidmilitia.com/rrdtool/1-month.png
>>
>>
>> I also tried it on two different systems with the same results: one was
>> RRDtool 1.2.23 and the other was RRDtool 1.3.7.  I've stopped updating these
>> RRDs - if anyone thinks they can trouble shoot, I'd be happy to upload them.
>>
>>
>> ---------------
>> - Nick Harris -
>> ---------------
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20090707/c237f4a3/attachment.html 


More information about the rrd-users mailing list