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.
For each poller and the central, edit the Centreon Broker information.
Information |
Value |
---|---|
Centreon Broker configuration path |
|
Centreon Broker modules path |
|
Add Centreon Broker configurations¶
Select Centreon-Broker Configuration to Add a new configuration.
CBD configuration¶
Add a new configuration and set the following information:
General¶
Set the following information and keep the default value.
Information |
Value |
---|---|
Name |
central-broker |
Config file name |
central-broker.xml |
Requester |
central |
Event queue max size |
50000 |
Input¶
Add a TCP - IPv4 input. Set the following information and keep the default value.
Information |
Value |
---|---|
Name |
central-broker-input |
Connection port |
5669 |
Logger¶
Add a Core - File logger. Set the following information and keep the default value.
Information |
Value |
---|---|
Name of the logger |
|
Output¶
Add a SQL - Broker SQL Database output. Set the following information and keep the default value.
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.
Information |
Value |
---|---|
Name |
central-broker-failover |
File path |
|
CBMod central configuration¶
Add a new configuration and set the following information.
General¶
Set the following information and keep the default value.
Information |
Value |
---|---|
Name |
central-module |
Config file name |
central-module.xml |
Requester |
central |
Event queue max size |
50000 |
Logger¶
Add a Core - File logger. Set the following information and keep the default value.
Information |
Value |
---|---|
Name of the logger |
|
Output¶
Add a TCP - IPv4 output. Set the following information and keep the default value.
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.
Information |
Value |
---|---|
Name |
central-module-failover |
File path |
|
CBMod poller configuration¶
Add new configuration and set the following information.
General¶
Set the following information and keep the default value.
Information |
Value |
---|---|
Name |
poller-module |
Config file name |
poller-module.xml |
Requester |
poller |
Event queue max size |
50000 |
Logger¶
Add a Core - File logger. Set the following information and keep the default value.
Information |
Value |
---|---|
Name of the logger |
|
Output¶
Add a TCP - IPv4 output. Set the following information and keep the default value.
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.
Information |
Value |
---|---|
Name |
poller-module-failover |
File path |
|
Modify Engine configuration¶
Select the Monitoring Engine Configuration.
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.
Information |
Value |
---|---|
Multiple Broker Module |
|
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.
Information |
Value |
---|---|
Multiple Broker Module |
|
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.
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.
Debian/Ubuntu¶
Disable ndo2db:
$ update-rc.d ndo2db disable
Remove ndo2db:
$ apt-get remove ndoutils-common