Skip to content

Commit

Permalink
feat(grafana): use Python script to generate dashboard (#2979)
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Chi <[email protected]>
  • Loading branch information
skyzh authored Jun 6, 2022
1 parent 2a3e88a commit 485874d
Show file tree
Hide file tree
Showing 9 changed files with 1,139 additions and 8,911 deletions.
2 changes: 1 addition & 1 deletion docker/risingwave-dashboard.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docker/risingwave.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ block_size_kb = 64
bloom_false_positive = 0.01
data_directory = "hummock_001"
block_cache_capacity_mb = 4096
meta_cache_capacity_mb = 256
meta_cache_capacity_mb = 1024
13 changes: 1 addition & 12 deletions docs/developer-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,18 +316,7 @@ buf lint

## Update Grafana dashboard

Simply use the export functionality in Grafana, disable the config "external sharing". Then,
manually modify the JSON.

All datasource should use `risedev-prometheus` as datasource. If you found something else,
change them.

```
"datasource": {
"type": "prometheus",
"uid": "risedev-prometheus"
},
```
See [README](../grafana/README.md) for more information.

## Add new files

Expand Down
3 changes: 3 additions & 0 deletions grafana/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
venv
*.gen.json
__pycache__
22 changes: 22 additions & 0 deletions grafana/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# RisingWave Grafana Dashboard

The Grafana dashboard is generated with grafanalib. You'll need Python and

```
pip3 install grafanalib
brew install jq
```

... preferably installed in a local venv.

## Generate Dashboard

```
./generate.sh
```

## Update without Restarting Grafana

```
./update.sh
```
6 changes: 6 additions & 0 deletions grafana/generate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

set -euo pipefail

generate-dashboard -o risingwave-dashboard.gen.json risingwave-dashboard.py
jq -c . risingwave-dashboard.gen.json > risingwave-dashboard.json
Loading

0 comments on commit 485874d

Please sign in to comment.