Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
enh(doc): Update upgradetoCentreon18.10.rst (#6934)
Browse files Browse the repository at this point in the history
Update FR & EN chapter to manage MySQL migration from Centreon 3.4.x to Centreon 18.10.x
  • Loading branch information
Pilow974 authored and lpinsivy committed Mar 6, 2019
1 parent c07e2b9 commit 9cdaf21
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 2 deletions.
52 changes: 50 additions & 2 deletions doc/en/migration/upgradetoCentreon18.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,37 @@ Connect to your old Centreon server and synchronize following directories::
.. note::
Replace **IP_New_Centreon** by the IP or the new Centreon server.

If your DBMS is installed on the same server as the Centreon central server, run the
following commands:
.. warning::
In case of migration from CES 3.4.x, Centreon-web 2.8.x under CentOS 6 with MariaDB 5.X, do not sync folders /var/lib/mysql with RSYNC toward Centreon 18.10 / MariaDB 10.1.

#. Dump source databases
# mysqldump -u root -p centreon > /tmp/export/centreon.sql
# mysqldump -u root -p centreon_storage > /tmp/export/centreon_storage.sql

#. Stop source MariaDB server
# service mysql stop

#. Export the dumps to the new Centreon 18.10 database server (make sure you have enough space for large databases dumps)
# rsync -avz /tmp/centreon.sql root@IP_New_Centreon:/tmp/
# rsync -avz /tmp/centreon_storage.sql root@IP_New_Centreon:/tmp/

#. On the Centreon 18.10 database server, drop the original databases and re create them
# mysql -u root -p
# drop database centreon;
# drop database centreon_storage;
# create database centreon;
# create database centreon_storage;

#. Import the previously transfered dumps
# mysql -u root centreon -p </tmp/centreon.sql
# mysql -u root centreon_storage -p </tmp/centreon_storage.sql

#. Upgrade the tables
# mysql_upgrade

#. Keep going with the migration

If your DBMS is installed on the same server as the Centreon central server, execute the following commands:

#. Stop **mysqld** on both Centreon servers: ::

Expand Down Expand Up @@ -97,6 +126,22 @@ installation. The main directories to synchronize are:
.. note::
To run the plugins, you must first install the required dependencies.

.. note::
If you still have distant centreon-engine 1.8.1 pollers that you want to postpone the upgrade to v18.10, be aware that centreon-web 18.10 resource $USER1$ actually points to /usr/lib64/nagios/plugins

To do on the 1.8.1 pollers to mitigate the issue :

# mv /usr/lib64/nagios/plugins/* /usr/lib/nagios/plugins/
# rmdir /usr/lib64/nagios/plugins/
# ln -s -t /usr/lib64/nagios/ /usr/lib/nagios/plugins/

You now have a symbolic link as :
# ls -alt /usr/lib64/nagios/
lrwxrwxrwx 1 root root 24 1 nov. 17:59 plugins -> /usr/lib/nagios/plugins/
-rwxr-xr-x 1 root root 1711288 6 avril 2018 cbmod.so

You can now push poller configuration from Centreon 18.10 whether the distant poller is centreon-engine 18.10 or 1.8.1

Upgrading Centreon
==================

Expand All @@ -107,6 +152,9 @@ the **/usr/share/centreon/www/install** directory: ::
# cd /usr/share/centreon/installDir/
# mv install-18.10.0-YYYYMMDD_HHMMSS/ ../www/install/

.. note::
If you use the same IP address or same DNS name between old Centreon webserver and the new one, do a full cache cleanup of your browser to avoid JS issues

Go to http://[New_Centreon_IP]/centreon URL and perform the
upgrade.

Expand Down
50 changes: 50 additions & 0 deletions doc/fr/migration/upgradetoCentreon18.10.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,37 @@ suivants : ::
.. note::
Remplacez **IP_New_Centreon** par l'adresse IP de votre nouveau serveur Centreon.

.. warning::
En cas de migration d'une plate-forme CES 3.4.1, Centreon-web 2.8.26 sous CentOS 6 avec MariaDB 5.X, ne pas synchroniser les dossiers /var/lib/mysql avec RSYNC vers la database Centreon 18.10 en MariaDB 10.1.

#. Faire un dump des bases de données sources
# mysqldump -u root -p centreon > /tmp/export/centreon.sql
# mysqldump -u root -p centreon_storage > /tmp/export/centreon_storage.sql

#. Arreter le serveur MariaDB source
# service mysql stop

#. Transférer les exports vers le nouveau serveur de base de données Centreon 18.10
# rsync -avz /tmp/centreon.sql root@IP_New_Centreon:/tmp/
# rsync -avz /tmp/centreon_storage.sql root@IP_New_Centreon:/tmp/

#. Sur le serveur de base de données Centreon 18.10 supprimer les bases de données vierges et les recréer
# mysql -u root -p
# drop database centreon;
# drop database centreon_storage;
# create database centreon;
# create database centreon_storage;

#. Importer les dumps
# mysql -u root centreon -p </tmp/centreon.sql
# mysql -u root centreon_storage -p </tmp/centreon_storage.sql

#. Executer l'upgrade des tables
# mysql_upgrade

#. Reprendre la procédure de migration


Si le SGBD MySQL/MariaDB est installé sur même serveur que le serveur Centreon,
exécutez les commandes suivantes :

Expand Down Expand Up @@ -103,6 +134,22 @@ dépend de votre installation. Les principaux répertoires à synchroniser sont
Il est important d'installer les dépendances nécessaires au fonctionnement
des sondes de supervision.

.. note::
Si vous avez des pollers en centreon engine 1.8.1 que vous comptez migrer plus tard en centreon engine 18.10, attention au dossier des plugins nagios. La ressource $USER1$ ce Centreon 18.10 pointe sur /usr/lib64/nagios/plugins

A éxécuter sur vos collecteurs en centreon-engine 1.8.1 :

# mv /usr/lib64/nagios/plugins/* /usr/lib/nagios/plugins/
# rmdir /usr/lib64/nagios/plugins/
# ln -s -t /usr/lib64/nagios/ /usr/lib/nagios/plugins/

De cette façon un lien symbolique est créé :
# ls -alt /usr/lib64/nagios/
lrwxrwxrwx 1 root root 24 1 nov. 17:59 plugins -> /usr/lib/nagios/plugins/
-rwxr-xr-x 1 root root 1711288 6 avril 2018 cbmod.so

Et vous permet de pousser les configuration de collecteur depuis Centreon 18.10 indifféremment vers un collecteur en 18.10 ou 1.8.1

Mise à jour de la suite Centreon
================================

Expand All @@ -113,6 +160,9 @@ repértoire **/usr/share/centreon/www/install** : ::
# cd /usr/share/centreon/installDir/
# mv install-18.10.0-YYYYMMDD_HHMMSS/ ../www/install/

.. note::
Si vous utilisez la meme adresse IP ou le même nom DNS entre l'ancien serveur web Centreon et le nouveau, videz completement le cache de votre navigateur pour éviter des problemes de scripts JS.

Se connecter à l'url http://[ADRESSE_IP_DE_VOTRE_SERVEUR]/centreon et suivre
les étapes de mise à jour.

Expand Down

0 comments on commit 9cdaf21

Please sign in to comment.