Menu


Stacks Image 1118366
Cet article va vous permettre de réaliser la migration de votre Centreon 19.04 vers la version 19.10 pour Buster. Attention ce tutoriel est valable seulement pour les installation via les sources sur une distribution Debian Buster.

1 Pré requis

Votre Centreon a été installé selon le tutoriel suivant installation automatisée pour Centreon 19.04.x avec MariaDB sur Buster. Il est conseillé de réaliser les mises à jour du système avant de commencer.
apt-get update
apt-get upgrade

2 Mise à jour de Centreon Clib

Les paquets nécessaires à l'installation sont déjà installés avec l'installation précédentes.

2.1 Installation

Téléchargez le binaire dans le dossier /usr/local/src et décompressez-le.
cd /usr/local/src
wget http://files.download.centreon.com/public/centreon-clib/centreon-clib-19.10.0.tar.gz
tar xzf centreon-clib-19.10.0.tar.gz
cd centreon-clib-19.10.0
Préparons la compilation.
cmake \
-DWITH_TESTING=0 \
-DWITH_PREFIX=/usr \
-DWITH_SHARED_LIB=1 \
-DWITH_STATIC_LIB=0 \
-DWITH_PKGCONFIG_DIR=/usr/lib/pkgconfig .
Extrait du résultat
-- Configuration Summary
-- ---------------------
--
-- Project
-- - Name Centreon Clib
-- - Version 19.10.0
-- - With shared library Yes
-- - With static library No
--
-- System
-- - Name Linux
-- - Version 4.19.0-5-amd64
-- - Processor x86_64
--
-- Build
-- - Compiler /usr/bin/c++ (GNU)
-- - Extra compilation flags -std=c++11
-- - Build unit tests No
--
-- Installation
-- - Prefix /usr
-- - Library directory /usr/lib
-- - Include directory /usr/include
-- - Package None
-- - pkg-config directory /usr/lib/pkgconfig
--
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/centreon-clib-19.10.0
Ensuite compilez cette configuration et terminez par l’installation. Ne tenez pas compte des messages d'erreur du à la version du compilateur C++ plus restrictive. La librairie étant copiée dans le dossier /usr/lib, celle-ci est automatiquement prise en compte.
make
make install
C'est terminé pour Centreon Clib, nous pouvons continuer par la mise à jour des connecteurs Centreon.

3 Mise à jour des connecteurs Centreon

3.1 Centreon Perl Connector

Les paquets nécessaires à l'installation sont déjà installés avec l'installation précédentes. La dernière version stable est la 19.10.0. Téléchargez le binaire dans le dossier /usr/local/src et décompressez-le.
cd /usr/local/src
wget http://files.download.centreon.com/public/centreon-connectors/centreon-connector-19.10.0.tar.gz
tar xzf centreon-connector-19.10.0.tar.gz
cd centreon-connector-19.10.0/perl/build
Préparons la compilation.
cmake \
-DWITH_PREFIX=/usr \
-DWITH_PREFIX_BINARY=/usr/lib/centreon-connector \
-DWITH_CENTREON_CLIB_INCLUDE_DIR=/usr/include \
-DWITH_TESTING=0 .
Extrait du résultat
-- Configuration Summary
-- ---------------------
--
-- Project
-- - Name Centreon Perl Connector
-- - Version 19.10.0
--
-- System
-- - Name Linux
-- - Version 4.19.0-5-amd64
-- - Processor x86_64
--
-- Build
-- - Compiler /usr/bin/c++ (GNU)
-- - Extra compilation flags -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/x86_64-linux-gnu/perl/5.28/CORE
-- - Unit tests disabled
--
-- Install
-- - Prefix /usr
-- - Binary prefix /usr/lib/centreon-connector
-- - Package None
--
-- Libraries
-- - clib include directory /usr/include
-- - clib library directory /usr/lib/libcentreon_clib.so
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/centreon-connector-19.10.0/perl/build
Ensuite compilons cette configuration et installons dans le dossier /usr/lib/centreon-connector/
make
make install
C'est terminé, nous pouvons continuer par la mise à jour du connecteur SSH

3.2 Centreon SSH Connector

Dirigez-vous dans le dossier pour le connecteur SSH
cd /usr/local/src/centreon-connector-19.10.0/ssh/build
Préparons la compilation (même compilation que précédemment)
cmake \
-DWITH_PREFIX=/usr \
-DWITH_PREFIX_BINARY=/usr/lib/centreon-connector \
-DWITH_CENTREON_CLIB_INCLUDE_DIR=/usr/include \
-DWITH_TESTING=0 .
Extrait du résultat
-- Configuration Summary
-- ---------------------
--
-- Project
-- - Name Centreon SSH Connector
-- - Version 19.10.0
-- - Known hosts check disabled
--
-- System
-- - Name Linux
-- - Version 4.19.0-5-amd64
-- - Processor x86_64
--
-- Build
-- - Compiler /usr/bin/c++ (GNU)
-- - Extra compilation flags
-- - Unit tests disabled
--
-- Install
-- - Prefix /usr
-- - Binary prefix /usr/lib/centreon-connector
-- - Package None
--
-- Libraries
-- - clib include directory /usr/include
-- - clib library directory /usr/lib/libcentreon_clib.so
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/centreon-connector-19.10.0/ssh/build
Ensuite compilons cette configuration et installons dans le dossier /usr/lib/centreon-connector/
make
make install
C'est terminé, nous pouvons continuer par la mise à jour de Centreon Engine.

4 Mise à jour de Centreon Engine

Les paquets nécessaires à l'installation sont déjà installés avec l'installation précédentes. La dernière version stable est la 19.10.5. Téléchargez le binaire dans le dossier /usr/local/src et décompressez-le.
cd /usr/local/src
wget http://files.download.centreon.com/public/centreon-engine/centreon-engine-19.10.5.tar.gz
tar xzf centreon-engine-19.10.5.tar.gz
cd centreon-engine-19.10.5
Préparons la compilation.
cmake  \
-DWITH_CENTREON_CLIB_INCLUDE_DIR=/usr/include \
-DWITH_CENTREON_CLIB_LIBRARY_DIR=/usr/lib \
-DWITH_PREFIX=/usr \
-DWITH_PREFIX_BIN=/usr/sbin \
-DWITH_PREFIX_CONF=/etc/centreon-engine \
-DWITH_USER=centreon-engine \
-DWITH_GROUP=centreon-engine \
-DWITH_LOGROTATE_SCRIPT=1 \
-DWITH_VAR_DIR=/var/log/centreon-engine \
-DWITH_RW_DIR=/var/lib/centreon-engine/rw \
-DWITH_STARTUP_SCRIPT=systemd \
-DWITH_STARTUP_DIR=/lib/systemd/system \
-DWITH_PKGCONFIG_SCRIPT=1 \
-DWITH_PKGCONFIG_DIR=/usr/lib/pkgconfig \
-DWITH_TESTING=0 .
Extrait du résultat
-- Configuration Summary
-- ---------------------
--
-- Project
-- - Name Centreon Engine
-- - Version 19.10.5
--
-- System
-- - Name Linux
-- - Version 4.19.0-5-amd64
-- - Processor x86_64
--
-- Build
-- - Compiler /usr/bin/c++ (GNU)
-- - Extra compilation flags -std=c++11
-- - Build static core library yes
-- - External commands module enabled
-- - Unit tests disabled
-- - pkg-config script enabled
-- - logrotate script enabled
-- - Startup script Systemd script
--
-- Install
-- - Prefix /usr
-- - Binary prefix /usr/sbin
-- - Configuration prefix /etc/centreon-engine
-- - Library prefix /usr/lib/centreon-engine
-- - Include prefix /usr/include/centreon-engine
-- - var directory /var/log/centreon-engine
-- - Log archive directory /var/log/centreon-engine/archives
-- - RW directory /var/lib/centreon-engine/rw
-- - pkg-config directory /usr/lib/pkgconfig
-- - logrotate directory /etc/logrotate.d
-- - Startup directory /lib/systemd/system
-- - User centreon-engine
-- - Group centreon-engine
-- - Package None
--
-- Libraries
-- - clib include directory /usr/include
-- - clib library directory /usr/lib/libcentreon_clib.so
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/centreon-engine-19.10.5
Ensuite compilons cette configuration et installons dans le système de fichiers.
make
make install
Pour vérifier, avant de continuer, le bon fonctionnement de la librairie partagée, saisissez la commande suivante:
centengine -V
[1540917958] [62218] Centreon Engine 19.10.5
[1540917958] [62218]
[1540917958] [62218] Copyright 1999-2009 Ethan Galstad
[1540917958] [62218] Copyright 2009-2010 Nagios Core Development Team and Community Contributors
[1540917958] [62218] Copyright 2011-2018 Centreon
[1540917958] [62218]
[1540917958] [62218] This program is free software: you can redistribute it and/or
[1540917958] [62218] modify it under the terms of the GNU General Public License version 2
[1540917958] [62218] as published by the Free Software Foundation.
[1540917958] [62218]
[1540917958] [62218] Centreon Engine is distributed in the hope that it will be useful,
[1540917958] [62218] but WITHOUT ANY WARRANTY; without even the implied warranty of
[1540917958] [62218] MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[1540917958] [62218] General Public License for more details.
[1540917958] [62218]
[1540917958] [62218] You should have received a copy of the GNU General Public License
[1540917958] [62218] along with this program. If not, see
[1540917958] [62218] <http://www.gnu.org/licenses/>.
La mise à jour de Centreon-Engine est terminée. Vous n'êtes pas obligé d'arrêté votre moteur pour l'instant. Celui-ci fonctionne avec l'ancienne version chargée en mémoire.

5 Mise à jour de Centreon-Broker

5.1 Pré requis

Il faut aussi installer le paquet rrdtool livré avec la distribution Debian. le paquet git est nécessaire mais il devrait déjà installé avec l'installation précédente.
apt-get install librrd-dev -y
Et supprimer le chemin de l'ancienne librairie rrdtool.
rm /etc/ld.so.conf.d/rrdtool-broker.conf

5.2 Installation

Téléchargez le binaire dans le dossier /usr/local/src et décompressez-le.
cd /usr/local/src
wget http://files.download.centreon.com/public/centreon-broker/centreon-broker-19.10.0.tar.gz
tar xzf centreon-broker-19.10.0.tar.gz
cd centreon-broker-19.10.0
Préparons la compilation.
cmake \
-DWITH_DAEMONS='central-broker;central-rrd' \
-DWITH_GROUP=centreon-broker \
-DWITH_PREFIX=/usr \
-DWITH_PREFIX_BIN=/usr/sbin \
-DWITH_PREFIX_CONF=/etc/centreon-broker \
-DWITH_PREFIX_LIB=/usr/lib/centreon-broker \
-DWITH_PREFIX_VAR=/var/lib/centreon-broker \
-DWITH_PREFIX_MODULES=/usr/share/centreon/lib/centreon-broker \
-DWITH_STARTUP_SCRIPT=systemd \
-DWITH_STARTUP_DIR=/lib/systemd/system \
-DWITH_TESTING=0 \
-DWITH_USER=centreon-broker .
Extrait du résultat
-- Configuration Summary
-- ---------------------
--
-- Project
-- - Name Centreon Broker
-- - Version 19.10.0
--
-- System
-- - Name Linux
-- - Version 4.19.0-5-amd64
-- - Processor x86_64
--
-- Build
-- - Compiler /usr/bin/c++ (GNU)
-- - Extra compilation flags -std=c++11
-- - Qt 4.8.7
-- - Unit tests disabled
-- - Startup script systemd
-- - Module stats, neb, notification, correlation, dumper, rrd, sql, storage, lua, influxdb, graphite, bam, tcp, tls
--
-- Install
-- - Prefix /usr
-- - Binary prefix /usr/sbin
-- - Library prefix /usr/lib/centreon-broker
-- - Modules prefix /usr/share/centreon/lib/centreon-broker
-- - Include prefix /usr/include/centreon-broker
-- - Configuration prefix /etc/centreon-broker
-- - Startup dir /lib/systemd/system
-- - User centreon-broker
-- - Group centreon-broker
-- - Package None
--
-- Configuring done
-- Generating done
-- Build files have been written to: /usr/local/src/centreon-broker-19.10.0
Ensuite compilons cette configuration et installons dans le système de fichiers.
make
make install
Le service ayant changer, il faut saisir la commande suivante :
systemctl daemon-reload
La mise à jour de Centreon-Broker est terminée, il faut passer à l’installation de Centreon.

