Converting Munin's RRD Tool files from AMD64 to Intel machiens

Sponsored Links

Converting Munin's RRD Tool files from AMD64 to Intel machiens

A client who over grew the capacity of their Dual Opteron server planned on moving their site to a 2X Quad Xeon machine.

One of the things we use on the server is Munin for resource utilization and statistics. It is a server side tool that can monitor CPU, Memory, network, Apache, MySQL and much more. It has a web based interface that generates graphs from RRD Tool files.

In order not to lose the history, I copied the /etc/munin and /var/lib/munin from the old machine to the new one. However, after copying them, the graphs were not updating. After some investigation, the logs were showing the following error:

Unable to graph /var/lib/munin/.../processes-processes-g.rrd: This RRD was created on other architecture

So, it was aparent that the file structure is CPU dependent.

However, the nice thing about RRD Tool is that it has built in support for export/import to/from an XML format.

Hence I was able to do this on the source machine:

for FILE in *rrd
do 
rrdtool dump $FILE > $FILE.xml
done 

Generating one .xml file for each .rrd file.

Then on the new machine, I did this:

for FILE in *xml
do 
NEW=`basename $FILE .xml`
rrdtool restore $FILE $NEW
done 

Voila ...

The error message disappeared and the graphs showed the old history correctly.

 

Merging two RRD files

In order to merge two RRD files into one file, download the merge-rrd.py python script, and run it on the files.

Thanks!

Thanks!

Post new comment

  • All spam and irrelevant comments will be deleted.
  • Comments posted here will take some time to appear on the site. Do not post your comment again if you do not see it. Just be patient and it will be published.
  • Note that what you post here will be publicly available on the web and will be indexed in search engines.
  • We reserve the right to unpublish any comments without stating the reasons for that.
  • All postings are subject to our Terms of use
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • Lines and paragraphs break automatically.

More information about formatting options