Thursday 26 March 2015

How to Install Zabbix Agent on CentOS/RHEL 7/6/5

Original post: http://tecadmin.net/install-zabbix-agent-on-centos-rhel/

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 client system and provide such information to Zabbix server on there requests.

There are two types of checks between Zabbix Server and Client.
·         Passive Check : Zabbix Agent sent data to server on there 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.

Installing Zabbix Agent
Follow the below instructions to install Zabbix Agent on CentOS, RHEL 7/6/5 systems.

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.

CentOS/RHEL 7:

# rpm -Uvh http://repo.zabbix.com/zabbix/2.2/rhel/7/x86_64/zabbix-release-2.2-1.el7.noarch.rpm

CentOS/RHEL 6:
# rpm -Uvh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm

CentOS/RHEL 5:
# rpm -Uvh http://repo.zabbix.com/zabbix/2.2/rhel/5/x86_64/zabbix-release-2.2-1.el5.noarch.rpm


Step 2: Install Zabbix Agent


After installing yum repository packages in our system. Now use following command to install Zabbix agent on your Linux sytem.

# yum install zabbix zabbix-agent nano –y


Step 3: Update 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 in its configuration file /etc/zabbix/zabbix_agentd.conf

sed -i 's/Server=127.0.0.1/ Server=192.168.1.11/g' /etc/zabbix/zabbix_agentd.conf

Or

nano /etc/zabbix/zabbix_agentd.conf

#Server=[zabbix server ip]
#Hostname=[ Hostname of client system ]

Server=192.168.1.11
Hostname=Server1


Step 4: Restarting Zabbix Agent


After adding zabbix server ip in configuration file, now restart agent service using below command.

service zabbix-agent stop
service zabbix-agent start

To start and stop zabbix-agent service anytime use following commands.

# service zabbix-agent start
# service zabbix-agent stop


Step 5: Add to autostart 


chkconfig zabbix-agent on


Step 6: Add to firewall


firewall-cmd --permanent --zone=public --add-port=10050/tcp
firewall-cmd --permanent --zone=public --add-port=10050/udp
firewall-cmd --reload

No comments:

Post a Comment