6 Installation de Centreon Web

6.1 Pré requis

Le php étant en version 7.3, il n'y a pas besoin de le mettre à jour. Ajoutez seulement les paquets rrdtool.
apt-get install rrdtool librrds-perl -y

6.2 Installation en ligne de commande

Téléchargez le binaire du 16/10/2019 dans le dossier /usr/local/src et décompressez-le.
cd /usr/local/src
wget http://files.download.centreon.com/public/centreon/centreon-web-19.10.1.tar.gz
tar xzf centreon-web-19.10.1.tar.gz
cd centreon-web-19.10.1

6.3 Installation des dépendances Php

Avant de continuer l'installation, installer PHP composer
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/usr/bin --filename=composer
Depuis que composer est passé en version 2, vous devez lancer cette commande :
composer update -n
Lancer la commande pour installer les dépendances php
composer install --no-dev --optimize-autoloader --no-plugins -n

6.4 Installation des dépendances Javascript

Modifiez le fichier
sed -i -e "s/19.10.0/19.10.1/g" package.json
Exécutez les commandes suivantes.
npm install
npm run build

6.5 installation de la mise à jour

Avant de lancer la mise à jour, on modifie le fichier /etc/centreon/instCentWeb.conf pour changer le chemin de rrdtool.
BIN_RRDTOOL=/usr/bin/rddtool
Lancez la ligne de commande ci-dessous pour effectuer la mise à jour. attention, avec cette version, ne lancez pas directement la commande install sans préciser le shell bash.
bash install.sh -u /etc/centreon
Au lancement du script, le programme confirme si toutes les dépendances sont satisfaites. Bon la version est restée en 18.10.3 mais ce n'est pas grave ;-). Acceptez les paramètres de l'installation précédente.
###############################################################################
#                                                                             #
#                         Centreon (www.centreon.com)                         #
#                          Thanks for using Centreon                          #
#                                                                             #
#                                    v18.10.3                                   #
#                                                                             #
#                               infos@centreon.com                            #
#                                                                             #
#                   Make sure you have installed and configured               #
#                   sudo - sed - php - apache - rrdtool - mysql               #
#                                                                             #
###############################################################################
------------------------------------------------------------------------
    Checking all needed binaries
------------------------------------------------------------------------
rm                                                         OK
cp                                                         OK
mv                                                         OK
/bin/chmod                                                 OK
/bin/chown                                                 OK
echo                                                       OK
more                                                       OK
mkdir                                                      OK
find                                                       OK
/bin/grep                                                  OK
/bin/cat                                                   OK
/bin/sed                                                   OK
------------------------------------------------------------------------
    Detecting old installation
------------------------------------------------------------------------
Finding configuration file in: /etc/centreon               OK
You seem to have an existing Centreon.
 
 
Do you want to use the last Centreon install parameters ?
[y/n], default to [y]:
> y

Using:  /etc/centreon/instCentCore.conf
/etc/centreon/instCentPlugins.conf
/etc/centreon/instCentStorage.conf
/etc/centreon/instCentWeb.conf
Le module d'installation va vous demander si vous souhaitez installer les modules: l'interface Web Centreon, Centcore, les plugins Centreon et les Traps handler Centreon. Nous utiliserons tous les modules.
Do you want to install Centreon Web Front
[y/n], default to [n]:
> y

Do you want to install Centreon CentCore
[y/n], default to [n]:
> y

Do you want to install Centreon Nagios Plugins
[y/n], default to [n]:
> y

Do you want to install Centreon Snmp Traps process
[y/n], default to [n]:
> y
Le script d'installation va maintenant procéder à l'installation des différents modules.
Commençons par Centreon Web, l'interface de centreon. Ici, on nous demande où installer le dossier Cache de Centreon. Saisissez le chemin indiqué ci-dessous. Continuez aussi avec le chemin de php-fpm.
------------------------------------------------------------------------
    Start CentWeb Installation
