Commit Graph

7864 Commits

Author SHA1 Message Date
Joan López de la Franca Beltran
9826a694a8
Encryption: Add Prometheus metrics (#48603) 2022-05-06 10:21:55 +02:00
Ashley Harrison
bcb0bfce3a
Navigation: Add create icons to expanded menu (#48768)
* add create icons to expanded menu

* update translations
2022-05-06 09:14:00 +01:00
Connor Lindsey
c1b5ea3e54
Tracing: Add trace to metrics config behind feature toggle (#46298)
* Add trace to metrics behind feature flag
2022-05-05 14:46:18 -06:00
Alexander Weaver
0f56462fbe
Alerting: Provisioning message templates (#48665)
* Generate API for writing templates

* Persist templates app logic layer

* Validate templates

* Extract logic, make set and delete methods

* Drop post route for templates

* Fix response details, wire up remainder of API

* Authorize routes

* Mirror some existing tests on new APIs

* Generate mock for prov store

* Wire up prov store mock, add tests using it

* Cover cases for both storage paths

* Add happy path tests and fix bugs if file contains no template section

* Normalize template content with define statement

* Tests for deletion

* Fix linter error

* Move provenance field to DTO

* empty commit

* ID to name

* Fix in auth too
2022-05-05 15:21:42 -05:00
sam boyer
ea96c42545
schemas: Update to cuetsy v0.0.1 (#48753)
* Add explicit cuetsy annotations to all models.cue

* Update to first cuetsy release

* Clean up cuetsify a bit; remove unification

* Update changes to news codegen output
2022-05-05 11:56:53 -04:00
Ieva
a5672758d8
Access control: further reduce access control feature toggle checks (#48171)
* reduce the usage of access control flag further by removing it from SQL store methods

* fixing tests

* fix another test

* linting

* remove AC feature toggle use from API keys

* remove unneeded function
2022-05-05 17:31:14 +02:00
Todd Treece
ec666f8785
Converter: Add result type to frame meta (#48769) 2022-05-05 16:57:24 +02:00
Ivana Huckova
250b72cc1b
Elasticsearch: Remove support for versions after their end of the life (<7.10.0) (#48715)
* Elasticsearch: Remove support for versions after their EOL

* Update docs

* Remove old versions from config

* Update pkg/tsdb/elasticsearch/elasticsearch.go

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

* Fix tests

* Fix typecheck errors

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-05-05 16:16:34 +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
Sofia Papagiannaki
610247d52a
Alerting: modify ruler endpoints for proxying using the datasource UID (#48046)
* Modify ruler endpoints to expect the data source UID

* Update frontend

* Apply suggestion from code review
2022-05-05 14:58:32 +03:00
Gábor Farkas
da74dba7c8
Loki: backend: use streaming JSON parser, try2 (#48752)
* converter: remove __name__ customization because Loki does not do that

Loki does not handle __name__ in a special way.
for Prometheus, the caller can implement the formatting
by themselves

* converter: change labels-formatting

the labels.String() method does not handle strange values well

* loki: backend: use streaming-json parser

* more idiomatic code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>

* simpler row-length check

* simpler code

* fixed converter/prom tests

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-05 13:09:01 +02:00
Gábor Farkas
02aa1cd1c5
loki backend mode forward-oauth (#48401)
* loki: backend: add forward oauth credentials functionality

* removed obsolete comment
2022-05-05 12:42:50 +02:00
Gábor Farkas
3cade2f669
Revert "Loki: backend: use streaming JSON parser (#47656)" (#48747)
This reverts commit 46b40b6e82.
2022-05-05 12:02:53 +02:00
idafurjes
abb1618291
Add OTLP exporter for OpenTelemetry (#47987)
* Add OTLP exporter for OpenTelemtry

* Fix lint

* Refactore parse settings

* Add configuration for propagation + fix tests

* Fix tests and lint

* Fix alerting tests

* Add coments to config

* Add propagation to custom.ini
2022-05-05 10:37:26 +02:00
ying-jeanne
0d14c27eb9
Chore: add Folderuid into panel-library API (#48577)
* add folderuid into interface

* panellibrary id/uid things

* modify doc

* update doc

* correct some comments
2022-05-05 10:04:54 +02:00
Gábor Farkas
46b40b6e82
Loki: backend: use streaming JSON parser (#47656)
* converter: remove __name__ customization because Loki does not do that

Loki does not handle __name__ in a special way.
for Prometheus, the caller can implement the formatting
by themselves

* converter: change labels-formatting

the labels.String() method does not handle strange values well

* loki: backend: use streaming-json parser

* more idiomatic code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>

* simpler row-length check

* simpler code

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-05 08:47:40 +02:00
Todd Treece
9529c35efa
Converter: Add support for parsing prometheus string (#48727) 2022-05-04 20:26:32 -04:00
Todd Treece
35300a816a
Prometheus: Add support for streaming scalar parsing (#48725) 2022-05-04 16:03:48 -04:00
Todd Treece
6e6f6e3cce
Converter: Add support for parsing error & warning from prometheus results (#48721) 2022-05-04 12:01:18 -07:00
gotjosh
7313310080
Alerting: Fix & Cut the changelog (#48714) 2022-05-04 16:05:48 +01:00
Karl Persson
2738d1c557
Access Control: Move dashboard actions and create scope provider (#48618)
* Move dashboard actions and create scope provider
2022-05-04 16:12:09 +02:00
Adam Simpson
b2644de6c8
AzureMonitor: add feature toggle azureMonitorExperimentalUI for migrating to experimental UI (#48658)
* feat: add feature toggle azureMonitorExperimentalUI

Add QueryHeader which adds an experimental header to AzureMonitor. This work is documented in #44432.
2022-05-04 13:54:09 +00:00
Yuriy Tseretyan
f85e758972
unhide alert rule's data sources during migraiton (#48559) 2022-05-04 09:31:05 -04:00
Ashley Harrison
8fcae1ef3c
Navigation: change Search Dashboards back to sentence case (Search dashboards) (#48272)
* revert search dashboards to sentence case

* Saved Items -> Saved items
2022-05-04 14:24:10 +01:00
Krzysztof Dąbrowski
c41397a6e7
LDAP: validate organization role during parsing (#37188)
* LDAP: validate organization role during parsing

* Trigger a new build

* Check if grafana_admin is present
2022-05-04 09:35:10 +02:00
Jeff Levin
38fc0c68e4
Update documentation to explicitly state we should not be putting migrations behind feature flags (#48663) 2022-05-03 15:10:59 -08:00
Jeff Levin
b88644cb83
public dashboards: add public dashboard table (#48470)
* add public dashboard table migration
2022-05-03 15:08:40 -08:00
Joey Tawadrous
09634b518c
Traces Panel: Add new Traces Panel visualization (#47534)
* Panel

* Support tempo dash variables

* Support tempo explore variables

* Only show span links for explore

* Cleanup

* Added tests

* apply variables to search

* Tests for search variables

* Handling no data

* Interpolation and tests

* TracesPanel tests

* More tests

* Fix for backend test

* Manager integration test fix

* Traces doc and updated visualizations index doc

* Logs for this span

* Search, scrollToTop, other improvements

* Refactor to extract common code

* Removed TopOfViewRefType optional

* Remove topOfViewRef optional

* Removed another optional and fixed tests

* Test

* Only show search bar if trace

* Support traces panel in add to dashboard

* Self review

* Update betterer

* Linter fixes

* Updated traces doc

* Ahh, moved the for more info too

* Updated betterer.results

* Added new icon

* Updated expectedListResp.json
2022-05-03 17:42:36 +01:00
Will Browne
4ecd57f49c
Plugins: Introduce HTTP 207 Multi Status response to api/ds/query (#48550)
* feature toggles

* return HTTP 207 from ds/query

* add ft check

* add API test

* add 207 check for qr

* change to OR

* revert check

* add explicit toggle check for cloudwatch

* remove unused import

* remove from defaults.ini

* add status codes to md and update swagger

* new fangled http api tests pattern

* update swagger

* Update docs/sources/http_api/data_source.md

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>

* add missing word and reformat

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-05-03 18:02:20 +02:00
Ryan McKinley
88eeb878a4
API: add stars HTTP endpoint (#48612)
Co-authored-by: Ying WANG <ying.wang@grafana.com>
2022-05-03 08:52:19 -07:00
Ivana Huckova
4661c9ca47
Query history: Cleanup (#48303)
* Query history: Clean up stale history after 14 days

* Add unstarring sleanup

* Add wraapping

* Update sql for mysql database

* Update

* Remove fmt.Print

* Refactor and simplify solution

* Update pkg/services/queryhistory/database.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Adjust SQL to limit number of deleted queries

* Add limit enforcmenet to cleanup

* Change limit

* Update

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-05-03 14:49:58 +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
Jguer
6a303bb6b8
AccessControl: Rename builtin role roles to basic roles (#48519)
* AccessControl: Rename grafana:builtins roles to basic

* AccessControl: rename macro references to basic

Co-authored-by: gamab <gabi.mabs@gmail.com>
2022-05-03 13:59:16 +02:00
Andreas Gerstmayr
21034e31de
chore: remove executable permissions of source files and docs (#46303) 2022-05-03 12:08:14 +02:00
Gábor Farkas
7d369a1dea
Loki: backend: use json-field (#48486)
* fixed strings

* loki: backend: use json-field
2022-05-03 08:03:25 +02:00
Guilherme Caulada
2e9c38c951
Secrets: Add unified secrets table to reencryption (#48582)
* Add secrets table to reencryption

* Add updated column check for b64Secret reencryption

* Use field values for b64Secret to clarify booleans
2022-05-02 18:15:46 -03:00
Artur Wierzbicki
de75dd6aad
Search: remove dev-mode from the feature flag 2022-05-02 23:01:29 +04:00
Ryan McKinley
a8f3b17262
SaveDashboard: remove feature flag for save drawer (#48462) 2022-05-02 09:29:22 -07:00
Guilherme Caulada
2533f21015
DataSource: Fix secure json data reset on datasource update (#48557)
* Fix secure json data reset on datasource update

* Update fillWithSecureJSONData to use DecryptedValues

* Remove unecessary conversion

* Move fillWithSecureJsonData logic to datasource service

* Add sanity check for nil secure json data
2022-05-02 11:29:13 -03:00
Sergey Kostrukov
9047058c43
Auth Proxy: non-ASCII headers encoding tests (#47110) 2022-05-02 13:08:20 +02:00
ying-jeanne
bde368be55
Chore : Replace dashboardid with dashboardUID in annotation API (#48481)
* replace dashboardid with dashboardUID in annotation API

* add some tests

* modify some docs and add uid into get endpoint

* rebase with main

* add map for avoiding too much retrieve on dashboards
2022-05-02 11:35:36 +02:00
Jean-Philippe Quéméner
0a87ef06af
Alerting: add safeguard for migrations that might cause dataloss (#48526)
* Alerting: add safeguard for migrations that might cause dataloss

* add test for panic

* add documentation
2022-05-02 10:38:42 +02:00
Jack Westbrook
39ee365b82
Swagger: Add integrity attributes (#48396) 2022-05-02 09:49:49 +02:00
Karl Persson
de50f39c12
Access Control: Refactor scope resolvers with support to resolve into several scopes (#48202)
* Refactor Scope resolver to support resolving into several scopes

* Change permission evaluator to match at least one of passed scopes
2022-05-02 09:29:30 +02:00
Karl Persson
9622e7457e
Fix permission query for postgres (#48543) 2022-05-02 09:25:23 +02:00
Alexander Weaver
a96510d03c
Alerting: Fix test intermittency caused by port conflicts (#48552)
* Get golang to find an open port for us

* Update pkg/tests/api/alerting/api_notification_channel_test.go

Co-authored-by: gotjosh <josue.abreu@gmail.com>

* Fix merge

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-04-29 12:07:19 -05:00
Andreas Christou
d7c16e06d2
AzureMonitor: Add support for not equals and startsWith operators when creating Azure Metrics dimension filters. (#48077)
* Allow dimension operator selection

- Add dimension operators and function to update the operator in the query
- Add logic to ensure the same dimension cannot be selected multiple times (Azure restriction)
- Add selection component

* Update backend logic to default operation and filter to eq '*'

- This must be done as the ne and sw operators do not work with the wildcard filter

* Add tests on dimension operators

* Correct placement of 'and' when building query

* Add comment and simplify filtering logic

* Allow multiSelect for eq and ne operators

- Pass PanelData to DimensionFields component
- Add logic to retrieve labels from PanelData
- Add MultiSelect component for relevant operators
- Update frontend types to allow filter to be an array of strings
- Update backend types to allow filter to be an array of strings
- Update filter string building

* Improve setting of labels

* Update go tests

* Update frontend tests

- Add panelData mock (to be expanded later)
- Update null check in DimensionFields

* Allow custom value and set default

* Add frontend test and fix lint issues

* Improved handling of options for sw operator

* Remove changes related to multiselect

* Add check on refId to ensure dimension labels are correct for query

* Extract custom hook for setting dimension labels

* Add documentation around Azure Monitor metrics dimensions

* Update MetricQueryEditor tests

- Add missing data prop

* Correctly set field values

* Add additional expect for onQueryChange

* Correctly set operators

- Simplify onFilterInputChange

* Ensure no duplicate filters appear

* Ensure that filters are displayed correctly for saved queries

* Update dimension filter test

* Include additional test around changing dimension labels

* Pass panel data through new metrics query editor
2022-04-29 17:01:13 +01:00
Alexander Emelin
87ae3e0644
Search: handle a couple of corner cases when parsing dashboard data (#48521) 2022-04-29 08:49:38 -07:00
Shirley
da035e823f
CloudWatch: Pass feature toggles to backend (#48547) 2022-04-29 17:47:46 +02:00