diff --git a/grafana/README.md b/grafana/README.md index ca3d4da00f9cc..8402421eabb65 100644 --- a/grafana/README.md +++ b/grafana/README.md @@ -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 @@ -29,18 +29,25 @@ And don't forget to include the generated `risingwave--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= \ DASHBOARD_UID= \ -DASHBOARD_VERSION= \ ./generate.sh ``` @@ -51,6 +58,5 @@ DASHBOARD_NAMESPACE_FILTER_ENABLED=true \ DASHBOARD_RISINGWAVE_NAME_FILTER_ENABLED=true \ DASHBOARD_DYNAMIC_SOURCE=true \ DASHBOARD_UID= \ -DASHBOARD_VERSION= \ ./generate.sh ```