Need Assistance?

In only two hours, with an average response time of 15 minutes, our expert will have your problem sorted out.

Server Trouble?

For a single, all-inclusive fee, we guarantee the continuous reliability, safety, and blazing speed of your servers.

How to Migrate Performance Data in Nagios.

To migrate performance data in Nagios, the performance data is typically used to generate graphs from RRD (Round Robin Database) files. These RRD performance data files are compiled binaries, meaning that when transferring these files, the system architecture must match on both machines, even for a simple file transfer.

When migrating performance data in Nagios, it’s crucial to convert the data into XML and load it into the RRDs of the new environment. If you encounter difficulties, you can follow the troubleshooting steps provided, or contact our technical support for guidance.

Now, 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

If you encounter any issues or need further assistance with how to migrate performance data in Nagios, consider seeking expert help. Additionally, if you have any other questions, explore the comprehensive resources available. Don’t hesitate to reach out directly for personalized support.

Liked!! Share the post.

Get Support right now!

Start server management with our 24x7 monitoring and active support team

Can't get what you are looking for?

Available 24x7 for emergency support.