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.
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
Note: The current version of the check (1.9.0+) uses a newer implementation of OpenMetrics for metric collection, which requires Python 3. For hosts unable to use Python 3, or to use a legacy version of this check, see the following config.
Available for Agent versions >6.0
-
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: