Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 37 ยท Monitoring Concepts

Passive vs Active Checks, Polling vs Push, and Check Types in Zabbix

Understand polling and push monitoring: Zabbix passive and active agent checks, trapper items, simple checks, agentless methods, and when each approach is the right choice.

Every monitoring system must answer one question: who starts the conversation? Either the monitoring server asks the target ("what is your CPU load?"), which is called polling, or the target sends its data on its own, which is called push. Zabbix supports both, and choosing the right one affects firewalls, scalability and reliability. Nagios has the same distinction under different names (active and passive checks, with the meanings slightly different, see below).

Neither product runs on this site, so the lesson explains the mechanics in words and the TryIt blocks are Python simulations of the message flow.

Zabbix passive checks (server polls the agent)

  1. The server (or a proxy) opens a TCP connection to the agent on port 10050.
  2. It sends the item key, for example system.cpu.load[all,avg1].
  3. The agent computes the value and replies.
  4. The server stores the value and closes the connection.

The server schedules the polling based on each item's update interval. Pros: simple, central control, the agent needs no knowledge of the server beyond the allow list Server=. Cons: the server must reach every agent (inbound firewall rule on each host), and many short connections create load on large installations.

The item type is Zabbix agent.

Zabbix active checks (agent pushes)

  1. The agent starts and connects to the server on port 10051 and asks: "I am host web-01, which items should I collect?"
  2. The server returns a list of keys with intervals (the active checks list), which the agent refreshes every RefreshActiveChecks seconds (default 120).
  3. The agent collects values by itself and sends them in batches.

The item type is Zabbix agent (active). Pros: only outbound connections from the agent (great behind NAT and firewalls), far fewer connections, batching, the agent keeps a buffer (BufferSend, BufferSize) when the server is unreachable, and log file and Windows event log monitoring requires active mode. Cons: Hostname must match exactly and ServerActive must be set.

sequenceDiagram
    participant S as Zabbix server
    participant A as Agent
    Note over S,A: Passive
    S->>A: key? (TCP 10050)
    A-->>S: value
    Note over S,A: Active
    A->>S: "I am web-01, what should I collect?" (TCP 10051)
    S-->>A: list of keys and intervals
    A->>S: batch of values

Passive: the server drives. Active: the agent drives.

Python Stand-in: passive polling simulation

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice the last line: when polling fails, the server learns about the problem immediately. That is a real advantage of passive checks: a missing agent is noticed at the next poll.

Python Stand-in: active check with a buffer

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The buffer means that a short network outage does not leave a hole in the graph. The server gets all values, with their original timestamps, once the connection is back.

Which one should I use?

  • Passive when the network allows server-to-agent connections, for network devices that cannot run agents, or when you want immediate unavailability detection.
  • Active for large fleets, hosts behind NAT, cloud instances that autoregister, and any log or Windows event log item.
  • Both at once: a common template pattern is to use passive agent.ping for availability and active items for everything else.

Other item types in the same family

Zabbix has many ways to collect data. Here is the push-versus-poll classification:

Item type Direction Notes
Zabbix agent server polls agent passive, port 10050
Zabbix agent (active) agent pushes port 10051
Simple check server polls the target directly icmpping, net.tcp.service[http], no agent needed
SNMP agent server polls device UDP 161 (see SNMP)
SNMP trap device pushes needs a trap receiver feeding the server
Zabbix trapper sender pushes zabbix_sender from scripts
HTTP agent server polls a URL JSON/XML APIs
External check server runs a script locally scripts in ExternalScripts
SSH/Telnet server logs into a device command output as value
JMX server polls Java gateway Java apps
IPMI server polls BMC hardware sensors
Database monitor (ODBC) server queries a database SQL
Calculated, Dependent derived from other items no extra collection
Zabbix internal the server's own state queue, cache usage

Agentless monitoring means using simple checks, SNMP, HTTP, SSH, ODBC or IPMI without installing an agent. It is the right choice for switches, printers, storage arrays and SaaS endpoints.

Simple checks

A simple check is executed by the server itself with no agent. Examples:

  • icmpping returns 1 when ping succeeds. icmppingsec returns round-trip time, icmppingloss returns percent packet loss.
  • net.tcp.service[ssh,192.0.2.10,22] returns 1 if an SSH handshake works.
  • net.tcp.service[http,,443] checks a TCP service; net.tcp.service.perf[http] measures how long it took.

ICMP checks use fping, which must be installed and have the right permissions (chmod 4710 /usr/bin/fping with the group of the zabbix user).

Trapper items and zabbix_sender

A Zabbix trapper item waits for someone to send it a value. A backup script can report its result:

Terminal
zabbix_sender -z 192.0.2.5 -s backup-01 -k backup.status -o 0

The key backup.status must exist as a trapper item on host backup-01. In the item you can limit Allowed hosts to the sender's IP. Trapper items are ideal for event-driven values, such as "last backup exit code".

Nagios terminology

In Nagios, an active check is a check the Nagios daemon starts itself by running a plugin. A passive check is a result submitted from outside (for example through NSCA or the external command file). So "Nagios active" roughly equals "Zabbix passive/simple/SNMP (the server initiates)", and "Nagios passive" equals Zabbix trapper. The names look the same but point in opposite directions, which confuses many beginners. See Nagios objects and plugins.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which port does an agent use to send active checks to the server?

    Active agents connect outbound to the server (or proxy) on 10051.
  2. 2. A host sits behind NAT and cannot be reached from outside. Which check type fits?

    Active checks only need outbound connections from the agent.
  3. 3. Which item type receives values pushed by zabbix_sender?

    Trapper items wait for pushed values.
  4. 4. In Nagios, what is a passive check?

    Nagios passive checks are submitted results (NSCA, external commands); active checks are initiated by Nagios.

Summary

  • Passive = server polls agent on 10050; active = agent pushes to 10051.
  • Active checks suit NAT, large fleets and logs; passive checks detect unreachable hosts quickly.
  • Simple checks, SNMP, HTTP, SSH, IPMI and ODBC allow agentless monitoring.
  • Trapper items accept pushed values from zabbix_sender.
  • Nagios uses "active" and "passive" with different meanings.

Next: SNMP OIDs and MIBs