Compare commits

...

250 Commits

Author SHA1 Message Date
Dimitris Sotirakis
78a3e64e4f CI: Add CreateTempDir func and use it in publish packages logic (#57171)
* Add CreateTempDir func and use it in publish packages logic

* Fill err return in defer func

(cherry picked from commit e829b50149)
2022-10-25 13:10:01 +02:00
Grot (@grafanabot)
68c8987152 TablePanel: Fix updating footer values on data change (#57518) (#57581)
* TablePanel: Fix updating footer values on data change

* tests

(cherry picked from commit c30716a073)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-25 02:56:58 -04:00
Grot (@grafanabot)
7832a7579f Storage: Fix initialization on windows (#57504) (#57577)
(cherry picked from commit 749b3b6263)

Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
2022-10-24 21:45:55 -04:00
Grot (@grafanabot)
92fa1aba00 Canvas: Improve resource picker initialization (#57319) (#57566)
(cherry picked from commit 9d857f4d61)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-10-24 16:52:40 -04:00
Grot (@grafanabot)
8ea7a8cff3 Docs: Database encryption corrections (#57503) (#57559)
* Docs: Database encryption corrections

* Fix relref links

* Additional corrections

(cherry picked from commit 5d18b41857)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-10-24 13:07:20 -07:00
Adela Almasan
13e306bbfb Canvas: Button element (alpha) (#57491) (#57557)
(cherry picked from commit 73c215ae41)
2022-10-24 14:00:38 -04:00
Erik Sundell
e69568fec8 fix merge conflict (#57546)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-10-24 19:53:13 +02:00
Grot (@grafanabot)
509cb77bca RBAC: Allow access to /dashboards when user has dashboards create (#56712) (#57153)
* RBAC: Allow access to dashboards when user has dashboards create

* Remove eval any that I didn't add on purpose

(cherry picked from commit 3963ed3754)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-24 15:57:55 +02:00
Grot (@grafanabot)
1573285f21 NodeGraph: Fix rendering issues when values of arc are over 1 (#57460) (#57513)
(cherry picked from commit 67aa99af78)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2022-10-24 14:59:20 +02:00
Grot (@grafanabot)
06780e2c41 Clarify notification policies. (#57465) (#57507) 2022-10-24 11:47:24 +02:00
Grot (@grafanabot)
201c7e123d Fix broken image links (#57480) (#57487)
(cherry picked from commit 4053cbea38)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2022-10-22 11:49:28 -07:00
Grot (@grafanabot)
c4233171f2 TimeSeries: fix negative stacked percent y-axis range (#57470) (#57478)
(cherry picked from commit 45707ccf99)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-21 16:41:45 -06:00
Grot (@grafanabot)
a318b15cab TimeSeries: Fix stacking when first value is negative zero (#57257) (#57472)
* TimeSeries: Fix stacking when first value is negative zero

* More test + refactor

(cherry picked from commit 7f3b567657)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-10-21 15:12:16 -04:00
Andre Pereira
559ef42767 Tempo: Add start time and end time parameters while querying traces (#48068) (#57459)
* Add start time and end time parameters while querying tempo traces

* Added configurable time shift to query by trace id

* Test that the URL is formatted correctly

* Added test to check for time shift

* Improved label and tooltip of new time shift settings

Co-authored-by: André Pereira <adrapereira@gmail.com>
(cherry picked from commit 98053cfde8)

Co-authored-by: bikashmishra100 <bikashprakash@gmail.com>
2022-10-21 16:51:48 +01:00
Grot (@grafanabot)
aff8e62b8c use inherited colors on svg (#57427) (#57447)
(cherry picked from commit 842b629cd1)

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2022-10-21 17:05:31 +02:00
Grot (@grafanabot)
263e3142a1 Use resource call query_result query (#57232) (#57453)
(cherry picked from commit 47eb7f785d)

Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
2022-10-21 09:21:23 -05:00
Grot (@grafanabot)
e67669b250 Dashboard: Alerts user to incorrect tag format for JSON import (#54657) (#57277)
* Dashboard: Alerts user to incorrect tag format for JSON import

Fixes #54285: Malformed tags cause hidden title and settings page crash

* Update public/app/features/manage-dashboards/utils/validation.ts

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>

* Included Suggestions

- Removed Comments
- Updated Code Block accordingly
- Updated Tests to camelCase over snake_case

* Updates per comments

- Re-wrapped function in try{}, catch{} as I appear to have overlooked including it in the initial refactor
- Re-worded errors to align with initial error
- Added a test case for invalid json

* Update validation.ts

Updated errors to read correctly to the root cause.
Updated dashboard variable as const.

* Update actions.test.ts

Fix tests according to error output rewording

* Update validation.ts

- Included test for an empty string of non-array

* Update actions.test.ts

-- Commented incorrect commit for validation.ts, update:
- Refactored code to better align and separate from generic JSON package tests followed by our manual checks of (1) Is array, and (2) if array, is of strings

- Test cases now include a check for non-array empty string in the tag property

Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
(cherry picked from commit 5285d34cc0)

Co-authored-by: AJ Tomko <andrew.j.tomko@gmail.com>
2022-10-21 09:54:00 -04:00
Grot (@grafanabot)
9b2d3e3cac fix: add alerting enabled condition FOR adding alerting tab in folder view (#57434) (#57448)
(cherry picked from commit cd0e0fcc53)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2022-10-21 15:50:42 +02:00
Grot (@grafanabot)
72d97eb375 E2E: Remove time zone scenario flackyness (#55458) (#57442)
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
(cherry picked from commit 7fd613ec0d)

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2022-10-21 16:31:21 +03:00
Grot (@grafanabot)
868e560006 OutsideRangePlugin: Exclude leading and trailing null values when checking limits (#57335) (#57433)
* OutsideRangePlugin: Exclude null limit values from calculation

* refactor

* Update OutsideRangePlugin.tsx

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>

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

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-21 08:46:36 -04:00
Jo
b6a91429c9 Swap order of login fields (#57426)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
2022-10-21 14:15:59 +02:00
Marcus Efraimsson
d2fe4b4813 [v9.2.x] Plugin fixes (#57401)
* Plugins: Remove support for V1 manifests

* Plugins: Make proxy endpoints not leak sensitive HTTP headers

* Security: Fix do not forward login cookie in outgoing requests

(cherry picked from commit 4539c33fce)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2022-10-21 13:55:35 +02:00
Grot (@grafanabot)
46f2243f02 Docs: fixes silences typo (#57418) (#57423)
(cherry picked from commit af17123b5f)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-21 07:52:41 -04:00
Grot (@grafanabot)
fcfbb2415f Canvas: Improve text element readability (#57371) (#57375)
(cherry picked from commit 5128659d19)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-10-20 16:19:08 -04:00
Grot (@grafanabot)
a3bccbbdeb User: Fix externalUserId not being populated (#57341) (#57370)
(cherry picked from commit 8cebaf345d)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-10-20 14:53:17 -04:00
Grot (@grafanabot)
188792428d GoogleOAuth: Unlock UI (#57350) (#57355)
(cherry picked from commit f184f9211c)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-20 09:05:52 -04:00
Grot (@grafanabot)
15557bf4af StateTimeline: fix hover overlays when browser-zoomed (#57224) (#57351)
(cherry picked from commit 79afad3888)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-20 08:14:13 -04:00
Grot (@grafanabot)
7582c92f0d Docs: fixes endpoint for mimir (#57330) (#57333)
(cherry picked from commit ee6ff18122)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-20 04:42:12 -04:00
Grot (@grafanabot)
d8c11cdd7a StatuHistoryPanel: Fix zoom not working (#57240) (#57324)
(cherry picked from commit 0dd721d4ce)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-20 02:42:21 -04:00
Grot (@grafanabot)
3752197643 MSSQL: Support tables from all schemas (#53099) (#57287)
(cherry picked from commit 09ab156480)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-10-20 08:30:10 +02:00
Grot (@grafanabot)
0d93b268f2 add correct overscroll-behavior to context modals (#56070) (#57322)
(cherry picked from commit 0c1e4979af)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-10-20 01:41:41 -04:00
Grot (@grafanabot)
09eb30b9a3 Docs: Fix reference to Enterprise licensing restrictions (#57230) (#57301)
(cherry picked from commit c70bb592fe)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-19 13:29:01 -07:00
Grot (@grafanabot)
1547e41ce0 Routing: an unexpected spelling error happened (#57295) (#57305)
(cherry picked from commit bdb97496ec)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-19 14:24:27 -06:00
Grot (@grafanabot)
1559344944 Alerting: Change severity level of fetcher log messages (#57299) (#57304)
(cherry picked from commit 3e6bc28de5)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-10-19 16:19:13 -04:00
Grot (@grafanabot)
0cc1c86015 Docs: Add missing alias for field options (#57234) (#57297)
(cherry picked from commit a0d83e7db7)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-19 14:16:09 -04:00
Grot (@grafanabot)
fc99833cfb Docs: Fix links in old What's New docs (#57231) (#57283)
* Docs: Fix placeholder URL in release notes link

* Docs: Fix link to refactored docs and add missing alias

* Docs: Fix malformed links

* Docs: Fix alias with correct path

(cherry picked from commit 9680249066)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-19 11:14:58 -07:00
Grot (@grafanabot)
963a71ba34 Tempo: Fix Node Graph visualization type in dashboard (#56931) (#57269)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
(cherry picked from commit f50ab457bd)

Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
2022-10-19 18:04:19 +01:00
Grot (@grafanabot)
613d3b5e17 Loki: Fix adding of adhoc filters to stream selector when query with empty stream selector (#57280) (#57286)
* disable double stringify

* Refactor test for addLabelToQuery

* Add tests (TDD for expected behaviour)

* Fix adding ad hoc filters to correct place when no stream selector

* Update

* Update comment

* Fix getAllPositionsInNodeByType

Co-authored-by: Sven Grossmann <svennergr@gmail.com>
(cherry picked from commit 7928f170ce)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-19 17:50:15 +02:00
Grot (@grafanabot)
a991be81da [v9.2.x] Docs: Fix broken InfluxDB starting guide links (#57282)
* Docs: Fix broken InfluxDB starting guide links (#57235)

* Docs: Fix broken InfluxDB starting guide links

* Docs: Fix another link to panel adding docs

(cherry picked from commit e14ef50d02)

* Update docs/sources/getting-started/get-started-grafana-influxdb.md

* Update docs/sources/getting-started/get-started-grafana-influxdb.md

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-19 10:58:00 -04:00
Grot (@grafanabot)
85e2b028de Docs: Fix links in panels and vis docs (#57233) (#57275)
(cherry picked from commit e52c98ba99)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-19 07:30:55 -07:00
Grot (@grafanabot)
a8a1bcc58c Fix typo (#57223) (#57229)
(cherry picked from commit cc6245df8e)

Co-authored-by: Sobuno <jesper@sobuno.dk>
2022-10-19 07:29:30 -07:00
Grot (@grafanabot)
7cda7094c5 Cloudwatch: Fix issue where selected log groups clear from dashboards if there are more than 50 results (#57196) (#57210)
(cherry picked from commit b2e2879b07)

Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
2022-10-19 09:11:58 -04:00
Grot (@grafanabot)
880452931b CloudWatch: Make sure adoption tracking is done on valid, migrated queries (#56872) (#57241)
* make sure adoption tracking is done on valid, migrated queries

* ignore hidden queries

* fix test

* remove obsolete test

(cherry picked from commit a30885c523)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
2022-10-19 12:38:16 +02:00
Grot (@grafanabot)
29a03139dd disable double stringify (#57243) (#57254)
(cherry picked from commit 598da14d88)

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
2022-10-19 06:13:42 -04:00
Grot (@grafanabot)
f03d0facc5 Loki: Fix explain section about $__interval variable (#57188) (#57255)
* Loki: Update  explain section

* Update

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

Co-authored-by: Matias Chomicki <matyax@gmail.com>

Co-authored-by: Matias Chomicki <matyax@gmail.com>
(cherry picked from commit b4a03d0cff)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-19 06:12:51 -04:00
Grot (@grafanabot)
00b1a285ad elastic: backend-mode: fix trimEdges functionality (#56985) (#57253)
(cherry picked from commit 0491c19712)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-10-19 06:08:40 -04:00
Grot (@grafanabot)
c4fdc3d7c6 Replace json decoder with io.ReadAll (#57178) (#57251)
(cherry picked from commit 0b72c36527)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-19 06:03:47 -04:00
Grot (@grafanabot)
9f8bee7187 Loki: Remove already selected options from next label filter options in builder (#57187) (#57250)
* Loki: Filter out duplicated options in loki query builder label name options

* Update test

(cherry picked from commit b997bc4200)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-19 05:57:44 -04:00
Grot (@grafanabot)
ba1942febb Elasticsearch: Fix calculation of trimEdges (#56148) (#57249)
* Elasticsearch: Fix calculation of trimEdges

When a value of trimEdges is set greater than 1 we need to drop both the
first and last sample of the data from the response.

* Elasticsearch: Fix reading trimEdges from the query settings

Currently the trimEdges property in the JSON panel is stored as a string
and not directly as a number.

This caused that the reading of the value failed in the go backend
because the simplejson.Int() method doesn't properly handle this case.
This failure when decoding the value goes unnoticed because of the early
return causing the trimEdges configuration to be ignored.

* Refactor castToInt to also return an error

Add a new test case that sets the `trimEdges` property as a quoted
number.

(cherry picked from commit e4f2006cce)

Co-authored-by: Jorge Luis Betancourt <jorge-luis.betancourt@trivago.com>
2022-10-19 05:18:59 -04:00
Dimitris Sotirakis
7593d5880f Add token to init-enterprise (#57246) (#57248)
(cherry picked from commit f0b882ebad)
2022-10-19 04:37:36 -04:00
Grot (@grafanabot)
cce767fee4 Alerting: Add support for wecom apiapp (#55991) (#57238)
This change adds new functionality to the wecom alerting contact point. In addition to a webhook address, you can now send alerts to the wecom apiapp endpoint.

Based on https://github.com/grafana/grafana/discussions/55883

Signed-off-by: aimuz <mr.imuz@gmail.com>
(cherry picked from commit c0cc85b5f1)

Co-authored-by: aimuz <mr.imuz@gmail.com>
2022-10-19 13:14:32 +08:00
Grot (@grafanabot)
29baf812cf fix swagger spec for receivers API response (#57124) (#57128)
(cherry picked from commit 6ad405e256)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-10-18 12:50:54 -03:00
Grot (@grafanabot)
484df7d682 [v9.2.x] Alerting: Use correct response body for silence post API (#57126)
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-10-18 11:35:13 -04:00
juanicabanas
b9cce07b10 PublicDashboards: Fix hidden queries execution (#57004) (#57194)
PublicDashboards: Fix hidden queries execution
2022-10-18 10:57:58 -04:00
Grot (@grafanabot)
9c6d358d7f Fix NumberInput empty values (#57142) (#57190)
* Fix NumberInput empty values

* tests

* tests

(cherry picked from commit e91135cf19)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-18 10:13:19 -04:00
Grot (@grafanabot)
0905058657 Revert data links code for sorted vector case (#57175) (#57183)
(cherry picked from commit 9c514748f7)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-18 09:13:31 -04:00
Grot (@grafanabot)
02b1030662 "Release: Updated versions in package to 9.2.2" (#57181) 2022-10-18 15:07:12 +02:00
Grot (@grafanabot)
a395671237 Changelog: Updated changelog for 9.2.1 (#57176) (#57180)
(cherry picked from commit 4cee910971)
2022-10-18 08:48:17 -04:00
Dimitris Sotirakis
9617d2a14f Publish Linux Packages: Fix bad secret name (#56708) (#57174)
🤦

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
(cherry picked from commit 72b9555487)

Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
2022-10-18 08:28:48 -04:00
Grot (@grafanabot)
f2fa4eb197 TimeseriesPanel: Fix variables in data links (#56729) (#57163)
* TimeseriesPanel: Fix variables in data links

* Refactor variable fix for all Timeseries panels

* cr mods

(cherry picked from commit 76d6e3c075)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-18 08:00:29 -04:00
Grot (@grafanabot)
38458c40d2 Quota(fix): remove service accounts from quota count (#56700) (#57167)
(cherry picked from commit fa45742abc)

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2022-10-18 13:00:06 +01:00
Dimitris Sotirakis
04678bc1aa Add RPM package publishing (#56797) (#57162)
Just tested deb publishing, and confirmed it works. Noticed that RPM packages aren't published though
It's the exact same step, targetting the RPM files instead
Both steps will run in parallel

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
(cherry picked from commit 44ad4ec9d4)

Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
2022-10-18 14:19:22 +03:00
Grot (@grafanabot)
ef74b7a486 Browse: Fix General folder not showing in FolderPicker (#57156) (#57158)
(cherry picked from commit 4d0dd0647e)

Co-authored-by: Laura Fernández <laura.fernandez@grafana.com>
2022-10-18 06:52:33 -04:00
Sonia Aguilar
cbdc5e59cf Fix sending RelativeTimeRange when requesting eval with resample expressions (#57076) 2022-10-18 09:11:42 +02:00
Dimitris Sotirakis
7b12482512 Update grabpl to 3.0.14 (#57144) (#57145)
(cherry picked from commit 7a71482371)
2022-10-18 10:06:33 +03:00
Artur Wierzbicki
7a91afc504 Search: Sort alphabetically in the folder view, increase the limit of the folder search from 50 to 1000 (#57078) (#57141)
* search: sort folders

* search: increase the limit for folder search to 1000

* add folder view sort test

* search: getFolderViewSort

* search: revert test

Co-authored-by: Todd Treece <todd.treece@grafana.com>
(cherry picked from commit c26cf6a517)
2022-10-18 09:50:59 +03:00
Grot (@grafanabot)
56fa39ede0 Alerting: Improve notification policies created during migration (#52071) (#57139)
* Alerting: Improve notification policies created during migration

Previously, migrated legacy alerts were connected to notification policies through
a `rule_uid` label in a 1:1 fashion. While this correctly mimicked pre-migration routing,
it didn't create a notification policy structure that is easy to view/modify. In addition,
having one policy per migrated alert is, in some ways, counter to the recommended approach of
Unified Alerting.

This change replaces `rule_uid`-based migrated notification policies with a private
label called `__contacts__`. This label stores a list of double quoted strings containing the names of
all contact points an AlertRule should route to (based on legacy notification channels). Finally,
one notification policy is created per contact point with each matching AlertRules via regex on this
`__contacts__` label.

The result is a simpler, clearer, and easier to modify notification policy structure, with the
added benefit that you can see which contact points an AlertRule is being routed to from the
AlertRule creation page.

(cherry picked from commit 0db339d82f)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2022-10-18 01:05:47 -04:00
Grot (@grafanabot)
1980c169b9 Canvas: Text input cursor jumping (#57133) (#57135)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit 7f5914ff05)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-10-17 18:55:30 -04:00
Grot (@grafanabot)
9c9480dd0c Grafana UI: Export prop types for queryfield, modal and field components (#57097) (#57108)
* chore(grafana-ui): export prop types for queryfield, modal and field components

* docs(migration-guide): add notes for react peerdependencies and additional type exposure

* Update docs/sources/developers/plugins/migration-guide.md

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
(cherry picked from commit 24c04740e3)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-17 15:22:14 -04:00
Grot (@grafanabot)
c639251ace CI: Move CreateTempFile - use it for rpm/deb packages (#56990) (#57102)
* Move CreateTempFile - use it for rpm/deb packages

* Fix typo

* Fix tests:

(cherry picked from commit c96b6a6ab0)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-17 20:45:50 +03:00
Grot (@grafanabot)
0965e3ac12 Docs: Fix broken link (#57083) (#57109)
* Docs: Fix broken link

* Update docs/sources/setup-grafana/configure-security/configure-authentication/auth-proxy.md

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 5c2b722287)

Co-authored-by: Ahmed <hello@clivern.com>
2022-10-17 12:12:25 -04:00
Grot (@grafanabot)
1755c72670 Docs: Contextualize base64 encoding in Basic Authorization (#57046) (#57106)
(cherry picked from commit 2bed451990)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-17 09:09:59 -07:00
Grot (@grafanabot)
98dfb42cbf Toolkit: Fix Cannot use "import statement outside" error in tests (#57071) (#57094)
(cherry picked from commit fd0fcffc24)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-17 17:36:47 +02:00
Sonia Aguilar
3a93203a57 Show No attempts instead of OK when there is no attempt for notifier (#56494) (#57090)
(cherry picked from commit a18a3d7628)
2022-10-17 12:03:00 -03:00
Grot (@grafanabot)
b33b3ea0b6 Docs: Clarify and document dashboard URL query parameters for variables (#56055) (#57045)
(cherry picked from commit 0889c3ad07)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-17 07:41:10 -07:00
brendamuir
9795dbb401 Docs: adds terraform provisioning docs (#55660) (#57091)
* Docs: adds set up section and alertmanager

* deletes info that got copied to new file

(cherry picked from commit b7f356df31)
2022-10-17 10:23:58 -04:00
Dimitris Sotirakis
11bfb4a387 Make publish packages depend on compile-build-cmd and run from bin/build (#56713) (#57059)
(cherry picked from commit e25475b9c8)
2022-10-17 17:13:10 +03:00
Grot (@grafanabot)
bca3356661 Docs: adds modify dashboard settings docs (#56826) (#57086)
* adds modify dashboard settings docs

* Quick updates

* minor corrections

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

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-17 09:11:56 -05:00
Grot (@grafanabot)
95f23777f0 BarChart: use dashboard timezone for x axis (#57047) (#57056)
(cherry picked from commit da39c7297b)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-17 07:32:23 -06:00
Grot (@grafanabot)
8ba2187115 Fix duplicated receivers in API response (#56829) (#57027)
(cherry picked from commit 3c56fd8da0)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2022-10-17 15:19:28 +02:00
Grot (@grafanabot)
c2ce0e82ff Inspect: Handle JSON tab crash when the provided object is too big to stringify. (#55939) (#56770)
* fix(inspector): handle json tab crash when too much data

* message update when JSON stringify fails due to obj size

(cherry picked from commit 6edce00b1a)

Co-authored-by: Alex <TsotosA@users.noreply.github.com>
2022-10-17 06:10:54 -07:00
Dimitris Sotirakis
a3f69498f6 Update grabpl to v3.0.12 (#56823) (#56866)
(cherry picked from commit b9d449529a)
2022-10-17 12:27:29 +01:00
Grot (@grafanabot)
27f57b144d RBAC: Make uid for managed role names deterministic during migrations (#56620) (#57073)
* RBAC: Change the generate uid function to be deterministic so we can avoid collision

* RBAC: Use fmt.Errorf

* RBAC: Add comment

* RBAC: Export GenerateManagedRoleUID

(cherry picked from commit 21792fdf37)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2022-10-17 06:27:33 -04:00
Grot (@grafanabot)
bcc5a441bf Alerting: Missing config option in the sample (#54179) (#57064)
(cherry picked from commit 03248e9cd8)

Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
2022-10-17 11:57:43 +02:00
Konrad Lalik
4604062f80 [v9.2.x] Alerting: Fix source and rule name decoding on Find route (#56805) (#56922) 2022-10-17 11:29:25 +02:00
Grot (@grafanabot)
88194154cd GoogleCloudMonitoring: fix typo tooltip pre-processing (#57049) (#57058)
(cherry picked from commit c8402b4b50)

Co-authored-by: Labesse Kévin <kevin@labesse.me>
2022-10-17 04:39:25 -04:00
Grot (@grafanabot)
c0f54f8f58 <Documentation> Document usage of environment variables/files in GitHub Auth login (#52891) (#57035)
* Document usage of environment variables/files

* Updating Github Auth Login Documentation

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
(cherry picked from commit a46fa16b4e)

Co-authored-by: Ben Golding <60831565+bgolding355@users.noreply.github.com>
2022-10-15 09:26:10 -07:00
Santiago
5b7920fe32 Backport 56822 to v9.2.x (#57023)
* use Prometheus' format for notification attempts durations (#56822)

(cherry picked from commit 9996dbd577)

* fix merge errors
2022-10-14 18:35:17 -03:00
Grot (@grafanabot)
51d5a6031e Alerting: Add Notification error feedback on contact points view (#56225) (#57017)
* Alerting: Receivers integrations error feedback: WIP - Add notifications error at the top right on contact points view (#52390)

* Add interfaces for contact point errors

* [WIP] Create fake response for the new service to get contact point errors

* [WIP] Create action an reducer for the new service to get contact point errors

* Fetch fetchContactPointStates in Contact Points tab every 20s and when AM changes

* [WIP] Use store to get error count

* Show number of integrations errors at the contact points main view

* Add warning icon and refactor styles using getStyles

* Change lastNotify type to string instead of DateTime

* Use Stack component from experimental library when it is possible

* Alerting: Add receivers error feedback in contact point list (#52524)

* Refactor types for contact points state

* Add health column in ReceiversTable in case error state is available for this AM

* Create method for converting contact points state DTO to the FE type used in Redux store

* Update types

* Fix indexOf criteria getting integration type

* Change type name to integrationType name

* Change new components to be named functions to follow the FE style-guide

* Fix typos

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>

* Decouple ReceiversTable from Redux state

* Create private useContactPointsState hook to simplify code in ReceiversTable component

* Add tests for getIntegrationType and refactor the method to validate the name

* Add tests for contactPointsStateDtoToModel method

* Remove unnecessary check

* Use Badge compoment for health status in contact point list

* Create new method parseIntegrationName to simplify getting types and index from integration name

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>

* Alerting: Show integrations error feedback when expanding contact point in list (#52920)

* Use DynamicTable for rendering list of contact points and make them expandable if error status is available

* Render expanded content for contact points integrations

* Style and format last notify column

* Add send resolve column to the integration details

* Fix receiver id for DynamicTable row

* Update clock icon in integration state

* Fix tests

* Add PR review sugestions

* Alerting/integrations error feedback handle null dates in response 3 (#55659)

* Update fake response with lastNotify ISO8601 formatted, to be aligned with latest BE changes

* Update LastNotify in ReceiversTable component to handle null date

* Alerting/integrations error feedback handle 404 state not available (#55803)

* Create fetchContactPointsState using the future contact point url and handle 404 error

* Add contact points state tests

* Alerting/update receivers dto naming 2 (#56201)

* Update NotifierStatus naming and fix sendResolved not being updated in UI

* Return always empty ContactPointsState array when catching an error in the request response

* Fix test

* Show notification status only in notifications main view

* Calculate total error count from the final contactPointsState object, to avoid errors when duplicated entries are returned wronly in the response

* Add PR review suggestions

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
(cherry picked from commit d8d8ef1aff)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2022-10-14 16:20:33 -03:00
Grot (@grafanabot)
6f1af5c007 Docs: Note end of release notes publication (#57013) (#57015)
* Docs: Note cessation of release notes

* Docs: Update What's New index mention of release notes

* Docs: Update links and references to the release notes

* Docs: Fix relrefs

* Docs: Spellcheck

(cherry picked from commit 2b4d57fe60)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-14 19:28:26 +02:00
Santiago
ba9293b09d Alerting: Expose info about notification delivery errors in a new /receivers endpoint (#55429) (#56899)
* (WIP) switch to fork AM, first implementation of the API, generate spec

* get receivers avoiding race conditions

* use latest version of our forked AM, tests

* make linter happy, delete TODO comment

* update number of expected paths to += 2

* delete unused endpoint code, code review comments, tests

* Update pkg/services/ngalert/notifier/alertmanager.go

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>

* remove call to fmt.Println

* clear naming for fields

* shorter variable names in GetReceivers

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
(cherry picked from commit 09f8e026a1)
2022-10-14 12:22:33 -03:00
Grot (@grafanabot)
96ae3b7e45 Alerting: Remove blank comment (#56889) (#56984)
(cherry picked from commit 2f85172718)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-10-14 08:41:57 -04:00
Gabriel MABILLE
5a17ef9d6c AzureAD: Add option to force fetch the groups from the Graph API (#56916) (#56947)
* AzureAD: Add option to force fetch the groups from the Graph API (#56916)

* Add a new option to systematically fetch AzureAD groups from the Graph API

(cherry picked from commit 0f4d126109)

* Update docs/sources/setup-grafana/configure-security/configure-authentication/azuread.md

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>

Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
2022-10-14 14:06:44 +02:00
Grot (@grafanabot)
d78f259ee8 Last Table Column Not Centered (#56047) (#56938)
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>

Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
(cherry picked from commit 4ecc9f42ac)

Co-authored-by: GitStart <1501599+gitstart@users.noreply.github.com>
2022-10-14 06:53:41 -04:00
Grot (@grafanabot)
c9341d5314 MSSQL/MySQL: Add correct refId when fetching variable query results (#56919) (#56925)
(cherry picked from commit b374b01260)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-14 06:19:15 -04:00
Grot (@grafanabot)
0bdc74ba39 Candlestick: re-init config when series length changes (#56913) (#56930)
(cherry picked from commit 4eea326ee8)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-14 05:31:10 -04:00
Grot (@grafanabot)
7d21e021ea Heatmap: honor dashboard timezone in x axis and fix tooltip time range (#56909) (#56928)
(cherry picked from commit 53ac77d4a5)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-14 05:30:15 -04:00
Grot (@grafanabot)
b3b72165f1 MSSQL/MySQL: Fix variable interpolation (#56879) (#56924)
* MSSQL/MySQL: Fix variable interpolation

* Escape string vars

(cherry picked from commit 902a230867)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-14 12:07:03 +03:00
Grot (@grafanabot)
53c71b486a [v9.2.x] Alerting: Fix folder picker clear action (#56915)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-10-14 09:16:28 +02:00
Grot (@grafanabot)
61f0183275 Docs: Fix Canvas doc link and add call to action for feedback (#56908) (#56911)
* Fix canvas documentation link on what's new page; add feedback CTA in canvas doc

* PORK: replace allows with enables for better language

* Fix a few more instances of allow to enable

* Move feedback above video in intro canvas section

* Revert changing link change

(cherry picked from commit 527690d19a)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-10-13 22:05:35 -04:00
Grot (@grafanabot)
928a9ebc57 Docs: Basics docs refactor (#56905) (#56906)
* renames directory

* fixes relrefs

(cherry picked from commit 385079bea7)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-13 16:06:41 -05:00
Grot (@grafanabot)
c74db84073 moves canvas to proper directory, corrects relref (#56902) (#56903)
(cherry picked from commit c137cf60f0)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-13 14:47:54 -05:00
Grot (@grafanabot)
b00bb90926 Propagate all headers on main QueryData (#56896) (#56901)
(cherry picked from commit 145b970557)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-10-13 15:33:40 -04:00
Grot (@grafanabot)
22ae442f56 Explore: Remove camel case from tracking labels (#56809) (#56856)
* refactor: remove camel case from tracking labels

* refactor: remove camel case from tracking labels

(cherry picked from commit b71e08ad59)

Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
2022-10-13 13:01:34 +02:00
Grot (@grafanabot)
17e197634e Alerting: Fix email image embedding on Windows. (#56766) (#56839)
The email notifier was incorrectly handling Windows filepaths. This is
fixed by using the `path/filepath` package.

(cherry picked from commit c7c640d903)

Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-10-13 11:21:20 +08:00
Grot (@grafanabot)
da5186b07a Canvas: Clear current selection in dashboard mode (#56830) (#56831)
(cherry picked from commit 254bb0c99e)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-10-12 17:37:23 -04:00
Grot (@grafanabot)
e238b9f9c1 Alerting: Fix mathexp.NoData for ConditionsCmd (#56816) (#56820)
(cherry picked from commit 004bb7689d)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-10-12 12:48:18 -04:00
Grot (@grafanabot)
1d2037a766 fix typo (#56802) (#56804)
(cherry picked from commit 26e7228cd9)

Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
2022-10-12 09:47:36 -04:00
Grot (@grafanabot)
e20953e4f8 LDAP: log that organization mapping is skipped (#56796) (#56798)
(cherry picked from commit 5fcec05695)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-12 15:03:10 +02:00
Grot (@grafanabot)
f01526e35b LDAP: Add skip_org_role_sync configuration option (#56679) (#56792)
* LDAP: Add skip_org_role_sync option

* Document the new config option

* Nit on docs

* Update docs/sources/setup-grafana/configure-security/configure-authentication/ldap.md

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

* Docs suggestions

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

* Add test, Fix disabled user when no role

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
(cherry picked from commit 10c080dad1)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-12 13:57:20 +02:00
Grot (@grafanabot)
7033623093 Alerting: Add doc comments to classic.go (#56724) (#56785)
(cherry picked from commit 67d93ceea0)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-10-12 06:14:06 -04:00
Grot (@grafanabot)
ffa67c888b Fixes 48972 - Exposes channels.WebhookMessage (#56140) (#56778)
(cherry picked from commit 26bb139470)

Co-authored-by: Matt <cadnce@users.noreply.github.com>
2022-10-12 05:02:57 -04:00
Victor Marin
794f9dbb05 TablePanel: Footer now updates values on column filtering (#56354) (#56768)
* Table footer now updates values on column filtering

* Backwards compatibility

(cherry picked from commit 48c27872af)
2022-10-12 10:46:32 +03:00
Konrad Lalik
91c78ce784 Alerting: Alert list performance improvements (#56247) (#56742)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
(cherry picked from commit 5ddf7b85df)
2022-10-12 09:08:34 +02:00
Dimitris Sotirakis
0cf8f9fab6 [v9.2.x] CI: Split release test pipelines (#56670)
* CI: Split release test pipelines (#56655)

* Split test release pipelines

* Add missing dependencies

* Add release branch case when naming pipeline

(cherry picked from commit 75c5845749)

* Add clone-enterprise and init-enterprise steps (#56662)

(cherry picked from commit eb077db2b0)

* Add dependencies (#56666)

(cherry picked from commit 811f6054c8)

* Fix release test pipelines dependencies (#56671)

(cherry picked from commit 668cb25b82)

* Remove build-frontend-packages step from docs pipelines (#56686)

(cherry picked from commit efc8f985cb)

* Remove grabpl dependency from yarn-install (#56692)

* Sign drone
2022-10-12 09:44:12 +03:00
Grot (@grafanabot)
d02b7fc0ba Alerting: Fix duration calculation when testing a rule (#56616) (#56705)
When testing a rule within the legacy alerting the `timeMs` field could
sometimes show negative (and/or wrongly calculated) durations. This happens if the alert evaluation crosses a second boundary. This change uses the full timestamp to compute the eval duration.

(cherry picked from commit 95b9fa3346)

Co-authored-by: Jorge Luis Betancourt <jorge-luis.betancourt@trivago.com>
2022-10-12 11:38:33 +08:00
Grot (@grafanabot)
bd81793292 Docs: Fix what's new canvas doc video file reference #56754 (#56761)
(cherry picked from commit 17433f2166)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-10-11 19:00:57 -04:00
Grot (@grafanabot)
0383c57a2f Docs: Add missing documentation for enterprise features (#56753) (#56760)
* add documentation about protected roles

* add section about sync debug

* add link to recorded queries to main enterprise pages

* Update docs/sources/setup-grafana/configure-security/configure-authentication/ldap.md

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* fixes from pr review

* add missing char

* Apply suggestions from code review

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>

* fix other incorrect lines to match review

Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
(cherry picked from commit 6827ca01a0)

Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
2022-10-11 19:00:46 -04:00
Christopher Moyer
e926018407 removes add-organize-panels (#56756) 2022-10-11 17:13:31 -05:00
Grot (@grafanabot)
18e3d9d209 Docs: Update Canvas videos to mp4 URLs (#56748) (#56749)
(cherry picked from commit f4a3400a9c)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-11 12:10:00 -07:00
Grot (@grafanabot)
85f83c44b8 Docs: Remove Beta tag from 9.2 What's New post-release (#56746) (#56747)
(cherry picked from commit abd7b7dccc)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-11 14:19:57 -04:00
Grot (@grafanabot)
abe3dbc53b Docs: Clarify JOIN feature change (#56740) (#56744)
(cherry picked from commit c98db1615f)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-10-11 09:28:58 -07:00
Grot (@grafanabot)
34a054642f docs/provisioning: fix typo in notification policies (#54917) (#56619)
(cherry picked from commit f90e72991d)

Co-authored-by: Timost <Timost@users.noreply.github.com>
2022-10-11 18:25:18 +02:00
Dimitris Sotirakis
bf184205dc Update publish.yml for 9.2.x (#56730) 2022-10-11 17:28:52 +03:00
George Robinson
4585d70f22 Alerting: Add doc comments to state struct and normalize fields (#56647) (#56676)
(cherry picked from commit 52965de369)
2022-10-11 15:20:18 +01:00
Grot (@grafanabot)
d06eb2fa8b Changelog: Updated changelog for 9.2.0 (#56725) (#56728)
(cherry picked from commit 8627b2131f)
2022-10-11 17:20:07 +03:00
Grot (@grafanabot)
e0d8bb2719 Canvas: Docs for 9.2 (#56219) (#56718)
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
(cherry picked from commit a9c0afcc1f)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-10-11 13:43:34 +00:00
Grot (@grafanabot)
32111ee203 Google Cloud Monitoring: Adapt default crossSeriesReducer (#56693) (#56706)
(cherry picked from commit cf2ba7e41c)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-10-11 09:04:25 -04:00
Grot (@grafanabot)
4468aac4ee [v9.2.x] Alerting: Mark all tests that interact with the database as integration tests (#56603)
Previously, two tests were not explicitly marked as integration tests
and so were not run against all 3 supported databases in the CI
environment.

(cherry picked from commit 7312a2dab0)


Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-10-11 20:43:51 +08:00
Grot (@grafanabot)
7d182b4890 Docs: updates numbering (#56695) (#56697)
* Docs: updates numbering

* removes full stop

(cherry picked from commit d6fa12c5bc)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-11 13:35:51 +01:00
Grot (@grafanabot)
2483c64d26 Docs: adds external Alertmanager config (#56636) (#56685)
* Docs: adds external Alertmanager config

* Adds link to add external alertmanager

* updating with george feedbacj

(cherry picked from commit 8a3294dcdf)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-11 06:32:24 -04:00
Grot (@grafanabot)
412f05e16f Drone: publish-linux-packages should be privileged (#55816) (#55818)
It's currently failing with a failure to mount s3fs

(cherry picked from commit 169df2fe90)

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
2022-10-11 12:23:01 +03:00
Grot (@grafanabot)
a57455e5cd FIX: Remove RBAC datasource permissions upon datasource deletion (#56530) (#56550)
* FIX: Remove RBAC datasource permissions upon datasource deletion

* Use scope provider instead

* Fix test

(cherry picked from commit 7595ed0668)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2022-10-11 12:16:43 +03:00
Grot (@grafanabot)
f4b37ab8a9 Docs: Fix caching.memcached setting name (#56606) (#56675)
(cherry picked from commit ef17f12c23)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2022-10-11 05:02:31 -04:00
Grot (@grafanabot)
b23fd7aad0 Chore: Regen swagger spec (#55750) (#55762)
* Chore: Regen swagger spec

* Regenerate swagger after enteprise fix

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

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-10-11 10:43:44 +02:00
Grot (@grafanabot)
7593ab4a4e ErrorPage: Fix position of chunk loading error (#56473) (#56628)
(cherry picked from commit 03e887723a)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2022-10-11 10:42:59 +02:00
Artur Wierzbicki
1bbbe41a6c Search: wrap data.Frame in a backend.DataResponse and return it directly when the index is not ready (#56611) 2022-10-10 14:05:16 -04:00
Grot (@grafanabot)
25e89ba295 Google Cloud Monitoring: Fix bucket bound for distributions (#56565) (#56649)
(cherry picked from commit 65e56c9fb8)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-10-10 10:25:37 -04:00
Grot (@grafanabot)
b8aa31433b Loki: Escape label-values in context queries (#56614) (#56639)
(cherry picked from commit 62674604b4)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-10-10 14:49:00 +02:00
Grot (@grafanabot)
c258cfb553 Docs: removes duplicate sentence in silences (#56629) (#56634)
(cherry picked from commit db68fa358f)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-10 07:03:03 -04:00
Grot (@grafanabot)
752f886637 Docs: adds note on aurora incompatibility (#56621) (#56631)
* Docs: adds note on aurora incompatibility

* updates with feedback

* adds issue link

(cherry picked from commit 2aff817ea8)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-10 06:57:45 -04:00
Grot (@grafanabot)
27a4dd8765 Docs: changes alert groupings to groups (#56617) (#56627)
* Docs: changes alert groupings to groups

* One more alert grouping

(cherry picked from commit a84edb274b)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-10 06:44:41 -04:00
Adela Almasan
fd7358a6ef [v9.2.x] Canvas: Add demo dashboards (#56588)
Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-10-07 21:20:22 -07:00
Grot (@grafanabot)
1024334d7b Alerting: Fix migration to create rules with group index 1 (#56511) (#56584)
(cherry picked from commit 3487e68d15)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-10-07 17:33:21 -04:00
Yuriy Tseretyan
77046b3fba [9.2.x] Alerting: Fix migration to not add label "alertname" (#56509) (#56579) 2022-10-07 16:38:00 -04:00
Grot (@grafanabot)
1964ddce83 Geomap: Docs for 9.2 (#56493) (#56501)
(cherry picked from commit 15d2653b89)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2022-10-07 15:18:23 -05:00
Grot (@grafanabot)
d5bb8aba85 Prometheus: Add Exemplar sampling for streaming parser (#56049) (#56571)
(cherry picked from commit 152c7f149a)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-10-07 13:15:49 -04:00
Grot (@grafanabot)
94341ed95c [v9.2.x] Prometheus: Various buffered and streaming parsing fixes (#56468)
* Prometheus: Various buffered and streaming parsing fixes (#55941)

(cherry picked from commit 1c61c81dde)

* switch back to 0 instead of NaN for 9.2 buffered responses

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2022-10-07 13:02:12 -04:00
Grot (@grafanabot)
77c1546511 Loki: Fix redundant escaping in adhoc filter with regex match (#56447) (#56562)
* Loki: Fix redundant escaping in adhoc filter with regex match

* Update data.js

* Simplify test

* Simplify test

* Update

* Add more tests

(cherry picked from commit a4c5801440)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-07 16:37:23 +02:00
Grot (@grafanabot)
9854ac88e9 [v9.2.x] Alerting: Fix evaluation interval validation (#56556)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-10-07 09:20:02 -04:00
Emil Tullstedt
90c8e52a17 Chore: Upgrade Go to 1.19.2 (#56355) (#56553)
(cherry picked from commit c2d3a31772)
2022-10-07 09:05:02 -04:00
Grot (@grafanabot)
34e7d48ca6 Form validation problem in table panel option (column width & minimum column width) (#56452) (#56547)
Co-authored-by: gitstart <gitstart@users.noreply.github.com>
Co-authored-by: gitstart <gitstart@gitstart.com>
Co-authored-by: Rubens Rafael <70234898+RubensRafael@users.noreply.github.com>
Co-authored-by: Rafael Toledo <87545086+Toledodev@users.noreply.github.com>
Co-authored-by: Matheus Muniz <87545749+matheusmuniz03@users.noreply.github.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Matheus Muniz <matheusmuniz100@hotmail.com>
Co-authored-by: Nitesh Singh <nitesh.singh@gitstart.dev>
Co-authored-by: Matheus Benini Ferreira <88898100+MatheusBeniniF@users.noreply.github.com>
Co-authored-by: Murilo Amaral <87545137+MuriloAmarals@users.noreply.github.com>
(cherry picked from commit 0eb3afbd14)

Co-authored-by: GitStart <1501599+gitstart@users.noreply.github.com>
2022-10-07 08:19:52 -04:00
George Robinson
1d02c2cd08 Docs: adds alertmanager overview (#56527) (#56539)
* Docs: adds alertmanager overview

* updating with georges feedback

* adds deprecation note to API docs

* update to provisioning instuctions

(cherry picked from commit 939caa67a2)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-07 11:22:12 +01:00
Grot (@grafanabot)
77ec6609df Alerting: Fix pq: missing FROM-clause for table "a" (#56453) (#56534)
This commit fixes a bug where changing the Folder or Rule Group of an existing rule returns the following error in PostgreSQL "pq: missing FROM-clause for table a"

(cherry picked from commit 762688d67f)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-10-07 10:35:47 +01:00
Grot (@grafanabot)
cacc00aeb8 Use io.ReadAll instead of json.Decode (#56528) (#56529)
(cherry picked from commit df2abf09c2)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-07 04:45:42 -04:00
Grot (@grafanabot)
4ac54040a9 Chore: Make NewCookieOptions exported in cookies.go (#56476) (#56499)
(cherry picked from commit 1de0f4453e)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2022-10-07 10:40:03 +02:00
Grot (@grafanabot)
17655071b7 RBAC: Redirect to /login when forceLogin is set (#56469) (#56523)
(cherry picked from commit bb479e030a)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-10-07 02:31:19 -04:00
Grot (@grafanabot)
ba5ee60944 StateTimeline: Fix tooltip showing erroneously in shared crosshair dashboards (#55809) (#56521)
* StateTimeline: Fix shared crosshair

* Fix for StatusHistory also

(cherry picked from commit b622a87aee)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-07 02:14:45 -04:00
Joe Blubaugh
84a6820fd8 Alerting: Update imported prometheus alertmanager version. Backport (#56228) (#56430)
Version 0.24.0 has a few bugs that cause panics. We update here to the
latest commit on github.com/prometheus/alertmanager's main branch.

Panic Bugs:
https://github.com/prometheus/alertmanager/issues/2936
https://github.com/prometheus/alertmanager/issues/3064

(cherry picked from commit ce89624ca2)
2022-10-07 14:00:45 +08:00
Grot (@grafanabot)
dc04e2589c Thresholds: fix line rendering with multiple y axes (#56516) (#56518)
(cherry picked from commit 21d9cf0db4)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-06 17:36:07 -06:00
Grot (@grafanabot)
5e0b29ed4b [v9.2.x] Docs: Updating Public Dashboard documentation (#56504) (#56508)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 356318e387)
2022-10-06 17:58:20 -03:00
lean.dev
debd9927c6 [v9.2.x] Docs: Updating Public Dashboard documentation
* Docs: Updating Public Dashboard documentation, not supporting library panels
2022-10-06 16:10:22 -03:00
Grot (@grafanabot)
f6d7f7dec6 Fix issue 55626 (#55636) (#56483)
Reset the mapping table for Dynamic Geojson

(cherry picked from commit c1d6df4eb7)

Co-authored-by: Nicolas Janicaud Gondoin <112407974+janicaud@users.noreply.github.com>
2022-10-06 08:44:39 -07:00
Grot (@grafanabot)
ece17f30ab Packaging: Change from 0750 to 0755 folder permissions when packaging (#56436) (#56474)
* Change from 0750 to 0755

* Change to 0o755

* Skip lint when creating dir

(cherry picked from commit 66e8f39ce8)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-06 10:25:43 -04:00
Grot (@grafanabot)
e6736c4308 Azure Monitor: Fix subscription selector when changing data sources (#56284) (#56409)
(cherry picked from commit 2cdbd05634)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-10-06 09:58:10 +00:00
Dimitris Sotirakis
c00946994a CI: Stop publishing OSS images for security mode (#56088) (#56374)
* No-op: Refactor publish images pipeline struct

* Stop publishing images for OSS

(cherry picked from commit 5cdc932f8c)
2022-10-06 10:52:08 +01:00
Dimitris Sotirakis
2c781d472a Change from grabpl to build for grafana-com (#56434) (#56443)
(cherry picked from commit ec7d9e196e)
2022-10-06 11:16:35 +03:00
Dimitris Sotirakis
8f7deb3741 Move files under pkg/build/packaging (#56435) (#56440)
(cherry picked from commit 3aacda5579)
2022-10-06 11:16:22 +03:00
Yuriy Tseretyan
9b87e7de11 [9.2.x] Alerting: Start ticker only when scheduler starts (#56339) (#56418) 2022-10-05 15:52:06 -04:00
Grot (@grafanabot)
23788d0f70 QueryEditorRow: Only pass error to query editor if panel is not loading (#56350) (#56423)
(cherry picked from commit b3087cfcd1)

Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
2022-10-05 15:34:59 -04:00
Sven Grossmann
0362260b30 LogContext: Fix scroll position in upper context group (#56370) (#56401)
* fix log row being falsely added to context

* do not add to many lines

* fix scroll position in context

* more flexible id comparison

* add original refid to context query

* added missing row comparison

* updated comment

Co-authored-by: Matias Chomicki <matyax@gmail.com>

Co-authored-by: Matias Chomicki <matyax@gmail.com>
(cherry picked from commit 0d8ea2bb34)
2022-10-05 12:00:06 -04:00
Grot (@grafanabot)
0f136e2b26 Azure Monitor: Adapt empty Logs response (#56378) (#56395)
(cherry picked from commit 8594e648e8)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-10-05 10:24:13 -04:00
Grot (@grafanabot)
55186418b9 Loki: Add support for range aggregations with by grouping (#56184) (#56369)
* Loki: Fix unwrapped range operations with grouping

* Update, fix tests

* Fix modeller

(cherry picked from commit 4469572b27)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-10-05 08:54:03 -04:00
Tania
4d3408f4f0 Remove branding feature toggle (#56389) 2022-10-05 14:28:12 +02:00
Grot (@grafanabot)
90168e6c80 ReleaseNotes: Updated changelog and release notes for 9.1.7 (#56323) (#56325)
(cherry picked from commit 169f1ab974)
2022-10-05 11:28:22 +03:00
Grot (@grafanabot)
83fb311b3c Fixes alertmanagers whats new entry (#56356) (#56357)
(cherry picked from commit b1b3f9e24c)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-05 08:47:18 +01:00
Grot (@grafanabot)
2b7ec364ad Canvas: Increase Add Item picker width (#56204) (#56341)
(cherry picked from commit 8833e35b43)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2022-10-04 15:52:48 -04:00
Grot (@grafanabot)
b70f14d971 Canvas: Promote to beta (#56217) (#56342)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 2c1c98f3b6)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-10-04 15:44:31 -04:00
Grot (@grafanabot)
7cb8143633 Search: Fix tags query (#55851) (#55861)
* Search: fix tags query

* Search: fix type

(cherry picked from commit 814211282a)

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-10-04 13:53:00 -04:00
Grot (@grafanabot)
536eeaf9ca ReleaseNotes: Updated changelog and release notes for 9.1.7 (#56313) (#56320)
(cherry picked from commit a50017da1d)
2022-10-04 19:17:22 +03:00
Giordano Ricci
a425170bff Backport 56310 to v9.2.x (#56311)
* Revert "Explore: Prevent panes from disappearing when resizing window in split view (#55696)"

This reverts commit 0a5aa19ca2.

* Revert "Explore: Add resize to split view, with Min/Max button (#54420)"

This reverts commit c3e4f1f876.
2022-10-04 16:08:49 +01:00
Grot (@grafanabot)
8741f7dedb Replace filename with path without the local dir (#56296) (#56309)
(cherry picked from commit d94af21cac)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-04 10:34:51 -04:00
Grot (@grafanabot)
19427f9797 adds 4 links to blogs (#56193) (#56302)
(cherry picked from commit d0b437741e)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-04 09:08:40 -05:00
Grot (@grafanabot)
a851432bfb adds alertmanager to whats new (#56304) (#56306)
(cherry picked from commit 8176810b2b)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-10-04 10:06:46 -04:00
Grot (@grafanabot)
536d0d4277 Remove Custom Branding previews from What's new (#56273) (#56294)
We need to remove the custom branding announcement from the 9.2 release, since we will not release the feature in Grafana Enterprise.

(cherry picked from commit 3d58f39b25)

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2022-10-04 14:43:56 +01:00
Grot (@grafanabot)
64867b09cf elasticsearch: improved types in the typescript files (#56293) (#56299)
(cherry picked from commit 291276e767)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-10-04 09:20:54 -04:00
Grot (@grafanabot)
d0e42cdbc8 Update github.com/labstack/echo/v4 (#56226) (#56289)
(cherry picked from commit 91b4ce08a9)

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2022-10-04 14:06:44 +02:00
Grot (@grafanabot)
88d4cc9334 Add cronjob option at switch case (#56272) (#56274)
(cherry picked from commit 26d64a778e)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-04 06:29:38 -04:00
Grot (@grafanabot)
a8facce55e AzureMonitor: Ensure resourceURI template variable is migrated (#56095) (#56250)
* Ensure resourceURI template vars are migrated

- Do not filter queries containing a resource URI template
- Update migration
- Add test

* Update condition

* Review

(cherry picked from commit 462ca50512)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-10-04 04:59:47 -04:00
Grot (@grafanabot)
50c6c5e550 XYChart: Beta release (#55973) (#56237)
* Bump state from alpha to beta

* Sync manual pointsize max with auto one

* Add xyChart to list

(cherry picked from commit 7b93d85a85)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-04 03:59:18 -04:00
Dimitris Sotirakis
04c5b2b9cc Add edition as environment var (#56069) (#56238)
(cherry picked from commit 8eea6f7f4f)
2022-10-04 03:58:16 -04:00
Grot (@grafanabot)
f7d85ba844 Fix update-changelog.yml version input (#56224) (#56229)
(cherry picked from commit f7c6fe0c97)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-04 10:35:08 +03:00
Grot (@grafanabot)
6e680cac8f Heatmap: fix color scheme reversal (#56227) (#56234)
(cherry picked from commit eeb31c2901)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-10-04 03:31:46 -04:00
Grot (@grafanabot)
6c38c502a9 Take standard options min/max into account (#55972) (#56222)
(cherry picked from commit 6913623461)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-10-04 02:31:25 -04:00
Grot (@grafanabot)
a16104d123 init sbom action (#56177) (#56198)
(cherry picked from commit ad48cee2bb)

Co-authored-by: Ethan <smithe2413@gmail.com>
2022-10-03 12:05:22 -04:00
Grot (@grafanabot)
483d30730f adds note about org_role being case sensitive (#56043) (#56180)
(cherry picked from commit c5b68ed497)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-10-03 09:13:12 -05:00
Grot (@grafanabot)
14d98f02da Alerting: Allow created by to be manually set when there's no creator for silences (#55952) (#56161)
* Alerting: Allow created by to be manually set when there's no creator

Grafana has a mode that allows unauthenticated interaction, typically the created by field of a silence is inferred from the current logged user. When this is not present, the field is left black and thus the silence creation fails.

This allows us to set the created by when we is not possible to infer it from the current user.

* Show created by input field only if user is not logged

* Add test for new logic with createdBy input field

Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
(cherry picked from commit 501e921b2b)

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-10-03 16:04:16 +02:00
Grot (@grafanabot)
7a76da4e15 CI: Add packages-bucket flag to publish packages command (#56170) (#56176)
* Add public bucket string

* Fix lint

(cherry picked from commit d32c67b52a)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-03 08:47:39 -04:00
Grot (@grafanabot)
5c5590ec5f Docs: Update postgresql and mssql docs (#56011) (#56174)
* Update mssql docs first draft

* Update postgresql docs first draft

* update image tag

* add missing >

* Update docs/sources/datasources/mssql.md

* Update docs/sources/datasources/mssql.md

* Update docs/sources/datasources/postgres.md

* Update docs/sources/datasources/postgres.md

* Update docs/sources/datasources/postgres.md

* Reflect updated image names

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
(cherry picked from commit 3342e529b4)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-10-03 14:17:08 +02:00
Grot (@grafanabot)
8560b492c5 Docs: update mysql docs to reflect editor changes (#54568) (#56173)
* Docs: update mysql docs to reflect visual query builder/code editor changes

* Apply suggestions from code review

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>

* Add missing >

* Reflect updated image name

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit 885e8efec6)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-10-03 14:16:32 +02:00
Grot (@grafanabot)
29bb039c94 CI: Move grafanacom command to OSS (#55853) (#56168)
* Move publish-packages command over from

* Fix lint

* Move grafanacom command to OSS

* Add GetLatestMainBuild to gsutil

* Fix lint

* More lint fixes

* Add tests for grafanacom

* Fix lint

(cherry picked from commit 947838cca0)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-10-03 14:30:11 +03:00
Grot (@grafanabot)
fcf605e07f Grafana UI: Prevent built storybook being bundled with package (#56158) (#56164)
(cherry picked from commit d1b21a5981)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-10-03 12:32:41 +02:00
Grot (@grafanabot)
f2f49abe03 Canvas: Add text element (#56137) (#56139)
Co-authored-by: Drew Slobodnjak <drew08t@users.noreply.github.com>
(cherry picked from commit fc62f7ae23)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-09-30 20:35:16 -04:00
Grot (@grafanabot)
c0943153be Docs: Add link to TimescaleDB docs (#56134) (#56136)
* Added a link for more information

Added a link to TimescaleDB so that users can get additional information if need be.

* fixed formatting

* fixed the table

* made it prettier

* make it pretty for CI

Co-authored-by: Rajakavitha Kodhandapani <krajakavitha@gmail.com>
(cherry picked from commit ef1aa8ceb8)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-09-30 15:48:52 -07:00
Grot (@grafanabot)
403a834bfa Canvas: Rename textbox to rectangle (#55633) (#56127)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit 82d7f80a15)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2022-09-30 14:05:38 -04:00
Grot (@grafanabot)
33e5cde266 Canvas: Add canvas editor options to inline editor (#55970) (#56124)
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
(cherry picked from commit 2eb24bbc4e)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-09-30 13:34:38 -04:00
Grot (@grafanabot)
211e9896bc @grafana/ui: Render PageToolbar Go Back icon for smaller window size (#55671) (#56120)
(cherry picked from commit 9958f938e0)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-09-30 11:47:55 -04:00
Grot (@grafanabot)
fa99d31acf Core: Implement aria attributes for query rows, improve a11y (#55563) (#56081)
* feat: add aria-expanded prop

* refactor: remove console.log()

* feat: add aria-controls

* refactor: add id to expendable section

* refactor: create unique id

(cherry picked from commit fc6afc6b84)

Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
2022-09-30 16:43:39 +02:00
Grot (@grafanabot)
4decec3c8e [v9.2.x] Docs: Added icon type improvements to plugin migration guide (#56083)
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-09-30 13:28:30 +02:00
Grot (@grafanabot)
aae3a73381 fix wrong context height (#56024) (#56046)
(cherry picked from commit 3afa3f5e21)

Co-authored-by: Sven Grossmann <Svennergr@gmail.com>
2022-09-29 12:23:00 -04:00
Grot (@grafanabot)
27e76f5c7a docs: fix typo in is_null expression explainer (#55988) (#56037)
(cherry picked from commit 46da77d1a0)

Co-authored-by: Mike McFarland <roketworks@users.noreply.github.com>
2022-09-29 10:23:41 -05:00
Grot (@grafanabot)
d10d842024 CI: Move publish-packages command over from grabpl (#55850) (#56007)
* Move publish-packages command over from

* Lint fixes

* Update test

(cherry picked from commit 9a68f8704f)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-09-29 17:57:55 +03:00
Christopher Moyer
8c306dfe53 Docs: manual backport (#55945)
* resolves merge conflict

* resolves conflicts
2022-09-29 07:38:14 -05:00
Grot (@grafanabot)
08d12df9f3 Loki/Prometheus: Fix adding of ad hoc filters when jumping from dashboard to explore (#55915) (#55992)
* Loki, Prometheus: Fix adding of ad hoc filters when jumping from dashbaord to explore

* Update

(cherry picked from commit 21a99fba7e)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-09-29 13:47:37 +02:00
Grot (@grafanabot)
29826e0eb8 Security: Fix CVE-2022-27664 (#55361) (#55937)
* Fix CVE-2022-27664

* update golang.org/x/sys in go.sum

(cherry picked from commit 4ffa0532f0)

Co-authored-by: emerson_gong <emerson_gong@hotmail.com>
2022-09-29 06:14:29 -04:00
Sven Grossmann
bde8a1b2e1 Logs: Show copy button independently from context (#55934) (#55993)
(cherry picked from commit 998a368c69)
2022-09-29 11:50:22 +02:00
Grot (@grafanabot)
020494f87a Toolkit: Put back publishConfig access public (#55983) (#55986)
(cherry picked from commit 5c5228da61)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-09-29 04:44:40 -04:00
Jack Westbrook
50a59305b5 Toolkit: Fix script failures due to missing import paths (#55857) (#55981)
* fix(toolkit): package without dist folder so config file paths are correct

* chore(packages): make sure to bundle readme, changelog and apache2 license

* refactor(packages): recursively copy src when prepacking toolkit

* chore(toolkit): lock down babel dependencies. use grafana-eslint-config@5 for TS4.8 support

(cherry picked from commit b81f90cd0c)
2022-09-29 10:25:44 +02:00
Grot (@grafanabot)
32da26ec52 Alerting: fix alert supported warning when editing data source name (#55886) (#55943)
(cherry picked from commit ef641ea9c9)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2022-09-29 10:24:50 +02:00
Grot (@grafanabot)
db9b11c650 Geomap: Fix tooltip display option (#55956) (#55965)
(cherry picked from commit b0cd511ecc)

Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
2022-09-28 17:55:23 -07:00
Grot (@grafanabot)
9b0d2034dc Canvas: Fix inline edit toggle crash (#55961) (#55967)
(cherry picked from commit 5a9dfd7173)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-09-28 18:44:40 -04:00
Grot (@grafanabot)
4eb27f194e BarChart: add negY transform to fieldConfig overrides (#55930) (#55958)
(cherry picked from commit 16c9c858b8)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-28 16:52:59 -04:00
Grot (@grafanabot)
7429b3f894 Canvas: Fix resource picker folder UX (#55877) (#55879)
(cherry picked from commit d9d7bff793)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-09-28 15:44:33 -04:00
Grot (@grafanabot)
6dce936b65 PublicDashboards: Allow disabling an existent public dashboard if it has template variables (#55778) (#55953)
(cherry picked from commit b370a8e366)

Co-authored-by: Ezequiel Victorero <ezequiel.victorero@grafana.com>
2022-09-28 14:50:42 -04:00
Grot (@grafanabot)
9fd622e549 Tempo: Fix unexpected trimming of leading zeroes in traceID (#55167) (#55929)
* tempo: fix unexpected trim traceID leading zero (#55166)

* fix lint

(cherry picked from commit c6dffb11a4)

Co-authored-by: Jimmie Han <hanjinming@outlook.com>
2022-09-28 17:34:12 +02:00
Grot (@grafanabot)
e4e421a8e6 Docs: Document Reporting API (#55434) (#55942)
* Docs: Document reporting api

* Update docs/sources/developers/http_api/reporting.md

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update docs/sources/developers/http_api/reporting.md

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Update docs/sources/developers/http_api/reporting.md

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>

* Document the rest of endpoints

* Document more endpoints

* Fix scopes and links

* Remove rendering endpoints

* Fix status codes

* Apply review feedback

* Typo

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
(cherry picked from commit 71578d0932)

Co-authored-by: Tania <yalyna.ts@gmail.com>
2022-09-28 17:09:55 +02:00
Grot (@grafanabot)
6f32c12628 Tracing: Fix bug where errors are not reported to OTel (#55925) (#55931)
(cherry picked from commit 6aef353b59)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2022-09-28 10:07:16 -04:00
Grot (@grafanabot)
1c19fa164a Make LocalStorageProvider react to storage events (#55810) (#55817)
(cherry picked from commit 53a39e5037)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2022-09-28 09:02:00 -04:00
Grot (@grafanabot)
c4f955de84 TimeSeries: clamp log-y-axis min to 1 when decimals=0 (#55882) (#55918)
(cherry picked from commit 4ff7917039)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-28 07:53:24 -04:00
Grot (@grafanabot)
48a49eaa9a fix index file for website (#55907) (#55913)
(cherry picked from commit 43dc92d12c)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2022-09-28 12:18:24 +01:00
Grot (@grafanabot)
ce6aaa1a37 AzureMonitor: Correctly update subscriptions value in ARG editor (#55860) (#55911)
* Correctly update subscriptions prop in query

* Simplify setting of subscriptions value

(cherry picked from commit 37aa45001f)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-09-28 07:12:16 -04:00
Grot (@grafanabot)
d5d2654dc5 Remove prepare-release.yml (#55893) (#55895)
(cherry picked from commit 46037cff56)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-09-28 05:05:49 -04:00
Grot (@grafanabot)
3a864b7b27 Documentation: clarify label matching (#55650) (#55890)
* Documentation: clarify label matching

Behaviour in case of multiple matchers is not documented, but my experiments show they are reduced using logical AND. Please validate the updated description.

* Accept wording suggestion

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

* Accept suggestion for docs/sources/alerting/fundamentals/annotation-label/labels-and-label-matchers.md

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

* Improve wording according to review suggestions

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

Co-authored-by: Vladimir <greatvovan@gmail.com>
2022-09-28 09:19:08 +01:00
Grot (@grafanabot)
fed02859fd Thresholds: Add option for dashed line style (#55875) (#55885)
(cherry picked from commit bd50fd1606)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-28 03:03:57 -04:00
Grot (@grafanabot)
731d506c72 TimeSeries: fix log-y-axis tick label skipping when decimals=0 (#55868) (#55874)
(cherry picked from commit b8da1ffdc3)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-09-27 16:49:40 -05:00
Grot (@grafanabot)
d86fc082fb Links: Fix opening links from different orgs on the same tab (#55837) (#55869)
* Skip intercepting links of different orgs

* Check if orgId is present on query params

* Use locationSearchToObject instead of parseKeyValue

* Revert locationSearchToObject to parseKeyValue

(cherry picked from commit 2a12644778)

Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
2022-09-27 17:46:49 -03:00
Garrett Guillotte
39c4ba5e67 Docs: Add screenshots to What's New in v9.2 (#55862) (#55865)
* Docs: Add What's New in Grafana v9.2 Beta

* Docs: Add links to What's New in Grafana v9.2

* Docs: Apply updates to What's New

(cherry picked from commit 1485209287)
2022-09-27 11:29:32 -07:00
Grot (@grafanabot)
77991d976f Docs: Add What's New in Grafana v9.2 Beta (#55855) (#55859)
(cherry picked from commit 3409979288)

Co-authored-by: Garrett Guillotte <100453168+gguillotte-grafana@users.noreply.github.com>
2022-09-27 11:12:38 -07:00
Grot (@grafanabot)
d132d8a555 Canvas: Fix icon element resizing (#55854)
(cherry picked from commit e160f19247)

Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
2022-09-27 12:08:23 -04:00
Grot (@grafanabot)
47f8bf1b11 Revert public dashboard granularity fix (#55844) (#55852)
(cherry picked from commit 6674407d3f)

Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
2022-09-27 12:57:37 -03:00
Grot (@grafanabot)
4a653c7d31 XYChart further improvements (#55152) (#55846)
* Tooltip shows all data facets. Renamed options

* Add per series line style

* Remove line style option from manual panel options

* Refactored tooltip view

* sets selected after switch to manual

* remove facet prefixes

* in manual mode pull series names from config options, not y facet

* unused import

* Point size

* x & y axes labels

* Fix manual series prep

* betterer

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit 3361f2c62d)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-09-27 11:33:04 -04:00
Grot (@grafanabot)
5242194721 Replace armhf with armhfp for RPMs (#55814) (#55828)
(cherry picked from commit 2a3f423e10)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-09-27 10:07:41 -04:00
Grot (@grafanabot)
db52b3b03b Explore: Prevent panes from disappearing when resizing window in split view (#55696) (#55827)
(cherry picked from commit 0a5aa19ca2)

Co-authored-by: Kristina <kristina.durivage@grafana.com>
2022-09-27 10:01:00 -04:00
Grot (@grafanabot)
6af96f9cd1 ReleaseNotes: Updated changelog for 9.2.0-beta1 (#55788) (#55808)
* ReleaseNotes: Updated changelog and release notes for 9.2.0-beta1

* Remove release notes

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>
(cherry picked from commit da7797014a)
2022-09-27 13:25:23 +02:00
Grot (@grafanabot)
3931787027 "Release: Updated versions in package to 9.2.0-beta.1" (#55787) 2022-09-27 13:14:06 +02:00
Grot (@grafanabot)
5f50e98d12 Alerting: Fix a typo in alerting rule annotation docs (#55730) (#55799)
(cherry picked from commit 85c26ea908)

Co-authored-by: Martin Lehmann <martin@lehmann.tech>
2022-09-27 06:02:12 -04:00
Grot (@grafanabot)
9ab3fa611f Fix: use type=button in editor (#55731) (#55792)
(cherry picked from commit 4cd4bc84b5)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-09-27 09:51:09 +01:00
Grot (@grafanabot)
cddf4eea49 Docs: first draft of share panel with support docs (#55170) (#55777)
(cherry picked from commit 2bbc7c40e9)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-09-26 15:59:02 -05:00
Grot (@grafanabot)
d097fb2e28 AzureMonitor: Add region params (#55763) (#55766)
* Ensure region params are included

* Fix betterer results change

(cherry picked from commit 53c61b49bf)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2022-09-26 18:12:13 +01:00
Grot (@grafanabot)
ff550df32f Correlations: Only return correlation for which both source and target datasources exist (#55454) (#55744)
* Correlation: only return correlation for which both source and targe ds exist

* add test

(cherry picked from commit d07abdd23c)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-09-26 14:53:25 +01:00
715 changed files with 97812 additions and 7494 deletions

View File

@@ -1639,7 +1639,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "8"],
[0, 0, 0, "Do not use any type assertions.", "9"],
[0, 0, 0, "Do not use any type assertions.", "10"],
[0, 0, 0, "Do not use any type assertions.", "11"]
[0, 0, 0, "Do not use any type assertions.", "11"],
[0, 0, 0, "Do not use any type assertions.", "12"],
[0, 0, 0, "Do not use any type assertions.", "13"]
],
"packages/grafana-ui/src/components/Table/TableCell.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
@@ -1692,7 +1694,10 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
[0, 0, 0, "Unexpected any. Specify a different type.", "12"]
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
[0, 0, 0, "Unexpected any. Specify a different type.", "15"]
],
"packages/grafana-ui/src/components/Tags/Tag.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
@@ -4225,8 +4230,7 @@ exports[`better eslint`] = {
],
"public/app/features/dimensions/editors/ResourceDimensionEditor.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
],
"public/app/features/dimensions/editors/ResourcePicker.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
@@ -6001,11 +6005,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
[0, 0, 0, "Do not use any type assertions.", "15"],
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
[0, 0, 0, "Unexpected any. Specify a different type.", "18"]
[0, 0, 0, "Do not use any type assertions.", "14"],
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
[0, 0, 0, "Unexpected any. Specify a different type.", "16"]
],
"public/app/plugins/datasource/elasticsearch/components/AddRemove.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
@@ -7848,8 +7850,7 @@ exports[`better eslint`] = {
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
],
"public/app/plugins/panel/canvas/utils.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/plugins/panel/dashlist/module.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
@@ -8957,6 +8958,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Do not use any type assertions.", "10"],
[0, 0, 0, "Unexpected any. Specify a different type.", "11"]
],
"public/app/plugins/panel/xychart/TooltipView.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"public/app/plugins/panel/xychart/XYChartPanel2.tsx:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],

View File

@@ -7,7 +7,8 @@
load('scripts/drone/events/pr.star', 'pr_pipelines')
load('scripts/drone/events/main.star', 'main_pipelines')
load('scripts/drone/pipelines/docs.star', 'docs_pipelines')
load('scripts/drone/events/release.star', 'release_pipelines', 'publish_image_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline', 'artifacts_page_pipeline')
load('scripts/drone/events/release.star', 'release_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline', 'artifacts_page_pipeline')
load('scripts/drone/pipelines/publish_images.star', 'publish_image_pipelines_public', 'publish_image_pipelines_security')
load('scripts/drone/version.star', 'version_branch_pipelines')
load('scripts/drone/events/cron.star', 'cronjobs')
load('scripts/drone/vault.star', 'secrets')
@@ -15,7 +16,7 @@ load('scripts/drone/vault.star', 'secrets')
def main(ctx):
edition = 'oss'
return pr_pipelines(edition=edition) + main_pipelines(edition=edition) + release_pipelines() + \
publish_image_pipelines('public') + publish_image_pipelines('security') + \
publish_image_pipelines_public() + publish_image_pipelines_security() + \
publish_artifacts_pipelines('security') + publish_artifacts_pipelines('public') + \
publish_npm_pipelines('public') + publish_packages_pipeline() + artifacts_page_pipeline() + \
version_branch_pipelines() + cronjobs(edition=edition) + secrets()

1553
.drone.yml

File diff suppressed because it is too large Load Diff

View File

@@ -3,12 +3,12 @@ on:
workflow_dispatch:
inputs:
version:
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
required: true
default: '7.x.x'
workflow_call:
inputs:
version_call:
description: Needs to match, exactly, the name of a version
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
required: true
type: string
secrets:

View File

@@ -1,23 +0,0 @@
name: Prepare release
on:
workflow_dispatch:
inputs:
version_input:
description: 'The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
required: true
jobs:
call-bump-version:
uses: grafana/grafana/.github/workflows/bump-version.yml@main
with:
version_call: ${{ github.event.inputs.version_input }}
secrets:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
call-update-changelog:
uses: grafana/grafana/.github/workflows/update-changelog.yml@main
with:
version_call: ${{ github.event.inputs.version_input }}
secrets:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
needs: call-bump-version

View File

@@ -3,7 +3,7 @@ name: publish_docs
on:
push:
branches:
- main
- v9.2.x
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
@@ -30,7 +30,7 @@ jobs:
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- run: yarn install --immutable
- run: yarn install --immutable
- name: publish-to-git
uses: ./.github/actions/website-sync
id: publish
@@ -40,7 +40,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: |

20
.github/workflows/sbom-report.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: syft-sbom-ci
on:
release:
types: [created]
jobs:
syft-sbom:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Anchore SBOM Action
uses: anchore/sbom-action@v0.12.0
with:
artifact-name: ${{ github.event.repository.name }}-spdx.json

View File

@@ -4,11 +4,11 @@ on:
inputs:
version:
required: true
description: Needs to match, exactly, the name of a milestone
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
workflow_call:
inputs:
version_call:
description: Needs to match, exactly, the name of a milestone
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
required: true
type: string
secrets:
@@ -35,9 +35,9 @@ jobs:
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
- name: Run update changelog (workflow invoked)
if: ${{ inputs.version_call != '' }}
if: ${{ inputs.version != '' }}
uses: ./actions/update-changelog
with:
version_call: ${{ inputs.version_call }}
version_call: ${{ inputs.version }}
token: ${{ secrets.token }}
metricsWriteAPIKey: ${{ secrets.metricsWriteAPIKey }}

2
.gitignore vendored
View File

@@ -61,6 +61,7 @@ public/css/*.min.css
*.sublime-workspace
*.swp
.idea/
.fleet/
*.iml
*.tmp
.DS_Store
@@ -130,6 +131,7 @@ pkg/cmd/grafana-server/__debug_bin
/packages/**/.rpt2_cache
/packages/**/tsdoc-metadata.json
/packages/**/package.tgz
/packages/grafana-toolkit/sass
## CI places the packages in a different location
/npm-artifacts/*.tgz

View File

@@ -101,7 +101,7 @@ var config = {
rootElement: '.main-view',
// the unified alerting promotion alert's content contrast is too low
// see https://github.com/grafana/grafana/pull/41829
threshold: 4,
threshold: 5,
},
{
url: '${HOST}/datasources',

View File

@@ -1,3 +1,306 @@
<!-- 9.2.1 START -->
# 9.2.1 (2022-10-18)
### Features and enhancements
- **Alerting:** Improve notification policies created during migration. [#52071](https://github.com/grafana/grafana/pull/52071), [@JacobsonMT](https://github.com/JacobsonMT)
- **AzureAD:** Add option to force fetch the groups from the Graph API. [#56916](https://github.com/grafana/grafana/pull/56916), [@gamab](https://github.com/gamab)
- **AzureAD:** Add option to force fetch the groups from the Graph API (#56916). [#56947](https://github.com/grafana/grafana/pull/56947), [@gamab](https://github.com/gamab)
- **Docs:** Note end of release notes publication. [#57013](https://github.com/grafana/grafana/pull/57013), [@gguillotte-grafana](https://github.com/gguillotte-grafana)
- **Inspect:** Handle JSON tab crash when the provided object is too big to stringify. [#55939](https://github.com/grafana/grafana/pull/55939), [@TsotosA](https://github.com/TsotosA)
- **TablePanel:** Footer now updates values on column filtering. [#56354](https://github.com/grafana/grafana/pull/56354), [@mdvictor](https://github.com/mdvictor)
### Bug fixes
- **Alerting:** Fix email image embedding on Windows. [#56766](https://github.com/grafana/grafana/pull/56766), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Fix mathexp.NoData for ConditionsCmd. [#56816](https://github.com/grafana/grafana/pull/56816), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Legacy Alerting:** Fix duration calculation when testing a rule. [#56616](https://github.com/grafana/grafana/pull/56616), [@jorgelbg](https://github.com/jorgelbg)
- **Loki:** Propagate additional headers from Grafana to Loki when querying data. [#56896](https://github.com/grafana/grafana/pull/56896), [@alexweav](https://github.com/alexweav)
- **Search:** Sort alphabetically in the folder view, increase the limit of the folder search from 50 to 1000. [#57141](https://github.com/grafana/grafana/pull/57141), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
- **TablePanel:** Fix last table column to be centered. [#56047](https://github.com/grafana/grafana/pull/56047), [@gitstart](https://github.com/gitstart)
### Plugin development fixes & changes
- **Grafana UI:** Export prop types for queryfield, modal and field components. [#57097](https://github.com/grafana/grafana/pull/57097), [@jackw](https://github.com/jackw)
- **Toolkit:** Fix `Cannot use import statement outside...` error in tests. [#57071](https://github.com/grafana/grafana/pull/57071), [@jackw](https://github.com/jackw)
<!-- 9.2.1 END -->
<!-- 9.2.0 START -->
# 9.2.0 (2022-10-11)
### Features and enhancements
- **Alerting:** Add Notification error feedback on contact points view. [#56225](https://github.com/grafana/grafana/pull/56225), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Allow created by to be manually set when there's no creator for silences. [#55952](https://github.com/grafana/grafana/pull/55952), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Expose info about notification delivery errors in a new /receivers endpoint. [#55429](https://github.com/grafana/grafana/pull/55429), [@santihernandezc](https://github.com/santihernandezc)
- **Alerting:** Update imported prometheus alertmanager version. [#56228](https://github.com/grafana/grafana/pull/56228), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Update imported prometheus alertmanager version. Backport (#56228). [#56430](https://github.com/grafana/grafana/pull/56430), [@joeblubaugh](https://github.com/joeblubaugh)
- **Alerting:** Write and Delete multiple alert instances. [#55350](https://github.com/grafana/grafana/pull/55350), [@joeblubaugh](https://github.com/joeblubaugh)
- **Core:** Implement aria attributes for query rows, improve a11y. [#55563](https://github.com/grafana/grafana/pull/55563), [@L-M-K-B](https://github.com/L-M-K-B)
- **Custom Branding:** Remove custom branding service. (Enterprise)
- **Custom branding:** Remove UI. (Enterprise)
- **DevEnv:** Adds docker block for clickhouse. [#55702](https://github.com/grafana/grafana/pull/55702), [@owensmallwood](https://github.com/owensmallwood)
- **Docker:** removes unneccesary use of edge repo. [#54567](https://github.com/grafana/grafana/pull/54567), [@xlson](https://github.com/xlson)
- **Explore:** Revert split pane resize feature. [#56310](https://github.com/grafana/grafana/pull/56310), [@Elfo404](https://github.com/Elfo404)
- **Frontend:** Make local storage items propagate to different tabs immediately. [#55810](https://github.com/grafana/grafana/pull/55810), [@oscarkilhed](https://github.com/oscarkilhed)
- **PublicDashboards:** Allow disabling an existent public dashboard if it …. [#55778](https://github.com/grafana/grafana/pull/55778), [@evictorero](https://github.com/evictorero)
- **QueryEditorRow:** Only pass error to query editor if panel is not in a loading state. [#56350](https://github.com/grafana/grafana/pull/56350), [@kevinwcyu](https://github.com/kevinwcyu)
- **Reports:** Refresh query variables on time range change. (Enterprise)
- **XYChart:** Beta release. [#55973](https://github.com/grafana/grafana/pull/55973), [@mdvictor](https://github.com/mdvictor)
- **[9.2.x] Alerting:** Start ticker only when scheduler starts (#56339). [#56418](https://github.com/grafana/grafana/pull/56418), [@yuri-tceretian](https://github.com/yuri-tceretian)
### Bug fixes
- **Alerting:** Fix pq: missing FROM-clause for table "a". [#56453](https://github.com/grafana/grafana/pull/56453), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **AzureMonitor:** Correctly update subscriptions value in ARG editor. [#55860](https://github.com/grafana/grafana/pull/55860), [@aangelisc](https://github.com/aangelisc)
- **Chore:** Fix swagger validation failures. (Enterprise)
- **Chore:** Regenerate swagger specification and fix validation failures. [#55750](https://github.com/grafana/grafana/pull/55750), [@joshhunt](https://github.com/joshhunt)
- **Correlations:** Only return correlation for which both source and target datasources exist. [#55454](https://github.com/grafana/grafana/pull/55454), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Prevent panes from disappearing when resizing window in split view. [#55696](https://github.com/grafana/grafana/pull/55696), [@gelicia](https://github.com/gelicia)
- **Links:** Fix opening links from different orgs on the same tab. [#55837](https://github.com/grafana/grafana/pull/55837), [@guicaulada](https://github.com/guicaulada)
- **LogContext:** Fix scroll position in upper context group. [#56370](https://github.com/grafana/grafana/pull/56370), [@svennergr](https://github.com/svennergr)
- **Logs:** Show copy button independently from context. [#55934](https://github.com/grafana/grafana/pull/55934), [@svennergr](https://github.com/svennergr)
- **Loki/Prometheus:** Fix adding of ad hoc filters when jumping from dashboard to explore. [#55915](https://github.com/grafana/grafana/pull/55915), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add support for range aggregations with by grouping. [#56184](https://github.com/grafana/grafana/pull/56184), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Fix label-value escaping in context query. [#56614](https://github.com/grafana/grafana/pull/56614), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix redundant escaping in adhoc filter with regex match. [#56447](https://github.com/grafana/grafana/pull/56447), [@ivanahuckova](https://github.com/ivanahuckova)
- **PanelEdit:** Fixes resize pane border and spacing issues. [#56190](https://github.com/grafana/grafana/pull/56190), [@torkelo](https://github.com/torkelo)
- **PublicDashboards:** Fix dashboard insights query when Public Dashboard feature is enabled. (Enterprise)
- **PublicDashboards:** Fix dashboard insights query when Public Dashboard feature is enabled. (Enterprise)
- **RBAC:** Redirect to /login when forceLogin is set. [#56469](https://github.com/grafana/grafana/pull/56469), [@sakjur](https://github.com/sakjur)
- **SAML:** Fix RelayState generation function. (Enterprise)
- **Security:** Fix CVE-2022-27664. [#55361](https://github.com/grafana/grafana/pull/55361), [@yong-jie-gong](https://github.com/yong-jie-gong)
- **StateTimeline:** Fix tooltip showing erroneously in shared crosshair dashboards. [#55809](https://github.com/grafana/grafana/pull/55809), [@mdvictor](https://github.com/mdvictor)
- **Tempo:** Fix unexpected trimming of leading zeroes in traceID. [#55167](https://github.com/grafana/grafana/pull/55167), [@hanjm](https://github.com/hanjm)
- **Tracing:** Fix bug where errors are not reported to OpenTelemetry. [#55925](https://github.com/grafana/grafana/pull/55925), [@sakjur](https://github.com/sakjur)
<!-- 9.2.0 END -->
<!-- 9.2.0-beta1 START -->
# 9.2.0-beta1 (2022-09-26)
### Features and enhancements
- **AccessControl:** Move GetCacheKey to SignedInUser. [#53591](https://github.com/grafana/grafana/pull/53591), [@mgyongyosi](https://github.com/mgyongyosi)
- **AccessControl:** Move GetCacheKey to SignedInUser. (Enterprise)
- **Admin:** Add support to configure default admin email. [#54363](https://github.com/grafana/grafana/pull/54363), [@mhuangwm](https://github.com/mhuangwm)
- **Admin:** Create/Edit Team/ServiceAccount UI changes. [#53889](https://github.com/grafana/grafana/pull/53889), [@mgyongyosi](https://github.com/mgyongyosi)
- **Alert list panel:** Add view mode "Stat". [#53281](https://github.com/grafana/grafana/pull/53281), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Add alert preview to cloud rules editor. [#54950](https://github.com/grafana/grafana/pull/54950), [@konrad147](https://github.com/konrad147)
- **Alerting:** Add new API endpoint GET /api/v1/ngalert. [#55134](https://github.com/grafana/grafana/pull/55134), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Add templates autocomplete. [#53655](https://github.com/grafana/grafana/pull/53655), [@konrad147](https://github.com/konrad147)
- **Alerting:** Adds support for editing group details for Grafana managed rules. [#53120](https://github.com/grafana/grafana/pull/53120), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Change default alert state to Error on execution error or timeout. [#55345](https://github.com/grafana/grafana/pull/55345), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Display alert's 'Created' time in local time instead of UTC. [#54414](https://github.com/grafana/grafana/pull/54414), [@mmusenbr](https://github.com/mmusenbr)
- **Alerting:** Improve Mimir AM interoperability with Grafana. [#53396](https://github.com/grafana/grafana/pull/53396), [@konrad147](https://github.com/konrad147)
- **Alerting:** Improve validation of query and expressions on rule submit. [#53258](https://github.com/grafana/grafana/pull/53258), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Read group details before saving. [#53586](https://github.com/grafana/grafana/pull/53586), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Resolve stale state. [#49352](https://github.com/grafana/grafana/pull/49352), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Support for re-ordering alert rules in a group. [#53318](https://github.com/grafana/grafana/pull/53318), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Update embedded Alertmanager v0.24. [#53555](https://github.com/grafana/grafana/pull/53555), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update forking request handlers to use the same errors. [#52965](https://github.com/grafana/grafana/pull/52965), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Write and Delete multiple alert instances. [#52305](https://github.com/grafana/grafana/pull/52305), [@joeblubaugh](https://github.com/joeblubaugh)
- **Annotation:** Optionally allow storing longer annotation tags. [#54754](https://github.com/grafana/grafana/pull/54754), [@papagian](https://github.com/papagian)
- **Auth:** Add SAML common resolutions to cookie issues. [#55395](https://github.com/grafana/grafana/pull/55395), [@Jguer](https://github.com/Jguer)
- **Auth:** Add cli command users-manager for conflict resolution. [#52344](https://github.com/grafana/grafana/pull/52344), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Add documentation on group overage claims in AzureAD. [#55389](https://github.com/grafana/grafana/pull/55389), [@Jguer](https://github.com/Jguer)
- **Auth:** Extend auth token errors with user ID. [#54633](https://github.com/grafana/grafana/pull/54633), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Auth:** Reduce allocs in permission map. [#55410](https://github.com/grafana/grafana/pull/55410), [@Jguer](https://github.com/Jguer)
- **Auth:** Restore legacy behavior and add deprecation notice for empty org role in oauth. [#55118](https://github.com/grafana/grafana/pull/55118), [@Jguer](https://github.com/Jguer)
- **AzureMonitor:** Automate retrieval of supported Metrics namespaces. [#53203](https://github.com/grafana/grafana/pull/53203), [@aangelisc](https://github.com/aangelisc)
- **Build:** Replace the file-loader loader with asset module in webpack config. [#53088](https://github.com/grafana/grafana/pull/53088), [@academo](https://github.com/academo)
- **Chore:** Group auth docker blocks. [#54274](https://github.com/grafana/grafana/pull/54274), [@linoman](https://github.com/linoman)
- **Chore:** Upgrade Go to 1.19.1. [#54902](https://github.com/grafana/grafana/pull/54902), [@sakjur](https://github.com/sakjur)
- **Cleanup:** Add traces to cleanup jobs. [#55465](https://github.com/grafana/grafana/pull/55465), [@sakjur](https://github.com/sakjur)
- **CloudMonitor:** Remove cloudMonitoringExperimentalUI feature flag. [#55054](https://github.com/grafana/grafana/pull/55054), [@asimpson](https://github.com/asimpson)
- **CloudWatch:** Add AWS/States metrics. [#55427](https://github.com/grafana/grafana/pull/55427), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Add missing AWS/ApiGateway metrics. [#53839](https://github.com/grafana/grafana/pull/53839), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Add missing AWS/Events metrics. [#53831](https://github.com/grafana/grafana/pull/53831), [@jangaraj](https://github.com/jangaraj)
- **CloudWatch:** Enable feature adoption tracking in the plugin. [#54299](https://github.com/grafana/grafana/pull/54299), [@sunker](https://github.com/sunker)
- **CloudWatch:** Log group variable should get all log groups. [#54062](https://github.com/grafana/grafana/pull/54062), [@iwysiu](https://github.com/iwysiu)
- **CloudWatch:** Refactoring - decouple logs and metrics in datasource file. [#55079](https://github.com/grafana/grafana/pull/55079), [@sunker](https://github.com/sunker)
- **Correlations:** Add GetCorrelation(s) HTTP APIs. [#52517](https://github.com/grafana/grafana/pull/52517), [@Elfo404](https://github.com/Elfo404)
- **Custom branding:** Add RBAC (early access). (Enterprise)
- **Custom branding:** Add preview for the settings (early access). (Enterprise)
- **Dashboard:** Support Variables in "Filter by Name" Transformation. [#51804](https://github.com/grafana/grafana/pull/51804), [@Kirchen99](https://github.com/Kirchen99)
- **DashboardQuery:** Expand query options. [#53998](https://github.com/grafana/grafana/pull/53998), [@ryantxu](https://github.com/ryantxu)
- **Docs:** Deprecating packages_api and removing it from our pipelines. [#54473](https://github.com/grafana/grafana/pull/54473), [@tolzhabayev](https://github.com/tolzhabayev)
- **Docs:** Update annotations API docs to include required field. [#52644](https://github.com/grafana/grafana/pull/52644), [@HarryTennent](https://github.com/HarryTennent)
- **Echo:** Add support for Google Analytics 4. [#55446](https://github.com/grafana/grafana/pull/55446), [@joshhunt](https://github.com/joshhunt)
- **Elasticsearch:** Respect time range in ad hoc filters. [#53874](https://github.com/grafana/grafana/pull/53874), [@gabor](https://github.com/gabor)
- **Explore:** Add Mixed Datasource. [#53429](https://github.com/grafana/grafana/pull/53429), [@gelicia](https://github.com/gelicia)
- **Explore:** Add resize to split view, with Min/Max button. [#54420](https://github.com/grafana/grafana/pull/54420), [@gelicia](https://github.com/gelicia)
- **Footer:** Add release notes url to version label. [#52909](https://github.com/grafana/grafana/pull/52909), [@kianelbo](https://github.com/kianelbo)
- **Geomap:** Add Africa, Australia, Oceania, South Asia, and East Asia as initial view options. [#55142](https://github.com/grafana/grafana/pull/55142), [@zuchka](https://github.com/zuchka)
- **Geomap:** Add dynamic initial view options. [#54419](https://github.com/grafana/grafana/pull/54419), [@drew08t](https://github.com/drew08t)
- **Grafana Backend:** Establish a database version support policy. [#54374](https://github.com/grafana/grafana/pull/54374), [@joeblubaugh](https://github.com/joeblubaugh)
- **Grafana UI:** Add implicit submit to TimeRangeForm for A11y. [#52647](https://github.com/grafana/grafana/pull/52647), [@matejkubinec](https://github.com/matejkubinec)
- **Grafana/ui:** Adds all unicons to IconName and script to generate types. [#53820](https://github.com/grafana/grafana/pull/53820), [@academo](https://github.com/academo)
- **GrafanaUI:** Add icon to links on Plugin configuration page. [#55581](https://github.com/grafana/grafana/pull/55581), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **GrafanaUI:** Deprecate logs components. [#55364](https://github.com/grafana/grafana/pull/55364), [@gabor](https://github.com/gabor)
- **GraphPanel:** Panel Description box does not expand to fit markdown table. [#54238](https://github.com/grafana/grafana/pull/54238), [@gitstart](https://github.com/gitstart)
- **Icons:** Move unicons icons to the repository and generate the iconsBundle.js with nodejs. [#53766](https://github.com/grafana/grafana/pull/53766), [@academo](https://github.com/academo)
- **InfluxDB:** Remove browser ('direct' access) mode. [#53529](https://github.com/grafana/grafana/pull/53529), [@obetomuniz](https://github.com/obetomuniz)
- **JWT:** Add support for assigning org roles. [#54277](https://github.com/grafana/grafana/pull/54277), [@nrwiersma](https://github.com/nrwiersma)
- **JWT:** Allow conventional bearer token in Authorization header. [#54821](https://github.com/grafana/grafana/pull/54821), [@nrwiersma](https://github.com/nrwiersma)
- **Live:** Migrate to centrifuge-js v3 (new API and client protocol). [#51977](https://github.com/grafana/grafana/pull/51977), [@FZambia](https://github.com/FZambia)
- Load icons using webpack context instead of react-inlinesvg library. [#53675](https://github.com/grafana/grafana/pull/53675), [@academo](https://github.com/academo)
- **Login:** Allow basic users to reset password when LDAP or Auth Proxy is enabled. [#52331](https://github.com/grafana/grafana/pull/52331), [@krzysdabro](https://github.com/krzysdabro)
- **Login:** Remove single admin team restriction. [#54534](https://github.com/grafana/grafana/pull/54534), [@linoman](https://github.com/linoman)
- **Logs:** Relocate "show context" button, add copy line log button. [#50977](https://github.com/grafana/grafana/pull/50977), [@Seyaji](https://github.com/Seyaji)
- **Loki Query Variables:** Add support to select from existing labels. [#54625](https://github.com/grafana/grafana/pull/54625), [@matyax](https://github.com/matyax)
- **Loki/Prometheus:** Make sections in log/metrics browser resizable. [#54704](https://github.com/grafana/grafana/pull/54704), [@gwdawson](https://github.com/gwdawson)
- **Loki/Prometheus:** Remove beta tag from query builder. [#55150](https://github.com/grafana/grafana/pull/55150), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add validation to derived fields url field setting. [#53599](https://github.com/grafana/grafana/pull/53599), [@matyax](https://github.com/matyax)
- **Loki:** Create Variable Query Editor for Loki. [#54102](https://github.com/grafana/grafana/pull/54102), [@matyax](https://github.com/matyax)
- **MSSQL:** Migrate to React. [#51765](https://github.com/grafana/grafana/pull/51765), [@zoltanbedi](https://github.com/zoltanbedi)
- **Metrics:** Instrument requests not matching any handler as `notfound`. [#53949](https://github.com/grafana/grafana/pull/53949), [@bergquist](https://github.com/bergquist)
- **Navigation Bar:** Remove plugins link under Server Admin. [#54386](https://github.com/grafana/grafana/pull/54386), [@academo](https://github.com/academo)
- **Navigation:** Don't round app plugin icon images. [#54543](https://github.com/grafana/grafana/pull/54543), [@joshhunt](https://github.com/joshhunt)
- **OAuth:** Allow assigning Server Admin. [#54780](https://github.com/grafana/grafana/pull/54780), [@Jguer](https://github.com/Jguer)
- **Panel edit:** Run queries when time range changes in table view. [#53111](https://github.com/grafana/grafana/pull/53111), [@axelavargas](https://github.com/axelavargas)
- **Panels:** Add panel debug support helper. [#54678](https://github.com/grafana/grafana/pull/54678), [@ryantxu](https://github.com/ryantxu)
- **Playlists:** Migrate to UIDs and load dashboards in the frontend. [#54125](https://github.com/grafana/grafana/pull/54125), [@ryantxu](https://github.com/ryantxu)
- **Plugins:** Add feature toggles for long running queries. [#54349](https://github.com/grafana/grafana/pull/54349), [@kevinwcyu](https://github.com/kevinwcyu)
- **Plugins:** Add secure JSON fields to plugin setting DTO. [#55313](https://github.com/grafana/grafana/pull/55313), [@wbrowne](https://github.com/wbrowne)
- **Plugins:** Handle app plugin proxy routes per request. [#51835](https://github.com/grafana/grafana/pull/51835), [@marefr](https://github.com/marefr)
- **Plugins:** Use error plane for api/ds/query. [#54750](https://github.com/grafana/grafana/pull/54750), [@wbrowne](https://github.com/wbrowne)
- **Preferences:** Support setting any dashboard as home, not just the starred ones. [#54258](https://github.com/grafana/grafana/pull/54258), [@ryantxu](https://github.com/ryantxu)
- **Prometheus:** Add dashboard uid when tracing header in browsermode. [#53232](https://github.com/grafana/grafana/pull/53232), [@lpskdl](https://github.com/lpskdl)
- **Prometheus:** Throw error on direct access. [#50162](https://github.com/grafana/grafana/pull/50162), [@aocenas](https://github.com/aocenas)
- **Prometheus:** Upgrades http client to 1.30. [#53901](https://github.com/grafana/grafana/pull/53901), [@bergquist](https://github.com/bergquist)
- **Prometheus:** Upgrades the prometheus http client to 1.13. [#47707](https://github.com/grafana/grafana/pull/47707), [@yesoreyeram](https://github.com/yesoreyeram)
- **PublicDashboard:** Add RTK Query with loading and error state. Add MSW dependency for testing. [#55518](https://github.com/grafana/grafana/pull/55518), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Add RBAC to secured endpoints. [#54544](https://github.com/grafana/grafana/pull/54544), [@evictorero](https://github.com/evictorero)
- **PublicDashboards:** Add link to public dashboards docs to sharing modal. [#55186](https://github.com/grafana/grafana/pull/55186), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Disable form when user does not has permissions. [#54853](https://github.com/grafana/grafana/pull/54853), [@evictorero](https://github.com/evictorero)
- **PublicDashboards:** Dont support exemplars. [#54933](https://github.com/grafana/grafana/pull/54933), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Ignore time range input and changes on public dashboard. [#55412](https://github.com/grafana/grafana/pull/55412), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Log api layer errors and which datasources fail/succeed. [#55056](https://github.com/grafana/grafana/pull/55056), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Render tag when dashboard meta changes in state. [#55414](https://github.com/grafana/grafana/pull/55414), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Resolve interval for public dashboard data source. [#55489](https://github.com/grafana/grafana/pull/55489), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Sanitize metadata from public dashboard queries. [#55269](https://github.com/grafana/grafana/pull/55269), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** UI improvements. [#55130](https://github.com/grafana/grafana/pull/55130), [@juanicabanas](https://github.com/juanicabanas)
- **Query editor:** Allow query editors to create new query. [#55028](https://github.com/grafana/grafana/pull/55028), [@ivanahuckova](https://github.com/ivanahuckova)
- **RBAC:** Add cache for oss rbac permissions. [#55098](https://github.com/grafana/grafana/pull/55098), [@kalleep](https://github.com/kalleep)
- **RBAC:** Add endpoints for reading and updating role assignments. (Enterprise)
- **RBAC:** Add permissions to install and configure plugins. [#51829](https://github.com/grafana/grafana/pull/51829), [@gamab](https://github.com/gamab)
- **RBAC:** Display indicator if a permission is inherited. [#54080](https://github.com/grafana/grafana/pull/54080), [@kalleep](https://github.com/kalleep)
- **RBAC:** Only display unique permissions in list. [#54074](https://github.com/grafana/grafana/pull/54074), [@kalleep](https://github.com/kalleep)
- **RBAC:** Refactor delegation check to reduce db queries. (Enterprise)
- **RBAC:** Validate scopes during role creation. (Enterprise)
- **Report:** Keep report data on edit page refresh. (Enterprise)
- **Reports:** Allow CSV only option. (Enterprise)
- **Reports:** Render steps inside ReportPage. (Enterprise)
- **SAML:** Account for all orgs in org_mapping. (Enterprise)
- **SAML:** Add option to skip org role sync. [#55230](https://github.com/grafana/grafana/pull/55230), [@gamab](https://github.com/gamab)
- **SAML:** Add option to skip org role sync. (Enterprise)
- **SAML:** Allow wildcard mapping to add user to all existing orgs. [#55628](https://github.com/grafana/grafana/pull/55628), [@gamab](https://github.com/gamab)
- **SAML:** Do not SAML SLO if user is not SAML authenticated. [#53418](https://github.com/grafana/grafana/pull/53418), [@Jguer](https://github.com/Jguer)
- **SAML:** Improve SAML login flow. (Enterprise)
- **SQL:** Migrate (MS/My/Postgres)SQL configuration pages from Angular to React. [#51891](https://github.com/grafana/grafana/pull/51891), [@oscarkilhed](https://github.com/oscarkilhed)
- **Search:** Migrated impressions to use dashboardUID. [#53090](https://github.com/grafana/grafana/pull/53090), [@lpskdl](https://github.com/lpskdl)
- **Secrets:** Add fallback to secrets kvstore plugin. [#54056](https://github.com/grafana/grafana/pull/54056), [@guicaulada](https://github.com/guicaulada)
- **Secrets:** Convert secret migration to a background service. [#54676](https://github.com/grafana/grafana/pull/54676), [@guicaulada](https://github.com/guicaulada)
- **Secrets:** Implement secrets manager plugin fallback store. [#54496](https://github.com/grafana/grafana/pull/54496), [@guicaulada](https://github.com/guicaulada)
- **Secrets:** Improve error handling for secrets manager plugin. [#54811](https://github.com/grafana/grafana/pull/54811), [@guicaulada](https://github.com/guicaulada)
- **SegmentInput:** Omit allowCustomValue and allowEmptyValue props. [#55352](https://github.com/grafana/grafana/pull/55352), [@timagixe](https://github.com/timagixe)
- **Status History Panel:** Show X-Axis Value in Tooltip. [#54563](https://github.com/grafana/grafana/pull/54563), [@gitstart](https://github.com/gitstart)
- **TeamSync:** Add description to group mapping. (Enterprise)
- **TeamSync:** Prevent team syncing out of orgs mapped by auth method. (Enterprise)
- **Teams:** Add TeamRolePicker to the Create and Edit Team pages. [#53775](https://github.com/grafana/grafana/pull/53775), [@mgyongyosi](https://github.com/mgyongyosi)
- **Tempo:** Set the default query type even if queryType was set to 'clear'. [#53887](https://github.com/grafana/grafana/pull/53887), [@CrypticSignal](https://github.com/CrypticSignal)
- **Tempo:** Wrap the autocomplete value for a tag in double quotes. [#55610](https://github.com/grafana/grafana/pull/55610), [@CrypticSignal](https://github.com/CrypticSignal)
- **TextPanel:** Support code formats. [#53850](https://github.com/grafana/grafana/pull/53850), [@ryantxu](https://github.com/ryantxu)
- **TimeRangePicker:** Absolute timeranges with timezone. [#53763](https://github.com/grafana/grafana/pull/53763), [@mdvictor](https://github.com/mdvictor)
- **TimeSeries:** Support for log scale and negative numbers. [#54812](https://github.com/grafana/grafana/pull/54812), [@leeoniya](https://github.com/leeoniya)
- **TopNav:** Panel edit changes. [#54746](https://github.com/grafana/grafana/pull/54746), [@torkelo](https://github.com/torkelo)
- **Tracing:** Add new [tracing.opentelemetry] custom_attributes config setting. [#54110](https://github.com/grafana/grafana/pull/54110), [@hairyhenderson](https://github.com/hairyhenderson)
- **Transformations:** Add support for an inner join transformation. [#53865](https://github.com/grafana/grafana/pull/53865), [@AlexKaracaoglu](https://github.com/AlexKaracaoglu)
- **Transformers:** Support inner vs outer join. [#53913](https://github.com/grafana/grafana/pull/53913), [@ryantxu](https://github.com/ryantxu)
- **User management:** Use HMAC-SHA256 to generate time limit codes (password reset tokens). [#42334](https://github.com/grafana/grafana/pull/42334), [@andreasgerstmayr](https://github.com/andreasgerstmayr)
- **UsersTable:** Display Disabled flag in Organizations' Users table. [#53656](https://github.com/grafana/grafana/pull/53656), [@mgyongyosi](https://github.com/mgyongyosi)
- **Various Panels:** Add ability to toggle legend with keyboard shortcut. (Enterprise)
### Bug fixes
- **Alerting:** AlertingProxy to elevate permissions for request forwarded to data proxy when RBAC enabled. [#53620](https://github.com/grafana/grafana/pull/53620), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Auth:** Allow admins to manually change external user's role if `oauth_skip_org_role_update_sync` or saml `skip_org_role_sync` is enabled. [#55182](https://github.com/grafana/grafana/pull/55182), [@Jguer](https://github.com/Jguer)
- **AuthNZ:** Security fixes for CVE-2022-35957 and CVE-2022-36062. [#55503](https://github.com/grafana/grafana/pull/55503), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **ContextHandler:** Use standard library style middleware. [#54219](https://github.com/grafana/grafana/pull/54219), [@sakjur](https://github.com/sakjur)
- **ElasticSearch:** Fix lucene formatted variables being wrongly escaped. [#54981](https://github.com/grafana/grafana/pull/54981), [@svennergr](https://github.com/svennergr)
- **FIX:** RBAC prevents deleting empty snapshots. [#54385](https://github.com/grafana/grafana/pull/54385), [@gamab](https://github.com/gamab)
- **Fix:** Adjusting plugin.json schema regex. [#54515](https://github.com/grafana/grafana/pull/54515), [@tolzhabayev](https://github.com/tolzhabayev)
- **Fix:** Wrong swagger meta preventing spec generation. [#54181](https://github.com/grafana/grafana/pull/54181), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Histogram:** Fix panel hide when clicking on legend. [#53651](https://github.com/grafana/grafana/pull/53651), [@mdvictor](https://github.com/mdvictor)
- **Loki:** Hide loki sample queries from query inspector. [#55158](https://github.com/grafana/grafana/pull/55158), [@ivanahuckova](https://github.com/ivanahuckova)
- **Query Builder:** Fix spelling of "lose" in user visible message. [#53435](https://github.com/grafana/grafana/pull/53435), [@spazm](https://github.com/spazm)
- **RBAC:** Fix resolver issue on wildcard resulting in wrong status code for endpoints. [#54208](https://github.com/grafana/grafana/pull/54208), [@kalleep](https://github.com/kalleep)
- **Reports:** Fix starting value. (Enterprise)
- **StatPanel:** Add padding between horizontal name and value. [#55299](https://github.com/grafana/grafana/pull/55299), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
- **TablePanel:** Fix FooterRow styling for Safari and Firefox. [#55543](https://github.com/grafana/grafana/pull/55543), [@mdvictor](https://github.com/mdvictor)
- **TablePanel:** Fix vertical scrollbar. [#53457](https://github.com/grafana/grafana/pull/53457), [@mdvictor](https://github.com/mdvictor)
- **Tempo:** Fix typo in the tooltip for "Limit". [#53750](https://github.com/grafana/grafana/pull/53750), [@CrypticSignal](https://github.com/CrypticSignal)
- **Transformations:** Fix clearing of transformation select fields. [#53916](https://github.com/grafana/grafana/pull/53916), [@AlexKaracaoglu](https://github.com/AlexKaracaoglu)
- **Various Panels:** Fix Single right-aligned y-axis hiding gridlines. [#54206](https://github.com/grafana/grafana/pull/54206), [@gitstart](https://github.com/gitstart)
### Breaking changes
Dashboards: Remove the ability to open dashboard settings while panel edit is still open. Issue [#54746](https://github.com/grafana/grafana/issues/54746)
In InfluxDB, browser access mode was deprecated in Grafana 8.0.0 and removed in 9.2.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue [#53529](https://github.com/grafana/grafana/issues/53529)
In Prometheus, browser access mode was deprecated in Grafana 7.4.0 and removed in 9.2.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue [#50162](https://github.com/grafana/grafana/issues/50162)
Password reset links sent before the upgrade will no longer work and have to be resent. Since the duration of those links are only two hours we decided to not support both token formats. Issue [#42334](https://github.com/grafana/grafana/issues/42334)
### Deprecations
Google Analytics 'Universal Analytics' is deprecated by Google in favor of Google Analytics 4. See [Google's deprecation notice](https://support.google.com/analytics/answer/10089681?hl=en) for more details. After July 2023, Grafana's Google Analytics 'Universal Analytics' integration will be removed, along with the `analytics.google_analytics_ua_id` server config property. Configure Google Analytics 4 using the `analytics.google_analytics_4_id` server config property.
Issue [#55446](https://github.com/grafana/grafana/issues/55446)
The following components and functions related to logs are deprecated in the `grafana-ui` package: `LogLabels`, `LogMessageAnsi`, `LogRows`, `getLogRowStyles`.
Issue [#55364](https://github.com/grafana/grafana/issues/55364)
### Plugin development fixes & changes
- **GrafanaUI:** Add required behavior to Inline Field. [#54867](https://github.com/grafana/grafana/pull/54867), [@gefgu](https://github.com/gefgu)
- **CustomScrollbar:** Add optional scroll indicators to `CustomScrollbar`. [#54705](https://github.com/grafana/grafana/pull/54705), [@ashharrison90](https://github.com/ashharrison90)
- **Build:** Introduce ESM and Treeshaking to NPM package builds. [#51517](https://github.com/grafana/grafana/pull/51517), [@jackw](https://github.com/jackw)
<!-- 9.1.7 START -->
# 9.1.7 (2022-10-04)
### Features and enhancements
- **Chore:** Upgrade Go version to 1.19.1 (backport). [#55733](https://github.com/grafana/grafana/pull/55733), [@sakjur](https://github.com/sakjur)
- **CloudWatch:** Add missing AWS/Prometheus metrics. [#54990](https://github.com/grafana/grafana/pull/54990), [@jangaraj](https://github.com/jangaraj)
- **Explore:** Add feature tracking events. [#54514](https://github.com/grafana/grafana/pull/54514), [@L-M-K-B](https://github.com/L-M-K-B)
- **Graphite:** Add error information to graphite queries tracing. [#55249](https://github.com/grafana/grafana/pull/55249), [@jesusvazquez](https://github.com/jesusvazquez)
- **Prometheus:** Restore FromAlert header. [#55255](https://github.com/grafana/grafana/pull/55255), [@kylebrandt](https://github.com/kylebrandt)
- **SAML:** Account for all orgs in org_mapping (#3855). (Enterprise)
- **Search:** Add search index configuration options. [#55525](https://github.com/grafana/grafana/pull/55525), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
- **Thresholds:** Add option for dashed line style. [#55875](https://github.com/grafana/grafana/pull/55875), [@leeoniya](https://github.com/leeoniya)
### Bug fixes
- **Alerting:** Fix default query's data source when no default datasource specified. [#55435](https://github.com/grafana/grafana/pull/55435), [@konrad147](https://github.com/konrad147)
- **Alerting:** Fix mathexp.NoData cannot be reduced. [#55347](https://github.com/grafana/grafana/pull/55347), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Skip unsupported file types on provisioning. [#55573](https://github.com/grafana/grafana/pull/55573), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **AzureMonitor:** Ensure resourceURI template variable is migrated. [#56095](https://github.com/grafana/grafana/pull/56095), [@aangelisc](https://github.com/aangelisc)
- **Dashboard:** Fix plugin dashboard save as button. [#55197](https://github.com/grafana/grafana/pull/55197), [@lpskdl](https://github.com/lpskdl)
- **Docs:** Fix decimals: auto docs for panel edit. [#55477](https://github.com/grafana/grafana/pull/55477), [@joshhunt](https://github.com/joshhunt)
- **Fix:** RBAC handle `error no resolver` found. [#55676](https://github.com/grafana/grafana/pull/55676), [@gamab](https://github.com/gamab)
- **Fix:** RBAC handle `error no resolver` found. (Enterprise)
- **LibraryPanelSearch:** Refactor and fix hyphen issue. [#55314](https://github.com/grafana/grafana/pull/55314), [@kaydelaney](https://github.com/kaydelaney)
- **Live:** Fix live streaming with `live-service-web-worker` feature flag enabled. [#55528](https://github.com/grafana/grafana/pull/55528), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
- **QueryField:** Fix wrong cursor position on autocomplete. [#55576](https://github.com/grafana/grafana/pull/55576), [@svennergr](https://github.com/svennergr)
<!-- 9.1.7 END -->
<!-- 9.2.0-beta1 END -->
<!-- 9.1.6 START -->
# 9.1.6 (2022-09-20)

View File

@@ -20,7 +20,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.19.1-alpine3.15 as go-builder
FROM golang:1.19.2-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.19.1 AS go-builder
FROM golang:1.19.2 AS go-builder
WORKDIR /src/grafana

View File

@@ -541,6 +541,7 @@ allowed_domains =
allowed_groups =
role_attribute_strict = false
allow_assign_grafana_admin = false
force_use_graph_api = false
#################################### Okta OAuth #######################
[auth.okta]
@@ -632,6 +633,7 @@ allow_assign_grafana_admin = false
enabled = false
config_file = /etc/grafana/ldap.toml
allow_sign_up = true
skip_org_role_sync = false
# LDAP background sync (Enterprise only)
# At 1 am every day

View File

@@ -56,6 +56,7 @@ apiVersion: 1
# # <string> state of the alert rule when the query execution
# # fails - possible values: "Error", "Alerting", "OK"
# # default = Alerting
# executionErrorState: Alerting
# # <duration, required> how long the alert condition should be breached before Firing. Before this time has elapsed, the alert is considered to be Pending
# for: 60s
# # <map<string, string>> map of strings to attach arbitrary custom data

View File

@@ -623,6 +623,8 @@
;enabled = false
;config_file = /etc/grafana/ldap.toml
;allow_sign_up = true
# prevent synchronizing ldap users organization roles
;skip_org_role_sync = false
# LDAP background sync (Enterprise only)
# At 1 am every day

File diff suppressed because it is too large Load Diff

View File

@@ -125,8 +125,8 @@ async function main() {
await sleep(getNextSineWaveSleepDuration());
const timestampMs = new Date().getTime();
const item = getRandomLogItem(step + 1)
lokiSendLogLine(timestampMs, JSON.stringify(item), {place:'moon', source: 'data'});
lokiSendLogLine(timestampMs, logFmtLine(item), {place:'luna', source: 'data'});
lokiSendLogLine(timestampMs, JSON.stringify(item), {place:'moon', source: 'data', instance: 'server\\1', job: '"grafana/data"'});
lokiSendLogLine(timestampMs, logFmtLine(item), {place:'luna', source: 'data', instance: 'server\\2', job: '"grafana/data"'});
}
}

View File

@@ -55,15 +55,15 @@ title: Grafana documentation
<h4>Getting started</h4>
<p>Learn the basics of using Grafana.</p>
</a>
<a href="{{< relref "basics/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Grafana basics</h4>
<a href="{{< relref "fundamentals/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Grafana fundamentals</h4>
<p>Learn basic observability.</p>
</a>
<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/" >}}" class="nav-cards__item nav-cards__item--guide">
<a href="{{< relref "fundamentals/timeseries/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>Intro to time series</h4>
<p>Learn about time series data.</p>
</a>
@@ -71,8 +71,8 @@ title: Grafana documentation
<h4>Provisioning</h4>
<p>Learn how to automate your Grafana configuration.</p>
</a>
<a href="{{< relref "whatsnew/whats-new-in-v9-1/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>What's new in v9.1</h4>
<a href="{{< relref "whatsnew/whats-new-in-v9-2/" >}}" class="nav-cards__item nav-cards__item--guide">
<h4>What's new in v9.2</h4>
<p>Explore the features and enhancements in the latest release.</p>
</a>

View File

@@ -8,6 +8,7 @@ aliases:
- /docs/grafana/latest/enterprise/license-restrictions/
- /docs/grafana/latest/enterprise/license/license-restrictions/
- /docs/grafana/latest/administration/enterprise-licensing/
- /docs/grafana/latest/administration/enterprise-licensing/license-restrictions/
description: Activate and manage a Grafana Enterprise license
keywords:
- grafana

View File

@@ -111,4 +111,4 @@ In this task you configure Grafana Enterprise to validate the license with AWS i
1. To restart Grafana and activate your license, update the service running Grafana to use the latest revision of the task definition that you created.
1. After you update the service, navigate to your Grafana instance, sign in with Grafana Admin credentials, and navigate to the **Statistics and Licensing** page to validate that your license is active.
For more information about validating that your license is active, refer to [Determine the number of active users for each licensed role](../../license-restrictions/#determine-the-number-of-active-users-for-each-licensed-role).
For more information about validating that your license is active, refer to [Grafana Enterprise license restrictions]({{< relref "../../#grafana-enterprise-license-restrictions" >}}).

View File

@@ -319,7 +319,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/" >}}), 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/build-dashboards/view-dashboard-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.
@@ -852,7 +852,7 @@ policies:
# <duration> How long to wait before sending a notification about new alerts that
# are added to a group of alerts for which an initial notification has
# already been sent. (Usually ~5m or more), default = 5m
group_internval: 5m
group_interval: 5m
# <duration> How long to wait before sending a notification again if it has already
# been sent successfully for an alert. (Usually ~3h or more), default = 4h
repeat_interval: 4h

View File

@@ -78,7 +78,7 @@ Grafana Enterprise includes the ability for you to assign discrete fixed roles t
Assign fixed roles when the basic roles do not meet your permission requirements. For example, you might want a user with the basic viewer role to also edit dashboards. Or, you might want anyone with the editor role to also add and manage users. Fixed roles provide users more granular access to create, view, and update the following Grafana resources:
- [Alerting]({{< relref "../../../alerting/" >}})
- [Annotations]({{< relref "../../../dashboards/annotations/" >}})
- [Annotations]({{< relref "../../../dashboards/build-dashboards/annotate-visualizations" >}})
- [API keys]({{< relref "../../api-keys/" >}})
- [Dashboards and folders]({{< relref "../../../dashboards/" >}})
- [Data sources]({{< relref "../../../datasources/" >}})

View File

@@ -17,6 +17,8 @@ A user can be a Member or an Administrator for a given team. Members of a team i
For more information about teams, refer to [Teams and permissions]({{< relref "../roles-and-permissions/#teams-and-permissions" >}}).
For information about how to optimize your teams, refer to [How to best organize your teams and resources in Grafana](https://grafana.com/blog/2022/03/14/how-to-best-organize-your-teams-and-resources-in-grafana/).
## Create a team
A team is a group of users within an organization that have common dashboard and data source permission needs. Use teams to help make user-permission management more efficient.

View File

@@ -9,16 +9,16 @@ keywords:
- alerting
- alerts
- groups
title: View alert groupings
title: View alert groups
weight: 445
---
# View alert groupings
# View alert groups
To view alert groupings:
To view alert groups:
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **Alert grouping** to open the page listing existing groups.
1. Click **Alert groups** to open the page listing existing groups.
1. From the **Alertmanager** drop-down, select an external Alertmanager as your data source. By default, the `Grafana` Alertmanager is selected.
1. From **custom group by** drop-down, select a combination of labels to view a grouping other than the default. This is useful for debugging and verifying your grouping of notification policies.

View File

@@ -25,7 +25,7 @@ Watch this video to learn more about creating alerts: {{< vimeo 720001934 >}}
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/" >}}) or [expressions]({{< relref "../../panels/query-a-data-source/use-expressions-to-manipulate-data/about-expressions/" >}}).
- Add one or more [queries]({{< relref "../../panels-visualizations/query-transform-data/#add-a-query/" >}}) or [expressions]({{< relref "../../panels-visualizations/query-transform-data/expression-queries/" >}}).
- 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.
- Next, select the query or expression for your alert condition.
@@ -67,7 +67,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/" >}}).
For more information, see [expressions documentation]({{< relref "../../panels-visualizations/query-transform-data/expression-queries/" >}}).
### No data and error handling

View File

@@ -27,7 +27,7 @@ Grafana allows you to create alerting rules for an external Grafana Mimir or Lok
- **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.
- **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.
- **Grafana Mimir** - use the `/prometheus` prefix. 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.
Watch this video to learn more about how to create a Mimir managed alert rule: {{< vimeo 720001865 >}}

View File

@@ -18,7 +18,7 @@ Grafana supports several alert rule types, the following sections will explain t
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.
In additional to supporting any datasource you can also add additional [expressions]({{< relref "../../../panels-visualizations/query-transform-data/expression-queries/" >}}) to transform your data and express alert conditions.
## Mimir, Loki and Cortex rules

View File

@@ -9,34 +9,34 @@ weight: 116
# Alertmanager
The Alertmanager helps both group and manage alert rules, adding a layer of orchestration on top of the alerting engines. To learn more, see [Prometheus Alertmanager documentation](https://prometheus.io/docs/alerting/latest/alertmanager/).
Alertmanager enables you to quickly and efficiently manage and respond to alerts. It receives alerts, handles silencing, inhibition, grouping, and routing by sending notifications out via your channel of choice, for example, email or Slack.
Grafana includes built-in support for Prometheus Alertmanager. By default, notifications for Grafana managed alerts are handled by the embedded Alertmanager that is part of core Grafana. You can configure the Alertmanager's contact points, notification policies, silences, and templates from the alerting UI by selecting the `Grafana` option from the Alertmanager drop-down.
In Grafana, you can use the Cloud Alertmanager, Grafana Alertmanager, or an external Alertmanager. You can also run multiple alertmanagers; your decision depends on your set up and where your alerts are being generated.
> **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.
**Cloud Alertmanager**
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.
Cloud Alertmanager runs in Grafana Cloud and it can receive alerts from Grafana, Mimir, and Loki.
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" max-width="250px" caption="Select Alertmanager" >}}
**Grafana Alertmanager**
You can configure one or several external Alertmanagers to receive alerts from Grafana. Once configured, both the embedded Alertmanager **and** any configured external Alertmanagers will receive _all_ alerts.
Grafana Alertmanager is an internal Alertmanager that is pre-configured and available for selection by default if you run Grafana on-premise or open-source.
You can do the setup in the "Admin" tab within the Grafana v8 Alerts UI.
The Grafana Alertmanager can receive alerts from Grafana, but it cannot receive alerts from outside Grafana, for example, from Mimir or Loki.
### Add a new external Alertmanager
**External Alertmanager**
1. In the Grafana menu, click the Alerting (bell) icon to open the Alerting page listing existing alerts.
2. Click **Admin** and then scroll down to the External Alertmanager section.
3. Click **Add Alertmanager** and a modal opens.
4. Add the URL and the port for the external Alertmanager. You do not need to specify the path suffix, for example, `/api/v(1|2)/alerts`. Grafana automatically adds this.
If you want to use a single alertmanager to receive all your Grafana, Loki, Mimir, and Prometheus alerts, you can set up Grafana to use an external Alertmanager. This external Alertmanager can be configured and administered from within Grafana itself.
The external URL is listed in the table with a pending status. Once Grafana verifies that the Alertmanager is discovered, the status changes to active. No requests are made to the external Alertmanager at this point; the verification signals that alerts are ready to be sent.
Here are two examples of when you may want to configure your own external alertmanager and send your alerts there instead of the Grafana Alertmanager:
### Edit an external Alertmanager
1. You may already have alertmanagers on-premise in your own Cloud infrastructure that you have set up and still want to use, because you have other alert generators, such as Prometheus.
1. Click the pen symbol to the right of the Alertmanager row in the table.
2. When the edit modal opens, you can view all the URLs that were added.
2. You want to use both Prometheus on-premise and hosted Grafana to send alerts to the same alertmanager that runs in your Cloud infrastructure.
The edited URL will be pending until Grafana verifies it again.
Alertmanagers are visible from the drop-down menu on the Alerting Contact Points, Notification Policies, and Silences pages.
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/ext-alertmanager-active.png" max-width="650px" caption="External Alertmanagers" >}}
**Useful links**
[Prometheus Alertmanager documentation](https://prometheus.io/docs/alerting/latest/alertmanager/)
[Add an external Alertmanager](https://grafana.com/docs/grafana/latest/alerting/set-up/configure-alertmanager/)

View File

@@ -16,7 +16,7 @@ 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/" >}}) and [template functions]({{< relref "../../contact-points/fundamentals/annotation-label/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/fundamentals/annotation-label/template-functions/" >}}) to create notification content dynamically.
## Annotations

View File

@@ -30,15 +30,18 @@ A label matchers consists of 3 distinct parts, the **label**, the **value** and
| `=~` | Select labels that regex-match the value. |
| `!~` | Select labels that do not regex-match the value. |
## Example of a label matcher
If you are using multiple label matchers, they are combined using the AND logical operator. This means that all matchers must match in order to link a rule to a policy.
Imagine we've defined the following set of labels for our alert.
## Example scenario
If you define the following set of labels for your alert:
`{ foo=bar, baz=qux, id=12 }`
In this situation,
then:
- A label matcher defined as `foo=bar` will match this alert rule.
- A label matcher defined as `foo!=bar` will _not_ match this alert rule.
- A label matcher defined as `id=~[0-9]+` will match this alert rule.
- A label matcher defined as `baz!~[0-9]+` will match this alert rule.
- A label matcher defined as `foo=bar` matches this alert rule.
- A label matcher defined as `foo!=bar` does _not_ match this alert rule.
- A label matcher defined as `id=~[0-9]+` matches this alert rule.
- A label matcher defined as `baz!~[0-9]+` matches this alert rule.
- Two label matchers defined as `foo=bar` and `id=~[0-9]+` match this alert rule.

View File

@@ -58,7 +58,7 @@ You can configure grouping to be `group_by: [alertname]` (take note that the `en
1. To add a top level specific policy, go to the **Specific routing** section and click **New specific policy**.
1. In **Matching labels** section, add one or more rules for matching alert labels. For more information, see ["Labels and label matchers"]({{< relref "../fundamentals/annotation-label/labels-and-label-matchers/" >}}).
1. In **Contact point**, add the [contact point]({{< relref "../contact-points/" >}}) to send notification to if alert matches only this specific policy and not any of the nested policies.
1. Optionally, enable **Continue matching subsequent sibling nodes** to continue matching nested policies even after the alert matched the parent policy. When this option is enabled, you can get more than one notification. Use it to send notification to a catch-all contact point as well as to one of more specific contact points handled by nested policies.
1. Optionally, enable **Continue matching subsequent sibling nodes** to continue matching sibling policies even after the alert matched the current policy. When this option is enabled, you can get more than one notification for one alert.
1. Optionally, enable **Override grouping** to specify the same grouping as the root policy. If this option is not enabled, the root policy grouping is used.
1. Optionally, enable **Override general timings** to override the timing options configured in the group notification policy.
1. Click **Save policy** to save your changes.

View File

@@ -8,29 +8,29 @@ keywords:
- alerting
- set up
- configure
- Alertmanager
title: Configure Alertmanager
- external Alertmanager
title: Add an external Alertmanager
weight: 100
---
# Configure Alertmanager
# Add an external Alertmanager
Configure Alertmanager from Grafana Alerting to group and manage alert rules, adding a layer of orchestration on top of your external alerting engine.
Set up Grafana to use an external Alertmanager as a single Alertmanager to receive all of your alerts. This external Alertmanager can then be configured and administered from within Grafana itself.
## Add a new external Alertmanager
Once you have added the Alertmanager, you can use the Grafana Alerting UI to manage silences, contact points, and notification policies. A drop-down option in these pages allows you to switch between alertmanagers.
1. In the Grafana menu, click the Alerting (bell) icon to open the Alerting page listing existing alerts.
2. Click **Admin** and then scroll down to the External Alertmanager section.
3. Click **Add Alertmanager** and a modal opens.
4. Add the URL and the port for the external Alertmanager. You do not need to specify the path suffix, for example, `/api/v(1|2)/alerts`. Grafana automatically adds this.
**Note:**
Starting with Grafana 9.2, the URL configuration of external alertmanagers from the Admin tab on the Alerting page is deprecated. It will be removed in a future release.
The external URL is listed in the table with a pending status. Once Grafana verifies that the Alertmanager is discovered, the status changes to active. No requests are made to the external Alertmanager at this point; the verification signals that alerts are ready to be sent.
External alertmanagers should now be configured as data sources using Grafana Configuration from the main Grafana navigation menu. This enables you to manage the contact points and notification policies of external alertmanagers from within Grafana and also encrypts HTTP basic authentication credentials that were previously visible when configuring external alertmanagers by URL.
### Edit an external Alertmanager
To add an external Alertmanager, complete the following steps.
1. Click the pen symbol to the right of the Alertmanager row in the table.
2. When the edit modal opens, you can view all the URLs that were added.
1. Click Configuration and then Data sources.
2. Search for Alertmanager.
3. Choose your Implementation and fill out the fields on the page, as required.
The edited URL will be pending until Grafana verifies it again.
**Note:**
Prometheus, Grafana Mimir, and Cortex implementations of Alertmanager are supported. For Prometheus, contact points and notification policies are read-only in the Grafana Alerting UI.
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/ext-alertmanager-active.png" max-width="650px" caption="External Alertmanagers" >}}
4. Click Save & test.

View File

@@ -0,0 +1,40 @@
---
aliases:
- /docs/grafana/latest/alerting/provision-alerting-resources
- /docs/grafana/latest/alerting/provision-alerting-resources
description: Provision alerting resources
keywords:
- grafana
- alerting
- set up
- configure
- provisioning
title: Provision Grafana Alerting resources
weight: 200
---
# Provision Grafana Alerting resources
Alerting infrastructure is often complex, with many pieces of the pipeline that often live in different places. Scaling this across multiple teams and organizations is an especially challenging task. Grafana Alerting provisioning makes this process easier by enabling you to create, manage, and maintain your alerting data in a way that best suits your organization.
There are three options to choose from:
1. Use file provisioning to provision your Grafana Alerting resources, such as alert rules and contact points, through files on disk.
1. Provision your alerting resources using the Grafana HTTP API.
For more information on the Grafana Alerting provisioning API, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/).
1. Provision your alerting resources using Terraform.
**Note:**
Currently, provisioning for Grafana Alerting supports alert rules, contact points, mute timings, and templates. Provisioned alerting resources can only be edited in the source that created them and not from within Grafana or any other source. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
**Useful Links:**
[Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/)
[Grafana Cloud provisioning](https://grafana.com/docs/grafana-cloud/infrastructure-as-code/terraform/)
[Grafana Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning)

View File

@@ -1,44 +1,18 @@
---
aliases:
- /docs/grafana/latest/alerting/provision-alerting-resources
- /docs/grafana/latest/alerting/provision-alerting-resources
description: Provision alerting resources
- /docs/grafana/latest/alerting/provision-alerting-resources/file-provisioning
- /docs/grafana/latest/alerting/provision-alerting-resources/file-provisioning
description: Create and manage resources using file provisioning
keywords:
- grafana
- alerting
- set up
- configure
- alerting resources
- file provisioning
- provisioning
title: Provision Grafana Alerting resources
weight: 200
title: Create and manage alerting resources using file provisioning
weight: 100
---
# Provision Grafana Alerting resources
Alerting infrastructure is often complex, with many pieces of the pipeline that often live in different places. Scaling this across multiple teams and organizations is an especially challenging task. Grafana Alerting provisioning makes this process easier by enabling you to create, manage, and maintain your alerting data in a way that best suits your organization.
There are three options to choose from:
1. Use file provisioning to provision your Grafana Alerting resources, such as alert rules and contact points, through files on disk.
1. Provision your alerting resources using the Grafana HTTP API.
For more information on the Grafana Alerting provisioning API, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/).
1. Provision your alerting resources using Terraform.
**Note:**
Currently, provisioning for Grafana Alerting supports alert rules, contact points, mute timings, and templates. Provisioned alerting resources can only be edited in the source that created them and not from within Grafana or any other source. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
**Useful Links:**
[Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/)
[Grafana Cloud provisioning](https://grafana.com/docs/grafana-cloud/infrastructure-as-code/terraform/)
[Grafana Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning)
## Create and manage alerting resources using file provisioning
Provision your alerting resources using files from disk. When you start Grafana, the data from these files is created in your Grafana system. Grafana adds any new resources you created, updates any that you changed, and deletes old ones.
@@ -57,11 +31,11 @@ Create or delete alert rules in your Grafana instance(s).
1. Create an alert rule in Grafana.
1. Use the [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/admin/#reload-provisioning-configurations) to extract the alert rule.
1. Copy the contents into a YAML or JSON configuration file.
1. Copy the contents into a YAML or JSON configuration file in the default provisioning directory or in your configured directory.
Example configuration files can be found below.
1. Add the file(s) to your GitOps workflow, so that they deploy alongside your Grafana instance(s).
1. Ensure that your files are in the right directory on the node running the Grafana server, so that they deploy alongside your Grafana instance(s).
1. Delete the alert rule in Grafana.
**Note:**

View File

@@ -0,0 +1,316 @@
---
aliases:
- /docs/grafana/latest/alerting/provision-alerting-resources/terraform-provisioning
description: Create and manage alerting resources using Terraform
keywords:
- grafana
- alerting
- alerting resources
- provisioning
- Terraform
title: Create and manage alerting resources using Terraform
weight: 200
---
# Create and manage alerting resources using Terraform
Use Terraforms Grafana Provider to manage your alerting resources and provision them into your Grafana system. Terraform provider support for Grafana Alerting makes it easy to create, manage, and maintain your entire Grafana Alerting stack as code.
For more information on managing your alerting resources using Terraform, refer to the [Grafana Provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs) documentation.
Complete the following tasks to create and manage your alerting resources using Terraform.
1. Create an API key for provisioning.
1. Configure the Terraform provider.
1. Provision your alerting resources.
## Before you begin
- Ensure you have the grafana/grafana [Terraform provider](https://registry.terraform.io/providers/grafana/grafana/1.28.0) 1.27.0 or higher.
- Ensure you are using Grafana 9.1 or higher.
## Create an API key for provisioning
You can [create a normal Grafana API key](https://grafana.com/docs/grafana/latest/administration/api-keys/) to authenticate Terraform with Grafana. Most existing tooling using API keys should automatically work with the new Grafana Alerting support.
There are also dedicated RBAC roles for alerting provisioning. This lets you easily authenticate as a [service account](https://grafana.com/docs/grafana/latest/administration/service-accounts/) with the minimum permissions needed to provision your Alerting infrastructure.
To create an API key for provisioning, complete the following steps.
1. Create a new service account for your CI pipeline.
1. Assign the role “Access the alert rules Provisioning API.”
1. Create a new service account token.
1. Name and save the token for use in Terraform.
Alternatively, you can use Terraform authentication: [basic auth](https://registry.terraform.io/providers/grafana/grafana/latest/docs#authentication).
## Configure the Terraform provider
Grafana Alerting support is included as part of the [Grafana Terraform provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs).
The following is an example you can use to configure the Terraform provider.
```terraform
terraform {
required_providers {
grafana = {
source = "grafana/grafana"
version = ">= 1.28.2"
}
}
}
provider "grafana" {
url = <YOUR_GRAFANA_URL>
auth = <YOUR_GRAFANA_API_KEY>
}
```
## Provision contact points and templates
Contact points connect an alerting stack to the outside world. They tell Grafana how to connect to your external systems and where to deliver notifications. There are over fifteen different integrations to choose from.
To provision contact points and templates, complete the following steps.
1. Copy this code block into a .tf file on your local machine.
This example uses a contact point that sends alert notifications to Slack.
```terraform
resource "grafana_contact_point" "my_slack_contact_point" {
name = "Send to My Slack Channel"
slack {
url = <YOUR_SLACK_WEBHOOK_URL>
text = <<EOT
{{ len .Alerts.Firing }} alerts are firing!
Alert summaries:
{{ range .Alerts.Firing }}
{{ template "Alert Instance Template" . }}
{{ end }}
EOT
}
}
```
1. Enter text for your notification in the text field.
The `text` field supports [Go-style templating](https://pkg.go.dev/text/template). This enables you to manage your Grafana Alerting message templates directly in Terraform.
1. Run the command terraform apply.
1. Go to the Grafana UI and check the details of your contact point.
**Note:**
You cannot edit resources provisioned from Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
1. Click **Test** to verify that the contact point works correctly.
**Note:**
You can re-use the same templates across many contact points. In the example above, a shared template ie embedded using the statement `{{ template “Alert Instance Template” . }}`
This fragment can then be managed separately in Terraform:
```terraform
resource "grafana_message_template" "my_alert_template" {
name = "Alert Instance Template"
template = <<EOT
{{ define "Alert Instance Template" }}
Firing: {{ .Labels.alertname }}
Silence: {{ .SilenceURL }}
{{ end }}
EOT
}
```
## Provision notification policies and routing
Notification policies tell Grafana how to route alert instances, as opposed to where. They connect firing alerts to your previously defined contact points using a system of labels and matchers.
To provision notification policies and routing, complete the following steps.
1. Copy this code block into a .tf file on your local machine.
In this example, the alerts are grouped by `alertname`, which means that any notifications coming from alerts which share the same name, are grouped into the same Slack message.
resource "grafana_notification_policy" "my_policy" {
group_by = ["alertname"]
contact_point = grafana_contact_point.my_slack_contact_point.name
group_wait = "45s"
group_interval = "6m"
repeat_interval = "3h"
policy {
matcher {
label = "a"
match = "="
value = "b"
}
group_by = ["..."]
contact_point = grafana_contact_point.a_different_contact_point.name
mute_timings = [grafana_mute_timing.my_mute_timing.name]
policy {
matcher {
label = "sublabel"
match = "="
value = "subvalue"
}
contact_point = grafana_contact_point.a_third_contact_point.name
group_by = ["..."]
}
}
}
1. In the mute_timings field, link a mute timing to your notification policy.
1. Run the command terraform apply.
1. Go to the Grafana UI and check the details of your notification policy.
**Note:**
You cannot edit resources provisioned from Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
1. Click **Test** to verify that the notification point is working correctly.
## Provision mute timings
Mute timings provide the ability to mute alert notifications for defined time periods.
To provision mute timings, complete the following steps.
1. Copy this code block into a .tf file on your local machine.
In this example, alert notifications are muted on weekends.
resource "grafana_mute_timing" "my_mute_timing" {
name = "My Mute Timing"
intervals {
times {
start = "04:56"
end = "14:17"
}
weekdays = ["saturday", "sunday", "tuesday:thursday"]
months = ["january:march", "12"]
years = ["2025:2027"]
}
}
1. Run the command terraform apply.
1. Go to the Grafana UI and check the details of your mute timing.
**Note:**
You cannot edit resources provisioned from Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
1. Click **Test** to verify that the mute timing is working correctly.
## Provision alert rules
[Alert rules](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/) enable you to alert against any Grafana data source. This can be a data source that you already have configured, or you can [define your data sources in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source) alongside your alert rules.
To provision alert rules, complete the following steps.
1. Create a data source to query and a folder to store your rules in.
In this example, the [TestData](https://grafana.com/docs/grafana/latest/datasources/testdata/) data source is used.
```terraform
resource "grafana_data_source" "testdata_datasource" {
name = "TestData"
type = "testdata"
}
resource "grafana_folder" "rule_folder" {
title = "My Rule Folder"
}
```
1. Define an alert rule.
For more information on alert rules, refer to [how to create Grafana-managed alerts](https://grafana.com/blog/2022/08/01/grafana-alerting-video-how-to-create-alerts-in-grafana-9/).
1. Group your alert rules.
In this example, the `grafana_rule_group` resource group is used.
```terraform
resource "grafana_rule_group" "my_rule_group" {
name = "My Alert Rules"
folder_uid = grafana_folder.rule_folder.uid
interval_seconds = 60
org_id = 1
rule {
name = "My Random Walk Alert"
condition = "C"
for = "0s"
// Query the datasource.
data {
ref_id = "A"
relative_time_range {
from = 600
to = 0
}
datasource_uid = grafana_data_source.testdata_datasource.uid
// `model` is a JSON blob that sends datasource-specific data.
// It's different for every datasource. The alert's query is defined here.
model = jsonencode({
intervalMs = 1000
maxDataPoints = 43200
refId = "A"
})
}
// The query was configured to obtain data from the last 60 seconds. Let's alert on the average value of that series using a Reduce stage.
data {
datasource_uid = "-100"
// You can also create a rule in the UI, then GET that rule to obtain the JSON.
// This can be helpful when using more complex reduce expressions.
model = <<EOT
{"conditions":[{"evaluator":{"params":[0,0],"type":"gt"},"operator":{"type":"and"},"query":{"params":["A"]},"reducer":{"params":[],"type":"last"},"type":"avg"}],"datasource":{"name":"Expression","type":"__expr__","uid":"__expr__"},"expression":"A","hide":false,"intervalMs":1000,"maxDataPoints":43200,"reducer":"last","refId":"B","type":"reduce"}
EOT
ref_id = "B"
relative_time_range {
from = 0
to = 0
}
}
// Now, let's use a math expression as our threshold.
// We want to alert when the value of stage "B" above exceeds 70.
data {
datasource_uid = "-100"
ref_id = "C"
relative_time_range {
from = 0
to = 0
}
model = jsonencode({
expression = "$B > 70"
type = "math"
refId = "C"
})
}
}
}
```
1. Go to the Grafana UI and check your alert rule.
You can see whether or not the alert rule is firing. You can also see a visualization of each of the alert rules query stages
When the alert fires, Grafana routes a notification through the policy you defined.
For example, if you chose Slack as a contact point, Grafanas embedded [Alertmanager](https://github.com/prometheus/alertmanager) automatically posts a message to Slack.

View File

@@ -0,0 +1,28 @@
---
aliases:
- /docs/grafana/latest/alerting/provision-alerting-resources/view-provisioned-resources
description: View provisioned resources in Grafana
keywords:
- grafana
- alerting
- alerting resources
- provisioning
title: View provisioned resources in Grafana
weight: 300
---
# View provisioned alerting resources in Grafana
Verify that your alerting resources were created in Grafana.
To view your provisioned resources in Grafana, complete the following steps.
1. Open your Grafana instance.
1. Navigate to Alerting.
1. Click an alerting resource folder, for example, Alert rules.
Provisioned resources are labeled **Provisioned**, so that it is clear that they were not created manually.
**Note:**
You cannot edit provisioned resources from Grafana. You can only change the resource properties by changing the provisioning file and restarting Grafana or carrying out a hot reload. This prevents changes being made to the resource that would be overwritten if a file is provisioned again or a hot reload is carried out.

View File

@@ -16,8 +16,6 @@ weight: 450
Use silences to stop notifications from one or more alerting rules. Silences do not prevent alert rules from being evaluated. Nor do they not stop alerting instances from being shown in the user interface. Silences only stop notifications from getting created. A silence lasts for only a specified window of time.
Silences do not prevent alert rules from being evaluated. They also do not stop alert instances from being shown in the user interface. Silences only prevent notifications from being created.
You can configure Grafana managed silences as well as silences for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager/" >}}). For more information, see [Alertmanager]({{< relref "../fundamentals/alertmanager/" >}}).
See also:

View File

@@ -19,7 +19,7 @@ Silences stop notifications from getting created and last for only a specified w
To add a silence:
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
2. On the Alerting page, click **Silences** to open the page listing existing contact points.
2. On the Alerting page, click **Silences** to open the page listing existing silences.
3. From Alertmanager drop-down, select an external Alertmanager to create and manage silences for the external data source. Otherwise, keep the default option of Grafana.
4. Click **New Silence** to open the Create silence page.
5. In **Silence start and end**, select the start and end date to indicate when the silence should go into effect and expire.

View File

@@ -1,30 +0,0 @@
---
aliases:
- /docs/grafana/latest/basics/exemplars/
description: Exemplars
keywords:
- grafana
- concepts
- exemplars
- prometheus
title: Exemplars
weight: 400
---
# Introduction to exemplars
An exemplar is a specific trace representative of measurement taken in a given time interval. While metrics excel at giving you an aggregated view of your system, traces give you a fine grained view of a single request; exemplars are a way to link the two.
Suppose your company website is experiencing a surge in traffic volumes. While more than eighty percent of the users are able to access the website in under two seconds, some users are experiencing a higher than normal response time resulting in bad user experience.
To identify the factors that are contributing to the latency, you must compare a trace for a fast response against a trace for a slow response. Given the vast amount of data in a typical production environment, it will be extremely laborious and time-consuming effort.
Use exemplars to help isolate problems within your data distribution by pinpointing query traces exhibiting high latency within a time interval. Once you localize the latency problem to a few exemplar traces, you can combine it with additional system based information or location properties to perform a root cause analysis faster, leading to quick resolutions to performance issues.
Support for exemplars is available for the Prometheus data source only. Once you enable the functionality, exemplars data is available by default. For more information on exemplar configuration and how to enable exemplars, refer to [configuring exemplars in Prometheus data source]({{< relref "../../datasources/prometheus/#configuring-exemplars" >}}).
Grafana shows exemplars alongside a metric in the Explore view and in dashboards. Each exemplar displays as a highlighted star. You can hover your cursor over an exemplar to view the unique traceID, which is a combination of a key value pair. To investigate further, click the blue button next to the `traceID` property.
{{< figure src="/static/img/docs/v74/exemplars.png" class="docs-image--no-shadow" max-width= "750px" caption="Screenshot showing the detail window of an Exemplar" >}}
Refer to [View exemplar data]({{< relref "view-exemplars/" >}}) for instructions on how to drill down and view exemplar trace details from metrics and logs. To know more about exemplars, refer to the blogpost [Intro to exemplars, which enable Grafana Tempos distributed tracing at massive scale](https://grafana.com/blog/2021/03/31/intro-to-exemplars-which-enable-grafana-tempos-distributed-tracing-at-massive-scale/).

View File

@@ -1,16 +0,0 @@
---
aliases:
- /docs/grafana/latest/best-practices/
description: Best practices for working with Grafana
title: Best practices
weight: 20
---
# Best practices
This section provides information about best practices for intermediate Grafana administrators and users. Click on each of the links before for more information.
- [Best practices for creating dashboards]({{< relref "best-practices-for-creating-dashboards/" >}})
- [Best practices for managing dashboards]({{< relref "best-practices-for-managing-dashboards/" >}})
- [Common observability strategies]({{< relref "common-observability-strategies/" >}})
- [Dashboard management maturity model]({{< relref "dashboard-management-maturity-levels/" >}})

View File

@@ -1,56 +0,0 @@
---
aliases:
- /docs/grafana/latest/best-practices/best-practices-for-creating-dashboards/
description: Best practices for creating dashboards in Grafana
title: Best practices for creating dashboards
weight: 100
---
# Best practices for creating dashboards
This page outlines some best practices to follow when creating Grafana dashboards.
## Before you begin
Here are some principles to consider before you create a dashboard.
### A dashboard should tell a story or answer a question
What story are you trying to tell with your dashboard? Try to create a logical progression of data, such as large to small or general to specific. What is the goal for this dashboard? (Hint: If the dashboard doesn't have a goal, then ask yourself if you really need the dashboard.)
Keep your graphs simple and focused on answering the question that you are asking. For example, if your question is "which servers are in trouble?", then maybe you don't need to show all the server data. Just show data for the ones in trouble.
### Dashboards should reduce cognitive load, not add to it
_Cognitive load_ is basically how hard you need to think about something in order to figure it out. Make your dashboard easy to interpret. Other users and future you (when you're trying to figure out what broke at 2AM) will appreciate it.
Ask yourself:
- Can I tell what exactly each graph represents? Is it obvious, or do I have to think about it?
- If I show this to someone else, how long will it take them to figure it out? Will they get lost?
### Have a monitoring strategy
It's easy to make new dashboards. It's harder to optimize dashboard creation and adhere to a plan, but it's worth it. This strategy should govern both your overall dashboard scheme and enforce consistency in individual dashboard design.
Refer to [Common observability strategies]({{< relref "common-observability-strategies/" >}}) and [Dashboard management maturity levels]({{< relref "dashboard-management-maturity-levels/" >}}) for more information.
### Write it down
Once you have a strategy or design guidelines, write them down to help maintain consistency over time. Check out this [Wikimedia runbook example](https://wikitech.wikimedia.org/wiki/Performance/Runbook/Grafana_best_practices).
## Best practices to follow
- When creating a new dashboard, make sure it has a meaningful name.
- If you are creating a dashboard to play or experiment, then put the word `TEST` or `TMP` in the name.
- Consider including your name or initials in the dashboard name or as a tag so that people know who owns the dashboard.
- Remove temporary experiment dashboards when you are done with them.
- If you create many related dashboards, think about how to cross-reference them for easy navigation. Refer to [Best practices for managing dashboards]({{< relref "best-practices-for-managing-dashboards/" >}}) for more information.
- Grafana retrieves data from a data source. A basic understanding of [data sources]({{< relref "../datasources/" >}}) in general and your specific is important.
- Avoid unnecessary dashboard refreshing to reduce the load on the network or backend. For example, if your data changes every hour, then you don't need to set the dashboard refresh rate to 30 seconds.
- Use the left and right Y-axes when displaying time series with different units or ranges.
- Add documentation to dashboards and panels.
- To add documentation to a dashboard, add a [Text panel visualization]({{< relref "../visualizations/text-panel/" >}}) to the dashboard. Record things like the purpose of the dashboard, useful resource links, and any instructions users might need to interact with the dashboard. Check out this [Wikimedia example](https://grafana.wikimedia.org/d/000000066/resourceloader?orgId=1).
- To add documentation to a panel, edit the panel settings and add a description. Any text you add will appear if you hover your cursor over the small `i` in the top left corner of the panel.
- Reuse your dashboards and enforce consistency by using [templates and variables]({{< relref "../dashboards/variables" >}}).
- Be careful with stacking graph data. The visualizations can be misleading, and hide important data. We recommend turning it off in most cases.

View File

@@ -1,39 +0,0 @@
---
aliases:
- /docs/grafana/latest/best-practices/best-practices-for-managing-dashboards/
description: Best practices for managing dashboards in Grafana
title: Best practices for managing dashboards
weight: 200
---
# Best practices for managing dashboards
This page outlines some best practices to follow when managing Grafana dashboards.
## Before you begin
Here are some principles to consider before you start managing dashboards.
### Strategic observability
There are several [common observability strategies]({{< relref "common-observability-strategies/" >}}). You should research them and decide whether one of them works for you or if you want to come up with your own. Either way, have a plan, write it down, and stick to it.
Adapt your strategy to changing needs as necessary.
### Maturity level
What is your dashboard maturity level? Analyze your current dashboard setup and compare it to the [Dashboard management maturity model]({{< relref "dashboard-management-maturity-levels/" >}}). Understanding where you are can help you decide how to get to where you want to be.
## Best practices to follow
- Avoid dashboard sprawl, meaning the uncontrolled growth of dashboards. Dashboard sprawl negatively affects time to find the right dashboard. Duplicating dashboards and changing “one thing” (worse: keeping original tags) is the easiest kind of sprawl.
- Periodically review the dashboards and remove unnecessary ones.
- If you create a temporary dashboard, perhaps to test something, prefix the name with `TEST: `. Delete the dashboard when you are finished.
- Copying dashboards with no significant changes is not a good idea.
- You miss out on updates to the original dashboard, such as documentation changes, bug fixes, or additions to metrics.
- In many cases copies are being made to simply customize the view by setting template parameters. This should instead be done by maintaining a link to the master dashboard and customizing the view with [URL parameters]({{< relref "../panels/configure-data-links/#data-link-variables" >}}).
- When you must copy a dashboard, clearly rename it and _do not_ copy the dashboard tags. Tags are important metadata for dashboards that are used during search. Copying tags can result in false matches.
- Maintain a dashboard of dashboards or cross-reference dashboards. This can be done in several ways:
- Create dashboard links, panel, or data links. Links can go to other dashboards or to external systems. For more information, refer to [Manage dashboard links]({{< relref "../dashboards/manage-dashboard-links/" >}}).
- Add a [Dashboard list panel]({{< relref "../visualizations/dashboard-list-panel/" >}}). You can then customize what you see by doing tag or folder searches.
- Add a [Text panel]({{< relref "../visualizations/text-panel/" >}}) and use markdown to customize the display.

View File

@@ -1,62 +0,0 @@
---
aliases:
- /docs/grafana/latest/best-practices/common-observability-strategies/
- /docs/grafana/latest/getting-started/strategies/
description: Common observability strategies
keywords:
- grafana
- intro
- guide
- concepts
- methods
title: Common observability strategies
weight: 300
---
# Common observability strategies
When you have a lot to monitor, like a server farm, you need a strategy to decide what is important enough to monitor. This page describes several common methods for choosing what to monitor.
A logical strategy allows you to make uniform dashboards and scale your observability platform more easily.
## Guidelines for usage
- The USE method tells you how happy your machines are, the RED method tells you how happy your users are.
- USE reports on causes of issues.
- RED reports on user experience and is more likely to report symptoms of problems.
- The best practice of alerting is to alert on symptoms rather than causes, so alerting should be done on RED dashboards.
## USE method
USE stands for:
- **Utilization -** Percent time the resource is busy, such as node CPU usage
- **Saturation -** Amount of work a resource has to do, often queue length or node load
- **Errors -** Count of error events
This method is best for hardware resources in infrastructure, such as CPU, memory, and network devices. For more information, refer to [The USE Method](http://www.brendangregg.com/usemethod.html).
## RED method
RED stands for:
- **Rate -** Requests per second
- **Errors -** Number of requests that are failing
- **Duration -** Amount of time these requests take, distribution of latency measurements
This method is most applicable to services, especially a microservices environment. For each of your services, instrument the code to expose these metrics for each component. RED dashboards are good for alerting and SLAs. A well-designed RED dashboard is a proxy for user experience.
For more information, refer to Tom Wilkie's blog post [The RED method: How to instrument your services](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services).
## The Four Golden Signals
According to the [Google SRE handbook](https://landing.google.com/sre/sre-book/chapters/monitoring-distributed-systems/#xref_monitoring_golden-signals), if you can only measure four metrics of your user-facing system, focus on these four.
This method is similar to the RED method, but it includes saturation.
- **Latency -** Time taken to serve a request
- **Traffic -** How much demand is placed on your system
- **Errors -** Rate of requests that are failing
- **Saturation -** How "full" your system is
[Here's an example from Grafana Play](https://play.grafana.org/d/000000109/the-four-golden-signals?orgId=1).

View File

@@ -1,73 +0,0 @@
---
aliases:
- /docs/grafana/latest/best-practices/dashboard-management-maturity-levels/
description: Explanation of dashboard management maturity model
title: Dashboard management maturity model
weight: 400
---
# Dashboard management maturity model
_Dashboard management maturity_ refers to how well-designed and efficient your dashboard ecosystem is. We recommend periodically reviewing your dashboard setup to gauge where you are and how you can improve.
Broadly speaking, dashboard maturity can be defined as low, medium, or high.
Much of the content for this topic was taken from the KubeCon 2019 talk [Fool-Proof Kubernetes Dashboards for Sleep-Deprived Oncalls](https://www.youtube.com/watch?v=YE2aQFiMGfY).
## Low - default state
At this stage, you have no coherent dashboard management strategy. Almost everyone starts here.
How can you tell you are here?
- Everyone can modify your dashboards.
- Lots of copied dashboards, little to no dashboard reuse.
- One-off dashboards that hang around forever.
- No version control (dashboard JSON in version control).
- Lots of browsing for dashboards, searching for the right dashboard. This means lots of wasted time trying to find the dashboard you need.
- Not having any alerts to direct you to the right dashboard.
## Medium - methodical dashboards
At this stage, you are starting to manage your dashboard use with methodical dashboards. You might have laid out a strategy, but there are some things you could improve.
How can you tell you are here?
- Prevent sprawl by using template variables. For example, you don't need a separate dashboard for each node, you can use query variables. Even better, you can make the data source a template variable too, so you can reuse the same dashboard across different clusters and monitoring backends.
Refer to the list of [Variable examples]({{< relref "../dashboards/variables/#examples-of-templates-and-variables" >}}) if you want some ideas.
- Methodical dashboards according to an [observability strategy]({{< relref "common-observability-strategies/" >}}).
- Hierarchical dashboards with drill-downs to the next level.
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/drill-down-example.png" caption="Example of using drill-down" >}}
- Dashboard design reflects service hierarchies. The example shown below uses the RED method (request and error rate on the left, latency duration on the right) with one row per service. The row order reflects the data flow.
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/service-hierarchy-example.png" caption="Example of a service hierarchy" >}}
- Compare like to like: split service dashboards when the magnitude differs. Make sure aggregated metrics don't drown out important information.
- Expressive charts with meaningful use of color and normalizing axes where you can.
- Example of meaningful color: Blue means it's good, red means it's bad. [Thresholds]({{< relref "../panels/configure-thresholds/" >}}) can help with that.
- Example of normalizing axes: When comparing CPU usage, measure by percentage rather than raw number, because machines can have a different number of cores. Normalizing CPU usage by the number of cores reduces cognitive load because the viewer can trust that at 100% all cores are being used, without having to know the number of CPUs.
- Directed browsing cuts down on "guessing."
- Template variables make it harder to “just browse” randomly or aimlessly.
- Most dashboards should be linked to by alerts.
- Browsing is directed with links. For more information, refer to [Manage dashboard links]({{< relref "../dashboards/manage-dashboard-links/" >}}).
- Version-controlled dashboard JSON.
## High - optimized use
At this stage, you have optimized your dashboard management use with a consistent and thoughtful strategy. It requires maintenance, but the results are worth it.
- Actively reducing sprawl.
- Regularly review existing dashboards to make sure they are still relevant.
- Only approved dashboards added to master dashboard list.
- Tracking dashboard use. If you're an Enterprise user, you can take advantage of [Usage insights]({{< relref "../dashboards/assess-dashboard-usage/" >}}).
- Consistency by design.
- Use scripting libraries to generate dashboards, ensure consistency in pattern and style.
- grafonnet (Jsonnet)
- grafanalib (Python)
- No editing in the browser. Dashboard viewers change views with variables.
- Browsing for dashboards is the exception, not the rule.
- Perform experimentation and testing in a separate Grafana instance dedicated to that purpose, not your production instance. When a dashboard in the test environment is proven useful, then add that dashboard to your main Grafana instance.

View File

@@ -3,26 +3,26 @@ aliases:
- /docs/grafana/latest/dashboards/
- /docs/grafana/latest/features/dashboard/dashboards/
title: Dashboards
weight: 80
weight: 70
---
# About Grafana dashboards
# Dashboards
A dashboard is a set of one or more [panels]({{< relref "../panels/" >}}) organized and arranged into one or more rows. Grafana ships with a variety of panels making it easy to construct the right queries, and customize the visualization so that you can create the perfect dashboard for your need. Each panel can interact with data from any configured Grafana [data source]({{< relref "../administration/data-source-management/" >}}).
A dashboard is a set of one or more [panels]({{< relref "../panels-visualizations/" >}}) organized and arranged into one or more rows. Grafana ships with a variety of panels making it easy to construct the right queries, and customize the visualization so that you can create the perfect dashboard for your need. Each panel can interact with data from any configured Grafana [data source]({{< relref "../administration/data-source-management/" >}}).
Dashboard snapshots are static. Queries and expressions cannot be re-executed from snapshots. As a result, if you update any variables in your query or expression, it will not change your dashboard data.
Before you begin, ensure that you have configured a data source. See also:
- [Use dashboards]({{< relref "use-dashboards/" >}})
- [Build dashboards]({{< relref "./build-dashboards" >}})
- [Create dashboard folders]({{< relref "./manage-dashboards/#create-a-dashboard-folder" >}})
- [Add and organize panels]({{< relref "add-organize-panels/" >}})
- [Manage dashboards]({{< relref "./manage-dashboards" >}})
- [Public dashboards]({{< relref "dashboard-public/" >}})
- [Annotations]({{< relref "annotations/" >}})
- [Annotations]({{< relref "./build-dashboards/annotate-visualizations" >}})
- [Playlist]({{< relref "./create-manage-playlists/" >}})
- [Reporting]({{< relref "./create-reports" >}})
- [Time range controls]({{< relref "./manage-dashboards/#common-time-range-controls" >}})
- [Dashboard version history]({{< relref "dashboard-history/" >}})
- [Dashboard export and import]({{< relref "./manage-dashboards/#export-and-import-dashboards" >}})
- [Dashboard JSON model]({{< relref "json-model/" >}})
- [Version history]({{< relref "./build-dashboards/manage-version-history" >}})
- [Export and import]({{< relref "./manage-dashboards/#export-and-import-dashboards" >}})
- [JSON model]({{< relref "./build-dashboards/view-dashboard-json-model/" >}})

View File

@@ -0,0 +1,24 @@
---
aliases:
- /docs/grafana/next/dashboards/build-dashboards/
title: Build dashboards
menuTitle: Build dashboards
weight: 2
keywords:
- grafana
- dashboard
- dashboard folders
- create
- build
- design
---
# Build dashboards
This section includes the following topics:
{{< section >}}
## Dynamic dashboards
You can create more interactive and dynamic dashboards by adding and using [variables]({{< relref "../variables" >}}). Instead of hard-coding things like server, application, and sensor names in your metric queries, you can use variables in their place. Read more about variables [here]({{< relref "../variables" >}}).

View File

@@ -9,9 +9,10 @@ aliases:
- /docs/grafana/latest/panels/add-panels-dynamically/about-repeating-panels-rows/
- /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-rows/
- /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-panels/
- /docs/grafana/next/dashboards/build-dashboards/add-organize-panels/
title: Add and organize panels
menuTitle: Add and organize panels
weight: 2
weight: 200
keywords:
- panel
- dashboard
@@ -36,13 +37,13 @@ This section describes the areas of the Grafana panel editor.
- **Table view:** Convert any visualization to a table so that you can see the data. Table views are useful for troubleshooting.
- **Fill:** The visualization preview fills the available space. If you change the width of the side pane or height of the bottom pane the visualization changes to fill the available space.
- **Actual:** The visualization preview will have the exact size as the size on the dashboard. If not enough space is available, the visualization will scale down preserving the aspect ratio.
- **Time range controls:** For more information, refer to [Time range controls]({{< relref "../manage-dashboards/#configure-dashboard-time-range-controls" >}}).
- **Time range controls:** For more information, refer to [Time range controls]({{< relref "../../manage-dashboards/#configure-dashboard-time-range-controls" >}}).
1. Data section: The data section contains tabs where you enter queries, transform your data, and create alert rules (if applicable).
- **Query tab:** Select your data source and enter queries here. For more information, refer to [Add a query]({{< relref "../../panels/query-a-data-source/add-a-query/" >}}).
- **Transform tab:** Apply data transformations. For more information, refer to [Transform data]({{< relref "../../panels/transform-data/" >}}).
- **Alert tab:** Write alert rules. For more information, refer to [Overview of Grafana 8 alerting]({{< relref "../../alerting/" >}}).
- **Query tab:** Select your data source and enter queries here. For more information, refer to [Add a query]({{< relref "../../../panels/query-a-data-source/add-a-query/" >}}).
- **Transform tab:** Apply data transformations. For more information, refer to [Transform data]({{< relref "../../../panels/transform-data/" >}}).
- **Alert tab:** Write alert rules. For more information, refer to [Overview of Grafana 8 alerting]({{< relref "../../../alerting/" >}}).
1. Panel display options: The display options section contains tabs where you configure almost every aspect of your data visualization.
@@ -76,10 +77,10 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
**Before you begin:**
- Ensure that you have the proper permissions. For more information about permissions, refer to [About users and permissions]({{< relref "../../administration/roles-and-permissions/" >}}).
- Ensure that you have the proper permissions. For more information about permissions, refer to [About users and permissions]({{< relref "../../../administration/roles-and-permissions/" >}}).
- Identify the dashboard to which you want to add the panel.
- Understand the query language of the target data source.
- Ensure that data source for which you are writing a query has been added. For more information about adding a data source, refer to [Add a data source]({{< relref "../../datasources/add-a-data-source/" >}}) if you need instructions.
- Ensure that data source for which you are writing a query has been added. For more information about adding a data source, refer to [Add a data source]({{< relref "../../../datasources/add-a-data-source/" >}}) if you need instructions.
**To create a dashboard and add a panel**:
@@ -88,7 +89,7 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
1. In the first line of the **Query** tab, click the drop-down list and select a data source.
1. Write or construct a query in the query language of your data source.
For more information about data sources, refer to [Data sources]({{< relref "../../datasources/" >}}) for specific guidelines.
For more information about data sources, refer to [Data sources]({{< relref "../../../datasources/" >}}) for specific guidelines.
1. In the Visualization list, select a visualization type.
@@ -96,17 +97,17 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
![](/static/img/docs/panel-editor/select-visualization-8-0.png)
For more information about individual visualizations, refer to [Visualizations options]({{< relref "../../visualizations/" >}}).
For more information about individual visualizations, refer to [Visualizations options]({{< relref "../../../visualizations/" >}}).
1. Refer to the following documentation for ways you can adjust panel settings.
While not required, most visualizations need some adjustment before they properly display the information that you need.
- [Configure value mappings]({{< relref "../../panels/configure-value-mappings" >}})
- [Visualization-specific options]({{< relref "../../visualizations/" >}})
- [Override field values]({{< relref "../../panels/configure-overrides/" >}})
- [Configure thresholds]({{< relref "../../panels/configure-thresholds/" >}})
- [Configure standard options]({{< relref "../../panels/configure-standard-options/" >}})
- [Configure value mappings]({{< relref "../../../panels/configure-value-mappings" >}})
- [Visualization-specific options]({{< relref "../../../visualizations/" >}})
- [Override field values]({{< relref "../../../panels/configure-overrides/" >}})
- [Configure thresholds]({{< relref "../../../panels/configure-thresholds/" >}})
- [Configure standard options]({{< relref "../../../panels/configure-standard-options/" >}})
1. Add a note to describe the visualization (or describe your changes) and then click **Save** in the upper-right corner of the page.

View File

@@ -2,16 +2,18 @@
aliases:
- /docs/grafana/latest/dashboards/annotations/
- /docs/grafana/latest/reference/annotations/
- /docs/grafana/next/dashboards/build-dashboards/annotate-visualizations/
keywords:
- grafana
- annotations
- documentation
- guide
title: Annotations
weight: 9
title: Annotate visualizations
menuTitle: Annotate visualizations
weight: 600
---
# Annotations
# Annotate visualizations
Annotations provide a way to mark points on the graph with rich events. When you hover over an annotation
you can get event description and event tags. The text field can include links to other systems with more detail.
@@ -20,7 +22,7 @@ you can get event description and event tags. The text field can include links t
## Native annotations
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../developers/http_api/annotations/" >}}).
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../../../developers/http_api/annotations/" >}}).
### Add annotation
@@ -94,4 +96,4 @@ to show.
### Annotation query details
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../datasources/" >}}) topic.
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../../../datasources/" >}}) topic.

View File

@@ -0,0 +1,215 @@
---
aliases:
- /docs/grafana/latest/best-practices/
- /docs/grafana/latest/best-practices/common-observability-strategies/
- /docs/grafana/latest/getting-started/strategies/
- /docs/grafana/latest/best-practices/dashboard-management-maturity-levels/
- /docs/grafana/latest/best-practices/best-practices-for-creating-dashboards/
- /docs/grafana/latest/best-practices/best-practices-for-managing-dashboards/
- /docs/grafana/latest/dashboards/build-dashboards/best-practices/
description: Best practices for working with Grafana
title: Grafana dashboard best practices
menuTitle: Best practices
weight: 100
---
# Grafana dashboard best practices
This section provides information about best practices for intermediate Grafana administrators and users about how to build and maintain Grafana dashboards.
For more information about the different kinds of dashboards you can create, refer to [Grafana dashboards: A complete guide to all the different types you can build](https://grafana.com/blog/2022/06/06/grafana-dashboards-a-complete-guide-to-all-the-different-types-you-can-build/?pg=webinar-getting-started-with-grafana-dashboard-design-amer&plcmt=related-content-1).
## Common observability strategies
When you have a lot to monitor, like a server farm, you need a strategy to decide what is important enough to monitor. This page describes several common methods for choosing what to monitor.
A logical strategy allows you to make uniform dashboards and scale your observability platform more easily.
### Guidelines for usage
- The USE method tells you how happy your machines are, the RED method tells you how happy your users are.
- USE reports on causes of issues.
- RED reports on user experience and is more likely to report symptoms of problems.
- The best practice of alerting is to alert on symptoms rather than causes, so alerting should be done on RED dashboards.
### USE method
USE stands for:
- **Utilization -** Percent time the resource is busy, such as node CPU usage
- **Saturation -** Amount of work a resource has to do, often queue length or node load
- **Errors -** Count of error events
This method is best for hardware resources in infrastructure, such as CPU, memory, and network devices. For more information, refer to [The USE Method](http://www.brendangregg.com/usemethod.html).
### RED method
RED stands for:
- **Rate -** Requests per second
- **Errors -** Number of requests that are failing
- **Duration -** Amount of time these requests take, distribution of latency measurements
This method is most applicable to services, especially a microservices environment. For each of your services, instrument the code to expose these metrics for each component. RED dashboards are good for alerting and SLAs. A well-designed RED dashboard is a proxy for user experience.
For more information, refer to Tom Wilkie's blog post [The RED method: How to instrument your services](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services).
### The Four Golden Signals
According to the [Google SRE handbook](https://landing.google.com/sre/sre-book/chapters/monitoring-distributed-systems/#xref_monitoring_golden-signals), if you can only measure four metrics of your user-facing system, focus on these four.
This method is similar to the RED method, but it includes saturation.
- **Latency -** Time taken to serve a request
- **Traffic -** How much demand is placed on your system
- **Errors -** Rate of requests that are failing
- **Saturation -** How "full" your system is
[Here's an example from Grafana Play](https://play.grafana.org/d/000000109/the-four-golden-signals?orgId=1).
## Dashboard management maturity model
_Dashboard management maturity_ refers to how well-designed and efficient your dashboard ecosystem is. We recommend periodically reviewing your dashboard setup to gauge where you are and how you can improve.
Broadly speaking, dashboard maturity can be defined as low, medium, or high.
Much of the content for this topic was taken from the KubeCon 2019 talk [Fool-Proof Kubernetes Dashboards for Sleep-Deprived Oncalls](https://www.youtube.com/watch?v=YE2aQFiMGfY).
### Low - default state
At this stage, you have no coherent dashboard management strategy. Almost everyone starts here.
How can you tell you are here?
- Everyone can modify your dashboards.
- Lots of copied dashboards, little to no dashboard reuse.
- One-off dashboards that hang around forever.
- No version control (dashboard JSON in version control).
- Lots of browsing for dashboards, searching for the right dashboard. This means lots of wasted time trying to find the dashboard you need.
- Not having any alerts to direct you to the right dashboard.
### Medium - methodical dashboards
At this stage, you are starting to manage your dashboard use with methodical dashboards. You might have laid out a strategy, but there are some things you could improve.
How can you tell you are here?
- Prevent sprawl by using template variables. For example, you don't need a separate dashboard for each node, you can use query variables. Even better, you can make the data source a template variable too, so you can reuse the same dashboard across different clusters and monitoring backends.
Refer to the list of [Variable examples]({{< relref "../../variables/#examples-of-templates-and-variables" >}}) if you want some ideas.
- Methodical dashboards according to an [observability strategy]({{< relref "#common-observability-strategies" >}}).
- Hierarchical dashboards with drill-downs to the next level.
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/drill-down-example.png" caption="Example of using drill-down" >}}
- Dashboard design reflects service hierarchies. The example shown below uses the RED method (request and error rate on the left, latency duration on the right) with one row per service. The row order reflects the data flow.
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/service-hierarchy-example.png" caption="Example of a service hierarchy" >}}
- Compare like to like: split service dashboards when the magnitude differs. Make sure aggregated metrics don't drown out important information.
- Expressive charts with meaningful use of color and normalizing axes where you can.
- Example of meaningful color: Blue means it's good, red means it's bad. [Thresholds]({{< relref "../../../panels-visualizations/configure-thresholds/" >}}) can help with that.
- Example of normalizing axes: When comparing CPU usage, measure by percentage rather than raw number, because machines can have a different number of cores. Normalizing CPU usage by the number of cores reduces cognitive load because the viewer can trust that at 100% all cores are being used, without having to know the number of CPUs.
- Directed browsing cuts down on "guessing."
- Template variables make it harder to “just browse” randomly or aimlessly.
- Most dashboards should be linked to by alerts.
- Browsing is directed with links. For more information, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links" >}}).
- Version-controlled dashboard JSON.
### High - optimized use
At this stage, you have optimized your dashboard management use with a consistent and thoughtful strategy. It requires maintenance, but the results are worth it.
- Actively reducing sprawl.
- Regularly review existing dashboards to make sure they are still relevant.
- Only approved dashboards added to master dashboard list.
- Tracking dashboard use. If you're an Enterprise user, you can take advantage of [Usage insights]({{< relref "../../assess-dashboard-usage/" >}}).
- Consistency by design.
- Use scripting libraries to generate dashboards, ensure consistency in pattern and style.
- grafonnet (Jsonnet)
- grafanalib (Python)
- No editing in the browser. Dashboard viewers change views with variables.
- Browsing for dashboards is the exception, not the rule.
- Perform experimentation and testing in a separate Grafana instance dedicated to that purpose, not your production instance. When a dashboard in the test environment is proven useful, then add that dashboard to your main Grafana instance.
## Best practices for creating dashboards
This page outlines some best practices to follow when creating Grafana dashboards.
### Before you begin
Here are some principles to consider before you create a dashboard.
#### A dashboard should tell a story or answer a question
What story are you trying to tell with your dashboard? Try to create a logical progression of data, such as large to small or general to specific. What is the goal for this dashboard? (Hint: If the dashboard doesn't have a goal, then ask yourself if you really need the dashboard.)
Keep your graphs simple and focused on answering the question that you are asking. For example, if your question is "which servers are in trouble?", then maybe you don't need to show all the server data. Just show data for the ones in trouble.
#### Dashboards should reduce cognitive load, not add to it
_Cognitive load_ is basically how hard you need to think about something in order to figure it out. Make your dashboard easy to interpret. Other users and future you (when you're trying to figure out what broke at 2AM) will appreciate it.
Ask yourself:
- Can I tell what exactly each graph represents? Is it obvious, or do I have to think about it?
- If I show this to someone else, how long will it take them to figure it out? Will they get lost?
#### Have a monitoring strategy
It's easy to make new dashboards. It's harder to optimize dashboard creation and adhere to a plan, but it's worth it. This strategy should govern both your overall dashboard scheme and enforce consistency in individual dashboard design.
Refer to [Common observability strategies]({{< relref "#common-observability-strategies" >}}) and [Dashboard management maturity levels]({{< relref "#dashboard-management-maturity-model" >}}) for more information.
#### Write it down
Once you have a strategy or design guidelines, write them down to help maintain consistency over time. Check out this [Wikimedia runbook example](https://wikitech.wikimedia.org/wiki/Performance/Runbook/Grafana_best_practices).
### Best practices to follow
- When creating a new dashboard, make sure it has a meaningful name.
- If you are creating a dashboard to play or experiment, then put the word `TEST` or `TMP` in the name.
- Consider including your name or initials in the dashboard name or as a tag so that people know who owns the dashboard.
- Remove temporary experiment dashboards when you are done with them.
- If you create many related dashboards, think about how to cross-reference them for easy navigation. Refer to [Best practices for managing dashboards]({{< relref "#best-practices-for-managing-dashboards" >}}) for more information.
- Grafana retrieves data from a data source. A basic understanding of [data sources]({{< relref "../../../datasources/" >}}) in general and your specific is important.
- Avoid unnecessary dashboard refreshing to reduce the load on the network or backend. For example, if your data changes every hour, then you don't need to set the dashboard refresh rate to 30 seconds.
- Use the left and right Y-axes when displaying time series with different units or ranges.
- Add documentation to dashboards and panels.
- To add documentation to a dashboard, add a [Text panel visualization]({{< relref "../../../panels-visualizations/visualizations/text/" >}}) to the dashboard. Record things like the purpose of the dashboard, useful resource links, and any instructions users might need to interact with the dashboard. Check out this [Wikimedia example](https://grafana.wikimedia.org/d/000000066/resourceloader?orgId=1).
- To add documentation to a panel, edit the panel settings and add a description. Any text you add will appear if you hover your cursor over the small `i` in the top left corner of the panel.
- Reuse your dashboards and enforce consistency by using [templates and variables]({{< relref "../../variables" >}}).
- Be careful with stacking graph data. The visualizations can be misleading, and hide important data. We recommend turning it off in most cases.
## Best practices for managing dashboards
This page outlines some best practices to follow when managing Grafana dashboards.
### Before you begin
Here are some principles to consider before you start managing dashboards.
#### Strategic observability
There are several [common observability strategies]({{< relref "#common-observability-strategies" >}}). You should research them and decide whether one of them works for you or if you want to come up with your own. Either way, have a plan, write it down, and stick to it.
Adapt your strategy to changing needs as necessary.
#### Maturity level
What is your dashboard maturity level? Analyze your current dashboard setup and compare it to the [Dashboard management maturity model]({{< relref "#dashboard-management-maturity-model" >}}). Understanding where you are can help you decide how to get to where you want to be.
### Best practices to follow
- Avoid dashboard sprawl, meaning the uncontrolled growth of dashboards. Dashboard sprawl negatively affects time to find the right dashboard. Duplicating dashboards and changing “one thing” (worse: keeping original tags) is the easiest kind of sprawl.
- Periodically review the dashboards and remove unnecessary ones.
- If you create a temporary dashboard, perhaps to test something, prefix the name with `TEST: `. Delete the dashboard when you are finished.
- Copying dashboards with no significant changes is not a good idea.
- You miss out on updates to the original dashboard, such as documentation changes, bug fixes, or additions to metrics.
- In many cases copies are being made to simply customize the view by setting template parameters. This should instead be done by maintaining a link to the master dashboard and customizing the view with [URL parameters]({{< relref "../../../panels-visualizations/configure-data-links/#data-link-variables" >}}).
- When you must copy a dashboard, clearly rename it and _do not_ copy the dashboard tags. Tags are important metadata for dashboards that are used during search. Copying tags can result in false matches.
- Maintain a dashboard of dashboards or cross-reference dashboards. This can be done in several ways:
- Create dashboard links, panel, or data links. Links can go to other dashboards or to external systems. For more information, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links/" >}}).
- Add a [Dashboard list panel]({{< relref "../../../panels-visualizations/visualizations/dashboard-list/" >}}). You can then customize what you see by doing tag or folder searches.
- Add a [Text panel]({{< relref "../../../panels-visualizations/visualizations/text/" >}}) and use markdown to customize the display.

View File

@@ -0,0 +1,73 @@
---
title: Dashboard URL variables
keywords:
- grafana
- url variables
- documentation
- variables
- dashboards
aliases:
- /docs/grafana/latest/dashboards/build-dashboards/create-dashboard-url-variables/
- /docs/grafana/latest/variables/url-variables/
- /docs/grafana/latest/variables/variable-types/url-variables/
weight: 250
---
# Dashboard URL variables
Grafana can apply variable values passed as query parameters in dashboard URLs.
For more information, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links/" >}}) and [Templates and variables]({{< relref "../../variables/" >}}).
## Passing variables as query parameters
Grafana interprets query string parameters prefixed with `var-` as variables in the given dashboard.
For example, in this URL:
```
https://${your-domain}/path/to/your/dashboard?var-example=value
```
The query parameter `var-example=value` represents the dashboard variable `example` with a value of `value`.
### Passing multiple values for a variable
To pass multiple values, repeat the variable parameter once for each value:
```
https://${your-domain}/path/to/your/dashboard?var-example=value1&var-example=value2
```
Grafana interprets `var-example=value1&var-example=value2` as the dashboard variable `example` with two values: `value1` and `value2`.
### Example
See [https://play.grafana.org/d/000000074/alerting?var-app=backend&var-server=backend_01&var-server=backend_03&var-interval=1]h - this passes the variable `server` with multiple values, and the variables `app` and `interval` with a single value each.
## Adding variables to dashboard links
Grafana can add variables to dashboard links when you generate them from a dashboard's settings. For more information and steps to add variables, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links/" >}}).
## Passing ad hoc filters
Ad hoc filters apply key/value filters to all metric queries that use a specified data source. For more information, refer to [Add ad hoc filters]({{< relref "../../variables/add-template-variables/#add-ad-hoc-filters" >}}).
To pass an ad hoc filter as a query parameter, use the variable syntax to pass the ad hoc filter variable, and also provide the key, the operator as the value, and the value as a pipe-separated list.
For example, in this URL:
```
https://${your-domain}/path/to/your/dashboard?var-adhoc=example_key|=|example_value
```
The query parameter `var-adhoc=key|=|value` applies the ad hoc filter configured as the `adhoc` dashboard variable using the `example_key` key, the `=` operator, and the `example_value` value.
> **Note:** When sharing URLs with ad hoc filters, remember to encode the URL. In the above example, replace the pipes (`|`) with `%7C` and the equality operator (`=`) with `%3D`.
### Example
See [https://play.grafana.org/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica] - this passes the ad hoc filter variable `adhoc` with the filter value `datacenter = America`.
## Controlling time range using the URL
To set a dashboard's time range, use the `from`, `to`, `time`, and `time.window` query parameters. Because these are not variables, they do not require the `var-` prefix. For more information, see the [Linking overview]({{< relref "../" >}}).

View File

@@ -0,0 +1,92 @@
---
aliases:
- /docs/grafana/latest/dashboards/build-dashboards/create-dashboard/
- /docs/grafana/latest/dashboards/build-dashboards/add-organize-panels/
title: Create a dashboard
menuTitle: Create a dashboard
weight: 1
keywords:
- panel
- dashboard
- create
---
## Create a dashboard
Dashboards and panels allow you to show your data in visual form. Each panel needs at least one query to display a visualization.
**Before you begin:**
- Ensure that you have the proper permissions. For more information about permissions, refer to [About users and permissions]({{< relref "../../../administration/roles-and-permissions/" >}}).
- Identify the dashboard to which you want to add the panel.
- Understand the query language of the target data source.
- Ensure that data source for which you are writing a query has been added. For more information about adding a data source, refer to [Add a data source]({{< relref "../../../datasources/add-a-data-source/" >}}) if you need instructions.
**To create a dashboard**:
1. Sign in to Grafana, hover your cursor over **Dashboard**, and click **+ New Dashboard**.
1. Click **Add a new panel**.
1. In the first line of the **Query** tab, click the drop-down list and select a data source.
1. Write or construct a query in the query language of your data source.
For more information about data sources, refer to [Data sources]({{< relref "../../../datasources/" >}}) for specific guidelines.
1. In the Visualization list, select a visualization type.
Grafana displays a preview of your query results with the visualization applied.
![](/static/img/docs/panel-editor/select-visualization-8-0.png)
For more information about individual visualizations, refer to [Visualizations options]({{< relref "../../../panels-visualizations/visualizations/" >}}).
1. Refer to the following documentation for ways you can adjust panel settings.
While not required, most visualizations need some adjustment before they properly display the information that you need.
- [Configure value mappings]({{< relref "../../../panels-visualizations/configure-value-mappings" >}})
- [Visualization-specific options]({{< relref "../../../panels-visualizations/visualizations/" >}})
- [Override field values]({{< relref "../../../panels-visualizations/configure-overrides/" >}})
- [Configure thresholds]({{< relref "../../../panels-visualizations/configure-thresholds/" >}})
- [Configure standard options]({{< relref "../../../panels-visualizations/configure-standard-options/" >}})
1. Add a note to describe the visualization (or describe your changes) and then click **Save** in the upper-right corner of the page.
Notes can be helpful if you need to revert the dashboard to a previous version.
## Configure repeating rows
You can configure Grafana to dynamically add panels or rows to a dashboard based on the value of a variable. Variables dynamically change your queries across all rows in a dashboard. For more information about repeating panels, refer to [Configure repeating panels](../../panels/configure-panel-options/#configure-repeating-panels).
To see an example of repeating rows, refer to [Dashboard with repeating rows](https://play.grafana.org/d/000000153/repeat-rows). The example shows that you can also repeat rows if you have variables set with `Multi-value` or `Include all values` selected.
**Before you begin:**
- Ensure that the query includes a multi-value variable.
**To configure repeating rows:**
1. On the dashboard home page, click **Add panel**.
1. On the **Add a panel** dialog box, click **Add a new row**.
1. Hover over the row title and click the cog icon.
1. On the **Row Options** dialog box, add a title and select the variable for which you want to add repeating rows.
> **Note:** To provide context to dashboard users, add the variable to the row title.
## Move a panel
You can place a panel on a dashboard in any location.
1. Open the dashboard.
1. Click the panel title and drag the panel to the new location.
## Resize a panel
You can size a dashboard panel to suits your needs.
1. Open the dashboard.
1. To adjust the size of the panel, click and drag the lower-right corner of the panel.

View File

@@ -6,6 +6,7 @@ aliases:
- /docs/grafana/latest/linking/dashboard-links/
- /docs/grafana/latest/dashboards/manage-dashboard-links/
- /docs/grafana/latest/panels/working-with-panels/add-link-to-panel/
- /docs/grafana/latest/dashboards/build-dashboards/manage-dashboard-links/
description: How to link Grafana dashboards.
keywords:
- link
@@ -17,7 +18,7 @@ keywords:
- navigate
title: Manage dashboard links
menuTitle: Manage dashboard links
weight: 400
weight: 500
---
# Manage dashboard links
@@ -35,11 +36,11 @@ The next step is to figure out which link type is right for your workflow. Even
- If the link relates to most if not all of the panels in the dashboard, use [dashboard links]({{< relref "#dashboard-links" >}}).
- If you want to drill down into specific panels, use [panel links]({{< relref "#panel-links" >}}).
- If you want to link to an external site, you can use either a dashboard link or a panel link.
- If you want to drill down into a specific series, or even a single measurement, use [data links]({{< relref "../../panels/configure-data-links/#data-links" >}}).
- If you want to drill down into a specific series, or even a single measurement, use [data links]({{< relref "../../../panels-visualizations/configure-data-links/#data-links" >}}).
## Controlling time range using the URL
You can control the time range of a panel or dashboard by providing following query parameters in dashboard URL:
To control the time range of a panel or dashboard, you can provide query parameters in the dashboard URL:
- `from` - defines lower limit of the time range, specified in ms epoch
- `to` - defines upper limit of the time range, specified in ms epoch
@@ -47,7 +48,7 @@ You can control the time range of a panel or dashboard by providing following qu
## Dashboard links
When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you dont have to worry whether the person you send the link to is looking at the right data. For other types of links, refer to [Data link variables]({{< relref "../../panels/configure-data-links/#data-link-variables/" >}}).
When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you dont have to worry whether the person you send the link to is looking at the right data. For other types of links, refer to [Data link variables]({{< relref "../../../panels-visualizations/configure-data-links/#data-link-variables/" >}}).
Dashboard links can also be used as shortcuts to external systems, such as submitting [a GitHub issue with the current dashboard name](https://github.com/grafana/grafana/issues/new?title=Dashboard%3A%20HTTP%20Requests).
@@ -69,7 +70,7 @@ Add links to other dashboards at the top of your current dashboard.
- **With tags** Enter tags to limit the linked dashboards to only the ones with the tags you enter. Otherwise, Grafana includes links to all other dashboards.
- **As dropdown** If you are linking to lots of dashboards, then you probably want to select this option and add an optional title to the dropdown. Otherwise, Grafana displays the dashboard links side by side across the top of your dashboard.
- **Time range** Select this option to include the dashboard time range in the link. When the user clicks the link, the linked dashboard opens with the indicated time range already set. **Example:** https://play.grafana.org/d/000000010/annotations?orgId=1&from=now-3h&to=now
- **Variable values** Select this option to include template variables currently used as query parameters in the link. When the user clicks the link, any matching templates in the linked dashboard are set to the values from the link. Here is the variable format: `https://${you-domain}/path/to/your/dashboard?var-${template-variable1}=value1&var-${template-variable2}=value2` **Example:** https://play.grafana.org/d/000000074/alerting?var-app=backend&var-server=backend_01&var-server=backend_03&var-interval=1h
- **Variable values** Select this option to include template variables currently used as query parameters in the link. When the user clicks the link, any matching templates in the linked dashboard are set to the values from the link. For more information, see [Dashboard URL variables]({{< relref "../create-dashboard-url-variables/" >}}).
- **Open in new tab** Select this option if you want the dashboard link to open in a new tab or window.
1. Click **Add**.

View File

@@ -8,12 +8,13 @@ aliases:
- /docs/grafana/latest/panels/library-panels/manage-library-panel/
- /docs/grafana/latest/panels/library-panels/delete-library-panel/
- /docs/grafana/latest/dashboards/manage-library-panels/
title: Manage Grafana library panels
- /docs/grafana/latest/dashboards/build-dashboards/manage-library-panels/
title: Manage library panels
menuTitle: Manage library panels
weight: 3
weight: 300
---
# Manage Grafana library panels
# Manage library panels
A library panel is a reusable panel that you can use in any dashboard. When you make a change to a library panel, that change propagates to all instances of where the panel is used. Library panels streamline reuse of panels across multiple dashboards.

View File

@@ -2,17 +2,19 @@
aliases:
- /docs/grafana/latest/dashboards/dashboard-history/
- /docs/grafana/latest/reference/dashboard_history/
- /docs/grafana/latest/dashboards/build-dashboards/manage-version-history/
keywords:
- grafana
- dashboard
- documentation
- version
- history
title: Dashboard version history
weight: 14
title: Manage dashboard version history
menutitle: Manage version history
weight: 400
---
# Dashboard version history
# Manage dashboard version history
Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are never lost. A list of these versions is available by entering the dashboard settings and then selecting "Versions" in the left side menu.

View File

@@ -0,0 +1,95 @@
---
aliases:
- /docs/grafana/latest/dashboards/build-dashboards/modify-dashboard-settings/
title: Modify dashboard settings
menuTitle: Dashboard settings
weight: 8
keywords:
- time settings
- variables
- links
- dashboard
- settings
---
# Modify dashboard settings
The dashboard settings page enables you to:
- Edit general dashboard properties, including time settings
- Add annotation queries
- Add dashboard variables
- Add links
- View the dashboard JSON model
To access the dashboard setting page:
1. Open a dashboard in edit mode.
1. Click **Dashboard settings** (gear icon) located at the top of the page.
## Modify dashboard time settings
Adjust dashboard time settings when you want to change the dashboard timezone, the local browser time, and specify auto-refresh time intervals.
1. On the **Dashboard settings** page, click **General**.
1. Navigate to the **Time Options** section.
1. Specify time settings according to the following descriptions.
- **Timezone:** Specify the local time zone of the service or system that you are monitoring. This can be helpful when monitoring a system or service that operates across several time zones.
- **Default:** Grafana uses the default selected time zone for the user profile, team, or organization. If no time zone is specified for the user profile, a team the user is a member of, or the organization, then Grafana uses the local browser time.
- **Local browser time:** The time zone configured for the viewing user browser is used. This is usually the same time zone as set on the computer.
- Standard [ISO 8601 time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), including UTC.
- **Auto-refresh:** Customize the options displayed for relative time and the auto-refresh options Entries are comma separated and accept any valid time unit.
- **Now delay:** Override the `now` time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values.
- **Hide time picker:** Select this option if you do not want Grafana to display the time picker.
## Add an annotation query
An annotation query is a query that queries for events. These events can be visualized in graphs across the dashboard as vertical lines along with a small
icon you can hover over to see the event information.
1. On the **Dashboard settings** page, click **Annotations**.
1. Click **Add annotation query**.
1. Enter a name and select a data source.
1. Complete the rest of the form to build a query and annotation.
The query editor UI changes based on the data source you select. Refer to the [Data source]({{< relref "../../../datasources/" >}}) documentation for details on how to construct a query.
## Add a variable
Variables enable you to create more interactive and dynamic dashboards. Instead of hard-coding things like server, application,
and sensor names in your metric queries, you can use variables in their place. Variables are displayed as dropdown lists at the top of
the dashboard. These dropdowns make it easy to change the data being displayed in your dashboard.
For more information about variables, refer to [Variables]({{< relref "../../variables/" >}}).
1. On the **Dashboard settings** page, click **Variable** in the left side section menu and then the **Add variable** button.
1. In the **General** section, the the name of the variable. This is the name that you will later use in queries.
1. Select a variable **Type**.
> **Note:** The variable type you select impacts which fields you populate on the page.
1. Define the variable and click **Update**.
## Add a link
Dashboard links enable you to place links to other dashboards and web sites directly below the dashboard header. Links provide for easy navigation to other, related dashboards and content.
1. On the **Dashboard settings** page, click **Links** in the left side section menu and then the **Add link** button.
1. Enter title and and in the **Type** field, select **Dashboard** or **Link**.
1. To add a dashboard link:
a. Add an optional tag. Tags are useful creating a dynamic dropdown of dashboards that all have a specific tag.
b. Select any of the dashboard link **Options**.
c. Click **Apply**.
1. To add a link:
a. Add a URL and tooltip text that appears when the user hovers over the link.
b. Select an icon that appears next to the link.
c. Select any of the dashboard link **Options**.
## View dashboard JSON model
A dashboard in Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from panels, template variables, panel queries, and so on.
To view a dashboard JSON model, on the **Dashboard settings** page, click **JSON**.
For more information about the JSON fields, refer to [JSON fields]({{< relref "../view-dashboard-json-model/#json-fields" >}}).

View File

@@ -2,6 +2,7 @@
aliases:
- /docs/grafana/latest/dashboards/json-model/
- /docs/grafana/latest/reference/dashboard/
- /docs/grafana/latest/dashboards/build-dashboards/view-dashboard-json-model/
keywords:
- grafana
- dashboard
@@ -9,7 +10,7 @@ keywords:
- json
- model
title: JSON model
weight: 1200
weight: 700
---
# Dashboard JSON model

View File

@@ -28,6 +28,8 @@ Reporting enables you to automatically generate PDFs from any of your dashboards
Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report also changes.
For information about recent improvements to the reporting UI, refer to [Grafana reporting: How we improved the UX in Grafana](https://grafana.com/blog/2022/06/29/grafana-reporting-how-we-improved-the-ux-in-grafana/).
## Requirements
- SMTP must be configured for reports to be sent. Refer to [SMTP]({{< relref "../../setup-grafana/configure-grafana/#smtp" >}}) in [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) for more information.
@@ -84,7 +86,7 @@ You can configure report-specific template variables for the dashboard on the re
> **Note:** Available in [Grafana Enterprise]({{< relref "../../enterprise/" >}}) version 8.0 and later, and [Grafana Cloud Pro and Advanced]({{< ref "/grafana-cloud" >}}).
You can include dynamic dashboards with panels or rows, set to repeat by a variable, into reports. For detailed information about setting up repeating panels or rows in dashboards, refer to [Repeat panels or rows]({{< relref "../../panels/configure-panel-options/#configure-repeating-rows-or-panels" >}}).
You can include dynamic dashboards with panels or rows, set to repeat by a variable, into reports. For detailed information about setting up repeating panels or rows in dashboards, refer to [Repeat panels or rows]({{< relref "../../panels-visualizations/configure-panel-options/#configure-repeating-rows-or-panels" >}}).
#### Caveats

View File

@@ -2,6 +2,7 @@
aliases:
- /docs/grafana/latest/dashboards/dashboard-manage/
- /docs/grafana/latest/features/dashboard/dashboards/
- /docs/grafana/latest/dashboards/dashboard-public/
title: Public dashboards
weight: 8
---
@@ -59,5 +60,7 @@ publicDashboards = true
- Exemplars will be omitted from the panel.
- Annotations will not be displayed in public dashboards.
- Grafana Live and real-time event streams are not supported.
- Library panels are currently not supported, but are planned to be in the future.
- Datasources using Reverse Proxy functionality are not supported.
We are excited to share this enhancement with you and wed love your feedback! Please check out the [Github](https://github.com/grafana/grafana/discussions/49253) discussion and join the conversation.

View File

@@ -14,7 +14,7 @@ aliases:
title: Manage dashboards
menuTitle: Manage dashboards
weight: 8
eywords:
keywords:
- grafana
- dashboard
- dashboard folders
@@ -29,7 +29,7 @@ eywords:
# Manage dashboards
A dashboard is a set of one or more [panels]({{< relref "../../panels/" >}}) that visually presents your data in one or more rows.
A dashboard is a set of one or more [panels]({{< relref "../../panels-visualizations/" >}}) that visually presents your data in one or more rows.
For more information about creating dashboards, refer to [Add and organize panels](../add-organize-panels).
@@ -129,155 +129,6 @@ Find dashboards for common server applications at [Grafana.com/dashboards](https
{{< figure src="/static/img/docs/v50/gcom_dashboard_list.png" max-width="700px" >}}
## Configure dashboard time range controls
Grafana provides several ways to manage the time ranges of the data being visualized, for dashboard, panels and also for alerting.
This section describes supported time units and relative ranges, the common time controls, dashboard-wide time settings, and panel-specific time settings.
### Time units and relative ranges
Grafana supports the following time units: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `Q (quarters)` and `y (years)`.
The minus operator enables you to step back in time, relative to now. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
The plus operator enables you to step forward in time, relative to now. For example, you can use this feature to look at predicted data in the future.
The following table provides example relative ranges:
| Example relative range | From: | To: |
| ---------------------- | ----------- | ----------- |
| Last 5 minutes | `now-5m` | `now` |
| The day so far | `now/d` | `now` |
| This week | `now/w` | `now/w` |
| This week so far | `now/w` | `now` |
| This month | `now/M` | `now/M` |
| This month so far | `now/M` | `now` |
| Previous Month | `now-1M/M` | `now-1M/M` |
| This year so far | `now/Y` | `now` |
| This Year | `now/Y` | `now/Y` |
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
#### Note about Grafana Alerting
For Grafana Alerting, we do not support the following syntaxes at this time.
- now+n for future timestamps.
- now-1n/n for "start of n until end of n" because this is an absolute timestamp.
### Common time range controls
The dashboard and panel time controls have a common UI.
<img class="no-shadow" src="/static/img/docs/time-range-controls/common-time-controls-7-0.png" max-width="700px">
The following sections define common time range controls.
#### Current time range
The current time range, also called the _time picker_, shows the time range currently displayed in the dashboard or panel you are viewing.
Hover your cursor over the field to see the exact time stamps in the range and their source (such as the local browser).
<img class="no-shadow" src="/static/img/docs/time-range-controls/time-picker-7-0.png" max-width="300px">
Click the current time range to change it. You can change the current time using a _relative time range_, such as the last 15 minutes, or an _absolute time range_, such as `2020-05-14 00:00:00 to 2020-05-15 23:59:59`.
<img class="no-shadow" src="/static/img/docs/time-range-controls/change-current-time-range-7-0.png" max-width="900px">
#### Relative time range
Select the relative time range from the **Relative time ranges** list. You can filter the list using the input field at the top. Some examples of time ranges include:
- Last 30 minutes
- Last 12 hours
- Last 7 days
- Last 2 years
- Yesterday
- Day before yesterday
- This day last week
- Today so far
- This week so far
- This month so far
#### Absolute time range
You can set an absolute time range in the following ways:
- Type values into the **From** and **To** fields. You can type exact time values or relative values, such as `now-24h`, and then click **Apply time range**.
- Click in the **From** or **To** field. Grafana displays a calendar. Click the day or days you want to use as the current time range and then click **Apply time range**.
This section also displays recently used absolute ranges.
#### Zoom out (Cmd+Z or Ctrl+Z)
Click the **Zoom out** icon to view a larger time range in the dashboard or panel visualization.
#### Zoom in (only applicable to graph visualizations)
Click and drag to select the time range in the visualization that you want to view.
#### Refresh dashboard
Click the **Refresh dashboard** icon to immediately run every query on the dashboard and refresh the visualizations. Grafana cancels any pending requests when you trigger a refresh.
By default, Grafana does not automatically refresh the dashboard. Queries run on their own schedule according to the panel settings. However, if you want to regularly refresh the dashboard, then click the down arrow next to the **Refresh dashboard** icon and then select a refresh interval.
### Dashboard time settings
Time settings are saved on a per-dashboard basis.
You can change the **Timezone** and **fiscal year** settings from the time range controls by clicking the **Change time settings** button.
For more advanced time settings, click the **Dashboard settings** (gear) icon at the top of the page. Then navigate to the **Time Options** section of the **General** tab.
- **Timezone:** Specify the local time zone of the service or system that you are monitoring. This can be helpful when monitoring a system or service that operates across several time zones.
- **Default:** The default selected time zone for the user profile, team, or organization is used. If no time zone is specified for the user profile, a team the user is a member of, or the organization, then Grafana uses local browser time.
- **Local browser time:** The time zone configured for the viewing user browser is used. This is usually the same time zone as set on the computer.
- Standard [ISO 8601 time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), including UTC.
- **Auto-refresh:** Customize the options displayed for relative time and the auto-refresh options. Entries are comma separated and accept any valid time unit.
- **Now delay:** Override the `now` time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values.
- **Hide time picker:** Select this option if you do not want Grafana to display the time picker.
### Panel time overrides and timeshift
In [Query options]({{< relref "../../panels/query-options/" >}}), you can override the relative time range for individual panels, which causes them to be different than what is selected in the dashboard time picker located in the upper right. This enables you to show metrics from different time periods or days at the same time.
> **Note:** Panel time overrides have no effect when the time range for the dashboard is absolute.
### Control the time range using a URL
You can control the time range of a dashboard by providing the following query parameters in the dashboard URL:
- `from`: Defines the lower limit of the time range, specified in `ms`, `epoch`, or [relative time]({{< relref "#relative-time-range" >}})
- `to`: Defines the upper limit of the time range, specified in `ms`, `epoch`, or [relative time]({{< relref "#relative-time-range" >}})
- `time` and `time.window`: Defines a time range from `time-time.window/2` to `time+time.window/2`. Both parameters should be specified in `ms`. For example `?time=1500000000000&time.window=10000` results in 10s time range from 1499999995000 to 1500000005000
## Organize a dashboard
You can place any panel in any location you want and controls its size. The changes you make impact other users of the dashboard.
**Before you begin:**
- Ensure that you sign in to Grafana with Editor permissions
**To organize a dashboard**:
1. Hover your cursor over the panel, and click-and-drag the panel to its new location.
1. To resize a panel, click the zoom in (+) and zoom out (-) icons.
![](/static/img/docs/animated_gifs/drag_drop.gif)
### Tips and shortcuts
- Click the graph title and in the dropdown menu quickly duplicate the panel.
- Click the colored icon in the legend to change a series color or the y-axis.
- Click series name in the legend to hide series.
- Ctrl/Shift/Meta + click legend name to hide other series.
- Hover your cursor over a panel and press `e` to open the panel editor.
- Hover your cursor over a panel and press `v` to open the panel in full screen view.
## Troubleshoot dashboards
This section provides information to help you solve common dashboard problems.

View File

@@ -16,7 +16,7 @@ aliases:
- docs/grafana/latest/dashboards/share-dashboards-panels/
- /docs/grafana/latest/share-dashboards-panels/
title: Share dashboards and panels
menuTitle: Share dashboards and panels
menuTitle: Sharing
weight: 85
keywords:
- grafana

View File

@@ -1,148 +0,0 @@
---
aliases:
- /docs/grafana/latest/dashboards/dashboard-ui/
- /docs/grafana/latest/dashboards/dashboard-ui/dashboard-header/
- /docs/grafana/latest/features/dashboard/dashboards/
- /docs/grafana/latest/dashboards/dashboard-ui/dashboard-row/
- /docs/grafana/latest/features/dashboard/dashboards/
- /docs/grafana/latest/dashboards/shortcuts/
- /docs/grafana/latest/dashboards/search/
- /docs/grafana/latest/reference/search/
title: 'Use dashboards'
menuTitle: Use dashboards
weight: 1
keywords:
- dashboard
- search
- shortcuts
---
# Use dashboards
This topic provides an overview of dashboard features and shortcuts, and describes how to use dashboard search.
## Dashboard feature overview
The dashboard user interface provides a number of features that you can use to customize the presentation of your data.
The following image and descriptions highlights all dashboards features.
{{< figure src="/static/img/docs/v91/dashboard-features/dashboard-features.png" width="700px" >}}
- **Grafana home** (1): Click the Grafana home icon to be redirected to the home page configured in the Grafana instance.
- **Dashboard title** (2): When you click the dashboard title you can search for dashboard contained in the current folder.
- **Share dashboard** (3): Use this option to share the current dashboard by link or snapshot. You can also export the dashboard definition from the share modal.
- **Add panel** (4): Use this option to add a panel, dashboard row, or library panel to the current dashboard.
- **Dashboard settings** (5): Use this option to change dashboard name, folder, and tags and manage variables and annotation queries.
- **Time picker dropdown** (6): Click to select relative time range options and set custom absolute time ranges.
- **Zoom out time range** (7): Click to zoom out the time range. For more information about how to use time range controls, refer to [Common time range controls](../time-range-controls/#common-time-range-controls).
- **Refresh dashboard** (8): Click to immediately trigger queries and refresh dashboard data.
- **Refresh dashboard time interval** (9): Click to select a dashboard auto refresh time interval.
- **View mode** (10): Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. For more information about view mode, refer to [How to Create Kiosks to Display Dashboards on a TV](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
- **Dashboard panel** (11): The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
- Library panels can be shared among many dashboards.
- To move a panel, drag the panel header to another location.
- To resize a panel, click and drag the lower right corner of the panel.
- **Graph legend** (12): Change series colors, y-axis and series visibility directly from the legend.
- **Search** (13): Click **Search** to search for dashboards by name or panel title.
- **Dashboard row** (14): A dashboard row is a logical divider within a dashboard that groups panels together.
- Rows can be collapsed or expanded allowing you to hide parts of the dashboard.
- Panels inside a collapsed row do not issue queries.
- Use the [repeating rows]({{< relref "../panels/configure-panel-options/#configure-repeating-rows" >}}) to dynamically create rows based on a template variable.
## Keyboard shortcuts
Grafana has a number of keyboard shortcuts available. Press `?` or `h` on your keyboard to display all keyboard shortcuts available in your version of Grafana.
- `Ctrl+S`: Saves the current dashboard.
- `f`: Opens the dashboard finder / search.
- `d+k`: Toggle kiosk mode (hides the menu).
- `d+e`: Expand all rows.
- `d+s`: Dashboard settings.
- `Ctrl+K`: Opens the command palette.
- `Esc`: Exits panel when in fullscreen view or edit mode. Also returns you to the dashboard from dashboard settings.
**Focused panel**
By hovering over a panel with the mouse you can use some shortcuts that will target that panel.
- `e`: Toggle panel edit view
- `v`: Toggle panel fullscreen view
- `ps`: Open Panel Share Modal
- `pd`: Duplicate Panel
- `pr`: Remove Panel
- `pl`: Toggle panel legend
## Dashboard search
You can search for dashboards by dashboard name and by panel title. When you search for dashboards, the system returns all dashboards available within the Grafana instance, even if you do not have permission to view the contents of the dashboard.
### Search dashboards using dashboard name
Begin typing any part of the dashboard name in the search bar. The search returns results for any partial string match in real-time, as you type.
Dashboard search is:
- Real-time
- _Not_ case sensitive
- Functional across stored _and_ file based dashboards.
> \*\*Note: You can use your keyboard arrow keys to navigate the results and press `Enter` to open the selected dashboard.
The following image shows the search results when you search using dashboard name.
{{< figure src="/static/img/docs/v91/dashboard-features/search-by-dashboard-name.png" width="700px" >}}
### Search dashboards using panel title
You can search for a dashboard by the title of a panel that appears in a dashboard.
If a panel's title matches your search query, the dashboard appears in the search results.
This feature is available by default in Grafana Cloud and in Grafana OSS v9.1 and higher, you access this feature by enabling the `panelTitleSearch` feature toggle.
For more information about enabling panel title search, refer to [Enable the panelTitleSearch feature toggle.](#enable-panelTitleSearch-feature-toggle)
The following image shows the search results when you search using panel title.
{{< figure src="/static/img/docs/v91/dashboard-features/search-by-panel-title.png" width="700px" >}}
#### Enable the panelTitleSearch feature toggle
Complete the following steps to enable the `panelTitleSearch` feature toggle.
**Before you begin:**
- If you are running Grafana Enterprise with RBAC, enable [service accounts]({{< relref "../administration/service-accounts/" >}}).
**To enable the panelTitleSearch feature toggle:**
1. Open the Grafana [configuration file]({{< relref "../setup-grafana/configure-grafana/#configuration-file-location" >}}).
1. Locate the [feature_toggles]({{< relref "../setup-grafana/configure-grafana/#feature_toggles" >}}) section.
1. Add the following parameter to the `feature_toggles` section:
```
[feature_toggles]
# enable features, separated by spaces
enable = dashboardPreviews
```
1. Save your changes and restart the Grafana server.
### Filter dashboard search results by tag(s)
Tags are a great way to organize your dashboards, especially as the number of dashboards grow. You can add and manage tags in dashboard `Settings`.
When you select multiple tags, Grafana shows dashboards that include all selected tags.
To filter dashboard search result by a tag, complete one of the following steps:
- To filter dashboard search results by tag, click a tag that appears in the right column of the search results.
You can continue filtering by clicking additional tags.
- To see a list of all available tags, click the **Filter by tags** dropdown menu and select a tag.
All tags will be shown, and when you select a tag, the dashboard search will be instantly filtered.
> **Note:** When using only a keyboard, press the `tab` key and navigate to the **Filter by tag** drop-down menu, press the down arrow key `` to activate the menu and locate a tag, and press `Enter` to select the tag.

View File

@@ -0,0 +1,179 @@
---
aliases:
- /docs/grafana/latest/dashboards/dashboard-ui/
- /docs/grafana/latest/dashboards/dashboard-ui/dashboard-header/
- /docs/grafana/latest/features/dashboard/dashboards/
- /docs/grafana/latest/dashboards/dashboard-ui/dashboard-row/
- /docs/grafana/latest/features/dashboard/dashboards/
- /docs/grafana/latest/dashboards/shortcuts/
- /docs/grafana/latest/dashboards/search/
- /docs/grafana/latest/reference/search/
- /docs/grafana/latest/dashboards/use-dashboards/
title: Use dashboards
menuTitle: Use dashboards
weight: 1
keywords:
- dashboard
- search
- shortcuts
---
# Use dashboards
This topic provides an overview of dashboard features and shortcuts, and describes how to use dashboard search.
## Dashboard feature overview
The dashboard user interface provides a number of features that you can use to customize the presentation of your data.
The following image and descriptions highlights all dashboards features.
{{< figure src="/static/img/docs/v91/dashboard-features/dashboard-features.png" width="700px" >}}
- **Grafana home** (1): Click the Grafana home icon to be redirected to the home page configured in the Grafana instance.
- **Dashboard title** (2): When you click the dashboard title you can search for dashboard contained in the current folder.
- **Share dashboard** (3): Use this option to share the current dashboard by link or snapshot. You can also export the dashboard definition from the share modal.
- **Add panel** (4): Use this option to add a panel, dashboard row, or library panel to the current dashboard.
- **Dashboard settings** (5): Use this option to change dashboard name, folder, and tags and manage variables and annotation queries. For more information about dashboard settings, refer to [Modify dashboard settings]({{< relref "../build-dashboards/modify-dashboard-settings/" >}})
- **Time picker dropdown** (6): Click to select relative time range options and set custom absolute time ranges.
- You can change the **Timezone** and **fiscal year** settings from the time range controls by clicking the **Change time settings** button.
- Time settings are saved on a per-dashboard basis.
- **Zoom out time range** (7): Click to zoom out the time range. For more information about how to use time range controls, refer to [Common time range controls](../time-range-controls/#common-time-range-controls).
- **Refresh dashboard** (8): Click to immediately trigger queries and refresh dashboard data.
- **Refresh dashboard time interval** (9): Click to select a dashboard auto refresh time interval.
- **View mode** (10): Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. For more information about view mode, refer to [How to Create Kiosks to Display Dashboards on a TV](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
- **Dashboard panel** (11): The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
- Library panels can be shared among many dashboards.
- To move a panel, drag the panel header to another location.
- To resize a panel, click and drag the lower right corner of the panel.
- **Graph legend** (12): Change series colors, y-axis and series visibility directly from the legend.
- **Search** (13): Click **Search** to search for dashboards by name or panel title.
- **Dashboard row** (14): A dashboard row is a logical divider within a dashboard that groups panels together.
- Rows can be collapsed or expanded allowing you to hide parts of the dashboard.
- Panels inside a collapsed row do not issue queries.
- Use [repeating rows]({{< relref "../build-dashboards/create-dashboard/#configure-repeating-rows" >}}) to dynamically create rows based on a template variable.
## Keyboard shortcuts
Grafana has a number of keyboard shortcuts available. Press `?` or `h` on your keyboard to display all keyboard shortcuts available in your version of Grafana.
- `Ctrl+S`: Saves the current dashboard.
- `f`: Opens the dashboard finder / search.
- `d+k`: Toggle kiosk mode (hides the menu).
- `d+e`: Expand all rows.
- `d+s`: Dashboard settings.
- `Ctrl+K`: Opens the command palette.
- `Esc`: Exits panel when in fullscreen view or edit mode. Also returns you to the dashboard from dashboard settings.
**Focused panel**
By hovering over a panel with the mouse you can use some shortcuts that will target that panel.
- `e`: Toggle panel edit view
- `v`: Toggle panel fullscreen view
- `ps`: Open Panel Share Modal
- `pd`: Duplicate Panel
- `pr`: Remove Panel
- `pl`: Toggle panel legend
## Set dashboard time range
Grafana provides several ways to manage the time ranges of the data being visualized, for dashboard, panels and also for alerting.
This section describes supported time units and relative ranges, the common time controls, dashboard-wide time settings, and panel-specific time settings.
### Time units and relative ranges
Grafana supports the following time units: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `Q (quarters)` and `y (years)`.
The minus operator enables you to step back in time, relative to now. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
The plus operator enables you to step forward in time, relative to now. For example, you can use this feature to look at predicted data in the future.
The following table provides example relative ranges:
| Example relative range | From: | To: |
| ---------------------- | ----------- | ----------- |
| Last 5 minutes | `now-5m` | `now` |
| The day so far | `now/d` | `now` |
| This week | `now/w` | `now/w` |
| This week so far | `now/w` | `now` |
| This month | `now/M` | `now/M` |
| This month so far | `now/M` | `now` |
| Previous Month | `now-1M/M` | `now-1M/M` |
| This year so far | `now/Y` | `now` |
| This Year | `now/Y` | `now/Y` |
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
#### Note about Grafana Alerting
For Grafana Alerting, we do not support the following syntaxes at this time.
- now+n for future timestamps.
- now-1n/n for "start of n until end of n" because this is an absolute timestamp.
### Common time range controls
The dashboard and panel time controls have a common UI.
<img class="no-shadow" src="/static/img/docs/time-range-controls/common-time-controls-7-0.png" max-width="700px">
The following sections define common time range controls.
#### Current time range
The current time range, also called the _time picker_, shows the time range currently displayed in the dashboard or panel you are viewing.
Hover your cursor over the field to see the exact time stamps in the range and their source (such as the local browser).
<img class="no-shadow" src="/static/img/docs/time-range-controls/time-picker-7-0.png" max-width="300px">
Click the current time range to change it. You can change the current time using a _relative time range_, such as the last 15 minutes, or an _absolute time range_, such as `2020-05-14 00:00:00 to 2020-05-15 23:59:59`.
<img class="no-shadow" src="/static/img/docs/time-range-controls/change-current-time-range-7-0.png" max-width="900px">
#### Relative time range
Select the relative time range from the **Relative time ranges** list. You can filter the list using the input field at the top. Some examples of time ranges include:
- Last 30 minutes
- Last 12 hours
- Last 7 days
- Last 2 years
- Yesterday
- Day before yesterday
- This day last week
- Today so far
- This week so far
- This month so far
#### Absolute time range
You can set an absolute time range in the following ways:
- Type values into the **From** and **To** fields. You can type exact time values or relative values, such as `now-24h`, and then click **Apply time range**.
- Click in the **From** or **To** field. Grafana displays a calendar. Click the day or days you want to use as the current time range and then click **Apply time range**.
This section also displays recently used absolute ranges.
#### Zoom out (Cmd+Z or Ctrl+Z)
Click the **Zoom out** icon to view a larger time range in the dashboard or panel visualization.
#### Zoom in (only applicable to graph visualizations)
Click and drag to select the time range in the visualization that you want to view.
#### Refresh dashboard
Click the **Refresh dashboard** icon to immediately run every query on the dashboard and refresh the visualizations. Grafana cancels any pending requests when you trigger a refresh.
By default, Grafana does not automatically refresh the dashboard. Queries run on their own schedule according to the panel settings. However, if you want to regularly refresh the dashboard, then click the down arrow next to the **Refresh dashboard** icon and then select a refresh interval.
### Control the time range using a URL
You can control the time range of a dashboard by providing the following query parameters in the dashboard URL:
- `from`: Defines the lower limit of the time range, specified in `ms`, `epoch`, or [relative time]({{< relref "#relative-time-range" >}})
- `to`: Defines the upper limit of the time range, specified in `ms`, `epoch`, or [relative time]({{< relref "#relative-time-range" >}})
- `time` and `time.window`: Defines a time range from `time-time.window/2` to `time+time.window/2`. Both parameters should be specified in `ms`. For example `?time=1500000000000&time.window=10000` results in 10s time range from 1499999995000 to 1500000005000

View File

@@ -2,6 +2,7 @@
aliases:
- /docs/grafana/latest/variables/
- /docs/grafana/latest/variables/variable-examples/
- docs/grafana/latest/dashboards/variables/
title: Variables
weight: 130
---

View File

@@ -25,6 +25,7 @@ aliases:
- /docs/grafana/latest/variables/formatting-multi-value-variables/
- /docs/grafana/latest/reference/templating/
- /docs/grafana/latest/variables/manage-variable/
- /docs/grafana/latest/dashboards/variables/add-template-variables/
title: Add and manage variables
menuTitle: Manage variables
weight: 100
@@ -113,6 +114,8 @@ For example, if you have server names or region names that never change, then yo
_Text box_ variables display a free text input field with an optional default value. This is the most flexible variable, because you can enter any value. Use this type of variable if you have metrics with high cardinality or if you want to update multiple panels in a dashboard at the same time.
For more information about cardinality, refer to [What are cardinality spikes and why do they matter?](https://grafana.com/blog/2022/02/15/what-are-cardinality-spikes-and-why-do-they-matter/)
1. [Enter general options](#enter-general-options).
1. (Optional) In the **Default value** field, select the default value for the variable. If you do not enter anything in this field, then Grafana displays an empty text box for users to type text into.
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.

View File

@@ -2,6 +2,7 @@
aliases:
- /docs/grafana/latest/reference/templating/
- /docs/grafana/latest/variables/inspect-variable/
- /docs/grafana/latest/dashboards/variables/inspect-variable/
keywords:
- grafana
- templating

View File

@@ -3,6 +3,7 @@ aliases:
- /docs/grafana/latest/variables/advanced-variable-format-options/
- /docs/grafana/latest/reference/templating/
- /docs/grafana/latest/variables/syntax/
- /docs/grafana/latest/dashboards/variables/variable-syntax/
keywords:
- grafana
- templating

View File

@@ -165,7 +165,7 @@ Link an X-Ray data source in the "X-Ray trace link" section of the configuration
The data source select will contain only existing data source instances of type X-Ray so in order to use this feature you need to have existing X-Ray data source already configured, see [X-Ray docs](https://grafana.com/grafana/plugins/grafana-x-ray-datasource/) for details.
The X-Ray link will then appear in the log details section which is accessible by clicking on the log row either in Explore or in dashboard [Logs panel]({{< relref "../../visualizations/logs-panel/" >}}). To log the `@xrayTraceId` in your logs see the [AWS X-Ray documentation](https://docs.amazonaws.cn/en_us/xray/latest/devguide/xray-services.html). To provide the field to Grafana your log queries also have to contain the `@xrayTraceId` field, for example using query `fields @message, @xrayTraceId`.
The X-Ray link will then appear in the log details section which is accessible by clicking on the log row either in Explore or in dashboard [Logs panel]({{< relref "../../panels-visualizations/visualizations/logs/" >}}). To log the `@xrayTraceId` in your logs see the [AWS X-Ray documentation](https://docs.amazonaws.cn/en_us/xray/latest/devguide/xray-services.html). To provide the field to Grafana your log queries also have to contain the `@xrayTraceId` field, for example using query `fields @message, @xrayTraceId`.
![Trace link in log details](/static/img/docs/cloudwatch/xray-link-log-details-8-2.png 'Trace link in log details')

View File

@@ -180,7 +180,7 @@ Example dashboard:
## Annotations
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
queries via the Dashboard menu / Annotations view. Grafana can query any Elasticsearch index
for annotation events.
@@ -194,7 +194,7 @@ for annotation events.
## Querying Logs
Querying and displaying log data from Elasticsearch is available in [Explore]({{< relref "../explore/" >}}), and in the [logs panel]({{< relref "../visualizations/logs-panel/" >}}) in dashboards.
Querying and displaying log data from Elasticsearch is available in [Explore]({{< relref "../explore/" >}}), and in the [logs panel]({{< relref "../panels-visualizations/visualizations/logs/" >}}) in dashboards.
Select the Elasticsearch data source, and then optionally enter a lucene query to display your logs.
When switching from a Prometheus or Loki data source in Explore, your query is translated to an Elasticsearch log query with a correct Lucene filter.

View File

@@ -280,7 +280,7 @@ Refer to the [variable syntax documentation]({{< relref "../../dashboards/variab
{{< figure src="/static/img/docs/google-cloud-monitoring/annotations-8-0.png" max-width= "400px" class="docs-image--right" >}}
[Annotations]({{< relref "../../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
[Annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
queries via the Dashboard menu / Annotations view. Annotation rendering is expensive so it is important to limit the number of rows returned. There is no support for showing Google Cloud Monitoring annotations and events yet but it works well with [custom metrics](https://cloud.google.com/monitoring/custom-metrics/) in Google Cloud Monitoring.
With the query editor for annotations, you can select a metric and filters. The `Title` and `Text` fields support templating and can use data returned from the query. For example, the Title field could have the following text:

View File

@@ -216,7 +216,7 @@ For more information, refer to [Advanced variable format options]({{< relref "..
## Annotations
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
queries via the Dashboard menu / Annotations view.
Graphite supports two ways to query annotations. A regular metric query, for this you use the `Graphite query` textbox. A Graphite events query, use the `Graphite event tags` textbox,

View File

@@ -131,7 +131,7 @@ You can switch to raw query mode by clicking hamburger icon and then `Switch edi
## Querying logs
Querying and displaying log data from InfluxDB is available in [Explore]({{< relref "../../explore/" >}}), and in the [logs panel]({{< relref "../../visualizations/logs-panel/" >}}) in dashboards.
Querying and displaying log data from InfluxDB is available in [Explore]({{< relref "../../explore/" >}}), and in the [logs panel]({{< relref "../../panels-visualizations/visualizations/logs/" >}}) in dashboards.
Select the InfluxDB data source, and then enter a query to display your logs.
### Log queries
@@ -146,7 +146,7 @@ To add a filter, click the plus icon to the right of the `Measurements/Fields` b
## Annotations
[Annotations]({{< relref "../../dashboards/annotations/" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
[Annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
An example query:

View File

@@ -76,4 +76,4 @@ from(bucket: "grafana")
|> yield(name: "mean")
```
You can view the interpolated version of a query with the query inspector. For more information, refer to [Navigate the Query Inspector]({{< relref "../../panels/working-with-panels/navigate-inspector-panel/" >}}).
You can view the interpolated version of a query with the query inspector. For more information, refer to [Panel Inspector]({{< relref "../../panels-visualizations/panel-inspector/" >}}).

View File

@@ -147,7 +147,7 @@ There are two types of LogQL queries:
### Log queries
Loki log queries return the contents of the log lines. Querying and displaying log data from Loki is available via [Explore]({{< relref "../explore/" >}}), and with the [logs panel]({{< relref "../visualizations/logs-panel/" >}}) in dashboards. Select the Loki data source, and then enter a LogQL query to display your logs.F or more information about log queries and LogQL, refer to the [Loki log queries documentation](https://grafana.com/docs/loki/latest/logql/log_queries/)
Loki log queries return the contents of the log lines. Querying and displaying log data from Loki is available via [Explore]({{< relref "../explore/" >}}), and with the [logs panel]({{< relref "../panels-visualizations/visualizations/logs/" >}}) in dashboards. Select the Loki data source, and then enter a LogQL query to display your logs.F or more information about log queries and LogQL, refer to the [Loki log queries documentation](https://grafana.com/docs/loki/latest/logql/log_queries/).
#### Log context
@@ -232,7 +232,7 @@ You can use some global built-in variables in query variables; `$__interval`, `$
## Annotations
You can use any non-metric Loki query as a source for [annotations]({{< relref "../dashboards/annotations/" >}}). Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
You can use any non-metric Loki query as a source for [annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}). Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
## Configure the data source with provisioning

View File

@@ -75,18 +75,51 @@ Make sure the user does not get any unwanted privileges from the public role.
If you're using an older version of Microsoft SQL Server like 2008 and 2008R2 you may need to disable encryption to be able to connect.
If possible, we recommend you to use the latest service pack available for optimal compatibility.
## Query Editor
## Query builder
{{< figure src="/static/img/docs/v51/mssql_query_editor.png" class="docs-image--no-shadow" >}}
{{< figure src="/static/img/docs/v92/mssql_query_builder.png" class="docs-image--no-shadow" >}}
You will find the MSSQL query editor in the metrics tab in Graph, Singlestat or Table panel's edit mode. You enter edit mode by clicking the
panel title, then edit. The editor allows you to define a SQL query to select data to be visualized.
The MS SQL query builder is available when editing a panel using a MS SQL data source. The built query can be run by pressing the `Run query` button in the top right corner of the editor.
1. Select _Format as_ `Time series` (for use in Graph or Singlestat panel's among others) or `Table` (for use in Table panel among others).
1. This is the actual editor where you write your SQL queries.
1. Show help section for MSSQL below the query editor.
1. Show actual executed SQL query. Will be available first after a successful query has been executed.
1. Add an additional query where an additional query editor will be displayed.
### Format
The response from MS SQL can be formatted as either a table or as a time series. To use the time series format one of the columns must be named `time`.
### Dataset and Table selection
In the dataset dropdown, choose the MS SQL database to query. The dropdown is be populated with the databases that the user has access to.
When the dataset is selected, the table dropdown is populated with the tables that are available.
### Columns and Aggregation functions (SELECT)
Using the dropdown, select a column to include in the data. You can also specify an optional aggregation function.
Add further value columns by clicking the plus button and another column dropdown appears.
### Filter data (WHERE)
To add a filter, flip the switch at the top of the editor.
Using the first dropdown, select if all the filters need to match (AND) or if only one of the filters needs to match (OR).
To add more columns to filter on use the plus button.
### Group By
To group the results by column, flip the group switch at the top of the editor. You can then choose which column to group the results by. The group by clause can be removed by pressing the X button.
### Preview
By flipping the preview switch at the top of the editor, you can get a preview of the SQL query generated by the query builder.
## Code editor
{{< figure src="/static/img/docs/v92/sql_code_editor.png" class="docs-image--no-shadow" >}}
To make advanced queries, switch to the code editor by clicking `code` in the top right corner of the editor. The code editor support autocompletion of tables, columns, SQL keywords, standard sql functions, Grafana template variables and Grafana macros. Columns cannot be completed before a table has been specified.
You can expand the code editor by pressing the `chevron` pointing downwards in the lower right corner of the code editor.
`CTRL/CMD + Return` works as a keyboard shortcut to run the query.
<div class="clearfix"></div>
@@ -182,7 +215,7 @@ A time series query result is returned in a [wide data frame format]({{< relref
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}).
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}).
**Example with `metric` column:**
@@ -226,7 +259,7 @@ GROUP BY
ORDER BY 1
```
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}) display name value of `${__field.labels.hostname}`.
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}) display name value of `${__field.labels.hostname}`.
Data frame result:
@@ -345,7 +378,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../da
## Annotations
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
**Columns:**

View File

@@ -73,60 +73,51 @@ Example:
You can use wildcards (`*`) in place of database or table if you want to grant access to more databases and tables.
## Query Editor
## Query builder
> Only available in Grafana v5.4+.
{{< figure src="/static/img/docs/v92/mysql_query_builder.png" class="docs-image--no-shadow" >}}
{{< figure src="/static/img/docs/v54/mysql_query_still.png" class="docs-image--no-shadow" animated-gif="/static/img/docs/v54/mysql_query.gif" >}}
The MySQL query builder is available when editing a panel using a MySQL data source. The built query can be run by pressing the `Run query` button in the top right corner of the editor.
You find the MySQL query editor in the metrics tab in a panel's edit mode. You enter edit mode by clicking the
panel title, then edit.
### Format
The query editor has a link named `Generated SQL` that shows up after a query has been executed, while in panel edit mode. Click on it and it will expand and show the raw interpolated SQL string that was executed.
The response from MySQL can be formatted as either a table or as a time series. To use the time series format one of the columns must be named `time`.
### Select table, time column and metric column (FROM)
### Dataset and Table selection
When you enter edit mode for the first time or add a new query Grafana will try to prefill the query builder with the first table that has a timestamp column and a numeric column.
In the FROM field, Grafana will suggest tables that are in the configured database. To select a table or view in another database that your database user has access to you can manually enter a fully qualified name (database.table) like `otherDb.metrics`.
The Time column field refers to the name of the column holding your time values. Selecting a value for the Metric column field is optional. If a value is selected, the Metric column field will be used as the series name.
The metric column suggestions will only contain columns with a text datatype (text, tinytext, mediumtext, longtext, varchar, char).
If you want to use a column with a different datatype as metric column you may enter the column name with a cast: `CAST(numericColumn as CHAR)`.
You may also enter arbitrary SQL expressions in the metric column field that evaluate to a text datatype like
`CONCAT(column1, " ", CAST(numericColumn as CHAR))`.
In the dataset dropdown, choose the MySQL database to query. The dropdown is be populated with the databases that the user has access to.
When the dataset is selected, the table dropdown is populated with the tables that are available.
### Columns and Aggregation functions (SELECT)
In the `SELECT` row you can specify what columns and functions you want to use.
In the column field you may write arbitrary expressions instead of a column name like `column1 * column2 / column3`.
Using the dropdown, select a column to include in the data. You can also specify an optional aggregation function.
If you use aggregate functions you need to group your resultset. The editor will automatically add a `GROUP BY time` if you add an aggregate function.
You may add further value columns by clicking the plus button and selecting `Column` from the menu. Multiple value columns will be plotted as separate series in the graph panel.
Add further value columns by clicking the plus button and another column dropdown appears.
### Filter data (WHERE)
To add a filter click the plus icon to the right of the `WHERE` condition. You can remove filters by clicking on
the filter and selecting `Remove`. A filter for the current selected timerange is automatically added to new queries.
To add a filter, flip the switch at the top of the editor.
Using the first dropdown, select if all the filters need to match (AND) or if only one of the filters needs to match (OR).
To add more columns to filter on use the plus button.
### Group By
To group by time or any other columns click the plus icon at the end of the GROUP BY row. The suggestion dropdown will only show text columns of your currently selected table but you may manually enter any column.
You can remove the group by clicking on the item and then selecting `Remove`.
To group the results by column, flip the group switch at the top of the editor. You can then choose which column to group the results by. The group by clause can be removed by pressing the X button.
If you add any grouping, all selected columns need to have an aggregate function applied. The query builder will automatically add aggregate functions to all columns without aggregate functions when you add groupings.
### Preview
#### Gap Filling
By flipping the preview switch at the top of the editor, you can get a preview of the SQL query generated by the query builder.
Grafana can fill in missing values when you group by time. The time function accepts two arguments. The first argument is the time window that you would like to group by, and the second argument is the value you want Grafana to fill missing items with.
## Code editor
### Text Editor Mode (RAW)
{{< figure src="/static/img/docs/v92/sql_code_editor.png" class="docs-image--no-shadow" >}}
You can switch to the raw query editor mode by clicking the hamburger icon and selecting `Switch editor mode` or by clicking `Edit SQL` below the query.
To make advanced queries, switch to the code editor by clicking `code` in the top right corner of the editor. The code editor support autocompletion of tables, columns, SQL keywords, standard sql functions, Grafana template variables and Grafana macros. Columns cannot be completed before a table has been specified.
> If you use the raw query editor, be sure your query at minimum has `ORDER BY time` and a filter on the returned time range.
You can expand the code editor by pressing the `chevron` pointing downwards in the lower right corner of the code editor.
`CTRL/CMD + Return` works as a keyboard shortcut to run the query.
## Macros
@@ -191,7 +182,7 @@ A time series query result is returned in a [wide data frame format]({{< relref
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}).
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}).
**Example with `metric` column:**
@@ -233,7 +224,7 @@ GROUP BY time, hostname
ORDER BY time
```
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [[Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}) display value of `${__field.labels.hostname}`.
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [[Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}) display value of `${__field.labels.hostname}`.
Data frame result:
@@ -382,7 +373,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../da
## Annotations
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
**Example query using time column with epoch values:**

View File

@@ -19,22 +19,22 @@ Grafana ships with a built-in PostgreSQL data source plugin that allows you to q
To access PostgreSQL settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the PostgreSQL data source.
| Name | Description |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
| `Default` | Default data source means that it will be pre-selected for new panels. |
| `Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and it may cause errors. |
| `Database` | Name of your PostgreSQL database. |
| `User` | Database user's login/username |
| `Password` | Database user's password |
| `SSL Mode` | Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. When SSL Mode is disabled, SSL Method and Auth Details would not be visible. |
| `SSL Auth Details Method` | Determines whether the SSL Auth details will be configured as a file path or file content. Grafana v7.5+ |
| `SSL Auth Details Value` | File path or file content of SSL root certificate, client certificate and client key |
| `Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). |
| `Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). |
| `Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). |
| `Version` | Determines which functions are available in the query builder (only available in Grafana 5.3+). |
| `TimescaleDB` | A time-series database built as a PostgreSQL extension. When enabled, Grafana uses `time_bucket` in the `$__timeGroup` macro to display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). |
| Name | Description |
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
| `Default` | Default data source means that it will be pre-selected for new panels. |
| `Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and it may cause errors. |
| `Database` | Name of your PostgreSQL database. |
| `User` | Database user's login/username |
| `Password` | Database user's password |
| `SSL Mode` | Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. When SSL Mode is disabled, SSL Method and Auth Details would not be visible. |
| `SSL Auth Details Method` | Determines whether the SSL Auth details will be configured as a file path or file content. Grafana v7.5+ |
| `SSL Auth Details Value` | File path or file content of SSL root certificate, client certificate and client key |
| `Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). |
| `Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). |
| `Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). |
| `Version` | Determines which functions are available in the query builder (only available in Grafana 5.3+). |
| `TimescaleDB` | A time-series database built as a PostgreSQL extension. When enabled, Grafana uses `time_bucket` in the `$__timeGroup` macro to display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). For more information, see [TimescaleDB documentation](https://docs.timescale.com/timescaledb/latest/tutorials/grafana/grafana-timescalecloud/#connect-timescaledb-and-grafana). |
### Min time interval
@@ -71,69 +71,51 @@ Example:
Make sure the user does not get any unwanted privileges from the public role.
## Query editor
## Query builder
{{< figure src="/static/img/docs/v53/postgres_query_still.png" class="docs-image--no-shadow" animated-gif="/static/img/docs/v53/postgres_query.gif" >}}
{{< figure src="/static/img/docs/v92/postgresql_query_builder.png" class="docs-image--no-shadow" >}}
You find the PostgreSQL query editor in the metrics tab in Graph or Singlestat panel's edit mode. You enter edit mode by clicking the
panel title, then edit.
The PostgreSQL query builder is available when editing a panel using a PostgreSQL data source. The built query can be run by pressing the `Run query` button in the top right corner of the editor.
The query editor has a link named `Generated SQL` that shows up after a query has been executed, while in panel edit mode. Click on it and it will expand and show the raw interpolated SQL string that was executed.
### Format
### Select table, time column and metric column (FROM)
The response from PostgreSQL can be formatted as either a table or as a time series. To use the time series format one of the columns must be named `time`.
When you enter edit mode for the first time or add a new query Grafana will try to prefill the query builder with the first table that has a timestamp column and a numeric column.
### Dataset and Table selection
In the FROM field, Grafana will suggest tables that are in the `search_path` of the database user. To select a table or view not in your `search_path`
you can manually enter a fully qualified name (schema.table) like `public.metrics`.
In the dataset dropdown, choose the PostgreSQL database to query. The dropdown is be populated with the databases that the user has access to.
When the dataset is selected, the table dropdown is populated with the tables that are available.
The Time column field refers to the name of the column holding your time values. Selecting a value for the Metric column field is optional. If a value is selected, the Metric column field will be used as the series name.
### Columns and Aggregation functions (SELECT)
The metric column suggestions will only contain columns with a text datatype (char,varchar,text).
If you want to use a column with a different datatype as metric column you may enter the column name with a cast: `ip::text`.
You may also enter arbitrary SQL expressions in the metric column field that evaluate to a text datatype like
`hostname || ' ' || container_name`.
Using the dropdown, select a column to include in the data. You can also specify an optional aggregation function.
### Columns, window, and aggregation functions (SELECT)
In the `SELECT` row you can specify what columns and functions you want to use.
In the column field you may write arbitrary expressions instead of a column name like `column1 * column2 / column3`.
The available functions in the query editor depend on the PostgreSQL version you selected when configuring the data source.
If you use aggregate functions you need to group your resultset. The editor will automatically add a `GROUP BY time` if you add an aggregate function.
The editor tries to simplify and unify this part of the query. For example:<br>
![](/static/img/docs/v53/postgres_select_editor.png)<br>
The above will generate the following PostgreSQL `SELECT` clause:
```sql
avg(tx_bytes) OVER (ORDER BY "time" ROWS 5 PRECEDING) AS "tx_bytes"
```
You may add further value columns by clicking the plus button and selecting `Column` from the menu. Multiple value columns will be plotted as separate series in the graph panel.
Add further value columns by clicking the plus button and another column dropdown appears.
### Filter data (WHERE)
To add a filter click the plus icon to the right of the `WHERE` condition. You can remove filters by clicking on
the filter and selecting `Remove`. A filter for the current selected timerange is automatically added to new queries.
To add a filter, flip the switch at the top of the editor.
Using the first dropdown, select if all the filters need to match (AND) or if only one of the filters needs to match (OR).
### Group by
To add more columns to filter on use the plus button.
To group by time or any other columns click the plus icon at the end of the GROUP BY row. The suggestion dropdown will only show text columns of your currently selected table but you may manually enter any column.
You can remove the group by clicking on the item and then selecting `Remove`.
### Group By
If you add any grouping, all selected columns need to have an aggregate function applied. The query builder will automatically add aggregate functions to all columns without aggregate functions when you add groupings.
To group the results by column, flip the group switch at the top of the editor. You can then choose which column to group the results by. The group by clause can be removed by pressing the X button.
#### Gap filling
### Preview
Grafana can fill in missing values when you group by time. The time function accepts two arguments. The first argument is the time window that you would like to group by, and the second argument is the value you want Grafana to fill missing items with.
By flipping the preview switch at the top of the editor, you can get a preview of the SQL query generated by the query builder.
### Text editor mode (RAW)
## Code editor
You can switch to the raw query editor mode by clicking the hamburger icon and selecting `Switch editor mode` or by clicking `Edit SQL` below the query.
{{< figure src="/static/img/docs/v92/sql_code_editor.png" class="docs-image--no-shadow" >}}
> If you use the raw query editor, be sure your query at minimum has `ORDER BY time` and a filter on the returned time range.
To make advanced queries, switch to the code editor by clicking `code` in the top right corner of the editor. The code editor support autocompletion of tables, columns, SQL keywords, standard sql functions, Grafana template variables and Grafana macros. Columns cannot be completed before a table has been specified.
You can expand the code editor by pressing the `chevron` pointing downwards in the lower right corner of the code editor.
`CTRL/CMD + Return` works as a keyboard shortcut to run the query.
## Macros
@@ -196,7 +178,7 @@ A time series query result is returned in a [wide data frame format]({{< relref
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}).
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}).
**Example with `metric` column:**
@@ -238,7 +220,7 @@ GROUP BY time, hostname
ORDER BY time
```
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}) display value of `${__field.labels.hostname}`.
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}) display value of `${__field.labels.hostname}`.
Data frame result:
@@ -380,7 +362,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../da
## Annotations
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
**Example query using time column with epoch values:**

View File

@@ -90,15 +90,15 @@ The "Validate selector" button will check with Prometheus how many time series a
#### Options
![Options](/static/img/docs/prometheus/options-9-1.png 'Options')
![Options](/static/img/docs/prometheus/options-8-5.png 'Options')
| Name | Description |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Legend` | Controls the name of the time series. Use predefined format or use custom format.<br/>`Auto` - if there is a single label, it shows just the value of that label for each series. If there are multiple labels, it works the same as `Verbose`<br/>`Verbose` - includes all labels.<br/>`Custom` - select will change to text input. Use templating to select which labels will be included. For example, `{{hostname}}` is replaced by the label value for the label `hostname`. Clear the input and click outside the input to go back to select mode. |
| `Min step` | Set the lower bounds on the interval between data points. For example, set "1h" to hint that measurements are not frequent (taken hourly). `$__interval` and `$__rate_interval` are supported. |
| `Format` | You can switch between `Table` `Time series` or `Heatmap` options. The `Table` option works only in the Table panel. `Heatmap` displays metrics of the Histogram type on a Heatmap panel. Under the hood, it converts cumulative histograms to regular ones and sorts series by the bucket bound. |
| `Type` | `Range` - Query returning a Range vector, a set of time series containing a range of data points over time for each time series.<br/>`Instant` - Perform an "instant" query to return only the latest value that Prometheus has scraped for the requested time series. Instant queries can return results much faster than normal range queries. Use them to look up label sets. Instant query results are made up only of one data point per series but can be shown in the graph panel in a dashboard with the help of [series overrides]({{< relref "../visualizations/graph-panel/#series-overrides" >}}). To show them in the graph as a latest value point, add a series override and select `Points > true`. To show a horizontal line across the whole graph, add a series override and select `Transform > constant`. <br/>`Both` - Available only in Explore. Runs both range and instant query |
| `Exemplars` | If on, run exemplars query with the regular query and show exemplars in the graph. |
| Name | Description |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Legend` | Controls the name of the time series. Use predefined format or use custom format.<br/>`Auto` - if there is a single label, it shows just the value of that label for each series. If there are multiple labels, it works the same as `Verbose`<br/>`Verbose` - includes all labels.<br/>`Custom` - select will change to text input. Use templating to select which labels will be included. For example, `{{hostname}}` is replaced by the label value for the label `hostname`. Clear the input and click outside the input to go back to select mode. |
| `Min step` | Set the lower bounds on the interval between data points. For example, set "1h" to hint that measurements are not frequent (taken hourly). `$__interval` and `$__rate_interval` are supported. |
| `Format` | You can switch between `Table` `Time series` or `Heatmap` options. The `Table` option works only in the Table panel. `Heatmap` displays metrics of the Histogram type on a Heatmap panel. Under the hood, it converts cumulative histograms to regular ones and sorts series by the bucket bound. |
| `Type` | `Range` - Query returning a Range vector, a set of time series containing a range of data points over time for each time series.<br/>`Instant` - Perform an "instant" query to return only the latest value that Prometheus has scraped for the requested time series. Instant queries can return results much faster than normal range queries. Use them to look up label sets. Instant query results are made up only of one data point per series and can be shown in the time series panel by adding a field override, adding a property to the override named `Transform`, and selecting `Constant` from the **Transform** dropdown. For more information, refer to [Transform]({{< relref "../panels-visualizations/visualizations/time-series/#transform" >}}). |
| `Exemplars` | If on, run exemplars query with the regular query and show exemplars in the graph. |
> **Note:** Grafana modifies the request dates for queries to align them with the dynamically calculated step. This ensures consistent display of metrics data, but it can result in a small gap of data at the right edge of a graph.
@@ -148,7 +148,7 @@ In same cases the query editor can detect which operations would be most appropr
### Explain
![Explain mode](/static/img/docs/prometheus/explain-9-1.png 'Explain mode')
![Explain mode](/static/img/docs/prometheus/explain-9-1.gif 'Explain mode')
Explain mode helps with understanding the query. It shows a step by step explanation of all query parts and the operations.
@@ -240,7 +240,7 @@ applied to all your Prometheus queries.
## Annotations
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
queries via the Dashboard menu / Annotations view.
Prometheus supports two ways to query annotations.

View File

@@ -15,7 +15,11 @@ title: 'Alerting HTTP API '
# Alerting API
> **Note:** This topic is relevant for the [legacy dashboard alerts](https://grafana.com/docs/grafana/v8.5/alerting/old-alerting/) only.
> **Note:** Starting with v9.0, the Alerting HTTP API is deprecated. It will be removed in a future release.
This topic is relevant for the [legacy dashboard alerts](https://grafana.com/docs/grafana/v8.5/alerting/old-alerting/) only.
If you are using Grafana Alerting, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/)
You can find Grafana Alerting API specification details [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json). Also, refer to [Grafana Alerting alerts documentation]({{< relref "../../alerting/" >}}) for details on how to create and manage new alerts.

View File

@@ -22,8 +22,19 @@ The most basic example for a dashboard for which there is no authentication. You
curl http://localhost:3000/api/search
```
Heres a cURL command that works for getting the home dashboard when you are running Grafana locally with [basic authentication]({{< relref "../../setup-grafana/configure-security/configure-authentication/#basic-auth" >}}) enabled using the default admin credentials:
Here's a cURL command that works for getting the home dashboard when you are running Grafana locally with [basic authentication]({{< relref "../../setup-grafana/configure-security/configure-authentication/#basic-auth" >}}) enabled using the default admin credentials:
```
curl http://admin:admin@localhost:3000/api/search
```
To pass a username and password with [HTTP basic authorization]({{< relref "/administration/roles-and-permissions/access-control/manage-rbac-roles/" >}}), encode them as base64.
You can't use authorization tokens in the request.
For example, to [list permissions associated with roles]({{< relref "/administration/roles-and-permissions/access-control/manage-rbac-roles/" >}}) given a username of `user` and password of `password`, use:
```
curl --location --request GET '<grafana_url>/api/access-control/builtin-roles' --header 'Authorization: Basic dXNlcjpwYXNzd29yZAo='
```
where `dXNlcjpwYXNzd29yZAo=` is the base64 encoding of `user:password`.

View File

@@ -15,16 +15,416 @@ title: Reporting API
This API allows you to interact programmatically with the [Reporting]({{< relref "../../dashboards/create-reports/" >}}) feature.
> The Reporting API is not stabilized yet, it is still in active development and may change without prior notice.
> Reporting is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../../enterprise/" >}}).
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "../../administration/roles-and-permissions/access-control/custom-role-actions-scopes/" >}}) for more information.
## List all reports
`GET /api/reports`
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| ------------ | --------------------------- |
| reports:read | reports:\*<br>reports:id:\* |
### Example request
```http
GET /api/reports HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 1840
```
### Status Codes
- **200** OK
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **500** Unexpected error or server misconfiguration. Refer to server logs for more details.
## Get a report
`GET /api/reports/:id`
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| ------------ | ---------------------------------------------------------- |
| reports:read | reports:\*<br>reports:id:\*<br>reports:id:1(single report) |
### Example request
```http
GET /api/reports/2 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 940
```
### Status Codes
- **200** OK
- **400** Bad request (invalid report ID).
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **403** Forbidden (access denied to a report or a dashboard used in the report).
- **404** Not found (such report does not exist).
- **500** Unexpected error or server misconfiguration. Refer to server logs for more details.
## Create a report
`POST /api/reports`
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| -------------- | ----- |
| reports:create | n/a |
### Example request
```http
POST /api/reports HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
#### Config JSON Body Schema
| Field name | Data type | Description |
| ------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | string | Name of the report that is used as an email subject. |
| recipients | string | Comma-separated list of emails to which to send the report to. |
| replyTo | string | Comma-separated list of emails used in a reply-to field of the report email. |
| message | string | Text message used for the body of the report email. |
| startDate | string | Report distribution starts from this date. |
| endDate | string | Report distribution ends on this date. |
| frequency | string | Specifies how often the report should be sent. Can be `once`, `hourly`, `daily`, `weekly`, `monthly`, `last` or `custom`.<br/><br/>`last` - schedules the report for the last day of month.<br/><br/>`custom` - schedules the report to be sent on a custom interval.<br/>It requires `intervalFrequency` and `intervalAmount` to be specified: for example, every 2 weeks, where 2 is an `intervalAmount` and `weeks` is an `intervalFrequency`. |
| intervalFrequency | string | The type of the `custom` interval: `hours`, `days`, `weeks`, `months`. |
| intervalAmount | number | `custom` interval amount. |
| workdaysOnly | string | Send the report only on Monday-Friday. Applicable to `hourly` and `daily` types of schedule. |
| timeZone | string | Time zone used to schedule report execution. |
| orientation | string | Can be `portrait` or `landscape`. |
| layout | string | Can be `grid` or `simple`. |
| enableDashboardUrl | bool | Adds a dashboard url to the bottom of the report email. |
| formats | []string | Specified what kind of attachment to generate for the report - `csv`, `pdf`, `image`.<br/>`pdf` is the default one.<br/>`csv` attaches a CSV file for each table panel.<br/>`image` embeds an image of a dashboard into the email's body. |
| dashboards | []object | Dashboards to generate a report for.<br/> See "Report Dashboard Schema" section below. |
#### Report Dashboard Schema
| Field name | Data type | Description |
| ------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| dashboard.uid | string | Dashboard [UID](../dashboard#identifier-id-vs-unique-identifier-uid). |
| timeRange.from | string | Dashboard time range from. |
| timeRange.to | string | Dashboard time range to. |
| reportVariables.<variableName> | string | Key-value pairs containing the template variables for this report, in JSON format. If empty, the template variables from the report's dashboard will be used. |
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 35
```
### Status Codes
- **200** OK
- **400** Bad request (invalid json, missing or invalid fields values, etc.).
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details
## Update a report
`PUT /api/reports/:id`
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| ------------- | --------------------------------------------------------- |
| reports:write | reports:\*</br>reports:id:\*</br>reports:1(single report) |
### Example request
See [JSON body schema]({{< ref "#config-json-body-schema" >}}) for fields description.
```http
GET /api/reports HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 28
```
### Status Codes
- **200** OK
- **400** Bad request (invalid json, missing or invalid fields values, etc.).
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **403** Forbidden (access denied to a report or a dashboard used in the report).
- **404** Not found (such report does not exist).
- **500** Unexpected error or server misconfiguration. Refer to server logs for more details.
## Delete a report
`DELETE /api/reports/:id`
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| -------------- | --------------------------------------------------------- |
| reports:delete | reports:\*</br>reports:id:\*</br>reports:1(single report) |
### Example request
```http
GET /api/reports/6 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 39
```
### Status Codes
- **200** OK
- **400** Bad request (invalid report ID).
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **404** - Not found (report with this ID does not exist).
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details
## Send a report
`POST /api/reports/email`
Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client's timeout to at least 60 seconds.
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| ------------ | ----- |
| reports:send | n/a |
### Example request
```http
POST /api/reports/email HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
#### JSON Body Schema
| Field name | Data type | Description |
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id | string | ID of the report to send. It is the same as in the URL when editing a report, not to be confused with the ID of the dashboard. Required. |
| emails | string | Comma-separated list of emails to which to send the report to. Overrides the emails from the report. Required if `useEmailsFromReport` is not present. |
| useEmailsFromReport | boolean | Send the report to the emails specified in the report. Required if `emails` is not present. |
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 29
```
### Status Codes
- **200** Report was sent.
- **400** Bad request (invalid json, missing content-type, missing or invalid fields, etc.).
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
- **404** - Report not found.
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details.
## Get reports branding settings
`GET /api/reports/settings`
Returns reports branding settings that are global and used across all the reports.
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| --------------------- | ----- |
| reports.settings:read | n/a |
### Example request
```http
GET /api/reports/settings HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 181
```
### Status Codes
- **200** OK
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more detail
## Save reports branding settings
`POST /api/reports/settings`
Creates settings if they don't exist, otherwise updates them. These settings are global and used across all the reports.
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| ---------------------- | ----- |
| reports.settings:write | n/a |
### Example request
```http
POST /api/reports/settings HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
#### JSON Body Schema
| Field name | Data type | Description |
| ------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| branding.reportLogoUrl | string | URL of an image used as a logo on every page of the report. |
| branding.emailLogoUrl | string | URL of an image used as a logo in the email. |
| branding.emailFooterMode | string | Can be `sent-by` or `none`.<br/>`sent-by` adds a "Sent by `branding.emailFooterText`" footer link to the email. Requires specifying values in the `branding.emailFooterText` and `branding.emailFooterLink` fields.<br/>`none` suppresses adding a "Sent by" footer link to the email. |
| branding.emailFooterText | string | Text of a URL added to the email "Sent by" footer. |
| branding.emailFooterLink | string | URL address value added to the email "Sent by" footer. |
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 35
```
### Status Codes
- **200** OK
- **400** Bad request (invalid json, missing or invalid fields values, etc.).
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more detail
## Send a test email
`POST /api/reports/test-email`
Sends a test email with a report without persisting it in the database.
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| ------------ | ----- |
| reports:send | n/a |
### Example request
See [JSON body schema]({{< ref "#config-json-body-schema" >}}) for fields description.
```http
POST /api/reports/test-email HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 29
```
### Status Codes
- **200** OK
- **400** Bad request (invalid json, missing or invalid fields values, etc.).
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details
> Only available in Grafana Enterprise v7.0+.
> This API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.
`POST /api/reports/email`
Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client's timeout to at least 60 seconds.
@@ -51,13 +451,13 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
}
```
| id | string | ID of the report to send. It is the same as in the URL when editing a report, not to be confused with the ID of the dashboard. Required. |
#### JSON Body Schema
| useEmailsFromReport | boolean | Send the report to the emails specified in the report. Required if **emails** is not present. |
### Example response
```http
| Field name | Data type | Description |
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| id | string | ID of the report to send. It is the same as in the URL when editing a report, not to be confused with the ID of the dashboard. Required. |
| emails | string | Comma-separated list of emails to which to send the report to. Overrides the emails from the report. Required if `useEmailsFromReport` is not present. |
| useEmailsFromReport | boolean | Send the report to the emails specified in the report. Required if `emails` is not present. |
### Example response
@@ -71,11 +471,205 @@ Content-Length: 29
### Status Codes
| 403 | User is authenticated but is not authorized to generate the report. |
| 404 | Report not found. |
| 500 | Unexpected error or server misconfiguration. Refer to server logs for more details. |
| 400 | Bad request (invalid json, missing content-type, missing or invalid fields, etc.). |
| 401 | Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}). |
| 403 | User is authenticated but is not authorized to generate the report. |
| 404 | Report not found. |
| 500 | Unexpected error or server misconfiguration. Refer to server logs for more details. |
- **200** Report was sent.
- **400** Bad request (invalid json, missing content-type, missing or invalid fields, etc.).
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
- **404** - Report not found.
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details.
## Get reports branding settings
`GET /api/reports/settings`
Returns reports branding settings that are global and used across all the reports.
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| --------------------- | ----- |
| reports.settings:read | n/a |
### Example request
```http
GET /api/reports/settings HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 181
{
"id": 1,
"userId": 1,
"orgId": 1,
"branding": {
"reportLogoUrl": "",
"emailLogoUrl": "",
"emailFooterMode": "sent-by",
"emailFooterText": "Grafana Labs",
"emailFooterLink": "https://grafana.com/"
}
}
```
### Status Codes
- **200** OK
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more detail
## Save reports branding settings
`POST /api/reports/settings`
Creates settings if they don't exist, otherwise updates them. These settings are global and used across all the reports.
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| ---------------------- | ----- |
| reports.settings:write | n/a |
### Example request
```http
POST /api/reports/settings HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"branding": {
"reportLogoUrl": "https://grafana.com/reportLogo.jpg",
"emailLogoUrl": "https://grafana.com/emailLogo.jpg",
"emailFooterMode": "sent-by",
"emailFooterText": "Grafana Labs",
"emailFooterLink": "https://grafana.com/"
}
}
```
#### JSON Body Schema
| Field name | Data type | Description |
| ------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| branding.reportLogoUrl | string | URL of an image used as a logo on every page of the report. |
| branding.emailLogoUrl | string | URL of an image used as a logo in the email. |
| branding.emailFooterMode | string | Can be `sent-by` or `none`.<br/>`sent-by` adds a "Sent by `branding.emailFooterText`" footer link to the email. Requires specifying values in the `branding.emailFooterText` and `branding.emailFooterLink` fields.<br/>`none` suppresses adding a "Sent by" footer link to the email. |
| branding.emailFooterText | string | Text of a URL added to the email "Sent by" footer. |
| branding.emailFooterLink | string | URL address value added to the email "Sent by" footer. |
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 35
{
"message": "Report settings saved"
}
```
### Status Codes
- **200** OK
- **400** Bad request (invalid json, missing or invalid fields values, etc.).
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more detail
## Send a test email
`POST /api/reports/test-email`
Sends a test email with a report without persisting it in the database.
#### Required permissions
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
| Action | Scope |
| ------------ | ----- |
| reports:send | n/a |
### Example request
See [JSON body schema]({{< ref "#config-json-body-schema" >}}) for fields description.
```http
POST /api/reports/test-email HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{{
"name": "Report 4",
"recipients": "example-report@grafana.com",
"replyTo": "",
"message": "Hello, please, find the report attached",
"schedule": {
"startDate": "2022-10-02T10:00:00+02:00",
"endDate": "2022-11-02T20:00:00+02:00",
"frequency": "daily",
"intervalFrequency": "",
"intervalAmount": 0,
"workdaysOnly": true,
"timeZone": "Europe/Warsaw"
},
"options": {
"orientation": "landscape",
"layout": "grid"
},
"enableDashboardUrl": true,
"dashboards": [
{
"dashboard": {
"uid": "7MeksYbmk",
},
"timeRange": {
"from": "2022-08-08T15:00:00+02:00",
"to": "2022-09-02T17:00:00+02:00"
},
"reportVariables": {
"varibale1": "Value1"
}
}
],
"formats": [
"pdf",
"csv"
]
}
```
### Example response
```http
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 29
{
"message": "Test email sent"
}
```
### Status Codes
- **200** OK
- **400** Bad request (invalid json, missing or invalid fields values, etc.).
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details

View File

@@ -6,7 +6,7 @@ title: Add support for annotations
# Add support for annotations
This guide explains how to add support for [annotations]({{< relref "../../dashboards/annotations/" >}}) to an existing data source plugin.
This guide explains how to add support for [annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) to an existing data source plugin.
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< ref "build-a-data-source-plugin.md" >}}).

View File

@@ -49,7 +49,7 @@ frame.add({ time: 1589189388597, content: 'user registered' });
frame.add({ time: 1589189406480, content: 'user logged in' });
```
That's all you need to start returning log data from your data source. Go ahead and try it out in [Explore]({{< relref "../../explore/" >}}) or by adding a [Logs panel]({{< relref "../../visualizations/logs-panel/" >}}).
That's all you need to start returning log data from your data source. Go ahead and try it out in [Explore]({{< relref "../../explore/" >}}) or by adding a [Logs panel]({{< relref "../../panels-visualizations/visualizations/logs/" >}}).
Congratulations, you just wrote your first logs data source plugin! Next, let's look at a couple of features that can further improve the experience for the user.

View File

@@ -74,7 +74,7 @@ A data transformation is any function that accepts a data frame as input, and re
A data frame with at least one time field is considered a _time series_.
For more information on time series, refer to our [Introduction to time series]({{< relref "../../basics/timeseries/" >}}).
For more information on time series, refer to our [Introduction to time series]({{< relref "../../fundamentals/timeseries/" >}}).
### Wide format
@@ -165,7 +165,7 @@ Dimensions: 5 fields by 2 rows
+---------------------+------------------+------------------+------------------+------------------+
```
> **Note:** Not all panels support the wide time series data frame format. To keep full backward compatibility we have introduced a transformation that can be used to convert from the wide to the long format. For usage information, refer to the [Prepare time series-transformation]({{< relref "../../panels/transform-data/#prepare-time-series" >}}).
> **Note:** Not all panels support the wide time series data frame format. To keep full backward compatibility we have introduced a transformation that can be used to convert from the wide to the long format. For usage information, refer to the [Prepare time series-transformation]({{< relref "../../panels-visualizations/query-transform-data/transform-data/#prepare-time-series" >}}).
## Technical references

View File

@@ -9,7 +9,7 @@ title: Legacy snapshot mode
{{< figure class="float-right" src="/static/img/docs/Grafana-snapshot-example.png" caption="A dashboard using snapshot data and not live data." >}}
Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../dashboards/json-model/" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](https://snapshots.raintank.io) if you want to send the snapshot to someone who does not have access to your Grafana server.
Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../dashboards/build-dashboards/view-dashboard-json-model" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](https://snapshots.raintank.io) if you want to send the snapshot to someone who does not have access to your Grafana server.
{{< figure class="float-right" src="/static/img/docs/animated_gifs/snapshots.gif" caption="Selecting a snapshot" >}}

View File

@@ -17,6 +17,10 @@ This guide helps you identify the steps required to update a plugin from the Gra
- [Plugin migration guide](#plugin-migration-guide)
- [Introduction](#introduction)
- [Table of contents](#table-of-contents)
- [From version 9.1.x to 9.2.x](#from-version-91x-to-92x)
- [React and React-dom as peer dependencies](#react-and-react-dom-as-peer-dependencies)
- [NavModelItem requires a valid icon name](#navmodelitem-requires-a-valid-icon-name)
- [Additional type availability](#additional-type-availability)
- [From version 8.x to 9.x](#from-version-8x-to-9x)
- [9.0 breaking changes](#90-breaking-changes)
- [theme.visualization.getColorByName replaces getColorForTheme](#themevisualizationgetcolorbyname-replaces-getcolorfortheme)
@@ -60,6 +64,65 @@ This guide helps you identify the steps required to update a plugin from the Gra
- [Migrate to data frames](#migrate-to-data-frames)
- [Troubleshoot plugin migration](#troubleshoot-plugin-migration)
## From version 9.1.x to 9.2.x
### React and React-dom as peer dependencies
In earlier versions of Grafana packages `react` and `react-dom` were installed during a `yarn install` regardless of a plugins dependencies. In 9.2.0 the `@grafana` packages declare these react packages as peerDependencies and will need adding to a plugins `package.json` file for test commands to continue to run successfully.
Example:
```json
// before
"dependencies": {
"@grafana/data": "9.1.0",
"@grafana/ui": "9.1.0",
},
// after
"dependencies": {
"@grafana/data": "9.2.0",
"@grafana/ui": "9.2.0",
"react": "17.0.2",
"react-dom": "17.0.2"
},
```
### NavModelItem requires a valid icon name
The typings of the `NavModelItem` have improved to only allow a valid `IconName` for the icon property. You can find the complete list of valid icons [here](https://github.com/grafana/grafana/blob/v9.2.0-beta1/packages/grafana-data/src/types/icon.ts). The icons specified in the list will work for older versions of Grafana 9.
Example:
```ts
// before
const model: NavModelItem = {
id: 'settings',
text: 'Settings',
icon: 'fa fa-cog',
url: `${baseUrl}/settings`,
};
// after
const model: NavModelItem = {
id: 'settings',
text: 'Settings',
icon: 'cog',
url: `${baseUrl}/settings`,
};
```
### Additional type availability
FieldProps, ModalProps, and QueryFieldProps are now exposed from `@grafana/ui`. They can be imported in the same way as other types.
Example:
```ts
import { FieldProps, ModalProps, QueryFieldProps } from '@grafana/ui';
```
## From version 8.x to 9.x
### 9.0 breaking changes

View File

@@ -54,21 +54,26 @@ With [enhanced LDAP integration]({{< relref "../setup-grafana/configure-security
[SAML authentication]({{< relref "../setup-grafana/configure-security/configure-authentication/saml/" >}}) enables users to authenticate with single sign-on services that use Security Assertion Markup Language (SAML).
### Protected roles
With [protected roles]({{< relref "../setup-grafana/configure-security/configure-authentication/#protected-roles" >}}), you can define user roles that are exempt from being converted from one authentication type to another when changing auth providers.
## Enterprise features
Grafana Enterprise adds the following features:
- [Role-based access control]({{< relref "../administration/roles-and-permissions/access-control/" >}}) to control access with role-based permissions.
- [Data source permissions]({{< relref "../administration/data-source-management/" >}}) to restrict query access to specific teams and users.
- [Data source query caching]({{< relref "query-caching/" >}}) to temporarily store query results in Grafana to reduce data source load and rate limiting.
- [Data source query caching]({{< relref "query-caching" >}}) to temporarily store query results in Grafana to reduce data source load and rate limiting.
- [Reporting]({{< relref "../dashboards/create-reports/" >}}) to generate a PDF report from any dashboard and set up a schedule to have it emailed to whoever you choose.
- [Export dashboard as PDF]({{< relref "../dashboards/share-dashboards-panels/#export-dashboard-as-pdf" >}})
- [Custom branding]({{< relref "../setup-grafana/configure-grafana/configure-custom-branding/" >}}) to customize Grafana from the brand and logo to the footer links.
- [Usage insights]({{< relref "../dashboards/assess-dashboard-usage/" >}}) to understand how your Grafana instance is used.
- [Recorded queries]({{< relref "recorded-queries" >}}) to see trends over time for your data sources.
- [Vault integration]({{< relref "../setup-grafana/configure-security/configure-database-encryption/integrate-with-hashicorp-vault/" >}}) to manage your configuration or provisioning secrets with Vault.
- [Auditing]({{< relref "../setup-grafana/configure-security/audit-grafana/" >}}) tracks important changes to your Grafana instance to help you manage and mitigate suspicious activity and meet compliance requirements.
- [Request security]({{< relref "../setup-grafana/configure-security/configure-request-security/" >}}) makes it possible to restrict outgoing requests from the Grafana server.
- [Settings updates at runtime]({{< relref "settings-updates/" >}}) allows you to update Grafana settings at runtime without requiring a restart.
- [Settings updates at runtime]({{< relref "settings-updates" >}}) allows you to update Grafana settings at runtime without requiring a restart.
## Enterprise data sources

View File

@@ -25,9 +25,9 @@ The following cache backends are available: in-memory, Redis, and Memcached.
When a panel queries a cached data source, the time until this query fetches fresh data is determined by the panel's **interval.** This means that wider panels and dashboards with shorter time ranges fetch new data more frequently than narrower panels and dashboards with longer time ranges.
Interval is visible in a panel's [query options]({{< relref "../panels/query-options/" >}}). It is calculated like this: `(max data points) / time range`. Max data points are calculated based on the width of the panel. For example, a full-width panel on a dashboard with a time range of `last 7 days` will retrieve fresh data every 10 minutes. In this example, cached data for this panel will be served for up to 10 minutes before Grafana queries the data source again and returns new data.
Interval is visible in a panel's [query options]({{< relref "../panels-visualizations/query-transform-data/" >}}). It is calculated like this: `(max data points) / time range`. Max data points are calculated based on the width of the panel. For example, a full-width panel on a dashboard with a time range of `last 7 days` will retrieve fresh data every 10 minutes. In this example, cached data for this panel will be served for up to 10 minutes before Grafana queries the data source again and returns new data.
You can make a panel retrieve fresh data more frequently by increasing the **Max data points** setting in the panel's [query options]({{< relref "../panels/query-options/" >}}).
You can make a panel retrieve fresh data more frequently by increasing the **Max data points** setting in the panel's [query options]({{< relref "../panels-visualizations/query-transform-data/" >}}).
## Query caching benefits

View File

@@ -12,8 +12,8 @@ weight: 10
# Query management in Explore
To help with debugging queries, Explore allows you to investigate query requests and responses, as well as query statistics, via the Query inspector.
This functionality is similar to the panel inspector tasks [Inspect query performance]({{< relref "../panels/query-a-data-source/inspect-query-performance/" >}}) and
[Inspect query request and response data]({{< relref "../panels/query-a-data-source/inspect-request-and-response-data/" >}}).
This functionality is similar to the panel inspector tasks [Inspect query performance]({{< relref "../panels-visualizations/panel-inspector/#inspect-query-performance" >}}) and
[Inspect query request and response data]({{< relref "../panels-visualizations/panel-inspector/#inspect-query-request-and-response-data" >}}).
{{< figure src="/static/img/docs/v71/query_inspector_explore.png" class="docs-image--no-shadow" max-width= "550px" caption="Screenshot of the query inspector button in Explore" >}}

View File

@@ -1,11 +1,12 @@
---
aliases:
- /docs/grafana/latest/basics/
title: Grafana basics
weight: 15
- /docs/grafana/latest/fundamentals/
title: Fundamentals
weight: 8
---
# Grafana basics
# Fundamentals
This section provides basic information about observability topics in general and Grafana in particular. These topics will help people who are just starting out with observability and monitoring.

View File

@@ -1,21 +1,41 @@
---
aliases:
- /docs/grafana/latest/basics/exemplars/
- /docs/grafana/latest/basics/exemplars/view-exemplars/
- /docs/grafana/latest/fundamentals/exemplars/
description: Exemplars
keywords:
- grafana
- concepts
- exemplars
- prometheus
title: View exemplar data
title: Exemplars
weight: 400
---
# View exemplar data
# Introduction to exemplars
An exemplar is a specific trace representative of measurement taken in a given time interval. While metrics excel at giving you an aggregated view of your system, traces give you a fine grained view of a single request; exemplars are a way to link the two.
Suppose your company website is experiencing a surge in traffic volumes. While more than eighty percent of the users are able to access the website in under two seconds, some users are experiencing a higher than normal response time resulting in bad user experience.
To identify the factors that are contributing to the latency, you must compare a trace for a fast response against a trace for a slow response. Given the vast amount of data in a typical production environment, it will be extremely laborious and time-consuming effort.
Use exemplars to help isolate problems within your data distribution by pinpointing query traces exhibiting high latency within a time interval. Once you localize the latency problem to a few exemplar traces, you can combine it with additional system based information or location properties to perform a root cause analysis faster, leading to quick resolutions to performance issues.
Support for exemplars is available for the Prometheus data source only. Once you enable the functionality, exemplars data is available by default. For more information on exemplar configuration and how to enable exemplars, refer to [configuring exemplars in Prometheus data source]({{< relref "../../datasources/prometheus/#configuring-exemplars" >}}).
Grafana shows exemplars alongside a metric in the Explore view and in dashboards. Each exemplar displays as a highlighted star. You can hover your cursor over an exemplar to view the unique traceID, which is a combination of a key value pair. To investigate further, click the blue button next to the `traceID` property.
{{< figure src="/static/img/docs/v74/exemplars.png" class="docs-image--no-shadow" max-width= "750px" caption="Screenshot showing the detail window of an Exemplar" >}}
Refer to [View exemplar data]({{< relref "#view-exemplar-data" >}}) for instructions on how to drill down and view exemplar trace details from metrics and logs. To know more about exemplars, refer to the blogpost [Intro to exemplars, which enable Grafana Tempos distributed tracing at massive scale](https://grafana.com/blog/2021/03/31/intro-to-exemplars-which-enable-grafana-tempos-distributed-tracing-at-massive-scale/).
## View exemplar data
When support for exemplar support is enabled for a Prometheus data source, you can view exemplar data either in the Explore view or from the Loki log details.
## In Explore
### In Explore
Explore visualizes exemplar traces as highlighted stars alongside metrics data. For more information on how Explore visualizes trace data, refer to [Tracing in Explore]({{< relref "../../explore/trace-integration/" >}}).
@@ -31,7 +51,7 @@ To examine the details of an exemplar trace:
For more information on how to drill down and analyze the trace and span details, refer to the [Analyze trace and span details](#analyze-trace-and-spans) section.
## In logs
### In logs
You can also view exemplar trace details from the Loki logs in Explore. Use regex within the Derived fields links for Loki to extract the `traceID` information. Now when you expand Loki logs, you can see a `traceID` property under the **Detected fields** section. To learn more about how to extract a part of a log message into an internal or external link, refer to [using derived fields in Loki]({{< relref "../../explore/logs-integration/" >}}).
@@ -45,7 +65,7 @@ To view the details of an exemplar trace:
For more information on how to drill down and analyze the trace and span details, refer to the [Analyze trace and span details](#analyze-trace-and-spans) section.
## Analyze trace and spans
### Analyze trace and spans
This panel shows the details of the trace in different segments.

View File

@@ -3,6 +3,7 @@ aliases:
- /docs/grafana/latest/basics/glossary/
- /docs/grafana/latest/getting-started/glossary/
- /docs/grafana/latest/guides/glossary/
- /docs/grafana/latest/fundamentals/glossary/
description: Grafana glossary
keywords:
- grafana

View File

@@ -2,6 +2,7 @@
aliases:
- /docs/grafana/latest/basics/intro-histograms/
- /docs/grafana/latest/getting-started/intro-histograms/
- /docs/grafana/latest/fundamentals/intro-histograms/
description: An introduction to histograms and heatmaps
keywords:
- grafana
@@ -32,7 +33,7 @@ Here is an example showing height distribution of people.
{{< figure src="/static/img/docs/histogram-panel/histogram-example-v8-0.png" max-width="625px" caption="Bar chart example" >}}
For more information about histogram visualization options, refer to [Histogram]({{< relref "../visualizations/histogram/" >}}).
For more information about histogram visualization options, refer to [Histogram]({{< relref "../../panels-visualizations/visualizations/histogram/" >}}).
Histograms only look at _value distributions_ over a specific time range. The problem with histograms is that you cannot see any trends or changes in the distribution over time. This is where heatmaps become useful.
@@ -44,7 +45,7 @@ In this example, you can clearly see what values are more common and how they tr
![](/static/img/docs/v43/heatmap_histogram_over_time.png)
For more information about heatmap visualization options, refer to [Heatmap]({{< relref "../visualizations/heatmap/" >}}).
For more information about heatmap visualization options, refer to [Heatmap]({{< relref "../../panels-visualizations/visualizations/heatmap/" >}}).
## Pre-bucketed data

View File

@@ -3,6 +3,7 @@ aliases:
- /docs/grafana/latest/basics/timeseries-dimensions/
- /docs/grafana/latest/getting-started/timeseries-dimensions/
- /docs/grafana/latest/guides/timeseries-dimensions/
- /docs/rafana/latest/fundamentals/timeseries-dimensions/
description: time series dimensions
keywords:
- grafana
@@ -91,4 +92,4 @@ In this case the labels that represent the dimensions will have two keys based o
In the case of SQL-like data sources, more than one numeric column can be selected, with or without additional string columns to be used as dimensions. For example, `AVG(Temperature) AS AvgTemp, MAX(Temperature) AS MaxTemp`. This, if combined with multiple dimensions, can result in a lot of series. Selecting multiple values is currently only designed to be used with visualization.
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series]({{< relref "../developers/plugins/data-frames/#data-frames-as-time-series" >}}).
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series]({{< relref "../../developers/plugins/data-frames/#data-frames-as-time-series" >}}).

View File

@@ -1,6 +1,7 @@
---
aliases:
- /docs/grafana/latest/basics/timeseries/
- /docs/grafana/latest/fundamentals/timeseries/
description: Introduction to time series
keywords:
- grafana

View File

@@ -3,7 +3,7 @@ aliases:
- /docs/grafana/latest/getting-started/
- /docs/grafana/latest/guides/what-is-grafana/
title: Get started
weight: 15
weight: 9
---
# Get started

View File

@@ -43,7 +43,7 @@ To create your first dashboard:
1. Click the **New dashboard** item under the **Dashboards** icon in the side menu.
1. On the dashboard, click **Add an empty panel**.
1. In the New dashboard/Edit panel view, go to the **Query** tab.
1. Configure your [query]({{< relref "../panels/query-a-data-source/add-a-query/" >}}) by selecting `-- Grafana --` from the data source selector.
1. Configure your [query]({{< relref "../panels-visualizations/query-transform-data/#add-a-query" >}}) by selecting `-- Grafana --` from the data source selector.
This generates the Random Walk dashboard.
@@ -56,7 +56,7 @@ Congratulations, you have created your first dashboard and it is displaying resu
Continue to experiment with what you have built, try the [explore workflow]({{< relref "../explore/" >}}) or another visualization feature. Refer to [Data sources]({{< relref "../datasources/" >}}) for a list of supported data sources and instructions on how to [add a data source]({{< relref "../datasources/add-a-data-source/" >}}). The following topics will be of interest to you:
- [Panels]({{< relref "../panels/" >}})
- [Panels and visualizations]({{< relref "../panels-visualizations/" >}})
- [Dashboards]({{< relref "../dashboards/" >}})
- [Keyboard shortcuts]({{< relref "../dashboards/use-dashboards/#keyboard-shortcuts" >}})
- [Plugins](https://grafana.com/grafana/plugins?orderBy=weight&direction=asc)

View File

@@ -75,8 +75,8 @@ Grafana displays a list of possible series. Click one to select it, and Grafana
Create a simple Flux query.
1. [Add a panel](../panels/add-a-panel.md).
1. In the query editor, select your InfluxDB-Flux data source. For more information, refer to [Queries](../panels/queries.md).
1. [Add a panel]({{< relref "../dashboards/build-dashboards/add-organize-panels/" >}}).
1. In the query editor, select your InfluxDB-Flux data source. For more information, refer to [Queries]({{< relref "../panels-visualizations/query-transform-data/" >}}).
1. Select the **Table** visualization.
1. In the query editor text field, enter `buckets()` and then click outside of the query editor.
@@ -96,7 +96,7 @@ You can also create Flux queries in the InfluxDB Explore view.
![InfluxDB Explore Script Editor](/static/img/docs/influxdb/explore-query-text-7-5.png)
1. In Grafana, [add a panel](../panels/add-a-panel.md) and then paste your Flux code into the query editor.
1. In Grafana, [add a panel]({{< relref "../dashboards/build-dashboards/add-organize-panels/" >}}) and then paste your Flux code into the query editor.
1. Click **Apply**. Your new panel should be visible with data from your Flux query.
#### Check InfluxDB metrics in Grafana Explore

View File

@@ -29,7 +29,7 @@ Alert hooks allow you to create different notifiers with a bit of code if you pr
Annotate graphs with rich events from different data sources. Hover over events to see the full event metadata and tags.
This feature, which shows up as a graph marker in Grafana, is useful for correlating data in case something goes wrong. You can create the annotations manually—just control-click on a graph and input some text—or you can fetch data from any data source. Refer to [Annotations]({{< relref "../dashboards/annotations.md" >}}) for more information.
This feature, which shows up as a graph marker in Grafana, is useful for correlating data in case something goes wrong. You can create the annotations manually—just control-click on a graph and input some text—or you can fetch data from any data source. Refer to [Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) for more information.
## Dashboard variables

View File

@@ -45,6 +45,10 @@ With [enhanced LDAP integration]({{< relref "../setup-grafana/configure-security
[SAML authentication]({{< relref "../setup-grafana/configure-security/configure-authentication/saml/" >}}) enables users to authenticate with single sign-on services that use Security Assertion Markup Language (SAML).
### Protected roles
With [protected roles]({{< relref "../setup-grafana/configure-security/configure-authentication/#protected-roles" >}}), you can define user roles that are exempt from being converted from one authentication type to another when changing auth providers.
## Enterprise features
Grafana Enterprise adds the following features:
@@ -56,6 +60,7 @@ Grafana Enterprise adds the following features:
- [Export dashboard as PDF]({{< relref "../dashboards/share-dashboards-panels/#export-dashboard-as-pdf" >}})
- [Custom branding]({{< relref "../setup-grafana/configure-grafana/configure-custom-branding/" >}}) to customize Grafana from the brand and logo to the footer links.
- [Usage insights]({{< relref "../dashboards/assess-dashboard-usage/" >}}) to understand how your Grafana instance is used.
- [Recorded queries]({{< relref "../enterprise/recorded-queries" >}}) to see trends over time for your data sources.
- [Vault integration]({{< relref "../setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault/" >}}) to manage your configuration or provisioning secrets with Vault.
- [Auditing]({{< relref "../setup-grafana/configure-security/audit-grafana/" >}}) tracks important changes to your Grafana instance to help you manage and mitigate suspicious activity and meet compliance requirements.
- [Request security]({{< relref "../setup-grafana/configure-security/configure-request-security/" >}}) makes it possible to restrict outgoing requests from the Grafana server.

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