一、zabbix代理端配置
1.安装代理
[root@sh_proxy ~]# yum install -y https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-proxy-mysql-4.0.20-1.el7.x86_64.rpm
2.创建代理数据库
[root@sh_proxy~]# mysql -uroot -p MariaDB [(none)]> create database zabbix_proxy character set utf8 collate utf8_bin; MariaDB [(none)]> grant all on zabbix_proxy.* to zabbix_proxy@'localhost' identified by '123';
3.导入数据库
[root@sh_proxy ~]# zcat /usr/share/doc/zabbix-proxy-mysql-4.0.20/schema.sql.gz | mysql -uzabbix_proxy -p123 zabbix_proxy
4.编辑配置文件
[root@sh_proxy ~]# grep -E '^DB|^Ser|^Host' /etc/zabbix/zabbix_proxy.conf Server=172.16.1.110 Hostname=sh_proxy DBHost=localhost DBName=zabbix_proxy DBUser=zabbix_proxy DBPassword=123
5.启动代理服务
[root@sh_proxy ~]# systemctl start zabbix-proxy.service [root@sh_proxy ~]# systemctl enable zabbix-proxy.service
二、zabbix客户端配置
ip地址指向代理服务端
[root@tomcat ~]# grep -E '^Ser|^Host' /etc/zabbix/zabbix_agentd.conf Server=172.16.1.7 ServerActive=172.16.1.7 Hostname=tomcat [root@tomcat ~]# systemctl restart zabbix-agent