Sign In Try 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 toDatadog.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 aDatadog API key.当你第一次cre Datadog授予您一个API密匙ate a Datadog account.

    If you do not have a Datadog account, sign up athttps://app.datadoghq.com/signup

  • To edit third-party integration settings of TiDB Cloud, you must have theOrganization Owneraccess to your organization orProject Memberaccess to the target project in TiDB Cloud.

Limitation

  • You cannot use the Datadog integration inTiDB Serverlessclusters.

  • Datadog integrations are not available when the cluster status isCREATING,RESTORING,PAUSED, orRESUMING

Steps

Step 1. Integrate with your Datadog API Key

  1. Log in to theTiDB Cloud console

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

  3. On theProject Settingspage of your project, clickIntegrationsin the left navigation pane, and then clickIntegration to Datadog (BETA)

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

  5. ClickTest Integration

    • If the test successes, theConfirmbutton is displayed.
    • If the test fails, an error message is displayed. Follow the message for troubleshooting and retry the integration.
  6. ClickConfirmto complete the integration.

Step 2. Install TiDB Cloud Integration in Datadog

  1. Log in toDatadog
  2. Go to theTiDB Cloud Integrationpage (https://app.datadoghq.com/account/settings#integrations/tidb-cloud) in Datadog.
  3. In the配置tab, clickInstall Integration.TheTiDBCloud Cluster Overviewdashboard is displayed in yourDashboard List

Pre-built dashboard

Click theDashboardlink in theDatadogcard 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 name Metric type Labels Description
tidb_cloud.db_database_time gauge sql_type: Select|Insert|...
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_second gauge type: Select|Insert|...
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_duration gauge sql_type: Select|Insert|...
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_queries gauge type: executor:xxxx|parser:xxxx|...
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_connection gauge cluster_name:
instance: tidb-0|tidb-1…
component:tidb
The number of current connections in your TiDB server.
tidb_cloud.db_active_connections gauge cluster_name:
instance: tidb-0|tidb-1…
component:tidb
The number of active connections.
tidb_cloud.db_disconnections gauge result: ok|error|undetermined
cluster_name:
instance: tidb-0|tidb-1…
component:tidb
The number of disconnected clients.
tidb_cloud.db_command_per_second gauge type: Query|StmtPrepare|...
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_ops gauge cluster_name:
instance: tidb-0|tidb-1…
component:tidb
The statistics of queries usingPlan Cacheper second. The execution plan cache only supports the prepared statement command.
tidb_cloud.db_transaction_per_second gauge txn_mode: pessimistic|optimistic
type: abort|commit|...
cluster_name:
instance: tidb-0|tidb-1…
component:tidb
The number of transactions executed per second.
tidb_cloud.node_storage_used_bytes gauge 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_bytes gauge 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_total count 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_cores gauge 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_bytes gauge 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_bytes gauge 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.
Download PDF Request docs changes Ask questions on Discord
Playground
New
One-stop & interactive experience of TiDB's capabilities WITHOUT registration.
Was this page helpful?
Products
TiDB
TiDB Dedicated
TiDB Serverless
Pricing
Get Demo
Get Started
©2023PingCAP. All Rights Reserved.