Page 1 of 1

Migrate PNP4Nagios Perfdata to a new server

Posted: Tue Oct 22, 2024 6:09 am
by uc-vel
Hi All,

We are migrating our Nagios Core server from RHEL 7 to RHEL 8.

As part of this migration, we also want to migrate the performance data to the new server to retain historical data in PNP4Nagios.

Could you please advise on how to migrate the performance data in a way that PNP4Nagios can read on the new server?

Thanks in advance!

Re: Migrate PNP4Nagios Perfdata to a new server

Posted: Thu Oct 24, 2024 4:30 pm
by danderson
Thanks for reaching out @uc-vel,

Using the backup and restore script should be able to transfer over your performance data files. Otherwise they should be stored in /usr/local/nagios/share/perfdata and /var/lib/mrtg as rrd files.

Re: Migrate PNP4Nagios Perfdata to a new server

Posted: Thu Oct 24, 2024 11:08 pm
by uc-vel
Thank you for your response @danderson,

Sorry, I couldn't find any backup and restore script for RRD database.

As per the configuration on my current system, the RRD files are stored in the following direcotry.

# grep 'rrdbase' /usr/local/pnp4nagios/etc/config.php
$conf['rrdbase'] = "/usr/local/pnp4nagios/var/perfdata/";

So I can simply do a rsync on the current server to copy all files from this directory to new server.

Also it’s a good idea to stop both Nagios and NPCD before doing the copy.

Are there anything else I need to consider to make sure the perfdata is processible on the new server?

Thanks!

Re: Migrate PNP4Nagios Perfdata to a new server

Posted: Tue Nov 05, 2024 3:31 pm
by bbahn
Hello @uc-vel,

Here are some instructions and best practices for migrating Nagios performance data: Nagios XI - Migrate Performance Data. Though the article is for Nagios XI, the same files listed there are used by Nagios Core, so it applies to Nagios Core as well.