# CockroachDB

### Supported Platforms

| Platform | Metrics | Logs | Traces |
| -------- | ------- | ---- | ------ |
| Linux    | ✓       | ✓    |        |
| Windows  | ✓       | ✓    |        |
| macOS    | ✓       | ✓    |        |

### Configuration Table

<table><thead><tr><th width="149.72265625">Parameter</th><th width="183.890625">Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td>telemetry_types</td><td><code>telemetrySelector</code></td><td><code>["Logs", "Metrics"]</code></td><td>Choose Telemetry Type.</td></tr><tr><td>hostname*</td><td><code>string</code></td><td>"localhost"</td><td>The hostname or IP address of the CockroachDB system. Required: true.</td></tr><tr><td>port</td><td><code>int</code></td><td>8080</td><td>The port to listen on for DB Console HTTP requests. <a href="https://www.cockroachlabs.com/docs/v26.1/cluster-api.html">Read more</a></td></tr><tr><td>username</td><td><code>string</code></td><td>""</td><td>The username to use when connecting to CockroachDB. <a href="https://www.cockroachlabs.com/docs/cockroachcloud/authentication.html#username-and-password">Read more</a></td></tr><tr><td>password</td><td><code>string</code></td><td>""</td><td>The password to use when connecting to CockroachDB. TLS must be configured in the Advanced section if this field is set. Sensitive: true. <a href="https://www.cockroachlabs.com/docs/cockroachcloud/managing-access.html">Read more</a></td></tr><tr><td>enable_tls</td><td><code>bool</code></td><td>false</td><td>Whether or not to use TLS.</td></tr><tr><td>ca_file_path</td><td><code>string</code></td><td>""</td><td>File path for CA certification file for CockroachDB (only needed if you have a secure cluster). <a href="https://www.cockroachlabs.com/docs/v23.1/cockroach-cert#client-key-and-certificates">Read more</a></td></tr><tr><td>cert_file_path</td><td><code>string</code></td><td>""</td><td>A TLS certificate used for client authentication, if mutual TLS is enabled. <a href="https://www.cockroachlabs.com/docs/v23.1/cockroach-cert#client-key-and-certificates">Read more</a></td></tr><tr><td>key_file_path</td><td><code>string</code></td><td>""</td><td>A TLS private key used for client authentication, if mutual TLS is enabled. <a href="https://www.cockroachlabs.com/docs/v23.1/cockroach-cert#client-key-and-certificates">Read more</a></td></tr><tr><td>server_name</td><td><code>string</code></td><td>""</td><td>The name of the server. <a href="https://datatracker.ietf.org/doc/html/rfc4366#section-3.1">Read more</a></td></tr><tr><td>insecure_skip_verify</td><td><code>bool</code></td><td>false</td><td>Disable validation of the server certificate.</td></tr><tr><td>collection_interval</td><td><code>int</code></td><td>60</td><td>How often (seconds) to scrape for metrics.</td></tr><tr><td>enable_health_log*</td><td><code>bool</code></td><td>true</td><td>Enable to collect health logs. <a href="https://www.cockroachlabs.com/docs/stable/logging-overview">Read more</a></td></tr><tr><td>health_log_path*</td><td><code>strings</code></td><td>["/var/log/cockroach-data/logs/cockroach-health.log"]</td><td>The absolute path to the CockroachDB health logs.</td></tr><tr><td>enable_dev_log*</td><td><code>bool</code></td><td>true</td><td>Enable to collect general developer logs. <a href="https://www.cockroachlabs.com/docs/stable/logging-overview">Read more</a></td></tr><tr><td>dev_log_path*</td><td><code>strings</code></td><td>["/var/log/cockroach-data/logs/cockroach.log"]</td><td>The absolute path to the CockroachDB Dev Logs.</td></tr><tr><td>enable_error_log*</td><td><code>bool</code></td><td>true</td><td>Enable to collect stderr logs.</td></tr><tr><td>error_log_path*</td><td><code>strings</code></td><td>["/var/log/cockroach-data/logs/cockroach-stderr.log"]</td><td>The absolute path to the CockroachDB stderr logs.</td></tr><tr><td>enable_sql_schema_log*</td><td><code>bool</code></td><td>true</td><td>Enable to collect sql schema logs. <a href="https://www.cockroachlabs.com/docs/stable/logging-overview">Read more</a></td></tr><tr><td>sql_schema_log_path*</td><td><code>strings</code></td><td>["/var/log/cockroach-data/logs/cockroach-sql-schema.log"]</td><td>The absolute path to the CockroachDB sql schema logs.</td></tr><tr><td>enable_telemetry_log*</td><td><code>bool</code></td><td>true</td><td>Enable to collect telemetry logs. <a href="https://www.cockroachlabs.com/docs/stable/logging-overview">Read more</a></td></tr><tr><td>telemetry_log_path*</td><td><code>strings</code></td><td>["/var/log/cockroach-data/logs/cockroach-telemetry.log"]</td><td>The absolute path to the CockroachDB telemetry logs.</td></tr><tr><td>enable_kv_distribution_log*</td><td><code>bool</code></td><td>true</td><td>Enable to collect kv distribution logs. <a href="https://www.cockroachlabs.com/docs/stable/logging-overview">Read more</a></td></tr><tr><td>kv_distribution_log_path*</td><td><code>strings</code></td><td>["/var/log/cockroach-data/logs/cockroach-kv-distribution.log"]</td><td>The absolute path to the CockroachDB kv distribution logs.</td></tr><tr><td>enable_pebble_log*</td><td><code>bool</code></td><td>true</td><td>Enable to collect cockroachdb pebble logs. <a href="https://www.cockroachlabs.com/docs/stable/logging-overview">Read more</a></td></tr><tr><td>pebble_log_path*</td><td><code>strings</code></td><td>["/var/log/cockroach-data/logs/cockroach-pebble.log"]</td><td>The absolute path to the CockroachDB pebble logs.</td></tr><tr><td>offset_storage_dir*</td><td><code>string</code></td><td>"$OIQ_OTEL_COLLECTOR_HOME/storage"</td><td>The directory the offset storage file will be created in.</td></tr><tr><td>timezone*</td><td><code>timezone</code></td><td>"UTC"</td><td>The timezone to use when parsing timestamps.</td></tr><tr><td>start_at*</td><td><code>enum</code></td><td>end</td><td>Start reading logs from 'beginning' or 'end'.</td></tr><tr><td>parse_to*</td><td><code>enum</code></td><td>body</td><td>Parse structured log parts to either body or attributes.</td></tr><tr><td>retain_raw_logs*</td><td><code>bool</code></td><td>false</td><td>Preserve the original log message in a raw_log key.</td></tr></tbody></table>

<mark style="color:red;">\*</mark>*<mark style="color:red;">required field</mark>*

### Example Configuration

This configuration shows the default values for the CockroachDB Source.

<figure><img src="/files/LOhsBm6lRtnHJaN1ZRHX" alt="Bindplane docs - CockroachDB - image 1"><figcaption></figcaption></figure>

<figure><img src="/files/98g3jQw2uitUNR21bMLI" alt="Bindplane docs - CockroachDB - image 2"><figcaption></figcaption></figure>

<figure><img src="/files/4FMaZ5bVVv2bh8GhN4PQ" alt="Bindplane docs - CockroachDB - image 3"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bindplane.com/integrations/sources/cockroachdb.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
