下载
[root@zabbix-proxy-active ~]# wget https://mirror.tuna.tsinghua.edu.cn/grafana/apt/pool/main/g/grafana/grafana_7.5.9_amd64.deb
安装
[root@zabbix-proxy-active ~]# dpkg -i grafana_7.5.9_amd64.deb
安装zabbix插件
[root@zabbix-proxy-active ~]# grafana-cli plugins install alexanderzobnin-zabbix-app
installing alexanderzobnin-zabbix-app @ 4.1.5
from: https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/4.1.5/download
into: /var/lib/grafana/plugins
✔ Installed alexanderzobnin-zabbix-app successfully
Restart grafana after installing plugins . <service grafana-server restart>
报错
[root@zabbix-proxy-active ~]# dpkg -i grafana_7.5.9_amd64.deb
(Reading database ... 111563 files and directories currently installed.)
Preparing to unpack grafana_7.5.9_amd64.deb ...
Unpacking grafana (7.5.9) over (7.5.9) ...
dpkg: dependency problems prevent configuration of grafana:
grafana depends on libfontconfig1; however:
Package libfontconfig1 is not installed.
dpkg: error processing package grafana (--install):
dependency problems - leaving unconfigured
Processing triggers for systemd (237-3ubuntu10.50) ...
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
grafana
解决方法:(然后重新执行安装)
[root@zabbix-proxy-active ~]# apt-get -f -y install
查看端口
[root@zabbix-proxy-active ~]# ss -tanl
LISTEN 0 128 *:3000 *:*
重启
[root@zabbix-proxy-active ~]# systemctl restart grafana-server.service
浏览器登录ip:3000
先配置好mysql
测试
先把zabbix插件安装上
选择zabbix插件并启动,如果没有执行上面的安装插件命令
点击框启动插件
设置插件
添加
http://172.31.1.20/zabbix/api_jsonrpc.php
测试
导入模板:
7877
查看效果