zabbix+grafana监控

一、zabbix安装
配置添加zabbix的yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
清除缓存
yum clean all
创建缓存
yum makecache
安装zabbix初始化mysql、zabbix数据库
yum -y install zabbix-server-mysql zabbix-web-mysql mariadb-server zabbix-agent
启动mariadb
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by '123456';
zcat /usr/share/doc/zabbix-server-mysql-4.0.6/create.sql.gz|mysql -uzabbix -p123456 zabbix
配置zabbix
vim /etc/httpd/conf.d/zabbix.conf
修改时间
php_value date.timezone Asia/Shanghai
启动httpd并设置为开机自启
systemctl start httpd
systemctl enable httpd
修改zabbix_server密码
vim /etc/zabbix/zabbix_server.conf
DBPassword=123456
启动zabbix-server并设置为开机自启
systemctl start zabbix-server
systemctl enable zabbix-server
添加server_agent配置文件server的ip
vim /etc/zabbix/zabbix_agentd.conf
Server=zabbix_server的ip
启动zabbix-agent并设置为开机自启
systemctl start zabbix-agent
systemctl enable zabbix-agent
访问zabbix页面 ip/zabbix
修改zabbix server 的ip地址
zabbix+grafana监控
二、安装配置Grafana
下载安装包
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.2.0-1.x86_64.rpm
安装编译环境
yum install initscripts fontconfig
解压安装grafana
rpm -ivh grafana-4.2.0-1.x86_64.rpm
启动并设置为开机自启
systemctl start grafana-server.service
systemctl enable grafana-server.service
访问grafana
(用户名和密码都是admin)
zabbix+grafana监控
安装插件
zabbix+grafana监控
安装grafana-cli
grafana-cli plugins install alexanderzobnin-zabbix-app
重启grafana_server
systemctl restart grafana-server
连接zabbix,写上zabbix的ip
zabbix+grafana监控
添加用户名、密码、版本
zabbix+grafana监控
创建仪表盘
zabbix+grafana监控
监控
zabbix+grafana监控

转载于:https://blog.51cto.com/14241151/2378603

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值