Commit Graph

807 Commits

Author SHA1 Message Date
Jeet Parekh
c73a0007c7
CloudWatch: updated namespaces - Athena, DocDB, and Route53Resolver (#22604) 2020-03-06 10:41:29 +02:00
Daniel Lee
f95c8b785c
Stackdriver: Migrate GCE default project (#22593)
* Ensure default project

* Remove debug logging

* Fix broken test

* Update snapshot
2020-03-05 17:53:41 +01:00
Erik Sundell
0f8cfca4e6
surround CloudWatch dimension names with double quotes (#22222) 2020-03-05 14:15:45 +01:00
Erik Sundell
934a8f08ae
Stackdriver: Project selector (#22447)
* clean PR #17366

* udpate vendor

* [WIP] Implement projects management for stackdriver

* [WIP] Implement projects management for stackdriver

* [WIP] Implement projects management for stackdriver

* Implement projects management for stackdriver

* [WIP][Tests] Fix errors

* clean anonymous struct

* remove await

* don't store project list

* Add default project on query editor

* gofmt

* Fix tests

* Move test data source to backend

* Use segment instead of dropdown. remove ensure default project since it's not being used anymore.

* Fix broken annotation editor

* Load gceDefaultAccount only once when in the config page

* Reset error message on auth type change

* Add metric find query for projects

* Remove debug code

* Fix broken tests

* Fix typings

* Fix lint error

* Slightly different approach - now having a distiction between config page default project, and project that is selectable from the dropdown in the query editor.

* Fix broken tests

* Attempt to fix strict ts errors

* Prevent state from being set multiple times

* Remove noOptionsMessage since it seems to be obosolete in react select

* One more attempt to solve ts strict error

* Interpolate project template variable. Make sure its loaded correctly when opening variable query editor first time

* Implicit any fix

* fix: typescript strict null check fixes

* Return empty array in case project endpoint fails

* Rename project to projectName to prevent clashing with legacy query prop

* Fix broken test

* fix: Stackdriver - template replace on filter label

should have a regex format as that escapes the dots
in the label name which is not valid.

Co-authored-by: Labesse Kévin <kevin@labesse.me>
Co-authored-by: Elias Cédric Laouiti <elias@abtasty.com>
Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
2020-03-02 09:31:09 -05:00
Martin Passing
90541d3084
add CloudWatch Usage Metrics (#22179)
https://docs.amazonaws.cn/en_us/AmazonCloudWatch/latest/monitoring/CloudWatch-Usage-Metrics.html
2020-02-16 18:07:28 +01:00
Erik Sundell
685c9043a8
CloudWatch: Auto period snap to next higher period (#21659)
* Snap to next higher period instead of closest

* Adjust period calc
2020-01-22 13:43:36 +01:00
kenju
935d447c6a CloudWatch: Add DynamoDB Accelerator (DAX) metrics & dimensions (#21644)
Closes #10494
2020-01-21 15:19:39 +01:00
Ryan McKinley
5f14d62c0d
TestData: allow negative values for random_walk parameters (#21627) 2020-01-20 10:50:42 -08:00
Erik Sundell
a1733bb412
CloudWatch: Expand dimension value in alias correctly (#21626)
* Make sure dimension value is being returned, and not just label

* Fix typo
2020-01-20 18:51:32 +01:00
Torkel Ödegaard
2732aca05c
TestData: Adds important new features to the random walk scenario (#21613)
* test data refactor

* new random walk options

* fixed test

* Added automatic names
2020-01-20 12:42:42 +01:00
Marcus Efraimsson
59469e14cf
CloudWatch: Fix ordering of map to resolve flaky test take 2 (#21577) 2020-01-17 16:30:42 +01:00
Marcus Efraimsson
303bbb9900
CloudWatch: Fix ordering of map to resolve flaky test (#21572) 2020-01-17 15:27:03 +01:00
Erik Sundell
8616f1beac Chore: Fix go vet problem (#21568) 2020-01-17 13:48:09 +01:00
Erik Sundell
d40b66f1c1
CloudWatch: Calculate period based on time range (#21471)
* Calculate min period based on time range and no of queries

* Use hardcoded array of periods if period is not defined actively by the user

* Fix broken tests

* Use a smaller max period for auto interval

* Fix broken tests

* Test period calculation

* Test min retention period

* Fix broken test
2020-01-17 13:22:43 +01:00
Erik Sundell
b398bc592b
CloudWatch: Multi-valued template variable dimension alias fix (#21541)
* Match dimension value with label substring

* Add unit tests
2020-01-17 12:47:40 +01:00
Erik Sundell
260239d98b
Stackdriver: Support meta labels (#21373)
* Rewrite angular segments for filter and group by in react

* wip: refactoring

* Update metric find queries

* Remove old maps used to create labels - use one map for all types instead

* Use value as label (again) for filters ang groupby

* Remove old filter

* Remove not used code

* Fixes after pr feedback

* Fix broken tests and add new metadata tests

* Add index file to make imports cleaner

* Cleanup. Remove old angular filter code

* Fix broken tests

* Use type switching instead of if statements

* Use globals for regex

* Updates after pr feedback

* Make sure it's possible to filter using the same key multiple times

* Replace metric select with segment component

* Pass template vars as props

* Refactor meta labels code

* Reorder template variables

* Fix broken tests

* Reset metric value when changing service

* Fix lint issue.

* Make tests independant of element order

* Include kubernetes.io in regex

* Add instruction in help section
2020-01-17 12:25:47 +01:00
Erik Sundell
20aac7f04b
CloudWatch: Display partial result in graph when max DP/call limit is reached (#21533)
* Return data and warning in case dp limit is reached

* Change warning text
2020-01-17 11:18:28 +01:00
Erik Sundell
a35b2ac463
CloudWatch: Annotation Editor rewrite (#20765)
* wip: react rewrite

* Cleanup

* Break out non annontations specific fields

* Cleanup. Make annontations editor a functional component

* Remove redundant classnames

* Add paneldata to props

* Cleanup

* Fix rebase merge problem

* Updates after pr feedback

* Fix conflict with master
2020-01-15 16:38:15 +01:00
Marcus Efraimsson
baba1634b8 Plugins: Use grafana-plugin-sdk-go v0.5.0 (#21116)
* fix dispense

* plugin loading refactor

Moves common functionality of registering, starting,
stopping and restarting backend plugins to
backendplugin package.

* simplify plugin descriptors

* target sdk v0.5.0

Co-authored-by: Kyle Brandt <kyle@kbrandt.com>
2020-01-08 11:43:28 -05:00
Erik Sundell
cf2dd51827
CloudWatch: dimension_values templating fix (#21401)
* Handle dimension value if passed as array

* Break out dimension value loading into its own func
2020-01-08 12:24:10 +01:00
Brian Curtich
cef328d1d6 Cloudwatch ECS Container Insights Support (#21125) 2019-12-17 09:58:24 +02:00
Jerry Ylilammi
e27ab89aed Postgres/MySQL/MSSQL: Adds support for region annotations (#20752)
Adds support for region annotations in Postgres, MySQL and 
MSSQL data sources by adding a column named timeend to 
annotation query.

Co-Authored-By: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>

Closes #20918
Ref #10589
2019-12-13 17:25:36 +01:00
Erik Sundell
a533e00622
Remove escaping of \ ( ) characters (#20915) 2019-12-06 09:59:33 +01:00
Kyle Brandt
4afd40018b
transform: update to use sdk with frame.labels moved to frame.[]field.labels (#20670)
sdk v0.4.0
2019-11-26 13:28:16 -05:00
Marcus Efraimsson
3fc5f4552a CloudWatch: Fix high CPU load (#20579)
* Cache decrypted securejsondata
* Models: Add datasource cache tests
2019-11-22 14:21:23 +01:00
Erik Sundell
359416b89f
Cloudwatch: Fix LaunchTime attribute tag bug (#20237)
* Cast tags of type Time to string

* Fig go lint issue
2019-11-21 09:20:44 +01:00
Erik Sundell
ec18e2bfc3
CloudWatch: Remove HighResolution toggle since it's not being used (#20440)
* Remove highres flag since it's not being used

* Remove not used code. Init id field correctly

* Fix broken tests

* Remove GMS related calculations

* Rename period field

* Add breaking changes to changelog. Also update upgrading docs

* Update snapshot

* Update docs after feedback

* Changes after feedback
2019-11-20 13:34:44 +01:00
Mitsuhiro Tanda
af35e081c2 handle PartialData status (#20459) 2019-11-19 13:36:32 +01:00
Kyle Brandt
c9309edbb0
transform: changes to support sdk v0.2.0 (#20426)
and update vendor
2019-11-18 11:40:40 -05:00
Sofia Papagiannaki
2ca1cc5645
MySql: Fix password regression in MySQL datasource (#20376) 2019-11-14 12:16:38 +02:00
Erik Sundell
00bef917ee
CloudWatch: Datasource improvements (#20268)
* CloudWatch: Datasource improvements

* Add statistic as template variale

* Add wildcard to list of values

* Template variable intercept dimension key

* Return row specific errors when transformation error occured

* Add meta feedback

* Make it possible to retrieve values without known metrics

* Add curated dashboard for EC2

* Fix broken tests

* Use correct dashboard name

* Display alert in case multi template var is being used for some certain props in the cloudwatch query

* Minor fixes after feedback

* Update dashboard json

* Update snapshot test

* Make sure region default is intercepted in cloudwatch link

* Update dashboards

* Include ec2 dashboard in ds

* Do not include ec2 dashboard in beta1

* Display actual region
2019-11-14 10:59:41 +01:00
Sofia Papagiannaki
19dbd27c5c
mysql: fix encoding in connection string (#20192) 2019-11-06 10:54:53 +02:00
Ryan McKinley
92ab4d80f0
Error Handling: support errors and data in a response (#20169) 2019-11-05 15:20:04 -08:00
Borna Skukan
26f377c433 fix: modifying AWS Kafka dimension names to correct ones (#19986) 2019-11-04 09:33:31 +01:00
Sofia Papagiannaki
fc08c26025 WIP: Spawn backend plugins v2 (#19835)
* WIP: Spawn backend plugins v2

* Add test for plugin version

* Fix support for SDK plugins

Co-authored-by: Kyle Brandt <kyle@kbrandt.com>
Co-authored-by: Marcus Olsson <olsson.e.marcus@gmail.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* WIP: Draft PR for fork of V2 sdk / bi-directional support (#19890)

* temporary use export-datasource-plugin branch of grafana-plugin-sdk

* fix failing test

* remove debug (spew) lines

* misc cleanup

* add expressions feature toggle

* use latest grafana-plugin-sdk-go
2019-10-24 17:15:27 +02:00
Arve Knudsen
bb50fc5965
pkg/tsdb: Check errors (#19837)
Check errors in pkg/tsdb.
2019-10-22 16:16:53 +02:00
Nils Diefenbach
7a8f2cd75d Cloudwatch: Lowercase Redshift Dimension entry for service class and stage (#19897)
fixes #19761
2019-10-22 10:33:58 +02:00
Weeco
8cd93f0b88 Datasource: Add custom headers on alerting queries (#19508)
* Add custom headers on alerting queries

Reference issue #15381

Signed-off-by: Martin Schneppenheim <martin.schneppenheim@rewe-digital.com>

* Fix datasource transport tests

* Migrate decrypting header test to models pkg

* Check correct header

* Add HTTP transport test

Fixes #15381
2019-10-11 14:28:52 +02:00
Arve Knudsen
b858a5f496
Don't truncate IPv6 addresses (#19573)
* Bugfix: Fix parsing of IPv6 addresses

Make sure that IPv6 addresses aren't truncated when parsing. Fixes #18924
* util: Change network address parsing funcs to return error
* pkg/api: Return NetworkAddress instead of host/port
2019-10-09 08:58:45 +02:00
Anthony Templeton
6c0b5163dd CloudWatch: Changes incorrect dimension wmlid to wlmid (#19679)
Fixes #19476
2019-10-07 23:47:07 +02:00
Chad Nedzlek
20faef8de5 AzureMonitor: Alerting for Azure Application Insights (#19381)
* Convert Azure Application Insights datasource to Go

Allows for alerting of Application Insights data source

Closes: #15153

* Fix timeGrainReset

* Default time interval for querys for alerts

* Fix a few rename related bugs

* Update readme to indicate App Insights alerting

* Fix typo and add tests to ensure migration is happening

* Address code review feedback (mostly typos and unintended changes)
2019-10-07 14:18:14 +02:00
Sriramajeyam
50acb37a17 Azure Monitor : Query more than 10 dimensions ( Fixes #17230 ) (#18693)
* Fixes #17230

* Resovled comments

* Resolved comments

* spell fix
2019-10-03 16:53:11 +02:00
Arve Knudsen
39d8e73412
Chore: Upgrade to Go 1.13 (#19502)
* Chore: Upgrade to Go 1.13

Fixes: #18878

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

* Chore: Upgrade lint tools in order to work with Go 1.13

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

* Chore: Fix Go linting issues

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
2019-10-02 13:59:05 +02:00
Sean Nessworthy
404bf2e0dd CloudWatch: Add ap-east-1 to hard-coded region lists (#19523)
* CloudWatch: Add ap-east-1 to hard-coded region lists (#17448)

* CloudWatch: Fix handleGetRegion tests
2019-10-01 14:23:43 +02:00
Marcus Efraimsson
00e7c7c4b7
Testdata: Rename package to circumvent convention in go (#19409)
Before this change the tests for test datasource was not run.
2019-09-27 16:18:24 +02:00
Marcus Efraimsson
3de693af49
MySQL: Limit datasource error details returned from the backend (#19373)
Only return certain mysql errors from backend.
The following errors is returned as is from backend:
error code 1064 (parse error)
error code 1054 (bad column/field selected)
error code 1146 (table not exists)
Any other errors is logged and returned as a generic
error.
Restrict use of certain functions:
Do not allow usage of the following in query:
system_user()
session_user()
current_user() or current_user
user()
show grants

Fixes #19360
2019-09-24 20:50:49 +02:00
Erik Sundell
4dbedb8405 Azure Monitor: Revert support for cross resource queries (#19115)" (#19346)
This reverts commit 88051258e9.
2019-09-24 12:01:12 +02:00
Marcus Efraimsson
19f3ec4891
MySQL, Postgres, MSSQL: Only debug log when in development (#19239)
Found some additional debug statements in relation to #19049 that 
can cause memory issues.

Ref #19049
2019-09-20 15:00:28 +02:00
Franco Papalardo
b8334c14f8 CloudWatch: ContainerInsights metrics support (#18971)
* CloudWatch ContainerInsights support
2019-09-20 12:05:58 +03:00
Kevin Printz
79f8433675 Cloudwatch: Fix autocomplete for Gamelift dimensions (#19145) (#19146) 2019-09-19 08:27:15 +02:00