1. Home
  2. 3rd Party Product
  3. Zabbix
  4. Install zabbix agent on Ubuntu

Install zabbix agent on Ubuntu

Example: Zabbix Server : 103.74.252.36 URL: 103.74.252.36/zabbix

The example will be the installation guide of zabbix agent 5.0.1 on ubuntu 20.04

  1. Download Zabbix agent repository from https://repo.zabbix.com/zabbix/
wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix/zabbix-agent_5.0.1-1%2Bfocal_amd64.deb

2. Extract and install the downloaded zabbix agent repository

dpkg -i zabbix-agent_5.0.1-1+focal_amd64.deb

3. Go to zabbix configuration file to setup zabbix agent with zabbix server

cd /etc/zabbix/
vi zabbix_agentd.conf

4. Change target zabbix server IP to be your zabbix server’s IP

### Option: Server
#       List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies
#       Incoming connections will be accepted only from the hosts listed here.
#       If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally
#       and '::/0' will allow any IPv4 or IPv6 address.
#       '0.0.0.0/0' can be used to allow any IPv4 address.
#       Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
#
# Mandatory: yes, if StartAgents is not explicitly set to 0
# Default:
# Server=


Server=103.74.252.36

### Option: ServerActive
#       List of comma delimited IP:port (or DNS name:port) pairs of Zabbix servers and Zabbix proxies for active checks.
#       If port is not specified, default port is used.
#       IPv6 addresses must be enclosed in square brackets if port for that host is specified.
#       If port is not specified, square brackets for IPv6 addresses are optional.
#       If this parameter is not specified, active checks are disabled.
#       Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
#
# Mandatory: no
# Default:
# ServerActive=


ServerActive=103.74.252.36

5. Restart zabbix agent service

systemctl restart zabbix-agent.service

6. Add Host on Zabbix Server GUI on Configuration > Host > Add Host

7. Add Host name, Host Group, Agent IP, and template

8. Check the status of zabbix agent on Configuration > Host. If it is green, you are ready to monitor your server.

Install zabbix agent on Window server

The example will be the installation guide of zabbix agent 5.0.1 on window server

  1. Download zabbix agent installer from https://www.zabbix.com/download_agents and pick your desired version

2. Run the zabbix installer and click next

3. Input Hostname, Zabbix server IP, and Zabbix server(proxy) IP

6. Add Host on Zabbix Server GUI

7. Add Host name, Host Group, Agent IP, and template

8. Check the status of zabbix agent on Configuration > Host. If it is green, you are ready to monitor your server.

Install zabbix agent on CentOS/rhel

The example will be the installation guide of zabbix agent 5.0.1 on centos/rhel

  1. Download and install zabbix agent repository from https://repo.zabbix.com/zabbix/
rpm -ivh https://repo.zabbix.com/zabbix/5.0/rhel/8/x86_64/zabbix-agent-5.0.1-1.el8.x86_64.rpm

3. Go to zabbix configuration file to setup zabbix agent with zabbix server

cd /etc/zabbix/
vi zabbix_agentd.conf

4. Change target zabbix server IP to be your zabbix server’s IP

### Option: Server
#       List of comma delimited IP addresses, optionally in CIDR notation, or DNS names of Zabbix servers and Zabbix proxies
#       Incoming connections will be accepted only from the hosts listed here.
#       If IPv6 support is enabled then '127.0.0.1', '::127.0.0.1', '::ffff:127.0.0.1' are treated equally
#       and '::/0' will allow any IPv4 or IPv6 address.
#       '0.0.0.0/0' can be used to allow any IPv4 address.
#       Example: Server=127.0.0.1,192.168.1.0/24,::1,2001:db8::/32,zabbix.example.com
#
# Mandatory: yes, if StartAgents is not explicitly set to 0
# Default:
# Server=


Server=103.74.252.36

### Option: ServerActive
#       List of comma delimited IP:port (or DNS name:port) pairs of Zabbix servers and Zabbix proxies for active checks.
#       If port is not specified, default port is used.
#       IPv6 addresses must be enclosed in square brackets if port for that host is specified.
#       If port is not specified, square brackets for IPv6 addresses are optional.
#       If this parameter is not specified, active checks are disabled.
#       Example: ServerActive=127.0.0.1:20051,zabbix.domain,[::1]:30051,::1,[12fc::1]
#
# Mandatory: no
# Default:
# ServerActive=


ServerActive=103.74.252.36

5. Restart zabbix agent service

systemctl restart zabbix-agent.service

6. Add Host on Zabbix Server GUI

7. Add Host name, Host Group, Agent IP, and template

8. Check the status of zabbix agent on Configuration > Host. If it is green, you are ready to monitor your server.

Was this article helpful?

Related Articles