首页 > 其他 > 详细

zabbix

时间:2019-12-08 20:36:55      阅读:75      评论:0      收藏:0      [点我收藏+]

系统配置

https://www.cnblogs.com/anyux/p/12001378.html

安装zabbix

服务端安装

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
#安装zabbix 
yum install -y zabbix-server-mysql zabbix-web-mysql

#安装启动 mariadb数据库
yum install -y  mariadb-server
systemctl start mariadb
systemctl enable mariadb

#创建数据库
mysql -e 'create database zabbix character set utf8 collate utf8_bin;'
mysql -e 'grant all privileges on zabbix.* to zabbix@localhost identified by "123456";'

#导入数据 指定上面创建的用户名,密码
zcat /usr/share/doc/zabbix-server-mysql-3.0.28/create.sql.gz|mysql -uzabbix -p123456 zabbix

#zabbix程序连接mysql
sed -i.ori '115a DBPassword=123456' /etc/zabbix/zabbix_server.conf

#设置时区
sed -i.ori '18a php_value date.timezone  Asia/Shanghai' /etc/httpd/conf.d/zabbix.conf

#解决中文乱码
yum -y install wqy-microhei-fonts
\cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf

#启动服务
systemctl start zabbix-server
systemctl start httpd
systemctl enable zabbix-server
systemctl enable httpd


#输出信息
echo "浏览器访问 http://`hostname -I|awk '{print $1}'`/zabbix"

客户端安装

rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
#安装zabbix客户端
yum install -y zabbix-agent 
sed -i.ori 's#Server=127.0.0.1#Server=192.168.255.101#' /etc/zabbix/zabbix_agentd.conf
systemctl start  zabbix-agent
systemctl enable  zabbix-agent

安装zabbix-get

yum install -y zabbix-get
zabbix_get -s s101 -p 10050 -k "system.cpu.load[all,avg1]"
zabbix_get -s s102 -p 10050 -k "system.cpu.load[all,avg1]"
zabbix_get -s s103 -p 10050 -k "system.cpu.load[all,avg1]"
zabbix_get -s s104 -p 10050 -k "system.cpu.load[all,avg1]"
zabbix_get -s s105 -p 10050 -k "system.cpu.load[all,avg1]"

zabbix

原文:https://www.cnblogs.com/anyux/p/12006831.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!