Skip to content

Commit c9d17d4

Browse files
authored
Merge pull request #227 from pingcap/shiori/add-dashbord-for-tidb
add dashbords for tidb
2 parents c8f41f5 + 29fc66b commit c9d17d4

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

cmd/init.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,16 @@ else
5050
fi
5151

5252
# TiDB dashboard
53-
cp /tmp/tidb.json $GF_PROVISIONING_PATH/dashboards
53+
cp /tmp/tidb*.json $GF_PROVISIONING_PATH/dashboards
5454
sed -i 's/Test-Cluster-TiDB/'$TIDB_CLUSTER_NAME'-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb.json
55+
sed -i 's/Test-Cluster-TiDB/'$TIDB_CLUSTER_NAME'-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb_runtime.json
56+
sed -i 's/Test-Cluster-TiDB/'$TIDB_CLUSTER_NAME'-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb_resource_control.json
5557

5658
# Overview dashboard
5759
cp /tmp/overview.json $GF_PROVISIONING_PATH/dashboards
60+
cp /tmp/performance_overview.json $GF_PROVISIONING_PATH/dashboards
5861
sed -i 's/Test-Cluster-Overview/'$TIDB_CLUSTER_NAME'-Overview/g' $GF_PROVISIONING_PATH/dashboards/overview.json
62+
sed -i 's/Test-Cluster-Performance-Overview/'$TIDB_CLUSTER_NAME'-Performance-Overview/g' $GF_PROVISIONING_PATH/dashboards/performance_overview.json
5963

6064
# PD dashboard
6165
cp /tmp/pd.json $GF_PROVISIONING_PATH/dashboards

pkg/operator/dashboards.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ var (
2323
dashboards = map[string]string{
2424
"binlog.json": "Test-Cluster-Binlog",
2525
"tidb.json": "Test-Cluster-TiDB",
26+
"tidb_resource_control.json": "Test-Cluster-TiDB-Resource-Control",
27+
"tidb_runtime.json": "Test-Cluster-TiDB-Runtime",
2628
"overview.json": "Test-Cluster-Overview",
29+
"performance_overview.json": "Test-Cluster-Performance-Overview",
2730
"tikv_details.json": "Test-Cluster-TiKV-Details",
2831
"tikv_summary.json": "Test-Cluster-TiKV-Summary",
2932
"tikv_trouble_shooting.json": "Test-Cluster-TiKV-Trouble-Shooting",

platform-monitoring/operator/init.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,17 @@ else
5050
fi
5151

5252
# TiDB dashboard
53-
cp /tmp/tidb.json $GF_PROVISIONING_PATH/dashboards
53+
cp /tmp/tidb*.json $GF_PROVISIONING_PATH/dashboards
5454
sed -i 's/Test-Cluster-TiDB/Cluster-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb.json
55+
sed -i 's/Test-Cluster-TiDB/Cluster-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb_runtime.json
56+
sed -i 's/Test-Cluster-TiDB/Cluster-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb_resource_control.json
5557
sed -i 's/label_values(pd_cluster_status, tidb_cluster)/label_values(tidb_server_connections, tidb_cluster)/g' $GF_PROVISIONING_PATH/dashboards/tidb.json
5658

5759
# Overview dashboard
5860
cp /tmp/overview.json $GF_PROVISIONING_PATH/dashboards
61+
cp /tmp/performance_overview.json $GF_PROVISIONING_PATH/dashboards
5962
sed -i 's/Test-Cluster-Overview/Cluster-Overview/g' $GF_PROVISIONING_PATH/dashboards/overview.json
63+
sed -i 's/Test-Cluster-Performance-Overview/Cluster-Performance-Overview/g' $GF_PROVISIONING_PATH/dashboards/performance_overview.json
6064
sed -i 's/label_values(pd_cluster_status, tidb_cluster)/label_values(process_start_time_seconds, tidb_cluster)/g' $GF_PROVISIONING_PATH/dashboards/overview.json
6165

6266
# PD dashboard

0 commit comments

Comments
 (0)