Vous êtes ici:

Menu


Stacks Image 968818
Nous installerons le moteur Centreon-Engine. La compilation ne prendra qu’une dizaine de minutes, le Pi 3 est nettement plus puissant par rapport aux premiers Raspberry.

7 Pré Requis

Tout d'abord, Il faudra créer un utilisateur centreon-engine
sudo groupadd -g 6001 centreon-engine
sudo useradd -u 6001 -g centreon-engine -m -r -d /var/lib/centreon-engine -c "Centreon-engine Admin" centreon-engine

L'installation, au préalable, de Centreon Clib est obligatoire.
Il faut aussi installer des paquets supplémentaires.
sudo apt-get install libcgsi-gsoap-dev zlib1g-dev libssl-dev libxerces-c-dev -y

8 Installation

La dernière version stable est la 18.10.0. Téléchargez le binaire dans le dossier home et décompressez-le.
cd
wget https://s3-eu-west-1.amazonaws.com/centreon-download/public/centreon-engine/centreon-engine-18.10.0.tar.gz
tar xzf centreon-engine-18.10.0.tar.gz
cd centreon-engine-18.10.0/build/

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 18.10.0
--
-- System
-- - Name Linux
-- - Version 4.14.83v7-aufs
-- - Processor armv7l
--
-- Build
-- - Compiler /usr/bin/c++ (GNU)
-- - Extra compilation flags
-- - 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: /home/pi/centreon-engine-18.10.0/build
Stacks Image 968842
Astuce pour la compilation
Pour accélérer le processus de compilation pour pouvez ajouter une directive de compilation afin d'autoriser des tâches simultanées. La bonne pratique est d'ajouter un argument correspondant au nombre de coeur + 1 :
make -j <nbr de coeur>+1

Avec cette directive, pour un raspberryPI 3+, la durée de compilation passe de 10 minutes à 4 minutes.
Ensuite compilons cette configuration et installons centengine, patientez une bonne dizaine de minutes.
make
sudo make install

Pour vérifier, avant de continuer, le bon fonctionnement de la librairie partagée, saisissez la commande suivante:
root@supervision:~# centengine -V
[1507565821] [13191] Centreon Engine 18.10.0
[1507565821] [13191]
[1507565821] [13191] Copyright 1999-2009 Ethan Galstad
[1507565821] [13191] Copyright 2009-2010 Nagios Core Development Team and Community Contributors
[1507565821] [13191] Copyright 2011-2018 Centreon
[1507565821] [13191]
[1507565821] [13191] This program is free software: you can redistribute it and/or
[1507565821] [13191] modify it under the terms of the GNU General Public License version 2
[1507565821] [13191] as published by the Free Software Foundation.
[1507565821] [13191]
[1507565821] [13191] Centreon Engine is distributed in the hope that it will be useful,
[1507565821] [13191] but WITHOUT ANY WARRANTY; without even the implied warranty of
[1507565821] [13191] MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
[1507565821] [13191] General Public License for more details.
[1507565821] [13191]
[1507565821] [13191] You should have received a copy of the GNU General Public License
[1507565821] [13191] along with this program. If not, see
[1507565821] [13191] <http://www.gnu.org/licenses/>.

Mettre le service centenaire en démarrage automatique.
sudo systemctl enable centengine.service
sudo systemctl daemon-reload

L'installation de Centreon-Engine est terminée, il faut passer à l'installation des plugins.
comments powered by Disqus
comments powered by Disqus
 Vous êtes ici: