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
-
First, update your operating system with the following command:
apt update && apt upgrade
-
If your firewall is active, temporarily disable it for the installation:
systemctl stop firewalld && systemctl disable firewalld
-
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
-
Install the dependencies required for the poller installation:
apt update && apt install lsb-release ca-certificates apt-transport-https software-properties-common wget gnupg2
-
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
-
Update your package list:
apt update
-
Install the Centreon poller:
apt install -y centreon-Poller
-
Enable services to start automatically:
systemctl enable centreon centengine centreontrapd snmptrapd
-
Start passive monitoring:
systemctl start centreontrapd snmptrapd
-
Restart the Centreon engine:
systemctl restart centengine
-
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.
- 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 usingapt
). - 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/orpip
for Python.
Avoid usingcpan
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.