美文网首页
Linux云计算学习笔记day55

Linux云计算学习笔记day55

作者: 我要笑 | 来源:发表于2019-07-08 19:45 被阅读0次

Zabbix

一、安装zabbix 3.0 LTS

1:配置zabbix yum仓库
curl -o zabbix-release-3.0-1.el7.noarch.rpm https://mirror.tuna.tsinghua.edu.cn/zabbix/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

rpm -ivh zabbix-release-3.0-1.el7.noarch.rpm

[root@zabbix-server ~]# cat /etc/yum.repos.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=https://mirror.tuna.tsinghua.edu.cn/zabbix/zabbix/3.0/rhel/7/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX

[zabbix-non-supported]
name=Zabbix Official Repository non-supported - basearch baseurl=https://mirror.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服务端和zabbix-web前端
yum install zabbix-server-mysql zabbix-web-mysql -y

3:安装mariadb,创建zabbix库,授权zabbix用户
yum install mariadb-server -y
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
回车
n
y
y
y
y

mysql
:create database zabbix character set utf8 collate utf8_bin;
:grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';

导入zabbix表结构和初始数据
zcat /usr/share/doc/zabbix-server-mysql-3.0.*/create.sql.gz | mysql -uzabbix -p zabbix

检查zabbix库是否导入成功
mysql -uroot zabbix -e 'show tables'

4:配置启动zabbix-server
vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

启动zabbix-server
systemctl start zabbix-server
systemctl enable zabbix-server

检查:
netstat -lntup

5:修改Zabbix前端的PHP配置,并启动httpd
vi /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai

systemctl start httpd
systemctl enable httpd

6:前端zabbix-web的安装
浏览器:http://10.0.0.71/zabbix

后期修改zabbix数据库密码的时候,需要修改的配置文件:
/etc/zabbix/web/zabbix.conf.php

http://10.0.0.71/zabbix/zabbix.php
登录的账号密码;

Pasted Graphic.png

Admin
zabbix


Pasted Graphic 1.png
Pasted Graphic 2.png Pasted Graphic 3.png Pasted Graphic 4.png Pasted Graphic 5.png Pasted Graphic 7.png Pasted Graphic 8.png

10.0.0.71安装

1.yum install zabbix-get.x86_64

201配置

2.vim /etc/zabbix/zabbix_agentd.conf

UserParameter=
UserParameter=tps,iostat|awk '1~/^sda/{print $2}'
配置一下
systemctl restart zabbix-agent.service

然后在71上进行测试
zabbix_get -s 10.0.0.201 -p 10050 -k tps
1.47

然后去web上进行配置
找到web主机点击监控项

Pasted Graphic.png Pasted Graphic 1.png

自定义触发器

创建方法

配置-主机 触发器-创建触发器

自定义触发器

创建方法
配置-主机 触发器-创建触发器

配置触发器

1__#$!@%!#__Pasted Graphic 1.png

相关文章

网友评论

      本文标题:Linux云计算学习笔记day55

      本文链接:https://www.haomeiwen.com/subject/lfaahctx.html