6408 Commits
Author SHA1 Message Date
Grot (@grafanabot)andWill Browne 4c16d55e11 allow for appropriate content-type to be set (#36545) (#36550)
(cherry picked from commit 2616580bae)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-07-08 11:35:42 +02:00
Grot (@grafanabot)andSofia Papagiannaki 2671c7d6cd Alerting API: Restrict access to Alertmanager configuration (#36507) (#36516)
* Alerting API: Restrict access to Alertmanager configuration to viewers

(cherry picked from commit fc90d47863)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-07-07 16:56:00 +03:00
Grot (@grafanabot)andWill Browne 350bb10cdd Plugins: Improve API response for plugin assets (#36352) (#36505)
* improve API response for plugin assets 403

* remove unnecessary newline

(cherry picked from commit 333d520528)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-07-07 12:40:37 +02:00
Grot (@grafanabot)andDimitris Sotirakis fd515d1318 Folders: Return 409 Conflict status when folder already exists (#36429) (#36461)
* Return 409 Conflict when trying to post folder that already exists

* Fix tests

* Update documentation for new error message in folders api

(cherry picked from commit a18d3007a7)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-07-06 11:32:58 +02:00
Grot (@grafanabot)andZoltán Bedi 4efbf432a4 CloudwatchLogs: send error down to client (#36277) (#36438)
* CloudwatchLogs: send error down to client

* Move error handling down to startLiveQuery

(cherry picked from commit 0ae8a85828)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-07-05 16:34:29 +02:00
Grot (@grafanabot)andTorkel Ödegaard 61ea316f10 DateFormats: Fix reading correct setting key for use_browser_locale (#36428) (#36434)
(cherry picked from commit 4932b9dfa4)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-07-05 15:27:35 +02:00
Leonard Gram ab26f9c820 Azure OAuth: debug logs for user information (#36389) (#36394)
(cherry picked from commit 09a96ad2ad)
2021-07-05 11:05:49 +02:00
Grot (@grafanabot)andSofia Papagiannaki 190d7d12e3 Alerting: Fix prometheus API to check folder permissions (#36301) (#36421)
(cherry picked from commit 8a3edf280e)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-07-05 11:31:58 +03:00
Grot (@grafanabot)andSelene fc45cf178e Allow white labeling loading logo (#36174) (#36386)
* Allow to whitelabeling loading logo

* Add loading_logo to documentation

* Change loading_logo to loading_logo_url

(cherry picked from commit ef05596e07)

Co-authored-by: Selene <selenepinillos@gmail.com>
2021-07-05 09:50:57 +03:00
Grot (@grafanabot)andDimitris Sotirakis d03007de01 Dashboards: Add IsFolder field into models.GetDashboardQuery (#36214) (#36388)
* Add IsFolder field into models.GetDashboardQuery

* Reverted folderId - return dummy success when calling get folder with id 0

* Moved condition to upper level - add test

(cherry picked from commit 084c9c8746)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-07-02 19:19:08 +03:00
Grot (@grafanabot)andAndres Martinez Gotor ef45e1016a Remove AWS CW client cache (#36311) (#36372)
(cherry picked from commit 30dc4025c2)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-07-02 10:35:28 +02:00
acd0d18552 live: add allowed_origins option (#36318) (#36327)
* live: add allowed_origins option (#36318)

(cherry picked from commit 483418dbb0)

* Profile: Fix failing FE reducer test (#36331)

(cherry picked from commit 4434eeaf59)

* update option description to only commit to wilcard symbol for now

* Chore: dummy change to trigger Drone sync

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2021-07-01 13:30:27 +02:00
Grot (@grafanabot)andSarah Zinger f1db840fe1 Azure monitor: ensure that time column has a name (#36144) (#36217)
Fixes bug when switching from Timeseries to Table view when viewing Azure Monitor Metrics Data.

(cherry picked from commit 493d35ccc6)

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2021-06-28 11:45:26 -04:00
Grot (@grafanabot)andGanesh Vernekar d2a59bd78d Alerting: Add additional newlines to Microsoft Teams notification message where necessary (#36126) (#36137)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 8fe58fc2e3)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-24 17:42:44 +02:00
Grot (@grafanabot)andKyle Brandt 42471f1031 Alerting: Change __value__ label to __value_string__ annotation and add ValueString variable in notifications (#36032) (#36105)
* Alerting: Allow __value__ label in notifications
was being removed by removePrivateItems
discoverd in #36020, but issue is not about that specifically

* __value__ label to __value_string__ annotation
and .ValueString extended property for notifications

(cherry picked from commit 19f764739b)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-06-24 09:40:48 +02:00
Grot (@grafanabot)andAlexander Emelin 24c98204e3 Live: rely on app url for origin check (#35983) (#36089)
(cherry picked from commit 5bbf45592e)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-06-23 20:30:40 +03:00
Grot (@grafanabot)andSofia Papagiannaki b3611ab407 Alerting: fix conflicting folder and dashboard permissions during migration (#35967) (#36013)
* Alerting: Fix conflicting user and team permissions

* Avoid duplicate perrmissions

* Fix lint

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>

Co-authored-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 91cf062d0b)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-22 09:05:23 +02:00
Grot (@grafanabot)andying-jeanne 354727ae32 [MYSQL] convert explicitely smallint and tinyint (#35897) (#35997)
* [MYSQL] convert explicitely smallint and tinyint

* clean up code

* fix comments

(cherry picked from commit 73fdd9dc22)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2021-06-21 18:30:16 +02:00
Grot (@grafanabot)andGanesh Vernekar 07bfa64bb4 Alerting: Decouple default template from channel tests (#35239) (#35973)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 33d6e11175)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-21 04:54:29 +02:00
Grot (@grafanabot)andRyan McKinley 80db97f134 SQL: Fixes issues with showing value column name prefix in legends (#35839) (#35922)
* rename strategy

* Update pkg/tsdb/sqleng/sql_engine.go

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>

* more strict constraints

* Fixed so that it works on multi series results

* only apply the logic when original query returns 3 fields

* removed part of comment

* Update mysql test

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 1d6e99bc95)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-06-18 08:28:23 +02:00
Grot (@grafanabot)andDavid Parrott 2b0291f997 Alerting: recalculate EndsAt (#35830) (#35898)
* setEndsAt

* one more test case

* add should clause to tests

(cherry picked from commit 4732f832f7)

Co-authored-by: David Parrott <stomp.box.yo@gmail.com>
2021-06-17 19:26:32 +02:00
Grot (@grafanabot)andSofia Papagiannaki a4d72f0e5d Alerting: Fix alert permissions migration (#35869) (#35881)
* Alerting: Fix alert permissions migration

for MySQL >= 5.7 and PostgreSQL

* Do not use import struct

(cherry picked from commit 5e534d212c)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-17 16:34:20 +03:00
Grot (@grafanabot)andMarcus Efraimsson 1569452425 Chore: Improve save dashboard error messages (#35780) (#35819)
Includes panel and dashboard id in alert
extractor errors.
Logs all non-400 dashboard errors.

Fixes #35751

(cherry picked from commit 477d4197fb)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-16 15:19:27 +02:00
Grot (@grafanabot)andAndrej Ocenas c5cff65563 CloudWatch/Logs: Fix missing response data for log queries (#35724) (#35746)
(cherry picked from commit 9a3e3014dd)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-06-16 13:58:48 +02:00
Grot (@grafanabot)andGanesh Vernekar 9252d6b05f Alerting: Fill the empty GeneratorURL (#35740) (#35803)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit dcd4bf1615)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-16 12:27:49 +02:00
Grot (@grafanabot)andSofia Papagiannaki 242577ad33 Alerting: Fix updating alert rule properties with missing/zero values (#35512) (#35776)
* Fix deleting labels and annotations

* Add test

* Keep no data and error start if not provided

* Allow setting interval and for to zero during rule updates

(cherry picked from commit e5a5b8e3fe)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-15 21:42:25 +03:00
Grot (@grafanabot)andSofia Papagiannaki 6a9f5b260d Alerting: Add error recovery during rule evaluations (#35450) (#35773)
* Alerting: Eval recovery after query failure

* Apply suggestions from code review

(cherry picked from commit abe35c8c01)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-15 19:54:33 +03:00
Grot (@grafanabot)andAndres Martinez Gotor 15c9d4e3e2 Avoid log entry if not set for debug (#35741) (#35748)
(cherry picked from commit 6b786e7f68)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-06-15 18:01:38 +02:00
Grot (@grafanabot)andWill Browne 86be18a668 Plugins: fix test with bad symlink target (#35737) (#35755)
(cherry picked from commit adbb15a3a7)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-15 16:16:49 +02:00
Grot (@grafanabot)andDomas dd24946f0f Fix: fix loading symbolically linked plugins (#35635) (#35693)
(cherry picked from commit 5b5cb94809)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-06-15 13:24:53 +03:00
Grot (@grafanabot)andWill Browne c9b8c851fa Plugins: Ignore symlinked folders when verifying plugin signature (#34434) (#35719)
* add check + test

* fix test

* add manifest

* fix linter

* add nolint

* separate err cond checks

* only collect relevant plugin files

* skip symlinks

* refactor

* add missing test files + enable scanning Chromium.app/

* remove test since case already covered

* remove unnecessary changes from before

* refactor

* remove comment

(cherry picked from commit 303352a89b)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-15 12:19:24 +02:00
Grot (@grafanabot)andSofia Papagiannaki eb018c417d Alerting: Fix alert migration RefID generation (#35667) (#35679)
* Alerting: Fix alert migration RefID generation

if the alert has more than 26 conditions

* Remove TODO comment

* Make similar change under pkg/expr

(cherry picked from commit c997f646cc)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-15 11:49:40 +03:00
Grot (@grafanabot)andTobias Skarhed 4c274d1615 Login: Require user to not be signed in to get request password email (#35421) (#35672)
(cherry picked from commit 7f882eea05)

Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
2021-06-14 18:25:24 +02:00
Grot (@grafanabot) 7a3163da1f Alerting: Increase alertmanager_conf column size if mysql (#35657) (#35668)
fixes #35583

(cherry picked from commit 8a3d7b6446)
2021-06-14 17:30:17 +02:00
Grot (@grafanabot)andSofia Papagiannaki 732f794e16 Alerting: fix postgres migration on conflict (#35556) (#35653)
(cherry picked from commit 423474325a)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-14 18:09:27 +03:00
Marcus EfraimssonandJavier Palomo 906af3bf4b [v8.0.x] Datasource: Add support for max_conns_per_host in dataproxy settings (#35520) (#35573)
Allow configuring dataproxy.max_conns_per_host for HTTP data sources.

Ref #35519
Ref #35257

(cherry picked from commit 6531424c72)

Co-authored-by: Javier Palomo <javier.palomo@grafana.com>
2021-06-11 17:18:44 +02:00
Grot (@grafanabot)andMarcus Efraimsson 601b9e3e8a Postgres/MySQL/MSSQL: Fix concurrent map writes panic (#35510) (#35562)
Fixes panic/fatal error concurrent map writes in SQL data sources when multiple
queries are executed concurrently and you interpolate SQL query before executing it.

Fixes #35469

(cherry picked from commit 0611207f3b)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-11 15:24:06 +02:00
Grot (@grafanabot)andStephanie Closson 8a2e2aa063 Fix: only recurse a symbolic link if it is a directory (#35455) (#35521)
* only recurse a symbolic link if it is a directory

* added test for detecting valid plugins using lib dirs with symbolic links in them (like oracle)

* fix linting errors

* added extra checks as per code-review

(cherry picked from commit 83f26e9ce2)

Co-authored-by: Stephanie Closson <srclosson@gmail.com>
2021-06-10 17:54:50 +02:00
Grot (@grafanabot)andshuotli ded96ea901 Upgrade ARG API version (#35464) (#35492)
(cherry picked from commit 05f3985108)

Co-authored-by: shuotli <63325084+shuotli@users.noreply.github.com>
2021-06-10 12:56:38 +02:00
Grot (@grafanabot)andMarcus Efraimsson 422e388fa2 Datasource: Fix storing timeout option as numeric (#35441) (#35481)
#31871 introduced support for configuring timeout in seconds
for HTTP data sources. That had a bug where backend expected
a numeric timeout value where it was actually stored as a
string. This should resolve this by requiring input to be
numbers, storing input as numeric and falling back to string
value if there's no numeric value.

Ref #31871

(cherry picked from commit d15d87db8a)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-10 10:51:47 +02:00
Grot (@grafanabot)andErik Sundell ad6f9a0c32 Cloudwatch: Fix duplicated time series (#35433) (#35480)
* make sure queries are only ran once

* test aliases

* use correct dates

(cherry picked from commit eff2410bae)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-06-10 10:48:16 +02:00
Grot (@grafanabot)andDimitris Sotirakis 1bdd2c54d9 HTTP Client: Introduce go-conntrack into http client provider (#35314) (#35477)
* Introduce go-conntrack into http client provider

* Fixes according to reviewer's comments

* Fixes according to reviewer's comments

(cherry picked from commit 7cdf8b3705)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-06-10 10:21:30 +02:00
Grot (@grafanabot) c4075fe2e3 Alerting/SSE: Fix "count_non_null" reducer validation (#35451) (#35457)
fixes error "reducer 'count_non_null' in condition 2 is not a valid reducer"

(cherry picked from commit f4e9dcd40b)
2021-06-09 21:06:07 +02:00
Grot (@grafanabot)andAndres Martinez Gotor f4750c7a6b Fix missing defaultRegion (#35436) (#35440)
(cherry picked from commit 086309700e)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-06-09 17:44:32 +02:00
Grot (@grafanabot)andMarc Bachmann 4fca76a631 [v8.0.x] Postgres/MySQL/MSSQL: Fix annotation parsing for empty responses (#35367) (#35430)
* fix sql annotation parsing for empty responses

* fix backend when no data returned

* add back frontend changes

Co-authored-by: Ying WANG <ying.wang@grafana.com>
(cherry picked from commit 9a5e10e6fb)

Co-authored-by: Marc Bachmann <marc.brookman@gmail.com>
2021-06-09 17:39:33 +02:00
Grot (@grafanabot)andWill Browne ed605c97f9 Plugins: Ignore trailing slash in root URL check (#35338) (#35402)
* ignore trailing slash in root URL check

* apply pr feedback

(cherry picked from commit 873e20b7ae)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-09 10:22:24 +02:00
Grot (@grafanabot)andSofia Papagiannaki 4c2822e5b7 Alerting: Allow rules with same title across folders (#35270) (#35281)
* Alerting: Allow rules with same title across folders

* Add test

(cherry picked from commit 8cda1f5153)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-05 19:49:34 +03:00
Grot (@grafanabot)andSofia Papagiannaki 557c310c8c Alerting: Recact html responses (#35277) (#35282)
(cherry picked from commit fba90b8f9b)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-04 21:29:23 +03:00
Grot (@grafanabot)andGiordano Ricci 7f410cceee Elasticsearch: Fix min_doc_count value when alerting (#35254) (#35264)
* Elasticsearch: Fix min_doc_count value when alerting

* Add tests

(cherry picked from commit 7a304223e6)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-06-04 17:10:02 +02:00
Grot (@grafanabot)andSofia Papagiannaki 7eda7945d3 Alerting: Fix notification channel migration and handle case when Alertmanager default configuration is absent (#35086) (#35246)
* Fix dashboard alert and nootifier migration for MySQL

* Fix POSTing Alertmanager configuration if no current configuration exists

in case the default configuration has not be stored yet
or has failed to get stored

* Change CreatedAt field type

(cherry picked from commit 15c55b0115)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-04 16:41:28 +03:00