Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Install Zabbix Agent on Ubuntu 20.04

Rumi, June 21, 2023

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.

We will begin by installing Zabbix agent to the remote Ubuntu 20.04 host and later add a host to Zabbix server dashboard.

Step 1: Enable Zabbix repository on remote host

Begin by updating the package lists on the remote host.

sudo apt update

Then download the Zabbix repository Debian file from Zabbix download center as follows.

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

Then enable it using the dpkg command as follows:

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

Next, update the package index to ensure the repository is synced

sudo apt update

Step 2: Install Zabbix agent

Once the repository is in place, install Zabbix agent.

sudo apt install zabbix-agent

Once the installation is complete, check whether the Zabbix-agent daemon is running as follows:

sudo systemctl status zabbix-agent

check status of zabbix-agent

 

Zabbix-agent listens to port 10050. You might want to confirm this using the netstat command:

sudo netstat -pnltu

check port zabbix agent is listening on

The image above is a confirmation that Zabbix agent service is up and running.

Step 3: Configure Zabbix agent

We are satisfied that the Zabbix agent is running as expected. But that is not enough. We need to make a few changes to the configuration file at /etc/zabbix/zabbix_agentd.conf so that Zabbix agent can communicate with the Zabbix server. So open the file.

sudo vim /etc/zabbix/zabbix_agentd.conf

Here we are going to enable passive checks on the agent. First, locate the variable “Server” and “Hostname” in the zabbix_agentd.conf file. For example, My Zabbix server IP is 10.128.0.16 and the hostname (client system) is ubuntu-20.

Server=10.128.0.16
Hostname=ubuntu-20

Save the changes and exit the file. Then restart Zabbix agent service to the changes to be effected.

sudo systemctl restart zabbix-agent

Note if you are configure active check then look for the variable “ServerActive” and uses port 10051.

Step 4: Configure the firewall

The final step in configuring the host is allowing the port that Zabbix agent listens to across the firewall. If you have UFW firewall enables, execute the commands:

sudo ufw allow 10050/tcp

Then reload the firewall

sudo ufw reload

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

sudo ufw status

configure firewall to allow zabbix agent port 10050

Perfect! The zabbix-agent should now be in a position to communicate with the server.

Step 5: Add host on Zabbix server

By default, Zabbix only monitors the server on which it is installed. In this section, we will be adding the Zabbix host on the Zabbix server on the browser.

So, login in to your instance of Zabbix Server on the browser. On the left navigation pane, Click on Configuration > Hosts

start configuring hosts. Navigate to the top-right corner and click on ‘Create host’

  1. Create host
    On the window that appears, fill out the remote host details such as hostname. visible name, IP address, a brief description and click on the ‘Select’ button adjacent to the ‘Groups’ text field.
  2. fill in host details
    On the list that appears , select ‘Linux servers’ and click on the ‘Select’ button.
  3. add host group
    This takes you back and you can view the newly added group as indicated.
  4. Add Linux servers group
    Next, click on the ‘Templates’ tab and click the ‘Select’ button adjacent to the ‘Link new Templates’ text field.
  5. Click on Templates tab
    Click on the ‘Select’ button next to the ‘Host group’ text field as shown.
  6. search host group
    Click on the ‘Templates/Operating systems’ option as shown.
  7. select Templates/Operating systems option
    Then select the ‘Template OS Linux by Zabbix agent’ option and click on ‘Select’.
  8. select template OS Linux by Zabbix agent
  9. Then finally, click on the ‘Add’ button.

    Link new template for Zabbix agent

And voila! your host will be listed on the dashboard as shown.

Src: 

Install Zabbix Agent on Ubuntu 20.04

Administrations Collected Articles Configurations (Linux) UbuntuUbuntu 20ZabbixZabbix Client

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes