Influx: Support flux in the influx datasource (#25308)

* add flux 
* add token to datasource config editor
* add backend for flux
* make the interpolated query available in query inspector
* go mod tidy
* Chore: fixes a couple of strict null errors in influxdb plugin

Co-authored-by: kyle <kyle@grafana.com>
Co-authored-by: Lukas Siatka <lukasz.siatka@grafana.com>
This commit is contained in:
Ryan McKinley
2020-06-10 15:26:24 -04:00
committed by GitHub
co-authored by kyle Lukas Siatka
parent c7aac1fd40
commit 5f1f820bb9
24 changed files with 1449 additions and 55 deletions
+7
View File
@@ -0,0 +1,7 @@
#datatype,string,long,string,string,string,string,long
#group,false,false,false,false,true,false,false
#default,_result,,,,,,
,result,table,name,id,organizationID,retentionPolicy,retentionPeriod
,,0,grafana,059b46a59abab001,059b46a59abab000,,604800000000000
,,0,_tasks,059b46a59abab002,059b46a59abab000,,259200000000000
,,0,_monitoring,059b46a59abab003,059b46a59abab000,,604800000000000
1 #datatype string long string string string string long
2 #group false false false false true false false
3 #default _result
4 result table name id organizationID retentionPolicy retentionPeriod
5 0 grafana 059b46a59abab001 059b46a59abab000 604800000000000
6 0 _tasks 059b46a59abab002 059b46a59abab000 259200000000000
7 0 _monitoring 059b46a59abab003 059b46a59abab000 604800000000000
+21
View File
@@ -0,0 +1,21 @@
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,string,string,string,double,dateTime:RFC3339
#group,false,false,true,true,true,true,true,false,false
#default,mean,,,,,,,,
,result,table,_start,_stop,_field,_measurement,host,_value,_time
,,0,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load1,system,hostname,,2020-05-05T18:38:50Z
,,0,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load1,system,hostname,3.56,2020-05-05T18:39:00Z
,,0,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load1,system,hostname,,2020-05-05T19:38:47.207881833Z
,,1,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load15,system,hostname,,2020-05-05T18:38:50Z
,,1,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load15,system,hostname,2.51,2020-05-05T18:39:00Z
,,1,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load15,system,hostname,1.74,2020-05-05T19:38:40Z
,,1,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load15,system,hostname,,2020-05-05T19:38:47.207881833Z
,,2,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load5,system,hostname,,2020-05-05T18:38:50Z
,,2,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load5,system,hostname,3.14,2020-05-05T18:39:00Z
,,2,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load5,system,hostname,3.04,2020-05-05T18:39:10Z
,,2,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load5,system,hostname,1.8,2020-05-05T19:37:50Z
,,2,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load5,system,hostname,1.76,2020-05-05T19:38:00Z
,,2,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load5,system,hostname,1.75,2020-05-05T19:38:10Z
,,2,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load5,system,hostname,1.71,2020-05-05T19:38:20Z
,,2,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load5,system,hostname,1.77,2020-05-05T19:38:30Z
,,2,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load5,system,hostname,1.71,2020-05-05T19:38:40Z
,,2,2020-05-05T18:38:47.207881833Z,2020-05-05T19:38:47.207881833Z,load5,system,hostname,,2020-05-05T19:38:47.207881833Z
1 #datatype string long dateTime:RFC3339 dateTime:RFC3339 string string string double dateTime:RFC3339
2 #group false false true true true true true false false
3 #default mean
4 result table _start _stop _field _measurement host _value _time
5 0 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load1 system hostname 2020-05-05T18:38:50Z
6 0 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load1 system hostname 3.56 2020-05-05T18:39:00Z
7 0 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load1 system hostname 2020-05-05T19:38:47.207881833Z
8 1 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load15 system hostname 2020-05-05T18:38:50Z
9 1 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load15 system hostname 2.51 2020-05-05T18:39:00Z
10 1 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load15 system hostname 1.74 2020-05-05T19:38:40Z
11 1 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load15 system hostname 2020-05-05T19:38:47.207881833Z
12 2 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load5 system hostname 2020-05-05T18:38:50Z
13 2 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load5 system hostname 3.14 2020-05-05T18:39:00Z
14 2 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load5 system hostname 3.04 2020-05-05T18:39:10Z
15 2 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load5 system hostname 1.8 2020-05-05T19:37:50Z
16 2 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load5 system hostname 1.76 2020-05-05T19:38:00Z
17 2 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load5 system hostname 1.75 2020-05-05T19:38:10Z
18 2 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load5 system hostname 1.71 2020-05-05T19:38:20Z
19 2 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load5 system hostname 1.77 2020-05-05T19:38:30Z
20 2 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load5 system hostname 1.71 2020-05-05T19:38:40Z
21 2 2020-05-05T18:38:47.207881833Z 2020-05-05T19:38:47.207881833Z load5 system hostname 2020-05-05T19:38:47.207881833Z
+25
View File
@@ -0,0 +1,25 @@
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,double,string,string,string,string
#group,false,false,true,true,false,false,true,true,true,true
#default,_result,,,,,,,,,
,result,table,_start,_stop,_time,_value,_field,_measurement,a,b
,,0,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T10:34:08.135814545Z,1.4,f,test,1,adsfasdf
,,0,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T22:08:44.850214724Z,6.6,f,test,1,adsfasdf
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,long,string,string,string,string
#group,false,false,true,true,false,false,true,true,true,true
#default,_result,,,,,,,,,
,result,table,_start,_stop,_time,_value,_field,_measurement,a,b
,,1,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T10:34:08.135814545Z,4,i,test,1,adsfasdf
,,1,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T22:08:44.850214724Z,-1,i,test,1,adsfasdf
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,bool,string,string,string,string
#group,false,false,true,true,false,false,true,true,true,true
#default,_result,,,,,,,,,
,result,table,_start,_stop,_time,_value,_field,_measurement,a,b
,,2,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T22:08:44.62797864Z,false,f,test,0,adsfasdf
,,2,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T22:08:44.969100374Z,true,f,test,0,adsfasdf
#datatype,string,long,dateTime:RFC3339Nano,dateTime:RFC3339Nano,dateTime:RFC3339Nano,unsignedLong,string,string,string,string
#group,false,false,true,true,false,false,true,true,true,true
#default,_result,,,,,,,,,
,result,table,_start,_stop,_time,_value,_field,_measurement,a,b
,,3,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T22:08:44.62797864Z,0,i,test,0,adsfasdf
,,3,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T22:08:44.969100374Z,2,i,test,0,adsfasdf
1 #datatype string long dateTime:RFC3339 dateTime:RFC3339 dateTime:RFC3339 double string string string string
2 #group false false true true false false true true true true
3 #default _result
4 result table _start _stop _time _value _field _measurement a b
5 0 2020-02-17T22:19:49.747562847Z 2020-02-18T22:19:49.747562847Z 2020-02-18T10:34:08.135814545Z 1.4 f test 1 adsfasdf
6 0 2020-02-17T22:19:49.747562847Z 2020-02-18T22:19:49.747562847Z 2020-02-18T22:08:44.850214724Z 6.6 f test 1 adsfasdf
7 #datatype string long dateTime:RFC3339 dateTime:RFC3339 dateTime:RFC3339 long string string string string
8 #group false false true true false false true true true true
9 #default _result
10 result table _start _stop _time _value _field _measurement a b
11 1 2020-02-17T22:19:49.747562847Z 2020-02-18T22:19:49.747562847Z 2020-02-18T10:34:08.135814545Z 4 i test 1 adsfasdf
12 1 2020-02-17T22:19:49.747562847Z 2020-02-18T22:19:49.747562847Z 2020-02-18T22:08:44.850214724Z -1 i test 1 adsfasdf
13 #datatype string long dateTime:RFC3339 dateTime:RFC3339 dateTime:RFC3339 bool string string string string
14 #group false false true true false false true true true true
15 #default _result
16 result table _start _stop _time _value _field _measurement a b
17 2 2020-02-17T22:19:49.747562847Z 2020-02-18T22:19:49.747562847Z 2020-02-18T22:08:44.62797864Z false f test 0 adsfasdf
18 2 2020-02-17T22:19:49.747562847Z 2020-02-18T22:19:49.747562847Z 2020-02-18T22:08:44.969100374Z true f test 0 adsfasdf
19 #datatype string long dateTime:RFC3339Nano dateTime:RFC3339Nano dateTime:RFC3339Nano unsignedLong string string string string
20 #group false false true true false false true true true true
21 #default _result
22 result table _start _stop _time _value _field _measurement a b
23 3 2020-02-17T22:19:49.747562847Z 2020-02-18T22:19:49.747562847Z 2020-02-18T22:08:44.62797864Z 0 i test 0 adsfasdf
24 3 2020-02-17T22:19:49.747562847Z 2020-02-18T22:19:49.747562847Z 2020-02-18T22:08:44.969100374Z 2 i test 0 adsfasdf
+6
View File
@@ -0,0 +1,6 @@
#datatype,string,long,dateTime:RFC3339,dateTime:RFC3339,dateTime:RFC3339,double,string,string,string,string
#group,false,false,true,true,false,false,true,true,true,true
#default,_result,,,,,,,,,
,result,table,_start,_stop,_time,_value,_field,_measurement,a,b
,,0,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T10:34:08.135814545Z,1.4,f,test,1,adsfasdf
,,0,2020-02-17T22:19:49.747562847Z,2020-02-18T22:19:49.747562847Z,2020-02-18T22:08:44.850214724Z,6.6,f,test,1,adsfasdf
1 #datatype string long dateTime:RFC3339 dateTime:RFC3339 dateTime:RFC3339 double string string string string
2 #group false false true true false false true true true true
3 #default _result
4 result table _start _stop _time _value _field _measurement a b
5 0 2020-02-17T22:19:49.747562847Z 2020-02-18T22:19:49.747562847Z 2020-02-18T10:34:08.135814545Z 1.4 f test 1 adsfasdf
6 0 2020-02-17T22:19:49.747562847Z 2020-02-18T22:19:49.747562847Z 2020-02-18T22:08:44.850214724Z 6.6 f test 1 adsfasdf