Skip to content

Commit

Permalink
modify init.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
KanShiori committed Feb 10, 2023
1 parent ce38afa commit 29fc66b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
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
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

0 comments on commit 29fc66b

Please sign in to comment.