Zabbix low-level discovery rules: design and filters

How to design Zabbix low-level discovery rules that create only the items, triggers and hosts you need, with filters, overrides and macro mapping planned before the build.

On this page

Why Zabbix low-level discovery rules need design before they run

Low-level discovery (LLD) lets a Zabbix discovery rule find things on a host, such as file systems, network interfaces or database instances, and create items, triggers and graphs for each one from prototypes. A team needs to design its rules deliberately once it sees a large host gain hundreds of items or triggers it never intended to monitor, because every discovered object is created automatically and then keeps being polled, evaluated and alerted on. The rule, not the operator, decides how many objects exist, so the cost of a loose rule grows with every new disk, interface or container the host reports.

The model has four parts. A discovery rule runs a discovery key, such as one of the built-in keys for file systems or network interfaces, and returns a JSON document listing the objects it found. Item, trigger and graph prototypes attached to that rule are templates that Zabbix instantiates once per discovered object. Inside prototypes, LLD macros written in the {#MACRO} format, such as {#FSNAME}, take the value of each object, so the item key and name change for every instance. Where the discovery output does not already use a convenient name, you can define other macros and map them to JSON fields with JSONPath, which is how a rule turns a vendor's raw output into keys you can filter on.

Each of these parts is a decision point. Before you enable a rule on a large host, confirm which keys the discovery returns, which macros the prototypes need, and how many objects a typical host will produce. Then decide where filters and overrides will cut the list, and what the trigger count per host should be. The Zabbix low-level discovery documentation is the reference for the macro and JSONPath syntax your version supports, so check it against the server version you run before you copy any example.

Which discovery options fit which host type

This table compares the three main ways to shape low-level discovery: built-in discovery keys, custom discovery keys mapped with JSONPath, and filters or overrides. Read each row against the host type you are monitoring, and check the noise column before you accept a rule's default output. The main takeaway is that the fewer custom mappings and filters you add, the easier the rule is to upgrade, but noisy built-in rules on large hosts usually need a filter before they reach production.

OptionBest fit host typeNoise and trade-offWhen to choose it
Built-in discovery keysStandard Linux or Windows servers and common network devicesLow setup cost, but the default output can create many items and triggers on hosts with many disks, interfaces or mountsWhen the template's default discovery matches what you need and the host has a modest number of discovered objects
Built-in keys with filtersHosts with many file systems, interfaces or virtual disksFilters reduce noise, but each filter is a rule to review after template upgradesWhen discovery works but creates items for virtual, temporary or excluded objects you do not want to monitor
Custom discovery keys with JSONPath mappingDevices or APIs that expose data in JSON through an item or scriptGives full control of {#MACRO} names, but the mapping and the script that produces the JSON become your maintenance burdenWhen no built-in key returns the objects you need, and you can test the JSON output on the monitored source
Overrides on discovered prototypesMixed host groups where some hosts need different thresholds or item statesKeeps one rule for many hosts, but overrides can hide why a given item was created or disabledWhen the same discovery is right for most hosts and only a few need different intervals, thresholds or disable actions
Separate rules per host groupLarge estates with distinct server roles or device modelsMore rules to maintain and check after upgrades, but each rule stays simple and predictableWhen one discovery rule would need many conditional overrides to behave correctly across roles
Trigger-heavy prototypes with no filterHosts with large numbers of discovered objectsHighest noise: each discovered object adds items and triggers that compete for queue and alert attentionRarely a good default. Use only after you have checked the object count on a test host

How to build an LLD rule without flooding the host

This sequence turns a discovery idea into a tested LLD rule that creates only the items and triggers the host needs, with a check at each stage so scope grows only after the discovered set looks right.

  1. Define the discovered entity and its source

    Start by naming exactly what the rule should find, such as network interfaces, file systems or database schemas, and which key or script will return that list. Choose either a built-in discovery key or a custom item that returns JSON, and confirm which hosts it will run on. The step is done when you can describe, in one sentence, the object type, the source key and the target hosts. Check the raw output by running the key on a test host and confirming the JSON contains one entry per real object and no placeholder rows.

  2. Map LLD macros and JSONPath fields

    Define the {#MACRO} names the prototypes will use and map each one to a field in the discovery JSON with JSONPath. Keep macro names short, consistent and specific to the entity, so that item and trigger names remain readable after many objects are created. Zabbix can use the LLD macros directly in prototypes, so every macro you plan to reference must be declared here. The check is the Discovery view for a test host: each row should show the macro values you expect, with no empty or duplicated values for fields that must be unique.

  3. Add filters with regular expressions

    Add filter conditions on the discovery rule so that only objects matching your intent are kept, for example by excluding loopback interfaces, temporary file systems or system schemas. Use regular expressions carefully, anchor them where needed, and write the exclusion list as a deliberate choice rather than a catch-all pattern. Filter conditions are evaluated against macro values, so confirm the macro names match step two. The check is to compare the discovered object list before and after the filter: the excluded objects should be the ones you meant to remove, and nothing you need should disappear.

  4. Build prototypes with only the items and triggers needed

    Create item, trigger and graph prototypes that cover the metrics you will act on, and leave out anything you would only collect for curiosity. Each trigger adds evaluation load and alert volume, so decide on the trigger set before the prototypes are copied across many objects. Review the prototype list against your monitoring requirements and remove duplicates from the template. The check is a count: multiply the number of prototypes by the number of expected objects on a representative host, and confirm the total is something your team is willing to review and maintain.

  5. Test the rule on a single host

    Enable the rule on one representative host first, ideally one with many objects of the type you are discovering, and let it run through a full discovery cycle. Confirm that the created items show the expected names and keys, that no item errors appear in the latest data view, and that the Discovery view lists each object once. Look for unexpected objects such as duplicates from multiple interfaces or temporary mounts. Only move to the next step when the created item set matches the list you wrote in step one.

  6. Review the discovered count and trigger load

    Before widening scope, check how many items and triggers the single host now carries and how many problems the triggers raise under normal conditions. Compare that count with the number of objects the host actually has, and look for prototypes that create triggers on objects that rarely change state. Adjust filters or remove low-value prototypes if the numbers are higher than the team can review. The check is a short written record of the counts, the noisiest triggers and the changes made, so the decision to expand is based on evidence.

  7. Expand to wider scope and monitor the result

    Apply the rule to the next group of hosts in stages, repeating the Discovery view and count checks on each group rather than applying it to the whole estate at once. Watch the Zabbix server and the monitored hosts for growth in item count and check load after each expansion. Record the final rule settings so that changes can be reviewed later. The step is complete when the rule runs on the intended hosts, the counts match the expectations from the single-host test, and the team has agreed who reviews new discovered objects over time.

How filters and overrides control what LLD creates

Filters on a low-level discovery rule decide which discovered objects produce entities at all. Each filter compares an LLD macro, such as {#FSNAME} or {#IFNAME}, against a regular expression or value you set, and only objects that match the conditions are created as items, triggers and graphs from the prototypes. Because the comparison runs against the macro values returned by the discovery item, the discovery key and its JSON mapping decide what you can filter on. Before you write a filter, run the discovery item and check the returned macro values on the host, since a filter written against a field name you assumed rather than the one the script returns will silently match nothing or everything. Confirm how your version combines multiple filter conditions and how it treats an empty filter, because these details differ between releases and are easy to misread.

The reason to put filters on the discovery rule rather than only disabling items afterwards is cost on the server and in the database. An object that is filtered out at discovery never gets item, trigger or graph rows, so it adds no polling load, no history and no trigger evaluations. Disabling created items later still leaves the database objects in place, and the trigger count on a large host keeps growing with every discovered object. Filtering at discovery also keeps the configuration honest: a reviewer can read the rule and see which disks, interfaces or containers are monitored. Plan the filter list with the people who own those objects, for example the storage team choosing which mount points are in scope, and record the decision next to the template so it survives the next template update.

Overrides work differently. They do not decide whether an object is created; they change how prototypes behave for objects that match a condition you define, such as changing the update interval, the severity or whether a prototype is created at all for that subset. Use overrides when one population needs different handling, for example a shorter interval for database volumes than for archive mounts, and keep the number of overrides small because each one adds a condition that must be checked on every discovery cycle and every upgrade. Test overrides on a host with known objects, then confirm in the Zabbix frontend that the expected items and triggers exist and that the others do not. Confirm the override options and their precedence in the documentation for your version before relying on them in production.

Keeping trigger counts manageable on large hosts

Low-level discovery multiplies whatever a prototype defines, so one trigger on a template can become hundreds on a single busy host. The cards below cover the components that drive trigger volume and the design choices that keep it under control.

Trigger prototypes per discovered object

Every discovered object, such as a file system, interface or database, gets its own copy of each trigger prototype. A host with 300 mounted volumes therefore carries 300 times every file system trigger, and the count grows silently as storage is added. Before you add a trigger prototype, estimate how many objects a typical host discovers and multiply by the trigger count. Keep prototypes to conditions that need an alert on every object, and move the rest to item-level monitoring or dashboards.

LLD docs

Dependencies between triggers

Trigger dependencies suppress child alerts while a parent problem is active, such as a host being unreachable hiding every item trigger on it. Without them, one network fault can produce hundreds of simultaneous problems that bury the real cause. Discovered triggers need dependencies designed at the template level, with the parent check defined once and linked to each prototype. Test the chain on a staging host by stopping the agent and confirming that only the parent problem remains.

Thresholds that fire on many objects

A single threshold applied to a discovered class fires whenever any member crosses it, so a shared CPU or latency limit can flood the queue during a common event such as a backup window. Set thresholds per object class where the normal range differs, and use macros so that exceptions are set per host or per object instead of by editing the prototype. Review which prototypes raise problems at the same time, because correlated firing is a sign that the threshold or the event grouping needs work.

Item intervals on high-cardinality discovery

Each discovered object adds its items at the interval set in the prototype, so a short interval on a rule that discovers many objects multiplies collection load on the agent, the proxy and the database. Use the longest interval that still meets the alerting need, and give slowly changing attributes such as size or model a much longer interval than live counters. Confirm the resulting new values per second on the proxy or server before you roll the prototype out to every host in a group.

Graph and item sprawl

Graph prototypes and item prototypes that are created for every object make the host page and the search results hard to use, and they add history and trends rows that housekeeping must clean up. Create graph prototypes only for metrics a person reads during an incident, and keep item history retention short for minor counters. Use filters so that temporary or virtual objects, such as loop devices or container overlays, never produce items at all.

Review cadence for discovered counts

Discovery rules change the trigger inventory whenever the environment changes, so a rule that was sized correctly at rollout can become a problem months later. Schedule a recurring review that compares the number of discovered objects and generated triggers per host class against the expected figures, and record the owner of each rule. Ask your team to confirm the review interval and the reporting method in Zabbix before rollout, since the right cadence depends on how quickly your infrastructure changes.

How a discovery rule turns host data into items and triggers

The flow starts at the discovery item on the monitored host, which returns JSON for each disk, interface or other object it finds. Zabbix maps that JSON to LLD macros in the {#MACRO} format, then applies the rule's filters so only matching objects continue. Each surviving object creates its item, trigger and graph prototypes, and the resulting trigger count is the step to review before the rule goes into production on large hosts.

Discovery output flows through mapping and filters into prototypes, then the trigger count is reviewed.

How LLD design differs for servers, network devices and applications

On Linux and Windows servers, low-level discovery usually works on the local operating system through the Zabbix agent. The common targets are file systems, network interfaces and block devices, and each one maps to a predictable set of items such as usage, traffic and I/O counters. The main risk is that a broad filter picks up entities that change on every boot or are never meant to be monitored, such as container overlay mounts, temporary file systems or virtual interfaces.

  • Mount points: Discovery of file systems returns every mounted volume unless you filter by type or mount path, so pseudo file systems can generate noisy items.
  • Network interfaces: Loopback, bridge, veth and VPN interfaces often appear next to physical NICs, and each one adds traffic and error items.
  • Block devices: Removable media, device mapper entries and snapshots can be discovered as disks, and their names may change after a reboot.
  • Agent access: Some discovery keys need elevated rights or specific agent options on the host, so a rule can return nothing on one server class and work on another.
  • Template scope: Operating system templates are often linked to many host groups, so one filter change reaches every server in the group.

Before you build the rule, confirm which agent version and which discovery keys your monitored hosts actually run, and test the filter on one representative host from each server class.

Security and operational risks of discovery rules

Discovery rules and prototypes create configuration at scale, so a mistake in them reaches many hosts at once. The four areas below cover who can change discovery, what discovery does to the database, who can see what it finds, and how changes are reviewed.

Who can edit discovery rules

Discovery rules and item, trigger and host prototypes are configuration objects, so anyone with write access to the host group that holds a discovery rule can change what gets created. A broad filter or a changed key can start creating items on every discovered host. Limit edit rights to a small configuration group, separate them from users who only view dashboards, and confirm how user roles and host group permissions apply to discovery objects in your version.

Database growth from discovery

Each discovered entity adds items, triggers, history and trends to the Zabbix database, and a rule that matches more resources than expected can grow it quickly. Before enabling a rule on a large host set, estimate the item count per host and per discovery, and check the housekeeping settings that control how long history and trends are kept. Test the rule on a limited host group first.

Lost resource cleanup

When a discovered disk, interface or container disappears, the delete and disable settings decide whether its items and triggers are removed or kept as disabled objects. Left at the defaults without review, stale objects can pile up and keep triggers from being evaluated correctly. Decide the lost resource behavior per rule before go-live, since changing it later affects existing objects.

Exposure of discovered data

Discovered values such as file system names, interface descriptions, container names or cloud resource tags can reveal internal architecture and sometimes sensitive identifiers. Those values appear in the Zabbix frontend and in notifications to anyone who can see the affected hosts. Review which fields your discovery keys expose, and restrict host group visibility so that teams see only the resources they own.

Review and change records

Discovery rule changes often happen in the web interface, where a filter edit is easy to make and hard to trace back. Keep an agreed review step for filters, macros and JSONPath mappings, and export the rule configuration so changes can be compared over time. Confirm which audit logging options your Zabbix version provides and whether they record changes to discovery objects, and set up retention for those records.

What teams ask before designing LLD rules

Can our in-house team design Zabbix low-level discovery rules without a partner?

Yes, a team that already runs Zabbix in production and has someone comfortable with templates, JSON output and the Zabbix API can design discovery rules in-house. The work is manageable when the host types are few and the discovery sources are well understood. Difficulty rises with the number of host classes, the variety of data sources (agent items, scripts, SNMP, external APIs), and the amount of testing needed on hosts that behave differently. The practical question is whether someone can own the design, test it on representative hosts, and maintain it through upgrades. If that capacity is not available, a fixed-scope design engagement can cover the gap without a long-term commitment.

What drives the cost of an outside partner for LLD design work?

Cost follows the number of discovery rules, host classes and templates in scope, plus the depth of testing each one needs. The main components are scoping the host classes, reviewing existing templates, building and testing discovery rules, designing filters and overrides, writing handover documentation, and checking results after the next upgrade. Most engagements are fixed-scope, so scope, deliverables and timelines are agreed in writing before work starts. One-time design work is separate from any ongoing retainer for upgrades or continuous support. When requesting a quote, ask for the list of host classes, discovery sources and templates covered, and whether testing happens on your staging instance.

How long does a scoped LLD design take, and what sets the pace?

The duration depends on what has to be understood and tested before anything is built. Key drivers are the number of discovery rules and host types, the complexity of each data source, whether custom templates already exist, and how much existing monitoring must be preserved. Availability of a staging Zabbix instance that matches production, access to representative hosts, and the speed of review cycles also set the pace. Approvals for filters and trigger thresholds often take longer than the technical build. Ask for a schedule that separates discovery, build, test and review phases, and identify which phases depend on your team's responses.

What does our team need to provide before LLD design begins?

Your team should provide the information and access that only your organization holds. This usually includes a staging Zabbix instance on the same version as production, sample discovery output from representative hosts of each class, and a list of what must be monitored for each host type. You also need named owners who can approve filters, naming conventions and trigger thresholds, plus a change window for testing on production-like hosts. Clear rules on naming, tagging and which items may be removed by discovery help avoid rework. Missing sample output or unclear approvers are the most common causes of delay in discovery design.

How do we keep trigger counts manageable on large hosts?

Create trigger prototypes only for items that someone will act on, and treat every other discovered item as data for graphs or review. Use filters so discovery creates items for the entities that matter, such as the mounted filesystems or interfaces that carry real traffic, and exclude virtual or transient entities. Set thresholds through user macros that can be changed per host group, so you do not need separate templates for each environment. After the first discovery run, count the triggers each host produces and review the largest sources with the people who will receive the alerts. Repeat the review after each template change, since small prototype additions multiply across many discovered entities.

Which discovery keys and LLD macros should we check before writing custom rules?

Start with the discovery keys and LLD macros already used by the out-of-the-box templates for your Zabbix version, then decide where a custom rule is truly needed. Built-in discovery keys cover many common resources, and reusing them keeps behavior predictable after upgrades. LLD macros in the {#MACRO} format can be used directly in prototypes, and other macros can be defined and mapped to JSON fields with JSONPath when the discovery source returns structured data. Confirm each key, macro and JSONPath expression against the Zabbix low-level discovery documentation for your version before relying on it, and test the mapping with real output from the host.

Do LLD rules create security or data exposure risks we should review?

They can, mainly because discovery exposes names, paths and metadata that may be sensitive, and custom discovery scripts run with permissions on the monitored host. Review what the discovery output contains, for example usernames in process names, internal hostnames in interface descriptions or secrets passed as script arguments. Limit who can edit templates and discovery rules, since a change there affects every host that uses them. Store only the fields needed for monitoring, and check that your scripts follow the least-privilege model of your environment. Ask the partner or your team to document each custom script, its owner and the permissions it needs before it reaches production.

How DeployOpen designs and delivers Zabbix discovery rules

DeployOpen starts with a written scope that lists which host sources will feed discovery, which hosts and host groups are in play, and which resource types should produce items, triggers and graphs. The scope also records what must not be created. Discovery is easy to switch on and hard to undo cleanly, so agreeing the inventory in writing before any rule is built is the step that prevents trigger floods on large hosts. Before building, DeployOpen reviews the existing templates that carry discovery rules, including any out-of-the-box templates in use and any local edits to them, and checks which discovery keys each host source already returns. Confirm with your own team which hosts, interfaces and filesystems are expected to change, because those are the sources most likely to generate churn.

Rules are then built and tested on a staging copy of the Zabbix instance before anything reaches production. Testing covers the discovered object count per host, the {#MACRO} names used in prototypes, any JSONPath mappings for custom macros, and the filter expressions that decide which discovered objects are kept. Trigger counts are measured against the host sizes in scope, so the team can see whether filters or prototype design need to change. DeployOpen documents each rule with its purpose, its filters, its macros and the expected object count per host class, so the operations team can explain why an item exists. Retest the rules after any Zabbix upgrade, since template and discovery behavior can change between versions.

After handover, changes to filters, new host sources or new resource types can be handled under a retainer if the client wants ongoing help. The retainer does not replace internal ownership: the client's team should keep the rule documentation current and review discovered object counts after each change. Ask any partner to state in the quote which artifacts are delivered (rule inventory, filter documentation, staging test results and change notes), who runs the staging tests, and how changes are requested and approved. Confirm your own maintenance capacity with your internal team before agreeing a scope, because the number of discovery rules you need to watch will grow with your estate.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.