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/

3 (1)
Article Rating (1 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
Upgrading to NDO 3 after having been downgraded in newer versions of Nagios XI
Viewed 3040 times since Fri, Jan 15, 2021
Nagios XI - Scheduled Downtime Not Working
Viewed 6090 times since Mon, Oct 10, 2016
ERROR: Please add the ’Optional’ channel to your Red Hat systems subscriptions
Viewed 24894 times since Tue, Jan 26, 2016
Nagios XI - Last Check Time Not Updating
Viewed 17816 times since Tue, Jan 6, 2015
Nagios Core - SNMP Explained - NWC15
Viewed 11249 times since Mon, Feb 8, 2016
Nagios XI - Using the Negate Plugin
Viewed 6806 times since Thu, Jan 28, 2016
Nagios XI - Event Data Is Stale
Viewed 4780 times since Wed, Jan 27, 2016
Nagios XI - Configuration Applies, No Changes Take Place
Viewed 7359 times since Tue, Jan 27, 2015
Nagios XI - Configuration Applies, but still get "Configuration File Is Out Of Date" Error
Viewed 4375 times since Tue, Jan 26, 2016
Nagios XI - SNMP Trap Tutorial
Viewed 36338 times since Mon, Mar 9, 2015