Skip to content

Latest commit

 

History

History
68 lines (48 loc) · 6.85 KB

monitor-new-relic-integration.md

File metadata and controls

68 lines (48 loc) · 6.85 KB
title summary
Integrate TiDB Cloud with New Relic (Beta)
Learn how to monitor your TiDB cluster with the New Relic integration.

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 name Metric type Labels Description
tidb_cloud.db_database_time gauge sql_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_second gauge type: 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_duration gauge sql_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_queries gauge type: 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_connection gauge cluster_name: <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: <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: <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: <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: <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_second gauge txn_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_bytes gauge cluster_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_bytes gauge cluster_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_total count cluster_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_cores gauge cluster_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_bytes gauge cluster_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_bytes gauge cluster_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.