Arve Knudsen
47f13abf7a
Backend: Migrate to using non-global configuration ( #31856 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2021-03-10 12:41:29 +01:00
Lê Đặng Hoài Nam
7764739a8e
Alerting: Generate random id when testing notification channel ( #31844 )
2021-03-10 11:24:31 +01:00
Arve Knudsen
04e9f6c24f
UsageStatsService: Don't use global state ( #31849 )
...
* UsageStatsService: Don't use global state
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2021-03-10 10:14:00 +01:00
Erik Sundell
d512c5a1b4
Cloudwatch: ListMetrics API page limit ( #31788 )
...
* add list metrics api page limit
* Update docs/sources/datasources/cloudwatch.md
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com >
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com >
2021-03-10 07:41:22 +01:00
Erik Sundell
2d660ee502
CloudWatch: Restrict auth provider and assume role usage according to Grafana configuration ( #31805 )
...
* restrict usage of providers and assume role according to grafana config
* update docs
* Update docs/sources/datasources/cloudwatch.md
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Update pkg/tsdb/cloudwatch/cloudwatch.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Update pkg/tsdb/cloudwatch/session_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* pr feedback
* fix failing test
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
2021-03-09 21:20:59 +01:00
Erik Sundell
13dd9dff50
CloudWatch: Add support for EC2 IAM role ( #31804 )
...
* add support for iam role auth
* add stubbable func
* fix broken test
* goimports
* pr feedback
2021-03-09 20:50:16 +01:00
Sofia Papagiannaki
4ce0a49eac
AlertingNG: Split into several packages ( #31719 )
...
* AlertingNG: Split into several packages
* Move AlertQuery to models
2021-03-08 22:19:21 +02:00
Carl Bergquist
3b36636318
Annotations: Make the annotation clean up batch size configurable ( #31487 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com >
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com >
2021-03-08 14:16:07 +01:00
Arve Knudsen
fc9381744a
UsageStatsService: Make initialization more robust ( #31761 )
...
* UsageStatsService: Make initialization more robust
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2021-03-08 10:33:20 +01:00
Arve Knudsen
b79e61656a
Introduce TSDB service ( #31520 )
...
* Introduce TSDB service
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com >
Co-authored-by: Will Browne <will.browne@grafana.com >
Co-authored-by: Torkel Ödegaard <torkel@grafana.org >
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com >
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com >
2021-03-08 07:02:49 +01:00
Carl Bergquist
c899bf3592
log skipped, performed and duration for migrations ( #31722 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com >
2021-03-07 21:26:29 +01:00
Zoltán Bedi
29c998f9eb
Tempo: Convert tempo to backend data source2
...
This reverts commit c15d1f498a .
2021-03-05 14:28:17 +01:00
Zoltán Bedi
c15d1f498a
Revert "Tempo: convert to backend data source ( #31618 )" ( #31702 )
...
This reverts commit 862f09376f .
2021-03-04 21:20:26 +01:00
Zoltán Bedi
53d4acdad2
Tempo: set authentication header properly ( #31699 )
2021-03-04 20:39:01 +01:00
Zoltán Bedi
862f09376f
Tempo: convert to backend data source ( #31618 )
...
* Tempo: Support opentelemetry response
* Tempo: convert Tempo to backend data source
* Update data source test
* Fix lint issues
* Apply suggestions from code review
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Return error when trace not found
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
2021-03-04 18:23:02 +01:00
Joan López de la Franca Beltran
01b4048026
Usage Stats: Report usage for all signed plugins ( #31545 )
...
* Report usage for all the signed plugins
* Remove no longer used code
* Fix tests by manipulating the global state
* Minor test fix
2021-03-04 15:43:43 +01:00
Alexander Emelin
8016b3c5ca
Live: Use pure WebSocket transport ( #31630 )
2021-03-04 09:06:42 +03:00
Sofia Papagiannaki
bd2390c49f
AlertingNG: code refactoring ( #30787 )
...
* AlertingNG: refactoring
* Fix tests
2021-03-03 17:52:19 +02:00
Ilya Stoliar
f5d1fa48ca
CloudWatch: Added AWS Timestream Metrics and Dimensions ( #31624 )
2021-03-03 11:25:45 +02:00
Erik Sundell
580332255d
add new metrics and dimensions ( #31595 )
2021-03-03 10:18:34 +01:00
Kyle Brandt
a488ab8393
SSE: Add "Classic Condition" on backend ( #31511 )
...
This is a translation of services/alerting/conditions. Main Changes:
- Work with types in SSE (series/number) which are data frames (no more null.Float).
- The query part from alerting/conditions is handled by SSE logic
- Convey / simplejson removed.
- Time range no longer part of "query" in the condition
2021-03-02 13:51:33 -05:00
Gábor Farkas
8d39e6640c
InfluxDB: Improve maxDataPoints error-message in Flux-mode, raise limits ( #31259 )
...
* influxdb: flux: improve error-message
* influxdb: flux: raise max-points tolerance limit
* influxdb: flux: better error-message
* influxdb: flux: different approach to nice-error-message-generation
* influxdb: flux: removed unnecessary whitespace
* influxdb: flux: better error message, new approach
* influxdb: flux: test max-data-points-exceeded situtation
2021-03-02 18:33:51 +01:00
Labesse Kévin
bd0d051438
Alerting: PagerDuty: adding current state to the payload ( #29270 )
...
* adding state to the payload
* fix test
* fix linter
* documentation payload current state
* Apply suggestions from code review
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com >
Co-authored-by: Diana Payton <52059945+oddlittlebird@users.noreply.github.com >
2021-03-02 17:50:51 +01:00
Ivana Huckova
d5fee5a3f5
Loki: Add support for alerting ( #31424 )
...
* Create Loki backend template
* Update endpoint
* Adjust step
* Add test
* Change to use Loki client
* Address feedback, improve errors and comments
* Linting
* Update pkg/tsdb/loki/loki.go
* Update pkg/tsdb/loki/loki.go
* Update pkg/tsdb/loki/loki.go
2021-03-02 14:55:16 +01:00
Hugo Häggmark
d84cfdbb0f
LibraryPanels: Adds version column ( #31590 )
...
* Refactor: adds version column and fixes tests
* Chore: adds version check when patching the library panel
* Refactor: adds support for version in FrontEnd
2021-03-02 13:33:26 +01:00
Levi Harrison
d3a590ca19
Alerting: Fix bug in Discord for when name for metric value is absent ( #31257 )
...
* Make sure Metric field in Discord notification is never empty
Discord uniquely does not send the alert if the metric field is empty, which can happen in some cases, such as when the legend is {{hostname}}.
Signed-off-by: Levi Harrison <levisamuelharrison@gmail.com >
* Changed name of empty metric in Discord alert
Signed-off-by: Levi Harrison <levisamuelharrison@gmail.com >
2021-03-02 11:37:35 +02:00
Hugo Häggmark
4bc6a7c407
LibraryPanels: Deletes library panels during folder deletion ( #31572 )
...
* Refactor: adds permissions for library panel creation
* Refactor: checks folder permissions for patch requests
* Chore: changes after PR comments
* Refactor: adds permissions to delete
* Refactor: moves get all permission tests out of get all tests
* Chore: move out get all tests to a separate file
* Refactor: adds permissions to get handler
* Refactor: fixes a bug with getting library panels in General folder
* Refactor: adds permissions for connect/disconnect
* Refactor: adds permissions and tests for get connected dashboards
* Tests: adds tests for connected dashboards in General Folder
* LibraryPanels: Deletes library panels during folder deletion
* LibraryPanels: Deletes library panels during folder deletion
* Update pkg/api/folder.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Update pkg/services/librarypanels/librarypanels_permissions_test.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Chore: updates after PR comments
* Chore: forgot to change some function signatures
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
2021-03-02 10:34:01 +01:00
Ilya Stoliar
ad37077610
CloudWatch: Added AWS Network Firewall metrics and dimensions ( #31498 )
2021-03-02 06:12:59 +01:00
Will Browne
a606a49cb2
propagate plugin unavailable message to UI ( #31560 )
2021-03-01 18:54:10 +01:00
Hugo Häggmark
583b94557b
LibraryPanels: Adds folder checks and permissions ( #31473 )
...
* Refactor: adds permissions for library panel creation
* Refactor: checks folder permissions for patch requests
* Chore: changes after PR comments
* Refactor: adds permissions to delete
* Refactor: moves get all permission tests out of get all tests
* Chore: move out get all tests to a separate file
* Refactor: adds permissions to get handler
* Refactor: fixes a bug with getting library panels in General folder
* Refactor: adds permissions for connect/disconnect
* Refactor: adds permissions and tests for get connected dashboards
* Tests: adds tests for connected dashboards in General Folder
2021-03-01 15:33:17 +01:00
Torkel Ödegaard
7428668835
Profile: Fixes profile preferences being accessible when anonymous access was enabled ( #31516 )
...
* Profile: Fixes profile preferences page being available when anonymous access was enabled
* Minor change
* Renamed property
2021-02-27 18:04:28 +01:00
Dimitris Sotirakis
554055e39d
Convert annotations to dataframes ( #31400 )
...
* Stop using transformation to tables
* Update datasource.ts to parse from dataframes
* Add test on transformToDataframe func
* Remove parseResponse and do the work inside parseToAnnotations method
* Name the dataframe after the RefID
* Small fix when mapping to annotation
* Add tests in annotation_query_test.go class
* Small fix in loop iteration
* Change for loop signature
2021-02-25 18:29:17 +02:00
Agnès Toulet
663d44fe82
Login: handle custom token creation error messages ( #31283 )
...
* Login: handle custom token creation errors
* Login: handle external error for OAuth responses
2021-02-25 15:30:51 +01:00
M4t3o
0bb4cbdb68
Alerting notifier SensuGo: improvements in default message ( #31428 )
...
* add related metrics as default message
* fix CI linter error
2021-02-25 10:52:34 +01:00
Torkel Ödegaard
584886fa46
AppPlugins: Options to disable showing config page in nav ( #31354 )
...
* AppPlugins: Options to disable showing config page in nav
* rename
* Added autoEnabled
* updated
* Things are working sort of
* Simplify
2021-02-25 10:00:21 +01:00
Hugo Häggmark
1725bf773f
Chore: Fixes small typos ( #31461 )
2021-02-25 08:59:26 +01:00
Kyle Brandt
c9dbf5a0d0
Graphite/SSE: update graphite to work with server side expressions ( #31455 )
...
Changes the time value of the response to be milliseconds, which I think is like the other data sources I have seen.
Also if it sees the timerange values as numbers, assumes they are unixMS (and come from expressions, or our new backend.TimeRange type). When this timerange is used, the request is sent to graphite with from and until as epoch timestamps
2021-02-24 13:16:26 -05:00
Erik Sundell
1b149523ed
AWS: Add aws plugin configuration ( #31312 )
...
* add new conf and make sure its passed to frontend
* change auth provider name
* goimports
* fixed after feedback
* more updates after feedback
* Update docs/sources/administration/configuration.md
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com >
* Update docs/sources/administration/configuration.md
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com >
* Update docs/sources/administration/configuration.md
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com >
* Update docs/sources/administration/configuration.md
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com >
* Update docs/sources/administration/configuration.md
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com >
* Update conf/sample.ini
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Update docs/sources/administration/configuration.md
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Update pkg/setting/setting.go
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* updates after pr feedback
* Update conf/defaults.ini
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Update conf/defaults.ini
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Update conf/sample.ini
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com >
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
2021-02-24 18:08:13 +01:00
Erik Sundell
055590890c
CloudWatch: Make it possible to specify custom api endpoint ( #31402 )
...
* wip: add endpoint field
* add endpoint to config and make sure it's part of the cache key
* update docs
* improve endpoint paragraph
* Update docs/sources/datasources/cloudwatch.md
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com >
* Update public/app/plugins/datasource/cloudwatch/components/ConfigEditor.tsx
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com >
* goimports
* Update docs/sources/datasources/cloudwatch.md
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* update snapshot
* Update docs/sources/datasources/cloudwatch.md
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com >
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com >
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com >
2021-02-24 16:05:14 +01:00
Hugo Häggmark
466462de37
LibraryPanels: Adds permissions to getAllHandler ( #31416 )
...
* LibraryPanels: Adds permissions to getAllHandler
* Chore: adds a test to verify the permissions
* Chore: tests refactor
2021-02-24 14:06:22 +01:00
Carl Bergquist
5114fa39ce
we should never log unhashed tokens ( #31432 )
...
Signed-off-by: bergquist <carl.bergquist@gmail.com >
2021-02-24 10:04:25 +01:00
ying-jeanne
c57047a420
Postgres: allow providing TLS/SSL certificates as text in addition to file paths ( #30353 )
...
* postgres SSL certification
* add back the UI to configure SSL Authentication files by file path
* add backend logic
* correct unittest
* mini changes
* Update public/app/plugins/datasource/postgres/config_ctrl.ts
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* Update public/app/plugins/datasource/postgres/partials/config.html
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
* mutex
* check file exist before remove
* change permission
* change default configuremethod to file-path
* Update public/app/plugins/datasource/postgres/partials/config.html
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
* Update public/app/plugins/datasource/postgres/partials/config.html
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
* Update public/app/plugins/datasource/postgres/partials/config.html
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
* Update public/app/plugins/datasource/postgres/partials/config.html
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
* rename sslconfiguremethod to sslconfigurationmethod
* frontend update
* solve comments
* Postgres: Convert tests to stdlib
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Postgres: Be consistent about TLS/SSL terminology
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* fix init inconsistancy
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* naming convention
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Undo change
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Fix TLS issue
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* change permissions
* Fix data source field names
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Clean up HTML
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Improve popover text
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Fix SSL input bug
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Undo unnecessary change
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Clean up backend code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Fix build
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* More consistent naming
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Clean up code
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Enforce certificate file permissions
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* add settings
* Undo changes
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* fix windows file path
* PostgresDataSource: Fix mutex usage
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Fix tests
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
* Update pkg/tsdb/postgres/postgres.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
* fix compilation
* fix unittest
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
* Apply suggestions from code review
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
* mock function
* change kmutex package
* add kmutex into middleware
* lock connection file per datasource
* add unittest regarding concurrency
* version should be equal
* adding unittest
* fix the loop
* fix unitest
* fix postgres unittst
* remove comments
* move dataPath from arg to tlsManager struct field
* Use DecryptedValues method
Use cached decrypted values instead of
using secure json data decrypt which will
decrypt unchanged values over and over again.
* remove unneeded mutex in tests and cleanup tests
* fix the lint
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com >
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com >
2021-02-23 22:10:55 +01:00
Ilya Stoliar
19c12b5451
CloudWatch: Added AWS Ground Station metrics and dimensions ( #31362 )
2021-02-23 20:36:18 +01:00
Gábor Farkas
1e7f2e93e6
InfluxDB: handle columns named "table" ( #30985 )
...
* influxdb: flux: manually calculate table-group-key
* influxdb: flux: added explanation about the group-key
2021-02-23 16:44:33 +01:00
Ivana Huckova
dce67db6ba
Prometheus: Use configured HTTP method for /series and /labels endpoints ( #31401 )
...
* Run post-friendly request with set method first
* Improve messaging, retry only when post and specific status code
* Add comments
* Fix backend
* Update public/app/plugins/datasource/prometheus/datasource.ts
2021-02-23 16:31:03 +01:00
Rafael de Elvira
c05cf9fdbb
Add new Cloudwatch AWS/DDoSProtection metrics and dimensions ( #31297 )
2021-02-23 13:50:40 +01:00
Rubycut
833446645a
Add eu-south-1 cloudwatch region, closes #31197 ( #31198 )
2021-02-23 10:42:54 +01:00
Alex Khomenko
6db4b40d5b
Data source list: Use Card component ( #31326 )
...
* Replace DataSourcesListItem with Card
* Add tests
* Remove unused styles
* Make card heading semi bold
* Make heading semi-bold
* Show type name instead of type id
* Fix key warning
* Update Card
* Fix tests
* Make typeName optional
* remove styling that was just a test
* Make typeName non-optional and fix tests
* Update list key
Co-authored-by: Torkel Ödegaard <torkel@grafana.com >
2021-02-22 14:02:10 +02:00
Arve Knudsen
6e549bc95d
Chore: Remove gotest.tools dependency ( #31391 )
...
Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com >
2021-02-22 11:53:15 +01:00
Torkel Ödegaard
3e55c967ee
Theming: Support for runtime theme switching and hooks for custom themes ( #31301 )
...
* WIP Custom themes
* Load custom themes from URL and via event
* Dynamic page background
* Header color change
* Fixing tests and emotion warnings
* Fixed test
* moving cx to getStyles
* Review fixes
* minor change
2021-02-20 09:02:06 +01:00