Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add dashbords for tidb #227

Merged
merged 2 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cmd/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,16 @@ else
fi

# TiDB dashboard
cp /tmp/tidb.json $GF_PROVISIONING_PATH/dashboards
cp /tmp/tidb*.json $GF_PROVISIONING_PATH/dashboards
sed -i 's/Test-Cluster-TiDB/'$TIDB_CLUSTER_NAME'-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb.json
sed -i 's/Test-Cluster-TiDB/'$TIDB_CLUSTER_NAME'-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb_runtime.json
sed -i 's/Test-Cluster-TiDB/'$TIDB_CLUSTER_NAME'-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb_resource_control.json

# Overview dashboard
cp /tmp/overview.json $GF_PROVISIONING_PATH/dashboards
cp /tmp/performance_overview.json $GF_PROVISIONING_PATH/dashboards
sed -i 's/Test-Cluster-Overview/'$TIDB_CLUSTER_NAME'-Overview/g' $GF_PROVISIONING_PATH/dashboards/overview.json
sed -i 's/Test-Cluster-Performance-Overview/'$TIDB_CLUSTER_NAME'-Performance-Overview/g' $GF_PROVISIONING_PATH/dashboards/performance_overview.json

# PD dashboard
cp /tmp/pd.json $GF_PROVISIONING_PATH/dashboards
Expand Down
3 changes: 3 additions & 0 deletions pkg/operator/dashboards.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ var (
dashboards = map[string]string{
"binlog.json": "Test-Cluster-Binlog",
"tidb.json": "Test-Cluster-TiDB",
"tidb_resource_control.json": "Test-Cluster-TiDB-Resource-Control",
"tidb_runtime.json": "Test-Cluster-TiDB-Runtime",
"overview.json": "Test-Cluster-Overview",
"performance_overview.json": "Test-Cluster-Performance-Overview",
"tikv_details.json": "Test-Cluster-TiKV-Details",
"tikv_summary.json": "Test-Cluster-TiKV-Summary",
"tikv_trouble_shooting.json": "Test-Cluster-TiKV-Trouble-Shooting",
Expand Down
6 changes: 5 additions & 1 deletion platform-monitoring/operator/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,17 @@ else
fi

# TiDB dashboard
cp /tmp/tidb.json $GF_PROVISIONING_PATH/dashboards
cp /tmp/tidb*.json $GF_PROVISIONING_PATH/dashboards
sed -i 's/Test-Cluster-TiDB/Cluster-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb.json
sed -i 's/Test-Cluster-TiDB/Cluster-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb_runtime.json
sed -i 's/Test-Cluster-TiDB/Cluster-TiDB/g' $GF_PROVISIONING_PATH/dashboards/tidb_resource_control.json
sed -i 's/label_values(pd_cluster_status, tidb_cluster)/label_values(tidb_server_connections, tidb_cluster)/g' $GF_PROVISIONING_PATH/dashboards/tidb.json

# Overview dashboard
cp /tmp/overview.json $GF_PROVISIONING_PATH/dashboards
cp /tmp/performance_overview.json $GF_PROVISIONING_PATH/dashboards
sed -i 's/Test-Cluster-Overview/Cluster-Overview/g' $GF_PROVISIONING_PATH/dashboards/overview.json
sed -i 's/Test-Cluster-Performance-Overview/Cluster-Performance-Overview/g' $GF_PROVISIONING_PATH/dashboards/performance_overview.json
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

# PD dashboard
Expand Down