Skip to content

Commit

Permalink
feat(docs): improve docs of multi-cluster deployment (#17437)
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyufjh authored Jun 25, 2024
1 parent 4537c4c commit 22b911d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions grafana/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RisingWave Grafana Dashboard

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

- Python
- grafanalib
Expand Down Expand Up @@ -29,18 +29,25 @@ And don't forget to include the generated `risingwave-<xxx>-dashboard.json` in t
./update.sh
```

## Advanced Usage
## Multi-cluster Deployment

We can specify the source uid, dashboard uid, dashboard version, enable namespace filter and enable risingwave_name filter(used in multi-cluster deployment) via env variables.
The `generate.sh` supports multi-cluster deployment. The following environment variables are helpful:

For example, we can use the following query to generate dashboard json used in our benchmark cluster:
- `DASHBOARD_NAMESPACE_FILTER_ENABLED`: When set to `true`, a drop-down list will be added to the Grafana dashboard, and all Prometheus queries will be filtered by the selected namespace.
- `DASHBOARD_RISINGWAVE_NAME_FILTER_ENABLED`: When set to `true`, a drop-down list will be added to the Grafana dashboard, and all Prometheus queries will be filtered by the selected RisingWave name. This is useful when you have multiple RisingWave instances in the same namespace.
- `DASHBOARD_SOURCE_UID`: Set to the UID of your Prometheus source.
- `DASHBOARD_DYNAMIC_SOURCE`: Alternative to `DASHBOARD_SOURCE_UID`. When set to `true`, a drop-down list will be added to the Grafana dashboard to pick any one of the Prometheus sources.
- `DASHBOARD_UID`: Set to the UID of your Grafana dashboard.

See more details in the `common.py` file.

Examples:

```bash
DASHBOARD_NAMESPACE_FILTER_ENABLED=true \
DASHBOARD_RISINGWAVE_NAME_FILTER_ENABLED=true \
DASHBOARD_SOURCE_UID=<source_uid> \
DASHBOARD_UID=<dashboard_uid> \
DASHBOARD_VERSION=<version> \
./generate.sh
```

Expand All @@ -51,6 +58,5 @@ DASHBOARD_NAMESPACE_FILTER_ENABLED=true \
DASHBOARD_RISINGWAVE_NAME_FILTER_ENABLED=true \
DASHBOARD_DYNAMIC_SOURCE=true \
DASHBOARD_UID=<dashboard_uid> \
DASHBOARD_VERSION=<version> \
./generate.sh
```

0 comments on commit 22b911d

Please sign in to comment.