Sign InTry Free

Integrate TiDB Cloud with Datadog (Beta)

TiDB Cloud supports Datadog integration (beta). You can configure TiDB Cloud to send metric data about your TiDB clusters to Datadog. 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. 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.

  • To edit third-party integration settings of TiDB Cloud, you must have the Organization Owner access to your organization or Project Member access to the target project in TiDB Cloud.

Limitation

  • You cannot use the Datadog integration in TiDB Serverless clusters.

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

Steps

Step 1. Integrate with your Datadog API Key

  1. Log in to the TiDB Cloud console.

  2. Click in the lower-left corner, switch to the target project if you have multiple projects, and then click Project Settings.

  3. On the Project Settings page of your project, click Integrations in the left navigation pane, and then click Integration to Datadog (BETA).

  4. Enter your API key of Datadog and choose the site of Datadog.

  5. Click Test Integration.

    • If the test successes, the Confirm button is displayed.
    • If the test fails, an error message is displayed. Follow the message for troubleshooting and retry the integration.
  6. Click Confirm to complete the integration.

Step 2. Install TiDB Cloud Integration in Datadog

  1. Log in to Datadog.
  2. Go to the TiDB Cloud Integration page (https://app.datadoghq.com/account/settings#integrations/tidb-cloud) in Datadog.
  3. In the Configuration tab, click Install Integration. The TiDBCloud Cluster Overview dashboard is displayed in your Dashboard List.

Pre-built dashboard

Click the Dashboard link in the Datadog card of the integrations. You can see the pre-built dashboard of your TiDB clusters.

Metrics available to Datadog

Datadog tracks the following metric data for your TiDB clusters.

Metric nameMetric typeLabelsDescription
tidb_cloud.db_database_timegaugesql_type: Select|Insert|...
cluster_name: <cluster name>
instance: tidb-0|tidb-1…
component: tidb
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_secondgaugetype: Select|Insert|...
cluster_name: <cluster name>
instance: tidb-0|tidb-1…
component: tidb
The number of SQL statements executed per second on all TiDB instances, which is counted according to SELECT, INSERT, UPDATE, and other types of statements.
tidb_cloud.db_average_query_durationgaugesql_type: Select|Insert|...
cluster_name: <cluster name>
instance: tidb-0|tidb-1…
component: tidb
The duration between the time that the client's network request is sent to TiDB and the time that the request is returned to the client after TiDB has executed it.
tidb_cloud.db_failed_queriesgaugetype: executor:xxxx|parser:xxxx|...
cluster_name: <cluster name>
instance: tidb-0|tidb-1…
component: tidb
The statistics of error types (such as syntax errors and primary key conflicts) according to the SQL execution errors that occur per second on each TiDB instance.
tidb_cloud.db_total_connectiongaugecluster_name: <cluster name>
instance: tidb-0|tidb-1…
component: tidb
The number of current connections in your TiDB server.
tidb_cloud.db_active_connectionsgaugecluster_name: <cluster name>
instance: tidb-0|tidb-1…
component: tidb
The number of active connections.
tidb_cloud.db_disconnectionsgaugeresult: ok|error|undetermined
cluster_name: <cluster name>
instance: tidb-0|tidb-1…
component: tidb
The number of disconnected clients.
tidb_cloud.db_command_per_secondgaugetype: Query|StmtPrepare|...
cluster_name: <cluster name>
instance: tidb-0|tidb-1…
component: tidb
The number of commands processed by TiDB per second, which is classified according to the success or failure of command execution results.
tidb_cloud.db_queries_using_plan_cache_opsgaugecluster_name: <cluster name>
instance: tidb-0|tidb-1…
component: tidb
The statistics of queries using Plan Cache per second. The execution plan cache only supports the prepared statement command.
tidb_cloud.db_transaction_per_secondgaugetxn_mode: pessimistic|optimistic
type: abort|commit|...
cluster_name: <cluster name>
instance: tidb-0|tidb-1…
component: tidb
The number of transactions executed per second.
tidb_cloud.node_storage_used_bytesgaugecluster_name: <cluster name>
instance: tikv-0|tikv-1…|tiflash-0|tiflash-1…
component: tikv|tiflash
The disk usage of TiKV/TiFlash nodes, in bytes.
tidb_cloud.node_storage_capacity_bytesgaugecluster_name: <cluster name>
instance: tikv-0|tikv-1…|tiflash-0|tiflash-1…
component: tikv|tiflash
The disk capacity of TiKV/TiFlash nodes, in bytes.
tidb_cloud.node_cpu_seconds_totalcountcluster_name: <cluster name>
instance: tidb-0|tidb-1…|tikv-0…|tiflash-0…
component: tidb|tikv|tiflash
The CPU usage of TiDB/TiKV/TiFlash nodes.
tidb_cloud.node_cpu_capacity_coresgaugecluster_name: <cluster name>
instance: tidb-0|tidb-1…|tikv-0…|tiflash-0…
component: tidb|tikv|tiflash
The limit on CPU cores of TiDB/TiKV/TiFlash nodes.
tidb_cloud.node_memory_used_bytesgaugecluster_name: <cluster name>
instance: tidb-0|tidb-1…|tikv-0…|tiflash-0…
component: tidb|tikv|tiflash
The used memory of TiDB/TiKV/TiFlash nodes, in bytes.
tidb_cloud.node_memory_capacity_bytesgaugecluster_name: <cluster name>
instance: tidb-0|tidb-1…|tikv-0…|tiflash-0…
component: tidb|tikv|tiflash
The memory capacity of TiDB/TiKV/TiFlash nodes, in bytes.

Was this page helpful?

Download PDFRequest docs changesAsk questions on Discord
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
© 2024 PingCAP. All Rights Reserved.
Privacy Policy.