Setting up a passive proxy

So far, we configured and discussed only one way a proxy can work, as 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. This is all that's required to switch the proxy to the passive mode—now restart the proxy process.

As opposed to the passive agent, the Server parameter is currently ignored by the passive proxy.

In the frontend, perform the following steps:

  1. Navigate to Administration | Proxies and click on First proxy in the Name column.
  2. Choose Passive in the Proxy mode drop-down, and notice how an Interface section appears.
  1. 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 sending configuration data 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.

Don't forget to change the proxy port if you are not running the proxy on the standard port 10051.

Well, let's try to force-reload 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 log file:

forced reloading of the configuration cache cannot be performed for a passive proxy 

Well, that's not good. The configuration cache-reloading command is ignored by passive proxies.

Currently, there is no way to force send that data from the server side either. 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 log file:

sending configuration data to proxy "First proxy" at "192.168.56.11", datalen 6363 

Such a line indicates the 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.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.48.135