Skip to main content
Version: 23.10

Installing MAP

This topic describes how to install Centreon MAP. We recommend that you install MAP on a dedicated server. However, if you do not have large volumes of data, you can install it on the central server.

Note to users already using the MAP (Legacy) version: the MAP module does not require the centreon_studio database (used for a MAP Legacy server). This database can be removed after migrating your legacy maps to MAP. Be aware that it is not possible to migrate from MAP to MAP (legacy).

License​

If you need an additional license for Centreon MAP, please contact the Centreon support team to obtain and install your license key.

Architecture​

The diagram below summarizes the MAP architecture.

  • You can install Centreon MAP either on a dedicated server or on the central server.
  • Centreon MAP does not require any installation on your machine; this solution is fully available in the Centreon web interface.

image

Table of network flow

ApplicationSourceDestinationPortProtocolPurpose
Map ServerMap serverCentreon central broker5758TCPGet real-time status updates
Map ServerMap serverCentreon MariaDB database3306TCPRetrieve configuration and other data from Centreon
WebMap serverCentreon central80/443HTTP/HTTPSAuthentication & data retrieval
Web interfaceUserMap server8081/9443HTTP/HTTPSRetrieve views & content
Web interfaceUserInternet* (Mapbox)443HTTPSRetrieve Mapbox data

* With or without a proxy

Prerequisites​

Centreon MAP Engine server​

License​

The server requires the license to be available and valid on Centreon's central server. To do this, you must contact the Centreon support team to obtain and install your license key.

Software​

See the software requirements.

Hardware​

ElementValue
CPU2 vCPU
RAM4 GB

This is how your MAP 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/mysqldatabase5 GB
vg_dataFree space (unallocated)2 GB

Information required during configuration​

  • Centreon web login with administration rights.

Even with a correctly sized server, you should bear in mind the best practices and recommendations when creating views so you can avoid performance issues.

If the central server is configured in HTTPS, you must apply the SSL configuration on the MAP server. Follow this procedure to secure your MAP server.

Centreon MAP web client​

License​

The web interface requires the license to be available and valid on Centreon's central server. To do this, you must contact the Centreon support team to obtain and install your license key.

Compatibility​

Note that the MAP web interface has the same requirements as the Centreon web interface. See the prerequisites for the compatibility of web browsers here.

Pre-installation​

Disable SELinux​

During installation, SELinux should be disabled. To do this, edit the file /etc/selinux/config and replace enforcing by disabled. You can also run the following command:

sed -i s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config

Reboot your operating system to apply the change.

reboot

After system startup, perform a quick check of the SELinux status:

getenforce

You should have this result:

Disabled

Note that this deactivation should be temporary. To enable SELinux again, edit the /etc/selinux/config file and change the value with the following options:

  • SELINUX=enforcing to make SELinux security policy enforced.
  • SELINUX=permissive to make SELinux print warnings instead of enforce security policy.

Configure or disable the firewall​

If your firewall is active, add firewall rules. You can also disable the firewall during installation by running the following commands:

systemctl stop firewalld
systemctl disable firewalld

MAP Engine server installation​

Step 1: Set authentication parameters​

You must provide the Centreon MAP Engine server with a dedicated user who has access to all resources through the appropriate access list groups. Since the password will be stored in human-readable form in a configuration file, you should not use a Centreon admin user account.

  • Log into Centreon and go to the Configuration > Users > Contacts/Users page. Then click the Centreon Authentication tab.
  • Set the Reach API Realtime parameter to Yes.

image

Exclude the user from the password expiration policy on the Administration > Authentication page: their password will never expire.

image

Step 2: Create a MySQL user​

From the central server terminal, create a user in the MySQL instance hosting 'centreon' and 'centreon_storage' databases:

CREATE USER 'centreon_map'@'<IP_SERVER_MAP>' IDENTIFIED BY 'centreon_map';
GRANT SELECT ON centreon_storage.* TO 'centreon_map'@'<IP_SERVER_MAP>';
GRANT SELECT, INSERT ON centreon.* TO 'centreon_map'@'<IP_SERVER_MAP>';

The INSERT privilege will only be used during the installation process in order to create new Centreon Broker output. It will be revoked later.

Step 3: Install MAP Engine server​

Package installation​

If you installed your Centreon MAP server from a fresh OS installation you need to install the Centreon repository:

First you need to install an EPEL repository:

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

The command should return results as follows:

Installed:
epel-release-8-17.el8.noarch

Complete!

Then install the Centreon repository:

dnf install -y dnf-plugins-core
dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/23.10/el8/centreon-23.10.repo

If the URL does not work, you can manually find this package in the folder.

Business repository installation​

Install the Centreon Business repository. You can find this on the support portal.

MAP Engine server installation​

You have two possibilities for the installation:

  • on a new server (without existing Centreon MAP packages),
  • or on an existing Centreon MAP server legacy.

Select the right tab below and install the Centreon MAP Engine server:

MariaDB requirement​

You need to have a MariaDB database to store your Centreon MAP data.

First you need to add 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.5"

Then install MariaDB server:

dnf install MariaDB-server

Then enable and restart mariadb

systemctl enable mariadb
systemctl restart mariadb

Since MariaDB 10.5, it is mandatory to secure the database's root access before installing Centreon. If you are using a local database, run the following command on the Map server:

mysql_secure_installation
  • Answer yes to all questions except "Disallow root login remotely?".
  • It is mandatory to set a password for the root user of the database.

For more information, please see the official MariaDB documentation.

Now you can install the Centreon MAP Engine.

dnf install centreon-map-engine

When installing Centreon MAP Engine server, it will automatically install java (OpenJDK 17) if needed.

Go to this troubleshooting procedure if OpenJDK 17 causes an issue preventing centreon-map-engine from being installed.

Java requirement​

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
  • If you need to use your platform in HTTPS, you will have to generate a keystore file for the Java 17 (or 18) version (see the procedure).

Step 4: Check the database configuration​

Make sure the database that stores Centreon MAP data is optimized (automatically added by the RPM in /etc/my.cnf.d/map.cnf or in /etc/mysql/map.cnf for Debian):

max_allowed_packet = 20M
innodb_log_file_size = 200M

Then, restart MariaDB:

systemctl restart mariadb

Since MariaDB 10.5, it is mandatory to secure the database's root access before installing Centreon. If you are using a local database, run the following command on the central server:

mysql_secure_installation
  • Answer yes to all questions except "Disallow root login remotely?".
  • It is mandatory to set 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.

Step 5: Execute the configure.sh script​

Execute the Centreon MAP Engine server configuration script.

Two modes are available:

  • Interactive (no option/default mode): several questions will be asked to interactively fill in the installation variables.
  • Automatic (--automatic or -a): the installation will be done automatically from the values set in the file /etc/centreon-map/vars.sh.

If it is your first installation, we advise you to use the standard mode (interactive) and choose No when asked for advanced installation mode:

 /etc/centreon-map/configure.sh

The output should look like this:

Configuration completed, enjoy !

This script generates the map-config.properties file.

Custom URI​

If you have customized the URI for your Centreon platform, you need to edit the map-config.properties file by adding the following command using the custom URI already defined here:

centreon.path=/your-custom-uri

Java memory optimization​

JAVA_OPTS is a standard environment variable used to edit Java properties.

To correctly implement the dedicated memory:

Edit the JAVA_OPTS parameter in the Centreon Map configuration file /etc/centreon-map/centreon-map.conf by adding -Xms and -Xmx parameters:

JAVA_OPTS="-Xms512m -Xmx4G..."

The Xmx value depends on the amount of memory indicated in the tables in the Hardware section.

Then restart the centreon-map-engine service:

systemctl restart centreon-map-engine

Step 6: Apply Centreon Broker configuration and restart MAP Engine service​

Before restarting Broker, you must export the configuration from the Centreon web interface.

Restart Centreon Broker on the Central server:

systemctl restart cbd

Remove the INSERT privilege from user centreon_map:

REVOKE INSERT ON centreon.* FROM 'centreon_map'@'<IP_SERVER_MAP>';

Then restart the centreon-map-engine service:

systemctl restart centreon-map-engine

Run the following command to check that the centreon-map-engine service is properly started:

systemctl status centreon-map-engine

This is an example of results:

● centreon-map-engine.service - Centreon Studio map server
Loaded: loaded (/usr/lib/systemd/system/centreon-map-engine.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2022-11-24 09:10:58 UTC; 6h ago
Main PID: 39103 (centreon-map-en)
Tasks: 50 (limit: 23465)
Memory: 598.1M
CGroup: /system.slice/centreon-map-engine.service
β”œβ”€39103 /bin/bash /usr/share/centreon-map-engine/bin/centreon-map-engine
└─39119 /usr/bin/java -Dsun.misc.URLClassPath.disableJarChecking=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/centreon-map

Step 7: Check the configuration​

Check the MAP Engine server configuration by using this command:

/etc/centreon-map/diagnostic.sh

In case of any error, see the Run our diagnostic tool section in the Troubleshooting MAP topic.

If the configuration is correct, the centreon-map-engine service can be started from the Centreon MAP server:

systemctl restart centreon-map-engine

Enable the service to start up automatically on server boot:

systemctl enable centreon-map-engine

The Centreon MAP Engine server is now started and enabled, so let's install the interface part of the extension.

MAP web client installation​

Step 1: Install the business repository​

Install the Centreon Business repository. You can find this on the support portal.

Step 2: Install the MAP module​

  1. From your terminal, run the following command on the central server:

    sudo dnf install centreon-map-web-client
  2. Then you need to log on to the Centreon web interface.

  3. Go to Administration > Extensions > Manager and install the Map Web Client module.

Step 3: Activate the MAP module​

By default, the MAP module is not enabled. Perform the following procedure to enable it.

  1. Log on to the Centreon interface and go to Administration > Extensions > Map > Options. image

  2. In the Connection information section, set Map Engine server to Yes.

  3. Enter the IP address of your MAP server in the Map Engine server address field. If you installed MAP on the central server, this is the IP address of the central server. Use its full IP address, not the localhost. The default port is 8081 (for instance: http://10.25.xxx:8081).

  4. Click the Test connection to server button to test the connection. This test should return the Connection test successful message.

  5. Click Save.

  6. Go to the Configuration > Pollers > Pollers page. Export the configuration of the central server (using the Reload method).

  7. From your terminal, restart the cbd service:

    systemctl restart cbd
  8. Now that the configuration is correct, you can start the server by running this command:

    systemctl start centreon-map-engine
  9. Run the following command to check that the centreon-map-engine service is properly started:

    systemctl status centreon-map-engine

    This is an example of results:

    ● centreon-map-engine.service - Centreon Studio map server
    Loaded: loaded (/usr/lib/systemd/system/centreon-map-engine.service; disabled; vendor preset: disabled)
    Active: active (running) since Thu 2022-11-24 09:10:58 UTC; 6h ago
    Main PID: 39103 (centreon-map-en)
    Tasks: 50 (limit: 23465)
    Memory: 598.1M
    CGroup: /system.slice/centreon-map-engine.service
    β”œβ”€39103 /bin/bash /usr/share/centreon-map-engine/bin/centreon-map-engine
    └─39119 /usr/bin/java -Dsun.misc.URLClassPath.disableJarChecking=true -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/var/log/centreon-map

You can now use the MAP module by accessing the Monitoring > Map page.

Secure MAP in HTTPS​

If you want to use MAP in HTTPS, you must secure both your Centreon platform and MAP.

  • Follow this procedure to secure your Centreon platform.
  • Follow this procedure to secure MAP.