安装garafana和连接zabbix数据源的插件
[root@localhost /]# dnf -y install grafana
Failed to set locale, defaulting to C.UTF-8
Last metadata expiration check: 0:05:47 ago on Tue May 18 20:31:36 2021.
Dependencies resolved.
===============================================================================
Package Architecture Version Repository Size
===============================================================================
Installing:
grafana x86_64 7.3.4-1.el8 a2 38 M
Installing weak dependencies:
grafana-pcp x86_64 3.0.0-1.el8 a2 9.1 M
Transaction Summary
===============================================================================
Install 2 Packages
Total size: 47 M
Installed size: 189 M
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : grafana-pcp-3.0.0-1.el8.x86_64 1/2
Running scriptlet: grafana-7.3.4-1.el8.x86_64 2/2
Installing : grafana-7.3.4-1.el8.x86_64 2/2
Running scriptlet: grafana-7.3.4-1.el8.x86_64 2/2
Running scriptlet: grafana-pcp-3.0.0-1.el8.x86_64 2/2
Running scriptlet: grafana-7.3.4-1.el8.x86_64 2/2
/sbin/ldconfig: File /lib64/libgpm.so.2 is empty, not checked.
/sbin/ldconfig: File /lib64/libgpm.so.2.1.0 is empty, not checked.
Verifying : grafana-7.3.4-1.el8.x86_64 1/2
Verifying : grafana-pcp-3.0.0-1.el8.x86_64 2/2
Installed products updated.
Installed:
grafana-7.3.4-1.el8.x86_64 grafana-pcp-3.0.0-1.el8.x86_64
Complete!
[root@localhost /]# 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@localhost /]# systemctl start grafana-server
[root@localhost /]# ss -antl
State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
LISTEN 0 128 0.0.0.0:10050 0.0.0.0:*
LISTEN 0 128 0.0.0.0:10051 0.0.0.0:*
LISTEN 0 128 0.0.0.0:9000 0.0.0.0:*
LISTEN 0 128 0.0.0.0:111 0.0.0.0:*
LISTEN 0 128 0.0.0.0:80 0.0.0.0:*
LISTEN 0 32 192.168.122.1:53 0.0.0.0:*
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
LISTEN 0 5 127.0.0.1:631 0.0.0.0:*
LISTEN 0 80 *:3306 *:*
LISTEN 0 128 [::]:111 [::]:*
LISTEN 0 128 [::]:22 [::]:*
LISTEN 0 5 [::1]:631 [::]:*
LISTEN 0 128 *:3000 *:*
访问garafana主机的3000端口
默认账号:admin 密码:admin
第一次登录修改初始密码,还是设置的admin
连接zabbix的api接口获取数据
开启grafana和zabbix连接的插件
选择添加数据源
在这里插入图片描述
配置zabbix账号密码和api接口
在官网找到自己想要的模板
官网地址:https://grafana.com/
打开搜索模板的界面
选择zabbix在列表中找到自己想要的模板
效果
反正效果出不来,我也不知道为什么,反正账户密码一直不对,我也不知道为什么