Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions TOC-tidb-cloud-essential.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
- [Subscribe via Slack](/tidb-cloud/monitor-alert-slack.md)
- [Subscribe via Zoom](/tidb-cloud/monitor-alert-zoom.md)
- [Events](/tidb-cloud/tidb-cloud-events.md)
- [Integrate TiDB Cloud with Datadog](/tidb-cloud/monitor-datadog-integration-for-tidb-x.md)
- Tune Performance
- [Overview](/tidb-cloud/tidb-cloud-tune-performance-overview.md)
- [Analyze Performance](/tidb-cloud/tune-performance.md)
Expand Down Expand Up @@ -180,6 +181,7 @@
- Integrations
- [Airbyte](/tidb-cloud/integrate-tidbcloud-with-airbyte.md)
- [Cloudflare](/tidb-cloud/integrate-tidbcloud-with-cloudflare.md)
- [Datadog](/tidb-cloud/monitor-datadog-integration-for-tidb-x.md)
- [dbt](/tidb-cloud/integrate-tidbcloud-with-dbt.md)
- [Gitpod](/develop/dev-guide-playground-gitpod.md)
- [n8n](/tidb-cloud/integrate-tidbcloud-with-n8n.md)
Expand Down
2 changes: 2 additions & 0 deletions TOC-tidb-cloud-premium.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
- [Subscribe via Email](/tidb-cloud/monitor-alert-email.md)
- [Subscribe via Slack](/tidb-cloud/monitor-alert-slack.md)
- [Subscribe via Zoom](/tidb-cloud/monitor-alert-zoom.md)
- [Integrate TiDB Cloud with Datadog](/tidb-cloud/monitor-datadog-integration-for-tidb-x.md)
- Tune Performance
- [Overview](/tidb-cloud/tidb-cloud-tune-performance-overview.md)
- [Analyze Performance](/tidb-cloud/tune-performance.md)
Expand Down Expand Up @@ -169,6 +170,7 @@
- Integrations
- [Airbyte](/tidb-cloud/integrate-tidbcloud-with-airbyte.md)
- [Cloudflare](/tidb-cloud/integrate-tidbcloud-with-cloudflare.md)
- [Datadog](/tidb-cloud/monitor-datadog-integration-for-tidb-x.md)
- [dbt](/tidb-cloud/integrate-tidbcloud-with-dbt.md)
- [Gitpod](/develop/dev-guide-playground-gitpod.md)
- [n8n](/tidb-cloud/integrate-tidbcloud-with-n8n.md)
Expand Down
4 changes: 2 additions & 2 deletions tidb-cloud/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,8 @@ This document lists the feature support status for different TiDB Cloud plans, i
<tr>
<td>Datadog integration</td>
<td style="text-align:center; font-size: 14px;">❌</td>
<td style="text-align:center; font-size: 14px;">❌</td>
<td style="text-align:center; font-size: 14px;">❌</td>
<td style="text-align:center;">✅ <br/><span style="font-size: 14px; white-space: nowrap;">(Public preview)</span></td>
<td style="text-align:center;">✅ <br/><span style="font-size: 14px; white-space: nowrap;">(Public preview)</span></td>
<td style="text-align:center;">✅</td>
</tr>
<tr>
Expand Down
137 changes: 137 additions & 0 deletions tidb-cloud/monitor-datadog-integration-for-tidb-x.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
---
title: Integrate TiDB Cloud with Datadog (Preview)
summary: Learn how to monitor your TiDB Cloud instances with the Datadog integration.
---

Comment thread
qiancai marked this conversation as resolved.
# Integrate TiDB Cloud with Datadog (Preview)

