How to Install and Configure Zabbix Agent on Linux RHEL / Linux CentOS 8 VPS, VDS, Linux server

Server monitoring is one of the important things that is needed. To provide the best quality. Each monitoring system has a different approach. Depending on your infrastructure you would need to set it up independently with a back since the monitoring system can also fail. Each monitoring system requires a user to be installed on the client's device. In this case, we will show you, how you can install Zabbix Agent on a Linux Centos 8 server-based OS system.

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 the Zabbix server. In this tutorial, we will walk through the necessary steps to install and configure the Zabbix agent on CentOS 8.

We all know, that SELinux in most servers and VPS is enabled but y default, but we think it is better to disable SELinux for Zabbix to work correctly, well don't worry you can configure iptables-service to provide better security. So, open the configuration file.

nano /etc/selinux/config

Set SELinux to disabled.

SELINUX=disabled

Save and close the file, and then restart the system.

Now let's Installing Zabbix agent

Now add the Zabbix repository to be able to install the agent.

rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-release-5.0-1.el8.noarch.rpm

Let’s install the Zabbix agent package.

dnf install -y zabbix-agent

Now start the service and make it start with system boot.

systemctl enable --now zabbix-agent

Zabbix agent configuration

Open the Zabbix configuration file.

nano /etc/zabbix/zabbix_agentd.conf

Find and set the correct values for the next parameters:

Server=YOUR-ZABBIX-SERVER-IP
ServerActive=YOUR-ZABBIX-SERVER-IP
Hostname=YOUR-CLIENT-NAME

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.

systemctl restart zabbix-agent

Firewall configuration

Open the 10050, 10051, http,https ports for Zabbix to work.

firewall-cmd --add-service={http,https} --permanent 
firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent 
firewall-cmd --reload

And now restart Firewall

systemctl restart firewalld

Warning: file_get_contents(http://api.wipmania.com/34.239.177.24?[YOUR SITE URL]): failed to open stream: Connection refused in /var/www/vhosts/amberit.eu/httpdocs/wp-content/themes/amberit/inc/layout-functions.php on line 821