Tổng Hợp VPS

Monitoring stack: Zabbix vs Grafana + Prometheus 2026

So sánh sâu 2 stack monitoring phổ biến nhất 2026 - Zabbix all-in-one vs Grafana + Prometheus modular. Setup, performance, alerting, cost, học liệu, và khuyến nghị theo quy mô.

Đội ngũ TND Cập nhật Đăng 8 phút đọc 3 khối lệnh

Monitoring stack: Zabbix vs Grafana + Prometheus 2026
Mục lục bài viết
  1. Tại sao monitoring là bắt buộc với production?
  2. Tổng quan 2 stack
  3. Zabbix - all-in-one cho infra hỗn hợp
  4. Grafana + Prometheus - modular cho cloud-native
  5. Performance benchmark thực tế
  6. Khung quyết định
  7. Cost so sánh (vận hành 500 host, 1 năm)
  8. Alerting best practice
  9. TND managed monitoring

So sánh sâu 2 stack monitoring phổ biến nhất 2026 - Zabbix all-in-one vs Grafana + Prometheus modular. Setup, performance, alerting, cost, học liệu, và khuyến nghị theo quy mô.

Tại sao monitoring là bắt buộc với production?

Một production system không có monitoring giống như lái xe không có đồng hồ tốc độ + đèn báo xăng. Bạn chỉ biết "có vấn đề" khi khách hàng gọi điện than phiền - lúc đó đã mất uptime, mất tiền, mất trust.

Monitoring giải quyết 4 câu hỏi cốt lõi:

  • Is it up? - Service đang chạy hay đã chết
  • Is it healthy? - Response time, error rate có bình thường
  • Is it busy? - CPU, memory, disk, network có đang cận capacity
  • What changed? - Khi có sự cố, cái gì đã thay đổi trước đó

"Monitoring không phải để biết khi nào sập. Nó để biết trước 30 phút trước khi sập, đủ thời gian fix." - Phương châm SRE TND.

Tổng quan 2 stack

Tiêu chíZabbix 7Grafana + Prometheus
LicenseGPL v2 (open-source 100%)AGPL (Grafana) + Apache 2.0 (Prometheus)
ArchitectureMonolithic (server + DB)Modular (Prom + Grafana + Alertmanager + exporters)
Data modelTime-series in MySQL/PostgreSQL/TimescaleDBTSDB native (Prometheus tự lưu)
Data collectionAgent push/pull, SNMP, IPMI, JMX, ICMPPull-based (scrape /metrics endpoint)
AlertingBuilt-in, advanced trigger expressionAlertmanager (separate component)
DashboardBuilt-in (UI cũ hơn)Grafana (UI đẹp, customizable)
Setup time1-4 giờ4-16 giờ
Learning curveTrung bìnhCao (PromQL)
Container/K8s nativeCó nhưng không tối ưuNative, chuẩn industry
Network device monitoringMạnh nhất (SNMP, traps)Yếu (cần snmp_exporter)
Resource footprint (1000 host)~4 vCPU / 8GB RAM~6 vCPU / 16GB RAM

Zabbix - all-in-one cho infra hỗn hợp

Zabbix ra đời 2001 (Alexei Vladishev), phiên bản 7.0 LTS (2024) là phiên bản mới nhất. Điểm mạnh: một server lo tất cả - collect, store, visualize, alert.

Ưu điểm

  • Setup nhanh: 1 server cài Zabbix + MySQL → xong trong 1 giờ
  • Agent đa nền tảng: Linux, Windows, BSD, AIX, Solaris, macOS
  • SNMP siêu mạnh: Monitor switch Cisco, router Mikrotik, UPS, IPMI server
  • Auto-discovery: Quét subnet, tự thêm host mới
  • Template lib: 500+ template sẵn cho mọi service phổ biến
  • UI VN-friendly: Hỗ trợ tiếng Việt
  • Free trọn đời: Không tier paid bị giới hạn feature

Nhược điểm

  • UI thiết kế cũ - không đẹp bằng Grafana
  • Custom dashboard phức tạp hơn - phải dùng widget có sẵn
  • Scale lên > 10K host cần Zabbix Proxy + DB tuning
  • Không phải first-class citizen của container/K8s world
  • Trigger expression khó viết hơn PromQL khi logic phức tạp

