Commit Graph

846 Commits

Author SHA1 Message Date
Daniel Lee
d6904ba9b4 azuremonitor: small refactoring 2019-02-11 01:22:15 +01:00
Daniel Lee
60327953a2 azuremonitor: handles timegrain set to auto on backend 2019-02-11 01:17:37 +01:00
Daniel Lee
452c4f5b9b azuremonitor: add test for dimension filter 2019-02-10 01:47:38 +01:00
Daniel Lee
b94de101cd azuremonitor: refactor azure monitor api code into own file 2019-02-10 01:18:16 +01:00
Daniel Lee
b816f35c41 azuremonitor: handle multi-dimensions on backend 2019-02-10 00:23:12 +01:00
Daniel Lee
a5e5db20e1 azuremonitor: add support for aggregations on backend 2019-02-09 21:52:44 +01:00
Connor Patterson
d2aed7e075 Fix formatting 2019-02-09 14:13:15 -05:00
Connor Patterson
2987a47a9b Add aws ec2 api metrics for cloudwatch 2019-02-09 13:47:08 -05:00
Daniel Lee
10194df112 azuremonitor: simple alerting for Azure Monitor API
Lots of edge cases and functionality left to implement but
a simple query works for alerting now.
2019-02-08 18:15:17 +01:00
Marcus Efraimsson
1bc2a0af70
use unique datasource id when registering mysql tls config 2019-02-08 18:08:07 +01:00
Daniel Lee
0e228d582d azuremonitor: builds a query and sends it to Azure on the backend
Lots of edge cases not covered and the response is not parsed. It only
handles one service and will have to be refactored to handle multiple
2019-02-08 17:20:31 +01:00
Marcus Efraimsson
e87ff5a06d
Merge pull request #15265 from larsjoergensen/cloudwatch/add-rds-aurora-serverlessdatabasecapacity-metrics
Added ServerlessDatabaseCapacity metric to list of AWS RDS metrics.
2019-02-05 21:56:11 +01:00
Lars Jørgensen
749320002b Added ServerlessDatabaseCapacity metric to list of AWS RDS metrics. 2019-02-05 20:57:51 +01:00
jeroenvollenbrock
28aafcd789 cloudwatch: Add tests for resource_arn template query 2019-02-05 18:37:05 +01:00
jeroenvollenbrock
fa977ce090 cloudwatch: Add resource_arns template query function
Implements feature request #8207
2019-02-05 18:37:04 +01:00
Marcus Efraimsson
d433ca7d40
fix util for splitting host and port
Now you can provide both a default host and a default port
2019-02-04 13:10:32 +01:00
Connor Patterson
48c8ff8899 Add AWS/Neptune to metricsMap and dimensionsMap 2019-02-03 16:29:35 -05:00
Daniel Lee
782c4eae98
Merge pull request #15127 from challengerdeep/fix-stackdriver-aggparams-reducer
Change primaryAggregation to crossSeriesReducer in Stackdriver
2019-01-30 00:45:22 +01:00
Torkel Ödegaard
416562bd90
Merge pull request #15102 from mjtrangoni/fix-golint-issues
Fix golint issues
2019-01-29 21:12:34 +01:00
Robert Edström
9b6746d808 Change primaryAggregation to crossSeriesReducer in Stackdriver 2019-01-29 19:11:54 +01:00
Mario Trangoni
8261613b51 pkg/util/{ip.go,url.go}: Fix some golint issues
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=golint  ./...
ip.go:8:6⚠️ func SplitIpPort should be SplitIPPort (golint)
url.go:14:6⚠️ func NewUrlQueryReader should be NewURLQueryReader (golint)
url.go:9:6⚠️ type UrlQueryReader should be URLQueryReader (golint)
url.go:37:6⚠️ func JoinUrlFragments should be JoinURLFragments (golint)
2019-01-28 22:29:20 +01:00
Marcus Efraimsson
7023c957d7
Merge branch 'master' into nanosecond-postgresql 2019-01-28 20:04:46 +01:00
Marcus Efraimsson
f157c19e16
extract parsing of datasource tls config to method 2019-01-28 19:38:56 +01:00
Vlad Ellis
c208186f26 Parse database host correctly when using IPv6 2019-01-25 21:56:19 +00:00
bugficks
f31fe495e9 fix go fmt 2019-01-15 13:54:25 +01:00
bugficks
7db848f153 [Feature request] MySQL SSL CA in datasource connector
https://github.com/grafana/grafana/issues/8570
2019-01-15 13:29:56 +01:00
Marcus Efraimsson
130e4aa666
Merge pull request #14608 from marefr/es_bucket_script
Fix support bucket script pipeline aggregations
2019-01-14 15:58:42 +01:00
jaken551
64163f0198 14722 - removing unnecessary arn check that breaks assume role feature in other AWS partitions 2019-01-06 15:21:58 -05:00
Ander Arguiñano
089d85af63 Added macros to mysql 2019-01-03 22:29:57 +01:00
Ander Arguiñano
3801a75131 FIxed syntaxis mistake unixEpochNanoFrom and unixEpochNanoTo 2019-01-03 22:25:10 +01:00
Ander Arguiñano
ed6782402b Merge remote-tracking branch 'upstream/master' into nanosecond-postgresql 2019-01-03 21:48:10 +01:00
Ander Arguiñano
b4eac406d5 Added previous macros to mssql 2019-01-03 21:43:08 +01:00
Ander Arguiñano
9105625f24 Added unixEpochNanoTo and unixEpochNanoFrom macros to postgresql 2019-01-03 21:31:47 +01:00
Ander Arguiñano
4d8d2a9690 Renamed unixEpochFilterNano to unixEpochNanoFilter 2019-01-03 20:40:17 +01:00
Sven Klemm
4c51e8df20 Don't cut off subsecond precision for postgres macros
Change time format to RFC3339Nano for $__timeFilter, $__timeFrom and
$__timeTo macros
2019-01-02 23:38:09 +01:00
Ander Arguiñano
1a67a8db80 Nanosecond timestamp support postgresql 2019-01-02 23:00:21 +01:00
Clément MATHIEU
c29c9d1664 Add support for InfluxDB's time zone clause (backend) 2018-12-21 16:49:01 +01:00
Marcus Efraimsson
b45f72a140
elasticsearch: support bucket script pipeline aggregations 2018-12-20 01:24:36 +01:00
Marcus Efraimsson
c46d01dc83
Merge pull request #14090 from marefr/8843_pipeline_doc_count
Fix pipeline aggregations on doc count
2018-12-12 13:21:13 +01:00
Scott Glajch
62a5cd27ba Add the AWS/SES Cloudwatch metrics of BounceRate and ComplaintRate. Pull request #14399 2018-12-07 16:42:29 -05:00
Carl Bergquist
3c330c8e4c
Merge pull request #14317 from mjtrangoni/fix-misspell-issues
pkg/*: Fix misspelling issues using locale US
2018-12-05 10:34:28 +01:00
Mario Trangoni
fadd816d89 pkg/*: Fix misspell issues
See,
$ find . -type f | xargs misspell -locale US | grep -vi -e vendor -e devenv -e Unknwon -e Destory | grep pkg
./pkg/services/sqlstore/org_test.go:190:15: "frome" is a misspelling of "from"
./pkg/tsdb/elasticsearch/response_parser.go:544:24: "Unkown" is a misspelling of "Unknown"
./pkg/tsdb/opentsdb/opentsdb.go:87:20: "marshalling" is a misspelling of "marshaling"
./pkg/components/dynmap/dynmap_test.go:2:7: "Licence" is a misspelling of "License"
./pkg/components/dynmap/dynmap.go:2:7: "Licence" is a misspelling of "License"
2018-12-04 23:29:34 +01:00
Tom Nitti
1e53c12921 added support for influxdb cumulative_sum function in tsdb 2018-12-04 12:46:50 -06:00
Marcus Efraimsson
acb45867f8
Merge pull request #14179 from mattiarossi/master
Add support for offset in date histogram aggregation
2018-12-03 05:43:42 -08:00
Marcus Efraimsson
624e5e5b3d
let each sql datasource handle timeFrom and timeTo macros 2018-11-30 14:30:02 +01:00
Matthew Coltman
bbd0ec3a8b Add AWS/CodeBuild namespace for CloudWatch datasource 2018-11-29 21:02:44 +01:00
Mattia Rossi
ce74b1ddc2 Requested Backend changes, removed link in popover description for the offset field 2018-11-27 03:42:20 -05:00
Mattia Rossi
f6fc7f7b64 Requested Backend changes, added details to popover description for the offset field 2018-11-26 08:58:25 -05:00
Marcus Efraimsson
a022284cb0
fix handle of elasticsearch 6.0+ version 2018-11-23 15:24:16 +01:00
Marcus Efraimsson
3534762f49
cloudwatch: handle invalid time ranges 2018-11-21 17:51:02 +01:00
Marcus Efraimsson
879aed7d06
cloudwatch: recover/handle panics when executing queries 2018-11-21 17:49:17 +01:00
Javier
0900470dda Add Cloudwatch/CloudHSM Metrics and dimensionMaps 2018-11-19 18:10:34 +01:00
Marcus Efraimsson
9a8ad70013
fix pipeline aggregations on doc count 2018-11-15 19:06:47 +01:00
Mario Trangoni
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
Torkel Ödegaard
dcb5015022
Merge pull request #13951 from marefr/11977_6x_terms
Fix terms agg order deprecation warning on es 6+
2018-11-07 20:47:41 +01:00
Zac Coffy
9cce0f553a Adding Cloudwatch AWS/Connect metrics and dimensions 2018-11-05 13:15:03 -05:00
Marcus Efraimsson
5803bfd2c7
fix terms agg order deprecation warning on es 6+ 2018-11-02 17:53:47 +01:00
Marcus Efraimsson
6052257515
Merge pull request #13820 from grafana/13769_mysql_time_filter
mysql: fix timeFilter macro should respect local time zone
2018-10-26 09:02:59 +02:00
Mitsuhiro Tanda
220c4f4ab4 add test 2018-10-26 03:13:02 +09:00
Mitsuhiro Tanda
3447b8b299 cache region result 2018-10-26 01:23:44 +09:00
Mitsuhiro Tanda
c40baa1a23 use default region to call DescribeRegions 2018-10-26 01:23:44 +09:00
Torkel Ödegaard
d505d83ee1
Merge pull request #13679 from mjtrangoni/fix-megacheck-issues
Fix megacheck issues
2018-10-25 16:31:53 +02:00
Marcus Efraimsson
97b22aa5a9
mysql: fix timeFilter macro should respect local time zone 2018-10-25 10:29:40 +02:00
Erik Sundell
c5af0bf1c5 Resource type filter (#13784)
* stackdriver: add resource type to filter and group bys

* stackdriver: remove not used param

* stackdriver: refactor filter and group by code

* stackdriver: remove resource type if its already in filter list

* stackdriver: remove debug logging

* stackdriver: remove more debug logging

* stackdriver: append resource type to legend name if there are more than one type present in the response

* stackdriver: only make new request if filter has real value

* stackdriver: format legend support for resource type

* stackdriver: add resource type to documentation

* stackdriver: not returning promise from query function

* stackdriver: fix refactoring bug

* stackdriver: remove not used import
2018-10-24 11:18:49 +02:00
Mario Trangoni
91447dcbf9 pkg/tsdb/stackdriver/stackdriver.go: Fix regular expression does not contain any meta characters.
See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
pkg/tsdb/stackdriver/stackdriver.go:171:26⚠️ regular expression does not contain any meta characters (SA6004) (megacheck)
2018-10-23 17:26:47 +02:00
Mario Trangoni
bb12a1bc99 pkg/tsdb/graphite/graphite.go: Fix regular expression does not contain any meta characters.
I found this article benchmarking Replace vs Regexp,
https://medium.com/codezillas/golang-replace-vs-regexp-de4e48482f53

See,
$ gometalinter --vendor --deadline 10m --disable-all --enable=megacheck ./...
pkg/tsdb/graphite/graphite.go:167:28⚠️ regular expression does not contain any meta characters (SA6004) (megacheck)
pkg/tsdb/graphite/graphite.go:172:28⚠️ regular expression does not contain any meta characters (SA6004) (megacheck)
2018-10-23 17:26:46 +02:00
Erik Sundell
6abbf5b3b8 stackdriver: refactoring request builder 2018-10-22 16:12:55 +02:00
Erik Sundell
1756e82d8b stackdriver: remove not used struct 2018-10-22 16:12:55 +02:00
Erik Sundell
5b04a8b6c2 stackdriver: remove not used query file 2018-10-22 16:11:17 +02:00
Erik Sundell
1a329e4e47 stackdriver: remove test datasource query. use ensuredefaultproject instead 2018-10-22 16:11:17 +02:00
Erik Sundell
b02a8127ff stackdriver: remove debug comments 2018-10-22 16:11:17 +02:00
Erik Sundell
b2c6c743ce stackdriver: add debug logging 2018-10-22 16:11:17 +02:00
Erik Sundell
3999578300 stackdriver: fix broken braces 2018-10-22 16:11:17 +02:00
Erik Sundell
3935f9d24c stackdriver: use constant instead of variable 2018-10-22 16:11:17 +02:00
Erik Sundell
8b4fff8b87 stackdriver: use gce variable 2018-10-22 16:11:17 +02:00
Erik Sundell
4a51d05477 stackdriver: add variable for gce authentication type 2018-10-22 16:11:17 +02:00
Erik Sundell
b9cb4649bb stackdriver: get default project from backend. also ensure default project could be retrieved when authentication type is gce 2018-10-22 16:11:17 +02:00
Erik Sundell
cd7b454e25 stackdriver: add default value for authentication type 2018-10-22 16:03:14 +02:00
Erik Sundell
823838a839 stackdriver: wip - remove debug code 2018-10-22 16:03:14 +02:00
Erik Sundell
0b82fda49c stackdriver: only get default token from metadata server when applying route 2018-10-22 16:03:14 +02:00
Erik Sundell
dd9e9ed419 stackdriver: make backend query a pure test datasource function 2018-10-22 16:03:13 +02:00
Erik Sundell
9c7022be86 stackdriver: add status code 2018-10-22 16:03:13 +02:00
Erik Sundell
412a1f6d99 stackdriver: wip - return metric descriptors in the format of tablew 2018-10-22 16:03:13 +02:00
Erik Sundell
ff5f281508 stackdriver: wip - get metric descriptors in the backend 2018-10-22 16:03:13 +02:00
Erik Sundell
60617d0bf7 stackdriver: wip - add logic for retrieving token from gce metadata server in the auth provider 2018-10-22 16:03:13 +02:00
Erik Sundell
102f531c1e stackdriver: break out project name resolving into its own function in the stackdriver.go file 2018-10-22 16:03:12 +02:00
Erik Sundell
df215d9d09 stackdriver: WIP - test retrieving project id from gce metadata 2018-10-22 16:03:12 +02:00
Marcus Efraimsson
77f23018a5
Merge pull request #13684 from mtanda/cw_concurrent_map
fix concurrent map writes
2018-10-18 13:41:39 +02:00
Marcus Efraimsson
1d0dee189c
Merge pull request #13705 from Yukinoshita-Yukino/master
Add socket support for mysql data source
2018-10-18 09:45:50 +02:00
Yuan Liu
f640df7a2c
simplify code 2018-10-18 01:45:14 +08:00
Marcus Efraimsson
62f21a254a
Merge pull request #12337 from mtanda/cw_regions
show all CloudWatch regions (avoid hard coding)
2018-10-17 11:55:43 +02:00
Yuan Liu
36dbc5f51c
Add socket support for mysql data source 2018-10-17 17:45:06 +08:00
Marcus Efraimsson
52f398e7f7
cloudwatch: return a distinct list of regions 2018-10-17 10:58:06 +02:00
Ramiro Morales
49a3bd3097 add encrypt connstr param conditionally on the value chosen via GUI. 2018-10-16 13:14:22 -03:00
Mitsuhiro Tanda
fce50cf1b8 return default region list from backend 2018-10-16 12:20:39 +09:00
Mitsuhiro Tanda
f6cb01d38a show all CloudWatch regions 2018-10-16 12:03:33 +09:00
Mitsuhiro Tanda
2b20402d7d get region list from ec2:DescribeRegions 2018-10-16 12:03:33 +09:00
Mitsuhiro Tanda
48aef0c50e fix concurrent map writes 2018-10-16 11:45:58 +09:00
Ramiro Morales
d859a6aeb8 rename new JSON data attrbute. 2018-10-15 20:34:03 -03:00
Ramiro Morales
37f16ca80a Add 'encrypt' setting to MSSQL data source.
Fixes #13629
2018-10-15 14:47:54 -03:00
Mario Trangoni
18e127db2a pkg/tsdb/*: Fix do not pass a nil Context
See,
$ gometalinter --vendor --deadline 6m --disable-all --enable=megacheck ./...
pkg/tsdb/mssql/mssql_test.go:695:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:772:32⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:704:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
2018-10-11 19:03:54 +02:00
Yuan Liu
18dfdc4f0d
add test for es alert when group by has no limit 2018-10-11 16:04:57 +08:00
Yuan Liu
f8a8b213f9
remove tab 2018-10-11 11:40:23 +08:00
Yuan Liu
567db87c3a
bug fix
bug fix
2018-10-11 11:36:40 +08:00
Yuan Liu
3b9ab6e204
Update time_series_query.go
fix alert no data when elasticsearch group by terms size is set to no limit
2018-10-11 11:21:06 +08:00
Marcus Efraimsson
bc3b7357bd
Merge pull request #13400 from connection-reset/concurrent-sql
Run queries for sql data sources for panels with multiple queries concurrently
Also make max open connections, max idle connections and max connection 
lifetime configurable in the data source settings
2018-10-10 19:12:38 +02:00
Marcus Efraimsson
5f69854e2a
Merge pull request #13571 from mtanda/cw_unit
cloudwatch: automatically set graph yaxis unit 

fixes #13575
2018-10-10 09:52:10 +02:00
Marcus Efraimsson
0612ce9b75
cloudwatch: return early if execute query returns error
This will stop a segfault from happening
2018-10-10 09:38:42 +02:00
Mitsuhiro Tanda
f0fb8123ae add test for automatically unit set 2018-10-10 14:07:08 +09:00
Mitsuhiro Tanda
37e749f6da fix crach bug 2018-10-10 13:56:58 +09:00
Daniel Lee
a1d4675169
Merge pull request #13490 from mtanda/stackdriver_distribution
Stackdriver heatmap support. Fixes #13559
2018-10-09 20:57:21 +02:00
Mitsuhiro Tanda
6ed1cbd5bb set unit for CloudWatch GetMetricStatistics result 2018-10-09 17:02:56 +09:00
Erik Sundell
8d53799bcd stackdriver: always use regex full match for =~ and !=~operator 2018-10-08 15:57:31 +02:00
Erik Sundell
7e6a5c0a74 stackdriver: add tests from regex matching 2018-10-08 15:57:30 +02:00
Erik Sundell
a3122a4b85 stackdriver: test build filter string 2018-10-08 15:57:30 +02:00
Erik Sundell
5f7795aa1f stackdriver: test that no interpolation is done when there are no wildcards 2018-10-08 15:57:30 +02:00
Erik Sundell
2a0d7a8803 stackdriver: remove debug logging 2018-10-08 15:57:30 +02:00
Erik Sundell
035be6cbbe stackdriver: add more tests 2018-10-08 15:57:30 +02:00
Erik Sundell
68332c5951 stackdriver: fix broken substring. also adds tests 2018-10-08 15:57:30 +02:00
Erik Sundell
2e665fba0f stackdriver: remove not necessary helper functions 2018-10-08 15:57:30 +02:00
Erik Sundell
4d8f594d31 stackdriver: interpolate stackdriver filter wildcards when asterix is used in filter 2018-10-08 15:57:30 +02:00
Marcus Efraimsson
9ae6f68500
Merge pull request #13498 from svenklemm/sql-macros2
move timeFrom, timeTo, unixEpochFrom and unixEpochTo macros to sql_engine
2018-10-04 15:21:46 +02:00
Marcus Efraimsson
6407ec4128
mssql: fix tests 2018-10-03 11:26:52 +02:00
Mario Trangoni
afab9085eb pkg/tsdb/postgres/postgres_test.go: pass context.Background() instead of nil
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./...
pkg/tsdb/postgres/postgres_test.go:120:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:200:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:257:34⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:282:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:336:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:363:32⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:453:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:475:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:497:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:519:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:541:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:563:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:585:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:607:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:629:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:652:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:677:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:738:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:761:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:787:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:817:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:847:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:877:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:905:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/postgres/postgres_test.go:933:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
2018-10-03 10:32:51 +02:00
Mario Trangoni
3632e9c756 pkg/tsdb/mysql/mysql_test.go: pass context.Background() instead of nil
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./...
pkg/tsdb/mysql/mysql_test.go:132:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:220:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:267:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:330:34⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:355:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:381:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:476:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:498:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:520:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:542:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:564:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:586:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:608:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:630:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:652:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:674:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:696:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:719:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:744:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:805:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:828:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:854:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:884:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:914:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:944:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:972:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mysql/mysql_test.go:1000:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
2018-10-03 10:24:06 +02:00
Mario Trangoni
0f25dec117 pkg/tsdb/mssql/mssql_test.go: pass context.Background() instead of nil
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./...
pkg/tsdb/mssql/mssql_test.go:131:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:221:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:268:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:330:34⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:355:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:444:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:466:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:488:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:510:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:532:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:554:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:576:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:598:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:620:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:643:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:666:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:742:34⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:819:34⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:895:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:918:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:944:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:974:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:1004:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:1034:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:1062:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/mssql/mssql_test.go:1090:33⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
2018-10-03 10:22:26 +02:00
Sven Klemm
e303468c0c adjust mssql tests 2018-10-03 10:21:16 +02:00
Mario Trangoni
88efb87b0d pkg/tsdb/elasticsearch/client/client_test.go: pass context.Background() instead of nil
See,
$ gometalinter --vendor --disable-all --enable=megacheck --disable=gotype --deadline 6m ./...
pkg/tsdb/elasticsearch/client/client_test.go:28:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/elasticsearch/client/client_test.go:39:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/elasticsearch/client/client_test.go:51:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/elasticsearch/client/client_test.go:63:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/elasticsearch/client/client_test.go:76:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
pkg/tsdb/elasticsearch/client/client_test.go:89:25⚠️ do not pass a nil Context, even if a function permits it; pass context.TODO if you are unsure about which Context to use (SA1012) (megacheck)
2018-10-03 09:59:10 +02:00
Sven Klemm
af22213462 remove generic macros from macros_test and add integration test for generic macros 2018-10-03 09:46:17 +02:00
Sven Klemm
744e8617ff add postgres test for global macros 2018-10-03 09:35:42 +02:00
Mitsuhiro Tanda
c2c0cdb49c add test 2018-10-03 16:27:11 +09:00
Mitsuhiro Tanda
6770f2e940 stackdriver heatmap support 2018-10-03 16:27:04 +09:00
Torkel Ödegaard
ed0c2296b6 added slow queries scenario to test data source, added new panel test dashboard with slow queries 2018-10-02 13:00:54 -07:00
Sven Klemm
94d6d51726 move timeFrom, timeTo, unixEpochFrom and unixEpochTo macros to sql_engine 2018-10-02 20:19:34 +02:00
Torkel Ödegaard
9e72588cec wip: began work on support for testdata tables & annotations support 2018-10-02 18:50:30 +02:00
Marcus Efraimsson
3932e4db5a
Merge remote-tracking branch 'origin/master' into concurrent-sql 2018-10-02 17:44:33 +02:00
Axel Pirek
dd09ece8c9 Make max open, max idle connections and connection max life time configurable 2018-10-02 13:42:06 +02:00
Mario Trangoni
6c190ab713 pkg/tsdb/cloudwatch/credentials.go: Remove unnecessary variable assignment
See,
pkg/tsdb/cloudwatch/credentials.go:45:2⚠️ should merge variable declaration with assignment on next line (S1021) (megacheck)
2018-10-01 18:24:00 +02:00
Mario Trangoni
ec4139d56b pkg/tsdb/stackdriver/stackdriver_test.go: return simplified
See,
pkg/tsdb/stackdriver/stackdriver_test.go:356:2⚠️ 'if err != nil { return data, err }; return data, nil' can be simplified to 'return data, err'
2018-10-01 18:24:00 +02:00
Daniel Lee
bf2abc6940 stackdriver: set default view parameter to FULL 2018-09-29 23:45:28 +02:00
Daniel Lee
399e83f91b stackdriver: remove metric.category alias pattern
After discussions with the Stackdriver team, they did not think this was
needed.
2018-09-28 17:16:35 +02:00
Daniel Lee
9b90b835b2 Merge remote-tracking branch 'origin/master' into stackdriver-plugin 2018-09-28 16:20:40 +02:00
Daniel Lee
41060d24d5 stackdriver: change pattern for annotation to metric.value 2018-09-28 16:16:27 +02:00
Erik Sundell
189f89a9e4 stackdriver: add support for bool values 2018-09-28 15:42:02 +02:00
Erik Sundell
220f479ff8 stackdriver: add support for int64 values 2018-09-28 15:27:28 +02:00
Erik Sundell
2aae7e0c87 stackdriver: fix froamt annotation text for value 2018-09-28 13:50:10 +02:00
Erik Sundell
ca50e315fa stackdriver: make it possible to use point values of type string 2018-09-28 13:41:28 +02:00
Steve Kreitzer
55e4db5cfc Adding AWS Isolated Regions 2018-09-27 19:58:07 -04:00
Daniel Lee
a63877bd4f stackdriver: pattern formatting for annotations 2018-09-27 16:18:48 +02:00
Daniel Lee
03b43ab769 stackdriver: wip annotation support 2018-09-27 15:18:10 +02:00
Erik Sundell
c099074d2c stackdriver: remove debug logging 2018-09-27 10:41:51 +02:00
Erik Sundell
0507ff69fb stackdriver: resolve merge conflict 2018-09-27 10:32:30 +02:00
Erik Sundell
481b8653d9 stackdriver: update alignment period rules according to stackdriver 2018-09-27 10:20:01 +02:00
Daniel Lee
6358d3f314 stackdriver: set target to be raw query 2018-09-27 10:14:10 +02:00
Erik Sundell
3c6c456592 stackdriver: use more appropriate test data 2018-09-27 09:19:24 +02:00
Erik Sundell
284d0b7edf Merge branch 'stackdriver-plugin' of https://github.com/grafana/grafana into stackdriver-plugin 2018-09-26 18:04:30 +02:00
Erik Sundell
75a2ea5c71 stackdriver: fix broken test 2018-09-26 18:04:04 +02:00
Daniel Lee
66c95991c1 Merge remote-tracking branch 'origin/master' into stackdriver-plugin 2018-09-26 17:59:56 +02:00
Erik Sundell
ed6d3bf6ed stackdriver: WIP - implement stackdriver style auto alignment period. also return the used alignment period and display it in the query editor 2018-09-26 17:50:08 +02:00
Erik Sundell
af9033f3e0 stackdriver: distinct grafana auto from stackdriver auto in alignment period 2018-09-26 15:44:09 +02:00
Erik Sundell
13c68e6ed8 stackdriver: use correct name for variable 2018-09-26 15:37:29 +02:00
Erik Sundell
49cd31ab78 stackdriver: get value type and metric kind from metric descriptor instead of from latest metric result 2018-09-26 11:17:24 +02:00
Erik Sundell
b6a918ba79 stackdriver: merge commit 2018-09-25 15:13:24 +02:00
Erik Sundell
b700c6b0e4 stackdriver: populate alignment and aggregation dropdowns based on metric type and value type 2018-09-25 09:34:14 +02:00
Daniel Lee
4777689f29 stackdriver: skeleton for more query types on the backend 2018-09-24 16:02:35 +02:00
Axel Pirek
e35f06b938 Run all sql data source queries for one panel concurrently 2018-09-24 14:53:39 +02:00
Daniel Lee
681cd7496e stackdriver: alias patterns WIP
This is using the {{}} syntax for alias patterns. Might
switch to the  syntax instead.
2018-09-23 22:04:24 +02:00
Mario Trangoni
0870464ea5 Fix goconst issues
See,
$ gometalinter --vendor --disable-all --enable=goconst --disable=gotype --deadline=6m ./...
build.go:113:15⚠️ 2 other occurrence(s) of "linux" found in: build.go:119:15 build.go:491:34 (goconst)
build.go:119:15⚠️ 2 other occurrence(s) of "linux" found in: build.go:113:15 build.go:491:34 (goconst)
build.go:491:34⚠️ 2 other occurrence(s) of "linux" found in: build.go:113:15 build.go:119:15 (goconst)
build.go:381:21⚠️ 2 other occurrence(s) of "windows" found in: build.go:423:13 build.go:487:13 (goconst)
build.go:423:13⚠️ 2 other occurrence(s) of "windows" found in: build.go:381:21 build.go:487:13 (goconst)
build.go:487:13⚠️ 2 other occurrence(s) of "windows" found in: build.go:381:21 build.go:423:13 (goconst)
pkg/api/dashboard.go:67:22⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:35 pkg/api/dashboard.go:131:10 pkg/api/dashboard.go:406:13 pkg/api/folder.go:98:22 pkg/api/folder.go:98:35 (goconst)
pkg/api/dashboard.go:67:35⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:22 pkg/api/dashboard.go:131:10 pkg/api/dashboard.go:406:13 pkg/api/folder.go:98:22 pkg/api/folder.go:98:35 (goconst)
pkg/api/dashboard.go:131:10⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:22 pkg/api/dashboard.go:67:35 pkg/api/dashboard.go:406:13 pkg/api/folder.go:98:22 pkg/api/folder.go:98:35 (goconst)
pkg/api/dashboard.go:406:13⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:22 pkg/api/dashboard.go:67:35 pkg/api/dashboard.go:131:10 pkg/api/folder.go:98:22 pkg/api/folder.go:98:35 (goconst)
pkg/api/folder.go:98:22⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:22 pkg/api/dashboard.go:67:35 pkg/api/dashboard.go:131:10 pkg/api/dashboard.go:406:13 pkg/api/folder.go:98:35 (goconst)
pkg/api/folder.go:98:35⚠️ 5 other occurrence(s) of "Anonymous" found in: pkg/api/dashboard.go:67:22 pkg/api/dashboard.go:67:35 pkg/api/dashboard.go:131:10 pkg/api/dashboard.go:406:13 pkg/api/folder.go:98:22 (goconst)
pkg/api/index.go:63:47⚠️ 2 other occurrence(s) of "light" found
in: pkg/api/index.go:91:22 pkg/api/index.go:93:16 (goconst)
pkg/api/index.go:91:22⚠️ 2 other occurrence(s) of "light" found in: pkg/api/index.go:63:47 pkg/api/index.go:93:16 (goconst)
pkg/api/index.go:93:16⚠️ 2 other occurrence(s) of "light" found in: pkg/api/index.go:63:47 pkg/api/index.go:91:22 (goconst)
pkg/components/null/float.go:71:25⚠️ 2 other occurrence(s) of "null" found in: pkg/components/null/float.go:103:10 pkg/components/null/float.go:112:10 (goconst)
pkg/components/null/float.go:103:10⚠️ 2 other occurrence(s) of "null" found in: pkg/components/null/float.go:71:25 pkg/components/null/float.go:112:10 (goconst)
pkg/components/null/float.go:112:10⚠️ 2 other occurrence(s) of "null" found in: pkg/components/null/float.go:71:25 pkg/components/null/float.go:103:10 (goconst)
pkg/services/alerting/notifiers/pagerduty.go:79:16⚠️ 2 other occurrence(s) of "Triggered metrics:\n\n" found in: pkg/services/alerting/notifiers/kafka.go:64:16 pkg/services/alerting/notifiers/opsgenie.go:98:16 (goconst)
pkg/services/alerting/notifiers/kafka.go:64:16⚠️ 2 other occurrence(s) of "Triggered metrics:\n\n" found in: pkg/services/alerting/notifiers/pagerduty.go:79:16 pkg/services/alerting/notifiers/opsgenie.go:98:16 (goconst)
pkg/services/alerting/notifiers/opsgenie.go:98:16⚠️ 2 other occurrence(s) of "Triggered metrics:\n\n" found in: pkg/services/alerting/notifiers/pagerduty.go:79:16 pkg/services/alerting/notifiers/kafka.go:64:16 (goconst)
pkg/social/social.go:85:11⚠️ 2 other occurrence(s) of "grafana_com" found in: pkg/social/social.go:162:14 pkg/social/social.go:197:11 (goconst)
pkg/social/social.go:162:14⚠️ 2 other occurrence(s) of "grafana_com" found in: pkg/social/social.go:85:11 pkg/social/social.go:197:11 (goconst)
pkg/social/social.go:197:11⚠️ 2 other occurrence(s) of "grafana_com" found in: pkg/social/social.go:85:11 pkg/social/social.go:162:14 (goconst)
pkg/tsdb/elasticsearch/time_series_query.go:92:17⚠️ 3 other occurrence(s) of "count" found in: pkg/tsdb/elasticsearch/response_parser.go:152:8 pkg/tsdb/elasticsearch/response_parser.go:167:31 pkg/tsdb/elasticsearch/response_parser.go:315:9 (goconst)
pkg/tsdb/elasticsearch/response_parser.go:152:8⚠️ 3 other occurrence(s) of "count" found in: pkg/tsdb/elasticsearch/time_series_query.go:92:17 pkg/tsdb/elasticsearch/response_parser.go:167:31 pkg/tsdb/elasticsearch/response_parser.go:315:9 (goconst)
pkg/tsdb/elasticsearch/response_parser.go:167:31⚠️ 3 other occurrence(s) of "count" found in: pkg/tsdb/elasticsearch/time_series_query.go:92:17 pkg/tsdb/elasticsearch/response_parser.go:152:8 pkg/tsdb/elasticsearch/response_parser.go:315:9 (goconst)
pkg/tsdb/elasticsearch/response_parser.go:315:9⚠️ 3 other occurrence(s) of "count" found in: pkg/tsdb/elasticsearch/time_series_query.go:92:17 pkg/tsdb/elasticsearch/response_parser.go:152:8 pkg/tsdb/elasticsearch/response_parser.go:167:31 (goconst)
pkg/tsdb/elasticsearch/time_series_query.go:78:9⚠️ 2 other occurrence(s) of "date_histogram" found in: pkg/tsdb/elasticsearch/response_parser.go:84:22 pkg/tsdb/elasticsearch/response_parser.go:369:24 (goconst)
pkg/tsdb/elasticsearch/response_parser.go:84:22⚠️ 2 other occurrence(s) of "date_histogram" found in: pkg/tsdb/elasticsearch/time_series_query.go:78:9 pkg/tsdb/elasticsearch/response_parser.go:369:24 (goconst)
pkg/tsdb/elasticsearch/response_parser.go:369:24⚠️ 2 other occurrence(s) of "date_histogram" found in: pkg/tsdb/elasticsearch/time_series_query.go:78:9 pkg/tsdb/elasticsearch/response_parser.go:84:22 (goconst)
2018-09-23 21:19:21 +02:00
Mario Trangoni
80fa66fcb0 Fix some typos found by codespell
See,
$ codespell -S "./.git*,./vendor*,./public*"
2018-09-21 11:54:52 +02:00
Mario Trangoni
3689bb778c Fix misspell issues
See,
$ gometalinter --disable-all --enable misspell --deadline 10m --vendor ./...
pkg/api/dtos/alerting_test.go:32:13⚠️ "expectes" is a misspelling of "expects" (misspell)
pkg/api/static/static.go:2:18⚠️ "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/components/imguploader/azureblobuploader.go:55:48⚠️ "conatiner" is a misspelling of "container" (misspell)
pkg/login/ldap_settings.go:51:115⚠️ "compatability" is a misspelling of "compatibility" (misspell)
pkg/middleware/auth_proxy_test.go:122:22⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/middleware/logger.go:2:18⚠️ "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/services/notifications/codes.go:9:13⚠️ "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/services/session/mysql.go:170:3⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/mysql.go:171:24⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/session.go:95:4⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/session.go:96:1⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/services/session/session.go:167:25⚠️ "Destory" is a misspelling of "Destroy" (misspell)
pkg/setting/setting.go:1:18⚠️ "Unknwon" is a misspelling of "Unknown" (misspell)
pkg/tsdb/cloudwatch/cloudwatch.go:199:14⚠️ "resolutin" is a misspelling of "resolutions" (misspell)
pkg/tsdb/cloudwatch/cloudwatch.go:270:15⚠️ "resolutin" is a misspelling of "resolutions" (misspell)
pkg/tsdb/elasticsearch/response_parser.go:531:24⚠️ "Unkown" is a misspelling of "Unknown" (misspell)
pkg/tsdb/elasticsearch/client/search_request.go:113:7⚠️ "initaite" is a misspelling of "initiate" (misspell)

Note: Unknwon is a library name, and Destory a mysql typo.
2018-09-21 11:54:36 +02:00
Torkel Ödegaard
040095b5a8 fix: use same User-Agent header as in other places in grafana when making external requests 2018-09-21 11:35:55 +02:00
Torkel Ödegaard
c282f39121 Merge branch 'master' into stackdriver-plugin 2018-09-21 10:17:13 +02:00
Daniel Lee
ddee919edc stackdriver: remove WIP tests 2018-09-20 20:34:16 +02:00
Mario Trangoni
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
Mario Trangoni
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
Daniel Lee
8211f7d0ea stackdriver: add templating support for metric, filter and group by
Still have to figure out if we should have templating for aggregation
fields
2018-09-20 11:44:17 +02:00
Daniel Lee
8d1f293676 stackdriver: use group by fields to create default alias 2018-09-20 00:52:14 +02:00
Mario Trangoni
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
Daniel Lee
408d4bda95 stackdriver: add custom User-Agent header 2018-09-18 16:07:14 +02:00
Daniel Lee
e05b86375b stackdriver: remove hardcoding of test project name 2018-09-18 16:02:38 +02:00
Erik Sundell
edf38f040d stackdriver: making sure we dont pass too big alignmentPeriods to the stackdriver api 2018-09-17 17:13:06 +02:00
Erik Sundell
f839d12de4 stackdriver: fix broken tests 2018-09-17 16:33:38 +02:00
Erik Sundell
109f00f584 stackdriver: adds default value for alignment period 2018-09-17 16:33:10 +02:00
Erik Sundell
71b1f7f8fd stackdriver: use alignment period that is passed from frontend. if set to auto, use value provided from the panel. also added tests for alignment period 2018-09-17 16:30:06 +02:00
Erik Sundell
73dc7bddd0 stackdriver: use alignment that is passed from frontend in the query 2018-09-17 14:34:18 +02:00
Daniel Lee
669a1029ed stackdriver: type rename 2018-09-14 17:46:42 +02:00
Daniel Lee
8b72853d36 stackdriver: add support for filtering to backend 2018-09-14 16:20:51 +02:00
Daniel Lee
d0a565d853 stackdriver: improve segments for group bys in query editor 2018-09-14 09:39:17 +02:00
Erik Sundell
add23d9716 stackdriver: load time series meta data for group by dropdown 2018-09-14 09:39:17 +02:00
Erik Sundell
5763d3cae2 stackdriver: make sure distinct labels are returned. also added test 2018-09-14 09:39:17 +02:00
Daniel Lee
9c8593e71f stackdriver: wip - group bys 2018-09-14 09:39:16 +02:00
Daniel Lee
df6b430405 stackdriver: reverse points array to be in ascending order 2018-09-14 09:38:16 +02:00
Daniel Lee
f4fe26c659 stackdriver: adds support for primary aggregations
WIP: Hardcoded values for the aligner and alignment period. Need
to set the aligment period to the closest min interval and
research the aligner more.
2018-09-14 09:38:16 +02:00
Daniel Lee
0b5783563e stackdriver: better error handling and show query metadata
If the Stackdriver returns an error, show that error in the query
editor. Also, allow the user to see the raw querystring that was sent
to google (for troubleshooting).
2018-09-14 09:38:16 +02:00
Daniel Lee
2683699ab4 stackdriver: tests for parsing api response 2018-09-14 09:38:16 +02:00
Daniel Lee
54f16d5558 stackdriver: add first test for parsing frontend queries 2018-09-14 09:38:16 +02:00
Erik Sundell
1288860058 Stackdriver: Break out parse response to its own func 2018-09-14 09:38:16 +02:00
Erik Sundell
56e8e50497 Stackdriver: Use ds_auth_provider in stackdriver. This will make sure the token is renewed when it has exporired 2018-09-14 09:38:16 +02:00
Erik Sundell
7f99a14c58 Stackdriver: Parsed url params 2018-09-14 09:38:16 +02:00
Erik Sundell
c8ec3a345c Stackdriver: Parse datapoints correctly 2018-09-14 09:38:16 +02:00