Zabbix is an IT monitoring solution that aims to monitor all devices and services in the network. To monitor applications, you need to have a Zabbix server installed.
In order to monitor a Linux system using Zabbix, you’ll need to install the Zabbix Agent on it, and this article will teach you how.
You need to have a sudo user account with shell access in order to make changes to your Ubuntu 20.04 LTS system.
Step 1 – Configure Zabbix Repository
The Zabbix team provides an installation service whereby you can enable their apt repositories to install the packages for Zabbix. Add the repository, by executing the following commands, which will also install the necessary packages for the agent software to connect to Zabbix.
sudo dpkg -i zabbix-release_5.0-1+focal_all.deb
Step 2 – Install Zabbix Agent on Ubuntu
As you have successfully added Zabbix apt repositories in your system, let’s use the following command to install Zabbix agent using the following command
sudo apt update sudo apt install zabbix-agent
The agent is installed on your system, make sure it’s updated to the latest version!
The next step is to configure the Zabbix agent to allow connections from your server. For example, your system with the IP address of 220.127.116.11.To update this, edit Zabbix agent configuration file /etc/zabbix/zabbix_agentd.conf:
sudo nano /etc/zabbix/zabbix_agentd.conf
And update below settings:
#Server=[zabbix server ip] #Hostname=[Hostname of client system ] Server=18.104.22.168 Hostname=myServername
Save your file and close it.
Step 3 – Manage Zabbix Service
Now, you need to restart the Zabbix agent service and enable it to start automatically when the system boots up. To do so, run these commands:
sudo systemctl restart zabbix-agent
sudo systemctl enable zabbix-agent
The following commands are used to stop & check the status of the Zabbix agent:
sudo systemctl stop zabbix-agent
sudo systemctl status zabbix-agent
In this tutorial, you learned to install the Zabbix Agent service on Ubuntu 20.04.LTS