16 Configuration best practices

Overview

This section provides a recap of key configuration choices that affect performance and maintainability.

While every Zabbix setup is different, these best practices can be used as a foundation to adjust as needed.

Create a separate host for each monitoring instance

A host in Zabbix is a logical entity rather than a physical machine or device. Create a separate host for each independent instance such as a virtual machine, database, container, or network switch.

This approach provides:

  1. Cleaner monitoring data with separate items, triggers, and alert notifications for each host.

  2. Fine-grained user-access control via user-roles aligned with the principle of least privilege.

Use templates and mass update for similar hosts

For similar hosts like Network switch 1 and Network switch 2, you can create a template with the required metrics (Network switch template) and group the hosts into a host group (Network switches).

When adding new switches, you can use mass update in Data Collection -> Hosts to link the template instead of cloning hosts manually.

Configure master and dependent items to minimize requests

To minimize requests to the target entity, configure a master item to collect data in a single request, then use dependent items with preprocessing to extract specific values.

For example, the master item might collect a JSON or XML response with multiple metrics or execute a database query returning multiple columns (e.g., number of open connections, aborted connections, maximum allowed simultaneous connections, and total cumulative connections since startup), and the dependent items will parse and store each value separately.

Discard the master item's history after collection and only keep only the dependent items' data.

Deploy a Zabbix proxy when needed

If your hosts are all in the same local network as the Zabbix server with no scalability or performance concerns, you may not need a proxy. In larger or more complex environments, a proxy allows for more even load distribution.

Add a Zabbix proxy when:

  1. Monitoring multiple hosts using various metric collection methods behind a firewall. The proxy gathers data from hosts and forwards it to Zabbix server, reducing the number of open firewall ports.

  2. Monitoring remote locations, branches, or networks. Zabbix proxies in remote locations continue data collection during network interruptions and send the data back when the connection is restored.

  3. Managing large-scale deployments. If you have many hosts and/or collect a high number of values per second, deploy a proxy to reduce server load and improve performance.

Configure independent secret macro retrieval

You may want to use secret user macros as either secret text or secret vault macros.

By default, secret macro values are retrieved by Zabbix server and propagated to proxies. For enhanced security with secret vault macros, configure the macro values to be retrieved independently by Zabbix server and proxies.