So far, we configured and discussed only one way a proxy can work, an active proxy. A proxy may also be configured to accept incoming connections from the server, and similar to the agent; it is called a passive proxy in that case:
As opposed to the Zabbix agent, where this mode was set on the item level and a single agent could work in both active and passive mode, a Zabbix proxy can only work in one mode at a time.
Let's switch our active proxy to the passive mode. First, edit zabbix_proxy.conf
and set the ProxyMode
parameter to 1
. That's all that is required to switch the proxy to the passive mode—now restart the proxy process.
In the frontend, navigate to Administration | Proxies and click on First proxy in the NAME column. Choose Passive in the Proxy mode dropdown, and notice how an Interface section appears. In there, set the IP address and port of your proxy:
When done, click on Update. Now, when will the server send configuration information to the passive proxy? By default, the interval is one hour. Unfortunately, scheduling of configuration data sending is done the same way as the polling of passive items—it's distributed in time and could happen any time from now until one hour has passed. Well, let's try to force reloading of the configuration cache on the proxy:
# zabbix_proxy --runtime-control config_cache_reload zabbix_proxy [3587]: command sent successfully
That seemed promising. Let's check the proxy logfile:
forced reloading of the configuration cache cannot be performed for a passive proxy
Well, not that good. The configuration cache reloading command is ignored by passive proxies.
There is no way to force sending of that data from the server side either, currently. Restarting the server won't help—it could make things worse, if the sending was scheduled while the server was not running. What we could do in our small installation is reduce that interval. Edit zabbix_server.conf
and look for the ProxyConfigFrequency
option. Set it to 180
, or some similarly small value, and restart the server. After a few minutes, check the server logfile:
sending configuration data to proxy "First proxy" at "192.168.56.11", datalen 6363
Such a line indicates successful sending of the configuration data to the passive proxy. Note that ProxyConfigFrequency
affects communication with all passive proxies; we cannot set this interval to a different value for different proxies.
When would one choose an active or passive proxy? In most cases, an active proxy would be preferred, as it can result in a smaller number of connections and we may force it to reload its configuration from the server. If the proxy cannot or should not connect to the server, a passive proxy could be used. A common situation when a passive proxy is used is when the Zabbix server is located in the internal network, and the proxy is monitoring a DMZ. We wouldn't want to have connections from the DMZ to the internal network, thus the choice of a passive proxy.