Migrate from a Centreon 3.4 platform
Prerequisitesβ
The following procedure only applies to migration from a Centreon 3.4 platform installed on a 64-bit GNU/Linux distribution other than Oracle Linux / RHEL 8. Here are the system requirements:
Components | Version |
---|---|
Centreon Web | 2.8.x |
Centreon Broker | 3.0.x |
Centreon Engine | 1.8.x |
Migrateβ
All servers (central, remote and pollers) in your architecture must have the same major version of Centreon. It is also recommended that they have the same minor version.
If your Centreon platform includes a Centreon redundancy system, please contact Centreon support.
If you try to migrate a platform using the Centreon Poller Display 1.6.x, please refer to the following migration procedure.
Install the new central serverβ
Perform the following actions:
You will need to install a new Centreon Central server from packages, until you complete the installation process by connecting to the Centreon Web interface.
Perform software and system updates:
dnf update
dnf update
apt update
It is advisable to set the same password for the centreon user during the web installation process.
Synchronize the dataβ
Connect to your old Centreon server and synchronize following directories:
rsync -avz /etc/centreon root@<IP_NEW_CENTREON>:/etc
rsync -avz /etc/centreon-broker root@<IP_NEW_CENTREON>:/etc
rsync -avz /var/log/centreon-engine/archives/ root@<IP_NEW_CENTREON>:/var/log/centreon-engine
rsync -avz --exclude centcore/ --exclude log/ /var/lib/centreon root@<IP_NEW_CENTREON>:/var/lib
rsync -avz /var/spool/centreon/.ssh root@<IP_NEW_CENTREON>:/var/spool/centreon
rsync -avz /usr/share/centreon/www/img/media root@<IP_NEW_CENTREON>:/usr/share/centreon/www/img
Replace <IP_NEW_CENTREON> with the IP of the new Centreon server.
Retrieve databasesβ
Dump source databases:
mysqldump -u root -p centreon > /tmp/centreon.sql
mysqldump -u root -p centreon_storage > /tmp/centreon_storage.sqlStop source MariaDB servers:
service mysqld stop
Export the dumps to the new Centreon 23.10 database server (make sure you have enough space for large databases dumps):
rsync -avz /tmp/centreon.sql root@<IP_NEW_CENTREON>:/tmp/
rsync -avz /tmp/centreon_storage.sql root@<IP_NEW_CENTREON>:/tmp/On the Centreon 23.10 database server, drop the original databases and create them again:
mysql -u root -p
DROP DATABASE centreon;
DROP DATABASE centreon_storage;
CREATE DATABASE centreon;
CREATE DATABASE centreon_storage;Import the previously transfered dumps:
mysql -u root centreon -p </tmp/centreon.sql
mysql -u root centreon_storage -p </tmp/centreon_storage.sqlUpgrade the tables:
mysql_upgrade
If your database is password-protected, enter:
mysql_upgrade -u <database_admin_user> -p
Example: if your database_admin_user is
root
, enter:mysql_upgrade -u root -p
Start the MariaDB process on the new server:
systemctl start mariadb
Replace <IP_NEW_CENTREON> with the IP of the new Centreon server.
Synchronize the pluginsβ
Synchronizing the monitoring plugins is more complex and depends on your installation. The main directories to synchronize are:
- /usr/lib/nagios/plugins/
- /usr/lib/centreon/plugins/
To run the plugins, you must first install the required dependencies.
If you still have remote Centreon Engine 1.8.1 Pollers whose upgrade to 23.10 you want to postpone, be aware that Centreon Web 23.10 resource $USER1$ now points to /usr/lib64/nagios/plugins
This is how to mitigate the issue on the 1.8.1 Pollers:
mv /usr/lib64/nagios/plugins/* /usr/lib/nagios/plugins/
rmdir /usr/lib64/nagios/plugins/
ln -s -t /usr/lib64/nagios/ /usr/lib/nagios/plugins/You now have a symbolic link like this:
$ ls -alt /usr/lib64/nagios/
lrwxrwxrwx 1 root root 24 1 nov. 17:59 plugins -> /usr/lib/nagios/plugins/
-rwxr-xr-x 1 root root 1711288 6 avril 2018 cbmod.so
You can now push the poller's configuration from Centreon 23.10 whether the remote Poller is Centreon Engine 23.10 or 1.8.1.
Upgrade Centreonβ
On the new server, force the update by moving the contents of the /var/lib/centreon/installs/install-23.10.0-YYYYMMDD_HHMMSS directory to the /usr/share/centreon/www/install directory:
cd /var/lib/centreon/installs/
mv install-23.10.0-YYYYMMDD_HHMMSS/ /usr/share/centreon/www/install/
If you use the same IP address or same DNS name for the old Centreon webserver and the new one, do a full cache cleanup of your browser to avoid JS issues
Go to http://<IP_NEW_CENTREON>/centreon
URL and perform the upgrade.
If you changed the centreon password during the installation process, you must follow these steps:
- Edit the /etc/centreon/centreon.conf.php file,
- Edit the /etc/centreon/conf.pm file,
- Edit the Centreon Broker central configuration using Centreon web interface and change the password for the Perfdata generator and Broker SQL database output,
- Edit the file /etc/centreon/config.d/10-database.yaml.
If the IP of your Centreon server has changed, edit the configuration for all the Centreon Broker modules of your Pollers and change the IP to connect to the Centreon Central server (output IPv4). See the Advanced configuration chapter for more information.
Then generate the configuration of all your pollers and export it.
Upgrade the modulesβ
Please refer to the documentation of each module to verify compatibility with Centreon 23.10 and perform the upgrade.
Migrate your other serversβ
Make sure all servers (central, remote and pollers) in your architecture have the same major version of Centreon.