Zabbix is a robust enterprise-grade tool used to provide real-time monitoring of networks and tracking applications and systems. The Zabbix core is written in C and Java languages with a PHP frontend. Zabbix is more essential as it helps identify faults and errors as soon as they occur on a system and also sends alerts to the response team. By doing this, business continuity is guaranteed.

The Zabbix uses a server/client architecture where the server communicates to the native clients called Zabbix agents. The agent systems can be Windows, Linux, or NIX systems.

Zabbix 6.0 LTS offers the below features:

  • Machine learning for baseline monitoring with advanced anomaly detection.
  • High availability, performance and scalability – Zabbix 6.0 LTS has proxies to provide automatic load balancing and HA, native HA setup for Zabbix Server, a scalable history storage and API performance improvements.
  • Event correlation and enterprise alarm console – It has the ability to perform event filtering, de-duplication and aggregation using event preprocessing rules, the ability to manually hide and suspend problems for a period of time as well as a problem view that is optimised for faster problem resolution and collaborative work.
  • Business service monitoring (BSM) with support for alerting on service status changes, multi-tenancy for Services, impact analysis, import/export for service tree, ability to scale to 100K of business services e.t.c
  • Advanced visualization and reporting – this comprises of stacked graphs, graph annotations, advanced host status widgets, events over time widget, geographical maps e.t.c
  • Security improvements with password complexity policy for Zabbix UI and audit log for all user and API operations being added.

This guide aims to illustrate how to install and configure Zabbix 6.0 LTS on Ubuntu 20.04|18.04.

Setup requirements:

For this guide, there are multiple packages required that include:

  • PHP
  • Apache web server
  • MySQL/ MariaDB database server

1. Update System

Update all your available packages to their latest versions:

sudo apt update && sudo apt -y full-upgrade

Check if a reboot is required after the upgrade:

[ -f /var/run/reboot-required ] && sudo reboot -f

Now follow the below steps to install all the above packages as well as Zabbix 6.0 LTS on Ubuntu 20.04|18.04.

2. Install MariaDB Database Server

Zabbix 6.0 LTS requires MariaDB version and above. In this guide, we will install latest stable MariaDB 10 using the steps below.

Update the system and install MariaDB server package.

curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setup
sudo bash mariadb_repo_setup
sudo apt update
sudo apt -y install mariadb-server mariadb-client

Once installed, log in to the shell.

sudo mysql -u root

Now create a database for Zabbix 6.0 LTS.

CREATE DATABASE zabbix character set utf8mb4 collate utf8mb4_bin;
GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED by 'ZabbixDBPassw0rd';
FLUSH PRIVILEGES; 
QUIT 

3. Install Zabbix 6 Server

Before we proceed to the installation, we need to add the Zabbix 6.0 repositories to our Ubuntu 20.04|18.04 system.

  • On Ubuntu 20.04
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-4%2Bubuntu20.04_all.deb
sudo dpkg -i zabbix-release_6.0-4+ubuntu20.04_all.deb
sudo apt update
  • On Ubuntu 18.04
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.0-4%2Bubuntu18.04_all.deb
sudo dpkg -i zabbix-release_6.0-4+ubuntu18.04_all.deb
sudo apt update

Now proceed and install the Zabbix 6.0 LTS server and agent packages as below:

sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent php-mysql

The installed packages include Zabbix agent and server, the Apache config file as well as PHP for Zabbix.

Once installed, verify the installed Zabbix version as below:

$ apt-cache policy zabbix-server-mysql
zabbix-server-mysql:
  Installed: 1:6.0.9-1+ubuntu20.04
  Candidate: 1:6.0.9-1+ubuntu20.04
  Version table:
 *** 1:6.0.9-1+ubuntu20.04 500
        500 https://repo.zabbix.com/zabbix/6.0/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status
     1:4.0.17+dfsg-1 500
        500 https://mirror.hetzner.com/ubuntu/packages focal/universe amd64 Packages

Now import initial schema and data using the command:

sudo zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p'ZabbixDBPassw0rd' zabbix

This process takes a while but once complete, proceed as below.

4. Configure Zabbix 6 Server

Once installed, the Zabbix 6.0 server can be configured by editing the file /etc/zabbix/zabbix_server.conf as below.

$ sudo vim /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=ZabbixDBPassw0rd

configure the Zabbix frontend by editing the apache configuration.

$ sudo vim /etc/php/*/apache2/php.ini 
; http://php.net/date.timezone
date.timezone = Africa/Nairobi

You can configure the Zabbix server to monitor itself as below.

$ sudo vim /etc/zabbix/zabbix_agentd.conf
Hostname=zabbix-server.computingforgeeks.com

Start and enable the Zabbix server, agent, and Apache services as below.

sudo systemctl restart zabbix-server zabbix-agent apache2
sudo systemctl enable zabbix-server zabbix-agent apache2

Alternatively, you can add a separate Zabbix agent using the aid of the below guide.

Allow the below ports through the firewall.

sudo ufw allow proto tcp from any to any port 10050,10051

5. Access Zabbix 6.0 web UI

Access the Zabbix web UI using the URL http://IP address/zabbix/ or http://domain_name/zabbix/

You should be able to see this welcome page:

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04

On the next page, confirm if the requirements are met.

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04 1

Add your database details appropriately.

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04 2

Set the Zabbix server name and theme Zabbix web UI.

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04 3

Now on the preview page, verify that the made configurations are correct and proceed.

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04 4

If everything goes well, you will see the congratulation message below.

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04 5

By clicking Finish, you will be redirected to the login page where you have to log in with the default credentials

Username: "Admin"
Password: "zabbix"

Fill in as below.

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04 6

On successful authentication, you will be granted the Zabbix dashboard.

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04 100

6. Change the Admin Password

Navigate to Administration > Users > Admin > Password > Change Password as below.

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04 8

Enter your preferred admin password and click Update

7. Configure Zabbix Monitoring Target

For this instance, the target host to be monitored is the server itself. Login to the Zabbix admin board, navigate to Configuration > Hosts, you should see the localhost status enabled as below.

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04 9

This shows that the server is ready to be monitored. Wait for a few minutes and the monitoring data will be available. This can be checked using host graphs under Monitoring > Hosts > Server name

Install and Configure Zabbix 6.0 LTS on Ubuntu 20.0418.04 10

That is it!

We have triumphantly gone through how to install and configure Zabbix 6.0 LTS on Ubuntu 20.04|18.04. I hope this was impactful.

See more on this page:

LEAVE A REPLY

Please enter your comment!
Please enter your name here