diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-23.04.json b/i18n/fr/docusaurus-plugin-content-docs/version-23.04.json index fee7fbbd89d2..903d24db7630 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-23.04.json +++ b/i18n/fr/docusaurus-plugin-content-docs/version-23.04.json @@ -290,5 +290,9 @@ "sidebar.docs.category.Upgrading Centreon HA": { "message": "Monter de version Centreon HA", "description": "The label for category Upgrading Centreon HA in sidebar docs" + }, + "sidebar.docs.category.Disaster recovery": { + "message": "Reprise après sinistre", + "description": "The label for category Disaster recovery in sidebar docs" } } diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-23.10.json b/i18n/fr/docusaurus-plugin-content-docs/version-23.10.json index ce750d816268..b623fc8a431b 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-23.10.json +++ b/i18n/fr/docusaurus-plugin-content-docs/version-23.10.json @@ -290,5 +290,9 @@ "sidebar.docs.category.Upgrading Centreon HA": { "message": "Monter de version Centreon HA", "description": "The label for category Upgrading Centreon HA in sidebar docs" + }, + "sidebar.docs.category.Disaster recovery": { + "message": "Reprise après sinistre", + "description": "The label for category Disaster recovery in sidebar docs" } } diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/backup-poller.md b/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/backup-poller.md new file mode 100644 index 000000000000..fcef3183afc5 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/backup-poller.md @@ -0,0 +1,58 @@ +--- +id: backup-poller +title: Sauvegarder et restaurer vos collecteurs +--- + +## Cas n°1 : Faire des sauvegardes pour pouvoir installer un nouveau collecteur à partir de zéro + +### Données à sauvegarder sur le collecteur actif + +> Dans cette section, nous partons du principe que [l'installation automatique des plugins Centreon](../monitoring/pluginpacks.md#installation-automatique) est activée. + +Sauvegardez les éléments suivants afin d'être en mesure de complètement reconstruire votre collecteur en cas de problème. + +- Plugins personnalisés (par exemple: plugins de la communauté, ou développements spécifiques) +- Si vous utilisez le connecteur **centreon-vmware-daemon** (installation et configuration): sauvegardez **/etc/centreon/centreon_vmware.pm** +- Si vous utilisez le connecteur **centreon-as400** (installation et configuration): sauvegardez **/etc/centreon-as400/** +- Synchronisez les fichiers suivants régulièrement (par exemple avec la commande **rsync**) : + - **/var/log/centreon-engine/retention.dat** (jusqu'à toutes les 15 minutes) pour garder les acquittements, les plages de maintenance et les statuts. + - **/var/lib/centreon/centplugins/\*** (jusqu'à toutes les 5 minutes) pour garder le cache des plugins. + - **/etc/centreon-gorgone/config.d/\*** (une seule fois) pour garder les informations de connexion au serveur central. + - **/var/lib/centreon-gorgone/.keys/\*** (une seule fois) pour garder l'empreinte pour l'authentification ZeroMQ. + +### Basculer vers le nouveau collecteur + +Si votre collecteur devient hors d'usage, [installez un nouveau collecteur](../installation/installation-of-a-poller/using-packages.md), dans la version correspondant à votre plateforme, rattachez-le au serveur central, puis restaurez tous les éléments listés ci-dessus. + +Si vous n'aviez pas sauvegardé le fichier **/var/lib/centreon-gorgone/.keys/\***, vous devrez changer l'empreinte du collecteur dans la configuration du serveur central. Voir [l'article suivant](https://thewatch.centreon.com/troubleshooting-41/poller-does-not-work-after-migration-or-reinstallation-fingerprint-changed-for-target-1177) sur notre plateforme communautaire The Watch. + +## Cas n°2: Collecteur de secours + +Une autre façon de se préparer à un problème est d'avoir un collecteur de secours sur lequel vous synchronisez les données de votre collecteur actif. Si votre collecteur devient hors d'usage, il vous suffira de basculer sur le collecteur de secours. + +### Données à synchroniser + +Installez et configurez les mêmes éléments sur votre collecteur de secours que sur votre collecteur actif, et synchronisez les données [comme décrit ici](#données-à-sauvegarder-sur-le-collecteur-actif). + +### Basculer vers le collecteur de secours + +1. Démarrez le collecteur de secours si celui-ci est arrêté. +2. Changez la configuration réseau du collecteur de secours afin de lui attribuer l'adresse IP de l'ancien collecteur. +3. Redémarrez **gorgoned** d'abord sur le collecteur, puis sur le central. + + ```shell + systemctl restart gorgoned + ``` + +4. Vérifiez que le log de Gorgone ne présente pas d'erreurs de communication. + + ```shell + tail -F /var/log/centreon-gorgone/gorgoned.log | grep ERROR + ``` + +5. [Déployez la configuration](../monitoring/monitoring-servers/deploying-a-configuration.md) pour le collecteur, en utilisant la méthode **Restart** (dans la liste **Redémarrer l'ordonnanceur**). +6. Si vous n'aviez pas sauvegardé le fichier **/var/lib/centreon-gorgone/.keys/\***, vous devrez changer l'empreinte du collecteur dans la configuration du serveur central. Voir [l'article suivant](https://thewatch.centreon.com/troubleshooting-41/poller-does-not-work-after-migration-or-reinstallation-fingerprint-changed-for-target-1177) sur notre plateforme communautaire The Watch. + +## Cas n°3 : Snapshots de machines virtuelles + +Si votre collecteur tourne sur une VM, faites des snapshots réguliers de votre collecteur. Si un problème survient, restaurez le snapshot comme pour n'importe quelle machine virtuelle. diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/backup.md b/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/backup.md index c7823033440f..44bbdc49d4b4 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/backup.md +++ b/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/backup.md @@ -1,6 +1,6 @@ --- id: backup -title: Sauvegarde +title: Sauvegarder et restaurer votre serveur central --- ## Fonctionnement diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/disaster-recovery.md b/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/disaster-recovery.md new file mode 100644 index 000000000000..4f1804b63a01 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/version-23.10/administration/disaster-recovery.md @@ -0,0 +1,10 @@ +--- +id: disaster-recovery +title: Reprise après sinistre +--- + +Pour que votre plateforme résiste aux pannes, assurez-vous que faire des sauvegardes, stockées sur un autre serveur. Vous pouvez : + +- faire des snapshots de vos VMs. +- faire des sauvegardes régulières de la configuration [de votre serveur central](backup.md) et [de vos collecteurs](backup-poller.md). +- [installer un collecteur de secours](backup-poller.md#cas-n°2-collecteur-de-secours) synchronisé avec votre collecteur actif, afin que le collecteur de secours puisse prendre le relais en cas de panne. diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-24.04.json b/i18n/fr/docusaurus-plugin-content-docs/version-24.04.json index 1a0eb9ff99a2..6d73de0051ee 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-24.04.json +++ b/i18n/fr/docusaurus-plugin-content-docs/version-24.04.json @@ -290,5 +290,9 @@ "sidebar.docs.category.Upgrading Centreon HA": { "message": "Monter de version Centreon HA", "description": "The label for category Upgrading Centreon HA in sidebar docs" + }, + "sidebar.docs.category.Disaster recovery": { + "message": "Reprise après sinistre", + "description": "The label for category Disaster recovery in sidebar docs" } } diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/backup-poller.md b/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/backup-poller.md new file mode 100644 index 000000000000..fcef3183afc5 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/backup-poller.md @@ -0,0 +1,58 @@ +--- +id: backup-poller +title: Sauvegarder et restaurer vos collecteurs +--- + +## Cas n°1 : Faire des sauvegardes pour pouvoir installer un nouveau collecteur à partir de zéro + +### Données à sauvegarder sur le collecteur actif + +> Dans cette section, nous partons du principe que [l'installation automatique des plugins Centreon](../monitoring/pluginpacks.md#installation-automatique) est activée. + +Sauvegardez les éléments suivants afin d'être en mesure de complètement reconstruire votre collecteur en cas de problème. + +- Plugins personnalisés (par exemple: plugins de la communauté, ou développements spécifiques) +- Si vous utilisez le connecteur **centreon-vmware-daemon** (installation et configuration): sauvegardez **/etc/centreon/centreon_vmware.pm** +- Si vous utilisez le connecteur **centreon-as400** (installation et configuration): sauvegardez **/etc/centreon-as400/** +- Synchronisez les fichiers suivants régulièrement (par exemple avec la commande **rsync**) : + - **/var/log/centreon-engine/retention.dat** (jusqu'à toutes les 15 minutes) pour garder les acquittements, les plages de maintenance et les statuts. + - **/var/lib/centreon/centplugins/\*** (jusqu'à toutes les 5 minutes) pour garder le cache des plugins. + - **/etc/centreon-gorgone/config.d/\*** (une seule fois) pour garder les informations de connexion au serveur central. + - **/var/lib/centreon-gorgone/.keys/\*** (une seule fois) pour garder l'empreinte pour l'authentification ZeroMQ. + +### Basculer vers le nouveau collecteur + +Si votre collecteur devient hors d'usage, [installez un nouveau collecteur](../installation/installation-of-a-poller/using-packages.md), dans la version correspondant à votre plateforme, rattachez-le au serveur central, puis restaurez tous les éléments listés ci-dessus. + +Si vous n'aviez pas sauvegardé le fichier **/var/lib/centreon-gorgone/.keys/\***, vous devrez changer l'empreinte du collecteur dans la configuration du serveur central. Voir [l'article suivant](https://thewatch.centreon.com/troubleshooting-41/poller-does-not-work-after-migration-or-reinstallation-fingerprint-changed-for-target-1177) sur notre plateforme communautaire The Watch. + +## Cas n°2: Collecteur de secours + +Une autre façon de se préparer à un problème est d'avoir un collecteur de secours sur lequel vous synchronisez les données de votre collecteur actif. Si votre collecteur devient hors d'usage, il vous suffira de basculer sur le collecteur de secours. + +### Données à synchroniser + +Installez et configurez les mêmes éléments sur votre collecteur de secours que sur votre collecteur actif, et synchronisez les données [comme décrit ici](#données-à-sauvegarder-sur-le-collecteur-actif). + +### Basculer vers le collecteur de secours + +1. Démarrez le collecteur de secours si celui-ci est arrêté. +2. Changez la configuration réseau du collecteur de secours afin de lui attribuer l'adresse IP de l'ancien collecteur. +3. Redémarrez **gorgoned** d'abord sur le collecteur, puis sur le central. + + ```shell + systemctl restart gorgoned + ``` + +4. Vérifiez que le log de Gorgone ne présente pas d'erreurs de communication. + + ```shell + tail -F /var/log/centreon-gorgone/gorgoned.log | grep ERROR + ``` + +5. [Déployez la configuration](../monitoring/monitoring-servers/deploying-a-configuration.md) pour le collecteur, en utilisant la méthode **Restart** (dans la liste **Redémarrer l'ordonnanceur**). +6. Si vous n'aviez pas sauvegardé le fichier **/var/lib/centreon-gorgone/.keys/\***, vous devrez changer l'empreinte du collecteur dans la configuration du serveur central. Voir [l'article suivant](https://thewatch.centreon.com/troubleshooting-41/poller-does-not-work-after-migration-or-reinstallation-fingerprint-changed-for-target-1177) sur notre plateforme communautaire The Watch. + +## Cas n°3 : Snapshots de machines virtuelles + +Si votre collecteur tourne sur une VM, faites des snapshots réguliers de votre collecteur. Si un problème survient, restaurez le snapshot comme pour n'importe quelle machine virtuelle. diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/backup.md b/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/backup.md index c7823033440f..44bbdc49d4b4 100644 --- a/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/backup.md +++ b/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/backup.md @@ -1,6 +1,6 @@ --- id: backup -title: Sauvegarde +title: Sauvegarder et restaurer votre serveur central --- ## Fonctionnement diff --git a/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/disaster-recovery.md b/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/disaster-recovery.md new file mode 100644 index 000000000000..4f1804b63a01 --- /dev/null +++ b/i18n/fr/docusaurus-plugin-content-docs/version-24.04/administration/disaster-recovery.md @@ -0,0 +1,10 @@ +--- +id: disaster-recovery +title: Reprise après sinistre +--- + +Pour que votre plateforme résiste aux pannes, assurez-vous que faire des sauvegardes, stockées sur un autre serveur. Vous pouvez : + +- faire des snapshots de vos VMs. +- faire des sauvegardes régulières de la configuration [de votre serveur central](backup.md) et [de vos collecteurs](backup-poller.md). +- [installer un collecteur de secours](backup-poller.md#cas-n°2-collecteur-de-secours) synchronisé avec votre collecteur actif, afin que le collecteur de secours puisse prendre le relais en cas de panne. diff --git a/versioned_docs/version-23.10/administration/backup-poller.md b/versioned_docs/version-23.10/administration/backup-poller.md new file mode 100644 index 000000000000..9f656ede41bb --- /dev/null +++ b/versioned_docs/version-23.10/administration/backup-poller.md @@ -0,0 +1,54 @@ +--- +id: backup-poller +title: Back up and restore your pollers +--- + +## Case n°1: Making backups to be able to install a new poller from scratch + +### What you need to back up on your active poller + +> In this list, we assume you have enabled the [automatic installation of the Centreon plugins](../monitoring/pluginpacks.md#automatic-installation). + +You need to back up the following elements to be able to rebuild your poller from scratch in case of a problem. + +- Custom plugins (example: community plugins, or custom developments) +- If you are using the **centreon-vmware-daemon** connector (installation and configuration): backup **/etc/centreon/centreon_vmware.pm** +- If you are using the **centreon-as400** connector (installation and configuration): backup **/etc/centreon-as400/** +- Synchronize the following files regularly (e.g. using the **rsync** command): + - **/var/log/centreon-engine/retention.dat** (up to every 15 minutes) to keep acknowledgements, downtimes and statuses. + - **/var/lib/centreon/centplugins/\*** (up to every 5 minutes) to keep the plugins cache. + - **/etc/centreon-gorgone/config.d/\*** (once) to keep the connection information to the central server. + - **/var/lib/centreon-gorgone/.keys/\*** (once) to keep the same fingerprint for ZeroMQ authentication. + +### Switching to the new poller + +If your poller has died, [install a new poller](../installation/installation-of-a-poller/using-packages.md), in the correct version for your platform, attach it to the central server, then restore all the elements listed above. + +If you didn't backup **/var/lib/centreon-gorgone/.keys/\***, you will need to change the poller's fingerprint in the configuration of the central server. Read [the following article](https://thewatch.centreon.com/troubleshooting-41/poller-does-not-work-after-migration-or-reinstallation-fingerprint-changed-for-target-1177) on our community platform The Watch. + +## Case n°2: "Standby" poller + +Another way to prepare for disaster is to have a "standby" poller on which you synchronize the data from your active poller. If your poller dies, just switch to the standby poller. + +### What you need to synchronize + +Install and configure the same elements on your standby poller as on your active poller, and synchronize your data [as described here](#what-you-need-to-back-up-on-your-active-poller). + +### How to switch to the standby poller + +1. Start the standby poller if it is stopped. +2. Change the new poller's network configuration to give it the old poller's IP address. +3. Restart **gorgoned** on the poller first, then on the central. + ```shell + systemctl restart gorgoned + ``` +4. Make sure there are no communication errors in Gorgone's log. + ```shell + tail -F /var/log/centreon-gorgone/gorgoned.log | grep ERROR + ``` +5. [Deploy the configuration](../monitoring/monitoring-servers/deploying-a-configuration.md) for the poller using the **Restart** method (in the **Restart Monitoring Engine** list). +6. If you didn't backup **/var/lib/centreon-gorgone/.keys/\***, you will need to change the poller's fingerprint in the cache of the central server. Read [the following article](https://thewatch.centreon.com/troubleshooting-41/poller-does-not-work-after-migration-or-reinstallation-fingerprint-changed-for-target-1177) on our community platform The Watch. + +## Case n°3: VM snapshots + +If your poller is running on a VM, take regular snapshots of your poller. In case a problem occurs, restore the snapshot as with any virtual machine. diff --git a/versioned_docs/version-23.10/administration/backup.md b/versioned_docs/version-23.10/administration/backup.md index b7e7f3577a00..bb2865838014 100644 --- a/versioned_docs/version-23.10/administration/backup.md +++ b/versioned_docs/version-23.10/administration/backup.md @@ -1,6 +1,6 @@ --- id: backup -title: Backup +title: Back up and restore your central server --- ## How it works @@ -16,7 +16,7 @@ The backup script is executed on a daily basis with a cron job located in 30 3 * * * root /usr/share/centreon/cron/centreon-backup.pl >> /var/log/centreon/centreon-backup.log 2&>1 ``` -Each day at 3:30 AM, the backup script checks if a backup is planned on the current day. +Each day at 3:30 AM, backup script checks if backup is planned on current day. ### Backup types @@ -29,10 +29,10 @@ Database backup will be processed on two databases: **centreon** and There are two kinds of database backup: - - MySQLdump: the mysqldump command is used to back up databases. Warning: - mysqldump can take a long time on large databases. - - LVM Snapshot: A binary copy of MariaDB files is done. You need to have a - specific LV for MariaDB (i.e. /var/lib/mysql) and 1 GB of space in its VG. + - MySQLdump: mysqldump command is used to backup databases. Be careful, + mysqldump can take long time on large databases. + - LVM Snapshot Binary copy of MariaDB files is done. You need to have a + specific LV for MariaDB (i.e. /var/lib/mysql) and 1GB of space in its VG. Backup filename format: @@ -41,7 +41,7 @@ Backup filename format: #### Configuration files backup -All the configuration files for the central server can be saved: MariaDB, Apache, PHP, +All configuration files of central server can be saved : MariaDB, Apache, PHP, SNMP, centreon, centreon-broker) Backup filename format: @@ -53,7 +53,7 @@ Backup filename format: This part covers the configuration of the backup. -1. Go to **Administration > Parameters > Backup**. +1. Go into the menu: **Administration > Parameters > Backup** The following window is displayed: @@ -77,19 +77,19 @@ The following window is displayed: - **Remote host** Remote host for SCP export - **Remote directory** Remote directory for SCP export -> **Temporary directory** cannot be a folder in the **Backup directory**. +> **Temporary directory** can not be a folder of **Backup directory**. -## Restoring the Centreon central server +## Restore of Centreon central server -The restoration process is divided into two main steps: +Restore process is divided in two main steps: - Re-install the Centreon platform following the installation documentation. - Remember to upgrade the system. - - Restore Centreon-Engine configuration files and Centreon databases + Do not forget to upgrade system. + - Restore Centreon-Engines configuration files and Centreon databases ### Configurations file restore -Before restoring the databases, you must first restore the configuration files: +Before databases restore, you have first to restore configuration files: ```shell cd /var/cache/centreon/backup/ @@ -100,10 +100,10 @@ cp -r * /etc/centreon/ ### Databases restore -Once the Centreon server is reinstalled (**same Centreon version**), unzip the **centreon** and the -**centreon\_storage** databases backup. +Once Centreon server reinstalled (**same Centreon version**), unzip centreon and +centreon\_storage databases backup. -Start by recreating the databases with the following commands: +Start by recreating databases with following commands: ```sql DROP DATABASE centreon; @@ -112,7 +112,7 @@ CREATE DATABASE centreon; CREATE DATABASE centreon_storage; ``` -Then unzip and load the database dumps into newly created databases: +Then unzip and load databases dumps into newly created databases: ```shell cd /var/cache/centreon/backup/ @@ -124,11 +124,11 @@ mysql centreon_storage < YYYY-MM-DD-centreon_storage.sql This may take a while due to the size of "centreon\_storage" databases. -> The password is stored in the previously restored configuration files. For example -> **$mysql\_passwd** field in the file "/etc/centreon/conf.pm". +> Password is stored in configuration files previously restored. For example +> **$mysql\_passwd** field in file "/etc/centreon/conf.pm". -> The default configuration does not define any password for the mysql root user. -> That's why we can connect to the database using just the "mysql" command. +> The default configuration does not define any password for mysql root user. +> That's why we can connect to database using only command "mysql". ### SSH keys restore @@ -157,7 +157,7 @@ ssh Answer "Yes" to the question. This is about adding the poller SSH fingerprint on the central server. -> You need to perform this operation only if you work with a distributed environment. +> You have to do this operations only if you work with a distributed environment. ### Plugins restore @@ -166,7 +166,7 @@ Restoration must be done manually. We must therefore initially extract this archive into a temporary directory and move the files one by one according to their location. -Proceed as follows on each poller: +On each poller, you have to do: ```shell cd /var/cache/centreon/backup/ @@ -191,7 +191,7 @@ cp init_d_centengine /etc/init.d/centengine ### Monitoring agent restore -If you are using NRPE or NSCA agents, you must reinstall and then restore the +In case you're using NRPE or NSCA agents, you have to reinstall and then restore configuration: ```shell @@ -202,20 +202,20 @@ cp nrpe.cfg /etc/centreon-engine/ cp nsca.cfg /etc/centreon-engine/ ``` -> You must do this only if you are using the monitoring agents. +> You have to do this only if you're using the monitoring agents. ### Generate Centreon-Engine configuration files within centreon -The last step is to generate the Centreon-Engine configuration files from -within the Centreon UI. +Last step is to generate the Centreon-Engine configuration files from +within Centreon UI. ### Graphs rebuild Once your monitoring platform is restored and all is doing well, you can rebuild RRD files in order to restore all performance graphs. -To rebuild performance graphs, go to `Administration > Parameters > -Data`. On this page, you must select all the services. Click the -**More actions...** drop-down menu and select the option **Rebuild RRD Database**. +To rebuild performance graphics, go to the menu `Administration > Parameters > +Data`. On this page, you must select all the services, click the drop-down +menu **More actions...** and select the option **Rebuild RRD Database**. **Your server is now restored.** diff --git a/versioned_docs/version-23.10/administration/disaster-recovery.md b/versioned_docs/version-23.10/administration/disaster-recovery.md new file mode 100644 index 000000000000..dd7db99accca --- /dev/null +++ b/versioned_docs/version-23.10/administration/disaster-recovery.md @@ -0,0 +1,10 @@ +--- +id: disaster-recovery +title: Disaster recovery +--- + +For your platform to be resilient to failure, make sure you have backups stored on another server. You can: + +- make snapshots of your VMs. +- back up the configuration [of your central server](backup.md) and [of your pollers](backup-poller.md) regularly. +- [set up a "standby poller"](backup-poller.md#standby-poller) that you sync with your poller so that it can take over in case of a crash. diff --git a/versioned_docs/version-24.04/administration/backup-poller.md b/versioned_docs/version-24.04/administration/backup-poller.md new file mode 100644 index 000000000000..9f656ede41bb --- /dev/null +++ b/versioned_docs/version-24.04/administration/backup-poller.md @@ -0,0 +1,54 @@ +--- +id: backup-poller +title: Back up and restore your pollers +--- + +## Case n°1: Making backups to be able to install a new poller from scratch + +### What you need to back up on your active poller + +> In this list, we assume you have enabled the [automatic installation of the Centreon plugins](../monitoring/pluginpacks.md#automatic-installation). + +You need to back up the following elements to be able to rebuild your poller from scratch in case of a problem. + +- Custom plugins (example: community plugins, or custom developments) +- If you are using the **centreon-vmware-daemon** connector (installation and configuration): backup **/etc/centreon/centreon_vmware.pm** +- If you are using the **centreon-as400** connector (installation and configuration): backup **/etc/centreon-as400/** +- Synchronize the following files regularly (e.g. using the **rsync** command): + - **/var/log/centreon-engine/retention.dat** (up to every 15 minutes) to keep acknowledgements, downtimes and statuses. + - **/var/lib/centreon/centplugins/\*** (up to every 5 minutes) to keep the plugins cache. + - **/etc/centreon-gorgone/config.d/\*** (once) to keep the connection information to the central server. + - **/var/lib/centreon-gorgone/.keys/\*** (once) to keep the same fingerprint for ZeroMQ authentication. + +### Switching to the new poller + +If your poller has died, [install a new poller](../installation/installation-of-a-poller/using-packages.md), in the correct version for your platform, attach it to the central server, then restore all the elements listed above. + +If you didn't backup **/var/lib/centreon-gorgone/.keys/\***, you will need to change the poller's fingerprint in the configuration of the central server. Read [the following article](https://thewatch.centreon.com/troubleshooting-41/poller-does-not-work-after-migration-or-reinstallation-fingerprint-changed-for-target-1177) on our community platform The Watch. + +## Case n°2: "Standby" poller + +Another way to prepare for disaster is to have a "standby" poller on which you synchronize the data from your active poller. If your poller dies, just switch to the standby poller. + +### What you need to synchronize + +Install and configure the same elements on your standby poller as on your active poller, and synchronize your data [as described here](#what-you-need-to-back-up-on-your-active-poller). + +### How to switch to the standby poller + +1. Start the standby poller if it is stopped. +2. Change the new poller's network configuration to give it the old poller's IP address. +3. Restart **gorgoned** on the poller first, then on the central. + ```shell + systemctl restart gorgoned + ``` +4. Make sure there are no communication errors in Gorgone's log. + ```shell + tail -F /var/log/centreon-gorgone/gorgoned.log | grep ERROR + ``` +5. [Deploy the configuration](../monitoring/monitoring-servers/deploying-a-configuration.md) for the poller using the **Restart** method (in the **Restart Monitoring Engine** list). +6. If you didn't backup **/var/lib/centreon-gorgone/.keys/\***, you will need to change the poller's fingerprint in the cache of the central server. Read [the following article](https://thewatch.centreon.com/troubleshooting-41/poller-does-not-work-after-migration-or-reinstallation-fingerprint-changed-for-target-1177) on our community platform The Watch. + +## Case n°3: VM snapshots + +If your poller is running on a VM, take regular snapshots of your poller. In case a problem occurs, restore the snapshot as with any virtual machine. diff --git a/versioned_docs/version-24.04/administration/backup.md b/versioned_docs/version-24.04/administration/backup.md index b7e7f3577a00..bb2865838014 100644 --- a/versioned_docs/version-24.04/administration/backup.md +++ b/versioned_docs/version-24.04/administration/backup.md @@ -1,6 +1,6 @@ --- id: backup -title: Backup +title: Back up and restore your central server --- ## How it works @@ -16,7 +16,7 @@ The backup script is executed on a daily basis with a cron job located in 30 3 * * * root /usr/share/centreon/cron/centreon-backup.pl >> /var/log/centreon/centreon-backup.log 2&>1 ``` -Each day at 3:30 AM, the backup script checks if a backup is planned on the current day. +Each day at 3:30 AM, backup script checks if backup is planned on current day. ### Backup types @@ -29,10 +29,10 @@ Database backup will be processed on two databases: **centreon** and There are two kinds of database backup: - - MySQLdump: the mysqldump command is used to back up databases. Warning: - mysqldump can take a long time on large databases. - - LVM Snapshot: A binary copy of MariaDB files is done. You need to have a - specific LV for MariaDB (i.e. /var/lib/mysql) and 1 GB of space in its VG. + - MySQLdump: mysqldump command is used to backup databases. Be careful, + mysqldump can take long time on large databases. + - LVM Snapshot Binary copy of MariaDB files is done. You need to have a + specific LV for MariaDB (i.e. /var/lib/mysql) and 1GB of space in its VG. Backup filename format: @@ -41,7 +41,7 @@ Backup filename format: #### Configuration files backup -All the configuration files for the central server can be saved: MariaDB, Apache, PHP, +All configuration files of central server can be saved : MariaDB, Apache, PHP, SNMP, centreon, centreon-broker) Backup filename format: @@ -53,7 +53,7 @@ Backup filename format: This part covers the configuration of the backup. -1. Go to **Administration > Parameters > Backup**. +1. Go into the menu: **Administration > Parameters > Backup** The following window is displayed: @@ -77,19 +77,19 @@ The following window is displayed: - **Remote host** Remote host for SCP export - **Remote directory** Remote directory for SCP export -> **Temporary directory** cannot be a folder in the **Backup directory**. +> **Temporary directory** can not be a folder of **Backup directory**. -## Restoring the Centreon central server +## Restore of Centreon central server -The restoration process is divided into two main steps: +Restore process is divided in two main steps: - Re-install the Centreon platform following the installation documentation. - Remember to upgrade the system. - - Restore Centreon-Engine configuration files and Centreon databases + Do not forget to upgrade system. + - Restore Centreon-Engines configuration files and Centreon databases ### Configurations file restore -Before restoring the databases, you must first restore the configuration files: +Before databases restore, you have first to restore configuration files: ```shell cd /var/cache/centreon/backup/ @@ -100,10 +100,10 @@ cp -r * /etc/centreon/ ### Databases restore -Once the Centreon server is reinstalled (**same Centreon version**), unzip the **centreon** and the -**centreon\_storage** databases backup. +Once Centreon server reinstalled (**same Centreon version**), unzip centreon and +centreon\_storage databases backup. -Start by recreating the databases with the following commands: +Start by recreating databases with following commands: ```sql DROP DATABASE centreon; @@ -112,7 +112,7 @@ CREATE DATABASE centreon; CREATE DATABASE centreon_storage; ``` -Then unzip and load the database dumps into newly created databases: +Then unzip and load databases dumps into newly created databases: ```shell cd /var/cache/centreon/backup/ @@ -124,11 +124,11 @@ mysql centreon_storage < YYYY-MM-DD-centreon_storage.sql This may take a while due to the size of "centreon\_storage" databases. -> The password is stored in the previously restored configuration files. For example -> **$mysql\_passwd** field in the file "/etc/centreon/conf.pm". +> Password is stored in configuration files previously restored. For example +> **$mysql\_passwd** field in file "/etc/centreon/conf.pm". -> The default configuration does not define any password for the mysql root user. -> That's why we can connect to the database using just the "mysql" command. +> The default configuration does not define any password for mysql root user. +> That's why we can connect to database using only command "mysql". ### SSH keys restore @@ -157,7 +157,7 @@ ssh Answer "Yes" to the question. This is about adding the poller SSH fingerprint on the central server. -> You need to perform this operation only if you work with a distributed environment. +> You have to do this operations only if you work with a distributed environment. ### Plugins restore @@ -166,7 +166,7 @@ Restoration must be done manually. We must therefore initially extract this archive into a temporary directory and move the files one by one according to their location. -Proceed as follows on each poller: +On each poller, you have to do: ```shell cd /var/cache/centreon/backup/ @@ -191,7 +191,7 @@ cp init_d_centengine /etc/init.d/centengine ### Monitoring agent restore -If you are using NRPE or NSCA agents, you must reinstall and then restore the +In case you're using NRPE or NSCA agents, you have to reinstall and then restore configuration: ```shell @@ -202,20 +202,20 @@ cp nrpe.cfg /etc/centreon-engine/ cp nsca.cfg /etc/centreon-engine/ ``` -> You must do this only if you are using the monitoring agents. +> You have to do this only if you're using the monitoring agents. ### Generate Centreon-Engine configuration files within centreon -The last step is to generate the Centreon-Engine configuration files from -within the Centreon UI. +Last step is to generate the Centreon-Engine configuration files from +within Centreon UI. ### Graphs rebuild Once your monitoring platform is restored and all is doing well, you can rebuild RRD files in order to restore all performance graphs. -To rebuild performance graphs, go to `Administration > Parameters > -Data`. On this page, you must select all the services. Click the -**More actions...** drop-down menu and select the option **Rebuild RRD Database**. +To rebuild performance graphics, go to the menu `Administration > Parameters > +Data`. On this page, you must select all the services, click the drop-down +menu **More actions...** and select the option **Rebuild RRD Database**. **Your server is now restored.** diff --git a/versioned_docs/version-24.04/administration/disaster-recovery.md b/versioned_docs/version-24.04/administration/disaster-recovery.md new file mode 100644 index 000000000000..dd7db99accca --- /dev/null +++ b/versioned_docs/version-24.04/administration/disaster-recovery.md @@ -0,0 +1,10 @@ +--- +id: disaster-recovery +title: Disaster recovery +--- + +For your platform to be resilient to failure, make sure you have backups stored on another server. You can: + +- make snapshots of your VMs. +- back up the configuration [of your central server](backup.md) and [of your pollers](backup-poller.md) regularly. +- [set up a "standby poller"](backup-poller.md#standby-poller) that you sync with your poller so that it can take over in case of a crash. diff --git a/versioned_sidebars/version-23.10-sidebars.json b/versioned_sidebars/version-23.10-sidebars.json index be52ba9c3b5a..7af20434028f 100644 --- a/versioned_sidebars/version-23.10-sidebars.json +++ b/versioned_sidebars/version-23.10-sidebars.json @@ -900,8 +900,22 @@ "id": "version-23.10/administration/database-partitioning" }, { - "type": "doc", - "id": "version-23.10/administration/backup" + "type": "category", + "label": "Disaster recovery", + "link": { + "type": "doc", + "id": "administration/disaster-recovery" + }, + "items": [ + { + "type": "doc", + "id": "version-23.10/administration/backup" + }, + { + "type": "doc", + "id": "version-23.10/administration/backup-poller" + } + ] }, { "type": "doc", diff --git a/versioned_sidebars/version-24.04-sidebars.json b/versioned_sidebars/version-24.04-sidebars.json index 921692787d56..74d2a3aec567 100644 --- a/versioned_sidebars/version-24.04-sidebars.json +++ b/versioned_sidebars/version-24.04-sidebars.json @@ -900,8 +900,22 @@ "id": "version-24.04/administration/database-partitioning" }, { - "type": "doc", - "id": "version-24.04/administration/backup" + "type": "category", + "label": "Disaster recovery", + "link": { + "type": "doc", + "id": "administration/disaster-recovery" + }, + "items": [ + { + "type": "doc", + "id": "version-24.04/administration/backup" + }, + { + "type": "doc", + "id": "version-24.04/administration/backup-poller" + } + ] }, { "type": "doc",