TiDB Dashboard
The TiDB Dashboard is a web UI for managing and monitoring TiDB clusters.
Accessing the Dashboard
http://<pd-ip>:2379/dashboard
- Username: root
- Password: (empty by default)
Key Features
1. Cluster Information
Displays basic cluster information:
- Number of TiDB, TiKV, TiFlash, and PD nodes
- Status of each node (online/offline)
- TiDB version
- Disk capacity and usage
2. Key Visualizer
Displays data distribution across TiKV nodes:
- Region distribution — data heatmap visualization
- Hot regions — frequently accessed Regions
- Read/Write traffic — read/write traffic
3. SQL Statements
Displays the most frequently executed SQL statements:
- Duration — average execution time
- QPS — queries per second
- Scan Rows — number of rows scanned
- Memory — memory usage
4. Slow Queries
Displays slow-running queries:
- Query detail — the slow SQL statement
- Execution plan — execution plan analysis
- Duration breakdown — time components
5. Key Performance Metrics
The dashboard displays key metrics:
- QPS — total queries per second
- TPS — total transactions per second
- Latency — average response time
- Storage — disk usage
- Memory — memory usage
- CPU — CPU usage
6. Cluster Diagnostics
- Check health — check cluster health
- Check config — verify the configuration
- Check logs — find errors in the logs
- Check version — version compatibility
7. Cluster Configuration
Manage the cluster configuration:
- Edit configuration — modify PD, TiDB, and TiKV configs
- View configuration — view the current config
- Restart component — restart a specific node
Advanced Features
Continuous Profiling
Collects profiling data in real time:
-- Enable profiling
SET GLOBAL tidb_enable_pprof = 1;
Top SQL
Displays SQL statements with the highest resource consumption:
- CPU usage per SQL
- Memory usage per SQL
- I/O usage per SQL
Access Logs
View access logs for debugging:
- Client connection logs
- Slow query logs
- Error logs
Monitoring with Grafana
TiDB also provides monitoring via Prometheus + Grafana:
- Grafana: http://
:3000 - Prometheus: http://
:9090
Main Dashboard Panels
| Panel | Description |
|---|---|
| Overview | Cluster summary |
| TiDB | SQL layer metrics |
| TiKV | Storage metrics |
| PD | Scheduling metrics |
| TiFlash | HTAP metrics |
In the next chapter, we will look at monitoring in more detail.