Commit Graph

1856 Commits

Author SHA1 Message Date
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