The first steps with the Zabbix proxy

After understanding that the environment was born without a Zabbix proxy and knowing that we need to introduce this feature to the environment, what should we do? What are the precautions to take and the key areas to focus on?

Zabbix proxy is a program that must be installed in the same manner as the Zabbix server, by leaving the source, or through packages. The options in building, if not installed through packages, should be the same as those used for the Zabbix server (except that you may need to change enable-server to enable-proxy). The configuration file is almost the same as that for the Zabbix server, except the parameters related to their own settings (of Zabbix proxy). These are the parameters:

  • ProxyMode: This parameter defines how the Zabbix proxy will behave in active mode (value 0), or in passive mode (option 1). Active mode is the standard. It was introduced in version 1.8.3. The choice of modes has little influence on performance. Instead, the idea is to try to use as many active connections as possible because in this way, we have fewer tasks performed by the Zabbix server, even in an environment with a few hundreds of Zabbix proxies. In addition to choosing the way, in this parameter, it is also necessary that the Zabbix server knows which mode the Zabbix proxy is using. This is done directly in the Zabbix GUI. Remember that the Zabbix proxy, unlike the Zabbix agent, will work only in one mode (active or passive), not both.
  • Hostname: This parameter defines how the Zabbix proxy will present itself to the Zabbix server. This name must be the same as that created in the Zabbix GUI. Otherwise, the Zabbix proxy will not be recognized and answer the Zabbix server.
  • ProxyLocalBuffer: This is the time in hours for which the Zabbix proxy maintains data in the local database, even after delivering it to Zabbix server. It can be 0 if we don't want to access the data on the Zabbix proxy database.
  • ProxyOfflineBuffer: This is the time in hours for which the Zabbix proxy keeps the data in the local base until it is delivered to the Zabbix server. It must be the time (in hours) we can manage to work without the Zabbix server.
  • HeartbeatFrequency: This is valid only for an active Zabbix proxy. It is the time in seconds for which the Zabbix proxy sends a heartbeat signal to the Zabbix server. This time is disregarded if the Zabbix proxy has to deliver data to the Zabbix server in the interval (the heartbeat has already occurred when the Zabbix proxy delivers data or searches for settings).
  • ConfigFrequency: This is valid only for the active Zabbix proxy. It is the time in seconds at which the Zabbix proxy contacts Zabbix server to check the new settings (hosts, items, keys, and so on). The default time is 3,600 seconds, a very high time. The recommendation is something between 900 and 1,800 seconds, or any other value that is appropriate for the environment. It's important not to leave it too low, since it may impact the Zabbix server's performance, especially with a large number of Zabbix proxies.
  • DataSenderFequency: This is valid only for the active Zabbix proxy. Here lies the main parameter of the Zabbix proxy, which is related to Zabbix's performance. This is the time in seconds in which the Zabbix proxy delivers the data collected from the environment for the Zabbix server. By default (at least until version 2.4), this time is 1 second. What if this time was 5 seconds or more? We would be creating a data buffer in the Zabbix proxy. Making fewer TCP connections to deliver this data to the Zabbix server consequently leads to less INSERT statements with the same amount of data. The suggestion is to consider a value somewhere between 5 and 10 seconds at the beginning, and seek adjustments if necessary. Don't forget that until this data gets to the Zabbix server, the triggers are not evaluated.
  • Server: This is where we enter the Zabbix server's IP address or DNS name to which the proxy will report. It is important to remember that this Zabbix server will meet the demand from the Zabbix proxy with the available trappers.
  • ServerPort: This is where we are informed that the port (10051 by default) in the Zabbix server, set by the previous parameter, is accepting connections.

In the Zabbix server GUI and config file, there are also some parameters related to Zabbix proxies, but they are used for only those Zabbix proxies that are working in passive mode. The parameters are as follows:

  • ProxyPollers: This is the number of pollers dedicated to contact with a passive Zabbix proxy. In theory, we should have one poller for each Zabbix proxy environment if it wants to attend all of them simultaneously, but this is not always desired. This value should be somewhere between 30 percent and 50 percent of the number of Zabbix proxy environments, so we also maintain a control flow at this point. Processing of the new data is very fast and ProxyPollers sits idle for a long time. In practice, suppose we have an environment with many Zabbix proxies and have some downtime on the Zabbix server. Then, when the Zabbix server gets back, all ProxyPollers will try to fetch the data contained in ProxyOfflineBuffer of each Zabbix proxy at the same time, and this can lead to an overload on the Zabbix server. So, if the data has already been collected and is secure in the Zabbix proxy, we can delay a bit the receipt of such data to ensure high performance of the Zabbix server. For this, we limit ProxyPollers to a number smaller than the number of passive Zabbix proxies we have in the environment.
  • ProxyConfigFrequency: This is the frequency in seconds for which the Zabbix server pushes the new settings to the Zabbix proxy. The default is 3,600 seconds, a time too high for more dynamic environments. The trick is to use something between 600 and 1,800 seconds.
  • ProxyDataFrequency: This is the time in seconds that the Zabbix server takes while asking Zabbix proxy for the collected data. The default is 1 second, a very short time. The recommendation is to start with 5 seconds, or even more if this delay can be accepted by the environment.

From this point, and with attention to these parameters, we can start using a Zabbix proxy. In the Zabbix GUI, using the Host Configuration menu or the Management menu, we can change the hosts that will be responsible for each Zabbix proxy created in the environment:

The first steps with the Zabbix proxy

With this model in mind, it is very simple to increase the number of Zabbix proxies. The settings and adjustments in this case are minimal. So, keep in mind that it is quite a valid plan to have at least one Zabbix proxy in the same local network where we have the Zabbix server.

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

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