how-to

How to migrate a poller from CentOS 7 to Debian 11

  • 16 October 2023
  • 0 replies
  • 455 views

Userlevel 2
Badge +3

This article explains how to transfer a poller:

  • from a server in Centos 7
  • to a server in Debian 11.

This implies that you install a new poller on your Debian 11 server and then migrate the configuration of the initial poller, which was in Centos 7.

 

Installing the new poller on your Debian 11 server

  1. First, update your operating system with the following command:

    apt update && apt upgrade

  2. If your firewall is active, temporarily disable it for the installation:

    systemctl stop firewalld && systemctl disable firewalld
  3. Set the server's hostname with the following command, replacing "new-server-name" with the name you want to use: 
    hostnamectl set-hostname new-server-name

  4. Install the dependencies required for the poller installation:

    apt update && apt install lsb-release ca-certificates apt-transport-https software-properties-common wget gnupg2

  5. Add the Centreon repository:

    wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg > /dev/null 2>&1

  6. Update your package list:

    apt update

  7. Install the Centreon poller:

    apt install -y centreon-Poller

  8. Enable services to start automatically:

    systemctl enable centreon centengine centreontrapd snmptrapd

  9. Start passive monitoring:

    systemctl start centreontrapd snmptrapd

  10. Restart the Centreon engine:

    systemctl restart centengine

  11. Register the server, replacing <API_ACCOUNT>, <IP_TARGET_NODE>, and <POLLER_NAME> with the appropriate values:

    /usr/share/centreon/bin/registerServerTopology.sh -u <API_ACCOUNT> -t Poller -h <IP_TARGET_NODE> -n <POLLER_NAME>

    Make sure to enter the password for <IP_TARGET_NODE> when prompted.

    The poller is installed but now you need to add it to the configuration.

  12. Follow this procedure to add the poller to the configuration.

 

Migrating the Centos 7 configuration

  • Do not forget to synchronize plugins from /usr/lib/nagios/plugins/ and /usr/lib/centreon/plugins/ to the new poller (most of the time, those are Nagios plugins, you should install them using apt).
  • If they are Centreon plugins, install them.
  • If they are custom plugins, copy them to the new poller.

    Keep in mind that Python and Perl scripts may require dependencies that you will need to install using apt and/or pip for Python.
    Avoid using cpan for Perl scripts because it may conflict with Centreon plugins.

  • Additionally, to prevent the loss of crucial information such as acknowledgments, downtimes, and status, make sure to copy the following files from the original poller to the new poller:
    • Acknowledgments and downtimes file: /var/log/centreon-engine/retention.dat (ensure that centengine is stopped to have up to date data).
    • Status file: /var/log/centreon-engine/status.dat (ensure that centengine is running to access this file).

 

Now you have successfully installed the Centreon poller on your Debian 11 server and considered important information to maintain consistency in your Centreon configuration.


0 replies

Be the first to reply!

Reply