taosdata / grafanaplugin

TDengine datasource plugin for grafana
GNU Affero General Public License v3.0
63 stars 30 forks source link

TDengine Data source is not working, reason: undefined #177

Open PPQiao opened 1 year ago

PPQiao commented 1 year ago

when add tdengine datasource and save after installing tdengine plugin for grafana, it shows "TDengine Data source is not working, reason: undefined" Grafana version: 9.3.6 tdengine plugin version: 3.2.8

PPQiao commented 1 year ago

image

PPQiao commented 1 year ago

tdengine version: 2.2.2.0

PPQiao commented 1 year ago

image

PPQiao commented 1 year ago

好像是提示说少了http:// 我加上了,现在报400: image image

sunpe commented 1 year ago

在终端执行 curl -L -H "Authorization: Basic cm9vdDp0YW9zZGF0YQ==" -d "show databases" 10.168.205.81:6041/rest/sql 试一下,看看 taosadapter 是否正常工作

PPQiao commented 1 year ago

在终端执行 curl -L -H "Authorization: Basic cm9vdDp0YW9zZGF0YQ==" -d "show databases" 10.168.205.81:6041/rest/sql 试一下,看看 taosadapter 是否正常工作

[pmish@localhost connector]$ curl -L -H "Authorization: Basic cm9vdDp0YW9zZGF0YQ==" -d "show databases" 10.168.205.81:6041/rest/sql
{"status":"succ","head":["name","created_time","ntables","vgroups","replica","quorum","days","keep","cache(MB)","blocks","minrows","maxrows","wallevel","fsync","comp","cachelast","precision","update","status"],"column_meta":[["name",8,32],["created_time",9,8],["ntables",4,4],["vgroups",4,4],["replica",3,2],["quorum",3,2],["days",3,2],["keep",8,24],["cache(MB)",4,4],["blocks",4,4],["minrows",4,4],["maxrows",4,4],["wallevel",2,1],["fsync",4,4],["comp",2,1],["cachelast",2,1],["precision",8,3],["update",2,1],["status",8,10]],"data":[["log","2023-01-10 15:16:10.841",4,1,1,1,10,"30",1,3,100,4096,1,3000,2,0,"us",0,"ready"],["power","2023-03-23 17:13:56.792",1,1,1,1,10,"365",16,6,100,4096,1,3000,2,0,"ms",0,"ready"],["lbfs","2023-01-10 15:16:43.558",2101,3,1,1,10,"365",16,6,100,4096,1,3000,2,0,"ms",0,"ready"]],"rows":3}

这个应该是说明restful开启着的吧, 另外我是V2.2.2.0版本的tdengine, 还没有taosadapter.

这是grafana在add DataSource时的日志 image

dddicaprio commented 1 year ago

您这边方便远程吗?可以的话请添加vx:tdengine1

sangshuduo commented 1 year ago

在终端执行 curl -L -H "Authorization: Basic cm9vdDp0YW9zZGF0YQ==" -d "show databases" 10.168.205.81:6041/rest/sql 试一下,看看 taosadapter 是否正常工作

[pmish@localhost connector]$ curl -L -H "Authorization: Basic cm9vdDp0YW9zZGF0YQ==" -d "show databases" 10.168.205.81:6041/rest/sql
{"status":"succ","head":["name","created_time","ntables","vgroups","replica","quorum","days","keep","cache(MB)","blocks","minrows","maxrows","wallevel","fsync","comp","cachelast","precision","update","status"],"column_meta":[["name",8,32],["created_time",9,8],["ntables",4,4],["vgroups",4,4],["replica",3,2],["quorum",3,2],["days",3,2],["keep",8,24],["cache(MB)",4,4],["blocks",4,4],["minrows",4,4],["maxrows",4,4],["wallevel",2,1],["fsync",4,4],["comp",2,1],["cachelast",2,1],["precision",8,3],["update",2,1],["status",8,10]],"data":[["log","2023-01-10 15:16:10.841",4,1,1,1,10,"30",1,3,100,4096,1,3000,2,0,"us",0,"ready"],["power","2023-03-23 17:13:56.792",1,1,1,1,10,"365",16,6,100,4096,1,3000,2,0,"ms",0,"ready"],["lbfs","2023-01-10 15:16:43.558",2101,3,1,1,10,"365",16,6,100,4096,1,3000,2,0,"ms",0,"ready"]],"rows":3}

这个应该是说明restful开启着的吧, 另外我是V2.2.2.0版本的tdengine, 还没有taosadapter.

这是grafana在add DataSource时的日志 

image

建议升级 TDengine 到 3.0.4.0