Schematic:
-
Remote monitoring equipment area
-
Monitor local area network instability
-
When zabbix monitoring thousands of devices, use it to reduce the pressure on the server
service | External network ip | Network ip | |
zabbix-server | zabbix-server | 10.0.0.71 | |
zabbix-agent | zabbix-agent | 172.16.1.7 | |
zabbix-proxy | zabbix-proxy | 10.0.0.8 |
NOTE: 10.0.0.7 and 10.0.0.8 In one LAN segment, but can not connect zabbix-agent xshell
1 $ wget HTTPS: // mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm 2 $ RPM -ivh zabbix-Release - 4.0 - 2 .el7.noarch.rpm . 3 . 4 # change Tsinghua source . 5 Vim / etc / yum .repos.d / zabbix.repo . 6 # line mode . 7 % S # HTTP: // repo.zabbix.com # https://mirrors.tuna.tsinghua.edu.cn/zabbix #G
-
4.0 zabbix yum source
-
Installation zabbix-proxy-mysql service
-
Creating zabbix_proxy, import database
-
Start zabbix-proxy
-
1 [root@zabbix-proxy ~]# yum install zabbix-proxy-mysql.x86_64 -y
1 MariaDB [(none)]> create database zabbix_proxy charset utf8; 2 Query OK, 1 row affected (0.00 sec) 3 MariaDB [(none)]> grant all on zabbix_proxy.* to zabbix@localhost identified by '123456'; 4 Query OK, 0 rows affected (0.00 sec)
. 1 $ RPM ZABBIX the -ql PROXY- MySQL 2 / usr / Share / DOC / ZABBIX-PROY-MySQL- 4.0 . . 17 /schema.sql.gz - this is a compressed package . 3 . 4 # into the database . 5 $ zcat / usr / Share / DOC / ZABBIX-Proxy-MySQL- 4.0 . . 17 /schema.sql.gz | MySQL -uzabbix -p123456 zabbix_proxy
. 1 $ Vim / etc / ZABBIX / zabbix_proxy.conf 2 30 Server = 10.0 . 0.71 - connect to the database . 3 49 the Hostname = bj_proxy - each proxy name can not be the same . 4 196 DBPassword = 123456 - database password . 5 . 6 . 7 $ systemctl Start zabbix- proxy.service 8 $ systemctl enable zabbix-proxy.service
1 $ vim /etc/zabbix/zabbix-agent.conf 2 3 #将Server更改为proxy的IP地址 4 98 Server=172.16.1.8 5 139 ServerActive=172.16.1.8 6 150 Hostname=172.16.1.7 7 169 HostMetadata=web 8 $ systemctl restart zabbix-agent.service
查看结果