Skip to content

What Zabbix is

Status: verified

Zabbix is a monitoring system. One machine — the server — keeps asking small questions of the machines you care about, remembers the answers, compares them against lines you drew, and raises a problem, which it can announce, when an answer crosses one. Everything else in this guide is that sentence made concrete.

Here is the shape of the whole system, in the order data flows through it:

  • A host is a thing being watched — usually a computer. You describe it once: its name, how to reach it.
  • An item is one question asked of one host on a schedule: how full is the root disk? what is the one-minute load average? are you alive? Each answer is stored with its time. A host quickly has hundreds of items; a year of answers is a history you can graph.
  • A trigger is a rule over one or more items: the load average stays above 5 for ten minutes, the disk passes 90% full, this text file now says ALARM. While the rule holds, there is a problem — a named, dated event with a severity, shown on the dashboard until the rule stops holding, when the problem resolves itself.
  • An action is what to do about a problem: send a message, run a command, open a ticket. Sending goes through media — email, a webhook into a chat tool, a script — to the users who should hear about it.
  • Nearly all items come from templates: bundles of questions and rules written once — Linux by Zabbix agent knows eighty-odd sensible questions to ask a Linux machine — and linked to every host they fit. Improve the template and every linked host improves.

The asking is done by small programs called agents that run on the watched machines and answer for them, and by the server itself, which can also ask questions directly: ping this address, fetch this web page, ask that network switch its counters over SNMP. But the loop never changes: question, answer, memory, line, problem, announcement.

The lab in this guide ran that loop for real. Its one host was the machine itself — lab-server. One template link gave it 82 items, and real answers arrived within seconds: the agent's ping, its version, the load average rising and falling with the machine's actual work. Then the lab added one question of its own — the contents of a text file, the gauge — and a trigger that fires when the file says ALARM. The file was edited, the problem appeared on the web dashboard within seconds with its name and severity, an action produced an alert addressed to a mailbox, and editing the file back resolved the problem. That loop, proved once in front of you, is what chapters 5 to 8 unpack.

What makes Zabbix itself, rather than one of its neighbours (chapter 12), is that all of this is one program with one database and one model. The metrics store, the rules engine, the alerting and the web interface are not separate products bolted together; they are parts of a single system that has been developed as a unit since 2001, released as free software (the GNU Affero licence, AGPLv3), and sold with support by the company of the same name. You configure it through its web pages or, identically, through its API — the sameness matters, and chapter 10 leans on it: anything this guide clicks, it also shows in text.

And the line from the introduction, kept where the model is: a monitoring system is a listening post. It records when machines work and rest, what runs on them, which doors answer. Aim it at machines you own or are plainly authorised to watch; treat its Admin account and its API tokens as keys, because they are — an API token can reconfigure what is watched and who gets told; and decide how long its history deserves to live, because by default Zabbix remembers a great deal for a long time. None of that argues against running it. It argues for running it deliberately — which is what a guide is for.

The check. A monitoring system, working, is four artefacts you can point at: a host with items whose latest values are current (this guide's lab: the load average moving under your hand), a problem that appears when you arrange the condition and clears when you remove it, an alert recorded against the action that sent it, and an API answer to the same questions the web page shows. If all four exist, the loop is closed. The rest of the guide builds them, in that order.