The CockroachDB check monitors the overall health and performance of a CockroachDB cluster.
The CockroachDB check is included in the Datadog Agent package, so you do not need to install anything else on your server.
Starting with version 1.9.0, this OpenMetrics-based integration has a latest mode (enabled by setting openmetrics_endpoint
to point to the target endpoint) and a legacy mode (enabled by setting prometheus_url
instead). To get all the most up-to-date features, Datadog recommends enabling the latest mode. Note that the latest mode requires Python 3. For more information, see Latest and Legacy Versioning For OpenMetrics-based Integrations.
For hosts unable to use Python 3, or to use legacy mode, see the following configuration.
To configure this check for an Agent running on a host:
-
Edit the
cockroachdb.d/conf.yaml
file, in theconf.d/
folder at the root of your Agent's configuration directory to start collecting your CockroachDB performance data. For a multi-node cluster, configure a separate check instance for each node. See the sample cockroachdb.d/conf.yaml for all available configuration options.init_config: instances: ## @param openmetrics_endpoint - string - required ## The URL exposing metrics in the OpenMetrics format. # - openmetrics_endpoint: http://localhost:8080/_status/vars
Available for Agent version 6.0 or later
-
Collecting logs is disabled by default in the Datadog Agent. Enable it in
datadog.yaml
:logs_enabled: true
-
Add this configuration block to your
cockroachdb.d/conf.yaml
file to start collecting your CockroachDB logs:logs: - type: file path: /var/lib/cockroach/logs/cockroach.log source: cockroachdb service: cockroachdb log_processing_rules: - type: multi_line name: new_log_start_with_status_and_date pattern: [A-Z]\d{6}\s\d+\:\d+\:\d+\.\d+
Change the
path
andservice
parameter values and configure them for your environment. See the sample cockroachdb.d/conf.yaml for all available configuration options.
For containerized environments, see the Autodiscovery Integration Templates for guidance on applying the parameters below.
Parameter | Value |
---|---|
<INTEGRATION_NAME> |
cockroachdb |
<INIT_CONFIG> |
blank or {} |
<INSTANCE_CONFIG> |
{"openmetrics_endpoint":"http://%%host%%:8080/_status/vars"} |
Collecting logs is disabled by default in the Datadog Agent. To enable it, see the Docker Log Collection.
Then, set log integrations as Docker labels:
LABEL "com.datadoghq.ad.logs"='[{"source": "cockroachdb", "service": "<SERVICE_NAME>"}]'
Run the Agent's status
subcommand and look for cockroachdb
under the Checks section.
See metadata.csv for a list of metrics provided by this integration.
The CockroachDB check does not include any service checks.
The CockroachDB check does not include any events.
Need help? Contact Datadog support.
Additional helpful documentation, links, and articles: