A Zabbix agent is a program that runs on a remote machine that needs to be monitored through the Zabbix server. The agent collects the data on the remote server and send back to Zabbix server when requested. Zabbix agent must be installed on all the remote systems that need to be monitor through the Zabbix server.
There are two types of checks:
Passive Check
- Zabbix Agent sent data to server on their request.Active Check
- Zabbix Agent sends data periodically to server.
In this article, we will learn how to install the Zabbix agent in RHEL 8 based distributions like the Rocky Linux or Alma Linux. Checkout this guide on How to Install and Configure Zabbix Server 5 on Rocky Linux/Alma Linux 8.
Related content:
- How to Install and Configure Zabbix Server 6 on Ubuntu 20.04
- How To Install and Configure Zabbix Agent 5 on Ubuntu 20.04
- How to Install and Configure Zabbix Server 6 on Ubuntu 20.04
- How to Install Zabbix Agent 6 on Rocky Linux/Alma Linux/Oracle Linux 8
- How to Install Zabbix Agent 6 on OpenSUSE Leap 15.3
- How to Add Host in Zabbix Server to Monitor
Ensure that the server packages are up to date
Before proceeding, let us make sure that our server packages are up to date with this command:
|
|
Let us also install some common packages that we will need
|
|
Install the Zabbix Agent
The Zabbix agent packages are not available under the default Rocky Linux 8 repositories. We will need to configure the Zabbix repository in our system before installing the agent.
The latest Zabbix version as at the writing of this article is Zabbix version 5.4. Install the Zabbix version 5.4 repository using this command:
|
|
Once the repository is installed, we can install the agent. Use this command:
|
|
Confirm the software version installed:
|
|
Configure Zabbix Agent
Now, you need to configure the Agent service to allow Zabbix server requests. We will also update the Hostname so we know which server we configured the agent on. Edit the Zabbix agent configuration file by adding the Zabbix server IP.
|
|
Add this content:
|
|
Disable SELinux and Adjust Firewall for Zabbix
If you have firewall installed and enabled, you will need to allow the Zabbix ports 10050 and 10051. and HTTP service through the firewall. You can allow them with the following command:
|
|
You will also need to set SELinux
to permissive in order to access the frontend from a browser. To do that, run the command:
|
|
Start and enable the Zabbix agent
We can now start the agent. The agent is not started by default. Use this command to start:
|
|
Check the status to confirm that it is started.
|
|
From the above output, we can confirm that the agent is running. To enable the agent to start on boot, use this command:
|
|
That is it! You have successfully installed Zabbix Agent on your Rocky Linux Machine. You can now proceed to add host in zabbix server to be monitored. Checkout this guide How to Add Host in Zabbix Server to Monitor.