A Zabbix Agent Ubuntu 24.04 installation is the fastest way to bring a new server under proper monitoring, because without an agent the Zabbix server can only guess at what the machine is doing. Ping tells you the host is up, but it says nothing about CPU load, disk space, memory pressure, or a service that has quietly stopped. The Zabbix agent closes that gap: it runs on the monitored host, collects dozens of system metrics locally, and reports them to the server on a schedule you control. This guide installs Zabbix Agent 2, the modern Go-based agent, on Ubuntu 24.04, connects it to an existing Zabbix server, and verifies that data is actually flowing. If you have not built the server side yet, start with our guide on how to install a Zabbix server on Ubuntu and return here once it is running.
Two collection modes matter before you touch a config file. In passive mode, the Zabbix server connects to the agent on TCP port 10050 and asks for each item, which is simple to reason about but requires the agent port to be reachable from the server. In active mode, the agent connects out to the server on TCP port 10051 and asks what it should send, which works better behind NAT and firewalls because the monitored host initiates the connection. Most production setups use active checks for hosts behind firewalls and passive checks inside a trusted network, and this guide configures both addresses so you can switch modes later without reinstalling. The agent also supports host metadata and auto-registration, so a fleet of new servers can appear in Zabbix automatically instead of being added one by one.

Prerequisites
You need an Ubuntu 24.04 server with sudo access and a running Zabbix server, version 7.0 or newer, whose IP address or hostname you know. The monitored host must be able to reach the Zabbix server, or the server must be able to reach the host, depending on the mode you choose. Check that the server time is accurate, because Zabbix flags hosts with a large clock skew and active checks depend on timestamps. You also need to know the exact hostname you will register in Zabbix: for active checks, the Hostname value in the agent configuration must match the host name in the Zabbix frontend character for character, or the server will refuse the data. No extra monitoring software is required on the host itself.
Install Zabbix Agent Ubuntu 24.04 from the Official Repository
Ubuntu ships an older Zabbix agent in its default repositories, so install the official Zabbix repository to get the current 7.0 release. Download the repository package for Ubuntu 24.04, install it, and refresh the package lists. The package name includes the Zabbix version and the Ubuntu release, so copy it exactly; a package built for an older Ubuntu release may install but can pull in mismatched dependencies.
cd /tmp
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-2+ubuntu24.04_all.deb
sudo dpkg -i zabbix-release_7.0-2+ubuntu24.04_all.deb
sudo apt update
Now install Zabbix Agent 2. The original agent is still available as zabbix-agent, but Agent 2 is the recommended choice for new installations: it supports the same checks, adds plugin support, and handles active checks more efficiently. Install it and confirm the service starts.
sudo apt install zabbix-agent2 -y
sudo systemctl enable --now zabbix-agent2
sudo systemctl status zabbix-agent2
The official Zabbix documentation on installing Zabbix from packages lists the repository packages for every supported distribution and version, and it is the reference to check if a future release changes the package name.
Install Zabbix Agent Ubuntu 24.04: Configure Server and Hostname
The agent configuration lives at /etc/zabbix/zabbix_agent2.conf. Back it up, then set the three values that decide whether monitoring works at all. Server is the address allowed to make passive checks, ServerActive is the address the agent contacts for active checks, and Hostname is the name the server uses to recognise this host. In most setups Server and ServerActive point at the same Zabbix server, and that is fine.
sudo cp /etc/zabbix/zabbix_agent2.conf /etc/zabbix/zabbix_agent2.conf.bak
sudo nano /etc/zabbix/zabbix_agent2.conf
Server=192.0.2.10
ServerActive=192.0.2.10
Hostname=web01.example.com
Replace 192.0.2.10 with your Zabbix server address and web01.example.com with the hostname you will use in the Zabbix frontend. If the server uses a hostname rather than an IP address, use that hostname here so TLS and DNS behaviour stays consistent. Restart the agent after editing, then check the log file for the startup lines that confirm it is listening and, for active mode, that it has connected to the server.
sudo systemctl restart zabbix-agent2
sudo tail -n 50 /var/log/zabbix/zabbix_agent2.log
sudo ss -tlnp | grep 10050
Open the firewall on the monitored host for the direction you use. For passive checks, allow TCP port 10050 from the Zabbix server only, not from the whole internet. For active checks, the agent makes an outbound connection to port 10051, so no inbound rule is needed on the host, but the server firewall must accept it. The UFW rule below shows the restrictive form; if you use a different firewall, apply the same source restriction. Our UFW firewall guide for Ubuntu explains the allow-before-enable order that prevents lockouts.
sudo ufw allow from 192.0.2.10 to any port 10050 proto tcp
sudo ufw status verbose
Verify the Zabbix Agent and Add the Host in Zabbix
Verification has two halves, and both should pass before you declare success. First, test from the Zabbix server with zabbix_get, which performs a single passive check. Install the zabbix-get package on the server if it is not already there, then ask the agent for its version and a CPU metric. If these return values, the network path and the Server setting are correct.
sudo apt install zabbix-get -y
zabbix_get -s web01.example.com -k agent.version
zabbix_get -s web01.example.com -k system.cpu.load[all,avg1]
Second, add the host in the Zabbix frontend under Configuration, then Hosts, then Create host. Set the host name to exactly the Hostname value from the agent configuration, add the host to a group such as Linux servers, link the template called Linux by Zabbix agent, and set the agent interface to the host IP address and port 10050. Save, then wait a minute and check Monitoring, then Hosts: the availability icon for the agent should turn green. If you use active checks, the template link and the hostname match matter more than the interface address, because the agent initiates the connection.
Once the host is green, open Monitoring, then Latest data, filter by the new host, and confirm that items such as CPU utilisation, memory usage, and disk space are updating. A host that is green but shows no data usually has a template problem: the items exist but their keys do not match what this agent version returns, which points at a version mismatch between server and agent. Keep both on the same major version to avoid that class of problem entirely.
Troubleshooting
When zabbix_get times out, the cause is almost always the network path or the Server setting. Confirm the agent is listening on port 10050 with ss, confirm the firewall rule allows the server IP specifically, and confirm the Server line in the configuration contains the server address that zabbix_get is running from. A common mistake is configuring Server with a hostname that resolves differently on the agent than on the server, so test with IP addresses first and switch to hostnames only after the IP path works.
When the host shows as unavailable in the frontend but zabbix_get works, the frontend interface address is usually wrong, or the host name in the frontend does not match the agent Hostname value for active checks. Compare the two strings character by character, including case and dots. When active checks produce no data but passive checks work, check the agent log for connection errors to port 10051 and confirm the server firewall accepts that port. When the agent service fails to start, run the log tail command above before reinstalling anything: a typo in the configuration file is reported there with a line number, and fixing that line is faster than a fresh install.
Conclusion
A Zabbix Agent Ubuntu 24.04 setup done well needs only a short sequence done in the right order: add the official repository, install Agent 2, set Server, ServerActive, and Hostname correctly, open only the firewall ports your mode needs, and verify with both zabbix_get and the frontend before moving on. From there, templates do the heavy lifting: link the right template, watch the first hour of data for gaps, and set up triggers for disk space and load before the next incident, not after it. Monitoring that you have verified is worth more than monitoring you assume is working.