Import historical data into new RRD?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Import historical data into new RRD?

David Carmean-2

I have a couple of years of historical data in a few single-datasource
RRDs.  I want to keep that data but have to move to a new RRD with four
datasources.  Is there any way I can get the data that's in the long-term
RRAs in the original into the new RRD without losing detail?  I guess I'm
unclear on whether updates with a timestamp are subject to the same
averaging/consolidation as the normal NOW PDPs.

Thanks.

--
Unsubscribe mailto:[hidden email]?subject=unsubscribe
Help        mailto:[hidden email]?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

Reply | Threaded
Open this post in threaded view
|

Re: Import historical data into new RRD?

Jason Fesler
> I have a couple of years of historical data in a few single-datasource
> RRDs.  I want to keep that data but have to move to a new RRD with four
> datasources.  Is there any way I can get the data that's in the long-term
> RRAs in the original into the new RRD without losing detail?  I guess I'm
> unclear on whether updates with a timestamp are subject to the same
> averaging/consolidation as the normal NOW PDPs.

Export the RRD to XML; munge the XML; reimport the XML.

"so simple" .. that I don't normally bother.


--
Unsubscribe mailto:[hidden email]?subject=unsubscribe
Help        mailto:[hidden email]?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

Reply | Threaded
Open this post in threaded view
|

Re: Import historical data into new RRD?

Alex van den Bogaerdt-2
In reply to this post by David Carmean-2
On Fri, May 12, 2006 at 01:38:37PM -0700, David Carmean wrote:

> I have a couple of years of historical data in a few single-datasource
> RRDs.  I want to keep that data but have to move to a new RRD with four
> datasources.  Is there any way I can get the data that's in the long-term
> RRAs in the original into the new RRD without losing detail?  I guess I'm
> unclear on whether updates with a timestamp are subject to the same
> averaging/consolidation as the normal NOW PDPs.

Will the new RRD file have the same properties as the old files? If so:

Create the new database, making sure its start is "a couple of years"
ago minus a small amount (so: before the start of your existing data).
Set the data source type in the new RRD to GAUGE. Set heartbeat to
some large value (at least "a couple of years").  See rrdtool tune.

Then use rrdtool fetch to get the existing numbers.  The timestamps
associated with them are what the new database expects. Normalization
will not happen (or rather: will have no effect).

You will have to mix data from the source RRD files into one update
(per interval of course). Once updated, you cannot perform another
update using the same timestamp.

Performance tip: generate a file that you can run through rrdtool using
its pipe interface:

   update new.rrd 1020204000:1:2:3:4
   update new.rrd 1020204300:10:20:30:40

and so on, then: "<that_file rrdtool -"

After this excercise reset data source type and heartbeat to what they
should be for your database.


--
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/

--
Unsubscribe mailto:[hidden email]?subject=unsubscribe
Help        mailto:[hidden email]?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi