Difficulty: intermediate
Estimated Time: 30 minutes

What is Centreon

It is a monitoring tool based on Nagios

Advantages over Nagios

  • Nicer GUI
  • Built-in support for MySQL, RRD and Mediawiki
  • Poller is a remote checker component, makes the system distributed and an alternative solution to passive checks

About the Course

You will learn about the elaborate installation process. This will help you understand all the componnents and the specific details in each component.


You have learned Centreon installation the hard way

Installing Centreon The Hard Way

Step 1 of 4

Step 1 - Centreon Clib, Engine and Broker

It would be much easier if we install Centreon on CentOS as it is a supported distribution. Here we gonna attempt to install it to Ubuntu as it is the available environment in Katacoda.

Configure vi

Map jj to ESC button

echo "inoremap jj <Esc>" > .vimrc

Get the Ubuntu version

lsb_release -a

When this tutorial was made it is 16.04. When the environment changes some adjustments should be made.

Centreon Engine

Install Clib

apt update

apt install -y cmake

wget http://files.download.centreon.com/public/centreon-clib/centreon-clib-18.10.0.tar.gz

tar xvzf centreon-clib-18.10.0.tar.gz

cd centreon-clib-18.10.0/build

cmake \ -DWITH_TESTING=0 \ -DWITH_PREFIX=/usr \ -DWITH_PREFIX_LIB=/usr/lib \ -DWITH_PREFIX_INC=/usr/include/centreon-clib \ -DWITH_SHARED_LIB=1 \ -DWITH_STATIC_LIB=0 \ -DWITH_PKGCONFIG_DIR=/usr/lib/pkgconfig .


make install

Return to root directory using cd

Adding centreon-engine user

groupadd centreon-engine

useradd -g centreon-engine -m -r -d /var/lib/centreon-engine centreon-engine

Download and Install

wget http://files.download.centreon.com/public/centreon-engine/centreon-engine-18.10.0.tar.gz

tar xvzf centreon-engine-18.10.0.tar.gz

cd centreon-engine-18.10.0/build

cmake \ -DWITH_PREFIX=/usr \ -DWITH_PREFIX_BIN=/usr/sbin \ -DWITH_PREFIX_CONF=/etc/centreon-engine \ -DWITH_PREFIX_LIB=/usr/lib/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_DIR=/etc/init.d \ -DWITH_PKGCONFIG_SCRIPT=1 \ -DWITH_PKGCONFIG_DIR=/usr/lib/pkgconfig \ -DWITH_TESTING=0


make install

Return to root directory using cd

Centreon Broker

Adding centreon-broker user

groupadd centreon-broker

useradd -g centreon-broker -m -r -d /var/lib/centreon-broker centreon-broker

Download and Install

apt install -y libqt4-dev libqt4-sql-mysql zlib1g-dev librrd-dev liblua5.2-dev libgnutls28-dev

wget http://files.download.centreon.com/public/centreon-broker/centreon-broker-18.10.1.tar.gz

tar xvzf centreon-broker-18.10.1.tar.gz

cd centreon-broker-18.10.1/build

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_INC=/usr/include/centreon-broker \ -DWITH_PREFIX_LIB=/usr/lib/nagios \ -DWITH_PREFIX_MODULES=/usr/share/centreon/lib/centreon-broker \ -DWITH_STARTUP_DIR=/etc/init.d \ -DWITH_STARTUP_SCRIPT=auto \ -DWITH_TESTING=0 \ -DWITH_USER=centreon-broker .


make install

Return to root directory using cd

Centreon Connector

apt install -y libperl-dev libssh2-1-dev

wget http://files.download.centreon.com/public/centreon-connectors/centreon-connectors-18.10.0.tar.gz

tar xvzf centreon-connectors-18.10.0.tar.gz

cd centreon-connector-18.10.0/perl/build

cmake \ -DWITH_PREFIX=/usr \ -DWITH_PREFIX_BINARY=/usr/lib/centreon-connector \ -DWITH_TESTING=0 .


make install

Return to root directory using cd

cd centreon-connector-18.10.0/ssh/build

cmake \ -DWITH_PREFIX=/usr \ -DWITH_PREFIX_BINARY=/usr/lib/centreon-connector \ -DWITH_TESTING=0 .


make install

Adding centreon user

groupadd -g 6000 centreon

useradd -u 6000 -g centreon -m -r -d /var/lib/centreon -c "Centreon Admin" -s /bin/bash centreon

Create the Centreon Plugins and Log directories

mkdir -p /usr/lib/centreon/plugins

chown centreon: /usr/lib/centreon/plugins

mkdir /var/log/centreon

chown centreon: /var/log/centreon

mkdir /var/log/centreon-broker

chown centreon-broker: /var/log/centreon-broker

Configure systemd

vi /etc/systemd/system/centengine.service

i or a to enter edit mode

Description=Centreon Engine

ExecStart=/usr/sbin/centengine /etc/centreon-engine/centengine.cfg
ExecReload=/bin/kill -HUP $MAINPID


ESC or jj to enter command mode