TiDB Cloud supports integration with Datadog. You can configure TiDB Cloud to send metrics for your <CustomContent plan="essential">{{{ .essential }}}</CustomContent><CustomContent plan="premium">{{{ .premium }}}</CustomContent> instances to [Datadog](https://www.datadoghq.com/). After that, you can view these metrics in your Datadog dashboards directly.

## Prerequisites

- To integrate TiDB Cloud with Datadog, you must have a Datadog account and a [Datadog API key](https://app.datadoghq.com/organization-settings/api-keys). Datadog grants you an API key when you first create a Datadog account.

If you do not have a Datadog account, sign up at [https://app.datadoghq.com/signup](https://app.datadoghq.com/signup).

- To set up third-party metrics integration for TiDB Cloud, you must have the `Organization Owner`, `Project Owner`, or `Instance Manager` access in TiDB Cloud. To view the integration page, you need at least the `Project Viewer` or `Instance Viewer` role to access the target <CustomContent plan="essential">{{{ .essential }}}</CustomContent><CustomContent plan="premium">{{{ .premium }}}</CustomContent> instance under your organization in TiDB Cloud.

## Limitations

- Datadog integration is not available for [TiDB Cloud Starter](/tidb-cloud/select-cluster-tier.md#starter) instances.
- Datadog integration is not available when the status of your <CustomContent plan="essential">{{{ .essential }}}</CustomContent><CustomContent plan="premium">{{{ .premium }}}</CustomContent> instance is **CREATING**, **RESTORING**, **PAUSED**, or **RESUMING**.

## Steps

### Step 1. Import the pre-built Datadog dashboard

Currently, the TiDB Cloud dashboard for <CustomContent plan="essential">{{{ .essential }}}</CustomContent><CustomContent plan="premium">{{{ .premium }}}</CustomContent> is not yet available in the Datadog integration marketplace. You need to manually download and import the dashboard JSON file into Datadog.

1. Download the Datadog dashboard JSON file for your instance type:

<CustomContent plan="essential">

<https://github.com/pingcap/docs/blob/master/tidb-cloud/monitor-datadog-integration-tidb-cloud-dynamic-tracker-essential.json>

</CustomContent>

<CustomContent plan="premium">

<https://github.com/pingcap/docs/blob/master/tidb-cloud/monitor-datadog-integration-tidb-cloud-dynamic-tracker-premium.json>

</CustomContent>

2. Log in to [Datadog](https://app.datadoghq.com), and then go to **Dashboards** > **Dashboard List**.

3. Click **+ New Dashboard** in the upper-right corner. Enter a dashboard name, and then select **Start from blank dashboard**.

4. In the new dashboard, click the gear icon (**Configure**) in the upper-right corner, and then select **Import dashboard JSON...**.

5. In the dialog that appears, paste the JSON content, or drag and drop the JSON file.

6. Click **Yes, Replace** to confirm the import.

### Step 2. Integrate with your Datadog API key

<CustomContent plan="essential">

1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**My TiDB**](https://tidbcloud.com/tidbs) page, and then click the name of your target {{{ .essential }}} instance to go to its overview page.
2. In the left navigation pane, click **Integrations** > **Integration to Datadog (Preview)**.
3. Enter your Datadog API key and choose your Datadog Region.
4. Click **Test Integration**.

- If the test succeeds, the **Confirm** button is displayed.
- If the test fails, an error message is displayed. Follow the message for troubleshooting and retry the integration.

5. Click **Confirm** to complete the integration.

</CustomContent>

<CustomContent plan="premium">

1. In the [TiDB Cloud console](https://tidbcloud.com/), navigate to the [**My TiDB**](https://tidbcloud.com/tidbs) page, and then click the name of your target {{{ .premium }}} instance to go to its overview page.
2. In the left navigation pane, click **Settings** > **Integrations** > **Integration to Datadog (Preview)**.
3. Enter your Datadog API key and choose your Datadog Region.
4. Click **Test Integration**.

- If the test succeeds, the **Confirm** button is displayed.
- If the test fails, an error message is displayed. Follow the message for troubleshooting and retry the integration.

5. Click **Confirm** to complete the integration.

</CustomContent>

## View the pre-built dashboard

To view the pre-built dashboard after the integration, go to **Dashboards** > **Dashboard List** in [Datadog](https://app.datadoghq.com), and then select the dashboard imported in [Step 1](#step-1-import-the-pre-built-datadog-dashboard). On the dashboard page, you can filter by your target instance name and view the metrics.

You can also access the **Dashboard List** page in Datadog from the [TiDB Cloud console](https://tidbcloud.com/): go to the **Integrations** page of your target instance, click **Datadog (Preview)**, and then click **Dashboard**.

## Metrics available to Datadog

Datadog tracks the following metrics for your <CustomContent plan="essential">{{{ .essential }}}</CustomContent><CustomContent plan="premium">{{{ .premium }}}</CustomContent> instance.

<CustomContent plan="essential">

> **Note:**
>
> Currently, the changefeed feature for {{{ .essential }}} is only available upon request, and the `tidb_cloud.changefeed_*` metrics are not available.

| Metric name | Metric type | Labels | Description |
|:--- |:--- |:--- |:--- |
| `tidb_cloud.db_total_connection` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of current connections in your TiDB server |
| `tidb_cloud.db_active_connections` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of active connections |
| `tidb_cloud.db_disconnections` | gauge | `result: Error\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of clients disconnected by connection result |
| `tidb_cloud.db_database_time` | gauge | `sql_type: Select\|Insert\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The total time consumed by all SQL statements running in TiDB per second, including the CPU time of all processes and the non-idle waiting time |
| `tidb_cloud.db_query_per_second` | gauge | `type: Select\|Insert\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of SQL statements executed per second, counted according to statement types |
| `tidb_cloud.db_failed_queries` | gauge | `type: planner:xxx\|executor:2345\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The statistics of error types (such as syntax errors and primary key conflicts) that occur per second when executing SQL statements |
| `tidb_cloud.db_command_per_second` | gauge | `type: Query\|Ping\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of commands processed by TiDB per second |
| `tidb_cloud.db_queries_using_plan_cache_ops` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of queries that hit the execution plan cache per second |
| `tidb_cloud.db_average_query_duration` | gauge | `sql_type: Select\|Insert\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The duration between the time a network request is sent to TiDB and the time a response is returned to the client |
| `tidb_cloud.db_transaction_per_second` | gauge | `type: Commit\|Rollback\|...`<br/>`txn_mode: optimistic\|pessimistic`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of transactions executed per second |
| `tidb_cloud.db_row_storage_used_bytes` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The row-based storage size of the {{{ .essential }}} instance in bytes |
| `tidb_cloud.db_columnar_storage_used_bytes` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The columnar storage size of the {{{ .essential }}} instance in bytes. Returns 0 if TiFlash is not enabled. |
| `tidb_cloud.resource_manager_resource_request_unit_total` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The total Request Units/s (RU/s) consumed |

</CustomContent>

<CustomContent plan="premium">

| Metric name | Metric type | Labels | Description |
|:--- |:--- |:--- |:--- |
| `tidb_cloud.db_total_connection` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of current connections in your TiDB server |
| `tidb_cloud.db_active_connections` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of active connections |
| `tidb_cloud.db_disconnections` | gauge | `result: Error\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of clients disconnected by connection result |
| `tidb_cloud.db_database_time` | gauge | `sql_type: Select\|Insert\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The total time consumed by all SQL statements running in TiDB per second, including the CPU time of all processes and the non-idle waiting time |
| `tidb_cloud.db_query_per_second` | gauge | `type: Select\|Insert\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of SQL statements executed per second, counted according to statement types |
| `tidb_cloud.db_failed_queries` | gauge | `type: planner:xxx\|executor:2345\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The statistics of error types (such as syntax errors and primary key conflicts) that occur per second when executing SQL statements |
| `tidb_cloud.db_command_per_second` | gauge | `type: Query\|Ping\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of commands processed by TiDB per second |
| `tidb_cloud.db_queries_using_plan_cache_ops` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of queries that hit the execution plan cache per second |
| `tidb_cloud.db_average_query_duration` | gauge | `sql_type: Select\|Insert\|...`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The duration between the time a network request is sent to TiDB and the time a response is returned to the client |
| `tidb_cloud.db_transaction_per_second` | gauge | `type: Commit\|Rollback\|...`<br/>`txn_mode: optimistic\|pessimistic`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The number of transactions executed per second |
| `tidb_cloud.db_row_storage_used_bytes` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The row-based storage size of the {{{ .premium }}} instance in bytes |
| `tidb_cloud.db_columnar_storage_used_bytes` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The columnar storage size of the {{{ .premium }}} instance in bytes |
| `tidb_cloud.resource_manager_resource_request_unit_total` | gauge | `instance_id: <instance id>`<br/>`instance_name: <instance name>` | The total Request Units/s (RU/s) consumed |
| `tidb_cloud.changefeed_latency` | gauge | `changefeed: <changefeed-id>`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | The data replication latency between the upstream and the downstream of a changefeed |
| `tidb_cloud.changefeed_status` | gauge | `changefeed: <changefeed-id>`<br/>`instance_id: <instance id>`<br/>`instance_name: <instance name>` | Changefeed status:<br/>`-1`: Unknown<br/>`0`: Normal<br/>`1`: Warning<br/>`2`: Failed<br/>`3`: Stopped<br/>`4`: Finished<br/>`6`: Warning<br/>`7`: Other |

</CustomContent>
16 changes: 12 additions & 4 deletions tidb-cloud/monitor-datadog-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ summary: Learn how to monitor your TiDB cluster with the Datadog integration.

# Integrate TiDB Cloud with Datadog

TiDB Cloud supports Datadog integration. You can configure TiDB Cloud to send metrics about your TiDB clusters to [Datadog](https://www.datadoghq.com/). After that, you can view these metrics in your Datadog dashboards directly.
TiDB Cloud supports integration with Datadog. You can configure TiDB Cloud to send metrics for your TiDB clusters to [Datadog](https://www.datadoghq.com/). After that, you can view these metrics in your Datadog dashboards directly.

> **Note:**
>
> This document only applies to TiDB Cloud Dedicated.
>
> For TiDB Cloud Starter, the Datadog integration is not available.
> For TiDB Cloud Essential, see [Integrate TiDB Cloud Essential with Datadog](https://docs.pingcap.com/tidbcloud/monitor-datadog-integration-for-tidb-x/?plan=essential).
> For TiDB Cloud Premium, see [Integrate TiDB Cloud Premium with Datadog](https://docs.pingcap.com/tidbcloud/monitor-datadog-integration-for-tidb-x/?plan=premium).

## Datadog integration version

Expand All @@ -22,17 +30,17 @@ TiDB Cloud has supported the project-level Datadog integration (Beta) since Marc

- To set up third-party metrics integration for TiDB Cloud, you must have the `Organization Owner` or `Project Owner` access in TiDB Cloud. To view the integration page or access configured dashboards via the provided links, you need at least the `Project Viewer` role to access the target TiDB Cloud Dedicated clusters under your project in TiDB Cloud.

## Limitation
## Limitations

- Datadog integrations are now only available for [TiDB Cloud Dedicated](/tidb-cloud/select-cluster-tier.md#tidb-cloud-dedicated) clusters.
- Datadog integration is not available for [TiDB Cloud Starter](/tidb-cloud/select-cluster-tier.md#starter) instances.

- Datadog integrations are not available when the cluster status is **CREATING**, **RESTORING**, **PAUSED**, or **RESUMING**.

- When a cluster with Datadog integration is deleted, its associated integration services are also removed.

## Steps

### Step 1. Integrate with your Datadog API Key
### Step 1. Integrate with your Datadog API key

Depending on your [Datadog integration version](#datadog-integration-version), the steps to access the integration page are different.

Expand Down
12 changes: 12 additions & 0 deletions tidb-cloud/monitoring-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ You can view the logged events on the **Events** page, including the event type,

For more information, see [Events](/tidb-cloud/tidb-cloud-events.md).

<CustomContent plan="dedicated">

## Third-party metrics integrations

TiDB Cloud lets you integrate any of the following third-party metrics services to receive TiDB Cloud alerts and view the performance metrics of your TiDB Cloud Dedicated cluster.
Expand All @@ -56,3 +58,13 @@ TiDB Cloud lets you integrate any of the following third-party metrics services
- [Prometheus and Grafana integration](/tidb-cloud/monitor-prometheus-and-grafana-integration.md)

- [New Relic integration](/tidb-cloud/monitor-new-relic-integration.md)

</CustomContent>

<CustomContent plan="essential,premium">

## Datadog integration

TiDB Cloud lets you integrate Datadog to receive TiDB Cloud alerts and view the performance metrics of your target instance. For more information, see [Integrate TiDB Cloud with Datadog](/tidb-cloud/monitor-datadog-integration-for-tidb-x.md).

</CustomContent>
Loading