

Install Centreon Monitoring Tool on CentOS 8 | Rocky Linux 8
source link: https://computingforgeeks.com/install-centreon-monitoring-tool-on-centos-rocky-linux/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Monitoring is a key component of Infrastructure and Applications management, be it on-premise or in Cloud setups. There is a large pool of tools that you can choose from when making a decision on what to adopt in your Infrastructure. The core framework of Centreon platform is released under GPLv2 and Apache Open Source licenses. In our article today we will install Centreon Open Source project on CentOS 8 | Rocky Linux 8 systems. Centreon project was started in 2005 and is now used by over 200,000 IT Professionals all over the world.
Some key features of Centreon monitoring tool are:
- Open-Source flexibility – The software licensing gives you flexibility to innovate around it.
- Unmatched monitoring scope – Through its extensive set of monitoring components and features
- Robust Plugin Library – With over 450 plugins to give you exhaustive visibility on your entire IT infrastructure.
- Custom Dashboards – Flexibility of creating custom monitoring dashboards
- Efficient Event Management – Easy to track flow of events
- Scalable & HA – Support for HA design and implementation
- Role-Based Access Control – You can freely limit access to the tool for users and groups.
- Seamless Integrations – Ease of integration with third party solutions and platforms
- Distributed Monitoring & Operations
Our installation guide adopts the simplest architecture with all oversight entities running within the same server, ie:
- Centreon web interface – Powered by Apache web server
- Databases (MySQL + RRD) – Store Centreon configuration parameters as well as monitoring and performance data
- Monitoring Engine – This is for data collection
- Broker – Centreon Broker SQL allows to store information into MariaDB databases and forward them to Centreon Broker RRD
The Centreon Broker RRD generates and updates RRD files with data in order to display performance graphs.
Below are steps to be followed when installing Centreon on CentOS 8 | Rocky Linux 8.
Step 1: Update System and Configure NTP
We begin the installation by upgrading all the packages in the system to the latest releases:
sudo yum -y update
Define the server name using following command. Replace centreon.computingforgeeks.com with your correct dns name to be used.
hostnamectl set-hostname centreon.computingforgeeks.com
Install chrony ntp package on the system by running the command below.
sudo yum -y install chrony
Set correct timezone on the server using timedatectl command. You can list timezone data on your system on the directory /usr/share/zoneinfo/:
sudo timedatectl set-timezone Africa/Nairobi
Then start and enable chronyd service:
sudo systemctl enable chronyd
sudo systemctl restart chronyd
Synchronize time on the system:
sudo timedatectl set-ntp yes
sudo timedatectl set-local-rtc 0
sudo chronyc sources
Current date and time configured can be checked with the command:
$ timedatectl
Step 2: Install MariaDB database and PHP
Enable EPEL and PowerTools repositories:
sudo dnf -y install dnf-plugins-core epel-release
sudo dnf config-manager --set-enabled powertools
Install PHP and other extensions
Install PHP and required modules:
sudo dnf module reset -y php
sudo dnf -y install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
sudo dnf module install php:remi-7.4 -y
sudo dnf -y install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json php-opcache php-ioncube-loader
Check PHP version using the command below
$ php --version
PHP 7.4.22 (cli) (built: Jul 27 2021 18:08:31) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.22, Copyright (c), by Zend Technologies
Set PHP time zone:
echo "date.timezone = Africa/Nairobi" | sudo tee -a /etc/php.d/50-centreon.ini
Adjust PHP script execution timeout
$ sudo vim /etc/php.ini
max_execution_time = 300
max_input_time = 300
Restart the PHP-FPM service after saving the file:
sudo systemctl restart php-fpm
Enable php-fpm service to start automatically during system bootup:
sudo systemctl enable php-fpm
Install MariaDB Database server
MariaDB packages are distributed as an AppStream module but you can also use official MariaDB repository.
sudo dnf -y install @mariadb:10.5
Start and enable mariadb service:
sudo systemctl enable --now mariadb
Set root password and remove test user
$ sudo mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user. If you've just installed MariaDB, and
haven't set the root password yet, you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password or using the unix_socket ensures that nobody
can log into the MariaDB root user without the proper authorisation.
You already have your root account protected, so you can safely answer 'n'.
Switch to unix_socket authentication [Y/n] y
Enabled successfully!
Reloading privilege tables..
... Success!
You already have your root account protected, so you can safely answer 'n'.
Change the root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y
... Success!
Cleaning up...
All done! If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!
Test connection as root user
$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.5.9-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> quit
Bye
Step 3: Install Centreon Packages
Add Centreon repository
sudo dnf install -y http://yum.centreon.com/standard/21.04/el8/stable/noarch/RPMS/centreon-release-21.04-4.el8.noarch.rpm
Install Centreon packages on CentOS 8 | Rocky Linux 8:
sudo dnf install centreon centreon-database
Continue with the installation as required:
Enabling module streams:
perl-DBD-SQLite 1.58
perl-YAML 1.24
Transaction Summary
==================================================================================================================================================================
Install 297 Packages
Total download size: 58 M
Installed size: 201 M
Is this ok [y/N]: y
The package centreon-database installs an optimized MariaDB configuration to be used with Centreon:
$ cat /etc/systemd/system/mariadb.service.d/centreon.conf
[Service]
LimitNOFILE=32000
$ cat /etc/my.cnf.d/centreon.cnf
This requires a restart on the mariadb service:
sudo systemctl daemon-reload
sudo systemctl restart mariadb
Enable all required services to start automatically during system bootup:
sudo systemctl enable mariadb php-fpm httpd centreon cbd centengine gorgoned snmptrapd centreontrapd snmpd
Step 4: Perform Centreon Web installation
Ensure http service is running:
$ sudo systemctl restart httpd
$ systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/httpd.service.d
└─php-fpm.conf
Active: active (running) since Fri 2021-07-30 17:28:09 EAT; 11s ago
Docs: man:httpd.service(8)
Main PID: 299305 (httpd)
Status: "Running, listening on: port 80"
Tasks: 213 (limit: 49496)
Memory: 42.8M
CGroup: /system.slice/httpd.service
├─299305 /usr/sbin/httpd -DFOREGROUND
├─299306 /usr/sbin/httpd -DFOREGROUND
├─299307 /usr/sbin/httpd -DFOREGROUND
├─299308 /usr/sbin/httpd -DFOREGROUND
└─299309 /usr/sbin/httpd -DFOREGROUND
Log in to Centreon web interface via the URL:
http://<IP>/centreon
You should see Centreon Setup Welcome page. The installer program is designed to help you setup your database and your monitoring configuration.
Confirm the dependency checks are all successful.
Customize monitoring engine information as you deem fit
More engine information, it is recommended to use defaults.
Create admin user
In database configuration section input:
- root user password
- Centreon database name, user and password
The Centreon setup wizard creates configuration files and databases structure.
Database configurations should begin

