29 Commits

Author SHA1 Message Date
303e70db25 pkg/tsdb/elasticsearch/response_parser.go: simplify redundant code
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline=6m ./...
pkg/tsdb/elasticsearch/response_parser.go:95:41⚠️ should use make(map[string]string) instead (S1019) (megacheck)
pkg/tsdb/elasticsearch/response_parser.go:125:41⚠️ should use make(map[string]string) instead (S1019) (megacheck)
pkg/tsdb/elasticsearch/response_parser.go:317:5⚠️ redundant break statement (S1023) (megacheck)
pkg/tsdb/elasticsearch/response_parser.go:358:5⚠️ redundant break statement (S1023) (megacheck)
2018-09-20 20:07:03 +02:00
b609d81194 pkg/tsdb/elasticsearch/client/search_request.go: simplify loop with
append.

$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline=6m ./...
pkg/tsdb/elasticsearch/client/search_request.go:59:4⚠️ should replace loop with sr.Aggs = append(sr.Aggs, aggArray...) (S1011) (megacheck)
pkg/tsdb/elasticsearch/client/search_request.go:303:4⚠️ should replace loop with agg.Aggregation.Aggs = append(agg.Aggregation.Aggs, childAggs...) (S1011) (megacheck)
2018-09-20 20:00:02 +02:00
13a1d0a026 pkg/tsdb/elasticsearch/client/client.go: use time.Since instead of time.Now().Sub
$ gometalinter --vendor --disable=all --enable=megacheck --deadline=10m ./...
pkg/tsdb/elasticsearch/client/client.go:147:13⚠️ should use time.Since instead of time.Now().Sub (S1012) (megacheck)
pkg/tsdb/elasticsearch/client/client.go:190:14⚠️ should use time.Since instead of time.Now().Sub (S1012) (megacheck)
pkg/tsdb/elasticsearch/client/client.go:218:13⚠️ should use time.Since instead of time.Now().Sub (S1012) (megacheck)
2018-09-18 23:42:25 +02:00
0254a29e35 Interpolate $__interval in backend for alerting with sql datasources (#13156)
add support for interpolate $__interval and  $__interval_ms in sql datasources
2018-09-13 16:51:00 +02:00
ab8fa0de74 elasticsearch: support reversed index patterns
Now both [index-]pattern and pattern[-index] are supported
2018-07-26 21:39:02 +02:00
8b32dc5847 move go vet out of scripts and fixing warning (#12552) 2018-07-09 23:25:32 -07:00
d2f31a716f remove unnecessary conversions 2018-07-04 12:16:39 +02:00
9db964bf35 Fix typo: eleasticsearch -> elasticsearch (#12184) 2018-06-06 13:09:16 -07:00
38906acda9 elasticsearch: sort bucket keys to fix issue wth response parser tests 2018-06-04 15:15:47 +02:00
b8ff3b1e3f remove dead code 2018-05-31 19:05:32 +02:00
dcac63936b elasticsearch: minor refactor
Handle all replacements if interval template variables in the client.
Fix issue with client and different versions.
Adds better tests of the client
2018-05-31 19:02:20 +02:00
4752d7884a elasticsearch: adds some more/better debug logging to client 2018-05-25 10:31:56 +02:00
16c3566a87 elasticsearch: handle NaN values 2018-05-23 22:57:46 +02:00
688f5b830c elasticsearch: metric and pipeline agg setting json encoding fix 2018-05-23 22:21:41 +02:00
4436b8da12 elasticsearch: query interval override fix 2018-05-23 22:07:52 +02:00
8870e3e85b elasticsearch: default interval fix
5s instead of 15s
2018-05-23 21:44:09 +02:00
242689abe2 elasticsearch: pipeline aggregation fix for json encoding 2018-05-23 16:46:26 +02:00
dce59ccff2 fix: remove deadcode to make gometalinter happy 2018-05-23 15:28:36 +02:00
4840adff00 elasticsearch: refactor query handling and use new es simple client
Removes moment dependency.
Adds response parser tests (based on frontend tests).
Adds time series query tests (based on frontend tests).
Fixes various issues related to response parsing and building search request queries.
Added support for extended stats metrics and geo hash grid aggregations.
2018-05-23 15:09:58 +02:00
e171ed8910 elasticsearch: new simple client for communicating with elasticsearch
Handles minor differences of es 2, 5 and 5.6.
Implements index pattern logic.
Exposes builders for building search requests.
2018-05-23 14:59:12 +02:00
77400cef08 elasticsearch: refactor and cleanup
Move time series query logic to specific file.
Remove model parser and move to time series query file, adds parser test.
2018-05-23 14:36:41 +02:00
4050fce220 add response_parser test 2018-03-28 12:35:05 +08:00
06f7332156 cleanup and add more test 2018-03-28 01:42:25 +08:00
4042e4b225 fix a terms bug and add test 2018-03-27 02:12:43 +08:00
63a200686e - pipeline aggs support
- add some test
2018-03-26 19:48:57 +08:00
d6cdc2497c Handle Interval Date Format similar to the JS variant
7e14e272fa
2018-03-26 16:13:14 +08:00
1e275d0cd1 set right series name
Signed-off-by: wph95 <wph657856467@gmail.com>
2018-03-25 02:18:28 +08:00
bc5b59737c finished CODING PHASE 1
Signed-off-by: wph95 <wph657856467@gmail.com>
2018-03-24 13:06:21 +08:00
8e7d23cdeb wip
Signed-off-by: wph95 <wph657856467@gmail.com>
2018-03-23 23:50:16 +08:00