Difference Zabbix agent active mode and passive mode
Zabbix agent There are two modes of operation:
1, passive mode: This mode is the default mode of operation Zabbix emitted by Zabbix Zabbix Agent Server to instruction fetch data, Zabbix Agent passively to acquire data and return to the Zabbix server, Zabbix server periodically solicit data from agent. The biggest problem is that this mode would increase the workload Zabbix server, in a large number of server environment, Zabbix server can not timely access to the latest data.
2, the active mode: the active data collected by the Agent Zabbix Zabbix and returned to the server, the server does not require intervention Zabbix separately, thus reducing stress mode using active Zabbix server in a certain program.
Zabbix_server end when an excessive number of host, by the end Server to collect data, Zabbix will appear serious performance problems, mainly as follows:
1, when the monitor is an order of magnitude when the end arrives, Web operation very slow, prone 502
2, the layer breaks
3, open process (Pollar) too much, even reducing the number of item, adding later there will be a certain amount of machine problems
So the following two main optimization direction to consider:
1, add a Proxy node or Node doing distributed monitoring mode
2, to adjust the active mode Agentd
Since the first program need to increase physical machine, so the first try of the second program.
A is configured to monitor the adjusted end zabbix_agentd.conf:
= 0 the LogFileSize
# Server = 192.168.5.57 # If set to pure passive mode, you should comment out this one configuration
StartAgents = 0 # client agent mode, set to 0 disables passive mode, the monitor side zabbix_agentd not listening local port, so you can not view the process in netstat -tunpl in zabbix_agentd
ServerActive = server IP address 192.168.5.57 # active mode
Hostname = Web01 # important: client hostname, do not use the system to configure the default hostname
RefreshActiveChecks = 120 # monitored monitored item to the server acquires the cycle, the default can 120s
BufferSize = # space 100 is stored in the monitoring terminal monitoring information
Timeout = 3 # timeout
[Root @ CentOS7 ~] # grep -v ^ # /etc/zabbix/zabbix_agentd.conf | grep -v ^ $
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
StartAgents=0
ServerActive=192.168.5.57
Hostname=Web01
RefreshActiveChecks=120
BufferSize=100
Timeout=3
Include=/etc/zabbix/zabbix_agentd.d/*.conf
Note: zabbix agent under the pure active mode, can only support Zabbix Agent (Active) types of monitoring items.
Second, adjusting Monitoring Templates
We recommended a complete clone Template OS Linux templates to change:
1. Click Template OS Linux template name
Click below full clone
Modify the template name, click on the bottom of the add
Access the template list to find the template you just added and click the monitored items
Select All, click batch update
The type of tick, choose Zabbix client (active), click on the bottom most updated
Configuration -> Host -> click on a host name -> Templates
取消原来的连接并清理,添加刚才的模板(active)