------------------------------------------------------------------------
 
Where is your Centreon cache directory?
default to [/var/cache/centreon]
> 
 
Do you want me to create this directory ? [/var/cache/centreon]
[y/n], default to [n]:
> y
Path /var/cache/centreon                                   OK
/usr/bin/perl                                              OK
check PHP version                                          OK
Composer dependencies are installed                        OK
Frontend application is built                              OK
Finding Apache user :                                      www-data
Finding Apache group :                                     www-data
PHP FPM config directory not found                         CRITICAL

Where is your PHP FPM conf.d directory
> /etc/php/7.3/fpm/pool.d/
Add group centreon to user www-data                        OK
Add group centreon to user centreon                        OK
Add group centreon to user www-data                        OK
Add group centreon to user centreon                        OK
Add group www-data to user centreon                        OK
Configuration des commandes utilisées par Sudo. Validez les chemins par défaut et surtout répondre y pour la création du fichier /etc/sudoers.d/centreon et pour la configuration de sudo.
------------------------------------------------------------------------
    Configure Sudo
------------------------------------------------------------------------
 
Where is your service command binary ?
default to [/usr/sbin/service]
> 
Your sudo has been configured previously
 
Do you want me to reconfigure your sudo ? (WARNING) 
[y/n], default to [n]:
> y
Configuring Sudo                                           OK
Configuration du serveur Web. Laissez par défaut en répondant y, un FAIL pour les utilisateurs non déconnecté de l'IHM sans importance. Par contre, vous aurez remarqué, le mauvais chemin du fichier php-fpm. Il faudra le modifier.
------------------------------------------------------------------------
    Configure Apache server
------------------------------------------------------------------------
Create '/etc/apache2/conf-available/centreon.conf'         OK
Configuring Apache                                         OK
 
Do you want to reload your Apache ?
[y/n], default to [n]:
> y
Reloading Apache service                                   OK
 
------------------------------------------------------------------------
    Configure PHP FPM service
------------------------------------------------------------------------
Create '/etc/php/7.3/fpm/pool.d/centreon.conf'             OK
Configuring PHP FPM                                        OK
 
Do you want to reload PHP FPM service ?
[y/n], default to [n]:
> y
Unable to reload PHP FPM service                           OK
Preparing Centreon temporary files
Change right on /var/log/centreon                          OK
Change right on /var/lib/centreon/installs                 OK
Change right on /etc/centreon                              OK
Change macros for insertBaseConf.sql                       OK
Change macros for sql update files                         OK
Change macros for php files                                OK
Change macros for php config file                          OK
Change macros for perl binary                              OK
Change right on /etc/centreon-engine                       OK
Add group centreon-broker to user www-data                 OK
Add group centreon-broker to user centreon                 OK
Add group centreon to user centreon-broker                 OK
Change right on /etc/centreon-broker                       OK
Disconnect users from WebUI
All users are disconnected                                 FAIL
Copy CentWeb in system directory
Install CentWeb (web front of centreon)                    OK
Change right for install directory                         OK
Install libraries                                          OK
Write right to Smarty Cache                                OK
Change macros for centreon.cron                            OK
Install Centreon cron.d file                               OK
Change macros for centAcl.php                              OK
Change macros for downtimeManager.php                      OK
Change macros for centreon-backup.pl                       OK
Install cron directory                                     OK
Change right for eventReportBuilder                        OK
Change right for dashboardBuilder                          OK
Change right for centreon-backup.pl                        OK
Change right for centreon-backup-mysql.sh                  OK
Change macros for centreon.logrotate                       OK
Install Centreon logrotate.d file                          OK
Prepare centFillTrapDB                                     OK
Install centFillTrapDB                                     OK
Prepare centreon_trap_send                                 OK
Install centreon_trap_send                                 OK
Prepare centreon_check_perfdata                            OK
Install centreon_check_perfdata                            OK
Prepare centreonSyncPlugins                                OK
Install centreonSyncPlugins                                OK
Prepare centreonSyncArchives                               OK
Install centreonSyncArchives                               OK
Prepare generateSqlLite                                    OK
Install generateSqlLite                                    OK
Install changeRrdDsName.pl                                 OK
Prepare export-mysql-indexes                               OK
Install export-mysql-indexes                               OK
Prepare import-mysql-indexes                               OK
Install import-mysql-indexes                               OK
Prepare clapi binary                                       OK
Install clapi binary                                       OK
Centreon Web Perl lib installed                            OK
 
