Commit Graph

832 Commits

Author SHA1 Message Date
Daniel Lee
b0488259d0
azuremonitor: fix for app insights azure china url (#23877) 2020-04-27 12:40:11 +02:00
kay delaney
f48ba11d4c
Datasource/Cloudwatch: Adds support for Cloudwatch Logs (#23566)
* Datasource/Cloudwatch: Adds support for Cloudwatch Logs

* Fix rebase leftover

* Use jsurl for AWS url serialization

* WIP: Temporary workaround for CLIQ metrics

* Only allow up to 20 log groups to be selected

* WIP additional changes

* More changes based on feedback

* More changes based on PR feedback

* Fix strict null errors
2020-04-25 22:48:20 +02:00
Johannes Brück
a98c129d05
CloudWatch: Prefer webIdentity over EC2 role also when assuming a role (#23807)
Same as #23452 but for assumed roles.
When using service accounts (webIdentity) on EKS in combination 
with assuming roles in other AWS accounts Grafana needs to retrieve 
the service account credentials first and then needs to assume the 
configured role.
2020-04-24 13:05:51 +02:00
Kyle Brandt
80e1191ca0
Backend Plugins: (breaking change) Add PluginContext (#23788)
* breaking change for newer backend plugins
* use exported protobuf converters and sdk types to reduce duplicate code
* uses grafana-plugin-sdk-go@v0.54.0
2020-04-23 14:08:21 -04:00
Ryan McKinley
9464115fc0
TableCell: show JSON rather than [object Object] (#23683) 2020-04-20 11:10:03 -07:00
Jack Stevenson
c0635947e8
Add ServerlessDatabaseCapacity to AWS/RDS metrics (#23635) 2020-04-20 18:14:17 +02:00
ilyastoli
b980cedfd5
CloudWatch: Added AWS Chatbot metrics and dimensions (#23516)
Adding AWS Chatbot metics according to https://docs.aws.amazon.com/chatbot/latest/adminguide/monitoring-cloudwatch.html
2020-04-15 10:35:21 +03:00
Kyle Brandt
5153673884
BackendPlugins: update to sdk v0.42.0
misc cleanup
2020-04-09 15:47:30 -04:00
ilyastoli
692a73875b
CloudWatch: Added missing Cassandra metrics (#23467)
Adding missing CloudWatch metrics Cassandra
2020-04-09 17:08:28 +03:00
Ryan
1f0e1b33bc
Postgres: Add SSL support for datasource (#21341)
* Add SSL certificate/key fields to Postgres data source configuration

Co-authored-by: Edwin Cordeiro <edwin@scordeiro.net>
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-09 12:48:29 +02:00
Dário Nascimento
7329671793
Cloudwatch: prefer webIdentity over EC2 role (#23452) 2020-04-08 23:58:32 -07:00
Patrik Karlström
dbda5aece9
cloudwatch: Replicate SDK behaviour for WebIdentityRole (#21594)
* Replicate SDK behaviour for WebIdentityRole

Fix #20473

* Use WebIdentityRole in s3 uploader as well

* Use consistent casing

* use WebIdentityRole to assume another role

Co-authored-by: eV <ev@7pr.xyz>
2020-04-08 15:05:24 +02:00
Agnès Toulet
56687a08f9
Core: use go-datemath in timerange utility (#23120)
* Core: use go-datemath in time_range

* Core: update timerange for negative epoch

* Core: update gtime component

* Core: clean up time_range tests

* Update pkg/components/gtime/gtime.go

Co-Authored-By: Arve Knudsen <arve.knudsen@gmail.com>

* Core: clean gtime tests

* components/gtime: Fix test

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

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-06 09:00:05 +02:00
Vikky Omkar
06ba5201bb
CloudWatch: Added Cassandra namespace (#23299) 2020-04-02 19:06:54 +03:00
Noval Agung Prayogo
ea35ae4d1f
Chore: Update the xorm dependency (#22376)
* Upgrade xorm

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2020-04-01 15:57:21 +02:00
Erik Sundell
a111cc0d5c
Stackdriver: Support for SLO queries (#22917)
* wip: add slo support

* Export DataSourcePlugin

* wip: break out metric query editor into its own component

* wip: refactor frontend - keep SLO and Metric query in differnt objects

* wip - load services and slos

* Fix broken test

* Add interactive slo expression builder

* Change order of dropdowns

* Refactoring backend model. slo unit testing in progress

* Unit test migration and SLOs

* Cleanup SLO editor

* Simplify alias by component

* Support alias by for slos

* Support slos in variable queries

* Fix broken last query error

* Update Help section to include SLO aliases

* streamline datasource resource cache

* Break out api specific stuff in datasource to its own file

* Move get projects call to frontend

* Refactor api caching

* Unit test api service

* Fix lint go issue

* Fix typescript strict errors

* Fix test datasource

* Use budget fraction selector instead of budget

* Reset SLO when service is changed

* Handle error in case resource call returned no data

* Show real SLI display name

* Use unsafe prefix on will mount hook

* Store goal in query model since it will be used as soon as graph panel supports adding a threshold

* Add comment to describe why componentWillMount is used

* Interpolate sloid

* Break out SLO aggregation into its own func

* Also test group bys for metricquery test

* Remove not used type fields

* Remove annoying stackdriver prefix from error message

* Default view param to FULL

* Add part about SLO query builder in docs

* Use new images

* Fixes after feedback

* Add one more group by test

* Make stackdriver types internal

* Update docs/sources/features/datasources/stackdriver.md

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

* Update docs/sources/features/datasources/stackdriver.md

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

* Update docs/sources/features/datasources/stackdriver.md

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

* Updates after PR feedback

* add test for when no alias by defined

* fix infinite loop when newVariables feature flag is on

onChange being called in componentDidUpdate produces an
infinite loop when using the new React template variable
implementation.

Also fixes a spelling mistake

* implements feedback for documentation changes

* more doc changes

Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com>
Co-authored-by: Daniel Lee <dan.limerick@gmail.com>
2020-03-27 12:01:16 +01:00
Carl Bergquist
3798ac903d
Upgrade golangci-lint and fixes some linting errors. (#22909)
Example: https://play.golang.org/p/cfPIPG3BwjJ
2020-03-23 13:37:53 +01:00
Denis
26626d9073
Prometheus: Render missing labels in legend formats as an empty string (#22355)
* Empty value for unknown Prometheus label (grafana#16041)

* Empty value for unknown Prometheus label (grafana#16041)

* fix linter
2020-03-18 19:57:11 +01:00
Kyle Brandt
0e09a3fe15
Alerting: support alerting on data.Frame (that can be time series) (#22812)
data.Frame (that can be series) are converted to as tsdb.TimeSeriesSlice - so new backend plugins can be shimmed into existing alerting

use sdk v0.31.0
2020-03-18 10:30:07 -04:00
Sofia Papagiannaki
c6829645c7
Graphite: Don't issue empty "select metric" queries (#22699)
* Don't issue empty "select metric" queries

* Update pkg/tsdb/graphite/graphite.go

Co-Authored-By: Carl Bergquist <carl.bergquist@gmail.com>

* Fix indentation

* Add missing import

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2020-03-11 09:28:36 +01:00
Erik Sundell
763fb3bc32
CloudWatch: Expand alias variables when query yields no result (#22695)
* Return empty time series with expanded aliases in case query yielded no results

* PR feedback
2020-03-10 21:14:58 +01:00
Kyle Brandt
73c4bef70f
Dependency: sdk's dataframe package renamed to data (#22700)
* use sdk 0.24.0
2020-03-10 15:42:15 -04:00
Erik Sundell
cd012bdfb4
Fix caching problem (#22473) 2020-03-10 14:10:48 +01:00
Chad Nedzlek
0e7c746a87
Azure Monitor: Fix app insights source to allow for new __timeFrom and __timeTo (#21879)
* Fix app insights source to allow for new __timeFrom and __timeTo

* Try fixing the switch
2020-03-10 00:55:41 +01:00
Carl Bergquist
1dcfaf25fc
Adds signed in user to backend v2 plugins requests (#22584)
closes #12043
2020-03-06 14:37:36 +01:00
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