Home » Categories » Multiple Categories

Nagios XI - Migrate Performance Data

Overview

Historical performance data that is used to generate graphs are stored in Round Robin Database (RRD) files. RRD performance data files are compiled binaries, so for a simple file transfer a user would have to have the architecture match on both machines.

If you want to migrate files from a 32bit to 64bit machine, you'll have to convert the data to XML and import it into RRD's on the new machine. The following steps will allow you to migrate the data:

On the old 32bit server:

cd /usr/local/nagios/share/perfdata/
for i in `find -name "*.rrd"`; do rrdtool dump $i > $i.xml; done
tar -cvzf perfdata.tar.gz */*.rrd.xml
for i in `find -name "*.rrd.xml"`; do rm -f $i; done
cd /var/lib/mrtg/
for i in `find -name "*.rrd"`; do rrdtool dump $i > $i.xml; done
tar -cvzf mrtgdata.tar.gz *.rrd.xml
for i in `find -name "*.rrd.xml"`; do rm -f $i; done

 

This will create the files:

  • /usr/local/nagios/share/perfdata/perfdata.tar.gz
    • This needs to be transferred to the /usr/local/nagios/share/perfdata/ directory on the new server
  • /var/lib/mrtg/mrtgdata.tar.gz
    • This needs to be transferred to the /var/lib/mrtg/ directory on the new server

 

On the new 64bit server:

cd /usr/local/nagios/share/perfdata/
for i in `find -name "*.rrd"`; do rm -f $i; done
tar -xvzf perfdata.tar.gz
for i in `find -name "*.rrd.xml"`; do rrdtool restore $i `echo $i |sed s/.xml//g`; done
for i in `find -name "*.rrd"`; do chown nagios:nagios $i; done
for i in `find -name "*.rrd.xml"`; do rm -f $i; done

cd /var/lib/mrtg/
for i in `find -name "*.rrd"`; do rm -f $i; done
tar -xvzf mrtgdata.tar.gz
for i in `find -name "*.rrd.xml"`; do rrdtool restore $i `echo $i |sed s/.xml//g`; done
for i in `find -name "*.rrd"`; do chown nagios:nagios $i; done
for i in `find -name "*.rrd.xml"`; do rm -f $i; done

 

When this completes the historic performance data will be migrated from the old server.

 

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

0 (0)
Article Rating (No Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios XI - Automated Host Management In Nagios XI
Viewed 1392 times since Wed, Jan 27, 2016
Nagios XI - Resolving "Cannot connect to database" Error - Core Config Manager
Viewed 1725 times since Mon, Jan 25, 2016
How To Download Files From The Nagios Exchange Using WGET
Viewed 3072 times since Tue, Aug 2, 2016
Nagios XI - CentOS 6 Installation Problems XI 2011R1.7 2011R1.8
Viewed 1090 times since Tue, Feb 2, 2016
Nagios XI - Redundancy And Security Planning
Viewed 876 times since Sun, Mar 25, 2018
Nagios XI - Monitoring Using the Full Power of Nagios XI Enterprise - NWC15
Viewed 1412 times since Mon, Feb 8, 2016
Nagios XI - Uploaded plugin returns "/bin/bash^M: bad interpreter: No such file or directory"
Viewed 1594 times since Thu, Feb 25, 2016
Nagios XI - Should You Change RRD Retention Periods?
Viewed 1083 times since Sun, Nov 12, 2017
Web Browser Reports 330 Error Content Encoding
Viewed 1141 times since Tue, Mar 7, 2017
Nagios XI - MySQL/MariaDB - Max Connections
Viewed 4186 times since Thu, Jun 2, 2016