[collectd] fix to create RRDs correctly

Thorsten von Eicken tve at voneicken.com
Wed Feb 20 06:45:48 CET 2008


I guess I'm missing something. If I set-up collectd *out of the box*, I 
end up with the following RRAs (only the 'AVERAGE' ones shown):

rra[0].cf = "AVERAGE"
rra[0].rows = 8640
rra[0].pdp_per_row = 1
rra[0].xff = 1.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 1210
rra[3].pdp_per_row = 50
rra[3].xff = 1.0000000000e-01
rra[3].cdp_prep[0].value = NaN
rra[3].cdp_prep[0].unknown_datapoints = 4
rra[6].cf = "AVERAGE"
rra[6].rows = 1202
rra[6].pdp_per_row = 223
rra[6].xff = 1.0000000000e-01
rra[6].cdp_prep[0].value = 1.7687000000e+03
rra[6].cdp_prep[0].unknown_datapoints = 15
rra[9].cf = "AVERAGE"
rra[9].rows = 1201
rra[9].pdp_per_row = 2635
rra[9].xff = 1.0000000000e-01
rra[9].cdp_prep[0].value = 1.9347318000e+05
rra[9].cdp_prep[0].unknown_datapoints = 45

Note how the first RRA is very large, much larger than the "requested" 
1200 points by the default RRARows value of 1200. With my patch you end 
up with the following RRAs (again only 'AVERAGE' shown):

rra[0].cf = "AVERAGE"
rra[0].rows = 1200
rra[0].pdp_per_row = 1
rra[0].xff = 1.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[3].cf = "AVERAGE"
rra[3].rows = 1235
rra[3].pdp_per_row = 7
rra[3].xff = 1.0000000000e-01
rra[3].cdp_prep[0].value = 2.9930000000e+02
rra[3].cdp_prep[0].unknown_datapoints = 0
rra[6].cf = "AVERAGE"
rra[6].rows = 1210
rra[6].pdp_per_row = 50
rra[6].xff = 1.0000000000e-01
rra[6].cdp_prep[0].value = 7.9940000000e+02
rra[6].cdp_prep[0].unknown_datapoints = 0
rra[9].cf = "AVERAGE"
rra[9].rows = 1202
rra[9].pdp_per_row = 223
rra[9].xff = 1.0000000000e-01
rra[9].cdp_prep[0].value = 1.3993000000e+03
rra[9].cdp_prep[0].unknown_datapoints = 0
rra[12].cf = "AVERAGE"
rra[12].rows = 1201
rra[12].pdp_per_row = 2635
rra[12].xff = 1.0000000000e-01
rra[12].cdp_prep[0].value = 2.6403080000e+04
rra[12].cdp_prep[0].unknown_datapoints = 580

Notice how the first RRA got cut down to 1200 points as I would have 
expected and a new RRA got inserted at 7 pdp_per_row to satisfy all the 
default RRATimespans (3600, 86400, 604800, 2678400, 31622400). The 
resulting RRD file is 1/2 the size of the previous one. I have a hard 
time following an argument that the out-of-the-box RRAs correspond more 
closely to what one would expect given the default RRATimespans and 
RRARows values, but maybe I'm simply missing something here... (And BTW, 
I'm fine applying my private patch when compiling, so no hurt feelings :-).
	Thorsten



More information about the collectd mailing list