[rrd-users] Re: made mistake during creating rrd

Andreas Ihl rrdtool-list04 at ai3d.de
Tue Jun 28 15:37:54 MEST 2005


hello alex,

thank you for your help.

a quick and dirty perl-script done a good job for extracting the relevant 
datas from the dump.

i create a new rrd:

rrdtool create queries_$LOCATION.rrd --step 60 \
--start 1072911600 \
DS:srv1_$LOCATION:GAUGE:5184000:0:U \
DS:srv2_$LOCATION:GAUGE:5184000:0:U \
DS:srv3_$LOCATION:GAUGE:5184000:0:U \
DS:srv4_$LOCATION:GAUGE:5184000:0:U \
DS:srv5_$LOCATION:GAUGE:5184000:0:U \
DS:srv6_$LOCATION:GAUGE:5184000:0:U \
DS:srv7_$LOCATION:GAUGE:5184000:0:U \
DS:srv8_$LOCATION:GAUGE:5184000:0:U \
RRA:AVERAGE:0.5:1:10080 \
RRA:AVERAGE:0.5:5:8928 \
RRA:AVERAGE:0.5:15:35040 \
RRA:AVERAGE:0.5:1440:3650 \
RRA:MAX:0.5:1:10080 \
RRA:MAX:0.5:5:8928 \
RRA:MAX:0.5:15:35040 \
RRA:MAX:0.5:1440:3650 \
RRA:MIN:0.5:1:10080 \
RRA:MIN:0.5:5:8928 \
RRA:MIN:0.5:15:35040 \
RRA:MIN:0.5:1440:3650 \

and put all the datas via rrdtool update to the database.
in a dump of the new database i found something amazing (but maybe it is still 
normal?):

> Do the updates, oldest first.  After doing this, your new RRD contains
> the same data; except for the resolution which *seems* to be better.
> (it isn't, not yet).

do you mean the following behavior?

at the end of section <pdp_per_row> 1440 </pdp_per_row> <!-- 86400 seconds -->
i found the following lines:
<!-- 2005-06-26 02:00:00 CEST / 1119744000 --> <row><v> 0.0000000000e+00 
</v><v> 0.0000000000e+00 </v><v> 0.0000000
000e+00 </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2005-06-27 02:00:00 CEST / 1119830400 --> 
<row><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v><v> 0.0000000
000e+00 </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2005-06-28 02:00:00 CEST / 1119916800 --> 
<row><v> 0.0000000000e+00 </v><v> 0.0000000000e+00 </v><v> 0.0000000
000e+00 </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>

(i am wondering about the 0.0000000000e+00 values, the NaN are ok).

and thats a little bit strange because in the <pdp_per_row> 15 </pdp_per_row> 
<!-- 900 seconds --> section there are values:

<!-- 2005-06-28 14:30:00 CEST / 1119961800 --> <row><v> 1.5782500000e+03 
</v><v> 1.5131500000e+03 </v><v> 1.4086500
000e+03 </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2005-06-28 14:45:00 CEST / 1119962700 --> 
<row><v> 1.6466333333e+03 </v><v> 1.5655000000e+03 </v><v> 1.3269000
000e+03 </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2005-06-28 15:00:00 CEST / 1119963600 --> 
<row><v> 1.6843333333e+03 </v><v> 1.4904666667e+03 </v><v> 1.3534666
667e+03 </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>

also in the 1440 section but only until 2005-05-28:
<!-- 2005-05-27 02:00:00 CEST / 1117152000 --> <row><v> 4.7365888889e+02 
</v><v> 1.7980444444e+02 </v><v> 1.2147000
000e+02 </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>
                        <!-- 2005-05-28 02:00:00 CEST / 1117238400 --> 
<row><v> 3.6895333333e+02 </v><v> 1.5338111111e+02 </v><v> 1.4226333
333e+02 </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v><v> NaN </v></row>

any idea what i am doing wrong?

thanks.

kind regards 

andreas







On Tuesday 28 June 2005 13:18, Alex van den Bogaerdt wrote:
> On Tue, Jun 28, 2005 at 11:31:34AM +0200, Andreas Ihl wrote:
> > rrdtool create $LOCATION.rrd --step 60 \
> > DS:srv1_$LOCATION:GAUGE:120:0:U \
> > DS:srv2_$LOCATION:GAUGE:120:0:U \
> > DS:srv3_$LOCATION:GAUGE:120:0:U \
> > ...
> > RRA:AVERAGE:0.5:1:10080 \
> > RRA:AVERAGE:0.5:5:8928 \
> > RRA:AVERAGE:0.5:15:35040 \
> > RRA:AVERAGE:0.5:86400:3650 \ # 60 days data for 10 years
> >
> > the last line should be:
> >
> > RRA:AVERAGE:0.5:1440:3650  	# 1 day data for 10 years
> >
> > unfortunately i reccorded data for half a year to the incorrect rrd.
> >
> > Is there a simple way to import the data to a correct rrd?
>
> There's no way to reconstruct daily data from 60-day data. This being
> said, you can import data in a new RRD.  When you dump the data using
> "rrdtool dump", you get a large file containing the rates at certain
> intervals.  Each RRA will have an entry in this file.
>
> Extract the data chronologically and use the best resolution for each
> time.  Copy all of the 1-step-per-row RRA, copy everything from the
> 5-steps-per-row RRA except for timestamps already covered in the first,
> do the same for 15-steps-per-row and 86400-steps-per-row.
>
> Remove all XML-stuff and write down numbers in "normal" format, create
> lines looking like "1119957300:1234.001:5731.23:194.4321"
>
> The resulting list needs to function as input for the newly created RRD.
>
> Make sure you initially set the DataSource type to GAUGE. Also make
> sure heartbeat allows for large timespans (you need at least 5184000).
> Make sure to set the start of the new RRD before the first update you're
> going to perform.
>
> Do the updates, oldest first.  After doing this, your new RRD contains
> the same data; except for the resolution which *seems* to be better.
> (it isn't, not yet).
>
> Now you need to alter the new RRD.  Change heartbeat into something more
> appropriate.  Change the DataSource types in what they should be (you
> won't need to do this, yours are GAUGE).
>
> Now start using the new RRD.  I think I covered all, be liberal in
> applying my suggestions and adjust where/when necessary.
>
> HTH
> Alex
>
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://lists.ee.ethz.ch/rrd-users
> WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-users mailing list