{"id":6367,"date":"2021-05-07T11:04:54","date_gmt":"2021-05-07T05:34:54","guid":{"rendered":"https:\/\/www.skynats.com\/?p=6367"},"modified":"2025-10-30T12:41:50","modified_gmt":"2025-10-30T07:11:50","slug":"migrate-performance-data-in-nagios","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/migrate-performance-data-in-nagios\/","title":{"rendered":"How to Migrate Performance Data in Nagios."},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When migrating performance data in Nagios, it&#8217;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 <a href=\"https:\/\/www.skynats.com\/server-management\/\">technical support<\/a> for guidance.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, let us discuss how to perform the migration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading has-small-font-size\" id=\"h-migrate-performance-data-in-nagios\">Migrate Performance Data in Nagios<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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&#8217;s on the new machine.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Follow the steps to migrate the data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On the old 32 bit server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/nagios\/share\/perfdata\/\nfor i in `find -name \u201c*.rrd\u201d`; do rrdtool dump $i &gt; $i.xml; done\ntar -cvzf perfdata.tar.gz *\/*.rrd.xml\nfor i in `find -name \u201c*.rrd.xml\u201d`; do rm -f $i; done\n\ncd \/var\/lib\/mrtg\/\nfor i in `find -name \u201c*.rrd\u201d`; do rrdtool dump $i &gt; $i.xml; done\ntar -cvzf mrtgdata.tar.gz *.rrd.xml\nfor i in `find -name \u201c*.rrd.xml\u201d`; do rm -f $i; done\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Eventually, this will create the files:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/nagios\/share\/perfdata\/perfdata.tar.gz<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We need to transfer this to the \/usr\/local\/nagios\/share\/perfdata\/ directory on the new server.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>\/var\/lib\/mrtg\/mrtgdata.tar.gz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">we need to transfer to the \/var\/lib\/mrtg\/ directory on the new server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then on the new 64-bit server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/nagios\/share\/perfdata\/\nfor i in `find -name \u201c*.rrd\u201d`; do rm -f $i; done\ntar -xvzf perfdata.tar.gz\nfor i in `find -name \u201c*.rrd.xml\u201d`; do rrdtool restore $i `echo $i |sed s\/.xml\/\/g`; done\nfor i in `find -name \u201c*.rrd\u201d`; do chown nagios:nagios $i; done\nfor i in `find -name \u201c*.rrd.xml\u201d`; do rm -f $i; done\n\ncd \/var\/lib\/mrtg\/\nfor i in `find -name \u201c*.rrd\u201d`; do rm -f $i; done\ntar -xvzf mrtgdata.tar.gz\nfor i in `find -name \u201c*.rrd.xml\u201d`; do rrdtool restore $i `echo $i |sed s\/.xml\/\/g`; done\nfor i in `find -name \u201c*.rrd\u201d`; do chown nagios:nagios $i; done\nfor i in `find -name \u201c*.rrd.xml\u201d`; do rm -f $i; done\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Once this completes, the historic performance data will migrate from the old server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Conclusion<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you encounter any issues or need further assistance with how to migrate performance data in <a href=\"https:\/\/www.nagios.org\/\" target=\"_blank\" rel=\"noopener\">Nagios<\/a>, consider seeking expert help. Additionally, if you have any other questions, explore the comprehensive resources available. Don\u2019t hesitate to reach out directly for personalized support.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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, [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[481,310,264],"class_list":["post-6367","post","type-post","status-publish","format-standard","hentry","category-blog","tag-how-to-migrate-performance-data-in-nagios","tag-nagios","tag-nagios-migration"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=6367"}],"version-history":[{"count":1,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6367\/revisions"}],"predecessor-version":[{"id":16531,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/6367\/revisions\/16531"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=6367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=6367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=6367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}