In our previous guide, we covered the installation of Zabbix Server on Ubuntu Server. This is a continuation guide on Zabbix monitoring of your entire Infrastructure – Linux systems, Windows servers, network routers, network switches e.t.c. So let’s see how you can install Zabbix agent on Ubuntu 20.04/18.04 server.

Zabbix agent is a program developed in C. It runs on various supported platforms, including Linux, UNIX, and Windows. The work of the Zabbix agent is to collect data such as CPU, memory, disk and network interface usage from a device. It has a small resource footprint considering that monitoring configurations are centralized on Zabbix server.

Zabbix Agents
image from zabbix

How Zabbix agent works

Zabbix agent can do both passive (polling) and active checks (trapping). The checks can be performed at an interval or based on specific times schedule. Here is the difference between passive and active checks:

Passive checks (polling):

  • Zabbix server (or proxy) requests a value from Zabbix agent
  • Agent processes the request and returns the value to Zabbix server (or proxy)

Active checks (trapping):

  • Zabbix agent requests from Zabbix server (or proxy) a list of active checks
  • The agent sends the results in periodically

The image below from Zabbix may help visualize passive and active checks in action:

active vs passive
image from

Install Zabbix agent on Ubuntu 18.04 / 20.04

Below steps are used to install Zabbix agent on Ubuntu 18.04 / 20.04:

Step 1: Add Zabbix repositories

Add Zabbix repositories using the commands below:

buntu 20.04:

sudo apt install ./zabbix-release_5.0-1+focal_all.deb

Ubuntu 18.04:

sudo apt install ./zabbix-release_5.0-1+bionic_all.deb

Step 2: Install and Configure Zabbix Agent

Once repository is added install the packages:

sudo apt update
sudo apt install zabbix-agent

Zabbix agent configuration is /etc/zabbix/zabbix_agentd.conf. Edit

$ sudo vim /etc/zabbix/zabbix_agentd.conf
#Specify Zabbix server IP Address

#Specify Zabbix server ( For active checks)

# Set this server hostname reported by Zabbix agent

Restart zabbix-agent after making the change:

sudo systemctl restart zabbix-agent
sudo systemctl status zabbix-agent

If you have ufw enabled, allow port 10050 on the firewall. This is used by Zabbix agent daemon.

sudo ufw allow 10050/tcp

Step 3: Add host to Zabbix Server

Login to admin Zabbix server interface, and go to Configuration > Hosts > Create host

You’ll need to fill out the following information:

  • Host name of the server to be monitored
  • Visible name for the server to be monitored.
  • Select the group or add a new group for “Groups” field.
  • IP address
  • Zabbix agent service port -default is 10050
zabbix agent add host

Then go to Templates tab.

1. Click the select button and Link new templates section

Select the templates you want to use:

zabbix agent add select templates

2. Once you have selected the templates click on the Add link to link templates to your target systemAfter the templates are linked, they’ll appear on under Linked templates section

zabbix agent add linked templates

Update the setting using Update button. After few minutes, monitoring data will be collected and you can visualize them using Zabbix graphs. Default host graphs can be accessed on

Monitoring > Graphs > <Host|Graph>

Below are the Ram and CPU utilization graphs for the host we added earlier.

zabbix agent graph cpu
zabbix agent graph ram

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here