Operations 10 min read

Introduction to Zabbix and How to Configure Automatic Discovery

This article introduces Zabbix, an open‑source enterprise monitoring system, outlines its key features such as rich visualization, high availability, and diverse data collection methods, and provides a step‑by‑step guide to setting up server‑side automatic discovery and related actions.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Introduction to Zabbix and How to Configure Automatic Discovery

Click the blue “DevOps Architecture Practice” to follow me.

Share to “Moments”, every morning at 08:06, dry‑goods push!

Zabbix and Its Advantages Introduction

You should be familiar with Zabbix, a mainstream open‑source enterprise‑level monitoring system; its official website is https://www.zabbix.com/. Zabbix has the following characteristics:

Rich functionality with a graphical interface, network topology visualization, customizable panels, and a built‑in CMDB for asset management, as well as data aggregation analysis capabilities.

High service availability: Zabbix supports proxy mode, where client nodes report to proxy nodes before reaching the server, reducing server load; the server also supports HA failover for high availability.

Rich data collection modes: Zabbix provides its own agent, supports common protocols such as SNMP and JMX, offers both active and passive collection, allows custom plugins (monitoring scripts, host templates, host‑group templates, etc.), and supplies a complete API for easy integration into internal DevOps or operations systems.

In addition, for large‑scale host monitoring, Zabbix supports automatic discovery and automatic registration.

Automatic discovery automatically finds client host information; this mechanism was detailed in lesson 10 (using Django Python to develop an automatic discovery CMDB).

Zabbix automatic discovery scans the internal network for devices, servers, hosts, collects their information, and adds them to fixed templates, achieving full automation from discovery to monitoring.

The second mode is Zabbix_agent active registration: when the agent starts, it actively reports its host information to the server, enabling automatic reporting and registration.

Zabbix Server Automatic Discovery

First, we explain Zabbix server automatic discovery: it scans a specified IP address range, matches hosts that meet conditions (e.g., host type, presence of an agent), and records the device information.

The key steps to set up Zabbix automatic discovery for hosts involve two parts: defining discovery rules (IP range, scan interval, etc.) and configuring actions (adding hosts, adding hosts to a host group or associating templates).

Now a demonstration: we use two machines, one as the server host (Zabbix_server) and the other as a client host with Zabbix_agent installed. Install Zabbix according to the official documentation, enable the required services, and then configure it via the console.

Log into the Zabbix console, then configure the discovery rule by navigating to Configuration → Discovery → Create Discovery rule.

In the form, you need to fill in the rule name (Name). Since we are not using proxy mode, “Discovery by proxy” is set to “no proxy”. The IP range defines the subnet or specific hosts to scan. The Update interval sets the scan period. The Checks field (e.g., zabbix agent "system.uname") specifies what data to collect. Device uniqueness determines how a host is uniquely identified; selecting IP address uses the IP as the unique identifier.

Below the options you can see the specific field explanations.

After configuring the rule, we need to set up its action. In the Zabbix console, click the Configuration button, then Actions, and create a new action of type Discovery.

In the Actions page, add conditions by selecting the appropriate options. For example, we set a condition that the service type equals Zabbix agent, meaning the scanned host must have the Zabbix_agent installed.

Another condition is Host IP equals 172.21.64.1‑254, restricting the host IP to that range.

The Type of calculation defines the logical relationship between conditions (A and B in this case), meaning both conditions must be satisfied.

Once the overall conditions are met, configure the Operations section to define the action’s subject and message for notifications.

After completing all settings, click Update to finish the Zabbix server automatic discovery rule configuration.

On the agent side, verify the following settings in zabbix_agentd.conf :

Server=172.21.64.12

ServerActive=172.21.64.12 // active reporting to Zabbix server IP

HostMetadataItem=system.uname // dynamically obtain host metadata via system.uname

The Server=172.21.64.12 configuration specifies the Zabbix_server IP address.

The HostMetadataItem setting obtains host metadata using the system.uname function.

After configuring the Zabbix_agent, restart it; it will start reporting, and the server will automatically discover the new host.

【Please scan the QR code to follow and grow together】

monitoringoperationsdevopsZabbixAutomatic Discovery
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.