Home Linux ServerTools How to install Zabbix Agent on Ubuntu 20.04

How to install Zabbix Agent on Ubuntu 20.04

by Thạch Phạm
Published: Last Updated on
A+A-
Reset

Installing Zabbix Agent on Ubuntu 20.04 with 3 simple steps.

1. Introduction

In the previous tutorial, AZDIGI showed you how to install Zabbix 6.0 on Ubuntu 20.4 server. And in this article, AZDIGI will continue to introduce and guide you on Zabbix’s monitoring with the entire Infrastructure – Linux systems, Windows servers, network routers, network switches, etc.

Zabbix Agent is a program developed in C language. Zabbix Agent is installed on servers or client-side devices. Thereby, Zabbix Agent will collect the necessary information from the client computer that needs to be monitored, checked and collected data related to CPU, Memory, Disk and Network interface… or other administrator requirements, then send the results back to Zabbix Server.

How Zabbix Agent works

Zabbix Agent can perform both passive testing (polling) and active testing (trapping). Testing can be done at intervals or based on a time-specific schedule. This is the difference between passive and active testing.

  • Passive test: Zabbix Server will send the request to Zabbix Agent. The Zabbix Agent will process that request and return the result to the Zabbix Server.
  • Active test: This type makes the processing request more complicated. The Zabbix Agent will have to retrieve the list of items to be processed for independent processing. Then, it will periodically return the results to Zabbix Server.

The image below is a detailed description of Zabbix Agent, so you can visualize the passive and active testing activities.

How to install Zabbix Agent on Ubuntu 20.04

2. Implementation Guide

To start installing Zabbix Agent, you first need to SSH into the Client‘s computer to be monitored with Root privileges. And follow the steps below to install all necessary services.

Step 1: Add the Zabbix repository

  • Add the Zabbix repository with the following command:
AZDIGI Tutorial
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-1+ubuntu20.04_all.deb
sudo dpkg -i zabbix-release_6.0-1+ubuntu20.04_all.deb
    
How to install Zabbix Agent on Ubuntu 20.04

Step 2: Install and Configure Zabbix Agent

  • You proceed to install the following packages:
AZDIGI Tutorial
sudo apt update
sudo apt install zabbix-agent
    
How to install Zabbix Agent on Ubuntu 20.04
  • Open and edit the Zabbix Agent configuration file at: /etc/zabbix/zabbix_agentd.conf as follows:

For example:

IP Zabbix Server = 45.252.248.159 : replace your IP in the IP_Zabbix_Server section.


Server=IP_Zabbix_Server
ServerActive=IP_Zabbix_Server
Hostname=Hostname_của_máy_Client
CleanShot 2022 04 23 at 08.38.15
  • Restart Zabbix Agen to apply the configuration
AZDIGI Tutorial
sudo systemctl restart zabbix-agent
sudo systemctl enable zabbix-agent
sudo systemctl status zabbix-agent
    
  • Open Port
AZDIGI Tutorial
sudo ufw allow 10050/tcp
    

So AZDIGI has shown you how to install Zabbix Agent in Ubuntu 20.4 and briefly how to add Host to Zabbix. In the next articles, AZDIGI will guide more specific templates and monitor each component in more detail.

You can refer to other instructions at the link below:

If you need assistance, you can contact support in the ways below:

Đánh giá

Tham gia nhóm hỗ trợ Server - Hosting

Tham gia nhóm Hỗ trợ Server - Hosting & WordPress để cùng nhau hỏi đáp và hỗ trợ các vấn đề về WordPress, tối ưu máy chủ/server.

Tham gia ngay

Bài viết cùng chuyên mục

AZDIGI – Không chỉ là đơn vị hàng đầu trong lĩnh vực Web Hosting và Máy chủ, chúng tôi mong muốn mang lại những kiến thức bổ ích nhất và luôn cập nhật thường xuyên cho cộng đồng người đam mê thiết kế website, công nghệ,…

Vui lòng không sao chép nội dung nếu chưa xin phép. Designed and Developed by PenciDesign