How to Install and Configure Zabbix Agent on CentOS 8
The Zabbix agent runs on client machines, collects and sends data to the Zabbix server. Therefore, all remote machines must be provided with a client for the server to work. We recently installed Zabbix server. In this tutorial, we will walk through the necessary steps to install and configure the Zabbix agent on CentOS 8.
Turning SELinux off
It is better to disable SELinux for Zabbix to work correctly. So, open the configuration file.
Set SELINUX to disabled.
Save and close the file, and then restart the system.
Installing Zabbix agent
Now add the Zabbix repository to be able to install the agent.
dnf clean all
Let's install the Zabbix agent package.
Now start the service and make it start with system boot.
Zabbix agent configuration
Open the Zabbix configuration file.
Find and set the correct values for the next parameters:
ServerActive=10.5.5.1
Hostname=client
The first two of them must contain the IP address of the Zabbix server, and the Hostname is the name of this client that will be displayed in statistics on the server.
Now restart the service.
Firewall configuration
Open the 10050, 10051, http,https ports for Zabbix to work.
firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent
firewall-cmd --reload