Skip to main content
Version: ⭐ 23.04

Installing MAP

This topic describes how to install Centreon MAP. It is recommended to 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 get and install your license key.

Architecture​

The diagram below summarizes the MAP architecture.

  • You can either install Centreon MAP 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 get 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

Memory for Java​

To correctly implement the dedicated memory:

  1. Edit the JAVA_OPTS parameter in the Centreon Map configuration file /etc/centreon-map/centreon-map.conf:

    JAVA_OPTS="-Xms512m -Xmx4G"

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

  2. Restart the service:

    systemctl restart centreon-map-engine

Information required during configuration​

  • Centreon web login with administration rights.

Even with a correctly sized server, you should have in mind the best practices and recommendations when creating views so you do not face 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 get 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 web browsers compatibility here.

MAP Engine server installation​

Step 1: Set authentication parameters​

You must provide to Centreon MAP Engine server 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 page Administration > Authentication: 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​

Java version 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).

Procedure​

If you installed your Centreon MAP server from a "fresh CentOS installation" you need to install the centreon-release package:

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-release package:

dnf config-manager --add-repo https://packages.centreon.com/rpm-standard/23.04/el8/centreon-23.04.repo

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

Install the Centreon Business repository, you can find it on the support portal.

Then install Centreon MAP Engine server using the following command:

dnf install centreon-map-engine

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

You need to have a MariaDB database to store your Centreon MAP data, except if it has already been created at the central level.

To install MariaDB, execute the following command:

dnf install MariaDB-client MariaDB-server

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):

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 - Optional: If MAP Engine and MAP Legacy are installed on the same server​

If you already have MAP Legacy and are installing MAP Engine on the same server, you need to perform the following procedure. Otherwise, move to the Execute the configure.sh script step.

This procedure is to ensure that the configuration file can be used for both MAP Engine and MAP Legacy.

  1. Make a backup of the /etc/my.cnf.d/map.cnf file:

    cp map.cnf map.cnf.bk
  2. 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 /etc/centreon-map/vars.sh file.

    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
  3. Retrieve the configuration file backup:

    cp map.cnf.bk map.cnf

    Answer Y when prompted. Then restart MySQL:

    systemctl restart mysql
  1. Then restart the centreon-map-engine service:

    systemctl restart centreon-map-engine

Now go directly to the Restart Centreon Broker step.

Step 6 : 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 /etc/centreon-map/vars.sh file.

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

Then restart the centreon-map-engine service:

systemctl restart centreon-map-engine

Step 7: Restart Centreon Broker​

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>';

Step 8: 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 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

Centreon MAP Engine server is now started and enabled, 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 it on the support portal.

Step 2: Install the MAP module​

  1. From your terminal, run the following command:

    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 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 both secure your Centreon platform and MAP.

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