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

# Diagnostics Reporting

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>;
};

By default, the DB Console and each node of a CockroachDB cluster share usage details with Cockroach Labs. Sensitive data is redacted from this usage information; these details help Cockroach Labs understand and improve how the system behaves in real-world scenarios.

This page summarizes the details that get shared, how to view the details yourself, and how to opt out of sharing.

<Tip>
  For insights into your cluster's performance and health, use the built-in <InternalLink path="ui-overview">DB Console</InternalLink> or a third-party monitoring tool like <InternalLink path="monitor-cockroachdb-with-prometheus">Prometheus</InternalLink>.
</Tip>

## What gets shared

When diagnostics reporting is on, each node of a CockroachDB cluster shares obfuscated usage details on a periodic basis. For more information about what information is shared, refer to <InternalLink path="telemetry">Telemetry Collected by CockroachDB</InternalLink>.

To view the full diagnostics details that a node reports to Cockroach Labs, use the `http://<node-address:<http-port/_status/diagnostics/local` JSON endpoint.

<Note>
  In all cases, names and other string values are scrubbed and replaced with underscores. Also, the details that get shared may change over time, but as that happens, we will announce the changes in release notes.
</Note>

## Opt out of diagnostics reporting

<Note>
  Diagnostics reporting is required for <InternalLink path="licensing-faqs">**Enterprise Trial** or **Enterprise Free** licenses</InternalLink>. Therefore, the cluster setting `diagnostics.reporting.enabled` is ignored on clusters with these licenses. The following opt-out methods apply only to clusters with an <InternalLink path="licensing-faqs">**Enterprise** license</InternalLink>.
</Note>

### At cluster initialization

To make sure that absolutely no diagnostic details are shared, you can set the environment variable `COCKROACH_SKIP_ENABLING_DIAGNOSTIC_REPORTING=true` before starting the first node of the cluster. Note that this works only when set before starting the first node of the cluster. Once the cluster is running, you need to use the `SET CLUSTER SETTING` method described below.

### After cluster initialization

To stop sending diagnostic details to Cockroach Labs once a cluster is running, <InternalLink path="cockroach-sql">use the built-in SQL client</InternalLink> to execute the following <InternalLink path="set-cluster-setting">`SET CLUSTER SETTING`</InternalLink> statement, which switches the `diagnostics.reporting.enabled` <InternalLink path="cluster-settings">cluster setting</InternalLink> to `false`:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SET CLUSTER SETTING diagnostics.reporting.enabled = false;
```

This change will not be instantaneous, as it must be propagated to other nodes in the cluster.

## Check the state of diagnostics reporting

To check the state of diagnostics reporting, <InternalLink path="cockroach-sql">use the built-in SQL client</InternalLink> to execute the following <InternalLink path="show-cluster-setting">`SHOW CLUSTER SETTING`</InternalLink> statement:

```sql theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
> SHOW CLUSTER SETTING diagnostics.reporting.enabled;
```

```text theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  diagnostics.reporting.enabled
+-------------------------------+
              false
(1 row)
```

If the setting is `false`, diagnostics reporting is off; if the setting is `true`, diagnostics reporting is on.

## See also

* <InternalLink path="telemetry">Telemetry Collected by CockroachDB</InternalLink>
* <InternalLink path="cluster-settings">Cluster Settings</InternalLink>
* <InternalLink path="cockroach-start">Start a Node</InternalLink>
