再阿里雲添加AK帳號受權html
注意:當AK建立只是用來編程訪問的話,要保存一下信息,否則找不到git
開始受權監控的權限。github
雲監控檢查主機是否安裝插件添加應用分組web
當監控插件初始花之後,能看到進程監控,說明就能夠了。編程
在別的一臺阿里雲安裝grafanaapi
[root@iZbp143t3oxhfc3ar7jey0Z ~]# yum localinstall grafana-5.0.3-1.x86_64.rpm Loaded plugins: fastestmirror Examining grafana-5.0.3-1.x86_64.rpm: grafana-5.0.3-1.x86_64 Marking grafana-5.0.3-1.x86_64.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package grafana.x86_64 0:5.0.3-1 will be installed --> Processing Dependency: fontconfig for package: grafana-5.0.3-1.x86_64 Loading mirror speeds from cached hostfile * webtatic: us-east.repo.webtatic.com --> Processing Dependency: urw-fonts for package: grafana-5.0.3-1.x86_64 --> Running transaction check ---> Package fontconfig.x86_64 0:2.13.0-4.3.el7 will be installed
[root@iZbp143t3oxhfc3ar7jey0Z ~]# git clone https://github.com/aliyun/aliyun-cms-grafana.git Cloning into 'aliyun-cms-grafana'... remote: Enumerating objects: 48, done. remote: Counting objects: 100% (48/48), done. remote: Compressing objects: 100% (38/38), done. remote: Total 132 (delta 19), reused 21 (delta 8), pack-reused 84 Receiving objects: 100% (132/132), 299.29 KiB | 11.00 KiB/s, done. Resolving deltas: 100% (49/49), done.
把插件放進去,並重啓ui
[root@iZbp143t3oxhfc3ar7jey0Z ~]# service grafana-server start Starting grafana-server (via systemctl): [ OK ] [root@iZbp143t3oxhfc3ar7jey0Z ~]# pwd /root [root@iZbp143t3oxhfc3ar7jey0Z ~]# mv a aaa.text aliyun-cms-grafana/ [root@iZbp143t3oxhfc3ar7jey0Z ~]# mv aliyun-cms-grafana/ /var/lib/grafana/plugins/ [root@iZbp143t3oxhfc3ar7jey0Z ~]# cd /var/lib/grafana/plugins [root@iZbp143t3oxhfc3ar7jey0Z plugins]# ll total 4 drwxr-xr-x 6 root root 4096 Apr 11 22:44 aliyun-cms-grafana [root@iZbp143t3oxhfc3ar7jey0Z plugins]# service grafana-server restart Restarting grafana-server (via systemctl): [ OK ] [root@iZbp143t3oxhfc3ar7jey0Z plugins]# lsof -i:3000 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME grafana-s 2080 grafana 6u IPv6 10914108 0t0 TCP *:hbci (LISTEN) grafana-s 2080 grafana 9u IPv6 10913566 0t0 TCP iZbp143t3oxhfc3ar7jey0Z:hbci->36.5.244.169:16883 (ESTABLISHED) grafana-s 2080 grafana 10u IPv6 10914166 0t0 TCP iZbp143t3oxhfc3ar7jey0Z:hbci->36.5.244.169:16884 (ESTABLISHED) grafana-s 2080 grafana 12u IPv6 10914168 0t0 TCP iZbp143t3oxhfc3ar7jey0Z:hbci->36.5.244.169:16890 (ESTABLISHED) grafana-s 2080 grafana 14u IPv6 10913568 0t0 TCP iZbp143t3oxhfc3ar7jey0Z:hbci->36.5.244.169:16889 (ESTABLISHED)
添加數據源阿里雲
添加和配置Dashboard。spa
參數 | 說明 |
---|---|
Group | 雲帳戶所在雲監控的應用分組。 |
Dimensions | Project與Metric所在監控項最新監控數據的實例集合,若選Group,則爲該Group下的實例。 |
Y-column | 可支持多選。 |
X-column | timestamp。 |
Y-column describe | 對Y-column的區分描述。 |
參數 | 說明 |
---|---|
Project | acs_customMetric_+雲帳號ID。 |
Metric | 上報監控數據的metricName。 |
Period | 上報監控數據時的Period。 |
Group | 上報監控數據時的Metric對應的分組ID。 |
Dimensions | 上報監控數據時的Dimension,暫不支持下拉選擇,只支持輸入單個Dimension,若輸入多個,默認選第一個。
說明 若是雲監控控制檯的dimensions格式爲
env: public, step: 5-ReadFromAlertOnline ,則請用
& 替換示例中的
, 後拼接輸入。
|
Y-column | 上報監控數據時的Average、Maximum、Minimum、Sum、SampleCount、P十、P20、P99等。 |
X-column | timestamp。 |