Commit Graph

346 Commits

Author SHA1 Message Date
Kat Yang
31630edf0c
Chore: Remove Wrapf (#50128)
* Chore: Remove Wrapf

* Remove all Wrapf refs

* Remove last Wrapf ref

* Fix lint errors

* Remove Wrap and Wrapf definitions

* Remove unnecessary colon
2022-06-06 22:30:31 +02:00
Kat Yang
3c3039f5b3
Chore: Remove Wrap (#50048)
* Chore: Remove Wrap and Wrapf

* Fix: Add error check
2022-06-03 09:24:24 +02:00
Piotr Jamróz
9e5292d32d
CloudWatch: Remove duplicated metrics (#49400) 2022-05-23 14:52:12 +02:00
k-yone
34d77fd584
CloudWatch: Add missing metrics for AWS App Runner (#49048) 2022-05-23 13:38:52 +02:00
Aton-Kish
2ba1a75d50
CloudWatch: Added missing AWS/AppRunner metrics (#49174) 2022-05-23 13:14:16 +02:00
Erik Sundell
aac5c9fd22
Cloudwatch: Pass label in deep link (#49160)
* pass label in deep iink

* add unit test

* pr feedback
2022-05-23 07:23:38 +02:00
Shirley
ef9e08ffcf
CloudWatch: Change aggregateResponse to return slice instead of map (#48805)
* Rename tests

* Change test names

* Change metrics from map to slice

* Add test for one output, multiple MetricDataResults

* Rename test input file

* Use map instead of iterating over the response metrics

* Rename variable

* move partial data set to query row response

* remove not used label field

* remove incorrect placeholder

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-05-18 09:16:38 +02:00
qs_pang
78287618ab
Fix CloudWatch: Add missing ELB metrics #48756 (#48985)
* Fix CloudWatch: Add missing ELB metrics #48756

* run go fmt
2022-05-17 14:58:34 -04:00
Erik Sundell
3106af9eec
Cloudwatch: Set time zone offset in GMD request (#48772)
* set timezone offset in case feature is enabled

* add unit tests

* add unit tests

* remove unused import
2022-05-16 12:15:54 +02:00
Shirley
5c2dee19d5
CloudWatch: Refactor tests, remove unused parameters (#48815) 2022-05-08 09:27:03 +02:00
Szymon Szypulski
b6c5f29373
Cloudwatch: Add support for new AWS/RDS EBS* metrics (#48798)
Add support for the missing AWS/RDS metrics, EBSIOBalance% and
EBSByteBalance%. Change is based on the official AWS blog post[1]. Those
metrics work on for Nitro instances.

1. https://aws.amazon.com/blogs/compute/improving-application-performance-and-reducing-costs-with-amazon-ebs-optimized-instance-burst-capability/
2022-05-06 10:38:15 +02:00
Shirley
b35ca8c08d
CloudWatch: Pass label in GetMetricData API request when dynamic label feature toggle is enabled (#48574) 2022-05-05 13:59:23 +02:00
Shirley
27821e0bc1
CloudWatch: Migrate alias to dynamic labels (#48555) 2022-05-03 13:41:51 +01:00
Andreas Christou
7f4b1b767e
Add new DynamoDB metrics & dimensions (#48551) 2022-05-03 13:32:09 +01:00
Shirley
da035e823f
CloudWatch: Pass feature toggles to backend (#48547) 2022-04-29 17:47:46 +02:00
Erik Sundell
f58a2d879e
Cloudwatch: Use new annotation API (#48102)
* use new annotation api

* fix bad merge
2022-04-27 12:41:48 +02:00
Shirley
79d328fcbc
CloudWatch: Add tests for data frame naming in formatAlias (#47899) 2022-04-21 15:11:23 +02:00
Shirley
4b889eb336
Change to pointer receiver in mock call (#47575) 2022-04-12 16:22:28 +02:00
Jamie DeMichele
614fd04653
CloudWatch: Added missing MemoryDB Namespace metrics (#47290)
CloudWatch: Added missing MemoryDB metrics
2022-04-11 16:35:50 -04:00
Gabriel Santos
b5bacce819
CloudWatch: Handle new error codes for MetricInsights (#47033)
* CloudWatch: Handle new error codes for MetricInsights

* Changes/test to support case where only the first GetMetricDataOutput returns errors and refactoring

* Fix Potential file inclusion via variable

* Fix gosec 304 by assigning a new variable

* fix goimports issue
2022-04-04 15:44:19 +02:00
Andres Martinez Gotor
3c5e68a349
CloudWatch: Fix metric names (#46929) 2022-03-25 09:17:15 +01:00
Kevin Yu
99b4dfc27d
Dashboard: Validate refId when generating id for cloudwatch query (#46182)
* Validate refId when generating id for cloudwatch query

* add test case when refId is a valid metric data id
2022-03-14 09:44:04 -07:00
Erik Sundell
6670257c5e
CloudWatch: Use default http client from aws-sdk-go (#46370)
* use default http client from aws-sdk-go

* temp comment out line and link to issue
2022-03-09 16:29:10 +01:00
Shirley
438512c7ef
CloudWatch: Add tests to query input region in executeLogAlertQuery (#46212) 2022-03-04 11:15:36 +01:00
Shirley
1255f8a76a
Unexport mocks, use aws-sdk-go helpers, rename test utilities file (#46107) 2022-03-03 09:42:51 +01:00
Isabella Siu
590ea19c3f
Cloudwatch: use CheckHealth for testing datasource (#45974)
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
2022-03-02 08:48:51 -05:00
Shirley
a68a570e92
CloudWatch: Add test to executeStartQuery (#45888)
* CloudWatch: Add test to executeStartQuery

* Add test for absence of limit

* Restrict assertions to limit in some tests
2022-02-25 13:14:59 +00:00
Shirley
304185f682
CloudWatch: Fix running go test with count (#45892) 2022-02-25 12:20:07 +01:00
Yaelle Chaudy
0e7b0f16b8
Adding ap-southeast-3 to cloudwatch regions (#45821) 2022-02-24 14:00:24 +01:00
Szymon Szypulski
929d8a358f
Cloudwatch: Add support for AWS/PrivateLink* metrics and dimensions (#45515)
Add support for AWS/PrivateLink{Endpoints,Interfaces} metrics and
dimensions. Change is based on the official AWS documentation[1].

1. https://docs.aws.amazon.com/vpc/latest/privatelink/privatelink-cloudwatch-metrics.html
2022-02-18 10:21:17 +01:00
Isabella Siu
50a53ef58b
CloudWatch: replace metricFindQueries with CallResourceHandler (#41571) 2022-02-16 14:28:26 -05:00
Shirley
1c1a45a880
CloudWatch: Add tests to annotations query (#45337) 2022-02-15 12:45:50 +01:00
Shirley
89a0c0fc37
Cloudwatch: Remove unused parameters (#45237)
* Remove unused parameters

* Remove unused context

* Make plugin context first parameter
2022-02-10 17:15:11 +01:00
Shirley
5edcc2e795
Cloudwatch: Use generic null-insertion mechanism (#43507)
* Cloudwatch: Fix nil values for a period gap in metrics

* Use fields periods for intervals
2022-02-10 10:17:45 +01:00
Isabella Siu
cbbf451b36
CloudWatch: small logs refactors (#44677) 2022-01-31 17:30:16 -05:00
Will Browne
7fbc7d019a
Plugins: Core plugins register via backend factory provider (#43171)
* refactoring store interface and init flow

* fix import

* fix linter

* refactor resource calling

* load with class

* re-order args

* fix tests

* fix linter

* remove old creator

* add custom config struct

* fix some tests

* cleanup

* fix

* tackle plugins

* fix linter

* refactor and fix test

* add connect failure error

* add fix for azure, cloud monitoring and test data

* restructure

* remove unused err

* add fake tracer for test

* fix grafana ds plugin
2022-01-20 18:16:22 +01:00
Isabella Siu
2c3bed1f4b
CloudWatch: remove unused "live" log code (#44185) 2022-01-20 08:58:39 -05:00
Andres Martinez Gotor
4e1c7e868e
Cloudwatch: use the backend HTTP client provider (#44036) 2022-01-18 09:34:12 +01:00
David Henderson
575eb68828
CloudWatch: Add Missing Elasticache Host-level metrics (#43455)
Add missing host-level Elasticache metrics from https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.HostLevel.html

Follows from https://github.com/grafana/grafana/pull/43336#issuecomment-999367311
2021-12-22 14:02:52 +01:00
idafurjes
b8852ef6a3
Chore: Remove context.TODO() (#43409)
* Remove context.TODO() from services

* Fix live test

* Remove context.TODO
2021-12-22 11:02:42 +01:00
Siavash Safi
4c4322f717
CloudWatch: Add all ElastiCache Redis Metrics (#43336)
Add all missing Redis ElastiCache metrics.
https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/CacheMetrics.Redis.html

Signed-off-by: Siavash Safi <siavash.safi@gmail.com>
2021-12-21 09:13:41 +01:00
Ilya Stoliar
9cf5623918
CloudWatch: Add Data Lifecycle Manager metrics and dimension (#43310) 2021-12-20 09:48:07 +01:00
Will Browne
e4ba5f17dd
add core plugins thru store (#43085) 2021-12-14 15:22:40 +01:00
Shirley
21656a0491
Remove reference to legacydata package (#43075)
* Remove reference to legacydata package

* Change from and to times
2021-12-14 12:58:31 +01:00
Erik Sundell
043680371f
add all new es metrics (#43034) 2021-12-14 10:12:39 +01:00
Erik Sundell
bab78a9e64
CloudWatch: Add support for AWS Metric Insights (#42487)
* add support for code editor and builder

* refactor cloudwatch migration

* Add tooltip to editor field (#56)

* add tooltip

* add old tooltips

* Bug bash feedback fixes (#58)

* make ASC the default option

* update sql preview whenever sql changes

* don't allow queries without aggregation

* set default value for aggregation

* use new input field

* cleanup

* pr feedback

* prevent unnecessary rerenders

* use frame error instead of main error

* remove not used snapshot

* Use dimension filter in schema picker  (#63)

* use dimension key filter in group by and schema labels

* add dimension filter also to code editor

* add tests

* fix build error

* fix strict error

* remove debug code

* fix annotation editor (#64)

* fix annotation editor

* fix broken test

* revert annotation backend change

* PR feedback (#67)

* pr feedback

* removed dimension filter from group by

* add spacing between common fields and rest

* do not generate deep link for metric queries (#70)

* update docs (#69)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>

* fix lint problem caused by merge conflict

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-30 10:53:31 +01:00
n2N8Z
eaf46600c4
CloudWatch: Add missing AWS/Events metrics. (#42164)
* Add missing InvocationsFailedToBeSentToDlq metric.

* Add missing InvocationsSentToDlq metric.
2021-11-24 11:35:18 +01:00
Andrej Ocenas
e237ff20a9
CloudWatch Logs: Add retry strategy for hitting max concurrent queries (#39290)
* Add error passing and retry strategy

* Change generic error to specific one

* Make the error more generic

* Refactor retry strategy

* Add retry that handles multiple queries

* Rollback some backend changes

* Remove simple retry strategy

* Add comments

* Add tests

* Small test fixes

* Add log timeout config

* Fix tests

* Fix tests

* Add validation

* Remove commented code and add comment

* Fix snapshots

* Remove unnecessary cast
2021-11-17 21:46:13 +01:00
Erik Sundell
eb40723bcb
Cloudwatch: Enable dimension filtering when loading dimension values (#41566)
* fix dimension filter

* refactor tests

* add comments

* fix typo
2021-11-11 16:48:35 +01:00
Marcus Efraimsson
baab021fec
Chore: Refactor usage of legacy data contracts (#41218)
Refactor usage of legacy data contracts. Moves legacy data contracts 
to pkg/tsdb/legacydata package.
Refactor pkg/expr to be a proper service/dependency that can be provided 
to wire to remove some unneeded dependencies to SSE in ngalert and other places.
Refactor pkg/expr to not use the legacydata,RequestHandler and use 
backend.QueryDataHandler instead.
2021-11-10 11:52:16 +01:00