tiup
tiup copied to clipboard
Grafana data source not found
Bug Report
Please answer these questions before submitting your issue. Thanks!
- What did you do?
Deploy with the following yaml file:
global:
user: "tidb"
ssh_port: 22
deploy_dir: "/tidb-deploy"
data_dir: "/tidb-data"
pd_servers:
- host: 127.0.0.1
name: pd
tidb_servers:
- host: 127.0.0.1
tikv_servers:
- host: 127.0.0.1
data_dir: "/mnt/test/tikv-data"
monitoring_servers:
- host: 127.0.0.1
grafana_servers:
- host: 127.0.0.1
Deploy with command: tiup cluster deploy toda-test-cluster v4.0.4 ./test-cluster.conf
Then visit http://127.0.0.1:3000/d/SVbh2xUWk/toda-test-cluster-tiflash-summary?orgId=1
.
- What did you expect to see?
No error in grafana.
- What did you see instead?
I got an error: Datasource named toda-toda-test-cluster was not found
. The datasource set in dashboard is toda-toda-test-cluster
, but the real datasource name is toda-test-cluster
- What version of TiUP are you using (
tiup --version
)?
v1.0.8 tiup
Go Version: go1.13
Git Branch: master
GitHash: 4276089
sad:(
It's because that we need replace the keyword test-cluster
to the real cluster name (the grafana template use test-cluster
as the default one), and your cluster name contains the keyword test-cluster
.
https://github.com/pingcap/tiup/blob/4f84a3f249510e7dc0f681680b25606b1f82fa21/pkg/cluster/spec/grafana.go#L200
We can add " in replace stage
The same issue in v.1.5 tiup. The cluster prefixed with test-cluster is a very common usage.