Sign InTry Free

Integrate TiDB Cloud with New Relic (Beta)

TiDB Cloud supports New Relic integration (beta). You can configure TiDB Cloud to send metric data of your TiDB clusters to New Relic. After that, you can directly view these metrics in your New Relic dashboards.

Prerequisites

  • To integrate TiDB Cloud with New Relic, you must have a New Relic account and a New Relic API key. New Relic grants you an API key when you first create a New Relic account.

    If you do not have a New Relic account, sign up here.

  • To edit third-party integration settings for 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 New Relic integration in TiDB Serverless clusters.

Steps

Step 1. Integrate with your New Relic 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 New Relic (BETA).

  4. Enter your API key of New Relic and choose the site of New Relic.

  5. 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.
  6. Click Confirm to complete the integration.

Step 2. Add TiDB Cloud Dashboard in New Relic

  1. Log in to New Relic.
  2. Click Add Data, search for TiDB Cloud, and then go to the TiDB Cloud Monitoring page. Alternatively, you can click the link to directly access the page.
  3. Choose your account ID and create the dashboard in New Relic.

Pre-built dashboard

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

Metrics available to New Relic

New Relic 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.