Commit Graph

6680 Commits

Author SHA1 Message Date
Serge Zaitsev
abfdfcf405
Plugins: Support multiple HTTP methods in plugin.json routes (#39069)
* Fix: support comma-separated methods in plugin.json

* update docs about multiple methods per route
2021-09-13 13:32:11 +02:00
sam boyer
f8d79d301c
Rename Family to Panel in models.cue (#39111) 2021-09-12 14:34:33 -04:00
Ivana Huckova
4952f6fc58
Prometheus: Add interpolation for built-in-time variables to backend (#39051)
* Add grafana variable interpolation to backend

* Remove newlines
2021-09-10 22:56:15 +02:00
Carl Bergquist
cbf16bebc6
CDN: always look for files in the root folder (#39092)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2021-09-10 16:48:13 +02:00
Ryan McKinley
6bda64cb19
Grafana: include a built-in backend datasource (#38571) 2021-09-10 07:44:47 -07:00
Dimitris Sotirakis
ba9d5540b8
Datasources: Introduce response_limit for datasource responses (#38962)
* Introduce response_limit for datasource responses

* Fix lint

* Fix tests

* Add case where limit <= 0 - added parametrized tests

* Add max_bytes_reader.go

* Use new httpclient.MaxBytesReader instead of net/http one

* Fixes according to reviewer's comments

* Add tests for max_bytes_reader

* Add small piece in configuration.md

* Further fixes according to reviewer's comments

* Fix linting - fix test
2021-09-10 16:51:06 +03:00
Alexander Emelin
5fcc9fe193
temporary switch to alternative jsonpath implementation (#39090)
to work with go1.16 and avoid replace in go.mod
2021-09-10 16:24:31 +03:00
Sofia Papagiannaki
7af329f385
Alerting: Fix API specification (#38753)
* Alerting: Fix API spec

* Add missing status codes
2021-09-10 12:46:02 +03:00
Hugo Häggmark
fc73bc1161
LibraryElements: Enables creating library elements with specific UID (#39019)
* LibraryPanels: Enables create/update library panels with specific UID

* Chore: added check for uid length after PR comments

* Refactor: creates IsShortUIDTooLong function

* Refactor: adds UID to PATCH endpoint

* Refactor: clarifies the patch code

* Refactor: changes  after PR comments
2021-09-10 11:22:13 +02:00
Sergey Kostrukov
06a616e630
Update Azure SDK with bug fixes (#38952) 2021-09-09 17:32:36 +01:00
gotjosh
39a3bb8a1c
Alerting: Persist notification log and silences to the database (#39005)
* Alerting: Persist notification log and silences to the database

This removes the dependency of having persistent disk to run grafana alerting. Instead of regularly flushing the notification log and silences to disk we now flush the binary content of those files to the database encoded as a base64 string.
2021-09-09 17:25:22 +01:00
Alexander Emelin
3ee861f57e
Live: declarative processing pipeline, input -> frames -> output, toggle protected POC (#37644) 2021-09-09 19:19:29 +03:00
Carl Bergquist
d19f33b52f
Annotations: don't log context.Cancelled as an error when cleaning up (#39024)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
2021-09-09 18:13:14 +02:00
Sofia Papagiannaki
b56bf83c19
Alerting: Fix notification channel migration (#38983) 2021-09-09 18:53:06 +03:00
jcolladokuri
aa45eebf3d
Azure Monitor: changed ARG API version to 2021-06-01-preview (#38951)
* changed ARG API version to 2021-06-01-preview

* Fixing lint error
2021-09-09 17:00:16 +02:00
Kyle Brandt
fb14769383
Macaron: Continue on invalid slice type to avoid panic (#39004)
Makes the panic go away.
Otherwise I get a reflect: call of reflect.Value.Interface on zero Value
2021-09-09 10:32:18 -04:00
Todd Treece
6e667cacee
Alerting: Skip query cache for alert queries (#39010) 2021-09-09 16:16:05 +02:00
Yuriy Tseretyan
6c2884ac37
Alerting: Fix notifier tests to close the temp file (#38992) 2021-09-09 09:56:42 -04:00
Serge Zaitsev
4c921cf120
remove default return handler from macaron (#38887) 2021-09-09 15:41:34 +02:00
Kevin Minehart
792fa63725
set opts.version after getting version from package.json (#39038) 2021-09-09 15:40:08 +02:00
Giordano Ricci
dc36f15fbb
Prometheus: Revert stepMode functionality (#38982)
* Revert "Prometheus: add functionality to specify desired step interval in dashboards panels (#36422)"

This reverts commit ddf5b65c51.
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>

* Revert "Explore: add functionality for supporting different step modes in prometheus (#37829)"

This reverts commit f433cfd8d9.
Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>

* Revert stepMode BE implementation from #36796
Co-authored-by: "Ivana Huckova" <ivana.huckova@gmail.com>
2021-09-09 14:05:08 +02:00
Andrej Ocenas
91a67ab0fb
CloudWatch/Logs: Don't group dataframes for non time series queries for non live path (#38915)
* Use the same grouping function in legacy code

* Add error propagation

* Fix tests

* Fix tests
2021-09-08 16:30:55 +02:00
Erik Sundell
5e38b02f94
Cloudwatch: Migrate queries that use multiple stats to one query per stat (#36925)
* migrate queries that use multiple stats - squash commits

* fix typo
2021-09-08 16:06:43 +02:00
Santiago
ae9343f8ae
Clear ngalert configuration table (#38940) 2021-09-08 10:48:50 -03:00
Gabriel MABILLE
8585273c29
AccessControl: Restrict more the access to the data sources configuration tab (#38966)
Co-authored-by: Emil Tullstedt <sakjur@users.noreply.github.com>
2021-09-08 13:15:21 +02:00
George Robinson
5caf6cb369
Change templateCaptureValue to support using template functions (#38766)
* Change templateCaptureValue to support using template functions

This commit changes templateCaptureValue to use float64 for the value
instead of *float64. This change means that annotations and labels can
use the float64 value with functions such as printf and avoid having to
check for nil. It also means that absent values are now printed as 0.

* Use math.NaN() instead of 0 for absent value
2021-09-08 10:46:15 +01:00
Hugo Häggmark
17f9bc138e
LibraryPanels: Fixes update issues related to library panels in rows (#38963) 2021-09-08 10:53:55 +02:00
Will Browne
40643ee023
track signature files + add warn log (#38938) 2021-09-08 08:49:05 +02:00
Djairho Geuens
0383becc46
OAuth: Make generic teams URL and JMES path configurable (#37233)
OAuth: Make generic teams URL and JMES path configurable
2021-09-07 19:57:20 -05:00
Marcus Efraimsson
fbdaf56a84
Postgres/MySQL/MSSQL: Fix region annotations not displayed correctly (#38936)
Fix region annotations not displayed correctly when returning timeend column 
as epoch timestamp and by that making sure that the returned data frame field 
named timeend is treated as time type.

Fixes #38533
2021-09-08 01:54:48 +02:00
Ryan McKinley
9aa03acfa6
Chore: remove sql testdata (#38945) 2021-09-07 16:35:52 -07:00
Alexander Emelin
342b1426e5
live: update centrifuge to v0.18.2 (#38925) 2021-09-07 21:05:24 +03:00
Torkel Ödegaard
51776e6bd3
UsageStats: Add connected users and client (#38811) 2021-09-07 18:50:28 +02:00
Ashley Harrison
b24a4630a6
Chore(Navigation): Add feature toggle for new navigation work (#38929) 2021-09-07 17:24:44 +01:00
Gabriel MABILLE
a811d7d76f
Access control: Add a scope to Data Sources GET endpoint (#38933) 2021-09-07 17:13:11 +02:00
Gábor Farkas
3f0f448201
influxdb: influxql: explicit min-interval check (#38873)
* influxdb: influxql: explicit min-interval check

* added test
2021-09-07 09:49:34 +02:00
ying-jeanne
c989f0fbbe
SQL: Migrate to use SDK contracts (#36635)
* convert SQLs to use sdk contracts

* make draft

* postgres

* intermedia

* get datasourceinfo filled at the beginning of the service

* move the interval into package because of cyclict  import and fix all postgres tests

* fix mysql test

* fix mssql

* fix the test for pr https://github.com/grafana/grafana/issues/35839

* fix some issue about intervalv2 package

* update sql test

* wire migration for SQLs

* add sqls to the background process

* make it register instead of register and start

* revert formatting

* fix tests

* fix linter

* remove integration test

* Postgres test fix

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-09-07 09:35:37 +02:00
Serge Zaitsev
51aeb717a4
inject modified request into context (#38807) 2021-09-07 09:23:16 +02:00
sam boyer
96473004db
Refactor dashboard scuemata to introduce composition slots, allow unspecified panels to validate, and re-enable devenv validation (#38727)
* Re-enable devenv dashboard validation

* Open up dashboard schema composition points

* Introduce composition space at front of scuemata

* Refactor go code to use new composition structure

* Bunch of small cleanups in dashboard.cue

* Enable both base and dist tests of devenv

* Get rid of obsolete CUE loading hacks

* Skip weird failures on these tests

Really don't seem to be testing for what we intend them to be testing
for.
2021-09-06 18:53:42 -04:00
Gábor Farkas
6cab44d73a
InfluxDB: InfluxQL: handle new-alerting better (#37588)
* influxdb: influxql: alert: use already-computed interval-value when available

* reverted by-mistake changed import

* simplify code

now we can rely on DataQuery.Interval always being good

* removed unnecessary test

* fix lint-error
2021-09-06 09:33:07 +02:00
Gábor Farkas
01f1c550bf
old-alert: interval calculation: apply default-min-interval of 1ms (#38835) 2021-09-06 09:24:32 +02:00
Kevin Minehart
d913e46e37
Chore: move build command to importable package (#38726)
* move build command to importable package & clean up
2021-09-03 11:24:21 -05:00
Sofia Papagiannaki
c19d65b1ad
Alerting: some fixes for updating rules via the API (#38764)
* Alerting: Allow updating rules if quota are exceeded

* Check for rule UID uniqueness in POST request
2021-09-02 19:38:42 +03:00
gotjosh
dd502f22eb
Alerting: Fix alert flapping in the internal alertmanager (#38648)
* Alerting: Fix alert flapping in the alertmanager

fixes a bug that caused Alerts that are evaluated at low intervals (sub 1 minute), to flap in the Alertmanager.
Mostly due to a combination of `EndsAt` and resend delay.

The Alertmanager uses `EndsAt` as a heuristic to know whenever it should resolve a firing alert, in the case that it hasn't heard
back from the alert generation system.

Because grafana sent the alert with an `EndsAt` which is equal to the `For` of the alert itself,
and we had a hard-coded 1 minute re-send delay (only applicable to firing alerts) this meant that a firing alert would resolve in the Alertmanager before we re-notify that it still firing.

This commit, increases the `EndsAt` by 3x the the resend delay or alert interval (depending on which one is higher). The resendDelay has been decreased to 30 seconds.
2021-09-02 16:22:59 +01:00
Ryan McKinley
e461c722bf
Live: prepend orgId when publishing from HTTP (#38775) 2021-09-01 17:54:34 +02:00
Serge Zaitsev
643c7fa0cb
Chore: update all +build statements (#38782) 2021-09-01 17:38:56 +03:00
Alex Khomenko
ea8d9d77f4
Admin: User list tweaks (#38750)
* Setup filter

* Enable filtering users by active in last 30 days

* Add loading state

* Update last active age strings

* Tweak user list

* Use theme spacing

* Improve table's accessibility

* Add more aria-labels
2021-09-01 16:53:58 +03:00
Will Browne
e39410c094
Cloud-Monitoring: Ensure service gets dependencies (#38788)
* ensure cloud-monitoring gets service dependencies

* all one line
2021-09-01 15:29:21 +02:00
Gabriel MABILLE
9f29241a0c
AccessControl: add one-dimensional permissions to datasources (#38070)
* AccessControl: add one-dimensional permissions to datasources in the backend

* AccessControl: add one-dimensional permissions to datasources in the frontend (#38080)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-01 15:18:17 +02:00
Hugo Häggmark
55e20bbf04
LibraryPanels: Separates name from panel title (#38707)
* LibraryPanels: Separates name from panel title

* WIP

* Chore: fixes update for duplicate lib panels

* Chore: reverts implementation

* Chore: show library options only for library panels

* Chore: ui fixes after PR comments

* Chore: fixes issue when creating library panels
2021-09-01 13:27:43 +02:00