Zabbix Agent is a lightweight process installed on monitored hosts that collects system metrics – CPU, memory, disk, network, running processes – and sends them to the Zabbix Server. It supports both passive checks (server polls the agent) and active checks (agent pushes data to the server), making it flexible for environments of any size.

This guide covers installing and configuring Zabbix Agent 7.0 LTS on Debian 13 (Trixie) and Debian 12 (Bookworm), then adding the host to your Zabbix Server for monitoring.

Prerequisites

  • A server running Debian 13 or Debian 12 with sudo access
  • A working Zabbix Server installation (version 7.0 or later)
  • Network connectivity between the agent host and Zabbix Server on port 10050/tcp (passive) and 10051/tcp (active)

Step 1: Add the Zabbix Repository

Zabbix packages are not included in the default Debian repositories. Install the official Zabbix repository for your Debian version.

For Debian 13 (Trixie):

wget https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.0+debian13_all.deb
sudo dpkg -i zabbix-release_latest_7.0+debian13_all.deb
sudo apt update

For Debian 12 (Bookworm):

wget https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.0+debian12_all.deb
sudo dpkg -i zabbix-release_latest_7.0+debian12_all.deb
sudo apt update

Verify the repository was added:

$ apt-cache policy zabbix-agent2
zabbix-agent2:
  Installed: (none)
  Candidate: 1:7.0.x-1+debian12
  Version table:
     1:7.0.x-1+debian12 500
        500 https://repo.zabbix.com/zabbix/7.0/debian bookworm/main amd64 Packages

Step 2: Install Zabbix Agent 2 on Debian

Zabbix offers two agent versions. Zabbix Agent 2 (zabbix-agent2) is the newer, recommended version written in Go with built-in plugin support for monitoring Docker, PostgreSQL, MongoDB, Redis, and more out of the box. Install it with:

sudo apt install -y zabbix-agent2 zabbix-agent2-plugin-*

The zabbix-agent2-plugin-* packages add monitoring capabilities for databases, message queues, and container runtimes without needing external scripts.

Enable and start the agent:

sudo systemctl enable zabbix-agent2
sudo systemctl start zabbix-agent2

Verify it’s running:

$ sudo systemctl status zabbix-agent2
● zabbix-agent2.service - Zabbix Agent 2
     Loaded: loaded (/lib/systemd/system/zabbix-agent2.service; enabled; preset: enabled)
     Active: active (running)
   Main PID: 12345 (zabbix_agent2)
     Memory: 18.2M
        CPU: 42ms

Step 3: Configure Zabbix Agent 2

The main configuration file is /etc/zabbix/zabbix_agent2.conf. Open it:

sudo vim /etc/zabbix/zabbix_agent2.conf

Set these parameters to connect the agent to your Zabbix Server:

Server=192.168.1.100            # Zabbix Server IP - accepts passive check requests from this address
ServerActive=192.168.1.100      # Zabbix Server IP - agent sends active check results here
Hostname=debian-web-01            # Must match the host name you configure in Zabbix Server UI
ListenPort=10050               # Port the agent listens on for passive checks
ListenIP=0.0.0.0                # Listen on all interfaces (or set specific IP)

Replace 192.168.1.100 with your Zabbix Server’s IP address and debian-web-01 with a meaningful hostname that identifies this machine.

Optional but recommended settings for production:

# Enable remote commands from Zabbix Server (useful for auto-remediation)
AllowKey=system.run[*]

# TLS encryption for agent-server communication
TLSConnect=psk
TLSAccept=psk
TLSPSKIdentity=debian-web-01-psk
TLSPSKFile=/etc/zabbix/zabbix_agent2.psk

If you enabled TLS PSK, generate a pre-shared key:

sudo openssl rand -hex 32 | sudo tee /etc/zabbix/zabbix_agent2.psk
sudo chmod 640 /etc/zabbix/zabbix_agent2.psk
sudo chown zabbix:zabbix /etc/zabbix/zabbix_agent2.psk

Save the file and restart the agent to apply changes:

sudo systemctl restart zabbix-agent2

Step 4: Open Firewall Ports

If UFW is active, allow the Zabbix agent port:

sudo ufw allow 10050/tcp comment "Zabbix Agent passive checks"
sudo ufw reload
sudo ufw status | grep 10050

For iptables:

sudo iptables -A INPUT -p tcp --dport 10050 -j ACCEPT

Test connectivity from the Zabbix Server to the agent:

# Run this on the Zabbix Server
zabbix_get -s 192.168.1.50 -k agent.version

If successful, this returns the agent version (e.g., 7.0.0). If it times out, check firewall rules and that the Server= directive in the agent config includes the Zabbix Server IP.

Step 5: Add the Host in Zabbix Server Web UI

Open your Zabbix Server web interface and navigate to Data collection > Hosts, then click Create host in the top right.

Zabbix Server hosts configuration page

Click Create host in the top right corner.

Zabbix create host button

Fill in the host details:

  • Host name – must match the Hostname value in zabbix_agent2.conf exactly (e.g., debian-web-01)
  • Host groups – assign to “Linux servers” or create a custom group
  • Interfaces – click Add, select Agent, enter the agent host’s IP address and port 10050
Zabbix add host form with agent interface configuration

Step 6: Assign Monitoring Templates

Templates define what metrics Zabbix collects from the host. After creating the host, click on it under Data collection > Hosts, then navigate to the Templates tab.

Zabbix host list showing newly added Debian host

Click on the host, go to the Templates tab, and search for these recommended templates:

  • Linux by Zabbix agent – CPU, memory, disk, network, filesystem metrics
  • Zabbix agent – agent availability and responsiveness
  • Linux filesystems by Zabbix agent – detailed per-mount filesystem monitoring
Zabbix template selection for Linux monitoring

Click Select to browse available templates, pick the ones you need, then click Update to save.

Zabbix template list with Linux templates
Zabbix host update with templates applied

Step 7: Verify Monitoring is Working

After a few minutes, the host availability icon under Data collection > Hosts should turn green (ZBX), indicating the agent is communicating with the server.

Zabbix host list showing active monitoring status

To view collected data, go to Monitoring > Latest data, filter by your host name, and you should see metrics flowing in for CPU, memory, disk usage, and network traffic.

You can also check the agent logs for any connection issues:

sudo tail -f /var/log/zabbix/zabbix_agent2.log

Troubleshooting Zabbix Agent on Debian

Agent shows “red” ZBX icon (unavailable):

  • Verify the Server= line in agent config contains the Zabbix Server IP
  • Check firewall: sudo ufw status – port 10050 must be open
  • Test from server: zabbix_get -s AGENT_IP -k agent.ping should return 1

Hostname mismatch error in logs:

  • The Hostname in zabbix_agent2.conf must match the Host name field in the Zabbix web UI exactly – case sensitive

No data for some metrics:

  • Some items require the zabbix user to have read access to system files. Check permissions with: sudo -u zabbix cat /proc/stat
  • For Docker monitoring, add the zabbix user to the docker group: sudo usermod -aG docker zabbix

Conclusion

You now have Zabbix Agent 2 running on Debian 13/12, connected to your Zabbix Server, and actively collecting system metrics. For production environments, enable TLS PSK encryption between agent and server, set up trigger actions for alerting on critical thresholds (disk full, high CPU, service down), and consider deploying Zabbix Agent on your Ubuntu servers as well for full infrastructure coverage.

Related guides:

3 COMMENTS

  1. Thanks for this very detailed tutorial, but I’m puzzled, on Step 3 you say “Open up the Zabbix agent file and make sure that the following options are set at a minimum” shouldn’t you al teast mention where that file is? I mean, this seems like something for begginers, so those like me who have no idea what file are you talking about…

  2. Are changes made only in the zabbix agent? Do I need to make any changes to the zabbix_agentd.conf configuration file of the zabbix server? The zabbix server file has the following configuration:

    Server=127.0.0.1
    #ListenPort=10050
    #ListenIP=0.0.0.0
    ServerActive=127.0.0.1
    Hostname=Zabbix server

    Only ListenPort and ListenIP are commented out.

LEAVE A REPLY

Please enter your comment!
Please enter your name here