Commit Graph

6373 Commits

Author SHA1 Message Date
Marcus Efraimsson
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
Grot (@grafanabot)
da8d9e6854 Renderer: add version information (#34964) (#35245)
* Renderer: add version information

* fix alerting test

(cherry picked from commit 5f6c172b5a)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-06-04 14:27:58 +02:00
Grot (@grafanabot)
e3ffea3f1b AzureMonitor: fix Azure Resource Graph queries in Azure China (#35235) (#35244)
* Optimize Azure Monitor routes

* Update API version compatible with Azure China

(cherry picked from commit 412bcf1fb0)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2021-06-04 13:57:14 +02:00
Grot (@grafanabot)
bc49ceddb7 remove incorrect use of grafana-cli logger (#35228) (#35236)
(cherry picked from commit 2e9ad871b3)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-04 11:32:06 +02:00
Grot (@grafanabot)
956f728f61 SSE: Change math expression to accept any value convertible to float (#34996) (#35202)
* SSE: Change math expression to accept any scalar value

* Apply suggestions from code review

* Update test

* Remove TODO

(cherry picked from commit eeb84d09c2)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-06-04 11:49:33 +03:00
Grot (@grafanabot)
7b67612f7d Scuemata: Checking json validity by enabling skipped tests (#34385) (#35226)
* Make sure we don't skip any tests - refactoring

* Remove commented lines

* Move test folder

(cherry picked from commit 4c8ce8a450)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-06-04 10:03:58 +02:00
Grot (@grafanabot)
6c512e1414 Alerting: Expand {{$labels.xyz}} template in labels and annotations (#35159) (#35208)
* Alerting: Expand `{{$labels.xyz}}` template in labels and annotations

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

* Fix annotation not updating for same alert

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 8417088969)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-04 11:05:19 +05:30
Grot (@grafanabot)
4fe55be39e Alerting: Do not hard fail on templating errors in channels (#35165) (#35193)
* Alerting: Do not hard fail on templating errors in channels

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

* Fix review

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit a30e60a0b8)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-03 16:48:37 +02:00
Grot (@grafanabot)
681c2b3338 Chore: Remove endpoints that contain the slug field (#35104) (#35182)
* Chore: Remove endpoints that contain the slug field

* More cleanups

* Lint fixes

* Remove unnecessary funcs

* Cleanup frontend code

* Remove deprecated endpoints from docs

* Revert change according to reviewer's comments

(cherry picked from commit 1c49986b2f)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-06-03 15:57:25 +02:00
Grot (@grafanabot)
5d772ffbe0 Alerting: Don't save Alertmanager config on migration when 0 channels (#35119) (#35180)
* Alerting: Don't save Alertmanager config on migration when 0 channels

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

* Fix review

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit aa4c5bbfe4)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-06-03 19:14:30 +05:30
Grot (@grafanabot)
b04a21b002 Add verbose version flag to list dependencies as well as the version (#34741) (#35176)
* add verbose version flag to list dependencies as well as the version

* Fix typo in the println message

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

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

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
2021-06-03 15:21:13 +02:00
Grot (@grafanabot)
5fe040d26b Chore: Refactor backend plugin manager/tsdb query data (#34944) (#35172)
Move QueryData method into backend plugin manager which HandleRequest uses to
query data from plugin SDK supported data sources. This allowed us to remove a lot
of code no longer needed.

Ref #21510

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
(cherry picked from commit b3e9087557)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-06-03 14:41:42 +02:00
Grot (@grafanabot)
1e533f37ed Security: Update default CSP template and fix firefox CSP issues (#34836) (#35162)
* Security: Update default content_security_policy_template
- Add 'strict-dynamic' back to script-src
- Add ws(s)://$ROOT_PATH to connect-src
- Change onEvent to on-event in angular templates to fix CSP issues in firefox.
- Add blob: to style-src

(cherry picked from commit 8143991b94)
2021-06-03 12:11:14 +01:00
Grot (@grafanabot)
ada0a52a0f fix bad log format (#35150) (#35153)
(cherry picked from commit 057ba4a6e7)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-06-03 10:55:43 +02:00
Grot (@grafanabot)
0546486f31 plugin: add signature status plugin build info (#35128) (#35132)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit ba7aca69f6)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-06-03 08:24:20 +02:00
Grot (@grafanabot)
d97bc8c0a9 SSE: Refactor to simplify Series type (#35063) (#35123)
Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 4093fae99a)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-06-02 19:24:54 +02:00
Grot (@grafanabot)
0924f4e268 live: log error on dashboard subscribe (#35095) (#35117)
(cherry picked from commit 7aee0deb38)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-06-02 18:54:26 +03:00
Grot (@grafanabot)
5bb876f414 Chore: Refactor short url api test (#35051) (#35066) 2021-06-01 20:58:45 +02:00
Grot (@grafanabot)
adfb3d4e21 InfluxDB: Flux: timestamp-column has to be first in dataframes (#35036) (#35053)
(cherry picked from commit 38b030e2a4)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-06-01 18:09:30 +02:00
Grot (@grafanabot)
abc13765b9 Short URL: Fix so that orgId is included in generated short URL (#34696) (#35042)
Fixes #33813

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 0d1b35f99e)

Co-authored-by: Jan Jansen <farodin91@users.noreply.github.com>
2021-06-01 15:00:11 +02:00
Domas
a108647836 Alerting: check upstream response content type in lotex proxy (#34760) (#34842)
(cherry picked from commit 347273cdea)
2021-06-01 11:25:16 +03:00
Grot (@grafanabot)
0b02a7e918 Test datasource: Returns always float values (#34986) (#35001)
(cherry picked from commit 51afde34bd)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-05-31 20:19:09 +03:00
Grot (@grafanabot)
eae88f8ce8 Alerting: Migrate tags as labels and not annotations (#34990) (#34992)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit a23674ef99)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-05-31 16:43:10 +02:00
Grot (@grafanabot)
ddb6922773 Oauth: Assign role from GF_USERS_AUTO_ASSIGN_ORG_ROLE for Azure AD Oauth (#34838) (#34938)
* 30555:Assign correct role with environment variable GF_USERS_AUTO_ASSIGN_ORG_ROLE

* 30555:Remove unused condition

(cherry picked from commit 48f6d6f7e6)

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-05-31 15:18:24 +02:00
Grot (@grafanabot)
765655fefd Alerting: Migrate paused alerts to silences (#34898) (#34987)
* Alerting: Migrate paused alerts to silences

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

* Fix lint

Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit 7c25465b3a)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-05-31 14:32:41 +02:00
Grot (@grafanabot)
ba313788d5 fix permissions + add link for admins (#34906) (#34981)
(cherry picked from commit 98c849d4cc)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-05-31 12:54:59 +02:00
Grot (@grafanabot)
0df47643fd [Alerting]: fix/cleanup API examples (#34588) (#34970)
(cherry picked from commit 355be158b7)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-05-31 11:56:00 +03:00
Grot (@grafanabot)
2335c3d0d5 Alerting: Add support for configuring avatar URL for the Discord notifier (#33355) (#34940)
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit badec6c6ad)

Co-authored-by: Chip Wolf ‮ <hello@chipwolf.uk>
2021-05-31 09:02:32 +02:00
Grot (@grafanabot)
216f018377 Rename: Status grid to history (#34864) (#34953)
(cherry picked from commit 4972e0f6a1)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-05-29 21:03:37 +02:00
Grot (@grafanabot)
5e46bbe823 [Dashboard] Revert feature toggle trimdefaults (#34888) (#34937)
* Revert "solve comments and retrigger the test"

This reverts commit f08d2d9eca.

* Revert "update api doc"

This reverts commit cc09ceb853.

* Revert "remove post trim"

This reverts commit 46fe8ed596.

* Revert "fix typo"

This reverts commit 3b3ceee16e.

* Revert "Apply suggestions from code review"

This reverts commit 3b7f3b8e15.

* Revert "update comments"

This reverts commit b9c6260876.

* Revert "update doc"

This reverts commit 8e4c4d7c93.

* Revert "remove feature toggle + add libraryPaneldefinition"

This reverts commit d01cfcc2ed.

* fix some typos

* Update public/app/features/dashboard/components/ShareModal/ShareExport.tsx

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Update docs/sources/dashboards/export-import.md

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>

* fix comments

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit b391e43472)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2021-05-29 16:59:06 +02:00
Grot (@grafanabot)
8fef4d7a8a alerting: fixes per-receiver metric cardinality (#34915) (#34924)
(cherry picked from commit cc38613ba4)

Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
2021-05-28 18:54:30 +02:00
Grot (@grafanabot)
4a67bfc102 Alerting/consistent api errors (#34858) (#34920)
* consolidates alertmanager api errors

* util & testing consistent errors

* consistent errors for rest of ngalert apis

* updates expected errors in testware

* bump ci

* linting

* unrelated: dashboard.go lint

(cherry picked from commit 9aca032d10)

Co-authored-by: Owen Diehl <ow.diehl@gmail.com>
2021-05-28 12:20:46 -04:00
Joan López de la Franca Beltran
6dc4e4d563 Usage Stats: Make the UsageStatsService extension point more flexible (#34778) (#34895)
* Usage Stats: Rename service to use a more idiomatic name

* Usage Stats: Update MetricsFunc definition and implementations

* Revert "Usage Stats: Rename service to use a more idiomatic name"

This reverts commit 910ecce3e8.

* Usage Stats: Update MetricsFunc definition and implementations

(cherry picked from commit f601921670)
2021-05-28 17:47:47 +02:00
Grot (@grafanabot)
4c967fe718 Alerting: Extract values from MD expr alerts (#34757) (#34908)
When using mulit-dimensional Grafana managed alerts (e.g. SSE math) extract refIds values and labels so they can be shown in the notification and dashboards.

(cherry picked from commit b47e7d12e6)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-05-28 11:34:59 -04:00
Grot (@grafanabot)
e1eebdcf75 Alerting: Do no hard fail on finding discontinued channels on migration (#34894) (#34902)
Signed-off-by: Ganesh Vernekar <ganeshvern@gmail.com>
(cherry picked from commit ad6648b649)

Co-authored-by: Ganesh Vernekar <15064823+codesome@users.noreply.github.com>
2021-05-28 16:39:45 +02:00
Grot (@grafanabot)
c767dedffd live: fix log message (#34879) (#34883)
(cherry picked from commit b73d168753)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-05-28 17:25:23 +03:00