Bobcares

wesupport

CLIENT AREACall Us 1-800-383-5193
Bobcares

wesupport

Call Us 1-800-383-5193
Bobcares

wesupport

Call Us 1-800-383-5193

Need help?

Our experts have had an average response time of 13.52 minutes in October 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Migrate Performance Data in Nagios – How to do it

by | Apr 24, 2021

Don’t know how to Migrate Performance Data in Nagios? We can help you.

Generally, the performance data we use to generate graphs are in Round Robin Database (RRD) files. The RRD performance data files are compiled binaries.

So, for a simple file transfer, a user should have the architecture match on both machines.

As part of our Server Management Services, we assist our customers with several Nagios queries.

Today, let us discuss how to perform the migration.

 

Migrate Performance Data in Nagios

To migrate files from a 32 bit to 64-bit machine, we have to convert the data to XML and import it into RRD’s on the new machine.

Our Support Techs suggest the following 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

On the other hand, 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.

[Need help with the migration? We’d be happy to assist]

 

Conclusion

In short, to migrate, we have to convert the data to XML and import it into RRD’s on the new machine. Today, we saw an effective method our Support Techs employ in order to perform this task.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Categories

Tags