[wangshumin@CentOSNode3 plugins]$ su grafana
密码:
su: 鉴定故障
[wangshumin@CentOSNode3 plugins]$ grafana-cli plugins install grafana-piechart-panel
installing grafana-piechart-panel @ 1.3.3
from url: https://grafana.com/api/plugins/grafana-piechart-panel/versions/1.3.3/download
into: /var/lib/grafana/plugins
Error: ✗ Could not create /var/lib/grafana/plugins/grafana-piechart-panel. Permission denied. Make sure you have write access to plugindir
NAME:
Grafana cli plugins install - install <plugin id> <plugin version (optional)>
USAGE:
Grafana cli plugins install [arguments...]
[wangshumin@CentOSNode3 plugins]$ pws
bash: pws: 未找到命令...
[wangshumin@CentOSNode3 plugins]$ pwd
/var/lib/grafana/plugins
[wangshumin@CentOSNode3 plugins]$ git clone https://github.com/grafana/piechart-panel.git
fatal: 不能为 'piechart-panel' 创建工作区目录。: ????
[wangshumin@CentOSNode3 plugins]$ sudo git clone https://github.com/grafana/piechart-panel.git
[sudo] wangshumin 的密码:
正克隆到 'piechart-panel'...
remote: Counting objects: 758, done.
remote: Total 758 (delta 0), reused 0 (delta 0), pack-reused 758
接收对象中: 100% (758/758), 479.79 KiB | 38.00 KiB/s, done.
处理 delta 中: 100% (534/534), done.
[wangshumin@CentOSNode3 plugins]$ ll
总用量 0
drwxr-xr-x 5 root root 131 9月 1 21:16 piechart-panel
[wangshumin@CentOSNode3 plugins]$ vim /etc/grafana/grafana.ini
[wangshumin@CentOSNode3 plugins]$ sudo vim /etc/grafana/grafana.ini
[wangshumin@CentOSNode3 plugins]$ sudo git clone https://github.com/alexanderzobnin/grafana-zabbix-app
正克隆到 'grafana-zabbix-app'...
remote: Counting objects: 359, done.
remote: Total 359 (delta 0), reused 0 (delta 0), pack-reused 359
接收对象中: 100% (359/359), 1.29 MiB | 454.00 KiB/s, done.
处理 delta 中: 100% (225/225), done.
[wangshumin@CentOSNode3 plugins]$ pwd
/var/lib/grafana/plugins
[wangshumin@CentOSNode3 plugins]$ cd cd /var/lib/grafana/plugins/grafana-zabbix-app
-bash: cd: cd: 没有那个文件或目录
[wangshumin@CentOSNode3 plugins]$ cd /var/lib/grafana/plugins/grafana-zabbix-app
[wangshumin@CentOSNode3 grafana-zabbix-app]$ ll
总用量 20
drwxr-xr-x 2 root root 63 9月 1 21:18 components
drwxr-xr-x 2 root root 76 9月 1 21:18 dashboards
drwxr-xr-x 6 root root 4096 9月 1 21:18 datasource-zabbix
drwxr-xr-x 2 root root 199 9月 1 21:18 img
-rw-r--r-- 1 root root 372 9月 1 21:18 module.js
-rw-r--r-- 1 root root 254 9月 1 21:18 module.js.map
drwxr-xr-x 3 root root 218 9月 1 21:18 panel-triggers
-rw-r--r-- 1 root root 1732 9月 1 21:18 plugin.json
-rw-r--r-- 1 root root 840 9月 1 21:18 README.md
drwxr-xr-x 5 root root 88 9月 1 21:18 test
[wangshumin@CentOSNode3 grafana-zabbix-app]$ git pull
error: 无法打开 .git/FETCH_HEAD:????
[wangshumin@CentOSNode3 grafana-zabbix-app]$ sudo git pull
Already up-to-date.
[wangshumin@CentOSNode3 grafana-zabbix-app]$ cd -
/var/lib/grafana/plugins
[wangshumin@CentOSNode3 plugins]$ ll
总用量 0
drwxr-xr-x 9 root root 198 9月 1 21:18 grafana-zabbix-app
drwxr-xr-x 5 root root 131 9月 1 21:16 piechart-panel
[wangshumin@CentOSNode3 plugins]$ sudo git clone https://github.com/grafana/clock-panel.git
正克隆到 'clock-panel'...
remote: Counting objects: 358, done.
remote: Total 358 (delta 0), reused 0 (delta 0), pack-reused 358
接收对象中: 100% (358/358), 960.01 KiB | 452.00 KiB/s, done.
处理 delta 中: 100% (238/238), done.
[wangshumin@CentOSNode3 plugins]$ pwd
/var/lib/grafana/plugins
[wangshumin@CentOSNode3 plugins]$ cd ..
[wangshumin@CentOSNode3 grafana]$ ll
总用量 392
-rw-r--r-- 1 grafana grafana 401408 9月 1 21:08 grafana.db
drwxr-xr-x 5 grafana grafana 73 9月 1 21:19 plugins
[wangshumin@CentOSNode3 grafana]$ cd plugins/
[wangshumin@CentOSNode3 plugins]$ ll
总用量 0
drwxr-xr-x 5 root root 205 9月 1 21:19 clock-panel
drwxr-xr-x 9 root root 198 9月 1 21:18 grafana-zabbix-app
drwxr-xr-x 5 root root 131 9月 1 21:16 piechart-panel
[wangshumin@CentOSNode3 plugins]$ pwd
/var/lib/grafana/plugins
[wangshumin@CentOSNode3 plugins]$ cd /home/wangshumin/grafana
[wangshumin@CentOSNode3 grafana]$ ll
总用量 52788
drwxrwxr-x 5 wangshumin wangshumin 205 9月 1 21:09 clock-panel
-rw-rw-r-- 1 wangshumin wangshumin 54051733 9月 1 19:51 grafana-5.2.1-1.x86_64.rpm
[wangshumin@CentOSNode3 grafana]$ cd clock-panel/
[wangshumin@CentOSNode3 clock-panel]$ ll
总用量 20
drwxrwxr-x 5 wangshumin wangshumin 202 9月 1 21:09 dist
-rw-rw-r-- 1 wangshumin wangshumin 1386 9月 1 21:09 Gruntfile.js
-rw-rw-r-- 1 wangshumin wangshumin 1074 9月 1 21:09 LICENSE
-rw-rw-r-- 1 wangshumin wangshumin 1017 9月 1 21:09 package.json
-rw-rw-r-- 1 wangshumin wangshumin 877 9月 1 21:09 plugin.json
-rw-rw-r-- 1 wangshumin wangshumin 2432 9月 1 21:09 README.md
drwxrwxr-x 5 wangshumin wangshumin 120 9月 1 21:09 src
[wangshumin@CentOSNode3 clock-panel]$ cd ..
[wangshumin@CentOSNode3 grafana]$ ll
总用量 52788
drwxrwxr-x 5 wangshumin wangshumin 205 9月 1 21:09 clock-panel
-rw-rw-r-- 1 wangshumin wangshumin 54051733 9月 1 19:51 grafana-5.2.1-1.x86_64.rpm
[wangshumin@CentOSNode3 grafana]$ rm -rf clock-panel/
[wangshumin@CentOSNode3 grafana]$ ll
总用量 52788
-rw-rw-r-- 1 wangshumin wangshumin 54051733 9月 1 19:51 grafana-5.2.1-1.x86_64.rpm
[wangshumin@CentOSNode3 grafana]$ cd -
-bash: cd: /home/wangshumin/grafana/clock-panel: 没有那个文件或目录
[wangshumin@CentOSNode3 grafana]$ ll
总用量 52788
-rw-rw-r-- 1 wangshumin wangshumin 54051733 9月 1 19:51 grafana-5.2.1-1.x86_64.rpm
[wangshumin@CentOSNode3 grafana]$ cd /var/lib/grafana/plugins
[wangshumin@CentOSNode3 plugins]$ ll
总用量 0
drwxr-xr-x 5 root root 205 9月 1 21:19 clock-panel
drwxr-xr-x 9 root root 198 9月 1 21:18 grafana-zabbix-app
drwxr-xr-x 5 root root 131 9月 1 21:16 piechart-panel
[wangshumin@CentOSNode3 plugins]$ ll
总用量 0
drwxr-xr-x 5 root root 205 9月 1 21:19 clock-panel
drwxr-xr-x 9 root root 198 9月 1 21:18 grafana-zabbix-app
drwxr-xr-x 5 root root 131 9月 1 21:16 piechart-panel
[wangshumin@CentOSNode3 plugins]$ sudo git clone https://github.com/gbrian/grafana-piechart-panel-echart.git
正克隆到 'grafana-piechart-panel-echart'...
remote: Counting objects: 37, done.
remote: Total 37 (delta 0), reused 0 (delta 0), pack-reused 37
Unpacking objects: 100% (37/37), done.
[wangshumin@CentOSNode3 plugins]$ sudo git clone https://github.com/raintank/worldping-app.git
正克隆到 'worldping-app'...
remote: Counting objects: 4706, done.
remote: Total 4706 (delta 0), reused 0 (delta 0), pack-reused 4706
接收对象中: 100% (4706/4706), 4.45 MiB | 276.00 KiB/s, done.
处理 delta 中: 100% (3011/3011), done.
[wangshumin@CentOSNode3 plugins]$ ll
总用量 0
drwxr-xr-x 5 root root 205 9月 1 21:19 clock-panel
drwxr-xr-x 5 root root 131 9月 1 21:23 grafana-piechart-panel-echart
drwxr-xr-x 9 root root 198 9月 1 21:18 grafana-zabbix-app
drwxr-xr-x 5 root root 131 9月 1 21:16 piechart-panel
drwxr-xr-x 6 root root 275 9月 1 21:24 worldping-app
[wangshumin@CentOSNode3 plugins]$ service grafana-server restart
Restarting grafana-server (via systemctl): ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to manage system services or units.
Authenticating as: root
Password:
==== AUTHENTICATION COMPLETE ===
[ 确定 ]
[wangshumin@CentOSNode3 plugins]$ sudo vim /etc/grafana/grafana.ini
[wangshumin@CentOSNode3 plugins]$