Setup Zabbix tối thiểu trên VPS TND

TerminalZabbix - all-in-one cho infra hỗn hợpbash
# Trên Ubuntu 22.04 VPS TND (2vCPU/4GB RAM đủ cho 50-100 host) # 1. Install Zabbix repowget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-2+ubuntu22.04_all.debdpkg -i zabbix-release_7.0-2+ubuntu22.04_all.debapt update # 2. Install componentsapt install -y zabbix-server-mysql zabbix-frontend-php   zabbix-nginx-conf zabbix-sql-scripts zabbix-agent mysql-server # 3. Setup databasemysql -uroot < <EOFCREATE DATABASE zabbix CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;CREATE USER 'zabbix'@'localhost' IDENTIFIED BY 'StrongPassword123!';GRANT ALL ON zabbix.* TO 'zabbix'@'localhost';SET GLOBAL log_bin_trust_function_creators = 1;EOF # 4. Import schemazcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz |   mysql -uzabbix -p zabbix # 5. Configure + startsed -i 's/# DBPassword=/DBPassword=StrongPassword123!/'   /etc/zabbix/zabbix_server.confsystemctl enable --now zabbix-server zabbix-agent nginx php8.1-fpm # 6. Access UI: http://your-server-ip/zabbix# Default login: Admin / zabbix

Grafana + Prometheus - modular cho cloud-native

Prometheus (CNCF graduated 2018) + Grafana (founded 2014) là combo chuẩn của Kubernetes world. Architecture pull-based + service discovery khiến nó hoàn hảo cho microservices.

Ưu điểm

  • Native K8s: Auto-discover pod, service qua K8s API
  • PromQL mạnh: Query language built cho time-series, dễ làm aggregation, rate, derivative
  • Grafana dashboard: UI/UX hàng đầu, share dashboard JSON dễ
  • Ecosystem khổng lồ: 1000+ exporter cho mọi service (PostgreSQL, Redis, Nginx, Kafka...)
  • Long-term storage: Tích hợp Thanos, Mimir cho retention > 1 năm
  • Multi-tenancy: Tốt cho service provider, agency

Nhược điểm

  • Setup phức tạp - cần Prometheus + Grafana + Alertmanager + exporters tách rời
  • PromQL learning curve cao - junior dev mất 2-4 tuần để master
  • SNMP support yếu - không hợp cho network device monitor
  • Storage local chỉ cho ~15 ngày - cần Thanos/Mimir cho long-term
  • Windows support yếu - windows_exporter feature limited

Setup Grafana + Prometheus với Docker Compose

File cấu hìnhGrafana + Prometheus - modular cho cloud-nativeyaml
# docker-compose.yml - chạy trên VPS TND 2vCPU/4GBversion: '3.8'services:  prometheus:    image: prom/prometheus:v2.51.0    volumes:      - ./prometheus.yml:/etc/prometheus/prometheus.yml      - prom_data:/prometheus    command:      - '--config.file=/etc/prometheus/prometheus.yml'      - '--storage.tsdb.retention.time=15d'    ports: ["9090:9090"]   grafana:    image: grafana/grafana:10.4.0    ports: ["3000:3000"]    environment:      - GF_SECURITY_ADMIN_PASSWORD=StrongPassword123!    volumes:      - graf_data:/var/lib/grafana   node_exporter:    image: prom/node-exporter:v1.7.0    network_mode: host    pid: host    volumes:      - '/:/host:ro,rslave'   alertmanager:    image: prom/alertmanager:v0.27.0    ports: ["9093:9093"]    volumes:      - ./alertmanager.yml:/etc/alertmanager/alertmanager.yml volumes:  prom_data:  graf_data:
File cấu hìnhGrafana + Prometheus - modular cho cloud-nativeyaml
# prometheus.ymlglobal:  scrape_interval: 15s  evaluation_interval: 15s scrape_configs:  - job_name: 'node'    static_configs:      - targets: ['localhost:9100']   - job_name: 'app'    metrics_path: '/metrics'    static_configs:      - targets: ['app1:8080', 'app2:8080'] alerting:  alertmanagers:    - static_configs:        - targets: ['alertmanager:9093'] rule_files:  - 'alerts.yml'

