linuxea:zabbix-proxy3.0版本Yum快速安装


zabbix-proxy yum源安装方式。非常快速简洁,十分推荐,这里需要注意的是不要搞错下载的包和本地的系统,一定要一致,尽管在zabbix3.2后的改动还是挺大,下次在体验:

I. 下载地址

centos6:http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/
centos7:http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/

下载三个安装包即可,随后安装

http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-agent-3.0.10-1.el7.x86_64.rpm
http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-proxy-mysql-3.0.10-1.el7.x86_64.rpm
http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-sender-3.0.10-1.el7.x86_64.rpm
http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-server-mysql-3.0.10-1.el7.x86_64.rpm

II. 数据库配置

这里使用docker,因为较少的机器

curl -Lk https://raw.githubusercontent.com/LinuxEA-Mark/docker-mariaDB/master/alpine-maridb/create-alpine-mariadb.sh |bash

授权

GRANT ALL PRIVILEGES ON zabbix.* To 'zabbix'@'127.0.0.1' IDENTIFIED BY 'e367361714c9';

III. 安装路径

[root@linuxea-Node5 /etc/zabbix]# rpm -ql zabbix-proxy-mysql
/etc/logrotate.d/zabbix-proxy
/etc/zabbix/zabbix_proxy.conf
/usr/lib/systemd/system/zabbix-proxy.service
/usr/lib/tmpfiles.d/zabbix-proxy.conf
/usr/lib/zabbix/externalscripts
/usr/sbin/zabbix_proxy_mysql
/usr/share/doc/zabbix-proxy-mysql-3.0.10
/usr/share/doc/zabbix-proxy-mysql-3.0.10/AUTHORS
/usr/share/doc/zabbix-proxy-mysql-3.0.10/COPYING
/usr/share/doc/zabbix-proxy-mysql-3.0.10/ChangeLog
/usr/share/doc/zabbix-proxy-mysql-3.0.10/NEWS
/usr/share/doc/zabbix-proxy-mysql-3.0.10/README
/usr/share/doc/zabbix-proxy-mysql-3.0.10/schema.sql.gz
/usr/share/man/man8/zabbix_proxy.8.gz

IV. 导入sql语句

[root@linuxea-Node5 /etc/zabbix]# cd /usr/share/doc/zabbix-proxy-mysql-3.0.10/
[root@linuxea-Node5 /usr/share/doc/zabbix-proxy-mysql-3.0.10]# gunzip schema.sql.gz 
[root@linuxea-Node5 /usr/share/doc/zabbix-proxy-mysql-3.0.10]# cp schema.sql /data/mariadb/

数据库:

MariaDB [zabbix]> source /data/mariadb/schema.sql

V. proxy配置文件

[root@linuxea-Node60 ~]# egrep -v "^$|^#" /etc/zabbix/zabbix_proxy.conf
Server=415.95.93.21
Hostname=Zabbix_Porxy-10
LogFile=/var/log/zabbix_proxy.log
LogFileSize=0
PidFile=/tmp/zabbix_proxy.pid
DBHost=127.0.0.1
DBName=zabbix_proxy
DBUser=zabbix_proxy
DBPassword=tsd3213123
DBPort=3306
Timeout=4
LogSlowQueries=3000
[root@linuxea-Node60 ~]# 

在整个配置文件中,Server填写server的ip,Hostname需要和server中的Proxies中的Proxy name保持一致,如下

但创建主机时,需要选中

  • 注意:agent的机器中server指向proxy ip并不是server ip

在来查看:

[root@linuxea-Node5 /usr/share/doc/zabbix-proxy-mysql-3.0.10]# tail -f /var/log/zabbix/zabbix_proxy.log 
 21119:20170812:150242.742 proxy #10 started [trapper #1]
 21128:20170812:150242.746 proxy #19 started [history syncer #1]
 21126:20170812:150242.746 proxy #17 started [http poller #1]
 21127:20170812:150242.746 proxy #18 started [discoverer #1]
 21117:20170812:150242.747 proxy #9 started [unreachable poller #1]
 21108:20170812:150242.751 cannot send heartbeat message to server at "415.95.93.21": proxy "172.16.0.5" not found
 21130:20170812:150242.752 proxy #21 started [history syncer #3]
 21132:20170812:150242.752 proxy #23 started [self-monitoring #1]
 21129:20170812:150242.752 proxy #20 started [history syncer #2]
 21131:20170812:150242.752 proxy #22 started [history syncer #4]
[root@linuxea-Node5 /usr/share/doc/zabbix-proxy-mysql-3.0.10]# 
2 分享

您可以选择一种方式赞助本站

支付宝扫码赞助

支付宝扫码赞助

日期: 2017-09-08分类: zabbix

标签: zabbix

发表评论