Discussion:
[rrd-users] merge/combine RRD database files
Martin T
2011-12-09 00:13:03 UTC
Permalink
I have two RRD database files: old.rrd and new.rrd. According to
"rrdtool info old.rrd" it's a rrd_version = "0001" file and new.rrd is
a rrd_version = "0003" file. Data source type is COUNTER. Both
databases are used to store router interface counter values.
Is it possible to merge those two files into one? Or at least generate
graphs based on information from both files?


regards,
martin
f***@n-mental.com
2011-12-09 07:11:29 UTC
Permalink
Post by Martin T
I have two RRD database files: old.rrd and new.rrd. According to
"rrdtool info old.rrd" it's a rrd_version = "0001" file and new.rrd is
a rrd_version = "0003" file. Data source type is COUNTER. Both
databases are used to store router interface counter values.
Is it possible to merge those two files into one? Or at least
generate
graphs based on information from both files?
regards,
martin
_______________________________________________
rrd-users mailing list
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users
Its simple to create graphs with data from different files. Just add
two data-definitions, one for each file, to rrdtool graph command

rrdtool graph DEF:<vname>=<rrdfile1>:... DEF:<vname>=<rrdfile2>:...
....


/FredrikW
Simon Hobson
2011-12-09 07:45:58 UTC
Permalink
Post by Martin T
Or at least generate
graphs based on information from both files?
Do you mean you have one file that runs up to a certain date, and
then another file that runs from that date ?

I've been in that situation in the past. What I did was define the
cutover point (date/time), define variables from both files, and then
use an IF statement. I can't look up exactly what I had as I've since
ripped it out - it was long ago and the newer file covers all the
period I'm interested in.
--
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.
Steve Shipway
2011-12-09 08:14:20 UTC
Permalink
If you mean that you want to user data from the old.rrd up to a certain time and from new.rrd from that time on, then you could
1. Export both files to XML using rrdexport,
2. write a script (perl?) to create a new XML file from the two exported ones,
3. Import the new rrd file to make a new combined rrd file.

Of course, this assumes you have scripting skill necessary to perform the XML merge. The RRD export XML is a firly simple format, though, so it shouldnt be too hard.

Steve

Steve Shipway
University of Auckland ITS
UNIX Systems Design Lead
***@auckland.ac.nz
Ph: +64 9 373 7599 ext 86487
Larry Adams
2011-12-09 21:26:10 UTC
Permalink
Martin,

You can leverage this utility to merge the RRDfiles. Although this has
not been tested on 'all' combinations, it should cover the standard
traffic type graphs.

http://svn.cacti.net/viewvc/developers/thewitness/rrdsplice/rrdsplice.php?view=log

Regards,

Larry Adams
aka TheWitness



-------- Original Message --------
Subject: Fwd: [rrd-users] merge/combine RRD database files
Date: Fri, 9 Dec 2011 21:22:44 +0000 (UTC)
From: ***@comcast.net
To: ***@cacti.net





Regards,

Larry Adams
aka TheWitness
http://www.cacti.net

------------------------------------------------------------------------
*From: *"Martin T" <***@gmail.com>
*To: *rrd-***@lists.oetiker.ch
*Sent: *Thursday, December 8, 2011 7:13:03 PM
*Subject: *[rrd-users] merge/combine RRD database files

I have two RRD database files: old.rrd and new.rrd. According to
"rrdtool info old.rrd" it's a rrd_version = "0001" file and new.rrd is
a rrd_version = "0003" file. Data source type is COUNTER. Both
databases are used to store router interface counter values.
Is it possible to merge those two files into one? Or at least generate
graphs based on information from both files?


regards,
martin

Loading...