###安装grafana插件需联网安装
[root@zabbix grafana]# grafana-cli plugins list-remote #查询可用的插件
id: abhisant-druid-datasource version: 0.0.5
id: adremsoft-netcrunch-app version: 1.0.0
id: alexanderzobnin-zabbix-app version: 3.8.1
id: ayoungprogrammer-finance-datasource version: 1.0.0
[root@zabbix grafana]# grafana-cli plugins install alexanderzobnin-zabbix-app #安装zabbix组件
✔ Installed alexanderzobnin-zabbix-app successfully
[root@zabbix grafana]# grafana-cli plugins install percona-percona-app
✔ Installed percona-percona-app successfully
[root@zabbix grafana]# grafana-cli plugins install grafana-piechart-panel
✔ Installed grafana-piechart-panel successfully
[root@zabbix grafana]# systemctl restart grafana-server
离线安装组件
模块添加,只需要将模块文件放在/var/lib/grafana/plugins(在配置文件grafana.ini:;plugins = /var/lib/grafana/plugins)
[root@zabbix plugins]# ls
alexanderzobnin-grafana-zabbix-a8b2e3c grafana-piechart-panel
[root@zabbix plugins]# pwd
/var/lib/grafana/plugins
重启grafana服务
添加zabbix模块
添加mysql数据源
Settings
Name : 数据源名称
MySQL Connection
Host : 数据库链接地址默认3306端口
Database : 库名
User/Password : 登陆用户密码(改用户具有查询权限)