Nội dung
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.
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:
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
Step 2: Install and Configure Zabbix Agent
- You proceed to install the following packages:
sudo apt update sudo apt install zabbix-agent
- 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
- Restart Zabbix Agen to apply the configuration
sudo systemctl restart zabbix-agent sudo systemctl enable zabbix-agent sudo systemctl status zabbix-agent
- Open Port
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:
- Hotline 247: 028 888 24768 (Ext 0)
- Ticket/Email: You use the email to register for the service and send it directly to: support@azdigi.com .