In our previous guide, we explained how to install Zabbix Server on Ubuntu.
This tutorial complements that previous guide.
The Zabbix agent is a program developed in C. It runs on various platforms and distributions, including Windows, Linux, macOS, AIX, FreeBSD, HPUX, NetBSD, OpenBSD, SLES, Solaris, Tru64.
It collects data such as a device's CPU, memory, disk and network interface usage, and can perform both passive and active checks. Checks can be performed at intervals or according to a specific schedule.
Install the Zabbix agent on Ubuntu 24.04, 22.04, 20.04 or 18.04
First, add the Zabbix repositories:
# wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu24.04_all.deb
# dpkg -i zabbix-release_latest_7.0+ubuntu24.04_all.deb
# wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu22.04_all.deb
# dpkg -i zabbix-release_latest_7.0+ubuntu22.04_all.deb
# wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu20.04_all.deb
# dpkg -i zabbix-release_latest_7.0+ubuntu20.04_all.deb
# wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_latest_7.0+ubuntu18.04_all.deb
# dpkg -i zabbix-release_latest_7.0+ubuntu18.04_all.deb
Once the repositories have been added, install the Zabbix agent.
apt update
apt install zabbix-agent
Configure the Zabbix agent.
nano /etc/zabbix/zabbix_agentd.conf
#Specify the IP of the Zabbix server
Server=217.71.204.229
#Specify the IP of the Zabbix server ( For active checks)
ServerActive=217.71.204.229
# Hostname, which must match the web configuration we will add shortly
Hostname=testing
Restart the Zabbix agent.
systemctl restart zabbix-agent
systemctl status zabbix-agent
Open ports
Remember to open the ports in the Clouding panel if you are using the public IP.
Ports: 10050 TCP and 10051 TCP.
Add a host to the Zabbix server
Access the Zabbix server interface and go to Configuration > Hosts > Create host
You need to complete the following information:
Host name of the server to be monitored (It must match the hostname configuration we set up previously).
Visible name of the server to be monitored.
Zabbix Agent port - 10050 TCP by default.
In Templates add Linux by Zabbix Agent.
Add Linux Servers to the field Groups .
Click Add in interfaces and add an agent alongside the IP address of the Zabbix client.
Template Linux By Zabbix agent
Host name
Zabbix Agent IP
You can also select other Templates and choose the ones you need. (Templates are entirely optional; with Linux by Zabbix Agent you will have basic monitoring).
Once you have selected the templates, add them.
After a few minutes, the monitoring information will be available to view.
The default host graphs can be accessed at
Monitoring > Hosts -> Graphs