A full stack monitoring solution entails end-user experience, app performance monitoring, network infrastructure monitoring, and log file monitoring for keeping track of different aspects of your systems effectively and the environment where they run. These can include Memory usage, CPU usage, input/output, network, disk usage, processes, etc.

The full stack monitoring solution helps in reducing individual monitoring tools used to monitor a system that might be difficult to maintain and keep track of all the time. Other than that, the monitoring solutions give a complete picture of your system and a good base for tuning your settings. A number of tools used as monitoring solutions include; Prometheus, Zabbix, Sematext, New Relic, Datadog, Nagios XI, and more.

Zabbix Server

Zabbix is an open-source distributed monitoring solution with no limits or hidden costs for monitoring servers. The Zabbix server gathers data from all of its agents, processes it, and produces a reliable data representation. A customized and simple way to comprehend the web UI/dashboard is also provided, along with a variety of widgets, graphs, network maps, slideshows, and reports.

It is practical software that developers use to keep track of a variety of network variables, as well as the functionality and integrity of servers, virtual machines, applications, services, databases, websites, the cloud, and other resources. Using a configurable notification system, Zabbix notifies users of issues via a variety of channels, including email, Slack, Jira, Brevis.one, etc. It is cross-platform and available in Linux, Windows, macOS, FreeBSD, Solaris, etc.

Zabbix consists of several major components including;

  • Zabbix Server is the central repository for the software.
  • Database for storing data gathered by Zabbix.
  • Web Interface to access Zabbix.
  • Zabbix Proxy to collect performance and availability data on behalf of the Zabbix server.
  • Zabbix Agents actively monitor local resources and applications and report to the server.

The following diagram gives an overview of the Zabbix Architecture

Zabbix 6 LTS focus on solving complex enterprise level-requirements like solving enterprise-level security and improving performances on Zabbix instances. It also extends the Zabbix monitoring and data collection capabilities, providing additional value to different Zabbix users and continued delivery of official integrations of 3rd party systems.

Some of the features include;

  • Ability to define one or multiple Zabbix Server High Availability nodes.
  • Service section monitoring has been redesigned with scalable Business monitoring.
  • Introduced Collision resistant IDs(CUID) for ID generation to prevent audit log row locks.
  • Added baselinewma and baselinedev functions under Machine Learning that allows you to calculate baseline value for your metrics.
  • New widgets were introduced to display information in different ways.
  • Introduces Geomaps to see the host location on a geographical map on the dashboard.
  • Define Zabbix Password complexity requirements; like the length and characters to use while creating a password.

Setup Pre-requisites

Installed LAMP on your system is a requirement for this process. If not, follow through the guide, Install LAMP Stack on CentOS 9 / AlmaLinux 9 / RHEL 9.

Install Zabbix Server on RHEL 9 / CentOS 9

Add Zabbix official repository to your system.

sudo rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/9/x86_64/zabbix-release-6.0-3.el9.noarch.rpm
sudo dnf clean all

Install Zabbix Server, Frontend, and agent with the following command.

sudo dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent

Create an initial database for Zabbix.

$ sudo mysql -uroot -p
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user [email protected] identified by 'StrongPassWord';
grant all privileges on zabbix.* to [email protected];
quit;

Host initial schema and data. Use the newly created password.

zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix

Configure the database for the Zabbix server with the new password created.

$ sudo vi /etc/zabbix/zabbix_server.conf
DBPassword=StrongPassWord

Start and enable the Zabbix server to start on boot.

sudo systemctl restart zabbix-server zabbix-agent httpd php-fpm
sudo systemctl enable zabbix-server zabbix-agent httpd php-fpm

Configure Firewall to allow Zabbix service

sudo firewall-cmd --add-port=80/tcp --permanent
sudo firewall-cmd --add-port={10050,10051}/tcp --permanent
sudo firewall-cmd --reload

If SELinux is enabled on your system, configure it to allow communication between the Zabbix front end and server.

sudo setsebool -P httpd_can_connect_zabbix on
sudo setsebool -P httpd_can_network_connect_db on

Restart Apache service to apply changes

sudo service httpd restart

Connect to your newly installed Zabbix frontend: http://localhost/zabbix.

Check for prerequisites.

Configure Database Connection by setting configuration parameters for the connection.

Configure the server settings, provide a name and you can choose a default theme. I chose the Dark theme.

The Pre-installation summary with the configuration parameters shows.

Then Zabbix Frontend will be installed successfully. Click on Finish.

You will be redirected to the login page. Use the default login credentials Username: Admin Password: zabbix.

The Dashboard will open as shown below.

Change Zabbix admin user password

Change the Admin Password. Go to Administration >> Users then click on Admin.

Click on Change Password, then add and retype a strong Password then click on Update.

Server Monitoring with Zabbix on CentOS 9| RHEL 9

To add a remote node as a client, edit the Zabbix agent configuration file. Add the IP address of the external client that runs the Zabbix agent.

$ sudo vi /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1,192.168.200.40
ServerActive=12.0.0.1,192.168.200.40
Hostname=localhost

Save and exit the file. Restart the service to apply changes.

sudo systemctl restart zabbix-server zabbix-agent httpd php-fpm

On your browser in the Zabbix Frontend, Go to Configuration >> Hosts

On the top right side, click on Create Host

Add the Hostname as specified above in the file. Select Templates, I chose Linux by Zabbix agent.

Select a host group. I chose Linux servers.

Add the interface and once down click on Add.

The Host will appear as shown below.

Give it a minute or two to establish a connection, then click on Discovery. Select all and click Execute Now.

Once down, Go to Monitoring Tab and click on Latest data. Filter to show data coming from the host localhost and host group Linux servers and apply. You will see the incoming data from the host

To get more visualized information, Go to Monitoring >> Hosts. Click on the Host you want and select Graphs.

The Dashboard appears as shown below.

Conclusion

We have installed and configured Zabbix Server on RHEL 9 / CentOS 9. Zabbix server has improved features for Network monitoring, Server monitoring, Cloud monitoring, Application monitoring, Service monitoring, and More. The new features on Zabbix 6 include; New stand-alone Templates and integrations that do not require installation of any dependencies, New macros for trigger expressions and internal debugging, and UI/UX improvements that reduce the amount of clicking around.

See other guides on RHEL 9 / CentOS Stream 9 administration:

LEAVE A REPLY

Please enter your comment!
Please enter your name here