1. Working principle:
ZabbixproxyIt is a monitoring proxy server that collects monitoring data and stores the data in the buffer zone. The storage time can be set through the configuration file and then transmitted to Zabbixserver. The monitoring proxy needs a separate database.
Benefits of zabbixproxy:
Remote Monitoring
When the monitored location communication is inconvenient
When monitoring thousands of devices
Simplify maintenance of distributed monitoring and reduce the load of zabbixserver
650) this. width = 650; "style =" width: 588px; height: 201px; "title =" 2013-09-27_143658.jpg "alt =" 143717888.jpg" src = "http://www.bkjia.com/uploads/allimg/131228/044A44119-0.jpg" width = "1002" height = "200"/>
Zabbixproxy is only a data collector and supports the following functions:
650) this. width = 650; "style =" width: 488px; height: 289px; "title =" 2013-09-27_145252.jpg "alt =" 145307693.jpg" src = "http://www.bkjia.com/uploads/allimg/131228/044A44329-1.jpg" width = "486" height = "456"/>
2. Install zabbixproxy
My zabbixserver is installed on 192.168.70.133, and zabbixproxy is installed on 192.168.70.135.
groupadd zabbixuseradd -g zabbix zabbixtar zxvf zabbix-2.0.8.tar.gzcd zabbix-2.0.8./configure --help./configure --prefix=/opt/zabbix_proxy --enable-proxy --with-net-snmp --with-mysql./configure --prefix=/opt/zabbix_proxy --enable-proxy --with-net-snmp --with-mysql=/opt/mysql/bin/mysql_configmake && make install
3. Create a database
Zabbixproxy only needs to import schema. SQL
[Root @ zhu2 mysql] #/opt/mysql/bin/mysql-urootmysql> create database zabbix_proxy; Query OK, 1 row affected( 0.02 sec) [root @ zhu2 mysql] #/opt/mysql/bin/mysql-uroot zabbix_proxy <schema. SQL # In the zabbix source package in the zabbix-2.0.8/database/mysql directory has three SQL file data. SQL images. SQL schema. SQL. When zabbix server is installed, all mysql databases need to be imported. When zabbix proxy is installed, only schema needs to be imported. SQL
4. Configure zabbixproxy's configuration file zabbix_proxy.conf
[Root @ zhu2 ~] # Vim/opt/zabbix_proxy/etc/zabbix_proxy.confServer = 192.168.70.20.# zabbix server IP address or host name Hostname = Zabbix_proxy1.35 # z the configuration of this host name must be known by zabbix server, logFile =/tmp/zabbix_proxy.log # pid file storage location DBName = zabbix_proxyDBUser = zabbixDBPassword = 123456 ConfigFrequency = 60 # zabbix proxy wants the server to retrieve configuration data frequency, in passive mode, this parameter will be ignored. DataSenderFrequency = 60 # the frequency at which zabbix proxy sends collected data to zabbix server
5. Start zabbixpeoxy
[root@zhu2 ~]# /opt/zabbix_proxy/sbin/zabbix_proxy -c /opt/zabbix_proxy/etc/zabbix_proxy.conf[root@zhu2 ~]# netstat -lntp | grep zabbixtcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 5222/zabbix_proxy
6. Configure the proxy node on the front-end of zabbixserver
Manage ---------- node management -------- create a proxy Node
Add the proxy node name correctly, that is, the value configured by the Hostname in the zabbixproxy configuration file.
# In this example, Hostname = Zabbix_proxy1.35 is configured. Therefore, the host name must be specified when a proxy node is created at the front end of zabbixserver.
Zabbixproxy configuration summary:
#1. the proxy server only acts as a data collector and transmits the collected data to the zabbix server at a certain frequency. there are two modes: Active Mode and passive mode. Active Mode and passive mode are for zabbix proxy. Here I use active mode. You only need to configure the configuration file of zabbix proxy, no configuration is made on zabbix server. the key is that when a proxy node name is created at the front end of zabbix server, the name should be the same as the Hostname value specified in the zabbix proxy configuration file.
This article is from the "Lang taosha" blog, please be sure to keep this source http://caisangzi.blog.51cto.com/6387416/1302821