Usually, the performance data is used to generate graphs around the RRD files (Round Robin Database). The RRD performance data files are compiled binaries. Even for the simple file transfer, you need to have the architecture match on both machines.
Our technical team support will fix migrate performance data in Nagios under our server management plan. You can also take assistance from our technical team support 24/7 for fixing the error or any sort of installation and migration.
Today, let us discuss how to perform the migration.
Migrate Performance Data in Nagios
You need have to convert the data to XML, in order to migrate the files from a 32 bit to a 64-bit machine and try to import it into RRD’s on the new machine.
Follow the steps to migrate the data.
On the old 32 bit 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
Eventually, this will create the files:
/usr/local/nagios/share/perfdata/perfdata.tar.gz
- We need to transfer this to the /usr/local/nagios/share/perfdata/ directory on the new server.
/var/lib/mrtg/mrtgdata.tar.gz
we need to transfer to the /var/lib/mrtg/ directory on the new server.
Then on the new 64-bit 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
Once this completes, the historic performance data will migrate from the old server.
Conclusion
In brief, in order to migrate, you need to convert the data to XML and import it into RRD’s on the new machine. Follow the steps to fix the issues or you can take our technical team support for any assistance.