Check all modules and click “Install“.

Click “Next“

Finish installation to start using Centreon to monitor your Infrastracture.

Login using created username and password:
In the upcoming posts on Centreon we will cover how you can monitor your IT infrastructure with this powerful monitoring tool.
Recommended Video Courses to Learn Linux System Administration:
Recommend
-
12
Install Saltstack Master/Minion on CentOS 8Search ComputingForGeeks
-
21
Install Apache Tomcat 10 on CentOS 8/7Search ComputingForGeeksApache Tomcat is an open-source Java servlet a...
-
11
Install Ajenti Control Panel on CentOS 8Ajenti Control panel is a free, open-source, lightweight, web-based Graphics User Interface control panel for Linux Servers. It is similar to Webmin and cPanel modules. It is used by system administrato...
-
15
Install MongoDB Compass on CentOS 8/7Search ComputingForGeeksMongoDB is a general-purpose, object-oriented,...
-
18
Install Mantis Bug Tracker on Rocky Linux 8 /CentOS 8Welcome to our guide on how to install Mantis Bug Tracker on CentOS 8 / Rocky Linux 8. A bug tracking system, also known as a defect tracking system is a s...
-
13
Install SonarQube on Rocky Linux 8Search ComputingForGeeksIn this guide we explain the installation of Sonar...
-
7
Install Ajenti Control Panel on Rocky Linux 8This article explains the installation of Ajenti Control Panel on Rocky Linux 8 / CentOS 8. Ajenti Control panel is a free, open-source, lightweight, web-based Graphics User Interface control panel...
-
17
Install MongoDB Compass on Rocky Linux 8MongoDB is a general-purpose, object-oriented, and dynamic NoSQL database server used in developing modern dynamic apps. In MongoDB, data objects are stored as separate documents in a collection unlike...
-
18
Install Java 11 (OpenJDK 11) on RHEL 8This article will help you to install Oracle Java 11 on RHEL 8 / CentOS 8 / Rocky Linux 8. Java 11 is a long-term support (LTS) release which was made available to the General public on 25 September 2018...
-
9
How to Install Centreon Monitoring Tool on Rocky Linux 8 Centreon is an open-source tool that can monitor your entire infrastructure including network, system, and application. Using Centreon you can set notifications depending on t...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK