You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If enabled, metrics can be collected from the `performance_schema` database by granting an additional privilege:
98
-
99
-
```shell
100
-
mysql> show databases like 'performance_schema';
101
-
+-------------------------------+
102
-
| Database (performance_schema) |
103
-
+-------------------------------+
104
-
| performance_schema |
105
-
+-------------------------------+
106
-
1 row inset (0.00 sec)
107
-
108
-
mysql> GRANT SELECT ON performance_schema.* TO 'datadog'@'%';
109
-
Query OK, 0 rows affected (0.00 sec)
110
-
```
111
-
112
-
To collect index metrics, grant the `datadog` user an additional privilege:
113
-
114
-
```shell
115
-
116
-
mysql> GRANT SELECT ON mysql.innodb_index_stats TO 'datadog'@'%';
117
-
Query OK, 0 rows affected (0.00 sec)
118
-
```
119
-
120
90
### Configuration
121
91
122
92
Follow the instructions below to configure this check for an Agent running on a host. For containerized environments, see the [Docker](?tab=docker#docker), [Kubernetes](?tab=kubernetes#kubernetes), or [ECS](?tab=ecs#ecs) sections.
@@ -159,7 +129,7 @@ For a full list of available configuration options, see the [sample `mysql.d/con
159
129
160
130
To collect `extra_performance_metrics`, your MySQL server must have `performance_schema` enabled - otherwise set `extra_performance_metrics` to `false`. For more information on `performance_schema`, see [MySQL Performance Schema Quick Start][9].
161
131
162
-
##### TiDB Configuration
132
+
##### TiDB configuration
163
133
164
134
For TiDB instances, some configuration options should be adjusted:
165
135
@@ -600,21 +570,21 @@ The check does not collect all metrics by default. Set the following boolean con
600
570
601
571
#### TiDB limitations
602
572
603
-
When using this integration with TiDB, be aware of the following limitations:
573
+
When using some extra integration with TiDB, be aware of the following limitations for TiDB:
604
574
605
575
- **InnoDB metrics**: TiDB doesn't use the InnoDB storage engine, so all InnoDB-related metrics are unavailable
606
576
- **Performance Schema**: TiDB doesn't have MySQL's `performance_schema`, so performance metrics requiring it are unavailable
607
577
- **Replication metrics**: TiDB uses a different replication mechanism (Raft consensus), so traditional MySQL replication metrics don't apply
608
578
- **MyISAM metrics**: TiDB doesn't support MyISAM, so key cache metrics are unavailable
609
-
- **Binary log metrics**: TiDB has a different binlog implementation, so traditional MySQL binlog metrics may not be accurate
579
+
- **Binary log metrics**: TiDB has a different binlog implementation, so traditional MySQL binlog metrics may not be available
610
580
- **Statement metrics**: TiDB uses `information_schema.cluster_statements_summary` instead of `performance_schema.events_statements_summary_by_digest`
611
581
- **Activity monitoring**: TiDB uses `information_schema.cluster_processlist` instead of `performance_schema.events_statements_current`
612
582
613
583
For Database Monitoring features:
614
584
- Query samples and explain plans are collected from `cluster_statements_summary` with some approximations
615
-
- Wait events are not available as TiDB doesn't track them in the same way as MySQL
616
-
- Some query metrics are approximated (e.g., rows examined is estimated from keys processed)
617
-
- TiDB explain plans are retrieved from the `PLAN` column in `information_schema.cluster_statements_summary` table, which contains pre-collected execution plans in text format with embedded execution statistics
585
+
- Wait events are not available as TiDB doesn't track them in the same way as MySQL. We set 'N/A' for all.
586
+
- Some query metrics are approximated (for example, rows examined is estimated from keys processed)
587
+
- TiDB explain plans are retrieved from the `PLAN` column in `information_schema.cluster_statements_summary` table, which contains pre-collected execution plans in text format with embedded execution statistics. Please be sure it's not realtime explain plan like other database like MySQL, MariaDB.
618
588
619
589
### Events
620
590
@@ -638,7 +608,7 @@ See [service_checks.json][22] for a list of service checks provided by this inte
638
608
639
609
### TiDB-specific troubleshooting
640
610
641
-
**Missing metrics**: If you see warnings about missing InnoDB or performance_schema metrics when monitoring TiDB:
611
+
**Missing metrics**: If you see warnings about missing InnoDB or `performance_schema` metrics when monitoring TiDB:
642
612
- This is expected behavior. Set `disable_innodb_metrics: true` and `extra_performance_metrics: false` in your configuration.
643
613
644
614
**Connection issues**: TiDB typically runs on port 4000 instead of MySQL's default 3306. Make sure to specify the correct port in your configuration.
0 commit comments