zabbix分布式监控proxy
1)配置zabbix repo
rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
[root@jenkins yum.repos.d]# cat zabbix.repo 修改zabbix下载源
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/zabbix/4.0/rhel/7/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/zabbix/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
2)安装zabbix-proxy
yum install zabbix-proxy-mysql -y
3)配置zabbix-proxy
a:安装并启动mariadb
yum install mariadb-server -y
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
回车
n
y
y
y
y
b:创库授权,并导入数据
create database zabbix_proxy;
grant all on zabbix_proxy.* to zabbix@localhost identified by 'zabbix'
exit
zcat /usr/share/doc/zabbix-proxy-mysql*/schema.sql.gz | mysql -uzabbix -pzabbix zabbix_proxy
c:修改zabbix-proxy配置文件
vim /etc/zabbix/zabbix_proxy.conf
Server=10.0.0.71
Hostname=sh-proxy
DBHost=localhost
DBName=zabbix_proxy
DBUser=zabbix
DBPassword=zabbix
4)启动zabbix-proxy
systemctl start zabbix-proxy