Zabbix is a powerful open-source monitoring solution for networks, servers, applications, and cloud infrastructure. Properly implemented, it allows real-time monitoring, alerting, trending analysis, and automation.
This guide provides a step-by-step setup for Linux servers, including:
Installation and configuration
Monitoring system metrics, services, and databases
Setting up alerts and notifications
Creating dashboards for enterprise visibility
It’s ideal for DevOps, system administrators, and IT operations teams.
Scenario:
A company hosts multiple Linux servers running web applications and databases.
They experience intermittent server performance issues and want centralized monitoring.
IT admins require real-time alerts for CPU, memory, disk, and service outages.
Trend analysis is needed to plan capacity upgrades.
Solution: Deploy Zabbix server + agents, configure templates, and enable alerting.
Linux server for Zabbix server (Ubuntu 22.04, CentOS 8, Rocky 8)
MariaDB/MySQL or PostgreSQL for Zabbix database
Apache/Nginx web server with PHP
Root or sudo access
Client Linux servers with SSH access
Import Zabbix repository:
wget https://repo.zabbix.com/zabbix/6.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_6.4-1+ubuntu22.04_all.deb
sudo dpkg -i zabbix-release_6.4-1+ubuntu22.04_all.deb
sudo apt update
Install Zabbix server, web frontend, and agent:
sudo apt install zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-agent -y
Create MySQL database for Zabbix:
sudo mysql -u root -p
CREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'StrongPassword!';
GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Import initial schema:
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
Configure Zabbix server:
Edit /etc/zabbix/zabbix_server.conf:
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=StrongPassword!
Start services:
sudo systemctl enable zabbix-server zabbix-agent apache2
sudo systemctl start zabbix-server zabbix-agent apache2
Open browser: http://your-server-ip/zabbix
Follow installation wizard:
Database: MySQL
Database name: zabbix
Username/password: zabbix / StrongPassword!
Finish setup → Login: Admin / zabbix
For Ubuntu:
sudo apt install zabbix-agent -y
sudo systemctl enable zabbix-agent
sudo systemctl start zabbix-agent
For CentOS/AlmaLinux:
sudo dnf install zabbix-agent -y
sudo systemctl enable zabbix-agent
sudo systemctl start zabbix-agent
Verify connectivity:
telnet zabbix-server-ip 10050
Navigate to Configuration → Hosts → Create Host
Enter:
Host name, visible name, groups (e.g., Linux servers)
Agent interface → server IP and port 10050
Link templates → Template OS Linux by Zabbix agent
Save configuration
Default Zabbix templates monitor:
CPU utilization
Memory usage
Disk usage
Network interfaces
Running processes
Add custom items:
Monitor MySQL/MariaDB:
zabbix_get -s client-server-ip -k mysql.ping
Disk IO:
vfs.dev.read[/,bytes]
Go to Configuration → Actions
Create a new action:
Trigger → CPU utilization > 80%
Operation → Send email/Slack
Slack integration example:
curl -X POST -H 'Content-type: application/json' --data '{"text":"High CPU Alert on Server1"}' https://hooks.slack.com/services/XXXX/XXXX/XXXX
Go to Monitoring → Dashboards → Create Dashboard
Add widgets:
Graphs (CPU, Memory, Network)
Latest events
Trigger status
Maps for network topology
Benefit: Visualize health of all servers at a glance.
Scenario: Production web server experiencing high load
Zabbix triggers CPU alert → sends Slack notification
Admin connects → identifies high PHP-FPM processes
Optimizes database queries → CPU normalizes
Historical graphs → confirm peak usage times → plan scaling
Enable auto-registration for new hosts
Use templates for standardized monitoring
Set thresholds and triggers based on real server behavior
Integrate alerting with Slack, PagerDuty, or email
Regularly backup Zabbix configuration and database
Centralized monitoring for multiple Linux servers
Proactive alerting → reduces downtime
Historical trends → capacity planning
Scalable for enterprise environments
Easy integration with automation tools
💡 Pro Tip: Combine Zabbix with Prometheus exporters for hybrid cloud monitoring, and integrate Grafana dashboards for advanced visualization.