Master Zabbix: From Core Concepts to Full Installation on Debian/Ubuntu
This guide introduces Zabbix's monitoring architecture, key features, step‑by‑step installation on Debian/Ubuntu, configuration of server, database, and agents, plus essential troubleshooting commands for a reliable monitoring setup.
What is Zabbix
Zabbix is an enterprise‑grade, open‑source distributed monitoring solution designed to track the performance and availability of network devices, servers, services, and other IT resources.
Key Features
2.1 Resource Discovery and Monitoring
Zabbix automatically discovers network entities and server resources via built‑in auto‑discovery. It can monitor virtually anything—from low‑level devices to cloud services—using ready‑made templates.
Supported monitoring methods include:
Agent‑based monitoring: uses Zabbix agents to collect detailed host‑level metrics.
Agent‑less monitoring: via SNMP, IPMI, SSH, Telnet, and custom checks.
Web monitoring: tracks web service performance and availability.
Database monitoring: directly monitors database performance metrics.
The server architecture includes dedicated worker processes such as pollers, traps, and preprocessors to handle data collection and processing.
2.2 Data Collection and Processing
Zabbix gathers metrics from devices, operating systems, virtualization platforms, container platforms (Docker, Kubernetes), cloud infrastructure, databases, web applications, and APIs. Collected data is processed and stored for:
Real‑time problem detection with correlation.
Trend analysis and forecasting.
SLA monitoring and reporting.
Custom calculations and transformations.
Installation
Installation on Debian/Ubuntu:
# Import Zabbix repository package
wget https://repo.zabbix.com/zabbix/6.0/ubuntu/pool/main/z/zabbix/zabbix-release_6.0-1+ubuntu$(lsb_release -rs)_all.deb
dpkg -i zabbix-release_6.0-1+ubuntu$(lsb_release -rs)_all.deb
apt update
# Install Zabbix server, frontend, and agent
apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
# (Optional) Install MySQL server
apt install mysql-server3.1 Database Setup
After installing Zabbix or compiling from source, configure the database:
# MySQL/MariaDB setup
# Login to MySQL
mysql -uroot -p
# Create database and user
create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user 'zabbix'@'localhost' identified by 'password';
grant all privileges on zabbix.* to 'zabbix'@'localhost';
flush privileges;
quit;
# Import initial schema and data
zcat /usr/share/doc/zabbix-sql-scripts/mysql/create.sql.gz | mysql -uzabbix -p zabbix3.2 Configure Zabbix Server
Edit the server configuration file: vi /etc/zabbix/zabbix_server.conf Set the following parameters:
# Database connection
DBName=zabbix
DBUser=zabbix
DBPassword=password
# Optional: database host if not localhost
# DBHost=database_host
# Optional: database port if not default
# DBPort=33063.3 Configure Zabbix Agent
Edit the agent configuration file:
vi /etc/zabbix/zabbix_agentd.conf
# Server connection
Server=zabbix_server_ip
ServerActive=zabbix_server_ip
# Hostname must be unique in Zabbix
Hostname=name_of_this_host3.4 Start Zabbix Services
# Start services
systemctl start zabbix-server zabbix-agent
systemctl enable zabbix-server zabbix-agent
# Restart web server
systemctl restart apache2 # Debian/Ubuntu
systemctl restart httpd # RHEL/CentOSAccess the web interface at http://your_server_ip/zabbix.
4. Troubleshooting
If issues arise during installation, follow these steps:
1. Check logs:
tail -f /var/log/zabbix/zabbix_server.log
tail -f /var/log/zabbix/zabbix_agentd.log2. Verify services are running:
systemctl status zabbix-server
systemctl status zabbix-agent3. Test database connectivity:
# MySQL
mysql -uzabbix -p -e "SHOW DATABASES;"
# PostgreSQL
sudo -u zabbix psql -l4. Check web server configuration:
# Apache
apachectl -t
# Nginx
nginx -tEfficient Ops
This public account is maintained by Xiaotianguo and friends, regularly publishing widely-read original technical articles. We focus on operations transformation and accompany you throughout your operations career, growing together happily.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
