Grafana is an open-source analytics and visualization web application. It is well suited for time-series data as well as application and server monitoring.
This guide will go over how to add RisingWave as a data source in Grafana.
To install and start RisingWave locally, see the Get started guide. We recommend running RisingWave locally for testing purposes.
Connect to streaming sources. For details on connecting to a streaming source and what connectors are supported with RisingWave, see CREATE SOURCE.
To install Grafana locally, see the Install Grafana guide. Next, to start Grafana, follow the Sign in to Grafana step of the Build your first dashboard guide.
If both RisingWave and Grafana are started locally, the host domain can be either localhost:4566 or 127.0.0.1:4566.
If you are running Grafana Cloud, the host domain should be your computer’s public IP address.
For this guide, we connected to RisingWave with the root
user. In production, it is recommended to use a dedicated read-only user when querying the database using Grafana.
To add a new read-only user, use the following SQL query:
Then, when adding RisingWave as a database, fill in the User and Password fields with the name and password of the new user created. For more details on creating a user, see the CREATE USER command.
To allow the read-only user to query from a materialized view, use the following SQL query:
See the GRANT command for more details.
Now that RisingWave is added as a database, you can start creating dashboards within Grafana using the data in RisingWave.
Grafana can also be configured to visualize and monitor data from a RisingWave Cloud cluster, allowing you to build charts and real-time dashboards based on tables and materialized views. Follow these steps to integrate RisingWave as a data source in Grafana.
Access Data Source Settings. In Grafana, navigate to Configuration > Data Sources from the left-hand sidebar.
Add a New Data Source. Click the Add Data Source button at the top of the page.
From the list of available database integrations, choose PostgreSQL. RisingWave is PostgreSQL-compatible, so this option works perfectly for connecting to it.
Configure PostgreSQL connection by filling in the following connection details based on your RisingWave Cloud cluster:
your-rw-cluster-host-url:4566
.dev
.verify-full
for secure connections. This will ensure that data transferred between Grafana and RisingWave is encrypted and verified.Optional fields such as File System Path and Certificate Content can be left blank.
Test the Connection. Once you’ve entered the required fields, scroll down and click the Save & Test button to check the connection. If successful, Grafana will confirm that it can connect to your RisingWave Cloud instance.
After adding RisingWave as a data source, you can now create dynamic dashboards and real-time visualizations using tables and materialized views from your RisingWave Cloud cluster.
With this setup, you can build real-time dashboards in Grafana, powered by the high-performance and advanced real-time data processing capabilities of RisingWave Cloud.