Guest mode. You can read posts without signing up. Comments, ratings, job contacts and your own posts open after you sign up and accept the rules. What is Kommit →

Редакция КоммитРедакция портала
commit 5520e0c · 18 days ago

Monitoring, part 1: what to monitor, how Zabbix, Prometheus, and Grafana work, and what to choose

🌐 Machine-translated from Russian. Show original

In this part:

Why monitor#

Without monitoring, you will learn about the problem from users: "1C won't open," "the site is down," "the disk has expired." With monitoring — before users, and often before the problem occurs: the disk is 85% full, SMART shows errors, and the certificate expires after 14 days.

What to monitor#

LevelExamples
Availabilitywhether the server is pinged, if the site is opened, whether the 1C port (1541) responds
Hardwaretemperature, drives (SMART, RAID), power supplies, UPS
OSprocessor, memory, free space, disk load, network,
Networkloading of switch and router ports, errors, VPN tunnels,
Servicesservices are running, mail queue, database response time,
Applications5xx errors, response time, number of orders, queue length,
Business metricshourly pay, registrations, cancellations,
DeadlinesSSL certificates, domains, licenses, digital signatures,

There are three types of data: metrics (numbers in time), logs (text events), traces (request path through services). This series is mainly about metrics and alerts, logs are in part 7.

How data is collected#

  • Pull (poll) — the monitoring server itself visits the sites and retrieves data. This is how Prometheus and Zabbix's passive checks work.
  • Push (send) — the agent sends data to the server itself. Active checks for Zabbix, Zabbix sender, Pushgateway in Prometheus.
  • Agentless — SNMP (network, printers, UPS), IPMI (server hardware), HTTP checks, ping.

Three characters in the series#

Zabbix — "all-in-one": collection, storage in an SQL database, triggers, alerts, web interface, network maps, inventory. Strongest in classic infrastructure: servers, Windows, network equipment via SNMP.

Prometheus is a database of time series with "exporter" surveys and the PromQL query language. A standard for containers, Kubernetes, and modern applications. Alerts are sent by a separate Alertmanager component.

Grafana does not collect data itself but visualizes it from dozens of sources: Prometheus, Zabbix, PostgreSQL, Loki. Plus unified alerts.

Comparison#

ZabbixPrometheusGrafana
Rolefull monitoring ofmetrics + alert rulesdashboards + alerts
StoragePostgreSQL/MySQL (+TimescaleDB)its own TSDB on diskdoes not store (except settings)
Collectingagent, SNMP, IPMI, HTTP, scripts,exporters via HTTP (pull)—
Setting upin the web interface, templates,YAML files, codeweb interface, code
Autodiscovernetworks, drives, interfaces,via Service Discovery (Kubernetes, Consul, files)—
Built-inalerts, escalations, Telegram, mail,Alertmanager,built-in
Bestnetwork, Windows, hardware, inventory,containers, microservices, application metrics,a unified picture of

Pros and cons#

Zabbix

  • ✅ All in one box, hundreds of ready-made templates, convenient for admins without programming.
  • ✅ Excellent support for SNMP, Windows, IPMI, and web scripting.
  • ✅ Escalations, maintenance, trigger dependencies.
  • ❌ Charts and dashboards are more modest than Grafana.
  • ❌ The SQL base is growing and requires maintenance for thousands of objects.
  • ❌ Worse suited for quickly disappearing containers.

Prometheus

  • ✅ Very fast, easy launch, powerful PromQL.
  • ✅ There is an exporter for almost everything; apps deliver the metrics themselves.
  • ✅ Configuration as code — easy to store in Git.
  • ❌ No proper web interface for setup and charts — you need Grafana.
  • ❌ Long storage and fault tolerance — through external systems (VictoriaMetrics, Thanos, Mimir).
  • ❌ Network and Windows — through additional exporters, less convenient than with Zabbix.

Grafana

  • ✅ The best dashboards, thousands ready-made, one screen for all sources.
  • ✅ Unified alerts based on data from different systems.
  • ❌ Without data sources, it is useless.
  • ❌ It's easy to do "beautiful, but unclear" — discipline is needed.

Final Series Architecture#

LayerTool
Network, servers, Windows, UPS, printersZabbix (agent 2, SNMP)
Linux services, applications, containers, websitesPrometheus + node_exporter + blackbox_exporter
AlertsZabbix → Telegram, Alertmanager, → Telegram
**DashboardsGrafana** with Zabbix and Prometheus sources
Logs (optional)Loki
External check of "live monitoring"Uptime Kuma on another

What you will need#

  • Server or VM: Ubuntu Server 24.04, 2–4 vCPUs, 4–8 GB RAM, 50–100 GB SSD for a small company (up to 200 objects).
  • Static IP and access to observed objects over the network.
  • Telegram bot for notifications (created via @BotFather).

Let's start with Zabbix: Monitoring, part 2: installing Zabbix 8.0 LTS on Ubuntu 24.04 with PostgreSQL and Nginx.

Comments 01 участник · 1 гость🔒 Rate and discuss after signing up

Comments · 0

No comments yet.Sign in to comment, rate and see all comments.