Install Zabbix Agent2 Version 5.4 on Debian 10/11

Get the package for Debian 10 Buster:

wget https://repo.zabbix.com/zabbix/5.4/debian/pool/main/z/zabbix-release/zabbix-release_5.4-1%2Bdebian10_all.deb

Install the repo for Debian 10 Buster

dpkg -i zabbix-release_5.4-1+debian10_all.deb

Get the package for Debian 11 Bulleye

wget https://repo.zabbix.com/zabbix/5.4/debian/pool/main/z/zabbix-release/zabbix-release_5.4-1%2Bdebian11_all.deb

Install the repo for Debian 11 Bullseye

dpkg -i zabbix-release_5.4-1+debian11_all.deb
apt update
apt full-upgrade

For Agent 2

apt install zabbix-agent2

We now need to edit the configuration file to tell the agent where to find the server. Open /etc/zabbix/zabbix_agent2.conf in your preferred text editor and make the following changes to tell the agent which Zabbix servers are allowed to talk to it:

nano /etc/zabbix/zabbix_agent2.conf
Server=[IP or hostname of your Zabbix server]
ServerActive=[IP or hostname of your Zabbix server]

We also need to tell Zabbix the hostname of the system. This doesn’t have to be the actual hostname, it is the display name we will use within Zabbix for the system. Comment out the default value of Hostname=Zabbix server and replace it with the following:

HostnameItem=system.hostname

This will tell the agent to automatically populate the hostname value with the system hostname. You could just set the hostname within the configuration file. However, automatically populating it allows you to reuse the same configuration file across all your hosts, simplifying automation if you have a lot of hosts to monitor.

Start Agent 2

systemctl enable zabbix-agent2
sudo systemctl start zabbix-agent2

Add FW rule:

ufw allow from [Zabbix server IP] to any port 10050 proto tcp

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.