• Recent blogs

    How to install Zabbix Agent on CentOS / RHEL 6/7

    How to install Zabbix Agent on CentOS / RHEL 6/7


    Zabbix Agent need to be installed on all the server that you want to monitor through Zabbix server. The Zabbix Agent collects resource utilization data and applications data on the client system as configured and provides those information to the Zabbix server on their requests.

    There are two types of checks between Zabbix Server and Zabbix 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 systems. After completing this task go to next article on how add Host in Zabbix Server.

    Step 1 – Add zabbix Repository and Signature

    Before installing Zabbix Agent first configure Zabbix  repository using following commands as per your required version and operating system.

    CentOS/RHEL 7:

    rpm --import http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX
    rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm

    CentOS/RHEL 6:

    rpm --import http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX
    rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/6/x86_64/zabbix-release-4.0-2.el6.noarch.rpm

    Step 2 – Install Zabbix Agent

    After installing zabbix  repository, Now its time to install Zabbix agent on your CentOS and Red Hat systems using the yum package manager.

    yum install zabbix-agent -y

    Step 3 – Zabbix Agent Configuration

    After  Zabbix agent has been successfully installed on your remote system. Now we  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=[ Hostname of client system ]

    Step 4 – Open Ports

    Zabbix agent uses 10050/tcp port. You are required to open this port to allow the Zabbix server with the agent. Execute command to open port in iptables firewall where [zabbix server ip] is IP of Zabbix server.

    iptables -A INPUT -p tcp -s [zabbix server ip] --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 start
    service zabbix-agent stop

    Step 6 – Enable  Zabbix service

    systemctl enable  zabbix-agent

    Cheers! You have successfully installed Zabbix Agent. We now have to  add host in zabbix server.

    Next Article:


    1. systemctl in RHEL 7?

      1. Yes , definitely. Please refer official document of Redhat. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/chap-managing_services_with_systemd