------------------------------------------------------------------------
Pear Modules
------------------------------------------------------------------------
Check PEAR modules
PEAR                            1.4.9       1.10.9         OK
DB                              1.7.6       1.9.2          OK
Date                            1.4.6       1.4.7          OK
All PEAR modules                                           OK
 
------------------------------------------------------------------------
        Centreon Post Install
------------------------------------------------------------------------
Create /usr/share/centreon/www/install/install.conf.php    OK
Create /etc/centreon/instCentWeb.conf                      OK
 
------------------------------------------------------------------------
    Starting CentStorage Installation
------------------------------------------------------------------------
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
install www/install/createTablesCentstorage.sql            OK
CentStorage status Directory already exists                PASSED
CentStorage metrics Directory already exists               PASSED
Change right : /var/run/centreon                           OK
Install logAnalyserBroker                                  OK
Install nagiosPerfTrace                                    OK
Change macros for centstorage.cron                         OK
Install CentStorage cron                                   OK
Create /etc/centreon/instCentStorage.conf                  OK
Installation du module CentCore. Laissez par défaut, installez le script centcore.
------------------------------------------------------------------------
    Starting CentCore Installation
------------------------------------------------------------------------
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Copy CentCore in binary directory                          OK
Change right : /var/run/centreon                           OK
Change right : /var/lib/centreon                           OK
Change macros for centcore.logrotate                       OK
Install Centreon Core logrotate.d file                     OK
Replace CentCore init script Macro                         OK
Replace CentCore default script Macro                      OK
 
Do you want me to install CentCore init script ?
[y/n], default to [n]:
> y
CentCore init script installed                             OK
CentCore default script installed                          OK
 
Do you want me to install CentCore run level ?
[y/n], default to [n]:
> y
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
CentCore Perl lib installed                                OK
Create /etc/centreon/instCentCore.conf                     OK
 
------------------------------------------------------------------------
    Starting Centreon Plugins Installation
------------------------------------------------------------------------
Create /etc/centreon/instCentPlugins.conf                  OK
Installation des plugins pour les Traps SNMP, répondre y et n pour la configuration SNMP.
------------------------------------------------------------------------
    Starting CentreonTrapD Installation
------------------------------------------------------------------------
Finding Apache user :                                      www-data
Preparing Centreon temporary files
/tmp/centreon-setup exists, it will be moved...
Change macros for snmptrapd.conf                           OK
Replace CentreonTrapd init script Macro                    OK
Replace CentreonTrapd default script Macro                 OK
 
Do you want me to install CentreonTrapd init script ?
[y/n], default to [n]:
> y
CentreonTrapd init script installed                        OK
CentreonTrapd default script installed                     OK
 
Do you want me to install CentreonTrapd run level ?
[y/n], default to [n]:
> y
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
trapd Perl lib installed                                   OK
 
Should I overwrite all your SNMP configuration files?
[y/n], default to [n]:
> n
Install : centreontrapdforward                             OK
Install : centreontrapd                                    OK
Change macros for centreontrapd.logrotate                  OK
Install Centreon Trapd logrotate.d file                    OK
Create /etc/centreon/instCentPlugins.conf                  OK
###############################################################################
#                                                                             #
#                 Go to the URL : http://debian-test9/centreon/                    #
#                            to finish the setup                              #
#                                                                             #
#           Report bugs at https://github.com/centreon/centreon/issues        #
#                                                                             #
#                         Thanks for using Centreon.                          #
#                          -----------------------                            #
#                        Contact : infos@centreon.com                         #
#                          http://www.centreon.com                            #
#                                                                             #
###############################################################################
Nous allons procéder à quelques rectifications. Modifier les fichiers qui n'ont pas eu la bonne information pour le chemin du php.
sed -i -e 's/@PHP_BIN@/\/usr\/bin\/php/g' /usr/share/centreon/bin/centreon
sed -i -e 's/@PHP_BIN@/\/usr\/bin\/php/g' /usr/share/centreon/bin/export-mysql-indexes
sed -i -e 's/@PHP_BIN@/\/usr\/bin\/php/g' /usr/share/centreon/bin/generateSqlLite
sed -i -e 's/@PHP_BIN@/\/usr\/bin\/php/g' /usr/share/centreon/bin/import-mysql-indexes
Il faut créer une API Key pour la nouvelle API Centreon. Utiliser un générateur de clé pour cela.
./generate_api.sh
kQ8NsEMqbVuVxMKdHoj918f0z4ib5H9D
Copiez la clé dans le fichier caché .env se trouvant dans le dossier /usr/local/src/centreon-web-19.10.1
APP_ENV=prod
APP_SECRET=kQ8NsEMqbVuVxMKdHoj918f0z4ib5H9D
Générez le fichier .env.local.php
composer dump-env prod
Modifiez le script nagiosPerfTrace pour obtenir les statistiques du moteur engine.
sed -i -e 's/"-s $self->{interval}"/"-s", $self->{interval}/g' /usr/share/perl5/centreon/script/nagiosPerfTrace.pm
Copiez les fichiers dans /usr/share/centreon
cp .env /usr/share/centreon
cp .env.local.php /usr/share/centreon
Modifiez les droits de /var/cache
chown -R centreon: /var/cache/centreon
chmod -R 775 /var/cache/centreon
Finaliser avec les commandes suivantes
cp container.php /usr/share/centreon/
mv api /usr/share/centreon/
cp config/bootstrap.php /usr/share/centreon/config/
cp config/bundles.php /usr/share/centreon/config/
cp config/services.yaml /usr/share/centreon/config/
mv config/Modules /usr/share/centreon/config/
mv config/packages /usr/share/centreon/config/
mv config/routes /usr/share/centreon/config/
chown -R root: /usr/share/centreon/config/*
Il faut terminer l’installation en mode Web.

6.6 Installation en mode Web

Relancez la configuration.
systemctl restart apache2 php7.3-fpm
Utilisez un navigateur internet récent et saisissez l’url suivante :
http://<ip du serveur centreon>/centreon/
Stacks Image 35865
Démarrage de l'installation Web, cliquez sur "Next"
Stacks Image 35886
Validation des dépendances, cliquez sur "next".
Stacks Image 35907
Cliquez sur "next".
Stacks Image 35928
Cliquez sur "Next".
Stacks Image 35952
Fin de l'installation, cliquez sur Finish
Stacks Image 1117923
Si vous n'arrivez pas à vous connecter comme le montre la copie d'écran ci-dessous :
Stacks Image 1118462
Supprimez les fichiers de session dans /var/lib/centreon/sessions. Reconnectez-vous et vous devriez avoir cette vue comme cet exemple.
Stacks Image 1118089
Les widgets ne s'affichent pas correctement, il faudra aussi les mettre à jour.

7 Application de la configuration

Appliquez de nouveau la configuration sans redémarrer le moteur.
Stacks Image 1118317
Redémarrez le le broker et le moteur
systemctl restart cbd
systemctl restart centengine
Vérifiez le fonctionnement du moteur.
Stacks Image 1118467
Malgré la modification du fichier /etc/centreon/instCentWeb.conf, il faudra modifier ce paramètre dans Administration -> Parameters -> RRDTool
Stacks Image 1118470
La valeur sera /usr/bin/rddtool. Vérifiez en sélectionnant de nouveau ce menu, le changement de la version 1.7.1.

8 Mise à jour des widgets

Téléchargez les binaires des widgets compatibles avec cette version.
cd /usr/local/src
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-graph-monitoring/centreon-widget-graph-monitoring-19.10.0.tar.gz
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-service-monitoring/centreon-widget-service-monitoring-19.10.1.tar.gz
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-host-monitoring/centreon-widget-host-monitoring-19.10.0.tar.gz
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-servicegroup-monitoring/centreon-widget-servicegroup-monitoring-19.10.0.tar.gz
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-hostgroup-monitoring/centreon-widget-hostgroup-monitoring-19.10.0.tar.gz
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-engine-status/centreon-widget-engine-status-19.10.0.tar.gz
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-grid-map/centreon-widget-grid-map-19.10.0.tar.gz
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-httploader/centreon-widget-httploader-19.10.0.tar.gz
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-tactical-overview/centreon-widget-tactical-overview-19.10.0.tar.gz
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-live-top10-cpu-usage/centreon-widget-live-top10-cpu-usage-19.10.0.tar.gz
wget http://files.download.centreon.com/public/centreon-widgets/centreon-widget-live-top10-memory-usage/centreon-widget-live-top10-memory-usage-19.10.0.tar.gz
Décompressez les archives
tar xzf centreon-widget-grid-map-19.10.0.tar.gz
tar xzf centreon-widget-tactical-overview-19.10.0.tar.gz 
tar xzf centreon-widget-httploader-19.10.0.tar.gz
tar xzf centreon-widget-engine-status-19.10.0.tar.gz
tar xzf centreon-widget-service-monitoring-19.10.1.tar.gz
tar xzf centreon-widget-host-monitoring-19.10.0.tar.gz
tar xzf centreon-widget-servicegroup-monitoring-19.10.0.tar.gz
tar xzf centreon-widget-hostgroup-monitoring-19.10.0.tar.gz
tar xzf centreon-widget-graph-monitoring-19.10.0.tar.gz
tar xzf centreon-widget-live-top10-memory-usage-19.10.0.tar.gz
tar xzf centreon-widget-live-top10-cpu-usage-19.10.0.tar.gz
Déplaçons les widgets dans le dossier réservé à ceux-ci.
cp -r centreon-widget-graph-monitoring-19.10.0/graph-monitoring/* /usr/share/centreon/www/widgets/graph-monitoring/
cp -r centreon-widget-service-monitoring-19.10.1/service-monitoring/* /usr/share/centreon/www/widgets/service-monitoring/
cp -r centreon-widget-host-monitoring-19.10.0/host-monitoring/* /usr/share/centreon/www/widgets/host-monitoring/
cp -r centreon-widget-servicegroup-monitoring-19.10.0/servicegroup-monitoring/* /usr/share/centreon/www/widgets/servicegroup-monitoring/
cp -r centreon-widget-hostgroup-monitoring-19.10.0/hostgroup-monitoring/* /usr/share/centreon/www/widgets/hostgroup-monitoring/
cp -r centreon-widget-grid-map-19.10.0/grid-map/* /usr/share/centreon/www/widgets/grid-map/
cp -r centreon-widget-httploader-19.10.0/httploader/* /usr/share/centreon/www/widgets/httploader/
cp -r centreon-widget-tactical-overview-19.10.0/tactical-overview/* /usr/share/centreon/www/widgets/tactical-overview/
cp -r centreon-widget-engine-status-19.10.0/engine-status/* /usr/share/centreon/www/widgets/engine-status/
cp -r centreon-widget-live-top10-cpu-usage-19.10.0/live-top10-cpu-usage/* /usr/share/centreon/www/widgets/live-top10-cpu-usage/
cp -r centreon-widget-live-top10-memory-usage-19.10.0/live-top10-memory-usage/* /usr/share/centreon/www/widgets/live-top10-memory-usage/
Modifiez le widget Tactical-Overview.
sed -i -e "s/\$res = \$db->query(\$queryPEND);/#\$res = \$db->query(\$queryPEND);/g" /usr/share/centreon/www/widgets/tactical-overview/src/hosts_status.php
Authentifiez-vous sur l’interface Web de Centreon. Sélectionnez Administration / Extensions / Manager
Stacks Image 1117980
Les widgets sont installés prêt à être mis à jour
Cliquez sur Update all
Stacks Image 1118185
Les widgets sont à jour.
Les widgets sont à jour. Vérifiez le fonctionnement dans les vues personnalisées
Stacks Image 1118182
La mise à jour est normalement terminée.

Nous utilisons des cookies pour nous permettre de mieux comprendre comment le site est utilisé. En continuant à utiliser ce site, vous acceptez cette politique.