> ## Documentation Index
> Fetch the complete documentation index at: https://www.cockroachlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Monitor CockroachDB with DBmarlin

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

[DBmarlin](https://www.dbmarlin.com/home) is a monitoring platform for databases. The CockroachDB integration with DBmarlin enables DBmarlin to view CockroachDB metrics stored in the <InternalLink path="monitoring-and-alerting#crdb_internal-system-catalog">`crdb_internal` system catalog</InternalLink>.

In this tutorial, you will enable the CockroachDB integration in DBmarlin, run a workload on CockroachDB, and visualize data.

For more information about the integration, see the [Cockroach Labs blog post](https://www.cockroachlabs.com/blog/dbmarlin-cockroachdb).

<Tip>
  For more information about using DBmarlin, see the [DBmarlin documentation](https://docs.dbmarlin.com/).
</Tip>

## Before you begin

You must have the following set up before proceeding with this tutorial:

* [DBmarlin installation on a supported platform](https://docs.dbmarlin.com/docs/Getting-Started/supported-platforms#supported-installation-platforms)
* [Supported version of CockroachDB](https://docs.dbmarlin.com/docs/Getting-Started/supported-platforms#supported-database-platforms)

## Step 1. Connect DBmarlin to CockroachDB

Follow the steps in [CockroachDB](https://docs.dbmarlin.com/docs/Monitored-Technologies/Databases/cockroachdb).

## Step 2. Run a sample workload

To test the dashboard functionality, use <InternalLink path="cockroach-workload">`cockroach workload`</InternalLink> to run a sample workload on the cluster.

Initialize the workload for MovR, a fictional vehicle-sharing company:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
cockroach workload init movr  "postgresql://<username:<password@<host-address:26257/movr?sslmode=verify-full&sslrootcert=$HOME/.postgresql/root.crt&options=--cluster%<cluster-id"
```

Run the MovR workload for 5 minutes:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
cockroach workload run movr --duration=5m <username>:<password@<host-address:26257/movr?sslmode=verify-full&sslrootcert=$HOME/.postgresql/root.crt&options=--cluster%<cluster-id"
```

## Step 3. View database behavior in DBmarlin

Follow the steps in [Instance Dashboard](https://docs.dbmarlin.com/docs/Using-DBmarlin/instance-dashboard).

When you open the dashboard you'll see:

<img src="https://mintcdn.com/cockroachlabs/_ajVjtIOzaJKY_2M/images/v25.4/dbmarlin-crdb-dashboard.png?fit=max&auto=format&n=_ajVjtIOzaJKY_2M&q=85&s=9904ee3c2e55cbdd0b053c55fe6cbc29" alt="CockroachDB Overview dashboard for DBmarlin" width="3016" height="2190" data-path="images/v25.4/dbmarlin-crdb-dashboard.png" />

## See also

* <InternalLink path="monitoring-and-alerting">Monitoring and Alerting</InternalLink>
* <InternalLink path="ui-overview">DB Console Overview</InternalLink>
* <InternalLink path="logging-overview">Logging Overview</InternalLink>
