This topic is no longer relevant, please follow the official documentation
Installing a poller from packages on Debian 11 using Centreon 21.10
Pre-installation steps
Server name
If you want, you can change the server's name using the following command:
sudo hostnamectl set-hostname <new-server-name>
Replace <new-server-name> by the name you want. Example:
sudo hostnamectl set-hostname poller1
Install the repositories
To install Centreon software from the repository, you should first install the centreon-release package, which will provide the repository file.
1. Install curl and gnugp2:
sudo apt-get update && sudo apt-get install wget gnupg2
2. Run the following command with a privileged user:
su -
echo 'deb https://apt.centreon.com/repository/centreon-bullseye/ bullseye main' > /etc/apt/sources.list.d/centreon.list
exit
3. Download the GPG Key:
sudo wget -O- https://apt-key.centreon.com | gpg --dearmor | tee /etc/apt/trusted.gpg.d/centreon.gpg
4. Update the list of Debian packages:
sudo apt update
Installation
1. To install the monitoring engine, run the command:
sudo apt-get install centreon-broker centreon-broker-cbmod centreon-broker-core centreon-clib centreon-common centreon-connector centreon-connector-perl centreon-connector-ssh centreon-engine centreon-engine-extcommands centreon-gorgone centreon-perl-libs libzmq-constants-perl zmq-libzmq4-perl
2. To make services start automatically during system bootup, run the following command:
sudo systemctl enable centreon centengine
3. (temporary) Create missing sudoers:
su -
vim /etc/sudoers.d/centreon
Then copy the following lines:
## BEGIN: CENTREON SUDO
User_Alias CENTREON=%centreon
Defaults:CENTREON !requiretty
# centreontrapd
CENTREON ALL = NOPASSWD: /sbin/service centreontrapd start
CENTREON ALL = NOPASSWD: /sbin/service centreontrapd stop
CENTREON ALL = NOPASSWD: /sbin/service centreontrapd restart
CENTREON ALL = NOPASSWD: /sbin/service centreontrapd reload
CENTREON ALL = NOPASSWD: /usr/sbin/service centreontrapd start
CENTREON ALL = NOPASSWD: /usr/sbin/service centreontrapd stop
CENTREON ALL = NOPASSWD: /usr/sbin/service centreontrapd restart
CENTREON ALL = NOPASSWD: /usr/sbin/service centreontrapd reload
# Centreon Engine
CENTREON ALL = NOPASSWD: /sbin/service centengine start
CENTREON ALL = NOPASSWD: /sbin/service centengine stop
CENTREON ALL = NOPASSWD: /sbin/service centengine restart
CENTREON ALL = NOPASSWD: /sbin/service centengine reload
CENTREON ALL = NOPASSWD: /usr/sbin/service centengine start
CENTREON ALL = NOPASSWD: /usr/sbin/service centengine stop
CENTREON ALL = NOPASSWD: /usr/sbin/service centengine restart
CENTREON ALL = NOPASSWD: /usr/sbin/service centengine reload
CENTREON ALL = NOPASSWD: /bin/systemctl start centengine
CENTREON ALL = NOPASSWD: /bin/systemctl stop centengine
CENTREON ALL = NOPASSWD: /bin/systemctl restart centengine
CENTREON ALL = NOPASSWD: /bin/systemctl reload centengine
CENTREON ALL = NOPASSWD: /usr/bin/systemctl start centengine
CENTREON ALL = NOPASSWD: /usr/bin/systemctl stop centengine
CENTREON ALL = NOPASSWD: /usr/bin/systemctl restart centengine
CENTREON ALL = NOPASSWD: /usr/bin/systemctl reload centengine
# Centreon Broker
CENTREON ALL = NOPASSWD: /sbin/service cbd start
CENTREON ALL = NOPASSWD: /sbin/service cbd stop
CENTREON ALL = NOPASSWD: /sbin/service cbd restart
CENTREON ALL = NOPASSWD: /sbin/service cbd reload
CENTREON ALL = NOPASSWD: /usr/sbin/service cbd start
CENTREON ALL = NOPASSWD: /usr/sbin/service cbd stop
CENTREON ALL = NOPASSWD: /usr/sbin/service cbd restart
CENTREON ALL = NOPASSWD: /usr/sbin/service cbd reload
CENTREON ALL = NOPASSWD: /bin/systemctl start cbd
CENTREON ALL = NOPASSWD: /bin/systemctl stop cbd
CENTREON ALL = NOPASSWD: /bin/systemctl restart cbd
CENTREON ALL = NOPASSWD: /bin/systemctl reload cbd
CENTREON ALL = NOPASSWD: /usr/bin/systemctl start cbd
CENTREON ALL = NOPASSWD: /usr/bin/systemctl stop cbd
CENTREON ALL = NOPASSWD: /usr/bin/systemctl restart cbd
CENTREON ALL = NOPASSWD: /usr/bin/systemctl reload cbd
## END: CENTREON SUDO
Save and quit root user:
exit
4. (temporary) Apply missing rights:
sudo chown -R centreon-engine:centreon-gorgone /etc/centreon-engine/
sudo chmod -R g+w /etc/centreon-engine/
sudo chown -R centreon-broker:centreon-gorgone /etc/centreon-broker/
sudo chmod -R g+w /etc/centreon-broker/
sudo chown -R centreon:centreon /var/cache/centreon
sudo chmod -R g+w /var/cache/centreon
5. Restart Centreon Engine:
sudo systemctl restart centengine gorgoned
6. Then Add a Poller to configuration by selecting Add a Centreon Poller then Create new Poller from the Centreon official documentation.
Don’t forget to install any Centreon Plugins you need, using:
sudo apt-get install centreon-plugin-<plugin_name>