The new company monitoring with the Zabbix, which used to Zabbix-proxy, originally did not try to get, now first installed to see in order to follow up the use of inspection.
Zabbix-proxy is a monitoring proxy server, which collects the monitored data, stores it in the buffer, the time can be set by the configuration file, and then transferred to Zabbix_server; the monitoring agent needs a separate database .
Zabbix-proxy solved the problem:
1, reduce the workload of Zabbix server side or load.
2, solve the remote, network problems, such as your agent side of the machine is the intranet, but the server is indeed outside the network this situation.
Approximate idea:
1, first build Zabbix server
2, install Zabbix agent on monitored side
3, build a zabbix-proxy, the Zabbix proxy as Zabbix Server Agent side.
One, server side: 192.168.128.129
1, install RPM package of lamp environment Yum install-y httpd mysql mysql-libs php php-mysql mysql-server php-bcmath php-gd php-mbstring
Before installing Zabbix, you need to install the Epel extension source. (Zabbix is in the Epel extension source)
Install Zabbix server: Yum install-y zabbix22 zabbix22-agent (This can not be installed) Zabbix22-server Zabbix22-server-mysql Zabbix22-webzabbix22-web-mysql Net-snmp-devel
2, modify the MySQL configuration file, define the default character set, in order to avoid garbled web interface. (or specify the UTF8 character set when you create the database, import the database)
Vi/etc/my.cnf
[Mysqld]
Default-character-set = UTF8
[Mysqld_safe]
Default-character-set = UTF8
3, start the service
/ETC/INIT.D/HTTPD Start (Warning alert at startup, modifying configuration file vi/etc/httpd/conf/httpd.conf servername the previous comment)
/etc/init.d/zabbix-server Start (default does not start)
/etc/init.d/zabbix_agent start
/etc/init.d/mysqld start
4. Create a database to authorize users to import data
Mysql-uroot
Create Database Zabbix;
Grant all privileges the zabbix.* to ' Zabbix ' @ ' localhost ' identified by ' Zabbix ';
Use Zabbix;
Source/usr/share/zabbix-mysql/schema.sql
Source/usr/share/zabbix-mysql/images.sql
Source/usr/share/zabbix-mysql/data.sql
Exit
5, Web Installation Zabbix, in the address bar input 192.168.128.129
Modify the parameter values in the php.ini based on the error prompt.
Vi/etc/php.ini
/ETC/INIT.D/HTTPD restart
6, Login Zabbix
Default account; admin
Default password: Zabbix
7, after login prompt zabbxi-server not run
Edit the Zabbix-server configuration file and start the Zabbix-server service.
Vi/etc/zabix_server.conf
Change dbname =zabbix (default)
Dbuser=zabbix (default)
Dbpassword=zabbix
/etc/init.d/zabbix-server start Zabbix server boot OK.
Two, the client:
1,yum install-y zabbix22-agent
2,vi/etc/zabbix/zabbix-agentd.conf
Will server=127,0,0,1, point to the IP of the zabbix-server.
Of course, you can also point the IP in server-active to Zabbix-server. (Active mode)
3, Start zabbix-agent
/etc/init.d/zabbix-agent start
PS Aux|grep Zabbix
Third, back to the Zabbiweb page, the monitor will be added to the monitoring center.
It can be found that monitoring is no problem. But it seems, a little off the subject ....
Back to the client, modify the IP that the server points to proxy in the/etc/zabbix/zabbix-agentd.conf configuration file.
Restart ZABBIX-AGENTD service,/etc/init.d/zabbix-agentd restart
Four, proxy side
1,yum install-y zabbix-proxy zabbix-server-mysql (with Schemal.sql)
2,mysql-uroot
Create Dabase zabbxi charater set UTF8;
Grant all on zabbix.* to ' Zabbix ' @ ' localhost ' identified by ' Zabbix ';
Use Zabbix;
Source/usr/share/zabbix-mysql/schema.sql
3. Modify the configuration file
Vi/etc/zabbix/zabbix_proxy.conf
Proxymode=0 or 1 1 means zabbix-server to fetch the data himself.
# #zabbix Server Address
server=192.168.128.129
serverport=10051 (keep Default)
# #主机名, this configuration is not related to the actual hostname of the machine, but must match the hostname of the Zabbix server when the machine is added, otherwise Zabbix server will not get the information
Hostname=zabbix_proxy
Logfile=/tmp/zabbix_proxy.log
Pidfile=/tmp/zabbix_proxy.pid
Dbhost=localhost
Dbname=zabbix
Dbuser=zabbix
dbpassword=123456
configfrequency=300
Zabbix Monitoring Agent Zabbix-proxy