Upgrade from Centreon 23.04
This chapter describes how to upgrade your Centreon platform from version 23.04 to version 23.10.
When you upgrade your central server, make sure you also upgrade all your remote servers and your pollers. All servers in your architecture must have the same version of Centreon. In addition, all servers must use the same version of the BBDO protocol.
If you want to migrate your Centreon platform to another server/OS, please read our chapter on migration. 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
Upgrade the Centreon Central serverβ
When you run a command, check its output. If you get an error message, stop the procedure and fix the issue.
Install the new repositoriesβ
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
Update your Centreon 23.04 to the latest minor version.
Remove the centreon.repo file:
rm /etc/yum.repos.d/centreon.repo
Install the new repository:
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/23.10/el8/centreon-23.10.repo
Update your Centreon 23.04 to the latest minor version.
Remove the centreon.repo file:
rm /etc/yum.repos.d/centreon.repo
Install the new repository:
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/23.10/el9/centreon-23.10.repo
echo "deb https://packages.centreon.com/apt-standard-23.10-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon.list
echo "deb https://packages.centreon.com/apt-plugins-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon-plugins.list
Then import the repository key:
wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1
apt update
If you have an offline license, also remove the old Monitoring Connectors repository, then install the new one.
If you have a Business edition, do the same with the Business repository.
You can find the address of these repositories on the support portal.
Upgrade the Centreon solutionβ
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 23.10. Visit the support portal to get its address.
If your OS is Debian 11 and you have a customized Apache configuration, perform a backup of your configuration file (/etc/apache2/sites-available/centreon.conf).
Stop the Centreon Broker process:
systemctl stop cbd
Delete existing retention files:
rm /var/lib/centreon-broker/* -f
Clean the cache:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
dnf clean all --enablerepo=*
dnf clean all --enablerepo=*
apt clean
apt update
Then upgrade all the components with the following command:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
dnf update centreon\* php-pecl-gnupg
dnf update centreon\* php-pecl-gnupg
apt install --only-upgrade centreon
Accept new GPG keys from the repositories as needed.
Update your customized Apache configurationβ
This section only applies if you customized your Apache configuration.
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
When you upgrade your platform, the Apache configuration file is not upgraded automatically. The new configuration file brought by the rpm does not replace the 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 /etc/httpd/conf.d/10-centreon.conf /etc/httpd/conf.d/10-centreon.conf.rpmnew
- 10-centreon.conf (post upgrade): this file contains the custom configuration. It does not contain anything new brought by the upgrade.
- 10-centreon.conf.rpmnew (post upgrade): this file is provided by the rpm; it 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.
Check that Apache is configured properly by running the following command:
apachectl configtest
The expected result is the following:
Syntax OK
Restart the Apache and PHP processes to take the new configuration into account:
systemctl restart php-fpm httpd
Then check its status:
systemctl status httpd
If everything is ok, you should have:
β httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
ββphp-fpm.conf
Active: active (running) since Tue 2020-10-27 12:49:42 GMT; 2h 35min ago
Docs: man:httpd.service(8)
Main PID: 1483 (httpd)
Status: "Total requests: 446; Idle/Busy workers 100/0;Requests/sec: 0.0479; Bytes served/sec: 443 B/sec"
Tasks: 278 (limit: 5032)
Memory: 39.6M
CGroup: /system.slice/httpd.service
ββ1483 /usr/sbin/httpd -DFOREGROUND
ββ1484 /usr/sbin/httpd -DFOREGROUND
ββ1485 /usr/sbin/httpd -DFOREGROUND
ββ1486 /usr/sbin/httpd -DFOREGROUND
ββ1487 /usr/sbin/httpd -DFOREGROUND
ββ1887 /usr/sbin/httpd -DFOREGROUND
When you upgrade your platform, the Apache configuration file is not upgraded automatically. The new configuration file brought by the rpm does not replace the 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 /etc/httpd/conf.d/10-centreon.conf /etc/httpd/conf.d/10-centreon.conf.rpmnew
- 10-centreon.conf (post upgrade): this file contains the custom configuration. It does not contain anything new brought by the upgrade.
- 10-centreon.conf.rpmnew (post upgrade): this file is provided by the rpm; it 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.
Check that Apache is configured properly by running the following command:
apachectl configtest
The expected result is the following:
Syntax OK
Restart the Apache and PHP processes to take the new configuration into account:
systemctl restart php-fpm httpd
Then check its status:
systemctl status httpd
If everything is ok, you should have:
β httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
ββphp-fpm.conf
Active: active (running) since Tue 2020-10-27 12:49:42 GMT; 2h 35min ago
Docs: man:httpd.service(8)
Main PID: 1483 (httpd)
Status: "Total requests: 446; Idle/Busy workers 100/0;Requests/sec: 0.0479; Bytes served/sec: 443 B/sec"
Tasks: 278 (limit: 5032)
Memory: 39.6M
CGroup: /system.slice/httpd.service
ββ1483 /usr/sbin/httpd -DFOREGROUND
ββ1484 /usr/sbin/httpd -DFOREGROUND
ββ1485 /usr/sbin/httpd -DFOREGROUND
ββ1486 /usr/sbin/httpd -DFOREGROUND
ββ1487 /usr/sbin/httpd -DFOREGROUND
ββ1887 /usr/sbin/httpd -DFOREGROUND
Use the backup file you created in the previous step to copy your customizations to the file /etc/apache2/sites-available/centreon.conf.
Check that Apache is configured properly by running the following command:
apache2ctl configtest
The expected result is the following:
Syntax OK
Check the status of Apache:
systemctl status apache2
If everything is ok, you should have:
β apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor pres>
Active: active (running) since Tue 2022-08-09 05:01:36 UTC; 3h 56min ago
Docs: https://httpd.apache.org/docs/2.4/
Main PID: 518 (apache2)
Tasks: 11 (limit: 2356)
Memory: 18.1M
CPU: 1.491s
CGroup: /system.slice/apache2.service
ββ 518 /usr/sbin/apache2 -k start
ββ1252 /usr/sbin/apache2 -k start
ββ1254 /usr/sbin/apache2 -k start
ββ1472 /usr/sbin/apache2 -k start
ββ3857 /usr/sbin/apache2 -k start
ββ3858 /usr/sbin/apache2 -k start
ββ3859 /usr/sbin/apache2 -k start
ββ3860 /usr/sbin/apache2 -k start
ββ3876 /usr/sbin/apache2 -k start
ββ6261 /usr/sbin/apache2 -k start
ββ6509 /usr/sbin/apache2 -k start
Customized Apache configuration: enable text compressionβ
In order to improve page loading speed, you can activate text compression on the Apache server. It requires the brotli package to work. This is optional, but it provides a better user experience.
Add the following code to your Apache configuration file, in both the <VirtualHost *:80>
and <VirtualHost *:443>
elements:
<IfModule mod_brotli.c>
AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/xml text/css text/javascript application/javascript application/json
</IfModule>
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json
Finalizing the upgradeβ
Before starting the web upgrade process, reload the Apache server with the following command:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
systemctl reload php-fpm httpd
systemctl reload php-fpm httpd
apt autoremove
systemctl daemon-reload
systemctl restart apache2
Then you need to finalize the upgrade process:
- Using the wizard
- Using a dedicated API endpoint
Log on to the Centreon web interface to continue the update process. Click Next:
Click Next:
The release notes describe the main changes. Click Next:
This process performs the various upgrades. Click Next:
Your Centreon server is now up to date. Click Finish to access the login page:
If the Centreon BAM module is installed, refer to the update procedure.
Deploy the central's configuration from the Centreon web UI by following this procedure.
Log on to the central server through your terminal to continue the update process.
You need an authentication token to reach the API endpoint. Perform the following procedure to get a token.
In our case, we have the configuration described below (you need to adapt the procedure to your configuration).
- address: 10.25.XX.XX
- port: 80
- version: 23.10
- login: Admin
- password: xxxxx
Enter the following request:
curl --location --request POST '10.25.XX.XX:80/centreon/api/v23.10/login' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"security": {
"credentials": {
"login": "Admin",
"password": "xxxxx"
}
}
}'This is how the result should look:
{"contact":{"id":1,"name":"Admin Centreon","alias":"admin","email":"admin@localhost","is_admin":true},"security":{"token":"hwwE7w/ukiiMce2lwhNi2mcFxLNYPhB9bYSKVP3xeTRUeN8FuGQms3RhpLreDX/S"}}
Retrieve the token number to use it in the next request.
Then enter this request:
curl --location --request PATCH 'http://10.25.XX.XX:80/centreon/api/latest/platform/updates' \
--header 'X-AUTH-TOKEN: hwwE7w/ukiiMce2lwhNi2mcFxLNYPhB9bYSKVP3xeTRUeN8FuGQms3RhpLreDX/S' \
--header 'Content-Type: application/json' \
--data '{
"components": [
{
"name": "centreon-web"
}
]
}'This request does not return any result. To check if the update has been successfully applied, read the version number displayed on the Centreon web interface login page.
Finally, restart Broker, Engine and Gorgone on the central server by running this command:
systemctl restart cbd centengine gorgoned
Update the permissions on the centreon-broker configuration files.
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
usermod -a -G centreon-broker apache
usermod -a -G apache centreon-broker
usermod -a -G centreon-broker apache
usermod -a -G apache centreon-broker
usermod -a -G centreon-broker www-data
usermod -a -G www-data centreon-broker
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,
Monitoring Connector Manager,
Auto Discovery.
Then you can upgrade all other commercial extensions.
Restart the processes:
systemctl restart cbd centengine centreontrapd gorgoned
Upgrade the Remote Serversβ
This procedure is the same as for upgrading a Centreon Central server.
At the end of the update, the configuration should be deployed from the Central server.
Upgrade the Pollersβ
Update the Centreon repositoryβ
Run the following command:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/23.10/el8/centreon-23.10.repo
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/23.10/el9/centreon-23.10.repo
echo "deb https://packages.centreon.com/apt-standard-23.10-stable/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/centreon.list
apt update
Upgrade the Centreon solutionβ
Clean the cache:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
dnf clean all --enablerepo=*
dnf clean all --enablerepo=*
apt clean
apt update
Then upgrade all the components with the following command:
- Alma / RHEL / Oracle Linux 8
- Alma / RHEL / Oracle Linux 9
- Debian 11
dnf update centreon\*
dnf update centreon\*
apt install --only-upgrade centreon-poller
Accept new GPG keys from the repositories as needed.
Restart centreon:
systemctl restart centreon