Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Risingwavelabs Risingwave Grafana Dashboard Generation

From Leeroopedia


Knowledge Sources
Domains Observability, Monitoring, Python
Last Updated 2026-02-09 07:00 GMT

Overview

Concrete tool for programmatically generating Grafana monitoring dashboards provided by Python scripts using the grafanalib library.

Description

The Grafana Dashboard Generation system uses Python with the grafanalib library to define monitoring dashboards as code. Two dashboard profiles are generated: a user dashboard (simplified operational view) and a dev dashboard (detailed internal metrics). The Python definitions are compiled to Grafana JSON via generate.sh and automatically provisioned into Grafana through Docker Compose volume mounts.

Usage

These dashboards are auto-provisioned when deploying RisingWave via Docker Compose. To customize, edit the Python dashboard definitions and re-run the generation script.

Code Reference

Source Location

  • Repository: risingwave
  • File: grafana/risingwave-user-dashboard.dashboard.py (L1-187)
  • File: grafana/risingwave-dev-dashboard.dashboard.py (L1-201)
  • File: grafana/generate.sh (L1-14)

Signature

# risingwave-user-dashboard.dashboard.py
from grafanalib.core import Dashboard, GridPos, RowPanel, Target, Templating, Time, TimeSeries
from dashboard.user import generate_panels

panels = Panels(datasource)
# Sections: overview, cpu, memory, network, storage, streaming, actor_info, batch

# generate.sh
#!/bin/bash
generate-dashboard -o risingwave-user-dashboard.json risingwave-user-dashboard.dashboard.py
generate-dashboard -o risingwave-dev-dashboard.json risingwave-dev-dashboard.dashboard.py

Import

# Generate dashboards
cd grafana && bash generate.sh

# Or use Python directly
pip install grafanalib
python risingwave-user-dashboard.dashboard.py

I/O Contract

Inputs

Name Type Required Description
SOURCE_UID Environment variable No Grafana datasource UID (default: risedev-prometheus)
DASHBOARD_UID Environment variable No Dashboard UID (user: Fcy3uV1nz, dev: Ecy3uV1nz)
DASHBOARD_VERSION Environment variable No Dashboard version number (default: 0)

Outputs

Name Type Description
risingwave-user-dashboard.json JSON file User-facing Grafana dashboard with 8 sections
risingwave-dev-dashboard.json JSON file Developer Grafana dashboard with 40+ sections

Usage Examples

Access Dashboards

# After docker compose up, dashboards are at:
# User dashboard: http://localhost:3001/d/Fcy3uV1nz
# Dev dashboard:  http://localhost:3001/d/Ecy3uV1nz

Regenerate Dashboards

cd grafana
pip install grafanalib
bash generate.sh
# Copy generated JSON to Grafana provisioning directory

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment