DevOps2026-05-18·10 phút đọc

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ô.

TL;DR

Zabbix = all-in-one, setup 1 ngày, học nhanh, tốt cho infra mix (Linux + Windows + network device). Grafana + Prometheus = modular, scale tốt, hỗ trợ container/K8s native; setup phức tạp hơn. Quy tắc: < 100 server hoặc team không có DevOps senior → Zabbix. Cloud-native + microservices → Grafana stack. Hoặc dùng TND Server Management để có monitoring chuẩn setup sẵn.

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:

“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 7 Grafana + Prometheus
License GPL v2 (open-source 100%) AGPL (Grafana) + Apache 2.0 (Prometheus)
Architecture Monolithic (server + DB) Modular (Prom + Grafana + Alertmanager + exporters)
Data model Time-series in MySQL/PostgreSQL/TimescaleDB TSDB native (Prometheus tự lưu)
Data collection Agent push/pull, SNMP, IPMI, JMX, ICMP Pull-based (scrape /metrics endpoint)
Alerting Built-in, advanced trigger expression Alertmanager (separate component)
Dashboard Built-in (UI cũ hơn) Grafana (UI đẹp, customizable)
Setup time 1-4 giờ 4-16 giờ
Learning curve Trung bình Cao (PromQL)
Container/K8s native Có nhưng không tối ưu Native, chuẩn industry
Network device monitoring Mạ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

Nhược điểm

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

# Trên Ubuntu 22.04 VPS TND (2vCPU/4GB RAM đủ cho 50-100 host)

# 1. Install Zabbix repo
wget https://repo.zabbix.com/zabbix/7.0/ubuntu/pool/main/z/zabbix-release/zabbix-release_7.0-2+ubuntu22.04_all.deb
dpkg -i zabbix-release_7.0-2+ubuntu22.04_all.deb
apt update

# 2. Install components
apt install -y zabbix-server-mysql zabbix-frontend-php \
  zabbix-nginx-conf zabbix-sql-scripts zabbix-agent mysql-server

# 3. Setup database
mysql -uroot <

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

# docker-compose.yml — chạy trên VPS TND 2vCPU/4GB
version: '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:
# prometheus.yml
global:
  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.

Metric Zabbix 7 Grafana + Prom
CPU usage (steady state) 1.2 cores 2.1 cores (Prom) + 0.3 (Grafana)
RAM usage 3.8 GB 6.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ừ zero 1.5 giờ 5 giờ
Time-to-first-alert 10 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 tốt nhất 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ục Zabbix (self-host) Grafana + Prom (self-host) Datadog (SaaS)
VPS hosting 800K/tháng (1 server) 1.5M/tháng (2-3 server) 0
License Free Free $15/host/tháng = $7,500/tháng
Setup labor 1 ngày 3-5 ngày 2-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í

Khám phá thêm

Để TND lo monitoring 24/7 cho hạ tầng của bạn — Zabbix + Grafana managed, alert tới mobile, runbook đầy đủ.

Xem dịch vụ →