Skip to main content
Version: 24.04

Install the Centreon MBI extension

This chapter presents the software architecture of the Centreon MBI extension and provides an overview of the integration of the extension with Centreon monitoring software.

This document is intended for administrators who will install or configure Centreon MBI.

Four main steps are required to install Centreon MBI:

  • Check the system requirements.
  • Install the Centreon MBI interface in the Centreon application (Centreon MBI Server).
  • Install the reporting server (Centreon MBI Reporting Server).
  • Configure the extraction, transformation and loading (ETL) in the Centreon MBI interface.

Architecture

A dedicated reporting server

The architecture and these requirements apply to:

  • test
  • pre-production
  • production environments.

The diagram below highlights the main components of Centreon MBI:

image

The monitoring database is not necessarily on the same server as the Centreon server.

  • ETL: Process that extracts, transforms and loads data into the reporting database.
  • CBIS: The scheduler that manages the execution and publication of reports.
  • Reporting Database: The MariaDB/MySQL database that contains the reporting data and some raw data extracted from the monitoring database.

Network Flow Tables

The table below shows the different types of flows, by default, between the dedicated BI server, the Centreon server and the databases:

ApplicationSourceDestinationPortProtocol
ETL/CBISReporting serverCentreon database server3306TCP
SSHReporting serverCentreon Server22TCP
CBISReporting serverCentreon Server80HTTP*
CBISCentreonReporting server1234TCP
WidgetsCentreon central serverReporting server3306TCP

Only required for Host-Graph-v2 and Hostgroup-Graph-v2 reports that use the Centreon API to generate graphs.

Information about the packages

The Centreon MBI installation is based on two RPM packages:

  • Centreon-bi-server: Installs the MBI interface integrated with the Centreon interface. The package is installed on the Centreon central server.
  • Centreon-bi-reporting-server: Contains all the components needed to run the reporting server (report scheduler, ETL, standard reports). It must be installed on a server dedicated to reporting processes.

The installation of the database must be done at the same time. We strongly recommend installing the MariaDB/MySQL database on the reporting server, for performance and isolation reasons.

Prerequisites

Central Centreon server

Software requirements

See the software requirements.

You should install the MariaDB/MySQL database at the same time. We highly recommend installing the database on the same server, due to performance and isolation considerations.

  • Centreon Web 24.04
  • Check that date.timezone is correctly configured in the /etc/php.d/50-centreon.ini file (same as the one returned by the timedatectl status command).
  • Avoid using the following variables in the configuration file /etc/my.cnf. They interrupt the execution of long queries and can stop ETL or report generation jobs:
    • wait_timeout
    • interactive_timeout

Users and groups

UserGroup
centreonBI (new)apache,centreon,centreonBI
apache (existing)centreonBI

Description of users, umask and home directory

Userumaskhome
centreonBI0002/home/centreonBI

Dedicated reporting server

Hardware layer

ElementValue
CPU4 vCPU
RAM16 GB

This is how your MBI server should be partitioned:

Volume group (LVM)File systemDescriptionSize
/bootboot images1 GB
vg_root/system root20 GB
vg_rootswapswap4 GB
vg_root/var/logcontains all log files10 GB
vg_data/var/lib/mysqldatabase233 GB
vg_data/var/backupbackup directory10 GB
vg_dataFree space (unallocated)5 GB

To check the free space, use the following command by replacing vg_data with the name of the group volume:

vgdisplay vg_data | grep -i free*

Firmware and software layer

Make sure that the reporting server and the central server have the same time zone; otherwise report publications will fail (link to download missing). The same time zone must be displayed with the timedatectl command. You can change the time zone with this command:

timedatectl set-timezone Europe/Paris

Be sure to optimize MariaDB/MySQL on your reporting server. You will need at least 12 GB of RAM in order to use the next file.

Make sure you have a tmp folder in /var/lib/mysql.

Do not set these MariaDB optimizations on your monitoring server.

Users and groups:

UserGroup
centreonBIcentreonBI

Description of users, umask and user directory:

Userumaskhome
centreonBI0002/home/centreonBI

Install the extension on Centreon

The actions listed in this chapter must be performed on the Centreon Central Server.

  1. Install the Business repository. You can find it on the support portal.

  2. Then run the following commands:

dnf install centreon-bi-server

Enable the extension

The Administration > Extension > Manager menu allows you to install the extensions detected by Centreon. Click the Centreon MBI tile to install.

Then, download the license sent by the Centreon team to start configuring the general options.

Configure the extension

Enter the following values in the Centreon MBI general options menu, Reports > Monitoring Business Intelligence > General Options:

TabsOptionValue
Scheduler optionsCBIS HostIP address of the reporting server
ETL optionsReporting engine uses a dedicated MySQL serverYes
Reporting widgetsReporting MariaDB databaseIP address of the reporting base (default = IP address of the reporting server)

*The connection test will not work at this point in the installation.

Access to the Central database

Download the license sent by the Centreon team to start configuring the general options.

The MariaDB monitoring database is hosted on the central monitoring server.

Run the command below to allow the reporting server to connect to the databases on the monitoring server.

Use the following option:

perl /usr/share/centreon/www/modules/centreon-bi-server/tools/centreonMysqlRights.pl --root-password=@ROOTPWD@

@ROOTPWD@: Root password of the MariaDB monitoring database. If there is no password for the "root" user, do not specify the root-password option.

If you use MariaDB replication for your monitoring databases, some views are created during the installation of Centreon MBI. You must exclude them from replication by adding the following line to the my.cnf file of the slave server or mariadb.cnf on Debian 11.

replicate-wild-ignore-table=centreon.mod_bi_%v01,centreon.mod_bi_%V01

Then, create the views manually on the slave server:

  1. Download the following file to a temporary folder (in our example, /tmp), for instance using wget.

  2. Run the following command (change the name of your temporary folder if necessary):

mysql centreon < /tmp/view_creation.sql

Debian 11 specific configuration

MariaDB must listen on all interfaces instead of listening on localhost/127.0.0.1 (default value). Edit the following file:

/etc/mysql/mariadb.conf.d/50-server.cnf

Set bind-address to 0.0.0.0 and restart mariadb.

systemctl restart mariadb

Give rights to the cbis user

When you install Centreon MBI, a user named cbis is automatically created. It allows the report generation engine to extract data from Centreon (using the APIs) in order to insert them in the report. This user must have access to all resources monitored by Centreon in order to extract the performance graphs for the following reports:

  • Host-Graph-v2
  • Hostgroup-Graph-v2.

To test the connection between the MBI reporting server and the Centreon API, use the following command to download a graph. Replace the graph parameters and timestamps, and replace XXXXXXXXX with the user's autologin token cbis:

curl -XGET 'https://IP_CENTRAL/centreon/include/views/graphs/generateGraphs/generateImage.php?akey=XXXXXXXXX&username=CBIS&hostname=<host_name>&service=<service_description>&start=<start_date>&end=<end_date>' --output /tmp/image.png

Example:

curl -XGET 'https://10.1.1.1/centreon/include/views/graphs/generateGraphs/generateImage.php?akey=otmw3n1hu03bvt9e0caphuf50ph8sdthcsk8ofdk&username=CBIS&hostname=my-poller&service=Cpu&start=1623016800&end=1623621600' --output /tmp/image.png

The result should look like the code below, and the desired graph image must have been uploaded to the /tmp directory:

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload Upload Total Spent Left Speed
100 18311 100 18311 0 0 30569 0 --:--:-- --:--:-- --:--:-- 30569

Install the reporting server

Install the packages

You must have the following information before proceeding with the installation process:

  • IP/DNS of the monitoring database

  • IP/DNS of the Centreon web interface

  • IP/DNS of the reporting database (localhost strongly recommended)

  • Access (user/password) to the reporting database

  • Define and retrieve the ssh password of the centreonBI user on the Central server (for the availability of reports generated on the interface)

Procedure

  1. Install the Centreon repository:
dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/24.04/el8/centreon-24.04.repo
dnf clean all --enablerepo=*
dnf update
  1. Install the Business repository. You can find it on the support portal.

  2. Ensure a version of Java 17 (or 18) is installed before you start the procedure.

    • If you need to check the Java version, enter the following command:
    java -version
    • If you need to upgrade the Java installation to Java 17 (or 18), go to the Oracle official download page.

    • If several Java versions are installed, you need to activate the right version. Display the installed versions using the following command and select the Java 17 (or 18) version:

    sudo update-alternatives --config java
  3. Install the MariaDB repository:

curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --os-type=rhel --os-version=8 --mariadb-server-version="mariadb-10.11"
  1. Then run the following command:

Install the epel repository:

dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Enable the codeready-builder repository:

subscription-manager repos --enable codeready-builder-for-rhel-8-x86_64-rpms

Then launch the installation:

dnf install centreon-bi-reporting-server MariaDB-server MariaDB-client

For an installation based on a blank distribution, install the GPG key:

cd /etc/pki/rpm-gpg/
wget https://yum-gpg.centreon.com/RPM-GPG-KEY-CES

Enable the cbis service:

systemctl enable cbis

Start and enable gorgoned:

systemctl start gorgoned && systemctl enable gorgoned

Configure the reporting server

MariaDB Optimizations

Make sure that the optimized configuration file provided in the prerequisites is present in /etc/my.cnf.d/, then restart the MariaDB service:

systemctl restart mariadb

It is necessary to change the LimitNOFILE limitation. Changing this option in /etc/my.cnf will NOT work.

mkdir -p  /etc/systemd/system/mariadb.service.d/
echo -ne "[Service]\nLimitNOFILE=32000\n" | tee /etc/systemd/system/mariadb.service.d/limits.conf
systemctl daemon-reload
systemctl restart mariadb

If the MariaDB service fails to start, remove the ib_logfile files (MariaDB must absolutely be stopped) and then restart MariaDB again:

rm -f /var/lib/mysql/ib_logfile*
systemctl start mariadb

If you are using a specific socket file for MariaDB, modify the file /etc/my.cnf and in the [client] section, add :

socket=$PATH_TO_SOCKET$

Secure the database

It is mandatory to secure the root access of the database before installing Centreon. If you use a local database, execute the following command on the central server, otherwise on the database server:

mariadb-secure-installation
  • Answer yes to all questions except "Disallow root login remotely?"
  • It is mandatory to define a password for the root user of the database. You will need this password during the web-installation.

For more information, please see the official MariaDB documentation.

Start configuring

Make sure the MariaDB reporting system is started and then run the commands below and answer the questions:

/usr/share/centreon-bi/config/install.sh

The script manages the exchange of SSH keys between the monitoring server and the reporting server, and configures the default SFTP publishing rule in order to publish the reports on the Centreon web interface. Finally, it enables the backup and starts the CBIS service.

Once the installation is complete, continue to the next chapter to configure the ETL.

Problem with the SSH exchange key

In some cases, SSH key exchange fails. To solve the problem, do the following manually:

Switch to the centreonBI user:

su - centreonBI

Generate the SSH key:

ssh-keygen -t ed25519 -a 100 -f ~/.ssh/id_ed25519 -P "" -q

And print the centreonBI public key (in order to authorize it then on Centreon):

su - centreonBI
cat /home/centreonBI/.ssh/id_ed25519.pub

Now, on the monitoring server:

Create a .ssh folder that centreonBI will own, restrict permissions on this folder and paste into the authorized_keys file the contents of its public key on the reporting server (shown earlier):

mkdir -p /home/centreonBI/.ssh/ && chown centreonBI: /home/centreonBI/.ssh/ && chmod 700 /home/centreonBI/.ssh/ && echo "@reporting pub key content@" > /home/centreonBI/.ssh/authorized_keys

The key exchange must then be validated by a first connection that will accept the SSH server signature. As the centreonBI user from the reporting server:

ssh centreonBI@@MONITORING_SERVER@

Then exit the centreonBI session with exit or Ctrl-D on both servers.

To continue, run the installation script (/usr/share/centreon-bi/config/install.sh) as above and answer Yes when asked to proceed with the SSH key exchange. You will get an error when creating the USER, because it already exists. This is not a blocking step.

ETL: Configuration

Centreon MBI integrates an ETL that allows you to:

  • Synchronize the raw data from the monitoring to the reporting server
  • Feed statistical data to the reporting server databases
  • Control the retention of data on the reporting server

Before proceeding to the next steps, read the chapter on best practices to make sure that the configuration of the objects in Centreon (groups, categories, etc.) is in accordance with the expectations of Centreon MBI.

In the Reporting > Monitoring Business Intelligence > General Options > ETL Options tab, specify the following options:

OptionsValues
General options
Reporting engine uses a dedicated dedicated MariaDB serverYes. You must use a reporting server
Temporary file storage directory on reporting serverFolder where dumps will be stored on the reporting server
Type of statistics to buildSelect “Availability only” if you only use availability reports. Select “Performance and capacity only” if you only want to use capacity and performance reports. Select “All” to calculate the statistics for both types of report.
Use large memory tweaks (store MariaDB temporary tables in memory)Activated only if your MariaDB configuration and allocated physical memory on the server permit.
Reporting perimeter selection
HostgroupsSelect only host groups for which you want to aggregate data.
HostcategoriesSelect only host categories for which you want to aggregate data.
Service categoriesSelect only service categories for which you want to aggregate data.
Availability statistic calculation
Live services for availability statistics calculationSelect required time periods.
Performance and capacity statistic calculation
Granularity required for performance data statisticsSelect the level of granularity required to run the desired performance reports (1).
Live services for performance data statistics calculationSelect the required time periods.
Capacity statistic aggregated by month
Live services for capacity statistics calculationSelect the “24x7” time period.
Service categories related to capacity data monitoringSelect the service categories that have been associated with capacity-type services.
Exclude metrics from service categories that do not return capacity USAGE informationConcerns the metrics linked to services which return capacity data. Select the metrics that do not return capacity usage information. but a maximum or total value. (e.g., the metric “size”).
Centile parameters
Calculating centile aggregation bySelect the desired aggregation level. The standard percentile report provided with BI 2.1 uses Month data.
Select service categories to aggregate centile onFilter on relevant service categories for centile statistics (e.g., Traffic).
First day of the weekSelect the first day of the week for Week aggregation.
Centile / Timeperiod combinationCreate a new centile/timeperiod combination on which to perform the calculation.

(1) Reports requiring data granularity by the hour are listed below. If you do not wish to use these reports, disable the calculation of hourly statistics:

  • Hostgroup-Host-details-1

  • Host-detail-v2

  • Hostgroup-traffic-Average-Usage-By-Interface

  • Hostgroup-traffic-by-Interface-And-Bandwith-Ranges

ETL: Data retention

The reporting server contains tables of statistics specific to Centreon MBI in the "centreon_storage" database. The storage space used by these tables is increasing every day. It is possible to control the size of these tables by defining data retention rules.

Under Reports > Monitoring Business Intelligence > General Options > Data Retention Options menu, data retention can be managed by:

  • Type of data (availability, performance).
  • Data granularity (raw data, hourly, daily or monthly values)

Before enabling the data retention options, make sure that the reporting engine uses a dedicated MariaDB server, and the corresponding option is set to Yes in the Reporting > Business Intelligence > General Options ETL Options menu.

Enable data retention management by selecting Yes, then set the configuration options (example below).

image

To enable automatic purging of old data, edit the cron file /etc/cron.d/centreon-bi-purge on the reporting server, then uncomment the following line:

#0 20 * * * root @CENTREON_BI_HOME@/*etl*/dataRetentionManager.pl >> @CENTREON_BI_LOG@/dataRetentionManager.log 2>&1

Avoid scheduled periods for statistical calculations with Centreon MBI ETL and report generation. You can run this cron daily or weekly, depending on the batch execution time and the load generated on the server.

Restart the cron service:

systemctl restart crond

BEST PRACTICES: Select different retention periods depending on the granularity of the statistical data:

  • Aggregated values per hour are used to analyze a metric over a short period of time. They take up a lot of disk space. You may not need to keep these statistics for more than two or three months.

  • Beyond five or six months, you may only need to view the trend for availability or performance statistics. You could then retain daily aggregate data for up to six months, for example, and set up retention of monthly aggregate data for a period of several dozen months.

Please proceed to the next section to continue the installation.

ETL: Execution

Before continuing, make sure you have installed the MariaDB configuration file as described above in the prerequisites. Configure and enable data retention so that only the required data is imported and calculated.

Reconstruction of statistics from historical data

Run the following command on the reporting server. This will:

  • Delete all existing data from the reporting server.
  • Import raw monitoring data from the monitoring server to the reporting server (depending on retention settings).
  • Fill tables containing availability statistics for hosts and services.
  • Fill tables containing performance and capacity statistics for hosts and services.
/usr/share/centreon-bi/bin/centreonBIETL -r

Enable daily script execution

Once the data rebuilding process is complete, you can enable the calculation of statistics. On the reporting server, edit the file /etc/cron.d/centreon-bi-engine and uncomment the following line:

#30 4 * * * root /usr/share/centreon-bi/bin/centreonBIETL -d >> /var/log/centreon-bi/centreonBIETL.log 2>&1

Restart the cron service on the reporting server:

systemctl restart crond

Make sure that the centreonBIETL batch only starts after the eventReportBuilder batch has finished on the monitoring server (check the /etc/cron.d/centreon cron file on the monitoring server).

The installation of Centreon MBI is now complete. See the tutorial.