Zabbix proxy is a monitoring proxy server that can implement centralized or distributed monitoring. Proxy proxy can be used to monitor multiple nodes, across regions, and hundreds of thousands of servers. Proxy proxy is mainly applicable to the following situations.
1) zabbix monitors too many hosts and one server cannot support them.
2) The server is in different data centers in the same region. It is easy to transmit and transfer data through proxy.
3) servers are deployed and monitored in multiple provinces or abroad using proxy.
The proxy can be deployed in active or passive mode. Generally, the proxy is deployed in active mode to relieve the pressure on the server. When the proxy is deployed in active mode, zabbix server has the least load.
Architecture diagram:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/41/30/wKiom1PRrxbw9Cu0AAD4O3BdeuQ671.jpg "Title =" proxy.jpg "alt =" wkiom1prrxbw9cu0aad4o3bdeuq671.jpg "/>
Architecture Description:
1) zabbix server: writes data to the database and displays the data on the Web Front end through Apache | nginx + PHP.
2) zabbix Proxy: helps the server collect the data of the monitored end and actively transmits the collected data to the server. The proxy database only performs transit.
3) Database: All configuration information is stored in the database, and proxy database data is periodically summarized into the server database.
4) zabbix agent: The agent obtains host data and sends the collected data to the server (active mode) or the server actively retrieves data (passive mode ).
5) Email: Send alarm emails (fault emails and fault recovery emails) through Qmail | SMTP with postfix ).
6) SMS: send a short message to the responsible user through SMS.
Install and configure Proxy:
yum install net-snmpyum install net-snmp-develgroupadd -g 5000 zabbixuseradd zabbix -u 5000 -g zabbix -s /sbin/nologintar -zxvf zabbix-2.2.1.tar.gzcd zabbix-2.2.1./configure --prefix=/usr/local/zabbix --sysconfdir=/etc/zabbix --with-mysql=/usr/local/mysql/bin/mysql_config--with-net-snmp --enable-proxy --enable-agent --with-libcurlmake && make install
Create a database and import the proxy database table structure:
mysql -uroot -p -S /data/mysql/3306/mysql.sock create database shproxydb1 character set utf8;grant all privileges on shproxy01.* to [email protected]‘192.168.3.242‘ identified by ‘^shproxy01$‘;cat database/mysql/schema.sql |mysql -uroot -p zabbix -S /data/mysql/3306/mysql.sock
Install fping. zabbix detects the survival of the host through fping. It is installed under/usr/local/sbin/by default:
Tar-zxvf fping-3.8.tar.gz./configure make & make install # Add a forced setuid to zabbix to build an ICMP packet as the root user. Chmod U + S/usr/local/sbin/fping
Optimize the zabbxi_proxy configuration file based on the number of hosts monitored by proxy (my proxy monitors nearly 400 servers ):
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/41/32/wKiom1PRsjCRlGX4AAIyu-dV6C8781.jpg "Title =" proxyconfig.jpg "alt =" wKiom1PRsjCRlGX4AAIyu-dV6C8781.jpg "/>
Add the proxy on the front-end of zabbix Server:
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/41/33/wKioL1PRtWTCIMRWAAJ8PA_xm2Q827.jpg "Title =" 11.jpg" alt = "wkiol1prtwtcimrwaaj8pa_xm2q827.jpg"/>
Summary:
1) proxy has few requirements on CPU and memory. I am an HP Server and have nearly 400 servers monitored by 4G memory.
2) zabbix 2.0 is very time sensitive and requires the proxy and server clock to be synchronized. Otherwise, the proxy queue will remain high.
3) proxy proxyofflinebuffer I set it for 2 hours. When zabbix server or zabbix dB fails, the monitoring data will not be lost after 2 hours of fault recovery.
This article from the "simple dream catcher" blog, please be sure to keep this source http://sfzhang88.blog.51cto.com/4995876/1529967