Compare commits

...

340 Commits

Author SHA1 Message Date
Grot (@grafanabot)
c3cc4da7a5 Release: Updated versions in package to 8.2.6 (#42653) 2021-12-02 15:22:07 +01:00
Marcus Efraimsson
eff8fa14c6 Chore: Fix flaky serverlock integration test (#42633) (#42646)
(cherry picked from commit 54fa7b57fe)
2021-12-02 14:26:13 +01:00
Marcus Andersson
8405cbaeb4 Docs: Remove docs publish GitHub action for 8.2.x (#42626) 2021-12-02 11:37:40 +01:00
Joan López de la Franca Beltran
704681e2f7 Create 'runner' directory within grafana-cli (#42589) 2021-12-01 17:36:45 +01:00
idafurjes
b38b264f35 Upgrade build container to 1.4.3-1 (#42454)
* Upgrade build container to 1.4.9

* Comment out lint for mixins

Co-authored-by: dsotirakis <sotirakis.dim@gmail.com>
2021-12-01 09:46:46 +01:00
Grot (@grafanabot)
06b0cd6ac8 Add isl and expat libs as tarballs explicitly (#41138) (#42455)
(cherry picked from commit 5e813ea454)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-11-30 17:35:39 +01:00
Gilles De Mey
febe5c9304 Alerting: azure monitoring manual backports (#42528)
Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-11-30 17:29:22 +01:00
Dimitris Sotirakis
7bcc44e44e [v8.2.x] CI: Update Dockerfile (#42529)
* Update Dockerfile

* Run apt-get update before download service clients
2021-11-30 16:29:37 +01:00
Grot (@grafanabot)
288621b68a Settings: Fix handling (#42497) (#42510)
* Settings: Fix handling

(cherry picked from commit 690ffdff56)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2021-11-30 12:02:14 +01:00
idafurjes
0964999300 Upgrade go to 1.17.2 (#42427) 2021-11-29 13:24:22 +01:00
Dimitris Sotirakis
1e341f72f7 Use drone-cli:1.2.4 in bingo (#42207) 2021-11-24 13:15:37 +01:00
idafurjes
8e26e02855 Bump grabpl to 2.6.3 (#42181) 2021-11-24 12:36:37 +01:00
achatterjee-grafana
615f2b46df Removed packahes_api relrefs. (#42017) (#42142) 2021-11-23 11:42:08 -05:00
Dimitris Sotirakis
3635314d16 Dockerfile: Bump Go and Alpine versions (#42061) 2021-11-22 14:53:27 +01:00
Grot (@grafanabot)
226029b783 TimeSeries: fix fillBelowTo wrongly affecting fills of unrelated series (#41998) (#42013)
(cherry picked from commit 07a440fd3a)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-19 15:52:50 -06:00
achatterjee-grafana
e38a028997 Corrected the path. (#42006) (#42009) 2021-11-19 15:31:17 -05:00
Grot (@grafanabot)
0b989216ab updated image name (fixed typo), removed redundant image and resized images. (#41999) (#42002)
(cherry picked from commit e0db19e741)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-19 13:47:51 -05:00
Grot (@grafanabot)
c7ce6542cd Docs: Add configuration option for the image renderer (#41798) (#41915)
* Docs: add configuration option for the image renderer

* Apply review feedback

(cherry picked from commit e904f423e4)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-11-19 09:18:53 +01:00
Will Browne
031b3ab42c hide controls for renderer plugins (#41895) 2021-11-18 17:28:50 +01:00
Grot (@grafanabot)
6f232f6206 ReleaseNotes: Updated changelog and release notes for 8.2.5 (#41886) (#41888)
(cherry picked from commit daa3cb831d)
2021-11-18 15:02:44 +01:00
Grot (@grafanabot)
1f9badb286 ReleaseNotes: Updated changelog and release notes for 8.2.5 (#41861) (#41872)
(cherry picked from commit 6aeecd48a7)
2021-11-18 13:26:50 +01:00
Grot (@grafanabot)
b57a137acd "Release: Updated versions in package to 8.2.5" (#41859) 2021-11-18 10:36:42 +01:00
Grot (@grafanabot)
45bb76bd00 Updated content based on Ivana's note. (#41848) (#41855)
(cherry picked from commit e59c3a34fe)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-18 10:23:57 +01:00
Grot (@grafanabot)
0d2a255fcb Alerting: HA documentation formatting fixes (#41682) (#41708)
* Alerting: HA documentation formatting fixes

* don't change that line

(cherry picked from commit b39859bdfe)

Co-authored-by: gotjosh <josue@grafana.com>
2021-11-18 09:21:52 +01:00
Grot (@grafanabot)
16c589fe66 Docs: Add docs for caching timeouts (#39672) (#41852)
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
(cherry picked from commit c3f1cc6c75)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2021-11-18 09:14:03 +01:00
Grot (@grafanabot)
574b804943 Doc: Removed reference to Hosted Grafana (#41843) (#41844)
* Removed extra word

* Removed another ref of hosted grafana.

(cherry picked from commit d3b513ab59)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-17 20:14:39 -05:00
Grot (@grafanabot)
f512e93294 Transformers: ensure ISO 8601 date strings are not parsed in local TZ (#41835) (#41839)
(cherry picked from commit 6844cf57a0)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-17 22:25:12 +01:00
Grot (@grafanabot)
995ec00121 Alerting: fix a bug where the metric in the evaluation string was not correctly populated (#41731) (#41793)
Instead of using the frame name as the series name, we now use the name of the series value column if the frame name is not set. Queries to some datasources may end up with an empty frame name, which leads to an empty series name. As the series name is used in the frontend to display which metrics were queried etc. it shouldn't be empty.

(cherry picked from commit 2319c52c85)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-11-17 11:34:51 +01:00
Grot (@grafanabot)
6ce29a7f8a Docs: Add guidelines for running grafana behind proxy on RPM-based Linux (#41710) (#41766)
* Docs: Add Centos guidelines for running grafana behind proxy

* Apply suggestions from code review

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

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2021-11-16 18:19:40 +01:00
Dimitris Sotirakis
7d5f1d74f0 Security Fix: Fine-grained access control enables organization admins to create/modify/delete user roles in other organization (#41705) 2021-11-15 17:10:55 +01:00
Dimitris Sotirakis
a4a108db2d [v8.2.x] Release Notes: Update Release Notes and Changelog for 8.2.4 security fix (#41692)
* 8.2.4: Update CHANGELOG.md and release-notes-8-2-4.md

* Update blog post link
2021-11-15 15:41:01 +01:00
Grot (@grafanabot)
5db2097ebd "Release: Updated versions in package to 8.2.4" (#41683) 2021-11-15 15:20:26 +02:00
Grot (@grafanabot)
12280faa2f Alerting: Document Grafana 8 High Availability setup (#41503) (#41655)
* Alerting: Document Grafana 8 High Availability setup

* Apply suggestions from code review

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>

* Wordsmithing

* Apply suggestions from code review

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

* Address review feedback

* Apply suggestions from code review

Co-authored-by: George Robinson <george.robinson@grafana.com>

* Update docs/sources/alerting/unified-alerting/high-availability.md

Co-authored-by: George Robinson <george.robinson@grafana.com>

* address review feedback

* Prettier

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
(cherry picked from commit dfa14e9500)

Co-authored-by: gotjosh <josue@grafana.com>
2021-11-15 11:18:17 +00:00
Grot (@grafanabot)
20ef79b533 [v8.2.x] Tracing: Show correct tags for each span (#41629)
* Tracing: Add processes for each span (#41473)

(cherry picked from commit bf2ece7281)

* Remove test for backport to fix yarn upgrade related issues

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana <ivana.huckova@gmail.com>
2021-11-15 11:20:31 +01:00
Grot (@grafanabot)
729495d225 Removed extra word (#41576) (#41579)
(cherry picked from commit 94704f1061)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-12 09:03:33 -05:00
Grot (@grafanabot)
c5a99b2a32 OAuth: Fix group mapping when use generic OAuth (#41418) (#41628)
* Fix group mapping when use generic OAuth

* Fix lint

* Fix lint

(cherry picked from commit 25ad916473)

Co-authored-by: Selene <selenepinillos@gmail.com>
2021-11-12 11:18:42 +01:00
Grot (@grafanabot)
dffa61149a TimeSeries: guard against pointSize being set < lineWidth (#41577) (#41624)
(cherry picked from commit 7a92faf398)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-12 07:21:09 +01:00
Grot (@grafanabot)
7aca22fb32 Alerting: Update docs on using the Prometheus Datasource with the Ruler (#41528) (#41598)
* Alerting: Update docs on using the Prometheus Datasource with the Ruler

* Update docs/sources/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-rule.md

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

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

Co-authored-by: gotjosh <josue@grafana.com>
2021-11-11 17:25:25 +00:00
George Robinson
eddcdd8d66 Alerting: Fix NoDataFound for alert rules using the AND operator (#41305) (#41524)
This commit fixes an issue in alerting where NoDataFound is false
when using the AND operator to compare two conditions in an alert
rule and one of the conditions has no data.

(cherry picked from commit d6ed5d295e)
2021-11-11 16:01:23 +00:00
Grot (@grafanabot)
d3b3f8976c Explore: fix logs panel top action switches labeling (#41350) (#41521)
* Explore: fix logs panel top action switches labeling

* fix typo

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
(cherry picked from commit 2139a3dfa8)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-11-11 14:39:39 +00:00
Grot (@grafanabot)
ec8e606de0 InfluxDB: fix numeric aliases in queries (#41531) (#41587)
* influxdb: alerting: handle out-of-range numeric aliases

* influxdb: updated documentation

(cherry picked from commit eb47a58029)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-11 09:48:58 +01:00
Grot (@grafanabot)
3110e11330 fix: check lotex endpoint URL (#41429) (#41585)
* fix: check lotex endpoint URL

* Add validation for data sources URLs

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
(cherry picked from commit dbe78e47b1)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2021-11-11 08:19:44 +01:00
achatterjee-grafana
fb4875a58e update content (#41575) 2021-11-10 20:43:45 -05:00
Grot (@grafanabot)
c4a5a217cf Tempo: Fix validation of float durations (#41400) (#41538)
* Fix parsing of float numbers in validation

* Adjust test

* Update packages/grafana-data/src/datetime/durationutil.test.ts

* Update packages/grafana-data/src/datetime/durationutil.test.ts

* Remove us from placeholder

(cherry picked from commit 7bc27a3cfc)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-11-10 16:27:24 +01:00
Grot (@grafanabot)
5f5e962b2d Alerting: Special alert instance if rule is in state NoData (#40540) (#41525)
* do not suppress NoData state
* extract conversion of state to postable alert + tests
* create a special alert instance if nodata
* use NoData when converting from Keep Last State instead of Alerting
* add silence during migration if NoData is mapped to KeepLastState.

(cherry picked from commit 610643a668)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-11-10 12:15:23 +01:00
Grot (@grafanabot)
d80013022e Alerting: Parse App URL only once (#39855) (#41522)
(cherry picked from commit 2b4e51f478)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-11-10 10:44:35 +00:00
Grot (@grafanabot)
49aa3f8d4f Storybook: Fix decorator height (#41468) (#41519)
* fix(storybook): make sure story background fills available height

* fix(storybook): add decorator to prevent badge filling all available height

* docs(badge): use centered story

* revert(badge): remove obsolete Meta typing

(cherry picked from commit cd5277befd)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-11-10 11:24:19 +01:00
Grot (@grafanabot)
fff0da8fe9 DataProxy: Fix issue overriding response body when response status is 101 (#41364) (#41476)
When a request going through Grafana data source proxy responds with a websocket
upgrade response we cannot override the response body since it produces an error.
This problem seems to have been introduced in Grafana v8.0 by #38962.
In addition #40303 added same problem.

Fixes #41292

(cherry picked from commit 3be452f995)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-11-09 15:04:44 +01:00
Grot (@grafanabot)
af84e20232 Alerting: Remove CTA button from read-only notification policy page (#41096) (#41474)
* don't show cta button for read-only prometheus alertmanager

* grammar fix

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Peter Holmberg <peter.hlmbrg@gmail.com>
(cherry picked from commit 345af8374c)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-11-09 14:42:46 +01:00
Marcus Efraimsson
4d9f5ec8a2 Chore: Go mod tidy (#41373) 2021-11-09 12:07:14 +01:00
Marcus Andersson
8520ab9232 Chore: Prevent loading error from showing too early (#41426) 2021-11-09 10:03:49 +01:00
Grot (@grafanabot)
ca6ebdd3d8 Docs: Update data source provisioning in regards to HTTP specific settings (#40163) (#41432)
Clarifies documentation in regards to data source provisioning and certain
settings that earlier was explained as applicable to All data sources.

Fixes #19574

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

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-11-08 19:34:30 +01:00
Grot (@grafanabot)
859ee3c826 Docs: Added note that only string type is supported for query variables. (#41359) (#41409)
* Added note that only string type is supported for query variables.

* Added doc review.

(cherry picked from commit f346bbb3bb)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
2021-11-08 13:09:47 -05:00
Grot (@grafanabot)
022d16d897 Updated a few install topics with references to "Hosted Grafana" (#41106) (#41427)
(cherry picked from commit bda60f3458)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-08 13:09:08 -05:00
Grot (@grafanabot)
3b8be57b4f Alerting: fix bug where user is able to access rules from namespaces user is not part of (#41403) (#41406)
* Add fix
* Add tests
(cherry picked from commit 6220872633)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: gotjosh <josue@grafana.com>
2021-11-08 18:57:51 +01:00
Grot (@grafanabot)
adfd39e5fd Chore: Fixed failing e2e due to day light saving time. (#41417) (#41422)
(cherry picked from commit dce851e396)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-11-08 17:36:10 +01:00
Grot (@grafanabot)
ad3864b9f1 Update config-from-query.md (#41333) (#41361)
(cherry picked from commit e0ad74a815)

Co-authored-by: Dawnpool <57010815+Dawnpool@users.noreply.github.com>
2021-11-06 02:18:38 -04:00
Giordano Ricci
d2e61e4aba Elasticsearch: use field configured in query editor as field for date_histogram aggregations (#41258) (#41358)
* Elasticsearch: use field configured in query editor as field for date_histogram aggregations

* add tests

(cherry picked from commit d524dc6108)
2021-11-05 15:43:42 +00:00
Will Browne
5350c74b39 backport of 41346 (#41365) 2021-11-05 16:19:14 +01:00
Grot (@grafanabot)
f75f86b57c Dashboards: Fix 'Copy' from being appended to new dashboard titles (#41344) (#41348)
(cherry picked from commit cbc00babe4)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-11-05 12:34:58 +01:00
Dimitris Sotirakis
0068d6a43c Update CHANGELOG.md (#41343) 2021-11-05 11:36:51 +01:00
Ashley Harrison
bd9c45a170 NewsPanel: Prevent date and title collapsing to single row (#41260) 2021-11-04 09:55:52 +00:00
Dimitris Sotirakis
a73c109d79 Fix blog post link (#41286) 2021-11-03 18:49:17 +02:00
Dimitris Sotirakis
d52f25825b [v8.2.x] Sanitized NavBar children links to remove angular interpolation (#41283)
* Sanitized nav bar links to remove angular interpolation

* NavBar: Add sanitize to children items

(cherry picked from commit a3dc30546f)
(cherry picked from commit 561ca52ab3)

* use replaceAll when sanitizing urls

(cherry picked from commit 8081dc9ee9)
(cherry picked from commit c86d520821)

* switch to global regexp

(cherry picked from commit 1c7ce348ce)
(cherry picked from commit 28e2be2a8a)

* Resolve conflicts

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
2021-11-03 17:05:29 +01:00
Grot (@grafanabot)
120689b3c6 "Release: Updated versions in package to 8.2.3" (#41279) 2021-11-03 16:30:51 +01:00
Grot (@grafanabot)
ec13ae79bd Update opt-in.md (#41216) (#41271)
Need to change that `true` to `false`.

(cherry picked from commit 1c3c1a52bb)

Co-authored-by: Alexandre de Verteuil <alexandre@grafana.com>
2021-11-03 10:53:18 -04:00
Grot (@grafanabot)
81463cd984 NewsPanel: Prevent small titles being split onto multiple lines (#41193) (#41270)
(cherry picked from commit bb079641d7)

Co-authored-by: Jamie Shears <jsws@users.noreply.github.com>
2021-11-03 15:27:24 +01:00
Dimitris Sotirakis
dad0c5a22e ReleaseNotes: Update release notes for v8.2.3 (#41268) 2021-11-03 15:18:23 +01:00
Josh Hunt
aca8793e40 Dashboard: Disable image renderer link for unsaved dashboards (#41249) (#41251)
(cherry picked from commit 9fc5193ecd)
2021-11-03 11:56:48 +00:00
Grot (@grafanabot)
26f155b86a Alerting: Fix duplicating queries in rule editor (#41091) (#41203)
(cherry picked from commit 69fe2def89)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-11-03 12:13:38 +02:00
Grot (@grafanabot)
a306205a58 Annotations: Ensure legacy annotation editors are cleaned up properly when switching datasource (#41115) (#41208)
* Annotations: Ensure Angular-based annotation editors are cleaned up properly

* Annotations: Remove ng-if instead of wrapping in div

(cherry picked from commit e0b2e0b152)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-02 17:04:29 +01:00
Grot (@grafanabot)
49416ac031 LibraryPanels: Ensure the list can be fully scrolled when adding a library panel (#41196) (#41207)
(cherry picked from commit eb223a6645)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-02 16:51:21 +01:00
Marcus Andersson
1800fab246 PluginsCatalog: Fix so we display the correct badges when a plugin is disabled (#41195) (#41159) 2021-11-02 15:20:16 +01:00
Grot (@grafanabot)
9a2e14d3e5 InfluxDB: Fix regular expression to parse aliases according to documentation (#41186) (#41190)
* Fix regular expression to parse aliases that start with either square brackets or dollar sign

* Fix lint

(cherry picked from commit 8a3e192e6a)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-11-02 13:53:37 +01:00
Grot (@grafanabot)
c7cc9629f7 Changing 'Save' button style to primary (#41144) (#41181)
Changing 'Save' button style to primary according to Figma design.

(cherry picked from commit 0599b6180f)

Co-authored-by: Luis Filipe Pessoa <luis.f.pessoa@gmail.com>
2021-11-02 10:38:14 +01:00
Grot (@grafanabot)
6ed1ba3205 Docs: Fixed broken link in the plugin migration guide (#41148) (#41149)
* fixed broken link.

* updated title of link.

(cherry picked from commit d98cb8274c)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-11-01 11:03:40 -04:00
Grot (@grafanabot)
c0875d5a61 Added note. (#41118) (#41121)
(cherry picked from commit 161d92e12f)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-10-29 21:42:28 +02:00
Grot (@grafanabot)
34b37ab3db Added note about small devices. (#41113) (#41116)
(cherry picked from commit 61fbdb60ff)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-10-29 14:23:38 -04:00
Grot (@grafanabot)
3f8936316b influxdb: influxql: fix table-format data processing with renamed time field (#41052) (#41101)
(cherry picked from commit 24db1efa9d)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-10-29 16:19:09 +02:00
Grot (@grafanabot)
edb2644951 Cloudwatch: Add support for AWS/Backup metrics and dimensions (#41077) (#41086)
Add AWS/Backup supported metrics and dimensions based on the official
AWS documentation.

(cherry picked from commit b9e0a41f5a)

Co-authored-by: Szymon Szypulski <szymon.szypulski@gmail.com>
2021-10-29 13:17:22 +02:00
Grot (@grafanabot)
6603c809dd Plugins Catalog: Set external manage link to installation tab (#40994) (#41083)
* feat(catalog): set external manage link to installation tab

* fix(catalog): use pluginCatalogURL when getting external manage link

(cherry picked from commit 5d98155b5f)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-10-29 13:03:19 +02:00
Grot (@grafanabot)
af225e3370 Tables: fix sorting for NaN values (#40938) (#41054)
Fixes #37236

(cherry picked from commit 97e0e12f40)

Co-authored-by: Derik Evangelista <derik.evangelista@grafana.com>
2021-10-29 11:35:52 +01:00
Grot (@grafanabot)
994b44f3fc Explore: fix footer margin in Query History (#40970) (#41080)
(cherry picked from commit 914d8d6f15)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-10-29 12:32:04 +02:00
Tania B
8ac788c71a [8.2.x] Fix decrypting secrets in alerting migration (#41057)
* Add support for decrypting secrets with metadata prefix

* Update tests
2021-10-29 13:28:48 +03:00
Grot (@grafanabot)
f230b64700 upgrade ncurses in docker image (#41002) (#41068)
(cherry picked from commit 641a18b92e)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-28 23:40:34 +02:00
Grot (@grafanabot)
69c0b0a55c Update brew install path in docs, for brew v3 (#40980) (#41053)
* Update brew install path in docs, for brew v3

* Ran prettier.

Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
Co-authored-by: kay delaney <kay@grafana.com>
(cherry picked from commit d6693ec90d)

Co-authored-by: Sam Jewell <2903904+samjewell@users.noreply.github.com>
2021-10-28 18:06:49 +02:00
achatterjee-grafana
509ef6e3a6 Doc backport 40737 (unified alerting doc changes) (#41048)
* resolve conflicts

* remove .yarn/sdks

* removed duplicate content

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-28 11:10:13 -04:00
Grot (@grafanabot)
42f0612e5a Loki/Prometheus: Improve facetting message in label browser (#40998) (#41047)
* Chore: Improve Loki/Prometheus facetting message in label browser

* Chore: Remove uneeded console log and comment

(cherry picked from commit 8869df2ffe)

Co-authored-by: Devin Smith <me@devinsmith.co.za>
2021-10-28 16:48:15 +02:00
Grot (@grafanabot)
beb283d16d Dashboard: Fixes lazy loading of panels not in view for mobile layout (#41009) (#41031)
* Dashboard: Fixes lazy loading of panels not in view for mobile layout

* Refactoring and adding more comments

* Removed console.log

(cherry picked from commit 4c52ada7a9)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-28 13:30:19 +02:00
Grot (@grafanabot)
9400471580 Dashboard: Fix repeats in snapshots (#41018) (#41024)
(cherry picked from commit fbd68c4e96)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-28 11:20:32 +02:00
Grot (@grafanabot)
f574408f6a CloudWatch: Handle nested panels when migrating CloudWatch queries (#40993) (#41022)
* support nested targets when migrating cloudwatch queries

* cleanup

* use panelUpgrades array

* bump schema version number

(cherry picked from commit 7521d56cec)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-10-28 10:23:39 +02:00
Grot (@grafanabot)
6ceec99f41 Buttons: Improves button styles to make them perfectly symmetrical (#40977) (#41021)
* Buttons: Improves button styles to make them perfectly symmetrical

* Fixed icon vertical centering

(cherry picked from commit 6a2dc11545)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-28 10:07:17 +02:00
Grot (@grafanabot)
c3e46eaa8f Rendering: Check if default image exists to avoid breaking reports if it's moved (#40930) (#40991)
(cherry picked from commit 37cbed4b48)

Co-authored-by: Selene <selenepinillos@gmail.com>
2021-10-27 16:41:47 +02:00
Grot (@grafanabot)
10135a4851 Alerting: specify Prometheus implementation in YAML example (docs) (#40474) (#40989)
(cherry picked from commit 16f4d02419)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2021-10-27 16:25:30 +02:00
Grot (@grafanabot)
c6836903d6 Alerting: updated docs regarding multi-org AM (#40982) (#40988)
(cherry picked from commit 0189eaf76c)

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2021-10-27 16:22:43 +02:00
Grot (@grafanabot)
1952e01e48 Barchart: Fixes barchart switching from palette to thresholds color mode (#40954) (#40974)
(cherry picked from commit 858d654d1c)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-27 10:15:52 +02:00
Grot (@grafanabot)
808ffb0d51 DashboardLinks: Fix time in links not being updated (#40934) (#40969)
(cherry picked from commit fadf72dd34)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-27 07:45:34 +02:00
Grot (@grafanabot)
28f85570a1 Docs: Updated the plugin admin configuration default value (#40942) (#40959)
(cherry picked from commit 6e08e12749)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-10-26 21:43:10 +02:00
Grot (@grafanabot)
a513ff729e Docs: Fix for clarifications about the image renderer (#40182) (#40960)
* Added time range controls updates

* Added plugins catalog update

* Added enterprise images

* Added community contributions highlights for 8.2

* accessibility statement

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Apply suggestions from code review

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Ran prettier:write to see if we can fix the issues

* Fix issues with template info

* Merge fix

* Template fix part 2

* What is a mergfix even

* Additional final fixes

* Markdown link error fix for time picker changes

* Ran prettier -w again to fix linting issues

* What's new fixes for image rendered

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit dfbb3c4e23)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-10-26 20:17:12 +02:00
Grot (@grafanabot)
11a4d0b004 bump for CVE-2021-37219 CVE-2021-32574 CVE-2021-36213 (#40947) (#40952)
(cherry picked from commit 728a59f013)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-10-26 17:49:11 +02:00
Grot (@grafanabot)
183fe28769 Plugins Catalog: Fix plugin details header styles (#40917) (#40948)
(cherry picked from commit 41530482ec)

Co-authored-by: James Wang <36892657+jamesxwang@users.noreply.github.com>
2021-10-26 17:03:00 +02:00
Grot (@grafanabot)
ed71f677bd CloudWatch Logs: Fix variable interpolation in queries (#40899) (#40923)
* Interpolate variables in queries

* Remove test

(cherry picked from commit 8cf7e520e8)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-10-26 13:16:19 +02:00
Grot (@grafanabot)
c3455c7850 AzureMonitor: Prevent incomplete Logs queries from running (#40512) (#40888)
* AzureMonitor: Prevent incomplete queries from running

* fix

(cherry picked from commit 90b802a62d)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-10-25 17:18:01 +01:00
Grot (@grafanabot)
87dc257f6d DataFrame: toDataFrame( ...) should support the query response payload (#40594) (#40842)
(cherry picked from commit aeb868bb06)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-10-25 09:03:09 -07:00
Grot (@grafanabot)
055405eb65 Explore: Fix running queries without a datasource property set (#40805) (#40881)
* Explore: Fix running queries without a datasource property set

* fix test

* adjust test

(cherry picked from commit 2ee54b7ffe)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-10-25 15:57:46 +02:00
Grot (@grafanabot)
a8ecdca826 Datasources: Set response size metric based on actual bytes read (#40303) (#40867)
Fixes #33372

(cherry picked from commit 889d4683a1)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-10-25 13:01:16 +02:00
Grot (@grafanabot)
908a951fc0 Alerting: fix ngalert alertmanager SQL Syntax Errors (#40827) (#40868)
* test kvstore in intregration tests with different databases

* escape 'key' in delete query

* export quote and use it in kvstore

(cherry picked from commit d1aefa1792)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-10-25 12:23:32 +02:00
Grot (@grafanabot)
543e9c2e50 CloudMonitoring: Fix TypeError in annotation queries (#40740) (#40852)
(cherry picked from commit d5de885633)

Co-authored-by: Junya Hayashi <junya.hayashi@groove-x.com>
2021-10-25 11:19:56 +02:00
Piotr Jamróz
0f2e309b4a Explore: Improve local storage error handling when rich history is added (#39943) (#40830)
* Rich History: improve local storage error handling

* Reduce number of max items and update docs

* Rotate not-starred items and add tests

* Add missing property to initial state

* Unify date in richHistory tests

* Show a warning message that rich history limit has been reached

* Add missing param

(cherry picked from commit ad757b48e7)
2021-10-25 09:09:47 +02:00
Hugo Häggmark
01468d2ac1 LibraryElements: fixes flaky tests (#40791) (#40796)
(cherry picked from commit c70cfe9125)
2021-10-25 06:08:11 +02:00
Grot (@grafanabot)
69b9579e84 Packaging: remove private users setting in systemd unit files (#40815) (#40821)
* Remove privateusers=true from grafana-server.service

(cherry picked from commit ca4b35e596)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-22 17:34:45 +02:00
Grot (@grafanabot)
a48e623d52 Explore: fix history settings tab padding (#40752) (#40806)
(cherry picked from commit 35e2a3a126)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-10-22 13:23:00 +01:00
gotjosh
abd1050f98 [8.2.x] Alerting: Validate contact point configuration during migration to Unified Alerting (#40717) (#40801)
* Alerting: Validate contact point configuration during migration to Unified Alerting (#40717)

* Alerting: Validate contact point configuration during the migration

This minimises the chances of generating broken configuration as part of the migration. Originally, we wanted to generate it and not produce a hard stop in Grafana but this strategy has the chance to avoid delivering notifications for our users.

We now think it's better to hard stop the migration and let the user take care of resolving the configuration manually.

(cherry picked from commit 74fb491b6a)
2021-10-22 12:16:36 +01:00
Grot (@grafanabot)
c7f488580a Alerting: Fix kv_store query to escape reserved word (#40788) (#40795)
(cherry picked from commit a5501b7845)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-10-22 09:27:19 +02:00
Grot (@grafanabot)
101a6f2f41 Correct price-plans list for this feature (#40283) (#40781)
* Correct price-plans list for this feature

The [Pricing Page][0] states that Enhanced LDAP is only for the Advanced plan
See b59520986c

[0]: https://grafana.com/products/cloud/pricing/

* Also update price plans on Enhanced LDAP page

(cherry picked from commit 6ce87a9655)

Co-authored-by: Sam Jewell <2903904+samjewell@users.noreply.github.com>
2021-10-22 09:18:24 +03:00
Grot (@grafanabot)
4b8993c1a5 Stat: Fixes an issue that could lead to browser crash with specific values (#40777) (#40789)
(cherry picked from commit 80b4ef820a)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-10-22 03:34:45 +02:00
Grot (@grafanabot)
d3f9ec7231 Annotations: Allow addition of custom values whilst tags are loading (#40702) (#40768)
(cherry picked from commit 447a088750)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-21 16:22:51 +02:00
Grot (@grafanabot)
681741b224 ReleaseNotes: Updated changelog and release notes for 8.2.2 (#40751) (#40759)
* ReleaseNotes: Updated changelog and release notes for 8.2.2

* Add entry for 8.2.2 release notes

Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
(cherry picked from commit 84091de394)
2021-10-21 14:30:43 +02:00
Grot (@grafanabot)
6232fe07c0 "Release: Updated versions in package to 8.2.2" (#40750) 2021-10-21 10:46:45 +01:00
Grot (@grafanabot)
db5359f94e Prometheus: Pass scoped vars when creating PromLink query (#40525) (#40561)
(cherry picked from commit 4a3be0f845)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-10-21 11:03:21 +02:00
Sofia Papagiannaki
b8a1af0db1 Hide Grafana 8 alerts for disabled org (#40687) (#40745)
(cherry picked from commit 2c28aea654)
2021-10-21 10:43:59 +02:00
Grot (@grafanabot)
867a305532 ValueMappings: Fix so that value mappings work in stat/gauge/bargauge/piechart (#40612) (#40623)
(cherry picked from commit 26dda75db5)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-21 09:30:13 +01:00
Grot (@grafanabot)
32069ea229 Dahboard: Only show "Another session is editing this dashboard" once per edit session (#40485) (#40487)
(cherry picked from commit 0c5491d6fd)

Co-authored-by: An <an.le@grafana.com>
2021-10-21 09:29:14 +01:00
Grot (@grafanabot)
a90b3956e0 Scale: Fixes handling of NaN percent when data min = data max (#40622) (#40628)
(cherry picked from commit c174664e63)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-21 09:28:52 +01:00
Armand Grillet
f3b8c1a89d Fix panic when Slack API sends unexpected response (#40721) (#40741)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2021-10-21 10:49:07 +03:00
Grot (@grafanabot)
be82a39b84 Docs: Add doc for alert groups (#40353) (#40712)
* WIP: add doc for alert groups

* add more messaging around filtering and grouping options

(cherry picked from commit f10511ba1c)

Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2021-10-20 11:53:29 -04:00
Grot (@grafanabot)
41941aaeed DashGrid: Fixed auto resize issue with tabel panel (#40688) (#40704)
* Changing how we use the AutoSizer component in the DashGrid.

* updated snapshot.

* fixed failing test.

(cherry picked from commit 0d036a6df5)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-10-20 17:48:56 +02:00
Grot (@grafanabot)
880d629aff AzureMonitor: Make ResourceNames() case insensitive (#40690) (#40705)
(cherry picked from commit ed68056b88)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-10-20 17:04:28 +02:00
Grot (@grafanabot)
4a7abae6ae Geomap: Avoid exceptions when missing data and values (heatmap and zoom settings) (#40664)
(cherry picked from commit 43878ff05f)

Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com>
2021-10-20 07:36:04 -07:00
Grot (@grafanabot)
e47b07ed19 Docs: Updated docker image names for consistency (#40426) (#40655)
* Updated the docker image names and added a note

* Updated the example version to current

(cherry picked from commit 38709df33b)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-10-20 09:37:49 -04:00
Domas
b0c59d1c62 fix unified alerting enabled checks (#40693) (#40697)
(cherry picked from commit 51a152456f)

public/app/features/query/state/DashboardQueryRunner/DashboardQueryRunner.ts
2021-10-20 15:22:11 +02:00
Grot (@grafanabot)
b993a3f2fc Storybook: fix theme colors not updating (#40679) (#40691)
(cherry picked from commit 1e471a6f76)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-10-20 14:11:40 +02:00
Grot (@grafanabot)
66a0a108ac CloudMonitoring: Allow to manually set filters (#40606) (#40689)
(cherry picked from commit b3027e8221)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-10-20 13:35:58 +02:00
Grot (@grafanabot)
3b32815716 InfluxDB: Fix spelling - "chronograf" rather than "chronograph" (#40587) (#40678)
(cherry picked from commit 6c0d3e97fe)

Co-authored-by: Ben Tasker <88340935+btasker@users.noreply.github.com>
2021-10-20 12:41:49 +02:00
Marcus Andersson
ffee4e0ec7 [v8.2.x] Toolkit: Prevent toolkit from crashing when an error occur (#40670) 2021-10-20 10:25:25 +02:00
Grot (@grafanabot)
f5f737f87f Fix 404 link to time series doc (#40565) (#40652)
(cherry picked from commit e3d1b2c8fe)

Co-authored-by: Fredrik Enestad <fredrik@enestad.com>
2021-10-19 14:55:13 -04:00
Grot (@grafanabot)
d70d30c31e Slider: Adjusts input to enforce min/max values on blur (#40524) (#40637)
* [cr] adjusts slider input to enfore min/max values on blur

* [cr] additional test for blur action, min/max readability

(cherry picked from commit 70f68289f5)

Co-authored-by: Coleman Rollins <crollins199@gmail.com>
2021-10-19 17:15:27 +02:00
Grot (@grafanabot)
7def66fdb6 Variables: Improve display when selecting variables with the same value (#40607) (#40630)
* Variables: Allow selection of different variables with the same value

* Variables: Don't modify this key

(cherry picked from commit e48d77b1eb)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-19 15:41:30 +02:00
Grot (@grafanabot)
7ac477ab48 Grafana-UI: Move Select container styles to outer most container (#40611) (#40621)
* Grafana-UI: Move Select container styles to outer most container

* Update packages/grafana-ui/src/components/Select/Container.tsx

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

* Rename file

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

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2021-10-19 14:36:26 +02:00
Grot (@grafanabot)
bb71fe0b9c [v8.2.x] Graph: Fix annotation description not being shown on hover (#40608)
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-10-19 12:10:44 +02:00
Grot (@grafanabot)
01ffb3852c Table: Tweak to type icon styles (#40596) (#40598)
(cherry picked from commit d179c2a4e9)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-19 09:26:06 +02:00
Grot (@grafanabot)
41a9638df7 RowsToFields: Fix issue with field names that are numbers (#40580) (#40597)
* RowsToFields: Fix issue with field names that are numbers

* Only add the index accessor if field name does not conflict with it

* fix lint

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

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-19 08:52:53 +02:00
Grot (@grafanabot)
363a94ff21 Annotations: Improve tag search performance (#40567) (#40582)
(cherry picked from commit ec0fcbbf4b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-10-18 16:30:02 +02:00
Grot (@grafanabot)
55b6b8a318 frontend logging fixes (#39946) (#40571)
(cherry picked from commit a531c6e26f)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-10-18 14:07:28 +02:00
Grot (@grafanabot)
a3842b4111 Logs: Fix creating of detected fields for each letter in log line (#40507) (#40560)
* Logs: Fix using of JSON parser for strings

* Update packages/grafana-data/src/utils/logs.ts

* Update packages/grafana-data/src/utils/logs.ts

* Update parser typing and documentation

(cherry picked from commit 4e1cf7dea7)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-10-18 11:44:09 +02:00
Grot (@grafanabot)
014e5ba0c2 Table panel: Fix filter not working for special characters and allow filter's case sensitivity control (#40458) (#40556)
* Fix filter not working for special characters and allow case sansitive filter control

* Memoize regex

(cherry picked from commit 6201b5b1d9)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-10-18 10:58:39 +02:00
Grot (@grafanabot)
3b5deb42c4 Noting non-support of template queries in official documentation (#40169) (#40539)
(cherry picked from commit 99eddac406)

Co-authored-by: Anne E. Ulrich <aeulrich1997@gmail.com>
2021-10-15 18:16:39 -04:00
Grot (@grafanabot)
899999750e Add copyright notice (#39206) (#40538)
* Add copyright notice

* Update docs/sources/copyright/_index.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

* Update docs/sources/copyright/_index.md

Co-authored-by: Robby Milo <robby.milo@grafana.com>

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Robby Milo <robby.milo@grafana.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
(cherry picked from commit f238342c17)

Co-authored-by: Nate Walters <89402456+nate-walters-grafana@users.noreply.github.com>
2021-10-15 17:25:15 -04:00
Grot (@grafanabot)
81dfa4a09d Fixed broken relrefs (#40533) (#40535)
(cherry picked from commit c44f51d5c3)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-10-15 16:30:21 -04:00
achatterjee-grafana
2e37c96aac Update _index.md (#40257) (#40529)
Clicking the "Getting started with Grafana" link does nothing in this page.  Added the additional "getting-started" to the ref.

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

Co-authored-by: jpapp25 <jeremypapp@gmail.com>
2021-10-15 13:54:44 -04:00
Grot (@grafanabot)
33b7458198 Updated MySQL provisioning doc (#39750) (#40502)
Updated password to secureJsonData for MySQL provisioning

(cherry picked from commit 374041148d)

Co-authored-by: PunkoIvan <punkoivan@gmail.com>
2021-10-15 11:49:29 +02:00
Grot (@grafanabot)
48edcd9577 Some more grammar fixes (#40183) (#40501)
(cherry picked from commit 8b41d85b68)

Co-authored-by: Anne E. Ulrich <aeulrich1997@gmail.com>
2021-10-15 11:49:08 +02:00
Grot (@grafanabot)
07e7dddeaf Fix typo in whats-new-in-v8-0.md (#38661) (#40500)
(cherry picked from commit 060a16041d)

Co-authored-by: Christoph Deil <Deil.Christoph@gmail.com>
2021-10-15 11:48:55 +02:00
Grot (@grafanabot)
6b7b3a3fa3 Text Panel: fixes unnecessary scroll in markdown html tables (#40315) (#40478)
* Text Panel: fixes unnecessary scroll in tables

* uses more robust solution that covers every edge case

* chore: uses variables instead and sets first child margins to zero

* override margin for only h1 and figure elements

* remove override styles for h1,table markdown contents

(cherry picked from commit 51a48e1869)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2021-10-14 16:37:25 +01:00
Grot (@grafanabot)
39fc1bf710 Fix: State timeline panel not to crash when only one threshold (#40371) (#40457)
(cherry picked from commit 1e9aeb6f19)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-10-14 14:23:41 +02:00
Grot (@grafanabot)
d67b6e23ea Alerting: delete orphaned records from kvstore (#40337) (#40450)
(cherry picked from commit 153c356993)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-10-14 12:32:57 +02:00
Grot (@grafanabot)
3cc055f59c Prometheus: Remove autocomplete limit for metrics (#39363) (#40448)
* Remove limit on metrics

* Remove unused variable

(cherry picked from commit 46f922fe1a)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-10-14 11:49:59 +02:00
Grot (@grafanabot)
83e58575ef CloudWatch: Add AWS Elastic GPUs metrics and dimensions (#40253) (#40436)
* CloudWatch: Added AWS Elastic GPUs metrics and dimensions

* Delete extra space

(cherry picked from commit 665055dbbc)

Co-authored-by: Ilya Stoliar <52413756+ilyastoli@users.noreply.github.com>
2021-10-14 10:09:40 +02:00
Grot (@grafanabot)
81118d3059 make alert tab create alert button work with default datasource (#40334) (#40432)
(cherry picked from commit c43b82d44b)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-10-14 09:14:29 +02:00
Grot (@grafanabot)
8b9bdfa546 Update _index.md (#40421) (#40427)
spelling

(cherry picked from commit b0414f66dc)

Co-authored-by: Arie Heinrich <arie.heinrich@outlook.com>
2021-10-14 04:11:31 +02:00
Grot (@grafanabot)
7689b2f5ec Forbid creation of dashboard permissions with both a user and a team (#40104) (#40412)
These permissions could be created through the API but would not show
correctly in the UI.

(cherry picked from commit 5af96544f3)

Co-authored-by: Jesse Weaver <pianohacker@gmail.com>
2021-10-13 16:10:40 -06:00
Grot (@grafanabot)
fb79d72230 ReleaseNotes: Update changelog and release notes for v8.1.3 (#40384) (#40390)
(cherry picked from commit 415a92331a)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-10-13 16:18:20 +02:00
Grot (@grafanabot)
3f86150506 Fix: State timeline tooltip not showing (#40100) (#40374)
* Fix: State timeline tooltip not showing

* Check transformation instead of refId

(cherry picked from commit 7422189a88)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-10-13 12:32:42 +02:00
Marcus Efraimsson
92d768fe66 Prometheus: Fix issue where TCP connections not being reused when querying from Grafana alerting (#40349) (#40368)
Fixes #40366

Co-authored-by: Dave Henderson <dave.henderson@grafana.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 23bee50474)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-13 11:19:04 +02:00
Grot (@grafanabot)
c57041f13b Application: Make error-template title configurable (#40310) (#40363)
* Fix error-template title

as in index-template.html

* Test: fix for AppTitle

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
(cherry picked from commit 3d9e2d8c82)

Co-authored-by: Ben RUBSON <6764151+benrubson@users.noreply.github.com>
2021-10-13 09:08:18 +02:00
Grot (@grafanabot)
ea2976180b [v8.2.x] Alerting: Remove invalid Slack URL as we migrate notification channels (#40356)
* Alerting: Remove invalid Slack URL as we migrate notification channels (#40344)

* Alerting: Remove invalid Slack URL as we migrate notification channels

Grafana will accept any type of utf8 valid string as the Slack URL and will simply fail as we try to deliver the notification of the channel. The Alertmanager will fail to apply a configuration if the URL of the Slack Receiver is invalid.

This change takes that into account by removing the URL for the receiver as we migrate notification channels that do not pass the url validation. As we assume the notification was not being delivered to being with.

* Add a log line when we modify the channel

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

* fix tests

Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-10-13 08:51:06 +02:00
Grot (@grafanabot)
82ef926e1b E2E: Fix path for importDashboards (#40111) (#40351)
* Small e2e fix for importDashboards

(cherry picked from commit 47f09fca8d)

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2021-10-12 20:53:31 -04:00
Grot (@grafanabot)
7bbc0e8684 Example fixes for #40173 (#40175) (#40350)
(cherry picked from commit 24fa93bd58)

Co-authored-by: Paul Dee <647633+systemcrash@users.noreply.github.com>
2021-10-12 22:17:58 +02:00
Grot (@grafanabot)
a652ffa9b4 [v8.2.x] Alerting: Fixes a bug when trying to sync broken alertmanager config (#40342)
* Alerting: Fixes a bug when trying to sync broken alertmanager config (#40338)

* Alerting: Fixes a bug when trying to sync broken alertmanager config

Broken alertmanager configuration has the potential to be introduced as part of a migration e.g. due to incompatible data between what grafana accepts and what the Alertmanager expects. When this happens, we expect an eventually consistent behaviour where we'll keep trying to apply the configuration until it works.

As part of change in https://github.com/grafana/grafana/pull/39237 we introduced a regression that modified this behaviour and instead tried to create a new Alertmanager for that organization everytime, which eventually ended up in a panic due to a duplicate metrics being registered.

This PR fixes that and introduces a test to catch further regressions.

* Remove disable orgs

(cherry picked from commit 48d73cb148)

* remove decryptFn that is not known in 8.2 branch

Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-10-12 15:26:00 -04:00
Grot (@grafanabot)
49aadec393 Packaging: Remove ProcSubset option in systemd (#40339) (#40340)
* update service file

(cherry picked from commit fe5e49476b)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-12 18:53:25 +02:00
George Robinson
e775fba146 Alerting: Fix error message in ngalert when notifications cannot be sent to alertmanager (#40158) (#40317)
(cherry picked from commit 8318e45452)
2021-10-12 15:28:45 +01:00
Grot (@grafanabot)
2011097d42 Explore: Prevent empty Elasticsearch logs query responses from hiding the logs panel (#40217) (#40329)
* remove return value from addPreferredVisualisationType

* Elasticsearch: send empty series instead when no data is received for a query

(cherry picked from commit b0391d4933)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-10-12 14:53:56 +01:00
Grot (@grafanabot)
4de5d30719 Explore/Loki: Fix defaulting to instant query when switching from Prometheus (#40216) (#40323)
* Loki: Pass only wanted query props when importing from Prometheus

* Update

* Update public/app/plugins/datasource/loki/language_provider.ts

Co-authored-by: Giordano Ricci <me@giordanoricci.com>

* Add test

* Fix strict error

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
(cherry picked from commit 2f0eccb421)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-10-12 13:38:40 +02:00
Grot (@grafanabot)
dad16637ce fix rule form crashing when extra query editor actions are provided (#40319) (#40322)
(cherry picked from commit b1f56b4863)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-10-12 13:16:41 +02:00
Grot (@grafanabot)
128981fb21 Alerting: cleanup alert resources on org removal (#39938) (#40321)
(cherry picked from commit e1dfec49f9)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-10-12 12:46:03 +02:00
Giordano Ricci
fa4eec8e1d AWS: add OpenSearch to AWS services (#40290) (#40297)
(cherry picked from commit 24af3593a2)
2021-10-11 17:30:08 +02:00
Grot (@grafanabot)
16ebe8999e ReleaseNotes: Updated changelog and release notes for 8.2.1 (#40287) (#40292)
* ReleaseNotes: Updated changelog and release notes for 8.2.1

* Update docs after running prettier:write

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
(cherry picked from commit 2fd869fd02)
2021-10-11 16:32:10 +02:00
Grot (@grafanabot)
88622d7f09 "Release: Updated versions in package to 8.2.1" (#40262) 2021-10-11 11:35:17 +02:00
Grot (@grafanabot)
0a27bfba5a Dashboard: Fixes rendering of repeating panels (#39991) (#40259)
* Dashboard: Fixes rendering of repeating panels

* Chore: update after PR comments

(cherry picked from commit d8e97fc024)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-11 07:06:51 +02:00
Grot (@grafanabot)
a596cf0515 A11y: Fix for Fastpass issues on the Profile page (#40212) (#40258)
* A11y: Fix for Fastpass issues on Profile page

* Chore: small fix

* Chore: fixes the tests

(cherry picked from commit 7706483654)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-11 07:06:14 +02:00
Grot (@grafanabot)
a7a935fff0 ReleaseNotes: Updated changelog and release notes for 8.2.0 (#40233) (#40236)
(cherry picked from commit 12b5956af2)
2021-10-08 19:55:30 +02:00
Grot (@grafanabot)
b29b65404c Docs: Add required library for the image renderer (#40201) (#40221)
(cherry picked from commit 4c0bafa53a)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-10-08 10:41:35 -04:00
Grot (@grafanabot)
7539dd5ec6 Add Headers to http client Options (#40214) (#40220)
(cherry picked from commit d023cabae6)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-10-08 16:27:07 +02:00
Grot (@grafanabot)
80d7138076 remove systemcallfilters sections from systemd unit files (#40176) (#40219)
(cherry picked from commit cdea812cee)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-08 16:17:59 +02:00
Giordano Ricci
3ff6fcdb50 Fix: fix typo in what's new list item title (#40207)
* Fix: fix typo in what's new list item title

* Sync doc with main
2021-10-08 13:25:49 +02:00
Grot (@grafanabot)
54dec97d0a Datasources: Fix deletion of datasource if plugin cannot be found (#40095) (#40209)
* fix(pluginsettings): reject with error so datasource plugin loading failures still render ui

* feat(pluginpage): handle plugin loading error

* refactor(datasources): separate out datasource and meta loading so store has info for deletion

* fix(datasourcesettings): introduce loading flag to wait for datasource and meta loading

* test(datasourcesettings): fix failing test

* test(datasources): assert loading status of datasource settings

* test(datasources): update action tests for latest changes

(cherry picked from commit 7cf3c84c92)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-10-08 13:04:17 +02:00
Giordano Ricci
904f7699a3 Docs: Whats new in 8.2 (#39945) (#40202)
* Docs: Whats new in 8.2 (#39945)

* Added time range controls updates

* Added plugins catalog update

* Added enterprise images

* Added community contributions highlights for 8.2

* accessibility statement

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Update docs/sources/whatsnew/whats-new-in-v8-2.md

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

* Apply suggestions from code review

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit ed0c43b106)

* Add index entry

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-10-08 11:11:04 +01:00
Grot (@grafanabot)
4facd4aedf Folders: Prevents deletion of General folder (#40192) (#40200)
(cherry picked from commit 70e759e0c0)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-08 11:48:26 +02:00
Grot (@grafanabot)
37fcce3940 Grammar issues (#40168) (#40177)
(cherry picked from commit 872385dcee)

Co-authored-by: Anne E. Ulrich <aeulrich1997@gmail.com>
2021-10-07 19:32:36 -04:00
Grot (@grafanabot)
4b4c11f566 Packaging: document systemd net bind capability rpm and deb installations (#40165) (#40178)
* add systemd net bind capability docs for rpm and deb

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

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2021-10-07 23:27:09 +02:00
Grot (@grafanabot)
40b61914e6 docs: Add keepCokkies cofiguration option in datasources (#39890) (#40166)
Signed-off-by: Vinayak Kadam <kadamvinayak03@gmail.com>
(cherry picked from commit dbe1ab7d54)

Co-authored-by: Vinayak <vinayak03@users.noreply.github.com>
2021-10-07 16:21:28 -04:00
achatterjee-grafana
11aeb24099 Doc: Fixed issue 40017 (#40152) (#40161)
* Added content as suggested by Will

* removed a few extra words.

* Update docs/sources/administration/configuration.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/administration/configuration.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/administration/configuration.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2021-10-07 13:18:11 -04:00
Giordano Ricci
efc8f111c0 Docs: Update publish.yml for 8.2.0 (#40151) 2021-10-07 16:33:52 +01:00
Grot (@grafanabot)
5a059abb5d ReleaseNotes: Updated changelog and release notes for 8.2.0 (#40141) (#40146)
* ReleaseNotes: Updated changelog and release notes for 8.2.0

* Add link & remove empty line in CHANGELOG

* remove empty line

Co-authored-by: Elfo404 <me@giordanoricci.com>
(cherry picked from commit e7b81e1918)
2021-10-07 15:32:54 +01:00
Marcus Efraimsson
9ae69bedfe [v8.2.x] ReleaseNotes: Updated changelog and release notes (#40022) (#40140)
* ReleaseNotes: Updated changelog and release notes (#40022)

(cherry picked from commit feaa56a7fe)

* Add missing release notes for 8.1.4 and 8.1.5

* ReleaseNotes: Updated changelog and release notes for 8.1.7 (#40081)

(cherry picked from commit 4a91ceeb1e)

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2021-10-07 13:49:17 +02:00
Grot (@grafanabot)
d7f71e9eae "Release: Updated versions in package to 8.2.0" (#40134) 2021-10-07 12:23:10 +02:00
Grot (@grafanabot)
1be90124f0 Aws: Update AWS authentication documentation (#39236) (#39861)
* wip: adding workspace iam role

* add intro

* minor adjustment

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

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

* revert to on behalf of

* remove permissions

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit b711bc00b9)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-10-07 11:49:56 +02:00
Grot (@grafanabot)
2d9aabfcac Search: Fix local storage key (#40127) (#40130)
* Default to 'General' if no folder title is present

* Add bottom padding

(cherry picked from commit 5c7e874008)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-10-07 11:18:47 +02:00
Grot (@grafanabot)
235351ae69 Stat: recompute shared y range during streaming updates (#39485) (#40132)
(cherry picked from commit d3815a851c)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-10-07 11:16:30 +02:00
Grot (@grafanabot)
f6199596df Annotations: Improve rendering performance of event markers (#39984) (#39999)
(cherry picked from commit ead8429210)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-10-07 10:50:19 +02:00
Grot (@grafanabot)
f15be05dec Fix: prevent queryDisplyText in QueryRowHeader from overflowing (#40094) (#40128)
* Revert "Fix Query Editor Row horizontal overflow (#39419)"

This reverts commit 42b1fa0f62.

* fix: prevent queryDisplyText in QueryRowHeader from overflowing

(cherry picked from commit 95d9722afa)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-10-07 10:45:45 +02:00
Grot (@grafanabot)
81fcc3a007 CodeEditor: making sure we trigger the latest onSave callback provided to the component (#39835) (#40120)
(cherry picked from commit d9ca3c5c5d)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-10-07 09:18:47 +02:00
Grot (@grafanabot)
764ec0bd98 TimePicker: fix console error on time picker open (#40067) (#40072)
* TimePicker: fix console error on time picker open

(cherry picked from commit ba31e4ee4d)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-10-07 07:22:46 +01:00
Grot (@grafanabot)
250381f581 Docs: Add documentation for library elements API (#39829) (#40117)
* LibraryElements: Adds api documentation

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Update docs/sources/http_api/library_element.md

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

* Refactor: changes after PR comments

* Apply suggestions from code review

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

* Chore: updates after review

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

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-07 08:03:07 +02:00
Grot (@grafanabot)
cac6effebd Explore: Add opt-in config for Node Graph in Jaeger, Zipkin, and Tempo (#39958) (#40105)
(cherry picked from commit 3a8d04603f)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-10-06 14:42:07 -06:00
Grot (@grafanabot)
9212b34d46 Doc: Organized the Getting Started section (#39813) (#40039)
* First commit with reorganized and updated content.

* Updated Getting started topic.

* Changed some wording.

* Removed extra word "setting".

* Update docs/sources/getting-started/getting-started-prometheus.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/getting-started/getting-started-prometheus.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Updated doc based on review.

* Fix linting errors

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
(cherry picked from commit cfc31ce523)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-10-06 13:30:46 -04:00
Grot (@grafanabot)
6db0af2223 A11y: Fix fastpass issues for dashboard management pages (#39940) (#40065)
* A11y: Fix fastpass issues for dashboard pages
See #39429

(cherry picked from commit 1ce750471f)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-10-06 18:02:54 +01:00
Grot (@grafanabot)
6730d5b657 Tempo: Decrease the default Tempo search limit to 20 (#40030) (#40088)
(cherry picked from commit 3e33330e27)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-10-06 09:30:48 -06:00
Dimitris Sotirakis
dc5ed14290 Remove unnecessary Dockerize steps (#40087) 2021-10-06 18:21:59 +03:00
Grot (@grafanabot)
8b396d5421 Fix typo in "filter by value" example (#40070) (#40086)
(cherry picked from commit 98a9b4adc5)

Co-authored-by: ian moone <lrobin@xee.com>
2021-10-06 11:19:05 -04:00
George Robinson
29638a485b Panel ID annotation cannot be set without Dashboard UID (#40019) (#40063)
(cherry picked from commit 935bd34a30)
2021-10-06 12:17:29 +01:00
Grot (@grafanabot)
7cd58dd7d0 MySql: Fix reset button on config page (#39988) (#40064)
* MySql: Fix reset button on config page

* Use button instead of anchor

* Add aria labels

(cherry picked from commit 7fd7c98540)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-10-06 13:08:02 +02:00
George Robinson
265714866b You can now get alert rules for a dashboard or a panel using /api/v1/rules endpoints. (#39476) (#40008)
Get alert rules for a dashboard and panel in /api/v1/rules

(cherry picked from commit 2a4c1b1aa6)
2021-10-06 11:38:26 +01:00
Grot (@grafanabot)
cb6d6e0497 Docs: update alerting (#39899) (#40058)
* Docs: update alerting

* Apply suggestions from code review

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
(cherry picked from commit 4f2a3f92e4)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-10-06 12:22:06 +02:00
achatterjee-grafana
a6ef2cda29 Doc: Fix escalation issue 903 (#40034) (#40036)
* First set of reorg of Playlist topic. Also fixed a broken bookmark in Azure authentication topic.

* More re-org.

* Added note requested in issue 903.

* Updated a note added dashboard HTTP API endpoint.

* Update docs/sources/dashboards/playlist.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/dashboards/playlist.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/dashboards/playlist.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/dashboards/playlist.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/dashboards/playlist.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/dashboards/playlist.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Updated image position and name.

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
2021-10-05 20:41:20 -04:00
Grot (@grafanabot)
73e89da81c Fix static path matching issue in macaron (#40023) (#40027)
Co-authored-by: Malcolm Holmes <mdh@odoko.co.uk>
(cherry picked from commit 329f96db1a)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-10-05 20:04:26 +02:00
Grot (@grafanabot)
218dc8104e AccessControl: rename data source id read action (#39966) (#40009)
(cherry picked from commit 4160429b71)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-10-05 16:09:32 +02:00
Grot (@grafanabot)
c26dc6487e AccessControl: Document new permissions restricting data source access. (#39091) (#40004)
* Add data sources roles and permissions to docs

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
(cherry picked from commit 6aa006b699)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-10-05 15:25:21 +02:00
Domas
b5521a9eaf Alerting: Alertmanager datasource support for upstream Prometheus AM implementation (#39775) (#39989)
(cherry picked from commit a1d4be0700)
2021-10-05 12:13:11 +03:00
Grot (@grafanabot)
32481e75c5 Alerting: make /api/prometheus/grafana/api/v1/rules faster (#39660) (#39986)
(cherry picked from commit e343b62665)

Co-authored-by: Domas <domas.lapinskas@grafana.com>
2021-10-05 11:11:15 +03:00
Grot (@grafanabot)
3e6bb78e3d TimePicker: Close timepicker with esc (#39962) (#39969)
(cherry picked from commit 3cd7b11eb4)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-10-04 22:52:26 +02:00
Grot (@grafanabot)
d4bec0b178 Docs: Add API endpoints used for templating in Prometheus (#39639) (#39974)
(cherry picked from commit 3e01db9a1e)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-10-04 22:28:06 +02:00
Grot (@grafanabot)
815adae389 Some documentation fixes (#39951) (#39973)
* Some documentation fixes

* Address review comments

* Fixed lint issues using prettifier.

Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
(cherry picked from commit ccd7f8a5ba)

Co-authored-by: Michael D <michael@drueing.de>
2021-10-04 15:54:44 -04:00
Kyle Brandt
4be5dd6391 Alerting: Allow more characters in label names so notifications are sent (#38629) (#39965)
Remove validation for labels to be accepted in the Alertmanager, This helps with datasources that produce non-compatible labels.

Adds an "object_matchers" to alert manager routers so we can support labels names with extended characters beyond prometheus/openmetrics. It only does this for the internal Grafana managed Alert Manager.

This requires a change to alert manager, so for now we use grafana/alertmanager which is a slight fork, with the intention of going back to upstream.

The frontend handles the migration of "matchers" -> "object_matchers" when the route is edited and saved. Once this is done, downgrades will not work old versions will not recognize the "object_matchers".

Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
(cherry picked from commit 6572017ec7)

cleanup

Co-authored-by: gotjosh <josue@grafana.com>
2021-10-04 09:07:04 -07:00
Grot (@grafanabot)
b4016187ff Doc: Updated Azure AD OAuth2 authentication topic. (#39609) (#39964)
* Updated topic.

* Added bookmarks.

* Update docs/sources/auth/azuread.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/auth/azuread.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Update docs/sources/auth/azuread.md

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>

* Fixed bulleted list.

* Updated list again.

* Format change.

* Removed spaces.

* Run prettifier to fix whitespace issues.

Co-authored-by: Fiona Artiaga <89225282+GrafanaWriter@users.noreply.github.com>
(cherry picked from commit 991b5fee3d)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-10-04 11:50:19 -04:00
Grot (@grafanabot)
045146184a CloudWatch Logs: Skip caching for Log queries (#39860) (#39893)
* Add x-skip-cache header to queries

* Specify caching works for CW metrics

(cherry picked from commit 3e47fb1432)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-10-04 12:34:36 +02:00
Grot (@grafanabot)
2ecde07356 [v8.2.x] CloudWatch Logs: Docs for X-Ray links (#39894)
* CloudWatch Logs: Docs for X-Ray links  (#39725)

(cherry picked from commit 0b89bdd47d)

* Docs: Lint CloudWatch index page

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-10-04 12:03:36 +02:00
Grot (@grafanabot)
8dd5e88f92 Docs: Move image renderer doc to its own section and add configuration doc (#38759) (#39896)
* Move image renderer doc to its own section and add configuration doc

* revert unwanted changes

* remove unwanted formatting

* revert change

* Improve configuration section

* update default flags for 3.1.0 update

* Clean up and add some links

* fix broken links

* clean up notes & links and small updates

* fix after merge

* fix broken link

* fix typo

* Apply suggestions from code review

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>

* Apply PR feedback

* Update monitoring.md

* Apply suggestions from code review

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

* Update troubleshooting.md

* add alias for old image rendering doc page

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit b7eac0f655)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
Co-authored-by: Agnès Toulet <agnes.toulet@gmail.com>
2021-10-04 09:23:10 +02:00
Grot (@grafanabot)
439b1b7310 A11y: Fix fastpass issues for /org/ pages (#39902) (#39916)
* A11y: Fix fastpass issues for /org/ pages
See #39429

(cherry picked from commit 816d70a7e5)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-10-04 10:01:01 +03:00
Grot (@grafanabot)
76ecd3759b Fix folder icons for alert rules (#39873) (#39891)
(cherry picked from commit 0f42b37e21)

Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
2021-10-01 21:30:21 +02:00
Grot (@grafanabot)
ab53001fd2 Plugins Catalog: fix overflowing text in plugin cards (#39862) (#39866)
* refactor(Plugins/Admin): add a "badge" for displaying available updates

* refactor(Plugins/Admin): rename component

* refactor(Plugins/Admin): use the PluginListItemBadges component

(cherry picked from commit 3ad5ee87a3)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-10-01 17:37:20 +02:00
Grot (@grafanabot)
ea030e8bbd Prometheus: metrics browser: handle label values with special characters (#39713) (#39858)
* prometheus: handle label-values with special characters

* added comment

(cherry picked from commit d363c36853)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-10-01 16:11:03 +02:00
Grot (@grafanabot)
5d2fb57dd8 Plugins: Mock Icon component to prevent console errors (#39901) (#39909)
* feat(grafana-ui): externalise react-inlinesvg for mocking

* feat(grafana-toolkit): mock react-inlinesvg to prevent svg fetch errors in tests

* test(toolkit): remove assertion on array length of moduleNameMapper overrides

* feat(toolkit): set testId to match the Icon name prop in react-inlinesvg mock

(cherry picked from commit cc7f7e30e9)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-10-01 15:54:19 +02:00
Grot (@grafanabot)
5166c3c8bb A11y: Fix fastpass issues for /org/teams pages (#39848) (#39864)
* A11y: Fix fastpass issues for /org/teams pages
See #39429

(cherry picked from commit 451d023c79)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-10-01 14:32:51 +01:00
Grot (@grafanabot)
05c0e83802 DashboardList/AlertList: Fix for missing All folder value (#39772) (#39886)
* DashboardList/AlertList: Fix for missing All folder value

* Refactor: Fixes case where folder does not exist in results

(cherry picked from commit 7c7b21b39e)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-10-01 13:38:38 +02:00
Grot (@grafanabot)
c61395d7dc ReleaseNotes: Updated changelog and release notes for 8.2.0-beta2 (#39832) (#39851)
* ReleaseNotes: Updated changelog and release notes for 8.2.0-beta2

* Update _index.md

* Fix linting errors

* Update CHANGELOG.md

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana <ivana.huckova@gmail.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit 58aa595527)
2021-09-30 15:02:14 +02:00
Grot (@grafanabot)
a2306d2765 "Release: Updated versions in package to 8.2.0-beta.2" (#39831) 2021-09-30 10:49:00 +02:00
Grot (@grafanabot)
229c45ccda Add fiscal years and search to time picker (#39073) (#39828)
* Add search to time picker

* implement fiscal datemath

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit 738d5e499e)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-09-30 10:07:24 +02:00
Grot (@grafanabot)
1126ea6539 Graphite: Ensure only valid queries are used for interpolation (#39761) (#39827)
* Graphite: Ensure only valid queries are used for interpolation

* Add a unit test

(cherry picked from commit 787e5e78dd)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-09-30 10:00:06 +02:00
Grot (@grafanabot)
06015fbdaf Explore: Fix displaying rich history saving error message (#39766) (#39826)
* Explore: Fix displaying rich history saving error message

* Keep generic error message

* remove testing snippet

(cherry picked from commit f8ebcaa0d9)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-09-30 09:52:18 +02:00
Grot (@grafanabot)
dc363a05ac A11y: Fixes some fastpass errors for /datasources/* routes (#39577) (#39797)
* A11y: Fixes some fastpass errors for /datasources/* routes
See #39429

(cherry picked from commit 75a55379f1)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-09-30 09:24:26 +02:00
Grot (@grafanabot)
70a4fd8a21 Plugins Catalog: Make the catalog the default way to interact with plugins (#39779) (#39822)
* chore(Plugins/Admin): make the Plugins Catalog the default way to interact with plugins

* chore(defaults.ini): change the default value for `plugin_admin_enabled`

* test(Plugins): make the tests pass

(cherry picked from commit c2754eb9cc)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-30 09:05:55 +02:00
Torkel Ödegaard
91db8910a7 Chore: Tidy up emotion css with better theme breakpoint (#39340) (#39811)
(cherry picked from commit f3475b864c)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-29 20:41:02 +02:00
Grot (@grafanabot)
e69544b6ea Scatter: support bubble and line charts with out-of-order data (alpha) (#39377) (#39809)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit 4c8c2f6c96)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-29 19:42:50 +02:00
Grot (@grafanabot)
c6fb06721f DashboardRow: Prevent unintended editing of DashboardRow with keyboard shortcut 'e' (#39792) (#39803)
(cherry picked from commit ff009bee9f)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-29 18:11:20 +02:00
Grot (@grafanabot)
900c94fd8a Admin: Show licensed roles and unit membership in UI (#39773) (#39802)
* Extend User type

* Render licensed roles and org units

* Combine admin icon with units

* Extract search users to a new service

* Fix wire provider

* remove mock data

* Fix icon margin

* Fix common_test and remove RouteRegister

* Remove old endpoints

* Fix test

* Add indexes to dashboards and orgs tables

* Fix lint

* Revert docs changes

* undo docs formatting

* Change order of input and filters

* Abstract aria-label into a function

* Add accessible info about user's membership

* UI tweaks

Co-authored-by: spinillos <selenepinillos@gmail.com>
(cherry picked from commit 62dc10829a)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-09-29 18:00:15 +02:00
Grot (@grafanabot)
d6b00710cb PluginsCatalog: Add support for viewing the plugins list as both table and list (#39466) (#39798)
* working version but with duplications.

* refactor(Plugins/Admin): use "fr" instead of "repeat" for grid columns

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>

* fix(Plugins/Admin): use PluginIconName instead of IconName

* refactor(Plugins/Admin): store the display-mode on the state

* refactor(Plugins/Admin): use && for conditional rendering

* refactor(Plugins/Admin): rename variable

* refactor(Plugins/Admin): share code between card and row components

* test(PluginListItemRow): add tests

* test(Plugins/Admin): add a simple test for the display-mode switching

* fix(Plugins/Admin): compose styles with css``

* refactor(Plugins/Admin): rename "table" to "grid" for display modes

* test(Plugins/Browse): follow up on renaming "table" to "grid"

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit 2dedbcd3c3)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-09-29 17:56:43 +02:00
Grot (@grafanabot)
4fe38b169c Docs: Add docs for Redis cluster caching backend configuration (#39687) (#39800)
* caching: add docs for redis cluster config

* address PR comments

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
(cherry picked from commit 9f1de095b7)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2021-09-29 17:56:19 +02:00
Grot (@grafanabot)
bd12923c59 E2E: improvements to the importDashboard flow (#39693) (#39790)
* E2E: improvements to the importDashboard flow

(cherry picked from commit aeeaa67b0a)

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2021-09-29 11:53:32 -04:00
Grot (@grafanabot)
9570495af5 A11y: Fix fastpass issues for /explore page (#39507) (#39796)
* Fix(A11y): add label to explore short url button

* Grafana-UI(A11y): Set Selects images alt attribute to their option label

* Update packages/grafana-ui/src/components/Select/SingleValue.tsx

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

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

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-09-29 17:46:03 +02:00
Sofia Papagiannaki
368742ab04 Alerting: Remove ngalert feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations (#38746) (#39793)
* Remove `ngalert` feature toggle

* Update frontend

Remove all references of ngalert feature toggle

* Update docs

* Disable unified alerting for specific orgs

* Add backend tests

* Apply suggestions from code review

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

* Disabled unified alerting by default

* Ensure backward compatibility with old ngalert feature toggle

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
(cherry picked from commit 012d4f0905)
2021-09-29 11:21:25 -04:00
Selene
d07ed05918 Extract search users functions into a service (#39002) (#39770)
* Extract search users to a new service

* Fix wire provider

* Fix common_test and remove RouteRegister

* Remove old endpoints

* Fix test

* Add indexes to dashboards and orgs tables

* Fix lint

(cherry picked from commit 02702eb82d)
2021-09-29 17:02:58 +02:00
Grot (@grafanabot)
4699620e23 Plugin Catalog: support Grafana instances that cannot communicate with gcom (#39638) (#39787)
* added possibility to track if remote plugins could be fetched.

* adding hook to detect if remote plugins are available.

* feat(catalog): disable installed/all filter if remote plugins are unavailable

* feat(Plugins/Admin): hide the install controls if GCOM is not available

* refactor(Plugins/Admin): group `@grafana` dependencies

* fix(Plugins/Admin): don't show an error alert if a remote plugin is not available

* feat(Plugins/Admin): prefer to use the local version of the readme

* chore(Plugins/Admin): type the mocked state properly

* test(Plugins/Admin): add tests for the Plugin Details when GCOM is not available

* test(Plugins/Admin): add tests for the Browse when GCOM is not available

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
(cherry picked from commit fffcee7c1f)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-09-29 16:44:57 +02:00
Grot (@grafanabot)
09461d03ea Update migration to not delete existing Grafana alerts (#39541) (#39736)
* keep existing unified alert rules untouched
* move silences and other alertmanager files to the organization directory (only if it is a single organization deployment)
* assign the existing notification settings and routes to the first organization
* create default notification settings for each organization in the case of multi org deployment

(cherry picked from commit 5d0d7dcb3a)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-09-29 09:27:44 -04:00
Grot (@grafanabot)
c7e9b1685c OrgPage: Minor typo fix (#39764) (#39777)
(cherry picked from commit 630a120a15)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-09-29 14:37:20 +02:00
Grot (@grafanabot)
20212aaf97 BarGauge: Improve behaviour when working with streaming data (#39737) (#39765)
* BarGauge: Improve behaviour when working with streaming data

* BarGauge: Refactor default min/max into grafana/data

(cherry picked from commit 2058193e98)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-29 11:39:55 +02:00
Grot (@grafanabot)
832321b405 add support for interaction events (#39752) (#39762)
(cherry picked from commit db8c9122aa)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-09-29 11:28:15 +02:00
Grot (@grafanabot)
f4bd6d4f84 Docs: alerting fixes (#39717) (#39730)
* Docs: alerting fixes

(cherry picked from commit eead8cd8e1)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-09-29 12:22:06 +03:00
Grot (@grafanabot)
805cbba81d TimeSeries: Fix shared cursor (#39738) (#39760)
(cherry picked from commit 4682cf5b7c)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-09-29 10:58:14 +02:00
Grot (@grafanabot)
f793c0d2fc Table panel: Make filter case insensitive (#39746) (#39757)
* Expose FilterInput from grafana/ui

* Make table filter case insensitive

* Update packages/grafana-ui/src/components/Table/FilterList.tsx

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
(cherry picked from commit f887576a27)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-09-29 10:05:50 +02:00
Grot (@grafanabot)
b82bc90180 Hooks: Adding possibility to display banner on the top of the page (#39099) (#39755)
* adding working version of notificaion banner trigger.

* Move it to enterprise

* Fixing csss, none of the pages showed our CustomScrollbar or had double scrollbars

* fixing explore

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

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-09-29 08:29:45 +02:00
Grot (@grafanabot)
b37d4152d8 AzureMonitor: move metric deep link code to backend (#39524) (#39727)
(cherry picked from commit bf9be975ac)

Co-authored-by: Isabella Siu <sakurablossom@blueblueworld.com>
2021-09-28 14:31:47 -04:00
Grot (@grafanabot)
2cd112b9da Alerting: Add filtering for Silences (#39109) (#39452)
* Add filtering for Silences page

* Add tests Silences and SilenceEditor

* pr feedback: add field validation and test refactor

* Add test for checking content

* fix overflow for validation error message

* increase login threshold for pa11y

* Make silence filter state its own type and function

(cherry picked from commit d03f75726b)

Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2021-09-28 10:35:27 -07:00
Grot (@grafanabot)
e426039d6c Tempo: Improve search form defaults and validation (#39534) (#39749)
* Tempo: add default limit, option to hide Loki search, and run query on hotkey in dropdowns

(cherry picked from commit 06592410b2)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 11:20:49 -06:00
Grot (@grafanabot)
f28d869db2 Tempo: Show warning if search is not available. Add opt-out config (#39489) (#39747)
* Tempo: Show warning if search is not available. Add opt-out config

(cherry picked from commit 24479ff6b0)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 10:52:14 -06:00
Grot (@grafanabot)
618a590a05 Tempo: Improve how Tempo Search fetches autocomplete values (#39371) (#39745)
* Improve how tempo search fetches autocomplete values

* Refetch autocomplete options on menu load

(cherry picked from commit 1865689411)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 10:20:43 -06:00
Grot (@grafanabot)
ce5fe730b8 Tempo: Format tempo search query history text (#39250) (#39743)
* Format tempo search query history text

(cherry picked from commit c57ff8beed)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 10:13:15 -06:00
Grot (@grafanabot)
6648f8c5a1 Tempo: Run search query with keyboard shortcut from input fields (#39247) (#39741)
* Tempo: Run query with keyboard shortcut from duration fields

(cherry picked from commit 9c4e7eb659)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 09:50:05 -06:00
Grot (@grafanabot)
d38782bc94 grafana-ui: Improve PartialHighlighter error handling (#39685) (#39739)
* Improve PartialHighlighter error handling

(cherry picked from commit 05bb451a1d)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-09-28 09:45:15 -06:00
Grot (@grafanabot)
2e86425ed9 Alerting: Move alertmanager default config to UnifiedAlertingSettings (#39597) (#39714)
(cherry picked from commit 05eb30e323)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: Sofia Papagiannaki <sofia@grafana.com>
2021-09-28 11:01:18 -04:00
Grot (@grafanabot)
5aaef25a33 Alerting: Optimization of fetching data in multiorg alertmanager (#39237) (#39720)
* Add method GetAllLatestAlertmanagerConfiguration to DBStore
* add method ApplyConfig to AlertManager
* update multiorg alert manager to load all alertmanager configs at once

(cherry picked from commit 1910d85ae0)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2021-09-28 09:05:22 -04:00
Grot (@grafanabot)
35dad9c267 Provide reader to alertmanager silence instead of file path (#39305) (#39721)
(cherry picked from commit e1aae0549e)

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
2021-09-28 09:04:22 -04:00
Grot (@grafanabot)
c2d95d4d01 Alerting: Prevent preview if no condition is set (#39659) (#39706)
* prevent preview if no condition is set

* fixes after pr feedback

* watch on type and condition

(cherry picked from commit cc94c55e48)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-09-28 14:24:19 +02:00
Sofia Papagiannaki
c89e1236fe Alerting: tune rule evaluation via configuration (#35623) (#39712)
* Alerting: Configure max evaluation retries

* Alerting: Enforce minimum rule evaluation interval

* Alerting: Disable rule evaluation from configuration

* Update docs

* Alerting: Configure rule evaluation timeout

* Move options on unified_alerting config section

* Apply suggestions from code review

Co-authored-by: gotjosh <josue@grafana.com>
(cherry picked from commit f6f3a54742)
2021-09-28 14:58:31 +03:00
Grot (@grafanabot)
3d76c772be Plugin Catalog: Use routing for PluginDetails Tabs (#39555) (#39680)
* feat(catalog): introduce id and href to PluginDetailsTabs

* feat(catalog): add hrefs and ids to PluginDetails tabs. Pass queryParams to PluginDetailsBody

* feat(catalog): pass queryParams to PluginsDetailsBody and add page param to PluginListCard

* fix(catalog): prevent flicker of content by waiting for fetch details to finish loading

* feat(catalog): add tab icons to PluginDetails page

* feat(catalog): make breadcrumbs in PluginDetailsHeader aware of page queryparam

* fix(catalog): fix deeplinking to PluginDetails by comparing tabs length

* test(catalog): update tests with correct props and wrap in router

(cherry picked from commit 4dc556445c)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-09-28 12:00:49 +02:00
Grot (@grafanabot)
1feb7ce022 Plugins Catalog: Remove notice asking user to refresh browser (#39592) (#39681)
(cherry picked from commit 6eceb69d43)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-09-28 12:00:00 +02:00
Grot (@grafanabot)
2089b58def Loki: Fix creating coontext query for logs with parsed labels (#39648) (#39705)
(cherry picked from commit 79c797c232)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-09-28 11:14:49 +02:00
Grot (@grafanabot)
f3479aad2b Add orientation prop to Gauge panel (#39682) (#39698)
(cherry picked from commit 0bb426ec33)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-09-28 09:51:14 +02:00
Grot (@grafanabot)
6c92beb7fe Variables: Prevents enter key from refreshing page or changing focus (#39666) (#39697)
(cherry picked from commit 9a178e7ba9)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-28 06:41:28 +02:00
Grot (@grafanabot)
06cb288848 Alerting: Move spammy log line to debug in the state manager (#39410) (#39434)
(cherry picked from commit fcbcfd232b)

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-27 15:36:52 +01:00
Grot (@grafanabot)
cac03cc7fe Elasticsearch/Prometheus: Set correct service namespace for SigV4 (#39439) (#39652)
Makes sure to set the SigV4 service namespace for Elasticsearch and Prometheus.

Fixes #38440

(cherry picked from commit 45a844e77e)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-09-27 15:18:35 +02:00
Grot (@grafanabot)
ea57ae7470 Update lockfile to correct output after running yarn install (#39646) (#39651)
* Update lockfile to correct output after running `yarn install`

* Chore: Remove caniuse-db since nothing is using it anymore

(cherry picked from commit bbf64722e4)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-27 15:13:41 +02:00
Grot (@grafanabot)
bbfb211408 Plugins Catalog: update the available panels on install/uninstall (#39293) (#39405)
* feat(Plugins/Admin): add a function to update panels

* fix(Plugins/Admin): update the available panels on plugin install / uninstall

(cherry picked from commit c8e94a2443)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-27 13:50:56 +02:00
Grot (@grafanabot)
07de5e5a5d Bump tmpl from 1.0.4 to 1.0.5 (#39475) (#39644)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 057c9a4fe1)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-27 13:10:02 +02:00
Grot (@grafanabot)
7d9308113a Bump prismjs from 1.24.0 to 1.25.0 (#39450) (#39645)
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.24.0 to 1.25.0.
- [Release notes](https://github.com/PrismJS/prism/releases)
- [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PrismJS/prism/compare/v1.24.0...v1.25.0)

---
updated-dependencies:
- dependency-name: prismjs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 0e60abfe00)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-27 13:09:31 +02:00
Grot (@grafanabot)
5ce3c48c8c InfluxDB: Flux: make $__interval and $__interval_ms work in alerting (#38889) (#39642)
* influxdb: flux: handle $__interval and $__interval_ms in alert-queries

* influxdb: flux: do not handle interval-variable in the frontend

* $__interval should be rounded

* added comment

(cherry picked from commit 9f027e32b7)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-27 12:32:54 +02:00
Grot (@grafanabot)
e90558d3b3 Fix: State timeline panel tooltip error when data is not in sync (#39438) (#39634)
* Fix: State timeline panel tooltip error when data is not in sync

* Move check from tooltip to panel

(cherry picked from commit 24475cfdda)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-09-27 10:15:27 +02:00
Grot (@grafanabot)
e7ca31214b Live: disable centrifuge-js debug mode (#39625) (#39626)
(cherry picked from commit 1d1da09568)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-09-26 20:48:56 -07:00
Grot (@grafanabot)
fee11227da PanelOptions: fix array with siblings (#39620) (#39623)
(cherry picked from commit c9ae46a9ad)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-25 17:58:09 +02:00
Grot (@grafanabot)
258f3eae32 Options: support array value paths for panel options (#39499) (#39596)
(cherry picked from commit 01deae2105)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-23 10:58:14 -07:00
Grot (@grafanabot)
ac1ca2e4b5 Update PageToolbar.tsx (#39572) (#39585)
(cherry picked from commit 0229146c3b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-23 16:02:47 +02:00
Grot (@grafanabot)
1fc22f6e4d BarGauge: Set cell color to off if numeric value is NaN (#39574) (#39580)
* BarGauge: Set cell color to off if numeric value is NaN

* BarGauge: Pull getCellColor out into a pure function and add unit tests

(cherry picked from commit 6948dbe550)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-23 14:59:52 +02:00
Oscar Kilhed
fa6c44b12a Remove ? as header for piechart table legend (#39521) (#39571)
(cherry picked from commit 71122930b9)
2021-09-23 14:21:31 +02:00
Grot (@grafanabot)
53a11de774 Cleanup kv_store alertmanager namespace when disabling unified alerting (#39554) (#39576)
(cherry picked from commit ba4242bdb9)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-09-23 13:53:51 +02:00
Grot (@grafanabot)
4ffa29d959 Fix alerts with evaluation interval more than 30 seconds resolving in Alertmanager (#39513) (#39523)
(cherry picked from commit 27609dc2c5)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2021-09-23 13:06:27 +02:00
Grot (@grafanabot)
22563454b7 Variables: Prevents panel from crashing when using adhoc variable in data links (#39546) (#39568)
* Variables: Prevents panel from crashing when using adhoc variable in data links

* Refactor: uses isAdhoc instead

* Chore: updates after PR feedback

(cherry picked from commit af5296bee7)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-23 12:24:24 +02:00
Grot (@grafanabot)
345fb89699 Dashboard: Short url generation works for variables values with spaces (#39552) (#39567)
(cherry picked from commit 65d79d9a30)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-23 12:20:47 +02:00
Grot (@grafanabot)
5bf35bd49e influxdb: flux: use more precise start and end timestamps (#39415) (#39520)
* influxdb: flux: use more precise start and end timestamps

* added unit test

(cherry picked from commit bf0dc3ef62)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-23 12:13:55 +02:00
Grot (@grafanabot)
aa2dbd63f3 PieChart: Filter NaN values from total calculation (#39503) (#39509)
* Filter NaN values from total calculation

* remove duplicated code, use missing value string for NaN and hidden series

(cherry picked from commit a1d8d6e95e)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-09-23 12:00:36 +02:00
Grot (@grafanabot)
4d1969c9c4 Alerting: fix the migrated silence file content (#39557) (#39564)
(cherry picked from commit 81e82ebbbd)

Co-authored-by: Sofia Papagiannaki <papagian@users.noreply.github.com>
2021-09-23 11:49:22 +02:00
Grot (@grafanabot)
5003b911e2 VersionHistory: Remove global scss causing conflicts elsewhere (#39437) (#39560)
(cherry picked from commit 4aed940738)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-09-23 11:24:55 +02:00
Grot (@grafanabot)
ef7a2bda39 PieChart: Fix sorting for null values in piechart (#39516) (#39556)
* Fix sorting for null values in piechart

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
(cherry picked from commit 4a6e354497)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2021-09-23 11:10:24 +02:00
Grot (@grafanabot)
1b8255e317 A11y: Fix fastpass issues for /admin/* pages (#39435) (#39535)
* A11y: Fix fastpass issues for /admin/* pages
See #39429

(cherry picked from commit 00dad0f4e8)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-09-22 23:35:05 +01:00
Grot (@grafanabot)
d343d2242d CloudMonitoring: Fix INT64 label unmarshal error (#39441) (#39528)
(cherry picked from commit f76a11c955)

Co-authored-by: Benedikt Spellmeyer <b.spellmeyer@googlemail.com>
2021-09-22 17:42:15 +02:00
Ashley Harrison
a0fe59adef Chore(Navigation): Rename SideMenu -> NavBar (#39483) (#39525)
(cherry picked from commit a4d41d35d0)
2021-09-22 15:38:20 +01:00
Grot (@grafanabot)
04900c63f0 Plugins Catalog: add a few more tests (#39433) (#39470)
* refactor(Plugins/Admin): add an extra line-break between tests

* test(Plugins/Admin): add a couple of more tests for Plugin Details

* fix(Plugins/Admin): fix accidental linting issue

(cherry picked from commit 660afc6279)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-22 13:46:22 +02:00
Grot (@grafanabot)
e4862a64f7 Explore: prevent eplore from hiding errors containing refId (#39504) (#39508)
* Explore: prevent eplore from hiding errors containing refId

* Update public/app/features/explore/ResponseErrorContainer.tsx

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
(cherry picked from commit 5f48d0641b)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-09-22 11:59:38 +02:00
Grot (@grafanabot)
036db0f9d0 Plugins Catalog: add unit tests for data-munging (#39338) (#39432)
* test(Plugins/Admin): add tests for the helper functions

* chore(Plugins/Admin): add `error` field to the CatalogPlugin mock

* test(Plugins/Admin): add new properties `error` & `isDisabled` to test expectations

* refactor(Plugins/Admin): make the `errors` param optional everywhere

* fix(Plugins/Admin): fix a rebase bug

(cherry picked from commit fef8e646ea)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-22 11:06:07 +02:00
Grot (@grafanabot)
9b9b7e5a45 CloudWatch: Add AWS Gateway ELB metrics and dimensions (#39490) (#39502)
(cherry picked from commit dfb8a4cd13)

Co-authored-by: Ilya Stoliar <52413756+ilyastoli@users.noreply.github.com>
2021-09-22 10:41:48 +02:00
Grot (@grafanabot)
793cd39af3 [v8.2.x] docs: removed nonsense line from standard-options.md (#39383)
* docs: removed nonsense line from standard-options.md (#39381)

(cherry picked from commit 85391c59d0)

* Added extra space.

* Removed space.

Co-authored-by: Nick Reilingh <nreiling@bard.edu>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
2021-09-21 10:17:34 -04:00
Grot (@grafanabot)
f5be918e49 Use sdk pkg for gtime (#39354) (#39468)
(cherry picked from commit 64c8d32fe7)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-09-21 13:41:31 +02:00
Grot (@grafanabot)
698c13482a Fix Query Editor Row horizontal overflow (#39419) (#39460)
(cherry picked from commit 42b1fa0f62)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-09-21 12:18:24 +01:00
Grot (@grafanabot)
88ea42ab9c Chore: Add go-redis v8 dependency (#39442) (#39448)
* adds redis v8 client dependency

* remove go-redis v5 dependency

(cherry picked from commit 1781c8ec7d)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2021-09-20 22:52:18 +02:00
Grot (@grafanabot)
9ae43a7aaa Schema: unify bar/point/etc visibility modes (#39378) (#39446)
(cherry picked from commit ad3c7529b0)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-20 21:52:52 +02:00
Grot (@grafanabot)
ee7c12592d Live: show popup if local changes exist (#36093) (#39440)
* change tracker

* not needed

(cherry picked from commit a6fbb8d724)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-09-20 18:54:51 +02:00
Grot (@grafanabot)
17a5142901 Plugins Catalog: Fix a11y issues (#39407) (#39416)
* refactor(catalog): fix a11y issues in Browse and PluginListCard

* test(catalog): fix failing PluginListCard tests

(cherry picked from commit 4a11d0dab9)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-09-20 15:48:28 +02:00
Grot (@grafanabot)
9e825719f6 prometheus: monaco: do not recalculate not-changing function-list (#39406) (#39413)
(cherry picked from commit dc61edc8ac)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-20 14:03:28 +02:00
Grot (@grafanabot)
10c44b4f8d Alerting: Move the unified alerting settings to its own struct (#39350) (#39400)
(cherry picked from commit 2ad82b9354)

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-20 11:02:07 +01:00
Grot (@grafanabot)
395730e2f7 Publishing packages: Add grafana/schema (#39317) (#39325)
(cherry picked from commit 5eb46281a4)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-09-20 11:11:53 +02:00
Grot (@grafanabot)
c418e75fcf A11y/Menu: Add keyboard support to Menu component (#38974) (#39403)
(cherry picked from commit d5b885f958)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-09-20 09:37:22 +01:00
Grot (@grafanabot)
56db5cc071 Plugins Catalog: show a confirmation modal when uninstalling a plugin (#39244) (#39402)
* feat(Plugins/Admin): show a confirmation modal when uninstalling a plugin

* refactor(Plugins/Admin): use a helper function for showing/hiding the modal

* test(Plugins/Admin): test if the modal disappears after an uninstall

(cherry picked from commit 02f9564607)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-09-20 10:14:11 +02:00
Grot (@grafanabot)
e272e239d0 Explore: Fixed default data source loading (#37059) (#39379)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
(cherry picked from commit 64f898c5f6)

Co-authored-by: Assaf Dayan <asfdyn@gmail.com>
2021-09-20 10:11:51 +02:00
Grot (@grafanabot)
972ec9cf85 Variables: Prevents unnecessary duplicate requests (#39394) (#39401)
(cherry picked from commit e696a9ab42)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-09-20 09:55:25 +02:00
Grot (@grafanabot)
635e489a59 ConfirmModal: Fix confirm button focus on modal open (#39328) (#39397)
(cherry picked from commit 06012a8da0)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-09-20 09:45:43 +02:00
Grot (@grafanabot)
333c1da5c7 PluginsCatalog: adding error information about disabled plugins. (#39171) (#39399)
* added errors in plugin list.

* added error to details page.

* adding badge on details page.

* added some more tests.

* Renamed to disabled and will handle the scenario in the plugin catalog.

* Update public/app/features/plugins/admin/components/PluginDetailsDisabledError.tsx

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>

* fixing some nits

* added missing isDisabeld to the mock.

* adding tests to verify scenarios when plugin is disabled.

* fixed issue with formatting after file changed on GH.

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
(cherry picked from commit f3002931f4)

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-09-20 09:43:24 +02:00
Grot (@grafanabot)
cea17c7e49 ValueMappings: Value mapping and specifying only color should not affect value formatting (decimals, unit, etc) (#39315) (#39398)
(cherry picked from commit a899e9be10)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-09-20 09:40:42 +02:00
Grot (@grafanabot)
704ba385aa Make "dist" version of dashboard scuemata directly importable in CUE (#39251) (#39372)
* Update embeds with new paths, remove deprefixing

* Add dist dashboard scuemata, in CUE

Also add tests that ensure all panel plugins with models.cue are
imported by this file, so that we can't go out of sync.

* Remove comment detritus

* Check error return

* Remove hardcoded path prefix from cli validator

(cherry picked from commit 39f2ee7692)

Co-authored-by: sam boyer <sam.boyer@grafana.com>
2021-09-17 17:14:36 -04:00
Grot (@grafanabot)
b21ba77c4f GraphNG: uPlot 1.6.16 (#39260) (#39367)
(cherry picked from commit 474461ba15)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-09-17 15:16:36 -05:00
Grot (@grafanabot)
3a002da406 Pipeline: Make Pa11y ci not mandatory on PR stage (#39285) (#39368)
(cherry picked from commit ef36bbbfbd)

Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-09-17 13:59:10 -05:00
Grot (@grafanabot)
6f52226c66 Alerting: Metrics should have the label org instead of user (#39353) (#39365)
An user within Grafana has a completely different meaning. Multi-tenancy is done via Organizations as a top-level concept.

(cherry picked from commit 35e5bfce40)

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-17 18:52:54 +02:00
Grot (@grafanabot)
ab5ec6e838 namespace should be AWS/Rekognition (#39094) (#39360)
(cherry picked from commit 7d873fa795)

Co-authored-by: Sumit Bopche <sumitbopche01@gmail.com>
2021-09-17 17:52:49 +02:00
Grot (@grafanabot)
71b0ae9094 BarChart: Fix field enumeration for bar value display and legend items (#39308) (#39357)
(cherry picked from commit 29e8728ef0)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-09-17 17:23:38 +02:00
Grot (@grafanabot)
3b1abd4bd3 prometheus: monaco-query-field: fix metrics-list (#39347) (#39349)
(cherry picked from commit 73873f99cd)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-17 15:28:35 +02:00
Andres Martinez Gotor
13b8b7721b backport #39322 (#39344) 2021-09-17 15:22:48 +02:00
Grot (@grafanabot)
8a369feb63 Alerting: Support Unified Alerting with Grafana HA (#37920) (#39342)
* Alerting: Support Unified Alerting in Grafana's HA mode.

(cherry picked from commit 7db97097c9)

Co-authored-by: gotjosh <josue@grafana.com>
2021-09-17 13:23:51 +01:00
Grot (@grafanabot)
499b1f4ff2 influxdb: influxql: more robust resultformat-handling (#39330) (#39339)
(cherry picked from commit d116b2d71b)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-17 13:06:44 +02:00
Andres Martinez Gotor
8fcfc4d87e merge main (#39318)
Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2021-09-17 11:23:50 +02:00
Grot (@grafanabot)
c05f195de5 prometheus: monaco: handle multiple query fields at the same time (#39286) (#39320)
(cherry picked from commit 8489575c84)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-17 10:24:18 +02:00
Grot (@grafanabot)
49bec6ce4f prometheus: query-editor: better duration-completions (#39284) (#39314)
(cherry picked from commit f8de33da8d)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-09-17 09:41:16 +02:00
Grot (@grafanabot)
d8b03490c3 "Release: Updated versions in package to 8.2.0-beta.1" (#39281) 2021-09-16 11:32:27 +02:00
888 changed files with 27329 additions and 6512 deletions

View File

@@ -2,13 +2,13 @@
This is directory which stores Go modules with pinned buildable package that is used within this repository, managed by https://github.com/bwplotka/bingo.
- Run `bingo get` to install all tools having each own module file in this directory.
- Run `bingo get <tool>` to install <tool> that have own module file in this directory.
- For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use $(<upper case tool name>) variable where <tool> is the .bingo/<tool>.mod.
- For shell: Run `source .bingo/variables.env` to source all environment variable for each tool.
- For go: Import `.bingo/variables.go` to for variable names.
- See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.
* Run `bingo get` to install all tools having each own module file in this directory.
* Run `bingo get <tool>` to install <tool> that have own module file in this directory.
* For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use $(<upper case tool name>) variable where <tool> is the .bingo/<tool>.mod.
* For shell: Run `source .bingo/variables.env` to source all environment variable for each tool.
* For go: Import `.bingo/variables.go` to for variable names.
* See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.
## Requirements
- Go 1.14+
* Go 1.14+

View File

@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.4.3. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
GOPATH ?= $(shell go env GOPATH)
@@ -7,16 +7,22 @@ GO ?= $(shell which go)
# Below generated variables ensure that every time a tool under each variable is invoked, the correct version
# will be used; reinstalling only if needed.
# For example for wire variable:
# For example for drone variable:
#
# In your main Makefile (for non array binaries):
#
#include .bingo/Variables.mk # Assuming -dir was set to .bingo .
#
#command: $(WIRE)
# @echo "Running wire"
# @$(WIRE) <flags/args..>
#command: $(DRONE)
# @echo "Running drone"
# @$(DRONE) <flags/args..>
#
DRONE := $(GOBIN)/drone-v1.2.4
$(DRONE): $(BINGO_DIR)/drone.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/drone-v1.2.4"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.2.4 "github.com/drone/drone-cli/drone"
WIRE := $(GOBIN)/wire-v0.5.0
$(WIRE): $(BINGO_DIR)/wire.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.

7
.bingo/drone.mod Normal file
View File

@@ -0,0 +1,7 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
replace github.com/docker/docker => github.com/docker/engine v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+incompatible
require github.com/drone/drone-cli v1.2.4 // drone

View File

@@ -1,4 +1,4 @@
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.4.3. DO NOT EDIT.
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
# All tools are designed to be build inside $GOBIN.
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
GOBIN=${GOBIN:=$(go env GOBIN)}
@@ -8,5 +8,7 @@ if [ -z "$GOBIN" ]; then
fi
DRONE="${GOBIN}/drone-v1.2.4"
WIRE="${GOBIN}/wire-v0.5.0"

File diff suppressed because it is too large Load Diff

View File

@@ -1,44 +0,0 @@
name: publish_docs
on:
push:
branches:
- main
paths:
- 'docs/sources/**'
- 'packages/grafana-*/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
- uses: actions/cache@v2.1.6
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: generate-packages-docs
uses: actions/setup-node@v2.1.5
id: generate-docs
with:
node-version: '14'
- run: yarn install --pure-lockfile --no-progress
- run: ./scripts/ci-reference-docs-build.sh
- name: publish-to-git
uses: ./.github/actions/website-sync
id: publish
with:
repository: grafana/website
branch: master
host: github.com
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
source_folder: docs/sources
target_folder: content/docs/grafana/next
allow_no_changes: 'true'
- shell: bash
run: |
test -n "${{ steps.publish.outputs.commit_hash }}"
test -n "${{ steps.publish.outputs.working_directory }}"

View File

@@ -16,7 +16,7 @@ var config = {
"click element button[aria-label='Login button']",
"wait for element [aria-label='Skip change password button'] to be visible",
],
threshold: 2,
threshold: 3,
},
{
url: '${HOST}/?orgId=1',

View File

@@ -1,3 +1,304 @@
<!-- 8.2.5 START -->
# 8.2.5 (2021-11-18)
### Bug fixes
- **Alerting:** Fix a bug where the metric in the evaluation string was not correctly populated. [#41731](https://github.com/grafana/grafana/pull/41731), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Alerting:** Fix no data behaviour in Legacy Alerting for alert rules using the AND operator. [#41305](https://github.com/grafana/grafana/pull/41305), [@gerobinson](https://github.com/gerobinson)
- **CloudMonitoring:** Ignore min and max aggregation in MQL queries. [#41302](https://github.com/grafana/grafana/pull/41302), [@sunker](https://github.com/sunker)
- **Dashboards:** 'Copy' is no longer added to new dashboard titles. [#41344](https://github.com/grafana/grafana/pull/41344), [@joshhunt](https://github.com/joshhunt)
- **DataProxy:** Fix overriding response body when response is a WebSocket upgrade. [#41364](https://github.com/grafana/grafana/pull/41364), [@marefr](https://github.com/marefr)
- **Elasticsearch:** Use field configured in query editor as field for date_histogram aggregations. [#41258](https://github.com/grafana/grafana/pull/41258), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Fix running queries without a datasource property set. [#40805](https://github.com/grafana/grafana/pull/40805), [@Elfo404](https://github.com/Elfo404)
- **InfluxDB:** Fix numeric aliases in queries. [#41531](https://github.com/grafana/grafana/pull/41531), [@gabor](https://github.com/gabor)
- **Plugins:** Ensure consistent plugin settings list response. [#41346](https://github.com/grafana/grafana/pull/41346), [@wbrowne](https://github.com/wbrowne)
- **Tempo:** Fix validation of float durations. [#41400](https://github.com/grafana/grafana/pull/41400), [@ivanahuckova](https://github.com/ivanahuckova)
- **Tracing:** Correct tags for each span are shown. [#41473](https://github.com/grafana/grafana/pull/41473), [@ivanahuckova](https://github.com/ivanahuckova)
### Breaking changes
### Fix No Data behaviour in Legacy Alerting
In Grafana 8.2.5 and later, this change fixes a bug in the evaluation of alert rules when using the AND operator to compare two or more conditions. In Grafana 8.2.4 and earlier such alert rules would evaluate to `OK` if at least one, but not all, conditions returned no data. This change fixes that bug such that in Grafana 8.2.5 these alert rules now evaluate to `No Data`.
If an alert should evaluate to `OK` when one or all conditions return `No Data` then this can be done via changing `If no data or all values are null` to `OK`. However, this will not preserve the old behaviour in 8.2.4 where an alert will be `OK` if at least one, but not all, conditions return no data and then `No Data` if all conditions return `No Data`. Issue [#41305](https://github.com/grafana/grafana/issues/41305)
<!-- 8.2.5 END -->
<!-- 8.2.4 START -->
# 8.2.4 (2021-11-15)
- **Security**: Fixes CVE-2021-41244. For more information, see our [blog](https://grafana.com/blog/2021/11/15/grafana-8.2.4-released-with-security-fixes/)
<!-- 8.2.4 END -->
<!-- 8.2.3 START -->
# 8.2.3 (2021-11-03)
- **Security**: Fixes CVE-2021-41174. For more information, see our [blog](https://grafana.com/blog/2021/11/03/grafana-8.2.3-released-with-medium-severity-security-fix-cve-2021-41174-grafana-xss/)
<!-- 8.2.3 END -->
<!-- 8.2.2 START -->
# 8.2.2 (2021-10-21)
### Features and enhancements
- **Annotations:** We have improved tag search performance. [#40567](https://github.com/grafana/grafana/pull/40567), [@ashharrison90](https://github.com/ashharrison90)
- **Application:** You can now configure an error-template title. [#40310](https://github.com/grafana/grafana/pull/40310), [@benrubson](https://github.com/benrubson)
- **AzureMonitor:** We removed a restriction from the resource filter query. [#40690](https://github.com/grafana/grafana/pull/40690), [@andresmgot](https://github.com/andresmgot)
- **Caching:** Make cache size metric collection optional. (Enterprise)
- **Packaging:** We removed the ProcSubset option in systemd. This option prevented Grafana from starting in LXC environments. [#40339](https://github.com/grafana/grafana/pull/40339), [@kminehart](https://github.com/kminehart)
- **Prometheus:** We removed the autocomplete limit for metrics. [#39363](https://github.com/grafana/grafana/pull/39363), [@ivanahuckova](https://github.com/ivanahuckova)
- **Request interceptor:** Allow MSSQL's named instances. (Enterprise)
- **Table:** We improved the styling of the type icons to make them more distinct from column / field name. [#40596](https://github.com/grafana/grafana/pull/40596), [@torkelo](https://github.com/torkelo)
- **ValueMappings:** You can now use value mapping in stat, gauge, bar gauge, and pie chart visualizations. [#40612](https://github.com/grafana/grafana/pull/40612), [@torkelo](https://github.com/torkelo)
### Bug fixes
- **Alerting:** Fix panic when Slack's API sends unexpected response. [#40721](https://github.com/grafana/grafana/pull/40721), [@santihernandezc](https://github.com/santihernandezc)
- **Alerting:** The Create Alert button now appears on the dashboard panel when you are working with a default datasource. [#40334](https://github.com/grafana/grafana/pull/40334), [@domasx2](https://github.com/domasx2)
- **Explore:** We fixed the problem where the Explore log panel disappears when an Elasticsearch logs query returns no results. [#40217](https://github.com/grafana/grafana/pull/40217), [@Elfo404](https://github.com/Elfo404)
- **Graph:** You can now see annotation descriptions on hover. [#40581](https://github.com/grafana/grafana/pull/40581), [@axelavargas](https://github.com/axelavargas)
- **Logs:** The system now uses the JSON parser only if the line is parsed to an object. [#40507](https://github.com/grafana/grafana/pull/40507), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus:** We fixed the issue where the system did not reuse TCP connections when querying from Grafana alerting. [#40349](https://github.com/grafana/grafana/pull/40349), [@kminehart](https://github.com/kminehart)
- **Prometheus:** We fixed the problem that resulted in an error when a user created a query with a $\_\_interval min step. [#40525](https://github.com/grafana/grafana/pull/40525), [@ivanahuckova](https://github.com/ivanahuckova)
- **RowsToFields:** We fixed the issue where the system was not properly interpreting number values. [#40580](https://github.com/grafana/grafana/pull/40580), [@torkelo](https://github.com/torkelo)
- **Scale:** We fixed how the system handles NaN percent when data min = data max. [#40622](https://github.com/grafana/grafana/pull/40622), [@torkelo](https://github.com/torkelo)
- **Table panel:** You can now create a filter that includes special characters. [#40458](https://github.com/grafana/grafana/pull/40458), [@dprokop](https://github.com/dprokop)
<!-- 8.2.2 END -->
<!-- 8.2.1 START -->
# 8.2.1 (2021-10-11)
### Bug fixes
- **Dashboard:** Fix rendering of repeating panels. [#39991](https://github.com/grafana/grafana/pull/39991), [@hugohaggmark](https://github.com/hugohaggmark)
- **Datasources:** Fix deletion of data source if plugin is not found. [#40095](https://github.com/grafana/grafana/pull/40095), [@jackw](https://github.com/jackw)
- **Packaging:** Remove systemcallfilters sections from systemd unit files. [#40176](https://github.com/grafana/grafana/pull/40176), [@kminehart](https://github.com/kminehart)
- **Prometheus:** Add Headers to HTTP client options. [#40214](https://github.com/grafana/grafana/pull/40214), [@dsotirakis](https://github.com/dsotirakis)
<!-- 8.2.1 END -->
<!-- 8.2.0 START -->
# 8.2.0 (2021-10-07)
### Features and enhancements
- **AWS:** Updated AWS authentication documentation. [#39236](https://github.com/grafana/grafana/pull/39236), [@sunker](https://github.com/sunker)
- **Alerting:** Added support Alertmanager data source for upstream Prometheus AM implementation. [#39775](https://github.com/grafana/grafana/pull/39775), [@domasx2](https://github.com/domasx2)
- **Alerting:** Allows more characters in label names so notifications are sent. [#38629](https://github.com/grafana/grafana/pull/38629), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Get alert rules for a dashboard or a panel using /api/v1/rules endpoints. [#39476](https://github.com/grafana/grafana/pull/39476), [@gerobinson](https://github.com/gerobinson)
- **Annotations:** Improved rendering performance of event markers. [#39984](https://github.com/grafana/grafana/pull/39984), [@torkelo](https://github.com/torkelo)
- **CloudWatch Logs:** Skip caching for log queries. [#39860](https://github.com/grafana/grafana/pull/39860), [@aocenas](https://github.com/aocenas)
- **Explore:** Added an opt-in configuration for Node Graph in Jaeger, Zipkin, and Tempo. [#39958](https://github.com/grafana/grafana/pull/39958), [@connorlindsey](https://github.com/connorlindsey)
- **Packaging:** Add stricter systemd unit options. [#38109](https://github.com/grafana/grafana/pull/38109), [@erdnaxe](https://github.com/erdnaxe)
- **Prometheus:** Metrics browser can now handle label values with special characters. [#39713](https://github.com/grafana/grafana/pull/39713), [@gabor](https://github.com/gabor)
### Bug fixes
- **CodeEditor:** Ensure that we trigger the latest onSave callback provided to the component. [#39835](https://github.com/grafana/grafana/pull/39835), [@mckn](https://github.com/mckn)
- **DashboardList/AlertList:** Fix for missing All folder value. [#39772](https://github.com/grafana/grafana/pull/39772), [@hugohaggmark](https://github.com/hugohaggmark)
### Breaking changes
#### Potential failure to start in Ubuntu 18.04 / Debian 9 / CentOS
- In Grafana v8.2.0, this change can prevent the `grafana-server` service from starting on older versions of systemd, present on Ubuntu 18.04 and slightly older versions of Debian. If running one of those versions, please wait until v8.2.1 is released before upgrading. If you still want to upgrade or have already ugpraded, a simple fix is available here: https://github.com/grafana/grafana/issues/40162#issuecomment-938060240 Issue [#38109](https://github.com/grafana/grafana/issues/38109)
### Plugin development fixes & changes
- **Plugins:** Create a mock icon component to prevent console errors. [#39901](https://github.com/grafana/grafana/pull/39901), [@jackw](https://github.com/jackw)
<!-- 8.2.0 END -->
<!-- 8.2.0-beta2 START -->
# 8.2.0-beta2 (2021-09-30)
### Features and enhancements
- **AccessControl:** Document new permissions restricting data source access. [#39091](https://github.com/grafana/grafana/pull/39091), [@gamab](https://github.com/gamab)
- **TimePicker:** Add fiscal years and search to time picker. [#39073](https://github.com/grafana/grafana/pull/39073), [@oscarkilhed](https://github.com/oscarkilhed)
- **Alerting:** Added support for Unified Alerting with Grafana HA. [#37920](https://github.com/grafana/grafana/pull/37920), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Added support for tune rule evaluation using configuration options. [#35623](https://github.com/grafana/grafana/pull/35623), [@papagian](https://github.com/papagian)
- **Alerting:** Cleanups alertmanager namespace from key-value store when disabling Grafana 8 alerts. [#39554](https://github.com/grafana/grafana/pull/39554), [@papagian](https://github.com/papagian)
- **Alerting:** Remove `ngalert` feature toggle and introduce two new settings for enabling Grafana 8 alerts and disabling them for specific organisations. [#38746](https://github.com/grafana/grafana/pull/38746), [@papagian](https://github.com/papagian)
- **CloudWatch:** Introduced new math expression where it is necessary to specify the period field. [#39458](https://github.com/grafana/grafana/pull/39458), [@sunker](https://github.com/sunker)
- **InfluxDB:** Added support for $\_\_interval and $\_\_interval_ms in Flux queries for alerting. [#38889](https://github.com/grafana/grafana/pull/38889), [@gabor](https://github.com/gabor)
- **InfluxDB:** Flux queries can use more precise start and end timestamps with nanosecond-precision. [#39415](https://github.com/grafana/grafana/pull/39415), [@gabor](https://github.com/gabor)
- **Plugins Catalog:** Make the catalog the default way to interact with plugins. [#39779](https://github.com/grafana/grafana/pull/39779), [@leventebalogh](https://github.com/leventebalogh)
- **Prometheus:** Removed autocomplete limit for metrics. [#39363](https://github.com/grafana/grafana/pull/39363), [@ivanahuckova](https://github.com/ivanahuckova)
### Bug fixes
- **Alerting:** Fixed an issue where the edit page crashes if you tried to preview an alert without a condition set. [#39659](https://github.com/grafana/grafana/pull/39659), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Fixed rules migration to keep existing Grafana 8 alert rules. [#39541](https://github.com/grafana/grafana/pull/39541), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Fixed the silence file content generated during migration. [#39557](https://github.com/grafana/grafana/pull/39557), [@papagian](https://github.com/papagian)
- **Analytics:** Fixed an issue related to interaction event propagation in Azure Application Insights. [#39752](https://github.com/grafana/grafana/pull/39752), [@sunker](https://github.com/sunker)
- **BarGauge:** Fixed an issue where the cell color was lit even though there was no data. [#39574](https://github.com/grafana/grafana/pull/39574), [@ashharrison90](https://github.com/ashharrison90)
- **BarGauge:** Improved handling of streaming data. [#39737](https://github.com/grafana/grafana/pull/39737), [@ashharrison90](https://github.com/ashharrison90)
- **CloudMonitoring:** Fixed INT64 label unmarshal error. [#39441](https://github.com/grafana/grafana/pull/39441), [@bspellmeyer](https://github.com/bspellmeyer)
- **ConfirmModal:** Fixes confirm button focus on modal open. [#39328](https://github.com/grafana/grafana/pull/39328), [@torkelo](https://github.com/torkelo)
- **Dashboard:** Add option to generate short URL for variables with values containing spaces. [#39552](https://github.com/grafana/grafana/pull/39552), [@hugohaggmark](https://github.com/hugohaggmark)
- **Explore:** No longer hides errors containing refId property. [#39504](https://github.com/grafana/grafana/pull/39504), [@Elfo404](https://github.com/Elfo404)
- Fixed an issue that produced State timeline panel tooltip error when data was not in sync. [#39438](https://github.com/grafana/grafana/pull/39438), [@zoltanbedi](https://github.com/zoltanbedi)
- **InfluxDB:** InfluxQL query editor is set to always use resultFormat. [#39330](https://github.com/grafana/grafana/pull/39330), [@gabor](https://github.com/gabor)
- **Loki:** Fixed creating context query for logs with parsed labels. [#39648](https://github.com/grafana/grafana/pull/39648), [@ivanahuckova](https://github.com/ivanahuckova)
- **PageToolbar:** Fixed alignment of titles. [#39572](https://github.com/grafana/grafana/pull/39572), [@ashharrison90](https://github.com/ashharrison90)
- **Plugins Catalog:** Update to the list of available panels after an install, update or uninstall. [#39293](https://github.com/grafana/grafana/pull/39293), [@leventebalogh](https://github.com/leventebalogh)
- **TimeSeries:** Fixed an issue where the shared cursor was not showing when hovering over in old Graph panel. [#39738](https://github.com/grafana/grafana/pull/39738), [@zoltanbedi](https://github.com/zoltanbedi)
- **Variables:** Fixed issues related to change of focus or refresh pages when pressing enter in a text box variable input. [#39666](https://github.com/grafana/grafana/pull/39666), [@hugohaggmark](https://github.com/hugohaggmark)
- **Variables:** Panel no longer crash when using the adhoc variable in data links. [#39546](https://github.com/grafana/grafana/pull/39546), [@hugohaggmark](https://github.com/hugohaggmark)
### Breaking changes
Grafana v8.2.0-beta1 caused data loss for users having enabled `ngalert` in 8.0.x - 8.1.x and created alerts using the new alerting system. This issue is now fixed except if the deployment has multiple organizations and the feature flag was enabled in the previous version (8.0.x - 8.1.x).
In this scenario (upgrade from 8.0.x - 8.1.x with multiple organizations and `ngalert` enabled to 8.2.0-beta2), the migration will assign existing notification policies and contact points to the first organization and then apply the default alertmanager configuration to all organizations. This will effectively reset notification policies for _all_ organizations. Issue [#39541](https://github.com/grafana/grafana/issues/39541)
### Deprecations
`ngalert` feature toggle it has been deprecated it will be removed in a future release. To enable Grafana 8 alerts, modify your configuration and:
- in the `unified_alerting` section set the `enabled` property to `true`
- in the `alerting` section set the `enabled` property to `false` Issue [#38746](https://github.com/grafana/grafana/issues/38746)
<!-- 8.2.0-beta2 END -->
<!-- 8.2.0-beta1 START -->
# 8.2.0-beta1 (2021-09-16)
### Features and enhancements
- **AccessControl:** Introduce new permissions to restrict access for reloading provisioning configuration. [#38906](https://github.com/grafana/grafana/pull/38906), [@vtorosyan](https://github.com/vtorosyan)
- **Alerting:** Add UI to edit Cortex/Loki namespace, group names, and group evaluation interval. [#38543](https://github.com/grafana/grafana/pull/38543), [@domasx2](https://github.com/domasx2)
- **Alerting:** Add a Test button to test contact point. [#37475](https://github.com/grafana/grafana/pull/37475), [@domasx2](https://github.com/domasx2)
- **Alerting:** Allow creating/editing recording rules for Loki and Cortex. [#38064](https://github.com/grafana/grafana/pull/38064), [@domasx2](https://github.com/domasx2)
- **Alerting:** Sort notification channels by name to make them easier to locate. [#37426](https://github.com/grafana/grafana/pull/37426), [@jstangroome](https://github.com/jstangroome)
- **AzureMonitor:** Add data links to deep link to Azure Portal Azure Resource Graph. [#35591](https://github.com/grafana/grafana/pull/35591), [@shuotli](https://github.com/shuotli)
- **AzureMonitor:** Add support for annotations from Azure Monitor Metrics and Azure Resource Graph services. [#37633](https://github.com/grafana/grafana/pull/37633), [@joshhunt](https://github.com/joshhunt)
- **AzureMonitor:** Show error message when subscriptions request fails in ConfigEditor. [#37837](https://github.com/grafana/grafana/pull/37837), [@joshhunt](https://github.com/joshhunt)
- **Chore:** Update to Golang 1.16.7. [#38604](https://github.com/grafana/grafana/pull/38604), [@dsotirakis](https://github.com/dsotirakis)
- **CloudWatch Logs:** Add link to X-Ray data source for trace IDs in logs. [#39135](https://github.com/grafana/grafana/pull/39135), [@aocenas](https://github.com/aocenas)
- **CloudWatch Logs:** Disable query path using websockets (Live) feature. [#39231](https://github.com/grafana/grafana/pull/39231), [@aocenas](https://github.com/aocenas)
- **CloudWatch/Logs:** Don't group dataframes for non time series queries. [#37998](https://github.com/grafana/grafana/pull/37998), [@aocenas](https://github.com/aocenas)
- **Cloudwatch:** Migrate queries that use multiple stats to one query per stat. [#36925](https://github.com/grafana/grafana/pull/36925), [@sunker](https://github.com/sunker)
- **Dashboard:** Keep live timeseries moving left (v2). [#37769](https://github.com/grafana/grafana/pull/37769), [@ryantxu](https://github.com/ryantxu)
- **Datasources:** Introduce `response_limit` for datasource responses. [#38962](https://github.com/grafana/grafana/pull/38962), [@dsotirakis](https://github.com/dsotirakis)
- **Explore:** Add filter by trace or span ID to `trace to logs` feature. [#38943](https://github.com/grafana/grafana/pull/38943), [@connorlindsey](https://github.com/connorlindsey)
- **Explore:** Download traces as JSON in Explore Inspector. [#38614](https://github.com/grafana/grafana/pull/38614), [@connorlindsey](https://github.com/connorlindsey)
- **Explore:** Reuse Dashboard's QueryRows component. [#38942](https://github.com/grafana/grafana/pull/38942), [@Elfo404](https://github.com/Elfo404)
- **Explore:** Support custom display label for derived fields buttons for Loki datasource. [#37273](https://github.com/grafana/grafana/pull/37273), [@connorlindsey](https://github.com/connorlindsey)
- **Grafana UI:** Update monaco-related dependencies. [#39027](https://github.com/grafana/grafana/pull/39027), [@gabor](https://github.com/gabor)
- **Graphite:** Deprecate browser access mode. [#38783](https://github.com/grafana/grafana/pull/38783), [@ifrost](https://github.com/ifrost)
- **InfluxDB:** Improve handling of intervals in alerting. [#37588](https://github.com/grafana/grafana/pull/37588), [@gabor](https://github.com/gabor)
- **InfluxDB:** InfluxQL query editor: Handle unusual characters in tag values better. [#39170](https://github.com/grafana/grafana/pull/39170), [@gabor](https://github.com/gabor)
- **Jaeger:** Add ability to upload JSON file for trace data. [#37205](https://github.com/grafana/grafana/pull/37205), [@zoltanbedi](https://github.com/zoltanbedi)
- **LibraryElements:** Enable specifying UID for new and existing library elements. [#39019](https://github.com/grafana/grafana/pull/39019), [@hugohaggmark](https://github.com/hugohaggmark)
- **LibraryPanels:** Remove library panel icon from the panel header so you can no longer tell that a panel is a library panel from the dashboard view. [#38749](https://github.com/grafana/grafana/pull/38749), [@hugohaggmark](https://github.com/hugohaggmark)
- **Logs panel:** Scroll to the bottom on page refresh when sorting in ascending order. [#37634](https://github.com/grafana/grafana/pull/37634), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Add fuzzy search to label browser. [#36864](https://github.com/grafana/grafana/pull/36864), [@connorlindsey](https://github.com/connorlindsey)
- **Navigation:** Implement active state for items in the Sidemenu. [#39030](https://github.com/grafana/grafana/pull/39030), [@ashharrison90](https://github.com/ashharrison90)
- **Packaging:** Add stricter systemd unit options. [#38109](https://github.com/grafana/grafana/pull/38109), [@erdnaxe](https://github.com/erdnaxe)
- **Packaging:** Update PID file location from `/var/run` to `/run`. [#35739](https://github.com/grafana/grafana/pull/35739), [@MichaIng](https://github.com/MichaIng)
- **Plugins:** Add Hide OAuth Forward config option. [#36306](https://github.com/grafana/grafana/pull/36306), [@wbrowne](https://github.com/wbrowne)
- **Postgres/MySQL/MSSQL:** Add setting to limit the maximum number of rows processed. [#38986](https://github.com/grafana/grafana/pull/38986), [@marefr](https://github.com/marefr)
- **Prometheus:** Add browser access mode deprecation warning. [#37578](https://github.com/grafana/grafana/pull/37578), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus:** Add interpolation for built-in-time variables to backend. [#39051](https://github.com/grafana/grafana/pull/39051), [@ivanahuckova](https://github.com/ivanahuckova)
- **Tempo:** Add ability to upload trace data in JSON format. [#37407](https://github.com/grafana/grafana/pull/37407), [@zoltanbedi](https://github.com/zoltanbedi)
- **TimeSeries/XYChart:** Allow grid lines visibility control in XYChart and TimeSeries panels. [#38502](https://github.com/grafana/grafana/pull/38502), [@dprokop](https://github.com/dprokop)
- **Transformations:** Convert field types to time string number or boolean. [#38517](https://github.com/grafana/grafana/pull/38517), [@nikki-kiga](https://github.com/nikki-kiga)
- **Value mappings:** Add regular-expression based value mapping. [#38931](https://github.com/grafana/grafana/pull/38931), [@mcdee](https://github.com/mcdee)
- **Zipkin:** Add ability to upload trace JSON. [#37483](https://github.com/grafana/grafana/pull/37483), [@zoltanbedi](https://github.com/zoltanbedi)
### Bug fixes
- **Admin:** Prevent user from deleting user's current/active organization. [#38056](https://github.com/grafana/grafana/pull/38056), [@idafurjes](https://github.com/idafurjes)
- **LibraryPanels:** Fix library panel getting saved in the dashboard's folder. [#38978](https://github.com/grafana/grafana/pull/38978), [@hugohaggmark](https://github.com/hugohaggmark)
- **OAuth:** Make generic teams URL and JMES path configurable. [#37233](https://github.com/grafana/grafana/pull/37233), [@djairhogeuens](https://github.com/djairhogeuens)
- **QueryEditor:** Fix broken copy-paste for mouse middle-click (#39117). [#39117](https://github.com/grafana/grafana/pull/39117), [@glintik](https://github.com/glintik)
- **Thresholds:** Fix undefined color in "Add threshold". [#39113](https://github.com/grafana/grafana/pull/39113), [@glintik](https://github.com/glintik)
- **Timeseries:** Add wide-to-long, and fix multi-frame output. [#38670](https://github.com/grafana/grafana/pull/38670), [@ryantxu](https://github.com/ryantxu)
- **TooltipPlugin:** Fix behavior of Shared Crosshair when Tooltip is set to All. [#37285](https://github.com/grafana/grafana/pull/37285), [@nikki-kiga](https://github.com/nikki-kiga)
### Breaking changes
The `monaco-editor` dependency in `grafana-ui` has been updated to a newer version (`0.27.0`), which is not completely backward compatible with the old version (`0.21.2`). The backward incompatible changes are fairly small, but they do exist, so if your code accesses the raw monaco-objects through the `grafana-ui` package, please check the [monaco-editor changelog](https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md) and apply any necessary changes. Issue [#39027](https://github.com/grafana/grafana/issues/39027)
The mandatory `css` prop in `grafana/ui` components has been removed.
Previous versions of `grafana/ui` components were typed incorrectly due to a dependency mismatch between emotion 10 and 11 causing a `css` prop to be added to components that extended react types.
Issue [#38078](https://github.com/grafana/grafana/issues/38078)
Panel queries and/or annotation queries that used more than one statistic will be converted into one query/annotation per statistic. In case an alerting rule was based on a query row that had more than one statistic, it would now be based only on the first statistic for that query row. New alerting rules will not be created for migrated queries. Please note that in most cases it would not make sense to have an alerting rule that is based on multiple statistics anyway. Issue [#36925](https://github.com/grafana/grafana/issues/36925)
### Deprecations
`getHighlighterExpressions` in datasource APIs ( used to highlight logs while editing queries) has been deprecated and will be removed in a future release.
# Deprecation notice
`ExploreQueryFieldProps` interface for query editors has been deprecated and will be removed in a future release. Use `QueryEditorProps` instead. Issue [#38942](https://github.com/grafana/grafana/issues/38942)
### Plugin development fixes & changes
- **Grafana UI:** Fix TS error property `css` is missing in type. [#38078](https://github.com/grafana/grafana/pull/38078), [@jackw](https://github.com/jackw)
<!-- 8.2.0-beta1 END -->
<!-- 8.1.7 START -->
# 8.1.7 (2021-10-06)
### Bug fixes
- **Alerting:** Fix alerts with evaluation interval more than 30 seconds resolving before notification. [#39513](https://github.com/grafana/grafana/pull/39513), [@gerobinson](https://github.com/gerobinson)
- **Elasticsearch/Prometheus:** Fix usage of proper SigV4 service namespace. [#39439](https://github.com/grafana/grafana/pull/39439), [@marefr](https://github.com/marefr)
<!-- 8.1.7 END -->
<!-- 8.1.6 START -->
# 8.1.6 (2021-10-05)
- **Security**: Fixes CVE-2021-39226. For more information, see our [blog](https://grafana.com/blog/2021/10/05/grafana-7.5.11-and-8.1.6-released-with-critical-security-fix/)
<!-- 8.1.6 END -->
<!-- 8.1.5 START -->
# 8.1.5 (2021-09-21)
### Bug fixes
- **BarChart:** Fixes panel error that happens on second refresh. [#39304](https://github.com/grafana/grafana/pull/39304), [@DanCech](https://github.com/DanCech)
<!-- 8.1.5 END -->
<!-- 8.1.4 START -->
# 8.1.4 (2021-09-16)
### Features and enhancements
- **Explore:** Ensure logs volume bar colors match legend colors. [#39072](https://github.com/grafana/grafana/pull/39072), [@ifrost](https://github.com/ifrost)
- **LDAP:** Search all DNs for users. [#38891](https://github.com/grafana/grafana/pull/38891), [@sakjur](https://github.com/sakjur)
### Bug fixes
- **Alerting:** Fix notification channel migration. [#38983](https://github.com/grafana/grafana/pull/38983), [@papagian](https://github.com/papagian)
- **Annotations:** Fix blank panels for queries with unknown data sources. [#39017](https://github.com/grafana/grafana/pull/39017), [@hugohaggmark](https://github.com/hugohaggmark)
- **BarChart:** Fix stale values and x axis labels. [#39188](https://github.com/grafana/grafana/pull/39188), [@leeoniya](https://github.com/leeoniya)
- **Graph:** Make old graph panel thresholds work even if ngalert is enabled. [#38918](https://github.com/grafana/grafana/pull/38918), [@domasx2](https://github.com/domasx2)
- **InfluxDB:** Fix regex to identify `/` as separator. [#39185](https://github.com/grafana/grafana/pull/39185), [@dsotirakis](https://github.com/dsotirakis)
- **LibraryPanels:** Fix update issues related to library panels in rows. [#38963](https://github.com/grafana/grafana/pull/38963), [@hugohaggmark](https://github.com/hugohaggmark)
- **Variables:** Fix variables not updating inside a Panel when the preceding Row uses "Repeat For". [#38935](https://github.com/grafana/grafana/pull/38935), [@axelavargas](https://github.com/axelavargas)
<!-- 8.1.4 END -->
<!-- 8.1.3 START -->
# 8.1.3 (2021-09-08)
@@ -18,6 +319,8 @@
- **Plugins:** Track signed files + add warn log for plugin assets which are not signed. [#38938](https://github.com/grafana/grafana/pull/38938), [@wbrowne](https://github.com/wbrowne)
- **Postgres/MySQL/MSSQL:** Fix region annotations not displayed correctly. [#38936](https://github.com/grafana/grafana/pull/38936), [@marefr](https://github.com/marefr)
- **Prometheus:** Fix validate selector in metrics browser. [#38921](https://github.com/grafana/grafana/pull/38921), [@ivanahuckova](https://github.com/ivanahuckova)
- **Security:** Fix stylesheet injection vulnerability [#38432](https://github.com/grafana/grafana/pull/38432), [@idafurjes](https://github.com/idafurjes). Big thanks to Tobias Hamann and Lauritz Holtmann of usd AG for reporting this issue.
- **Security:** Fix short URL vulnerability [#38436](https://github.com/grafana/grafana/pull/38436), [@idafurjes](https://github.com/idafurjes). Big thanks to Tobias Hamann and Lauritz Holtmann of usd AG for reporting this issue.
<!-- 8.1.3 END -->
<!-- 8.1.2 START -->
@@ -647,6 +950,14 @@ Issue [#33352](https://github.com/grafana/grafana/issues/33352)
<!-- 8.0.0-beta1 END -->
<!-- 7.5.11 START -->
# 7.5.11 (2021-10-05)
- **Security**: Fixes CVE-2021-39226. For more information, see our [blog](https://grafana.com/blog/2021/10/05/grafana-7.5.11-and-8.1.6-released-with-critical-security-fix/)
<!-- 7.5.11 END -->
<!-- 7.5.10 START -->
# 7.5.10 (2021-07-15)

View File

@@ -17,7 +17,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.0-alpine3.14 as go-builder
FROM golang:1.17.3-alpine3.14 as go-builder
RUN apk add --no-cache gcc g++
@@ -35,7 +35,7 @@ RUN go mod verify
RUN go run build.go build
# Final stage
FROM alpine:3.14.2
FROM alpine:3.14.3
LABEL maintainer="Grafana team <hello@grafana.com>"

View File

@@ -17,7 +17,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.0 AS go-builder
FROM golang:1.17.3 AS go-builder
WORKDIR /src/grafana

View File

@@ -151,9 +151,9 @@ clean: ## Clean up intermediate build artifacts.
# Use this make target to regenerate the configuration YAML files when
# you modify starlark files.
drone:
drone starlark
drone lint
drone --server https://drone.grafana.net sign --save grafana/grafana
$(DRONE) starlark convert
$(DRONE) lint
$(DRONE) --server https://drone.grafana.net sign --save grafana/grafana
help: ## Display this help.
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

View File

@@ -211,7 +211,7 @@ rudderstack_data_plane_url =
# Application Insights connection string. Specify an URL string to enable this feature.
application_insights_connection_string =
# Optional. Specifies an Application Insights endpoint URL where the endpoint string is wrapped in backticks ``.
# Optional. Specifies an Application Insights endpoint URL where the endpoint string is wrapped in backticks ``.
application_insights_endpoint_url =
#################################### Security ############################
@@ -731,14 +731,65 @@ global_alert_rule = -1
#################################### Unified Alerting ####################
[unified_alerting]
# Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.
enabled = false
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
disabled_orgs =
# Specify the frequency of polling for admin config changes.
admin_config_poll_interval_seconds = 60
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
admin_config_poll_interval = 60s
# Specify the frequency of polling for Alertmanager config changes.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
alertmanager_config_poll_interval = 60s
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port.
ha_listen_address = "0.0.0.0:9094"
# Explicit address/hostname and port to advertise other Grafana instances. The port is used for both TCP and UDP.
ha_advertise_address = ""
# Comma-separated list of initial instances (in a format of host:port) that will form the HA cluster. Configuring this setting will enable High Availability mode for alerting.
ha_peers = ""
# Time to wait for an instance to send a notification via the Alertmanager. In HA, each Grafana instance will
# be assigned a position (e.g. 0, 1). We then multiply this position with the timeout to indicate how long should
# each instance wait before sending the notification to take into account replication lag.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
ha_peer_timeout = 15s
# The interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated
# across cluster more quickly at the expense of increased bandwidth usage.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
ha_gossip_interval = 200ms
# The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds
# across larger clusters at the expense of increased bandwidth usage.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
ha_push_pull_interval = 60s
# Enable or disable alerting rule execution. The alerting UI remains visible. This option has a legacy version in the `[alerting]` section that takes precedence.
execute_alerts = true
# Alert evaluation timeout when fetching data from the datasource. This option has a legacy version in the `[alerting]` section that takes precedence.
# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
evaluation_timeout = 30s
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence.
max_attempts = 3
# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
min_interval = 10s
#################################### Alerting ############################
[alerting]
# Disable alerting engine & UI features
# Disable legacy alerting engine & UI features
enabled = true
# Makes it possible to turn off alert rule execution but alerting UI is visible
# Makes it possible to turn off alert execution but alerting UI is visible
execute_alerts = true
# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
@@ -914,7 +965,7 @@ app_tls_skip_verify_insecure = false
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
allow_loading_unsigned_plugins =
# Enable or disable installing plugins directly from within Grafana.
plugin_admin_enabled = false
plugin_admin_enabled = true
plugin_admin_external_manage_enabled = false
plugin_catalog_url = https://grafana.com/grafana/plugins/
@@ -983,12 +1034,14 @@ rendering_chrome_bin =
# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
rendering_mode =
# When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
# When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
# and will cluster using browser instances.
# Mode 'context' will cluster using incognito pages.
rendering_clustering_mode =
# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
# When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is '5'.
rendering_clustering_max_concurrency =
# When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
rendering_clustering_timeout =
# Limit the maximum viewport width, height and device scale factor that can be requested.
rendering_viewport_max_width =

View File

@@ -708,14 +708,65 @@
#################################### Unified Alerting ####################
[unified_alerting]
#Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.```
;enabled = false
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
;disabled_orgs =
# Specify the frequency of polling for admin config changes.
;admin_config_poll_interval_seconds = 60
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;admin_config_poll_interval = 60s
# Specify the frequency of polling for Alertmanager config changes.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;alertmanager_config_poll_interval = 60s
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
;ha_listen_address = "0.0.0.0:9094"
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
;ha_advertise_address = ""
# Comma-separated list of initial instances (in a format of host:port) that will form the HA cluster. Configuring this setting will enable High Availability mode for alerting.
;ha_peers = ""
# Time to wait for an instance to send a notification via the Alertmanager. In HA, each Grafana instance will
# be assigned a position (e.g. 0, 1). We then multiply this position with the timeout to indicate how long should
# each instance wait before sending the notification to take into account replication lag.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;ha_peer_timeout = "15s"
# The interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated
# across cluster more quickly at the expense of increased bandwidth usage.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;ha_gossip_interval = "200ms"
# The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds
# across larger clusters at the expense of increased bandwidth usage.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;ha_push_pull_interval = "60s"
# Enable or disable alerting rule execution. The alerting UI remains visible. This option has a legacy version in the `[alerting]` section that takes precedence.
;execute_alerts = true
# Alert evaluation timeout when fetching data from the datasource. This option has a legacy version in the `[alerting]` section that takes precedence.
# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;evaluation_timeout = 30s
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence.
;max_attempts = 3
# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;min_interval = 10s
#################################### Alerting ############################
[alerting]
# Disable alerting engine & UI features
# Disable legacy alerting engine & UI features
;enabled = true
# Makes it possible to turn off alert rule execution but alerting UI is visible
# Makes it possible to turn off alert execution but alerting UI is visible
;execute_alerts = true
# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
@@ -728,7 +779,6 @@
# This limit will protect the server from render overloading and make sure notifications are sent out quickly
;concurrent_render_limit = 5
# Default setting for alert calculation timeout. Default value is 30
;evaluation_timeout_seconds = 30
@@ -956,12 +1006,14 @@
# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
;rendering_mode =
# When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
# When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
# and will cluster using browser instances.
# Mode 'context' will cluster using incognito pages.
;rendering_clustering_mode =
# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
# When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is '5'.
;rendering_clustering_max_concurrency =
# When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
;rendering_clustering_timeout =
# Limit the maximum viewport width, height and device scale factor that can be requested.
;rendering_viewport_max_width =

View File

@@ -76,6 +76,7 @@
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -83,7 +84,7 @@
},
"targets": [
{
"csvContent": "Name,Stat1,Stat2\nStockholm, 10, 15\nNew York, 19, 5\nLondon, 10, 1\nNegative, 15, -5\nLong value, 15,10",
"csvContent": "Time,Name,Stat1,Stat2\n2020-01-01T00:00:00Z,Stockholm, 10, 15\n2020-01-01T00:00:00Z,New York, 19, 5\n2020-01-01T00:00:00Z,London, 10, 1\n2020-01-01T00:00:00Z,Negative, 15, -5\n2020-01-01T00:00:00Z,Long value, 15,10",
"refId": "A",
"scenarioId": "csv_content"
}
@@ -147,6 +148,7 @@
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -216,6 +218,7 @@
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -285,6 +288,7 @@
},
"orientation": "auto",
"showValue": "always",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -353,6 +357,7 @@
},
"orientation": "auto",
"showValue": "auto",
"stacking": "none",
"text": {
"titleSize": 10,
"valueSize": 25
@@ -425,6 +430,7 @@
},
"orientation": "horizontal",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"
@@ -495,6 +501,7 @@
},
"orientation": "horizontal",
"showValue": "auto",
"stacking": "none",
"text": {},
"tooltip": {
"mode": "single"

View File

@@ -0,0 +1 @@
grafana/provisioning/dashboards/alerts/alert-*

View File

@@ -0,0 +1,66 @@
# Grafana Unified Alerting High Availability (HA) test setup
A set of docker compose services which together creates a Grafana HA test setup for unified alerting.
Included services
- Grafana
- Mysql - Grafana configuration database, exporter for metrics and session storage
- Prometheus - Monitoring of Grafana and used as data source
- Nginx - Reverse proxy for Grafana and Prometheus. Enables browsing Grafana/Prometheus UI using a hostname
## Prerequisites
### Build grafana docker container
Build a Grafana docker container from current branch and commit and tag it as grafana/grafana:dev.
```bash
$ cd <grafana repo>
$ make build-docker-full
```
### Virtual host names
#### Alternative 1 - Use dnsmasq
```bash
$ sudo apt-get install dnsmasq
$ echo 'address=/loc/127.0.0.1' | sudo tee /etc/dnsmasq.d/dnsmasq-loc.conf > /dev/null
$ sudo /etc/init.d/dnsmasq restart
$ ping whatever.loc
PING whatever.loc (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.076 ms
--- whatever.loc ping statistics ---
1 packet transmitted, 1 received, 0% packet loss, time 1998ms
```
#### Alternative 2 - Manually update /etc/hosts
Update your `/etc/hosts` to be able to access Grafana and/or Prometheus UI using a hostname.
```bash
$ cat /etc/hosts
127.0.0.1 grafana.loc
127.0.0.1 prometheus.loc
```
## Start services
```bash
$ docker-compose up -d
```
Browse
- http://grafana.loc/
- http://prometheus.loc/
## Test alerting
### Create contact points
TBD
### Create alerts
TBD
### Create silences
TBD

View File

@@ -0,0 +1,90 @@
version: "2.1"
services:
db:
image: mysql:5.6
platform: linux/x86_64
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: grafana
MYSQL_USER: grafana
MYSQL_PASSWORD: password
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb_monitor_enable=all, --max-connections=1001]
ports:
- 3306
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 10s
retries: 10
mysqld-exporter:
image: prom/mysqld-exporter
environment:
- DATA_SOURCE_NAME=root:rootpass@(db:3306)/
ports:
- 9104
depends_on:
db:
condition: service_healthy
prometheus:
image: prom/prometheus:v2.4.2
volumes:
- ./prometheus/:/etc/prometheus/
environment:
- VIRTUAL_HOST=prometheus.loc
ports:
- 909
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
db:
condition: service_healthy
grafana1:
image: grafana/grafana:dev
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
environment:
- VIRTUAL_HOST=grafana.loc
- GF_FEATURE_TOGGLES_ENABLE=ngalert
- GF_UNIFIED_ALERTING_HA_PEERS=ha-test-unified-alerting_grafana2_1:9094,ha-test-unified-alerting_grafana1_1:9094
- GF_SERVER_ROOT_URL=http://grafana.loc
- GF_DATABASE_NAME=grafana
- GF_DATABASE_USER=grafana
- GF_DATABASE_PASSWORD=password
- GF_DATABASE_TYPE=mysql
- GF_DATABASE_HOST=db:3306
- GF_DATABASE_MAX_OPEN_CONN=300
- GF_SESSION_PROVIDER=mysql
- GF_SESSION_PROVIDER_CONFIG=grafana:password@tcp(db:3306)/grafana?allowNativePasswords=true
ports:
- 3010:3000
depends_on:
db:
condition: service_healthy
grafana2:
image: grafana/grafana:dev
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
environment:
- VIRTUAL_HOST=grafana.loc
- GF_FEATURE_TOGGLES_ENABLE=ngalert
- GF_UNIFIED_ALERTING_HA_PEERS=ha-test-unified-alerting_grafana2_1:9094,ha-test-unified-alerting_grafana1_1:9094
- GF_SERVER_ROOT_URL=http://grafana.loc
- GF_DATABASE_NAME=grafana
- GF_DATABASE_USER=grafana
- GF_DATABASE_PASSWORD=password
- GF_DATABASE_TYPE=mysql
- GF_DATABASE_HOST=db:3306
- GF_DATABASE_MAX_OPEN_CONN=300
- GF_SESSION_PROVIDER=mysql
- GF_SESSION_PROVIDER_CONFIG=grafana:password@tcp(db:3306)/grafana?allowNativePasswords=true
ports:
- 3020:3000
depends_on:
db:
condition: service_healthy

View File

@@ -0,0 +1,203 @@
local numAlerts = std.extVar('alerts');
local condition = std.extVar('condition');
local arr = std.range(1, numAlerts);
local alertDashboardTemplate = {
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": null,
"links": [],
"panels": [
{
"alert": {
"conditions": [
{
"evaluator": {
"params": [
65
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
"A",
"5m",
"now"
]
},
"reducer": {
"params": [],
"type": "avg"
},
"type": "query"
}
],
"executionErrorState": "alerting",
"frequency": "10s",
"handler": 1,
"for": "1m",
"name": "bulk alerting",
"noDataState": "no_data",
"notifications": [
{
"id": 2
}
]
},
"aliasColors": {},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fill": 1,
"gridPos": {
"h": 9,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"legend": {
"avg": false,
"current": false,
"max": false,
"min": false,
"show": true,
"total": false,
"values": false
},
"lines": true,
"linewidth": 1,
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"$$hashKey": "object:117",
"expr": "go_goroutines",
"format": "time_series",
"intervalFactor": 1,
"refId": "A"
}
],
"thresholds": [
{
"colorMode": "critical",
"fill": true,
"line": true,
"op": "gt",
"value": 50
}
],
"timeFrom": null,
"timeShift": null,
"title": "Panel Title",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
]
}
],
"schemaVersion": 16,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "New dashboard",
"uid": null,
"version": 0
};
{
['alert-' + std.toString(x) + '.json']:
alertDashboardTemplate + {
panels: [
alertDashboardTemplate.panels[0] +
{
alert+: {
name: 'Alert rule ' + x,
conditions: [
alertDashboardTemplate.panels[0].alert.conditions[0] +
{
evaluator+: {
params: [condition]
}
},
],
},
},
],
uid: 'alert-' + x,
title: 'Alert ' + x
},
for x in arr
}

View File

@@ -0,0 +1,172 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"links": [],
"panels": [
{
"aliasColors": {
"Active alerts": "#bf1b00"
},
"bars": false,
"dashLength": 10,
"dashes": false,
"datasource": "Prometheus",
"fill": 1,
"gridPos": {
"h": 12,
"w": 24,
"x": 0,
"y": 0
},
"id": 2,
"interval": "",
"legend": {
"alignAsTable": true,
"avg": false,
"current": true,
"max": false,
"min": false,
"rightSide": true,
"show": true,
"total": false,
"values": true
},
"lines": true,
"linewidth": 2,
"links": [],
"nullPointMode": "null",
"percentage": false,
"pointradius": 5,
"points": false,
"renderer": "flot",
"seriesOverrides": [
{
"alias": "Active grafana instances",
"dashes": true,
"fill": 0
}
],
"spaceLength": 10,
"stack": false,
"steppedLine": false,
"targets": [
{
"expr": "sum(increase(grafana_alerting_notification_sent_total[1m])) by(job)",
"format": "time_series",
"instant": false,
"interval": "1m",
"intervalFactor": 1,
"legendFormat": "Notifications sent",
"refId": "A"
},
{
"expr": "min(grafana_alerting_active_alerts) without(instance)",
"format": "time_series",
"interval": "1m",
"intervalFactor": 1,
"legendFormat": "Active alerts",
"refId": "B"
},
{
"expr": "count(up{job=\"grafana\"})",
"format": "time_series",
"intervalFactor": 1,
"legendFormat": "Active grafana instances",
"refId": "C"
}
],
"thresholds": [],
"timeFrom": null,
"timeShift": null,
"title": "Notifications sent vs active alerts",
"tooltip": {
"shared": true,
"sort": 0,
"value_type": "individual"
},
"type": "graph",
"xaxis": {
"buckets": null,
"mode": "time",
"name": null,
"show": true,
"values": []
},
"yaxes": [
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": "0",
"show": true
},
{
"format": "short",
"label": null,
"logBase": 1,
"max": null,
"min": null,
"show": true
}
],
"yaxis": {
"align": false,
"alignLevel": 3
}
}
],
"schemaVersion": 16,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-1h",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
],
"time_options": [
"5m",
"15m",
"1h",
"6h",
"12h",
"24h",
"2d",
"7d",
"30d"
]
},
"timezone": "",
"title": "Overview",
"uid": "xHy7-hAik",
"version": 6
}

View File

@@ -0,0 +1,14 @@
apiVersion: 1
providers:
- name: 'Alerts'
folder: 'Alerts'
type: file
options:
path: /etc/grafana/provisioning/dashboards/alerts
- name: 'MySQL'
folder: 'MySQL'
type: file
options:
path: /etc/grafana/provisioning/dashboards/mysql

View File

@@ -0,0 +1,16 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
jsonData:
timeInterval: 10s
queryTimeout: 30s
httpMethod: POST
- name: Loki
type: loki
access: proxy
url: http://loki:3100

View File

@@ -0,0 +1,47 @@
# my global config
global:
scrape_interval: 10s # By default, scrape targets every 15 seconds.
evaluation_interval: 10s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
#rule_files:
# - "alert.rules"
# - "first.rules"
# - "second.rules"
# alerting:
# alertmanagers:
# - scheme: http
# static_configs:
# - targets:
# - "127.0.0.1:9093"
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'grafana'
dns_sd_configs:
- names:
- 'grafana'
type: 'A'
port: 3000
refresh_interval: 10s
- job_name: 'mysql'
dns_sd_configs:
- names:
- 'mysqld-exporter'
type: 'A'
port: 9104
refresh_interval: 10s
- job_name: 'loki'
dns_sd_configs:
- names:
- 'loki'
type: 'A'
port: 3100
refresh_interval: 10s

View File

@@ -16,6 +16,8 @@ To see all settings currently applied to the Grafana server, refer to [View serv
## Config file locations
The default settings for a Grafana instance are stored in the `$WORKING_DIR/conf/defaults.ini` file. _Do not_ change the location in this file.
_Do not_ change `defaults.ini`! Grafana defaults are stored in this file. Depending on your OS, make all configuration changes in either `custom.ini` or `grafana.ini`.
- Default configuration from `$WORKING_DIR/conf/defaults.ini`
@@ -51,9 +53,11 @@ Semicolons (the `;` char) are the standard way to comment out lines in a `.ini`
A common problem is forgetting to uncomment a line in the `custom.ini` (or `grafana.ini`) file which causes the configuration option to be ignored.
## Configure with environment variables
## Override configuration with environment variables
All options in the configuration file can be overridden using environment variables using the syntax:
Do not use environment variables to _add_ new configuration settings. Instead, use environmental variables to _override_ existing options.
To override an option:
```bash
GF_<SectionName>_<KeyName>
@@ -1119,9 +1123,83 @@ Sets a global limit on number of alert rules that can be created. Default is -1
For more information about the Grafana 8 alerts, refer to [Unified Alerting]({{< relref "../alerting/unified-alerting/_index.md" >}}).
### admin_config_poll_interval_seconds
### enabled
Specify the frequency of polling for admin config changes. The default value is `60`.
Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed. The default value is `false`.
Alerting Rules migrated from dashboards and panels will include a link back via the `annotations`.
### disabled_orgs
Comma-separated list of organization IDs for which to disable Grafana 8 Unified Alerting.
### admin_config_poll_interval
Specify the frequency of polling for admin config changes. The default value is `60s`.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### alertmanager_config_poll_interval
Specify the frequency of polling for Alertmanager config changes. The default value is `60s`.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### ha_listen_address
Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
### ha_advertise_address
Explicit address/hostname and port to advertise other Grafana instances. The port is used for both TCP and UDP.
### ha_peers
Comma-separated list of initial instances (in a format of host:port) that will form the HA cluster. Configuring this setting will enable High Availability mode for alerting.
### ha_peer_timeout
Time to wait for an instance to send a notification via the Alertmanager. In HA, each Grafana instance will
be assigned a position (e.g. 0, 1). We then multiply this position with the timeout to indicate how long should
each instance wait before sending the notification to take into account replication lag. The default value is `15s`.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### ha_gossip_interval
The interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated
across cluster more quickly at the expense of increased bandwidth usage. The default value is `200ms`.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### ha_push_pull_interval
The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds
across larger clusters at the expense of increased bandwidth usage. The default value is `60s`.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### execute_alerts
Enable or disable alerting rule execution. The default value is `true`. The alerting UI remains visible. This option has a [legacy version in the alerting section]({{< relref "#execute_alerts-1">}}) that takes precedence.
### evaluation_timeout
Sets the alert evaluation timeout when fetching data from the datasource. The default value is `30s`. This option has a [legacy version in the alerting section]({{< relref "#evaluation_timeout_seconds">}}) that takes precedence.
The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
### max_attempts
Sets a maximum number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. The default value is `3`. This option has a [legacy version in the alerting section]({{< relref "#max_attempts-1">}}) that takes precedence.
### min_interval
Sets the minimum interval to enforce between rule evaluations. The default value is `10s` which equals the scheduler interval. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has [a legacy version in the alerting section]({{< relref "#min_interval_seconds">}}) that takes precedence.
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
> **Note.** This setting has precedence over each individual rule frequency. If a rule frequency is lower than this value, then this value is enforced.
<hr>
@@ -1131,7 +1209,7 @@ For more information about the Alerting feature in Grafana, refer to [Alerts ove
### enabled
Set to `false` to disable alerting engine and hide Alerting in the Grafana UI. Default is `true`.
Set to `false` to [enable Grafana 8 alerting]({{<relref "#unified_alerting">}}) and to disable legacy alerting engine. Default is `true`.
### execute_alerts
@@ -1512,7 +1590,7 @@ We do _not_ recommend using this option. For more information, refer to [Plugin
### plugin_admin_enabled
Available to Grafana administrators only, the plugin admin app is set to `false` by default. Set it to `true` to enable the app.
Available to Grafana administrators only, the plugin admin app is set to `true` by default. Set it to `false` to disable the app.
For more information, refer to [Plugin catalog]({{< relref "../plugins/catalog.md" >}}).
@@ -1583,7 +1661,7 @@ ha_engine_address = 127.0.0.1:6379
## [plugin.grafana-image-renderer]
For more information, refer to [Image rendering]({{< relref "image_rendering.md" >}}).
For more information, refer to [Image rendering]({{< relref "../image-rendering/" >}}).
### rendering_timezone
@@ -1619,7 +1697,7 @@ It can be useful to set this to `true` when troubleshooting.
### rendering_args
Additional arguments to pass to the headless browser instance. Default is --no-sandbox. The list of Chromium flags can be found at (https://peter.sh/experiments/chromium-command-line-switches/). Separate multiple arguments with commas.
Additional arguments to pass to the headless browser instance. Defaults are `--no-sandbox,--disable-gpu`. The list of Chromium flags can be found at (https://peter.sh/experiments/chromium-command-line-switches/). Separate multiple arguments with commas.
### rendering_chrome_bin
@@ -1637,13 +1715,19 @@ Mode `reusable` will have one browser instance and will create a new incognito p
### rendering_clustering_mode
When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is `browser` and will cluster using browser instances.
When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is `browser` and will cluster using browser instances.
Mode `context` will cluster using incognito pages.
### rendering_clustering_max_concurrency
When rendering_mode = clustered you can define the maximum number of browser instances/incognito pages that can execute concurrently.
When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is `5`.
### rendering_clustering_timeout
> **Note**: Available in grafana-image-renderer v3.3.0 and later versions.
When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
### rendering_viewport_max_width
@@ -1677,7 +1761,7 @@ For more information about Grafana Enterprise, refer to [Grafana Enterprise]({{<
### enable
Keys of alpha features to enable, separated by space. Available alpha features are: `ngalert`
Keys of alpha features to enable, separated by space.
## [date_formats]

View File

@@ -10,6 +10,8 @@ weight = 200
If you are running Grafana in a Docker image, then you configure Grafana using [environment variables]({{< relref "../administration/configuration.md#configure-with-environment-variables" >}}) rather than directly editing the configuration file. If you want to save your data, then you also need to designate persistent storage or bind mounts for the Grafana container.
> **Note:** These examples use the Grafana Enterprise docker image. You can use the Grafana Open Source edition by changing the docker image to `grafana/grafana-oss`.
## Save your Grafana data
If you do not designate a location for information storage, then all your Grafana data disappears as soon as you stop your container. To save your data, you need to set up persistent storage or bind mounts for your container.
@@ -21,7 +23,7 @@ If you do not designate a location for information storage, then all your Grafan
docker volume create grafana-storage
# start grafana
docker run -d -p 3000:3000 --name=grafana -v grafana-storage:/var/lib/grafana grafana/grafana
docker run -d -p 3000:3000 --name=grafana -v grafana-storage:/var/lib/grafana grafana/grafana-enterprise
```
### Run Grafana container using bind mounts
@@ -33,7 +35,7 @@ mkdir data # creates a folder for your data
ID=$(id -u) # saves your user id in the ID variable
# starts grafana with your user id and using the data folder
docker run -d --user $ID --volume "$PWD/data:/var/lib/grafana" -p 3000:3000 grafana/grafana:7.2.1
docker run -d --user $ID --volume "$PWD/data:/var/lib/grafana" -p 3000:3000 grafana/grafana-enterprise:8.2.1
```
## Default paths
@@ -57,7 +59,7 @@ Example:
```bash
# Run Grafana while logging to both standard out and /var/log/grafana/grafana.log
docker run -p 3000:3000 -e "GF_LOG_MODE=console file" grafana/grafana
docker run -p 3000:3000 -e "GF_LOG_MODE=console file" grafana/grafana-enterprise
```
## Configure Grafana with Docker Secrets
@@ -83,7 +85,7 @@ docker run -d \
-e "GF_AWS_default_ACCESS_KEY_ID=YOUR_ACCESS_KEY" \
-e "GF_AWS_default_SECRET_ACCESS_KEY=YOUR_SECRET_KEY" \
-e "GF_AWS_default_REGION=us-east-1" \
grafana/grafana
grafana/grafana-enterprise
```
You may also specify multiple profiles to `GF_AWS_PROFILES` (e.g.

View File

@@ -1,212 +0,0 @@
+++
title = "Image rendering"
description = ""
keywords = ["grafana", "image", "rendering", "plugin"]
weight = 300
+++
# Image rendering
Grafana supports automatic rendering of panels as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/old-alerting/notifications.md" >}}).
> **Note:** Image rendering of dashboards is not supported at this time.
While an image is being rendered, the PNG image is temporarily written to the file system. When the image is rendered, the PNG image is temporarily written to the `png` folder in the Grafana `data` folder.
A background job runs every 10 minutes and removes temporary images. You can configure how long an image should be stored before being removed by configuring the [temp-data-lifetime]({{< relref "../administration/configuration/#temp-data-lifetime" >}}) setting.
You can also render a PNG by clicking the dropdown arrow next to a panel title, then clicking **Share > Direct link rendered image**.
## Memory requirements
Minimum free memory recommendation is 16GB on the system doing the rendering.
Rendering images can require a lot of memory, mainly because Grafana creates browser instances in the background for the actual rendering. If multiple images are rendered in parallel, then the rendering has a bigger memory footprint. One advantage of using the remote rendering service is that the rendering will be done on the remote system, so your local system resources will not be affected by rendering.
## Alerting and render limits
Alert notifications can include images, but rendering many images at the same time can overload the server where the renderer is running. For instructions of how to configure this, see [concurrent_render_limit]({{< relref "../administration/configuration/#concurrent_render_limit" >}}).
## Install Grafana Image Renderer plugin
The [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) is a plugin that runs on the backend and handles rendering panels and dashboards as PNG images using headless Chrome.
To install the plugin, refer to the [Grafana Image Renderer Installation instructions](https://grafana.com/grafana/plugins/grafana-image-renderer/?tab=installation).
## Run in custom Grafana Docker image
We recommend setting up another Docker container for rendering and using remote rendering. Refer to [Remote rendering service]({{< relref "#remote-rendering-service" >}}) for instructions.
If you still want to install the plugin in the Grafana Docker image, refer to [Build with Grafana Image Renderer plugin pre-installed]({{< relref "../installation/docker/#build-with-grafana-image-renderer-plugin-pre-installed" >}}).
## Remote rendering service
> Requires an internet connection.
The [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) can also be run as a remote HTTP rendering service. In this setup, Grafana renders an image by making a HTTP request to the remote rendering service, which in turn renders the image and returns it back in the HTTP response to Grafana.
You can run the remote HTTP rendering service using Docker or as a standalone Node.js application.
### Run in Docker
The following example shows how to run Grafana and the remote HTTP rendering service in two separate Docker containers using Docker Compose.
Create a `docker-compose.yml` with the following content:
```yaml
version: '2'
services:
grafana:
image: grafana/grafana:main
ports:
- '3000:3000'
environment:
GF_RENDERING_SERVER_URL: http://renderer:8081/render
GF_RENDERING_CALLBACK_URL: http://grafana:3000/
GF_LOG_FILTERS: rendering:debug
renderer:
image: grafana/grafana-image-renderer:latest
ports:
- 8081
```
And then run:
```bash
docker-compose up
```
## Run as standalone Node.js application
The following example describes how to build and run the remote HTTP rendering service as a standalone Node.js application and configure Grafana appropriately.
1. Clone the [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) Git repository.
1. Install dependencies and build:
```bash
yarn install --pure-lockfile
yarn run build
```
1. Run the server:
```bash
node build/app.js server --port=8081
```
1. Update Grafana configuration:
```
[rendering]
server_url = http://localhost:8081/render
callback_url = http://localhost:3000/
```
1. Restart Grafana.
## PhantomJS
> Starting from Grafana v7.0.0, all PhantomJS support has been removed. Please use the Grafana Image Renderer plugin or remote rendering service.
## Troubleshoot image rendering
Enable debug log messages for rendering in the Grafana configuration file and inspect the Grafana server log.
```bash
[log]
filters = rendering:debug
```
### Grafana image renderer plugin and remote rendering service
The plugin and rendering service uses [Chromium browser](https://www.chromium.org/) which depends on certain libraries.
If you don't have all of those libraries installed in your system you may encounter errors when trying to render an image, e.g.
```bash
Rendering failed: Error: Failed to launch chrome!/var/lib/grafana/plugins/grafana-image-renderer/chrome-linux/chrome:
error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
```
In general you can use the [`ldd`](<https://en.wikipedia.org/wiki/Ldd_(Unix)>) utility to figure out what shared libraries
are not installed in your system:
```bash
cd <grafana-image-render plugin directory>
ldd chrome-linux/chrome
linux-vdso.so.1 (0x00007fff1bf65000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2047945000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2047924000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f204791a000)
libX11.so.6 => not found
libX11-xcb.so.1 => not found
libxcb.so.1 => not found
libXcomposite.so.1 => not found
...
```
**Ubuntu:**
On Ubuntu 18.10 the following dependencies have been confirmed as needed for the image rendering to function.
```bash
libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrender1 libxtst6 libglib2.0-0 libnss3 libcups2 libdbus-1-3 libxss1 libxrandr2 libgtk-3-0 libgtk-3-0 libasound2 libxcb-dri3-0 libgbm1
```
**Debian:**
On Debian 9 (Stretch) the following dependencies have been confirmed as needed for the image rendering to function.
```bash
libx11 libcairo bcairo2 libcairo2 libxtst6 libxcomposite1 libx11-xcb1 libxcursor1 libxdamage1 libnss3 libcups libcups2 libXss libXss1 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0 libgbm1
```
On Debian 10 (Buster) the following dependencies have been confirmed as needed for the image rendering to function.
```bash
libxdamage1 libxext6 libxi6 libxtst6 libnss3 libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libpango-1.0-0 libcairo2 libatspi2.0-0 libgtk3.0-cil libgdk3.0-cil libx11-xcb-dev libgbm1
```
**Centos:**
On a minimal Centos installation, the following dependencies have been confirmed as needed for the image rendering to function:
```bash
libXcomposite libXdamage libXtst cups libXScrnSaver pango atk adwaita-cursor-theme adwaita-icon-theme at at-spi2-atk at-spi2-core cairo-gobject colord-libs dconf desktop-file-utils ed emacs-filesystem gdk-pixbuf2 glib-networking gnutls gsettings-desktop-schemas gtk-update-icon-cache gtk3 hicolor-icon-theme jasper-libs json-glib libappindicator-gtk3 libdbusmenu libdbusmenu-gtk3 libepoxy liberation-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts libgusb libindicator-gtk3 libmodman libproxy libsoup libwayland-cursor libwayland-egl libxkbcommon m4 mailx nettle patch psmisc redhat-lsb-core redhat-lsb-submod-security rest spax time trousers xdg-utils xkeyboard-config alsa-lib
```
### Certificate signed by internal certificate authorities
In many cases, Grafana runs on internal servers and uses certificates that have not been signed by a CA ([Certificate Authority](https://en.wikipedia.org/wiki/Certificate_authority)) known to Chrome, and therefore cannot be validated. Chrome internally uses NSS ([Network Security Services](https://en.wikipedia.org/wiki/Network_Security_Services)) for cryptographic operations such as the validation of certificates.
If you are using the Grafana Image Renderer with a Grafana server that uses a certificate signed by such a custom CA (for example a company-internal CA), rendering images will fail and you will see messages like this in the Grafana log:
```
t=2019-12-04T12:39:22+0000 lvl=error msg="Render request failed" logger=rendering error=map[] url="https://192.168.106.101:3443/d-solo/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m&from=1575438321300&to=1575459921300&var-Host=master1&panelId=4&width=1000&height=500&tz=Europe%2FBerlin&render=1" timestamp=0001-01-01T00:00:00.000Z
t=2019-12-04T12:39:22+0000 lvl=error msg="Rendering failed." logger=context userId=1 orgId=1 uname=admin error="Rendering failed: Error: net::ERR_CERT_AUTHORITY_INVALID at https://192.168.106.101:3443/d-solo/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m&from=1575438321300&to=1575459921300&var-Host=master1&panelId=4&width=1000&height=500&tz=Europe%2FBerlin&render=1"
t=2019-12-04T12:39:22+0000 lvl=error msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/render/d-solo/zxDJxNaZk/graphite-metrics status=500 remote_addr=192.168.106.101 time_ms=310 size=1722 referer="https://grafana.xxx-xxx/d/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m"
```
(The severity-level `error` in the above messages might be misspelled with a single `r`)
If this happens, then you have to add the certificate to the trust store. If you have the certificate file for the internal root CA in the file `internal-root-ca.crt.pem`, then use these commands to create a user specific NSS trust store for the Grafana user (`grafana` for the purpose of this example) and execute the following steps:
```[root@server ~]# [ -d /usr/share/grafana/.pki/nssdb ] || mkdir -p /usr/share/grafana/.pki/nssdb
[root@merver ~]# certutil -d sql:/usr/share/grafana/.pki/nssdb -A -n internal-root-ca -t C -i /etc/pki/tls/certs/internal-root-ca.crt.pem
[root@server ~]# chown -R grafana: /usr/share/grafana/.pki/nssdb
```
### Custom Chrome/Chromium
As a last resort, if you already have [Chrome](https://www.google.com/chrome/) or [Chromium](https://www.chromium.org/)
installed on your system, then you can configure [Grafana Image renderer plugin](#grafana-image-renderer-plugin) to use this
instead of the pre-packaged version of Chromium.
> Please note that this is not recommended, since you may encounter problems if the installed version of Chrome/Chromium is not
> compatible with the [Grafana Image renderer plugin](#grafana-image-renderer-plugin).
To override the path to the Chrome/Chromium executable, set an environment variable and make sure that it's available for the Grafana process. For example:
```bash
export GF_PLUGIN_RENDERING_CHROME_BIN="/usr/bin/chromium-browser"
```

View File

@@ -141,20 +141,22 @@ Please refer to each datasource documentation for specific provisioning examples
Since not all datasources have the same configuration settings we only have the most common ones as fields. The rest should be stored as a json blob in the `jsonData` field. Here are the most common settings that the core datasources use.
> **Note:** Datasources tagged with _HTTP\*_ below denotes any data source which communicates using the HTTP protocol, e.g. all core data source plugins except MySQL, PostgreSQL and MSSQL.
| Name | Type | Datasource | Description |
| ----------------------- | ------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| tlsAuth | boolean | _All_ | Enable TLS authentication using client cert configured in secure json data |
| tlsAuthWithCACert | boolean | _All_ | Enable TLS authentication using CA cert |
| tlsSkipVerify | boolean | _All_ | Controls whether a client verifies the server's certificate chain and host name. |
| serverName | string | _All_ | Optional. Controls the server name used for certificate common name/subject alternative name verification. Defaults to using the data source URL. |
| timeout | string | _All_ | Request timeout in seconds. Overrides dataproxy.timeout option |
| tlsAuth | boolean | _HTTP\*_, MySQL | Enable TLS authentication using client cert configured in secure json data |
| tlsAuthWithCACert | boolean | _HTTP\*_, MySQL, PostgreSQL | Enable TLS authentication using CA cert |
| tlsSkipVerify | boolean | _HTTP\*_, MySQL, PostgreSQL | Controls whether a client verifies the server's certificate chain and host name. |
| serverName | string | _HTTP\*_ | Optional. Controls the server name used for certificate common name/subject alternative name verification. Defaults to using the data source URL. |
| timeout | string | _HTTP\*_ | Request timeout in seconds. Overrides dataproxy.timeout option |
| graphiteVersion | string | Graphite | Graphite version |
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source. |
| httpMode | string | Influxdb | HTTP Method. 'GET', 'POST', defaults to GET |
| maxSeries | number | Influxdb | Max number of series/tables that Grafana processes |
| httpMethod | string | Prometheus | HTTP Method. 'GET', 'POST', defaults to POST |
| customQueryParameters | string | Prometheus | Query parameters to add, as a URL-encoded string. |
| manageAlerts | boolean | Prometheus and Loki | Manage alerts via Alerting UI |
| manageAlerts | boolean | Prometheus and Loki | Manage alerts via Alerting UI |
| esVersion | string | Elasticsearch | Elasticsearch version (E.g. `7.0.0`, `7.6.1`) |
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
| interval | string | Elasticsearch | Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly' |
@@ -185,6 +187,7 @@ Since not all datasources have the same configuration settings we only have the
| maxOpenConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of open connections to the database (Grafana v5.4+) |
| maxIdleConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of connections in the idle connection pool (Grafana v5.4+) |
| connMaxLifetime | number | MySQL, PostgreSQL and MSSQL | Maximum amount of time in seconds a connection may be reused (Grafana v5.4+) |
| keepCookies | array | _HTTP\*_ | Cookies that needs to be passed along while communicating with datasources |
#### Secure Json Data
@@ -192,17 +195,19 @@ Since not all datasources have the same configuration settings we only have the
Secure json data is a map of settings that will be encrypted with [secret key]({{< relref "configuration.md#secret-key" >}}) from the Grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to the request on the server side. All of these settings are optional.
| Name | Type | Datasource | Description |
| ----------------- | ------ | ---------------------------- | -------------------------------------------------------- |
| tlsCACert | string | _All_ | CA cert for out going requests |
| tlsClientCert | string | _All_ | TLS Client cert for outgoing requests |
| tlsClientKey | string | _All_ | TLS Client key for outgoing requests |
| password | string | _All_ | password |
| basicAuthPassword | string | _All_ | password for basic authentication |
| accessKey | string | Cloudwatch | Access key for connecting to Cloudwatch |
| secretKey | string | Cloudwatch | Secret key for connecting to Cloudwatch |
| sigV4AccessKey | string | Elasticsearch and Prometheus | SigV4 access key. Required when using keys auth provider |
| sigV4SecretKey | string | Elasticsearch and Prometheus | SigV4 secret key. Required when using keys auth provider |
> **Note:** Datasources tagged with _HTTP\*_ below denotes any data source which communicates using the HTTP protocol, e.g. all core data source plugins except MySQL, PostgreSQL and MSSQL.
| Name | Type | Datasource | Description |
| ----------------- | ------ | ---------------------------------- | -------------------------------------------------------- |
| tlsCACert | string | _HTTP\*_, MySQL, PostgreSQL | CA cert for out going requests |
| tlsClientCert | string | _HTTP\*_, MySQL, PostgreSQL | TLS Client cert for outgoing requests |
| tlsClientKey | string | _HTTP\*_, MySQL, PostgreSQL | TLS Client key for outgoing requests |
| password | string | _HTTP\*_, MySQL, PostgreSQL, MSSQL | password |
| basicAuthPassword | string | _HTTP\*_ | password for basic authentication |
| accessKey | string | Cloudwatch | Access key for connecting to Cloudwatch |
| secretKey | string | Cloudwatch | Secret key for connecting to Cloudwatch |
| sigV4AccessKey | string | Elasticsearch and Prometheus | SigV4 access key. Required when using keys auth provider |
| sigV4SecretKey | string | Elasticsearch and Prometheus | SigV4 secret key. Required when using keys auth provider |
#### Custom HTTP headers for datasources

View File

@@ -22,7 +22,15 @@ Grafana will now persist all long term data in the database. How to configure th
## Alerting
Currently alerting supports a limited form of high availability. [Alert notifications]({{< relref "../alerting/old-alerting/notifications.md" >}}) are deduplicated when running multiple servers. This means all alerts are executed on every server but alert notifications are only sent once per alert. Grafana does not support load distribution between servers.
**Grafana 8 alerts**
Grafana 8 Alerts provides a new highly-available model under the hood. It preserves the previous semantics by executing all alerts on every server and notifications are sent only once per alert. There is no support for load distribution between servers at this time.
For configuration, [follow the guide]({{< relref "../alerting/unified-alerting/high-availability.md" >}}).
**Legacy dashboard alerts**
Legacy Grafana alerting supports a limited form of high availability. [Alert notifications]({{< relref "../alerting/old-alerting/notifications.md" >}}) are deduplicated when running multiple servers. This means all alerts are executed on every server but alert notifications are only sent once per alert. Grafana does not support load distribution between servers.
## Grafana Live

View File

@@ -5,27 +5,23 @@ weight = 110
# Grafana alerts
Alerts allow you to know about problems in your systems moments after they occur. Robust and actionable alerts help you identify and resolve issues quickly, minimizing disruption to your services.
Alerts allow you to learn about problems in your systems moments after they occur. Robust and actionable alerts help you identify and resolve issues quickly, minimizing disruption to your services.
Grafana 8.0 has new and improved alerts. The new alerting system is an [opt-in]({{< relref "./unified-alerting/opt-in.md" >}}) feature that centralizes alerting information for Grafana managed alerts and alerts from Prometheus-compatible data sources in one UI and API.
Grafana 8.0 has new and improved alerting that centralizes alerting information in a single, searchable view. It allows you to:
> **Note:** Out of the box, Grafana still supports old [legacy dashboard alerts]({{< relref "./old-alerting/_index.md" >}}). We encourage you to create issues in the Grafana GitHub repository for bugs found while testing Grafana 8 alerts.
- Create and manage Grafana alerts
- Create and manage Cortex and Loki managed alerts
- View alerting information from Prometheus and Alertmanager compatible data sources
Alerts have four main components:
Grafana 8 alerting has four key components:
- Alerting rule - One or more query and/or expression, a condition, the frequency of evaluation, and the (optional) duration that a condition must be met before creating an alert.
- Contact point - A channel for sending notifications when the conditions of an alerting rule are met.
- Notification policy - A set of matching and grouping criteria used to determine where, and how frequently, to send notifications.
- Alerting rule - Evaluation criteria that determine whether an alert will fire. It consists of one or more queries and expressions, a condition, the frequency of evaluation, and optionally, the duration over which the condition is met.
- Contact point - Channel for sending notifications when the conditions of an alerting rule are met.
- Notification policy - Set of matching and grouping criteria used to determine where and how frequently to send notifications.
- Silences - Date and matching criteria used to silence notifications.
You can create and edit alerting rules for Grafana managed alerts, Cortex alerts, and Loki alerts as well as see alerting information from prometheus-compatible data sources in a single, searchable view. For more information, on how to create and edit alerts and notifications, refer to [Overview of Grafana 8.0 alerts]({{< relref "../alerting/unified-alerting/_index.md" >}}).
To learn more, see [What's New with Grafana 8 alerting]({{< relref "../alerting/unified-alerting/difference-old-new.md" >}}).
For handling notifications for Grafana managed alerts, we use an embedded Alertmanager. You can configure its contact points, notification policies, silences and templates from the new Grafana alerting UI by selecting `Grafana` from the Alertmanager dropdown on the top of the respective tab.
For information on how to create and manage Grafana 8 alerts and notifications, refer to [Overview of Grafana 8.0 alerts]({{< relref "../alerting/unified-alerting/_index.md" >}}) and [Create and manage Grafana 8 alerting rules]({{< relref "./unified-alerting/alerting-rules/_index.md" >}}).
> **Note:** Currently the configuration of this embedded Alertmanager is shared across organisations. Therefore users are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise all contact points, notification policies, silences and templates for Grafana managed alerts will be visible by all organizations.
As part of the new alert changes, we have introduced a new data source, Alertmanager, which includes built-in support for Prometheus Alertmanager. It is presently in alpha and it not accessible unless alpha plugins are enabled in Grafana settings. For more information, refer to [Alertmanager data source]({{< relref "../datasources/alertmanager.md" >}}). If such a data source is present, then you can view and modify its silences, contact points and notification policies from the Grafana alerting UI by selecting it from the Alertmanager dropdown on the top of respective tab.
> **Note:** Out of the box, Grafana still supports old Grafana alerts. They are legacy alerts at this time, and will be deprecated in a future release. For more information, refer to [Legacy Grafana alerts]({{< relref "./old-alerting/_index.md" >}}).
To learn more about the differences between new alerts and the legacy alerts, refer to [What's New with Grafana 8 Alerts]({{< relref "../alerting/difference-old-new.md" >}}).
> **Note:** Grafana 8 alerting is an [opt-in]({{< relref "./unified-alerting/opt-in.md" >}}) feature. Out of the box, Grafana still supports old [legacy dashboard alerts]({{< relref "./old-alerting/_index.md" >}}). We encourage you to create issues in the Grafana GitHub repository for bugs found while testing Grafana 8 alerts.

View File

@@ -1,26 +0,0 @@
+++
title = "What's New with Grafana 8 Alerts"
description = "What's New with Grafana 8 Alerts"
keywords = ["grafana", "alerting", "guide"]
weight = 112
+++
# What's New with Grafana 8 Alerts
The Alerts released with Grafana 8.0 are an opt-in feature that centralizes alerting information for Grafana managed alerts and alerts from Prometheus-compatible datasources in one UI and API. You are able to create and edit alerting rules for Grafana managed alerts, Cortex alerts, and Loki alerts as well as see alerting information from prometheus-compatible datasources in a single, searchable view.
## Multi-dimensional alerting
Create alerts that will give you system-wide visibility with a single alerting rule. With Grafana 8 alerts, you are able to generate multiple alert instances from a single rule eg. creating a rule to monitor disk usage for multiple mount points on a single host. The evaluation engine is able to return multiple time series from a single query. Each time series is identified by its label set.
## Create alerts outside of Dashboards
Grafana legacy alerts were tied to a dashboard. Grafana 8 Alerts allow you to create queries and expressions that can combine data from multiple sources, in unique ways. You are still able to link dashboards and panels to alerting rules, allowing you to quickly troubleshoot the system under observation, by linking a dashboard and/or panel ID to the alerting rule.
## Create Loki and Cortex alerting rules
With Grafana 8 Alerts you are able to manage your Loki and Cortex alerting rules using the same UI and API as your Grafana managed alerts.
## View and search for alerts from Prometheus
You can now display all of your alerting information in one, searchable UI. Alerts for Prometheus compatible datasources are listed below Grafana managed alerts. Search for labels across multiple datasources to quickly find all of the relevant alerts.

View File

@@ -5,14 +5,7 @@ weight = 114
# Legacy Grafana alerts
Grafana 8.0 has [new and improved alerts]({{< relref "../unified-alerting/_index.md" >}}). The new alerting system are an opt-in feature that centralizes alerting information for Grafana managed alerts and alerts from Prometheus-compatible data sources in one UI and API.
Out of the box, Grafana still supports legacy dashboard alerts. Legacy Grafana alerts consists of two parts:
Alert rules - When the alert is triggered. Alert rules are defined by one or more conditions that are regularly evaluated by Grafana.
Notification channel - How the alert is delivered. When the conditions of an alert rule are met, the Grafana notifies the channels configured for that alert.
Currently only the graph panel visualization supports alerts.
Out of the box, Grafana still supports legacy dashboard alerts. If you are using version 8.0 or later, you can [opt-in]({{< relref "../unified-alerting/opt-in.md" >}}) to use Grafana 8 alerts. See [What's New with Grafana 8 alerting]({{< relref "../unified-alerting/difference-old-new.md" >}}) for more information.
Legacy alerts have two main components:
@@ -28,30 +21,4 @@ You can perform the following tasks for alerts:
- [Test alert rules and troubleshoot]({{< relref "troubleshoot-alerts.md" >}})
- [Add or edit an alert contact point]({{< relref "notifications.md" >}})
## Clustering
Currently alerting supports a limited form of high availability. Since v4.2.0 of Grafana, alert notifications are deduped when running multiple servers. This means all alerts are executed on every server but no duplicate alert notifications are sent due to the deduping logic. Proper load balancing of alerts will be introduced in the future.
## Alert evaluation
Grafana managed alerts are evaluated by the Grafana backend. Rule evaluations are scheduled, according to the alert rule configuration, and queries are evaluated by an engine that is part of core Grafana.
Alert rules can only query backend data sources with alerting enabled:
- builtin or developed and maintained by grafana: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`,
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`
- any community backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../../developers/plugins/metadata.md" >}}))
## Metrics from the alert engine
The alert engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../../administration/view-server/internal-metrics.md" >}}).
| Metric Name | Type | Description |
| ------------------------------------------- | --------- | ---------------------------------------------------------------------------------------- |
| `alerting.alerts` | gauge | How many alerts by state |
| `alerting.request_duration_seconds` | histogram | Histogram of requests to the Alerting API |
| `alerting.active_configurations` | gauge | The number of active, non default alertmanager configurations for grafana managed alerts |
| `alerting.rule_evaluations_total` | counter | The total number of rule evaluations |
| `alerting.rule_evaluation_failures_total` | counter | The total number of rule evaluation failures |
| `alerting.rule_evaluation_duration_seconds` | summary | The duration for a rule to execute |
| `alerting.rule_group_rules` | gauge | The number of rules |
{{< docs/shared "alerts/grafana-managed-alerts.md" >}}

View File

@@ -50,8 +50,8 @@ These examples show how often and when reminders are sent for a triggered alert.
## List of supported notifiers
| Name | Type | Supports images | Support alert rule tags |
| --------------------------------------------- | ------------------------- | ------------------ | ----------------------- | --- |
| Name | Type | Supports images | Supports alert rule tags |
| --------------------------------------------- | ------------------------- | ------------------ | ----------------------- |
| [DingDing](#dingdingdingtalk) | `dingding` | yes, external only | no |
| [Discord](#discord) | `discord` | yes | no |
| [Email](#email) | `email` | yes | no |
@@ -70,7 +70,7 @@ These examples show how often and when reminders are sent for a triggered alert.
| Telegram | `telegram` | yes | no |
| Threema | `threema` | yes, external only | no |
| VictorOps | `victorops` | yes, external only | yes |
| [Webhook](#webhook) | `webhook` | yes, external only | yes | |
| [Webhook](#webhook) | `webhook` | yes, external only | yes |
### Email
@@ -263,7 +263,7 @@ Grafana alert notifications can be sent to [Sensu](<(https://sensu.io)>) Go as e
## Enable images in notifications {#external-image-store}
Grafana can render the panel associated with the alert rule as a PNG image and include that in the notification. Read more about the requirements and how to configure
[image rendering]({{< relref "../../administration/image_rendering/" >}}).
[image rendering]({{< relref "../../image-rendering/" >}}).
You must configure an [external image storage provider]({{< relref "../../administration/configuration/#external-image-storage" >}}) in order to receive images in alert notifications. If your notification channel requires that the image be publicly accessible (e.g. Slack, PagerDuty), configure a provider which uploads the image to a remote image store like Amazon S3, Webdav, Google Cloud Storage, or Azure Blob Storage. Otherwise, the local provider can be used to serve the image directly from Grafana.

View File

@@ -4,57 +4,22 @@ aliases = ["/docs/grafana/latest/alerting/metrics/"]
weight = 113
+++
# Overview of Grafana 8 alerts
# Overview of Grafana 8 alerting
Alerts allow you to know about problems in your systems moments after they occur. Robust and actionable alerts help you identify and resolve issues quickly, minimizing disruption to your services.
Grafana 8.0 has new and improved alerting that centralizes alerting information in a single, searchable view. It is an [opt-in]({{< relref "./opt-in.md" >}}) feature. We encourage you to create issues in the Grafana GitHub repository for bugs found while testing Grafana 8 alerting. See also, [What's New with Grafana 8 alerting]({{< relref "./difference-old-new.md" >}}).
> **Note:** Grafana 8 alerts (beta) is an [opt-in]({{< relref"./opt-in.md" >}}) feature. Out of the box, Grafana still supports old [legacy dashboard alerts]({{< relref "../old-alerting/_index.md" >}}). We encourage you to create issues in the Grafana GitHub repository for bugs found while testing this new feature.
When Grafana 8 alerting is enabled, you can:
Grafana 8 alerts have four main components:
- Alerting rule - One or more query and/or expression, a condition, the frequency of evaluation, and the (optional) duration that a condition must be met before creating an alert.
- Contact point - A channel for sending notifications when the conditions of an alerting rule are met.
- Notification policy - A set of matching and grouping criteria used to determine where, and how frequently, to send notifications.
- Silences - Date and matching criteria used to silence notifications.
## Alerting tasks
You can perform the following tasks for alerts:
- [Create a Grafana managed alert rule]({{< relref "alerting-rules/create-grafana-managed-rule.md" >}})
- [Create a Cortex or Loki managed alert rule]({{< relref "alerting-rules/create-cortex-loki-managed-rule.md" >}})
- [View existing alert rules and their current state]({{< relref "alerting-rules/rule-list.md" >}})
- [View state and health of alerting rules]({{< relref "alerting-rules/state-and-health.md" >}})
- [Create a Grafana managed alerting rules]({{< relref "alerting-rules/create-grafana-managed-rule.md" >}})
- [Create a Cortex or Loki managed alerting rules]({{< relref "alerting-rules/create-cortex-loki-managed-rule.md" >}})
- [View existing alerting rules and manage their current state]({{< relref "alerting-rules/rule-list.md" >}})
- [View the state and health of alerting rules]({{< relref "./fundamentals/state-and-health.md" >}})
- [Add or edit an alert contact point]({{< relref "./contact-points.md" >}})
- [Add or edit notification policies]({{< relref "./notification-policies.md" >}})
- [Create and edit silences]({{< relref "./silences.md" >}})
- [Add or edit silences]({{< relref "./silences.md" >}})
## Clustering
Before you begin using Grafana 8 alerting, we recommend that you familiarize yourself with some [basic concepts]({{< relref "./fundamentals/_index.md" >}}) of Grafana 8 alerting.
The current alerting system doesn't support high availability. Alert notifications are not deduplicated and load balancing is not supported between instances e.g. silences from one instance will not appear in the other. The Grafana team aims to have this feature by Grafana version 8.1+.
## Limitations
## Alert evaluation
Grafana managed alerts are evaluated by the Grafana backend. Rule evaluations are scheduled, according to the alert rule configuration, and queries are evaluated by an engine that is part of core Grafana.
Alerting rules can only query backend data sources with alerting enabled:
- builtin or developed and maintained by grafana: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`,
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`
- any community backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../../developers/plugins/metadata.md" >}}))
## Metrics from the alerting engine
The alerting engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../../administration/view-server/internal-metrics.md" >}}).
| Metric Name | Type | Description |
| ------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------- |
| `grafana_alerting_alerts` | gauge | How many alerts by state |
| `grafana_alerting_request_duration` | histogram | Histogram of requests to the Alerting API |
| `grafana_alerting_active_configurations` | gauge | The number of active, non default Alertmanager configurations for grafana managed alerts |
| `grafana_alerting_rule_evaluations_total` | counter | The total number of rule evaluations |
| `grafana_alerting_rule_evaluation_failures_total` | counter | The total number of rule evaluation failures |
| `grafana_alerting_rule_evaluation_duration` | summary | The duration for a rule to execute |
| `grafana_alerting_rule_group_rules` | gauge | The number of rules |
- [View alert rules and their current state]({{< relref "alerting-rules/rule-list.md" >}})
- The Grafana 8 alerting system can retrieve rules from all available Prometheus, Loki, and Alertmanager data sources. It might not be able to fetch rules from other supported data sources.

View File

@@ -0,0 +1,26 @@
+++
title = "Alert groups"
description = "Alert groups"
keywords = ["grafana", "alerting", "alerts", "groups"]
weight = 400
+++
# Alert groups
Alert groups show grouped alerts from an Alertmanager instance. By default, the alerts are grouped by the label keys for the root policy in [notification policies]({{< relref "./notification-policies.md" >}}). Grouping common alerts into a single alert group prevents duplicate alerts from being fired.
## View alert groupings
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. 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.
If an alert does not contain labels specified either in the grouping of the root policy or the custom grouping, then the alert is added to a catch all group with a header of `No grouping`.
## Filter alerts
You can use the following filters to view alerts that match specific criteria:
- **Search by label:** In **Search**, enter an existing label to view alerts matching the label. For example, `environment=production,region=~US|EU,severity!=warning`
- **Filter alerts by state:** In **States**, select from Active, Suppressed, or Unprocessed states to view alerts matching your selected state. All other alerts are hidden.

View File

@@ -4,13 +4,17 @@ aliases = ["/docs/grafana/latest/alerting/rules/"]
weight = 130
+++
# Create and manage alerting Rules
# Create and manage Grafana 8 alerting rules
One or more queries and/or expressions, a condition, the frequency of evaluation, and the (optional) duration that a condition must be met before creating an alert. Alerting rules are how you express the criteria for creating an alert. Queries and expressions select and can operate on the data you wish to alert on. A condition sets the threshold that an alert must meet or exceed to create an alert. The interval specifies how frequently the rule should be evaluated. The duration, when configured, sets a period that a condition must be met or exceeded before an alert is created. Alerting rules also can contain settings for what to do when your query does not return any data, or there is an error attempting to execute the query.
An alerting rule is a set of evaluation criteria that determines whether an alert will fire. The rule consists of one or more queries and expressions, a condition, the frequency of evaluation, and optionally, the duration over which the condition is met.
While queries and expressions select the data set to evaluate, a condition sets the threshold that an alert must meet or exceed to create an alert. An interval specifies how frequently an alerting rule is evaluated. Duration, when configured, indicates how long a condition must be met. The rules can also define alerting behavior in the absence of data.
In Grafana 8 alerting, you can:
- [Create Cortex or Loki managed alert rule]({{< relref "./create-cortex-loki-managed-rule.md" >}})
- [Create Cortex or Loki managed recording rule]({{< relref "./create-cortex-loki-managed-recording-rule.md" >}})
- [Edit Cortex or Loki rule groups and namespaces]({{< relref "./edit-cortex-loki-namespace-group.md" >}})
- [Create Grafana managed alert rule]({{< relref "./create-grafana-managed-rule.md" >}})
- [State and Health of alerting rules]({{< relref "./state-and-health.md" >}})
- [View existing alert rules and their current state]({{< relref "./rule-list.md" >}})
- [State and hfundamentalsealth of alerting rules]({{< relref "../fundamentals/state-and-health.md" >}})
- [Manage alerting rules]({{< relref "./rule-list.md" >}})

View File

@@ -0,0 +1,60 @@
+++
title = "Annotations and labels for alerting rules"
description = "Annotations and labels for alerting"
keywords = ["grafana", "alerting", "guide", "rules", "create"]
weight = 401
+++
# Annotations and labels for alerting rules
Annotations and labels help customize alert messages so that you can quickly identify the service or application that needs attention.
## Annotations
Annotations are key-value pairs that provide additional meta-information about an alert. For example: a description, a summary, and runbook URL. These are displayed in rule and alert details in the UI and can be used in contact type message templates. Annotations can also be templated, for example `Instance {{ $labels.instance }} down` will have the evaluated `instance` label value added for every alert this rule produces.
## Labels
Labels are key-value pairs that categorize or identify an alert. Labels are used to match alerts in silences or match and groups alerts in notification policies. Labels are also shown in rule or alert details in the UI and can be used in contact type message templates. For example, you can add a `severity` label, then configure a separate notification policy for each severity. You can also add, for example, a `team` label and configure notification policies specific to the team or silence all alerts for a particular team. Labels can also be templated like annotations, for example, `{{ $labels.namespace }}/{{ $labels.job }}` will produce a new rule label that will have the evaluated `namespace` and `job` label value added for every alert this rule produces. The rule labels take precedence over the labels produced by the query/condition.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-details-8-0.png" max-width="550px" caption="Alert details" >}}
#### Template variables
The following template variables are available when expanding annotations and labels.
| Name | Description |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. This is unavailable when the rule uses a classic condition. |
| $values | The values of all reduce and math expressions that were evaluated for this alert rule. For example, `{{ $values.A }}`, `{{ $values.A.Labels }}` and `{{ $values.A.Value }}` where `A` is the `refID` of the expression. This is unavailable when the rule uses a [classic condition]({{< relref "./create-grafana-managed-rule/#single-and-multi-dimensional-rule" >}}) |
| $value | The value string of the alert instance. For example, `[ var='A' labels={instance=foo} value=10 ]`. |
#### Template functions
The following template functions are available when expanding annotations and labels.
| Name | Argument | Return | Description |
| ------------------ | -------------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| humanize | number or string | string | Converts a number to a more readable format, using metric prefixes. |
| humanize1024 | number or string | string | Like humanize, but uses 1024 as the base rather than 1000. |
| humanizeDuration | number or string | string | Converts a duration in seconds to a more readable format. |
| humanizePercentage | number or string | string | Converts a ratio value to a fraction of 100. |
| humanizeTimestamp | number or string | string | Converts a Unix timestamp in seconds to a more readable format. |
| title | string | string | strings.Title, capitalises first character of each word. |
| toUpper | string | string | strings.ToUpper, converts all characters to upper case. |
| toLower | string | string | strings.ToLower, converts all characters to lower case. |
| match | pattern, text | boolean | regexp.MatchString Tests for a unanchored regexp match. |
| reReplaceAll | pattern, replacement, text | string | Regexp.ReplaceAllString Regexp substitution, unanchored. |
| graphLink | expr | string | Not supported |
| tableLink | expr | string | Not supported |
| args | []interface{} | map[string]interface{} | Converts a list of objects to a map with keys, for example, arg0, arg1. Use this function to pass multiple arguments to templates. |
| externalURL | nothing | string | Returns a string representing the external URL. |
| pathPrefix | nothing | string | Returns the path of the external URL. |
| tmpl | string, []interface{} | nothing | Not supported |
| safeHtml | string | string | Not supported |
| query | query string | []sample | Not supported |
| first | []sample | sample | Not supported |
| label | label, sample | string | Not supported |
| strvalue | []sample | string | Not supported |
| value | sample | float64 | Not supported |
| sortByLabel | label, []samples | []sample | Not supported |

View File

@@ -9,47 +9,32 @@ weight = 400
You can create and manage recording rules for an external Cortex or Loki instance. Recording rules calculate frequently needed expressions or computationally expensive expressions in advance and save the result as a new set of time series. Querying this new time series is faster, especially for dashboards since they query the same expression every time the dashboards refresh.
For both Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the ruler API by configuring their respective services. The `local` rule storage type (default for Loki data source), only supports viewing of rules. If you want to edit rules, then configure one of the other rule storage types.
## Before you begin
When configuring a Grafana Prometheus data source to point to Cortex, use the legacy /api/prom prefix, not /prometheus. Only single-binary mode is currently supported, provide a separate URL for the ruler API.
For Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the ruler API by configuring their respective services.
**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.
**Cortex** - When configuring a Grafana Prometheus data source to point to Cortex, use the legacy `/api/prom` prefix, not `/prometheus`. Currently, we support only single-binary mode and you cannot provide a separate URL for the ruler API.
> **Note:** If you do not want to manage alerting rules for a particular Loki or Prometheus data source, go to its settings page and clear the **Manage alerts via Alerting UI** checkbox.
## Add a Cortex or Loki managed recording rule
1. Hover your cursor over the Alerting (bell) icon.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **New alert rule**.
1. Click on the **Alert type** drop down and select **Cortex / Loki managed recording rule**.
1. Enter the recording rule details using instructions in the [Recording rule fields](#recording-rule-fields) section.
1. Click **Save** in the upper right corner to save the rule.
## Edit a Cortex or Loki managed recording rule
1. Hover your cursor over the Alerting (bell) icon in the side menu.
1. Expand an existing recording rule in the **Cortex / Loki** section and click **Edit**.
1. Update the recording rule details using instructions in the [Recording rule fields](#recording-rule-fields) section.
1. Click **Save and exit** to save and exit rule editing.
## Recording rule fields
This section describes the fields you fill out to create a recording rule.
### Rule type
- **Rule name -** Enter a descriptive name. The name will get displayed in the alert rule list. It will also get added as an `alertname` label to every alert instance that is created from this rule. Recording rules names must be valid [metric names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
- **Rule type -** Select **Cortex / Loki managed recording rule**.
- **Data source -** Select a Prometheus or Loki data source. Only data sources that support Cortex ruler API are available.
- **Namespace -** Select an existing rule namespace or click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and have only organizational purpose.
- **Group -** Select an existing group within the selected namespace or click **Add new** to create a new group. Newly created rules are added to the end of this group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
![Rule type section screenshot](/static/img/docs/alerting/unified/rule-edit-cortex-recording-rule-8-2.png 'Rule type section screenshot')
### Query
Enter a PromQL or LogQL expression. The result of this expression will get recorded as the value for the new metric.
![Query section](/static/img/docs/alerting/unified/rule-edit-cortex-recording-rule-query-8-2.png 'Query section screenshot')
### Details
You can optionally define labels in the details section.
![Details section](/static/img/docs/alerting/unified/rule-recording-rule-labels-8-2.png 'Details section screenshot')
1. In Step 1, add the rule name, type, and storage location.
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
- From the **Rule type** drop-down, select **Cortex / Loki managed alert**.
- From the **Select data source** drop-down, select an external Prometheus, an external Loki, or a Grafana Cloud data source.
- From the **Namespace** drop-down, select an existing rule namespace. Otherwise, click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose.
- From the **Group** drop-down, select an existing group within the selected namespace. Otherwise, click **Add new** and enter a name to create a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-cortex-alert-type-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 2, add the query to evaluate.
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-cortex-query-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 3, add additional metadata associated with the rule.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "./alert-annotation-label.md" >}}).
- Add Runbook URL, panel, dashboard, and alert IDs.
- Add custom labels.
1. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.

View File

@@ -7,62 +7,38 @@ weight = 400
# Create a Cortex or Loki managed alerting rule
Grafana allows you manage alerting rules for an external Cortex or Loki instance.
Grafana allows you to create alerting rules for an external Cortex or Loki instance.
In order for both Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the ruler API by configuring their respective services. The`local` rule storage type, default for Loki, only supports viewing of rules. If you want to edit rules, then configure one of the other rule storage types. When configuring a Grafana Prometheus data source to point to Cortex, use the legacy `/api/prom` prefix, not `/prometheus`. Only single-binary mode is currently supported, and it is not possible to provide a separate URL for the ruler API.
## Before you begin
## Add or edit a Cortex or Loki managed alerting rule
For Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the ruler API by configuring their respective services.
1. In the Grafana menu hover your cursor over the Alerting (bell) icon.
1. To create a new alert rule, click **New alert rule**. To edit an existing rule, expand one of the rules in the **Cortex / Loki** section and click **Edit**.
1. Click on the **Rule type** drop down and select **Cortex / Loki managed alert**.
1. Fill out the rest of the fields. Descriptions are listed below in [Alert rule fields](#alert-rule-fields).
1. When you have finished writing your rule, click **Save** in the upper right corner to save the rule, or **Save and exit** to save and exit rule editing.
**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.
## Alert rule fields
**Cortex** - When configuring a Grafana Prometheus data source to point to Cortex, use the [legacy `/api/prom` prefix](https://cortexmetrics.io/docs/api/#path-prefixes), not `/prometheus`. The Prometheus data source supports both Cortex and Prometheus, and Grafana expects that both the [Query API](https://cortexmetrics.io/docs/api/#querier--query-frontend) and [Ruler API](https://cortexmetrics.io/docs/api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
This section describes the fields you fill out to create an alert.
> **Note:** If you do not want to manage alerting rules for a particular Loki or Prometheus data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
### Rule type
## Add a Cortex or Loki managed alerting rule
- **Rule name -** Enter a descriptive name. The name will be displayed in the alert rule list, as well as added as `alertname` label to every alert instance that is created from this rule.
- **Rule type -** Select **Cortex / Loki managed alert**.
- **Data source -** Select a Prometheus or Loki data source. Only Prometheus data sources that support Cortex ruler API will be available.
- **Namespace -** Select an existing rule namespace or click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and have only organizational purpose.
- **Group -** Select an existing group within the selected namespace or click **Add new** and enter a name to create a new one. Newly created rules will be added to the end of the rule group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
![Alert type section screenshot](/static/img/docs/alerting/unified/rule-edit-cortex-alert-type-8-0.png 'Alert type section screenshot')
### Query
Enter a PromQL or LogQL expression. Rule will fire if evaluation result has at least one series with value > 0. An alert will be created per each such series.
![Query section](/static/img/docs/alerting/unified/rule-edit-cortex-query-8-0.png 'Query section screenshot')
### Conditions
- **For -** For how long the selected condition should violated before an alert enters `Firing` state. When condition threshold is violated for the first time, an alert becomes `Pending`. If the **for** time elapses and the condition is still violated, it becomes `Firing`. Else it reverts back to `Normal`.
![Conditions section](/static/img/docs/alerting/unified/rule-edit-cortex-conditions-8-0.png 'Conditions section screenshot')
### Details
Annotations and labels can be optionally added in the details section.
#### Annotations
Annotations are key and value pairs that provide additional meta information about the alert, for example description, summary, runbook URL. They are displayed in rule and alert details in the UI and can be used in contact type message templates. Annotations can also be templated, for example `Instance {{ $labels.instance }} down` will have the evaluated `instance` label value added for every alert this rule produces.
#### Labels
Labels are key value pairs that categorize or identify an alert. Labels are used to match alerts in silences or match and groups alerts in notification policies. Labels are also shown in rule or alert details in the UI and can be used in contact type message templates. For example, it is common to add a `severity` label and then configure a separate notification policy for each severity. Or one could add a `team` label and configure team specific notification policies, or silence all alerts for a particular team.
![Details section](/static/img/docs/alerting/unified/rule-edit-details-8-0.png 'Details section screenshot')
## Preview alerts
To evaluate the rule and see what alerts it would produce, click **Preview alerts**. It will display a list of alerts with state and value of for each one.
## Opt-out a Loki or Prometheus data source
If you do not want to allow creating rules for a particular Loki or Prometheus data source, go to its settings page and clear the **Manage alerts via Alerting UI** checkbox.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **New alert rule**.
1. In Step 1, add the rule name, type, and storage location.
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
- From the **Rule type** drop-down, select **Cortex / Loki managed alert**.
- From the **Select data source** drop-down, select an external Prometheus, an external Loki, or a Grafana Cloud data source.
- From the **Namespace** drop-down, select an existing rule namespace. Otherwise, click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose. For more information, see [Cortex or Loki rule groups and namespaces]({{< relref "./edit-cortex-loki-namespace-group.md" >}}).
- From the **Group** drop-down, select an existing group within the selected namespace. Otherwise, click **Add new** and enter a name to create a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-cortex-alert-type-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 2, add the query to evaluate.
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-cortex-query-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 3, add conditions.
- In the **For** text box, specify the duration for which the condition must be true before an alert fires. If you specify `5m`, the condition must be true for 5 minutes before the alert fires.
> **Note:** Once a condition is met, the alert goes into the `Pending` state. If the condition remains active for the duration specified, the alert transitions to the `Firing` state, else it reverts to the `Normal` state.
1. In Step 4, add additional metadata associated with the rule.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "./alert-annotation-label.md" >}}).
- Add Runbook URL, panel, dashboard, and alert IDs.
- Add custom labels.
1. To evaluate the rule and see what alerts it would produce, click **Preview alerts**. It will display a list of alerts with state and value of for each one.
1. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.

View File

@@ -7,73 +7,61 @@ weight = 400
# Create a Grafana managed alerting rule
Grafana allows you to create alerting rules that query one or more data sources, reduce or transform the results and compare them to each other or to fix thresholds. These rules will be executed and notifications sent by Grafana itself.
Grafana allows you to create alerting rules that query one or more data sources, reduce or transform the results and compare them to each other or to fix thresholds. When these are executed, Grafana sends notifications to the contact point.
## Add or edit a Grafana managed alerting rule
## Add Grafana managed rule
1. In the Grafana menu hover your cursor over the Alerting (bell) icon.
1. To create a new alert rule, click **New alert rule**. To edit an existing rule, expand one of the rules in the **Grafana** section and click **Edit**.
1. Click on the **Alert type** drop down and select **Grafana managed alert**.
1. Fill out the rest of the fields. Descriptions are listed below in [Alert rule fields](#alert-rule-fields).
1. When you have finished writing your rule, click **Save** in the upper right corner to save the rule,, or **Save and exit** to save and exit rule editing.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **New alert rule**.
1. In Step 1, add the rule name, type, and storage location.
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
- From the **Rule type** drop-down, select **Grafana managed alert**.
- From the **Folder** drop-down, select the folder where you want to store the rule. If you do not select a folder, the rule is stored in the General folder. To create a new folder, click the drop-down and enter the new folder name.
1. In Step 2, add queries and expressions to evaluate.
- Keep the default name or hover over and click the edit icon to change the name.
- For queries, select a data source from the drop-down.
- Add one or more [queries]({{< relref "../../../panels/queries.md" >}}) or [expressions]({{< relref "../../../panels/expressions.md" >}}).
- For each expression, select either **Classic condition** to create a single alert rule, or choose from **Math**, **Reduce**, **Resample** options to generate separate alert for each series. For details on these options, see [Single and multi dimensional rule](#single-and-multi-dimensional-rule).
- Click **Run queries** to verify that the query is successful.
1. In Step 3, add conditions.
- From the **Condition** drop-down, select the query or expression to trigger the alert rule.
- For **Evaluate every**, specify the frequency of evaluation. Must be a multiple of 10 seconds. For examples, `1m`, `30s`.
- For **Evaluate for**, specify the duration for which the condition must be true before an alert fires.
> **Note:** Once a condition is breached, the alert goes into the Pending state. If the condition remains breached for the duration specified, the alert transitions to the Firing state, else it reverts back to the Normal state.
- In **Configure no data and error handling**, configure alerting behavior in the absence of data. Use the guidelines in [No data and error handling](#no-data-and-error-handling).
- Click **Preview alerts** to check the result of running the query at this moment. Preview excludes no data and error handling.
1. In Step 4, add additional metadata associated with the rule.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "./alert-annotation-label.md" >}}).
- Add Runbook URL, panel, dashboard, and alert IDs.
- Add custom labels.
1. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.
## Alert rule fields
### Single and multi dimensional rule
This section describes the fields you fill out to create an alert.
For Grafana managed alerts, you can create a rule with a classic condition or you can create a multi-dimensional rule.
### Alert type
**Rule with classic condition**
- **Alert name -** Enter a descriptive name. The name will be displayed in the alert rule list, as well as added as `alertname` label to every alert instance that is created from this rule.
- **Alert type -** Select **Grafana managed alert**.
- **Folder -** Select a folder this alert rule will belong to. To create a new folder, click on the drop down and type in a new folder name.
Use the classic condition expression to create a rule that triggers a single alert when its condition is met. For a query that returns multiple series, Grafana does not track the alert state of each series. As a result, Grafana sends only a single alert even when alert conditions are met for multiple series.
![Alert type section screenshot](/static/img/docs/alerting/unified/rule-edit-grafana-alert-type-8-0.png 'Alert type section screenshot')
**Multi dimensional rule**
### Query
To generate a separate alert for each series, create a multi-dimensional rule. Use `Math`, `Reduce`, or `Resample` expressions to create a multi-dimensional rule. For example:
Add one or more [queries]({{< relref "../../../panels/queries.md" >}}) or [expressions]({{< relref "../../../panels/expressions.md" >}}). You can use classic condition expression to create a rule that will trigger a single alert if it's threshold is met, or use reduce and math expressions to create a multi dimensional alert rule that can trigger multiple alerts, one per matching series in the query result.
#### Rule with classic condition
You can use classic condition expression to create a rule that will trigger a single alert if it's conditions is met. It works about the same way as dashboard alerts in previous versions of Grafana.
1. Add one or more queries
1. Add an expression. Click on **Operation** dropdown and select **Classic condition**.
1. Add one or more conditions. For each condition you can specify operator (`AND` / `OR`), aggregation function, query letter and threshold value.
If a query returns multiple series, then the aggregation function and threshold check will be evaluated for each series.It will not track alert state **per series**. This has implications that are detailed in the scenario below.
- Alert condition with query that returns 2 series: **server1** and **server2**
- **server1** series causes the alert rule to fire and switch to state `Firing`
- Notifications are sent out with message: _load peaking (server1)_
- In a subsequent evaluation of the same alert rule, the **server2** series also causes the alert rule to fire
- No new notifications are sent as the alert rule is already in state `Firing`.
So, as you can see from the above scenario Grafana will not send out notifications when other series cause the alert to fire if the rule already is in state `Firing`. If you want to have alert per series, create a multi dimensional alert rule as described in the section below.
![Query section classic condition](/static/img/docs/alerting/unified/rule-edit-classic-8-0.png 'Query section classic condition screenshot')
#### Multi dimensional rule
You can use reduce and math expressions to create a rule that will create an alert per series returned by the query.
1. Add one or more queries
2. Add a `reduce` expression for each query to aggregate values in the selected time range into a single value. With some data sources this is not needed for [rules using numeric data]({{< relref "../grafana-managed-numeric-rule.md" >}}).
3. Add a `math` expressions with the condition for the rule. Not needed in case a query or a reduce expression already returns 0 if rule should not be firing, or > 0 if it should be firing. Some examples: `$B > 70` if it should fire in case value of B query/expression is more than 70. `$B < $C * 100` in case it should fire if value of B is less than value of C multiplied by 100. If queries being compared have multiple series in their results, series from different queries are matched if they have the same labels or one is a subset of the other.
See or [expressions documentation]({{< relref "../../../panels/expressions.md" >}}) for in depth explanation of `math` and `reduce` expressions.
- Add a `Reduce` expression for each query to aggregate values in the selected time range into a single value. (Not needed for [rules using numeric data]({{< relref "../fundamentals/evaluate-grafana-alerts.md#alerting-on-numeric-data-1" >}})).
- Add a `Math` expression with the condition for the rule. Not needed in case a query or a reduce expression already returns 0 if rule should not fire, or a positive number if it should fire. Some examples: `$B > 70` if it should fire in case value of B query/expression is more than 70. `$B < $C * 100` in case it should fire if value of B is less than value of C multiplied by 100. If queries being compared have multiple series in their results, series from different queries are matched if they have the same labels or one is a subset of the other.
![Query section multi dimensional](/static/img/docs/alerting/unified/rule-edit-multi-8-0.png 'Query section multi dimensional screenshot')
### Conditions
> **Note:** Grafana does not support alert queries with template variables. More information is available at <https://community.grafana.com/t/template-variables-are-not-supported-in-alert-queries-while-setting-up-alert/2514>.
- **Condition -** Select the letter of the query or expression whose result will trigger the alert rule. You will likely want to select either a `classic condition` or a `math` expression.
- **Evaluate every -** How often the rule should be evaluated, executing the defined queries and expressions. Must be no less than 10 seconds and a multiple of 10 seconds. Examples: `1m`, `30s`
- **Evaluate for -** For how long the selected condition should violated before an alert enters `Alerting` state. When condition threshold is violated for the first time, an alert becomes `Pending`. If the **for** time elapses and the condition is still violated, it becomes `Alerting`. Else it reverts back to `Normal`.
#### Rule with classic condition
#### No Data & Error handling
For more information, see [expressions documentation]({{< relref "../../../panels/expressions.md" >}}).
Toggle **Configure no data and error handling** switch to configure how the rule should handle cases where evaluation results in error or returns no data.
### No data and error handling
Configure alerting behavior in the absence of data using information in the following tables.
| No Data Option | Description |
| -------------- | ----------------------------------------------------------------------------------------------------- |
@@ -85,33 +73,3 @@ Toggle **Configure no data and error handling** switch to configure how the rule
| ----------------------- | ---------------------------------- |
| Alerting | Set alert rule state to `Alerting` |
| OK | Set alert rule state to `Normal` |
![Conditions section](/static/img/docs/alerting/unified/rule-edit-grafana-conditions-8-0.png 'Conditions section screenshot')
### Details
Annotations and labels can be optionally added in the details section.
#### Annotations
Annotations are key and value pairs that provide additional meta information about the alert, for example description, summary, runbook URL. They are displayed in rule and alert details in the UI and can be used in contact type message templates. Annotations can also be templated, for example `Instance {{ $labels.instance }} down` will have the evaluated `instance` label value added for every alert this rule produces.
#### Labels
Labels are key value pairs that categorize or identify an alert. Labels are used to match alerts in silences or match and groups alerts in notification policies. Labels are also shown in rule or alert details in the UI and can be used in contact type message templates. For example, it is common to add a `severity` label and then configure a separate notification policy for each severity. Or one could add a `team` label and configure team specific notification policies, or silence all alerts for a particular team. Labels can also be templated like annotations, for example `{{ $labels.namespace }}/{{ $labels.job }}` will produce a new rule label that will have the evaluated `namespace` and `job` label value added for every alert this rule produces. The rule labels take precedence over the labels produced by the query/condition.
![Details section](/static/img/docs/alerting/unified/rule-edit-details-8-0.png 'Details section screenshot')
#### Template variables
The following template variables are available when expanding annotations and labels.
| Name | Description |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. This is unavailable when the rule uses a classic condition. |
| $values | The values of all reduce and math expressions that were evaluated for this alert rule. For example, `{{ $values.A }}`, `{{ $values.A.Labels }}` and `{{ $values.A.Value }}` where `A` is the `refID` of the expression. This is unavailable when the rule uses a classic condition. |
| $value | The value string of the alert instance. For example, `[ var='A' labels={instance=foo} value=10 ]`. |
## Preview alerts
To evaluate the rule and see what alerts it would produce, click **Preview alerts**. It will display a list of alerts with state and value for each one.

View File

@@ -1,34 +1,39 @@
+++
title = "Edit Cortex or Loki rule groups and namespaces"
title = "Cortex or Loki rule groups and namespaces"
description = "Edit Cortex or Loki rule groups and namespaces"
keywords = ["grafana", "alerting", "guide", "group", "namespace", "cortex", "loki"]
weight = 400
weight = 405
+++
# Edit Cortex or Loki rule groups and namespaces
# Cortex or Loki rule groups and namespaces
You can rename Cortex or Loki rule namespaces and groups and edit group evaluation intervals.
A namespace contains one or more groups. The rules within a group are run sequentially at a regular interval. The default interval is one (1) minute. You can rename Cortex or Loki rule namespaces and groups, and edit group evaluation intervals.
![Group list](/static/img/docs/alerting/unified/rule-list-edit-cortex-loki-icon-8-2.png 'Rule group list screenshot')
{{< figure src="/static/img/docs/alerting/unified/rule-list-edit-cortex-loki-icon-8-2.png" max-width="550px" caption="Alert details" >}}
## Rename a namespace
A namespace contains one or more groups. To rename a namespace, find a group that belongs to the namespace, then update the namespace.
To rename a namespace:
1. Hover your cursor over the Alerting (bell) icon in the side menu.
1. Locate a group that belongs to the namespace you want to edit and click the edit (pen) icon.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Find a Cortex or Loki managed rule with the group that belongs to the namespace you want to edit.
1. Click the **Edit** (pen) icon.
1. Enter a new name in the **Namespace** field, then click **Save changes**.
A new namespace is created and all groups are copied into this namespace from the old one. The old namespace is deleted.
## Rename rule group or change rule group evaluation interval
## Rename rule group or change the rule group evaluation interval
The rules within a group are run sequentially at a regular interval, the default interval is one (1) minute. You can modify this interval using the following instructions.
1. Hover your cursor over the Alerting (bell) icon in the side menu.
1. Find the group you want to edit and click the edit (pen) icon.
1. n the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Find a Cortex or Loki managed rule with the group you want to edit.
1. Click **Edit** (pen) icon.
1. Modify the **Rule group** and **Rule group evaluation interval** information as necessary.
1. Click **Save changes**.
If you remaned the group, a new group is created that has all the rules from the old group, and the old group deleted.
When you rename the group, a new group with all the rules from the old group is created. The old group is deleted.
![Group list](/static/img/docs/alerting/unified/rule-list-edit-cortex-loki-icon-8-2.png 'Rule group list screenshot')
![Group edit modal](/static/img/docs/alerting/unified/rule-list-cortex-loki-edit-ns-group-8-2.png 'Rule group edit modal screenshot')

View File

@@ -1,54 +1,55 @@
+++
title = "View alert rules"
description = "View alert rules"
title = "Manage alerting rules"
description = "Manage alerting rules"
keywords = ["grafana", "alerting", "guide", "rules", "view"]
weight = 400
weight = 402
+++
# View alert rules
# Manage alerting rules
To view alerts:
The Alerting page lists existing Grafana 8 alerting rules. By default, rules are grouped by types of data sources. The Grafana section lists all Grafana managed rules. Alerting rules for Prometheus compatible data sources are also listed here. You can view alerting rules for Prometheus compatible data sources but you cannot edit them.
1. In the Grafana menu hover your cursor over the Alerting (bell) icon.
1. Click **Alert Rules**. You can see all configured Grafana alert rules as well as any rules from Loki or Prometheus data sources.
By default, the group view is shown. You can toggle between group or state views by clicking the relevant **View as** buttons in the options area at the top of the page.
The Cortex/Loki rules section lists all rules for external Prometheus or Loki data sources. Cloud alerting rules are also listed in this section.
- [View alerting rules](#view-alerting-rule)
- [Filter alerting rules](#filter-alerting-rules)
- [Edit or delete an alerting rule](#edit-or-delete-an-alerting-rule)
## View alerting rules
To view alerting details:
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page. By default, the group view displays.
1. In **View as**, toggle between group or state views by clicking the relevant option. See [Group view](#group-view) and [State view](#state-view) for more information.
1. Expand the rule row to view the rule labels, annotations, data sources the rule queries, and a list of alert instances resulting from this rule.
{{< figure src="/static/img/docs/alerting/unified/rule-details-8-0.png" max-width="650px" caption="Alerting rule details" >}}
### Group view
Group view shows Grafana alert rules grouped by folder and Loki or Prometheus alert rules grouped by `namespace` + `group`. This is the default rule list view, intended for managing rules. You can expand each group to view a list of rules in this group. Each rule can be further expanded to view its details. Action buttons and any alerts spawned by this rule, and each alert can be further expanded to view its details.
Group view shows Grafana alert rules grouped by folder and Loki or Prometheus alert rules grouped by `namespace` + `group`. This is the default rule list view, intended for managing rules. You can expand each group to view a list of rules in this group. Expand a rule further to view its details. You can also expand action buttons and alerts resulting from the rule to view their details.
![Grouped alert rule view](/static/img/docs/alerting/unified/rule-list-group-view-8-0.png 'Screenshot of grouped alert rule view')
{{< figure src="/static/img/docs/alerting/unified/rule-list-group-view-8-0.png" max-width="800px" caption="Alerting grouped view" >}}
### State view
State view shows alert rules grouped by state. Use this view to get an overview of which rules are in what state. Each rule can be expanded to view its details. Action buttons and any alerts spawned by this rule, and each alert can be further expanded to view its details.
State view shows alert rules grouped by state. Use this view to get an overview of which rules are in what state. Each rule can be expanded to view its details. Action buttons and any alerts generated by this rule, and each alert can be further expanded to view its details.
![Alert rule state view](/static/img/docs/alerting/unified/rule-list-state-view-8-0.png 'Screenshot of alert rule state view')
{{< figure src="/static/img/docs/alerting/unified/rule-list-state-view-8-0.png" max-width="800px" caption="Alerting state view" >}}
## Filter alert rules
## Filter alerting rules
You can use the following filters to view only alert rules that match specific criteria:
To filter alerting rules:
- **Filter alerts by label -** Search by alert labels using label selectors in the **Search** input. eg: `environment=production,region=~US|EU,severity!=warning`
- **Filter alerts by state -** In **States** Select which alert states you want to see. All others are hidden.
- **Filter alerts by data source -** Click the **Select data source** and select an alerting data source. Only alert rules that query selected data source will be visible.
- From **Select data sources**, select a data source. You can see alerting rules that query the selected data source.
- In the **Search by label**, enter search criteria using label selectors. For example, `environment=production,region=~US|EU,severity!=warning`.
- From **Filter alerts by state**, select an alerting state you want to see. You can see alerting rules that match the state. Rules matching other states are hidden.
## Rule details
A rule row shows the rule state, health, and summary annotation if the rule has one. You can expand the rule row to display rule labels, all annotations, data sources this rule queries, and a list of alert instances spawned from this rule.
![Alert rule details](/static/img/docs/alerting/unified/rule-details-8-0.png 'Screenshot of alert rule details')
### Edit or delete rule
Grafana rules can only be edited or deleted by users with Edit permissions for the folder which contains the rule. Prometheus or Loki rules can be edited or deleted by users with Editor or Admin roles.
## Edit or delete an alerting rule
Grafana managed alerting rules can only be edited or deleted by users with Edit permissions for the folder storing the rules. Alerting rules for an external Cortex or Loki instance can be edited or deleted by users with Editor or Admin roles.
To edit or delete a rule:
1. Expand this rule to reveal rule controls.
1. Click **Edit** to go to the rule editing form. Make changes following [instructions listed here]({{< relref "./create-grafana-managed-rule.md" >}}).
1. Click **Delete"** to delete a rule.
## Opt-out a Loki or Prometheus data source
If you do not want rules to be loaded from a Prometheus or Loki data source, go to its settings page and clear the **Manage alerts via Alerting UI** checkbox.
1. Expand a rule row until you can see the rule controls of **View**, **Edit**, and **Delete**.
1. Click **Edit** to open the create rule page. Make updates following instructions in [Create a Grafana managed alerting rule]({{< relref "./create-grafana-managed-rule.md" >}}) or [Create a Cortex or Loki managed alerting rule]({{< relref "./create-cortex-loki-managed-rule.md" >}}).
1. Click **Delete** to delete a rule.

View File

@@ -1,35 +0,0 @@
+++
title = "State and Health of alerting rules"
description = "State and Health of alerting rules"
keywords = ["grafana", "alerting", "guide", "state"]
+++
# State and Health of alerting rule
The concepts of state and health for alerting rules help you understand, at a glance, several key status indicators about your alerts. Alert state, alerting rule state, and alerting rule health are related, but they each convey subtly different information.
## Alerting rule state
Indicates whether any of the timeseries resulting from evaluation of the alerting rule are in an alerting state. Alerting rule state only requires a single alerting instance to be in a pending or firing state for the alerting rule state to not be normal.
- Normal: none of the timeseries returned are in an alerting state.
- Pending: at least one of the timeseries returned are in a pending state.
- Firing: at least one of the timeseries returned are in an alerting state.
## Alert state
Alert state is an indication of the output of the alerting evaluation engine.
- Normal: the condition for the alerting rule has evaluated to **false** for every timeseries returned by the evaluation engine.
- Alerting: the condition for the alerting rule has evaluated to **true** for at least one timeseries returned by the evaluation engine and the duration, if set, **has** been met or exceeded.
- Pending: the condition for the alerting rule has evaluated to **true** for at least one timeseries returned by the evaluation engine and the duration, if set, **has not** been met or exceeded.
- NoData: the alerting rule has not returned a timeseries, all values for the timeseries are null, or all values for the timeseries are zero.
- Error: There was an error encountered when attempting to evaluate the alerting rule.
## Alerting rule health
Indicates the status of alerting rule evaluation.
- Ok: the rule is being evaluated, data is being returned, and no errors have been encountered.
- Error: an error was encountered when evaluating the alerting rule.
- NoData: at least one of the timeseries returned during evaluation is in a NoData state.

View File

@@ -11,7 +11,7 @@ Contact points define where to send notifications about alerts that match a part
Grafana alerting UI allows you to configure contact points for the Grafana managed alerts (handled by the embedded Alertmanager) as well as contact points for an [external Alertmanager if one is configured]({{< relref "../../datasources/alertmanager.md" >}}), using the Alertmanager dropdown.
> **Note:** Currently the configuration of the embedded Alertmanager is shared across organisations. Therefore users are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise contact points for the Grafana managed alerts will be visible by all organizations.
> **Note:** In v8.0 and v8.1, the configuration of the embedded Alertmanager was shared across organisations. Users running one of these versions are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise contact points for the Grafana managed alerts will be visible by all organizations.
## Add a contact point

View File

@@ -0,0 +1,26 @@
+++
title = "What's new in Grafana 8 alerting"
description = "What's New with Grafana 8 Alerts"
keywords = ["grafana", "alerting", "guide"]
weight = 114
+++
# What's new in Grafana 8 alerting
Grafana 8.0 alerting has several enhancements over legacy dashboard alerting.
## Multi-dimensional alerting
You can now create alerts that give you system-wide visibility with a single alerting rule. Generate multiple alert instances from a single alert rule. For example, you can create a rule to monitor the disk usage of multiple mount points on a single host. The evaluation engine returns multiple time series from a single query, with each time series identified by its label set.
## Create alerts outside of Dashboards
Unlike legacy dashboard alerts, Grafana 8 alerts allow you to create queries and expressions that combine data from multiple sources in unique ways. You can still link dashboards and panels to alerting rules using their ID and quickly troubleshoot the system under observation.
## Create Loki and Cortex alerting rules
In Grafana 8 alerting, you can manage Loki and Cortex alerting rules using the same UI and API as your Grafana managed alerts.
## View and search for alerts from Prometheus compatible data sources
Alerts for Prometheus compatible data sources are now listed under the Grafana alerts section. You can search for labels across multiple data sources to quickly find relevant alerts.

View File

@@ -0,0 +1,13 @@
+++
title = "Alerting fundamentals"
aliases = ["/docs/grafana/latest/alerting/metrics/"]
weight = 120
+++
# Alerting fundamentals
This section covers the fundamental concepts of Grafana 8 alerting.
- [Alertmanager]({{< relref "./alertmanager.md" >}})
- [State and health of alerting rules]({{< relref "./state-and-health.md" >}})
- [Evaluating Grafana managed alerts]({{< relref "./evaluate-grafana-alerts.md" >}})

View File

@@ -0,0 +1,17 @@
+++
title = "Alertmanager"
aliases = ["/docs/grafana/latest/alerting/metrics/"]
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/).
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.
> **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 8 Alerts only if you have one organization. Otherwise, your contact points are visible to all organizations.
Grafana 8 alerting added support for external Alertmanager configuration. When you add an [Alertmanager data source]({{< relref "../../../datasources/alertmanager.md" >}}), the Alertmanager drop-down shows a list of available external Alertmanager data sources. Select a data source to create and manage alerting for standalone Cortex or Loki data sources.
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" max-width="250px" caption="Select Alertmanager" >}}

View File

@@ -0,0 +1,95 @@
+++
title = "Alerting on numeric data"
aliases = ["/docs/grafana/latest/alerting/metrics/"]
weight = 116
+++
# Alerting on numeric data
This topic describes how Grafana managed alerts are evaluated by the backend engine as well as how Grafana handles alerting on numeric rather than time series data.
- [Alert evaluation](#alert-evaluation)
- [Alerting on numeric data](#alerting-on-numeric-data)
## Alert evaluation
Grafana managed alerts query the following backend data sources that have alerting enabled:
- built-in data sources or those developed and maintained by Grafana: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`,
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Monitor`
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../../../developers/plugins/metadata.md" >}}))
### Metrics from the alerting engine
The alerting engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../../../administration/view-server/internal-metrics.md" >}}). See also, [View alert rules and their current state]({{< relref "../alerting-rules/rule-list.md" >}}).
| Metric Name | Type | Description |
| ------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------- |
| `grafana_alerting_alerts` | gauge | How many alerts by state |
| `grafana_alerting_request_duration` | histogram | Histogram of requests to the Alerting API |
| `grafana_alerting_active_configurations` | gauge | The number of active, non default Alertmanager configurations for grafana managed alerts |
| `grafana_alerting_rule_evaluations_total` | counter | The total number of rule evaluations |
| `grafana_alerting_rule_evaluation_failures_total` | counter | The total number of rule evaluation failures |
| `grafana_alerting_rule_evaluation_duration` | summary | The duration for a rule to execute |
| `grafana_alerting_rule_group_rules` | gauge | The number of rules |
## Alerting on numeric data
Among certain data sources numeric data that is not time series can be directly alerted on, or passed into Server Side Expressions (SSE). This allows for more processing and resulting efficiency within the data source, and it can also simplify alert rules.
When alerting on numeric data instead of time series data, there is no need to reduce each labeled time series into a single number. Instead labeled numbers are returned to Grafana instead.
### Tabular Data
This feature is supported with backend data sources that query tabular data:
- SQL data sources such as MySQL, Postgres, MSSQL, and Oracle.
- The Azure Kusto based services: Azure Monitor (Logs), Azure Monitor (Azure Resource Graph), and Azure Data Explorer.
A query with Grafana managed alerts or SSE is considered numeric with these data sources, if:
- The "Format AS" option is set to "Table" in the data source query.
- The table response returned to Grafana from the query includes only one numeric (e.g. int, double, float) column, and optionally additional string columns.
If there are string columns then those columns become labels. The name of column becomes the label name, and the value for each row becomes the value of the corresponding label. If multiple rows are returned, then each row should be uniquely identified their labels.
### Example
For a MySQL table called "DiskSpace":
| Time | Host | Disk | PercentFree |
| ----------- | ---- | ---- | ----------- |
| 2021-June-7 | web1 | /etc | 3 |
| 2021-June-7 | web2 | /var | 4 |
| 2021-June-7 | web3 | /var | 8 |
| ... | ... | ... | ... |
You can query the data filtering on time, but without returning the time series to Grafana. For example, an alert that would trigger per Host, Disk when there is less than 5% free space:
```sql
SELECT Host, Disk, CASE WHEN PercentFree < 5.0 THEN PercentFree ELSE 0 END FROM (
SELECT
Host,
Disk,
Avg(PercentFree)
FROM DiskSpace
Group By
Host,
Disk
Where __timeFilter(Time)
```
This query returns the following Table response to Grafana:
| Host | Disk | PercentFree |
| ---- | ---- | ----------- |
| web1 | /etc | 3 |
| web2 | /var | 4 |
| web3 | /var | 0 |
When this query is used as the **condition** in an alert rule, then the non-zero will be alerting. As a result, three alert instances are produced:
| Labels | Status |
| --------------------- | -------- |
| {Host=web1,disk=/etc} | Alerting |
| {Host=web2,disk=/var} | Alerting |
| {Host=web3,disk=/var} | Normal |

View File

@@ -0,0 +1,30 @@
+++
title = "State and health of alerting rules"
description = "State and Health of alerting rules"
keywords = ["grafana", "alerting", "guide", "state"]
aliases = ["/docs/grafana/llatest/alerting/unified-alerting/alerting-rules/state-and-health/"]
+++
# State and health of alerting rules
The state and health of alerting rules help you understand several key status indicators about your alerts. There are three key components: alert state, alerting rule state, and alerting rule health. Although related, each component conveys subtly different information.
## Alerting rule state
- **Normal**: None of the time series returned by the evaluation engine is in a Pending or Firing state.
- **Pending**: At least one time series returned by the evaluation engine is Pending.
- **Firing**: At least one time series returned by the evaluation engine is Firing.
## Alert state
- **Normal**: Condition for the alerting rule is **false** for every time series returned by the evaluation engine.
- **Alerting**: Condition of the alerting rule is **true** for at least one time series returned by the evaluation engine. The duration for which the condition must be true before an alert fires, if set, is met or has exceeded.
- **Pending**: Condition of the alerting rule is **true** for at least one time series returned by the evaluation engine. The duration for which the condition must be true before an alert fires, if set, **has not** been met.
- **NoData**: the alerting rule has not returned a time series, all values for the time series are null, or all values for the time series are zero.
- **Error**: Error when attempting to evaluate an alerting rule.
## Alerting rule health
- **Ok**: No error when evaluating an alerting rule.
- **Error**: Error when evaluating an alerting rule.
- **NoData**: The absence of data in at least one time series returned during a rule evaluation.

View File

@@ -1,67 +0,0 @@
+++
title = "Grafana managed alert rules for numeric data"
description = "Grafana managed alert rules for numeric data"
keywords = ["grafana", "alerting", "guide", "rules", "create"]
weight = 400
+++
# Alerting on numeric data
Among certain data sources numeric data that is not time series can be directly alerted on, or passed into Server Side Expressions (SSE). This allows for more processing and resulting efficiency within the data source, and it can also simplify alert rules.
When alerting on numeric data instead of time series data, there is no need to reduce each labeled time series into a single number. Instead labeled numbers are returned to Grafana instead.
## Tabular Data
This feature is supported with backend data sources that query tabular data:
- SQL data sources such as MySQL, Postgres, MSSQL, and Oracle.
- The Azure Kusto based services: Azure Monitor (Logs), Azure Monitor (Azure Resource Graph), and Azure Data Explorer.
A query with Grafana managed alerts or SSE is considered numeric with these data sources, if:
- The "Format AS" option is set to "Table" in the data source query.
- The table response returned to Grafana from the query includes only one numeric (e.g. int, double, float) column, and optionally additional string columns.
If there are string columns then those columns become labels. The name of column becomes the label name, and the value for each row becomes the value of the corresponding label. If multiple rows are returned, then each row should be uniquely identified their labels.
## Example
For a MySQL table called "DiskSpace":
| Time | Host | Disk | PercentFree |
| ----------- | ---- | ---- | ----------- |
| 2021-June-7 | web1 | /etc | 3 |
| 2021-June-7 | web2 | /var | 4 |
| 2021-June-7 | web3 | /var | 8 |
| ... | ... | ... | ... |
You can query the data filtering on time, but without returning the time series to Grafana. For example, an alert that would trigger per Host, Disk when there is less than 5% free space:
```sql
SELECT Host, Disk, CASE WHEN PercentFree < 5.0 THEN PercentFree ELSE 0 END FROM (
SELECT
Host,
Disk,
Avg(PercentFree)
FROM DiskSpace
Group By
Host,
Disk
Where __timeFilter(Time)
```
This query returns the following Table response to Grafana:
| Host | Disk | PercentFree |
| ---- | ---- | ----------- |
| web1 | /etc | 3 |
| web2 | /var | 4 |
| web3 | /var | 0 |
When this query is used as the **condition** in an alert rule, then the non-zero will be alerting. As a result, three alert instances are produced:
| Labels | Status |
| --------------------- | -------- |
| {Host=web1,disk=/etc} | Alerting |
| {Host=web2,disk=/var} | Alerting |
| {Host=web3,disk=/var} | Normal |

View File

@@ -0,0 +1,62 @@
+++
title = " Configure high availability"
description = "High Availability"
keywords = ["grafana", "alerting", "tutorials", "ha", "high availability"]
weight = 450
+++
# High availability
The Grafana alerting system has two main components: a `Scheduler` and an internal `Alertmanager`. The `Scheduler` is responsible for the evaluation of your [alert rules]({{< relref "./fundamentals/evaluate-grafana-alerts.md" >}}) while the internal Alertmanager takes care of the **routing** and **grouping**.
When it comes to running Grafana alerting in high availability the operational mode of the scheduler is unaffected such that all alerts continue be evaluated in each Grafana instance. Rather the operational change happens in the Alertmanager which **deduplicates** alert notifications across Grafana instances.
```
.─────.
╲ ┌────────────────┐
( User )──────┐ ┌──────────────────────────────────┐ │ │
`. ,' │ │┌─────────┐ ┌──────────────┐ │ │ ▼
`───' │ ││Scheduler│──────▶Alertmananager│─┼──┘ ┌──────────────────────┐
│ ┌───────────┐ ┌─▶│└─────────┘ ▲──────────────┤ │ │ │
.─────. │ │ Load │ │ │Grafana │ │ │ │ │
╲ │ │ Balancing │ │ └─────────────────┼──────────────┼─┘ │ Integrations │
( User )──────┼─────▶│ Reverse │──┤ ┌─────────────────┼──────────────┼─┐ │ │
`. ,' │ │ Proxy │ │ │┌─────────┐ ├──────────────▼ │ │ │
`───' │ └───────────┘ │ ││Scheduler│──────▶Alertmananager│─┼──┐ └──────────────────────┘
│ └─▶│└─────────┘ └──────────────┘ │ │ ▲
.─────. │ │Grafana │ │ │
╲ │ └──────────────────────────────────┘ └────────────────┘
( User )──────┘
`. ,'
`───'
```
The coordination between Grafana instances happens via [a Gossip protocol](https://en.wikipedia.org/wiki/Gossip_protocol). Alerts are not gossiped between instances. It is expected that each scheduler delivers the same alerts to each Alertmanager.
The two types of messages that are gossiped between instances are:
- Notification logs: Who (which instance) notified what (which alert)
- Silences: If an alert should fire or not
These two states are persisted in the database periodically and when Grafana is gracefully shutdown.
## Enable high availability
To enable high availability support you need to add at least 1 Grafana instance to the [`[ha_peer]` configuration option]({{<relref"../../administration/configuration.md#unified_alerting">}}) within the `[unified_alerting]` section:
1. In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the `[unified_alerting]` section.
2. Set `[ha_peers]` to the number of hosts for each grafana instance in the cluster (using a format of host:port) e.g. `ha_peers=10.0.0.5:9094,10.0.0.6:9094,10.0.0.7:9094`
3. Gossiping of notifications and silences uses both TCP and UDP port 9094. Each Grafana instance will need to be able to accept incoming connections on these ports.
4. Set `[ha_listen_address]` to the instance IP address using a format of host:port (or the [Pod's](https://kubernetes.io/docs/concepts/workloads/pods/) IP in the case of using Kubernetes) by default it is set to listen to all interfaces (`0.0.0.0`).
## Kubernetes
If you are using Kubernetes, you can expose the pod IP [through an environment variable](https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/) via the container definition such as:
```bash
env:
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
```

View File

@@ -3,63 +3,58 @@ title = "Message templating"
description = "Message templating"
aliases = ["/docs/grafana/latest/alerting/message-templating/"]
keywords = ["grafana", "alerting", "guide", "contact point", "templating"]
weight = 400
weight = 440
+++
# Message templating
Notifications sent via [contact points]({{< relref "../contact-points.md" >}}) are built using templates. Grafana comes with default templates which you can customize. Grafana's notification templates are based on the [Go templating system](https://golang.org/pkg/text/template) where some fields are evaluated as text, while others are evaluated as HTML which can affect escaping. Since most of the contact point fields can be templated, you can create reusable templates and them in multiple contact points. See [template data reference]({{< relref "./template-data.md" >}}) to check what variables are available in the templates. The default template is defined in [default_template.go](https://github.com/grafana/grafana/blob/main/pkg/services/ngalert/notifier/channels/default_template.go) which can serve as a useful reference or starting point for custom templates.
Notifications sent via [contact points]({{< relref "../contact-points.md" >}}) are built using messaging templates. Grafana's default templates are based on the [Go templating system](https://golang.org/pkg/text/template) where some fields are evaluated as text, while others are evaluated as HTML (which can affect escaping). The default template, defined in [default_template.go](https://github.com/grafana/grafana/blob/main/pkg/services/ngalert/notifier/channels/default_template.go), is a useful reference for custom templates.
## Using templating in contact point fields
Since most of the contact point fields can be templated, you can create reusable custom templates and use them in multiple contact points. The [template data]({{< relref "./template-data.md" >}}) topic lists variables that are available for templating. The default template is defined in [default_template.go](https://github.com/grafana/grafana/blob/main/pkg/services/ngalert/notifier/channels/default_template.go) which can serve as a useful reference or starting point for custom templates.
This section shows an example of using templating to render a number of firing or resolved alerts in Slack message title, and listing alerts with status and name in the message body:
### Using templates
<img src="/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png" width="600px">
The following example shows the use of default templates to render an alert message in slack. The message title contains a count of firing or resolved alerts and the message body has a list of alerts with status.
## Reusable templates
<img src="/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png" width="450px">
You can create named templates and then reuse them in contact point fields or other templates.
The following example shows the use of a custom template within one of the contact point fields.
Grafana alerting UI allows you to configure templates for the Grafana managed alerts (handled by the embedded Alertmanager) as well as templates for an [external Alertmanager if one is configured]({{< relref "../../../datasources/alertmanager.md" >}}), using the Alertmanager dropdown.
<img src="/static/img/docs/alerting/unified/contact-points-use-template-8-0.png" width="400px">
> **Note:** Currently the configuration of the embedded Alertmanager is shared across organisations. Therefore users are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise templates for the Grafana managed alerts will be visible by all organizations
### Create a message template
### Create a template
> **Note:** Before Grafana v8.2, the configuration of the embedded Alertmanager was shared across organisations. Users of Grafana 8.0 and 8.1 are advised to use the new Grafana 8 alerts only if they have one organisation. Otherwise, silences for the Grafana managed alerts will be visible by all organizations.
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact points**.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. From [Alertmanager]({{< relref "../contact-points.md/#alertmanager" >}}) drop-down, select an external Alertmanager to create and manage templates for the external data source. Otherwise, keep the default option of Grafana.
{{< figure max-width="250px" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" caption="Select Alertmanager" >}}
1. Click **Add template**.
1. Fill in **Name** and **Content** fields.
1. In **Name**, add a descriptive name.
1. In **Content**, add the content of the template.
1. Click **Save template** button at the bottom of the page.
<img src="/static/img/docs/alerting/unified/templates-create-8-0.png" width="600px">
**Note** The template name used to reference this template in templating is not the value of the **Name** field, but the parameter to `define` tag in the content. When creating a template you can omit `define` entirely and it will be added automatically with same value as **Name** field. It's recommended to use the same name for `define` and **Name** field to avoid confusion.
The `define` tag in the Content section assigns the template name. This tag is optional, and when omitted, the template name is derived from the **Name** field. When both are specified, it is a best practice to ensure that they are the same.
<img src="/static/img/docs/alerting/unified/templates-create-8-0.png" width="600px">
### Edit a message template
### Edit a template
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. In the Template table, find the template you want to edit, then click the **Edit** (pen icon).
1. Make your changes, then click **Save template**.
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact points**.
1. Find the template you want to edit in the templates table and click the **pen icon** on the right side.
1. Make any changes and click **Save template** button at the bottom of the page.
### Delete a message template
### Delete a template
1. In the Alerting page, click **Contact points** to open the page listing existing contact points.
1. In the Template table, find the template you want to delete, then click the **Delete** (trash icon).
1. In the confirmation dialog, click **Yes, delete** to delete the template.
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Contact points**.
1. Find the template you want to edit in the templates table and click the **trash can icon** on the right side.
1. A confirmation dialog will open. Click **Yes, delete**.
Use caution when deleting a template since Grafana does not prevent you from deleting templates that are in use.
**Note** You are not prevented from deleting templates that are in use somewhere in contact points or other templates. Be careful!
### Custom template examples
### Use a template in a contact point field
To use a template:
Enter `{{ template "templatename" . }}` into a contact point field, where `templatename` is the `define` parameter of a template.
<img src="/static/img/docs/alerting/unified/contact-points-use-template-8-0.png" width="600px">
### Template examples
Here is an example of a template to render a single alert:
Template to render a single alert:
```
{{ define "alert" }}
@@ -100,9 +95,3 @@ Template to render entire notification message:
{{ end }}
{{ end }}
```
## Manage templates for an external Alertmanager
Grafana alerting UI supports managing external Alertmanager configuration. Once you add an [Alertmanager data source]({{< relref "../../../datasources/alertmanager.md" >}}), a dropdown displays at the top of the page, allowing you to select either `Grafana` or an external Alertmanager data source.
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" caption="Select Alertmanager" >}}

View File

@@ -2,72 +2,79 @@
title = "Notification policies"
description = "Notification policies"
keywords = ["grafana", "alerting", "guide", "notification policies", "routes"]
weight = 400
weight = 450
+++
# Notification policies
Notification policies determine how alerts are routed to contact points. Policies have a tree structure, where each policy can have one or more child policies. Each policy except for the root policy can also match specific alert labels. Each alert enters policy tree at the root and then traverses each child policy. If `Continue matching subsequent sibling nodes` is not checked, it stops at the first matching node, otherwise, it continues matching it's siblings as well. If an alert does not match any children of a policy, the alert is handled based on the configuration settings of this policy and notified to the contact point configured on this policy. Alert that does not match any specific policy is handled by the root policy.
Notification policies determine how alerts are routed to contact points. Policies have a tree structure, where each policy can have one or more child policies. Each policy, except for the root policy, can also match specific alert labels. Each alert is evaluated by the root policy and subsequently by each child policy. If you enable the `Continue matching subsequent sibling nodes` option is enabled for a specific policy, then evaluation continues even after one or more matches. A parent policys configuration settings and contact point information govern the behavior of an alert that does not match any of the child policies. A root policy governs any alert that does not match a specific policy.
Grafana alerting UI allows you to configure notification policies for the Grafana managed alerts (handled by the embedded Alertmanager) as well as notification policies for an [external Alertmanager if one is configured]({{< relref "../../datasources/alertmanager.md" >}}), using the Alertmanager dropdown.
You can configure Grafana managed notification policies as well as notification policies for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}). For more information, see [Alertmanager]({{< relref "./fundamentals/alertmanager.md" >}}).
> **Note:** Currently the configuration of the embedded Alertmanager is shared across organisations. Therefore users are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise notification policies for the Grafana managed alerts will be visible by all organizations.
## Edit root notification policy
## Edit notification policies
> **Note:** Before Grafana v8.2, the configuration of the embedded Alertmanager was shared across organisations. Users of Grafana 8.0 and 8.1 are advised to use the new Grafana 8 Alerts only if they have one organisation. Otherwise, silences for the Grafana managed alerts will be visible by all organizations.
To access notification policy editing page, In the Grafana side bar, hover your cursor over the **Alerting (bell)** icon and then click **Notification policies**.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **Notification policies**.
1. From the **Alertmanager** dropdown, select an external Alertmanager. By default, the Grafana Alertmanager is selected.
1. In the Root policy section, click **Edit** (pen icon).
1. In **Default contact point**, update the [contact point]({{< relref "./contact-points.md" >}}) to whom notifications should be sent for rules when alert rules do not match any specific policy.
1. In **Group by**, choose labels to group alerts by. If multiple alerts are matched for this policy, then they are grouped by these labels. A notification is sent per group. If the field is empty (default), then all notifications are sent in a single group. Use a special label `...` to group alerts by all labels (which effectively disables grouping).
1. In **Timing options**, select from the following options:
- **Group wait** Time to wait to buffer alerts of the same group before sending an initial notification. Default is 30 seconds.
- **Group interval** Minimum time interval between two notifications for a group. Default is 5 minutes.
- **Repeat interval** Minimum time interval for re-sending a notification if no new alerts were added to the group. Default is 4 hours.
1. Click **Save** to save your changes.
### Edit root notification policy
## Add new specific policy
1. Click **edit** button on the top right of the root policy box.
1. Make changes and click **save** button.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. Click **Notification policies**.
1. From the **Alertmanager** dropdown, select an Alertmanager. By default, the Grafana Alertmanager is selected.
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 ["How label matching works"](#how-label-matching-works).
1. In **Contact point**, add the [contact point]({{< relref "./contact-points.md" >}}) 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 **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.
### Add new specific policy
## Add nested policy
To add a top level specific policy, click **New policy** button in the **Specific routing** section, fill in the form and click **Save policy**.
1. Expand the specific policy you want to update.
1. Click **Add nested policy**, then add the details using information in [Add new specific policy](#add-new-specific-policy).
1. Click **Save policy** to save your changes.
To add a nested policy to an existing specific policy, expand the parent policy in specific routing table and click **Add nested policy**. fill in the form and click **Save policy**.
## Edit specific policy
### Edit specific policy
1. In the Alerting page, click **Notification policies** to open the page listing existing policies.
1. Find the policy you want to edit, then click **Edit** (pen icon).
1. Make any changes using instructions in [Add new specific policy](#add-new-specific-policy).
1. Click **Save policy**.
To edit a specific policy, find it in the specific routing table and click **Edit** button. Make your changes and click **Save policy**.
## How label matching works
### Root policy fields
- **Default contact point -** The [contact point]({{< relref "./contact-points.md" >}}) to send notifications to that did not match any specific policy.
- **Group by -** Labels to group alerts by. If multiple alerts are matched for this policy, they will be grouped based on these labels and a notification will be sent per group. If the field is empty (default), then all notifications are sent in a single group. Use a special label `...` to group alerts by all labels, which effectively disables grouping.
Group timing options
- **Group wait -** - How long to wait to buffer alerts of the same group before sending a notification initially. Default is 30 seconds.
- **Group interval -** - How long to wait before sending an notification when an alert has been added to a group for which there has already been a notification. Default is 5 minutes.
- **Repeat interval -** - How long to wait before re-sending a notification after one has already been sent and no new alerts were added to the group. Default is 4 hours.
### Specific routing policy fields
- **Contact point -** The [contact point]({{< relref "./contact-points.md" >}}) to send notification to if alert matched this specific policy but did not match any of it's nested policies, or there were no nested specific policies.
- **Matching labels -** Rules for matching alert labels. See ["How label matching works"](#how-label-matching-works) below for details.
- **Continue matching subsequent sibling nodes -** If not enabled and an alert matches this policy but not any of it's nested policies, matching will stop and a notification will be sent to the contact point defined on this policy. If enabled, notification will be sent but alert will continue matching subsequent siblings of this policy, thus sending more than one notification. Use this if for example you want to send notification to a catch-all contact point as well as to one of more specific contact points handled by subsequent policies.
- **Override grouping** - Toggle if you want to override grouping for this policy. If toggled, you will be able to specify grouping same as for root policy described above. If not toggled, root policy grouping will be used.
- **Override group timings** Toggle if you want to override group timings for this policy. If toggled, you will be able to specify group timings same as for root policy described above. If not toggled, root policy group timings will be used.
### How label matching works
A policy will match an alert if alert's labels match all of the "Matching Labels" specified on the policy.
A policy will match an alert if the alert's labels match all the "Matching Labels" specified on the policy.
- The **Label** field is the name of the label to match. It must exactly match the label name.
- The **Value** field matches against the corresponding value for the specified **Label** name. How it matches depends on the **Regex** and **Equal** checkboxes.
- The **Regex** checkbox specifies if the inputted **Value** should be matched against labels as a regular expression. The regular expression is always anchored. If not selected it is an exact string match.
- The **Equal** checkbox specifies if the match should include alert instances that match or do not match. If not checked, the silence includes alert instances _do not_ match.
- The **Operator** field is the operator to match against the label value. The available operators are:
## Example setup
- `=`: Select labels that are exactly equal to the provided string.
- `!=`: Select labels that are not equal to the provided string.
- `=~`: Select labels that regex-match the provided string.
- `!~`: Select labels that do not regex-match the provided string.
One usage example would be:
- The **Value** field matches against the corresponding value for the specified **Label** name. How it matches depends on the **Operator** value.
- Create a "default" contact point for most alerts with a non invasive contact point type, like a slack message, and set it on root policy
- Edit root policy grouping to group alerts by `cluster`, `namespace` and `alertname` so you get a notification per alert rule and specific k8s cluster & namespace.
- Create specific route for alerts coming from development cluster with an appropriate contact point
- Create a specific route for alerts with "critical" severity with a more invasive contact point type, like pager duty notification
- Create specific routes for particular teams that handle their own onduty rotations
## Example
![Notification policies screenshot](/static/img/docs/alerting/unified/notification-policies-8-0.png 'Notification policies screenshot')
An example of an alert configuration.
- Create a "default" contact point for slack notifications, and set it on root policy.
- Edit the root policy grouping to group alerts by `cluster`, `namespace` and `severity` so that you get a notification per alert rule and specific kubernetes cluster and namespace.
- Create specific route for alerts coming from the development cluster with an appropriate contact point.
- Create a specific route for alerts with "critical" severity with a more invasive contact point type, like pager duty notification.
- Create specific routes for particular teams that handle their own onduty rotations.
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/notification-policies-8-0.png" max-width="650px" caption="Notification policies" >}}

View File

@@ -1,36 +1,56 @@
+++
title = "Opt-in to Grafana 8 Alerts"
title = "Opt-in to Grafana 8 alerting"
description = "Enable Grafana 8 Alerts"
weight = 128
weight = 115
+++
# Enable Grafana 8 Alerts
# Opt-in to Grafana 8 alerting
Setting the `ngalert` feature toggle enables the new Grafana 8 alerting system.
This topic describes how to opt-in to Grafana 8 alerting and the rules and restrictions that govern the migration of existing dashboard alerts to the new alerting system. You can [disable Grafana 8 alerts]({{< relref "./opt-in.md#disable-grafana-8-alerts" >}}) and use the legacy dashboard alerting if needed.
> **Note:** We recommend that you backup Grafana's database before enabling this feature. If you are using PostgreSQL as the backend data source, then the minimum required version is 9.5.
Before you begin, we recommend that you backup Grafana's database. If you are using PostgreSQL as the backend data source, then the minimum required version is 9.5.
At startup, when [the feature toggle is enabled]({{< relref "../../administration/configuration.md">}}#feature_toggles), the legacy Grafana dashboard alerting is disabled and existing dashboard alerts are migrated into a format that is compatible with the Grafana 8 alerting system. You can view these migrated rules, alongside any new alerts you create after the migration, from the Alerting page of your Grafana instance.
## Enable Grafana 8 alerting
> **Note - v8.2 or earlier:** Since the new system stores the notification log and silences on disk, we require the use of persistent disks for using Grafana 8 alerts. Otherwise, the silences and notification log will get lost on a restart, and you might get unwanted or duplicate notifications.
To enable Grafana 8 alerts:
> **Note - v8.3+**: We have removed the need of persistent disk. The notification log and silences are now stored in the database. If you used the file-based approach, we'll read those files and eventually (every 15 minutes) persist them to the database.
1. In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the [unified alerts]({{< relref "../../administration/configuration.md#unified_alerting" >}}) section.
1. Set the `enabled` property to `true`.
1. Next, for [legacy dashboard alerting]({{< relref "../../administration/configuration.md#alerting" >}}), set the `enabled` flag to `false`.
1. Restart Grafana for the configuration changes to take effect.
Read and write access to dashboard alerts in Grafana versions 7 and earlier were governed by the dashboard and folder permissions under which the alerts were stored. In Grafana 8, alerts are stored in folders and inherit the permissions of those folders. During the migration, dashboard alert permissions are matched to the new rules permissions as follows:
> **Note:** The `ngalert` toggle previously used to enable or disable Grafana 8 alerting is no longer available.
Before v8.2, notification logs and silences were stored on a disk. If you did not use persistent disks, you would have lost any configured silences and logs on a restart, resulting in unwanted or duplicate notifications. We no longer require the use of a persistent disk. Instead, the notification logs and silences are stored regularly (every 15 minutes). If you used the file-based approach, Grafana reads the existing file and persists it eventually.
## Migrating legacy alerts to Grafana 8 alerting system
When Grafana 8 alerting is enabled, existing legacy dashboard alerts migrate in a format compatible with the Grafana 8 alerting. In the Alerting page of your Grafana instance, you can view the migrated alerts alongside new alerts.
Read and write access to legacy dashboard alerts and Grafana 8 alerts are governed by the permissions of the folders storing them. During migration, legacy dashboard alert permissions are matched to the new rules permissions as follows:
- If alert's dashboard has permissions, it will create a folder named like `Migrated {"dashboardUid": "UID", "panelId": 1, "alertId": 1}` to match permissions of the dashboard (including the inherited permissions from the folder).
- If there are no dashboard permissions and the dashboard is under a folder, then the rule is linked to this folder and inherits its permissions.
- If there are no dashboard permissions and the dashboard is under the General folder, then the rule is linked to the `General Alerting` folder and the rule inherits the default permissions.
- If there are no dashboard permissions and the dashboard is under the General folder, then the rule is linked to the `General Alerting` folder, and the rule inherits the default permissions.
During beta, Grafana 8 alerting system can retrieve rules from all available Prometheus, Loki, and Alertmanager data sources. It might not be able to fetch rules from all other supported data sources at this time.
> **Note:** Since there is no `Keep Last State` option for [`No Data` and `Error handling`]({{< relref "./alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) in Grafana 8 alerting, this option becomes `Alerting` during the legacy rules migration.
Also notification channels are migrated to an Alertmanager configuration with the appropriate routes and receivers. Default notification channels are added as contact points to the default route. Notification channels not associated with any Dashboard alert go to the `autogen-unlinked-channel-recv` route.
Notification channels are migrated to an Alertmanager configuration with the appropriate routes and receivers. Default notification channels are added as contact points to the default route. Notification channels not associated with any Dashboard alert go to the `autogen-unlinked-channel-recv` route.
Since `Hipchat` and `Sensu` are discontinued, they are not migrated to the new alerting. If you have dashboard alerts associated with those types of channels and you want to migrate to the new alerting, make sure you assign another supported notification channel, so that you continue to receive notifications for those alerts.
Finally, silences (expiring after one year) are created for all paused dashboard alerts.
Since `Hipchat` and `Sensu` notification channels are no longer supported, legacy alerts associated with these channels are not automatically migrated to Grafana 8 alerting. Assign the legacy alerts to a supported notification channel so that you continue to receive notifications for those alerts.
Silences (expiring after one year) are created for all paused dashboard alerts.
## Disabling Grafana 8 Alerting after migration
### Limitation
To disable Grafana 8 Alerting, remove or disable the `ngalert` feature toggle. Dashboard alerts will be re-enabled and any alerts created during or after the migration are deleted.
Grafana 8 alerting system can retrieve rules from all available Prometheus, Loki, and Alertmanager data sources. It might not be able to fetch alerting rules from all other supported data sources at this time.
> **Note:** Any alerting rules created in the Grafana 8 Alerting system will be lost when migrating back to dashboard alerts
## Disable Grafana 8 alerts
To disable Grafana 8 alerts and enable legacy dashboard alerts:
1. In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the [Grafana 8 alerting]({{< relref "../../administration/configuration.md#unified_alerting" >}}) section.
1. Set the `enabled` property to `false`.
1. For [legacy dashboard alerting]({{< relref "../../administration/configuration.md#alerting" >}}), set the `enabled` flag to `true`.
1. Restart Grafana for the configuration changes to take effect.
> **Note:** If you choose to migrate from Grafana 8 alerting to legacy dashboard alerting, you will lose any new alerts created in the Grafana 8 alerting system.

View File

@@ -1,57 +1,64 @@
+++
title = "Silence alert notifications"
description = "Silence alert notifications"
title = "Silences"
description = "Silences alert notifications"
keywords = ["grafana", "alerting", "silence", "mute"]
weight = 400
+++
# Silence alert notifications
# Silences
Grafana allows to you to prevent notifications from one or more alert rules by creating a silence. This silence lasts for a specified window of time.
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 being shown in the user interface. Silences only prevent notifications from being created.
Grafana alerting UI allows you to configure silences for the Grafana managed alerts (handled by the embedded Alertmanager) as well as silences for an [external Alertmanager if one is configured]({{< relref "../../datasources/alertmanager.md" >}}), using the Alertmanager dropdown.
You can configure Grafana managed silences as well as silences for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}). For more information, see [Alertmanager]({{< relref "./fundamentals/alertmanager.md" >}}).
> **Note:** Currently the configuration of the embedded Alertmanager is shared across organisations. Therefore users are advised to use the new Grafana 8 Alerts only if they have one organisation otherwise silences for the Grafana managed alerts will be visible by all organizations.
> **Note:** Before Grafana v8.2, the configuration of the embedded Alertmanager was shared across organisations. Users of Grafana 8.0 and 8.1 are advised to use the new Grafana 8 Alerts only if they have one organisation. Otherwise, silences for the Grafana managed alerts will be visible by all organizations.
## Add a silence
To add a silence:
1. In the Grafana menu, hover your cursor over the **Alerting** (bell) icon and then select **Silences** (crossed out bell icon).
1. Click the **New Silence** button.
1. Select the start and end date in **Silence start and end** to indicate when the silence should go into effect and expire.
1. Optionally, update the **Duration** to alter the time for the end of silence in the previous step to correspond to the start plus the duration.
1. Enter one or more _Matching Labels_ by filling out the **Name** and **Value** fields. Matchers determine which rules the silence will apply to.
1. Enter a **Comment**.
1. Enter the name of the owner in **Creator**.
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
1. In the Alerting page, click **Silences** to open the page listing existing contact points.
1. From [Alertmanager]({{< relref "./contact-points.md/#alertmanager" >}}) drop-down, select an external Alertmanager to create and manage silences for the external data source. Otherwise, keep the default option of Grafana.
1. Click **New Silence** to open the Create silence page.
1. In **Silence start and end**, select the start and end date to indicate when the silence should go into effect and expire.
1. Optionally, in **Duration**, specify how long the silence is enforced. This automatically updates the end time in the **Silence start and end** field.
1. In the **Name** and **Value** fields, enter one or more _Matching Labels_. Matchers determine which rules the silence will apply to. For more information, see [Label matching for alert suppression](#label-matching-for-alert-suppression).
1. In **Comment**, add details about the silence.
1. In **Creator**, enter the name of the silence owner or keep the default owner.
1. Click **Create**.
## How label matching works
### Label matching for alert suppression
Alert instances that have labels that match all of the "Matching Labels" specified in the silence will have their notifications suppressed.
Grafana suppresses notifications only for alerts with labels that match all the "Matching Labels" specified in the silence.
- The **Label** field is the name of the label to match. It must exactly match the label name.
- The **Value** field matches against the corresponding value for the specified **Label** name. How it matches depends on the **Regex** and **Equal** checkboxes.
- The **Regex** checkbox specifies if the inputted **Value** should be matched against labels as a regular expression. The regular expression is always anchored. If not selected it is an exact string match.
- The **Equal** checkbox specifies if the match should include alert instances that match or do not match. If not checked, the silence includes alert instances _do not_ match.
- The **Operator** field is the operator to match against the label value. The available operators are:
## Viewing and editing silences
- `=`: Select labels that are exactly equal to the provided string.
- `!=`: Select labels that are not equal to the provided string.
- `=~`: Select labels that regex-match the provided string.
- `!~`: Select labels that do not regex-match the provided string.
1. In the Grafana menu hover your cursor over the **Alerting** (bell) icon, then select **Silences** (crossed out bell icon).
1. To end the silence, click the **Unsilence** option next to the listed silence. Silences that have ended are still listed and are automatically removed after 5 days. There is no method for manual removal.
1. To edit a silence, click the pencil icon next to the listed silence. Edit the silence using instructions on how to create a silence.
1. Click **Submit** to save your changes.
- The **Value** field matches against the corresponding value for the specified **Label** name. How it matches depends on the **Operator** value.
## Manage silences for an external Alertmanager
1. In the Alerting page, click **Silences** to view the list of existing silences.
1. Find the silence you want to edit, then click **Edit** (pen icon).
1. Make changes, then click **Submit** to save your changes.
Grafana alerting UI supports managing external Alertmanager silences. Once you add an [Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}), a dropdown displays at the top of the page where you can select either `Grafana` or an external Alertmanager as your data source.
## Remove silences
1. In the Alerting page, click **Silences** to view the list of existing silences.
1. Find the silence you want to end, then click **Unsilence**.
> **Note:** Silences that have ended are retained and listed for five days. You cannot remove a silence manually.
## Create a URL to silence form with defaults filled in
When linking to a silence form, provide the default matching labels and comment via `matchers` and `comment` query parameters. The `matchers` parameter requires one more matching labels of the type `[label][operator][value]` joined by a comma while the `operator` parameter can be one of the following: `=` (equals, not regex), `!=` (not equals, not regex), `=~` (equals, regex), `!~` (not equals, regex).
For example, to link to silence form with matching labels `severity=critical` & `cluster!~europe-.*` and comment `Silence critical EU alerts`, create a URL `https://mygrafana/aleting/silence/new?matchers=severity%3Dcritical%2Ccluster!~europe-*&comment=Silence%20critical%20EU%20alert`.
For example, to link to silence form with matching labels `severity=critical` & `cluster!~europe-.*` and comment `Silence critical EU alerts`, create a URL `https://mygrafana/alerting/silence/new?matchers=severity%3Dcritical%2Ccluster!~europe-*&comment=Silence%20critical%20EU%20alert`.
To link to a new silence page for an [external Alertmanager]({{< relref "../../datasources/alertmanager.md" >}}), add a `alertmanager` query parameter with the Alertmanager data source name.

View File

@@ -7,45 +7,44 @@ weight = 700
# Azure AD OAuth2 authentication
> Only available in Grafana v6.7+
The Azure AD authentication allows you to use an Azure Active Directory tenant as an identity provider for Grafana. You can use Azure AD Application Roles to assign users and groups to Grafana roles from the Azure Portal. This topic has the following sections:
The Azure AD authentication allows you to use an Azure Active Directory tenant as an identity provider for Grafana. You can use Azure AD Application Roles to assign users and groups to Grafana roles from the Azure Portal.
- [Create the Azure AD application](#create-the-azure-ad-application)
- [Enable Azure AD OAuth in Grafana](#enable-azure-ad-oauth-in-grafana)
## Create the Azure AD application
To enable the Azure AD OAuth2 you must register your application with Azure AD.
To enable the Azure AD OAuth2, register your application with Azure AD.
1. Log in to [Azure Portal](https://portal.azure.com) and click **Azure Active Directory** in the side menu. If you have access to more than one tenant, select your account in the upper right. Set your session to the Azure AD tenant you wish to use.
1. Log in to [Azure Portal](https://portal.azure.com), then click **Azure Active Directory** in the side menu.
1. Under **Manage** in the side menu, click **App Registrations** and then **New Registration**. Provide a fitting name.
1. If you have access to more than one tenant, select your account in the upper right. Set your session to the Azure AD tenant you wish to use.
1. Under **Redirect URI**, select **Web** as the app type.
1. Under **Manage** in the side menu, click **App Registrations** > **New Registration**. Enter a descriptive name.
1. Add the redirect URL `https://<grafana domain>/login/azuread`, then click **Register**.
1. Under **Redirect URI**, select the app type **Web**.
1. The app's **Overview** page is displayed. Note the **Application ID**. This is the OAuth client ID.
1. Add the following redirect URLs `https://<grafana domain>/login/azuread` and `https://<grafana domain>` then click **Register**. The app's **Overview** page opens.
1. Note the **Application ID**. This is the OAuth client ID.
1. Click **Endpoints** from the top menu.
- Note the **OAuth 2.0 authorization endpoint (v2)**. This is the auth URL.
- Note the **OAuth 2.0 authorization endpoint (v2)** URL. This is the authorization URL.
- Note the **OAuth 2.0 token endpoint (v2)**. This is the token URL.
1. Click **Certificates & secrets** and then add a new entry under **Client secrets**.
1. Click **Certificates & secrets**, then add a new entry under **Client secrets** with the following configuration.
- Description: Grafana OAuth
- Expires: Never
1. Click **Add**, and then copy the key value. This is the OAuth client secret.
1. Click **Add** then copy the key value. This is the OAuth client secret.
1. Click **Manifest**.
1. Click **Manifest**, then define the required Application Role values for Grafana: Viewer, Editor, or Admin. If not defined, all users will have the Viewer role. Every role requires a unique ID which you can generate on Linux with `uuidgen`, and on Windows through Microsoft PowerShell with `New-Guid`.
- Define the required Application Role values for Grafana: Viewer, Editor, Admin. Otherwise, all users will have the Viewer role.
- Every role requires a unique ID.
- Generate the unique ID on Linux with `uuidgen`, and on Windows through Microsoft
PowerShell with `New-Guid`.
- Include the unique ID in the configuration file:
1. Include the unique ID in the configuration file:
```json
```json
"appRoles": [
{
"allowedMemberTypes": [
@@ -84,7 +83,7 @@ To enable the Azure AD OAuth2 you must register your application with Azure AD.
"value": "Editor"
}
],
```
```
1. Go to **Azure Active Directory** and then to **Enterprise Applications**. Search for your application and click on it.
@@ -94,7 +93,7 @@ To enable the Azure AD OAuth2 you must register your application with Azure AD.
1. Add the following to the [Grafana configuration file]({{< relref "../administration/configuration.md#config-file-locations" >}}):
```ini
```
[auth.azuread]
name = Azure AD
enabled = true
@@ -109,46 +108,44 @@ allowed_groups =
```
You can also use these environment variables to configure **client_id** and **client_secret**:
```
GF_AUTH_AZUREAD_CLIENT_ID
GF_AUTH_AZUREAD_CLIENT_SECRET
```
**Note:** Ensure that the [root_url]({{< relref "../administration/configuration/#root-url" >}}) in Grafana is set in your Azure Application Reply URLs (**App** -> **Settings** -> **Reply URLs**)
**Note:** Verify that the Grafana [root_url]({{< relref "../administration/configuration/#root-url" >}}) is set in your Azure Application Redirect URLs.
### Configure allowed groups
To limit access to authenticated users who are members of one or more groups, set `allowed_groups`
to a comma- or space-separated list of group object IDs. You can find object IDs for a specific group on the Azure portal:
1. Go to **Azure Active Directory -> Groups**.
1. Go to **Azure Active Directory -> Groups**. If you want to only give access to members of the group `example` with an ID of `8bab1c86-8fba-33e5-2089-1d1c80ec267d`, then set the following:
For example, if you want to only give access to members of the group `example` with an ID of `8bab1c86-8fba-33e5-2089-1d1c80ec267d`, set the following:
```
allowed_groups = 8bab1c86-8fba-33e5-2089-1d1c80ec267d
```
```ini
allowed_groups = 8bab1c86-8fba-33e5-2089-1d1c80ec267d
```
1. Verify that [group attributes](https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-fed-group-claims#configure-the-azure-ad-application-registration-for-group-attributes) is enabled in your Azure AD Application Registration manifest file by navigating to **Azure Portal** > **Azure Active Directory** > **Application Registrations** > **Select Application** -> **Manifest**, and set the following:
You'll need to ensure that you've [enabled group attributes](https://docs.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-fed-group-claims#configure-the-azure-ad-application-registration-for-group-attributes) in your Azure AD Application Registration manifest file. Navigate to **Azure Portal** -> **Azure Active Directory** -> **Application Registrations** -> **Select Application** -> **Manifest**, and set the following:
```json
"groupMembershipClaims": "ApplicationGroup, SecurityGroup"
```
```
"groupMembershipClaims": "ApplicationGroup, SecurityGroup"
```
### Configure allowed domains
The `allowed_domains` option limits access to users who belong to specific domains. Separate domains with space or comma.
The `allowed_domains` option limits access to users who belong to specific domains. Separate domains with space or comma. For example,
```ini
```
allowed_domains = mycompany.com mycompany.org
```
### Team Sync (Enterprise only)
> Only available in Grafana Enterprise v6.7+
With Team Sync you can map your Azure AD groups to teams in Grafana so that your users will automatically be added to
the correct teams.
You can reference Azure AD groups by group object ID, like `8bab1c86-8fba-33e5-2089-1d1c80ec267d`.
[Learn more about Team Sync]({{< relref "team-sync.md" >}})
To learn more, refer to the [Team Sync]({{< relref "team-sync.md" >}}) documentation.

View File

@@ -11,7 +11,7 @@ weight = 300
The LDAP integration in Grafana allows your Grafana users to login with their LDAP credentials. You can also specify mappings between LDAP
group memberships and Grafana Organization user roles.
> [Enhanced LDAP authentication]({{< relref "../enterprise/enhanced_ldap.md" >}}) is available in [Grafana Cloud Pro and Advanced](https://grafana.com/docs/grafana-cloud/) and in [Grafana Enterprise]({{< relref "../enterprise" >}}).
> [Enhanced LDAP authentication]({{< relref "../enterprise/enhanced_ldap.md" >}}) is available in [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/) and in [Grafana Enterprise]({{< relref "../enterprise" >}}).
> Refer to [Fine-grained access control]({{< relref "../enterprise/access-control/_index.md" >}}) in Grafana Enterprise to understand how you can control access with fine-grained permissions.

View File

@@ -27,11 +27,11 @@ Here is an example showing height distribution of people.
For more information about histogram visualization options, refer to [Histogram]({{< relref "../visualizations/histogram.md" >}}).
Histograms only look at _value distributions_ over a specific time range. The problem with histograms is you cannot see any trends or changes in the distribution over time. This is where heatmaps become useful.
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.
## Heatmaps
A _heatmap_ is like a histogram, but over time where each time slice represents its own histogram. Instead of using bar height as a representation of frequency, it uses cells and colors the cell proportional to the number of values in the bucket.
A _heatmap_ is like a histogram, but over time, where each time slice represents its own histogram. Instead of using bar height as a representation of frequency, it uses cells, and colors the cell proportional to the number of values in the bucket.
In this example, you can clearly see what values are more common and how they trend over time.
@@ -41,22 +41,23 @@ For more information about heatmap visualization options, refer to [Heatmap]({{<
## Pre-bucketed data
There are a number of data sources supporting histogram over time like Elasticsearch (by using a Histogram bucket
There are a number of data sources supporting histogram over time, like Elasticsearch (by using a Histogram bucket
aggregation) or Prometheus (with [histogram](https://prometheus.io/docs/concepts/metric_types/#histogram) metric type
and _Format as_ option set to Heatmap). But generally, any data source could be used if it meets the requirements:
returns series with names representing bucket bound or returns series sorted by the bound in ascending order.
and _Format as_ option set to Heatmap). But generally, any data source could be used as long as it meets the requirement
that it either returns series with names representing bucket bounds, or that it returns series sorted by the bounds
in ascending order.
## Raw data vs aggregated
If you use the heatmap with regular time series data (not pre-bucketed), then it's important to keep in mind that your data
is often already aggregated by your time series backend. Most time series queries do not return raw sample data
but include a group by time interval or maxDataPoints limit coupled with an aggregation function (usually average).
is often already aggregated by your time series backend. Most time series queries do not return raw sample data,
but instead include a group by time interval or maxDataPoints limit coupled with an aggregation function (usually average).
This all depends on the time range of your query of course. But the important point is to know that the histogram bucketing
that Grafana performs might be done on already aggregated and averaged data. To get more accurate heatmaps it is better
to do the bucketing during metric collection or store the data in Elasticsearch, or in the other data source which
that Grafana performs might be done on already aggregated and averaged data. To get more accurate heatmaps, it is better
to do the bucketing during metric collection, or to store the data in Elasticsearch or any other data source which
supports doing histogram bucketing on the raw data.
If you remove or lower the group by time (or raise maxDataPoints) in your query to return more data points your heatmap will be
more accurate but this can also be very CPU and memory taxing for your browser and could cause hangs and crashes if the number of
If you remove or lower the group by time (or raise maxDataPoints) in your query to return more data points, your heatmap will be
more accurate, but this can also be very CPU and memory taxing for your browser, possibly causing hangs or crashes if the number of
data points becomes unreasonably large.

View File

@@ -22,7 +22,7 @@ To identify unique series within a set of time series, Grafana stores dimensions
## Labels
Each time series in Grafana optionally has labels. labels are set a of key/value pairs for identifying dimensions. Example labels could are `{location=us}` or `{country=us,state=ma,city=boston}`. Within a set of time series, the combination of its name and labels identifies each series. For example, `temperature {country=us,state=ma,city=boston}`.
Each time series in Grafana optionally has labels. Labels are set a of key/value pairs for identifying dimensions. Example labels could be `{location=us}` or `{country=us,state=ma,city=boston}`. Within a set of time series, the combination of its name and labels identifies each series. For example, `temperature {country=us,state=ma,city=boston}` could identify the series of temperature values for the city of Boston in the US.
Different sources of time series data have dimensions stored natively, or common storage patterns that allow the data to be extracted into dimensions.
@@ -32,7 +32,7 @@ In table databases such SQL, these dimensions are generally the `GROUP BY` param
## Multiple dimensions in table format
In SQL or SQL-like databases that return table responses, additional dimensions usually columns in the query response table.
In SQL or SQL-like databases that return table responses, additional dimensions are usually represented as columns in the query response table.
### Single dimension
@@ -44,7 +44,7 @@ SELECT BUCKET(StartTime, 1h), AVG(Temperature) AS Temp, Location FROM T
ORDER BY time asc
```
Might return a table with three columns that each respectively have data types time, number, and string.
This query would return a table with three columns with data types time, number, and string respectively:
| StartTime | Temp | Location |
| --------- | ---- | -------- |
@@ -53,7 +53,7 @@ Might return a table with three columns that each respectively have data types t
| 10:00 | 26 | LGA |
| 10:00 | 22 | BOS |
The table format is _long_ formatted time series, also called _tall_. It has repeated time stamps, and repeated values in Location. In this case, we have two time series in the set that would be identified as `Temp {Location=LGA}` and `Temp {Location=BOS}`.
The table format is a _long_ formatted time series, also called _tall_. It has repeated time stamps, and repeated values in Location. In this case, we have two time series in the set that would be identified as `Temp {Location=LGA}` and `Temp {Location=BOS}`.
Individual time series from the set are extracted by using the time typed column `StartTime` as the time index of the time series, the numeric typed column `Temp` as the series name, and the name and values of the string typed `Location` column to build the labels, such as Location=LGA.
@@ -80,6 +80,6 @@ In this case the labels that represent the dimensions will have two keys based o
### Multiple values
In the case 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.
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.md#data-frames-as-time-series" >}}).

View File

@@ -15,9 +15,9 @@ Imagine you wanted to know how the temperature outside changes throughout the da
| 10:00 | 26°C |
| 11:00 | 27°C |
Temperature data like this is one example of what we call a _time series_a sequence of measurements, ordered in time. Every row in the table represents one individual measurement at a specific time.
Temperature data like this is one example of what we call a _time series_a sequence of measurements, ordered in time. Every row in the table represents one individual measurement at a specific time.
Tables are useful when you want to identify individual measurements but make it difficult to see the big picture. A more common visualization for time series is the _graph_, which instead places each measurement along a time axis. Visual representations like the graph make it easier to discover patterns and features of the data that otherwise would be difficult to see.
Tables are useful when you want to identify individual measurements, but they make it difficult to see the big picture. A more common visualization for time series is the _graph_, which instead places each measurement along a time axis. Visual representations like the graph make it easier to discover patterns and features of the data that otherwise would be difficult to see.
{{< figure src="/static/img/docs/example_graph.png" class="docs-image--no-shadow" max-width="850px" >}}
@@ -29,14 +29,14 @@ Temperature data like the one in the example, is far from the only example of a
While each of these examples are sequences of chronologically ordered measurements, they also share other attributes:
- New data is appended at the end, at regular intervalsfor example, hourly at 09:00, 10:00, 11:00, and so on.
- Measurements are seldom updated after they were addedfor example, yesterday's temperature doesn't change.
- New data is appended at the end, at regular intervalsfor example, hourly at 09:00, 10:00, 11:00, and so on.
- Measurements are seldom updated after they were addedfor example, yesterday's temperature doesn't change.
Time series are powerful. They help you understand the past by letting you analyze the state of the system at any point in time. Time series could tell you that the server crashed moments after the free disk space went down to zero.
Time series can also help you predict the future, by uncovering trends in your data. If the number of registered users has been increasing monthly by 4% for the past few months, you can predict how big your user base is going to be at the end of the year.
Some time series have patterns that repeat themselves over a known period. For example, the temperature is typically higher during the day, before it dips down at night. By identifying these periodic, or _seasonal_, time series, you can make confident predictions about the next period. If we know that the system load peaks every day around 18:00, we can add more machines right before.
Some time series have patterns that repeat themselves over a known period. For example, the temperature is typically higher during the day, before it dips down at night. By identifying these periodic, or _seasonal_, time series, you can make confident predictions about the next period. If you know that the system load peaks every day around 18:00, you can add more machines right before.
## Aggregating time series
@@ -45,7 +45,7 @@ Depending on what you're measuring, the data can vary greatly. What if you wante
Combining a collection of measurements is called _aggregation_. There are several ways to aggregate time series data. Here are some common ones:
- **Average** returns the sum of all values divided by the total number of values.
- **Min** and **Max** return the smallest, and largest value in the collection.
- **Min** and **Max** return the smallest and largest value in the collection.
- **Sum** returns the sum of all values in the collection.
- **Count** returns the number of values in the collection.
@@ -81,26 +81,26 @@ We could even take it a step further, by calculating the deltas of these deltas:
1572524345, +30, -1, +1, +0
```
If measurements are taken at regular intervals, most of these delta-of-deltas will be 0. Because of optimizations like these, TSDBs uses drastically less space than other databases.
If measurements are taken at regular intervals, most of these delta-of-deltas will be 0. Because of optimizations like these, TSDBs use drastically less space than other databases.
Another feature of a TSDB is the ability to filter measurements using _tags_. Each data point is labeled with a tag that adds context information, such as where the measurement was taken. Here's an example of the [InfluxDB data format](https://docs.influxdata.com/influxdb/v1.7/write_protocols/line_protocol_tutorial/#syntax) that demonstrates how each measurement is stored.
```
weather,location=us-midwest temperature=82 1465839830100400200
| -------------------- -------------- |
| | | |
| | | |
+-----------+--------+-+---------+-+---------+
|measurement|,tag_set| |field_set| |timestamp|
+-----------+--------+-+---------+-+---------+
```
Here are some of the TSDBs supported by Grafana:
- [Graphite](https://graphiteapp.org/)
- [InfluxDB](https://www.influxdata.com/products/influxdb-overview/)
- [Prometheus](https://prometheus.io/)
```
weather,location=us-midwest temperature=82 1465839830100400200
| -------------------- -------------- |
| | | |
| | | |
+-----------+--------+-+---------+-+---------+
|measurement|,tag_set| |field_set| |timestamp|
+-----------+--------+-+---------+-+---------+
```
### Collecting time series data
Now that we have a place to store our time series, how do we actually gather the measurements? To collect time series data, you'd typically install a _collector_ on the device, machine, or instance you want to monitor. Some collectors are made with a specific database in mind, and some support different output destinations.

View File

@@ -0,0 +1,8 @@
+++
title = "Copyright notice"
aliases = ["/docs/grafana/next/copyright-notice"]
+++
# Copyright notice
Copyright &#169; 2021 Raintank, Inc. dba Grafana Labs. All Rights Reserved

View File

@@ -7,121 +7,42 @@ weight = 4
# Playlist
A playlist is a list of dashboards that are displayed in a sequence. You might use a playlist to build situational awareness or to present your metrics to your team or visitors.
A playlist displays a list of dashboards that are in a sequence. Use a playlist to build situational awareness or to present your metrics to your team or visitors. Grafana automatically scales dashboards to any resolution, which makes them perfect for big screens. This topic has the following sections:
Grafana automatically scales dashboards to any resolution, which makes them perfect for big screens.
- [Access, share, and control a playlist](#access-share-and-control-a-playlist)
- [Create a playlist](#create-a-playlist)
- [Edit or delete a playlist](#edit-or-delete-a-playlist)
- [Share a playlist](#share-a-playlist-in-a-view-mode)
You can access the Playlist feature from Grafana's side menu, in the Dashboards submenu.
## Access, share, and control a playlist
{{< figure src="/static/img/docs/v50/playlist.png" max-width="25rem">}}
Use the information in this section to access existing playlists. Start and control the display of a playlist using one of the five available modes.
## Create a playlist
### Access playlist
You create a playlist to present dashboards in a sequence, with a set order and time interval between dashboards.
1. Hover your cursor over Grafanas side menu.
1. Click **Playlists**. You will see a list of existing playlists.
1. To access the Playlist feature, hover your cursor over Grafana's side menu.
1. Click **Playlists**.
1. Click **New playlist**.
1. In the **Name** text box, enter a name for your playlist.
1. In the **Interval** text box, enter a time interval.
### Start a playlist
The time interval is the amount of time for Grafana to stay on a particular dashboard before advancing to the next one on the playlist.
1. [Access](#access-playlist) the playlist page to see a list of existing playlists.
1. Find the playlist you want to start, then click **Start playlist**. The start playlist dialog opens.
1. Select one of the five playlist modes available based on the information in the following table.
1. Click **Start <playlist name>**.
1. Next to the dashboard(s) you want to add to your playlist, click **Add to playlist**.
1. Click **Create**.
The playlist displays each dashboard for the time specified in the `Interval` field, set when creating or editing a playlist. Once a playlist starts, you can [control](#control-a-playlist) it using the navbar at the top of your screen.
## Edit a playlist
| Mode | Description |
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Normal mode | <ul><li>The side menu remains visible.</li></ul><ul><li>The navbar, row, and panel controls appear at the top of the screen.</li></ul> |
| TV mode | <ul><li>The side menu and dashboard submenu (including variable drop-downs and dashboard links) are hidden or removed.</li></ul><ul><li>The navbar, row, and panel controls appear at the top of the screen.</li></ul><ul><li>Enabled automatically after one minute of user inactivity.</li></ul><ul><li>Enable it manually using the `d v` sequence shortcut, or by appending the parameter `?inactive` to the dashboard URL.</li></ul><ul><li>Disable it with any mouse movement or keyboard action.</li></ul> |
| TV mode (with auto fit panels) | <ul><li>The side menu and dashboard submenu (including variable drop-downs and dashboard links) are hidden or removed.</li></ul><ul><li>The navbar, row and panel controls appear at the top of the screen.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul><ul> |
| Kiosk mode | <ul><li>The side menu, navbar, ro and panel controls are completely hidden/removed from view.</li></ul><ul><li>You can enable it manually using the `d v` sequence shortcut after the playlist has started.</li></ul><ul><li>You can disable it manually with the same shortcut.</li></ul> |
| Kiosk mode (with auto fit panels) | <ul><li>The side menu, navbar, row, and panel controls are completely hidden/removed from view.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul> |
You can edit playlists while creating them or after saving them.
### Control a playlist
1. To access the Playlist feature, hover your cursor over Grafana's side menu.
1. Click **Playlists**.
1. Click on the Playlist that you want to edit.
### Edit the Name of a playlist
1. Double-click within the **Name** text box.
1. Enter a name.
1. Click **Save** to save your changes.
### Edit the Interval of a playlist
1. Double-click within the **Interval** text box.
1. Enter a time interval.
1. Click **Save** to save your changes.
### Add a dashboard to a playlist
1. Next to the dashboard you want to add, click **Add to playlist**.
1. Click **Save** to save your changes.
### Search for a dashboard to add
1. Click the **Search dashboards by name** text box.
1. Search for the playlist by name or regular expression.
1. If needed, filter your results by starred status or tags.
By default, your starred dashboards will appear as options to add to the Playlist.
1. Click **Save** to save your changes.
### Rearrange dashboard order
1. Next to the dashboard you want to move, click the up or down arrow.
1. Click **Save** to save your changes.
### Remove a dashboard
1. Click **Remove[x]** to remove a dashboard from the playlist.
1. Click **Save** to save your changes.
### Delete a playlist
1. Click **Playlists**.
1. Next to the Playlist you want to delete, click **Remove[x]**.
## Save a playlist
You can save a playlist to add it to your **Playlists** page, where you can start it. Be sure that all the dashboards you want to appear in your playlist are added when creating or editing the playlist before saving it.
1. To access the Playlist feature, hover your cursor over Grafana's side menu.
1. Click **Playlists**.
1. Click on the playlist.
1. Edit the playlist.
- Ensure that your playlist has a **Name**, **Interval**, and at least one **Dashboard** added to it.
1. Click **Save**.
## Start a playlist
You can start a playlist in five different view modes, which determine how the menus and navigation bar are displayed on the dashboards.
By default, each dashboard is displayed for the amount of time entered in the Interval field, which can be set while creating or editing a playlist. Once a playlist is started, it can be controlled using the navbar at the top of your screen.
1. From the Dashboards submenu, click **Playlists**.
1. Next to the playlist you want to start, click **Start playlist**.
1. In the dropdown, select the mode you want the playlist to display in.
- **Normal mode:**
- The side menu remains visible.
- The navbar, row and panel controls appear at the top of the screen.
- **TV mode:**
- The side menu is hidden/removed.
- The navbar, row and panel controls appear at the top of the screen.
- Enabled automatically after one minute of user inactivity.
- You can enable it manually using the `d v` sequence shortcut, or by appending the parameter `?inactive` to the dashboard URL.
- You can disable it with any mouse movement or keyboard action.
- **TV mode (with auto fit panels):**
- The side menu is hidden/removed.
- The navbar, row and panel controls appear at the top of the screen.
- Dashboard panels automatically adjust to optimize space on screen.
- **Kiosk mode:**
- The side menu, navbar, row and panel controls are completely hidden/removed from view.
- You can enable it manually using the `d v` sequence shortcut after the playlist has started.
- You can disable it manually with the same shortcut.
- **Kiosk mode (with auto fit panels):**
- The side menu, navbar, row and panel controls are completely hidden/removed from view.
- Dashboard panels automatically adjust to optimize space on screen.
## Control a playlist
You can control a playlist in **Normal** or **TV** mode after it's started, using the navigation bar at the top of your screen.
You can control a playlist in **Normal** or **TV** mode after it's started, using the navigation bar at the top of your screen. Press the Esc key in your keyboard to stop the playlist.
| Button | Result |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -130,9 +51,39 @@ You can control a playlist in **Normal** or **TV** mode after it's started, usin
| Stop (square) | Ends the playlist, and exits to the current dashboard. |
| Cycle view mode (monitor icon) | Rotates the display of the dashboards in different view modes. |
| Time range | Displays data within a time range. It can be set to display the last 5 minutes up to 5 years ago, or a custom time range, using the down arrow. |
| Refresh (circle arrow) | Reloads the dashboard, to display the current data. It can be set to reload automatically every 5 seconds to 1 day, using the drop down arrow. |
| Refresh (circle arrow) | Reloads the dashboard, to display the current data. It can be set to reload automatically every 5 seconds to 1 day, using the drop-down arrow. |
> Shortcut: Press the Esc key to stop the playlist from your keyboard.
## Create a playlist
You can create a playlist to present dashboards in a sequence, with a set order and time interval between dashboards.
1. In the playlist page, click **New playlist**. The New playlist page opens.
1. In the **Name** text box, enter a descriptive name.
1. In the **Interval** text box, enter a time interval. Grafana displays a particular dashboard for the interval of time specified here before moving on to the next dashboard.
1. In Dashboards, add existing dashboards to the playlist using **Add by title** and **Add by tag** drop-down options. The dashboards you add are listed in a sequential order.
1. If needed:
- Search for a dashboard by its name, a regular expression, or a tag.
- Filter your results by starred status or tags.
1. If needed, rearrange the order of the dashboard you have added using the up and down arrow icon.
1. Optionally, remove a dashboard from the playlist by clicking the x icon beside dashboard.
1. Click **Save**.
{{< figure src="/static/img/docs/dashboards/create-playlist-8-2.png" max-width="25rem">}}
## Edit or delete a playlist
You can edit a playlist by updating its name, interval time, and by adding, removing, and rearranging the order of dashboards. On the rare occasion when you no longer need a playlist, you can delete it.
### Edit a playlist
1. In the playlist page, click **Edit playlist**. The Edit playlist page opens.
1. Update the name and time interval, then add or remove dashboards from the playlist using instructions in [Create a playlist](#create-a-playlist).
1. Click **Save** to save your changes.
### Delete a playlist
1. In the playlist page, click **Edit playlist**. A prompts opens asking you to confirm the action.
1. Click **delete**.
## Share a playlist in a view mode

View File

@@ -8,7 +8,7 @@ weight = 150
# Alertmanager data source
Grafana includes built-in support for Prometheus Alertmanager. It is presently in alpha and not accessible unless [alpha plugins are enabled in Grafana settings](https://grafana.com/docs/grafana/latest/administration/configuration/#enable_alpha). Once you add it as a data source, you can use the [Grafana alerting UI](https://grafana.com/docs/grafana/latest/alerting/) to manage silences, contact points as well as notification policies. A drop down option in these pages allows you to switch between Grafana and any configured Alertmanager data sources .
Grafana includes built-in support for Prometheus Alertmanager. It is presently in alpha and not accessible unless [alpha plugins are enabled in Grafana settings](https://grafana.com/docs/grafana/latest/administration/configuration/#enable_alpha). Once you add it as a data source, you can use the [Grafana alerting UI](https://grafana.com/docs/grafana/latest/alerting/) to manage silences, contact points as well as notification policies. A drop-down option in these pages allows you to switch between Grafana and any configured Alertmanager data sources .
> **Note:** Currently, the [Cortex implementation of Prometheus Alertmanager](https://cortexmetrics.io/docs/proposals/scalable-alertmanager/) is required to edit rules.
@@ -26,6 +26,8 @@ datasources:
type: alertmanager
url: http://localhost:9090
access: proxy
jsonData:
implementation: 'prometheus'
# optionally
basicAuth: true
basicAuthUser: my_user

View File

@@ -29,6 +29,18 @@ To access data source settings, hover your mouse over the **Configuration** (gea
| `Assume Role Arn` | Specify the ARN of the role to assume |
| `External ID` | If you are assuming a role in another account, that has been created with an external ID, specify the external ID here. |
### X-Ray trace links
Link an X-Ray data source in the "X-Ray trace link" section of the configuration page to automatically add links in your logs when the log contains `@xrayTraceId` field.
![Trace link configuration](/static/img/docs/cloudwatch/xray-trace-link-configuration-8-2.png 'Trace link 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.md" >}}). 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')
## Authentication
For authentication options and configuration details, see [AWS authentication]({{< relref "aws-authentication.md" >}}) topic.

View File

@@ -8,7 +8,13 @@ weight = 205
# AWS authentication
You can use one of the following authentication methods. All of these methods are enabled by default. You can disable them if necessary if you have server configuration access. For more information, refer to [allowed_auth_providers]({{< relref "../../administration/configuration.md#allowed_auth_providers" >}}) documentation.
Requests from a Grafana plugin to AWS are made on behalf of an IAM role or an IAM user. The IAM user or IAM role must have the associated policies to perform certain API actions. Since these policies are specific to each data source, refer to the data source documentation for details.
All requests to AWS APIs are performed on the server side by the Grafana backend using the official AWS SDK.
## Authentication methods
You can use one of the following authentication methods. Currently, `AWS SDK Default`, `Credentials file` and `Access and secret key` are enabled by default in open source Grafana. You can enable/disable them if necessary if you have server configuration access. For more information, refer to [allowed_auth_providers]({{< relref "../../administration/configuration.md#allowed_auth_providers" >}}) documentation.
- `AWS SDK Default` performs no custom configuration and instead uses the [default provider](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html) as specified by the AWS SDK for Go. It requires you to configure your AWS credentials separately, such as if you've [configured the CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html), if you're [running on an EC2 instance](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html), [in an ECS task](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task-iam-roles.html), or for a [Service Account in a Kubernetes cluster](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html).
@@ -16,21 +22,17 @@ You can use one of the following authentication methods. All of these methods ar
- `Access and secret key` corresponds to the [StaticProvider](https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials/#StaticProvider) and uses the given access key ID and secret key to authenticate. This method doesn't have any fallbacks, and will fail if the provided key pair doesn't work.
> **Note:** Grafana also supports the `Workspace IAM role` method. We will be add documentation for this authentication method soon.
## IAM roles
Currently all access to CloudWatch is done server side by the Grafana backend using the official AWS SDK. If you are using the _AWS SDK Default_ authentication method, and your Grafana server is running on AWS, use IAM Roles to handle authentication automatically.
For more information, refer to the AWS documentation on [IAM Roles](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html).
> **Note:** IAM policies are data source specific. Refer to Authentication section of the [Cloudwatch]({{< relref "./_index.md" >}}) topic for more information.
- `Workspace IAM role` corresponds to the [EC2RoleProvider](https://docs.aws.amazon.com/sdk-for-go/api/aws/credentials/ec2rolecreds/#EC2RoleProvider). The EC2RoleProvider pulls credentials for a role attached to the EC2 instance that Grafana runs on. You can also achieve this by using the authentication method AWS SDK Default, but this option is different as it doesnt have any fallbacks. This option is currently only enabled by default in Amazon Managed Grafana.
## Assuming a role
The `Assume Role ARN` field allows you to specify which IAM role to assume. When left blank, the provided credentials are used directly and the associated role or user should have the required permissions. If this field is non-blank, on the other hand, the provided credentials are used to perform an [sts:AssumeRole](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) call.
If you set this field to `false` then AWS authentication no longer uses an assumed role. For more information, refer to [assume_role_enabled]({{< relref "../../administration/configuration.md#assume_role_enabled" >}}) documentation.
You can disable this feature in the Grafana configuration. For more information, refer to [assume_role_enabled]({{< relref "../../administration/configuration.md#assume_role_enabled" >}}) documentation.
### External ID
If you are assuming a role in another account that was created with an external ID, then specify the external ID in this field. For more information, refer to the [AWS documentation on external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html).
## Endpoint

View File

@@ -120,6 +120,7 @@ You can switch to raw query mode by clicking hamburger icon and then `Switch edi
- $m = replaced with measurement name
- $measurement = replaced with measurement name
- $1 - $9 = replaced with part of measurement name (if you separate your measurement name with dots)
- $col = replaced with column name
- $tag_exampletag = replaced with the value of the `exampletag` tag. The syntax is `$tag*yourTagName`(must start with`$tag*`). To use your tag as an alias in the ALIAS BY field then the tag must be used to group by in the query.
- You can also use [[tag_hostname]] pattern replacement syntax. For example, in the ALIAS BY field using this text `Host: [[tag_hostname]]` would substitute in the `hostname` tag value for each legend value and an example legend value would be: `Host: server1`.

View File

@@ -40,7 +40,7 @@ You can use the [Flux query and scripting language](https://www.influxdata.com/p
## Supported macros
The macros support copying and pasting from [Chronograph](https://www.influxdata.com/time-series-platform/chronograf/).
The macros support copying and pasting from [Chronograf](https://www.influxdata.com/time-series-platform/chronograf/).
| Macro example | Description |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

View File

@@ -39,6 +39,12 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
![Trace to logs settings](/static/img/docs/explore/trace-to-logs-settings-8-2.png 'Screenshot of the trace to logs settings')
### Node Graph
This is a configuration for the beta Node Graph visualization. The Node Graph is shown after the trace view is loaded and is disabled by default.
-- **Enable Node Graph -** Enables the Node Graph visualization.
## Query traces
You can query and display traces from Jaeger via [Explore]({{< relref "../explore/_index.md" >}}).

View File

@@ -447,9 +447,10 @@ datasources:
url: localhost:3306
database: grafana
user: grafana
password: password
jsonData:
maxOpenConns: 0 # Grafana v5.4+
maxIdleConns: 2 # Grafana v5.4+
connMaxLifetime: 14400 # Grafana v5.4+
secureJsonData:
password: ${GRAFANA_MYSQL_PASSWORD}
```

View File

@@ -10,9 +10,7 @@ weight = 1300
Grafana includes built-in support for Prometheus. This topic explains options, variables, querying, and other options specific to the Prometheus data source. Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
## Hosted Prometheus
Run Prometheus on your own hardware or use [Grafana Cloud](https://grafana.com/products/cloud/features/#cloud-dashboards-grafana). The free forever plan includes Grafana, 10K Prometheus series, 50 GB logs and more. [Create a free account to get started](https://grafana.com/auth/sign-up/create-user?pg=doc-grafana-&plcmt=in-text).
> **Note:** You can use [Grafana Cloud](https://grafana.com/products/cloud/features/#cloud-logs) to avoid the overhead of installing, maintaining, and scaling your observability stack. The free forever plan includes Grafana, 10K Prometheus series, 50 GB logs, and more.[Create a free account to get started](https://grafana.com/auth/sign-up/create-user?pg=docs-grafana-install&plcmt=in-text).
## Prometheus settings
@@ -117,13 +115,13 @@ types of template variables.
Variable of the type _Query_ allows you to query Prometheus for a list of metrics, labels or label values. The Prometheus data source plugin
provides the following functions you can use in the `Query` input field.
| Name | Description |
| ----------------------------- | ----------------------------------------------------------------------- |
| `label_names()` | Returns a list of label names. |
| `label_values(label)` | Returns a list of label values for the `label` in every metric. |
| `label_values(metric, label)` | Returns a list of label values for the `label` in the specified metric. |
| `metrics(metric)` | Returns a list of metrics matching the specified `metric` regex. |
| `query_result(query)` | Returns a list of Prometheus query result for the `query`. |
| Name | Description | Used API endpoints |
| ----------------------------- | ----------------------------------------------------------------------- | --------------------------------- |
| `label_names()` | Returns a list of label names. | /api/v1/labels |
| `label_values(label)` | Returns a list of label values for the `label` in every metric. | /api/v1/label/`label`/values |
| `label_values(metric, label)` | Returns a list of label values for the `label` in the specified metric. | /api/v1/series |
| `metrics(metric)` | Returns a list of metrics matching the specified `metric` regex. | /api/v1/label/\_\_name\_\_/values |
| `query_result(query)` | Returns a list of Prometheus query result for the `query`. | /api/v1/query |
For details of what _metric names_, _label names_ and _label values_ are please refer to the [Prometheus documentation](http://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).

View File

@@ -36,25 +36,29 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
- **Filter by Trace ID -** Toggle to append the trace ID to the Loki query.
- **Filter by Span ID -** Toggle to append the span ID to the Loki query.
![Trace to logs settings](/static/img/docs/explore/trace-to-logs-settings-8-2.png 'Screenshot of the trace to logs settings')
{{< figure src="/static/img/docs/explore/traces-to-logs-settings-8-2.png" class="docs-image--no-shadow" caption="Screenshot of the trace to logs settings" >}}
### Node Graph
This is a configuration for the beta Node Graph visualization. The Node Graph is shown after the trace view is loaded and is disabled by default.
-- **Enable Node Graph -** Enables the Node Graph visualization.
## Query traces
You can query and display traces from Tempo via [Explore]({{< relref "../explore/_index.md" >}}).
You can search for traces if you set up the trace to logs setting in the data source configuration page. To find traces to visualize, use the [Loki query editor]({{< relref "loki.md#loki-query-editor" >}}). To get search results, you must have [derived fields]({{< relref "loki.md#derived-fields" >}}) configured, which point to this data source.
{{< figure src="/static/img/docs/tempo/query-editor-search.png" class="docs-image--no-shadow" caption="Screenshot of the Tempo query editor showing the search tab" >}}
{{< figure src="/static/img/docs/tempo/query-editor-search.png" class="docs-image--no-shadow" max-width="750px" caption="Screenshot of the Tempo query editor showing the search tab" >}}
To query a particular trace, select the **TraceID** query type, and then put the ID into the Trace ID field.
{{< figure src="/static/img/docs/tempo/query-editor-traceid.png" class="docs-image--no-shadow" caption="Screenshot of the Tempo TraceID query type" >}}
{{< figure src="/static/img/docs/tempo/query-editor-traceid.png" class="docs-image--no-shadow" max-width="750px" caption="Screenshot of the Tempo TraceID query type" >}}
## Upload JSON trace file
You can upload a JSON file that contains a single trace to visualize it. If the file has multiple traces then the first trace is used for visualization.
{{< figure src="/static/img/docs/explore/tempo-upload-json.png" class="docs-image--no-shadow" caption="Screenshot of the Tempo data source in explore with upload selected" >}}
Here is an example JSON:
```json

View File

@@ -39,6 +39,12 @@ This is a configuration for the [trace to logs feature]({{< relref "../explore/t
![Trace to logs settings](/static/img/docs/explore/trace-to-logs-settings-8-2.png 'Screenshot of the trace to logs settings')
### Node Graph
This is a configuration for the beta Node Graph visualization. The Node Graph is shown after the trace view is loaded and is disabled by default.
-- **Enable Node Graph -** Enables the Node Graph visualization.
## Query traces
Querying and displaying traces from Zipkin is available via [Explore]({{< relref "../explore" >}}).

View File

@@ -76,9 +76,9 @@ Learn more about Grafana options and packages.
#### Typescript
- [Grafana Data]({{< relref "../../packages_api/data/_index.md" >}})
- [Grafana Runtime]({{< relref "../../packages_api/runtime/_index.md" >}})
- [Grafana UI]({{< relref "../../packages_api/ui/_index.md" >}})
- Grafana Data
- Grafana Runtime
- Grafana UI
#### Go

View File

@@ -46,7 +46,7 @@ The query editor for Explore is similar to the query editor for the data source
.setExploreQueryField(ExploreQueryEditor);
```
1. Add a [QueryField]({{< relref "../../packages_api/ui/queryfield.md" >}}) to `ExploreQueryEditor`.
1. Add a `QueryField` to `ExploreQueryEditor`.
```ts
import { QueryField } from '@grafana/ui';

View File

@@ -24,7 +24,7 @@ Grafana provides a couple of helper functions to interpolate variables in a stri
## Interpolate variables in panel plugins
For panels, the [replaceVariables]({{< relref "../../packages_api/data/panelprops.md#replacevariables-property" >}}) function is available in the [PanelProps]({{< relref "../../packages_api/data/panelprops.md" >}}).
For panels, the `replaceVariables` function is available in the PanelProps.
Add `replaceVariables` to the argument list, and pass it a user-defined template string.
@@ -38,7 +38,7 @@ export const SimplePanel: React.FC<Props> = ({ options, data, width, height, rep
## Interpolate variables in data source plugins
For data sources, you need to use the [getTemplateSrv]({{< relref "../../packages_api/runtime/gettemplatesrv.md" >}}), which returns an instance of [TemplateSrv]({{< relref "../../packages_api/runtime/templatesrv.md" >}}).
For data sources, you need to use the getTemplateSrv, which returns an instance of TemplateSrv.
1. Import `getTemplateSrv` from the `runtime` package.
@@ -80,7 +80,7 @@ For more information on the available variable formats, refer to [Advanced varia
## Set a variable from your plugin
Not only can you read the value of a variable, you can also update the variable from your plugin. Use [LocationSrv.update()]({{< relref "../../packages_api/runtime/locationsrv.md/#update-method" >}}) to update a variable using query parameters.
Not only can you read the value of a variable, you can also update the variable from your plugin. Use LocationSrv.update()
The following example shows how to update a variable called `service`.
@@ -117,7 +117,7 @@ export interface MyVariableQuery {
}
```
For a data source to support query variables, you must override the [`metricFindQuery`]({{< relref "../../packages_api/data/datasourceapi.md#metricfindquery-method" >}}) in your `DataSourceApi` class. `metricFindQuery` returns an array of [`MetricFindValue`]({{< relref "../../packages_api/data/metricfindvalue.md" >}}) which has a single property, `text`:
For a data source to support query variables, you must override the `metricFindQuery` in your `DataSourceApi` class. `metricFindQuery` returns an array of `MetricFindValue` which has a single property, `text`:
```ts
async metricFindQuery(query: MyVariableQuery, options?: any) {

View File

@@ -74,7 +74,7 @@ const frame = new MutableDataFrame({
To help filter log lines, many log systems let you query logs based on metadata, or _labels_.
You can add labels to a stream of logs by setting the [labels](../../packages_api/data/field.md#labels-property) property on the [Field]({{< relref "../../packages_api/data/field.md" >}}).
You can add labels to a stream of logs by setting the labels property on the Field.
**Example**:

View File

@@ -104,9 +104,9 @@ Note that there are some Angular attributes here. _ng-model_ will update the pan
{{< figure class="float-right" src="/assets/img/blog/clock-panel-editor.png" caption="Panel Editor" >}}
On the editor tab we use a drop down for 12/24 hour clock, an input field for font size and a color picker for the background color.
On the editor tab we use a drop-down for 12/24 hour clock, an input field for font size and a color picker for the background color.
The drop down/select has its own _gf-form-select-wrapper_ css class and looks like this:
The drop-down/select has its own _gf-form-select-wrapper_ css class and looks like this:
```html
<div class="gf-form">

View File

@@ -17,7 +17,7 @@ This guide helps you identify the steps you need to take based on the Grafana ve
- [1. Add dependency on grafana-plugin-sdk-go](#1-add-dependency-on-grafana-plugin-sdk-go)
- [2. Update the way you bootstrap your plugin](#2-update-the-way-you-bootstrap-your-plugin)
- [3. Update the plugin package](#3-update-the-plugin-package)
- [Unsigned backend plugins will not be loaded](#unsigned-backend-plugins-will-not-be-loaded)
- [Sign and load backend plugins](#sign-and-load-backend-plugins)
- [Update react-hook-form from v6 to v7](#update-react-hook-form-from-v6-to-v7)
- [Update the plugin.json](#update-the-pluginjson)
- [Update imports to match emotion 11](#update-imports-to-match-emotion-11)
@@ -176,7 +176,7 @@ We strongly recommend that you not allow unsigned plugins in your Grafana instal
To sign your plugin, see [Sign a plugin](https://grafana.com/docs/grafana/latest/developers/plugins/sign-a-plugin/#sign-a-plugin).
You can still run and develop an unsigned plugin by running your Grafana instance in [development mode](https://grafana.com/docs/grafana/latest/administration/configuration/#app_mode). Alternatively, you can use the [allow_loading_unsigned_plugins configuration setting.]({{< relref "../administration/#allow_loading_unsigned_plugins" >}})
You can still run and develop an unsigned plugin by running your Grafana instance in [development mode](https://grafana.com/docs/grafana/latest/administration/configuration/#app_mode). Alternatively, you can use the [allow_loading_unsigned_plugins configuration setting.]({{< relref "../../administration/#allow_loading_unsigned_plugins" >}})
### Update react-hook-form from v6 to v7

View File

@@ -6,7 +6,7 @@ title = "Working with data frames"
The data frame is a columnar data structure which allows efficient querying of large amounts of data. Since data frames are a central concept when developing plugins for Grafana, in this guide we'll look at some ways you can use them.
The [DataFrame]({{< relref "../../packages_api/data/dataframe.md" >}}) interface contains a `name` and an array of `fields` where each field contains the name, type, and the values for the field.
The DataFrame interface contains a `name` and an array of `fields` where each field contains the name, type, and the values for the field.
> **Note:** If you're looking to migrate an existing plugin to use the data frame format, refer to [Migrate to data frames]({{< relref "migration-guide.md#migrate-to-data-frames" >}}).
@@ -14,7 +14,7 @@ The [DataFrame]({{< relref "../../packages_api/data/dataframe.md" >}}) interface
If you build a data source plugin, then you'll most likely want to convert a response from an external API to a data frame. Let's look at how to create a data frame.
Let's start with creating a simple data frame that represents a time series. The easiest way to create a data frame is to use the [toDataFrame]({{< relref "../../packages_api/data/todataframe.md" >}}) function.
Let's start with creating a simple data frame that represents a time series. The easiest way to create a data frame is to use the toDataFrame function.
```ts
// Need to be of the same length.
@@ -78,7 +78,7 @@ for (let i = 0; i < frame.length; i++) {
}
```
Alternatively, you can use the [DataFrameView]({{< relref "../../packages_api/data/dataframeview.md" >}}), which gives you an array of objects that contain a property for each field in the frame.
Alternatively, you can use the DataFrameView, which gives you an array of objects that contain a property for each field in the frame.
```ts
const view = new DataFrameView(frame);
@@ -113,7 +113,7 @@ return (
);
```
To apply field options to the name of a field, use [getFieldDisplayName]({{< relref "../../packages_api/data/getfielddisplayname.md" >}}).
To apply field options to the name of a field, use getFieldDisplayName.
```ts
const valueField = frame.fields.find((field) => field.type === FieldType.number);

View File

@@ -11,28 +11,32 @@ The reference information that follows complements conceptual information about
## Fine-grained access fixed roles
| Fixed roles | Permissions | Descriptions |
| ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `fixed:permissions:admin:read` | `roles:read`<br>`roles:list`<br>`roles.builtin:list` | Allows to list and get available roles and built-in role assignments. |
| `fixed:permissions:admin:edit` | All permissions from `fixed:permissions:admin:read` and <br>`roles:write`<br>`roles:delete`<br>`roles.builtin:add`<br>`roles.builtin:remove` | Allows every read action and in addition allows to create, change and delete custom roles and create or remove built-in role assignments. |
| `fixed:provisioning:admin` | `provisioning:reload` | Allow provisioning configurations to be reloaded. |
| `fixed:reporting:admin:read` | `reports:read`<br>`reports:send`<br>`reports.settings:read` | Allows to read reports and report settings. |
| `fixed:reporting:admin:edit` | All permissions from `fixed:reporting:admin:read` and <br>`reports.admin:write`<br>`reports:delete`<br>`reports.settings:write` | Allows every read action for reports and in addition allows to administer reports. |
| `fixed:users:admin:read` | `users.authtoken:list`<br>`users.quotas:list`<br>`users:read`<br>`users.teams:read` | Allows to list and get users and related information. |
| `fixed:users:admin:edit` | All permissions from `fixed:users:admin:read` and <br>`users.password:update`<br>`users:write`<br>`users:create`<br>`users:delete`<br>`users:enable`<br>`users:disable`<br>`users.permissions:update`<br>`users:logout`<br>`users.authtoken:update`<br>`users.quotas:update` | Allows every read action for users and in addition allows to administer users. |
| `fixed:users:org:read` | `org.users:read` | Allows to get user organizations. |
| `fixed:users:org:edit` | All permissions from `fixed:users:org:read` and <br>`org.users:add`<br>`org.users:remove`<br>`org.users.role:update` | Allows every read action for user organizations and in addition allows to administer user organizations. |
| `fixed:ldap:admin:read` | `ldap.user:read`<br>`ldap.status:read` | Allows to read LDAP information and status. |
| `fixed:ldap:admin:edit` | All permissions from `fixed:ldap:admin:read` and <br>`ldap.user:sync`<br>`ldap.config:reload` | Allows every read action for LDAP and in addition allows to administer LDAP. |
| `fixed:server:admin:read` | `server.stats:read` | Read server stats |
| `fixed:settings:admin:read` | `settings:read` | Read settings |
| `fixed:settings:admin:edit` | All permissions from `fixed:settings:admin:read` and<br>`settings:write` | Update settings |
| `fixed:datasource:editor:read` | `datasources:explore` | Explore datasources |
| Fixed roles | Permissions | Descriptions |
| ------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `fixed:permissions:admin:read` | `roles:read`<br>`roles:list`<br>`roles.builtin:list` | Allows to list and get available roles and built-in role assignments. |
| `fixed:permissions:admin:edit` | All permissions from `fixed:permissions:admin:read` and <br>`roles:write`<br>`roles:delete`<br>`roles.builtin:add`<br>`roles.builtin:remove` | Allows every read action and in addition allows to create, change and delete custom roles and create or remove built-in role assignments. |
| `fixed:provisioning:admin` | `provisioning:reload` | Allow provisioning configurations to be reloaded. |
| `fixed:reporting:admin:read` | `reports:read`<br>`reports:send`<br>`reports.settings:read` | Allows to read reports and report settings. |
| `fixed:reporting:admin:edit` | All permissions from `fixed:reporting:admin:read` and <br>`reports.admin:write`<br>`reports:delete`<br>`reports.settings:write` | Allows every read action for reports and in addition allows to administer reports. |
| `fixed:users:admin:read` | `users.authtoken:list`<br>`users.quotas:list`<br>`users:read`<br>`users.teams:read` | Allows to list and get users and related information. |
| `fixed:users:admin:edit` | All permissions from `fixed:users:admin:read` and <br>`users.password:update`<br>`users:write`<br>`users:create`<br>`users:delete`<br>`users:enable`<br>`users:disable`<br>`users.permissions:update`<br>`users:logout`<br>`users.authtoken:update`<br>`users.quotas:update` | Allows every read action for users and in addition allows to administer users. |
| `fixed:users:org:read` | `org.users:read` | Allows to get user organizations. |
| `fixed:users:org:edit` | All permissions from `fixed:users:org:read` and <br>`org.users:add`<br>`org.users:remove`<br>`org.users.role:update` | Allows every read action for user organizations and in addition allows to administer user organizations. |
| `fixed:ldap:admin:read` | `ldap.user:read`<br>`ldap.status:read` | Allows to read LDAP information and status. |
| `fixed:ldap:admin:edit` | All permissions from `fixed:ldap:admin:read` and <br>`ldap.user:sync`<br>`ldap.config:reload` | Allows every read action for LDAP and in addition allows to administer LDAP. |
| `fixed:server:admin:read` | `server.stats:read` | Read server stats |
| `fixed:settings:admin:read` | `settings:read` | Read settings |
| `fixed:settings:admin:edit` | All permissions from `fixed:settings:admin:read` and<br>`settings:write` | Update settings |
| `fixed:datasources:editor:read` | `datasources:explore` | Allows to access the **Explore** tab |
| `fixed:datasources:admin` | `datasources:read`<br>`datasources:create`<br>`datasources:write`<br>`datasources:delete` | Allows to create, read, update, delete data sources. |
| `fixed:datasources:id:viewer` | `datasources.id:read` | Allows to read data source IDs. |
| `fixed:datasources:permissions:admin` | `datasources.permissions:create`<br> `datasources.permissions:read`<br> `datasources.permissions:delete`<br>`datasources.permissions:toggle` | Allows to create, read, delete, enable, or disable data source permissions |
## Default built-in role assignments
| Built-in role | Associated role | Description |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Grafana Admin | `fixed:permissions:admin:edit`<br>`fixed:permissions:admin:read`<br>`fixed:provisioning:admin`<br>`fixed:reporting:admin:edit`<br>`fixed:reporting:admin:read`<br>`fixed:users:admin:edit`<br>`fixed:users:admin:read`<br>`fixed:users:org:edit`<br>`fixed:users:org:read`<br>`fixed:ldap:admin:edit`<br>`fixed:ldap:admin:read`<br>`fixed:server:admin:read`<br>`fixed:settings:admin:read`<br>`fixed:settings:admin:edit` | Allow access to the same resources and permissions the [Grafana server administrator]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}}) has by default. |
| Admin | `fixed:users:org:edit`<br>`fixed:users:org:read`<br>`fixed:reporting:admin:edit`<br>`fixed:reporting:admin:read` | Allow access to the same resources and permissions that the [Grafana organization administrator]({{< relref "../../permissions/organization_roles.md" >}}) has by default. |
| Editor | `fixed:datasource:editor:read` |
| Built-in role | Associated role | Description |
| ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Grafana Admin | `fixed:permissions:admin:edit`<br>`fixed:permissions:admin:read`<br>`fixed:provisioning:admin`<br>`fixed:reporting:admin:edit`<br>`fixed:reporting:admin:read`<br>`fixed:users:admin:edit`<br>`fixed:users:admin:read`<br>`fixed:users:org:edit`<br>`fixed:users:org:read`<br>`fixed:ldap:admin:edit`<br>`fixed:ldap:admin:read`<br>`fixed:server:admin:read`<br>`fixed:settings:admin:read`<br>`fixed:settings:admin:edit` | Default [Grafana server administrator]({{< relref "../../permissions/_index.md#grafana-server-admin-role" >}}) assignments. |
| Admin | `fixed:users:org:edit`<br>`fixed:users:org:read`<br>`fixed:reporting:admin:edit`<br>`fixed:reporting:admin:read`<br>`fixed:datasources:admin`<br>`fixed:datasources:permissions:admin` | Default [Grafana organization administrator]({{< relref "../../permissions/organization_roles.md" >}}) assignments. |
| Editor | `fixed:datasources:editor:read` | Default [Editor]({{< relref "../../permissions/organization_roles.md" >}}) assignments. |
| Viewer | `fixed:datasources:id:viewer` | Default [Viewer]({{< relref "../../permissions/organization_roles.md" >}}) assignments. |

View File

@@ -23,62 +23,72 @@ scope
The following list contains fine-grained access control actions.
| Action | Applicable scope | Description |
| -------------------------- | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `roles:list` | `roles:*` | List available roles without permissions. |
| `roles:read` | `roles:*` | Read a specific role with its permissions. |
| `roles:write` | `permissions:delegate` | Create or update a custom role. |
| `roles:delete` | `permissions:delegate` | Delete a custom role. |
| `roles.builtin:list` | `roles:*` | List built-in role assignments. |
| `roles.builtin:add` | `permissions:delegate` | Create a built-in role assignment. |
| `roles.builtin:remove` | `permissions:delegate` | Delete a built-in role assignment. |
| `reports.admin:create` | `reports:*` | Create reports. |
| `reports.admin:write` | `reports:*` | Update reports. |
| `reports:delete` | `reports:*` | Delete reports. |
| `reports:read` | `reports:*` | List all available reports or get a specific report. |
| `reports:send` | `reports:*` | Send a report email. |
| `reports.settings:write` | n/a | Update report settings. |
| `reports.settings:read` | n/a | Read report settings. |
| `provisioning:reload` | `provisioners:*` | Reload provisioning files. To find the exact scope for specific provisioner, see [Scope definitions]({{< relref "./permissions.md#scope-definitions" >}}). |
| `users:read` | `global:users:*` | Read or search user profiles. |
| `users:write` | `global:users:*` | Update a users profile. |
| `users.teams:read` | `global:users:*` | Read a users teams. |
| `users.authtoken:list` | `global:users:*` | List authentication tokens that are assigned to a user. |
| `users.authtoken:update` | `global:users:*` | Update authentication tokens that are assigned to a user. |
| `users.password:update` | `global:users:*` | Update a users password. |
| `users:delete` | `global:users:*` | Delete a user. |
| `users:create` | n/a | Create a user. |
| `users:enable` | `global:users:*` | Enable a user. |
| `users:disable` | `global:users:*` | Disable a user. |
| `users.permissions:update` | `global:users:*` | Update a users organization-level permissions. |
| `users:logout` | `global:users:*` | Sign out a user. |
| `users.quotas:list` | `global:users:*` | List a users quotas. |
| `users.quotas:update` | `global:users:*` | Update a users quotas. |
| `org.users.read` | `users:*` | Get user profiles within an organization. |
| `org.users.add` | `users:*` | Add a user to an organization. |
| `org.users.remove` | `users:*` | Remove a user from an organization. |
| `org.users.role:update` | `users:*` | Update the organization role (`Viewer`, `Editor`, or `Admin`) of an organization. |
| `ldap.user:read` | n/a | Get a user via LDAP. |
| `ldap.user:sync` | n/a | Sync a user via LDAP. |
| `ldap.status:read` | n/a | Verify the availability of the LDAP server or servers. |
| `ldap.config:reload` | n/a | Reload the LDAP configuration. |
| `status:accesscontrol` | `services:accesscontrol` | Get access-control enabled status. |
| `settings:read` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Read the [Grafana configuration settings]({{< relref "../../administration/configuration/_index.md" >}}) |
| `settings:write` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Update any Grafana configuration settings that can be [updated at runtime]({{< relref "../../enterprise/settings-updates/_index.md" >}}). |
| `server.stats:read` | n/a | Read server stats |
| `datasources:explore` | n/a | Enable explore |
| Action | Applicable scope | Description |
| -------------------------------- | ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `roles:list` | `roles:*` | List available roles without permissions. |
| `roles:read` | `roles:*` | Read a specific role with its permissions. |
| `roles:write` | `permissions:delegate` | Create or update a custom role. |
| `roles:delete` | `permissions:delegate` | Delete a custom role. |
| `roles.builtin:list` | `roles:*` | List built-in role assignments. |
| `roles.builtin:add` | `permissions:delegate` | Create a built-in role assignment. |
| `roles.builtin:remove` | `permissions:delegate` | Delete a built-in role assignment. |
| `reports.admin:create` | `reports:*` | Create reports. |
| `reports.admin:write` | `reports:*` | Update reports. |
| `reports:delete` | `reports:*` | Delete reports. |
| `reports:read` | `reports:*` | List all available reports or get a specific report. |
| `reports:send` | `reports:*` | Send a report email. |
| `reports.settings:write` | n/a | Update report settings. |
| `reports.settings:read` | n/a | Read report settings. |
| `provisioning:reload` | `provisioners:*` | Reload provisioning files. To find the exact scope for specific provisioner, see [Scope definitions]({{< relref "./permissions.md#scope-definitions" >}}). |
| `users:read` | `global:users:*` | Read or search user profiles. |
| `users:write` | `global:users:*` | Update a users profile. |
| `users.teams:read` | `global:users:*` | Read a users teams. |
| `users.authtoken:list` | `global:users:*` | List authentication tokens that are assigned to a user. |
| `users.authtoken:update` | `global:users:*` | Update authentication tokens that are assigned to a user. |
| `users.password:update` | `global:users:*` | Update a users password. |
| `users:delete` | `global:users:*` | Delete a user. |
| `users:create` | n/a | Create a user. |
| `users:enable` | `global:users:*` | Enable a user. |
| `users:disable` | `global:users:*` | Disable a user. |
| `users.permissions:update` | `global:users:*` | Update a users organization-level permissions. |
| `users:logout` | `global:users:*` | Sign out a user. |
| `users.quotas:list` | `global:users:*` | List a users quotas. |
| `users.quotas:update` | `global:users:*` | Update a users quotas. |
| `org.users:read` | `users:*` | Get user profiles within an organization. |
| `org.users:add` | `users:*` | Add a user to an organization. |
| `org.users:remove` | `users:*` | Remove a user from an organization. |
| `org.users.role:update` | `users:*` | Update the organization role (`Viewer`, `Editor`, or `Admin`) of an organization. |
| `ldap.user:read` | n/a | Get a user via LDAP. |
| `ldap.user:sync` | n/a | Sync a user via LDAP. |
| `ldap.status:read` | n/a | Verify the availability of the LDAP server or servers. |
| `ldap.config:reload` | n/a | Reload the LDAP configuration. |
| `status:accesscontrol` | `services:accesscontrol` | Get access-control enabled status. |
| `settings:read` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Read the [Grafana configuration settings]({{< relref "../../administration/configuration/_index.md" >}}) |
| `settings:write` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Update any Grafana configuration settings that can be [updated at runtime]({{< relref "../../enterprise/settings-updates/_index.md" >}}). |
| `server.stats:read` | n/a | Read server stats |
| `datasources:explore` | n/a | Enable access to the **Explore** tab. |
| `datasources:read` | n/a<br>`datasources:*`<br>`datasources:id:*`<br>`datasources:uid:*`<br>`datasources:name:*` | List data sources. |
| `datasources.id:read` | `datasources:*`<br>`datasources:name:*` | Read data source IDs. |
| `datasources:create` | n/a | Create data sources. |
| `datasources:write` | `datasources:*`<br>`datasources:id:*` | Update data sources. |
| `datasources:delete` | `datasources:id:*`<br>`datasources:uid:*`<br>`datasources:name:*` | Delete data sources. |
| `datasources.permissions:read` | `datasources:*`<br>`datasources:id:*` | List data source permissions. |
| `datasources.permissions:create` | `datasources:*`<br>`datasources:id:*` | Create data source permissions. |
| `datasources.permissions:delete` | `datasources:*`<br>`datasources:id:*` | Delete data source permissions. |
| `datasources.permissions:toggle` | `datasources:*`<br>`datasources:id:*` | Enable or disable data source permissions. |
## Scope definitions
The following list contains fine-grained access control scopes.
| Scopes | Descriptions |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `roles:*` | Restrict an action to a set of roles. For example, `roles:*` matches any role, `roles:randomuid` matches only the role with UID `randomuid` and `roles:custom:reports:{editor,viewer}` matches both `custom:reports:editor` and `custom:reports:viewer` roles. |
| `permissions:delegate` | The scope is only applicable for roles associated with the Access Control itself and indicates that you can delegate your permissions only, or a subset of it, by creating a new role or making an assignment. |
| `reports:*` | Restrict an action to a set of reports. For example, `reports:*` matches any report and `reports:1` matches the report with id `1`. |
| `services:accesscontrol` | Restrict an action to target only the fine-grained access control service. You can use this in conjunction with the `status:accesscontrol` actions. |
| `global:users:*` | Restrict an action to a set of global users. |
| `users:*` | Restrict an action to a set of users from an organization. |
| `settings:*` | Restrict an action to a subset of settings. For example, `settings:*` matches all settings, `settings:auth.saml:*` matches all SAML settings, and `settings:auth.saml:enabled` matches the enable property on the SAML settings. |
| `provisioners:*` | Restrict an action to a set of provisioners. For example, `provisioners:*` matches any provisioner, and `provisioners:accesscontrol` matches the fine-grained access control [provisioner]({{< relref "./provisioning.md" >}}). |
| Scopes | Descriptions |
| ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `roles:*` | Restrict an action to a set of roles. For example, `roles:*` matches any role, `roles:randomuid` matches only the role with UID `randomuid` and `roles:custom:reports:{editor,viewer}` matches both `custom:reports:editor` and `custom:reports:viewer` roles. |
| `permissions:delegate` | The scope is only applicable for roles associated with the Access Control itself and indicates that you can delegate your permissions only, or a subset of it, by creating a new role or making an assignment. |
| `reports:*` | Restrict an action to a set of reports. For example, `reports:*` matches any report and `reports:1` matches the report with id `1`. |
| `services:accesscontrol` | Restrict an action to target only the fine-grained access control service. You can use this in conjunction with the `status:accesscontrol` actions. |
| `global:users:*` | Restrict an action to a set of global users. |
| `users:*` | Restrict an action to a set of users from an organization. |
| `settings:*` | Restrict an action to a subset of settings. For example, `settings:*` matches all settings, `settings:auth.saml:*` matches all SAML settings, and `settings:auth.saml:enabled` matches the enable property on the SAML settings. |
| `provisioners:*` | Restrict an action to a set of provisioners. For example, `provisioners:*` matches any provisioner, and `provisioners:accesscontrol` matches the fine-grained access control [provisioner]({{< relref "./provisioning.md" >}}). |
| `datasources:*`<br>`datasources:id:*`<br>`datasources:uid:*`<br>`datasources:name:*` | Restrict an action to a set of data sources. For example, `datasources:*` matches any data source, and `datasources:name:postgres` matches the data source named `postgres`. |

View File

@@ -9,7 +9,7 @@ weight = 600
The enhanced LDAP integration adds additional functionality on top of the [LDAP integration]({{< relref "../auth/ldap.md" >}}) available in the open source edition of Grafana.
> Enhanced LDAP integration is only available in Grafana Enterprise.
> Enhanced LDAP integration is only available in [Grafana Cloud Advanced](https://grafana.com/docs/grafana-cloud/) and in [Grafana Enterprise]({{< relref "../enterprise" >}}).
> Refer to [Fine-grained access control]({{< relref "../enterprise/access-control/_index.md" >}}) in Grafana Enterprise to understand how you can control access with fine-grained permissions.

View File

@@ -353,7 +353,15 @@ This value is `true` by default.
### ttl
_Time to live_ (TTL) is the time that a query result is stored in the caching system before it is deleted or refreshed. This setting defines the time to live for query caching, when TTL is not configured in data source settings. The default value is `5m` (5 minutes).
_Time to live_ (TTL) is the time that a query result is stored in the caching system before it is deleted or refreshed. This setting defines the time to live for query caching, when TTL is not configured in data source settings. The default value is `1m` (1 minute).
### max_ttl
The max duration that a query result is stored in the caching system before it is deleted or refreshed. This value will override `ttl` config option or data source setting if the `ttl` value is greater than `max_ttl`. To disable this constraint, set this value to `0s`.
The default is `0s` (disabled).
> **Note:** Disabling this constraint is not recommended in production environments.
### max_value_mb
@@ -361,6 +369,28 @@ This value limits the size of a single cache value. If a cache value (or query r
The default is `1`.
### connection_timeout
This setting defines the duration to wait for a connection to the caching backend.
The default is `5s`.
### read_timeout
This setting defines the duration to wait for the caching backend to return a cached result. To disable this timeout, set this value to `0s`.
The default is `0s` (disabled).
> **Note:** Disabling this timeout is not recommended in production environments.
### write_timeout
This setting defines the number of seconds to wait for the caching backend to store a result. To disable this timeout, set this value to `0s`.
The default is `0s` (disabled).
> **Note:** Disabling this timeout is not recommended in production environments.
## [caching.encryption]
### enabled
@@ -401,6 +431,12 @@ The full Redis URL of your Redis server. Example: `redis://localhost:6739/0`.
The default is `"redis://localhost:6379"`.
### cluster
A comma-separated list of Redis cluster members in `host:port` format. For example, `localhost:7000, localhost: 7001, localhost:7002`.
> **Note:** If you have specify `cluster`, the value for `url` is ignored.
### prefix
A string that prefixes all Redis keys. This value must be set if using a shared database in Redis. If `prefix` is empty, then one will not be used.

View File

@@ -31,7 +31,7 @@ You can make a panel retrieve fresh data more frequently by increasing the **Max
Query caching works for all [Enterprise data sources](https://grafana.com/grafana/plugins/?type=datasource&enterprise=1), and it works for the following [built-in data sources]({{< relref "../datasources/_index.md" >}}):
- CloudWatch
- CloudWatch Metrics
- Google Cloud Monitoring
- InfluxDB
- Microsoft SQL Server

View File

@@ -20,7 +20,7 @@ Any changes you make to a dashboard used in a report are reflected the next time
## Requirements
- SMTP must be configured for reports to be sent. Refer to [SMTP]({{< relref "../administration/configuration.md#smtp" >}}) in [Configuration]({{< relref "../administration/configuration.md" >}}) for more information.
- The Image Renderer plugin must be installed or the remote rendering service must be set up. Refer to [Image rendering]({{< relref "../administration/image_rendering.md" >}}) for more information.
- The Image Renderer plugin must be installed or the remote rendering service must be set up. Refer to [Image rendering]({{< relref "../image-rendering/" >}}) for more information.
## Access control
@@ -99,7 +99,7 @@ If the time zone is set differently between your Grafana server and its remote i
You can attach a CSV file to the report email for each table panel on the selected dashboard, along with the PDF report. By default, CSVs larger than 10Mb won't be sent to avoid email servers to reject the email. You can increase or decrease this limit in the [reporting configuration]({{< relref "#rendering-configuration" >}}).
This feature relies on the same plugin that supports the [image rendering]({{< relref "../administration/image_rendering.md" >}}) features.
This feature relies on the same plugin that supports the [image rendering]({{< relref "../image-rendering/" >}}) features.
When the CSV file is generated, it is temporarily written to the `csv` folder in the Grafana `data` folder.

View File

@@ -25,7 +25,7 @@ Results of log queries are shown as histograms in the graph and individual logs
#### Log level
For logs where a **level** label is specified, we use the value of the label to determine the log level and update color accordingly. If the log doesn't have a level label specified, we parse the log to find out if its content matches any of the supported expressions (see below for more information). The log level is always determined by the first match. In case Grafana is not able to determine a log level, it will be visualized with **unknown** log level.
For logs where a level label is specified, we use the value of the label to determine the log level and update color accordingly. If the log doesn't have a level label specified, we try to parse the log using logfmt and JSON parsers to find out if its content matches any of the supported expressions (see below for more information). The log level is always determined by the first match. In case Grafana is not able to determine a log level, it will be visualized with an unknown log level.
**Supported log levels and mapping of log level abbreviation and expressions:**

View File

@@ -6,72 +6,8 @@ aliases = ["/docs/grafana/latest/guides/what-is-grafana"]
# Getting started
This section provides a high-level look at Grafana, the Grafana process, and Grafana features. It's a good place to learn how to use the Grafana software.
This section provides guidance on how to install Grafana and build your first dashboard. It also provides step by step instructions on how to add a Prometheus or an InfluxDB data source. Refer to [Data sources]({{< relref "../datasources/_index.md" >}}) for a list of all supported data sources.
{{< docs/shared "basics/what-is-grafana.md" >}}
After creating a dashboard like you do in [Getting started]({{< relref "getting-started.md" >}}), there are many possible things you might do next. It all depends on your needs and your use case.
For example, if you want to view weather data and statistics about your smart home, then you might create a playlist. If you are the administrator for a corporation and are managing Grafana for multiple teams, then you might need to set up provisioning and authentication.
The following sections provide an overview of things you might want to do with your Grafana database and links so you can learn more. For more guidance and ideas, check out the [Grafana Community forums](https://community.grafana.com/).
## Explore metrics and logs
Explore your data through ad-hoc queries and dynamic drilldown. Split view and compare different time ranges, queries and data sources side by side.
Refer to [Explore]({{< relref "../explore/_index.md" >}}) for more information.
## Alerts
If you're using Grafana alerting, then you can have alerts sent through a number of different [alert notifiers]({{< relref "../alerting/old-alerting/notifications.md" >}}), including PagerDuty, SMS, email, VictorOps, OpsGenie, or Slack.
Alert hooks allow you to create different notifiers with a bit of code if you prefer some other channels of communication. Visually define [alert rules]({{< relref "../alerting/_index.md" >}}) for your most important metrics.
## Annotations
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.
## Dashboard variables
[Template variables]({{< relref "../variables/_index.md" >}}) allow you to create dashboards that can be reused for lots of different use cases. Values aren't hard-coded with these templates, so for instance, if you have a production server and a test server, you can use the same dashboard for both.
Templating allows you to drill down into your data, say, from all data to North America data, down to Texas data, and beyond. You can also share these dashboards across teams within your organization—or if you create a great dashboard template for a popular data source, you can contribute it to the whole community to customize and use.
## Configure Grafana
If you're a Grafana administrator, then you'll want to thoroughly familiarize yourself with [Grafana configuration options]({{< relref "../administration/configuration.md" >}}) and the [Grafana CLI]({{< relref "../administration/cli.md" >}}).
Configuration covers both config files and environment variables. You can set up default ports, logging levels, email IP addresses, security, and more.
## Import dashboards and plugins
Discover hundreds of [dashboards](https://grafana.com/grafana/dashboards) and [plugins](https://grafana.com/grafana/plugins) in the official library. Thanks to the passion and momentum of community members, new ones are added every week.
## Authentication
Grafana supports different authentication methods, such as LDAP and OAuth, and allows you to map users to organizations. Refer to the [User authentication overview]({{< relref "../auth/overview.md" >}}) for more information.
In Grafana Enterprise, you can also map users to teams: If your company has its own authentication system, Grafana allows you to map the teams in your internal systems to teams in Grafana. That way, you can automatically give people access to the dashboards designated for their teams.
Refer to [Grafana Enterprise]({{< relref "../enterprise/_index.md" >}}) for more information.
## Provisioning
While it's easy to click, drag, and drop to create a single dashboard, power users in need of many dashboards will want to automate the setup with a script. You can script anything in Grafana.
For example, if you're spinning up a new Kubernetes cluster, you can also spin up a Grafana automatically with a script that would have the right server, IP address, and data sources preset and locked in so users cannot change them. It's also a way of getting control over a lot of dashboards.
Refer to [Provisioning]({{< relref "../administration/provisioning.md" >}}) for more information.
## Permissions
When organizations have one Grafana and multiple teams, they often want the ability to both keep things separate and share dashboards. You can create a team of users and then set [permissions]({{< relref "../permissions/_index.md" >}}) on folders, dashboards, and down to the [data source level]({{< relref "../enterprise/datasource_permissions.md" >}}) if you're using [Grafana Enterprise]({{< relref "../enterprise/_index.md" >}}).
{{< docs/shared "basics/grafana-cloud.md" >}}
{{< docs/shared "basics/grafana-enterprise.md" >}}
- [Getting started with Grafana]({{< relref "getting-started.md" >}})
- [Getting started with Grafana and InfluxDB]({{< relref "getting-started-influxdb.md" >}})
- [Getting started with Grafana and Prometheus]({{< relref "getting-started-prometheus.md" >}})

View File

@@ -9,13 +9,13 @@ weight = 250
{{< docs/shared "influxdb/intro.md" >}}
> **Note:** You can also configure a [Grafana Cloud](https://grafana.com/docs/grafana-cloud/) instance to display system metrics without having to host Grafana yourself. Grafana offers a [free account with Grafana Cloud](https://grafana.com/signup/cloud/connect-account?pg=gsdocs) to help you get started.
{{< docs/shared "getting-started/first-step.md" >}}
## Step 2. Get InfluxDB
You can [download InfluxDB](https://portal.influxdata.com/downloads/) and install it locally or you can sign up for [InfluxDB Cloud](https://www.influxdata.com/products/influxdb-cloud/).
> **Note:** Windows installers are not available for some versions of InfluxDB.
You can [download InfluxDB](https://portal.influxdata.com/downloads/) and install it locally or you can sign up for [InfluxDB Cloud](https://www.influxdata.com/products/influxdb-cloud/). Windows installers are not available for some versions of InfluxDB.
## Step 3. Install other InfluxDB software
@@ -29,9 +29,9 @@ If you downloaded and installed InfluxDB on your local machine, then use the [Qu
If you are using the cloud account, then the wizards will guide you through the initial process. For more information, refer to [Configure Telegraf](https://docs.influxdata.com/influxdb/cloud/write-data/no-code/use-telegraf/#configure-telegraf).
> **Note:** Windows users might need to make additional adjustments. Look for special instructions in the InfluxData documentation and [Using Telegraf on Windows](https://www.influxdata.com/blog/using-telegraf-on-windows/) blog post.
### Note for Windows users:
> **Note:** The regular system monitoring template in InfluxDB Cloud is not compatible with Windows. Windows users who use InfluxDB Cloud to monitor their system will need to use the [Windows System Monitoring Template](https://github.com/influxdata/community-templates/tree/master/windows_system).
Windows users might need to make additional adjustments. Look for special instructions in the InfluxData documentation and [Using Telegraf on Windows](https://www.influxdata.com/blog/using-telegraf-on-windows/) blog post. The regular system monitoring template in InfluxDB Cloud is not compatible with Windows. Windows users who use InfluxDB Cloud to monitor their system will need to use the [Windows System Monitoring Template](https://github.com/influxdata/community-templates/tree/master/windows_system).
## Step 5. Add your InfluxDB data source to Grafana

View File

@@ -8,9 +8,9 @@ weight = 300
# Getting started with Grafana and Prometheus
Prometheus is an open source systems monitoring system for which Grafana provides out-of-the-box support. This topic walks you through the steps to create a series of dashboards in Grafana to display system metrics for a server monitored by Prometheus.
Prometheus is an open source monitoring system for which Grafana provides out-of-the-box support. This topic walks you through the steps to create a series of dashboards in Grafana to display system metrics for a server monitored by Prometheus.
You can also configure a [Grafana Cloud](https://grafana.com/docs/grafana-cloud/) instance to display system metrics without having to host Grafana yourself.
> **Note:** You can configure a [Grafana Cloud](https://grafana.com/docs/grafana-cloud/) instance to display system metrics without having to host Grafana yourself. A [free forever plan](https://grafana.com/signup/cloud/connect-account?pg=gsdocs) provides 10,000 active series for metrics.
{{< docs/shared "getting-started/first-step.md" >}}
@@ -62,3 +62,8 @@ Now that you have a curated list of queries, create [dashboards]({{< relref "../
The following image shows a dashboard with three panels showing some system metrics.
<img width="850px" src="/static/img/docs/getting-started/simple_grafana_prom_dashboard.png" caption="Prometheus dashboards" >
To learn more:
- Grafana documentation: [Prometheus data source]({{< relref "../datasources/prometheus.md" >}})
- Prometheus documentation: [What is Prometheus?](https://prometheus.io/docs/introduction/overview/)

View File

@@ -1,8 +1,8 @@
+++
title = "With Grafana and MS SQL Server"
description = "Guide for getting started with Grafana and MS SQL Server"
keywords = ["grafana", "intro", "guide", "started", "SQL", "MSSQL"]
aliases = ["/docs/grafana/latest/guides/gettingstarted","/docs/grafana/latest/guides/getting_started"]
draft = true
weight = 400
+++

View File

@@ -22,7 +22,7 @@ The uid can have a maximum length of 40 characters.
`POST /api/dashboards/db`
Creates a new dashboard or updates an existing dashboard.
Creates a new dashboard or updates an existing dashboard. When updating existing dashboards, if you do not define the `folderId` or the `folderUid` property, then the dashboard(s) are moved to the General folder. (You need to define only one property, not both).
**Example Request for new dashboard**:

View File

@@ -7,10 +7,23 @@ aliases = ["/docs/grafana/latest/http_api/datasource/"]
# Data source API
> If you are running Grafana Enterprise and have [Fine-grained access control]({{< relref "../enterprise/access-control/_index.md" >}}) enabled, for some endpoints you would need to have relevant permissions.
> Refer to specific resources to understand what permissions are required.
## Get all data sources
`GET /api/datasources`
### Required permissions
See note in the [introduction]({{< ref "#data-source-api" >}}) for an explanation.
| Action | Scope |
| ---------------- | -------------- |
| datasources:read | datasources:\* |
### Examples
**Example Request**:
```http
@@ -57,6 +70,16 @@ Content-Type: application/json
HTTP/1.1 200
Content-Type: application/json
```
## Get a single data source by UID
`GET /api/datasources/uid/:uid`
### Required permissions
See note in the [introduction]({{< ref "#data-source-api" >}}) for an explanation.
| Action | Scope |
| ---------------- | -------------------------------------------------------------------------------------- |
| datasources:read | datasources:\*<br>datasources:uid:\*<br>datasources:uid:kLtEtcRGk (single data source) |
@@ -103,6 +126,16 @@ Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
```
## Get data source Id by Name
`GET /api/datasources/id/:name`
### Required permissions
@@ -149,6 +182,16 @@ Content-Type: application/json
**Example Graphite Request**:
```http
POST /api/datasources HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Graphite Response**:
```http
HTTP/1.1 200
Content-Type: application/json
@@ -195,6 +238,16 @@ Content-Type: application/json
| Action | Scope |
| ----------------- | ---------------------------------------------------------------------------- |
| datasources:write | datasources:\*<br>datasources:id:\*<br>datasources:id:1 (single data source) |
### Examples
**Example Request**:
```http
PUT /api/datasources/1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
@@ -219,6 +272,16 @@ Content-Type: application/json
| Action | Scope |
| ------------------ | ---------------------------------------------------------------------------- |
| datasources:delete | datasources:\*<br>datasources:id:\*<br>datasources:id:1 (single data source) |
### Examples
**Example Request**:
```http
DELETE /api/datasources/1 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
@@ -357,6 +420,16 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
`PUT /api/datasources/:datasourceId`
### Required permissions
See note in the [introduction]({{< ref "#data-source-api" >}}) for an explanation.
| Action | Scope |
| ----------------- | ---------------------------------------------------------------------------- |
| datasources:write | datasources:\*<br>datasources:id:\*<br>datasources:id:1 (single data source) |
### Examples
**Example Request**:
```http
@@ -427,6 +500,16 @@ Content-Type: application/json
`DELETE /api/datasources/:datasourceId`
### Required permissions
See note in the [introduction]({{< ref "#data-source-api" >}}) for an explanation.
| Action | Scope |
| ------------------ | ---------------------------------------------------------------------------- |
| datasources:delete | datasources:\*<br>datasources:id:\*<br>datasources:id:1 (single data source) |
### Examples
**Example Request**:
```http
@@ -449,6 +532,16 @@ Content-Type: application/json
`DELETE /api/datasources/uid/:uid`
### Required permissions
See note in the [introduction]({{< ref "#data-source-api" >}}) for an explanation.
| Action | Scope |
| ------------------ | -------------------------------------------------------------------------------------- |
| datasources:delete | datasources:\*<br>datasources:uid:\*<br>datasources:uid:kLtEtcRGk (single data source) |
### Examples
**Example request:**
```http
@@ -471,6 +564,16 @@ Content-Type: application/json
`DELETE /api/datasources/name/:datasourceName`
### Required permissions
See note in the [introduction]({{< ref "#data-source-api" >}}) for an explanation.
| Action | Scope |
| ------------------ | ---------------------------------------------------------------------------------------------- |
| datasources:delete | datasources:\*<br>datasources:name:\*<br>datasources:name:test_datasource (single data source) |
### Examples
**Example Request**:
```http

View File

@@ -9,6 +9,9 @@ aliases = ["/docs/grafana/latest/http_api/datasourcepermissions/"]
> The Data Source Permissions is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../enterprise" >}}).
> If you are running Grafana Enterprise and have [Fine-grained access control]({{< relref "../enterprise/access-control/_index.md" >}}) enabled, for some endpoints you would need to have relevant permissions.
> Refer to specific resources to understand what permissions are required.
This API can be used to enable, disable, list, add and remove permissions for a data source.
Permissions can be set for a user or a team. Permissions cannot be set for Admins - they always have access to everything.
@@ -23,6 +26,16 @@ The permission levels for the permission field:
Enables permissions for the data source with the given `id`. No one except Org Admins will be able to query the data source until permissions have been added which permit certain users or teams to query the data source.
### Required permissions
See note in the [introduction]({{< ref "#data-source-permissions-api" >}}) for an explanation.
| Action | Scope |
| ------------------------------ | ---------------------------------------------------------------------------- |
| datasources.permissions:toggle | datasources:\*<br>datasources:id:\*<br>datasources:id:1 (single data source) |
### Examples
**Example request:**
```http
@@ -58,6 +71,16 @@ Status codes:
Disables permissions for the data source with the given `id`. All existing permissions will be removed and anyone will be able to query the data source.
### Required permissions
See note in the [introduction]({{< ref "#data-source-permissions-api" >}}) for an explanation.
| Action | Scope |
| ------------------------------ | ---------------------------------------------------------------------------- |
| datasources.permissions:toggle | datasources:\*<br>datasources:id:\*<br>datasources:id:1 (single data source) |
### Examples
**Example request:**
```http
POST /api/datasources/1/disable-permissions
@@ -93,6 +116,16 @@ Status codes:
### Required permissions
See note in the [introduction]({{< ref "#data-source-permissions-api" >}}) for an explanation.
| Action | Scope |
| ---------------------------- | ---------------------------------------------------------------------------- |
| datasources.permissions:read | datasources:\*<br>datasources:id:\*<br>datasources:id:1 (single data source) |
### Examples
**Example request:**
```http
GET /api/datasources/1/permissions HTTP/1.1
Accept: application/json
@@ -154,6 +187,16 @@ Status codes:
Content-Length: 35
```
Adds a team permission for the data source with the given `id`.
**Example request:**
```http
POST /api/datasources/1/permissions
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"teamId": 1,
@@ -218,6 +261,16 @@ Status codes:
- **401** - Unauthorized
- **403** - Access denied
- **404** - Datasource not found or permission not found
### Required permissions
See note in the [introduction]({{< ref "#data-source-permissions-api" >}}) for an explanation.
| Action | Scope |
| ------------------------------ | ---------------------------------------------------------------------------- |
| datasources.permissions:delete | datasources:\*<br>datasources:id:\*<br>datasources:id:1 (single data source) |
### Examples
**Example request:**
```http

View File

@@ -0,0 +1,455 @@
+++
title = "Library Element HTTP API "
description = "Grafana Library Element HTTP API"
keywords = ["grafana", "http", "documentation", "api", "library-element"]
aliases = ["/docs/grafana/latest/http_api/library_element/"]
+++
# Library Element API
## Identifier (id) vs unique identifier (uid)
The identifier (ID) of a library element is an auto-incrementing numeric value that is unique per Grafana install.
The unique identifier (UID) of a library element uniquely identifies library elements between multiple Grafana installs. It's automatically generated unless you specify it during library element creation. The UID provides consistent URLs for accessing library elements and when syncing library elements between multiple Grafana installs.
The maximum length of a UID is 40 characters.
## Get all library elements
`GET /api/library-elements`
Returns a list of all library elements the authenticated user has permission to view. Use the `perPage` query parameter to control the maximum number of library elements returned; the default limit is 100. You can also use the `page` query parameter to fetch library elements from any page other than the first one.
Query parameters:
- **searchString** Part of the name or description searched for.
- **kind** Kind of element to search for. Use `1` for library panels or `2` for library variables.
- **sortDirection** Sort order of elements. Use `alpha-asc` for ascending and `alpha-desc` for descending sort order.
- **typeFilter** A comma separated list of types to filter the elements by.
- **excludeUid** Element UID to exclude from search results.
- **folderFilter** A comma separated list of folder ID(s) to filter the elements by.
- **perPage** The number of results per page; default is 100.
- **page** The page for a set of records, given that only `perPage` records are returned at a time. Numbering starts at `1`.
**Example Request**:
```http
GET /api/library-elements?perPage=10 HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
```
Status Codes:
- **200** Found
- **401** Unauthorized
## Get library element by uid
`GET /api/library-elements/:uid`
Returns a library element with the given UID.
**Example Request**:
```http
GET /api/library-elements/V--OrYHnz HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
```
Status Codes:
- **200** Found
- **401** Unauthorized
- **404** Library element not found
## Get library element by name
`GET /api/library-elements/name/:name`
Returns a library element with the given name
**Example Request**:
```http
GET /api/library-elements/name/API docs Example HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
```
Status Codes:
- **200** Found
- **401** Unauthorized
- **404** Library element not found
## Get library element connections
`GET /api/library-elements/:uid/connections`
Returns a list of connections for a library element based on the UID specified.
**Example Request**:
```http
GET /api/library-elements/V--OrYHnz/connections HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
```
Status Codes:
- **200** Found
- **401** Unauthorized
- **404** Library element not found
## Create library element
`POST /api/library-elements`
Creates a new library element.
JSON Body schema:
- **folderId** ID of the folder where the library element is stored.
- **name** Name of the library element.
- **model** The JSON model for the library element.
- **kind** Kind of element to create, Use `1` for library panels or `2` for library variables.
- **uid** Optional, the [unique identifier](/http_api/library_element/#identifier-id-vs-unique-identifier-uid).
**Example Request**:
```http
POST /api/library-elements HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
```
Status Codes:
- **200** Created
- **400** Errors (for example, name or UID already exists, invalid JSON, missing or invalid fields, and so on).
- **401** Unauthorized
- **403** Access denied
## Update library element
`PATCH /api/library-elements/:uid`
Updates an existing library element identified by uid.
JSON Body schema:
- **folderId** ID of the folder where the library element is stored.
- **name** Name of the library element.
- **model** The JSON model for the library element.
- **kind** Kind of element to create. Use `1` for library panels or `2` for library variables.
- **version** Version of the library element you are updating.
- **uid** Optional, the [unique identifier](/http_api/library_element/#identifier-id-vs-unique-identifier-uid).
**Example Request**:
```http
PATCH /api/library-elements/nErXDvCkzz HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
```
Status Codes:
- **200** Updated
- **400** Errors (for example, name or UID already exists, invalid JSON, missing or invalid fields, and so on).
- **401** Unauthorized
- **403** Access denied
- **404** Library element not found
- **412** Version mismatch
## Delete library element
`DELETE /api/library-elements/:uid`
Deletes an existing library element as specified by the UID. This operation cannot be reverted.
> **Note:** You cannot delete a library element that is connected. This operation cannot be reverted.
**Example Request**:
```http
DELETE /api/library-elements/nErXDvCkzz HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
```
Status Codes:
- **200** Deleted
- **401** Unauthorized
- **400** Bad request
- **403** Access denied
- **404** Library element not found
- **200** Found
- **401** Unauthorized
- **404** Library element not found
## Create library element
`POST /api/library-elements`
Creates a new library element.
JSON Body schema:
- **folderId** ID of the folder where the library element is stored.
- **name** Name of the library element.
- **model** The JSON model for the library element.
- **kind** Kind of element to create, Use `1` for library panels or `2` for library variables.
- **uid** Optional, the [unique identifier](/http_api/library_element/#identifier-id-vs-unique-identifier-uid).
**Example Request**:
```http
POST /api/library-elements HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"uid": "nErXDvCkzz",
"folderId": 0,
"name": "Example library panel",
"model": {...},
"kind": 1
}
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
{
"result": {
"id": 28,
"orgId": 1,
"folderId": 0,
"uid": "nErXDvCkzz",
"name": "Example library panel",
"kind": 1,
"type": "",
"description": "",
"model": {...},
"version": 1,
"meta": {
"folderName": "General",
"folderUid": "",
"connectedDashboards": 0,
"created": "2021-09-30T09:14:22.378307+02:00",
"updated": "2021-09-30T09:14:22.378307+02:00",
"createdBy": {
"id": 1,
"name": "admin",
"avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56"
},
"updatedBy": {
"id": 1,
"name": "admin",
"avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56"
}
}
}
}
```
Status Codes:
- **200** Created
- **400** Errors (for example, name or UID already exists, invalid JSON, missing or invalid fields, and so on).
- **401** Unauthorized
- **403** Access denied
## Update library element
`PATCH /api/library-elements/:uid`
Updates an existing library element identified by uid.
JSON Body schema:
- **folderId** ID of the folder where the library element is stored.
- **name** Name of the library element.
- **model** The JSON model for the library element.
- **kind** Kind of element to create. Use `1` for library panels or `2` for library variables.
- **version** Version of the library element you are updating.
- **uid** Optional, the [unique identifier](/http_api/library_element/#identifier-id-vs-unique-identifier-uid).
**Example Request**:
```http
PATCH /api/library-elements/nErXDvCkzz HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
"name": "Renamed library panel",
"kind": 1,
"version": 1
}
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
{
"result": {
"id": 28,
"orgId": 1,
"folderId": 0,
"uid": "nErXDvCkzz",
"name": "Renamed library panel",
"kind": 1,
"type": "",
"description": "",
"model": {
"description": "",
"type": ""
},
"version": 2,
"meta": {
"folderName": "General",
"folderUid": "",
"connectedDashboards": 0,
"created": "2021-09-30T09:14:22+02:00",
"updated": "2021-09-30T09:25:57.697214+02:00",
"createdBy": {
"id": 1,
"name": "admin",
"avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56"
},
"updatedBy": {
"id": 1,
"name": "admin",
"avatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56"
}
}
}
}
```
Status Codes:
- **200** Updated
- **400** Errors (for example, name or UID already exists, invalid JSON, missing or invalid fields, and so on).
- **401** Unauthorized
- **403** Access denied
- **404** Library element not found
- **412** Version mismatch
## Delete library element
`DELETE /api/library-elements/:uid`
Deletes an existing library element as specified by the UID. This operation cannot be reverted.
> **Note:** You cannot delete a library element that is connected. This operation cannot be reverted.
**Example Request**:
```http
DELETE /api/library-elements/nErXDvCkzz HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
**Example Response**:
```http
HTTP/1.1 200
Content-Type: application/json
{
"message": "Library element deleted"
}
```
Status Codes:
- **200** Deleted
- **401** Unauthorized
- **400** Bad request
- **403** Access denied
- **404** Library element not found

View File

@@ -0,0 +1,404 @@
+++
title = "Image rendering"
description = "Image rendering"
keywords = ["grafana", "image", "rendering", "plugin"]
aliases = ["/docs/grafana/latest/administration/image_rendering/"]
weight = 55
+++
# Image rendering
Grafana supports automatic rendering of panels as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/old-alerting/notifications.md" >}}), [PDF export]({{< relref "../enterprise/export-pdf.md" >}}), and [Reporting]({{< relref "../enterprise/reporting.md" >}}). PDF Export and Reporting are available only in [Grafana Enterprise]({{< relref "../enterprise/" >}}).
> **Note:** Image rendering of dashboards is not supported at this time.
While an image is being rendered, the PNG image is temporarily written to the file system. When the image is rendered, the PNG image is temporarily written to the `png` folder in the Grafana `data` folder.
A background job runs every 10 minutes and removes temporary images. You can configure how long an image should be stored before being removed by configuring the [temp_data_lifetime]({{< relref "../administration/configuration/#temp_data_lifetime" >}}) setting.
You can also render a PNG by clicking the dropdown arrow next to a panel title, then clicking **Share > Direct link rendered image**.
## Alerting and render limits
Alert notifications can include images, but rendering many images at the same time can overload the server where the renderer is running. For instructions of how to configure this, see [concurrent_render_limit]({{< relref "../administration/configuration/#concurrent_render_limit" >}}).
## Install Grafana Image Renderer plugin
> **Note:** Starting from Grafana v7.0.0, all PhantomJS support has been removed. Please use the Grafana Image Renderer plugin or remote rendering service.
To install the plugin, refer to the [Grafana Image Renderer Installation instructions](https://grafana.com/grafana/plugins/grafana-image-renderer#installation).
## Configuration
The Grafana Image Renderer plugin has a number of configuration options that are used in plugin or remote rendering modes.
In plugin mode, you can specify them directly in the [Grafana configuration file]({{< relref "../administration/configuration/#plugingrafana-image-renderer" >}}).
In remote rendering mode, you can specify them in a `.json` [configuration file](#configuration-file) or, for some of them, you can override the configuration defaults using environment variables.
### Configuration file
You can update your settings by using a configuration file, see [default.json](https://github.com/grafana/grafana-image-renderer/tree/master/default.json) for defaults. Note that any configured environment variable takes precedence over configuration file settings.
You can volume mount your custom configuration file when starting the docker container:
```bash
docker run -d --name=renderer --network=host -v /some/path/config.json:/usr/src/app/config.json grafana/grafana-image-renderer:latest
```
You can see a docker-compose example using a custom configuration file [here](https://github.com/grafana/grafana-image-renderer/tree/master/devenv/docker/custom-config).
### Rendering mode
You can instruct how headless browser instances are created by configuring a rendering mode. Default is `default`, other supported values are `clustered` and `reusable`.
#### Default
Default mode will create a new browser instance on each request. When handling multiple concurrent requests, this mode increases memory usage as it will launch multiple browsers at the same time. If you want to set a maximum number of browser to open, you'll need to use the [clustered mode](#clustered).
> **Note:** When using the `default` mode, it's recommended to not remove the default Chromium flag `--disable-gpu`. When receiving a lot of concurrent requests, not using this flag can cause Puppeteer `newPage` function to freeze, causing request timeouts and leaving browsers open.
```bash
RENDERING_MODE=default
```
```json
{
"rendering": {
"mode": "default"
}
}
```
#### Clustered
With the `clustered` mode, you can configure how many browser instances or incognito pages can execute concurrently. Default is `browser` and will ensure a maximum amount of browser instances can execute concurrently. Mode `context` will ensure a maximum amount of incognito pages can execute concurrently. You can also configure the maximum concurrency allowed, which per default is `5`, and the maximum duration of a rendering request, which per default is `30` seconds.
Using a cluster of incognito pages is more performant and consumes less CPU and memory than a cluster of browsers. However, if one page crashes it can bring down the entire browser with it (making all the rendering requests happening at the same time fail). Also, each page isn't guaranteed to be totally clean (cookies and storage might bleed-through as seen [here](https://bugs.chromium.org/p/chromium/issues/detail?id=754576)).
```bash
RENDERING_MODE=clustered
RENDERING_CLUSTERING_MODE=browser
RENDERING_CLUSTERING_MAX_CONCURRENCY=5
RENDERING_CLUSTERING_TIMEOUT=30
```
```json
{
"rendering": {
"mode": "clustered",
"clustering": {
"mode": "browser",
"maxConcurrency": 5,
"timeout": 30
}
}
}
```
#### Reusable (experimental)
When using the rendering mode `reusable`, one browser instance will be created and reused. A new incognito page will be opened for each request. This mode is experimental since, if the browser instance crashes, it will not automatically be restarted. You can achieve a similar behavior using `clustered` mode with a high `maxConcurrency` setting.
```bash
RENDERING_MODE=reusable
```
```json
{
"rendering": {
"mode": "reusable"
}
}
```
#### Optimize the performance, CPU and memory usage of the image renderer
The performance and resources consumption of the different modes depend a lot on the number of concurrent requests your service is handling. To understand how many concurrent requests your service is handling, [monitor your image renderer service]({{< relref "./monitoring/" >}}).
With no concurrent requests, the different modes show very similar performance and CPU / memory usage.
When handling concurrent requests, we see the following trends:
- To improve performance and reduce CPU and memory consumption, use [clustered](#clustered) mode with `RENDERING_CLUSTERING_MODE` set as `context`. This parallelizes incognito pages instead of browsers.
- If you use the [clustered](#clustered) mode with a `maxConcurrency` setting below your average number of concurrent requests, performance will drop as the rendering requests will need to wait for the other to finish before getting access to an incognito page / browser.
To achieve better performance, monitor the machine on which your service is running. If you don't have enough memory and / or CPU, every rendering step will be slower than usual, increasing the duration of every rendering request.
### Other available settings
> **Note:** Please note that not all settings are available using environment variables. If there is no example using environment variable below, it means that you need to update the configuration file.
#### HTTP host
Change the listening host of the HTTP server. Default is unset and will use the local host.
```bash
HTTP_HOST=localhost
```
```json
{
"service": {
"host": "localhost"
}
}
```
#### HTTP port
Change the listening port of the HTTP server. Default is `8081`. Setting `0` will automatically assign a port not in use.
```bash
HTTP_PORT=0
```
```json
{
"service": {
"port": 0
}
}
```
#### Enable Prometheus metrics
You can enable [Prometheus](https://prometheus.io/) metrics endpoint `/metrics` using the environment variable `ENABLE_METRICS`. Node.js and render request duration metrics are included, see [output example](./monitoring/#prometheus-metrics-endpoint-output-example) for details.
Default is `false`.
```bash
ENABLE_METRICS=true
```
```json
{
"service": {
"metrics": {
"enabled": true,
"collectDefaultMetrics": true,
"requestDurationBuckets": [1, 5, 7, 9, 11, 13, 15, 20, 30]
}
}
}
```
#### Log level
Change the log level. Default is `info` and will include log messages with level `error`, `warning` and `info`.
```bash
LOG_LEVEL=debug
```
```json
{
"service": {
"logging": {
"level": "debug",
"console": {
"json": false,
"colorize": true
}
}
}
}
```
#### Verbose logging
Instruct headless browser instance whether to capture and log verbose information when rendering an image. Default is `false` and will only capture and log error messages. When enabled (`true`) debug messages are captured and logged as well.
Note that you need to change log level to `debug`, see above, for the verbose information to be included in the logs.
```bash
RENDERING_VERBOSE_LOGGING=true
```
```json
{
"rendering": {
"verboseLogging": true
}
}
```
#### Capture browser output
Instruct headless browser instance whether to output its debug and error messages into running process of remote rendering service. Default is `false`.
This can be useful to enable (`true`) when troubleshooting.
```bash
RENDERING_DUMPIO=true
```
```json
{
"rendering": {
"dumpio": true
}
}
```
#### Custom Chrome/Chromium
If you already have [Chrome](https://www.google.com/chrome/) or [Chromium](https://www.chromium.org/)
installed on your system, then you can use this instead of the pre-packaged version of Chromium.
> **Note:** Please note that this is not recommended, since you may encounter problems if the installed version of Chrome/Chromium is not compatible with the [Grafana Image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer).
You need to make sure that the Chrome/Chromium executable is available for the Grafana/image rendering service process.
```bash
CHROME_BIN="/usr/bin/chromium-browser"
```
```json
{
"rendering": {
"chromeBin": "/usr/bin/chromium-browser"
}
}
```
#### Start browser with additional arguments
Additional arguments to pass to the headless browser instance. Defaults are `--no-sandbox,--disable-gpu`. The list of Chromium flags can be found [here](https://peter.sh/experiments/chromium-command-line-switches/) and the list of flags used as defaults by Puppeteer can be found [there](https://github.com/puppeteer/puppeteer/blob/main/src/node/Launcher.ts#L172). Multiple arguments is separated with comma-character.
```bash
RENDERING_ARGS=--no-sandbox,--disable-setuid-sandbox,--disable-dev-shm-usage,--disable-accelerated-2d-canvas,--disable-gpu,--window-size=1280x758
```
```json
{
"rendering": {
"args": [
"--no-sandbox",
"--disable-setuid-sandbox",
"--disable-dev-shm-usage",
"--disable-accelerated-2d-canvas",
"--disable-gpu",
"--window-size=1280x758"
]
}
}
```
#### Ignore HTTPS errors
Instruct headless browser instance whether to ignore HTTPS errors during navigation. Per default HTTPS errors are not ignored.
Due to the security risk it's not recommended to ignore HTTPS errors.
```bash
IGNORE_HTTPS_ERRORS=true
```
```json
{
"rendering": {
"ignoresHttpsErrors": true
}
}
```
#### Default timezone
Instruct headless browser instance to use a default timezone when not provided by Grafana, .e.g. when rendering panel image of alert. See [ICUs metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1) for a list of supported timezone IDs. Fallbacks to `TZ` environment variable if not set.
```bash
BROWSER_TZ=Europe/Stockholm
```
```json
{
"rendering": {
"timezone": "Europe/Stockholm"
}
}
```
#### Default language
Instruct headless browser instance to use a default language when not provided by Grafana, e.g. when rendering panel image of alert.
Refer to the HTTP header Accept-Language to understand how to format this value.
```json
{
"rendering": {
"acceptLanguage": "fr-CH, fr;q=0.9, en;q=0.8, de;q=0.7, *;q=0.5"
}
}
```
#### Viewport width
Default viewport width when width is not specified in the rendering request. Default is `1000`.
```json
{
"rendering": {
"width": 1000
}
}
```
#### Viewport height
Default viewport height when height is not specified in the rendering request. Default is `500`.
```json
{
"rendering": {
"height": 500
}
}
```
#### Viewport maximum width
Limit the maximum viewport width that can be requested. Default is `3000`.
```json
{
"rendering": {
"maxWidth": 1000
}
}
```
#### Viewport maximum height
Limit the maximum viewport height that can be requested. Default is `3000`.
```json
{
"rendering": {
"maxHeight": 500
}
}
```
#### Device scale factor
Specify default device scale factor for rendering images. `2` is enough for monitor resolutions, `4` would be better for printed material. Setting a higher value affects performance and memory. Default is `1`.
This can be overridden in the rendering request.
```json
{
"rendering": {
"deviceScaleFactor": 2
}
}
```
#### Maximum device scale factor
Limit the maximum device scale factor that can be requested. Default is `4`.
```json
{
"rendering": {
"maxDeviceScaleFactor": 4
}
}
```

View File

@@ -0,0 +1,210 @@
+++
title = "Monitoring the image renderer"
description = "Image rendering monitoring"
keywords = ["grafana", "image", "rendering", "plugin", "monitoring"]
weight = 100
+++
# Monitoring the image renderer
Rendering images requires a lot of memory, mainly because Grafana creates browser instances in the background for the actual rendering. Monitoring your service can help you allocate the right amount of resources to your rendering service and set the right [rendering mode]({{< relref "./#rendering-mode" >}}).
## Enable Prometheus metrics endpoint
Configure this service to expose a Prometheus metrics endpoint. For information on how to configure and monitor this service using Prometheus as a data source, refer to [Grafana Image Rendering Service dashboard](https://grafana.com/grafana/dashboards/12203).
**Metrics endpoint output example:**
```
# HELP process_cpu_user_seconds_total Total user CPU time spent in seconds.
# TYPE process_cpu_user_seconds_total counter
process_cpu_user_seconds_total 0.536 1579444523566
# HELP process_cpu_system_seconds_total Total system CPU time spent in seconds.
# TYPE process_cpu_system_seconds_total counter
process_cpu_system_seconds_total 0.064 1579444523566
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.6000000000000001 1579444523566
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1579444433
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 52686848 1579444523568
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 2055344128 1579444523568
# HELP process_heap_bytes Process heap size in bytes.
# TYPE process_heap_bytes gauge
process_heap_bytes 1996390400 1579444523568
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 31 1579444523567
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1573877
# HELP nodejs_eventloop_lag_seconds Lag of event loop in seconds.
# TYPE nodejs_eventloop_lag_seconds gauge
nodejs_eventloop_lag_seconds 0.000915922 1579444523567
# HELP nodejs_active_handles Number of active libuv handles grouped by handle type. Every handle type is C++ class name.
# TYPE nodejs_active_handles gauge
nodejs_active_handles{type="WriteStream"} 2 1579444523566
nodejs_active_handles{type="Server"} 1 1579444523566
nodejs_active_handles{type="Socket"} 9 1579444523566
nodejs_active_handles{type="ChildProcess"} 2 1579444523566
# HELP nodejs_active_handles_total Total number of active handles.
# TYPE nodejs_active_handles_total gauge
nodejs_active_handles_total 14 1579444523567
# HELP nodejs_active_requests Number of active libuv requests grouped by request type. Every request type is C++ class name.
# TYPE nodejs_active_requests gauge
nodejs_active_requests{type="FSReqCallback"} 2
# HELP nodejs_active_requests_total Total number of active requests.
# TYPE nodejs_active_requests_total gauge
nodejs_active_requests_total 2 1579444523567
# HELP nodejs_heap_size_total_bytes Process heap size from node.js in bytes.
# TYPE nodejs_heap_size_total_bytes gauge
nodejs_heap_size_total_bytes 13725696 1579444523567
# HELP nodejs_heap_size_used_bytes Process heap size used from node.js in bytes.
# TYPE nodejs_heap_size_used_bytes gauge
nodejs_heap_size_used_bytes 12068008 1579444523567
# HELP nodejs_external_memory_bytes Nodejs external memory size in bytes.
# TYPE nodejs_external_memory_bytes gauge
nodejs_external_memory_bytes 1728962 1579444523567
# HELP nodejs_heap_space_size_total_bytes Process heap space size total from node.js in bytes.
# TYPE nodejs_heap_space_size_total_bytes gauge
nodejs_heap_space_size_total_bytes{space="read_only"} 262144 1579444523567
nodejs_heap_space_size_total_bytes{space="new"} 1048576 1579444523567
nodejs_heap_space_size_total_bytes{space="old"} 9809920 1579444523567
nodejs_heap_space_size_total_bytes{space="code"} 425984 1579444523567
nodejs_heap_space_size_total_bytes{space="map"} 1052672 1579444523567
nodejs_heap_space_size_total_bytes{space="large_object"} 1077248 1579444523567
nodejs_heap_space_size_total_bytes{space="code_large_object"} 49152 1579444523567
nodejs_heap_space_size_total_bytes{space="new_large_object"} 0 1579444523567
# HELP nodejs_heap_space_size_used_bytes Process heap space size used from node.js in bytes.
# TYPE nodejs_heap_space_size_used_bytes gauge
nodejs_heap_space_size_used_bytes{space="read_only"} 32296 1579444523567
nodejs_heap_space_size_used_bytes{space="new"} 601696 1579444523567
nodejs_heap_space_size_used_bytes{space="old"} 9376600 1579444523567
nodejs_heap_space_size_used_bytes{space="code"} 286688 1579444523567
nodejs_heap_space_size_used_bytes{space="map"} 704320 1579444523567
nodejs_heap_space_size_used_bytes{space="large_object"} 1064872 1579444523567
nodejs_heap_space_size_used_bytes{space="code_large_object"} 3552 1579444523567
nodejs_heap_space_size_used_bytes{space="new_large_object"} 0 1579444523567
# HELP nodejs_heap_space_size_available_bytes Process heap space size available from node.js in bytes.
# TYPE nodejs_heap_space_size_available_bytes gauge
nodejs_heap_space_size_available_bytes{space="read_only"} 229576 1579444523567
nodejs_heap_space_size_available_bytes{space="new"} 445792 1579444523567
nodejs_heap_space_size_available_bytes{space="old"} 417712 1579444523567
nodejs_heap_space_size_available_bytes{space="code"} 20576 1579444523567
nodejs_heap_space_size_available_bytes{space="map"} 343632 1579444523567
nodejs_heap_space_size_available_bytes{space="large_object"} 0 1579444523567
nodejs_heap_space_size_available_bytes{space="code_large_object"} 0 1579444523567
nodejs_heap_space_size_available_bytes{space="new_large_object"} 1047488 1579444523567
# HELP nodejs_version_info Node.js version info.
# TYPE nodejs_version_info gauge
nodejs_version_info{version="v14.16.1",major="14",minor="16",patch="1"} 1
# HELP grafana_image_renderer_service_http_request_duration_seconds duration histogram of http responses labeled with: status_code
# TYPE grafana_image_renderer_service_http_request_duration_seconds histogram
grafana_image_renderer_service_http_request_duration_seconds_bucket{le="1",status_code="200"} 0
grafana_image_renderer_service_http_request_duration_seconds_bucket{le="5",status_code="200"} 4
grafana_image_renderer_service_http_request_duration_seconds_bucket{le="7",status_code="200"} 4
grafana_image_renderer_service_http_request_duration_seconds_bucket{le="9",status_code="200"} 4
grafana_image_renderer_service_http_request_duration_seconds_bucket{le="11",status_code="200"} 4
grafana_image_renderer_service_http_request_duration_seconds_bucket{le="13",status_code="200"} 4
grafana_image_renderer_service_http_request_duration_seconds_bucket{le="15",status_code="200"} 4
grafana_image_renderer_service_http_request_duration_seconds_bucket{le="20",status_code="200"} 4
grafana_image_renderer_service_http_request_duration_seconds_bucket{le="30",status_code="200"} 4
grafana_image_renderer_service_http_request_duration_seconds_bucket{le="+Inf",status_code="200"} 4
grafana_image_renderer_service_http_request_duration_seconds_sum{status_code="200"} 10.492873834
grafana_image_renderer_service_http_request_duration_seconds_count{status_code="200"} 4
# HELP up 1 = up, 0 = not up
# TYPE up gauge
up 1
# HELP grafana_image_renderer_http_request_in_flight A gauge of requests currently being served by the image renderer.
# TYPE grafana_image_renderer_http_request_in_flight gauge
grafana_image_renderer_http_request_in_flight 1
# HELP grafana_image_renderer_step_duration_seconds duration histogram of browser steps for rendering an image labeled with: step
# TYPE grafana_image_renderer_step_duration_seconds histogram
grafana_image_renderer_step_duration_seconds_bucket{le="0.3",step="launch"} 0
grafana_image_renderer_step_duration_seconds_bucket{le="0.5",step="launch"} 0
grafana_image_renderer_step_duration_seconds_bucket{le="1",step="launch"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="2",step="launch"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="3",step="launch"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="5",step="launch"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="+Inf",step="launch"} 1
grafana_image_renderer_step_duration_seconds_sum{step="launch"} 0.7914972
grafana_image_renderer_step_duration_seconds_count{step="launch"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="0.3",step="newPage"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="0.5",step="newPage"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="1",step="newPage"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="2",step="newPage"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="3",step="newPage"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="5",step="newPage"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="+Inf",step="newPage"} 1
grafana_image_renderer_step_duration_seconds_sum{step="newPage"} 0.2217868
grafana_image_renderer_step_duration_seconds_count{step="newPage"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="0.3",step="prepare"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="0.5",step="prepare"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="1",step="prepare"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="2",step="prepare"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="3",step="prepare"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="5",step="prepare"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="+Inf",step="prepare"} 1
grafana_image_renderer_step_duration_seconds_sum{step="prepare"} 0.0819274
grafana_image_renderer_step_duration_seconds_count{step="prepare"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="0.3",step="navigate"} 0
grafana_image_renderer_step_duration_seconds_bucket{le="0.5",step="navigate"} 0
grafana_image_renderer_step_duration_seconds_bucket{le="1",step="navigate"} 0
grafana_image_renderer_step_duration_seconds_bucket{le="2",step="navigate"} 0
grafana_image_renderer_step_duration_seconds_bucket{le="3",step="navigate"} 0
grafana_image_renderer_step_duration_seconds_bucket{le="5",step="navigate"} 0
grafana_image_renderer_step_duration_seconds_bucket{le="+Inf",step="navigate"} 1
grafana_image_renderer_step_duration_seconds_sum{step="navigate"} 15.3311258
grafana_image_renderer_step_duration_seconds_count{step="navigate"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="0.3",step="panelsRendered"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="0.5",step="panelsRendered"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="1",step="panelsRendered"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="2",step="panelsRendered"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="3",step="panelsRendered"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="5",step="panelsRendered"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="+Inf",step="panelsRendered"} 1
grafana_image_renderer_step_duration_seconds_sum{step="panelsRendered"} 0.0205577
grafana_image_renderer_step_duration_seconds_count{step="panelsRendered"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="0.3",step="screenshot"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="0.5",step="screenshot"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="1",step="screenshot"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="2",step="screenshot"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="3",step="screenshot"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="5",step="screenshot"} 1
grafana_image_renderer_step_duration_seconds_bucket{le="+Inf",step="screenshot"} 1
grafana_image_renderer_step_duration_seconds_sum{step="screenshot"} 0.2866623
grafana_image_renderer_step_duration_seconds_count{step="screenshot"} 1
# HELP grafana_image_renderer_browser_info A metric with a constant '1 value labeled by version of the browser in use
# TYPE grafana_image_renderer_browser_info gauge
grafana_image_renderer_browser_info{version="HeadlessChrome/79.0.3945.0"} 1
```

View File

@@ -0,0 +1,141 @@
+++
title = "Troubleshooting"
description = "Image rendering troubleshooting"
keywords = ["grafana", "image", "rendering", "plugin", "troubleshooting"]
weight = 115
+++
# Troubleshoot image rendering
In this section, you'll learn how to enable logging for the image renderer and you'll find the most common issues.
## Enable debug logging
To troubleshoot the image renderer, different kind of logs are available.
You can enable debug log messages for rendering in the Grafana configuration file and inspect the Grafana server logs.
```bash
[log]
filters = rendering:debug
```
You can also enable more logs in image renderer service itself by:
- Increasing the [log level]({{< relref "./#log-level" >}}).
- Enabling [verbose logging]({{< relref "./#verbose-logging" >}}).
- [Capturing headless browser output]({{< relref "./#capture-browser-output" >}}).
## Missing libraries
The plugin and rendering service uses [Chromium browser](https://www.chromium.org/) which depends on certain libraries.
If you don't have all of those libraries installed in your system you may encounter errors when trying to render an image, e.g.
```bash
Rendering failed: Error: Failed to launch chrome!/var/lib/grafana/plugins/grafana-image-renderer/chrome-linux/chrome:
error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory\n\n\nTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md
```
In general you can use the [`ldd`](<https://en.wikipedia.org/wiki/Ldd_(Unix)>) utility to figure out what shared libraries
are not installed in your system:
```bash
cd <grafana-image-render plugin directory>
ldd chrome-linux/chrome
linux-vdso.so.1 (0x00007fff1bf65000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2047945000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2047924000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f204791a000)
libX11.so.6 => not found
libX11-xcb.so.1 => not found
libxcb.so.1 => not found
libXcomposite.so.1 => not found
...
```
**Ubuntu:**
On Ubuntu 18.10 the following dependencies have been confirmed as needed for the image rendering to function.
```bash
libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrender1 libxtst6 libglib2.0-0 libnss3 libcups2 libdbus-1-3 libxss1 libxrandr2 libgtk-3-0 libgtk-3-0 libasound2 libxcb-dri3-0 libgbm1 libxshmfence1
```
**Debian:**
On Debian 9 (Stretch) the following dependencies have been confirmed as needed for the image rendering to function.
```bash
libx11 libcairo bcairo2 libcairo2 libxtst6 libxcomposite1 libx11-xcb1 libxcursor1 libxdamage1 libnss3 libcups libcups2 libXss libXss1 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0 libgbm1 libxshmfence1
```
On Debian 10 (Buster) the following dependencies have been confirmed as needed for the image rendering to function.
```bash
libxdamage1 libxext6 libxi6 libxtst6 libnss3 libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libpango-1.0-0 libcairo2 libatspi2.0-0 libgtk3.0-cil libgdk3.0-cil libx11-xcb-dev libgbm1 libxshmfence1
```
**Centos:**
On a minimal Centos installation, the following dependencies have been confirmed as needed for the image rendering to function:
```bash
libXcomposite libXdamage libXtst cups libXScrnSaver pango atk adwaita-cursor-theme adwaita-icon-theme at at-spi2-atk at-spi2-core cairo-gobject colord-libs dconf desktop-file-utils ed emacs-filesystem gdk-pixbuf2 glib-networking gnutls gsettings-desktop-schemas gtk-update-icon-cache gtk3 hicolor-icon-theme jasper-libs json-glib libappindicator-gtk3 libdbusmenu libdbusmenu-gtk3 libepoxy liberation-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts libgusb libindicator-gtk3 libmodman libproxy libsoup libwayland-cursor libwayland-egl libxkbcommon m4 mailx nettle patch psmisc redhat-lsb-core redhat-lsb-submod-security rest spax time trousers xdg-utils xkeyboard-config alsa-lib
```
## Certificate signed by internal certificate authorities
In many cases, Grafana runs on internal servers and uses certificates that have not been signed by a CA ([Certificate Authority](https://en.wikipedia.org/wiki/Certificate_authority)) known to Chrome, and therefore cannot be validated. Chrome internally uses NSS ([Network Security Services](https://en.wikipedia.org/wiki/Network_Security_Services)) for cryptographic operations such as the validation of certificates.
If you are using the Grafana Image Renderer with a Grafana server that uses a certificate signed by such a custom CA (for example a company-internal CA), rendering images will fail and you will see messages like this in the Grafana log:
```
t=2019-12-04T12:39:22+0000 lvl=error msg="Render request failed" logger=rendering error=map[] url="https://192.168.106.101:3443/d-solo/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m&from=1575438321300&to=1575459921300&var-Host=master1&panelId=4&width=1000&height=500&tz=Europe%2FBerlin&render=1" timestamp=0001-01-01T00:00:00.000Z
t=2019-12-04T12:39:22+0000 lvl=error msg="Rendering failed." logger=context userId=1 orgId=1 uname=admin error="Rendering failed: Error: net::ERR_CERT_AUTHORITY_INVALID at https://192.168.106.101:3443/d-solo/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m&from=1575438321300&to=1575459921300&var-Host=master1&panelId=4&width=1000&height=500&tz=Europe%2FBerlin&render=1"
t=2019-12-04T12:39:22+0000 lvl=error msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/render/d-solo/zxDJxNaZk/graphite-metrics status=500 remote_addr=192.168.106.101 time_ms=310 size=1722 referer="https://grafana.xxx-xxx/d/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m"
```
If this happens, then you have to add the certificate to the trust store. If you have the certificate file for the internal root CA in the file `internal-root-ca.crt.pem`, then use these commands to create a user specific NSS trust store for the Grafana user (`grafana` for the purpose of this example) and execute the following steps:
**Linux:**
```
[root@server ~]# [ -d /usr/share/grafana/.pki/nssdb ] || mkdir -p /usr/share/grafana/.pki/nssdb
[root@merver ~]# certutil -d sql:/usr/share/grafana/.pki/nssdb -A -n internal-root-ca -t C -i /etc/pki/tls/certs/internal-root-ca.crt.pem
[root@server ~]# chown -R grafana: /usr/share/grafana/.pki/nssdb
```
**Windows:**
```
certutil addstore "Root" <path>/internal-root-ca.crt.pem
```
## Custom Chrome/Chromium
As a last resort, if you already have [Chrome](https://www.google.com/chrome/) or [Chromium](https://www.chromium.org/)
installed on your system, then you can configure the [Grafana Image renderer plugin](../#custom-chromechromium) to use this
instead of the pre-packaged version of Chromium.
> **Note:** Please note that this is not recommended, since you may encounter problems if the installed version of Chrome/Chromium is not
> compatible with the [Grafana Image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer).
To override the path to the Chrome/Chromium executable in plugin mode, set an environment variable and make sure that it's available for the Grafana process. For example:
```bash
export GF_PLUGIN_RENDERING_CHROME_BIN="/usr/bin/chromium-browser"
```
In remote rendering mode, you need to set the environment variable or update the configuration file and make sure that it's available for the image rendering service process:
```bash
CHROME_BIN="/usr/bin/chromium-browser"
```
```json
{
"rendering": {
"chromeBin": "/usr/bin/chromium-browser"
}
}
```

View File

@@ -10,11 +10,11 @@ weight = 200
This page explains how to install Grafana dependencies, download and install Grafana, get the service up and running on your Debian or Ubuntu system, and also describes the installation package details.
**Note on upgrading:** While the process for upgrading Grafana is very similar to installing Grafana, there are some key backup steps you should perform. Read [Upgrading Grafana]({{< relref "upgrading.md" >}}) for tips and guidance on updating an existing installation.
## Note on upgrading
## Hosted Grafana
While the process for upgrading Grafana is very similar to installing Grafana, there are some key backup steps you should perform. Read [Upgrading Grafana]({{< relref "upgrading.md" >}}) for tips and guidance on updating an existing installation.
You can run Grafana on your own hardware or use [Grafana Cloud](https://grafana.com/products/cloud/features/#cloud-dashboards-grafana) and get Grafana without the overhead of installing, maintaining, and scaling your observability stack. The free forever plan includes Grafana, 10K Prometheus series, 50 GB logs and more. [Create a free account to get started](https://grafana.com/auth/sign-up/create-user?pg=docs-grafana-install&plcmt=in-text).
> **Note:** You can use [Grafana Cloud](https://grafana.com/products/cloud/features/#cloud-logs) to avoid the overhead of installing, maintaining, and scaling your observability stack. The free forever plan includes Grafana, 10K Prometheus series, 50 GB logs, and more.[Create a free account to get started](https://grafana.com/auth/sign-up/create-user?pg=docs-grafana-install&plcmt=in-text).
## 1. Download and install
@@ -137,6 +137,10 @@ Configure the Grafana server to start at boot:
sudo systemctl enable grafana-server.service
```
#### Serving Grafana on a port < 1024
{{< docs/shared "systemd/bind-net-capabilities.md" >}}
### Start the server with init.d
To start the service and verify that the service has started:

View File

@@ -9,11 +9,9 @@ weight = 600
You can install and run Grafana using the official Docker image. It comes in two variants: Alpine and Ubuntu.
This page also contains important information about [migrating from earlier Docker image versions](#migrate-from-previous-docker-containers-versions).
This topic also contains important information about [migrating from earlier Docker image versions](#migrate-from-previous-docker-containers-versions).
## Hosted Grafana
You can run Grafana on your own hardware or use [Grafana Cloud](https://grafana.com/products/cloud/features/#cloud-dashboards-grafana) and get Grafana without the overhead of installing, maintaining, and scaling your observability stack. The free forever plan includes Grafana, 10K Prometheus series, 50 GB logs and more. [Create a free account to get started](https://grafana.com/auth/sign-up/create-user?pg=docs-grafana-docker&plcmt=in-text).
> **Note:** You can use [Grafana Cloud](https://grafana.com/products/cloud/features/#cloud-logs) to avoid the overhead of installing, maintaining, and scaling your observability stack. The free forever plan includes Grafana, 10K Prometheus series, 50 GB logs, and more.[Create a free account to get started](https://grafana.com/auth/sign-up/create-user?pg=docs-grafana-install&plcmt=in-text).
## Alpine image (recommended)
@@ -39,7 +37,7 @@ You can run the latest Grafana version, run a specific version, or run an unstab
### Run the latest stable version of Grafana
> **Note:** If you are on a Linux system, you might need to add `sudo` before the command.
> **Note:** If you are on a Linux system, you might need to add `sudo` before the command or add your user to the `docker` group.
```bash
docker run -d -p 3000:3000 grafana/grafana
@@ -47,7 +45,7 @@ docker run -d -p 3000:3000 grafana/grafana
### Run a specific version of Grafana
> **Note:** If you are on a Linux system, you might need to add `sudo` before the command.
> **Note:** If you are on a Linux system, you might need to add `sudo` before the command add your user to the `docker` group.
```bash
docker run -d -p 3000:3000 --name grafana grafana/grafana:<version number>
@@ -141,7 +139,7 @@ Replace `Dockerfile` in above example with `ubuntu.Dockerfile` to build a custom
> Only available in Grafana v6.5 and later. This is experimental.
The [Grafana Image Renderer plugin]({{< relref "../administration/image_rendering/#grafana-image-renderer-plugin" >}}) does not currently work if it is installed in a Grafana Docker image. You can build a custom Docker image by using the `GF_INSTALL_IMAGE_RENDERER_PLUGIN` build argument. This installs additional dependencies needed for the Grafana Image Renderer plugin to run.
The [Grafana Image Renderer plugin]({{< relref "../image-rendering/#grafana-image-renderer-plugin" >}}) does not currently work if it is installed in a Grafana Docker image. You can build a custom Docker image by using the `GF_INSTALL_IMAGE_RENDERER_PLUGIN` build argument. This installs additional dependencies needed for the Grafana Image Renderer plugin to run.
Example of how to build and run:

View File

@@ -23,7 +23,10 @@ Use [Homebrew](http://brew.sh/) to install the most recent released version of G
brew install grafana
```
The brew page downloads and untars the files into `/usr/local/Cellar/grafana/version`.
The brew page downloads and untars the files into:
- `/usr/local/Cellar/grafana/[version]` (Homebrew v2)
- `/opt/homebrew/Cellar/grafana/[version]` (Homebrew v3)
1. Start Grafana using the command:
```bash

View File

@@ -33,7 +33,7 @@ Minimum recommended CPU: 1
Some features might require more memory or CPUs. Features require more resources include:
- [Server side rendering of images]({{< relref "../administration/image_rendering/#requirements" >}})
- [Server side rendering of images](https://grafana.com/grafana/plugins/grafana-image-renderer#requirements)
- [Alerting]({{< relref "../alerting" >}})
- [Data source proxy]({{< relref "../http_api/data_source" >}})

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