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
Erik Sundell
1fe70f8290
Stackdriver: Load example metric and start parsing response
2018-09-14 09:38:16 +02:00
Erik Sundell
9ee61b6606
Add stackdriver backend skeleton
2018-09-14 09:33:50 +02:00
Sven Klemm
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
Mitsuhiro Tanda
28250271cc
fix nil pointer dereference ( #13221 )
2018-09-11 12:53:39 +02:00
Marcus Efraimsson
313a8bd033
Merge pull request #12891 from svenklemm/unixepochgroup
...
add $__unixEpochGroup and $__unixEpochGroupAlias to sql datasources
2018-08-17 14:41:33 +02:00
Marcus Efraimsson
74077be19e
Merge pull request #12680 from svenklemm/timebucket
...
[postgres] add timescaledb option to postgres datasource
2018-08-14 12:12:43 +02:00
Sven Klemm
837388d13e
Use variable in newPostgresMacroEngine
2018-08-14 09:44:58 +02:00
Sven Klemm
3955133f7e
Don't pass datasource to newPostgresMacroEngine
2018-08-14 09:15:24 +02:00
Sven Klemm
3552a4cb86
refactor timescaledb handling in MacroEngine
2018-08-14 08:47:33 +02:00
Sven Klemm
8c4d59363e
add $__unixEpochGroup to mssql datasource
2018-08-13 12:23:42 +02:00
Sven Klemm
fbc67a1c64
add $__unixEpochGroup to mysql datasource
2018-08-13 12:17:05 +02:00
Sven Klemm
bfe28ee061
Add $__unixEpochGroup macro to postgres datasource
2018-08-13 12:08:14 +02:00
Sven Klemm
d81a23becf
Refactor setting fillmode
...
This adds SetupFillmode to the tsdb package to be used by the sql
datasources.
2018-08-12 10:51:58 +02:00
Sven Klemm
d2984f3b0f
fix rebase error
2018-08-09 10:14:14 +02:00
Sven Klemm
c3aad10047
change timescaledb to checkbox instead of select
2018-08-09 10:05:35 +02:00
Sven Klemm
b987aee7cf
add timescaledb option to postgres datasource
...
This adds an option to the postgres datasource config for
timescaledb support. When set to auto it will check for
timescaledb when testing the datasource.
When this option is enabled the $__timeGroup macro will
use the time_bucket function from timescaledb to group
times by an interval.
This also passes the datasource edit control to testDatasource
to allow for setting additional settings, this might be useful
for other datasources aswell which have optional or version
dependant features which can be queried.
2018-08-09 10:05:35 +02:00
Sven Klemm
ee7602ec1f
change fillmode from last to previous
2018-08-07 21:01:41 +02:00
Sven Klemm
bfc66a7ed0
add fillmode "last" to sql datasource
...
This adds a new fill mode last (last observation carried forward) for grafana
to the sql datasources. This fill mode will fill in the last seen value in a
series when a timepoint is missing or NULL if no value for that series has
been seen yet.
2018-08-02 20:35:09 +02:00
Marcus Efraimsson
5cca478656
Merge pull request #12760 from svenklemm/postgres-timegroup
...
remove alias from postgres $__timeGroup macro
add $__timeGroupAlias macro to all sql datasources
2018-08-02 16:36:01 +02:00
Marcus Efraimsson
4962bf9d44
remove info logging
2018-08-02 15:49:50 +02:00
Alban Perillat-Merceroz
f3d400f1a7
Add new Redshift metrics and dimensions for Cloudwatch datasource
...
AWS/Redshift has new dimensions (`latency`, `service class`, `wmlid`) and metrics (`QueriesCompletedPerSecond`, `QueryRuntimeBreakdown`, `QueryDuration`, `WLMQueriesCompletedPerSecond`, `WLMQueryDuration`, `WLMQueueLength`) in Cloudwatch: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/rs-metricscollected.html
2018-08-02 14:45:24 +02:00
Sven Klemm
b71d10a7a4
add $__timeGroupAlias to mysql and mssql
2018-08-01 20:58:51 +02:00
Sven Klemm
dc22e24642
add compatibility code to handle pre 5.3 usage
2018-08-01 15:06:18 +02:00
Marcus Efraimsson
951679d50b
Merge pull request #12561 from activeshadow/aws-rds-burst-balance
...
Added BurstBalance metric to list of AWS RDS metrics.
2018-08-01 12:28:15 +02:00
Sven Klemm
42f1892826
Add $__timeGroupAlias to postgres macros
2018-08-01 09:03:34 +02:00
Sven Klemm
43295f9c18
remove alias from postgres $__timeGroup macro
2018-08-01 08:50:19 +02:00
Marcus Efraimsson
dfda51a9be
Merge pull request #12762 from sohonet/add_cloudwatch_aws_dx
...
add AWS/DX metrics and dimension to cloudwatch
2018-07-31 17:58:32 +02:00
Marcus Efraimsson
3cecc0b54e
Merge pull request #12301 from franciscocpg/cloudwatch-app-sync
...
Adding Cloudwatch AWS/AppSync metrics and dimensions
2018-07-31 11:38:31 +02:00
Jason Pereira
88d8072be3
add aws_dx to cloudwatch datasource
2018-07-30 15:51:15 +01:00
Marcus Efraimsson
38a52c2489
mssql: update tests
2018-07-30 13:50:52 +02:00
Marcus Efraimsson
e32cf75c2d
fix usage of metric column types so that you don't need to specify metric alias
2018-07-30 13:50:18 +02:00
Sven Klemm
3aa4790979
add tests for metric column prefix to mssql
2018-07-27 18:13:19 +02:00
Sven Klemm
e487fabcd5
add metric column prefix test for mysql
2018-07-27 17:59:59 +02:00
Sven Klemm
7905c29875
adjust metric prefix code to sql engine refactor
2018-07-27 15:34:04 +02:00
Sven Klemm
f9d6c88a55
add testcase for metric column as prefix
2018-07-27 15:32:54 +02:00
Marcus Efraimsson
02ba467bf1
Merge pull request #12730 from marefr/sql_refactor
...
SQL datasources - backend refactor
2018-07-27 14:13:19 +02:00
Marcus Efraimsson
e43feb7bfa
use const for rowlimit in sql engine
2018-07-27 13:21:40 +02:00
Marcus Efraimsson
ab8fa0de74
elasticsearch: support reversed index patterns
...
Now both [index-]pattern and pattern[-index] are supported
2018-07-26 21:39:02 +02:00
Marcus Efraimsson
4f7882cda2
mssql: use new sql engine
2018-07-26 18:11:10 +02:00
Marcus Efraimsson
27db454012
mysql: use new sql engine
2018-07-26 18:10:45 +02:00
Marcus Efraimsson
2f3851b915
postgres: use new sql engine
2018-07-26 18:10:17 +02:00
Marcus Efraimsson
d42cea5d42
refactor sql engine to make it hold all common code for sql datasources
2018-07-26 18:09:42 +02:00
Mitsuhiro Tanda
055d208a32
fix invalid reference
2018-07-25 11:27:43 +09:00
Marcus Efraimsson
e921f3b673
Merge pull request #12698 from mtanda/cw_400_err
...
CloudWatch backend return 400 if user input error
2018-07-24 16:43:22 +02:00
Marcus Efraimsson
05da21c6d7
Merge pull request #12678 from yogyrahmawan/escape_postgres_parameters
...
postgres; escape ssl mode parameter
2018-07-24 11:15:21 +02:00
Marcus Efraimsson
93e73919e8
fix code style
2018-07-24 11:03:46 +02:00
Mitsuhiro Tanda
d9bf894383
return 400 if user input error
2018-07-24 17:06:55 +09:00
Daniel Lee
5129ea8f87
Merge pull request #11624 from mtanda/cw_get_metric_data
...
CloudWatch GetMetricData support
2018-07-22 21:34:07 +02:00
yogyrahmawan
26aa575cb4
escaping ssl mode on postgres param
2018-07-22 08:04:57 +07:00
Torkel Ödegaard
e413f026b9
fix: postgres/mysql engine cache was not being used, fixes #12636 ( #12642 )
2018-07-18 07:21:32 -07:00
Torkel Ödegaard
c6bcf13d78
Devenv testdata dashboards ( #12615 )
...
* devenv: working on dev env setup & dashboards
* devenv: refactored testdata app to a built in datasource instead, and moved dashboards to a devenv provisioned dashboards
2018-07-16 03:12:13 -07:00
Bryan T. Richardson
daf0c374b3
Added BurstBalance metric to list of AWS RDS metrics.
2018-07-10 10:11:39 -06:00
yogy rahmawan
8b32dc5847
move go vet out of scripts and fixing warning ( #12552 )
2018-07-09 23:25:32 -07:00
Mitsuhiro Tanda
77220456b6
improve error message
2018-07-09 13:11:50 +09:00
Mitsuhiro Tanda
40ed235b3b
support GetMetricData
2018-07-09 13:11:50 +09:00
Marcus Efraimsson
d90d4ce55d
Merge pull request #12402 from AustinWinstanley/macros/sql
...
mysql,mssql: improve $__timeFilter, $__timeFrom, $__timeTo macros
The $__timeFilter macro now uses a BETWEEN with timestamps instead of
comparing epochs
The $__timeFrom and $__timeTo macros now return strings of format
YYYY-MM-DDThh:mm:ssZ instead of epoch
2018-07-04 20:01:43 +02:00
Marcus Efraimsson
d2f31a716f
remove unnecessary conversions
2018-07-04 12:16:39 +02:00
Sven Klemm
1601f6d17c
[mysql] fix $__timeGroup rounding ( #12469 )
...
* fix $__timeGroup rounding for mysql
* revert accidentally commented out line
2018-07-01 06:59:05 -07:00
Sven Klemm
f017c04a65
[mssql] fix $__timeGroup rounding ( #12470 )
...
* fix $__timeGroup rounding for mssql
* revert enabling of mssql integration tests
2018-07-01 06:57:02 -07:00
Sven Klemm
c2c22c142b
[postgres] fix timeGroup macro rounding ( #12468 )
...
* fix timeGroup tests to check for correct grouping
* do explicit floor rounding in $__timeGroup macro
* fix typo in comments
2018-07-01 06:55:46 -07:00
Austin Winstanley
a0e8437f8f
Used PostgreSQL TSDB as a model the set up the __timeFilter, __timeFrom, and __timeTo macros for Microsoft SQL and MySQL
2018-06-29 03:48:14 +00:00
Austin Winstanley
105b3d6804
Switched MySQL and MSSQL macros for timeFilter and related to use BETWEEN and calculate UNIX time server side instead of database side. Fixes #11618 #11619
2018-06-25 20:11:58 +00:00
Marcus Efraimsson
c02dd7462a
cloudwatch: handle invalid time range
2018-06-15 15:48:25 +02:00
Francisco Guimarães
acdc2bf100
Adding Cloudwatch AWS/AppSync metrics and dimensions
2018-06-15 10:11:32 -03:00
bergquist
c63533f004
tests: rewrite into table tests
2018-06-14 20:33:36 +02:00
bergquist
bf4ee9bcc6
influxdb: adds mode func to backend
...
closes #12286
2018-06-14 20:33:22 +02:00
Sławek Piotrowski
9db964bf35
Fix typo: eleasticsearch -> elasticsearch ( #12184 )
2018-06-06 13:09:16 -07:00
Marcus Efraimsson
38906acda9
elasticsearch: sort bucket keys to fix issue wth response parser tests
2018-06-04 15:15:47 +02:00
Marcus Efraimsson
b8ff3b1e3f
remove dead code
2018-05-31 19:05:32 +02:00
Marcus Efraimsson
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
Marcus Efraimsson
28f0acd854
Merge branch 'master' into feature/add_es_alerting
2018-05-31 16:33:07 +02:00
Leonard Gram
50d1519a91
build: mysql integration testing on ci.
2018-05-30 16:27:47 +02:00
Kim Christensen
48fc5edda1
Support InfluxDB count distinct aggregation ( #11658 )
...
influxdb: support count distinct aggregation
2018-05-30 09:22:16 +02:00
Marcus Efraimsson
048ac3089b
Merge branch 'master' into feature/add_es_alerting
2018-05-29 14:36:52 +02:00
Christophe Le Guern
3ba3fd9a59
Add new regions to handleGetRegions function ( #12082 )
...
As public/app/plugins/datasource/cloudwatch/partials/config.html and this file differ between the AWS regions available, I've updated the latest so they share the same data.
In that way, the regions() method in dashboards returns the same list as the frontend does.
2018-05-29 14:26:33 +02:00
Leonard Gram
e6f2811b21
sql: seconds epochs are now correctly converted to ms.
...
Closes #12061
2018-05-29 08:44:03 +02:00
Marcus Efraimsson
4752d7884a
elasticsearch: adds some more/better debug logging to client
2018-05-25 10:31:56 +02:00
Marcus Efraimsson
16c3566a87
elasticsearch: handle NaN values
2018-05-23 22:57:46 +02:00
Marcus Efraimsson
688f5b830c
elasticsearch: metric and pipeline agg setting json encoding fix
2018-05-23 22:21:41 +02:00
Marcus Efraimsson
4436b8da12
elasticsearch: query interval override fix
2018-05-23 22:07:52 +02:00
Marcus Efraimsson
8870e3e85b
elasticsearch: default interval fix
...
5s instead of 15s
2018-05-23 21:44:09 +02:00
Marcus Efraimsson
242689abe2
elasticsearch: pipeline aggregation fix for json encoding
2018-05-23 16:46:26 +02:00
Marcus Efraimsson
dce59ccff2
fix: remove deadcode to make gometalinter happy
2018-05-23 15:28:36 +02:00