Proxy load balancing allows monitoring hosts by a proxy group with automated distribution of hosts between proxies and high proxy availability.
If one proxy from the proxy group goes offline, its hosts will be immediately distributed among other proxies having the least assigned hosts in the group.
Host redistribution happens only in "online" proxy groups. A proxy group is "online" if the configured minimum number of its proxies are online.
The proxy state is:
Zabbix server also checks the balance between host-proxy assignments. If the balance is bad the group is marked for host reassignment, which will be done after 10xfailover delay period unless the balance is restored. The group is considered to be unbalanced if the number of hosts assigned to a proxy differs from the average (within the group) by at least 10 hosts and factor of 2.
Note that older version proxies and the hosts monitored by these proxies are excluded from re-balancing operations until they are upgraded.
Zabbix server checks the balance between host assignments to the proxies. The group is considered "out of balance" if there is:
The group is considered "out of balance" if the number of hosts assigned to the proxy is above/below the group average by more than 10 and a factor of 2. In this case the group is marked by the server for host reassignment after the grace period (10 x failover delay), if the balance is not restored.
The following table illustrates with example numbers when host reassignment is (or is not) triggered:
Number of hosts on proxy | Group average | Host reassignment |
---|---|---|
>100 | 50 | Yes |
60 | 50 | No |
40 | 50 | No |
<25 | 50 | Yes |
>15 | 5 | Yes |
10 | 5 | No |
The proxy group manager will re-distribute hosts in proxy groups in the following way:
To configure proxy load balancing for monitoring hosts:
Create a proxy group (see "Configuring a proxy group" below).
Make sure the proxy group is online.
Configure that hosts are monitored by proxy group (not individual proxies). You may use host mass update to move hosts from proxy to the proxy group.
Hosts that are monitored by a single proxy (even if the proxy is part of proxy group) are not involved in load balancing/high availability at all.
Note that adding all proxies of the group to the ServerActive agent parameter of monitored hosts is beneficial, but not mandatory. Proxy load balancing will work even with a single proxy added to ServerActive - active checks (and Zabbix sender data requests) will be redirected to the correct online proxy for the host based on the current proxy-host assignment.
When a host is created based on auto registration/network discovery data from a proxy belonging to proxy group - then this host is set to be monitored by this proxy group.
Agents must always be allowed to reach all proxies at the firewall level. Consider the following scenarios:
To configure a proxy group in Zabbix frontend:
Parameter | Description |
---|---|
Name | Enter the proxy group name. |
Failover period | Enter the period in seconds before failover is executed (1m by default; allowed range 10s-15m). Time suffixes are supported (e.g., 30s, 1m). User macros are supported. |
Minimum number of proxies | Enter the minimum number of online proxies required for the group to be online (1 by default; allowed range 1-1000). User macros are supported. |
Description | Enter the proxy group description. |
Proxies | List of proxies in the group. Up to five proxies can be displayed (as links or in plain text, depending on permissions to the proxy). This list is displayed when editing an existing proxy group, if there is at least one proxy in the group. |