×


Install Zabbix Agent on Ubuntu 20.04 - Step by Step Process ?

The Zabbix Agent provides us with remote system monitoring services for Linux and Windows-based systems.

A Zabbix Agent installed on a remote machine collects the CPU, memory, disk usage, and network bandwidth-related data from a system and sends it to the Zabbix Server.
Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related Server Monitoring queries on Ubuntu Linux Server.
In this context, we shall look into performing Zabbix Agent installation on a Ubuntu 20.04 system.

How to Install Zabbix Agent on Ubuntu 20.04 ?

To install  Zabbix Agent on your Ubuntu 20.04 system, you will have to perform the following steps.

1. Update your Ubuntu 20.04 System:

To update your Ubuntu 20.04 system before installing the Zabbix Agent on it, you will have to run the command shown below in your system's terminal:

$ sudo apt update

This command will perform a thorough analysis of all those packages and dependencies present on your system that need an update and then updates them accordingly.

2. Add the Zabbix Agent's Repository to your Ubuntu 20.04 System:

Now, you need to the repository of the Zabbix Agent to your Ubuntu 20.04 system.
This can be done with the following command:

$ wget https://repo.zabbix.com/zabbix/5.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_5.0-1+focal_all.deb

The Zabbix Agent's repository will be added to your Ubuntu 20.04 system within the blink of an eye after executing this command.

3. Enable the Zabbix Agent's Repository on your Ubuntu 20.04 System:

After adding the Zabbix Agent's repository to your Ubuntu 20.04 system, you need to enable it by executing the command shown below:

$ sudo dpkg –i zabbix-release_5.0-1+focal_all.deb


4. Update your Ubuntu 20.04 System Again:

When the Zabbix Agent's repository has been added successfully to your Ubuntu 20.04 system, you need to update it again for the said changes to take effect by executing the command shown below:

$ sudo apt update

After updating your Ubuntu 20.04 system again, you will be able to install the Zabbix Agent on it by following the next step.

5. Install the Zabbix Agent on your Ubuntu 20.04 System:

To install the Zabbix Agent on your Ubuntu 20.04 system, you will have to execute the command shown below:

$ sudo apt install zabbix-agent

Once this command completes its execution, the Zabbix Agent will be successfully installed on your Ubuntu 20.04 system.

6. Check the Active Status of the Zabbix Agent on your Ubuntu 20.04 System:

To verify the successful installation of the Zabbix Agent on your Ubuntu 20.04 system, you can check its status by executing the following command in your system's terminal:

$ sudo systemctl status zabbix-agent

You can easily verify from the output of the above command that the status of the Zabbix Agent is "active (running)" on our Ubuntu 20.04 system.

How to Uninstall Zabbix Agent from Ubuntu 20.04 ?

To uninstall the Zabbix Agent from your Ubuntu 20.04 system, you will have to execute the command shown below:

$ sudo apt-get purge zabbix-agent

Finally, you can also execute the command shown below to remove all the irrelevant packages and dependencies on your Ubuntu 20.04 system:

$ sudo apt-get autoremove


[Need urgent assistance in fixing Missing Packages on Debian Linux Systems? We can help you. ]


Conclusion

This article covers how to install the Zabbix Agent on a Ubuntu 20.04 system very conveniently.
You can ensure the successful installation of the Zabbix Agent by checking its Active status on your system. However, you can also uninstall it anytime you want.
Zabbix agent is installed on the remote host (target) to monitor the hard drive, memory processor, etc. The agent collects data and sends back to Zabbix Server.
Zabbix agents can use passive or active checks to pass information.
In passive check, Zabbix server (poller) requests an agent for certain information, and the agent sends back a value.
In the active check, the agent process all data and pushes it to the Zabbix server.
However, agent periodically connects the server to collect metric which needs to be monitored.


To Configure Zabbix agent:
Make necessary changes on the Zabbix Agent configuration file "/etc/zabbix/zabbix_agentd.conf".
After making changes, Save the changes and exit the file.
Then restart Zabbix agent service to the changes to be effected.

$ sudo systemctl restart zabbix-agent


To Configure the firewall on Zabbix agent:
1. If you have UFW firewall enables, execute the commands:

$ sudo ufw allow 10050/tcp

2. Then reload the firewall

$ sudo ufw reload

3. And verify that the port has been opened or allowed on the firewall.

$ sudo ufw status