Grafana 安装使用问题汇总

作者:admin 发布:2018-03-16 浏览:8544次

环境:Ubuntu16.04

apt-get install grafana 

安装到的是2.6.0版本

当使用grafana-cli命令时,会发现 command not found,原因可能是版本太低,卸载安装新版本的grafana

apt-get remove grafana

重新安装grafana


wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_5.0.1_amd64.debsudo apt-getinstall -y adduser libfontconfigsudo 
dpkg -i grafana_5.0.1_amd64.deb

系统会报错

(Reading database ... 148425 files and directories currently installed.)
Preparing to unpack grafana_5.0.1_amd64.deb ...
Unpacking grafana (5.0.1) ...
dpkg: error processing archive grafana_5.0.1_amd64.deb (--install):
 trying to overwrite '/usr/share/grafana/conf/defaults.ini', which is also in package grafana-data 2.6.0+dfsg-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for systemd (229-4ubuntu21.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
 grafana_5.0.1_amd64.deb

原因grafana-data 没有卸载


执行命令

apt-get remove grafana-data

卸载完,再继续使用以上安装命令安装。


grafana安装zabbix插件(http://docs.grafana-zabbix.org/installation/)


root@ubuntu-xenial:/opt/grafana# grafana-cli plugins install alexanderzobnin-zabbix-app

Failed to send requesterrorGet https://grafana.com/api/plugins/repo/alexanderzobnin-zabbix-app: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Error: ✗ Failed to send request. error: Get https://grafana.com/api/plugins/repo/alexanderzobnin-zabbix-app: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)


NAME:

   Grafana cli plugins install - install <plugin id> <plugin version (optional)>


USAGE:

   Grafana cli plugins install [arguments...]


网络问题,多执行几次安装命令。

grafana-cli plugins install alexanderzobnin-zabbix-app


grafana-zabbix配置(文档 http://docs.grafana-zabbix.org/installation/configuration/)


blob.png


配置完成后出现Could not connect given url


blob.png

原因:

配置了Windows下的虚拟域名,grafana和zabbix都安装在了虚拟机中的Linux下,而Linux并没有设置虚拟域名。

修改Linux下的/etc/hosts  添加虚拟域名即可。

blob.png


标签: Grafana

Comments (0)