The Grafana dashboard is generated with grafanalib
. You'll need
- Python
- grafanalib
- jsonmerge
- jq: instruction here
Preferably installed in a local Python virtual env (venv).
python3 -m venv 'venv'
source venv/bin/activate
pip install -r requirements.txt
And don't forget to include the generated risingwave-<xxx>-dashboard.json
in the commit.
./generate.sh
./update.sh
The generate.sh
supports multi-cluster deployment. The following environment variables are helpful:
DASHBOARD_NAMESPACE_FILTER_ENABLED
: When set totrue
, 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 totrue
, 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 toDASHBOARD_SOURCE_UID
. When set totrue
, 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:
DASHBOARD_NAMESPACE_FILTER_ENABLED=true \
DASHBOARD_RISINGWAVE_NAME_FILTER_ENABLED=true \
DASHBOARD_SOURCE_UID=<source_uid> \
DASHBOARD_UID=<dashboard_uid> \
./generate.sh
If you want to use multi-prometheus as the variable:
DASHBOARD_NAMESPACE_FILTER_ENABLED=true \
DASHBOARD_RISINGWAVE_NAME_FILTER_ENABLED=true \
DASHBOARD_DYNAMIC_SOURCE=true \
DASHBOARD_UID=<dashboard_uid> \
./generate.sh