Hello, vous allez bien ? Bientôt les vacances ? Avant, nous allons voir ensemble comment mettre à jour Centreon 18.10.4 vers la dernière version 19.04. La procédure reste la même et simple (c’est ce que j’aime le plus avec Centreon). Avec la version 19.04, nous avons droit à une nouvelle version d’Apache httpd 2.4 (Serveur Web HTTP).
Ce qu’il vous faut :
- Votre plate-forme de supervision Centreon 18.10.x
- Centreon 18.10.2 : /installation-configuration-complete/
Documentation :
- Mise à jour Centreon : documentation-fr.centreon.com/docs/
- Apache HTTP Server 2.4 : scls/rhscl/httpd24/
- Les fichiers ISO Centreon : download.centreon.com/
Remarque : pensez toujours à faire une sauvegarde avant de mettre à jour votre plate-forme de supervision. Réaliser l’opération sur une machine de test. Voir mes articles sur l’export et l’import de conf Centreon avec CLAPI.
Mise à jour Centreon 18.10.2 vers 18.10.4
Je suis en version 18.10.2 (ISO > centreon-18.10-8.el7.x86_64). Nous allons d’abord mettre à jour cette version vers 18.10.4 avant de faire le pas vers la dernière version (ISO > centreon-19.04-0.el7.x86_64).
Allez, connectez-vous à votre serveur via SSH et arrêter les services Centreon :
[root@centreon ~]# systemctl stop cbd [root@centreon ~]# systemctl stop centengine
Lancez la mise à jour :
[root@centreon ~]# yum update
Une fois terminé, relancer Apache :
[root@centreon ~]# systemctl restart httpd
Allez sur l’interface web de Centreon pour finir la mise à jour. Actualisez la page ou déconnectez-vous pour afficher la page de mise à jour. Cliquez simplement sur NEXT jusqu’à la fin. Vous voilà en version 18.10.4.
Relancez les services :
[root@centreon ~]# systemctl start cbd [root@centreon ~]# systemctl start centengine
Relancer le collecteur Central comme d’habitude via le menu : Configuration > Collecteurs > Central | Exporter la configuration
Remarque : testez votre plate-forme avant de faire le pas vers la dernière version (sauvegarde, services/hôtes, logs, génération/export, plugins, modules, widget, CLAPI…etc).
Mise à jour Centreon 18.10.4 vers 19.04
Mettez à jour le dépôt Centreon :
[root@centreon ~]# yum install -y http://yum.centreon.com/standard/19.04/el7/stable/noarch/RPMS/centreon-release-19.04-1.el7.centos.noarch.rpm [...] Résolution des dépendances --> Lancement de la transaction de test ---> Le paquet centreon-release.noarch 0:18.10-2.el7.centos sera mis à jour ---> Le paquet centreon-release.noarch 0:19.04-1.el7.centos sera utilisé --> Résolution des dépendances terminée [...] Mis à jour : centreon-release.noarch 0:19.04-1.el7.centos Terminé ! [root@centreon ~]#
Rafraîchir le cache :
[root@centreon ~]# yum clean all
Lancer la mise à jour :
[root@centreon ~]# yum update centreon\*
Mise à jour : centreon noarch 19.04.0-3.el7.centos centreon-stable-noarch 3.6 k centreon-awie noarch 19.04.0-1.el7.centos centreon-stable-noarch 71 k centreon-base-config-centreon-engine noarch 19.04.0-3.el7.centos centreon-stable-noarch 4.9 k centreon-broker x86_64 19.04.0-2.el7.centos centreon-stable 37 k centreon-broker-cbd x86_64 19.04.0-2.el7.centos centreon-stable 414 k centreon-broker-cbmod x86_64 19.04.0-2.el7.centos centreon-stable 521 k centreon-broker-core x86_64 19.04.0-2.el7.centos centreon-stable 961 k centreon-broker-storage x86_64 19.04.0-2.el7.centos centreon-stable 142 k centreon-clib x86_64 19.04.0-1.el7.centos centreon-stable 74 k centreon-common noarch 19.04.0-3.el7.centos centreon-stable-noarch 4.1 k centreon-connector x86_64 19.04.0-2.el7.centos centreon-stable 4.0 k centreon-connector-perl x86_64 19.04.0-2.el7.centos centreon-stable 39 k centreon-connector-ssh x86_64 19.04.0-2.el7.centos centreon-stable 46 k centreon-database noarch 19.04.0-3.el7.centos centreon-stable-noarch 2.8 k centreon-engine x86_64 19.04.0-2.el7.centos centreon-stable 13 k centreon-engine-daemon x86_64 19.04.0-2.el7.centos centreon-stable 632 k centreon-engine-extcommands x86_64 19.04.0-2.el7.centos centreon-stable 74 k centreon-license-manager noarch 19.04.0-1.el7.centos centreon-stable-noarch 1.2 M centreon-license-manager-common noarch 19.04.0-1.el7.centos centreon-stable-noarch 2.4 k centreon-perl-libs noarch 19.04.0-3.el7.centos centreon-stable-noarch 85 k centreon-poller-centreon-engine noarch 19.04.0-3.el7.centos centreon-stable-noarch 5.9 k centreon-pp-manager noarch 19.04.0-3.el7.centos centreon-stable-noarch 735 k centreon-trap noarch 19.04.0-3.el7.centos centreon-stable-noarch 6.8 k centreon-web noarch 19.04.0-3.el7.centos centreon-stable-noarch 5.3 M centreon-widget-engine-status noarch 19.04.0-5.el7.centos centreon-stable-noarch 30 k centreon-widget-graph-monitoring noarch 19.04.0-5.el7.centos centreon-stable-noarch 9.0 k centreon-widget-grid-map noarch 19.04.0-5.el7.centos centreon-stable-noarch 12 k centreon-widget-host-monitoring noarch 19.04.0-5.el7.centos centreon-stable-noarch 20 k centreon-widget-hostgroup-monitoring noarch 19.04.0-5.el7.centos centreon-stable-noarch 12 k centreon-widget-live-top10-cpu-usage noarch 19.04.0-5.el7.centos centreon-stable-noarch 31 k centreon-widget-live-top10-memory-usage noarch 19.04.0-5.el7.centos centreon-stable-noarch 17 k centreon-widget-service-monitoring noarch 19.04.0-5.el7.centos centreon-stable-noarch 22 k centreon-widget-servicegroup-monitoring noarch 19.04.0-7.el7.centos centreon-stable-noarch 13 k centreon-widget-tactical-overview noarch 19.04.0-7.el7.centos centreon-stable-noarch 16 k Installation pour dépendances : centreon-auto-discovery-server x86_64 19.04.0-4.el7.centos centreon-stable 4.3 M httpd24 x86_64 1.1-18.el7 centos-sclo-rh 4.5 k httpd24-httpd x86_64 2.4.34-7.el7.1 centos-sclo-rh 1.5 M httpd24-httpd-tools x86_64 2.4.34-7.el7.1 centos-sclo-rh 88 k httpd24-libcurl x86_64 7.61.1-1.el7 centos-sclo-rh 268 k httpd24-libnghttp2 x86_64 1.7.1-7.el7 centos-sclo-rh 61 k httpd24-runtime x86_64 1.1-18.el7 centos-sclo-rh 28 k libssh x86_64 0.7.5-1.el7.centos centreon-stable 188 k perl-Libssh-Session x86_64 0.4-1.el7.centos centreon-stable 28 k Résumé de la transaction =========================================================================================================== Installation ( 9 Paquets en dépendance) Mettre à jour 34 Paquets Taille totale des téléchargements : 17 M Is this ok [y/d/N]#: y
Une fois terminé, il faut lancer la nouvelle version d’Apache.
Configuration Apache httpd24-httpd
Lancez les commandes suivantes l’une après l’autre pour configurer le serveur web httpd24 :
[root@centreon ~]# systemctl stop httpd [root@centreon ~]# [root@centreon ~]# systemctl disable httpd Removed symlink /etc/systemd/system/multi-user.target.wants/httpd.service. [root@centreon ~]# [root@centreon ~]# [root@centreon ~]# systemctl enable httpd24-httpd Created symlink from /etc/systemd/system/multi-user.target.wants/httpd24-httpd.service to /usr/lib/systemd/system/httpd24-httpd.service. [root@centreon ~]# [root@centreon ~]# systemctl start httpd24-httpd [root@centreon ~]# [root@centreon ~]# systemctl enable centreon Created symlink from /etc/systemd/system/multi-user.target.wants/centreon.service to /usr/lib/systemd/system/centreon.service. [root@centreon ~]# [root@centreon ~]# systemctl restart centreon [root@centreon ~]#
Vérifier le service centreon :
[root@centreon ~]# systemctl status centreon ● centreon.service - One Service to rule them all. Loaded: loaded (/usr/lib/systemd/system/centreon.service; enabled; vendor preset: disabled) Active: active (exited) since jeu. 2019-04-25 09:58:25 CEST; 1min 15s ago Process: 22935 ExecStart=/bin/true (code=exited, status=0/SUCCESS) Main PID: 22935 (code=exited, status=0/SUCCESS) CGroup: /system.slice/centreon.service avril 25 09:58:25 centreon systemd[1]: Starting One Service to rule them all.... avril 25 09:58:25 centreon systemd[1]: Started One Service to rule them all.. [root@centreon ~]#
Vérifier le service httpd24-httpd
[root@centreon ~]# systemctl status httpd24-httpd ● httpd24-httpd.service - The Apache HTTP Server Loaded: loaded (/usr/lib/systemd/system/httpd24-httpd.service; enabled; vendor preset: disabled) Active: active (running) since jeu. 2019-04-25 09:58:11 CEST; 1min 38s ago Main PID: 22561 (httpd) Status: "Total requests: 24; Idle/Busy workers 100/0;Requests/sec: 0.27; Bytes served/sec: 247 B/sec" CGroup: /system.slice/httpd24-httpd.service ├─22561 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND ├─22562 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND ├─22563 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND ├─22564 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND ├─22565 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND ├─22582 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND ├─22675 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND ├─22721 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND └─22722 /opt/rh/httpd24/root/usr/sbin/httpd -DFOREGROUND avril 25 09:58:10 centreon systemd[1]: Starting The Apache HTTP Server... [...] [root@centreon ~]#
Si votre serveur est sécurisé (SSL), vous devez installer le package suivant :
[root@centreon ~]# yum install httpd24-mod_ssl
Si vous avez personnalisé la configuration de votre serveur apache. Copiez vos fichiers de configuration dans le répertoire suivant :
/opt/rh/httpd24/root/etc/httpd/conf.d/
[root@centreon ~]# ll /opt/rh/httpd24/root/etc/httpd/conf.d/ total 20 -rw-r--r-- 1 root root 551 24 avril 10:33 10-centreon.conf -rw-r--r-- 1 root root 2966 17 avril 13:29 autoindex.conf -rw-r--r-- 1 root root 366 17 avril 13:30 README -rw-r--r-- 1 root root 1252 3 avril 18:03 userdir.conf -rw-r--r-- 1 root root 556 3 avril 18:03 welcome.conf [root@centreon ~]#
Mise à jour Centreon web
Il faut maintenant terminer l’installation depuis l’interface web Centreon (déconnectez-vous pour déclencher le processus de mise à jour) : http://serv-centreon/centreon/
Connectez-vous :
C’est terminé. Nous avons un nouveau menu (que j’attendais tellement…oui, oui…en PROD je suis toujours en version 2.8.26 juste à cause du menu de la version 18.10.2 bordélique et enfui, c’est triste).
Et aussi un nouveau gestionnaire d’extensions (modules, widgets) :
- Cliquez sur le bouton Orange pour mettre à jour un module/widget
- Cliquez sur le bouton Vert pour installer un module/widget
- Cliquez sur l’icône poubelle pour désinstaller un module/widget.
Les services centreon :
[root@centreon ~]# systemctl status centreon [root@centreon ~]# systemctl status cbd [root@centreon ~]# systemctl status centengine [root@centreon ~]# systemctl status centcore [root@centreon ~]# systemctl status snmptrapd
Les fichiers logs sont toujours dans :
[root@centreon ~]# cd /var/log
- centreon
- centreon-broker
- centreon-engine
- httpd24
Pensez à activer la sauvegarde : Administration > Paramètres > Backup
Installation de Centreon Plugin Packs
Pensez à mettre à jour vos plugins. Tout est expliqué ici : pixelabs.fr/centreon-plugin-packs-monitoring/
N’hésitez pas également à partager avec moi vos commandes de supervision en commentaire ici : pixelabs.fr/supervision-avec-centreon-plugins-packs/
C’est terminé les amis. Bonne journée à tous.
A bientôt.
Bonjour,
J’ai un problème au niveau de l’update de l’interface web, j’ai cette erreur :
19.04.0 to 19.04.1 Update-DB-19.04.1.sql Line 2:SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘http_method’
You seem to be having trouble with your upgrade.
You may refer to the line that causes problem in order to find out more about the issue.
The SQL files are located in /usr/share/centreon/www/install/sql/
But do not edit the SQL files unless you know what you are doing.Refresh this page when the problem is fixed.
Savez vous d’ou cela peut venir ?
Cordialement,
Bonjour Jonathan,
Non, je n’ai pas eu ce problème. Tu as une solution ici : https://forum.centreon.com/forum/centreon-ui/centreon-web-interface/153954-acquittement?p=154217#post154217
Il faut supprimer les tables suivantes :
Bonne journée,
Pixel.
Update : quelques corrections