[rrd-users] RRDTool Aggregation Inaccuracies.

Nicholas Harris nicholas.kyle at gmail.com
Tue Jul 7 06:23:45 CEST 2009


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/20090706/4fb76b6d/attachment.html 


More information about the rrd-users mailing list