You can create dashboards for your local YugabyteDB clusters using Grafana, an open source platform to perform visualization and analytics which lets you add queries and explore metrics to customize your graphs. To create dashboards, you need to add Prometheus metrics as a data source in Grafana. The visualization it provides gives a better understanding of the health and performance of your YugabyteDB clusters.
A local instance of Prometheus displaying the metrics of your YugabyteDB cluster is required. To do this,
- Create a local instance of Prometheus and perform the Steps 1-4 listed under Prometheus Integration. (Step 5 is optional)
Set up Grafana and add Prometheus as a data source
Install Grafana and start the server according to the Grafana documentation.
Open the Grafana UI on http://localhost:3000. The default login is
admin, with a password of
Follow the steps on this page to create a Prometheus data source.
Create a dashboard
There are different ways to create a dashboard in Grafana. For this tutorial, you'll use the import option and pick the YugabyteDB community dashboard present under the list of Grafana Dashboards.
On the Grafana UI, click the
+button and choose Import.
On the next page, enter the YugabyteDB dashboard ID in the
Import via grafana.comfield and click
On the next screen, provide a name for your dashboard, a unique identifier, and the Prometheus data source. Be sure to choose the data source you created earlier.
After clicking import, you can see the new dashboard with various details starting with the status of your master and t-server nodes. The metrics displayed are further categorized by API types (YSQL, YCQL) and by API methods(Insert, Select, Update, and so on).
Because this example uses the
CassandraKeyValueworkload generator from the Prometheus Integration page, you can see different YCQL related metrics in addition to the master and t-server statuses. The source code of the application uses only SELECT statements for reads and INSERT statements for writes (aside from the initial CREATE TABLE). This means that throughput and latency can be measured using the metrics corresponding to the SELECT and INSERT statements. The following is a YCQL OPS and latency metrics :
Clean up (optional)
Optionally, you can shut down the local cluster you created earlier.
$ ./bin/yugabyted destroy