NDOUtils to Centreon Broker

Centreon Broker allows to store Engine events in a database like NDOUtils. So it is possible to replace NDOUtils by Centreon Broker. This document will explain how to modify them.

Prerequisites

This migration is based on an architecture with one central and one poller. The central is defined into Centreon by the name central and IP 10.30.2.62, the poller is defined by the name poller and IP 10.30.2.30. If we have more than one poller we need to repeat the poller step. And if we have just one central, bypass the poller step. We suppose we have a MySQL database on 10.30.2.62 with the user centreon and the password centreon.

Centreon Broker is assumed to have been properly installed.

Warning

When you change NDO to Centreon-Broker you loose your ack/downtimes history and the metrics name are now store into the database with their real name (no character replacement).

Add Centreon Broker informations

Connect to the Centreon interface and go to Configuration.

../_images/conf_pollers_list.png

For each poller and the central, edit the Centreon Broker information.

../_images/conf_poller_broker_path.png

Information

Value

Centreon Broker configuration path

/etc/centreon-broker

Centreon Broker modules path

/usr/share/centreon/lib/centreon-broker

Add Centreon Broker configurations

Select Centreon-Broker Configuration to Add a new configuration.

../_images/conf_add_broker.png

CBD configuration

Add a new configuration and set the following information:

General

Set the following information and keep the default value.

../_images/conf_add_broker_general.png

Information

Value

Name

central-broker

Config file name

central-broker.xml

Requester

central

Event queue max size

100000

Input

Add a TCP - IPv4 input. Set the following information and keep the default value.

../_images/conf_add_broker_input.png

Information

Value

Name

central-broker-input

Connection port

5669

Logger

Add a Core - File logger. Set the following information and keep the default value.

../_images/conf_add_broker_logger.png

Information

Value

Name of the logger

/var/log/centreon-broker/central-broker.log

Output

Add a SQL - Broker SQL Database output. Set the following information and keep the default value.

../_images/conf_add_broker_output_sql.png

Information

Value

Name

central-broker-sql

DB type

MySQL

Failover Name

central-broker-failover

DB host

10.30.2.62

DB Port

3306

DB user

centreon

DB password

centreon

DB name

centreon_storage

Add a file - File output. Set the following information and keep the default value.

../_images/conf_add_broker_output_sql_file.png

Information

Value

Name

central-broker-failover

File path

/var/log/centreon-broker/central-broker.failover

CBMod central configuration

Add a new configuration and set the following information.

General

Set the following information and keep the default value.

../_images/conf_add_cbmod_general.png

Information

Value

Name

central-module

Config file name

central-module.xml

Requester

central

Event queue max size

100000

Logger

Add a Core - File logger. Set the following information and keep the default value.

../_images/conf_add_cbmod_logger.png

Information

Value

Name of the logger

/var/log/centreon-broker/central-module.log

Output

Add a TCP - IPv4 output. Set the following information and keep the default value.

../_images/conf_add_cbmod_output_tcp.png

Information

Value

Name

central-module-output

Connection port

5669

Host to connect to

10.30.2.62

Failover Name

central-module-failover

Add a file - File output. Set the following information and keep the default value.

../_images/conf_add_cbmod_output_tcp_file.png

Information

Value

Name

central-module-failover

File path

/var/log/centreon-broker/central-module.failover

CBMod poller configuration

Add new configuration and set the following information.

General

Set the following information and keep the default value.

../_images/conf_add_cbmod_poller_general.png

Information

Value

Name

poller-module

Config file name

poller-module.xml

Requester

poller

Event queue max size

100000

Logger

Add a Core - File logger. Set the following information and keep the default value.

../_images/conf_add_cbmod_poller_logger.png

Information

Value

Name of the logger

/var/log/centreon-broker/poller-module.log

Output

Add a TCP - IPv4 output. Set the following information and keep the default value.

../_images/conf_add_cbmod_poller_output_tcp.png

Information

Value

Name

poller-module-output

Connection port

5669

Host to connect to

10.30.2.62

Failover Name

poller-module-failover

Add a file - File output. Set the following information and keep the default value.

../_images/conf_add_cbmod_poller_output_tcp_file.png

Information

Value

Name

poller-module-failover

File path

/var/log/centreon-broker/poller-module.failover

Modify Engine configuration

Select the Monitoring Engine Configuration.

../_images/conf_modif_engine.png

Engine central configuration

Select the central main configuration, go to the Data tab and within the Multiple Broker Module section, delete the NDO module line.

Now you must to Add a new broker module.

../_images/conf_modif_engine_broker.png

Information

Value

Multiple Broker Module

/usr/lib/nagios/cbmod.so /etc/centreon-broker/central-module.xml

Engine poller configuration

Select the poller engine configuration, go to the Data tab and within the Multiple Broker Module section, delete the NDO module line.

Now you must to Add a new broker module.

../_images/conf_modif_engine_poller_broker.png

Information

Value

Multiple Broker Module

/usr/lib/nagios/cbmod.so /etc/centreon-broker/poller-module.xml

Update Centreon options

Go to Administration > Options, click on Options and select Monitoring. Within the Monitoring database layer selection, update the Broker engine used by Centreon option.

../_images/conf_modif_centreon_storage.png

Information

Value

Broker engine used by Centreon

Centreon Broker

Disable ndomod

Connect to the Centreon interface and go to Configuration > Centreon, select ndomod.cfg on the NDOUtils menu.

Select your central-mod and poller-mod configurations and disable them.

Rebuild configuraions

Connect to the Centreon interface and go to Configuration > Monitoring Engine, select Generate on the Monitoring Engine menu.

Select All Engine Servers into the Engine Server section. After that, select Generate Configuration Files and Run Engine debug (-v) into the Actions section, and Export the configuration.

If all are OK, you can push the configuration, select Move Export Files and Export it.

Stop ndo2db

You need to stop nod2db to release the port 5668. Execute the following command:

$ /etc/init.d/ndo2db stop

Start CBD

You need to connect on your central server using SSH and to execute the following command:

$ /etc/init.d/cbd start

Restart Engine

Now you need to restart all engines. Connect to the Centreon interface and go to Configuration > Monitoring Engine, select Generate on the Engine menu.

Select All Engine Servers into the Engine Server section. After that, select Move Export Files and Restart Engine section, and Export the configuration.

Move event logs

Execute the Centreon migration tool named logsMigration.pl. You will find this tool inside the centreon installation directory. The path looks like /usr/share/centreon/www/__INSTALL__/tools/migration/logsMigration.pl.

Patch centstorage

This paragraphe only apply if you have a Centreon released prior to the 2.4.0 version.

Execute the Centreon migration patch for centstorage (patch). Then leave centstorage running for at least a full day (24 hours) before migrating to Centreon Broker.

Disable ndo2db

Connect to the Centreon interface and go to Configuration > Centreon, select ndo2db.cfg on the NDOUtils menu.

Select your central-ndo configuration and disable it.

If you don’t want ndo2db to start automatically, don’t forget to remove or disable ndo2db.

CentOS/RedHat

Disable ndo2db:

$ chkconfig --del ndo2db

Remove ndo2db:

$ yum remove ndoutils

Debian/Ubuntu

Disable ndo2db:

$ update-rc.d ndo2db disable

Remove ndo2db:

$ apt-get remove ndoutils-common