Zabbix is an open-source monitoring solution for any kind of IT infrastructure, services, applications and resources. Zabbix uses the agent installed on remote hosts to collect the system metrics. Zabbix sends you real-time alert notification via SMS, E-mail, alert scripts, or webhook. In this tutorial, you will learn how to Install Zabbix Agent on Ubuntu 20.04 / CentOS 7.
Zabbix Agent is required to be installed on all remote systems those needs to monitor with Zabbix server. Zabbix Agent collects resource utilization & application data from client system and provides to the Zabbix server.
Two types of checks we can configure between Server and Client.
Active Check – Zabbix Agent sends data periodically to the Server.
Passive Check – Zabbix Agent only sent data to the server on its request.
Prerequisite
- Remote Linux System
- User with super user permissions
- Fast internet connection
Step:1. Enable Zabbix Agent Repository
First of all, you need to enable the zabbix agent repository on your remote machine. To add the repository to install required packages for Zabbix agent on Debian Based Systems (Ubuntu 20.04) use below commands.
$ sudo wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+$(lsb_release -sc)_all.deb
$ sudo dpkg -i zabbix-release_5.0-1+$(lsb_release -sc)_all.deb
$ sudo apt update
To add the repository to install required packages for Zabbix agent on RHEL Based Systems (CentOS 7), please use below commands.
$ sudo rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm $ sudo yum clean all
Step:2. Install Zabbix Agent
As you successfully added Zabbix repositories in your system then let’s execute the following commands to install Zabbix agent:
Ubuntu 20.04 (Debian Bases Systems):
$ sudo apt install zabbix-agent
CentOS 7 (RHEL Based Systems)
$ sudo yum install zabbix-agent
Step:3. Configure Zabbix Agent
After installation of zabbix agent, you need to configure zabbix agent. To configure it make changes in /etc/zabbix/zabbix_agentd.conf configuration file and add zabbix server and remote host details as follows:
$ sudo vim /etc/zabbix/zabbix_agentd.conf #Server=[zabbix server ip] #Hostname=[Hostname of client system ] Server=192.168.72.128 Hostname=server1.thecodecloud.in
Step:4. Restart Zabbix Agent
Once zabbix agent configuration file updated, you need to enable and restart agent service using below commands.
$ sudo systemctl enable zabbix-agent $ sudo systemctl restart zabbix-agent
Congratulations, you have done it.
Conclusion
Hence, in this tutorial, you learned how to Install Zabbix Agent on Ubuntu 20.04 / CentOS 7. In our upcoming tutorial you will learn how to add Remote Host in Zabbix Server. Thanks!!
Read Also : How to Install Zabbix Server 5.0 on Ubuntu 20.04
Nice Article.