Installing Zabbix Agent on Ubuntu 18.04/16.04 LTS

The steps for installing a Zabbix agent on Ubuntu 18.04 and 16.04 LTS are as follows:

Zabbix agent must be installed on all remote systems you want to monitor; this is done through the Zabbix server. The Zabbix agent is used to monitor resources and applications on the client system and report such information to the Zabbix server.

You can configure two types of checks between the Zabbix server and

  • Passive check – The Zabbix Agent will only send data to the server on demand

  • Active check – The Zabbix Agent collects data and sends it periodically to the Server.

After you’ve installed the Zabbix server on your server, this article will help you install the Zabbix agent on ubuntu 18.04 and 16.04 systems. After completing the below steps, go to the next article and add a new host (i.e. Zabbix server)

Step 1 – Enable Apt Repository

Zabbix’s official website has Zabbix apt repositories. Add the repository to install the required packages for the Zabbix agent using this command: The earlier version of Ubuntu 12.04 LTS can download and install Zabbix agent version 2.2

For Ubuntu 18.04 (Bionic):

wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-3+bionic_all.deb
sudo dpkg -i zabbix-release_4.0-3+bionic_all.deb

For Ubuntu 16.04 (Xenial):

wget https://repo.zabbix.com/zabbix/4.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_4.0-3+xenial_all.deb
sudo dpkg -i zabbix-release_4.0-3+xenial_all.deb

Step 2 – Install Zabbix Agent

As you’ve successfully added Zabbix apt repositories to your system, the following command will install the Zabbix agent.

sudo apt-get update sudo apt-get install zabbix-agent

Step 3 – Configure Zabbix Agent

After installing the Zabbix agent. Edit Zabbix agent configuration file /etc/Zabbix/zabbix_agentd.conf and update Zabbix server IP.

sudo vi /etc/zabbix/zabbix_agentd.conf
#Server=[zabbix server ip] 
#Hostname=[Hostname of client system ]

Server=182.188.12.10 
Hostname=Server2

Here 182.188.12.10 is the IP of the Zabbix server to allow for connection with this Zabbix client.

Step 4 – Restart Zabbix Agent

After adding the Zabbix server’s IP address in the configuration file, run the below command to start agent service again.

sudo systemctl enable zabbix-agent
sudo systemctl start zabbix-agent

To start and stop zabbix-agent service anytime use the following commands.

sudo systemctl stop zabbix-agent
sudo systemctl status zabbix-agent

Congratulations! You’ve just installed the Zabbix Agent. To add a host to be monitored, follow these steps:

Leave a Comment