安装grafana
安装包下载地址:Index of /grafana/yum/rpm/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror下载到本地拖进虚拟机
[root@k8s-demo-master-a-1 src]# ls
grafana-7.5.6-1.x86_64.rpm mysql-8.0.28-1.el7.x86_64.rpm-bundle.tar mysql80-community-release-el7-5.noarch.rpm zabbix-6.0.1.tar.gz[root@k8s-demo-master-a-1 src]#yum -y install grafana-7.5.6-1.x86_64.rpm
启动grafana
[root@k8s-demo-master-a-1 src]#systemctl start grafana-server.service
[root@k8s-demo-master-a-1 src]#ss anplt | grep 3000
LISTEN 0 128 [::]:3000 [::]:* users:(("grafana-server",pid=2211,fd=15))
访问地址:http://http://192.168.0.40:3000/
重置密码grafana登录密码
第一步:
搜索grafana的库文件,这里保存的是密码账号:
find / -name "grafana.db"
第二步:
使用sqlite3加载数据库文件
sqlite3 /var/lib/grafana/grafana.db
第三步:
把更新语句复制粘贴进去
update user
set password = '59acf18b94d7eb0694c61e60ce44c110c7a683ac6a8f09580d626f90f4a242000746579358d77dd9e570e83fa24faa88a8a6', salt = 'F3FAxVm33R' where login = 'admin';
第四步:
退出,重启grafana服务
[root@k8s-demo-master-a-1 src]#systemctl start grafana-server.service
安装 Grafana-zabbix 插件
[root@k8s-demo-master-a-1 ~]# grafana-cli plugins install alexanderzobnin-zabbix-app
installing alexanderzobnin-zabbix-app @ 4.1.4
from: https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/4.1.4/download
into: /var/lib/grafana/plugins✔ Installed alexanderzobnin-zabbix-app successfully
Restart grafana after installing plugins . <service grafana-server restart>
[root@k8s-demo-master-a-1 ~]#systemctl restart grafana-server.service //重启服务
启用zabbix插件
配置zabbix插件
配置图形展示
添加仪表盘