Restore of a Centreon poller

Restore process is divided in two main steps:

  • Re-install the Centreon poller following the installation documentation, option poller when installing. Do not forget to upgrade system.
  • Restore Centreon-Engine configuration files

SSH keys restore

This step is to restore the SSH key linked to user centreon and centreon-engine within a distributed environment. 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:

# cd /var/backup
# tar -xvf YYYY-MM-DD.tar.gz
# cd backup/ssh
# cd backup/pollers/nom_collecteur/ssh
# mkdir -p /var/spool/centreon/.ssh/
# chmod 700 /var/spool/centreon/.ssh/
# cp -p authorized_keys /var/spool/centreon/.ssh/

Connection test from central to poller:

# su - centreon
# ssh adresse_ip_poller

Answer “Yes” to the ask question. This is abour add poller print on the central server.

Note

You have to do this operations only if you work with a distributed environment.

Plugins restore

Plugins have been backuped in the archive: “YYYY-MM-DD.tar.gz.” 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.

On each poller, you have to do:

# cd /var/backup
# tar -xvf YYYY-MM-DD.tar.gz
# cd backup/plugins
# cd backup/pollers/nom_collecteur/plugins
# cp -pRf * /usr/lib/nagios/plugins

Init script restore

Some checkpoints of Oracle or SAP entail modifying the init script scheduler to add environment variables. If you changed the init script of your scheduler, you will have to restore it.

Extract the archive into a temporary directory and move the files according to their location:

# cd /var/backup
# tar -xvf YYYY-MM-DD.tar.gz
# cd backup/init_d_my_monitoring_engine/
# cp my_monitoring_engine /etc/init.d/my_monitoring_engine
# cd backup/pollers/my_poller/
# cp init_d_nom_moteur_supervision /etc/init.d/my_monitoring_engine

Note

my_monitoring_engine stands for your monitoring engine name. For example centengine for Centreon Engine or nagios for Nagios.

Monitoring agent restore

In case you’re using NRPE or NSCA agents, you have to reinstall and then restore configuration:

# cd /var/backup
# tar -xvf YYYY-MM-DD.tar.gz
# cd backup/etc
# cp  nrpe.cfg /etc/monitoring_engine/
# cp  nsca.cfg /etc/monitoring_engine/
# cd backup/pollers/nom_collecteur/etc
# cp  nrpe.cfg /etc/nom_nomteur/
# cp  nsca.cfg /etc/nom_nomteur/

Note

You have to do this only if you’re using the monitoring agents.

Note

monitoring_engine stands for your monitoring engine name. For example centreon-engine for Centreon Engine or nagios for Nagios.

Generate configuration files within centreon

Last step is to generate the Centreon-Engine configuration files within Centreon.

Installation of backup package

To perform installation of backup package please refer to Backup of a centreon poller.

The poller is now restored.