Zabbix Agent is required to install on all remote systems needs to be monitor through Zabbix server. The Zabbix Agent collects resource utilization data and applications data on the client system and provides such information to Zabbix server on their requests.
There are two types of checks between Zabbix Server and Client.
- Passive Check – Zabbix Agent sent data to server on their request.
- Active Check – Zabbix Agent sends data periodically to server.
After installing zabbix server on your server, Now we are moving to install agent on remote system’s. This article will help you to install zabbix agent on CentOS/RHEL 7/6/5 systems. After completing this step go to next article add Host in Zabbix Server.
Step 1 – Add Required Repository
Before installing Zabbix Agent first configure Zabbix yum repository using following commands as per your required version and operating system.
# rpm -Uvh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
# rpm -Uvh http://repo.zabbix.com/zabbix/3.4/rhel/6/x86_64/zabbix-release-3.4-1.el6.noarch.rpm
Step 2 – Install Zabbix Agent
After installing yum repository packages in our system. Use the following command to install Zabbix agent on your CentOS and Red Hat systems using the yum package manager.
# yum install zabbix zabbix-agent
Step 3 – Zabbix Agent Configuration
As Zabbix agent has been successfully installed on our remote system. Now we just need to configure Zabbix agent by adding Zabbix server IP to the configuration file /etc/zabbix/zabbix_agentd.conf
# Server=[zabbix server ip] # Hostname=[ Hostname of client system ] Server=Zabbix server IP Hostname=ServerName
Step 4 – Open Port
Zabbix agent uses 10050/tcp port. You are required to open this port to allow Zabbix server with the agent. Execute command to open port in iptables firewall where 192.168.1.100 is IP of Zabbix server.
# iptables -A INPUT -p tcp -s 192.168.1.100 --dport 10050 -m state --state NEW,ESTABLISHED -j ACCEPT
Step 5 – Restarting Zabbix Agent
After adding Zabbix server IP to the configuration file, now restart agent service to reload the new settings, using the following command.
# service zabbix-agent restart
To start and stop zabbix-agent service anytime use following commands.
# service zabbix-agent stop # service zabbix-agent start
Congratulation’s! You have successfully installed Zabbix Agent.