42 Commits

Author SHA1 Message Date
574553ec7b Chore: Fix issues found by staticcheck (#28802)
* Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-11-05 11:29:39 +01:00
a078e40238 Settings: Rename constants/variables to follow Go naming standards (#28002)
* settings: Rename constants/variables to follow Go naming standards
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-10-02 15:45:45 +02:00
a5d9196a53 Chore/fix lint issues (#27704)
* Chore: Fix linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-09-22 16:22:19 +02:00
50ebbb625e InfluxDB: Upgrade Go client, use data source HTTP client (#27012)
* InfluxDB: Upgrade Go client, use data source HTTP client

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>

* Remove unnecessary Close

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-14 18:40:02 +02:00
c63bbbaec3 InfluxDB: Close Flux query results (#26917)
* InfluxDB: Drop ctxhttp usage
* InfluxDB: Clean up code
* InfluxDB: Close query results

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-13 17:50:53 +02:00
37c278c8f3 InfluxDB: Less chatty logging (#26850)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-08-07 09:18:57 +02:00
41d432b5ae Chore: Enable whitespace linter (#25903)
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-07-06 20:17:28 +02:00
8d1ed33e20 InfluxDB: different config UI for 1x vs 2x (#25723) 2020-06-22 13:03:34 -07:00
bd8a04a6a5 InfluxDB: Fix invalid memory address or nil pointer dereference when schema is missing in URL (#25565)
Add guard if parsing url fails in influxdb backend data source.

Fixes #25242
2020-06-12 16:04:09 +02:00
5f1f820bb9 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>
2020-06-10 15:26:24 -04:00
2fff8f77dc move log package to /infra (#17023)
ref #14679

Signed-off-by: zhulongcheng <zhulongcheng.me@gmail.com>
2019-05-13 08:45:54 +02:00
3866839b19 Datasources: add support for POST HTTP verb for InfluxDB (#16690)
A new parameter `queryMode` is added to the InfluxDB datasource to provide a way to use POST instead of GET when querying the database. This prevents to get any error when querying the database with a heavy request.
Default configuration is kept to GET for backward compatibility. Tests and documentation have been added for this new behaviour.
2019-05-02 15:30:37 +02:00
66f6e16916 Security: Store datasource passwords encrypted in secureJsonData (#16175)
* Store passwords in secureJsonData

* Revert unnecessary refactors

* Fix for nil jsonSecureData value

* Remove copied encryption code from migration

* Fix wrong field reference

* Remove migration and provisioning changes

* Use password getters in datasource proxy

* Refactor password handling in datasource configs

* Add provisioning warnings

* Update documentation

* Remove migration command, moved to separate PR

* Remove unused code

* Set the upgrade version

* Remove unused code

* Remove double reference
2019-04-15 11:11:17 +02:00
6b8e3122f8 chore(influx): no point of reading response when bad status (#16212)
There's no point in reading the body response without using
the result so removing it.

Fixes #9199
Ref #16207
2019-03-26 12:10:24 +07:00
d791a6211d fix(InfluxDB): Reads body and close request body even for error status codes (#16207) 2019-03-25 17:42:26 +01:00
e351e6e211 pkg/tsdb/influxdb/influxdb.go: Fix surrounding loop is unconditionally terminated.
See,
$ gometalinter --vendor --deadline 6m --disable-all --enable=megacheck ./...
pkg/tsdb/influxdb/influxdb.go:106:3⚠️ the surrounding loop is unconditionally terminated (SA4004) (megacheck)
2018-11-09 19:40:07 +01:00
ed661767f8 follow go idiom and return error as second param 2017-09-21 18:04:16 +02:00
a45e2ec9c3 context is reserved for go's context 2017-09-21 15:23:34 +02:00
16b5b9f6be make ds a param for Query 2017-09-21 15:09:14 +02:00
7f9f388293 rename executor into tsdbqueryendpoint 2017-09-21 15:02:17 +02:00
0229d28d64 remove unused structs 2017-09-21 15:02:17 +02:00
55f1b36e31 refactor response flow 2017-09-21 15:02:17 +02:00
2c7adccf12 Use cache for http.client in tsdb package. (#6833)
* datasource: move caching closer to datasource struct

* tsdb: use cached version of datasource http transport

closes #6825
2016-12-07 11:10:42 +01:00
f70d7ff3a3 fix(influxdb): align tsdb.influxdb with dataproxy
ref #6784
2016-12-02 21:10:29 +01:00
e04d27c0b0 fix(influxdb): return internal influxdb errors
ref #6523
2016-11-11 08:47:53 +01:00
f924b241ae tech(influxdb): refactor query builder
trying to reduce the amounts of moving parts for influxdb
2016-11-10 14:38:07 +01:00
ecba23e883 Merge branch 'master' into influxdb_alias_seriename 2016-11-10 12:22:17 +01:00
82e1d3f6aa feat(influxdb): disable debug logging in appmode 2016-11-09 14:48:05 +01:00
c897d39d5e feat(influxdb): add support for serie alias replacement
ref #6510
2016-11-09 10:22:11 +01:00
98a7bf181a tech(influxdb): close body reader 2016-11-08 19:19:49 +01:00
d4bc92b267 feat(tsdb): default tsdb httpclient 2016-11-02 08:51:34 +01:00
9429434cb5 feat(influxdb): use database auth if provided
closes #6310
2016-10-18 15:12:04 +02:00
4144eacc24 feat(influxdb): start parsing interval parameters 2016-10-13 11:42:51 +02:00
8d96262106 chore(tsdb): tidy up code 2016-10-10 11:58:06 +02:00
f609623abd style(influxdb): tidy up code 2016-10-10 11:34:52 +02:00
b0addbd7cb feat(influxdb): support multi row results 2016-10-06 15:30:09 +02:00
d8aa38fafe tech(influxdb): refactor and cleanup 2016-10-06 14:16:26 +02:00
ab8751767c feat(influxdb): send request and parse response 2016-10-06 12:51:45 +02:00
4387d20222 feat(influxdb): render select and groupby 2016-10-05 20:36:05 +02:00
d0e6a9559e feat(influxdb): add query part model 2016-10-05 10:56:34 +02:00
946e0bf32e feat(influxdb): parse query json 2016-10-04 21:28:05 +02:00
e556df5b49 feat(tsdb): add draft implementation for influxdb 2016-10-04 16:25:33 +02:00