Kibana is a platform that visualizes data on the Elastic Stack. This page shows how to use the CockroachDB module for Metricbeat to collect metrics exposed by your CockroachDB CockroachDB cluster’s in Elasticsearch and how to visualize those metrics with Kibana.
To export metrics from a CockroachDB CockroachDB Cloud cluster, refer to instead of this page.
In this tutorial, you will enable the CockroachDB module for Metricbeat and visualize the data in Kibana.
Before you begin
Either of the following:
This tutorial assumes that you have . does not expose a compatible monitoring endpoint.
Step 1. Enable CockroachDB module
From your Metricbeat installation directory, run:
Open modules.d/cockroachdb.yml in your Metricbeat installation directory.
Follow the steps in the Elastic documentation to enable SSL on the CockroachDB module.
For example, if you used to , the YAML should look like:
ssl.certificate_authorities, ssl.certificate, and ssl.key should specify the full file paths to your CA certificate, client certificate, and client key, respectively.
Step 2. Start Metricbeat
Load the Kibana dashboards (this may take a few moments):
Launch Metricbeat:
Step 3. View CockroachDB dashboards on Kibana
Open the Kibana web interface and click Dashboard.
Search for the CockroachDB dashboard:
Click the dashboard title to open the dashboard, which presents metrics on replicas and query performance:
Step 4. Run a sample workload
To test the dashboard functionality, use to run a sample workload on the cluster.
Initialize the workload for MovR, a fictional vehicle-sharing company:
Run the MovR workload for 5 minutes:
Click Refresh. The query metrics will appear on the dashboard:
Step 5. Disable DB Console’s local storage of metrics (optional)
If you rely on external tools such as Kibana for storing and visualizing your cluster’s time-series metrics, Cockroach Labs recommends that you .
When storage of time-series metrics is disabled, the cluster continues to expose its metrics via the . The DB Console stops storing new time-series cluster metrics and eventually deletes historical data. The Metrics dashboards in the DB Console are still available, but their visualizations are blank. This is because the dashboards rely on data that is no longer available. You can create queries, visualizations, and alerts in Kibana based on the data it is collecting from your cluster’s Prometheus endpoint.
See also