This tutorial has been created to help users install Zabbix Agent on Debian 10 (Buster) Linux. In our previous guide, we installed and configured Zabbix Server on Debian Buster ready to start receiving data from clients for it to monitor. This is exactly what we are going to accomplish in this session. We are going to install Zabbix Agent in Debian 10 then monitor it using our cool server. Let us get on with it.
Step 1: Add Zabbix repository to Debian system
We will use packages in Zabbix’s repository to get our agent installed. Let us add this repository.
Add Zabbix repository on Debian 11:
wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-2+debian11_all.deb
sudo dpkg -i zabbix-release_5.0-2+debian11_all.deb
sudo apt update
Add Zabbix repository on Debian 10:
wget https://repo.zabbix.com/zabbix/5.0/debian/pool/main/z/zabbix-release/zabbix-release_5.0-1+buster_all.deb
sudo dpkg -i zabbix-release_5.0-1+buster_all.deb
sudo apt update
Step 2: Install Zabbix Agent on Debian 11 / Debian 10
Zabbix Server uses an agent or SNMP to monitor its clients. Let us explore how it uses the agent.
Install Zabbix Agent on Debian Linux
sudo apt update
sudo apt install zabbix-agent
Start and enable Zabbix agent
sudo systemctl enable zabbix-agent
sudo systemctl start zabbix-agent
Step 3: Configure Zabbix Agenton Debian 11 / Debian 10
Open up the Zabbix agent file:
sudo vim /etc/zabbix/zabbix_agentd.conf
Make sure that the following options are set at a minimum.
Server=172.18.36.77 # Incoming connections will be accepted only from the hosts listed here.
ListenPort=10050 # Agent will listen on this port for connections from the server
ListenIP=0.0.0.0 # List of comma delimited IP addresses that the agent should listen on
ServerActive=172.18.36.77 # List of comma delimited IP:port pairs of Zabbix servers and Zabbix proxies for active checks
Hostname=Zabbix server2 # Optional name for the server to be monitored
Step 4: Allow Listening ports on the firewall
If you have ufw firewall running, allow necessary ports as shown below
sudo ufw allow 10050
sudo ufw reload
Step 5: Add the host in Zabbix Server
Launch your Zabbix Server on your favorite browser and navigate as follows
Configuration > Hosts
Click on “Create Host” on the top right corner
Fill-up the form accordingly. Please note that the “Host name” part must match what you entered in the “Hostname” field in the agent configuration file.
Click on “Add” button when you are done as illustrated above.
Step 6: Add templates
Once you are done adding the host, the next step is to create templates which guides Zabbix Server on what you would wish to monitor in your client. We are going to add one template as an example.
Navigate to the Templates page
Once you add your host, you should see it populate under Configuration > Hosts page as shown below
Click in the Server you would wish to add templates then click on “Templates” option as illustrated below.
Click on “Select” button to load a plenteous list of templates to choose from.
After you are done, simply click on “Update” to update the details of the server to be monitored.
And we are done!
Conclusion
Now we have our server with the Zabbix agent being monitored. There are plenty of other features that Zabbix provides such as alerts, problem detection and many more. Visit Zabbix Webpage to get more details.
Other guides you may wish to digest include