Performance benchmark thực tế

TND test trên cùng workload: 500 host (mix VPS + dedicated + network device), 50 metric/host, scrape interval 60s.

MetricZabbix 7Grafana + Prom
CPU usage (steady state)1.2 cores2.1 cores (Prom) + 0.3 (Grafana)
RAM usage3.8 GB6.2 GB (Prom) + 0.8 (Grafana)
Disk IO/s~180 IOPS~250 IOPS
Storage 30 ngày~12 GB (MySQL + history)~28 GB (TSDB local)
Setup time từ zero1.5 giờ5 giờ
Time-to-first-alert10 phút (template loaded)45 phút (viết PromQL rule)
UI rendering 30-day dashboard~3s~1s (Grafana)

Khung quyết định

Bạn nên dùng Zabbix nếu:

  • Infra hỗn hợp: Linux + Windows + network device (switch, router, UPS)
  • Team không có DevOps senior - cần solution out-of-the-box
  • < 500 host, không có plan scale lớn
  • Chạy bare metal / VM truyền thống, không phải K8s
  • Cần monitoring tiếng Việt, support local

Bạn nên dùng Grafana + Prometheus nếu:

  • Stack cloud-native: K8s, microservices, container
  • Cần custom dashboard đẹp cho stakeholder không tech
  • Có DevOps senior biết PromQL
  • Plan scale > 1000 service / 10K instance
  • Cần tích hợp với observability stack (Loki logs + Tempo traces)

Hybrid approach (TND khuyến nghị cho công ty 50-200 người)

  • Zabbix cho infra layer: server, network device, hardware
  • Grafana + Prometheus cho application layer: K8s, microservices, business metrics
  • Dùng Grafana làm unified dashboard - read từ cả Zabbix datasource lẫn Prometheus datasource

"Đừng chọn 1 tool cho mọi thứ. Chọn tool phù hợp cho từng layer, dùng Grafana làm UI thống nhất." - Best practice SRE 2026.

Cost so sánh (vận hành 500 host, 1 năm)

Hạng mụcZabbix (self-host)Grafana + Prom (self-host)Datadog (SaaS)
VPS hosting800K/tháng (1 server)1.5M/tháng (2-3 server)0
LicenseFreeFree$15/host/tháng = $7,500/tháng
Setup labor1 ngày3-5 ngày2-3 ngày
Maintenance/năm~20 giờ~40 giờ~10 giờ
Total 1 năm~10 triệu~18 triệu~2.3 tỷ

Self-host trên Cloud VPS TND tiết kiệm 200-2000x so với Datadog/New Relic cho workload trung bình.

Alerting best practice

Bất kể chọn Zabbix hay Grafana, alert phải tuân thủ:

  1. Alert must be actionable: Mỗi alert phải có runbook, không alert "CPU cao" mà không biết làm gì
  2. Multi-tier severity: P1 page → call/SMS. P2 → Slack. P3 → email daily digest
  3. Avoid alert fatigue: Mỗi tuần > 5 alert false positive = team bắt đầu ignore
  4. Symptom-based, not cause-based: Alert "user gặp error", không alert "specific service down"
  5. SLO-driven: Alert dựa trên error budget consumption, không phải metric threshold cứng

Đọc incident response runbook để biết cách integrate alert với on-call workflow. Hoặc so sánh outsource vs in-house DevOps nếu team quá nhỏ để vận hành stack này.

TND managed monitoring

Nếu không muốn tự setup, TND cung cấp managed monitoring trong gói Server Management:

  • Zabbix Server vận hành bởi TND, dashboard share cho khách
  • Auto-onboard mọi server khách thuê tại TND (VPS, dedicated, colocation)
  • Alert pipeline tích hợp Telegram, Slack, email, SMS, voice call
  • SLA monitoring + monthly report
  • Cost: bundle trong gói Standard 15M/tháng - không phụ phí
Chia sẻ:Facebook

Đội ngũ TND

TND

Tư vấn bản quyền, VPS và máy chủ kèm hóa đơn VAT, hợp đồng đầy đủ cho doanh nghiệp.