Commit Graph

5899 Commits

Author SHA1 Message Date
Marcus Efraimsson 310ab323c8 Quota: Do not count folders towards dashboard quota (#32519) (#34025) 2021-05-17 13:05:15 +02:00
Grot (@grafanabot) 774ffd939c Annotations: Prevent orphaned annotation tags cleanup when no annotations were cleaned (#33957) (#33975)
Fixes #33948

Co-authored-by: Anatoly Fayngelerin <afayngelerin@dropbox.com>
(cherry picked from commit b0094b325e)

Co-authored-by: afayngelerindbx <38990103+afayngelerindbx@users.noreply.github.com>
2021-05-12 11:52:30 +02:00
Grot (@grafanabot) 0e8d0be72a Add isolation level db configuration parameter (#33830) (#33878)
* add isolation level db configuration parameter

* add isolation_level to default.ini and sample.ini

* add note that only mysql supports isolation levels for now

* mention isolation_level in the documentation

* Update docs/sources/administration/configuration.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>
(cherry picked from commit 7367cfc0a3)

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
2021-05-10 22:27:05 +02:00
Grot (@grafanabot) 8dbc61ed03 dont consider invalid email address a failed email (#33671) (#33681)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 06dc2b24bf)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-05-04 12:43:22 +02:00
Grot (@grafanabot) 2303e0fb18 Remove field limitation from slack notification (#33113) (#33455)
(cherry picked from commit b3ce655b67)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-04-28 08:38:22 +02:00
Carl Bergquist e4d4fa6623 Instrumentation: Add success rate metrics for email notifications (#33359) (#33409)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 58a325a4e4)
2021-04-27 12:10:32 +02:00
Torkel Ödegaard fc11be7250 [v7.5.x]: FrontendMetrics: Adds new backend api that frontend can use to push frontend measurements and counters to prometheus (#33255)
* Backport of https://github.com/grafana/grafana/pull/32593

* Update prometheus.yml
2021-04-23 10:00:48 +02:00
Marcus Efraimsson 2b0cc8c9b4 Postgres: Fix time group macro when TimescaleDB is enabled and interval is less than a second (#33153) (#33219)
Fixing a special case with time group macro when
using TimescaleDB and interval is lower than a second.

Fixes #33124

(cherry picked from commit dd0ba96d7c)
2021-04-21 16:55:59 +02:00
Grot (@grafanabot) f9bbe2fe41 [v7.5.x] Loki: Pass Skip TLS Verify setting to alert queries (#33031)
* WIP (#33025)

(cherry picked from commit 4f7728738e)

* Update pkg/tsdb/loki/loki.go

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-04-21 15:17:02 +02:00
Grot (@grafanabot) 5dcfad56cf Auth: Don't clear auth token cookie when lookup token fails (#32999) (#33136)
If LookupToken fails we don't clear the auth token cookie.

Ref #15316

(cherry picked from commit 747f3cd300)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-04-20 09:25:46 +02:00
Grot (@grafanabot) 385bf145d8 fix sqlite3 tx retry condition operator precedence (#32897) (#32952) 2021-04-13 19:12:06 +03:00
Grot (@grafanabot) 7354150b79 Plugins: Allow a non-dashboard page to be the default home page (#32926) (#32945)
* feat: introduce home page redirect if default dashboard

* style: clean up

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

* chore(dashboard): remove obsolete setting import

* docs(config): add home_page description

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
(cherry picked from commit bd74953f0d)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-04-13 17:27:05 +02:00
Dimitris Sotirakis d548282ed5 Alerting: Add ability to include aliases with dashes (/) and at (@) signs in InfluxDB (#32844) 2021-04-09 15:51:12 +02:00
Grot (@grafanabot) 3e67fc8670 Prometheus: Allow exemplars endpoint in data source proxy (#32802) (#32804)
(cherry picked from commit 7a2ab93e7a)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-04-08 18:41:24 +02:00
Grot (@grafanabot) f00e253e6e Fix broken gtime tests (#32582) (#32587)
(cherry picked from commit 71a8579412)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2021-04-01 11:18:59 +02:00
Grot (@grafanabot) d8af326511 gtime: Make ParseInterval deterministic (#32539) (#32560)
* gtime: Make ParseInterval deterministic by using UTC timezone

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 6730558f8c)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-31 17:34:38 +02:00
Grot (@grafanabot) 270660eaa8 API: Return 409 on datasource version conflict (#32425) (#32433)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
(cherry picked from commit 5ec530f3fc)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-03-29 16:46:36 +02:00
Grot (@grafanabot) b0314c0818 API: Return 400 on invalid Annotation requests (#32429) (#32431)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit e1458391bb)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-03-29 16:13:56 +02:00
Grot (@grafanabot) 42d465e38a API: Datasource endpoint should return 400 bad request if id and orgId is invalid (#32392) (#32397)
* return 400 bad request if id and orgId is invalid

Signed-off-by: bergquist <carl.bergquist@gmail.com>
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit eb241b960f)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-03-29 09:22:37 +02:00
Hugo Häggmark 099f5cbf97 LibraryPanels: Adds Type and Description to DB (#32258) (#32288)
* Refactor: adds description to getCreateCommand

* Refactor: Adds type and description fields

* Chore: Updates FrontEnd

* Update pkg/services/librarypanels/database.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Update pkg/services/librarypanels/database.go

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

* Chore: fixes backend linting error

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 7f5487a461)
2021-03-24 14:57:02 +01:00
Grot (@grafanabot) 15ee6280db LibraryPanels: Prevents deletion of connected library panels (#32277) (#32284)
* LibraryPanels: Prevents deletion of connected library panels

* Refactor: adds the delete library panel modal

* Chore: updates after PR comments

(cherry picked from commit 376ed8a381)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-03-24 13:42:19 +01:00
Grot (@grafanabot) 80a4d4296c Notifications: InfluxDB - Fix regex to include metrics with hyphen in aliases (#32224) (#32262)
* Notifications: InfluxDB - fix regex to include metrics with hyphen

* Add hyphen check in tests

(cherry picked from commit fdaac2b8fb)
2021-03-23 15:51:49 +01:00
Kyle Brandt 47c10bab65 SSE/InfluxDB: Change InfluxQL to work with server side expressions (#31691) (#32102)
* SSE/InfluxDB: Change InfluxQL to work with server side expressions
updates the request to handle EpochMS as the time range (which is what expressions sends)
and the response to use millisecond timestamps instead of seconds.
fixes #31604
similar to https://github.com/grafana/grafana/pull/31455

(cherry picked from commit 026bf1f9ca)
2021-03-23 11:38:19 +01:00
Carl Bergquist 5039c90b8c HttpServer: Make read timeout configurable but disabled by default (#31575) (#32154)
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 862cd473eb)
2021-03-19 12:01:37 +01:00
Grot (@grafanabot) fbf3469e80 Fix loading timezone info on windows (#32029) (#32149)
* Fix loading timezone info on windows

* Move setting zoneinfo to config load

* Construct proper file path

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit ea484312a0)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2021-03-19 10:41:26 +01:00
Grot (@grafanabot) bc463d6a2f SQLStore: Close session in withDbSession (#31775) (#32108)
* SQLStore: Close session in withDbSession

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

* SQLStore.WithDbSession: Never use session from context

Signed-off-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 5a0780801b)

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-19 10:11:26 +01:00
Grot (@grafanabot) ca31570dcc LibraryPanels: Improves the Get All experience (#32028) (#32093)
* LibraryPanels: Improves Get All Api

* Refactor: using useReducer instead of useState

* Refactor: adds Pagination to UI

* Tests: adds reducer tests

* Refactor: using Observable instead to avoid flickering

* Refactor: moves exclusion to backend instead

* Chore: changing back the perPage default value

(cherry picked from commit f508a16a43)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-03-18 11:47:23 +01:00
Giordano Ricci 0954e1c277 Chore: Collect elasticsearch version usage stats (#31787) (#32063)
* Chore: Collect elasticsearch version usage stats

* Fix lint error

* use GetDataSources from sqlstore

* Apply review suggestions

* Return error if datasource type is not specified

* Update pkg/services/sqlstore/datasource.go

* fix undefined var

(cherry picked from commit 0c2045109e)
2021-03-17 17:00:35 +00:00
Grot (@grafanabot) 3c8daef653 Data proxy: Fix encoded characters in URL path should be proxied encoded (#30597) (#32060)
Fix encoded characters in URL path should be proxied as encoded in the data proxy.

Fixes #26870
Fixes #31438

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit c0edf88f9f)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-03-17 15:02:52 +01:00
Grot (@grafanabot) 30b91296ad [v7.5.x] Auth: Allow soft token revocation (#32037)
* Auth: Allow soft token revocation (#31601)

* Add revoked_at field to user auth token to allow soft revokes

* Allow soft token revocations

* Update token revocations and tests

* Return error info on revokedTokenErr

* Override session cookie only when no revokedErr nor API request

* Display modal on revoked token error

* Feedback: Refactor TokenRevokedModal to FC

* Add GetUserRevokedTokens into UserTokenService

* Backendsrv: adds tests and refactors soft token path

* Apply feedback

* Write redirect cookie on token revoked error

* Update TokenRevokedModal style

* Return meaningful error info

* Some UI changes

* Update backend_srv tests

* Minor style fix on backend_srv tests

* Replace deprecated method usage to publish events

* Fix backend_srv tests

* Apply suggestions from code review

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>

* Minor style fix after PR suggestion commit

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Prettier fixes

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit 610999cfa2)

* Back to the old method to emit app events

Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
2021-03-17 10:18:42 +01:00
Grot (@grafanabot) f570fb2d6f Snapshots: Fix usage of sign in link from the snapshot page (#31986) (#32036)
Fix redirect to login page from snapshot page when not authenticated.

Fixes #28547

(cherry picked from commit a97637a133)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-03-16 17:15:08 +01:00
Erik Sundell 44838f201c Cloudwatch: use shared library for aws auth (#29550) (#31946)
* use sdk for handling auth

* fix broken test

* lint fixes

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
(cherry picked from commit 9dd1d5f553)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-03-12 23:27:32 +01:00
Zoltán Bedi 0af435c61d [v7.5.x] Tempo: Add test for backend data source (#31835) (#31882)
* Tempo: Add test for backend data source (#31835)

(cherry picked from commit 3b6168eb4a)

* Revert tsdb service
2021-03-11 09:45:12 +01:00
Erik Sundell 6ddb62fca1 Cloudwatch: ListMetrics API page limit (#31788) (#31851)
* 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>
(cherry picked from commit d512c5a1b4)

* update go sum

* remove spaces

* revert go.sum
2021-03-10 10:42:49 +01:00
Erik Sundell 0be2177d15 CloudWatch: Restrict auth provider and assume role usage according to… (#31845)
* 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>
(cherry picked from commit 2d660ee502)

* Update docs/sources/datasources/cloudwatch.md

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
2021-03-10 08:59:19 +01:00
Grot (@grafanabot) 3549380bd2 CloudWatch: Add support for EC2 IAM role (#31804) (#31841)
* add support for iam role auth

* add stubbable func

* fix broken test

* goimports

* pr feedback

(cherry picked from commit 13dd9dff50)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-03-09 21:10:55 +01:00
Grot (@grafanabot) 2297e13ac6 Annotations: Make the annotation clean up batch size configurable (#31487) (#31769)
Signed-off-by: bergquist <carl.bergquist@gmail.com>

(cherry picked from commit 3b36636318)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-03-08 14:37:27 +01:00
Grot (@grafanabot) c946c4e372 log skipped, performed and duration for migrations (#31722) (#31754)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit c899bf3592)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-03-07 22:05:58 +01:00
Zoltán Bedi e81a5bc015 Tempo: Convert tempo to backend data source2 (#31733)
This reverts commit c15d1f498a.

(cherry picked from commit 29c998f9eb)
2021-03-05 16:36:36 +01:00
Grot (@grafanabot) be08685e3f Tempo: set authentication header properly (#31699) (#31701)
(cherry picked from commit 53d4acdad2)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-03-04 21:00:15 +01:00
Grot (@grafanabot) dc8d109ce4 Tempo: convert to backend data source (#31618) (#31695)
* 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>
(cherry picked from commit 862f09376f)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-03-04 18:43:41 +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