Skip to content

Commit

Permalink
Translate Run Grafana (opensource4you#373)
Browse files Browse the repository at this point in the history
* Translate Run Grafana

* Add more description and rename file

* change picture link

* add a link of Prometheus doc to run_grafana

* Add a link to README

* fixed some descriptions
  • Loading branch information
harryteng9527 authored Aug 8, 2022
1 parent 09b2d94 commit 1648e7b
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ This project offers many kafka tools to simplify the life for kafka users.
1. [Kafka quick start](#kafka-cluster-quick-start): set up a true kafka cluster in one minute
2. [Kafka performance](./docs/performance_benchmark.md): 可產生不同類型資料集測試讀寫速度及E2E延遲的工具
3. [Kafka_Prometheus](./docs/run_prometheus.md): 整合 Kafka 與 Prometheus
4. [Kafka metric explorer](#kafka-metric-explorer): utility for accessing kafka Mbean metrics via JMX.
5. [Kafka replica syncing monitor](#Kafka-replica-syncing-monitor): Tracking replica syncing progress.
6. [Astraea Web Server 中文文件連結](./docs/web_server/README.md)
4. [快速啟動Grafana](./docs/run_grafana.md): 建置圖形化介面監控Kafka server、Host端資源使用量
5. [Kafka metric explorer](#kafka-metric-explorer): utility for accessing kafka Mbean metrics via JMX.
6. [Kafka replica syncing monitor](#Kafka-replica-syncing-monitor): Tracking replica syncing progress.
7. [Astraea Web Server 中文文件連結](./docs/web_server/README.md)

[Github packages](https://github.com/orgs/skiptests/packages?repo_name=astraea) offers the docker image to run mentioned tools
```shell
Expand Down
Binary file added docs/pictures/grafana.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/pictures/grafana_overview.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions docs/run_grafana.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
### Run Grafana

[Grafana](https://github.com/grafana/grafana)是一個以圖形化界面呈現服務狀態的開源軟體,使用者可以將資料來源端與Grafana連結,並讓使用者能以圖形化的方式觀看服務、系統一段時間內的數據

#### Start Grafana

此專案有整合Grafana到Docker,利用腳本啟動Grafana container

```bash
./docker/start_grafana.sh start
```

`http://192.168.0.2:3000`為觀看圖形化界面的網頁,預設的username/password為admin/admin

```bash
aa8a47da91a2e0974a38690525f9148c9697f7ffc752611ef06248ffb09ef53a
[INFO] Default username/password for grafana docker image is admin/admin
[INFO] Access Grafana dashboard here: http://192.168.0.2:3000
```

##### Access Grafana dashboard

進入`http://192.168.0.2:3000`後,會出現下圖

![image-20220628231924579](pictures/grafana.jpg)

預設的使用者帳號/密碼為admin,登錄後可看到Grafana的界面

![image-20220628232312952](pictures/grafana_overview.jpg)

#### Add Prometheus DataSource

Grafana是呈現數據的軟體,需要設置資料的來源

如下指令,設置[Prometheus](./run_prometheus.md)的資料來源給Grafana

```bash
./docker/start_grafana.sh add_prom_source <USERNAME>:<PASSWORD> Prometheus http://192.168.0.2:9090
```

資料來源端的描述:

```bash
{
"datasource": {
"id": 1,
"uid": "7jbIw-Tnz",
"orgId": 1,
"name": "Prometheus",
"type": "prometheus",
"typeLogoUrl": "",
"access": "proxy",
"url": "http://192.168.0.2:9090",
"password": "",
"user": "",
"database": "",
"basicAuth": false,
"basicAuthUser": "",
"basicAuthPassword": "",
"withCredentials": false,
"isDefault": false,
"jsonData": {},
"secureJsonFields": {},
"version": 1,
"readOnly": false
},
"id": 1,
"message": "Datasource added",
"name": "Prometheus"
}
```

0 comments on commit 1648e7b

Please sign in to comment.