Upgrade from Centreon 19.04
This chapter describes how to upgrade your Centreon platform from version 19.04 to version 21.10.
If you want to migrate your Centreon server to CentOS / Oracle Linux / RHEL 8 you need to follow the migration procedure
Prerequisitesβ
Perform a backupβ
Be sure that you have fully backed up your environment for the following servers:
- Central server
- Database server
Update the RPM signing keyβ
For security reasons, the keys used to sign Centreon RPMs are rotated regularly. The last change occurred on October 14, 2021. When upgrading from an older version, you need to go through the key rotation procedure, to remove the old key and install the new one.
Upgrade the Centreon Central serverβ
Since 21.04, Centreon uses MariaDB 10.5.
This upgrade process will only upgrade Centreon components first.
MariaDB will be upgraded afterwards.
Update the Centreon repositoryβ
Run the following commands:
yum install -y https://yum.centreon.com/standard/21.10/el7/stable/noarch/RPMS/centreon-release-21.10-5.el7.centos.noarch.rpm
If you are using a CentOS environment, you must install the Software Collections repositories with the following command:
yum install -y centos-release-scl-rh
If you have an offline license, install the corresponding repository for the plugin packs. If you are using a Business edition, install the correct Business repository too. You can find the repositories on the support portal.
Upgrade PHPβ
Centreon 21.10 uses PHP in version 8.0.
First, you need to install the remi repository:
yum install -y yum-utils
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
Then, you need to enable the php 8.0 repository
yum-config-manager --enable remi-php80
Upgrade the Centreon solutionβ
Please, make sure all users are logged out from the Centreon web interface before starting the upgrade procedure.
If you have installed Business extensions, update the Business repository to version 21.10. Visit the support portal to get its address.
Stop the Centreon Broker process:
systemctl stop cbd
Delete existing retention files:
rm /var/lib/centreon-broker/* -f
Clean yum cache:
yum clean all --enablerepo=*
Then upgrade all the components with the following command:
yum update centreon\*
Accept new GPG keys from the repositories as needed.
Enable and start the gorgoned service:
systemctl enable gorgoned
systemctl start gorgoned
The PHP timezone should be set. Run the command:
echo "date.timezone = Europe/Paris" >> /etc/php.d/50-centreon.ini
Replace Europe/Paris by your time zone. You can find the list of supported time zones here.
Execute the following commands:
systemctl stop rh-php71-php-fpm
systemctl disable rh-php71-php-fpm
systemctl enable php-fpm
systemctl start php-fpm
Update your customized Apache configurationβ
This section only applies if you customized your Apache configuration. When upgrading your platform, the Apache configuration file is not upgraded automatically: the new configuration file brought by the rpm does not replace tha old file. You must copy the changes manually to your customized configuration file.
Run a diff between the old and the new Apache configuration files:
diff -u /opt/rh/httpd24/root/etc/httpd/conf.d/10-centreon.conf /opt/rh/httpd24/root/etc/httpd/conf.d/10-centreon.conf.rpmnew
- 10-centreon.conf (post upgrade): this file contains the custom configuration. It does not contain anthing new brought by version 21.10, e.g. the authentication string in the LocationMatch directive
- 10-centreon.conf.rpmnew (post upgrade): this file is provided by the rpm; it contains the authentication string, but does not contain any custom configuration.
For each difference between the files, assess whether you should copy it from 10-centreon.conf.rpmnew to 10-centreon.conf.
In particular, make sure your customized Apache configuration contains the following directive (with authentication).
<LocationMatch ^/centreon/(authentication|api/(latest|beta|v[0-9]+|v[0-9]+\.[0-9]+))/.*$>
ProxyPassMatch fcgi://127.0.0.1:9042/usr/share/centreon/api/index.php/$1
</LocationMatch>
Additional actionsβ
Configure Apache API accessβ
If you had a custom apache configuration, upgrade process through RPM did not update it.
If you use https, you can follow this procedure
You'll then need to add API access section to your configuration file: /opt/rh/httpd24/root/etc/httpd/conf.d/10-centreon.conf
Only lines with "+" symbol must be taken into account.
+Alias /centreon/api /usr/share/centreon
Alias /centreon /usr/share/centreon/www/
+<LocationMatch ^/centreon/(?!api/latest/|api/beta/|api/v[0-9]+/|api/v[0-9]+\.[0-9]+/)(.*\.php(/.*)?)$>
+ ProxyPassMatch fcgi://127.0.0.1:9042/usr/share/centreon/www/$1
+</LocationMatch>
+<LocationMatch ^/centreon/(authentication|api/(latest|beta|v[0-9]+|v[0-9]+\.[0-9]+))/.*$>
+ ProxyPassMatch fcgi://127.0.0.1:9042/usr/share/centreon/api/index.php/$1
+</LocationMatch>
ProxyTimeout 300
<IfModule mod_security2.c>
# https://github.com/SpiderLabs/ModSecurity/issues/652
SecRuleRemoveById 200003
</IfModule>
<Directory "/usr/share/centreon/www">
DirectoryIndex index.php
Options Indexes
AllowOverride all
Order allow,deny
Allow from all
Require all granted
<IfModule mod_php5.c>
php_admin_value engine Off
</IfModule>
+ FallbackResource /centreon/index
AddType text/plain hbs
</Directory>
+<Directory "/usr/share/centreon/api">
+ Options Indexes
+ AllowOverride all
+ Order allow,deny
+ Allow from all
+ Require all granted
+ <IfModule mod_php5.c>
+ php_admin_value engine Off
+ </IfModule>
+
+ AddType text/plain hbs
+</Directory>
RedirectMatch ^/$ /centreon
Then, restart apache service :
systemctl restart httpd24-httpd
Finalizing the upgradeβ
Before starting the web upgrade process, reload the Apache server with the following command:
systemctl reload httpd24-httpd
Then log on to the Centreon web interface to continue the upgrade process:
Click on Next:
Click on Next:
The release notes describe the main changes. Click on Next:
This process performs the various upgrades. Click on Next:
Your Centreon server is now up to date. Click on Finish to access the login page:
If the Centreon BAM module is installed, refer to the upgrade procedure.
Post-upgrade actionsβ
Upgrade extensionsβ
From Administration > Extensions > Manager
, upgrade all extensions, starting
with the following:
- License Manager,
- Plugin Packs Manager,
- Auto Discovery.
Then you can upgrade all other commercial extensions.
Start the tasks managerβ
Since 20.04, Centreon has changed his tasks manager from Centcore to Gorgone.
To act this change, run the following commands:
systemctl stop centcore
systemctl enable gorgoned
systemctl start gorgoned
systemctl disable centcore
Engine statistics that have been collected by Centcore will know be collected by Gorgone.
Change the rights on the statistics RRD files by running the following command:
chown -R centreon-gorgone /var/lib/centreon/nagios-perf/*
Restart monitoring processesβ
Centreon Broker component has changed its configuration file format.
It now uses JSON instead of XML.
To make sure Broker and Engine's Broker module are using new configuration files, follow this steps:
Deploy Central's configuration from the Centreon web UI by following this procedure,
Restart both Broker and Engine on the Central server by running this command:
```shell
systemctl restart cbd centengine
```
Upgrade the MariaDB serverβ
The MariaDB components can now be upgraded.
Refer to the official MariaDB documentation to know more about this process:
https://mariadb.com/kb/en/upgrading-between-major-mariadb-versions/
Update the Centreon repositoryβ
This step is required ONLY when your environment features an architecture with a dedicated remote DBMS. If your environment features Centreon Central and MariaDB together on the same server, you SHOULD simply skip this step.
Run the following command on the dedicated DBMS server:
yum install -y https://yum.centreon.com/standard/21.10/el7/stable/noarch/RPMS/centreon-release-21.10-5.el7.centos.noarch.rpm
Configurationβ
The innodb_additional_mem_pool_size
parameter has been removed since MariaDB 10.2,
so you should remove it from file /etc/my.cnf.d/centreon.cnf
#
# Custom MySQL/MariaDB server configuration for Centreon
#
[server]
innodb_file_per_table=1
open_files_limit = 32000
key_buffer_size = 256M
sort_buffer_size = 32M
join_buffer_size = 4M
thread_cache_size = 64
read_buffer_size = 512K
read_rnd_buffer_size = 256K
max_allowed_packet = 8M
# For 4 Go Ram
-#innodb_additional_mem_pool_size=512M
#innodb_buffer_pool_size=512M
# For 8 Go Ram
-#innodb_additional_mem_pool_size=1G
#innodb_buffer_pool_size=1G
Upgrading MariaDBβ
You have to uninstall then reinstall MariaDB to upgrade between major versions (i.e. to switch from version 10.1 to version 10.5).
Stop the mariadb service:
systemctl stop mariadb
Uninstall the current version:
rpm --erase --nodeps --verbose MariaDB-server MariaDB-client MariaDB-shared MariaDB-compat MariaDB-common
Install version 10.5:
yum install MariaDB-server-10.5\* MariaDB-client-10.5\* MariaDB-shared-10.5\* MariaDB-compat-10.5\* MariaDB-common-10.5\*
Start the mariadb service:
systemctl start mariadb
Launch the MariaDB upgrade process:
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
Refer to the official documentation for more information or if errors occur during this last step.
Enable MariaDB on startupβ
Execute the following command:
systemctl enable mariadb
Upgrade the Remote Serversβ
This procedure is the same than to upgrade a Centreon Central server.
At the end of the update, configuration should be deployed from the Central server.
Upgrade the Pollersβ
Update the Centreon repositoryβ
Run the following command:
yum install -y https://yum.centreon.com/standard/21.10/el7/stable/noarch/RPMS/centreon-release-21.10-5.el7.centos.noarch.rpm
Upgrade the Centreon solutionβ
Clean yum cache:
yum clean all --enablerepo=*
Upgrade all the components with the following command:
yum update centreon\*
Accept new GPG keys from the repositories as needed.
Start and enable gorgoned:
systemctl start gorgoned
systemctl enable gorgoned
Restart centengine:
systemctl restart centengine
Post-upgrade actionsβ
Due to new configuration file format for Engine's Broker module, the configuration needs to be re-deployed.
Deploy Poller's configuration from the Centreon web UI by following this procedure, and choose Restart method for Engine process.
Communicationsβ
By default, the communication between Central and Pollers or Remote Servers will still be using SSH protocol.
Consider changing the communication protocol by following the Change communication from SSH to ZMQ procedure.
Secure your platformβ
Don't forget to secure your Centreon platform following our recommendations