Compare commits

...

325 Commits

Author SHA1 Message Date
Dimitris Sotirakis
3eed090568 Merge branch 'v9.0.x' into release-v9.0.0 2022-06-15 10:57:21 +03:00
Grot (@grafanabot)
0ab0fe9d16 RolePicker: Fix submenu position on horizontal space overflow (#50769) (#50843)
(cherry picked from commit 2fbe99c1be)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-15 09:20:03 +02:00
Grot (@grafanabot)
8ef7fd3859 backend: add PlaylistUIDs to Playlist; remove playlist IDs from API (#49609) (#50828)
* backend/api: refactor PlaylistId to PlaylistUid
* Add org_id to Get and Update playlist functions
Fix migration - no longer pad the uid; fix mysql syntax

The relevant tests are passing using postgres, mysql and the default sqllite backends, but there are a number of other failing tests when using postgres and myself so I'm not entirely confident with those results.

* fix bad query in GetPlaylistItem and add a test that would have caught the mistake in the first place. Reverted the playlist_uid column addition in playlist_item; it became unnecessary after this PR.

Added default value to the new UID column based on PR feedback.

* break this PRs migration into its own function

* Playlists: Update UI to use the updated API

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
(cherry picked from commit a33a023629)

Co-authored-by: Kristin Laemmert <mildwonkey@users.noreply.github.com>
2022-06-14 15:48:44 -04:00
Grot (@grafanabot)
d78c04c8e6 Remove beta note (#50824) (#50825)
* Remove beta note

Remove manually added Beta note.

* Remove beta

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 39b467b46d)

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2022-06-14 19:41:56 +01:00
Grot (@grafanabot)
1a915c2284 MSSQL: Fix ParseFloat error (#50815) (#50818)
(cherry picked from commit 65a5ac462a)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-06-14 19:55:57 +02:00
Dimitris Sotirakis
700e7e36e3 Modify publish.yml (#50813) 2022-06-14 18:44:03 +02:00
Grot (@grafanabot)
57300f6b6d Metrics: Expose functions to initialize counters at zero (#50122) (#50750)
(cherry picked from commit 97baa6911d)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-06-14 18:07:35 +02:00
Grot (@grafanabot)
ef7148fc4a Formatting: Fixes valueFormats for a value of 0 (#50719) (#50805)
(cherry picked from commit f9d31d0612)

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2022-06-14 17:19:03 +02:00
Dimitris Sotirakis
e35b901ed6 ReleaseNotes: Updated changelog and release notes for 9.0.0 (#50794) (#50799)
* ReleaseNotes: Updated changelog and release notes for 9.0.0

* Update CHANGELOG.md

* Update release-notes-9-0-0.md

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
(cherry picked from commit 0f91864227)

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-06-14 16:56:54 +02:00
Grot (@grafanabot)
d9a53c5b63 Update header (#50787) (#50795)
(cherry picked from commit 0073f1b0b5)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-14 16:38:09 +02:00
Grot (@grafanabot)
5bca6cccd2 "Release: Updated versions in package to 9.0.0" (#50793) 2022-06-14 14:29:35 +00:00
Grot (@grafanabot)
4569ac3056 Docs: Add envelope encryption as breaking change (#50716) (#50749)
* Docs: Add envelope encryption as breaking change

* Minor improvements

* Apply suggestions from code review

Co-authored-by: Tania <yalyna.ts@gmail.com>
(cherry picked from commit fcf6b29987)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-06-14 15:44:46 +02:00
Grot (@grafanabot)
b4f9f19ed1 GrafanaData: Fix week start for non-English browsers (#50582) (#50784)
* grafana-data: Fix start week for non-English browsers

* apply review suggestion

(cherry picked from commit 99c8ce5ab9)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-06-14 15:26:54 +02:00
Grot (@grafanabot)
88188d63c8 rm debug log when publishing live message (#50774) (#50779)
(cherry picked from commit c581f6d945)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-06-14 14:27:11 +02:00
Grot (@grafanabot)
1fb920e02d Loki: Handle invalid query type values (#50755) (#50763)
* loki: more robust query-type handling

* better comment

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
(cherry picked from commit a97f022612)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-14 12:14:26 +02:00
Sven Grossmann
5215514bf3 added opensearch annotations to not use default ui (#50655) (#50751)
(cherry picked from commit d8d3a9c561)
2022-06-14 10:23:08 +02:00
Grot (@grafanabot)
6ac398763a Heatmap: Remove alpha flag from new heatmap panel (#50733) (#50742)
(cherry picked from commit b75cc7a86c)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-14 09:56:45 +02:00
Grot (@grafanabot)
e235af676b Instrumentation: Define handlers for requests that are not handled with named handlers (#50613) (#50744)
Signed-off-by: bergquist <carl.bergquist@gmail.com>

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
(cherry picked from commit b8b6d0e1a1)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2022-06-14 08:10:23 +02:00
Grot (@grafanabot)
1479a46997 Timeseries: Improve cursor Y sync behavior (#50740) (#50741)
(cherry picked from commit 4e4686001b)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-13 22:45:15 -07:00
Grot (@grafanabot)
c62ccbd988 Alerting: Fix rendering issues in OpenAPI docs (#50630) (#50725)
* Clean up status codes

* Missing consumes tag

* Regenerate

* Fix incorrect documented responses and missing UI elements

* Fix response docs

* Fix wrong response copy paste

* Regenerate

* Temporarily revert

(cherry picked from commit 17e76b06ff)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-13 15:05:59 -05:00
Grot (@grafanabot)
9f0908f6fd SearchV2: support keyboard navigation (#49650) (#50715)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 402b5ce4c6)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-13 10:02:37 -07:00
Jack Baldry
1f9afb4f43 Use more relevant links to legacy alerting documentation (#50607) (#50695)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 4cc3bc37a0)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-06-13 18:29:11 +02:00
Grot (@grafanabot)
da9dca03ea Alerting: add right provenance when creating mute timings (#50707) (#50714)
(cherry picked from commit 1ed7280363)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-13 18:18:10 +02:00
Grot (@grafanabot)
d5eb7cc42a Alerting: remove unused function in alert rule store (#50696) (#50705)
(cherry picked from commit ed6a887737)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-13 18:06:47 +02:00
Grot (@grafanabot)
de0b107188 Never set gridPos to null (#50400) (#50709)
(cherry picked from commit 759e3ec4fa)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-13 17:55:47 +02:00
Grot (@grafanabot)
cffb340c14 logs: better hasLogsVolumeSupport check (#50676) (#50704)
(cherry picked from commit d872aa993d)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-13 17:34:40 +02:00
Grot (@grafanabot)
5c3bac348c OAuth: Redirect to login if no oauth module is found or if module is not configured (#50661) (#50702)
* OAuth: Redirect to login if no oauth module is found or if module is not
configured

* OAuth: Update test to check for location header

(cherry picked from commit 95a4c4a4d6)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-06-13 17:14:49 +02:00
Grot (@grafanabot)
efdde61c52 Docs: Update documentation now create functionality has moved (#50663) (#50693)
* Update documentation now + button functionality has moved

* Updates following comments

(cherry picked from commit 27e3e79661)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-13 16:30:42 +02:00
Ivana Huckova
95b545908f Loki, Prometheus: Show Query patterns in all editor modes (#50263) (#50653) 2022-06-13 15:47:54 +02:00
Grot (@grafanabot)
da76c87bfe Loki: Fix showing of duplicated label values in dropdown in query builder (#50680) (#50688)
* Prometheus,Loki: Fix showing of duplicated values in dropdown

* Use different more readable solution

* Update

(cherry picked from commit 77bdbe1dea)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-13 15:47:36 +02:00
Carl Bergquist
001f3709ae Instrumentation: Add feature toggle for logging requests instrumented as unknown (#50566) (#50670)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 2d6e69226b)
2022-06-13 15:19:07 +02:00
Grot (@grafanabot)
4eeb6750f0 add missing return (#50667) (#50675)
(cherry picked from commit 8da9b4f2b5)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-06-13 14:27:45 +02:00
Grot (@grafanabot)
4d1ee06b1b Prometheus: Don't show undefined for step in collapsed options in query editor when value is "auto" (#50511) (#50658)
(cherry picked from commit bd04b776b5)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-13 14:26:04 +02:00
Grot (@grafanabot)
b5c56f6371 "Release: Updated versions in package to 9.0.0" (#369) 2022-06-13 13:06:48 +01:00
Dan Cech
bc2f941004 clean up duplicated user creation code (#50178) (#50327)
* clean up duplicated user creation code

* remove unused duplicate getOrCreateOrg function

* fix up tests

(cherry picked from commit 9350ab781c)
2022-06-13 07:12:00 -04:00
Grot (@grafanabot)
5390fa57e9 Expression: Execute hidden expressions (#50636) (#50659)
(cherry picked from commit ede7b29db5)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-06-13 11:39:56 +02:00
Grot (@grafanabot)
b4dba8d14e logs: histogram: handle backend-mode queries (#50535) (#50650)
(cherry picked from commit a0e5a4eba2)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-13 08:50:50 +02:00
Grot (@grafanabot)
98c540f51e Loki: Fix issues with using query patterns (#50414) (#50646)
* WIP

* Loki: Fix running of query patterns

* Remove console.log

* Add test

* Update empty line filter test

(cherry picked from commit 88279dda1c)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-11 21:53:46 +02:00
Grot (@grafanabot)
342af69edb Explore: Fix log context scroll to bottom (#50600) (#50645)
* Explore: Fix log context scroll to bottom

* Update

(cherry picked from commit 1231e0dd69)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-11 21:50:53 +02:00
Grot (@grafanabot)
5ca6b7cd2d Panels: Fixes issue with showing 'Cannot visualize data' when there issue really was no data (#50485) (#50615)
(cherry picked from commit 56a9994a13)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-10 14:36:00 -07:00
Grot (@grafanabot)
d301b6611f SearchV2: move search parameters to a nested object (#50561) (#50635)
(cherry picked from commit b6f97e8101)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-10 14:31:47 -07:00
Grot (@grafanabot)
af33b9ec89 RBAC: Inheritance permission migration should handle empty managed roles (#50611) (#50622)
* Make inheritance permission migration more robust

* Better fix

* Add more tests to the migration

* Add removed test case

* Add test case for empty role in empty org

* Handling the role.ID 0 case with a log

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 307a0d4538)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-10 19:18:02 +03:00
Grot (@grafanabot)
d32ca6a159 RBAC: Inheritance permission migration should handle empty managed roles (#50611) (#50621)
* Make inheritance permission migration more robust

* Better fix

* Add more tests to the migration

* Add removed test case

* Add test case for empty role in empty org

* Handling the role.ID 0 case with a log

Co-authored-by: Jguer <joao.guerreiro@grafana.com>

Co-authored-by: Jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 307a0d4538)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-10 17:34:17 +02:00
Grot (@grafanabot)
1a928a70ba Dashboard: Clean up state after deletion (#50316) (#50625)
* Dashboard: Clean up after deletion

* cleanup

* rename cleanUp function

(cherry picked from commit a832b92988)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-06-10 17:19:16 +02:00
Grot (@grafanabot)
fa4fa0bf4f doc fix (#50624) (#50626)
(cherry picked from commit 336c9fd513)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-06-10 17:17:40 +02:00
Grot (@grafanabot)
0604765bea doc fix (#50624) (#50627)
(cherry picked from commit 336c9fd513)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-06-10 17:17:34 +02:00
Grot (@grafanabot)
5d9178f6ab Dashboards: Fix folder picker not showing correct results when typing too fast (#50303) (#50623)
* Use callback form for loadOptions in folder picker

* clean up

* fix other tests

* clarify comment

(cherry picked from commit 32d4f6ac60)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-06-10 17:05:55 +02:00
Grot (@grafanabot)
fd33095837 Alerting: improve provisioning docs (#50347) (#50618)
* Alerting: improve provisioning docs

* add new provisioning page

* add api docs

* fix formatting and add better descriptions

* fix typo

(cherry picked from commit 862f51216b)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-10 16:41:55 +02:00
Armand Grillet
64ca25247c Backport docs changes for Grafana Alerting (#50620) 2022-06-10 14:41:09 +00:00
Grot (@grafanabot)
c2c7f0292e Alerting: improve provisioning docs (#50347) (#50619)
* Alerting: improve provisioning docs

* add new provisioning page

* add api docs

* fix formatting and add better descriptions

* fix typo

(cherry picked from commit 862f51216b)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-10 16:37:43 +02:00
Grot (@grafanabot)
870986caad Docs: Backport 49739 to v9.0.x (#50123) (#50614)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 49b20ad76c)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-06-10 16:23:01 +02:00
Armand Grillet
d8f5a3b799 Backport docs changes for Grafana Alerting (#50610) 2022-06-10 16:02:45 +02:00
Grot (@grafanabot)
a4958a437f No longer generate theme json as it's not compatible with the right tooling (#50605) (#50609)
(cherry picked from commit 9d73264895)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-06-10 15:00:42 +01:00
Grot (@grafanabot)
d00ba7d49b [v9.0.x] Alerting: use "find" to wait for expression editor to load (#50603)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-10 15:21:32 +02:00
Grot (@grafanabot)
23251f15c6 [release-v9.0.0] Alerting: use "find" to wait for expression editor to load (#50604)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-10 15:13:09 +02:00
Grot (@grafanabot)
83956baf2b Prometheus: Templating queries should pass on custom headers (#50344) (#50408)
* pass on all headers except for accept headers

* touch up and testing

* add custom header values to resource queries

* remove my picture. oops

* handle gzip responses as well

* fix linting issues

* add my space

* no lint

* removed cookies from being proxied

* clean up and handle errors from io.reader.Close() calls

(cherry picked from commit 49dc9da9c1)

Co-authored-by: Stephanie Closson <srclosson@gmail.com>
2022-06-10 08:51:26 -03:00
Grot (@grafanabot)
1e3d8610e1 loki: better error message when escaping is involved (#50352) (#50595)
(cherry picked from commit 130bd26edd)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-10 13:16:08 +02:00
Grot (@grafanabot)
b32a61933a [v9.0.x] Grafana UI: Put back production build in rollup config (#50580)
* Grafana UI: Put back production build in rollup config (#50575)

(cherry picked from commit 2d1ab27636)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-10 12:17:29 +02:00
Grot (@grafanabot)
0b48f0f97b [release-v9.0.0] Grafana UI: Put back production build in rollup config (#50581)
* Grafana UI: Put back production build in rollup config (#50575)

(cherry picked from commit 2d1ab27636)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-10 12:15:58 +02:00
Christopher Moyer
49b20ad76c Docs: Backport 49739 to v9.0.x (#50123)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-06-10 12:15:42 +02:00
Grot (@grafanabot)
ea6d827038 Search: Fixes margins and paddings and left position (#50570) (#50578)
(cherry picked from commit c1d405a200)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-10 11:47:47 +02:00
Grot (@grafanabot)
5a5ecbe00b [v9.0.x] Grafana UI: Fix nonexistent indexof module for plugin tests (#50572)
* Grafana UI: Fix nonexistent indexof module for plugin tests (#50529)

* fix(grafana-ui): prevent module resolution failure where component-indexof appears as indexof

* chore(grafana-ui): update comment explaining need for alias plugin

(cherry picked from commit 6a4906ef7e)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-10 11:32:58 +02:00
Grot (@grafanabot)
11a920ef55 [release-v9.0.0] Grafana UI: Fix nonexistent indexof module for plugin tests (#50573)
* Grafana UI: Fix nonexistent indexof module for plugin tests (#50529)

* fix(grafana-ui): prevent module resolution failure where component-indexof appears as indexof

* chore(grafana-ui): update comment explaining need for alias plugin

(cherry picked from commit 6a4906ef7e)

* chore: refresh yarn.lock

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-10 11:32:53 +02:00
Grot (@grafanabot)
e760ffab0a Alerting: Invalid setting of enabled for unified alerting should return error (#49876) (#50569)
(cherry picked from commit bda47df4ad)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-10 09:15:46 +01:00
Grot (@grafanabot)
2f9bb4a347 Alerting: Fix force_migration when alerting is disabled (#50431) (#50481) (#50565)
This pull request fixes a bug where force_migration must be set to true when both unified and legacy alerting is disabled.

(cherry picked from commit c312188cb2)
2022-06-10 09:04:27 +01:00
Grot (@grafanabot)
c312188cb2 Alerting: Fix force_migration when alerting is disabled (#50431) (#50481)
This pull request fixes a bug where force_migration must be set to true when both unified and legacy alerting is disabled.
2022-06-10 08:30:06 +01:00
Zoltán Bedi
ca2bd11f80 [v9.0.x] TimeSeries: Add an option to set legend width (#50550)
* TimeSeries: Add an option to set legend width (#49126)

* Add an option to set legend width

* Add width to the cue file

* Use legendStyle

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
(cherry picked from commit a6693ba62f)

* Add migration

Co-authored-by: Ivan Babrou <github@ivan.computer>
2022-06-09 22:16:44 +02:00
Grot (@grafanabot)
447ce0aa30 AzureMonitor: changes to azureMonitorExperimentalUI after feedback (#50455) (#50546)
* AzureMonitor: tweak experimental-ui after UX discussions.
- move metrics up to resource row
- allow resources field to take an inlineField prop and a labelWidth prop. Eventually once the feature toggle is removed
the inlineField prop will be the only code branch in Field.tsx.

* AzureMonitor: remove devmode req for azureMonitorExperimentalUI flag

* refactor: consolidate logic branch for inline Field

(cherry picked from commit 5df694b924)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-06-09 18:41:21 +00:00
Grot (@grafanabot)
4f011515c6 AzureMonitor: Remove unused code (#50399) (#50531)
(cherry picked from commit 9703c9211e)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-06-09 17:37:58 +02:00
Gábor Farkas
cfe8116791 logs: track the usage of certain features (#50325) (#50526)
* logs: track the usage of certain features

* Add report interaction for logs interactions

* mock reportInteraction in test

* mock reportInteraction

Co-authored-by: Ivana Huckova <ivana.huckova@gmail.com>
(cherry picked from commit c412a3b052)
2022-06-09 17:04:51 +02:00
Grot (@grafanabot)
dd7ea16eb1 AzureMonitor: Clean namespace when changing the resource (#50311) (#50342)
(cherry picked from commit ae449cc823)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-06-09 16:58:04 +02:00
Grot (@grafanabot)
7a4e3a3588 [v9.0.x] Docs: Manual backport of alert list panel docs rewrite (#50516)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-09 16:27:59 +02:00
Grot (@grafanabot)
e92f9931ad ReleaseNotes: Updated changelog and release notes for 9.0.0-beta2 (#50398) (#50521)
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
(cherry picked from commit a6943cb399)
2022-06-09 16:00:16 +02:00
Grot (@grafanabot)
06ed6d25f5 ReleaseNotes: Updated changelog and release notes for 9.0.0-beta2 (#50398) (#50520)
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
(cherry picked from commit a6943cb399)
2022-06-09 15:43:32 +02:00
Grot (@grafanabot)
1ca5f3c5b7 Updating migration docs to include most relevant breaking changes (#50356) (#50514)
(cherry picked from commit cd01eb541a)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2022-06-09 15:09:54 +02:00
Grot (@grafanabot)
b243ff8dc0 Updating migration docs to include most relevant breaking changes (#50356) (#50515)
(cherry picked from commit cd01eb541a)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2022-06-09 14:45:27 +02:00
Gilles De Mey
7a033078ee Docs: Manual backport of alert list panel docs rewrite (#50512) 2022-06-09 14:40:53 +02:00
Grot (@grafanabot)
33c0a53369 DataSources: Fixes issue with expressions not being queried (#50446) (#50509)
(cherry picked from commit ce1ee4de04)

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2022-06-09 15:08:30 +03:00
Grot (@grafanabot)
18cf84112e Docs: Images in Notifications (#50425) (#50503)
(cherry picked from commit 9d537efb48)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-09 14:10:23 +03:00
Grot (@grafanabot)
d53a750c18 Docs: extend RBAC breaking changes (#50495) (#50501)
* extend RBAC breaking changes

* Update docs/sources/whatsnew/whats-new-in-v9-0.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit 7e59fd3ecf)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-06-09 12:35:00 +02:00
Grot (@grafanabot)
d96e12efc4 Alerting: Schedule Alert rules metric tracking (#50415) (#50497)
* Alerting: Schedule Alert rules metric tracking

Change the record of metrics from one place to two as an attempt to have a semi-accurate record.

(cherry picked from commit c59938b235)

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-06-09 12:27:22 +02:00
Grot (@grafanabot)
e9d3d6057e FeatureToggles: Support changing feature toggles with URL parameters (#50275) (#50496) 2022-06-09 12:06:45 +02:00
Grot (@grafanabot)
d71e7ef4a3 docs: clarify how PR titles should be formatted (#49682) (#49979)
(cherry picked from commit e452785291)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-06-09 13:04:18 +03:00
Grot (@grafanabot)
df7c4ca137 Alerting: Tidy up input fields for name, folder and group (#50432) (#50486)
* aligned fields moved labels

* reduce width for labels inputs

(cherry picked from commit 06bbf870da)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2022-06-09 11:57:49 +02:00
Grot (@grafanabot)
79fd17c22a Fix metric names for screenshots (#50426) (#50494)
(cherry picked from commit c636685ca2)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-09 11:50:13 +02:00
Marcus Efraimsson
1a05f7c1dc Chore: Upgrade grafana-plugin-sdk-go to v0.137.0 (#50443) (#50489)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
(cherry picked from commit cddab15769)
2022-06-09 11:47:30 +02:00
gotjosh
7e0a3c34d2 Alerting: Logs should not be capitalized and the errors key should be "err" (#50333) (#50487)
* Alerting: decapitalize log lines and use "err" as the key for errors

Found using (logger|log).(Warn|Debug|Info|Error)\([A-Z] and (logger|log).(Warn|Debug|Info|Error)\(.+"error"

(cherry picked from commit 0cde283505)
2022-06-09 11:44:54 +02:00
Grot (@grafanabot)
612e0c1545 Chore: Remove react-testing-lib from bundles (#50442) (#50490)
* refactor(selectoptiontest): move helper function out of grafana/ui so testing-lib isn't in bundle

* test(selectoptionintest): update import location of helper function

* test(amroutes): put back missing selectOptionInTest helper

* test(selectoptionintest): clean up remaining file imports / exports

* test(queryeditor): fix failing import

* refactor(grafana-ui): reuse selectOptionInTest in SelectBase test

(cherry picked from commit ccd75d72f8)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-09 11:34:44 +02:00
Grot (@grafanabot)
9722ade9c9 [v9.0.x] Alerting: Unify alert status labels on the alert list panel (#50488)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-09 11:30:54 +02:00
Armand Grillet
94a3704c09 [v9.0.x] Alerting: Add RBAC actions and role for provisioning API routes (#50483)
* Alerting: Add RBAC actions and role for provisioning API routes (#50459)

* add alert provisioning actions and role

* linter

(cherry picked from commit 54fa04263b)

* Fix cherry-pick conflict in rbac-fixed-basic-role-definitions.md

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-06-09 11:07:38 +02:00
Agnès Toulet
b033a4e04f Docs: update license restrictions (#49334) (#50387)
* Docs: update license restrictions

* apply review feedback

* remove initial description of two license types

Clean up tiered licensing copy and keep it all in one deprecated section, refer to old docs if user wants to learn more.

* fix linting issues

* update title

* fix config url

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
(cherry picked from commit 3df7ee81f3)
2022-06-09 11:01:13 +02:00
Grot (@grafanabot)
18fc138157 Alerting: Fix provisioning validation status codes and panics (#50464) (#50484)
* Updates to all except alert rules

* Return 400 when rules fail to validate, add testinfra

* More sane package aliases

* More package alias renames

* One more bug in contact point validation

* remove unused function

Co-authored-by: Jean-Philippe Quémémer <jeanphilippe.quemener@grafana.com>
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
(cherry picked from commit 7dd78fee2c)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-09 10:58:47 +02:00
Grot (@grafanabot)
8c0decbabd scroll nav elements into view when using the keyboard (#50434) (#50479)
(cherry picked from commit 3fa7f72d6c)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-09 09:36:28 +01:00
Andrej Ocenas
1924cfc3c0 Docs: Fix Prometheus query editor Legend docs (#50312) (#50480)
* Docs: Fix Prometheus query editor Legend docs (#50312)

* Update docs for label

* Fix wording

* Fix typo

(cherry picked from commit fee0b9d1f2)

* Fix
2022-06-09 10:30:42 +02:00
Grot (@grafanabot)
d33b53b329 SearchV2: optionally exclude panels from search results (#49971) (#50026)
(cherry picked from commit 4dfab0b7d5)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-06-09 10:05:12 +02:00
Grot (@grafanabot)
5dcc334d9c Alerting: bump rule version when updating rule group interval (#50295) (#50476)
* Alerting: move group update to alert rule service

* rename validateAlertRuleInterval to validateRuleGroupInterval

* init baseinterval correctly

* add seconds suffix

* extract validation function for reusability

* add context to err message

(cherry picked from commit cf684ed38f)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-09 09:40:00 +02:00
Grot (@grafanabot)
5eb5779a82 Formatting: Make SI number formats more robust (#50117) (#50292)
Closes #49372

(cherry picked from commit a9a276a9da)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-06-09 09:33:17 +02:00
Grot (@grafanabot)
4bb2ba53e8 Alerting: Improve Unified Alerting Rollback Warning (#50470) (#50472)
After migrating to unified alerting, users must explicitly allow rolling
back to legacy alerting by setting force_migration = true in config.
This updates the panic message to clarify why that's required and what
the consequences of rolling back will be.

Fixes #50469

(cherry picked from commit 30f035ca34)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-06-09 07:48:59 +02:00
Joe Blubaugh
3fe8fec086 Alerting: Fix image embed in email template. (#50370) (#50468)
The ng_alert_notification email template did not include templating for
linked or embedded images. This change updates that.

Additionally, this change supports embedding an image for each alert in
an email batch.

Fixes #50315

(cherry picked from commit ecf080825e)
2022-06-09 11:20:01 +08:00
Grot (@grafanabot)
406f286e51 RBAC: Fix migrations running into the wrong order (#50452) (#50454)
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>

Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
(cherry picked from commit 2813e49842)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-08 19:53:30 +02:00
Grot (@grafanabot)
9ccee68c71 Bumping protobufjs version (#50435) (#50440)
(cherry picked from commit b9cce18f72)

Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>
2022-06-08 12:19:12 -03:00
Grot (@grafanabot)
a13ce8dbd8 Docs: Fix release notes formatting issues in 9.0.0-beta.3 (#50410) (#50428)
(cherry picked from commit aace6a95f0)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-06-08 14:54:46 +01:00
Grot (@grafanabot)
ffc7d688c2 Angular: Fixes minor mistake in previous bsTypeahead PR (#50411) (#50417)
(cherry picked from commit 3866debae9)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-08 14:33:20 +02:00
Grot (@grafanabot)
54bd556843 Security: Fixes javascript security warnings in old vendored libs (#50382) (#50413)
(cherry picked from commit 74608d6480)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-08 14:13:38 +02:00
Artur Wierzbicki
1eca4c113e Previews: update docs for the new search layout (#50247) 2022-06-08 13:48:42 +02:00
Grot (@grafanabot)
addb1dd979 Reporting: Update documentation and screenshots with v9 changes (#50072) (#50401)
* Reporting: Update docs

* Update screenshots

* Update docs/sources/enterprise/reporting.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update docs/sources/enterprise/reporting.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update docs/sources/enterprise/reporting.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* reporting docs copy edits

reformat reporting docs, slightly correct multiple dashboard rendering doc

* Format

* Format[2]

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
(cherry picked from commit 35ba4a6ac1)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-08 14:18:19 +03:00
Grot (@grafanabot)
11af837916 Dashboard: Fixes random scrolling on time range change (#50379) (#50384)
* Dashboard: Fixes random scrolling on time range change

* fix ts issue

* removed logging

(cherry picked from commit fd408652dc)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-08 13:16:52 +02:00
Grot (@grafanabot)
c9352f1778 Angular: Adds back two angular directives that are still used by remaining angular bits and plugins (#50380) (#50385)
(cherry picked from commit 288eede638)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-06-08 13:16:42 +02:00
Grot (@grafanabot)
f843c6c9d7 Remove test_steps (#50396) (#50403)
(cherry picked from commit 63ed5367c3)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-06-08 13:15:28 +02:00
Grot (@grafanabot)
faf3add82d Improve docs for values in custom annotations and labels (#50346) (#50389)
(cherry picked from commit 6e3d58d779)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-08 11:41:39 +01:00
Grot (@grafanabot)
0690e19029 Playlists: Save button now correctly creates a new playlist (#50381) (#50390)
* Add type="submit" to PlaylistForm submit button

* fix linting errors

(cherry picked from commit a1cf709ad2)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-08 11:53:21 +02:00
Grot (@grafanabot)
29b2c71517 Alerting: replace a duplicated configuration key (#50350) (#50368)
This PR renames the configuration key enabled to capture. This is needed as we already have a configuration key with the name enabled.

Fixes #50328

(cherry picked from commit fd664e4beb)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-08 05:22:41 +02:00
Grot (@grafanabot)
ef8ad0f74a Bump provisioning to admin-only in lieu of dedicated RBAC permissions (#50366) (#50367)
(cherry picked from commit 28a47b56d2)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-08 00:43:33 +02:00
Grot (@grafanabot)
2acf5ed0c0 Alerting: Fix database unavailable removes rules from scheduler (#49874) (#50345)
(cherry picked from commit c83f84348c)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-07 16:41:07 +01:00
Grot (@grafanabot)
521264b647 RBAC: docs, update alerting.rules write permission (#50304) (#50329)
(cherry picked from commit f54adf6c22)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-07 16:59:15 +02:00
Ezequiel Victorero
deea0fcfc0 ReleaseNotes: Updated changelog and release notes for 9.0.0-beta3 (#50317) (#50321)
(cherry picked from commit 32a8af59d6)

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-06-07 10:42:30 -03:00
Grot (@grafanabot)
a3fb261d6f "Release: Updated versions in package to 9.0.0-beta.3" (#50314) 2022-06-07 10:23:05 -03:00
Artur Wierzbicki
239956d02e Search: fix 'Clear filters' button (#50283)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 49112c8356)
2022-06-07 14:21:48 +02:00
Grot (@grafanabot)
b01a07921f Loki: Add more query patterns (#50248) (#50301)
* Loki: Add query patterns

* Update

* Update queries

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>

* Update public/app/plugins/datasource/loki/querybuilder/LokiQueryModeller.ts

* Update descriptions

* Update

Co-authored-by: Jennifer Villa <jvilla2013@gmail.com>
(cherry picked from commit be712a5f17)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-07 13:33:40 +02:00
Grot (@grafanabot)
66cc24b7cb docs: describe cookie handling in backend data source plugins (#49986) (#50299)
* docs: describe cookie handling in backend data source plugins

* adjusted text

(cherry picked from commit 19df6d52b7)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-07 13:18:44 +02:00
Grot (@grafanabot)
56e353cfed Prometheus, Loki: Update run queries button (#50005) (#50281)
* Prometheus, Loki: Updare run queries button

* Update docs

* Update docs

(cherry picked from commit 9f6afb3475)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-06-07 13:08:09 +02:00
Grot (@grafanabot)
e63dde02c5 AddDataSourceConfig: Remove deprecated checkHealth prop (#50296) (#50298)
(cherry picked from commit e9fac9ee03)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-06-07 12:44:03 +02:00
Grot (@grafanabot)
2a1a75c6fd Data: Remove deprecated types and functions from valueMappings (#50035) (#50293)
(cherry picked from commit c96fa4c77d)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-06-07 12:05:28 +02:00
Grot (@grafanabot)
3057181fbe Fix Whats New docs for images in notifications (#50250) (#50289)
(cherry picked from commit 2e1827127d)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-07 10:58:47 +01:00
Grot (@grafanabot)
1bac7a8306 [v9.0.x] Tracing: Deprecate opentracing (#50082)
* Tracing: Deprecate opentracing (#50058)

* Deprecate opentracing

* Fix comment

* Adjust comment

* Fix docs for opentelemetry

* Add deprecated to sample.ini

(cherry picked from commit 24c6a73095)

* Update docs/sources/administration/configuration.md

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

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-06-07 11:53:37 +02:00
Grot (@grafanabot)
5275a21c5c Add back a lower z-index (#50285) (#50288)
(cherry picked from commit 13a71e7219)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-07 11:49:23 +02:00
Grot (@grafanabot)
fe220eb570 CloudWatch: Dynamic label documentation (#49463) (#50286)
* dynamic label documentation

* Update docs/sources/datasources/aws-cloudwatch/_index.md

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

* Update docs/sources/datasources/aws-cloudwatch/_index.md

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

* formatting

Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 5932a22996)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-06-07 11:40:38 +02:00
Dimitris Sotirakis
c3ad379563 Update Golang - bump grabpl and build-container (#50253) (#50255)
(cherry picked from commit 7b750cc0f0)
2022-06-06 15:57:44 +02:00
Grot (@grafanabot)
371d9bc3b8 RBAC: change migration logic (#50187) (#50245)
* change migration logic

* linting

* linting

* fix an issue with the migration logic

* make tests runnable against other DBs

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
(cherry picked from commit 7c800421d3)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-06-06 14:02:58 +02:00
Grot (@grafanabot)
9564129300 SaveDashboardForm: Ensure saveTimerange is a boolean (#50228) (#50244)
(cherry picked from commit 333e261074)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-06-06 13:41:44 +02:00
Grot (@grafanabot)
760b9ac9d0 Expression: Filter query, mixed mode fixes and panel error message (#50218) (#50242)
* implement filterQuery to support query.hide

* Fixed - expression ds name in mixed mode

* Execute expression query on blur

* show actual error message when ds return Query data error

(cherry picked from commit a3071b7797)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-06-06 12:12:36 +01:00
Grot (@grafanabot)
4a5d5e6ead Loki: Add user analytics for query editor mode (#49619) (#50232)
* Add reportInteraction call

* Update public/app/plugins/datasource/loki/querybuilder/components/LokiQueryEditorSelector.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
(cherry picked from commit 37aedd6906)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-06 11:07:32 +02:00
Grot (@grafanabot)
0ab03dbf3a HeatmapNG: cell value filtering and color clamping (#50204) (#50225)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 8cdfef4796)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-06 01:33:32 -07:00
Grot (@grafanabot)
d929d745f1 Chore: uPlot 1.6.21 (#50223) (#50224)
(cherry picked from commit e3815111ea)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-06 00:11:06 -07:00
Grot (@grafanabot)
bb801de9ed Prometheus: Fix resource call panic (#50216) (#50221)
(cherry picked from commit 4aa5e7e69e)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-06-06 03:52:58 +02:00
Grot (@grafanabot)
4f284f167e Prometheus: Migrate metadata queries to use resource calls (#49921) (#50219) 2022-06-06 03:11:45 +02:00
Grot (@grafanabot)
7bcbf45c66 SearchV2: explicit dashboard loading order and cleanups (#50210) (#50217)
(cherry picked from commit da49f907bb)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-06-05 15:19:41 -07:00
Grot (@grafanabot)
22673382b5 Alerting: remove feature toggle for provisioning API (#50167) (#50213)
* Alerting: remove feature toggle for provisioning API

* remove missed code parts

* remove unused import

* remove empty line

* mark routes as stable

(cherry picked from commit 4b8a4449ed)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-05 08:03:47 +02:00
Grot (@grafanabot)
92d995d658 Alerting: Add provenance guard to config api (#50147) (#50209)
* Alerting: add provenance guard to config api

* add tests

* only guard if config valid

* adapt error message

* simplify logic

* rename arguments

* make logic more straight forward

* rename opt to options

* remove useless maps

(cherry picked from commit 4cc8c6f745)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-04 15:13:02 +02:00
Grot (@grafanabot)
67cbd5015d Encryption: Fix multiple data keys migration (#49848) (#50207)
* Add migration

* Migrator: Extend support to rename columns

* Fix getting current key

* Fix column name in migration

* Fix deks reencryption

* Fix caching

* Add back separate caches for byName and byPrefix

* Do not concatenate prefix with uid

* Rename DataKey struc fields

* SQLStore: Add deprecation comments for breaking migrations

* Add comment

* Minor corrections

Co-authored-by: Joan López de la Franca Beltran <joanjan14@gmail.com>
(cherry picked from commit 4f8111e24e)

Co-authored-by: Tania <yalyna.ts@gmail.com>
2022-06-04 13:13:34 +02:00
Grot (@grafanabot)
f404191ccb Alerting: only delete mute time if not used by route (#50193) (#50205)
* Alerting: only delete mute time if not used by route

* add a testcase

* import package only once

* replace apimodels with definitions

(cherry picked from commit 8de4ffe61f)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-04 08:06:17 +02:00
Grot (@grafanabot)
635a6b69b3 State Timeline: Fix Null Value Filling and Value Transformation (#50054) (#50196)
(cherry picked from commit 12ba2d6b8b)

Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
2022-06-03 23:11:49 -05:00
Grot (@grafanabot)
9486bde991 [v9.0.x] HeatmapNG: add log scale calculation (#50203)
* HeatmapNG: add log scale calculation (#49969)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit fd34700225)

* stripnulls

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-06-04 04:38:20 +02:00
Yuriy Tseretyan
15780f779d Alerting: Update alert rule diff to not see difference between nil and empty map (#50192) (#50198) 2022-06-03 17:55:39 -04:00
Grot (@grafanabot)
ed169da58c SearchV2: instant local updates, folder events (#50001) (#50194)
(cherry picked from commit d2868a1ce7)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2022-06-03 22:29:48 +02:00
Grot (@grafanabot)
b9621d08a5 Alerting: add mute timings provenance to config api (#50149) (#50190)
(cherry picked from commit d2f3631a47)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-03 19:47:21 +02:00
Gábor Farkas
8d34a58a72 Revert "Loki: do not produce histogram for instant queries (#50019) (#50065)" (#50181)
This reverts commit 063c5095eb.
2022-06-03 10:23:08 -06:00
Will Browne
d4fde160a1 resolve conflicts (#50184)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-06-03 18:03:45 +02:00
Grot (@grafanabot)
fc4018048e SQLStore: Add deprecation comments for breaking migrations (#49740) (#50183)
* Migrator: Extend support to rename columns

* SQLStore: Add deprecation comments for breaking migrations

(cherry picked from commit 5f1305d280)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-06-03 18:02:27 +02:00
Grot (@grafanabot)
78d5e3e0dd [v9.0.x] SearchV2: Fix Move and Delete not updating list in folder view (#50179)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-06-03 17:46:16 +02:00
Grot (@grafanabot)
b051551f4d Alerting: Add version segment to all provisioning routes (#49121) (#50174)
Co-authored-by: Jean-Philippe Quémémer <jeanphilippe.quemener@grafana.com>
(cherry picked from commit 67290aa49f)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-06-03 16:57:38 +02:00
Todd Treece
301fdc64bf [v9.0.x] Chore: Update grafana-plugin-sdk-go to v0.136.0 (#50127) (#50168)
(cherry picked from commit 64d93498de)
2022-06-03 07:47:28 -07:00
Grot (@grafanabot)
7320c53ab7 [v9.0.x] Alerting: Make folder filter clearable in Alert list panel (#50169)
Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2022-06-03 15:56:40 +02:00
Grot (@grafanabot)
51d25ebd50 [v9.0.x] Alerting: Fix folder filtering for existing alert rule (#50164)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-03 15:55:16 +02:00
Grot (@grafanabot)
e51a0e209e [v9.0.x] Alerting: Use correct permission scope for external AM updates (#50165)
Co-authored-by: konrad147 <konrad.lalik@grafana.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-03 15:55:15 +02:00
Grot (@grafanabot)
29e903e5e2 update defaults.ini to add role_attribute_path (#49147) (#50155)
cf. https://community.grafana.com/t/grafana-gitlab-oauth-env-variable-not-recognized/65039
and https://github.com/grafana/grafana/issues/48637

(cherry picked from commit 31a4d97b05)

Co-authored-by: Copolycube <kaourintin+github@gmail.com>
2022-06-03 14:17:49 +02:00
Grot (@grafanabot)
d7b61a6002 auth.gitlab: account for role_attribute_path_strict (#50088) (#50154)
(cherry picked from commit 6c7b6a7c34)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-03 14:17:35 +02:00
Piotr Jamróz
e22600d077 [v9.0.x] Query History: Hide query history when anonymous user uses Explore (#50139)
* Hide query history when anonymous user uses Explore

* Show query history to anonymous users when local storage is used

* Fix integration test

(cherry picked from commit 84860ffc96)
2022-06-03 12:29:50 +02:00
Grot (@grafanabot)
c3313972b9 [v9.0.x] Alerting: Prevent query wrapper recreation on drag/drop (#50151)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-03 12:25:40 +02:00
Grot (@grafanabot)
7dd89a4689 Plugins Catalog: Make tabs position consistent with other Grafana pages (#49997) (#50141)
(cherry picked from commit 691a597f43)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-06-03 11:15:39 +02:00
Gábor Farkas
493d43449c loki: handle ad hoc filters in backend mode (#50135) (#50145)
(cherry picked from commit 6011c373ae)
2022-06-03 09:15:12 +00:00
Grot (@grafanabot)
ccee1f7f18 Alerting: allow custom UID for contact points through API (#50089) (#50143)
* Alerting: allow custom UID for contact points through API

* fix auth

(cherry picked from commit 468ed68d64)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-03 10:45:33 +02:00
Grot (@grafanabot)
742abc8129 [v9.0.x] Query History: Do not show "load more" button when query history item is deleted (#50097)
(cherry picked from commit 927b6e33c0)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-06-03 09:31:41 +02:00
Grot (@grafanabot)
8217167b03 [v9.0.x] Explore: Integration test for editing query history comment (#50096)
(cherry picked from commit d41b0f0a21)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-06-03 09:29:28 +02:00
Grot (@grafanabot)
93efb1a343 [v9.0.x] Alerting: Filter folders based on users' permissions (#50112)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-03 09:10:28 +02:00
Grot (@grafanabot)
ce10741d76 AzureMonitor: add NewDimension component using experimental UI (#48946) (#50133)
* AzureMonitor: add NewDimension component using experimental UI

This new component is exercised by the same unit test file as the current Dimension component.

Also cleans up a few unneeded `await` keywords in the Dimensions test file.

* AzureMonitor: make tweaks based on PR comments.

- I was importing the wrong Field component
- We can use a typeguard to avoid the strange `if`.

(cherry picked from commit 53cb94a2ad)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-06-03 03:38:04 +00:00
Grot (@grafanabot)
e674c9a2d1 [v9.0.x] Search (SQL): support dashboardUID query parameter (#50126)
* Search (SQL): support dashboardUID query parameter (#50121)

(cherry picked from commit d452322aa8)

* manual merge

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-02 18:10:29 -07:00
Grot (@grafanabot)
d5e9967809 Add a section to the alerting documents for performance considerations (#49663) (#50087)
This change adds documentation about how the configuration of Grafana
Alerting affects the performance of the Grafana backend, and how to
control the load that Grafana Alerting generates.

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit 8ad1f4f9be)
2022-06-03 09:06:13 +08:00
Grot (@grafanabot)
d8eb9fcb9c Search: exclude rows from search index (#50124) (#50132)
(cherry picked from commit efca93a3f3)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-03 02:39:56 +02:00
Grot (@grafanabot)
afec2786fc Loki: Fix uncaught errors if labelKey contains special characters (#49887) (#50067)
* added regex check of labelKeys

- labelKeys should not contain any special characters
- added encoding of labelKeys in the URL
- don't offer autocomplete if label with special characters is detected

* removed additional regex check for labels

(cherry picked from commit d7139e75fb)

Co-authored-by: svennergr <Svennergr@gmail.com>
2022-06-02 20:20:29 +02:00
Grot (@grafanabot)
3422f70f66 SearchV2: include appSubUrl in the response URL (#50059) (#50118)
(cherry picked from commit 15b3bbad6b)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-06-02 18:08:53 +02:00
Grot (@grafanabot)
ce6fb9f083 [v9.0.x] Alerting: Fix alert list panel showing firing alerts with no instances (#50095)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-02 17:03:33 +02:00
Grot (@grafanabot)
131f42d59a [v9.0.x] Alerting: Fix alert creation form layout when errors occur (#50106)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-02 17:03:05 +02:00
Grot (@grafanabot)
3e7a2111e6 RBAC: Make RBAC action names more consistent (#49730) (#50083)
* update action names

* correctly retrieve teams for signed in user

* remove test

* undo swagger changes

* undo swagger changes pt2

* add migration from old action names to the new ones

* rename from list to read

* linting

* also update alertign actions

* fix migration

(cherry picked from commit 5dbea9996b)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-06-02 15:15:40 +02:00
Grot (@grafanabot)
b342fe6e30 Alerting: Provisioning API - Alert rules (#47930) (#50086)
(cherry picked from commit 81d360529b)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-06-02 15:05:57 +02:00
Grot (@grafanabot)
1c870e9908 Prometheus/Loki: Add raw query and syntax highlight in explain mode (#50070) (#50081)
(cherry picked from commit cc90f9bb69)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-02 14:29:12 +02:00
Grot (@grafanabot)
e61e26d774 Prometheus/Loki: Show raw query by default in the builder(#50007) (#50080)
(cherry picked from commit c63071f519)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-02 14:28:41 +02:00
Grot (@grafanabot)
a34e81b6fd Alerting: Fix notification policy "Override grouping" form save (#50031) (#50078)
(cherry picked from commit ace5b2058d)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-06-02 14:23:03 +02:00
Grot (@grafanabot)
0ba2bf2653 [v9.0.x] Draggable: only set drag handle props on the drag handle itself (#50076)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-06-02 14:13:57 +02:00
Grot (@grafanabot)
2fc2a15fab Alerting: Remove Image Upload code from Slack notifier. (#50062) (#50066)
The image file upload code as it is now simply doesn't work - it's
missing several important steps in the file upload process. There is
more information in the fixed issue as to the steps required.

After this change, screenshots will still be attached to slack messages
when external image storage is used with Grafana (an S3 bucket, for
example).

Fixes #50056

(cherry picked from commit 9759eeda17)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-06-02 17:44:30 +08:00
Grot (@grafanabot)
cac5a1945f Cloudwatch: Dynamic labels autocomplete (#49794) (#50063)
* add completeable interface

* add basic labels language

* render monaco editor for label field

* align styling in math expression field

* add unit tests

* fix broken test

* remove unused import

* use theme

* remove comment

* pr feedback

* fix broken imports

* improve test

* make it possible to override code editor styles

* use input styles and align border styles

(cherry picked from commit 467e375fe6)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-06-02 11:26:27 +02:00
Grot (@grafanabot)
063c5095eb Loki: do not produce histogram for instant queries (#50019) (#50065)
* loki: no histogram for instant queries

* added test

(cherry picked from commit b0925ed4ee)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-06-02 11:26:13 +02:00
Grot (@grafanabot)
63c1a2706f API: Fix swagger specification (#50034) (#50060)
* API: Fix swagger specification

* Validate specification after generation

(cherry picked from commit 6112bd0c63)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-06-02 10:09:39 +02:00
Grot (@grafanabot)
77dccd54ca Azure OAuth: silent fail on getting groups (#49909) (#50022)
(cherry picked from commit 3049534c40)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-06-02 09:23:44 +02:00
Grot (@grafanabot)
f591c64661 etcd: Fix vuln CVE-2018-1098 (#49976) (#49977)
* Update etcd

* Update go.sum

* Replace etcd with etcd/v3

(cherry picked from commit 0d7a3209e7)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-06-02 09:03:55 +02:00
Alexander Weaver
8efd4350b4 Alerting: Remove double quotes from matchers (#50038) (#50046)
* Alerting: Remove double quotes from matchers

With #38629 a new Alertmanager configuration object was introduced with `object_matchers`, it was meant to circumvent around the fact that Prometheus label names don't support a set of characters that Grafana needs to support for alerts, silences, matchers, etc. (with a common example being elasticsearch's `.`).
This new object does not include the label of sanitzation or validation that its Prometheus equivalent supports in `matchers` and therefore are semantically not equivalent.

This triggered the problem that when the migration is run, we use `matchers` as the object to populate in configuration for routing policies, but when the UI does its first save this object is transformed to `object_matchers`.

Matchers that were previously running just fine would immediately stop working as soon as the configuration is saved.

This problem surfaced with the introduction of #49952 where we stopped stripping double quotes from matchers (not just regex but _all_ of them).

* Add comment explaining rationale and future removal

Co-authored-by: Alex Weaver <weaver.alex.d@gmail.com>
(cherry picked from commit 1a50b0dbb7)

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-06-01 16:52:07 -05:00
Grot (@grafanabot)
1c335d1da7 Tracing: Fix trace links in traces panel (#50028) (#50039)
(cherry picked from commit bb94681d5a)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-06-01 19:50:12 +02:00
Grot (@grafanabot)
08b84c11cb CloudWatch: Add multi-value template variable support for log group names in logs query builder (#49737) (#50037)
* Add multi-value template variable support for log group names

* add test for multi-value template variable for log group names

* add test

(cherry picked from commit dca0453c2e)

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
2022-06-01 19:41:51 +02:00
Christopher Moyer
a96aac39f3 Docs: intro docs refactor (#49545) (#50033)
* intro docs refactor

* adds content to the index file; incorporates feedback

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix alerting opt out relref

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>

* Convert front matter to YAML and add current aliases

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 1e3e9f3c68)
2022-06-01 12:35:07 -05:00
Grot (@grafanabot)
835928cd01 license: Make coremodels all Apache v2 (#49731) (#50032)
(cherry picked from commit e5fab2dec8)

Co-authored-by: sam boyer <sdboyer@grafana.com>
2022-06-01 13:17:29 -04:00
Grot (@grafanabot)
ffa5873529 DashList: Remove star z-index (#50029)
Closes #49796

(cherry picked from commit 6ceb40e20e)

Co-authored-by: Alexander Kubyshkin <i.am.glint@gmail.com>
2022-06-01 18:47:59 +02:00
Grot (@grafanabot)
56818c16fd SearchV2: Fix scroll issue in folder folder view page (#50010) (#50017)
(cherry picked from commit 07bfa13770)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-06-01 17:13:12 +02:00
Grot (@grafanabot)
6e93f497b2 Alerting: Fix external alertmanager duplication (#49980) (#50008)
* Fix external alertmanager duplication

* Add tests

(cherry picked from commit 9da41140aa)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-01 16:36:38 +02:00
Grot (@grafanabot)
382eaaa773 Secrets: Fix unified secrets backwards compatibility (#49719) (#50009)
* Fix unified secrets backwards compatibility

* Add compatibility fix to AddDataSource function

* Allow updating password on fail to decrypt secrets

* If unified secret is corrupt try migrating

(cherry picked from commit 470be98588)

Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
2022-06-01 11:10:02 -03:00
Grot (@grafanabot)
3b5511db2b Loki: Run query when pressing Enter on line-filters (#49913) (#50004)
* changed `onBlur` and `onKeyDown` handling

- `onCommitChange` is only called if `onBlur` or `onKeyDown` are not set

* added `runQueryOnEnter` flag to OperationParamDef

* only run query if `runQueryOnEnter` is configured

* changed `evt.type` check to `keydown`

(cherry picked from commit b355adac6f)

Co-authored-by: svennergr <Svennergr@gmail.com>
2022-06-01 16:08:09 +02:00
Grot (@grafanabot)
338f6797b2 RBAC: Include alert.rules action when setting folder permissions (#49946) (#50006)
(cherry picked from commit bdff63d4a8)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-06-01 15:41:07 +02:00
Grot (@grafanabot)
39f461ea78 Metrics: Remove support for using summaries instead of histogram for HTTP instrumentation (#49985) (#50003)
Signed-off-by: bergquist <carl.bergquist@gmail.com>
(cherry picked from commit 9562fb389f)

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2022-06-01 14:49:37 +02:00
Kevin Yu
b2e73b866f Azure Monitor: Include datasource ref when interpolating variables (#49543) (#49957) 2022-06-01 05:30:16 -07:00
Grot (@grafanabot)
c011b15d1c Table: Reorder panel options (#49983) (#49998)
* Table: Reorder panel options

* Fix e2e selector

(cherry picked from commit f566958555)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-06-01 13:33:14 +02:00
Grot (@grafanabot)
f7e8809763 [v9.0.x] Alerting: Re-render panel's tabs on variables change (#49995)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-06-01 13:24:22 +02:00
Grot (@grafanabot)
d344b69fbb Plugins: Remove deprecated /api/tsdb/query metrics endpoint (#49916) (#49996)
* remove /api/tsdb/query

* revert changes to alert rules

* regenerate spec based on 9.0.x

(cherry picked from commit abfc711c53)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-06-01 13:22:53 +02:00
Grot (@grafanabot)
e58aac1b77 Prometheus: Fix aligning of labels of exemplars after backend migration (#49924) (#49982)
* Fix normalization of labels

* Move sorting so it actually has an effect

* fix lint error

Co-authored-by: Todd Treece <todd.treece@grafana.com>
(cherry picked from commit d2fefec306)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-06-01 12:48:31 +02:00
Grot (@grafanabot)
a4431a7cbf Settings: Sunset non-duration based login lifetime config (#49944) (#49990)
(cherry picked from commit 39096208ed)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-06-01 12:46:25 +02:00
Grot (@grafanabot)
4371c45dff Usage stats: Divide collection into multiple functions to isolate failures (#49928) (#49989)
(cherry picked from commit d3ffb9e245)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-06-01 12:43:02 +02:00
Will Browne
3061d57220 regenerate swagger spec (#49942) 2022-06-01 13:37:49 +03:00
Grot (@grafanabot)
f5ede594f4 Alerting: do not overwrite existing alert rule condition (#49920) (#49984)
(cherry picked from commit 82e9f4e7e7)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-06-01 12:07:29 +02:00
Grot (@grafanabot)
c14d7aa4a3 UI: Remove deprecated getFormStyles function (#49945) (#49981)
(cherry picked from commit 05e501c641)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-06-01 11:13:12 +02:00
Grot (@grafanabot)
a51f51f7a8 grafana/ui: Move panel-container styles to component (#49566) (#49915)
* Chore: transfer styling to Explore.tsx and convert to Emotion

* feat: create a component and export it

* Chore: replace by new component

* Chore: replace by new component

* Feat: create a story

* Chore: clean up

* Chore: clean up

(cherry picked from commit 94375592c8)

Co-authored-by: Laura <48948963+L-M-K-B@users.noreply.github.com>
2022-06-01 09:29:13 +03:00
Grot (@grafanabot)
5c19011dc1 Alerting: Add GetImages to ImageStore (#49717) (#49791)
GetImages does a `TOKEN IN` query for each token in the argument.

(cherry picked from commit 47a3ddd968)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-06-01 05:10:03 +02:00
Grot (@grafanabot)
849a0932e8 Alerting: Add templated subject config to email notifier (#49742) (#49846)
* Add subject templating to email notifier

* Fix linting

(cherry picked from commit d92625125b)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-06-01 04:14:56 +02:00
Ezequiel Victorero
cc536ea6e9 ReleaseNotes: Updated changelog and release notes for 9.0.0-beta2 (#49960) (#49963)
(cherry picked from commit 1e4ebf876b)

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-05-31 16:46:53 -03:00
Grot (@grafanabot)
2508cb4751 "Release: Updated versions in package to 9.0.0-beta.2" (#49959) 2022-05-31 15:49:24 -03:00
Grot (@grafanabot)
d71e30a692 [v9.0.x] Docs: integration tests for using sqllite (#49784)
* Docs: integration tests for using sqllite (#49455)

* Update developer-guide.md

* prettier formatting

(cherry picked from commit f5d25c91f6)

* Update contribute/developer-guide.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Update contribute/developer-guide.md

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-05-31 23:52:59 +07:00
Grot (@grafanabot)
8a4eed5fb6 Datasource: Remove deprecated max_idle_connections_per_host setting (#49948) (#49951)
(cherry picked from commit b03657b0e0)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-05-31 18:38:54 +02:00
Grot (@grafanabot)
088125ae28 Plugins: Support headers field for check health (#49930) (#49949)
(cherry picked from commit a7813275a5)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-05-31 18:22:35 +02:00
Grot (@grafanabot)
445909a759 InlineLabel: Remove deprecated props (#49929) (#49943)
(cherry picked from commit 1595cc96e6)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-31 16:48:31 +01:00
Grot (@grafanabot)
e3127d4070 Datasource: Fix allowed cookies to be forwarded as header to backend datasources (#49541) (#49935)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
(cherry picked from commit 1196b4a609)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-05-31 17:17:55 +02:00
Christopher Moyer
b8ec4346aa Docs/fixes relrefs (#49754) (#49933)
* fixes http-api link

* removes old saml docs

* fixes broken links to enterprise docs landing page

(cherry picked from commit 0f40d2a79d)
2022-05-31 10:14:35 -05:00
Jack Baldry
7de6880ba4 Backport 49786 and 49207 to v9.0.x (#49932)
* Docs: Identify which Grafana editions are relevant to each Enterprise doc (#49207)

* Add section to Ent docs index re: Cloud features
* Add and update notes identifying Enterprise and Cloud features
* Address feedback

(cherry picked from commit 3ecee06630)

* Use ref links for external content (#49786)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit e82784bff0)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-05-31 10:02:35 -05:00
Grot (@grafanabot)
9cb10d735f ColorPicker: Remove deprecated onColorChange prop (#49923) (#49927)
(cherry picked from commit 8d59ba2be9)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-31 16:46:21 +02:00
Christopher Moyer
4b5adfb1ba Docs: combines all SAML topics into one topic (#49443) (#49755)
* Docs: combines all SAML topics into one topic (#49443)

* combines all SAML topics

* resolves merge conflicts

* makes prettier

(cherry picked from commit 8c84d62e3d)

* Fix broken relrefs

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-05-31 09:27:07 -05:00
Grot (@grafanabot)
adac77dd1f ClipboardButton: Simplify callbacks (#49847) (#49852)
(cherry picked from commit 70980fbb44)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-31 14:43:49 +01:00
Grot (@grafanabot)
a482c055a0 Prometheus: Predefined scopes for Azure authentication (#49861) (#49881)
(cherry picked from commit 0101c19374)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-31 09:16:20 -04:00
Grot (@grafanabot)
6d107a7f41 Alerting: Add Go error message to warning log for screenshots. (#49870) (#49917)
Makes debugging problems with alert screenshotting easier.

(cherry picked from commit 56f40bd413)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-05-31 15:07:57 +02:00
Grot (@grafanabot)
c73b1787ec [v9.0.x] Alerting: Add fgac support to alert list panel (#49912)
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-05-31 14:41:35 +02:00
Grot (@grafanabot)
a8dbc1eaa0 UI/Card: Remove deprecated props (#49885) (#49900)
(cherry picked from commit d590012a18)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-31 13:38:22 +01:00
Grot (@grafanabot)
a87062e4e6 AuthProxy: Remove deprecated ldap_sync_ttl setting (#49902) (#49908)
* Remove deprecated ldap_sync_ttl

(cherry picked from commit 389eec089e)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-31 14:19:59 +02:00
Grot (@grafanabot)
199b1467aa [v9.0.x] Prometheus: Cleanup annotation editor (#49884)
* Prometheus: Cleanup annotation editor (#49615)

* Remove unused code

* Remove test

* Remove Builder mode and simplify the code

* Fix step mapping

* Fix import

* change placeholder

(cherry picked from commit 72367cf1ad)

* Change import

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-05-31 13:54:28 +02:00
Grot (@grafanabot)
cf7ed5ed22 add feature highlighting in the expanded menu (#49892) (#49901)
(cherry picked from commit 0089779945)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-31 13:23:27 +02:00
Grot (@grafanabot)
1d83694679 RBAC: drop permissions with folder:create action added by migration (#49878) (#49891)
(cherry picked from commit f4f25d911b)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-31 12:58:06 +02:00
Grot (@grafanabot)
8c91d4e6e2 Alerting: fix layout with long words / numbers (#49882) (#49889)
(cherry picked from commit e04f84fd1b)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-05-31 12:54:17 +02:00
Grot (@grafanabot)
326c48347e UI/Button: Remove deprecated "link" variant (#49843) (#49877)
(cherry picked from commit 0012d2d81f)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-31 11:44:52 +02:00
Grot (@grafanabot)
606323212e Dependencies: Update etcd module (#49873) (#49880)
* Update etcd

* Update go.sum

* Replace etcd due to broken module

(cherry picked from commit 3587a5559b)

Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-05-31 11:28:33 +02:00
Grot (@grafanabot)
f7d8974f52 Angular: Remove deprecated angular modal support and libs (#49781) (#49869)
(cherry picked from commit 8fa8c9dc8b)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-31 08:36:17 +02:00
Grot (@grafanabot)
50ada76a7d PanelEditor: Fixes issue with Table view and multi data frames (#49854) (#49866)
(cherry picked from commit 056a1fec3d)

Co-authored-by: Joao Silva <100691367+JoaoSilvaGrafana@users.noreply.github.com>
2022-05-31 05:47:14 +02:00
Grot (@grafanabot)
5820ac0d76 HeatmapNG: ensure non-zero y bucket size (#49454) (#49865)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 143f9e2dd9)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-05-31 05:39:47 +02:00
Grot (@grafanabot)
2a2982f9cc Alerting: Chore: Fix event name in ngalert/README.md (#49863)
Fix event name from *evalContext to *evaluation as #45144.

(cherry picked from commit 8b2a3a018d)

Co-authored-by: kyamau <kyamau.cs@gmail.com>
2022-05-31 10:59:31 +08:00
Grot (@grafanabot)
4e90a72115 [v9.0.x] SearchV2: Fix search input width on mobile (#49853)
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-05-30 19:00:02 +02:00
Grot (@grafanabot)
d145bf358e Dashboard: Fix panel menu styling issues (#49806) (#49849)
* Dashboard: Fix panel menu styling issues

* remove !importants I added

(cherry picked from commit e0bb01aea6)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-05-30 18:34:45 +02:00
Grot (@grafanabot)
ed06e3e4f9 Alerting: Enable Unified Alerting for open source and enterprise (#49834) (#49845)
This commit enables Unified Alerting for open source and enterprise unless disabled in configuration.

(cherry picked from commit 3b7f871bf4)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-05-30 18:13:39 +02:00
Grot (@grafanabot)
27b20676af Chore: Update theme json (#49480) (#49497)
(cherry picked from commit c043a2f83a)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-05-30 17:06:16 +01:00
Grot (@grafanabot)
6949f6dddc Prometheus: Predefined scopes for Azure authentication (#49557) (#49842)
* Predefined scopes for Azure Prometheus

* Allow override of audience

(cherry picked from commit 2b83cf4618)

Co-authored-by: Sergey Kostrukov <sergey@kostrukov.com>
2022-05-30 17:56:41 +02:00
Grot (@grafanabot)
f8012e6789 Fix: Timeseries migration regex override (#49629) (#49837)
(cherry picked from commit 3d3cf74038)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-05-30 17:32:23 +02:00
Grot (@grafanabot)
c960454bd4 AzureMonitor: migrate Logs+Arg QueryEditor to @grafana/experimental (#48978) (#49833)
* AzureMonitor: use @grafana/experimental for LogsQueryEditor

ref #48711

* AzureMonitor: migrate ArgQueryEditor to @grafana/experimental.

Change CodeEditor to 100% instead of 1000px to match LogsQueryEditor.

ref #48713

(cherry picked from commit 6554bbd70f)

Co-authored-by: Adam Simpson <adam@adamsimpson.net>
2022-05-30 16:30:11 +02:00
Grot (@grafanabot)
64feb04206 Prometheus: Disable prometheusStreamingJSONParser by default (#49825) (#49832)
(cherry picked from commit b8563958bd)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-30 16:24:33 +02:00
Grot (@grafanabot)
9a33b19662 RolePicker: Add extra offset for menu position (#49823) (#49831)
(cherry picked from commit a71e371877)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2022-05-30 16:21:04 +02:00
Grot (@grafanabot)
fd8c11f51d AzureMonitor: Document maximum returned records for Resource Graph (#49801) (#49828)
(cherry picked from commit aceb218157)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-05-30 16:12:42 +02:00
Isabella Siu
36ad4fa677 CloudWatch: Use scopedVars in expressions (#49178) (#49771)
* CloudWatch: Use scopedVars in expressions

* fix spec test

(cherry picked from commit b80934617b)
2022-05-30 16:12:09 +02:00
Grot (@grafanabot)
e2f34a611c cap mobile nav height (#49785) (#49804)
(cherry picked from commit 10680c1775)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-30 13:15:05 +02:00
Grot (@grafanabot)
f9be87ea17 add event tracking to navigation (#49800) (#49803)
(cherry picked from commit 309ad38fd6)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-30 13:07:57 +02:00
Vardan Torosyan
ba0beb8596 Quick Ugly Fix for Oauth not to make web_hack.go panic (#49653) (#49797) 2022-05-30 11:55:03 +02:00
Grot (@grafanabot)
c0d4512f4c Search: Fix overflow issue with folder view (#49723) (#49799)
(cherry picked from commit 17d0133008)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-30 11:43:15 +02:00
Grot (@grafanabot)
9370bad798 Chore: Remove deprecated surface prop from IconButton (#49715) (#49745)
* Chore: Remove deprecated `surface` prop from IconButton

* Update component docs

(cherry picked from commit 3d8eda0132)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-30 10:20:04 +01:00
Grot (@grafanabot)
30b77e9716 PanelChrome: Fixes issue with padding not being applied as gridUnits (#49751) (#49780)
(cherry picked from commit 7be5142164)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-30 07:58:02 +02:00
JitaC
0b7e5aa9cf Docs: Update create alerting rules topics (#49764) (#49770)
* Updated topic on Grafana managed rule.

* Updated loki and mimir rules and recording rules topics

* Checkin changes.

* Fixed typo
2022-05-28 18:57:55 -04:00
JitaC
5d23308a22 Docs: Refactor contact points section of alerting docs (#49758)
* Initial commit

* weight adjustments

* Checkin changes.

(cherry picked from commit f5a3ac855d)
2022-05-27 13:40:26 -04:00
Grot (@grafanabot)
e2a60b86f2 Loki: Fix unwrap parsing (#49732) (#49752)
(cherry picked from commit 745b101d41)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-05-27 14:17:27 +02:00
Grot (@grafanabot)
6054bd0e2c Alerting: Add tests for Slack Notifier Image Upload (#49669) (#49747)
Tests that file bytes are correctly read from storage when an image is
available without a URL. Tests that not found and success cases are both
handled.

(cherry picked from commit d5a327f43d)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-05-27 10:46:15 +08:00
Grot (@grafanabot)
afa40190d4 SearchV2: improve searcher API, and include a fallback SQL based implementation (#49535) (#49746)
(cherry picked from commit a641949a05)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-26 17:30:58 -07:00
Grot (@grafanabot)
9f3ade9472 Canvas: Fix element placement UX (#49665) (#49727) 2022-05-26 17:09:43 -07:00
Grot (@grafanabot)
7e4327d254 Alerting: Endpoints for provisioning mute timings (#49635) (#49735)
* Add validator for mute timing and make it provisionable

* Add tests to ensure prometheus validators are running and errors are propagated

* Internal API for manipulating mute timings

* Define and generate API layer

* Wire up generated code

* Implement API handlers

* Tests for golang layer

* Fix reference bug

* Fix linter and auth tests

* Resolve semantic errors and regenerate

* Remove pointless comment

* Extract out provisioning path param keys, simplify

* Expected number of paths

(cherry picked from commit 909ebcf979)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-05-26 16:06:52 -05:00
Jack Baldry
ccd1270f28 Convert TOML front matter to YAML (#49729)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2022-05-26 13:26:26 -04:00
Grot (@grafanabot)
5fd9fee933 Search: add icon for row and singlestat panels (#49620) (#49634)
(cherry picked from commit 2fa91b75e0)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-26 18:50:09 +02:00
JitaC
c3cc01912b Docs: Move alert rule section to alerting fundamentals section (#49657) (#49659)
* initial commit

* Added links to alert rules, and fixes one broken alerting relref.
2022-05-26 11:06:09 -04:00
Jack Westbrook
243a6cfb6c Toolkit: Bump dependencies (#47826) (#49714)
* chore(typescript): remove sanitize_url.d.ts in favour of npm package types

* chore(toolkit): bump all webpack related deps inline with grafana core

* refactor(toolkit): prefer webpack types and use from imports for bundling

* feat(toolkit): bundle plugins using webpack 5 and babel

* chore(toolkit): but all eslint deps inline with grafana core

* refactor(toolkit): rewrite linting step to use new eslint node api

* chore(toolkit): bump jest dependencies inline with grafana core

* refactor(toolkit): update jest config for jest 27

* fix(toolkit): resolve toolkit if using yarn berry

* docs(toolkit): update instructions for developing with yarn berry

* chore(toolkit): remove yarnlink code as won't work with yarn berry

* chore(toolkit): bump remaining dependencies

* chore(toolkit): remove unused core.start task

* feat(toolkit): use browserlist when building plugins

* chore(toolkit): add browserslist dependency

* refactor(toolkit): resolve style loaders, update postcss options for webpack5

* chore(toolkit): put back grafana/data and grafana/ui

* docs(toolkit): improve instructions for developing toolkit locally

* chore(toolkit): clean up webpack debug and warnings

* chore(input-datasource): remove pnpwebpack plugin and update browserslist to solve failing build

* chore(renovatebot): remove toolkit package.json from ignorePaths

* revert(renovate): put back toolkit package.json in ignorePaths

* feat(toolkit): introduce babel plugins

* refactor(toolkit): remove runtime automatic from preset-react for earlier versions of react

* refactor(toolkit): add missing fallbacks to webpack config

* fix(toolkit): remove spaces from copy webpack glob so files are copied

* refactor(toolkit): fix up babel typescript support and copy browserlist on build

* chore(yarn): refresh lock file

* revert(toolkit): remove browsers list so plugins compile to ES5

* revert(toolkit): remove copying .browserslistrc

(cherry picked from commit f4353bbbc4)
2022-05-26 16:55:05 +02:00
Grot (@grafanabot)
94274ac0ec Query History: Add feature tracking for query history (#49685) (#49711)
* Add feature tracking for query history

* Fix unit tests

* Update event names

(cherry picked from commit e0adb41e80)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-26 16:43:52 +02:00
Grot (@grafanabot)
0b05659c69 Chore: Remove deprecated TextDisplayOptions export (#49705) (#49710)
(cherry picked from commit c6ac9410b2)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-26 15:28:55 +01:00
Grot (@grafanabot)
8656591303 Docs: Document Prometheus NaN breaking change (#49688) (#49703) 2022-05-26 15:54:12 +02:00
Grot (@grafanabot)
bdfc7f2a37 Docs: Fix duplicate text in What’s new in Grafana v9.0 (#49699) (#49702)
(cherry picked from commit 668625aaeb)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-26 15:50:23 +02:00
Grot (@grafanabot)
05cd2af454 Chore: Remove usage of deprecated getColorForTheme function (#49519) (#49700)
(cherry picked from commit 308ceebdd1)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-05-26 14:43:55 +01:00
Joao Silva
7e99d6dc46 TimeRange: Fixes issue when zooming out on a timerange with timespan 0 (#49622) (#49695) 2022-05-26 14:31:46 +01:00
Joao Silva
9f9f8c3a23 Variables: Fixes issue with data source variables not being correctly used in panel queries (#49323) (#49697) 2022-05-26 14:31:33 +01:00
Grot (@grafanabot)
073f747679 Loki code editor: do not run query on blur in explore mode (#49241) (#49696)
* loki code editor: do not run query on blur in explore mode

* loki: code editor: better change tracking

* fixed comment

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
(cherry picked from commit 386181cf45)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-05-26 15:21:37 +02:00
Grot (@grafanabot)
1c67b35d6b Preferences: Fix updating of preferences for Navbar and Query History (#49677) (#49694)
* Preferences: Fix PUT for Navbar and Query History

* Update linting

* Fix linting

* Use models defined in preference package in preferences

* Remove white space

* Revert "Use models defined in preference package in preferences"

This reverts commit 6f7aa9f8d3.

(cherry picked from commit e25a49ff49)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-05-26 14:57:55 +02:00
Grot (@grafanabot)
a4948e1018 fix: only "swallow" the json() parsing error if the response is empty (#47493) (#49692)
(cherry picked from commit 84b7efb393)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2022-05-26 14:52:51 +02:00
Grot (@grafanabot)
db1c49a95b Build: Enable long term caching for frontend assets (#47625) (#49691)
* build(webpack): move CopyUniconsPlugin into own file

* chore(webpack): delete unused blobUrl and compile loaders

* build(webpack): prefer contenthash over fullhash for longer caching

* build(webpack): set optimization.moduleIds named only in dev

* build(webpack): introduce HTMLWebpackCSSChunks so templates can access theme css by name

* feat: inject css files with contenthash in html templates

* revert(error-template): remove ContentDeliveryURL from CSS href

* refactor(index-template): update grafanaBootData.themePaths

* chore(webpack): add typescript annotations for CopyUniconsPlugin

(cherry picked from commit 78bef7a26a)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-05-26 14:43:41 +02:00
Grot (@grafanabot)
83b73db401 Alerting: Fix swagger specification (#49273) (#49687)
* Alerting: fix specification

* Update merged swagger specification

(cherry picked from commit 7cf321d7bd)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-05-26 13:56:23 +02:00
Grot (@grafanabot)
e3a35bd2ff Remove migrations from behind configs (#49415) (#49684) 2022-05-26 13:41:03 +02:00
Grot (@grafanabot)
80bf4e2dba ValueMapping: Add support for regex replacement over multiple lines (#49607) (#49683)
(cherry picked from commit e402b3617b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-26 13:34:39 +02:00
Grot (@grafanabot)
3fac10229b Notification history: Enable by default (#49502) (#49681)
* remove persistNotifications feature flag

* remove unused imports

(cherry picked from commit 8b509eb6dd)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-26 13:19:18 +02:00
Grot (@grafanabot)
4e35edcf07 Fix wrap_handler() panic during OAuth login (#49671) (#49678) 2022-05-26 12:44:13 +02:00
Grot (@grafanabot)
60ddede835 Narrow the alert condition picker (#49570) (#49675)
(cherry picked from commit 20a83ba14f)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-05-26 12:39:49 +02:00
Grot (@grafanabot)
2630dcaea5 Chore: Re-enable skipped test (#49484) (#49676)
* Re-enable skipped test

(cherry picked from commit a008a01315)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-26 12:25:18 +02:00
Grot (@grafanabot)
4c6cfdcb7d loki: better unpack handling (#49074) (#49674)
(cherry picked from commit b54817033a)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-05-26 11:43:07 +02:00
Grot (@grafanabot)
d3433be585 loki: added two new functions (#49617) (#49666)
(cherry picked from commit 514d1bbbdd)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-05-26 10:38:22 +02:00
Grot (@grafanabot)
236dabfc1d refactoring: saml (#48114) (#49667)
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
(cherry picked from commit d8d7b3ec9d)

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2022-05-26 10:34:50 +02:00
Grot (@grafanabot)
dd1d1dae04 Alerting: Add stored screenshot utilities to the channels package. (#49470) (#49664)
Adds three functions:
`withStoredImages` iterates over a list of models.Alerts, extracting a stored image's data from storage, if available, and executing a user-provided function.
`withStoredImage` does this for an image attached to a specific alert.
`openImage` finds and opens an image file on disk.

Moves `store.Image` to `models.Image`
Simplifies `channels.ImageStore` interface and updates notifiers that use it to use the simpler methods.
Updates all pkg/alert/notifier/channels to use withStoredImage routines.

(cherry picked from commit 9e8efaa459)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-05-26 16:12:10 +08:00
Grot (@grafanabot)
0a07d97dd1 Old Graph migration: Preserve null values settings (#49493) (#49579)
* Graph migration: Preserve null values settings

* Review

(cherry picked from commit 30880e6e18)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-05-26 00:47:30 -07:00
Grot (@grafanabot)
324dcae868 Prometheus: Fix sort issue in wide frames (#49660) (#49662) 2022-05-26 05:50:53 +02:00
JitaC
09a93b17d9 Docs: Move alert rule section to alerting fundamentals section (#49657)
* initial commit

* Added links to alert rules, and fixes one broken alerting relref.

(cherry picked from commit a968a43e0c)
2022-05-25 19:37:18 -04:00
JitaC
e5248a2aa7 Docs: Created separate section for migration under alerting (#49616) (#49658)
* Lots of changes, including new topic, also fixed all alerting relrefs

* Push stashed change.

* Updated content to reflect that Grafana alerting is enabled during upgrade.

* Fix typo

* Update docs/sources/alerting/migrating-alerts/_index.md

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

* Checkin changes.

* Updates from Chris's review.

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit b5d48d217a)
2022-05-25 19:32:55 -04:00
Grot (@grafanabot)
7ac8527dac Timeseries: fix outside range stale state (#49633) (#49656)
Co-authored-by: Todd Treece <todd.treece@grafana.com>
(cherry picked from commit df90393057)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-05-25 16:32:33 -07:00
JitaC
7db4119b48 Check in changes. 2022-05-25 19:12:46 -04:00
Grot (@grafanabot)
0726a56956 Util: Improve performance of strings.SplitString (#49115) (#49654)
Replaces the regexp with calls to strings.ReplaceAll and strings.Fields
for simplicity and improved performance.

Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
(cherry picked from commit 1f85101787)

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
2022-05-25 23:22:50 +02:00
Grot (@grafanabot)
1a69cc5b21 Canvas: Improve changing element options UX (#49555) (#49639)
(cherry picked from commit 2449f62dbe)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-05-25 13:09:28 -07:00
Grot (@grafanabot)
81bf734191 Updated document with Michelle Tan's comments (#49648) (#49651)
(cherry picked from commit 1d7d8bbf96)

Co-authored-by: JitaC <70489351+achatterjee-grafana@users.noreply.github.com>
2022-05-25 15:25:09 -04:00
Grot (@grafanabot)
4a6b94ae8e [v9.0.x] SearchV2 - Fix starred dashboards for new organizations error (#49649)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2022-05-25 21:10:21 +02:00
Grot (@grafanabot)
4bd6f62dfd AccessControl: Replace IsEnterprise checks with license checks (#49572) (#49646)
(cherry picked from commit 5caf97be40)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-25 20:59:47 +02:00
Grot (@grafanabot)
1d4e2d12da Prometheus: Enable prometheusStreamingJSONParser by default (#49475) (#49636)
(cherry picked from commit 70b3a0a500)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-25 19:12:24 +02:00
Grot (@grafanabot)
8f8be23032 Canvas: Fix resize breaking certain constraints (#49551) (#49553)
Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-05-25 09:43:43 -07:00
Grot (@grafanabot)
0cc75cc593 show notification tab only to editor (#49624) (#49632)
(cherry picked from commit 307c207a24)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-05-25 18:36:21 +02:00
JitaC
9e622ec87c Docs: What's new 9.0 (#49453) (#49628)
* initial commit

* Add to index list

* Improvements to intro section

* missing plural

* Minor fixes

* Some more changes.

* Updated image links

* Hide section "InfluxDB: Support for browser access mode removed

* Checkin more changes

* More changes.

* Fixed more image links

* Last batch of changes

* Fixed a few typos and ran prettier.

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

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-25 12:27:19 -04:00
Grot (@grafanabot)
f966aa3474 Apply .page-toolbar class correctly (#49603) (#49627)
(cherry picked from commit a0b707ebe0)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-25 17:56:52 +02:00
Grot (@grafanabot)
961a8c23de fix broken alias due to #48635 (#49623) (#49626)
(cherry picked from commit f40248a06d)

Co-authored-by: Dan Cech <dcech@grafana.com>
2022-05-25 11:54:38 -04:00
Grot (@grafanabot)
823a3bfbf9 Prometheus: Migrate annotation editor to react (#48814) (#49518)
* Modify the annotation support api

* Migrate annotation editor component

* Update public/app/features/annotations/standardAnnotationSupport.ts

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>

* Move the escape hatches out of the public API

* Fix props transforms

* Break import cycle

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 4124294011)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-05-25 14:57:20 +02:00
Grot (@grafanabot)
c0286409c6 Query History: Track query history migration failures (#49560) (#49577)
(cherry picked from commit a67add5239)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-25 14:22:24 +02:00
Grot (@grafanabot)
7106106e3b Chore: Convert a test from enzyme to testing library (#49492) (#49576)
(cherry picked from commit f93ad85b08)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-05-25 14:21:18 +02:00
Grot (@grafanabot)
a2f5457463 AccessControl: Grant data source reader to all users when running oss (#49514) (#49604)
* grant data source reader to all users when running oss or enterprise
without license

* fix asserts in alerting tests

* add oss licensing service for test setup

* fix tests to pass in enterprise

* lint

* fix tests

* set setting.IsEnterprise flag for tests

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
(cherry picked from commit 1796a1d277)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-25 14:17:14 +02:00
Grot (@grafanabot)
ef458b79d0 AccessControl: Pass current org id to UsersTable (#49584) (#49606)
* Pass current org id to UsersTable

* Mock contextSrv and update snapshot

(cherry picked from commit ef6b53ed23)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-25 14:16:14 +02:00
Grot (@grafanabot)
fc79360e15 Access control: fix a typo for folder actions (#49582) (#49601)
* fix a typo for folder actions

* update dashboard action too

(cherry picked from commit 8d313f54e2)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2022-05-25 13:28:34 +02:00
Grot (@grafanabot)
8d6b47f11d don't close drawer when clicking a select within it (#49583) (#49600)
(cherry picked from commit 5455174de5)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-25 11:19:17 +00:00
Grot (@grafanabot)
6ab3724a12 AngularSupport: Update description for angular_support_enabled config option (#49569) (#49574)
* AngularSupport: Update description for angular_support_enabled config option

* Update angular deprecration plan doc

* Update

* Update article

* Updated

(cherry picked from commit e1909fe74b)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-25 12:07:59 +02:00
Grot (@grafanabot)
312b57aa76 Login: Fix AuthInfo update process (#49556) (#49565)
* Login: Fix AuthInfo update process

* Fix GoDoc

* Add regression test for oauth info overwrite

Co-authored-by: jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 73a729bbe8)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-05-25 10:17:56 +02:00
Grot (@grafanabot)
49e653dbaf Prevent exception when panel has multiple queries (#49368) (#49562)
This fixes the issues that when a panel has multiple queries this throws an exception if source is not part of the current frame

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit eab806620c)

Co-authored-by: Ward Bekker <ward@wardbekker.com>
2022-05-25 10:05:02 +02:00
Grot (@grafanabot)
b5da0dcf39 Search: Add primary background for global search container (#49473) (#49499)
* Search: Add primarhy background for global search container

* Fix spacing for ActionRow

* Fixing ts issue

(cherry picked from commit 20f8b8625a)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-05-25 08:45:19 +02:00
Grot (@grafanabot)
9854234c66 DatePicker: able to set minimum date that can be selected (#49503) (#49505)
(cherry picked from commit d373beeb73)

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2022-05-25 06:33:45 +00:00
JitaC
0769151da2 Docs: Fixed typo in what's new in grafana 9 (#49549)
* Fixed typo

* Updated metadata

(cherry picked from commit 3a541ea127)
2022-05-24 22:13:00 -04:00
Grot (@grafanabot)
1e2708cbcf Prometheus: Streaming JSON parser performance improvements (#48792) (#49542)
(cherry picked from commit 94b9c524a8)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-05-24 22:35:19 +02:00
Grot (@grafanabot)
d77a09e2d8 upgrade grabpl (#49534) (#49536)
(cherry picked from commit 61101056b6)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2022-05-24 20:36:10 +02:00
Grot (@grafanabot)
0704838c95 InfluxDB: Removing influxDB backend migration feature flag (#49531) (#49532)
Removing the `influxdbBackendMigration` feature toggle default value.

(cherry picked from commit 27c26c30d1)

Co-authored-by: Sriram <yesoreyeram@gmail.com>
2022-05-24 18:44:11 +01:00
Grot (@grafanabot)
b8544741aa AzureAD: Fallback to no groups if user does not have permission to query groups from azure (#49506) (#49522)
* If GroupMemver.Read.All permissions is not configured return no groups

* fix log

(cherry picked from commit 624f8ef40d)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-05-24 18:16:55 +02:00
Grot (@grafanabot)
4dd08e7da6 Alerting: Validate alert notification UID length (#45546) (#49513)
* validate alert notification UID length

* simplify-ish

* remove unused field

* whoopsie

* delete newline

* remove check

* apply feedback

(cherry picked from commit 635fa4ab0f)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-05-24 17:21:27 +02:00
Grot (@grafanabot)
ba4c292f67 Fix escape in Modal/DashboardSettings + add some unit tests (#49500) (#49504)
(cherry picked from commit 8166d7dc4d)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-05-24 16:47:57 +02:00
Grot (@grafanabot)
992d6aeed4 "Release: Updated versions in package to 9.0.0-beta.1" (#49488) 2022-05-24 16:06:14 +02:00
Gilles De Mey
d1b8e51871 Alerting: Make alertmanager datasource stable (#49485) (#49491)
(cherry picked from commit 86871807d2)
2022-05-24 15:45:10 +02:00
1557 changed files with 86129 additions and 35442 deletions

View File

@@ -125,12 +125,9 @@ exports[`no enzyme tests`] = {
"public/app/core/components/QueryOperationRow/QueryOperationAction.test.tsx:3032694716": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/core/components/QueryOperationRow/QueryOperationRow.test.tsx:2026575657": [
"public/app/core/components/QueryOperationRow/QueryOperationRow.test.tsx:3743889097": [
[0, 26, 13, "RegExp match", "2409514259"]
],
"public/app/core/components/Select/FolderPicker.test.tsx:993468764": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/core/components/Select/MetricSelect.test.tsx:3351544014": [
[0, 19, 13, "RegExp match", "2409514259"]
],
@@ -173,9 +170,6 @@ exports[`no enzyme tests`] = {
"public/app/features/dimensions/editors/ThresholdsEditor/ThresholdsEditor.test.tsx:4164297658": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"public/app/features/explore/RichHistory/RichHistoryStarredTab.test.tsx:523695501": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"public/app/features/folders/FolderSettingsPage.test.tsx:1109052730": [
[0, 19, 13, "RegExp match", "2409514259"]
],
@@ -203,7 +197,7 @@ exports[`no enzyme tests`] = {
"public/app/features/teams/TeamSettings.test.tsx:2043271249": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/users/UsersListPage.test.tsx:3908145117": [
"public/app/features/users/UsersListPage.test.tsx:2518052139": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/features/users/UsersTable.test.tsx:263958312": [
@@ -212,11 +206,11 @@ exports[`no enzyme tests`] = {
"public/app/plugins/datasource/cloud-monitoring/components/Aggregation.test.tsx:3822406835": [
[1, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/cloudwatch/components/ConfigEditor.test.tsx:1224072551": [
"public/app/plugins/datasource/cloudwatch/components/ConfigEditor.test.tsx:227258837": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/cloudwatch/components/LogsQueryField.test.tsx:2097436158": [
[1, 19, 13, "RegExp match", "2409514259"]
"public/app/plugins/datasource/cloudwatch/components/LogsQueryField.test.tsx:1501504663": [
[2, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/elasticsearch/configuration/ConfigEditor.test.tsx:3481855642": [
[0, 26, 13, "RegExp match", "2409514259"]
@@ -224,7 +218,7 @@ exports[`no enzyme tests`] = {
"public/app/plugins/datasource/elasticsearch/configuration/DataLinks.test.tsx:248699332": [
[0, 17, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/influxdb/components/ConfigEditor.test.tsx:3456478975": [
"public/app/plugins/datasource/influxdb/components/ConfigEditor.test.tsx:57753101": [
[0, 19, 13, "RegExp match", "2409514259"]
],
"public/app/plugins/datasource/loki/components/LokiExploreQueryEditor.test.tsx:1488067923": [

File diff suppressed because it is too large Load Diff

View File

@@ -3,7 +3,7 @@ name: publish_docs
on:
push:
branches:
- main
- v9.0.x
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
@@ -41,7 +41,7 @@ jobs:
host: github.com
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
source_folder: docs/sources
target_folder: content/docs/grafana/next
target_folder: content/docs/grafana/latest
allow_no_changes: 'true'
- shell: bash
run: |

View File

@@ -1,3 +1,548 @@
<!-- 9.0.0 START -->
# 9.0.0 (2022-06-10)
### Features and enhancements
- **API:** Add GET /api/annotations/:annotationId endpoint. [#47739](https://github.com/grafana/grafana/pull/47739), [@scottbock](https://github.com/scottbock)
- **API:** Add endpoint for updating a data source by its UID. [#49396](https://github.com/grafana/grafana/pull/49396), [@papagian](https://github.com/papagian)
- **AccessControl:** Add enterprise only setting for rbac permission cache. [#49006](https://github.com/grafana/grafana/pull/49006), [@kalleep](https://github.com/kalleep)
- **AccessControl:** Document basic roles changes and provisioning V2. [#48910](https://github.com/grafana/grafana/pull/48910), [@gamab](https://github.com/gamab)
- **AccessControl:** Enable RBAC by default. [#48813](https://github.com/grafana/grafana/pull/48813), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **AddDataSourceConfig:** Remove deprecated checkHealth prop. [#50296](https://github.com/grafana/grafana/pull/50296), [@kaydelaney](https://github.com/kaydelaney)
- **Alerting:** Add Image URLs to Microsoft Teams notifier. [#49385](https://github.com/grafana/grafana/pull/49385), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add RBAC actions and role for provisioning API routes. [#50459](https://github.com/grafana/grafana/pull/50459), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Add Screenshot URLs to Pagerduty Notifier. [#49377](https://github.com/grafana/grafana/pull/49377), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add a "Reason" to Alert Instances to show underlying cause of state. [#49259](https://github.com/grafana/grafana/pull/49259), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add a general screenshot service and alerting-specific image service. [#49293](https://github.com/grafana/grafana/pull/49293), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add image url or file attachment to email notifications. [#49381](https://github.com/grafana/grafana/pull/49381), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add image_urls to OpsGenie notification details. [#49379](https://github.com/grafana/grafana/pull/49379), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Add notification policy flow chart. [#49405](https://github.com/grafana/grafana/pull/49405), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Attach image URL to alerts in Webhook notifier format. [#49378](https://github.com/grafana/grafana/pull/49378), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Attach image URLs or upload files to Discord notifications. [#49439](https://github.com/grafana/grafana/pull/49439), [@alexweav](https://github.com/alexweav)
- **Alerting:** Attach image URLs to Google Chat notifications. [#49445](https://github.com/grafana/grafana/pull/49445), [@alexweav](https://github.com/alexweav)
- **Alerting:** Attach screenshot data to Unified Alerting notifications. [#49374](https://github.com/grafana/grafana/pull/49374), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Create folder for alerting when start from the scratch. [#48866](https://github.com/grafana/grafana/pull/48866), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Modify alertmanager endpoints for proxying using the datasource UID. [#47978](https://github.com/grafana/grafana/pull/47978), [@papagian](https://github.com/papagian)
- **Alerting:** Modify endpoint for testing a datasource rule using the UID. [#48070](https://github.com/grafana/grafana/pull/48070), [@papagian](https://github.com/papagian)
- **Alerting:** Modify prometheus endpoints for proxying using the datasource UID. [#48052](https://github.com/grafana/grafana/pull/48052), [@papagian](https://github.com/papagian)
- **Alerting:** State Manager takes screenshots. [#49338](https://github.com/grafana/grafana/pull/49338), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Use UID scope for folders authorization. [#48970](https://github.com/grafana/grafana/pull/48970), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** modify ruler endpoints for proxying using the datasource UID. [#48046](https://github.com/grafana/grafana/pull/48046), [@papagian](https://github.com/papagian)
- **Angular:** Adds back two angular directives that are still used by remaining angular bits and plugins. [#50380](https://github.com/grafana/grafana/pull/50380), [@torkelo](https://github.com/torkelo)
- **Azure Monitor:** Add Resource Picker to Metrics Queries. [#49029](https://github.com/grafana/grafana/pull/49029), [@sarahzinger](https://github.com/sarahzinger)
- **Azure Monitor:** Add search feature to resource picker. [#48234](https://github.com/grafana/grafana/pull/48234), [@sarahzinger](https://github.com/sarahzinger)
- **AzureMonitor:** Add support for selecting multiple options when using the equals and not equals dimension filters. [#48650](https://github.com/grafana/grafana/pull/48650), [@aangelisc](https://github.com/aangelisc)
- **AzureMonitor:** Remove deprecated code. [#48328](https://github.com/grafana/grafana/pull/48328), [@andresmgot](https://github.com/andresmgot)
- **Build:** Change names to PascalCase to match. [#48949](https://github.com/grafana/grafana/pull/48949), [@zuchka](https://github.com/zuchka)
- **Chore:** Remove deprecated DataSourceAPI methods. [#49313](https://github.com/grafana/grafana/pull/49313), [@ifrost](https://github.com/ifrost)
- **Chore:** Upgrade typescript to 4.6.4. [#49016](https://github.com/grafana/grafana/pull/49016), [@kaydelaney](https://github.com/kaydelaney)
- **Cloud Monitoring:** Use new annotation API. [#49026](https://github.com/grafana/grafana/pull/49026), [@kevinwcyu](https://github.com/kevinwcyu)
- **CloudMonitoring:** Allow to set a custom value or disable graph_period. [#48646](https://github.com/grafana/grafana/pull/48646), [@andresmgot](https://github.com/andresmgot)
- **CloudWatch:** Add generic filter component to variable editor. [#47907](https://github.com/grafana/grafana/pull/47907), [@iwysiu](https://github.com/iwysiu)
- **CloudWatch:** Added missing AWS/AppRunner metrics. [#49174](https://github.com/grafana/grafana/pull/49174), [@Aton-Kish](https://github.com/Aton-Kish)
- **CloudWatch:** Enable support for dynamic labels with migrated alias patterns. [#49173](https://github.com/grafana/grafana/pull/49173), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Pass label in deep link. [#49160](https://github.com/grafana/grafana/pull/49160), [@sunker](https://github.com/sunker)
- **Cloudwatch:** Use new annotation API. [#48102](https://github.com/grafana/grafana/pull/48102), [@sunker](https://github.com/sunker)
- **Dashboard:** Validate dashboards against schema on save. [#48252](https://github.com/grafana/grafana/pull/48252), [@sdboyer](https://github.com/sdboyer)
- **DashboardPickerByID:** Add option to exclude dashboards. [#49211](https://github.com/grafana/grafana/pull/49211), [@Clarity-89](https://github.com/Clarity-89)
- **DashboardPickerById:** Add optionLabel prop. [#47556](https://github.com/grafana/grafana/pull/47556), [@Clarity-89](https://github.com/Clarity-89)
- **Dashboards:** Display values of 0 with the configured decimal places. [#48155](https://github.com/grafana/grafana/pull/48155), [@wx1322](https://github.com/wx1322)
- **Data:** Remove deprecated types and functions from valueMappings. [#50035](https://github.com/grafana/grafana/pull/50035), [@kaydelaney](https://github.com/kaydelaney)
- **Elasticsearch:** Remove browser access mode. [#49014](https://github.com/grafana/grafana/pull/49014), [@gabor](https://github.com/gabor)
- **Elasticsearch:** Remove support for versions after their end of the life (<7.10.0). [#48715](https://github.com/grafana/grafana/pull/48715), [@ivanahuckova](https://github.com/ivanahuckova)
- **Encryption:** Add support for multiple data keys per day. [#47765](https://github.com/grafana/grafana/pull/47765), [@joanlopez](https://github.com/joanlopez)
- **Encryption:** Enable envelope encryption by default. [#49301](https://github.com/grafana/grafana/pull/49301), [@joanlopez](https://github.com/joanlopez)
- **Explore:** Remove support for legacy, compact format URLs. [#49350](https://github.com/grafana/grafana/pull/49350), [@gelicia](https://github.com/gelicia)
- **Explore:** Skip Angular error handling when Angular support is disabled. [#49311](https://github.com/grafana/grafana/pull/49311), [@ifrost](https://github.com/ifrost)
- **Explore:** simplify support for multiple query editors. [#48701](https://github.com/grafana/grafana/pull/48701), [@Elfo404](https://github.com/Elfo404)
- **FeatureToggles:** Support changing feature toggles with URL parameters. [#50275](https://github.com/grafana/grafana/pull/50275), [@ryantxu](https://github.com/ryantxu)
- **FileUpload:** Make component accessible by keyboard navigation. [#47497](https://github.com/grafana/grafana/pull/47497), [@tolzhabayev](https://github.com/tolzhabayev)
- **Formatting:** Make SI number formats more robust. [#50117](https://github.com/grafana/grafana/pull/50117), [@kaydelaney](https://github.com/kaydelaney)
- **Graph:** Deprecate Graph (old) and make it no longer a visualization option for new panels. [#48034](https://github.com/grafana/grafana/pull/48034), [@torkelo](https://github.com/torkelo)
- **IconButton:** IconButtons are now correctly aligned in Safari. [#48759](https://github.com/grafana/grafana/pull/48759), [@ashharrison90](https://github.com/ashharrison90)
- **Logger:** Enable new logging format by default. [#47584](https://github.com/grafana/grafana/pull/47584), [@ying-jeanne](https://github.com/ying-jeanne)
- **Loki:** Add more query patterns. [#50248](https://github.com/grafana/grafana/pull/50248), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Enable new visual query builder by default. [#48346](https://github.com/grafana/grafana/pull/48346), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** use the same dataframe-format for both live and normal queries. [#47153](https://github.com/grafana/grafana/pull/47153), [@gabor](https://github.com/gabor)
- **OAuth:** Make allowed email domain case insensitive. [#49252](https://github.com/grafana/grafana/pull/49252), [@Jguer](https://github.com/Jguer)
- **Panels:** Use the No value option when showing the no data message. [#47675](https://github.com/grafana/grafana/pull/47675), [@torkelo](https://github.com/torkelo)
- **Plugins:** Remove plugin list panel. [#46914](https://github.com/grafana/grafana/pull/46914), [@tolzhabayev](https://github.com/tolzhabayev)
- **Query History:** Enable new query history by default. [#49407](https://github.com/grafana/grafana/pull/49407), [@ifrost](https://github.com/ifrost)
- **QueryEditorRow:** Show query errors next to query in a consistent way across Grafana. [#47613](https://github.com/grafana/grafana/pull/47613), [@torkelo](https://github.com/torkelo)
- **SAML:** Implement Name Templates for assertion_attribute_name option. [#48022](https://github.com/grafana/grafana/pull/48022), [@mmandrus](https://github.com/mmandrus)
- **Service accounts:** Do not display service accounts assigned to team. [#48995](https://github.com/grafana/grafana/pull/48995), [@eleijonmarck](https://github.com/eleijonmarck)
- **Settings:** Use Grafana Azure SDK to pass Azure env vars for external plugins. [#48954](https://github.com/grafana/grafana/pull/48954), [@kostrse](https://github.com/kostrse)
- **Shortcuts:** Add shortcut to show shortcuts to the list of shortcuts. [#48395](https://github.com/grafana/grafana/pull/48395), [@ivanahuckova](https://github.com/ivanahuckova)
- **Traces Panel:** Add new Traces Panel visualization. [#47534](https://github.com/grafana/grafana/pull/47534), [@joey-grafana](https://github.com/joey-grafana)
- **Traces:** Filter by service/span name and operation in Tempo and Jaeger. [#48209](https://github.com/grafana/grafana/pull/48209), [@joey-grafana](https://github.com/joey-grafana)
- **Transformations:** Allow more complex regex expressions in `Rename by regex`. [#48179](https://github.com/grafana/grafana/pull/48179), [@ashharrison90](https://github.com/ashharrison90)
- **grafana/ui:** Add default type="button" to <Button>. [#48183](https://github.com/grafana/grafana/pull/48183), [@axelavargas](https://github.com/axelavargas)
### Bug fixes
- **Alerting:** Fix database unavailable removes rules from scheduler. [#49874](https://github.com/grafana/grafana/pull/49874), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **AzureMonitor:** Fix auto-selection of time-grain for metrics. [#49278](https://github.com/grafana/grafana/pull/49278), [@aangelisc](https://github.com/aangelisc)
- **DataSources:** Fixes issue with expressions not being queried. [#50446](https://github.com/grafana/grafana/pull/50446), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **GraphNG:** Fix thresholds by color not following data update. [#48571](https://github.com/grafana/grafana/pull/48571), [@zoltanbedi](https://github.com/zoltanbedi)
- **Jaeger:** Update operations dropdown. [#49329](https://github.com/grafana/grafana/pull/49329), [@joey-grafana](https://github.com/joey-grafana)
- **Login:** Fix mismatching label on auth_module in user list. [#49177](https://github.com/grafana/grafana/pull/49177), [@Jguer](https://github.com/Jguer)
- **Playlists:** Save button now correctly creates a new playlist. [#50381](https://github.com/grafana/grafana/pull/50381), [@ashharrison90](https://github.com/ashharrison90)
- **RBAC:** Fix migrations running in the wrong order causing inheritance problem in enterprise. [#50452](https://github.com/grafana/grafana/pull/50452), [@gamab](https://github.com/gamab)
- **RBAC:** Fix migrations running into the wrong order. (Enterprise)
- **ServiceAccounts:** Add identifiable token prefix to service account tokens. [#49011](https://github.com/grafana/grafana/pull/49011), [@Jguer](https://github.com/Jguer)
- **Traces:** Fix missing CopyButton on KeyValueTables and overlapping of panels. [#49271](https://github.com/grafana/grafana/pull/49271), [@svennergr](https://github.com/svennergr)
### Breaking changes
The `@grafana/ui` package helper function `selectOptionInTest` used in frontend tests has been removed as it caused testing libraries to be bundled in the production code of Grafana. If you were using this helper function in your tests please update your code accordingly:
```js
// before
import { selectOptionInTest } from '@grafana/ui';
// ...test usage
await selectOptionInTest(selectEl, 'Option 2');
// after
import { select } from 'react-select-event';
// ...test usage
await select(selectEl, 'Option 2', { container: document.body });
```
Issue [#50442](https://github.com/grafana/grafana/issues/50442)
Removed deprecated `checkHealth` prop from the `@grafana/e2e` `addDataSource` config. Previously this value defaulted to `false`, and has not been used in end-to-end tests since Grafana 8.0.3. Issue [#50296](https://github.com/grafana/grafana/issues/50296)
Removes the deprecated `LegacyBaseMap`, `LegacyValueMapping`, `LegacyValueMap`, and `LegacyRangeMap` types, and `getMappedValue` function from grafana-data. Migration is as follows:
| Old | New |
| ------------- | ------------- |
| `LegacyBaseMap` | `MappingType` |
| `LegacyValueMapping` | `ValueMapping` |
| `LegacyValueMap` | `ValueMap` |
| `LegacyRangeMap` | `RangeMap` |
| `getMappedValue` | `getValueMappingResult` | Issue [#50035](https://github.com/grafana/grafana/issues/50035)
This change fixes a bug in Grafana where intermittent failure of database, network between Grafana and the database, or error in querying the database would cause all alert rules to be unscheduled in Grafana. Following this change scheduled alert rules are not updated unless the query is successful.
The `get_alert_rules_duration_seconds` metric has been renamed to `schedule_query_alert_rules_duration_seconds`. Issue [#49874](https://github.com/grafana/grafana/issues/49874)
- Any secret (data sources credential, alert manager credential, etc, etc) created or modified with Grafana v9.0 won't be decryptable from any previous version (by default) because the way encrypted secrets are stored into the database has changed. Although secrets created or modified with previous versions will still be decryptable by Grafana v9.0.
- If required, although generally discouraged, the `disableEnvelopeEncryption` feature toggle can be enabled to keep envelope encryption disabled once updating to Grafana v9.0.
- In case of need to rollback to an earlier version of Grafana (i.e. Grafana v8.x) for any reason, after being created or modified any secret with Grafana v9.0, the `envelopeEncryption` feature toggle will need to be enabled to keep backwards compatibility (only from `v8.3.x` a bit unstable, from `8.5.x` stable).
- As a final attempt to deal with issues related with the aforementioned situations, the `grafana-cli admin secrets-migration rollback` command has been designed to move back all the Grafana secrets encrypted with envelope encryption to legacy encryption. So, after running that command it should be safe to disable envelope encryption and/or roll back to a previous version of Grafana.
- Alternatively or complementarily to all the points above, backing up the Grafana database before updating could be a good idea to prevent disasters (although the risk of getting some secrets corrupted only applies to those updates/created with after updating to Grafana v9.0). Issue [#49301](https://github.com/grafana/grafana/issues/49301)
- According to the dynamic labels documentation, you can use up to five dynamic values per label. Theres currently no such restriction in the alias pattern system, so if more than 5 patterns are being used the GetMetricData API will return an error.
- Dynamic labels only allow ${LABEL} to be used once per query. Theres no such restriction in the alias pattern system, so in case more than 1 is being used the GetMetricData API will return an error.
- When no alias is provided by the user, Grafana will no longer fallback with custom rules for naming the legend.
- In case a search expression is being used and no data is returned, Grafana will no longer expand dimension values, for instance when using a multi-valued template variable or star wildcard `*` in the dimension value field. Ref https://github.com/grafana/grafana/issues/20729
- Time series might be displayed in a different order. Using for example the dynamic label `${PROP('MetricName')}`, might have the consequence that the time series are returned in a different order compared to when the alias pattern `{{metric}}` is used
Issue [#49173](https://github.com/grafana/grafana/issues/49173)
In Elasticsearch, browser access mode was deprecated in grafana 7.4.0 and removed in 9.0.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue [#49014](https://github.com/grafana/grafana/issues/49014)
Environment variables passed from Grafana to external Azure plugins have been renamed:
- `AZURE_CLOUD` renamed to `GFAZPL_AZURE_CLOUD`
- `AZURE_MANAGED_IDENTITY_ENABLED` renamed to `GFAZPL_MANAGED_IDENTITY_ENABLED`
- `AZURE_MANAGED_IDENTITY_CLIENT_ID` renamed to `GFAZPL_MANAGED_IDENTITY_CLIENT_ID`
There are no known plugins which were relying on these variables. Moving forward plugins should read Azure settings only via Grafana Azure SDK which properly handles old and new environment variables. Issue [#48954](https://github.com/grafana/grafana/issues/48954)
Removes support for for ElasticSearch versions after their end-of-life, currently versions < 7.10.0. To continue to use ElasticSearch data source, upgrade ElasticSearch to version 7.10.0+.
Issue [#48715](https://github.com/grafana/grafana/issues/48715)
Application Insights and Insight Analytics queries in Azure Monitor were deprecated in Grafana 8.0 and finally removed in 9.0. Deprecated queries will no longer be executed. Please refer to the [documentation](https://grafana.com/docs/grafana/latest/datasources/azuremonitor/deprecated-application-insights/) for more information about this change.
Issue [#48328](https://github.com/grafana/grafana/issues/48328)
**grafana/ui: Button now specifies a default type="button"**
The `Button` component provided by @grafana/ui now specifies a default `type="button"` when no type is provided. In previous versions, if the attribute was not specified for buttons associated with a `<form>` the default value was `submit` per the [specification](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type)
You can preserve the old behavior by explicitly setting the type attribute: `<Button type="submit" />`
[Github Issue #41863](https://github.com/grafana/grafana/issues/41863).
Issue [#48183](https://github.com/grafana/grafana/issues/48183)
The `Rename by regex` transformation has been improved to allow global patterns of the form `/<stringToReplace>/g`. Depending on the regex match used, this may cause some transformations to behave slightly differently. You can guarantee the same behaviour as before by wrapping the `match` string in forward slashes (`/`), e.g. `(.*)` would become `/(.*)/` Issue [#48179](https://github.com/grafana/grafana/issues/48179)
`<Select />` menus will now portal to the document body by default. This is to give more consistent behaviour when positioning and overlaying. If you were setting `menuShouldPortal={true}` before you can safely remove that prop and behaviour will be the same. If you weren't explicitly setting that prop, there should be no visible changes in behaviour but your tests may need updating. Please see the original PR (https://github.com/grafana/grafana/pull/36398) for migration guides. If you were setting `menuShouldPortal={false}` this will continue to prevent the menu from portalling.
Issue [#48176](https://github.com/grafana/grafana/issues/48176)
Grafana alerting endpoint prefixed with `api/v1/rule/test` that tests a rule against a Corte/Loki data source now expects the data source UID as a path parameter instead of the data source numeric identifier. Issue [#48070](https://github.com/grafana/grafana/issues/48070)
Grafana alerting endpoints prefixed with `api/prometheus/` that proxy requests to a Cortex/Loki data source now expect the data source UID as a path parameter instead of the data source numeric identifier. Issue [#48052](https://github.com/grafana/grafana/issues/48052)
Grafana alerting endpoints prefixed with `api/ruler/` that proxy requests to a Cortex/Loki data source now expect the data source UID as a path parameter instead of the data source numeric identifier. Issue [#48046](https://github.com/grafana/grafana/issues/48046)
Grafana alerting endpoints prefixed with `api/alertmanager/` that proxy requests to an Alertmanager now expect the data source UID as a path parameter instead of the data source numeric identifier. Issue [#47978](https://github.com/grafana/grafana/issues/47978)
The format of log messages have been updated, `lvl` is now `level` and `eror`and `dbug` has been replaced with `error` and `debug`. The precision of timestamps has been increased. To smooth the transition, it is possible to opt-out of the new log format by enabling the feature toggle `oldlog`. This option will be removed in a future minor release. Issue [#47584](https://github.com/grafana/grafana/issues/47584)
In the Loki data source, the dataframe format used to represent Loki logs-data has been changed to a more efficient format. The query-result is represented by a single dataframe with a "labels" column, instead of the separate dataframes for every labels-value. When displaying such data in explore, or in a logs-panel in the dashboard will continue to work without changes, but if the data was loaded into a different dashboard-panel, or Transforms were used, adjustments may be necessary. For example, if you used the "labels to fields" transformation with the logs data, please switch to the "extract fields" transformation. Issue [#47153](https://github.com/grafana/grafana/issues/47153)
### Deprecations
`setExploreQueryField`, `setExploreMetricsQueryField` and `setExploreLogsQueryField` are now deprecated and will be removed in a future release. If you need to set a different query editor for Explore, conditionally render based on `props.app` in your regular query editor. Please refer to https://grafana.com/docs/grafana/latest/developers/plugins/add-support-for-explore-queries/ for more information.
Issue [#48701](https://github.com/grafana/grafana/issues/48701)
### Plugin development fixes & changes
- **Chore:** Remove react-testing-lib from bundles. [#50442](https://github.com/grafana/grafana/pull/50442), [@jackw](https://github.com/jackw)
- **Select:** Portal menu by default. [#48176](https://github.com/grafana/grafana/pull/48176), [@ashharrison90](https://github.com/ashharrison90)
<!-- 9.0.0 END -->
<!-- 9.0.0-beta3 START -->
# 9.0.0-beta3 (2022-06-06)
### Features and enhancements
- **Alerting:** Add provenance guard to config api. [#50147](https://github.com/grafana/grafana/pull/50147), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Make folder filter clearable in Alert list panel. [#50093](https://github.com/grafana/grafana/pull/50093), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Provisioning API - Alert rules. [#47930](https://github.com/grafana/grafana/pull/47930), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Remove Image Upload code from Slack notifier. [#50062](https://github.com/grafana/grafana/pull/50062), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Remove double quotes from matchers. [#50038](https://github.com/grafana/grafana/pull/50038), [@gotjosh](https://github.com/gotjosh)
- **Cloudwatch:** Dynamic labels autocomplete. [#49794](https://github.com/grafana/grafana/pull/49794), [@sunker](https://github.com/sunker)
- **Datasource:** Remove deprecated max_idle_connections_per_host setting. [#49948](https://github.com/grafana/grafana/pull/49948), [@marefr](https://github.com/marefr)
- **Datasource:** Remove support for unencrypted passwords. [#49987](https://github.com/grafana/grafana/pull/49987), [@marefr](https://github.com/marefr)
- **Dependencies:** Update to Golang version `1.17.11`. [#50253](https://github.com/grafana/grafana/pull/50253), [@dsotirakis](https://github.com/dsotirakis)
- **Loki:** Run query when pressing Enter on line-filters. [#49913](https://github.com/grafana/grafana/pull/49913), [@svennergr](https://github.com/svennergr)
- **Metrics:** Remove support for using summaries instead of histogram for HTTP instrumentation. [#49985](https://github.com/grafana/grafana/pull/49985), [@bergquist](https://github.com/bergquist)
- **Plugins:** Remove deprecated /api/tsdb/query metrics endpoint. [#49916](https://github.com/grafana/grafana/pull/49916), [@wbrowne](https://github.com/wbrowne)
- **Plugins:** Support headers field for check health. [#49930](https://github.com/grafana/grafana/pull/49930), [@marefr](https://github.com/marefr)
- **Prometheus/Loki:** Add raw query and syntax highlight in explain mode. [#50070](https://github.com/grafana/grafana/pull/50070), [@aocenas](https://github.com/aocenas)
- **Prometheus:** Migrate metadata queries to use resource calls. [#49921](https://github.com/grafana/grafana/pull/49921), [@srclosson](https://github.com/srclosson)
- **RBAC:** Make RBAC action names more consistent. [#49730](https://github.com/grafana/grafana/pull/49730), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **RBAC:** Make RBAC action names more consistent. (Enterprise)
- **Settings:** Sunset non-duration based login lifetime config. [#49944](https://github.com/grafana/grafana/pull/49944), [@sakjur](https://github.com/sakjur)
- **[9.0.x] Alerting:** Update alert rule diff to not see difference between nil and empty map. [#50198](https://github.com/grafana/grafana/pull/50198), [@yuri-tceretian](https://github.com/yuri-tceretian)
### Bug fixes
- **Alerting:** Fix alert list panel showing firing alerts with no instances. [#50069](https://github.com/grafana/grafana/pull/50069), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fix notification policy "Override grouping" form save. [#50031](https://github.com/grafana/grafana/pull/50031), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Remove double quotes from matchers. [#50046](https://github.com/grafana/grafana/pull/50046), [@alexweav](https://github.com/alexweav)
- **Alerting:** Use correct permission scope for external AM updates. [#50159](https://github.com/grafana/grafana/pull/50159), [@gillesdemey](https://github.com/gillesdemey)
- **Datasource:** Fix allowed cookies to be forwarded as header to backend datasources. [#49541](https://github.com/grafana/grafana/pull/49541), [@marefr](https://github.com/marefr)
- **Licensing:** Fix trial expiration warning. (Enterprise)
- **Loki:** Fix uncaught errors if `labelKey` contains special characters. [#49887](https://github.com/grafana/grafana/pull/49887), [@svennergr](https://github.com/svennergr)
- **Prometheus:** Fix aligning of labels of exemplars after backend migration. [#49924](https://github.com/grafana/grafana/pull/49924), [@aocenas](https://github.com/aocenas)
- **SharePDF:** Fix repeated datasource variables in PDF. (Enterprise)
- **State Timeline:** Fix Null Value Filling and Value Transformation. [#50054](https://github.com/grafana/grafana/pull/50054), [@codeincarnate](https://github.com/codeincarnate)
- **Usage stats:** Divide collection into multiple functions to isolate failures. [#49928](https://github.com/grafana/grafana/pull/49928), [@sakjur](https://github.com/sakjur)
### Breaking changes
Removes support for storing/using datasource `password` and `basicAuthPassword` unencrypted which was [deprecated in Grafana v8.1.0](https://grafana.com/docs/grafana/latest/installation/upgrading/#use-of-unencrypted-passwords-for-data-sources-no-longer-supported). Please use `secureJsonData.password` and `secureJsonData.basicAuthPassword`. Issue [#49987](https://github.com/grafana/grafana/issues/49987)
Removes the option to instrument HTTP request in Grafana using summaries instead of histograms. Issue [#49985](https://github.com/grafana/grafana/issues/49985)
Removes support for deprecated dataproxy.max_idle_connections_per_host setting. Please use max_idle_connections instead. Issue [#49948](https://github.com/grafana/grafana/issues/49948)
Removes the deprecated `getFormStyles` function from grafana-ui.
Prefer using `GrafanaTheme2` and the `useStyles2` hook. Issue [#49945](https://github.com/grafana/grafana/issues/49945)
The configuration options `auth.login_maximum_inactive_lifetime_days` and `auth.login_maximum_lifetime_days` were deprecated in Grafana v7.2.0 and have now been removed. Use `login_maximum_inactive_lifetime_duration` and `login_maximum_lifetime_duration` to customize the maximum lifetime of a login session. Issue [#49944](https://github.com/grafana/grafana/issues/49944)
Removed the deprecated `isFocused` and `isInvalid` props from the `InlineLabel` component. These props haven't done anything for a while, so migration is just a matter of removing the props. Issue [#49929](https://github.com/grafana/grafana/issues/49929)
Removed the deprecated `onColorChange` prop from `ColorPicker`. Moving forward the `onChange` prop should be used. Issue [#49923](https://github.com/grafana/grafana/issues/49923)
`/api/tsdb/query` API has been removed. Use [/api/ds/query](https://grafana.com/docs/grafana/latest/http_api/data_source/#query-a-data-source) instead.
Issue [#49916](https://github.com/grafana/grafana/issues/49916)
`onClipboardCopy` and `onClipboardError` APIs have been changed such that the callback's argument is just the text that's been copied rather than the old `ClipboardEvent` interface.
Migration should just be a matter of going from
```tsx
<ClipboardButton
{/*other props... */}
onClipboardCopy={(e) => {
console.log(`Text "${e.text}" was copied!`);
}}
/>
```
to
````tsx
<ClipboardButton
{/* other props... */}
onClipboardCopy={(copiedText) => {
console.log(`Text "${copiedText}" was copied!`);
}}
/>
``` Issue [#49847](https://github.com/grafana/grafana/issues/49847)
The following RBAC action renames have been carried out:
* `users.authtoken:update` -> `users.authtoken:write`;
* `users.password:update` -> `users.password:write`;
* `users.permissions:update` -> `users.permissions:write`;
* `users.quotas:update` -> `users.quotas:write`;
* `org.users.role:update` -> `org.users:write`;
* `alert.instances:update` -> `alert.instances:write`;
* `alert.rules:update` -> `alert.rules:write`;
* `users.authtoken:list` -> `users.authtoken:read`;
* `users.quotas:list` -> `users.quotas:read`;
* `users.teams:read` -> replaced by `users.read` + `teams:read`
We've added a migration from the old action names to the new names and have updated our documentation. But you will have to update any scripts and provisioning files that are using the old action names. Issue [#49730](https://github.com/grafana/grafana/issues/49730)
The following RBAC action renames have been carried out:
* `reports.admin:write` -> `reports:write`;
* `reports.admin:create` -> `reports:create`;
* `licensing:update` -> `licensing:write`;
* `roles:list` -> `roles:read`;
* `teams.roles:list` -> `teams.roles:read`;
* `users.roles:list` -> `users.roles:read`;
* `users.permissions:list` -> `users.permissions:read`
We've added a migration from the old action names to the new names and have updated our documentation. But you will have to update any scripts and provisioning files that are using the old action names. Issue [#3372](https://github.com/grafana/grafana/issues/3372)
### Plugin development fixes & changes
- **UI:** Remove deprecated getFormStyles function. [#49945](https://github.com/grafana/grafana/pull/49945), [@kaydelaney](https://github.com/kaydelaney)
- **InlineLabel:** Remove deprecated props. [#49929](https://github.com/grafana/grafana/pull/49929), [@kaydelaney](https://github.com/kaydelaney)
- **ColorPicker:** Remove deprecated onColorChange prop. [#49923](https://github.com/grafana/grafana/pull/49923), [@kaydelaney](https://github.com/kaydelaney)
- **ClipboardButton:** Simplify callbacks. [#49847](https://github.com/grafana/grafana/pull/49847), [@kaydelaney](https://github.com/kaydelaney)
<!-- 9.0.0-beta3 END -->
<!-- 9.0.0-beta2 START -->
# 9.0.0-beta2 (2022-05-31)
### Features and enhancements
- **Alerting:** Add legacy indicator to navbar. [#49511](https://github.com/grafana/grafana/pull/49511), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Add templated subject config to email notifier. [#49742](https://github.com/grafana/grafana/pull/49742), [@JacobsonMT](https://github.com/JacobsonMT)
- **Alerting:** Enable Unified Alerting for open source and enterprise. [#49834](https://github.com/grafana/grafana/pull/49834), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Make alertmanager datasource stable. [#49485](https://github.com/grafana/grafana/pull/49485), [@gillesdemey](https://github.com/gillesdemey)
- **Angular:** Remove deprecated angular modal support and libs. [#49781](https://github.com/grafana/grafana/pull/49781), [@torkelo](https://github.com/torkelo)
- **AuthProxy:** Remove deprecated ldap_sync_ttl setting. [#49902](https://github.com/grafana/grafana/pull/49902), [@kalleep](https://github.com/kalleep)
- **Build:** Enable long term caching for frontend assets. [#47625](https://github.com/grafana/grafana/pull/47625), [@jackw](https://github.com/jackw)
- **Chore:** Remove deprecated TextDisplayOptions export. [#49705](https://github.com/grafana/grafana/pull/49705), [@kaydelaney](https://github.com/kaydelaney)
- **Chore:** Remove deprecated `surface` prop from IconButton. [#49715](https://github.com/grafana/grafana/pull/49715), [@kaydelaney](https://github.com/kaydelaney)
- **Chore:** Remove usage of deprecated getColorForTheme function. [#49519](https://github.com/grafana/grafana/pull/49519), [@kaydelaney](https://github.com/kaydelaney)
- **DatePicker:** Add minDate prop. [#49503](https://github.com/grafana/grafana/pull/49503), [@alexanderzobnin](https://github.com/alexanderzobnin)
- **Notification history:** Enable by default. [#49502](https://github.com/grafana/grafana/pull/49502), [@ashharrison90](https://github.com/ashharrison90)
- **Prometheus:** Add pluginVersion to query. [#49414](https://github.com/grafana/grafana/pull/49414), [@toddtreece](https://github.com/toddtreece)
- **Prometheus:** Enable prometheusStreamingJSONParser by default. [#49475](https://github.com/grafana/grafana/pull/49475), [@toddtreece](https://github.com/toddtreece)
- **Prometheus:** Predefined scopes for Azure authentication. [#49557](https://github.com/grafana/grafana/pull/49557), [@kostrse](https://github.com/kostrse)
- **Prometheus:** Streaming JSON parser performance improvements. [#48792](https://github.com/grafana/grafana/pull/48792), [@toddtreece](https://github.com/toddtreece)
- **ValueMapping:** Add support for regex replacement over multiple lines. [#49607](https://github.com/grafana/grafana/pull/49607), [@ashharrison90](https://github.com/ashharrison90)
### Bug fixes
- **Accessibility:** Pressing escape in a Modal or DashboardSettings correctly closes the overlay. [#49500](https://github.com/grafana/grafana/pull/49500), [@ashharrison90](https://github.com/ashharrison90)
- **Alerting:** Validate alert notification UID length. [#45546](https://github.com/grafana/grafana/pull/45546), [@wbrowne](https://github.com/wbrowne)
- **BackendSrv:** Throw an error when fetching an invalid JSON. [#47493](https://github.com/grafana/grafana/pull/47493), [@leventebalogh](https://github.com/leventebalogh)
- **Fix:** Timeseries migration regex override. [#49629](https://github.com/grafana/grafana/pull/49629), [@zoltanbedi](https://github.com/zoltanbedi)
- **Loki:** Fix unwrap parsing in query builder. [#49732](https://github.com/grafana/grafana/pull/49732), [@ivanahuckova](https://github.com/ivanahuckova)
- **Navigation:** Position hamburger menu correctly in mobile view. [#49603](https://github.com/grafana/grafana/pull/49603), [@ashharrison90](https://github.com/ashharrison90)
- **PanelEditor:** Fixes issue with Table view and multi data frames. [#49854](https://github.com/grafana/grafana/pull/49854), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **Preferences:** Fix updating of preferences for Navbar and Query History. [#49677](https://github.com/grafana/grafana/pull/49677), [@ivanahuckova](https://github.com/ivanahuckova)
- **TimeRange:** Fixes issue when zooming out on a timerange with timespan 0. [#49622](https://github.com/grafana/grafana/pull/49622), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **Variables:** Fixes DS variables not being correctly used in panel queries. [#49323](https://github.com/grafana/grafana/pull/49323), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
### Breaking changes
Drop support for deprecated setting ldap_sync_ttl under [auth.proxy]
Only sync_ttl will work from now on Issue [#49902](https://github.com/grafana/grafana/issues/49902)
Removes support for deprecated `heading` and `description` props. Moving forward, the `Card.Heading` and `Card.Description` components should be used. Issue [#49885](https://github.com/grafana/grafana/issues/49885)
Removes the deprecated `link` variant from the `Button` component.
To migrate, replace any usage of `variant="link"` with `fill="text"`. Issue [#49843](https://github.com/grafana/grafana/issues/49843)
Removes the deprecated `surface` prop from the `IconButton` component. This prop hasn't actually done anything for a while, so it should be safe to just remove any instances of its usage.
Issue [#49715](https://github.com/grafana/grafana/issues/49715)
Removes the deprecated `TextDisplayOptions` export from `@grafana/data` in favor of `VizTextDisplayOptions` from `@grafana/schema`. To migrate, just replace usage of `TextDisplayOptions` with `VizTextDisplayOptions`. Issue [#49705](https://github.com/grafana/grafana/issues/49705)
Removed support for the deprecated `getColorForTheme(color: string, theme: GrafanaTheme)` function in favor of the
`theme.visualization.getColorByName(color: string)` method. The output of this method is identical to the removed function, so migration should just be a matter of rewriting calls of `getColorForTheme(myColor, myTheme)` to `myTheme.visualization.getColorByName(myColor)`.
Issue [#49519](https://github.com/grafana/grafana/issues/49519)
In the Prometheus data source, for consistency and performance reasons, we changed how we represent `NaN` (not a number) values received from Prometheus. In the past versions, we converted these to `null` in the frontend (for dashboard and explore), and kept as `NaN` in the alerting path. Starting with this version, we will always keep it as `NaN`. This change should be mostly invisible for the users. Issue [#49475](https://github.com/grafana/grafana/issues/49475)
Plugins using custom Webpack configs could potentially break due to the changes between webpack@4 and webpack@5. Please refer to the [official migration guide](https://webpack.js.org/migrate/5/) for assistance.
Webpack 5 does not include polyfills for node.js core modules by default (e.g. `buffer`, `stream`, `os`). This can result in failed builds for plugins. If polyfills are required it is recommended to create a custom webpack config in the root of the plugin repo and add the required fallbacks:
```js
// webpack.config.js
module.exports.getWebpackConfig = (config, options) => ({
...config,
resolve: {
...config.resolve,
fallback: {
os: require.resolve('os-browserify/browser'),
stream: require.resolve('stream-browserify'),
timers: require.resolve('timers-browserify'),
},
},
});
````
Please refer to the webpack build error messages or the [official migration guide](https://webpack.js.org/migrate/5/) for assistance with fallbacks.
**Which issue(s) this PR fixes**:
<!--
- Automatically closes linked issue when the Pull Request is merged.
Usage: "Fixes #<issue number>", or "Fixes (paste link of issue)"
-->
Fixes #
**Special notes for your reviewer**:
It does not bump the following dependencies to the very latest due to the latest versions being ES modules:
- ora
- globby
- execa
- chalk
Issue [#47826](https://github.com/grafana/grafana/issues/47826)
We have changed the internals of `backendSrv.fetch()` to throw an error when the response is an incorrect JSON.
```javascript
// PREVIOUSLY: this was returning with an empty object {} - in case the response is an invalid JSON
return await getBackendSrv().post(`${API_ROOT}/${id}/install`);
// AFTER THIS CHANGE: the following will throw an error - in case the response is an invalid JSON
return await getBackendSrv().post(`${API_ROOT}/${id}/install`);
```
**When is the response handled as JSON?**
- If the response has the `"Content-Type: application/json"` header, OR
- If the backendSrv options ([`BackendSrvRequest`](https://github.com/grafana/grafana/blob/e237ff20a996c7313632b2e28f38032012f0e340/packages/grafana-runtime/src/services/backendSrv.ts#L8)) specify the response as JSON: `{ responseType: 'json' }`
**How does it work after this change?**
- In case it is recognised as a JSON response and the response is empty, it returns an empty object `{}`
- In case it is recognised as a JSON response and it has formatting errors, it throws an error
**How to migrate?**
Make sure to handle possible errors on the callsite where using `backendSrv.fetch()` (or any other `backendSrv` methods). Issue [#47493](https://github.com/grafana/grafana/issues/47493)
### Plugin development fixes & changes
- **UI/Card:** Remove deprecated props. [#49885](https://github.com/grafana/grafana/pull/49885), [@kaydelaney](https://github.com/kaydelaney)
- **UI/Button:** Remove deprecated "link" variant. [#49843](https://github.com/grafana/grafana/pull/49843), [@kaydelaney](https://github.com/kaydelaney)
- **Toolkit:** Bump dependencies. [#47826](https://github.com/grafana/grafana/pull/47826), [@jackw](https://github.com/jackw)
<!-- 9.0.0-beta2 END -->
<!-- 9.0.0-beta1 START -->
# 9.0.0-beta1 (2022-05-24)
### Features and enhancements
- **AccessControl:** Add setting for permission cache. (Enterprise)
- **AccessControl:** Check dashboard permissions for reports. (Enterprise)
- **Auth:** Remove grafana ui dependency to the aws sdk. [#43559](https://github.com/grafana/grafana/pull/43559), [@sunker](https://github.com/sunker)
- **BasicRoles:** Add API endpoint to reset basic roles permissions to factory. (Enterprise)
- **LDAP Mapping:** Allow Grafana Admin mapping without org role. [#37189](https://github.com/grafana/grafana/pull/37189), [@krzysdabro](https://github.com/krzysdabro)
- **Licensing:** Only enforce total number of users. (Enterprise)
- **Loki:** do not convert NaN to null. [#45389](https://github.com/grafana/grafana/pull/45389), [@gabor](https://github.com/gabor)
- **Report:** API support for multiple dashboards. (Enterprise)
- **Report:** Support sending embedded image in the report email. (Enterprise)
- **Report:** UI for multiple dashboards. (Enterprise)
- **Reporting:** Remove redundant empty attachment when export to CSV is enabled. (Enterprise)
- **SAML:** Implement Name Templates for assertion_attribute_name option. (Enterprise)
- **SSE/Alerting:** Support prom instant vector responses. [#44865](https://github.com/grafana/grafana/pull/44865), [@kylebrandt](https://github.com/kylebrandt)
- **Tracing:** Add trace to metrics config behind feature toggle. [#46298](https://github.com/grafana/grafana/pull/46298), [@connorlindsey](https://github.com/connorlindsey)
### Bug fixes
- **Fix:** Prevent automatic parsing of string data types to numbers. [#46035](https://github.com/grafana/grafana/pull/46035), [@joshhunt](https://github.com/joshhunt)
- **Prometheus:** Fix inconsistent labels in exemplars resulting in marshal json error. [#46135](https://github.com/grafana/grafana/pull/46135), [@hanjm](https://github.com/hanjm)
### Breaking changes
In the Loki data source, for consistency and performance reasons, we changed how we represent `NaN` (not a number) values received from Loki. In the past versions, we converted these to `null` in the frontend (for dashboard and explore), and kept as `NaN` in the alerting path. Starting with this version, we will always keep it as `NaN`. This change should be mostly invisible for the users. Issue [#45389](https://github.com/grafana/grafana/issues/45389)
The dependency to [grafana/aws-sdk](https://github.com/grafana/grafana-aws-sdk-react) is moved from [grafana/ui](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/package.json) to the plugin. This means that any plugin that use SIGV4 auth need to pass a SIGV4 editor component as a prop to the `DataSourceHttpSettings` component. Issue [#43559](https://github.com/grafana/grafana/issues/43559)
<!-- 9.0.0-beta1 END -->
<!-- 8.5.4 START -->
# 8.5.4 (2022-05-30)
### Features and enhancements
- **Alerting:** Remove disabled flag for data source when migrating alerts. [#48559](https://github.com/grafana/grafana/pull/48559), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Show notification tab of legacy alerting only to editor. [#49624](https://github.com/grafana/grafana/pull/49624), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update migration to migrate only alerts that belong to existing org\dashboard. [#49192](https://github.com/grafana/grafana/pull/49192), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **AzureMonitor:** Do not quote variables when a custom "All" variable option is used. [#49428](https://github.com/grafana/grafana/pull/49428), [@andresmgot](https://github.com/andresmgot)
- **AzureMonitor:** Update allowed namespaces. [#48468](https://github.com/grafana/grafana/pull/48468), [@jcolladokuri](https://github.com/jcolladokuri)
- **CloudMonitor:** Correctly encode default project response. [#49510](https://github.com/grafana/grafana/pull/49510), [@aangelisc](https://github.com/aangelisc)
- **Cloudwatch:** Add support for new AWS/RDS EBS\* metrics. [#48798](https://github.com/grafana/grafana/pull/48798), [@szymonpk](https://github.com/szymonpk)
- **InfluxDB:** Use backend for influxDB by default via feature toggle. [#48453](https://github.com/grafana/grafana/pull/48453), [@yesoreyeram](https://github.com/yesoreyeram)
- **Legend:** Use correct unit for percent and count calculations. [#49004](https://github.com/grafana/grafana/pull/49004), [@dprokop](https://github.com/dprokop)
- **LokI:** use millisecond steps in Grafana 8.5.x. [#48630](https://github.com/grafana/grafana/pull/48630), [@gabor](https://github.com/gabor)
- **Plugins:** Introduce HTTP 207 Multi Status response to api/ds/query. [#48550](https://github.com/grafana/grafana/pull/48550), [@wbrowne](https://github.com/wbrowne)
- **Reporting:** Improve PDF file size using grid layout. (Enterprise)
- **Transformations:** Add an All Unique Values Reducer. [#48653](https://github.com/grafana/grafana/pull/48653), [@josiahg](https://github.com/josiahg)
- **Transformers:** avoid error when the ExtractFields source field is missing. [#49368](https://github.com/grafana/grafana/pull/49368), [@wardbekker](https://github.com/wardbekker)
- **[v8.5.x] Alerting:** Update migration to migrate only alerts that belong to existing org\dashboard. [#49199](https://github.com/grafana/grafana/pull/49199), [@grafanabot](https://github.com/grafanabot)
- **[v8.5.x] Reporting:** Improve PDF file size using grid layout. (Enterprise)
### Bug fixes
- **Alerting:** Allow disabling override timings for notification policies. [#48648](https://github.com/grafana/grafana/pull/48648), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Allow serving images from custom url path. [#49022](https://github.com/grafana/grafana/pull/49022), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Apply Custom Headers to datasource queries. [#47860](https://github.com/grafana/grafana/pull/47860), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Fix RBAC actions for notification policies. [#49185](https://github.com/grafana/grafana/pull/49185), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Fix access to alerts for viewer with editor permissions when RBAC is disabled. [#49270](https://github.com/grafana/grafana/pull/49270), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Fix anonymous access to alerting. [#49203](https://github.com/grafana/grafana/pull/49203), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** correctly show all alerts in a folder. [#48684](https://github.com/grafana/grafana/pull/48684), [@gillesdemey](https://github.com/gillesdemey)
- **AzureMonitor:** Fixes metric definition for Azure Storage queue/file/blob/table resources. [#49101](https://github.com/grafana/grafana/pull/49101), [@aangelisc](https://github.com/aangelisc)
- **Dashboard:** Fix dashboard update permission check. [#48746](https://github.com/grafana/grafana/pull/48746), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **DashboardExport:** Fix exporting and importing dashboards where query data source ended up as incorrect. [#48410](https://github.com/grafana/grafana/pull/48410), [@torkelo](https://github.com/torkelo)
- **FileUpload:** clicking the `Upload file` button now opens the modal correctly. [#48766](https://github.com/grafana/grafana/pull/48766), [@ashharrison90](https://github.com/ashharrison90)
- **GrafanaUI:** Fix color of links in error Tooltips in light theme. [#49327](https://github.com/grafana/grafana/pull/49327), [@joshhunt](https://github.com/joshhunt)
- **LibraryPanels:** Fix library panels not connecting properly in imported dashboards. [#49161](https://github.com/grafana/grafana/pull/49161), [@joshhunt](https://github.com/joshhunt)
- **Loki:** Improve unpack parser handling. [#49074](https://github.com/grafana/grafana/pull/49074), [@gabor](https://github.com/gabor)
- **RolePicker:** Fix menu position on smaller screens. [#48429](https://github.com/grafana/grafana/pull/48429), [@Clarity-89](https://github.com/Clarity-89)
- **TimeRange:** Fixes updating time range from url and browser history. [#48657](https://github.com/grafana/grafana/pull/48657), [@torkelo](https://github.com/torkelo)
- **TimeSeries:** Fix detection & rendering of sparse datapoints. [#48841](https://github.com/grafana/grafana/pull/48841), [@leeoniya](https://github.com/leeoniya)
- **Timeseries:** Fix outside range stale state. [#49633](https://github.com/grafana/grafana/pull/49633), [@ryantxu](https://github.com/ryantxu)
- **Tooltip:** Fix links not legible in Tooltips when using light theme. [#48748](https://github.com/grafana/grafana/pull/48748), [@joshhunt](https://github.com/joshhunt)
- **Tooltip:** Sort decimals using standard numeric compare. [#49084](https://github.com/grafana/grafana/pull/49084), [@dprokop](https://github.com/dprokop)
- **Transforms:** Labels to fields, fix label picker layout. [#49304](https://github.com/grafana/grafana/pull/49304), [@torkelo](https://github.com/torkelo)
- **Variables:** Fixes issue with data source variables not updating queries with variable. [#49478](https://github.com/grafana/grafana/pull/49478), [@torkelo](https://github.com/torkelo)
- **[v8.5.x] Alerting:** Fix RBAC actions for notification policies (#49185). [#49348](https://github.com/grafana/grafana/pull/49348), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **[v8.5.x] Alerting:** Fix access to alerts for viewer with editor permissions when RBAC is disabled. [#49427](https://github.com/grafana/grafana/pull/49427), [@konrad147](https://github.com/konrad147)
- **[v8.5.x] Alerting:** Fix anonymous access to alerting. [#49268](https://github.com/grafana/grafana/pull/49268), [@yuri-tceretian](https://github.com/yuri-tceretian)
### Breaking changes
For a data source query made via /api/ds/query :
- If the `DatasourceQueryMultiStatus` feature is enabled and
- The data source response has an error set as part of the `DataResponse`, the resulting HTTP status code is now `207 Multi Status` instead of `400 Bad gateway`
- If the `DatasourceQueryMultiStatus` feature is **not** enabled and
- The data source response has an error set as part of the `DataResponse`, the resulting HTTP status code is `400 Bad Request` (no breaking change)
--> Issue [#48550](https://github.com/grafana/grafana/issues/48550)
<!-- 8.5.4 END -->
<!-- 8.5.3 START -->
# 8.5.3

View File

@@ -20,7 +20,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.9-alpine3.15 as go-builder
FROM golang:1.17.11-alpine3.15 as go-builder
RUN apk add --no-cache gcc g++ make

View File

@@ -21,7 +21,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.9 AS go-builder
FROM golang:1.17.11 AS go-builder
WORKDIR /src/grafana

View File

@@ -17,6 +17,8 @@ packages/grafana-toolkit/
packages/grafana-ui/
packages/jaeger-ui-components/
packaging/
pkg/coremodel/
pkg/framework/coremodel/
grafana-mixin/
cue/
```

View File

@@ -50,7 +50,7 @@ $(SPEC_TARGET): $(API_DEFINITION_FILES) ## Generate API spec
-x "github.com/prometheus/alertmanager" \
-i /grafana/pkg/api/docs/tags.json
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET)
swagger-api-spec: gen-go $(SPEC_TARGET) $(MERGED_SPEC_TARGET) validate-api-spec
$(NGALERT_SPEC_TARGET):
+$(MAKE) -C pkg/services/ngalert/api/tooling api.json
@@ -67,7 +67,7 @@ ensure_go-swagger_mac:
-x "github.com/prometheus/alertmanager" \
-i pkg/api/docs/tags.json
swagger-api-spec-mac: gen-go --swagger-api-spec-mac $(MERGED_SPEC_TARGET)
swagger-api-spec-mac: gen-go --swagger-api-spec-mac $(MERGED_SPEC_TARGET) validate-api-spec
validate-api-spec: $(MERGED_SPEC_TARGET) ## Validate API spec
docker run --rm -it \

View File

@@ -305,7 +305,7 @@ content_security_policy = false
# $ROOT_PATH is server.root_url without the protocol.
content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Controls if old angular plugins are supported or not. This will be disabled by default in Grafana v9.
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
angular_support_enabled = true
[security.encryption]
@@ -477,6 +477,8 @@ token_url = https://gitlab.com/oauth/token
api_url = https://gitlab.com/api/v4
allowed_domains =
allowed_groups =
role_attribute_path =
role_attribute_strict = false
#################################### Google Auth #########################
[auth.google]
@@ -582,8 +584,6 @@ enabled = false
header_name = X-WEBAUTH-USER
header_property = username
auto_sign_up = true
# Deprecated, use sync_ttl instead
ldap_sync_ttl = 60
sync_ttl = 60
whitelist =
headers =
@@ -844,7 +844,7 @@ min_interval = 10s
[unified_alerting.screenshots]
# Enable screenshots in notifications. This option requires a remote HTTP image rendering service. Please
# see [rendering] for further configuration options.
enabled =
capture = false
# The maximum number of screenshots that can be taken at the same time. This option is different from
# concurrent_render_request_limit as max_concurrent_screenshots sets the number of concurrent screenshots
@@ -972,6 +972,7 @@ url = https://grafana.com
url = https://grafana.com
#################################### Distributed tracing ############
# Opentracing is deprecated use opentelemetry instead
[tracing.jaeger]
# jaeger destination (ex localhost:6831)
address =
@@ -1174,9 +1175,6 @@ promQueryBuilder = true
# The new loki visual query builder
lokiQueryBuilder = true
# InfluxDB backend migration
influxdbBackendMigration = true
# Experimental Explore to Dashboard workflow
explore2Dashboard = true

View File

@@ -19,8 +19,6 @@ apiVersion: 1
# orgId: 1
# # <string> url
# url: http://localhost:8080
# # <string> database password, if used
# password:
# # <string> database user, if used
# user:
# # <string> database name, if used
@@ -29,8 +27,6 @@ apiVersion: 1
# basicAuth:
# # <string> basic auth username
# basicAuthUser:
# # <string> basic auth password
# basicAuthPassword:
# # <bool> enable/disable with credentials headers
# withCredentials:
# # <bool> mark as default datasource. Max one per org

View File

@@ -305,7 +305,7 @@
# $ROOT_PATH is server.root_url without the protocol.
;content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-inline' 'strict-dynamic' $NONCE;object-src 'none';font-src 'self';style-src 'self' 'unsafe-inline' blob:;img-src * data:;base-uri 'self';connect-src 'self' grafana.com ws://$ROOT_PATH wss://$ROOT_PATH;manifest-src 'self';media-src 'none';form-action 'self';"""
# Controls if old angular plugins are supported or not. This will be disabled by default in Grafana v9.
# Controls if old angular plugins are supported or not. This will be disabled by default in future release
;angular_support_enabled = true
[security.encryption]
@@ -937,6 +937,7 @@
;url = https://grafana.com
#################################### Distributed tracing ############
# Opentracing is deprecated use opentelemetry instead
[tracing.jaeger]
# Enable by setting the address sending traces to jaeger (ex localhost:6831)
;address = localhost:6831

View File

@@ -117,11 +117,14 @@ If you're unsure, see the existing [changelog](https://github.com/grafana/grafan
### Pull request titles
The pull request title should be formatted according to `<Area>: <Summary>` (Both "Area" and "Summary" should start with a capital letter).
The Grafana team _squashes_ all commits into one when we accept a pull request. The title of the pull request becomes the subject line of the squashed commit message. We still encourage contributors to write informative commit messages, as they becomes a part of the Git commit body.
We use the pull request title when we generate change logs for releases. As such, we strive to make the title as informative as possible.
Make sure that the title for your pull request uses the same format as the subject line in the commit message.
**Example:**
`Docs: Change url to URL in all documentation files`
## Configuration changes

View File

@@ -136,17 +136,23 @@ Running the backend tests on Windows currently needs some tweaking, so use the b
go run build.go test
```
### Run PostgreSQL and MySQL integration tests
### Run SQLLite, PostgreSQL and MySQL integration tests
To run PostgreSQL and MySQL integration tests locally, you need to start the docker blocks for MySQL and/or PostgreSQL test data sources by running `make devenv sources=mysql_tests,postgres_tests`. When your test data sources are running, you can execute integration tests by running:
By default, Grafana runs SQLite to run tests with SQLite.
```bash
go test -covermode=atomic -tags=integration ./pkg/...
```
To run PostgreSQL and MySQL integration tests locally, start the Docker blocks for MySQL and/or PostgreSQL test data sources by running `make devenv sources=mysql_tests,postgres_tests`. When your test data sources are running, you can execute integration tests by running:
```bash
GRAFANA_TEST_DB=mysql go test -covermode=atomic -tags=integration ./pkg/...
```
and/or
```
```bash
GRAFANA_TEST_DB=postgres go test -covermode=atomic -tags=integration ./pkg/...
```

View File

@@ -27,10 +27,15 @@ Before you can merge a pull request, it must have a review approval, and all the
### Format the pull request title
The pull request title should be formatted according to `<Area>: <Summary>`. Keep the summary short and understandable for the community as a whole.
The pull request title should be formatted according to `<Area>: <Summary>` (Both "Area" and "Summary" should start with a capital letter).
Keep the summary short and understandable for the community as a whole.
All commits in a pull request are squashed when merged and the pull request title will be the default subject line of the squashed commit message. It's also used for [changelog/release notes](#include-in-changelog-and-release-notes).
**Example:**
`Docs: Change url to URL in all documentation files`
See [formatting guidelines](create-pull-request.md#formatting-guidelines) for more information.
### Assign a milestone

View File

@@ -0,0 +1,553 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 1,
"links": [],
"liveNow": false,
"panels": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "points",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 2,
"scaleDistribution": {
"log": 2,
"type": "log"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 0,
"y": 0
},
"id": 3,
"options": {
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"tooltip": {
"mode": "single",
"sort": "none"
}
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "testdata",
"uid": "PD8C576611E62080A"
},
"max": 500000,
"min": 0.01,
"refId": "A",
"scenarioId": "random_walk",
"seriesCount": 2,
"spread": 1000,
"startValue": 0.01
}
],
"title": "Time series",
"type": "timeseries"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 8,
"y": 0
},
"id": 6,
"options": {
"bucket": {
"layout": "auto"
},
"calculate": true,
"calculation": {
"yBuckets": {
"scale": {
"log": 2,
"type": "log"
}
}
},
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"scale": "exponential",
"scheme": "Spectral",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"mode": "calculate",
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false
},
"yAxisLabels": "auto",
"yAxisReverse": false
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 3,
"refId": "A"
}
],
"title": "log2",
"type": "heatmap-new"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 16,
"y": 0
},
"id": 7,
"options": {
"bucket": {
"layout": "auto"
},
"calculate": true,
"calculation": {
"yBuckets": {
"scale": {
"log": 2,
"type": "log"
},
"value": "2"
}
},
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"scale": "exponential",
"scheme": "Spectral",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"mode": "calculate",
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false
},
"yAxisLabels": "auto",
"yAxisReverse": false
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 3,
"refId": "A"
}
],
"title": "log2 split 2",
"type": "heatmap-new"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 0,
"y": 14
},
"id": 4,
"options": {
"bucket": {
"layout": "auto"
},
"calculate": true,
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"scale": "exponential",
"scheme": "Spectral",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"mode": "calculate",
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false
},
"yAxisLabels": "auto",
"yAxisReverse": false
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 3,
"refId": "A"
}
],
"title": "linear",
"type": "heatmap-new"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 8,
"y": 14
},
"id": 5,
"options": {
"bucket": {
"layout": "auto"
},
"calculate": true,
"calculation": {
"yBuckets": {
"scale": {
"log": 10,
"type": "log"
}
}
},
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"scale": "exponential",
"scheme": "Spectral",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"mode": "calculate",
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false
},
"yAxisLabels": "auto",
"yAxisReverse": false
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 3,
"refId": "A"
}
],
"title": "log10",
"type": "heatmap-new"
},
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"fieldConfig": {
"defaults": {
"custom": {
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"scaleDistribution": {
"type": "linear"
}
}
},
"overrides": []
},
"gridPos": {
"h": 14,
"w": 8,
"x": 16,
"y": 14
},
"id": 8,
"options": {
"bucket": {
"layout": "auto"
},
"calculate": true,
"calculation": {
"yBuckets": {
"scale": {
"log": 10,
"type": "log"
},
"value": "2"
}
},
"cellGap": 1,
"color": {
"exponent": 0.5,
"fill": "dark-orange",
"mode": "scheme",
"scale": "exponential",
"scheme": "Spectral",
"steps": 64
},
"exemplars": {
"color": "rgba(255,0,255,0.7)"
},
"filterValues": {
"le": 1e-9
},
"legend": {
"show": true
},
"mode": "calculate",
"tooltip": {
"show": true,
"yHistogram": false
},
"yAxis": {
"axisPlacement": "left",
"reverse": false
},
"yAxisLabels": "auto",
"yAxisReverse": false
},
"pluginVersion": "9.0.0-pre",
"targets": [
{
"datasource": {
"type": "datasource",
"uid": "-- Dashboard --"
},
"panelId": 3,
"refId": "A"
}
],
"title": "log10 split 2",
"type": "heatmap-new"
}
],
"schemaVersion": 36,
"style": "dark",
"tags": ["gdev", "panel-tests", "graph-ng"],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Heatmap calculate (log)",
"uid": "ZXYQTA97ZZ",
"version": 1,
"weekStart": ""
}

View File

@@ -57,7 +57,7 @@ export default (data) => {
requests.push({ method: 'GET', url: '/api/annotations?from=1580825186534&to=1580846786535' });
for (let n = 0; n < batchCount; n++) {
requests.push({ method: 'POST', url: '/api/tsdb/query', body: payload });
requests.push({ method: 'POST', url: '/api/ds/query', body: payload });
}
let responses = client.batch(requests);

View File

@@ -62,7 +62,7 @@ export default (data) => {
requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' });
for (let n = 0; n < batchCount; n++) {
requests.push({ method: 'POST', url: '/api/tsdb/query', body: payload });
requests.push({ method: 'POST', url: '/api/ds/query', body: payload });
}
let responses = client.batch(requests);

View File

@@ -59,7 +59,7 @@ export default (data) => {
requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' });
for (let n = 0; n < batchCount; n++) {
requests.push({ method: 'POST', url: '/api/tsdb/query', body: payload });
requests.push({ method: 'POST', url: '/api/ds/query', body: payload });
}
let responses = client.batch(requests);

View File

@@ -58,7 +58,7 @@ export default (data) => {
requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' });
for (let n = 0; n < batchCount; n++) {
requests.push({ method: 'POST', url: '/api/tsdb/query', body: payload });
requests.push({ method: 'POST', url: '/api/ds/query', body: payload });
}
let responses = client.batch(requests);

View File

@@ -1,31 +1,38 @@
+++
aliases = ["/docs/grafana/latest/", "/docs/grafana/latest/guides/reference/admin/", "/docs/grafana/v1.1/", "/docs/grafana/v3.1/"]
description = "Guides, Installation and Feature Documentation"
keywords = ["grafana", "installation", "documentation"]
title = "Grafana documentation"
+++
---
aliases:
- /docs/grafana/latest/
- /docs/grafana/latest/guides/reference/admin/
- /docs/grafana/v1.1/
- /docs/grafana/v3.1/
description: Guides, Installation and Feature Documentation
keywords:
- grafana
- installation
- documentation
title: Grafana documentation
---
# Grafana documentation
## Installing Grafana
<div class="nav-cards">
<a href="{{< relref "installation/debian.md" >}}" class="nav-cards__item nav-cards__item--install">
<a href="{{< relref "setup-grafana/installation/debian/" >}}" class="nav-cards__item nav-cards__item--install">
<div class="nav-cards__icon fa fa-linux">
</div>
<h5>Install on Linux</h5>
</a>
<a href="{{< relref "installation/mac.md" >}}" class="nav-cards__item nav-cards__item--install">
<a href="{{< relref "setup-grafana/installation/mac/" >}}" class="nav-cards__item nav-cards__item--install">
<div class="nav-cards__icon fa fa-apple">
</div>
<h5>Install on macOS</h5>
</a>
<a href="{{< relref "installation/windows.md" >}}" class="nav-cards__item nav-cards__item--install">
<a href="{{< relref "setup-grafana/installation/windows/" >}}" class="nav-cards__item nav-cards__item--install">
<div class="nav-cards__icon fa fa-windows">
</div>
<h5>Install on Windows</h5>
</a>
<a href="{{< relref "installation/docker.md" >}}" class="nav-cards__item nav-cards__item--install">
<a href="{{< relref "setup-grafana/installation/docker/" >}}" class="nav-cards__item nav-cards__item--install">
<img src="/static/img/logos/logo-docker.svg">
<h5>Run Docker image</h5>
</a>
@@ -44,27 +51,27 @@ title = "Grafana documentation"
## Guides
<div class="nav-cards">
<a href="{{< relref "getting-started/getting-started.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "getting-started/build-first-dashboard/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Getting started</h4>
<p>Learn the basics of using Grafana.</p>
</a>
<a href="{{< relref "basics/_index.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "basics/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Grafana basics</h4>
<p>Learn basic observability.</p>
</a>
<a href="{{< relref "administration/configuration.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "setup-grafana/configure-grafana/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Configure Grafana</h4>
<p>Review the configuration and setup options.</p>
</a>
<a href="{{< relref "basics/timeseries.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "basics/timeseries/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Intro to time series</h4>
<p>Learn about time series data.</p>
</a>
<a href="{{< relref "administration/provisioning.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "administration/provisioning/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Provisioning</h4>
<p>Learn how to automate your Grafana configuration.</p>
</a>
<a href="{{< relref "whatsnew/whats-new-in-v8-0.md" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "whatsnew/whats-new-in-v8-0/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>What's new in v8.0</h4>
<p>Explore the features and enhancements in the latest release.</p>
</a>
@@ -74,51 +81,51 @@ title = "Grafana documentation"
## Data source guides
<div class="nav-cards">
<a href="{{< relref "datasources/graphite.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/graphite/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_graphite.svg" >
<h5>Graphite</h5>
</a>
<a href="{{< relref "datasources/elasticsearch.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/elasticsearch/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_elasticsearch.svg" >
<h5>Elasticsearch</h5>
</a>
<a href="{{< relref "datasources/influxdb/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/influxdb/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_influxdb.svg" >
<h5>InfluxDB</h5>
</a>
<a href="{{< relref "datasources/prometheus.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/prometheus/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_prometheus.svg" >
<h5>Prometheus</h5>
</a>
<a href="{{< relref "datasources/google-cloud-monitoring/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/google-cloud-monitoring/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_cloudmonitoring.svg">
<h5>Google Cloud Monitoring</h5>
</a>
<a href="{{< relref "datasources/aws-cloudwatch/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/aws-cloudwatch/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_cloudwatch.svg">
<h5>AWS CloudWatch</h5>
</a>
<a href="{{< relref "datasources/azuremonitor/_index.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/azuremonitor/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_azure_monitor.jpg">
<h5>Azure Monitor</h5>
</a>
<a href="{{< relref "datasources/loki.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/loki/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_loki.svg">
<h5>Loki</h5>
</a>
<a href="{{< relref "datasources/mysql.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/mysql/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_mysql.png" >
<h5>MySQL</h5>
</a>
<a href="{{< relref "datasources/postgres.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/postgres/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_postgres.svg" >
<h5>Postgres</h5>
</a>
<a href="{{< relref "datasources/mssql.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/mssql/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/sql_server_logo.svg">
<h5>Microsoft SQL Server</h5>
</a>
<a href="{{< relref "datasources/opentsdb.md" >}}" class="nav-cards__item nav-cards__item--ds">
<a href="{{< relref "datasources/opentsdb/" >}}" class="nav-cards__item nav-cards__item--ds">
<img src="/static/img/docs/logos/icon_opentsdb.png" >
<h5>OpenTSDB</h5>
</a>

View File

@@ -1,17 +1,18 @@
+++
aliases = ["/docs/grafana/latest/administration/"]
description = "Administration"
title = "Administration"
weight = 40
+++
---
aliases:
- /docs/grafana/latest/administration/
description: Administration
title: Administration
weight: 40
---
# Administration
This section includes information for Grafana administrators, team administrators, and users performing administrative tasks:
- [Change Preferences]({{< relref "preferences" >}})
- [Configuration]({{< relref "configuration" >}})
- [Configure Docker image]({{< relref "configure-docker" >}})
- [Security]({{< relref "security" >}})
- [Database encryption]({{< relref "database-encryption" >}})
- [Service accounts]({{< relref "service-accounts" >}})
- [Change Preferences]({{< relref "preferences/" >}})
- [Configuration]({{< relref "../setup-grafana/configure-grafana/" >}})
- [Configure Docker image]({{< relref "configure-docker/" >}})
- [Security]({{< relref "../setup-grafana/configure-security/" >}})
- [Database encryption]({{< relref "../setup-grafana/configure-security/configure-database-encryption/" >}})
- [Service accounts]({{< relref "service-accounts/" >}})

View File

@@ -14,6 +14,6 @@ weight: 300
API Keys can be used to interact with Grafana HTTP APIs.
We recommend using service accounts instead of API keys if you are on Grafana 8.5+, for more information refer to [About service accounts]({{< relref "../service-accounts/about-service-accounts.md#" >}}).
We recommend using service accounts instead of API keys if you are on Grafana 8.5+, for more information refer to [About service accounts]({{< relref "../service-accounts/about-service-accounts/#" >}}).
{{< section >}}

View File

@@ -11,4 +11,4 @@ weight: 30
An API key is a randomly generated string that external systems use to interact with Grafana HTTP APIs.
When you create an API key, you specify a **Role** that determines the permissions associated with the API key. Role permissions control that actions the API key can perform on Grafana resources. For more information about creating API keys, refer to [Create an API key]({{< relref "./create-api-key.md#" >}}).
When you create an API key, you specify a **Role** that determines the permissions associated with the API key. Role permissions control that actions the API key can perform on Grafana resources. For more information about creating API keys, refer to [Create an API key]({{< relref "create-api-key/#" >}}).

View File

@@ -14,13 +14,13 @@ weight: 50
Create an API key when you want to manage your computed workload with a user.
For more information about API keys, refer to [About API keys in Grafana]({{< relref "./about-api-keys.md" >}}).
For more information about API keys, refer to [About API keys in Grafana]({{< relref "about-api-keys/" >}}).
This topic shows you how to create an API key using the Grafana UI. You can also create an API key using the Grafana HTTP API. For more information about creating API keys via the API, refer to [Create API key via API]({{< relref "../../developers/http_api/create-api-tokens-for-org.md#how-to-create-a-new-organization-and-an-api-token" >}}).
This topic shows you how to create an API key using the Grafana UI. You can also create an API key using the Grafana HTTP API. For more information about creating API keys via the API, refer to [Create API key via API]({{< relref "../../developers/http_api/create-api-tokens-for-org/#how-to-create-a-new-organization-and-an-api-token" >}}).
## Before you begin:
- Ensure you have permission to create and edit API keys. For more information about permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions.md#" >}}).
- Ensure you have permission to create and edit API keys. For more information about permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions/#" >}}).
**To create an API key:**

View File

@@ -1,10 +1,15 @@
+++
aliases = ["/docs/grafana/latest/administration/cli/"]
description = "Guide to using grafana-cli"
keywords = ["grafana", "cli", "grafana-cli", "command line interface"]
title = "Grafana CLI"
weight = 400
+++
---
aliases:
- /docs/grafana/latest/administration/cli/
description: Guide to using grafana-cli
keywords:
- grafana
- cli
- grafana-cli
- command line interface
title: Grafana CLI
weight: 400
---
# Grafana CLI
@@ -132,7 +137,7 @@ grafana-cli --homepath "/usr/share/grafana" admin reset-admin-password <new pass
### Override config file
`--config value` overrides the default location where Grafana expects the configuration file. Refer to [Configuration]({{< relref "../administration/configuration.md" >}}) for more information about configuring Grafana and default configuration file locations.
`--config value` overrides the default location where Grafana expects the configuration file. Refer to [Configuration]({{< relref "../setup-grafana/configure-grafana/" >}}) for more information about configuring Grafana and default configuration file locations.
**Example:**
@@ -142,7 +147,7 @@ grafana-cli --config "/etc/configuration/" admin reset-admin-password mynewpassw
## Plugins commands
Grafana CLI allows you to install, upgrade, and manage your Grafana plugins. For more information about installing plugins, refer to [plugins page]({{< relref "../plugins/installation.md" >}}).
Grafana CLI allows you to install, upgrade, and manage your Grafana plugins. For more information about installing plugins, refer to [plugins page]({{< relref "../plugins/installation/" >}}).
All listed commands apply to the Grafana default repositories and directories. You can override the defaults with [Global Options](#global-options).
@@ -214,7 +219,7 @@ grafana-cli --homepath "/usr/share/grafana" admin reset-admin-password <new pass
If you have not lost the admin password, we recommend that you change the user password either in the User Preferences or in the Server Admin > User tab.
If you need to set the password in a script, then you can use the [Grafana User API]({{< relref "../developers/http_api/user.md#change-password" >}}).
If you need to set the password in a script, then you can use the [Grafana User API]({{< relref "../developers/http_api/user/#change-password" >}}).
### Migrate data and encrypt passwords

View File

@@ -1,14 +1,20 @@
+++
aliases = ["/docs/grafana/latest/administration/configure-docker/", "/docs/grafana/latest/installation/configure-docker/"]
description = "Guide for configuring the Grafana Docker image"
keywords = ["grafana", "configuration", "documentation", "docker"]
title = "Configure Grafana Docker image"
weight = 200
+++
---
aliases:
- /docs/grafana/latest/administration/configure-docker/
- /docs/grafana/latest/installation/configure-docker/
description: Guide for configuring the Grafana Docker image
keywords:
- grafana
- configuration
- documentation
- docker
title: Configure Grafana Docker image
weight: 200
---
# Configure a Grafana Docker image
If you are running Grafana in a Docker image, then you configure Grafana using [environment variables]({{< relref "../administration/configuration.md#configure-with-environment-variables" >}}) rather than directly editing the configuration file. If you want to save your data, then you also need to designate persistent storage or bind mounts for the Grafana container.
If you are running Grafana in a Docker image, then you configure Grafana using [environment variables]({{< relref "../setup-grafana/configure-grafana/#configure-with-environment-variables" >}}) rather than directly editing the configuration file. If you want to save your data, then you also need to designate persistent storage or bind mounts for the Grafana container.
> **Note:** These examples use the Grafana Enterprise docker image. You can use the Grafana Open Source edition by changing the docker image to `grafana/grafana-oss`.
@@ -53,7 +59,7 @@ The following settings are hard-coded when launching the Grafana Docker containe
## Logging
Logs in the Docker container go to standard out by default, as is common in the Docker world. Change this by setting a different [log mode]({{< relref "../administration/configuration.md#mode" >}}).
Logs in the Docker container go to standard out by default, as is common in the Docker world. Change this by setting a different [log mode]({{< relref "../setup-grafana/configure-grafana/#mode" >}}).
Example:

View File

@@ -1,17 +0,0 @@
+++
aliases = ["/docs/grafana/latest/administration/jaeger-instrumentation/"]
description = "Jaeger traces emitted and propagation by Grafana"
keywords = ["grafana", "jaeger", "tracing"]
title = "Jaeger instrumentation"
weight = 900
+++
# Jaeger instrumentation
Grafana supports [Jaeger tracing](https://www.jaegertracing.io/).
Grafana can emit Jaeger traces for its HTTP API endpoints and propagate Jaeger trace information to data sources.
All HTTP endpoints are logged evenly (annotations, dashboard, tags, and so on).
When a trace ID is propagated, it is reported with operation 'HTTP /datasources/proxy/:id/\*'.
Refer to [Configuration]({{< relref "configuration.md#tracing-jaeger" >}}) for information about enabling Jaeger tracing.

View File

@@ -42,7 +42,7 @@ The following table summarizes the resources you can share and/or isolate using
The member of one organization cannot view dashboards assigned to another organization. However, a user can belong to multiple organizations.
Grafana Server Administrators are responsible for creating organizations. For more information about the Grafana Server Administrator role, refer to [Grafana server administrators]({{< relref "../manage-users-and-permissions/about-users-and-permissions.md#Grafana server administrators" >}}).
Grafana Server Administrators are responsible for creating organizations. For more information about the Grafana Server Administrator role, refer to [Grafana server administrators]({{< relref "../manage-users-and-permissions/about-users-and-permissions/#Grafana server administrators" >}}).
## View a list of organizations
@@ -80,9 +80,9 @@ Create an organization when you want to isolate dashboards and other resources f
1. On the **Preferences** tab, select a home dashboard, time zone, and week start.
For more information about preferences, refer to [Preferences]({{< relref "../preferences/_index.md" >}}).
For more information about preferences, refer to [Preferences]({{< relref "../preferences/" >}}).
For more information about adding users to an organization, refer to [Add a user to an organization]({{< relref "../manage-users-and-permissions/manage-server-users/add-remove-user-to-org.md" >}}).
For more information about adding users to an organization, refer to [Add a user to an organization]({{< relref "../manage-users-and-permissions/manage-server-users/add-remove-user-to-org/" >}}).
## Delete an organization

View File

@@ -1,10 +1,16 @@
+++
aliases = ["/docs/grafana/latest/administration/change-your-password/", "/docs/grafana/latest/administration/manage-user-preferences/"]
description = "Learn how to update your user preferences and switch organizations"
keywords = ["password", "change", "organization", "change"]
title = "Manage user preferences"
weight = 400
+++
---
aliases:
- /docs/grafana/latest/administration/change-your-password/
- /docs/grafana/latest/administration/manage-user-preferences/
description: Learn how to update your user preferences and switch organizations
keywords:
- password
- change
- organization
- change
title: Manage user preferences
weight: 400
---
# Manage user preferences
@@ -16,7 +22,7 @@ You can also view important information about your account, such as the organiza
You can change your Grafana password at any time.
> **Note**: If your Grafana instance uses an <!--[external authentication provider]({{< relref "../../auth/_index.md" >}})--> external authentication provider, then you might not be able to change your password in Grafana. Contact your Grafana administrator for more information.
> **Note**: If your Grafana instance uses an <!--[external authentication provider]({{< relref "../../setup-grafana/configure-security/configure-authentication/" >}})--> external authentication provider, then you might not be able to change your password in Grafana. Contact your Grafana administrator for more information.
**To change your password**:
@@ -41,7 +47,7 @@ Your profile includes your name, user name, and email address, which you can upd
## Edit your preferences
You can choose the way you would like data to appear in Grafana, including the UI theme, home dashboard, timezone, and first day of the week. You can set these preferences for your own account, for a team, for an organization, or Grafana-wide using configuration settings. Your user preferences take precedence over team, organization, and Grafana default preferences. For more information, see [Grafana preferences]({{< relref "../../administration/preferences/_index.md" >}}).
You can choose the way you would like data to appear in Grafana, including the UI theme, home dashboard, timezone, and first day of the week. You can set these preferences for your own account, for a team, for an organization, or Grafana-wide using configuration settings. Your user preferences take precedence over team, organization, and Grafana default preferences. For more information, see [Grafana preferences]({{< relref "../preferences/" >}}).
- **UI theme** determines whether Grafana appears in light mode or dark mode. By default, UI theme is set to dark mode.
- **Home dashboard** refers to the dashboard you see when you sign in to Grafana. By default, this is set to the Home dashboard.
@@ -75,7 +81,7 @@ Every user is a member of at least one organization. You can have different role
1. Hover your cursor over the user icon in the lower-left corner of the page and click **Preferences**.
1. Scroll down to the **Organizations** section and review the following information:
- **Name**: The name of the organizations of which you are a member.
- **Role**: The role to which you are assigned in the organization. For more information about roles and permissions, refer to [Organization users and permissions]({{< relref "../../administration/manage-users-and-permissions/about-users-and-permissions.md#organization-users-and-permissions" >}}).
- **Role**: The role to which you are assigned in the organization. For more information about roles and permissions, refer to [Organization users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions/#organization-users-and-permissions" >}}).
- **Current**: Grafana indicates the organization that you are currently signed into as _Current_. If you are a member of multiple organizations, you can click **Select** to switch to that organization.
## View your Grafana sessions

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/"]
title = "Manage users and permissions"
weight = 200
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/
title: Manage users and permissions
weight: 200
---
# Manage users and permissions

View File

@@ -1,8 +1,13 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/about-users-and-permissions/", "/docs/grafana/latest/manage-users/", "/docs/grafana/latest/permissions/", "/docs/grafana/latest/permissions/organization_roles/", "/docs/grafana/latest/permissions/overview/"]
title = "About users and permissions"
weight = 100
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/about-users-and-permissions/
- /docs/grafana/latest/manage-users/
- /docs/grafana/latest/permissions/
- /docs/grafana/latest/permissions/organization_roles/
- /docs/grafana/latest/permissions/overview/
title: About users and permissions
weight: 100
---
# About users and permissions
@@ -26,7 +31,7 @@ A server administrator can perform the following tasks:
- Manage users and permissions
- Create, edit, and delete organizations
- View server-wide settings defined in the [Configuration]({{< relref "../../administration/configuration.md" >}}) file
- View server-wide settings defined in the [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) file
- View Grafana server statistics, including total users and active sessions
- Upgrade the server to Grafana Enterprise.
@@ -52,7 +57,7 @@ Permissions assigned to a user within an organization control the extent to whic
### Organization roles
Organization role-based permissions are global, which means that each permission level applies to all Grafana resources within an given organization. For example, an editor can see and update _all_ dashboards in an organization, unless those dashboards have been specifically restricted using [dashboard permissions]({{< relref "manage-dashboard-permissions/_index.md" >}}).
Organization role-based permissions are global, which means that each permission level applies to all Grafana resources within an given organization. For example, an editor can see and update _all_ dashboards in an organization, unless those dashboards have been specifically restricted using [dashboard permissions]({{< relref "manage-dashboard-permissions/" >}}).
Grafana uses the following roles to control user access:
@@ -92,9 +97,9 @@ You can specify the following permissions to dashboards and folders.
- **Edit**: Can create and edit dashboards. Editors _cannot_ change folder or dashboard permissions, or add, edit, or delete folders.
- **View**: Can only view dashboards and folders.
For more information about assigning dashboard folder permissions, refer to [Grant dashboard folder permissions]({{< relref "./manage-dashboard-permissions/_index.md#grant-dashboard-folder-permissions" >}}).
For more information about assigning dashboard folder permissions, refer to [Grant dashboard folder permissions]({{< relref "manage-dashboard-permissions/#grant-dashboard-folder-permissions" >}}).
For more information about assigning dashboard permissions, refer to [Grant dashboard permissions]({{< relref "./manage-dashboard-permissions/_index.md#grant-dashboard-permissions" >}}).
For more information about assigning dashboard permissions, refer to [Grant dashboard permissions]({{< relref "manage-dashboard-permissions/#grant-dashboard-permissions" >}}).
## Editors with administrator permissions
@@ -104,18 +109,18 @@ If you have access to the Grafana server, you can modify the default editor role
This setting can be used to enable self-organizing teams to administer their own dashboards.
For more information about assigning administrator permissions to editors, refer to [Grant editors administrator permissions]({{< relref "./manage-server-users/grant-editor-admin-permissions.md" >}}).
For more information about assigning administrator permissions to editors, refer to [Grant editors administrator permissions]({{< relref "manage-server-users/grant-editor-admin-permissions/" >}}).
## Viewers with dashboard preview and Explore permissions
If you have access to the Grafana server, you can modify the default viewer role so that viewers can:
- Edit and preview dashboards, but cannot save their changes or create new dashboards.
- Access and use [Explore]({{< relref "../../explore/_index.md" >}}).
- Access and use [Explore]({{< relref "../../explore/" >}}).
Extending the viewer role is useful for public Grafana installations where you want anonymous users to be able to edit panels and queries, but not be able to save or create new dashboards.
For more information about assigning dashboard preview permissions to viewers, refer to [Enable viewers to preview dashboards and use Explore]({{< relref "./manage-dashboard-permissions/_index.md#enable-viewers-to-preview-dashboards-and-use-explore" >}}).
For more information about assigning dashboard preview permissions to viewers, refer to [Enable viewers to preview dashboards and use Explore]({{< relref "manage-dashboard-permissions/#enable-viewers-to-preview-dashboards-and-use-explore" >}}).
## Teams and permissions
@@ -126,7 +131,7 @@ You can assign a team member one of the following permissions:
- **Member**: Includes the user as a member of the team. Members do not have team administrator privileges.
- **Admin**: Administrators have permission to manage various aspects of the team, including team membership, permissions, and settings.
Because teams exist inside an organization, the organization administrator can manage all teams. When the `editors_can_admin` setting is enabled, editors can create teams and manage teams that they create. For more information about the `editors_can_admin` setting, refer to [Grant editors administrator permissions]({{< relref "./manage-server-users/grant-editor-admin-permissions.md" >}}).
Because teams exist inside an organization, the organization administrator can manage all teams. When the `editors_can_admin` setting is enabled, editors can create teams and manage teams that they create. For more information about the `editors_can_admin` setting, refer to [Grant editors administrator permissions]({{< relref "manage-server-users/grant-editor-admin-permissions/" >}}).
## Grafana Enterprise user permissions features
@@ -141,13 +146,13 @@ Grafana Enterprise provides the following permissions-related features:
By default, a user can query any data source in an organization, even if the data source is not linked to the user's dashboards.
Data source permissions enable you to restrict data source query permissions to specific **Users** and **Teams**. For more information about assigning data source permissions, refer to [Data source permissions]({{< relref "../../enterprise/datasource_permissions.md" >}}).
Data source permissions enable you to restrict data source query permissions to specific **Users** and **Teams**. For more information about assigning data source permissions, refer to [Data source permissions]({{< relref "../../enterprise/datasource_permissions/" >}}).
### Role-based access control
RBAC provides you a way of granting, changing, and revoking user read and write access to Grafana resources, such as users, reports, and authentication.
For more information about RBAC, refer to [Role-based access control]({{< relref "../../enterprise/access-control" >}}).
For more information about RBAC, refer to [Role-based access control]({{< relref "../../enterprise/access-control/" >}}).
### Learn more

View File

@@ -1,8 +1,10 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-dashboard-permissions/", "/docs/grafana/latest/permissions/dashboard_folder_permissions/"]
title = "Manage dashboard permissions"
weight = 500
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-dashboard-permissions/
- /docs/grafana/latest/permissions/dashboard_folder_permissions/
title: Manage dashboard permissions
weight: 500
---
# Manage dashboard permissions
@@ -74,7 +76,7 @@ This modification is useful for public Grafana installations where you want anon
1. Open the Grafana configuration file.
For more information about the Grafana configuration file and its location, refer to [Configuration]({{< relref "../../../administration/configuration" >}}).
For more information about the Grafana configuration file and its location, refer to [Configuration]({{< relref "../../../setup-grafana/configure-grafana/" >}}).
1. Locate the `viewers_can_edit` parameter.
1. Set the `viewers_can_edit` value to `true`.
@@ -142,4 +144,4 @@ Dashboard permissions settings:
Result: You receive an error message that cannot override a higher permission with a lower permission in the same dashboard. User1 has administrator permissions.
> Refer to [Role-based access Control]({{< relref "../../../enterprise/access-control/_index.md" >}}) in Grafana Enterprise to understand how to use RBAC permissions to restrict access to dashboards, folders, administrative functions, and other resources.
> Refer to [Role-based access Control]({{< relref "../../../enterprise/access-control/" >}}) in Grafana Enterprise to understand how to use RBAC permissions to restrict access to dashboards, folders, administrative functions, and other resources.

View File

@@ -1,8 +1,10 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/", "/docs/grafana/latest/manage-users/org-admin/"]
title = "Manage users in an organization"
weight = 400
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/
- /docs/grafana/latest/manage-users/org-admin/
title: Manage users in an organization
weight: 400
---
# Manage users in an organization

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/change-user-org-permissions/"]
title = "Change a user's organization permissions"
weight = 30
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/change-user-org-permissions/
title: Change a user's organization permissions
weight: 30
---
# Change a user's organization permissions
@@ -24,4 +25,4 @@ Update user permissions when you want to enhance or restrict a user's access to
1. Select the role that you want to assign.
1. Click **Update**.
> **Note:** If you have [server administrator]({{< relref "../about-users-and-permissions.md#grafana-server-administrators" >}}) permissions, you can also [change a user's organization permissions]({{< relref "../../manage-users-and-permissions/manage-server-users/change-user-org-permissions.md" >}}) in the Server Admin section.
> **Note:** If you have [server administrator]({{< relref "../about-users-and-permissions/#grafana-server-administrators" >}}) permissions, you can also [change a user's organization permissions]({{< relref "../manage-server-users/change-user-org-permissions/" >}}) in the Server Admin section.

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/invite-user-join-org/"]
title = "Invite a user to join an organization"
weight = 10
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/invite-user-join-org/
title: Invite a user to join an organization
weight: 10
---
# Invite a user to join an organization
@@ -11,7 +12,7 @@ When you invite users to join an organization, you assign the **Admin**, **Edito
- If you know that the user already has access Grafana and you know their user name, then you issue an invitation by entering their user name.
- If the user is new to Grafana, then use their email address to issue an invitation. The system automatically creates the user account on first sign in.
> **Note:** If you have [server administrator]({{< relref "../about-users-and-permissions.md#grafana-server-administrators" >}}) permissions, you can also manually [add a user to an organization]({{< relref "../../manage-users-and-permissions/manage-server-users/add-remove-user-to-org.md" >}}).
> **Note:** If you have [server administrator]({{< relref "../about-users-and-permissions/#grafana-server-administrators" >}}) permissions, you can also manually [add a user to an organization]({{< relref "../manage-server-users/add-remove-user-to-org/" >}}).
## Before you begin
@@ -34,7 +35,7 @@ When you invite users to join an organization, you assign the **Admin**, **Edito
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Email or username | Either the email or username that the user will use to sign in to Grafana. |
| Name | The user's name. |
| Role | Click the organization role to assign this user. For more information about organization roles, refer to [Organization roles]({{< relref "../about-users-and-permissions#organization-roles" >}}).. |
| Role | Click the organization role to assign this user. For more information about organization roles, refer to [Organization roles]({{< relref "../about-users-and-permissions/#organization-roles" >}}).. |
| Send invite email | Switch to on if your organization has configured. The system sends an email to the user inviting them to sign in to Grafana and join the organization. Switch to off if you are not using email. The user can sign in to Grafana with the email or username you entered. |
1. Click **Submit**.

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/manage-pending-invites/"]
title = "Manage a pending invitation"
weight = 20
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/manage-pending-invites/
title: Manage a pending invitation
weight: 20
---
# Manage a pending invitation

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/remove-user-from-org/"]
title = "Remove a user from an organization"
weight = 40
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/remove-user-from-org/
title: Remove a user from an organization
weight: 40
---
# Remove a user from an organization
@@ -24,4 +25,4 @@ This action does not remove the user account from the Grafana server.
1. Click the red **X** to remove the user from the organization.
> **Note:** If you have [server administrator]({{< relref "../about-users-and-permissions.md#grafana-server-administrators" >}}) permissions, you can also [remove a user from an organization]({{< relref "../../manage-users-and-permissions/manage-server-users/add-remove-user-to-org.md#remove-a-user-from-an-organization" >}}) on the Users page of the Server Admin section.
> **Note:** If you have [server administrator]({{< relref "../about-users-and-permissions/#grafana-server-administrators" >}}) permissions, you can also [remove a user from an organization]({{< relref "../manage-server-users/add-remove-user-to-org/#remove-a-user-from-an-organization" >}}) on the Users page of the Server Admin section.

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/view-list-org-users/"]
title = "View a list of organization users"
weight = 50
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-org-users/view-list-org-users/
title: View a list of organization users
weight: 50
---
# View a list of organization users
@@ -19,4 +20,4 @@ You can see a list of users with accounts in your Grafana organization. If neces
![Org Admin user list](/static/img/docs/manage-users/org-user-list-7-3.png)
> **Note:** If you have [server administrator]({{< relref "../about-users-and-permissions.md#grafana-server-administrators" >}}) permissions, you can also [view a global list of users]({{< relref "../../manage-users-and-permissions/manage-server-users/view-list-users.md" >}}) in the Server Admin section of Grafana.
> **Note:** If you have [server administrator]({{< relref "../about-users-and-permissions/#grafana-server-administrators" >}}) permissions, you can also [view a global list of users]({{< relref "../manage-server-users/view-list-users/" >}}) in the Server Admin section of Grafana.

View File

@@ -1,17 +1,20 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/", "/docs/grafana/latest/manage-users/server-admin/", "/docs/grafana/latest/manage-users/server-admin/server-admin-manage-users/"]
title = "Manage users globally"
weight = 300
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/
- /docs/grafana/latest/manage-users/server-admin/
- /docs/grafana/latest/manage-users/server-admin/server-admin-manage-users/
title: Manage users globally
weight: 300
---
# Manage users globally
A _user_ is defined as any individual who can log in to Grafana. Each user is associated with a _role_ that includes _permissions_. Permissions determine the tasks a user can perform in the system.
If you have [server administrator]({{< relref "../about-users-and-permissions.md#grafana-server-administrators" >}}) permissions in Grafana, you can manage all users for a Grafana instance in the Server Admin section:
If you have [server administrator]({{< relref "../about-users-and-permissions/#grafana-server-administrators" >}}) permissions in Grafana, you can manage all users for a Grafana instance in the Server Admin section:
{{< section >}}
If you have [organization administrator]({{< relref "../about-users-and-permissions.md#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../about-users-and-permissions.md#grafana-server-administrators" >}}) permissions, refer to [Manage users in a organization]({{< relref "../../manage-users-and-permissions/manage-org-users/_index.md" >}}).
If you have [organization administrator]({{< relref "../about-users-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../about-users-and-permissions/#grafana-server-administrators" >}}) permissions, refer to [Manage users in a organization]({{< relref "../manage-org-users/" >}}).
For more information about users and permissions, refer to [About users and permissions]({{< relref "../about-users-and-permissions" >}}).
For more information about users and permissions, refer to [About users and permissions]({{< relref "../about-users-and-permissions/" >}}).

View File

@@ -1,8 +1,10 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/add-remove-user-to-org/", "/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/add-user-to-org/"]
title = "Add or remove a user from an organization"
weight = 30
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/add-remove-user-to-org/
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/add-user-to-org/
title: Add or remove a user from an organization
weight: 30
---
# Add a user to an organization
@@ -12,8 +14,8 @@ You are required to specify an Admin role for each organization. The first user
## Before you begin
- [Create an organization]({{< relref "../../manage-organizations/_index.md" >}})
- [Add a user]({{< relref "./add-user.md" >}}) to Grafana
- [Create an organization]({{< relref "../../manage-organizations/" >}})
- [Add a user]({{< relref "add-user/" >}}) to Grafana
- Ensure you have Grafana server administrator privileges
**To add a user to an organization**:
@@ -30,7 +32,7 @@ You are required to specify an Admin role for each organization. The first user
The next time the user signs in, they will be able to navigate to their new organization using the Switch Organizations option in the user profile menu.
> **Note:** If you have [organization administrator]({{< relref "../about-users-and-permissions.md#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../about-users-and-permissions.md#grafana-server-administrators" >}}) permissions, you can still [invite a user to join an organization]({{< relref "../../manage-users-and-permissions/manage-org-users/invite-user-join-org.md" >}}).
> **Note:** If you have [organization administrator]({{< relref "../about-users-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../about-users-and-permissions/#grafana-server-administrators" >}}) permissions, you can still [invite a user to join an organization]({{< relref "../manage-org-users/invite-user-join-org/" >}}).
# Remove a user from an organization
@@ -48,4 +50,4 @@ Remove a user from an organization when they no longer require access to the das
1. In the **Organization** section, click **Remove from organization** next to the organization from which you want to remove the user.
1. Click **Confirm removal**.
> **Note:** If you have [organization administrator]({{< relref "../about-users-and-permissions.md#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../about-users-and-permissions.md#grafana-server-administrators" >}}) permissions, you can still [remove a user from an organization]({{< relref "../../manage-users-and-permissions/manage-org-users/remove-user-from-org.md" >}}) in the Users section of organization configuration.
> **Note:** If you have [organization administrator]({{< relref "../about-users-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../about-users-and-permissions/#grafana-server-administrators" >}}) permissions, you can still [remove a user from an organization]({{< relref "../manage-org-users/remove-user-from-org/" >}}) in the Users section of organization configuration.

View File

@@ -1,14 +1,15 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/add-user/"]
title = "Add a user"
weight = 10
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/add-user/
title: Add a user
weight: 10
---
# Add a user
Add users when you want to manually provide individuals with access to Grafana.
When you create a user using this method, you must create their password. The user does not receive a notification by email. To invite a user to Grafana and allow them to create their own password, [invite a user to join an organization]({{< relref "../manage-org-users/invite-user-join-org.md" >}}).
When you create a user using this method, you must create their password. The user does not receive a notification by email. To invite a user to Grafana and allow them to create their own password, [invite a user to join an organization]({{< relref "../manage-org-users/invite-user-join-org/" >}}).
When you configure advanced authentication using Oauth, SAML, LDAP, or the Auth proxy, users are created automatically.
@@ -23,6 +24,6 @@ When you configure advanced authentication using Oauth, SAML, LDAP, or the Auth
1. Click **New user**.
1. Complete the fields and click **Create user**.
When you create a user, the system assigns the user viewer permissions in a default organization, which you can change. You can now [add a user to a second organization]({{< relref "./add-remove-user-to-org.md" >}}).
When you create a user, the system assigns the user viewer permissions in a default organization, which you can change. You can now [add a user to a second organization]({{< relref "add-remove-user-to-org/" >}}).
> **Note:** If you have [organization administrator]({{< relref "../about-users-and-permissions.md#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../about-users-and-permissions.md#grafana-server-administrators" >}}) permissions, you can still add users by [inviting a user to join an organization]({{< relref "../../manage-users-and-permissions/manage-org-users/invite-user-join-org.md" >}}).
> **Note:** If you have [organization administrator]({{< relref "../about-users-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../about-users-and-permissions/#grafana-server-administrators" >}}) permissions, you can still add users by [inviting a user to join an organization]({{< relref "../manage-org-users/invite-user-join-org/" >}}).

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/assign-remove-server-admin-privileges/"]
title = "Assign or remove Grafana server administrator privileges"
weight = 20
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/assign-remove-server-admin-privileges/
title: Assign or remove Grafana server administrator privileges
weight: 20
---
# Assign or remove Grafana server administrator privileges
@@ -12,7 +13,7 @@ Grafana server administrators are responsible for creating users, organizations,
## Before you begin
- [Add a user]({{< relref "./add-user.md" >}})
- [Add a user]({{< relref "add-user/" >}})
- Ensure you have Grafana server administrator privileges
**To assign or remove Grafana administrator privileges**:

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/change-user-org-permissions/"]
title = "Change a user's organization permissions"
weight = 50
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/change-user-org-permissions/
title: Change a user's organization permissions
weight: 50
---
# Change a user's organization permissions
@@ -10,7 +11,7 @@ Update organization permissions when you want to enhance or restrict a user's ac
## Before you begin
- [Add a user to an organization]({{< relref "./add-remove-user-to-org.md" >}})
- [Add a user to an organization]({{< relref "add-remove-user-to-org/" >}})
- Ensure you have Grafana server administrator privileges
**To change a user's organization permissions**:

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/force-user-logout/"]
title = "Force a user to logout from Grafana"
weight = 90
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/force-user-logout/
title: Force a user to logout from Grafana
weight: 90
---
# Force a user to log out of Grafana

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/grant-editor-admin-permissions/"]
title = "Grant editors administrator permissions"
weight = 60
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/grant-editor-admin-permissions/
title: Grant editors administrator permissions
weight: 60
---
# Grant editors administrator permissions
@@ -12,8 +13,8 @@ This setting can be used to enable self-organizing teams to administer their own
When `editors_can_admin` is enabled:
- Users with the Editor role in an organization are Administrators for new dashboards and folders they create, meaning they can edit dashboard permissions. To learn more about dashboard permissions, refer to [Manage dashboard permissions]({{< relref "../manage-dashboard-permissions/_index.md" >}}).
- Users with the Editor role in an organization can create teams, and they are Administrators of the teams they create. To learn more about team permissions, refer to [Manage teams]({{< relref "../manage-teams/_index.md" >}})
- Users with the Editor role in an organization are Administrators for new dashboards and folders they create, meaning they can edit dashboard permissions. To learn more about dashboard permissions, refer to [Manage dashboard permissions]({{< relref "../manage-dashboard-permissions/" >}}).
- Users with the Editor role in an organization can create teams, and they are Administrators of the teams they create. To learn more about team permissions, refer to [Manage teams]({{< relref "../manage-teams/" >}})
> **Note**: If you use Grafana Enterprise and customize users' permissions using RBAC, the RBAC permissions override the functionality enabled by the `editors_can_admin` flag.
@@ -25,7 +26,7 @@ When `editors_can_admin` is enabled:
1. Log in to the Grafana server and open the Grafana configuration file.
For more information about the Grafana configuration file and its location, refer to [Configuration]({{< relref "../../../administration/configuration" >}}).
For more information about the Grafana configuration file and its location, refer to [Configuration]({{< relref "../../../setup-grafana/configure-grafana/" >}}).
1. Locate the `editors_can_admin` parameter.
1. Set the `editors_can_admin` value to `true`.

View File

@@ -1,8 +1,10 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/view-edit-user-account/", "/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/view-user-account-details/"]
title = "View and edit a user account"
weight = 110
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/view-edit-user-account/
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/view-user-account-details/
title: View and edit a user account
weight: 110
---
# View user details

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/view-list-users/"]
title = "View a list of users"
weight = 100
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-server-users/view-list-users/
title: View a list of users
weight: 100
---
# View a list of users
@@ -19,4 +20,4 @@ You can see a list of users with accounts on your Grafana server. This action mi
![Server Admin user list](/static/img/docs/manage-users/server-user-list-7-3.png)
> **Note:** If you have [organization administrator]({{< relref "../about-users-and-permissions.md#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../about-users-and-permissions.md#grafana-server-administrators" >}}) permissions, you can still [view of list of users in a given organization]({{< relref "../../manage-users-and-permissions/manage-org-users/view-list-org-users.md" >}}).
> **Note:** If you have [organization administrator]({{< relref "../about-users-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../about-users-and-permissions/#grafana-server-administrators" >}}) permissions, you can still [view of list of users in a given organization]({{< relref "../manage-org-users/view-list-org-users/" >}}).

View File

@@ -1,8 +1,12 @@
+++
aliases = ["/docs/grafana/latest/administration/manage-users-and-permissions/manage-teams/", "/docs/grafana/latest/manage-users/add-or-remove-user-from-team/", "/docs/grafana/latest/manage-users/create-or-remove-team/", "/docs/grafana/latest/manage-users/manage-teams/"]
title = "Manage teams"
weight = 600
+++
---
aliases:
- /docs/grafana/latest/administration/manage-users-and-permissions/manage-teams/
- /docs/grafana/latest/manage-users/add-or-remove-user-from-team/
- /docs/grafana/latest/manage-users/create-or-remove-team/
- /docs/grafana/latest/manage-users/manage-teams/
title: Manage teams
weight: 600
---
# Manage teams

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/preferences/"]
title = "Preferences"
weight = 50
+++
---
aliases:
- /docs/grafana/latest/administration/preferences/
title: Preferences
weight: 50
---
# Grafana preferences
@@ -10,9 +11,9 @@ Grafana preferences are basic settings. They control the Grafana UI theme, home
Preferences are sometimes confusing because they can be set at four different levels, listed from highest level to lowest:
- **Server -** Affects all users on the Grafana server. Set by a [Grafana server admin]({{< relref "../manage-users-and-permissions/about-users-and-permissions.md#grafana-server-administrators" >}}).
- **Organization -** Affects all users in an organization. Set by an [Organization admin]({{< relref "../manage-users-and-permissions/about-users-and-permissions.md#organization-roles" >}}).
- **Team -** Affects all users assigned to a team. Set by an Organization Admin or Team Admin. To learn more about these roles, refer to [Teams and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions.md#teams-and-permissions" >}}).
- **Server -** Affects all users on the Grafana server. Set by a [Grafana server admin]({{< relref "../manage-users-and-permissions/about-users-and-permissions/#grafana-server-administrators" >}}).
- **Organization -** Affects all users in an organization. Set by an [Organization admin]({{< relref "../manage-users-and-permissions/about-users-and-permissions/#organization-roles" >}}).
- **Team -** Affects all users assigned to a team. Set by an Organization Admin or Team Admin. To learn more about these roles, refer to [Teams and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions/#teams-and-permissions" >}}).
- **User account -** Affects the individual user. Set by the user on their own account.
The lowest level always takes precedence. For example, if a user sets their theme to **Light**, then their visualization of Grafana displays the light theme. Nothing at any higher level can override that.

View File

@@ -1,9 +1,14 @@
+++
aliases = ["/docs/grafana/latest/administration/preferences/change-grafana-name/"]
keywords = ["grafana", "configuration", "documentation", "home"]
title = "Change name and email"
weight = 100
+++
---
aliases:
- /docs/grafana/latest/administration/preferences/change-grafana-name/
keywords:
- grafana
- configuration
- documentation
- home
title: Change name and email
weight: 100
---
# Change Grafana name and email
@@ -54,4 +59,4 @@ To change the team name or email, follow these steps:
## Change user name or email
To learn how to edit your user information, refer to [Edit your profile]({{< relref "../manage-user-preferences/_index.md#edit-your-profile" >}}).
To learn how to edit your user information, refer to [Edit your profile]({{< relref "../manage-user-preferences/#edit-your-profile" >}}).

View File

@@ -1,10 +1,15 @@
+++
aliases = ["/docs/grafana/latest/administration/preferences/change-grafana-theme/"]
description = "How to set the Grafana UI theme"
keywords = ["grafana", "configuration", "documentation", "home"]
title = "Change UI theme"
weight = 200
+++
---
aliases:
- /docs/grafana/latest/administration/preferences/change-grafana-theme/
description: How to set the Grafana UI theme
keywords:
- grafana
- configuration
- documentation
- home
title: Change UI theme
weight: 200
---
# Change Grafana UI theme
@@ -34,9 +39,9 @@ Here is an example of the light theme.
## Change server UI theme
Grafana server administrators can change the Grafana UI theme for all users on the server by setting the [default_theme]({{< relref "../configuration.md#default-theme" >}}) option in the Grafana configuration file.
Grafana server administrators can change the Grafana UI theme for all users on the server by setting the [default_theme]({{< relref "../../setup-grafana/configure-grafana/#default-theme" >}}) option in the Grafana configuration file.
To see what the current settings are, refer to [View server settings]({{< relref "../view-server/view-server-settings.md" >}}).
To see what the current settings are, refer to [View server settings]({{< relref "../view-server/view-server-settings/" >}}).
## Change organization UI theme

View File

@@ -1,10 +1,15 @@
+++
aliases = ["/docs/grafana/latest/administration/preferences/change-grafana-timezone/"]
description = "How to change your Grafana timezone"
keywords = ["grafana", "configuration", "documentation", "home"]
title = "Change default timezone"
weight = 400
+++
---
aliases:
- /docs/grafana/latest/administration/preferences/change-grafana-timezone/
description: How to change your Grafana timezone
keywords:
- grafana
- configuration
- documentation
- home
title: Change default timezone
weight: 400
---
# Change the Grafana default timezone
@@ -14,7 +19,7 @@ By default, Grafana uses the timezone in your web browser. However, you can over
## Set server timezone
Grafana server administrators can choose a default timezone for all users on the server by setting the [default_timezone]({{< relref "../configuration.md#default-timezone" >}}) option in the Grafana configuration file.
Grafana server administrators can choose a default timezone for all users on the server by setting the [default_timezone]({{< relref "../../setup-grafana/configure-grafana/#default-timezone" >}}) option in the Grafana configuration file.
## Set organization timezone

View File

@@ -1,10 +1,16 @@
+++
aliases = ["/docs/grafana/latest/administration/change-home-dashboard/", "/docs/grafana/latest/administration/preferences/change-home-dashboard/"]
description = "How to replace the default home dashboard"
keywords = ["grafana", "configuration", "documentation", "home"]
title = "Change home dashboard"
weight = 300
+++
---
aliases:
- /docs/grafana/latest/administration/change-home-dashboard/
- /docs/grafana/latest/administration/preferences/change-home-dashboard/
description: How to replace the default home dashboard
keywords:
- grafana
- configuration
- documentation
- home
title: Change home dashboard
weight: 300
---
# Change the default home dashboard
@@ -32,7 +38,7 @@ Users with the Grafana Server Admin flag on their account or access to the confi
### Use a JSON file as the home dashboard
1. Save your JSON file somewhere that Grafana can access it. For example, in the Grafana `data` folder of Grafana.
1. Update your configuration file to set the path to the JSON file. Refer to [default_home_dashboard_path]({{< relref "../configuration.md#default_home_dashboard_path" >}}) for more information about modifying the Grafana configuration files.
1. Update your configuration file to set the path to the JSON file. Refer to [default_home_dashboard_path]({{< relref "../../setup-grafana/configure-grafana/#default_home_dashboard_path" >}}) for more information about modifying the Grafana configuration files.
```ini
[dashboards]

View File

@@ -1,10 +1,14 @@
+++
aliases = ["/docs/grafana/latest/administration/provisioning/", "/docs/grafana/latest/installation/provisioning/"]
description = ""
keywords = ["grafana", "provisioning"]
title = "Provisioning"
weight = 800
+++
---
aliases:
- /docs/grafana/latest/administration/provisioning/
- /docs/grafana/latest/installation/provisioning/
description: ''
keywords:
- grafana
- provisioning
title: Provisioning
weight: 800
---
# Provisioning Grafana
@@ -12,7 +16,7 @@ In previous versions of Grafana, you could only use the API for provisioning dat
## Config File
Check out the [configuration]({{< relref "configuration.md" >}}) page for more information on what you can configure in `grafana.ini`
Check out the [configuration]({{< relref "../setup-grafana/configure-grafana/" >}}) page for more information on what you can configure in `grafana.ini`
### Config File Locations
@@ -94,8 +98,6 @@ datasources:
uid: my_unique_uid
# <string> url
url: http://localhost:8080
# <string> Deprecated, use secureJsonData.password
password:
# <string> database user, if used
user:
# <string> database name, if used
@@ -104,8 +106,6 @@ datasources:
basicAuth:
# <string> basic auth username
basicAuthUser:
# <string> Deprecated, use secureJsonData.basicAuthPassword
basicAuthPassword:
# <bool> enable/disable with credentials headers
withCredentials:
# <bool> mark as default datasource. Max one per org
@@ -194,7 +194,7 @@ Since not all datasources have the same configuration settings we only have the
`{"authType":"keys","defaultRegion":"us-west-2","timeField":"@timestamp"}`
Secure json data is a map of settings that will be encrypted with [secret key]({{< relref "configuration.md#secret-key" >}}) from the Grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to the request on the server side. All of these settings are optional.
Secure json data is a map of settings that will be encrypted with [secret key]({{< relref "../setup-grafana/configure-grafana/#secret-key" >}}) from the Grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to the request on the server side. All of these settings are optional.
> **Note:** Datasources tagged with _HTTP\*_ below denotes any data source which communicates using the HTTP protocol, e.g. all core data source plugins except MySQL, PostgreSQL and MSSQL.
@@ -233,7 +233,7 @@ datasources:
> This feature is available from v7.1
You can manage plugins in Grafana by adding one or more YAML config files in the [`provisioning/plugins`]({{< relref "configuration.md#provisioning" >}}) directory. Each config file can contain a list of `apps` that will be updated during start up. Grafana updates each app to match the configuration file.
You can manage plugins in Grafana by adding one or more YAML config files in the [`provisioning/plugins`]({{< relref "../setup-grafana/configure-grafana/#provisioning" >}}) directory. Each config file can contain a list of `apps` that will be updated during start up. Grafana updates each app to match the configuration file.
### Example plugin configuration file
@@ -261,7 +261,7 @@ apps:
## Dashboards
You can manage dashboards in Grafana by adding one or more YAML config files in the [`provisioning/dashboards`]({{< relref "configuration.md" >}}) directory. Each config file can contain a list of `dashboards providers` that load dashboards into Grafana from the local filesystem.
You can manage dashboards in Grafana by adding one or more YAML config files in the [`provisioning/dashboards`]({{< relref "../setup-grafana/configure-grafana/" >}}) directory. Each config file can contain a list of `dashboards providers` that load dashboards into Grafana from the local filesystem.
The dashboard provider config file looks somewhat like this:
@@ -316,7 +316,7 @@ Note: The JSON definition in the input field when using `Copy JSON to Clipboard`
### Reusable Dashboard URLs
If the dashboard in the JSON file contains an [UID]({{< relref "../dashboards/json-model.md" >}}), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
If the dashboard in the JSON file contains an [UID]({{< relref "../dashboards/json-model/" >}}), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
When Grafana starts, it updates/inserts all dashboards available in the configured folders. If you modify the file, then the dashboard is also updated.
By default, Grafana deletes dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
@@ -601,4 +601,4 @@ The following sections detail the supported settings and secure settings for eac
Grafana Enterprise supports provisioning for the following resources:
- [Role-based access control provisioning]({{< relref "../enterprise/access-control/rbac-provisioning.md" >}})
- [Role-based access control provisioning]({{< relref "../enterprise/access-control/rbac-provisioning/" >}})

View File

@@ -11,7 +11,7 @@ weight: 30
A service account can be used to run automated workloads in Grafana, like dashboard provisioning, configuration, or report generation. Create service accounts and tokens to authenticate applications like Terraform with the Grafana API.
> **Note:** Service accounts are available in Grafana 8.5+ as a beta feature. To enable service accounts, refer to [Enable service accounts]({{< relref "./enable-service-accounts.md#" >}}) section. Service accounts will eventually replace [API keys]({{< relref "../api-keys/_index.md" >}}) as the primary way to authenticate applications that interact with Grafana.
> **Note:** Service accounts are available in Grafana 8.5+ as a beta feature. To enable service accounts, refer to [Enable service accounts]({{< relref "enable-service-accounts/#" >}}) section. Service accounts will eventually replace [API keys]({{< relref "../api-keys/" >}}) as the primary way to authenticate applications that interact with Grafana.
A common use case for creating a service account is to perform operations on automated or triggered tasks. You can use service accounts to:
@@ -20,7 +20,7 @@ A common use case for creating a service account is to perform operations on aut
- Set up an external SAML authentication provider
- Interact with Grafana without signing in as a user
In [Grafana Enterprise]({{< relref "../../enterprise/_index.md" >}}), you can also use service accounts in combination with [role-based access control]({{< relref "../../enterprise/access-control/about-rbac.md" >}}) to grant very specific permissions to applications that interact with Grafana.
In [Grafana Enterprise]({{< relref "../../enterprise/" >}}), you can also use service accounts in combination with [role-based access control]({{< relref "../../enterprise/access-control/about-rbac/" >}}) to grant very specific permissions to applications that interact with Grafana.
> **Note:** Service accounts can only act in the organization they are created for. If you have the same task that is needed for multiple organizations, we recommend creating service accounts in each organization.
@@ -46,4 +46,4 @@ The added benefits of service accounts to API keys include:
- Service accounts resemble Grafana users and can be enabled/disabled, granted specific permissions, and remain active until they are deleted or disabled. API keys are only valid until their expiry date.
- Service accounts can be associated with multiple tokens.
- Unlike API keys, service account tokens are not associated with a specific user, which means that applications can be authenticated even if a Grafana user is deleted.
- You can grant granular permissions to service accounts by leveraging [fine-grained access control]({{< relref "../../enterprise/access-control" >}}). For more information about permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions.md#" >}}).
- You can grant granular permissions to service accounts by leveraging [fine-grained access control]({{< relref "../../enterprise/access-control/" >}}). For more information about permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions/#" >}}).

View File

@@ -9,14 +9,14 @@ weight: 60
# Add a token to a service account in Grafana
A service account token is a generated random string that acts as an alternative to a password when authenticating with Grafanas HTTP API. For more information about service accounts, refer to [About service accounts in Grafana]({{< relref "./about-service-accounts.md" >}}).
A service account token is a generated random string that acts as an alternative to a password when authenticating with Grafanas HTTP API. For more information about service accounts, refer to [About service accounts in Grafana]({{< relref "about-service-accounts/" >}}).
You can create a service account token using the Grafana UI or via the API. For more information about creating a service account token via the API, refer to [Create service account tokens using the HTTP API]({{< relref "../../developers/http_api/serviceaccount.md#create-service-account-tokens" >}}).
You can create a service account token using the Grafana UI or via the API. For more information about creating a service account token via the API, refer to [Create service account tokens using the HTTP API]({{< relref "../../developers/http_api/serviceaccount/#create-service-account-tokens" >}}).
## Before you begin
- Ensure you have added the `serviceAccounts` feature toggle to Grafana. For more information about adding the feature toggle, refer to [Enable service accounts]({{< relref "./enable-service-accounts.md#" >}}).
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions.md#" >}}).
- Ensure you have added the `serviceAccounts` feature toggle to Grafana. For more information about adding the feature toggle, refer to [Enable service accounts]({{< relref "enable-service-accounts/#" >}}).
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions/#" >}}).
## To add a token to a service account

View File

@@ -11,14 +11,14 @@ weight: 50
# Create a service account in Grafana
A service account can be used to run automated workloads in Grafana, like dashboard provisioning, configuration, or report generation. For more information about how you can use service accounts, refer to [About service accounts]({{< relref "../service-accounts/about-service-accounts.md#" >}}).
A service account can be used to run automated workloads in Grafana, like dashboard provisioning, configuration, or report generation. For more information about how you can use service accounts, refer to [About service accounts]({{< relref "about-service-accounts/#" >}}).
For more information about creating service accounts via the API, refer to [Create a service account in the HTTP API]({{< relref "../../developers/http_api/serviceaccount.md#create-service-account" >}}).
For more information about creating service accounts via the API, refer to [Create a service account in the HTTP API]({{< relref "../../developers/http_api/serviceaccount/#create-service-account" >}}).
## Before you begin
- Ensure you have added the feature toggle for service accounts `serviceAccounts`. For more information about adding the feature toggle, refer to [Enable service accounts]({{< relref "./enable-service-accounts.md#" >}}).
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions.md#" >}}).
- Ensure you have added the feature toggle for service accounts `serviceAccounts`. For more information about adding the feature toggle, refer to [Enable service accounts]({{< relref "enable-service-accounts/#" >}}).
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions/#" >}}).
## To create a service account

View File

@@ -25,7 +25,7 @@ You can enable service accounts by:
This topic shows you how to enable service accounts by modifying the Grafana configuration file.
1. Sign in to the Grafana server and locate the configuration file. For more information about finding the configuration file, refer to LINK.
2. Open the configuration file and locate the [feature toggles section]({{< relref "../../administration/configuration.md#feature_toggles" >}}). Add `serviceAccounts` as a [feature_toggle]({{< relref "../../administration/configuration.md#feature_toggle" >}}).
2. Open the configuration file and locate the [feature toggles section]({{< relref "../../setup-grafana/configure-grafana/#feature_toggles" >}}). Add `serviceAccounts` as a [feature_toggle]({{< relref "../../setup-grafana/configure-grafana/#feature_toggle" >}}).
```
[feature_toggles]
@@ -39,6 +39,6 @@ enable = serviceAccounts
This topic shows you how to enable service accounts by setting environment variables before starting Grafana.
Follow the instructions to [override configuration with environment variables]({{< relref "../../administration/configuration.md#override-configuration-with-environment-variables" >}}). Set the following environment variable: `GF_FEATURE_TOGGLES_ENABLE = serviceAccounts`.
Follow the instructions to [override configuration with environment variables]({{< relref "../../setup-grafana/configure-grafana/#override-configuration-with-environment-variables" >}}). Set the following environment variable: `GF_FEATURE_TOGGLES_ENABLE = serviceAccounts`.
> **Note:** Environment variables override configuration file settings.

View File

@@ -1,8 +1,9 @@
+++
aliases = ["/docs/grafana/latest/administration/view-server/"]
title = "View server"
weight = 100
+++
---
aliases:
- /docs/grafana/latest/administration/view-server/
title: View server
weight: 100
---
# View server information

View File

@@ -1,18 +1,24 @@
+++
aliases = ["/docs/grafana/latest/admin/view-server-settings/", "/docs/grafana/latest/administration/view-server/view-server-settings/"]
description = "How to view server settings in the Grafana UI"
keywords = ["grafana", "configuration", "server", "settings"]
title = "View server settings"
weight = 300
+++
---
aliases:
- /docs/grafana/latest/admin/view-server-settings/
- /docs/grafana/latest/administration/view-server/view-server-settings/
description: How to view server settings in the Grafana UI
keywords:
- grafana
- configuration
- server
- settings
title: View server settings
weight: 300
---
# View Grafana server settings
> Refer to [Role-based access control]({{< relref "../../enterprise/access-control/_index.md" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
> Refer to [Role-based access control]({{< relref "../../enterprise/access-control/" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration]({{< relref "../configuration.md#config-file-locations" >}}) file and any environmental variables.
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration]({{< relref "../../setup-grafana/configure-grafana/#config-file-locations" >}}) file and any environmental variables.
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions.md" >}}).
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions/" >}}).
## View server settings
@@ -21,4 +27,4 @@ If you are a Grafana server administrator, use the Settings tab to view the sett
## Available settings
For a full list of server settings, refer to [Configuration]({{< relref "../configuration.md" >}}).
For a full list of server settings, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}).

View File

@@ -1,17 +1,22 @@
+++
aliases = ["/docs/grafana/latest/admin/view-server-stats/", "/docs/grafana/latest/administration/view-server/view-server-stats/"]
keywords = ["grafana", "server", "statistics"]
title = "View server stats"
weight = 400
+++
---
aliases:
- /docs/grafana/latest/admin/view-server-stats/
- /docs/grafana/latest/administration/view-server/view-server-stats/
keywords:
- grafana
- server
- statistics
title: View server stats
weight: 400
---
# View Grafana server stats
> Refer to [Role-based access control]({{< relref "../../enterprise/access-control/_index.md" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
> Refer to [Role-based access control]({{< relref "../../enterprise/access-control/" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
If you are a Grafana server admin, then you can view useful statistics about your Grafana server in the Stats & Licensing tab.
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions.md" >}}).
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [About users and permissions]({{< relref "../manage-users-and-permissions/about-users-and-permissions/" >}}).
## View server stats

View File

@@ -1,35 +1,38 @@
+++
aliases = ["/docs/grafana/latest/alerting/", "/docs/grafana/latest/alerting/unified-alerting/difference-old-new/"]
title = "Alerting"
weight = 114
+++
---
aliases:
- /docs/grafana/latest/alerting/
- /docs/grafana/latest/alerting/unified-alerting/alerting/
title: Alerting
weight: 114
---
# Grafana alerting
# Grafana Alerting
Grafana alerts allow you to learn about problems in your systems moments after they occur. Robust and actionable alerts help you identify and resolve issues quickly, minimizing disruption to your services. It centralizes alerting information in a single, searchable view that allows you to:
Grafana Alerting allows you to learn about problems in your systems moments after they occur. Robust and actionable alerts help you identify and resolve issues quickly, minimizing disruption to your services. It centralizes alerting information in a single, searchable view that allows you to:
- Create and manage Grafana alerts
- Create and manage Grafana Mimir and Loki managed alerts
- View alerting information from Prometheus and Alertmanager compatible data sources
For new installations or existing installs without alerting configured, Grafana alerting is enabled by default.
For new installations or existing installs without alerting configured, Grafana Alerting is enabled by default.
| Release | Cloud | Enterprise | OSS |
| ----------- | ------------- | ------------- | ------------- |
| Grafana 9.0 | On by default | On by default | On by default |
- For existing OSS installations with legacy dashboard alerting, you can [opt-in]({{< relref "./opt-in.md" >}}) to Grafana alerting.
- For Grafana Cloud instances using legacy cloud alerting, contact customer support to migrate to Grafana alerting.
Existing installations that upgrade to v9.0 will have Grafana Alerting enabled by default. For more information on migrating from legacy or the cloud alerting plugin, see [Migrating to Grafana Alerting]({{< relref "migrating-alerts/" >}}).
Before you begin, we recommend that you familiarize yourself with some of the [fundamental concepts]({{< relref "./fundamentals/_index.md" >}}) of Grafana alerting. Refer to [Role-based access control]({{< relref "../enterprise/access-control/_index.md" >}}) in Grafana Enterprise to learn more about controlling access to alerts using role-based permissions.
Before you begin, we recommend that you familiarize yourself with some of the [fundamental concepts]({{< relref "fundamentals/" >}}) of Grafana Alerting. Refer to [Role-based access control]({{< relref "../enterprise/access-control/" >}}) in Grafana Enterprise to learn more about controlling access to alerts using role-based permissions.
- [Enable Grafana alerting in OSS]({{< relref "./opt-in.md" >}})
- [Migrating legacy alerts]({{< relref "./migrating-legacy-alerts.md" >}})
- [Create Grafana managed alerting rules]({{< relref "alerting-rules/create-grafana-managed-rule.md" >}})
- [Create Grafana Mimir or Loki managed alerting rules]({{< relref "alerting-rules/create-mimir-loki-managed-rule.md" >}})
- [View existing alerting rules and manage their current state]({{< relref "alerting-rules/rule-list.md" >}})
- [View the state and health of alerting rules]({{< relref "./fundamentals/state-and-health.md" >}})
- [View alert groupings]({{< relref "./alert-groups/_index.md" >}})
- [Add or edit an alert contact point]({{< relref "./contact-points/_index.md" >}})
- [Add or edit notification policies]({{< relref "./notifications/_index.md" >}})
- [Add or edit silences]({{< relref "./silences/_index.md" >}})
- [About alert rules]({{< relref "fundamentals/alert-rules/" >}})
- [Migrating legacy alerts]({{< relref "migrating-alerts/" >}})
- [Disable Grafana Alerting in OSS]({{< relref "migrating-alerts/opt-out/" >}})
- [Create Grafana managed alerting rules]({{< relref "alerting-rules/create-grafana-managed-rule/" >}})
- [Create Grafana Mimir or Loki managed alerting rules]({{< relref "alerting-rules/create-mimir-loki-managed-rule/" >}})
- [View existing alerting rules and manage their current state]({{< relref "alerting-rules/rule-list/" >}})
- [View the state and health of alerting rules]({{< relref "fundamentals/state-and-health/" >}})
- [View alert groupings]({{< relref "alert-groups/" >}})
- [Add or edit an alert contact point]({{< relref "contact-points/" >}})
- [Add or edit notification policies]({{< relref "notifications/" >}})
- [Add or edit silences]({{< relref "silences/" >}})
- [Performance considerations for alerting]({{< relref "performance/" >}})

View File

@@ -0,0 +1,33 @@
---
aliases:
- /docs/grafana/latest/alerting/about-alerting/
description: A quick overview of Grafana Alerting
keywords:
- grafana
- alerting
- overview
- concepts
- basics
title: About Grafana Alerting
weight: 100
---
# About Grafana Alerting
Grafana Alerting consists of several individual concepts that are at the core of a flexible and powerful alerting engine.
This topic explains how to create [alert rules]({{< relref "fundamentals/alert-rules/" >}}), their relationship with [alert instances]({{< relref "fundamentals/alert-rules/alert-instances/" >}}) and the various alert rule [states and transitions]({{< relref "fundamentals/state-and-health/" >}}), [notification policies]({{< relref "notifications/" >}}) and [contact points]({{< relref "contact-points/" >}}).
These three individual concepts are the minimum necessities to successfully create alerts and receive notifications.
We will also touch on various other concepts such as [silences]({{< relref "silences/" >}}) and [mute timings]({{< relref "notifications/mute-timings/" >}}) to more granularly manage alert notifications, [role-based access control]({{< relref "../enterprise/access-control/" >}}) to limit access and manage permissions and additional advanced topics such as [external alertmanagers]({{< relref "fundamentals/alertmanager/#add-a-new-external-alertmanager" >}}) and [high availability]({{< relref "high-availability/" >}}).
## Overview
{{< figure src="/static/img/docs/alerting/unified/about-alerting-flow-diagram.jpg" caption="Grafana Alerting overview" >}}
As shown in the diagram above, Grafana Alerting uses [labels]({{< relref "fundamentals/annotation-label/how-to-use-labels/" >}}) to match an alert rule and its instances to a specific notification policy. This concept of labels and label matching is important and is also used in [silences]({{< relref "silences/" >}}).
Each notification policy specifies a set of [label matchers]({{< relref "fundamentals/annotation-label/labels-and-label-matchers/" >}}) to indicate what alerts they are responsible for.
A notification policy has a [contact point]({{< relref "contact-points/" >}}) assigned to it that consists of one or more [notifiers]({{< relref "contact-points/#list-of-notifiers-supported-by-grafana" >}}).

View File

@@ -1,16 +1,22 @@
+++
title = "Alert groups"
description = "Alert groups"
keywords = ["grafana", "alerting", "alerts", "groups"]
weight = 445
aliases = ["/docs/grafana/latest/alerting/unified-alerting/alert-groups/"]
+++
---
aliases:
- /docs/grafana/latest/alerting/alert-groups/
- /docs/grafana/latest/alerting/unified-alerting/alert-groups/
description: Alert groups
keywords:
- grafana
- alerting
- alerts
- groups
title: Alert groups
weight: 445
---
# Alert groups
Alert groups show grouped alerts from an Alertmanager instance. By default, the alerts are grouped by the label keys for the root policy in [notification policies]({{< relref "../notifications/_index.md" >}}). Grouping common alerts into a single alert group prevents duplicate alerts from being fired.
Alert groups show grouped alerts from an Alertmanager instance. By default, the alerts are grouped by the label keys for the root policy in [notification policies]({{< relref "../notifications/" >}}). Grouping common alerts into a single alert group prevents duplicate alerts from being fired.
For more information, see:
- [View alert groupings]({{< relref "./view-alert-grouping.md" >}})
- [Filter alerts by group]({{< relref "./filter-alerts.md" >}})
- [View alert groupings]({{< relref "view-alert-grouping/" >}})
- [Filter alerts by group]({{< relref "filter-alerts/" >}})

View File

@@ -1,10 +1,16 @@
+++
title = "Filter alerts"
description = "Alert groups"
keywords = ["grafana", "alerting", "alerts", "groups"]
weight = 445
aliases = ["/docs/grafana/latest/alerting/unified-alerting/alert-groups/"]
+++
---
aliases:
- /docs/grafana/latest/alerting/alert-groups/filter-alerts/
- /docs/grafana/latest/alerting/unified-alerting/alert-groups/
description: Alert groups
keywords:
- grafana
- alerting
- alerts
- groups
title: Filter alerts
weight: 445
---
# Filter alerts by group

View File

@@ -1,10 +1,17 @@
+++
aliases = ["/docs/grafana/latest/alerting/alert-groups/", "/docs/grafana/latest/alerting/unified-alerting/alert-groups/"]
description = "Alert groups"
keywords = ["grafana", "alerting", "alerts", "groups"]
title = "View alert groupings"
weight = 445
+++
---
aliases:
- /docs/grafana/latest/alerting/alert-groups/
- /docs/grafana/latest/alerting/alert-groups/view-alert-grouping/
- /docs/grafana/latest/alerting/unified-alerting/alert-groups/
description: Alert groups
keywords:
- grafana
- alerting
- alerts
- groups
title: View alert groupings
weight: 445
---
# View alert groupings

View File

@@ -1,10 +1,28 @@
+++
aliases = ["/docs/grafana/latest/alerting/alerting-limitations/"]
title = "Limitations"
weight = 552
+++
---
aliases:
- /docs/grafana/latest/alerting/alerting-limitations/
title: Limitations
weight: 552
---
# Limitations
- Grafana alerting system can retrieve rules from all available Prometheus, Loki, and Alertmanager data sources. It might not be able to fetch alerting rules from all other supported data sources at this time.
- We aim to support the latest two minor versions of both Prometheus and Alertmanager. We cannot guarantee that older versions will work. As an example, if the current Prometheus version is `2.31.1`, we support >= `2.29.0`.
## Limited rule sources support
Grafana Alerting can retrieve alerting and recording rules **stored** in most available Prometheus, Loki, Mimir, and Alertmanager compatible data sources.
It does not support reading or writing alerting rules from any other data sources but the ones previously mentioned at this time.
## Prometheus version support
We support the latest two minor versions of both Prometheus and Alertmanager. We cannot guarantee that older versions will work.
As an example, if the current Prometheus version is `2.31.1`, we support >= `2.29.0`.
## Grafana is not an alert receiver
Grafana is not an alert receiver; is it an alert generator. This means that Grafana cannot receive alerts from anything other than its internal alert generator.
Receiving alerts from Prometheus (or anything else) is not supported at the time.
For more information, refer to [this GitHub discussion](https://github.com/grafana/grafana/discussions/45773).

View File

@@ -1,10 +1,13 @@
+++
aliases = ["/docs/grafana/latest/alerting/alerting-rules/", "/docs/grafana/latest/alerting/rules/", "/docs/grafana/latest/alerting/unified-alerting/alerting-rules/"]
title = "Create and manage rules"
weight = 130
+++
---
aliases:
- /docs/grafana/latest/alerting/alerting-rules/
- /docs/grafana/latest/alerting/rules/
- /docs/grafana/latest/alerting/unified-alerting/alerting-rules/
title: Create and manage rules
weight: 130
---
# Create and manage Grafana alerting rules
# Create and manage Grafana Alerting rules
An alerting rule is a set of evaluation criteria that determines whether an alert will fire. The rule consists of one or more queries and expressions, a condition, the frequency of evaluation, and optionally, the duration over which the condition is met.
@@ -12,9 +15,9 @@ While queries and expressions select the data set to evaluate, a condition sets
You can:
- [Create Grafana Mimir or Loki managed alert rule]({{< relref "./create-mimir-loki-managed-rule.md" >}})
- [Create Grafana Mimir or Loki managed recording rule]({{< relref "./create-mimir-loki-managed-recording-rule.md" >}})
- [Edit Grafana Mimir or Loki rule groups and namespaces]({{< relref "./edit-mimir-loki-namespace-group.md" >}})
- [Create Grafana managed alert rule]({{< relref "./create-grafana-managed-rule.md" >}})
- [State and health of alerting rules]({{< relref "../fundamentals/state-and-health.md" >}})
- [Manage alerting rules]({{< relref "./rule-list.md" >}})
- [Create Grafana Mimir or Loki managed alert rule]({{< relref "create-mimir-loki-managed-rule/" >}})
- [Create Grafana Mimir or Loki managed recording rule]({{< relref "create-mimir-loki-managed-recording-rule/" >}})
- [Edit Grafana Mimir or Loki rule groups and namespaces]({{< relref "edit-mimir-loki-namespace-group/" >}})
- [Create Grafana managed alert rule]({{< relref "create-grafana-managed-rule/" >}})
- [State and health of alerting rules]({{< relref "../fundamentals/state-and-health/" >}})
- [Manage alerting rules]({{< relref "rule-list/" >}})

View File

@@ -1,41 +1,48 @@
+++
aliases = ["/docs/grafana/latest/alerting/alerting-rules/create-grafana-managed-rule/", "/docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-grafana-managed-rule/"]
description = "Create Grafana managed alert rule"
keywords = ["grafana", "alerting", "guide", "rules", "create"]
title = "Create Grafana managed alert rule"
weight = 400
+++
---
aliases:
- /docs/grafana/latest/alerting/alerting-rules/create-grafana-managed-rule/
- /docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-grafana-managed-rule/
description: Create Grafana managed alert rule
keywords:
- grafana
- alerting
- guide
- rules
- create
title: Create Grafana managed alert rule
weight: 400
---
# Create a Grafana managed alerting rule
Grafana allows you to create alerting rules that query one or more data sources, reduce or transform the results and compare them to each other or to fix thresholds. When these are executed, Grafana sends notifications to the contact point.
Grafana allows you to create alerting rules that query one or more data sources, reduce or transform the results and compare them to each other or to fix thresholds. When these are executed, Grafana sends notifications to the contact point. For information on Grafana Alerting, see [About Grafana Alerting]({{< relref "../about-alerting/" >}}) which explains the various components of Grafana Alerting. We also recommend that you familiarize yourself with some of the [fundamental concepts]({{< relref "../fundamentals/" >}}) of Grafana Alerting.
## Add Grafana managed rule
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **New alert rule**.
1. In Step 1, add the rule name, type, and storage location.
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
- From the **Rule type** drop-down, select **Grafana managed alert**.
- From the **Folder** drop-down, select the folder where you want to store the rule. If you do not select a folder, the rule is stored in the General folder. To create a new folder, click the drop-down and enter the new folder name.
1. In Step 2, add queries and expressions to evaluate.
- Keep the default name or hover over and click the edit icon to change the name.
1. Click **New alert rule**. The new alerting rule page opens where the Grafana managed alerts option is selected by default.
1. In Step 1, add queries and expressions to evaluate, and then select the alert condition.
- For queries, select a data source from the drop-down.
- Add one or more [queries]({{< relref "../../panels/query-a-data-source/add-a-query.md" >}}) or [expressions]({{< relref "../../panels/query-a-data-source/use-expressions-to-manipulate-data/about-expressions.md" >}}).
- Add one or more [queries]({{< relref "../../panels/query-a-data-source/add-a-query/" >}}) or [expressions]({{< relref "../../panels/query-a-data-source/use-expressions-to-manipulate-data/about-expressions/" >}}).
- For each expression, select either **Classic condition** to create a single alert rule, or choose from **Math**, **Reduce**, **Resample** options to generate separate alert for each series. For details on these options, see [Single and multi dimensional rule](#single-and-multi-dimensional-rule).
- Click **Run queries** to verify that the query is successful.
1. In Step 3, add conditions.
- Next, select the query or expression for your alert condition.
1. In Step 2, specify the alert evaluation interval.
- From the **Condition** drop-down, select the query or expression to trigger the alert rule.
- For **Evaluate every**, specify the frequency of evaluation. Must be a multiple of 10 seconds. For examples, `1m`, `30s`.
- For **Evaluate for**, specify the duration for which the condition must be true before an alert fires.
> **Note:** Once a condition is breached, the alert goes into the Pending state. If the condition remains breached for the duration specified, the alert transitions to the Firing state, else it reverts back to the Normal state.
> **Note:** Once a condition is breached, the alert goes into the Pending state. If the condition remains breached for the duration specified, the alert transitions to the `Firing` state, otherwise it reverts back to the `Normal` state.
- In **Configure no data and error handling**, configure alerting behavior in the absence of data. Use the guidelines in [No data and error handling](#no-data-and-error-handling).
- Click **Preview alerts** to check the result of running the query at this moment. Preview excludes no data and error handling.
1. In Step 4, add additional metadata associated with the rule.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "../fundamentals/annotation-label/_index.md" >}}).
1. In Step 3, add the rule name, storage location, rule group, as well as additional metadata associated with the rule.
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
- From the **Folder** drop-down, select the folder where you want to store the rule.
- For **Group**, specify a pre-defined group. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "../fundamentals/annotation-label/" >}}).
- Add Runbook URL, panel, dashboard, and alert IDs.
- Add custom labels.
1. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.
1. Next, create a [notification]({{< relref "../notifications/" >}}) for the rule.
### Single and multi dimensional rule
@@ -49,7 +56,7 @@ Use the classic condition expression to create a rule that triggers a single ale
To generate a separate alert for each series, create a multi-dimensional rule. Use `Math`, `Reduce`, or `Resample` expressions to create a multi-dimensional rule. For example:
- Add a `Reduce` expression for each query to aggregate values in the selected time range into a single value. (Not needed for [rules using numeric data]({{< relref "../fundamentals/evaluate-grafana-alerts.md#alerting-on-numeric-data-1" >}})).
- Add a `Reduce` expression for each query to aggregate values in the selected time range into a single value. (Not needed for [rules using numeric data]({{< relref "../fundamentals/evaluate-grafana-alerts/#alerting-on-numeric-data-1" >}})).
- Add a `Math` expression with the condition for the rule. Not needed in case a query or a reduce expression already returns 0 if rule should not fire, or a positive number if it should fire. Some examples: `$B > 70` if it should fire in case value of B query/expression is more than 70. `$B < $C * 100` in case it should fire if value of B is less than value of C multiplied by 100. If queries being compared have multiple series in their results, series from different queries are matched if they have the same labels or one is a subset of the other.
![Query section multi dimensional](/static/img/docs/alerting/unified/rule-edit-multi-8-0.png 'Query section multi dimensional screenshot')
@@ -58,7 +65,7 @@ To generate a separate alert for each series, create a multi-dimensional rule. U
#### Rule with classic condition
For more information, see [expressions documentation]({{< relref "../../panels/query-a-data-source/use-expressions-to-manipulate-data/about-expressions.md" >}}).
For more information, see [expressions documentation]({{< relref "../../panels/query-a-data-source/use-expressions-to-manipulate-data/about-expressions/" >}}).
### No data and error handling

View File

@@ -1,10 +1,19 @@
+++
aliases = ["/docs/grafana/latest/alerting/alerting-rules/create-mimir-loki-managed-recording-rule/", "/docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule/", "/docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-mimir-loki-managed-recording-rule/"]
description = "Create Grafana Mimir or Loki managed recording rule"
keywords = ["grafana", "alerting", "guide", "rules", "recording rules", "create"]
title = "Create Grafana Mimir or Loki managed recording rule"
weight = 400
+++
---
aliases:
- /docs/grafana/latest/alerting/alerting-rules/create-mimir-loki-managed-recording-rule/
- /docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule/
- /docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-mimir-loki-managed-recording-rule/
description: Create Grafana Mimir or Loki managed recording rule
keywords:
- grafana
- alerting
- guide
- rules
- recording rules
- create
title: Create Grafana Mimir or Loki managed recording rule
weight: 400
---
# Create a Grafana Mimir or Loki managed recording rule
@@ -12,16 +21,35 @@ You can create and manage recording rules for an external Grafana Mimir or Loki
## Before you begin
For Grafana Mimir and Loki data sources to work with Grafana 8.0 alerting, enable the ruler API by configuring their respective services.
- Verify that you have write permission to the Prometheus or Loki data source. Otherwise, you will not be able to create or update Grafana Mimir managed alerting rules.
**Loki** - The `local` rule storage type, default for the Loki data source, supports only viewing of rules. To edit rules, configure one of the other rule storage types.
- For Grafana Mimir and Loki data sources, enable the ruler API by configuring their respective services.
**Grafana Mimir** - When configuring a Grafana Prometheus data source to point to Grafana Mimir, use the legacy `/api/prom` prefix, not `/prometheus`. Currently, we support only single-binary mode and you cannot provide a separate URL for the ruler API.
- **Loki** - The `local` rule storage type, default for the Loki data source, supports only viewing of rules. To edit rules, configure one of the other rule storage types.
> **Note:** If you do not want to manage alerting rules for a particular Loki or Prometheus data source, go to its settings page and clear the **Manage alerts via Alerting UI** checkbox.
- **Grafana Mimir** - use the [legacy `/api/prom` prefix](https://grafana.com/docs/mimir/latest/operators-guide/reference-http-api/#path-prefixes), not `/prometheus`. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](https://grafana.com/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](https://grafana.com/docs/mimir/latest/operators-guide/reference-http-api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
> **Note:** If you do not want to manage alerting rules for a particular Loki or Prometheus data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
## Add a Grafana Mimir or Loki managed recording rule
To create a Grafana Mimir or Loki managed recording rule
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **New alert rule**. The new alerting rule page opens where the **Grafana managed alert** option is selected by default.
1. In Step 1, select **Mimir or Loki recording rule** option.
- Select your Loki or Prometheus data source, add the query to evaluate, and then select the alert condition.
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
1. In Step 2, add the rule name, namespace, rule group, as well as additional metadata associated with the rule.
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
- From the **Namespace** drop-down, select an existing rule namespace. Otherwise, click Add new and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose. For more information, see [Grafana Mimir or Loki rule groups and namespaces]({{< relref "edit-mimir-loki-namespace-group/" >}}).
- From the **Group** drop-down, select an existing group within the selected namespace. Otherwise, click **Add new** and enter a name to create a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "../fundamentals/annotation-label/" >}}).
- Add Runbook URL, panel, dashboard, and alert IDs.
- Add custom labels.
1. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.
1. Next, create a [notification]({{< relref "../notifications/" >}}) for the rule.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **New alert rule**.
1. In Step 1, add the rule name, type, and storage location.
@@ -35,7 +63,7 @@ For Grafana Mimir and Loki data sources to work with Grafana 8.0 alerting, enabl
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-query-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 3, add additional metadata associated with the rule.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "../fundamentals/annotation-label/_index.md" >}}).
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "../fundamentals/annotation-label/" >}}).
- Add Runbook URL, panel, dashboard, and alert IDs.
- Add custom labels.
1. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.

View File

@@ -1,18 +1,26 @@
+++
aliases = ["/docs/grafana/latest/alerting/alerting-rules/create-mimir-loki-managed-rule/", "/docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule/", "/docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-mimir-loki-managed-recording-rule/"]
description = "Create Grafana Mimir or Loki managed alerting rule"
keywords = ["grafana", "alerting", "guide", "rules", "create"]
title = "Create Grafana Mimir or Loki managed alert rule"
weight = 400
+++
---
aliases:
- /docs/grafana/latest/alerting/alerting-rules/create-mimir-loki-managed-rule/
- /docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule/
- /docs/grafana/latest/alerting/unified-alerting/alerting-rules/create-mimir-loki-managed-recording-rule/
description: Create Grafana Mimir or Loki managed alerting rule
keywords:
- grafana
- alerting
- guide
- rules
- create
title: Create Grafana Mimir or Loki managed alert rule
weight: 400
---
# Create a Grafana Mimir or Loki managed alerting rule
Grafana allows you to create alerting rules for an external Grafana Mimir or Loki instance.
Grafana allows you to create alerting rules for an external Grafana Mimir or Loki instance that has ruler API enabled. For information on Grafana Alerting, see [About Grafana Alerting]({{< relref "../about-alerting/" >}}) which explains the various components of Grafana Alerting. We also recommend that you familiarize yourself with some of the [fundamental concepts]({{< relref "../fundamentals/" >}}) of Grafana Alerting.
## Before you begin
- Verify that you have write permission to the Prometheus data source. Otherwise, you will not be able to create or update Grafana Mimir managed alerting rules.
- Verify that you have write permission to the Prometheus or Loki data source. Otherwise, you will not be able to create or update Grafana Mimir managed alerting rules.
- For Grafana Mimir and Loki data sources, enable the ruler API by configuring their respective services.
@@ -25,23 +33,19 @@ Grafana allows you to create alerting rules for an external Grafana Mimir or Lok
## Add a Grafana Mimir or Loki managed alerting rule
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **New alert rule**.
1. In Step 1, add the rule name, type, and storage location.
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
- From the **Rule type** drop-down, select **Mimir / Loki managed alert**.
- From the **Select data source** drop-down, select an external Prometheus, an external Loki, or a Grafana Cloud data source.
- From the **Namespace** drop-down, select an existing rule namespace. Otherwise, click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose. For more information, see [Grafana Mimir or Loki rule groups and namespaces]({{< relref "./edit-mimir-loki-namespace-group.md" >}}).
- From the **Group** drop-down, select an existing group within the selected namespace. Otherwise, click **Add new** and enter a name to create a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-alert-type-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 2, add the query to evaluate.
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-query-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 3, add conditions.
1. Click **New alert rule**. The new alerting rule page opens where the Grafana managed alerts option is selected by default.
1. In Step 1, select **Mimir or Loki alert** option.
- Next, select your Loki or Prometheus data source and add the query to evaluate.
- Enter a PromQL or LogQL expression to query. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
1. In Step 2, specify the alert evaluation interval.
- In the **For** text box, specify the duration for which the condition must be true before an alert fires. If you specify `5m`, the condition must be true for 5 minutes before the alert fires.
> **Note:** Once a condition is met, the alert goes into the `Pending` state. If the condition remains active for the duration specified, the alert transitions to the `Firing` state, else it reverts to the `Normal` state.
1. In Step 4, add additional metadata associated with the rule.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "../fundamentals/annotation-label/_index.md" >}}).
1. In Step 3, add the rule name, namespace, rule group, as well as additional metadata associated with the rule.
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
- From the **Namespace** drop-down, select an existing rule namespace. Otherwise, click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose. For more information, see [Grafana Mimir or Loki rule groups and namespaces]({{< relref "edit-mimir-loki-namespace-group/" >}}).
- From the **Group** drop-down, select an existing group within the selected namespace. Otherwise, click **Add new** and enter a name to create a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "../fundamentals/annotation-label/" >}}).
- Add Runbook URL, panel, dashboard, and alert IDs.
- Add custom labels.
1. To evaluate the rule and see what alerts it would produce, click **Preview alerts**. It will display a list of alerts with state and value of for each one.
1. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.
1. Next, create a [notification]({{< relref "../notifications/" >}}) for the rule.

View File

@@ -1,10 +1,20 @@
+++
aliases = ["/docs/grafana/latest/alerting/alerting-rules/edit-mimir-loki-namespace-group/", "/docs/grafana/latest/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group/", "/docs/grafana/latest/alerting/unified-alerting/alerting-rules/edit-mimir-loki-namespace-group/"]
description = "Edit Grafana Mimir or Loki rule groups and namespaces"
keywords = ["grafana", "alerting", "guide", "group", "namespace", "grafana mimir", "loki"]
title = "Grafana Mimir or Loki rule groups and namespaces"
weight = 405
+++
---
aliases:
- /docs/grafana/latest/alerting/alerting-rules/edit-mimir-loki-namespace-group/
- /docs/grafana/latest/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group/
- /docs/grafana/latest/alerting/unified-alerting/alerting-rules/edit-mimir-loki-namespace-group/
description: Edit Grafana Mimir or Loki rule groups and namespaces
keywords:
- grafana
- alerting
- guide
- group
- namespace
- grafana mimir
- loki
title: Grafana Mimir or Loki rule groups and namespaces
weight: 405
---
# Grafana Mimir or Loki rule groups and namespaces

View File

@@ -1,10 +1,17 @@
+++
aliases = ["/docs/grafana/latest/alerting/alerting-rules/rule-list/", "/docs/grafana/latest/alerting/unified-alerting/alerting-rules/rule-list/"]
description = "Manage alerting rules"
keywords = ["grafana", "alerting", "guide", "rules", "view"]
title = "Manage alerting rules"
weight = 402
+++
---
aliases:
- /docs/grafana/latest/alerting/alerting-rules/rule-list/
- /docs/grafana/latest/alerting/unified-alerting/alerting-rules/rule-list/
description: Manage alerting rules
keywords:
- grafana
- alerting
- guide
- rules
- view
title: Manage alerting rules
weight: 402
---
# Manage alerting rules
@@ -55,5 +62,5 @@ Grafana managed alerting rules can only be edited or deleted by users with Edit
To edit or delete a rule:
1. Expand a rule row until you can see the rule controls of **View**, **Edit**, and **Delete**.
1. Click **Edit** to open the create rule page. Make updates following instructions in [Create a Grafana managed alerting rule]({{< relref "./create-grafana-managed-rule.md" >}}) or [Create a Grafana Mimir or Loki managed alerting rule]({{< relref "./create-mimir-loki-managed-rule.md" >}}).
1. Click **Edit** to open the create rule page. Make updates following instructions in [Create a Grafana managed alerting rule]({{< relref "create-grafana-managed-rule/" >}}) or [Create a Grafana Mimir or Loki managed alerting rule]({{< relref "create-mimir-loki-managed-rule/" >}}).
1. Click **Delete** to delete a rule.

View File

@@ -1,210 +1,30 @@
+++
aliases = ["/docs/grafana/latest/alerting/contact-points/", "/docs/grafana/latest/alerting/unified-alerting/contact-points/"]
description = "Create or edit contact point"
keywords = ["grafana", "alerting", "guide", "contact point", "notification channel", "create"]
title = "Contact points"
weight = 430
+++
---
aliases:
- /docs/grafana/latest/alerting/contact-points/
- /docs/grafana/latest/alerting/unified-alerting/contact-points/
description: Create or edit contact point
keywords:
- grafana
- alerting
- guide
- contact point
- notification channel
- create
title: Contact points
weight: 430
---
# Contact points
Use contact points to define how your contacts are notified when an alert fires. A contact point can have one or more contact point types, for example, email, slack, webhook, and so on. When an alert fires, a notification is sent to all contact point types listed for a contact point. Optionally, use [message templates]({{< relref "./message-templating/_index.md" >}}) to customize notification messages for the contact point types.
Use contact points to define how your contacts are notified when an alert fires. A contact point can have one or more contact point types, for example, email, slack, webhook, and so on. When an alert fires, a notification is sent to all contact point types listed for a contact point. Optionally, use [message templates]({{< relref "message-templating/" >}}) to customize notification messages for the contact point types.
You can configure Grafana managed contact points as well as contact points for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}). For more information, see [Alertmanager]({{< relref "../fundamentals/alertmanager.md" >}}).
You can configure Grafana managed contact points as well as contact points for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager/" >}}). For more information, see [Alertmanager]({{< relref "../fundamentals/alertmanager/" >}}).
## Add a contact point
Before you begin, see [About Grafana Alerting]({{< relref "../about-alerting/" >}}) which explains the various components of Grafana Alerting. We also recommend that you familiarize yourself with some of the [fundamental concepts]({{< relref "../fundamentals/" >}}) of Grafana Alerting.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **Contact points** to open the page listing existing contact points.
1. Click **New contact point**.
1. From the **Alertmanager** dropdown, select an Alertmanager. By default, Grafana Alertmanager is selected.
1. In **Name**, enter a descriptive name for the contact point.
1. From **Contact point type**, select a type and fill out mandatory fields. For example, if you choose email, enter the email addresses. Or if you choose Slack, enter the Slack channel(s) and users who should be contacted.
1. Some contact point types, like email or webhook, have optional settings. In **Optional settings**, specify additional settings for the selected contact point type.
1. In Notification settings, optionally select **Disable resolved message** if you do not want to be notified when an alert resolves.
1. To add another contact point type, click **New contact point type** and repeat steps 6 through 8.
1. Click **Save contact point** to save your changes.
## Edit a contact point
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. Find the contact point to edit, then click **Edit** (pen icon).
1. Make any changes and click **Save contact point**.
## Test a contact point
For Grafana managed contact points, you can send a test notification which helps verify a contact point is configured correctly.
To send a test notification:
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact** points.
1. Find the contact point to test, then click **Edit** (pen icon). You can also create a new contact point if needed.
1. Click **Test** (paper airplane icon) to open the contact point testing modal.
1. Choose whether to send a predefined test notification or choose custom to add your own custom annotations and labels to include in the notification.
1. Click **Send test notification** to fire the alert.
## Delete a contact point
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. Find the contact point to delete, then click **Delete** (trash icon).
1. In the confirmation dialog, click **Yes, delete**.
> **Note:** You cannot delete contact points that are in use by a notification policy. You will have to either delete the [notification policy]({{< relref "../notifications/_index.md" >}}) or update it to use another contact point.
## Edit Alertmanager global config
To edit global configuration options for an external Alertmanager, like SMTP server, that is used by default for all email contact types:
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. From the **Alertmanager** drop-down, select an external Alertmanager data source.
1. Click the **Edit global config** option.
1. Add global configuration settings.
1. Click **Save global config** to save your changes.
> **Note** This option is available only for external Alertmanagers. You can configure some global options for Grafana contact types, like email settings, via [Grafana configuration]({{< relref "../../administration/configuration.md" >}}).
## List of notifiers supported by Grafana
| Name | Type | Grafana Alertmanager | Other Alertmanagers |
| --------------------------------------------- | ------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------- |
| [DingDing](#dingdingdingtalk) | `dingding` | Supported | N/A |
| [Discord](#discord) | `discord` | Supported | N/A |
| [Email](#email) | `email` | Supported | Supported |
| [Google Hangouts Chat](#google-hangouts-chat) | `googlechat` | Supported | N/A |
| [Kafka](#kafka) | `kafka` | Supported | N/A |
| Line | `line` | Supported | N/A |
| Microsoft Teams | `teams` | Supported | N/A |
| [Opsgenie](#opsgenie) | `opsgenie` | Supported | Supported |
| [Pagerduty](#pagerduty) | `pagerduty` | Supported | Supported |
| Prometheus Alertmanager | `prometheus-alertmanager` | Supported | N/A |
| [Pushover](#pushover) | `pushover` | Supported | Supported |
| Sensu | `sensu` | Supported | N/A |
| [Sensu Go](#sensu-go) | `sensugo` | Supported | N/A |
| [Slack](#slack) | `slack` | Supported | Supported |
| Telegram | `telegram` | Supported | N/A |
| Threema | `threema` | Supported | N/A |
| VictorOps | `victorops` | Supported | Supported |
| [Webhook](#webhook) | `webhook` | Supported | Supported ([different format](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config)) |
| [WeCom](#wecom) | `wecom` | Supported | N/A |
| [Zenduty](#zenduty) | `webhook` | Supported | N/A |
### Webhook
Example JSON body:
```json
{
"receiver": "My Super Webhook",
"status": "firing",
"orgId": 1,
"alerts": [
{
"status": "firing",
"labels": {
"alertname": "High memory usage",
"team": "blue",
"zone": "us-1"
},
"annotations": {
"description": "The system has high memory usage",
"runbook_url": "https://myrunbook.com/runbook/1234",
"summary": "This alert was triggered for zone us-1"
},
"startsAt": "2021-10-12T09:51:03.157076+02:00",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "https://play.grafana.org/alerting/1afz29v7z/edit",
"fingerprint": "c6eadffa33fcdf37",
"silenceURL": "https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT2%2Cteam%3Dblue%2Czone%3Dus-1",
"dashboardURL": "",
"panelURL": "",
"valueString": "[ metric='' labels={} value=14151.331895396988 ]"
},
{
"status": "firing",
"labels": {
"alertname": "High CPU usage",
"team": "blue",
"zone": "eu-1"
},
"annotations": {
"description": "The system has high CPU usage",
"runbook_url": "https://myrunbook.com/runbook/1234",
"summary": "This alert was triggered for zone eu-1"
},
"startsAt": "2021-10-12T09:56:03.157076+02:00",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "https://play.grafana.org/alerting/d1rdpdv7k/edit",
"fingerprint": "bc97ff14869b13e3",
"silenceURL": "https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT1%2Cteam%3Dblue%2Czone%3Deu-1",
"dashboardURL": "",
"panelURL": "",
"valueString": "[ metric='' labels={} value=47043.702386305304 ]"
}
],
"groupLabels": {},
"commonLabels": {
"team": "blue"
},
"commonAnnotations": {},
"externalURL": "https://play.grafana.org/",
"version": "1",
"groupKey": "{}:{}",
"truncatedAlerts": 0,
"title": "[FIRING:2] (blue)",
"state": "alerting",
"message": "**Firing**\n\nLabels:\n - alertname = T2\n - team = blue\n - zone = us-1\nAnnotations:\n - description = This is the alert rule checking the second system\n - runbook_url = https://myrunbook.com\n - summary = This is my summary\nSource: https://play.grafana.org/alerting/1afz29v7z/edit\nSilence: https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT2%2Cteam%3Dblue%2Czone%3Dus-1\n\nLabels:\n - alertname = T1\n - team = blue\n - zone = eu-1\nAnnotations:\nSource: https://play.grafana.org/alerting/d1rdpdv7k/edit\nSilence: https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT1%2Cteam%3Dblue%2Czone%3Deu-1\n"
}
```
### Webhook fields
#### Body
| Key | Type | Description |
| ----------------- | ------------------------- | ------------------------------------------------------------------------------- |
| receiver | string | Name of the webhook |
| status | string | Current status of the alert, `firing` or `resolved` |
| orgId | number | ID of the organization related to the payload |
| alerts | array of [alerts](#alert) | Alerts that are triggering |
| groupLabels | object | Labels that are used for grouping, map of string keys to string values |
| commonLabels | object | Labels that all alarms have in common, map of string keys to string values |
| commonAnnotations | object | Annotations that all alarms have in common, map of string keys to string values |
| externalURL | string | External URL to the Grafana instance sending this webhook |
| version | string | Version of the payload |
| groupKey | string | Key that is used for grouping |
| truncatedAlerts | number | Number of alerts that were truncated |
| title | string | **Will be deprecated soon** |
| state | string | **Will be deprecated soon** |
| message | string | **Will be deprecated soon** |
#### Alert
| Key | Type | Description |
| ------------ | ------ | ---------------------------------------------------------------------------------- |
| status | string | Current status of the alert, `firing` or `resolved` |
| labels | object | Labels that are part of this alert, map of string keys to string values |
| annotations | object | Annotations that are part of this alert, map of string keys to string values |
| startsAt | string | Start time of the alert |
| endsAt | string | End time of the alert, default value when not resolved is `0001-01-01T00:00:00Z` |
| valueString | string | Values that triggered the current status |
| generatorURL | string | URL of the alert rule in the Grafana UI |
| fingerprint | string | The labels fingerprint, alarms with the same labels will have the same fingerprint |
| silenceURL | string | URL to silence the alert rule in the Grafana UI |
| dashboardURL | string | **Will be deprecated soon** |
| panelURL | string | **Will be deprecated soon** |
#### Removed fields related to dashboards
Alerts are not coupled to dashboards anymore therefore the fields related to dashboards `dashboardId` and `panelId` have been removed.
### WeCom
WeCom contact points need a Webhook URL. These are obtained by setting up a WeCom robot on the corresponding group chat. To obtain a Webhook URL using the WeCom desktop Client please follow these steps:
1. Click the "..." in the top right corner of a group chat that you want your alerts to be delivered to
2. Click "Add Group Robot", select "New Robot" and give your robot a name. Click "Add Robot"
3. There should be a Webhook URL in the panel.
| Setting | Description |
| ------- | ------------------ |
| Url | WeCom webhook URL. |
- [Create contact point]({{< relref "create-contact-point/" >}})
- [Edit contact point]({{< relref "edit-contact-point/" >}})
- [Test contact point]({{< relref "test-contact-point/" >}})
- [Delete contact point]({{< relref "delete-contact-point/" >}})
- [List of notifiers]({{< relref "notifiers/" >}})
- [Message templating]({{< relref "message-templating/" >}})

View File

@@ -0,0 +1,32 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/create-contact-point/
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Add contact point
weight: 100
---
# Add a contact point
Use contact points to define how your contacts are notified when an alert fires.
To add a contact point
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **Contact points** to open the page listing existing contact points.
1. Click **New contact point**.
1. From the **Alertmanager** dropdown, select an Alertmanager. By default, Grafana Alertmanager is selected.
1. In **Name**, enter a descriptive name for the contact point.
1. From **Contact point type**, select a type and fill out mandatory fields. For example, if you choose email, enter the email addresses. Or if you choose Slack, enter the Slack channel(s) and users who should be contacted.
1. Some contact point types, like email or webhook, have optional settings. In **Optional settings**, specify additional settings for the selected contact point type.
1. In Notification settings, optionally select **Disable resolved message** if you do not want to be notified when an alert resolves.
1. To add another contact point type, click **New contact point type** and repeat steps 6 through 8.
1. Click **Save contact point** to save your changes.

View File

@@ -0,0 +1,27 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/delete-contact-point/
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Delete a contact point
weight: 115
---
## Delete a contact point
For Grafana managed contact points, you can send a test notification which helps verify a contact point is configured correctly.
To delete a contact point
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. Find the contact point to delete, then click **Delete** (trash icon).
1. In the confirmation dialog, click **Yes, delete**.
> **Note:** You cannot delete contact points that are in use by a notification policy. You will have to either delete the [notification policy]({{< relref "../notifications/" >}}) or update it to use another contact point.

View File

@@ -0,0 +1,27 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/edit-alertmanager-config/
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Edit contact point
weight: 120
---
# Edit Alertmanager global config
To edit global configuration options for an external Alertmanager, like SMTP server, that is used by default for all email contact types:
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. From the **Alertmanager** drop-down, select an external Alertmanager data source.
1. Click the **Edit global config** option.
1. Add global configuration settings.
1. Click **Save global config** to save your changes.
> **Note** This option is available only for external Alertmanagers. You can configure some global options for Grafana contact types, like email settings, via [Grafana configuration]({{< relref "../../setup-grafana/configure-grafana/" >}})

View File

@@ -0,0 +1,25 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/edit-contact-point/
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Edit contact point
weight: 105
---
# Edit a contact point
Use contact points to define how your contacts are notified when an alert fires.
To edit a contact point
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. Find the contact point to edit, then click **Edit** (pen icon).
1. Make any changes and click **Save contact point**.

View File

@@ -1,56 +1,34 @@
+++
aliases = ["/docs/grafana/latest/alerting/message-templating/", "/docs/grafana/latest/alerting/unified-alerting/message-templating/"]
description = "Message templating"
keywords = ["grafana", "alerting", "guide", "contact point", "templating"]
title = "Message templating"
weight = 400
+++
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
description: Message templating
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Message templating
weight: 400
---
# Message templating
Notifications sent via [contact points]({{< relref "../../contact-points/_index.md" >}}) are built using messaging templates. Grafana's default templates are based on the [Go templating system](https://golang.org/pkg/text/template) where some fields are evaluated as text, while others are evaluated as HTML (which can affect escaping). The default template, defined in [default_template.go](https://github.com/grafana/grafana/blob/main/pkg/services/ngalert/notifier/channels/default_template.go), is a useful reference for custom templates.
Notifications sent via [contact points]({{< relref "../" >}}) are built using messaging templates. Grafana's default templates are based on the [Go templating system](https://golang.org/pkg/text/template) where some fields are evaluated as text, while others are evaluated as HTML (which can affect escaping). The default template, defined in [default_template.go](https://github.com/grafana/grafana/blob/main/pkg/services/ngalert/notifier/channels/default_template.go), is a useful reference for custom templates.
Since most of the contact point fields can be templated, you can create reusable custom templates and use them in multiple contact points. The [template data]({{< relref "./template-data.md" >}}) topic lists variables that are available for templating. The default template is defined in [default_template.go](https://github.com/grafana/grafana/blob/main/pkg/services/ngalert/notifier/channels/default_template.go) which can serve as a useful reference or starting point for custom templates.
Since most of the contact point fields can be templated, you can create reusable custom templates and use them in multiple contact points. The [template data]({{< relref "template-data/" >}}) topic lists variables that are available for templating. The default template is defined in [default_template.go](https://github.com/grafana/grafana/blob/main/pkg/services/ngalert/notifier/channels/default_template.go) which can serve as a useful reference or starting point for custom templates.
### Using templates
The following example shows how to use default templates to render an alert message in Slack. The message title contains a count of alerts that are firing or were resolved. The message body lists the alerts and their status.
<img src="/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png" width="450px">
{{< figure src="/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png" class="docs-image--no-shadow" max-width= "550px" caption="Default template" >}}
The following example shows the use of a custom template within one of the contact point fields.
<img src="/static/img/docs/alerting/unified/contact-points-use-template-8-0.png" width="400px">
### Create a message template
> **Note:** Before Grafana v8.2, the configuration of the embedded Alertmanager was shared across organisations. Users of Grafana 8.0 and 8.1 are advised to use the new Grafana 8 alerts only if they have one organisation. Otherwise, silences for the Grafana managed alerts will be visible by all organizations.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. From Alertmanager drop-down, select an external Alertmanager to create and manage templates for the external data source. Otherwise, keep the default option of Grafana.
{{< figure max-width="250px" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" caption="Select Alertmanager" >}}
1. Click **Add template**.
1. In **Name**, add a descriptive name.
1. In **Content**, add the content of the template.
1. Click **Save template** button at the bottom of the page.
<img src="/static/img/docs/alerting/unified/templates-create-8-0.png" width="600px">
The `define` tag in the Content section assigns the template name. This tag is optional, and when omitted, the template name is derived from the **Name** field. When both are specified, it is a best practice to ensure that they are the same.
### Edit a message template
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. In the Template table, find the template you want to edit, then click the **Edit** (pen icon).
1. Make your changes, then click **Save template**.
### Delete a message template
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. In the Template table, find the template you want to delete, then click the **Delete** (trash icon).
1. In the confirmation dialog, click **Yes, delete** to delete the template.
Use caution when deleting a template since Grafana does not prevent you from deleting templates that are in use.
{{< figure src="/static/img/docs/alerting/unified/contact-points-use-template-8-0.png" class="docs-image--no-shadow" max-width= "550px" caption="Default template" >}}
### Nested templates
@@ -79,59 +57,6 @@ You can use any of the following built-in template options to embed custom templ
| `default.message` | Provides a formatted summary of firing and resolved alerts. |
| `teams.default.message` | Similar to `default.messsage`, formatted for Microsoft Teams. |
### Example of a custom template
Here's an example of how to use a custom template. You can also use the default template included in the setup.
Step 1: Configure a template to render a single alert.
```
{{ define "myalert" }}
[{{.Status}}] {{ .Labels.alertname }}
Labels:
{{ range .Labels.SortedPairs }}
{{ .Name }}: {{ .Value }}
{{ end }}
{{ if gt (len .Annotations) 0 }}
Annotations:
{{ range .Annotations.SortedPairs }}
{{ .Name }}: {{ .Value }}
{{ end }}
{{ end }}
{{ if gt (len .SilenceURL ) 0 }}
Silence alert: {{ .SilenceURL }}
{{ end }}
{{ if gt (len .DashboardURL ) 0 }}
Go to dashboard: {{ .DashboardURL }}
{{ end }}
{{ end }}
```
Step 2: Configure a template to render entire notification message.
```
{{ define "mymessage" }}
{{ if gt (len .Alerts.Firing) 0 }}
{{ len .Alerts.Firing }} firing:
{{ range .Alerts.Firing }} {{ template "myalert" .}} {{ end }}
{{ end }}
{{ if gt (len .Alerts.Resolved) 0 }}
{{ len .Alerts.Resolved }} resolved:
{{ range .Alerts.Resolved }} {{ template "myalert" .}} {{ end }}
{{ end }}
{{ end }}
```
Step 3: Add `mymessage` in the notification message field.
```
Alert summary:
{{ template "mymessage" . }}
```
### HTML in message templates
HTML in alerting message templates is escaped. We do not support rendering of HTML in the resulting notification.

View File

@@ -0,0 +1,33 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/contact-points/message-templating/create-message-template/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Create message template
weight: 100
---
# Create a message template
You can use message templates to customize notification messages for the contact point types.
To create a message tempplate:
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
2. In the Alerting page, click **Contact points** to open the page listing existing contact points.
3. From Alertmanager drop-down, select an external Alertmanager to create and manage templates for the external data source. Otherwise, keep the default option of Grafana.
{{< figure max-width="250px" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" caption="Select Alertmanager" >}}
4. Click **Add template**.
5. In **Name**, add a descriptive name.
6. In **Content**, add the content of the template.
7. Click **Save template** button at the bottom of the page.
<img src="/static/img/docs/alerting/unified/templates-create-8-0.png" width="600px">
The `define` tag in the Content section assigns the template name. This tag is optional, and when omitted, the template name is derived from the **Name** field. When both are specified, it is a best practice to ensure that they are the same.

View File

@@ -0,0 +1,25 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/contact-points/message-templating/delete-message-template/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Delete message template
weight: 110
---
# Edit a message template
Message templates customize notification messages for the contact point types.
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. In the Template table, find the template you want to delete, then click the **Delete** (trash icon).
1. In the confirmation dialog, click **Yes, delete** to delete the template.
Use caution when deleting a template since Grafana does not prevent you from deleting templates that are in use.

View File

@@ -0,0 +1,25 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/contact-points/message-templating/edit-message-template/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Edit message template
weight: 100
---
# Edit a message template
Message templates customize notification messages for the contact point types.
To edit a message template
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. In the Template table, find the template you want to edit, then click the **Edit** (pen icon).
1. Make your changes, then click **Save template**.

View File

@@ -0,0 +1,127 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/example-template-functions/
- /docs/grafana/latest/alerting/contact-points/message-templating/template-functions/
- /docs/grafana/latest/alerting/message-templating/template-functions/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/template-functions/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Examples of template functions
weight: 130
---
# Examples of template functions
## humanize
**Template string** `{ humanize $value }`
**Input** `1234567.0`
**Expected** `1.235M`
## humanize1024
**TemplateString** `{ humanize1024 $value } `
**Input** `1048576.0`
**Expected** `1Mi`
## humanizeDuration
**TemplateString** `{ humanizeDuration $value }`
**Input** `899.99`
**Expected** `14m 59s`
### humanizePercentage
**TemplateString** `{ humanizePercentage $value }`
**Input** `0.1234567`
**Expected** `12.35%`
## humanizeTimestamp
**TemplateString** `{ $value | humanizeTimestamp }`
**Input** `1435065584.128`
**Expected** `2015-06-23 13:19:44.128 +0000 UTC`
## title
**TemplateString** `{ $value | title }`
**Input** `aa bb CC`
**Expected** `Aa Bb Cc`
### toUpper
**TemplateString** `{ $value | toUpper }`
**Input** `aa bb CC`
**Expected** `AA BB CC`
### toLower
**TemplateString** `{ $value | toLower }`
**Input** `aA bB CC`
**Expected** `aa bb cc`
## match
**TemplateString** `{ match "a+" $labels.instance }`
**Input** `aa`
**Expected** `true`
## reReplaceAll
**TemplateString** `{{ reReplaceAll "localhost:(.*)" "my.domain:$1" $labels.instance }}`
**Input** `localhost:3000`
**Expected** `my.domain:3000`
### graphLink
**TemplateString** `{{ graphLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}`
**Expected** `/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":false,"range":true}]`
### tableLink
**TemplateString** `{{ tableLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}`
**Expected** `/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":true,"range":false}]`
## args
**TemplateString** `{{define "x"}}{{.arg0}} {{.arg1}}{{end}}{{template "x" (args 1 "2")}}`
**Expected** `1 2`
## externalURL
**TemplateString** `{ externalURL }`
**Expected** `http://localhost/path/prefix`
## pathPrefix
**TemplateString** `{ pathPrefix }`
**Expected** `/path/prefix`

View File

@@ -0,0 +1,68 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/contact-points/message-templating/example-template/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Example message template
weight: 115
---
# Example of a custom template
Here's an example of how to use a custom template. You can also use the default template included in the setup.
Step 1: Configure a template to render a single alert.
```
{{ define "myalert" }}
[{{.Status}}] {{ .Labels.alertname }}
Labels:
{{ range .Labels.SortedPairs }}
{{ .Name }}: {{ .Value }}
{{ end }}
{{ if gt (len .Annotations) 0 }}
Annotations:
{{ range .Annotations.SortedPairs }}
{{ .Name }}: {{ .Value }}
{{ end }}
{{ end }}
{{ if gt (len .SilenceURL ) 0 }}
Silence alert: {{ .SilenceURL }}
{{ end }}
{{ if gt (len .DashboardURL ) 0 }}
Go to dashboard: {{ .DashboardURL }}
{{ end }}
{{ end }}
```
Step 2: Configure a template to render entire notification message.
```
{{ define "mymessage" }}
{{ if gt (len .Alerts.Firing) 0 }}
{{ len .Alerts.Firing }} firing:
{{ range .Alerts.Firing }} {{ template "myalert" .}} {{ end }}
{{ end }}
{{ if gt (len .Alerts.Resolved) 0 }}
{{ len .Alerts.Resolved }} resolved:
{{ range .Alerts.Resolved }} {{ template "myalert" .}} {{ end }}
{{ end }}
{{ end }}
```
Step 3: Add `mymessage` in the notification message field.
```
Alert summary:
{{ template "mymessage" . }}
```

View File

@@ -1,12 +1,21 @@
+++
aliases = ["/docs/grafana/latest/alerting/message-templating/template-data/", "/docs/grafana/latest/alerting/unified-alerting/message-templating/template-data/"]
keywords = ["grafana", "alerting", "guide", "contact point", "templating"]
title = "Template data"
+++
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/template-data/
- /docs/grafana/latest/alerting/message-templating/template-data/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/template-data/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Template data
weight: 120
---
# Template data
Template data is passed on to [message templates]({{< relref "./_index.md" >}}) as well as sent as payload to webhook pushes.
Template data is passed on to [message templates]({{< relref "_index.md" >}}) as well as sent as payload to webhook pushes.
| Name | Type | Notes |
| ----------------- | -------- | -------------------------------------------------------------------------------------------------------------------- |

View File

@@ -1,8 +1,17 @@
+++
aliases = ["/docs/grafana/latest/alerting/message-templating/template-functions/", "/docs/grafana/latest/alerting/unified-alerting/message-templating/template-functions/"]
keywords = ["grafana", "alerting", "guide", "contact point", "templating"]
title = "Template functions"
+++
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/template-functions/
- /docs/grafana/latest/alerting/message-templating/template-functions/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/template-functions/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Template functions
weight: 125
---
# Template Functions

View File

@@ -0,0 +1,42 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/contact-points/notifiers/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: List of notifiers
weight: 130
---
# List of supported notifiers
The following table lists the notifiers (contact point types) supported by Grafana.
| Name | Type | Grafana Alertmanager | Other Alertmanagers |
| --------------------------------------------- | ------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------- |
| [DingDing](#dingdingdingtalk) | `dingding` | Supported | N/A |
| [Discord](#discord) | `discord` | Supported | N/A |
| [Email](#email) | `email` | Supported | Supported |
| [Google Hangouts Chat](#google-hangouts-chat) | `googlechat` | Supported | N/A |
| [Kafka](#kafka) | `kafka` | Supported | N/A |
| Line | `line` | Supported | N/A |
| Microsoft Teams | `teams` | Supported | N/A |
| [Opsgenie](#opsgenie) | `opsgenie` | Supported | Supported |
| [Pagerduty](#pagerduty) | `pagerduty` | Supported | Supported |
| Prometheus Alertmanager | `prometheus-alertmanager` | Supported | N/A |
| [Pushover](#pushover) | `pushover` | Supported | Supported |
| Sensu | `sensu` | Supported | N/A |
| [Sensu Go](#sensu-go) | `sensugo` | Supported | N/A |
| [Slack](#slack) | `slack` | Supported | Supported |
| Telegram | `telegram` | Supported | N/A |
| Threema | `threema` | Supported | N/A |
| VictorOps | `victorops` | Supported | Supported |
| [Webhook](#webhook) | `webhook` | Supported | Supported ([different format](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config)) |
| [WeCom](#wecom) | `wecom` | Supported | N/A |
| [Zenduty](#zenduty) | `webhook` | Supported | N/A |

View File

@@ -0,0 +1,138 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/contact-points/notifiers/webhook-notifier/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Webhook notifier
weight: 105
---
### Webhook
This topic helps you configure the Webhook notifier. It also discusses that [WeCom]({{< relref "./webhook-notifier/#wecom" >}}) contact points need a Webhook URL.
Example JSON body:
```json
{
"receiver": "My Super Webhook",
"status": "firing",
"orgId": 1,
"alerts": [
{
"status": "firing",
"labels": {
"alertname": "High memory usage",
"team": "blue",
"zone": "us-1"
},
"annotations": {
"description": "The system has high memory usage",
"runbook_url": "https://myrunbook.com/runbook/1234",
"summary": "This alert was triggered for zone us-1"
},
"startsAt": "2021-10-12T09:51:03.157076+02:00",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "https://play.grafana.org/alerting/1afz29v7z/edit",
"fingerprint": "c6eadffa33fcdf37",
"silenceURL": "https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT2%2Cteam%3Dblue%2Czone%3Dus-1",
"dashboardURL": "",
"panelURL": "",
"valueString": "[ metric='' labels={} value=14151.331895396988 ]"
},
{
"status": "firing",
"labels": {
"alertname": "High CPU usage",
"team": "blue",
"zone": "eu-1"
},
"annotations": {
"description": "The system has high CPU usage",
"runbook_url": "https://myrunbook.com/runbook/1234",
"summary": "This alert was triggered for zone eu-1"
},
"startsAt": "2021-10-12T09:56:03.157076+02:00",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "https://play.grafana.org/alerting/d1rdpdv7k/edit",
"fingerprint": "bc97ff14869b13e3",
"silenceURL": "https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT1%2Cteam%3Dblue%2Czone%3Deu-1",
"dashboardURL": "",
"panelURL": "",
"valueString": "[ metric='' labels={} value=47043.702386305304 ]"
}
],
"groupLabels": {},
"commonLabels": {
"team": "blue"
},
"commonAnnotations": {},
"externalURL": "https://play.grafana.org/",
"version": "1",
"groupKey": "{}:{}",
"truncatedAlerts": 0,
"title": "[FIRING:2] (blue)",
"state": "alerting",
"message": "**Firing**\n\nLabels:\n - alertname = T2\n - team = blue\n - zone = us-1\nAnnotations:\n - description = This is the alert rule checking the second system\n - runbook_url = https://myrunbook.com\n - summary = This is my summary\nSource: https://play.grafana.org/alerting/1afz29v7z/edit\nSilence: https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT2%2Cteam%3Dblue%2Czone%3Dus-1\n\nLabels:\n - alertname = T1\n - team = blue\n - zone = eu-1\nAnnotations:\nSource: https://play.grafana.org/alerting/d1rdpdv7k/edit\nSilence: https://play.grafana.org/alerting/silence/new?alertmanager=grafana&matchers=alertname%3DT1%2Cteam%3Dblue%2Czone%3Deu-1\n"
}
```
### Webhook fields
## Body
| Key | Type | Description |
| ----------------- | ------------------------- | ------------------------------------------------------------------------------- |
| receiver | string | Name of the webhook |
| status | string | Current status of the alert, `firing` or `resolved` |
| orgId | number | ID of the organization related to the payload |
| alerts | array of [alerts](#alert) | Alerts that are triggering |
| groupLabels | object | Labels that are used for grouping, map of string keys to string values |
| commonLabels | object | Labels that all alarms have in common, map of string keys to string values |
| commonAnnotations | object | Annotations that all alarms have in common, map of string keys to string values |
| externalURL | string | External URL to the Grafana instance sending this webhook |
| version | string | Version of the payload |
| groupKey | string | Key that is used for grouping |
| truncatedAlerts | number | Number of alerts that were truncated |
| title | string | **Will be deprecated soon** |
| state | string | **Will be deprecated soon** |
| message | string | **Will be deprecated soon** |
### Alert
| Key | Type | Description |
| ------------ | ------ | ---------------------------------------------------------------------------------- |
| status | string | Current status of the alert, `firing` or `resolved` |
| labels | object | Labels that are part of this alert, map of string keys to string values |
| annotations | object | Annotations that are part of this alert, map of string keys to string values |
| startsAt | string | Start time of the alert |
| endsAt | string | End time of the alert, default value when not resolved is `0001-01-01T00:00:00Z` |
| valueString | string | Values that triggered the current status |
| generatorURL | string | URL of the alert rule in the Grafana UI |
| fingerprint | string | The labels fingerprint, alarms with the same labels will have the same fingerprint |
| silenceURL | string | URL to silence the alert rule in the Grafana UI |
| dashboardURL | string | **Will be deprecated soon** |
| panelURL | string | **Will be deprecated soon** |
### Removed fields related to dashboards
Alerts are not coupled to dashboards anymore therefore the fields related to dashboards `dashboardId` and `panelId` have been removed.
## WeCom
WeCom contact points need a Webhook URL. These are obtained by setting up a WeCom robot on the corresponding group chat. To obtain a Webhook URL using the WeCom desktop Client please follow these steps:
1. Click the "..." in the top right corner of a group chat that you want your alerts to be delivered to
2. Click "Add Group Robot", select "New Robot" and give your robot a name. Click "Add Robot"
3. There should be a Webhook URL in the panel.
| Setting | Description |
| ------- | ------------------ |
| Url | WeCom webhook URL. |

View File

@@ -0,0 +1,27 @@
---
aliases:
- /docs/grafana/latest/alerting/contact-points/message-templating/
- /docs/grafana/latest/alerting/contact-points/test-contact-point/
- /docs/grafana/latest/alerting/message-templating/
- /docs/grafana/latest/alerting/unified-alerting/message-templating/
keywords:
- grafana
- alerting
- guide
- contact point
- templating
title: Test a contact point
weight: 110
---
# Test a contact point
For Grafana managed contact points, you can send a test notification which helps verify a contact point is configured correctly.
To send a test notification:
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact** points.
1. Find the contact point to test, then click **Edit** (pen icon). You can also create a new contact point if needed.
1. Click **Test** (paper airplane icon) to open the contact point testing modal.
1. Choose whether to send a predefined test notification or choose custom to add your own custom annotations and labels to include in the notification.
1. Click **Send test notification** to fire the alert.

View File

@@ -1,15 +1,20 @@
+++
aliases = ["/docs/grafana/latest/alerting/difference-old-new/", "/docs/grafana/latest/alerting/unified-alerting/difference-old-new/"]
description = "What's New with Grafana alerts"
draft = true
keywords = ["grafana", "alerting", "guide"]
title = "What's new in Grafana alerting"
weight = 108
+++
---
aliases:
- /docs/grafana/latest/alerting/difference-old-new/
- /docs/grafana/latest/alerting/unified-alerting/difference-old-new/
description: What's New with Grafana alerts
draft: true
keywords:
- grafana
- alerting
- guide
title: What's new in Grafana Alerting
weight: 108
---
# What's new in Grafana alerting
# What's new in Grafana Alerting
Grafana alerting has several enhancements over legacy dashboard alerting.
Grafana Alerting has several enhancements over legacy dashboard alerting.
## Multi-dimensional alerting
@@ -23,7 +28,7 @@ Since unified alerts are no longer directly tied to panel queries, they do not i
## Create Loki and Grafana Mimir alerting rules
In Grafana alerting, you can manage Loki and Grafana Mimir alerting rules using the same UI and API as your Grafana managed alerts.
In Grafana Alerting, you can manage Loki and Grafana Mimir alerting rules using the same UI and API as your Grafana managed alerts.
## View and search for alerts from Prometheus compatible data sources
@@ -31,7 +36,7 @@ Alerts for Prometheus compatible data sources are now listed under the Grafana a
## Special alerts for alert state NoData and Error
Grafana alerting introduced a new concept of the alert states. When evaluation of an alerting rule produces state NoData or Error, Grafana alerting will generate special alerts that will have the following labels:
Grafana Alerting introduced a new concept of the alert states. When evaluation of an alerting rule produces state NoData or Error, Grafana Alerting will generate special alerts that will have the following labels:
- `alertname` with value DatasourceNoData or DatasourceError depending on the state.
- `rulename` name of the alert rule the special alert belongs to.

View File

@@ -1,14 +1,17 @@
+++
aliases = ["/docs/grafana/latest/alerting/fundamentals/", "/docs/grafana/latest/alerting/metrics/", "/docs/grafana/latest/alerting/unified-alerting/fundamentals/"]
title = "Alerting fundamentals"
weight = 110
+++
---
aliases:
- /docs/grafana/latest/alerting/fundamentals/
- /docs/grafana/latest/alerting/metrics/
- /docs/grafana/latest/alerting/unified-alerting/fundamentals/
title: Alerting fundamentals
weight: 110
---
# Alerting fundamentals
This section includes the following fundamental concepts of Grafana alerting:
This section includes the following fundamental concepts of Grafana Alerting:
- [Annotations and labels for alerting rules]({{< relref "./annotation-label/_index.md" >}})
- [Alertmanager]({{< relref "./alertmanager.md" >}})
- [State and health of alerting rules]({{< relref "./state-and-health.md" >}})
- [Evaluating Grafana managed alerts]({{< relref "./evaluate-grafana-alerts.md" >}})
- [Annotations and labels for alerting rules]({{< relref "annotation-label/" >}})
- [Alertmanager]({{< relref "alertmanager/" >}})
- [State and health of alerting rules]({{< relref "state-and-health/" >}})
- [Evaluating Grafana managed alerts]({{< relref "evaluate-grafana-alerts/" >}})

View File

@@ -0,0 +1,24 @@
---
aliases:
- /docs/grafana/latest/alerting/fundamentals/alert-rules/
description: About Grafana alert rules
keywords:
- grafana
- alerting
- rules
title: Alert rules
weight: 101
---
# About alert rules
An alerting rule is a set of evaluation criteria that determines whether an alert instance will fire. The rule consists of one or more queries and expressions, a condition, the frequency of evaluation, and optionally, the duration over which the condition is met.
While queries and expressions select the data set to evaluate, a condition sets the threshold that an alert must meet or exceed to create an alert.
An interval specifies how frequently an alerting rule is evaluated. Duration, when configured, indicates how long a condition must be met. The alert rules can also define alerting behavior in the absence of data.
- [Alert rule types]({{< relref "alert-rule-types/" >}})
- [Alert instances]({{< relref "alert-instances/" >}})
- [Organising alert rules]({{< relref "organising-alerts/" >}})
- [Annotation and labels]({{< relref "../annotation-label/" >}})

View File

@@ -0,0 +1,27 @@
---
aliases:
- /docs/grafana/latest/alerting/fundamentals/alert-rules/alert-instances/
description: Learn about Grafana alert instances
keywords:
- grafana
- alerting
- instances
title: Alert instances
weight: 103
---
# Alert instances
Grafana managed alerts support multi-dimensional alerting. Each alert rule can create multiple alert instances. This is exceptionally powerful if you are observing multiple series in a single expression.
Consider the following PromQL expression:
```promql
sum by(cpu) (
rate(node_cpu_seconds_total{mode!="idle"}[1m])
)
```
A rule using this expression will create as many alert instances as the amount of CPUs we are observing after the first evaluation, allowing a single rule to report the status of each CPU.
{{< figure src="/static/img/docs/alerting/unified/multi-dimensional-alert.png" caption="A multi-dimensional Grafana managed alert rule" >}}

View File

@@ -0,0 +1,35 @@
---
aliases:
- /docs/grafana/latest/alerting/fundamentals/alert-rules/alert-rule-types/
description: Learn about the different alert rule types
keywords:
- grafana
- alerting
- rule types
title: Alert rule types
weight: 102
---
# Alert rule types
Grafana supports several alert rule types, the following sections will explain their merits and demerits and help you choose the right alert type for your use case.
## Grafana managed rules
Grafana-managed rules are the most flexible alert rule type. They allow you to create alerts that can act on data from any of your existing data sources.
In additional to supporting any datasource you can also add additional [expressions]({{< relref "../../../panels/query-a-data-source/use-expressions-to-manipulate-data/" >}}) to transform your data and express alert conditions.
## Mimir, Loki and Cortex rules
To create Mimir, Loki or Cortex alerts you must have a compatible Prometheus data source. You can check if your data source is compatible by testing the data source and checking the details if the ruler API is supported.
{{< figure src="/static/img/docs/alerting/unified/mimir-datasource-check.png" caption="Successfully connected to a Mimir Prometheus datasource" max-width="40%" >}}
## Recording rules
Recording rules are only available for compatible Prometheus data sources like Mimir, Loki and Cortex.
A recording rule allows you to save an expression's result to a new set of time series. This is useful if you want to run alerts on aggregated data or if you have dashboards that query the same expression repeatedly.
Read more about [recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) in Prometheus.

View File

@@ -0,0 +1,27 @@
---
aliases:
- /docs/grafana/latest/alerting/fundamentals/alert-rules/organising-alerts/
description: Learn how to organize alert rules
keywords:
- grafana
- alerting
- organization
title: Organising alert rules
weight: 104
---
## Namespaces and groups
Alerts can be organized using Folders for Grafana-managed rules and namespaces for Mimir or Loki rules and group names.
### Namespaces
When creating Grafana-managed rules, the folder can be used to perform access control and grant or deny access to all rules within a specific folder.
### Groups
All rules within a group are evaluated at the same **interval**.
Alert rules and recording rules within a group will always be evaluated **sequentially**, meaning no rules will be evaluated at the same time and in order of appearance.
> **Note** If you want rules to be evaluated concurrently and with different intervals, consider storing them in different groups.

View File

@@ -1,8 +1,11 @@
+++
aliases = ["/docs/grafana/latest/alerting/fundamentals/alertmanager/", "/docs/grafana/latest/alerting/metrics/", "/docs/grafana/latest/alerting/unified-alerting/fundamentals/alertmanager/"]
title = "Alertmanager"
weight = 116
+++
---
aliases:
- /docs/grafana/latest/alerting/fundamentals/alertmanager/
- /docs/grafana/latest/alerting/metrics/
- /docs/grafana/latest/alerting/unified-alerting/fundamentals/alertmanager/
title: Alertmanager
weight: 116
---
# Alertmanager
@@ -12,7 +15,7 @@ Grafana includes built-in support for Prometheus Alertmanager. By default, notif
> **Note:** Before v8.2, the configuration of the embedded Alertmanager was shared across organizations. If you are on an older Grafana version, we recommend that you use Grafana alerts only if you have one organization. Otherwise, your contact points are visible to all organizations.
Grafana alerting added support for external Alertmanager configuration. When you add an [Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}), the Alertmanager drop-down shows a list of available external Alertmanager data sources. Select a data source to create and manage alerting for standalone Grafana Mimir or Loki data sources.
Grafana Alerting added support for external Alertmanager configuration. When you add an [Alertmanager data source]({{< relref "../../datasources/alertmanager/" >}}), the Alertmanager drop-down shows a list of available external Alertmanager data sources. Select a data source to create and manage alerting for standalone Grafana Mimir or Loki data sources.
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" max-width="250px" caption="Select Alertmanager" >}}

View File

@@ -1,14 +1,22 @@
+++
aliases = ["/docs/grafana/latest/alerting/alerting-rules/alert-annotation-label/", "/docs/grafana/latest/alerting/unified-alerting/alerting-rules/alert-annotation-label/"]
description = "Annotations and labels for alerting"
keywords = ["grafana", "alerting", "guide", "rules", "create"]
title = "Annotations and labels for alerting rules"
weight = 401
+++
---
aliases:
- /docs/grafana/latest/alerting/alerting-rules/alert-annotation-label/
- /docs/grafana/latest/alerting/fundamentals/annotation-label/
- /docs/grafana/latest/alerting/unified-alerting/alerting-rules/alert-annotation-label/
description: Annotations and labels for alerting
keywords:
- grafana
- alerting
- guide
- rules
- create
title: Annotations and labels for alerting rules
weight: 401
---
# Annotations and labels for alerting rules
Annotations and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in [templates]({{< relref "../../contact-points/message-templating/_index.md" >}}) and [template functions]({{< relref "../../contact-points/message-templating/template-functions" >}}) to create notification contact dynamically.
Annotations and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in [templates]({{< relref "../../contact-points/message-templating/" >}}) and [template functions]({{< relref "../../contact-points/message-templating/template-functions/" >}}) to create notification contact dynamically.
## Annotations
@@ -20,6 +28,6 @@ Labels are key-value pairs that contain information about, and are used to uniqu
Before you begin using annotations and labels, familiarize yourself with:
- [Labels in Grafana alerting]({{< relref "./how-to-use-labels.md" >}})
- [How label matching works]({{< relref "./how-to-use-labels.md" >}})
- [Template variables for alerting rule labels and annotations]({{< relref "./variables-label-annotation.md" >}})
- [Labels in Grafana Alerting]({{< relref "how-to-use-labels/" >}})
- [How label matching works]({{< relref "how-to-use-labels/" >}})
- [Template variables for alerting rule labels and annotations]({{< relref "variables-label-annotation/" >}})

View File

@@ -1,18 +1,24 @@
+++
title = "Labels in Grafana alerting"
description = "Learn about labels and label matchers in alerting"
keywords = ["grafana", "alerting", "guide", "fundamentals"]
weight = 117
+++
---
aliases:
- /docs/grafana/latest/alerting/fundamentals/annotation-label/how-to-use-labels/
description: Learn about labels and label matchers in alerting
keywords:
- grafana
- alerting
- guide
- fundamentals
title: Labels in Grafana Alerting
weight: 117
---
# Labels in Grafana alerting
# Labels in Grafana Alerting
This topic explains why labels are a fundamental component of alerting.
- The complete set of labels for an alert is what uniquely identifies an alert within Grafana alerts.
- The Alertmanager uses labels to match alerts for [silences]({{< relref "../../silences/_index.md" >}}) and [alert groups]({{< relref "../../alert-groups/_index.md" >}}) in [notification policies]({{< relref "../../notifications/_index.md" >}}).
- The Alertmanager uses labels to match alerts for [silences]({{< relref "../../silences/" >}}) and [alert groups]({{< relref "../../alert-groups/" >}}) in [notification policies]({{< relref "../../notifications/" >}}).
- The alerting UI shows labels for every alert instance generated during evaluation of that rule.
- Contact points can access labels to dynamically generate notifications that contain information specific to the alert that is resulting in a notification.
- Labels can be added to an [alerting rule]({{< relref "../../alerting-rules/_index.md" >}}). These manually configured labels are able to use template functions and reference other labels. Labels added to an alerting rule take precedence in the event of a collision between labels.
- Labels can be added to an [alerting rule]({{< relref "../../alerting-rules/" >}}). These manually configured labels are able to use template functions and reference other labels. Labels added to an alerting rule take precedence in the event of a collision between labels.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-details-8-0.png" max-width="550px" caption="Alert details" >}}

View File

@@ -1,13 +1,19 @@
+++
title = "Label matchers"
description = "Learn about labels and label matchers in alerting"
keywords = ["grafana", "alerting", "guide", "fundamentals"]
weight = 117
+++
---
aliases:
- /docs/grafana/latest/alerting/fundamentals/annotation-label/labels-and-label-matchers/
description: Learn about labels and label matchers in alerting
keywords:
- grafana
- alerting
- guide
- fundamentals
title: Label matchers
weight: 117
---
# How label matching works
Use labels and label matchers to link alert rules to [notification policies]({{< relref "../../notifications/_index.md" >}}) and [silences]({{< relref "../../silences/_index.md" >}}). This allows for a very flexible way to manage your alert instances, specify which policy should handle them, and which alerts to silence.
Use labels and label matchers to link alert rules to [notification policies]({{< relref "../../notifications/" >}}) and [silences]({{< relref "../../silences/" >}}). This allows for a very flexible way to manage your alert instances, specify which policy should handle them, and which alerts to silence.
A label matchers consists of 3 distinct parts, the **label**, the **value** and the **operator**.

View File

@@ -1,16 +1,22 @@
+++
title = "Template variables for alerting rule labels and annotations"
description = "Learn about labels and label matchers in alerting"
keywords = ["grafana", "alerting", "guide", "fundamentals"]
weight = 117
+++
---
aliases:
- /docs/grafana/latest/alerting/fundamentals/annotation-label/variables-label-annotation/
description: Learn about labels and label matchers in alerting
keywords:
- grafana
- alerting
- guide
- fundamentals
title: Template variables for alerting rule labels and annotations
weight: 117
---
# Template variables for alerting rule labels and annotations
The following template variables are available when expanding annotations and labels.
| Name | Description |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. This is unavailable when the rule uses a [classic condition]({{< relref "../../alerting-rules/create-grafana-managed-rule/#single-and-multi-dimensional-rule" >}}). |
| $values | The values of all reduce and math expressions that were evaluated for this alert rule. For example, `{{ $values.A }}`, `{{ $values.A.Labels }}` and `{{ $values.A.Value }}` where `A` is the `refID` of the expression. If the rule uses classic conditions, then a combination of the `refID` and position of the condition is used. For example, `{{ $values.A0.Value }}` or `{{ $values.A1.Value }}` |
| $value | The value string of the alert instance. For example, `[ var='A' labels={instance=foo} value=10 ]`. |
| Name | Description |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. This is unavailable when the rule uses a [classic condition]({{< relref "../../alerting-rules/create-grafana-managed-rule/#single-and-multi-dimensional-rule" >}}). |
| $values | The values of all reduce and math expressions that were evaluated for this alert rule. For example, `{{ $values.A }}`, `{{ $values.A.Labels }}` and `{{ $values.A.Value }}` where `A` is the `refID` of the expression. If the rule uses classic conditions, then a combination of the `refID` and position of the condition is used. For example, `{{ $values.A0.Value }}` or `{{ $values.A1.Value }}`. If a value can return no data then it is recommended to use either `{{ $values.A }}` where the missing value will show `<no value>` or an if statement to check if `A` exists when using `{{ $values.A.Labels }}` and `{{ $values.A.Value }}`. For example, `{{ if $values.A }}{{ $values.A.Value }}{{ end }}`. |
| $value | The value string of the alert instance. For example, `[ var='A' labels={instance=foo} value=10 ]`. |

Some files were not shown because too many files have changed in this diff Show More