Unlock Zabbix: Complete Guide to Features, Architecture, and Hands‑On Deployment on CentOS
This article introduces Zabbix’s core features, flexible data collection, custom alerting, visualization, high‑availability architecture, security auditing, and compares it with Prometheus, then walks through a step‑by‑step installation, configuration, and deployment on a CentOS server.
Zabbix is an enterprise‑grade distributed open‑source monitoring solution that excels in traditional monitoring scenarios with flexible data collection, customizable alert policies, rich visualizations, high availability, and strong scalability.
1. Zabbix Introduction
Zabbix provides web‑based distributed system and network monitoring, supporting multiple collection methods and full‑stack monitoring in complex architectures.
1.1 Zabbix Features
1) Flexible data collection
Zabbix supports automatic discovery, agents, SNMP, JMX, telnet, active and passive modes, custom plugins, and configurable intervals.
Broad data sources : infrastructure, databases, applications, sensors, etc.
Flexible intervals and formats : text, binary, JSON, CSV, and more.
Agent and agent‑less monitoring : Zabbix Agent for deep monitoring; SNMP, IPMI, ODBC, Prometheus for agent‑less scenarios.
Data normalization and conversion : format conversion and validation.
2) Customizable alarm configuration
Zabbix allows setting alarm periods, severity levels, recovery notifications, time‑based thresholds, maintenance windows, multi‑condition alerts, and push notifications to various platforms.
Anomaly detection and trend prediction based on incoming data streams, with custom severity levels.
Push alerts to multiple platforms such as messaging services, email, and other integrations.
Automatic fault remediation for certain scenarios, e.g., auto‑restart or auto‑scaling.
3) Data visualization
Zabbix offers customizable dashboards, network topology maps, panels, and IT service availability charts.
Personalized data displays with drag‑and‑drop, gauges, and various chart types.
Geographical and infrastructure topology visualizations.
Scheduled custom report generation and email delivery.
4) High‑availability and scalability
Zabbix’s monitoring agents have low performance overhead, support proxy‑based distributed monitoring, centralized management, automation, and open APIs for strong extensibility.
Zabbix high‑availability deployment prevents data loss and improves front‑end experience.
Zabbix Proxy enables unlimited scalability in distributed environments.
5) Security and audit
Zabbix provides security audit logs, permission authentication, role‑based user management, encrypted communication, and fine‑grained access control.
Encrypted communication between components with multiple algorithms.
Role‑based user permissions and restrictions.
Sensitive data access restrictions.
Additionally, Zabbix supports rapid local or cloud deployment, seamless integration with various hardware/software platforms, and multi‑tenant management.
1.2 Zabbix Monitoring Methods
Zabbix can monitor Linux, Windows, SNMP devices, and more via agents, SNMP, JMX, IPMI, and custom scripts.
Hardware monitoring (IPMI) : voltage, temperature, fan status, power.
System monitoring (Agent) : low‑overhead data collection, recommended default.
Java monitoring (JMX) : JVM metrics.
Network device monitoring (SNMP) : routers, switches.
Application service monitoring : Agent UserParameter.
MySQL monitoring : percona‑monitoring‑plugins.
URL monitoring : Zabbix web checks.
1.3 Zabbix vs. Prometheus
Prometheus is a modern cloud‑native monitoring tool. Compared with Zabbix, Prometheus offers stronger container and Kubernetes support, while Zabbix provides mature server‑level monitoring with higher stability.
2. Zabbix Architecture
2.1 Overall Architecture
The architecture consists of Zabbix Server, Database, Agents, Proxy (optional), and GUI.
Zabbix Server : core component that receives data from agents, proxies, and stores it.
Zabbix Database : stores all monitoring data.
Zabbix Agents : installed on monitored hosts to collect local metrics.
Zabbix Proxy : optional, aggregates data from many agents to reduce server load.
Zabbix GUI : web front‑end for visualization and configuration.
2.2 Main Zabbix Processes
zabbix_agentd : client daemon for data collection.
zabbix_server : server daemon that processes incoming data.
zabbix_proxy : forwards data from agents to the server.
zabbix_get : tool for remote data retrieval, useful for troubleshooting.
zabbix_sender : actively pushes data from clients.
zabbix_java_gateway : Java monitoring gateway (post‑2.0).
Additional processes include alerter, configuration syncer, data sender, and database watchdog.
2.3 Zabbix Workflow
Zabbix agents periodically collect metrics and send them to the server, which stores them in the database; the web UI then visualizes the data.
Poller mode (active polling) : server actively queries agents or proxies.
Trapper mode (active push) : agents or proxies push data to the server.
2.4 Deployment Models
Server‑Client : simple direct connection, suitable for small environments.
Server‑Proxy‑Client : proxy aggregates data, ideal for medium‑scale, multi‑site setups.
Master‑Node‑Client : each node acts as a server, supporting large, complex topologies.
3. Zabbix Deployment Hands‑On
3.1 Source Installation and Deployment
3.1.1 Deployment Architecture
The deployment uses a Server‑Client architecture where the server connects directly to agents.
3.1.2 Install Server
Zabbix 5.0 is used because Zabbix 6.0+ does not support Server on CentOS 7.
#1、关闭selinux
setenforce 0
#2、关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
#3、准备mysql环境Install repository:
rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpmInstall server, MySQL, and web front‑end:
# yum install zabbix-server-mysql zabbix-agent -yConfigure MySQL database and user:
# mysql -uroot -p -A
create database zabbix character set utf8 collate utf8_bin;
create user 'zabbix'@'%' identified with mysql_native_password by 'password';
grant all privileges on zabbix.* to 'zabbix'@'%';
set global log_bin_trust_function_creators = 1;
exit;Import initial schema:
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbixConfigure server DB password:
DBPassword=passwordSet correct timezone in PHP config:
php_value[date.timezone] = Asia/ShanghaiStart services and enable on boot:
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpmVerify ports:
# netstat -nltp | grep zabbix3.2 Zabbix Web Configuration
Access the web UI at
http://<server_ip>/zabbix, log in with default credentials (Admin / zabbix), and set the interface language to Chinese.
3.3 Agent Installation on Monitored Hosts
Disable SELinux and firewall, install the Zabbix repository, then install the agent:
# yum install zabbix-agent -yEdit
/etc/zabbix/zabbix_agentd.confto point to the server IP, then start and enable the agent:
# systemctl start zabbix-agent
systemctl enable zabbix-agentVerify the agent is listening on port 10050.
3.4 Adding Hosts and Custom Topology
In the Zabbix UI, navigate to Configuration → Hosts to add monitored hosts and assign templates. Use Monitoring → Topology to create custom network maps, inserting items such as
{Zabbix server:net.if.out["ens33"].last(0)}for real‑time metrics.
以上是分布式监控Zabbix的特性介绍、架构流程介绍以及安装部署实战,Zabbix功能相当丰富,需要在实际使用过程中再琢磨熟悉。
Su San Talks Tech
Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.
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.