Compare commits

...

452 Commits

Author SHA1 Message Date
Jack Baldry
16b670492a Actually remove the plugins docs now that all the links are redirected to https://grafana.com/developers/ (#75632)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-09-28 17:27:43 +01:00
Jack Baldry
d7ac94907c [v8.3.x] Remove plugins (#75575)
* Fix all links to "Sign a plugin" pages

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

* [publish_dashboards]

* Fix metadata links

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

* [publish-technical-documentation-next] Publish from grafana/agent:main/docs/sources

* Fix data-frames redirect

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

* add collapse shortcode (#15422)

* Add note about missing rewrites

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

* Fix all data-frames links

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

* Fix links to "plugins"

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

* Fix "plugin-sdk-go" links

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

* Fix backend links

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

* Fix "Add query editor help" links

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

* Fix value mappings links

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

* Fix some stray links

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

* [publish_plugins]

* Add missing redirects and fix a couple more links

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

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-09-27 18:37:05 +01:00
Jack Baldry
a666a772f3 [v8.3.x] Fix links (#75419)
* Fix links in Grafana v7.x documentation

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

* Fix links in Grafana v8.x documentation

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

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-09-26 13:59:34 +01:00
Jack Baldry
8e078d2dd8 [v8.3.x] Update docs/shared shortcode usage to use keyword argument interface (#73771)
* Enable legacy shortcode usage logging to allow future template simplification

Once all legacy usage is removed, this logical branch can also be
removed.

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

* Update all use of docs/shared in Grafana to use keyword arguments

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

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2023-09-05 09:39:13 +01:00
Grot (@grafanabot)
78c80ceb5a [v8.3.x] [v9.0.x] docs: update broken elasticsearch metrics play link (#62727)
[v9.0.x] docs: update broken elasticsearch metrics play link (#62720)

update broken elasticsearch metrics play link

(cherry picked from commit 9d659f0851)

Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
2023-02-06 09:44:42 +00:00
Grot (@grafanabot)
f2a6e8c36a [v8.3.x] Remove packages path from branch filter (#60942)
Remove packages path from branch filter (#60128)

That directory is no longer used in published docs and causes this
workflow to fail when changes only affect the packages directory.

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

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

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2023-01-04 10:40:06 +00:00
Grot (@grafanabot)
3f40ee29b2 [v8.3.x] Fix branch filter for release workflows (#60118)
Fix branch filter for release workflows (#59963)

Ensures the workflow is run on every push to all version branches.

This was thought to be working because it was tested with a manual
dispatch, however, that trigger does not consider filters and was not
an accurate test.

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

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

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-12-09 15:16:34 -04:00
Grot (@grafanabot)
e2311454ec [v8.3.x] Restrict workflow to grafana/grafana repository (#59751)
Restrict workflow to grafana/grafana repository (#59740)

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

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

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-12-02 17:28:00 -04:00
Grot (@grafanabot)
5bd1418a81 [v8.3.x] Automate docs publishing steps (#59561)
* Automate docs publishing steps (#59550)

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

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

* Remove dependency on test job (#59575)

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

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

* Fix release_branch_regexp (#59590)

Apparently the non-capturing group was incorrect.

I verified the logic in a branch in grafana-github-actions:
https://github.com/grafana/grafana-github-actions/compare/jdb/2022-11-prove-grafana-regexp-behaves-correctly?expand=1

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

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

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-11-30 15:05:55 -04:00
Grot (@grafanabot)
bddcefe517 "Release: Updated versions in package to 8.3.11" (#54455) 2022-08-30 20:09:11 +02:00
Joan López de la Franca Beltran
ad3aaff617 Rendering: Add support for renderer token (#54425) (#54436)
(cherry picked from commit a4f75cc0438712c90b02d24740416f8615e3a0cb)
(cherry picked from commit 6ec06f66b9)
2022-08-30 15:01:19 +02:00
Ieva
b8eb142e85 Security: Fixes for CVE-2022-31107 and CVE-2022-31097 (#52236)
* Fix XSS in runbook URL (#383)

* "Release: Updated versions in package to 8.3.8" (#385)

* Fix: Choose Lookup params per auth module v8.3.x (#401)

* Fix: Choose Lookup params per auth module

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

Fix: Prefer pointer to struct in lookup

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

Fix: user email for ldap

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

Fix: Use only login for lookup in LDAP

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

Fix: use user email for ldap

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

fix remaining test

fix nit picks

* update lock

* fix integration tests

* [v8.3.x] Merge 'release-8.3.9` branch (#404)

* Fix: Choose Lookup params per auth module

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

Fix: Prefer pointer to struct in lookup

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

Fix: user email for ldap

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

Fix: Use only login for lookup in LDAP

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

Fix: use user email for ldap

Co-authored-by: Karl Persson <kalle.persson@grafana.com>

fix remaining test

fix nit picks

(cherry picked from commit 09ca54d4665583b5648fea5726a19e0b58df4ec0)

* fix integration tests

(cherry picked from commit 16c3077bb39f41acacbef4b13c65c7c907c54de7)

* Release: Bump version to 8.3.9 (#403)

* Change bump-version.yml

* "Release: Updated versions in package to 8.3.9"

Co-authored-by: dsotirakis <dimitrios.sotirakis@grafana.com>

* Update yarn.lock

Co-authored-by: jguer <joao.guerreiro@grafana.com>
Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>

* "Release: Updated versions in package to 8.3.10" (#409)

* Update grabpl

* update grabpl

* CI: Update `grabpl` version - remove `--no-pull-enterprise` flag (#47013)

* Update grabpl version

* Sign drone

* Remove --no-pull-enterprise flag

* Sign drone

* Update grabpl

* update drone, cherry-pick some ci updates

* update PR pipeline

Co-authored-by: George Robinson <george.robinson@grafana.com>
Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
Co-authored-by: Jguer <joao.guerreiro@grafana.com>
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: Dimitris Sotirakis <sotirakis.dim@gmail.com>
2022-07-15 15:23:55 +00:00
Alexander Weaver
7c2cb0786c Alerting: Remove double quotes from matchers (#50042)
* Alerting: Remove double quotes from matchers (#50038)

* Alerting: Remove double quotes from matchers

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

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

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

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

* Add comment explaining rationale and future removal

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

* Drop changelog

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-06-01 16:51:42 -05:00
Grot (@grafanabot)
4b68c86160 Fix typo in curl command (#46729) (#49816)
* Fix typo in curl command

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

* Fix typo in another curl command

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
(cherry picked from commit 0a23299878)

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2022-05-30 14:36:14 +02:00
Dimitris Sotirakis
be27409c4c [v8.3.x] CI: Sync CI changes (#46085)
* CI: Introduce `build-frontend-packages` step (#45824)

* Split frontend build

* Fix command name

* Update grabpl

(cherry picked from commit 2f6c827f5d)

* CI: Add docs pipeline for `main` pipelines (#45740)

* Add docs pipeline for main

* Extract trigger docs

* Change trigger for main

(cherry picked from commit ea3e41ea62)

* CI: Add more checks to standalone docs pipeline (#46449)

* Add build frontend package step

* Reorder dependencies

* Add codespell and prettier checks

(cherry picked from commit 82b436afee)

* Update golang (#46458)

(cherry picked from commit a29159f362)
2022-04-05 12:54:48 +03:00
Adela Almasan
f3e01a2860 Geomap: Display legend (#46886) (#47077)
* Display legend for fixed colors and field; Hide tooltip on base layer;

(cherry picked from commit 118b87ee8f)

# Conflicts:
#	public/app/plugins/panel/geomap/GeomapPanel.tsx
#	public/app/plugins/panel/geomap/editor/layerEditor.tsx
2022-03-30 16:21:22 -05:00
Todd Treece
87e2fa0dd4 Chore: Update go version used in CI to 1.17.8 (#46591) (#46632)
(cherry picked from commit 3f58abe9bd)
2022-03-16 10:01:03 -04:00
Todd Treece
a18b0e3899 Prometheus: Fix timestamp truncation (#46302) (#46331)
(cherry picked from commit db5f480a8f)
2022-03-08 17:40:24 +00:00
Timur Olzhabayev
1020e52f29 Backporting bump version fixes (#46231) 2022-03-04 10:38:34 +01:00
Sriram
89eb74730e ReleaseNotes: Updated changelog and release notes for 8.3.7 (#46028) (#46029)
(cherry picked from commit 3ea6c8cf64)

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-03-01 14:31:08 +00:00
Grot (@grafanabot)
26c5992298 "Release: Updated versions in package to 8.3.7" (#46027) 2022-03-01 13:57:56 +00:00
Grot (@grafanabot)
433ff19f77 Histogram: auto-skip x tick labels to avoid overlap (#45996) (#46000)
(cherry picked from commit b491d6b4dc)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-03-01 09:11:53 +01:00
Grot (@grafanabot)
03e8428caa BarChart: fix single group rendering (#45953) (#45991)
(cherry picked from commit 1c4b20b268)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-02-28 15:34:53 -06:00
Grot (@grafanabot)
274cd740a5 Middleware: Fix IPv6 host parsing in CSRF check (#45911) (#45983)
- Also create tests for this middleware

Co-authored-by: Kyle Brandt <kyle@grafana.com>
(cherry picked from commit 06ed5efdf0)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2022-02-28 20:34:26 +01:00
Dimitris Sotirakis
6e75734bd5 DockerHub: Use grafana(-oss)-image-tags to push to grafana(-oss)-dev DockerHub repo (#45708) (#45711)
* Revert back changes - changes are done on grabpl

* Sync drone

(cherry picked from commit 3db331402d)
2022-02-28 12:25:46 +02:00
Grot (@grafanabot)
1db431b5cf bump go version to 1.17.7 (#45772) (#45782)
(cherry picked from commit b512a3d75f)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2022-02-23 14:47:09 +01:00
Dimitris Sotirakis
b688a9dede CI: Introduce docs pipeline (#45454) (#45670) 2022-02-21 16:50:16 +02:00
Dimitris Sotirakis
b48b55dc14 Update grabpl (#45520) (#45526)
(cherry picked from commit af1691dbfb)
2022-02-18 11:51:40 +02:00
Andrej Ocenas
d748a2d1e0 Docs: Remove docs publish GitHub action (#45539) 2022-02-17 16:40:23 +01:00
Dimitris Sotirakis
3bcf3f50b7 CI: Remove manual gcloud authentication (#44986) (#45445)
* Remove manual gcloud auth from store-packages

* Update grabpl

(cherry picked from commit 163b570f5d)
2022-02-16 09:54:30 +01:00
Grot (@grafanabot)
c9411b4d57 Alerting: do not unescape external AM label values (#45334) (#45393)
(cherry picked from commit 651bb773db)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-02-15 14:08:09 +01:00
Dimitris Sotirakis
2adf2a1584 [v8.3.x] Bug: Update upload-cdn command args (#44979)
* CI: Update `GCP_GRAFANA_UPLOAD_KEY` var name (#44303)

* Update GCP_KEY var name

* Rename GCP_GRAFANA_UPLOAD_KEY for upload-packages

* Update grabpl

(cherry picked from commit f96a6c10c5)

* Update upload-cdn command args (#44966)

(cherry picked from commit 67225d9cfc)
2022-02-15 12:07:07 +00:00
Dimitris Sotirakis
027e345231 CI: Remove grafana/drone-grafana-docker image (#44983) (#45091)
* CI: Remove `grafana/drone-grafana-docker` image (#44983)

* Remove grafana/drone-grafana-docker image

* Rename step

* Remove manual gcloud authentication

(cherry picked from commit 329b1a1ef3903c7e2c3ec1f286f9b0f00fcd023e)

* Add publish command for main

* Fix TAG variable parsing

* Remove shouldSave from main builds

* Reorder dependencies

* Update grabpl version

(cherry picked from commit 5543ad883d)

* Sign drone
2022-02-15 12:04:12 +02:00
Grot (@grafanabot)
26289304f2 Alerting: Fix updating notification channels in legacy (#45302) (#45330)
The problem here is that without the orgID we ignore the lookup of the existing notification channel just before updating and end up failing the update because there is no channel available.

(cherry picked from commit 8bf2e642aa)

Co-authored-by: gotjosh <josue.abreu@gmail.com>
2022-02-11 17:52:01 +01:00
malcolmholmes
85edf78a46 Build: only specify github-token when needed (#45326) (#45329)
(cherry picked from commit 9a7438c720)
2022-02-11 16:25:31 +00:00
Carl Bergquist
588dc422ab make drone (#45318)
Signed-off-by: bergquist <carl.bergquist@gmail.com>

Co-authored-by: malcolmholmes <42545407+malcolmholmes@users.noreply.github.com>
2022-02-11 15:59:08 +01:00
Grot (@grafanabot)
3a95cdd78e Update geomap.md (#43527) (#45268)
(cherry picked from commit d97e74d80f)

Co-authored-by: JJgitGit <JJgitGit@users.noreply.github.com>
2022-02-10 17:50:51 -05:00
Grot (@grafanabot)
76460e790d Alerting: support ok state in alert migration (#45264) (#45266)
(cherry picked from commit c59567a236)

Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-02-10 22:12:47 +01:00
Grot (@grafanabot)
c6e6309bc5 Update latest.json (#45171) (#45172)
(cherry picked from commit 67423f42a5)

Co-authored-by: Shirley <4163034+fridgepoet@users.noreply.github.com>
2022-02-09 18:26:22 +01:00
Grot (@grafanabot)
30d3523138 Release: Bump version to 8.3.6 (#45168)
* "Release: Updated versions in package to 8.3.6"

* Update yarn.lock

Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
2022-02-09 17:55:11 +01:00
Grot (@grafanabot)
c79cdf97d9 Tempo: Fix visual service graph bug by setting upper bound for failed arc (#45009) (#45155)
* Fix visual service graph bug by setting upper bound for failed arc calculation

(cherry picked from commit e94b7f45a1)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-02-09 15:41:57 +01:00
Grot (@grafanabot)
db4f50171f Provisioning: Ensure that the default value for orgID is set when provisioning datasources to be deleted (#44244) (#45129)
Fixes #44243

Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
(cherry picked from commit 8e03541228)

Co-authored-by: maicon <maiconscosta@gmail.com>
2022-02-09 12:49:15 +01:00
Grot (@grafanabot)
2f9f74b221 Rework template docs and add examples (#43178) (#43179)
(cherry picked from commit 8206802f19)

Co-authored-by: David Parrott <stomp.box.yo@gmail.com>
2022-02-09 09:57:56 +01:00
Grot (@grafanabot)
62ff483d13 Alerting: remove error banner when Prometheus ruler is not supported (#44571)
(cherry picked from commit 3d0cff5410)

Co-authored-by: Roy C <crosscent@gmail.com>
2022-02-08 22:27:31 +01:00
Grot (@grafanabot)
4806851ae3 pkg/web: X-Forwarded-For multi-IP handling (#45098) (#45103)
It is conventionally common for the X-Forwarded-For header to contain a
comma-separated list of IP addresses, with each intermediate proxy
adding an additional item as a request passes through it. This change
makes the web framework handle this case appropriately, always selecting
the first item in the list.

(cherry picked from commit 6a2255abe7)

Co-authored-by: sam boyer <sdboyer@grafana.com>
2022-02-08 14:57:43 -05:00
Konrad Lalik
c44af3ca20 Alerting: Improve Contact Points error handling (#44888) (#45093)
* Add 400 and 408 errors handling to display useful error message

* Add generic error handling

* Improve type guard

(cherry picked from commit 1cf48618de)
2022-02-08 17:40:11 +01:00
Grot (@grafanabot)
4a29cf13f0 update snapshots server url (#44563) (#44566)
* update snapshots server url
* update all old references to snapshot.raintank.io

(cherry picked from commit 1e89fc157d)

Co-authored-by: Dan Cech <dcech@grafana.com>
2022-02-08 17:05:20 +01:00
Dimitris Sotirakis
883977bc3a [v8.3.x] Update changelog for 8.3.5 and 7.5.15 (#45078) (#45086)
* Update changelog for 8.3.5 and 7.5.15 (#45078)

(cherry picked from commit b2a8487684)

* Remove 8.4.0-beta1 additions
2022-02-08 16:29:54 +01:00
Dimitris Sotirakis
f42d0b9beb [v8.3.x] Sync security changes (#45067)
* "Release: Updated versions in package to 8.3.5"

* [v8.3.x] Fix for CVE-2022-21702 (#225)

Fix for CVE-2022-21702

* Update yarn.lock for 8.3.5

* resolve conflicts

(cherry picked from commit bb38cfcba4b4f824060ff385d858c63f50b72d74)

* csrf checks for v8.3.5 (#234)

* Fix lint

* Cherry pick e2e test server changes

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
2022-02-08 15:35:38 +01:00
Grot (@grafanabot)
667f884db1 LibraryPanels: Removes save errors for panels changed to library panels (#45033) (#45034)
(cherry picked from commit 9e1cb8c12a)

Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
2022-02-08 07:13:02 +01:00
achatterjee-grafana
0ac23b0446 Fix link to user API (#44930) 2022-02-05 18:46:05 +01:00
Grot (@grafanabot)
acdf2ec806 Alerting: validate namespace and groupname for Grafana manages and Lotex alerts (#44872) (#44909)
(cherry picked from commit 1680e284e5)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-02-04 15:17:22 +01:00
Dimitris Sotirakis
2c033a6540 CI: Make e2e tests depend on binary builds (#44647) (#44833)
* Make e2e test depend on binary builds

* Search for binary in the correct folders

* Remove package file var

* Add ARCH var

(cherry picked from commit 7bb5a5b318)
2022-02-04 10:08:19 +02:00
Grot (@grafanabot)
9cddb216d3 Alerting: Fix alert notification template (#44761) (#44838)
(cherry picked from commit bb88cf683c)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-02-03 14:34:41 +01:00
Grot (@grafanabot)
c051c5d423 Alerting: load correct unified alerting tab (#44794) (#44831)
(cherry picked from commit 29b97361f7)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-02-03 14:09:12 +01:00
Grot (@grafanabot)
e38d8cd8af Library Elements API GET by name returns array (#44743) (#44751)
* Library Elements API GET by name returns array

Making a GET request to the Library Elements HTTP API `api/library-elements/name/:name` will return an **array** of Library Element objects, but the documentation says it will return a Library Element object.

Example cURL POST request:
`curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer XXXXXXXXXXX" -d @request.json "https://my.grafana.net/api/library-elements/"`

request.json
```json
{
  "model": {},
  "kind": 1,
  "name": "testing description3",
  "uid": "basic3",
  "id": 12345,
  "version": 2
}
```

Example cURL GET request:
`curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer XXXXXXXX" -d @request "https://my/api/library-elements/name/testing description3"`

Example response:
```json
{
    "result": [
        {
            . . .
        }
    ]
}
```

* Library Elements API fix bracket spacing

(cherry picked from commit 925333bfa4)

Co-authored-by: JM <justintmai@gmail.com>
2022-02-02 18:46:03 +01:00
Grot (@grafanabot)
9464ffa86b Fix Discord Webhook URL for invalid template (#44763) (#44772)
This commit fixes an issue where an invalid template for Discord would change the Webhook URL to "" and cause "unsupported protocol scheme" errors.
2022-02-02 14:48:27 +01:00
Konrad Lalik
60a25b4022 Alerting: Split legacy and unified routing configuration (#44641) (#44757)
* Disable add alert menu entry for legacy alerting

* Split legacy and unified routing configuration

* Fix fallback routes configuration

(cherry picked from commit 69e4796504)
2022-02-02 11:37:06 +01:00
Grot (@grafanabot)
6beca4317e [v8.3.x] Logs Panel: fix timestamp parsing for string dates without timezone (#44754)
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-02-02 11:09:07 +01:00
Grot (@grafanabot)
c9a619e364 Tempo: Show error if transformTrace() is passed bad data to parse to JSON (#44684) (#44741)
* Surface errors if transformTrace() is passed bad data to parse

(cherry picked from commit a86d7a5a90)

Co-authored-by: Cat Perry <000.perry@gmail.com>
2022-02-01 23:59:10 +01:00
Connor Lindsey
9b628f4742 [v8.3.x] Tempo: Add request histogram to service graph datalink 2022-02-01 20:07:44 +01:00
Tania B
2bd51b506e add links between encryption docs (#42549) (#44705)
(cherry picked from commit b7e1f5f9ce)

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2022-02-01 15:12:21 +02:00
Grot (@grafanabot)
b88f3a909e Add concept about envelope encryption (#41860) (#44703)
* Add concept about envelope-encryption.

* remove comma

* separate warning note into steps

* remove steps from warning note

* Fix lint

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit ed0f3100b3)

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2022-02-01 14:49:27 +02:00
Grot (@grafanabot)
4f2ffc434f Alerting: Fix moving alert rules to a different folder (#44533) (#44644)
* Prevent rule deletion when creation in a new folder fails

* Fix handling duplication of rules when moving between folders

* Add unit test for unique name generator

* Fix typo

(cherry picked from commit 88f3dff6d2)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2022-02-01 10:33:22 +01:00
Grot (@grafanabot)
8f7c031d1d Docs: Add section about limitations alerting in "Time range controls" (#44680) (#44682)
* Added section about syntaxes not supported by Grafana. Also updated missing image name.

* Fixed image name again.

(cherry picked from commit 133e34d52a)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-01-31 18:46:33 -05:00
Andrej Ocenas
30d5482a48 Prometheus: Fix some of the alerting queries that use reduce/math operation (#44380) (#44672)
* Prometheus: Dont fill response with nulls for alerting queries

* Refactor based on reviews

(cherry picked from commit 780591cc12)
2022-01-31 13:51:30 -05:00
Grot (@grafanabot)
5af06db660 NodeGraph: Update no data message to show if no nodes (#44483) (#44674)
* Display error if no service graph data is returned

* Remove error message and update node graph no data logic

* Check processed nodes instead of rendered nodes for no data message

* Remove console.log

(cherry picked from commit 4f44ff7ce8)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-01-31 19:45:40 +01:00
Grot (@grafanabot)
8343e79f3e Add metrics to ngalert scheduler (#44602) (#44670)
This pull request adds metrics to the ngalert scheduler so we can see how long it takes to evaluate a tick.

(cherry picked from commit 5e2280ceee)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2022-01-31 17:40:19 +00:00
Will Browne
ac8f1b5b6b [v8.3.x] Plugins: Refactor Grafana and Plugin version update checkers (#44662)
* 44529

* fix test
2022-01-31 16:49:29 +01:00
Grot (@grafanabot)
5b37d14b7f Tempo: Display start time in search results as relative time (#44568) (#44661)
* Explore: modify tempo trace start time to human readable format in table output

Signed-off-by: tharun <rajendrantharun@live.com>

* add unit tests

Signed-off-by: tharun <rajendrantharun@live.com>
(cherry picked from commit de1661e877)

Co-authored-by: Tharun Rajendran <rajendrantharun@live.com>
2022-01-31 16:22:46 +01:00
Grot (@grafanabot)
3ce1ca5ac1 Variables: Fix for constant variables in self referencing links (#44631) (#44651)
* Variables: Fix for constant variables in self referencing links

* Chore: adds bettercomment

(cherry picked from commit 5a5f5cacc8)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2022-01-31 14:20:40 +01:00
Karl Persson
cdcbf64b67 quote reserved keyword (#43652) (#44649)
(cherry picked from commit 2425828a0b)
2022-01-31 13:24:29 +01:00
Grot (@grafanabot)
f35f826525 TablePanel: Fix ad-hoc variabes not working on default datasources (#44314) (#44626)
* Dashboards: Fix ad-hoc variabes not working on default datasources

* not async

* Update comment

(cherry picked from commit b1b6205651)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-01-31 01:36:39 +01:00
Grot (@grafanabot)
30c7df22ee Docs: Added information about Prometheus write permission requirement. (#44616) (#44618)
* Added note.

* Fixed typo.

(cherry picked from commit d584a27055)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-01-28 20:22:32 -05:00
Grot (@grafanabot)
0d469694c6 Tempo: Auto-clear results when changing query type (#44390) (#44596)
* Auto-clear results when changing query type

* Move clear results to function

(cherry picked from commit 45a435ad78)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-01-28 08:57:32 -07:00
Grot (@grafanabot)
9ddcb16298 fix: multiple queries in alerting regression (#44585) (#44599)
(cherry picked from commit 26ddeaf3d7)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-01-28 16:37:55 +01:00
Grot (@grafanabot)
2c1a590752 fix typo (#44564) (#44567)
(cherry picked from commit 7b476c19c2)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-01-28 08:42:43 -05:00
Connor Lindsey
a61b1e4285 NodeGraph: fix rendering of node graph in dashboard panel (#44552) (#44558)
Signed-off-by: tharun <rajendrantharun@live.com>
(cherry picked from commit 5721933e4b)

Co-authored-by: Tharun Rajendran <rajendrantharun@live.com>
2022-01-27 19:48:53 +01:00
Grot (@grafanabot)
7c2b1cc9d0 CloudMonitoring: Fix resource labels in query editor (#44550) (#44555)
(cherry picked from commit d3b8fc53aa)

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2022-01-27 11:57:29 -05:00
Grot (@grafanabot)
872727e745 Chore: Remove unused AWS KMS provider's token setting (#44531) (#44548)
(cherry picked from commit 1a9c293984)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2022-01-27 16:30:57 +01:00
Grot (@grafanabot)
2585ad1ddc TimeSeries: disable fill when fillBelowTo field is missing (#44498) (#44500)
(cherry picked from commit 6533eb9244)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-01-27 00:22:37 +01:00
Grot (@grafanabot)
7c9c60b853 Cloud Monitoring: Reduce request size when listing labels (#44365) (#44473)
(cherry picked from commit d1083b9597)

Co-authored-by: Mitsuhiro Tanda <mitsuhiro.tanda@gmail.com>
2022-01-26 12:18:30 +01:00
Grot (@grafanabot)
e016d4eb1b Formatters: speed up toDuration() (#44345) (#44461)
(cherry picked from commit a20894c261)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-01-26 02:09:15 -06:00
Grot (@grafanabot)
9727ba084c Tempo: Add time range to tempo search query behind a feature flag (#43811) (#44445)
(cherry picked from commit ef12028a68)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-01-25 18:16:32 +01:00
Dimitris Sotirakis
e80194610c Update grabpl version (#44410) (#44412)
(cherry picked from commit ef35cb5318)
2022-01-25 10:00:06 +01:00
Grot (@grafanabot)
a2f97a68c6 QueryEditors: Restore query editor margin to what old value (#44384) (#44409)
(cherry picked from commit 566556fea2)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2022-01-25 09:39:09 +01:00
Carl Bergquist
8aa31fd2d6 Update dependency github.com/influxdata/influxdb-client-go/v2 to v2.6.0 (#44225) (#44295)
Signed-off-by: Dave Henderson <dave.henderson@grafana.com>
(cherry picked from commit 3d865a3687)

Co-authored-by: Dave Henderson <dhenderson@gmail.com>
2022-01-24 18:29:20 +01:00
Grot (@grafanabot)
eccd87a564 Explore: show scalar data result in a table instead of graph (#44362) (#44366)
Signed-off-by: tharun <rajendrantharun@live.com>
(cherry picked from commit 732c2ebb37)

Co-authored-by: Tharun Rajendran <rajendrantharun@live.com>
2022-01-24 10:37:24 +01:00
Grot (@grafanabot)
f5abd72785 TimeSeries: prevent threshold line color from affecting grid lines (#44337) (#44346)
(cherry picked from commit 79ec3ec54c)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2022-01-22 00:39:14 +01:00
Grot (@grafanabot)
db1b31d542 docs: Fix URL for Github callback in OAuth. (#41122) (#44332)
(cherry picked from commit 5d0bc9e933)

Co-authored-by: Jason Walton <github@lucid.thedreaming.org>
2022-01-21 12:03:36 -05:00
Grot (@grafanabot)
7fd39889fa AzureMonitor: Allow template variables in the subscription field (#44312) (#44331)
(cherry picked from commit addeba7f05)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2022-01-21 17:02:49 +01:00
Grot (@grafanabot)
64fc2ecb0e Docs: add API pages to HTTP API list (#42997) (#44328)
* add API pages to HTTP API list

* fix capitalization of page names

(cherry picked from commit 8a21385481)

Co-authored-by: JM <justintmai@gmail.com>
2022-01-21 10:31:55 -05:00
Grot (@grafanabot)
42668a5e89 Alerting: recognize Cortex datasources correctly in the frontend (#44316) (#44325)
* Alerting: always use msg field for user facing errors

* fix: revert front-end Cortex detection

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
(cherry picked from commit 8ee3f59cd4)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2022-01-21 16:03:55 +01:00
Armand Grillet
c335538765 Create only one folder per dashboard with ACL (#44317)
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
2022-01-21 14:59:18 +01:00
Grot (@grafanabot)
3d453a6104 Only modify table spacing (#44313) (#44320)
(cherry picked from commit e1af78954f)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-01-21 14:52:47 +01:00
Dimitris Sotirakis
918cb580e8 E2E: Rename end-to-end-tests-server to grafana-server (#44249) (#44282)
* Rename to grafana-server / move scripts into new directory

* Change grafana-server step command

* Change scripts paths

* Use test grabpl version

* Update run-suite script

* Further name updates

* Update grabpl version

* Update contribute/style-guides/e2e-core.md

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 22eb2df602)
2022-01-21 11:09:31 +02:00
Dominik Prokop
6863f49bd0 [v8.3.x] Cursor sync: Apply the settings without saving the dashboard (#44270) (#44279)
* Cursor sync: Apply the settings without saving the dashboard

* Remove unnecessary code

* Lint god damn

(cherry picked from commit 7bf25f62e1)
2022-01-21 09:27:15 +01:00
Grot (@grafanabot)
2c502f4b36 MixedDatasource: Fixes infinite loop with empty query panel (#44265) (#44268)
* MixedDatasource: Fixes infinite loop with empty query panel

(cherry picked from commit a728e9b4dd)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2022-01-20 13:49:05 +00:00
Grot (@grafanabot)
05ccdac63a TablePanel: Makes footer not overlap table content (#44210) (#44247)
(cherry picked from commit 9f0889c402)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2022-01-20 01:37:44 -08:00
Grot (@grafanabot)
5ab2ebade3 DashboardSettings: Prevent Dashboard permissions from linking to folder permissions when user does not have sufficient permissions (#44212) (#44223)
* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* add tests

* fix up

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
(cherry picked from commit 9f97f05fcc)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2022-01-20 09:29:35 +00:00
Dimitris Sotirakis
bce40bfcf1 [v8.3.x] Remove test-release pipelines (#44220) (#44228)
* Remove test-release pipelines (#44220)

(cherry picked from commit 27fbe82bf1)

* Remove accidentally added lines upon cherry-picking

* Remove unused var
2022-01-20 00:02:56 +02:00
Grot (@grafanabot)
5bc1a0ad06 docs: Move password information on password smtp section (#42370) (#44229)
*What this PR does / why we need it:*

The password information is on [enabled section](https://grafana.com/docs/grafana/latest/administration/configuration/#enabled), I move it on [password section](https://grafana.com/docs/grafana/latest/administration/configuration/#password-1).

(cherry picked from commit f6b385f0ca)

Co-authored-by: kosssi <github@fafaru.com>
2022-01-19 14:29:05 -05:00
Grot (@grafanabot)
a23bacc3e2 Dashboard: Prevent Mixed datasources using the test datasource crashing (#44128) (#44215)
* Special case mixed datasources... :/

* Revert "Special case mixed datasources... :/"

This reverts commit dd0e3ea4a8.

* Ensure testdata persists datasource when switching scenario

* Add a unit test to prevent regressions

* kick drone

(cherry picked from commit d4d306d825)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-01-19 14:19:45 +01:00
Dimitris Sotirakis
67a3609cb8 [v8.3.x] CI: Release automations fixes (#44194)
* Change bucket

* Make publish-packages depend on publish-artifacts pipeline

* Change bucket for windows .msi installers
2022-01-19 15:13:16 +02:00
Gleb Goncharov
f63ec0f43d Fix WebSockets configuration for Nginx (#44148) 2022-01-19 15:47:01 +03:00
Dimitris Sotirakis
42bffe2310 [v8.3.x] Update changelog and lockfile for 8.3.4 (#44168)
* ReleaseNotes: Updated changelog and release notes for 8.3.4 (#218)

(cherry picked from commit d5a5360328)

Co-authored-by: grafanabot <bot@grafana.com>
(cherry picked from commit de38ed8d67985c2da189007d44eaa17769c772ab)
(cherry picked from commit c39413645f)

* "Release: Updated versions in package to 8.3.4" (#216)

(cherry picked from commit 39d66dcc8af875313c99beda2f46fb9c6d5443fb)
(cherry picked from commit 82a2acf00b)

* Update lockfile

(cherry picked from commit a551d74b11)

Co-authored-by: Grot (@grafanabot) <43478413+grafanabot@users.noreply.github.com>
2022-01-18 17:09:27 +01:00
Dimitris Sotirakis
d3756d38ee [v8.3.x] GetUserInfo: return an error if no user was found (#211) (#44166)
* return an error if no user was found

* update condition

(cherry picked from commit ec87405543fe8032a0c2769d3ec97536b7a749ef)

Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2022-01-18 16:53:03 +01:00
Dimitris Sotirakis
db94117d84 Replace docker-puppeteer with the one in grafana dockerhub repo (#44145) (#44147)
(cherry picked from commit 118cc0d735)
2022-01-18 11:43:05 +00:00
Grot (@grafanabot)
2b967ad8ec Circleci: remove unused config (#44136) (#44141)
CircleCI is being triggered but there are no workflows being executed.
CI is driven by Drone.

(cherry picked from commit bc74d44cee)

Co-authored-by: Javier Palomo <javier.palomo@grafana.com>
2022-01-18 09:18:15 +00:00
Grot (@grafanabot)
5681f348c4 Plugins: Add notices to docs to prevent NPX commands from hanging (#44043) (#44119)
* docs(plugins): add notice about npm 7 flag to prevent commands from hanging

* Apply suggestions from code review

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 e888a40531)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2022-01-17 15:47:27 +00:00
Grot (@grafanabot)
cbede52ef6 Fix issue link (#42891) (#44123)
(cherry picked from commit c4b345cfc4)

Co-authored-by: Gabi Davar <grizzly.nyo@gmail.com>
2022-01-17 15:44:25 +00:00
Grot (@grafanabot)
75b2a92c63 Azure Monitor: Improved error messages for variable queries (#43213) (#44117)
(cherry picked from commit 5ae5a2e0d0)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2022-01-17 16:21:33 +01:00
Grot (@grafanabot)
410d9a96cf Elastic: Allow using long/int as date field for alerts (#44027) (#44115)
* Use integers for time range filter

Previously it was passed as a string which is automatically converted by Elastic to a number only if the field type is "date". For other types (e.g. "long") such conversion doesn't work. In theory "date" could be passed as a formatted string but we don't use it this way and always pass it as a number so it is safe to always pass numbers, not strings.

* Fix time_series_query_test

* Retrigger build

(cherry picked from commit 9fb8339f87)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-01-17 16:19:50 +01:00
Grot (@grafanabot)
0a8f4cff3e CloudMonitoring: Fixes broken variable queries that use group bys (#43914) (#44116)
(cherry picked from commit 715166baf3)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2022-01-17 16:04:06 +01:00
Grot (@grafanabot)
4ed62247f0 Prometheus: Fix interpolation of $__rate_interval variable (#44035) (#44114)
* Name fields based on targets length

* Remove rounding in rate interval variable replacing

* Refactor and fix edge  case when interval and time duration would be rate interval

* Add tests

* Remove , from test

* Revert "Name fields based on targets length"

This reverts commit 5dcb34a765.

(cherry picked from commit e704110f74)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-01-17 15:44:56 +01:00
Grot (@grafanabot)
1851cf38d5 Variables: Fix for migrating legacy data source properties (#43263) (#44106)
(cherry picked from commit aa47cac69f)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2022-01-17 15:18:29 +01:00
Grot (@grafanabot)
8ae06767a8 Tempo: Provide tag value completion items consistently (#43773) (#43863)
(cherry picked from commit 3d6e9076c9)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-01-17 15:13:56 +01:00
Grot (@grafanabot)
16dc72e3c6 Alerting: show deleted datasource (#43891) (#44105)
(cherry picked from commit bd9df4f829)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-01-17 14:48:56 +01:00
Dimitris Sotirakis
139cd1d9fc [v8.3.x] Update grabpl version to 2.8.4 - modify commands (#43996) (#43999)
* Update grabpl version to 2.8.3 - modify commands (#43996)

(cherry picked from commit 787d55fb2d)

* Update grabpl to 2.8.4

* Sign drone
2022-01-17 13:43:04 +00:00
Gilles De Mey
575d7ed5d5 Alerting: remove dead code (#43956) (#44103)
(cherry picked from commit 55ec05b560)
2022-01-17 14:29:34 +01:00
Grot (@grafanabot)
e77602a3b9 Export: Fix error being thrown when exporting dashboards using query variables that reference the default datasource (#44034) (#44093)
* handle undefined datasources, add unit test

* slightly nicer

(cherry picked from commit c618339482)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-01-17 11:40:50 +01:00
Grot (@grafanabot)
cea53ca70a Fixed broken links in documentation (#44044) (#44054)
* Fixed broken link

* Fixed broken contribute documentation link

* Consistent relative contribute-folder url

(cherry picked from commit bd8791aced)

Co-authored-by: ToTheMax <21971014+ToTheMax@users.noreply.github.com>
2022-01-14 10:49:45 -05:00
Dimitris Sotirakis
3878ff9324 [v8.3.x] chore(drone): switch to using cypress built image for e2e tests (#44050)
* chore(drone): switch to using cypress built image for e2e tests

(cherry picked from commit ec9d6b9ca9)

* Remove volumes - downgrade cypress version

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2022-01-14 16:51:46 +02:00
Grot (@grafanabot)
3aab445245 [v8.3.x] Elasticsearch: Fix handling multiple datalinks for a single field (#44049)
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-01-14 15:23:31 +01:00
Grot (@grafanabot)
e801e20c7d Variables: Handle variable cancellations better (#43987) (#44032)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alexandra Vargas <alexa1866@gmail.com>>
(cherry picked from commit 7ffefc069f)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2022-01-14 11:33:58 +01:00
Grot (@grafanabot)
16a8902593 Usage stats: Count API keys (#42883) (#44025)
* Stats: add api key count to usage stats

* Chore: correctly capitalize struct member

(cherry picked from commit a1b8b5d123)

Co-authored-by: J Guerreiro <joao.guerreiro@grafana.com>
2022-01-14 10:28:02 +01:00
Grot (@grafanabot)
37bb5f17f2 prometheus: fix auto-inserting null-timestamps at the end (#44022) (#44024)
(cherry picked from commit bedc5cccaa)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-01-14 10:05:58 +01:00
Grot (@grafanabot)
c76acbadd6 Prometheus: add tests covering the prometheus-response to dataframes conversion (#43892) (#44023)
* prometheus: add tests covering prometheus_response to grafana_dataframes

* fixed variable name

* added comment

* removed not-helping function call

(cherry picked from commit 4a88b8f66c)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2022-01-14 09:47:08 +01:00
Konrad Lalik
5a5050df32 Alerting: Fix the silence url's matcher parameters (#43898) (#44002)
* Split silence matchers parameter into a separate entry for each label

* Unify the silence link creation

* Remove duplicated matchers when parsing to/from query params

* Add tests for matchers

* Add a comment with a duplication removal explanation

* Improve label duplication comment

* Remove redundant code

* Use uniqBy to simplify the code. Rename matchers parameter

* Fix Silence test data

(cherry picked from commit c829535f14)
2022-01-13 14:45:06 +01:00
Andres Martinez Gotor
3ac80e696c [v8.3.x] Allow to bypass modal focus trap (#44001) 2022-01-13 13:58:07 +01:00
Grot (@grafanabot)
425b9f5bd4 Docs: clean up image renderer dependencies and add ones for CentOS 8 (#41862) (#43993)
* Docs: clean up image renderer dependencies and add ones for CentOS 8

* apply PR review feedback

(cherry picked from commit a9dfd3a487)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2022-01-13 11:55:01 +01:00
Grot (@grafanabot)
646bc54d09 only push default datasources to the list if they're not undefined (#43966) (#43990)
(cherry picked from commit 8f1468df6a)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-01-13 10:43:12 +01:00
Nate Walters
d4a1fad604 Chore: fix docs typo (#43980) 2022-01-12 22:03:32 -08:00
Grot (@grafanabot)
5bd12321ca Postgres/MySQL/MSSQL: Cancel in-flight SQL query if user cancels query in grafana (#43890) (#43965)
(cherry picked from commit f881fd1637)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2022-01-12 15:43:21 +01:00
Gilles De Mey
59c2ffec0b Alerting: manual backport of #43367 2022-01-12 14:16:51 +01:00
Dimitris Sotirakis
ac031acdbe Update grabpl version to 2.8.2 (#43949) (#43954)
(cherry picked from commit 634ce4a98e)
2022-01-12 12:25:27 +01:00
Grot (@grafanabot)
6fe27c5274 Variables: Fix so data source variables are added to adhoc configuration (#43881) (#43953)
(cherry picked from commit 7f8f9eb814)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2022-01-12 12:19:56 +01:00
Grot (@grafanabot)
63064facdb Name fields based on targets length (#43832) (#43943)
(cherry picked from commit c8ef541c02)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-01-12 11:22:07 +01:00
Dimitris Sotirakis
6217739bc9 CI: Automate Grafana releases (#43897) (#43911)
* CI: Automate releases

* Update grabpl version

(cherry picked from commit 4f47832bac)
2022-01-12 10:40:11 +01:00
Travis Patterson
c45313a268 Propagate all headers (#43812) (#43922)
* Propagate all headers

* stable header order

(cherry picked from commit 9eb82f9fff)
2022-01-11 14:39:52 -07:00
Grot (@grafanabot)
c7c7d6fe88 Alerting: [Docs] Clarifications regarding what's supported in alerting message templates (#43544) (#43924)
* Clarify docs for alerting templates

* Fix template cross-reference

* Add a single missing delimiter

* Update docs/sources/alerting/unified-alerting/message-templating/_index.md

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

* Update docs/sources/alerting/unified-alerting/message-templating/_index.md

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

* Update docs/sources/alerting/unified-alerting/message-templating/_index.md

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

* Update docs/sources/alerting/unified-alerting/message-templating/_index.md

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

* Address various points of docs feedback

* Update docs/sources/alerting/unified-alerting/message-templating/_index.md

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

* Update docs/sources/alerting/unified-alerting/message-templating/_index.md

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

* Update docs/sources/alerting/unified-alerting/message-templating/_index.md

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

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
(cherry picked from commit 59bda131ec)

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2022-01-11 14:39:08 -06:00
Dimitris Sotirakis
a4c660ca0e Update grabpl version to 2.8.1 (#43902) (#43917)
(cherry picked from commit ee0a30c8c2)
2022-01-11 20:42:38 +01:00
Grot (@grafanabot)
5f2c47b125 Change 'grafana-expression' to ExpressionDatasourceRef.type so isExpr… (#43379) (#43913)
* Change 'grafana-expression' to ExpressionDatasourceRef.type so isExpressionReference works

* use constant ref in tests

* import from package

(cherry picked from commit d52a6e3d3b)

Co-authored-by: Travis Patterson <travis.patterson@grafana.com>
2022-01-11 17:57:11 +01:00
Isabella Siu
10fb21ff18 CloudMonitoring: separate out google auth docs (#43481) (#43907)
* CloudMonitoring: separate out google auth docs

* Apply suggestions from code review

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

* docs team changes

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 5e7804f466)
2022-01-11 10:23:23 -05:00
Grot (@grafanabot)
f67d474844 Fix typo in contact-points documentation (#43883) (#43903)
Fixes a typo in contact-points documentation, `mesasges` => `messages`

(cherry picked from commit 58408f31ab)

Co-authored-by: Andreas Fitzek <andreas.fitzek@gmail.com>
2022-01-11 10:05:35 -05:00
Dimitris Sotirakis
7e5bce7a91 Chore: Split release pipelines (#43419) (#43893)
* Split release pipelines

* Re-add pr and main pipelines

(cherry picked from commit f60a2e8152)
2022-01-11 10:54:32 +00:00
Ivana Huckova
5d760f8465 Prometheus: annotation: fix only first frame was process error & typo. (#43486) (#43804) 2022-01-11 11:05:24 +01:00
Grot (@grafanabot)
df271c68e3 A11y: Fix a11y issues in OpenTSDB (#43714) (#43729)
* Fix a11y issues in OpenTSDB configuration page

* Fix a11y issues in OpenTSDB editor

* Link labels to inputs where possible

Co-authored-by: kay delaney <kay@grafana.com>
(cherry picked from commit bac9253fdc)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-01-11 09:48:57 +01:00
idafurjes
433f0570cf Chore: Upgrade go and alpine (#43801) (#43846)
* Upgrade go and alpine

* Bump grabpl version

* Bump alpine version

* Fix version of grabpl

* Bump alpine version

* Bump alpine in Dockerfiles

(cherry picked from commit 3ca58c0e0c)
2022-01-10 11:30:07 +01:00
Dimitris Sotirakis
51f516e16d Chore: Replace publish keyword with store (#43340) (#43814) 2022-01-10 10:24:01 +01:00
Grot (@grafanabot)
9b33b5388b Variables: Fix for flickering repeat panels (#43447) (#43841)
* Variables: Fix for flickering repeat panels

* Refactor: updates after PR comments

(cherry picked from commit 9d11c9153f)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2022-01-10 07:01:11 +01:00
Travis Patterson
d3d3e99a3f Forward oauth tokens after prometheus datasource migration (#43686) (#43818)
* create the prom client

* implement lru cache of prometheus clients based on auth headers

* linter

(cherry picked from commit 20b3b2a448)
2022-01-07 19:25:13 +01:00
Grot (@grafanabot)
38f86645e7 Add record-audio icon for recorded queries (#43734) (#43784)
* Add record-audio icon for recorded queries

* add record-audio icon to iconBundle

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

Co-authored-by: Travis Patterson <travis.patterson@grafana.com>
2022-01-07 08:41:20 -07:00
idafurjes
a3932327c2 Upgrade go version to 1.17.6 (#43797) (#43807)
(cherry picked from commit 4eacdf5f9e)
2022-01-07 16:28:15 +01:00
Grot (@grafanabot)
2967c8ec30 Add packages:publishPrevious command (#43800) (#43805)
(cherry picked from commit 79d10c6903)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-01-07 15:38:50 +01:00
Grot (@grafanabot)
fc6aa3833e Postgres: Fix test datasource always returns success (#43762) (#43789)
(cherry picked from commit 85246d7179)

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2022-01-07 10:57:26 +01:00
Grot (@grafanabot)
d12111cb97 Table: Fixes issue with field config applied to wrong fields when hiding columns (#43376) (#43788)
* Table: Fixes issue with field config applied to wrong fields when hiding columns

* Minor refactoring

* Fixing comment

* Rename to field

* Forgot to save test file

(cherry picked from commit 5b02e8a666)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2022-01-07 10:47:19 +01:00
Grot (@grafanabot)
5c6ab44b41 Remove duplication (#43694) (#43786)
(cherry picked from commit beba5958a4)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-01-07 10:38:24 +01:00
Grot (@grafanabot)
040bdf4803 Fixed incorrect link to text panel page (#43757) (#43775)
"Text panel" was linking to the "alert list panel" page: (https://grafana.com/docs/grafana/latest/visualizations/alert-list-panel/). This change should map it to the correct page now (https://grafana.com/docs/grafana/latest/visualizations/text-panel/).

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

Co-authored-by: MaukWM <maukmul@gmail.com>
2022-01-06 15:38:19 -05:00
Grot (@grafanabot)
101af6a66d [v8.3.x] Input: Fix margins when not using prefix/suffix (#43759)
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2022-01-06 14:43:45 +01:00
Grot (@grafanabot)
ee892eec78 Login: Prevent page overflowing on mobile (#43739) (#43744)
(cherry picked from commit c87b048af8)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2022-01-06 11:51:35 +01:00
Alexander Weaver
926bfee34a Alerting: Allow customization of Google chat message (#43568) (#43723)
* Allow customizable googlechat message via optional setting

* Add optional message field in googlechat contact point configurator

* Fix strange error message on send if template fails to fully evaluate

* Elevate template evaluation failure logs to Warn level

* Extract default.title template embed from all channels to shared constant

(cherry picked from commit fd583a0e3b)
2022-01-05 11:33:20 -06:00
Guilherme Caulada
1b7450863a docs: aws marketplace license activation (#43466) (#43681)
* initial draft

* role creation prereq

* separate ecs and eks docs

* update ECS steps

* reword ecs instructions

* spacing

* remove spaces to make a hyperlink work

* added aws marketplace content

* update enterprise configuration

* add detail to deploy outside of aws

* improve outside of aws config

* minor addition

* update region syntax

* Update docs/sources/enterprise/license/_index.md

* typo

* Update EKS docs with detailed instructions

* Add task to setup ECS for high-availability

* Fix AWS_REGION environment variable

* final review and changes

* section landing page tweak

* Update docs/sources/enterprise/license/activate-aws-marketplace-license/about-ge-license-through-aws.md

Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>

* fixed links, changed db parameters to placeholder values

* copy edits

* copy updates

* Fix typos pointed out by codespell

* Fix prettier issue on EKS documentation

Co-authored-by: Mitchel Seaman <mitchel.seaman@gmail.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
(cherry picked from commit 238345b62d)

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
2022-01-05 12:34:54 -03:00
Grot (@grafanabot)
9d7547bafd ImportDashboard: Fixes issue with importing dashboard and name ending up in uid (#43451) (#43712)
* ImportDashboard: Fixes issue with importing dashboard and name ending up in uid

* Added unit test

* fixing import issue

(cherry picked from commit 5c88acd5aa)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2022-01-05 15:35:59 +01:00
Grot (@grafanabot)
f7dabc4287 Prometheus: Fill missing steps with null values (#43622) (#43701)
* Prometheus: Add empty points when data points missing

* Remove newline

* Add comments

* Improve/Fix test

* Remove unused variable

(cherry picked from commit d7d6c10664)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2022-01-05 11:55:04 +01:00
Grot (@grafanabot)
15edc4ad64 Add packages:publishTest command (#43696) (#43697)
(cherry picked from commit 3625c617fa)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2022-01-05 12:31:21 +02:00
Grot (@grafanabot)
07fe2404cc fix: pass OrgId to alertNotification model (#43678) (#43695)
fixes #43214

(cherry picked from commit 837925390f)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2022-01-05 10:34:46 +01:00
Grot (@grafanabot)
7426045ed4 Add note for Cloud users. (#43689) (#43691)
(cherry picked from commit a9ad7d3c03)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2022-01-04 17:48:41 -05:00
Grot (@grafanabot)
2af71f339c Import: fix dashboard imports with expressions (#43630) (#43680)
(cherry picked from commit b09d498484)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2022-01-04 10:09:41 -08:00
Grot (@grafanabot)
a524f34e84 BarGuage: Fixes vertical view flip and bar misalignment when used with datalinks (#43655) (#43679)
* BarGauge: fix vertical view flip issue

* fix bar misalignment in vertical and horizontal orientations

* add test to prevent bar misalignment in the future

(cherry picked from commit 8aa496dfb4)

Co-authored-by: Uchechukwu Obasi <obasiuche62@gmail.com>
2022-01-04 17:39:39 +01:00
Grot (@grafanabot)
11c1706aaf NodeGraph: Fix empty state to display 'No Data' message (#43633) (#43677)
(cherry picked from commit 2aad6e57c0)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-01-04 16:59:40 +01:00
Grot (@grafanabot)
f3011afbf1 fix(time series): first point in a series can show context menu on click (#43344) (#43671)
(cherry picked from commit 71b7df09fc)

Co-authored-by: Jure Stepišnik <jure.stepisnik@tretton37.com>
2022-01-04 16:03:45 +01:00
Grot (@grafanabot)
513514cbee Tempo: Fix Otel span kind mapping in trace upload resultTransformer (#43168) (#43669)
* Fix otel span kind mapping

* Parse span kind from enum string

(cherry picked from commit dc92cee874)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2022-01-04 15:43:34 +01:00
Grot (@grafanabot)
92bdf2959f Alerting: Fixed logic on how to render alert tab (#43339) (#43364)
* fixed logic on how to render alert tab

* remove console logs move some logic

(cherry picked from commit dda84dbf1a)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2022-01-04 10:53:17 +01:00
Grot (@grafanabot)
70a371fa11 [v8.3.x] Docs: Added note that alert notifications no longer include images (#43636)
* added note that notifications no longer include images. (#43635)

(cherry picked from commit 88bc47441f)

* Ran prettier to fix formatting.

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <aparajita.chatterjee@grafana.com>
2022-01-04 00:56:05 +01:00
Grot (@grafanabot)
c51ff5f52f Loki: Improve log volume error handling (#42534) (#43610)
* Reduce verbosity of the error message when log volume query fails

* Fix unit tests

(cherry picked from commit 1695468de1)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-01-03 10:40:08 +01:00
Grot (@grafanabot)
80ccb3966b Graphite: Make Graphite config page more accessible (#43333) (#43609)
(cherry picked from commit 7682eabd29)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2022-01-03 10:36:42 +01:00
Leon Sorokin
6ef5e4a523 GraphNG: uPlot 1.6.18 (#43255) (#43608)
(cherry picked from commit bba7bdeb9e)
2022-01-02 19:52:07 -08:00
Marcus Andersson
399e6aee87 [v8.3.x] Chore: Revert externalization of the tslib so it gets bundled with plugins. (#43556) (#43594)
* Revert externalization of the tslib so it gets bundled with the plugins.

* Adding pnp-webpack-plugin to properly resolve dependencies in nested plugins.

* added dependency on lodash.

(cherry picked from commit efd7a12686)
2021-12-30 14:33:37 +01:00
Joan López de la Franca Beltran
27e65a5a10 Encryption: Increase context timeout on flaky test (#43553) (#43574)
(cherry picked from commit 80e0dd74d2)
2021-12-29 10:43:22 +01:00
Joan López de la Franca Beltran
40bee1a534 Encryption: Fix DEKs cache (#43129) (#43551)
* Encryption: Fix DEKs cache

* Clarify tests

(cherry picked from commit 83bc445d3e)
2021-12-29 10:18:47 +01:00
Grot (@grafanabot)
f9a7ad06d7 Remove Github Packages publish step (#43453) (#43493)
(cherry picked from commit 59e153cde8)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-12-23 09:32:02 +01:00
Grot (@grafanabot)
a36706f226 Plugins: Set backend metadata property for core plugins (#43349) (#43475)
Ref #42648
Ref #42781

(cherry picked from commit 7d3bdb6d1b)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-12-22 18:15:33 +01:00
Grot (@grafanabot)
bee8cedfae Prometheus: Fix interpolation of variables in Annotation queries (#43459) (#43467)
(cherry picked from commit f63c2e4bc4)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-12-22 17:08:07 +01:00
Grot (@grafanabot)
872a492040 Alert: Makes content scrollable and limits height (#43449) (#43450)
(cherry picked from commit ded33ba449)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-12-22 10:05:33 +01:00
Grot (@grafanabot)
96c0d1e6eb Alerting: fix gosec warning that is not valid (#43425) (#43442)
(cherry picked from commit ffc72aa255)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-12-21 20:22:08 +01:00
Grot (@grafanabot)
f74f806f09 [v8.3.x] Chore: Remove User Essentials from public/ directory in CODEOWNERS (#43392)
Co-authored-by: Maria Alexandra <239999+axelavargas@users.noreply.github.com>
2021-12-21 09:43:05 +01:00
Grot (@grafanabot)
1304ce92ad CloudWatch: Run migrations even with a missing period (#43350) (#43374)
(cherry picked from commit 5766c624ff)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-12-20 18:13:15 +01:00
Grot (@grafanabot)
0892384ecd Alerting: update response text assertion (#43291) (#43368)
(cherry picked from commit dc163a958d)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2021-12-20 17:04:42 +01:00
Grot (@grafanabot)
d697c327c4 Azure Monitor: Bug fix for variable interpolations in metrics dropdowns (#43251) (#43366)
* Azure Monitor: Bug fix for template variables.
- Adds back support for custom dropdown field names (such as those that use template variables)
- No longer clears a dropdown if selected value is an unknown option. (Hopefully makes debugging dynamically generated dashboards from json easier to debug).
- Add back support in UI for custom values

(cherry picked from commit b1df13e630)

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2021-12-20 10:28:41 -05:00
Grot (@grafanabot)
c46d3c5a15 Azure Monitor: Fix link in server requests panel in App Insights Dashboard (#43068) (#43360)
(cherry picked from commit ec5c75c6a1)

Co-authored-by: jcolladokuri <jcolladokuri@microsoft.com>
2021-12-20 09:37:28 -05:00
Kyle Brandt
9d09e784b7 Chore: update image-spec indirect dependency (#43155) (#43355)
for GHSA-77vh-xpmg-72qh

(cherry picked from commit e1be23ac1e)
2021-12-20 13:57:58 +01:00
Grot (@grafanabot)
55d5c6ba16 prometheus: respect the http-method data source setting (#42753) (#43341)
* prometheus: respect the http-method data source setting

* removed forgotten if-true section

* refactored json-check

(cherry picked from commit 1879a6855e)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-12-20 11:43:39 +01:00
Grot (@grafanabot)
553ad31761 influxdb: config: accessibility fixes (#43260) (#43328)
(cherry picked from commit d2283cf799)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-12-20 10:26:34 +01:00
Dimitris Sotirakis
1359a44c11 [v8.3.x] CI: Split pipelines on main builds (#43327)
* Split pipelines on main builds

* Add services to main-integration-tests
2021-12-20 09:54:27 +01:00
Grot (@grafanabot)
0d390c6c12 BarChart: fix excessive viz re-init due to cloneDeep(props) (#43293) (#43313)
(cherry picked from commit e240c21a43)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-12-19 07:46:31 +01:00
Kyle Brandt
35a109a076 Chore: Update indirect dependency containerd (#43151) (#43298)
for GHSA-5j5w-g665-5m35 and GHSA-c2h3-6mxw-7mvq

(cherry picked from commit 4c59cc4bf4)
2021-12-17 14:51:40 -05:00
Grot (@grafanabot)
c61285534d BarChart: refactor x tick label placement logic (#43256) (#43297)
(cherry picked from commit dd247f26de)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-12-17 12:00:28 -06:00
Grot (@grafanabot)
922a31fff4 Alerting: fixes rewiring unrelated reduce and resample expressions (#43174) (#43284)
(cherry picked from commit db3cc738d6)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2021-12-17 17:24:24 +01:00
Grot (@grafanabot)
91c29ea40e Chore: update uap-go (#43285) (#43292)
for CVE-2021-21317

(cherry picked from commit c50f0d1dd1)

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-12-17 17:03:49 +01:00
Grot (@grafanabot)
fc64ca25a7 InfluxDB: InfluxQL: query editor: skip fields in metadata queries (#42543) (#43288)
* influxdb: influxql: query editor: skip fields for metadata

* test added

* removed forgotten line

* updated test name

* updated comment

* simplified test code

(cherry picked from commit db18acff15)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-12-17 17:28:41 +03:00
Grot (@grafanabot)
0954442741 datasources: config: add aria-label (#43266) (#43272)
(cherry picked from commit 623ae1e41d)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-12-17 12:02:44 +01:00
Grot (@grafanabot)
5549070a82 Geomap: Add default svg size (#43246) (#43250)
* add default svg size

(cherry picked from commit 625c5e0e09)

Co-authored-by: nikki-kiga <42276368+nikki-kiga@users.noreply.github.com>
2021-12-17 01:31:18 +01:00
Grot (@grafanabot)
02daac26b0 BarChart: fix gradient fill orientation when horizontal (#43183) (#43236)
(cherry picked from commit 6b7ef6a80b)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-12-16 17:01:35 -06:00
Grot (@grafanabot)
3362ccd1cc TimeSeries: don't auto-disable fill of fillBelowTo targets (#43165) (#43244)
(cherry picked from commit 8fdbc6cc20)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-12-16 22:12:48 +01:00
Grot (@grafanabot)
5c9c5f2f61 Alerting: make alert rule routine evaluation control be thread-safe (#41220) (#43243)
* change registry.delete to return deleted struct
* use pointer to alertRuleInfo instead copying.
* do not access evaluation channel when routine is stopped
* remove stopCh and use context cancellation
* do not return ctx.Err when channel is cancelled because it cancels all other routines
* make alertRuleInfo fields and functions package private

(cherry picked from commit 1a762083d7)

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
2021-12-16 15:48:53 -05:00
Grot (@grafanabot)
807f5fed8d Geomap: use string comparison for eq operator (#43181) (#43238)
(cherry picked from commit be498f312e)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-12-16 10:25:03 -08:00
Grot (@grafanabot)
0b12ef7d70 Chore: Update release notes index page with 8.3.3 (#43224) (#43231)
(cherry picked from commit df6765d805)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-12-16 17:56:57 +01:00
Grot (@grafanabot)
7c863f13e8 Fix error when setting alerts for Azure Monitor (#42989) (#43221)
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2021-12-16 17:10:48 +01:00
Grot (@grafanabot)
b78aca6e23 Alerting: log errors happening in the API on server side (#43192) (#43205)
* Alerting: log errors happening in the API on server side

* adapt tests to reflect changed payload

(cherry picked from commit b605340668)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-12-16 14:02:49 +01:00
Grot (@grafanabot)
ec980bf19e Configuration: You can now see your expired API keys if you have no active ones (#42452) (#43200)
* Configuration: Always display expired API keys

* Use exclamation-triangle instead

* Reintroduce toggle, move logic into store and call both endpoints

* Handle apiKeys without TTL

* Remove backend changes and make checks in frontend instead

(cherry picked from commit 80b55f09ad)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-12-16 13:16:04 +01:00
Marcus Efraimsson
e7680a0d65 Build: Speed up integration tests (#43045) (#43169)
Changes so that postgres/mysql services in Drone maps their data volumes
to tmpfs volumes (memory) to improve performance.

(cherry picked from commit 5bec46ce23)
2021-12-15 18:20:00 +01:00
Grot (@grafanabot)
20222bada0 Alerting: use HTML-safe characters for the default template (#43148) (#43170)
(cherry picked from commit cbbbb505b4)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2021-12-15 18:13:11 +01:00
Grot (@grafanabot)
0c24ff9d5d InfluxDB: fix accessibility problems (#42553) (#43161)
* influxdb: influxql: query editor a11y fixes

* configure datasource page a11y fixes

* fixed unit test

* better a11y

* better a11y for the query editor

* simplify code

* updated tests

* removed explicit aria-label

(cherry picked from commit 50c6c7a528)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-12-15 16:55:08 +01:00
Grot (@grafanabot)
ec676946cc Dashboard: Prevent crash when expanding a row containing panels with … (#43032) (#43141)
* Dashboard: Prevent crash when expanding a row containing panels with no yPos defined

* Add comment explaining defensive code

(cherry picked from commit 566907e617)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-12-15 12:46:57 +01:00
Grot (@grafanabot)
ef1a9ef126 Populate missing UID of provisioned data source only for new records (#42999) (#43061)
* defer updating empty UID to insert command
* change logging to use the command

(cherry picked from commit 35b0067650)

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
2021-12-15 11:40:11 +00:00
Carl Bergquist
ebcab2136c Publish enterprise2 to correct bucket (#43115) (#43119)
(cherry picked from commit 198f947d0b)

Co-authored-by: malcolmholmes <42545407+malcolmholmes@users.noreply.github.com>
2021-12-14 19:01:47 +01:00
Grot (@grafanabot)
89607fbdb3 Alerting: Fix Annotation Creation when the alerting state changes (#42479) (#43113)
* Fix Annotation creation
- Remove validation of panelID, now annotations are created irrespective on whether they're attached to a panel or not.
- Alwasy attach the annotation to an AlertID

* Fix annotation creation

* fix tests

(cherry picked from commit 357e9ed1ea)

Co-authored-by: gotjosh <josue@grafana.com>
2021-12-14 17:56:43 +00:00
Grot (@grafanabot)
38b0e1cd97 Alerting: show state history (#42362) (#43109)
(cherry picked from commit 02039d7532)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2021-12-14 17:19:56 +01:00
Grot (@grafanabot)
0823902be1 Tempo: Add provisioning example to Tempo docs (#43049) (#43111)
* Add provisioning example to Tempo docs

* Update docs/sources/datasources/tempo.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 d2c5dac76f)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-12-14 17:03:36 +01:00
Grot (@grafanabot)
2683daf1fe Docs: Add CloudWatch Logs retry strategy timeout config (#42485) (#43107)
* Add section for the timeout

* Move and remove the table

* Change header level

(cherry picked from commit dc57bcd458)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-12-14 16:39:13 +01:00
Grot (@grafanabot)
7a8a530f6e ReleaseNotes: Updated changelog and release notes for 8.3.3 (#43101) (#43105)
(cherry picked from commit 8869c830b0)
2021-12-14 16:20:38 +01:00
Grot (@grafanabot)
6bf9b0ac07 Tempo: Update tempo search to use tags query param (#42849) (#43104)
* Update tempo search to use tags query param

* Remove unnecessary test

(cherry picked from commit f1101efcec)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-12-14 15:56:38 +01:00
malcolmholmes
fe9b5e0739 Build: correctly identify upload bucket for CDN assets (#43099) 2021-12-14 14:53:44 +01:00
Carl Bergquist
92859ce0e5 Publish non-release CDN assets (#43087) (#43091)
(cherry picked from commit 555f5a49ce)

Co-authored-by: malcolmholmes <42545407+malcolmholmes@users.noreply.github.com>
2021-12-14 13:26:50 +01:00
Grot (@grafanabot)
41e812bced Select: Infer dropdown menu position (#42446) (#43035)
* Infer dropdown menu position when using asynchronously loaded options

* Infer position only when the menu is opened when the component is created

* Add link to react-select bug

* Update docs

(cherry picked from commit cf2063f19a)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-12-14 12:28:20 +01:00
Grot (@grafanabot)
5dfaad6ccb Toolkit: Fix bug with rootUrls not being properly parsed when signing a private plugin. (#43014) (#43081)
* fix plugin sign

* modify urls

* back to urls...

* code format

(cherry picked from commit e79254d9aa)

Co-authored-by: Dessen Xu <41524013+dessen-xu@users.noreply.github.com>
2021-12-14 12:03:41 +01:00
malcolmholmes
b0152ff2f2 Build: Still auto-publish non-release artifacts (#43021) (#43074)
* Still auto-publish non-release artifacts

* Add version to prerelease bucket path

(cherry picked from commit 4a4d076bb1)
2021-12-14 10:00:44 +00:00
Grot (@grafanabot)
e76d898f22 Alerting: fix sqlstore.GetFolderByTitle to search for folder (#42898) (#43059)
* a test to reproduce the bug

(cherry picked from commit b63595b47f)

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
2021-12-13 15:49:58 -05:00
Grot (@grafanabot)
3ac0aaae80 AppPlugins: Support app plugins with only default nav (#43016) (#43028)
(cherry picked from commit 0e88f5db85)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-12-13 14:22:53 +01:00
Marcus Efraimsson
ce66af2cbd chore(release-notes): add release notes for 8.2.3 and 7.5.12 (#42987) (#42992)
* chore(release-notes): add release notes for 8.2.3 and 7.5.12

* chore(release-notes): add release notes to the index

* chore(release-notes): add release notes to index and changelog

* chore(release-notes): add release notes to index and changelog

* chore(latest.json): bump

(cherry picked from commit fd48aee61e)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2021-12-10 13:30:44 -05:00
Grot (@grafanabot)
30bb7a93ca Release: Bump version to 8.3.3 (#42988)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-12-10 17:42:20 +01:00
Grot (@grafanabot)
361ad74acf Backport fix (#42979) (#42984)
* fixes

(cherry picked from commit a2c386915ce11b9422f4af8ae181eaa1a22bc5c3)
(cherry picked from commit 06706efbbe)

* fix regex

(cherry picked from commit a259213a3badc9618e969f2c8db0a0143f00faee)
(cherry picked from commit 1d7105c095)

* lint (#42970)

(cherry picked from commit afb9e8e5f3)

Co-authored-by: Will Browne <will.browne@grafana.com>
Co-authored-by: malcolmholmes <42545407+malcolmholmes@users.noreply.github.com>
(cherry picked from commit d6ec6f8ad2)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-12-10 16:30:18 +01:00
Grot (@grafanabot)
2f9153c95e Macaron: Prevent WriteHeader invalid HTTP status code panic (#42973) (#42974)
(cherry picked from commit 92005159c89f848ab8b8435e0c8751599e2e8aff)

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

Co-authored-by: Carl Bergquist <carl.bergquist@gmail.com>
2021-12-10 14:14:47 +01:00
Grot (@grafanabot)
e804fb3dce Docs: Clarify relative time range overrides (#42930) (#42965)
* Docs: Clarify relative time range overrides

* Update docs/sources/dashboards/time-range-controls.md

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

* Update docs/sources/panels/queries.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 e6c24396da)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-12-10 09:00:59 +01:00
achatterjee-grafana
434614483b fixed image link. (#42956) (#42959) 2021-12-09 18:06:37 -05:00
Grot (@grafanabot)
1994dbf27b fixed image links, also two broken relfrefs for alerting. (#42954) (#42955)
(cherry picked from commit d2073580be)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-12-09 17:07:46 -05:00
Marcus Andersson
4b9a0370d6 [v8.3.x] Build: Correct syntax for directing release builds (#42942)
* Build: don't run release builds on grafana/grafana repo (#42785)

(cherry picked from commit b6818718e9)

* Build: Correct syntax for directing release builds (#42789)

(cherry picked from commit 6a5416bcec)

Co-authored-by: malcolmholmes <42545407+malcolmholmes@users.noreply.github.com>
2021-12-09 16:17:03 +00:00
malcolmholmes
6828df7a93 Build: allow building releases from other repositories (#42914) (#42926)
* Allow building from other repositories

* Upgrade grabpl

* Update drone.yml

(cherry picked from commit de6148e5f1)
2021-12-09 14:23:33 +00:00
Grot (@grafanabot)
8ebb8887bc Prometheus: Interpolate curly brackets syntax variable (#42927) (#42929)
(cherry picked from commit 2655be61b6)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-12-09 14:51:23 +01:00
Grot (@grafanabot)
48af57e931 Release: Bump version to 8.3.2 (#42918)
* "Release: Updated versions in package to 8.3.2"

* updating yarn.lock file after version bump

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-12-09 13:32:50 +01:00
Grot (@grafanabot)
0a685b04dc Prometheus: Fix running of exemplar queries for non-histogram metrics (#42749) (#42915)
* Prometheus: Fix running of exemplar queries for non-histogram mestrics

* Fix test

* Refactor based on review suggestions

(cherry picked from commit e555221523)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-12-09 11:44:45 +01:00
Grot (@grafanabot)
e8f1d6db44 Store 'alertmanager_configuration' as JSON string instead of raw bytes (#42443) (#42602)
(cherry picked from commit 5183cc4dc4)

Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
2021-12-09 11:44:16 +01:00
Grot (@grafanabot)
a1d4846f7f CloudMonitor: Iterate over pageToken for resources (#42546) (#42833)
(cherry picked from commit a2ad0a0fb6)

Co-authored-by: Isabella Siu <sakurablossom@blueblueworld.com>
2021-12-09 11:38:07 +01:00
Grot (@grafanabot)
e7669226df A11y: Fix prometheus issues (#42671) (#42738)
(cherry picked from commit 8722c19cc3)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-12-09 11:19:53 +01:00
Grot (@grafanabot)
4806a7ac1e A11y: Add missing aria labels in Loki QueryEditor (#42664) (#42737)
* Loki: Add missing aria-label

* Update text

* Update text

(cherry picked from commit 698f452e0d)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-12-09 11:11:28 +01:00
Giordano Ricci
8f6dd8079f Elasticsearch: Fix fastpass A11y issues (#42657) (#42787)
* Add labels to Date Histogram settings fields

* Add labels to Terms settings fields

* Add labels to Filters settings fields

* Add labels to Geo Hash Grid settings fields

* Add labels to Histogram settings fields

* Add labels to Percentiles settings fields

* Add labels to Moving Avg settings fields

* Add labels to Bucket Script settings fields

(cherry picked from commit 7c3565379a)
2021-12-09 11:09:14 +01:00
Grot (@grafanabot)
1cb5786b0b "Release: Updated versions in package to 8.3.1" (#42869) 2021-12-08 12:38:53 +01:00
Grot (@grafanabot)
ab17310cb4 BarChart: Use new data error view component to show actions in panel edit (#42474) (#42875)
(cherry picked from commit 8828d5e8d7)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-12-08 12:00:52 +01:00
Grot (@grafanabot)
b94d710098 Chore: Update developer guide with instructions building from Windows (#42390) (#42866)
In addition, removess copying of local directory in Dockerfile since that directory
normally doesn't exist.

(cherry picked from commit d71cd65dbc)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-12-08 10:45:58 +01:00
Grot (@grafanabot)
3ec7969603 StateTimeline: Fix toolitp not showing when for frames with multiple fields (#42741) (#42815)
* StateTimeline: Fix toolitp not showing when for frames with multiple fields

* Update public/app/plugins/panel/state-timeline/StateTimelinePanel.tsx

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* Update public/app/plugins/panel/state-timeline/StateTimelinePanel.tsx

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

* Update public/app/plugins/panel/state-timeline/StateTimelinePanel.tsx

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

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

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-12-08 09:30:43 +01:00
Grot (@grafanabot)
2d34b9fc66 Variables: Fix repeating panels for on time range changed variables (#42828) (#42864)
(cherry picked from commit 7a99b067ef)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-12-08 08:31:59 +01:00
Dimitris Sotirakis
6aafac7e60 [v8.3.x] Security: Fix directory traversal issue (#42838)
* security: fix dir traversal issue

* Improve comments and error message.

* Fix lint

Co-authored-by: Kyle Brandt <kyle@grafana.com>
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
2021-12-07 19:37:30 +02:00
Will Browne
3e1d120d88 ReleaseNotes: Update 8.3.1 release notes (#42844)
* security: fix dir traversal issue

* Revert "security: fix dir traversal issue"

Meant to do PR.

This reverts commit 8af709a1e7.

* update release notes

Co-authored-by: Kyle Brandt <kyle@grafana.com>
2021-12-07 19:21:45 +02:00
Grot (@grafanabot)
a8c6681fe9 allow search queries without dimensions (#42800) (#42825)
(cherry picked from commit c3208c1850)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-12-07 13:03:18 +01:00
Grot (@grafanabot)
7a8acb25e2 Azure Monitor: Added Microsoft.Cdn/profiles to supported namespace list (#42745) (#42816)
* Added Microsoft.Cdn/profiles to Azure Monitor Plugin

Microsoft.Cdn/profiles is the Azure Front Door Standard/Premium resource which is not present in the supported namespaces. I would like to use this with Grafana.

* Azure Monitor: Added CDN WAF namespace

Added Microsoft.Cdn/cdnwebapplicationfirewallpolicies
Ensured both Microsoft.Cdn/cdnwebapplicationfirewallpolicies and Microsoft.Cdn/profiles are available in all azure clouds

(cherry picked from commit beb3a8f02d)

Co-authored-by: James D <40212250+danijam@users.noreply.github.com>
2021-12-07 11:54:46 +01:00
Grot (@grafanabot)
c9fbf188c5 Grafana Toolkit: Prevent installation of outdated FE dependencies (#42663) (#42812)
(cherry picked from commit 36b0cb64fd)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-12-07 10:17:31 +01:00
Grot (@grafanabot)
7a1d6835c7 Alerting: add documentation about alertmanager contactpoint support (#42799) (#42808)
(cherry picked from commit e70cdb3f49)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-12-07 10:02:56 +01:00
Grot (@grafanabot)
0023a01670 Update SearchItem.tsx (#42783) (#42786)
(cherry picked from commit 0388082768)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-12-06 15:51:51 +01:00
Grot (@grafanabot)
22bec079b4 Variables: Fix so queryparam option works for scoped variables (#42742) (#42778)
* Variables: Fix so queryparam option work for scoped variables

* Chore: update after PR comments

(cherry picked from commit 73b7485630)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-12-06 12:59:45 +01:00
Grot (@grafanabot)
97b51580a8 Loki: Fix adding of ad hoc filters for queries with parser and line_format expressions (#42590) (#42736)
* Loki: Fix ad hoc filtewrs for queries with line_format

* Fix tests

(cherry picked from commit 64cf0aa813)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-12-06 11:45:22 +01:00
Grot (@grafanabot)
294739328a Prometheus: Fix passing of custom params when running queries (#42728) (#42748)
* Prometheus: Fix passing of custom params

* Remove prints

(cherry picked from commit 21fe78302b)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-12-05 16:45:18 +01:00
Grot (@grafanabot)
52372f2912 Update service graph docs (#42604) (#42757)
* Update service graph docs

* Add link to agent configuration

(cherry picked from commit bf744698a1)

Co-authored-by: Connor Lindsey <cblindsey3@gmail.com>
2021-12-03 18:28:19 +01:00
Grot (@grafanabot)
ffde9fcfcf Fix flaky tests in several notifiers (#42668) (#42734)
* Fix flaky tests in several notifiers

- Non-mocked time in sensu go tests
- Close server in Slack tests
- Use a mutex for writing responses in the fake slack server

* Remove mutex at the fake slack server

(cherry picked from commit bdab1d1f1f)

Co-authored-by: gotjosh <josue@grafana.com>
2021-12-03 17:03:48 +00:00
Grot (@grafanabot)
43748f2578 BarGauge: Unfilled area shown with data links (#42676) (#42730)
Closes #37623

(cherry picked from commit f104741448)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-12-03 12:43:36 +01:00
Grot (@grafanabot)
7f30784ac7 Dashlist: use defaultChecked for IconToggle (#42642) (#42701)
(cherry picked from commit 9c2126c002)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-12-03 13:24:09 +02:00
Grot (@grafanabot)
55fd69c9eb TraceView: Fixes virtualized scrolling when trace view is opened in right pane in Explore (#42480) (#42731)
(cherry picked from commit f30debf7ad)

Co-authored-by: Erin Noe-Payne <erin.noe.payne@gmail.com>
2021-12-03 11:35:24 +01:00
Grot (@grafanabot)
482d99ab0e Alerting: Add Ref ID to DatasourceNoData and DatasourceError alerts (#42630) (#42729)
(cherry picked from commit c932dc959c)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2021-12-03 11:10:08 +01:00
Grot (@grafanabot)
14df12c53a recorded queries - add recorded queries to the enterprise configuration (#42613) (#42679)
* add recorded queries to the enterprise configuration

* change name to default_

(cherry picked from commit e79fe8e84e)

Co-authored-by: Travis Patterson <travis.patterson@grafana.com>
2021-12-02 14:49:43 -05:00
Grot (@grafanabot)
f4ace5a18c Docker: Upgrade changelog v8.2.6 (#42677) (#42678)
(cherry picked from commit 7c8410c057)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-12-02 18:27:30 +01:00
Grot (@grafanabot)
b6275ca8e0 Docs: Dedicated section for Grouping in Alerting (#42641) (#42670)
* Docs: Dedicated section for Grouping in Alerting

* Update docs/sources/alerting/unified-alerting/notification-policies.md

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/notification-policies.md

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/notification-policies.md

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>

* Update docs/sources/alerting/unified-alerting/notification-policies.md

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

* Update docs/sources/alerting/unified-alerting/notification-policies.md

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

* Review suggestions

Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 67461086de)

Co-authored-by: gotjosh <josue@grafana.com>
2021-12-02 16:31:01 +00:00
Grot (@grafanabot)
e9432fffd7 ReleaseNotes: Updated changelog and release notes for 8.2.6 (#42655) (#42673)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit e94adfd2c8)
2021-12-02 17:23:29 +01:00
Grot (@grafanabot)
4dcbc475a8 CloudWatch: fix duplicated IDs (#42658) (#42662)
(cherry picked from commit e061cbd25b)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-12-02 16:29:29 +01:00
Grot (@grafanabot)
57c4d4e69b Update aws-authentication.md (#42558) (#42650)
(cherry picked from commit 2ead937a26)

Co-authored-by: Robby Milo <robby.milo@grafana.com>
2021-12-02 09:08:21 -05:00
Dimitris Sotirakis
5f7ac314fd Remove e2e tests on enterprise2 (#42640) (#42649) 2021-12-02 14:52:00 +01:00
Grot (@grafanabot)
d4112c3102 Prometheus: Interpolate template variables in interval (#42637) (#42645)
* Interpolate interval

* Add test

(cherry picked from commit 5cbb4a0a2d)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-12-02 13:52:32 +01:00
Grot (@grafanabot)
621e5bfdb4 CloudWatch: Make sure MatchExact flag gets the right value (#42621) (#42644)
* use value prop instead of depracted checked prop

* make sure props are not changed for all tests

(cherry picked from commit d1c7db5365)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-12-02 13:46:04 +01:00
Grot (@grafanabot)
3e7d7f55c6 Chore: Fix flaky serverlock integration test (#42633) (#42639)
(cherry picked from commit 54fa7b57fe)

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2021-12-02 13:08:06 +01:00
Grot (@grafanabot)
caea2a4f2d Explore: Fix timezone not changing for graph and table (#42430) (#42635)
* Pass timezone to graph in Explore

* Fix timezone issues for table

* Fix type error

* Update public/app/features/explore/TableContainer.test.tsx

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

* Replace UTC with InternalTimeZones

* Update CEST to cest

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

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-12-02 12:45:49 +01:00
Marcus Andersson
0df043d592 Docs: Update publish.yml for 8.3.0 (#42628) 2021-12-02 11:14:16 +01:00
Grot (@grafanabot)
84caade0d8 AzureMonitor: resourcePicker should show resource in the correct subs… (#42170) (#42619)
(cherry picked from commit dc145a2a25)

Co-authored-by: Isabella Siu <sakurablossom@blueblueworld.com>
2021-12-02 09:32:56 +01:00
Grot (@grafanabot)
213d59e162 CloudWatch: Fix broken queries for users migrating from 8.2.4/8.2.5 to 8.3.0 (#42611) (#42616)
* move migration logic to a higher version number

* bump version in test

(cherry picked from commit ee9ca20f1f)

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-12-02 07:57:43 +01:00
Grot (@grafanabot)
e9b947ab66 Docs alerting doc updates (#42262) (#42614)
* Replaced "Grafana 8 alerting" with "Grafana alerting". Added support matrix for Grafana alerting.

* Few more changes and added deprecation notice to legacy alerting landing page.

* Added more content from Yuri's PR.

* Ran prettier.

* Added code review changes.

* One more change.

* Fixed linked texts.

(cherry picked from commit ae655f2675)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-12-01 18:08:33 -05:00
Grot (@grafanabot)
6722e8f37b Docs: Grafana 8.3 Release Docs - Minor updates (#42609) (#42610)
* missing panel quick descriptions

* Panel rel ref fix

* AWS Cloudwatch Metrics to Whats New

(cherry picked from commit 248c71c903)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-12-01 21:22:38 +01:00
Grot (@grafanabot)
dc75d8892e Docs: What's new 8.3 with additions and image links (#42551) (#42599)
* OSS images

* Enterprise images

* Adds the link to the what's new page

* Updated Alerting header style

* Prettier fix

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

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

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

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

* Update docs/sources/whatsnew/whats-new-in-v8-3.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 41917c1473)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-12-01 12:45:45 -04:00
Grot (@grafanabot)
6119a82cb2 Docs: New documentation for the Grafana 8.3 Candlestick panel (#42491) (#42597)
* Initial scaffolding

* intro sentence

* Option scaffolding

* More complete candlestick documentation

* Add candlestick to visualization list

* Clarifying the opening sentence.

* Prettier fix for Candlestick

* Update docs/sources/visualizations/candlestick.md

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

* Update docs/sources/visualizations/candlestick.md

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

* Updated to clarify hollow candlestick behaviour

* Prettier run manually

* Update docs/sources/visualizations/candlestick.md

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

* Update docs/sources/visualizations/candlestick.md

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

* Update docs/sources/visualizations/candlestick.md

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

* Update docs/sources/visualizations/candlestick.md

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

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
(cherry picked from commit 7b1aee5220)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-12-01 17:30:18 +01:00
Grot (@grafanabot)
d6e734cc7c Add missing aria labels (#42532) (#42556)
(cherry picked from commit caf859f498)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-12-01 17:27:45 +01:00
Grot (@grafanabot)
201ec4f0cb Update recorded-queries.md (#42548) (#42587)
Update formatting to make a quote block instead of a bold greater-than symbol

> Added backport label, assuming the content is for 8.3 release.

Thanks @achatterjee-grafana :)

(cherry picked from commit d7861f62a9)

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2021-12-01 17:15:35 +01:00
Grot (@grafanabot)
1c11baffb4 Manage dashboards: Can now delete empty folders (#42527) (#42591)
* Manage dashboards: Can now delete empty folders

* Split hasChecked out into a separate function

* Update modal text

(cherry picked from commit a365dcca5b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-12-01 16:09:26 +01:00
Grot (@grafanabot)
428aea1cd5 ReleaseNotes: Updated changelog and release notes for 8.3.0 (#42524) (#42583)
* ReleaseNotes: Updated changelog and release notes for 8.3.0

* added index link.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
(cherry picked from commit c847c0382d)
2021-12-01 15:45:48 +01:00
Grot (@grafanabot)
189f7ca327 Alerting: Update alert rule migration to use expanded queries (#42493) (#42568)
* move targetData to target

* use constants instead of literals.

* Update comments and add tests

Co-authored-by: gotjosh <josue.abreu@gmail.com>
(cherry picked from commit 9139f61105)

Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
2021-12-01 14:19:00 +00:00
Grot (@grafanabot)
4a001c87ee Alerting: Fix panic while proxying 4xx responses of requests to cortex/loki (#42570) (#42584)
Fixes a panic that would ocurr as we proxy 4xx responses. When this happens and the content type of the response is JSON we try to check if the response has a "message" key. Then, we assume that the key will contain a value of string but we don't take into account that this value can potentially be `null`.

This adds a type assertion check to to this assumption so that we can keep the original JSON body as the response if we're unable to extract an `message`.

(cherry picked from commit 5b64c4f684)

Co-authored-by: gotjosh <josue@grafana.com>
2021-12-01 14:18:37 +00:00
Grot (@grafanabot)
c25fc34695 Docs: Adding panel suggestions initial documentation for 8.3 (#42488) (#42580)
* Adding panel suggestions initial documentation for 8.3

* Update docs/sources/panels/add-a-panel.md

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

* Update docs/sources/visualizations/_index.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 5fd1ce0fe9)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-12-01 15:00:08 +01:00
Grot (@grafanabot)
8b6db83547 E2E: forcing dashboard title type (#42574) (#42577)
(cherry picked from commit 0a50de14d3)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-12-01 14:14:33 +01:00
Grot (@grafanabot)
c8617b374a KeybindingSrv: Prevent dashboard save modal when dashboard cannot be saved (#42505) (#42575)
(cherry picked from commit fa930e7dbd)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-12-01 14:02:09 +01:00
Grot (@grafanabot)
f8ea86d4fd A11y: Add aria-label and placeholder to Timeout & Access fields in HTTP Settings (#42559) (#42572)
* Add aria label and placeholder to timeout input

* datasource settings: improved a11y

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

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-12-01 13:47:58 +01:00
Grot (@grafanabot)
10e74fe994 Kiosk: Fixes graph zoom issue clearing kiosk mode (#42501) (#42569)
(cherry picked from commit 28b619a40e)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-12-01 12:34:27 +00:00
Grot (@grafanabot)
87359de4ca [v8.3.x] AnnoListPanel: Fix interpolation of variables in tags (#42544)
Co-authored-by: François Dautrême <4825058+francoisdtm@users.noreply.github.com>
2021-11-30 20:01:50 +01:00
Grot (@grafanabot)
305ac2ee50 influxdb: influxql: improve the handling of metadata query errors (#42500) (#42535)
(cherry picked from commit 17e12dc784)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-30 17:33:40 +01:00
Grot (@grafanabot)
914fcedb72 "Release: Updated versions in package to 8.3.0" (#42523) 2021-11-30 14:55:33 +01:00
Grot (@grafanabot)
9d6491be4f fix error code for delete folder (#42470) (#42519)
(cherry picked from commit e13e6a7bd7)

Co-authored-by: ying-jeanne <74549700+ying-jeanne@users.noreply.github.com>
2021-11-30 14:21:31 +01:00
Grot (@grafanabot)
e4a85fb951 CI: Temporarily disable panel edit e2e test (#42517) (#42518)
(cherry picked from commit 4e8b97b8ed)

Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
2021-11-30 14:01:17 +01:00
malcolmholmes
57b7c16bc9 Backport 42218 to v8.3.x (#42515)
* Package release before publishing (#42218)

* Package separately to publish

* Fix interpolation

* Windows format envvars

* More descriptive msg

* Won't publish from here

* Resolve docker issues in PR build

* Rename package docker step

* Correct npm release JSON structure

(cherry picked from commit 9c0a2a19fd)

* Use existing grabpl

* Update drone.yml
2021-11-30 13:31:45 +02:00
Grot (@grafanabot)
892d9a2258 Settings: Fix handling (#42497) (#42511)
* 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 11:48:32 +01:00
Marcus Andersson
739cac1ea0 Build: Increased the memory for the node process in the frontend build. (#42499) (#42508)
(cherry picked from commit 2a50c029b2)
2021-11-30 11:27:34 +01:00
Grot (@grafanabot)
0f53eab992 CloudWatch: Add support for AWS Metric Insights (#42487) (#42506)
* add support for code editor and builder

* refactor cloudwatch migration

* Add tooltip to editor field (#56)

* add tooltip

* add old tooltips

* Bug bash feedback fixes (#58)

* make ASC the default option

* update sql preview whenever sql changes

* don't allow queries without aggregation

* set default value for aggregation

* use new input field

* cleanup

* pr feedback

* prevent unnecessary rerenders

* use frame error instead of main error

* remove not used snapshot

* Use dimension filter in schema picker  (#63)

* use dimension key filter in group by and schema labels

* add dimension filter also to code editor

* add tests

* fix build error

* fix strict error

* remove debug code

* fix annotation editor (#64)

* fix annotation editor

* fix broken test

* revert annotation backend change

* PR feedback (#67)

* pr feedback

* removed dimension filter from group by

* add spacing between common fields and rest

* do not generate deep link for metric queries (#70)

* update docs (#69)

Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>

* fix lint problem caused by merge conflict

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

Co-authored-by: Erik Sundell <erik.sundell@grafana.com>
2021-11-30 11:10:15 +01:00
Grot (@grafanabot)
7f64f3b773 Docs: First GeoJSON update to docs for v8.3 (#42394) (#42490)
* First GeoJSON update to docs for v8.3

* Minor tweaks to views

* More language tweaks to views

* Removed alpha functionality from docs

* Added layer order and removed alpha functionality notes

* Updated marker shapes doc text with additional info

* Update docs/sources/visualizations/geomap.md

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

* Update docs/sources/visualizations/geomap.md

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

* Update docs/sources/visualizations/geomap.md

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

* Update docs/sources/visualizations/geomap.md

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

* Update docs/sources/visualizations/geomap.md

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

* Update docs/sources/visualizations/geomap.md

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

* Update docs/sources/visualizations/geomap.md

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

* Update docs/sources/visualizations/geomap.md

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

* Update docs/sources/visualizations/geomap.md

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

* Update docs/sources/visualizations/geomap.md

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

* Update docs/sources/visualizations/geomap.md

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

* Finishing touches

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

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-11-29 20:54:10 -04:00
Grot (@grafanabot)
dec2433a61 Alerting: Disable unified alerting by default in Enterprise Grafana (#42476) (#42484)
* fallback to enable false if Enterprise is true
* anyBoolean
Co-authored-by: Yuriy Tseretyan <tceretian@gmail.com>
2021-11-29 15:16:28 -05:00
Grot (@grafanabot)
5c8ddbabd9 DataSourceVariable: Fixes issue repeating panels by data source variable (#42462) (#42482)
(cherry picked from commit 1f8336e5fe)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-29 20:55:37 +01:00
Grot (@grafanabot)
20f746a1d8 [v8.3.x] Canvas: move new element crash #42409 2021-11-29 11:27:21 -08:00
Nathan Marrs
30933fbb3a [v8.3.x] Backport Latest Geomap Commits (#42399) 2021-11-29 11:26:44 -08:00
Grot (@grafanabot)
d246e600b8 TooltipPlugin: Remove other panels' shared tooltip in edit panel (#42187) (#42478)
(cherry picked from commit 42d1a0f32e)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2021-11-29 18:48:33 +01:00
Grot (@grafanabot)
e13cd9f676 only preload app plugins (#42434) (#42477)
(cherry picked from commit 9c9e79da4f)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-11-29 18:43:22 +01:00
Grot (@grafanabot)
90dedf4f50 Alerting: fix broken datasource link (#42468) (#42469)
(cherry picked from commit db6b71a27b)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2021-11-29 18:18:57 +01:00
Grot (@grafanabot)
70dfe4f942 Transformations: Clarify behaviour of Date format (#42436) (#42466)
* Transformations: Clarify behaviour of `Date format`

* Remove full stop from bullet point

(cherry picked from commit 5eb35606b9)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-29 18:10:14 +01:00
Grot (@grafanabot)
dead7e1a1f Live: fix closing ws conns for push endpoints (#42447) (#42464)
(cherry picked from commit 7034173ef5)

Co-authored-by: Alexander Emelin <frvzmb@gmail.com>
2021-11-29 17:45:49 +01:00
Grot (@grafanabot)
83416f911c Alerting: Show full preview value in tooltip (#42445) (#42459) 2021-11-29 16:59:41 +01:00
Grot (@grafanabot)
edf4702d61 Encryption: Add usage stats to secrets service (#42437) (#42450)
* Encryption: Add usage stats to secrets service

* Sort imports

(cherry picked from commit 58978dcf96)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2021-11-29 16:59:31 +01:00
Grot (@grafanabot)
5044317310 Tracing: Refactor span detail logic (#42152) (#42458)
* Tracing: Update incorrect span fix based on review feedback

* Prometheus: Use this.query for health check

* Revert "Prometheus: Use this.query for health check"

This reverts commit 4c1a6a92a5.

(cherry picked from commit 8d6831f21f)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-11-29 16:35:05 +01:00
Grot (@grafanabot)
0ca6910f55 ValueMappings: Fixes issue with regex value mapping that only sets color (#42311) (#42457)
* ValueMappings: Fixes issue with regex value mapping that only sets color

* Fixed test name

(cherry picked from commit c3d0d37bd7)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-29 16:19:20 +01:00
Alexander Zobnin
66ae92abe9 OAuth: Forward id token to the data source (#42422) (#42451)
* OAuth: Forward id token to the data source

* Add tests

* Forward id token in legacy API

* Check if id_token is string or not

(cherry picked from commit becfd776c3)
2021-11-29 16:01:22 +01:00
Grot (@grafanabot)
cd17f65a05 Alerting: Prevent folders from being deleted when they contain alerts (#42307) (#42439)
(cherry picked from commit 8692f574c9)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-11-29 15:59:17 +01:00
Grot (@grafanabot)
b25038df2e Update FieldLookupTransformerEditor.tsx (#42405) (#42440)
Fixed 2 small spelling mistakes

(cherry picked from commit e1a3b6a386)

Co-authored-by: wengelbrecht-grafana <83230950+wengelbrecht-grafana@users.noreply.github.com>
2021-11-29 14:46:45 +01:00
Grot (@grafanabot)
1c38b70f68 Prometheus: Fix range variables interpolation for time ranges smaller than 1 second (#42242) (#42431)
* Prometheus: Fix precision for queries with < 1s timeRange

* Update pkg/tsdb/prometheus/time_series_query.go

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

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

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-11-29 13:04:09 +01:00
ying-jeanne
88aec5dff9 Upgrade build-container to version 1.4.8 (#42373) (#42426)
* Upgrade build-container to version 1.4.8 (#42373)

* Upgrade build-container to version 1.4.8

* disable lint of mixin

Co-authored-by: Ying WANG <ying.wang@grafana.com>

* change signature

Co-authored-by: idafurjes <36131195+idafurjes@users.noreply.github.com>
2021-11-29 12:44:26 +01:00
Grot (@grafanabot)
a0cfdec52e Dashboard: Fix queries for panels with non-integer widths (#42420) (#42423)
* dashboard: fix non-integer panel widths

* switched to better supported function

(cherry picked from commit 8508ad79b2)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-29 12:06:00 +01:00
Grot (@grafanabot)
8ad3ab4082 explore: fix url update inconsistency (#42288) (#42416)
(cherry picked from commit adbc5bde72)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-29 06:05:08 -05:00
Dimitris Sotirakis
15d94f467d Install netcat to build-container and update the version (#41825) (#42413) 2021-11-29 11:23:41 +01:00
Grot (@grafanabot)
787a862fda Alerting: Fix refresh on legacy Alert List panel (#42322) (#42419)
(cherry picked from commit cb7e047c68)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-11-29 11:01:59 +01:00
Grot (@grafanabot)
4044cc9aeb CloudMonitoring: Avoid to escape regexps in filters (#41961) (#42417)
(cherry picked from commit 9cbc872f22)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-11-29 10:25:43 +01:00
Grot (@grafanabot)
03f54577a5 Geomap: Improve geojson style editor (#41926) (#41933) 2021-11-26 13:34:27 -08:00
Grot (@grafanabot)
4710572d2a Alerting: Clear alerting rule evaluation errors after intermittent failures (#42386) (#42391)
* Alerting: Clear alerting rule evaluation errors after intermittent failures

When an alert transitioned in a way that `alerting -> error -> (alerting|nodata)`, the error provided by the `error` state would never be cleared thus the API and UI would show the health as an error.

(cherry picked from commit dd5a2e5128)

Co-authored-by: gotjosh <josue@grafana.com>
2021-11-26 19:14:57 +01:00
Grot (@grafanabot)
ce0771efea Statetimeline/TimeSeries/BarChart: Limit y label width to 40% of visualiation width (#42350) (#42368)
(cherry picked from commit 820aa3ac59)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-26 14:32:49 +01:00
Grot (@grafanabot)
b5960313fb BarGauge: Limit title width when name is really long (#42346) (#42354)
(cherry picked from commit 5c4fd91cd3)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-26 14:15:46 +01:00
Grot (@grafanabot)
b35fac5905 CloudWatch Logs: Add selected region to autocomplete requests (#42194) (#42367)
* Add region to get fields query

* Fix and add tests

(cherry picked from commit 802ffa3f03)

Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
2021-11-26 13:55:30 +01:00
Grot (@grafanabot)
04e6df314e Docker: updating and syncing change log for docker hub (#42353) (#42357)
* Syncing and updating README with docker hub.

* Update packaging/docker/README.md

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

* Update packaging/docker/README.md

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

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

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2021-11-26 12:06:44 +01:00
Grot (@grafanabot)
f587d9f78a AzureMonitor: Add Microsoft.Insights/components metric namespace to other clouds (#42349) (#42356)
(cherry picked from commit c15f444296)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-11-26 12:04:55 +01:00
Grot (@grafanabot)
e0c0eff3a2 ReleaseNotes: Updated changelog and release notes for 8.3.0-beta2 (#42309) (#42355)
* ReleaseNotes: Updated changelog and release notes for 8.3.0-beta2

* chore: update index file for release notes

* chore: Add link for 8.2.5

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
(cherry picked from commit 2b6c03714c)
2021-11-26 12:00:07 +01:00
Grot (@grafanabot)
df959ea102 PanelEdit: Query now correctly initializes data source (#42291) (#42347)
(cherry picked from commit 0516ad822b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-26 10:59:06 +01:00
Grot (@grafanabot)
934c446bf4 DashboardExport: Correctly templetatize datasource prop now that is's a ref obj (#42305) (#42345)
(cherry picked from commit 1e1403fad1)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-26 10:29:16 +01:00
Grot (@grafanabot)
2504f5f719 E2E: fix verify release script after split (#42341) (#42342)
(cherry picked from commit b164ce0c9b)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-11-26 09:05:22 +01:00
Marcus Efraimsson
8d74cc3576 Chore: Temporary set backend test timeout to 30 min (#42321) 2021-11-25 16:56:26 +01:00
Grot (@grafanabot)
492575a169 Release: Bump version to 8.3.0-beta.2 (#42297)
* "Release: Updated versions in package to 8.3.0-beta.2"

* Update yarn.lock

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-11-25 14:43:19 +01:00
Dimitris Sotirakis
654abf9f7f E2E: Fix running any suite locally (#42210) (#42243)
Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-25 14:25:56 +01:00
Grot (@grafanabot)
2616882005 Serviceaccounts: Filtering service accounts from user queries (#41410) (#42287)
* Add extra fields to OSS types to support enterprise

* WIP service accounts

* Update public/app/features/api-keys/ApiKeysForm.tsx

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

* Create a service account at the same time as the API key

* Use service account credentials when accessing API with APIkey

* Throw better error

* Use Boolean for "create service account button"

* Add GetRole to service, merge RoleDTO and Role structs

This patch merges the identical OSS and Enterprise data structures, which improves the code for two reasons:

1.  Makes switching between OSS and Enterprise easier
2.  Reduces the chance of incompatibilities developing between the same functions in OSS and Enterprise

* Start work cloning permissions onto service account

* If API key is not linked to a service account, continue login as usual

* Fallback to old auth if no service account linked to key

* Commented

* Add CloneUserToServiceAccount

* Update mock.go

* Put graphical bits behind a feature toggle

* Start adding LinkAPIKeyToServiceAccount

* Update pkg/models/user.go

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Update pkg/api/apikey.go

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Update pkg/api/apikey.go

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>

* Finish LinkAPIKeyToServiceAccount

* Update comment

* Handle api key link error

* Update pkg/services/sqlstore/apikey.go

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>

* Feature toggle

* Update pkg/services/accesscontrol/accesscontrol.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* Not needed (yet)

* Better error messages for OSS accesscontrol

* Set an invalid user id as default

* ServiceAccountId should be string

* Re-arrange field names

* ServiceAccountId is integer

* Update ossaccesscontrol.go

* Linter

* Remove fronend edits

* Remove console log

* Update ApiKeysForm.tsx

* feat: add serviceaccount deletion

* feat: make sure we do not accidently delete serviceaccount

* feat: ServiceAccount Type

* refactor: userDeletions function

* refactor: serviceaccount deletions\

* refactor: error name and removed attribute for userDeletecommand

* refactor:: remove serviceaccount type for now

* WIP

* add mocked function

* Remove unnecessary db query, move to right place

* Update pkg/services/accesscontrol/mock/mock.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update pkg/services/accesscontrol/mock/mock.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Update pkg/services/accesscontrol/mock/mock.go

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>

* Better error messages

* Better and correcter error messages

* add mocked function

* refactor: move function call, add error msg

* add IsServiceAccount and fix table

* add service accounts package

* WIP

* WIP

* working serviceaccountsapi registration

* WIP tests

* test

* test working

* test running for service

* moved the error out of the models package

* fixed own review

* linting errors

* Update pkg/services/serviceaccounts/database/database.go

Co-authored-by: Jeremy Price <Jeremy.price@grafana.com>

* tests running for api

* WIP

* WIP

* removed unused secrets background svc

* removed background svc for serviceaccount infavor or wire.go

* serviceaccounts manager tests

* wip

* Filtering service accounts from the user queries in frontend

* clean up

* Update pkg/services/sqlstore/org_test.go

* methods on same type should have same receiver

* _ unused variable and comment

* add additional join for results query

* remove unused code

* remove error fmt

* refactor: change to only have false

* no new variable to the left hand side

* refactor: create serviceaccount cmd

* dialect fix

Co-authored-by: Jeremy Price <jeremy.price@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
(cherry picked from commit 9c11040c3e)

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2021-11-25 12:42:57 +01:00
Grot (@grafanabot)
2742a461f3 Plugins: remove deprecated code (components) (#41686) (#42286)
* refactor(plugins): use routes specific to the new plugins/admin

* refactor(plugins): remove unused pages (PluginList, PluginItem)

* refactor(plugins): remove PluginPage

* refactor(plugins): remove UpdatePluginModal

* refactor(plugins): move AppConfigWrapper under plugins/admin

* refactor(plugins): move PluginDashboards under plugins/admin

* refactor(plugins): rename the "specs" folder to "tests"

* refactor(plugins): move test files to /tests folder

* refactor(plugins): move AppRootPage into a /components folder

* refactor(plugins): move PluginsErrorsInfo into a /plugins folder

* refactor(plugins): move PluginSettingsCache into a /components folder

* refactor(plugins): move PluginStateInfo into a /plugins folder

* refactor(plugins): move AppRootPage.test.tsx next to the tested component

* refactor(plugins): remove old snapshot tests

* fix(plugins): fix tests

* refactor(plugins/admin): move & rename PluginSettingsCache

* fix(plugins): fix a few rebase issues

* Plugins: remove deprecated code (state handling) (#41739)

* refactor(plugins): use the plugins/admin reducer only

* refactor(plugins): remove tests for the deprecated plugins reducer

* refactor(plugins): remove tests for the deprecated plugins selectors

* refactor(plugins/state): add a short comment note to selectors

* feat(plugins/state): add a selector for selecting errors

* feat(plugins/state): add a hook for getting plugin errors

* refactor(plugins): udpate the PluginsErrorsInfo component to use the new state selectors

* refactor(plugins/state): remove the old (deprecated) selectors

* refactor(plugins/state): use the new actions under /admin

* refactor(plugins/state): remove old (deprecated) reducers and actions

* refactor(plugins): update component definition

* fix(plugins): remove unnecessary {children} prop for PluginsErrorsInfo

* Plugins: show / hide install controls based on the `pluginAdminEnabled` flag (#41749)

* docs(plugins): update documentation for the `plugin_admin_enabled` flag

* refactor(InstallControls): move the main component to a named module

* feat(plugins): use the `pluginAdminEnable` flag to hide / show install controls in the UI

* test(plugins): add tests for enabling/disabling install controls

(cherry picked from commit 35c2c95fdc)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2021-11-25 12:40:06 +01:00
Grot (@grafanabot)
37f5946b8b Alerting: Create DatasourceError alert if evaluation returns error (#41869) (#42281)
* Alerting: Create DatasourceError alert if evaluation returns error

* Alerting: Add docs for DatasourceError alert

* Alerting: Fix DatasourceError alert does not have dashboard_uid label

* Alerting: Add break when datasource_uid found

* Alerting: Update TestProcessEvalResults

(cherry picked from commit 1b26d4d88e)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2021-11-25 12:17:21 +01:00
Grot (@grafanabot)
085d67f82d Handle request service account when not enabled (#42122) (#42201)
* Handle request service account when not enabled

(cherry picked from commit a145ec37bb)

Co-authored-by: Jeremy Price <Jeremy.price@grafana.com>
2021-11-25 11:57:30 +01:00
Grot (@grafanabot)
8c4ee0cfdd Alerting: Check for nil model.Settings and models.SecureSettings (#37738) (#42059)
(cherry picked from commit 9122e7f647)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2021-11-25 11:56:21 +01:00
Grot (@grafanabot)
8a2744440e Elasticsearch: omit query_string filter when no lucene query is provided (#42060) (#42232)
* Elasticsearch: omit query_string filter when no query is provided

* Fix tests

* optional lucene query

* improve test and types

(cherry picked from commit 2346d5a3f3)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-11-25 11:49:23 +01:00
Grot (@grafanabot)
897af93f5a Catalog: Provide default tab fallback in Plugin Details page (#41979) (#42139)
* feat(catalog): introduce defaultTab to usePluginDetailsTabs hook

* feat(catalog): use defaultTab as fallback tab for PluginDetails

* chore(catalog): remove hardcoded page query param in list items

* refactor(catalog): prefer let over react ref when setting default tab in PluginDetails

* refactor(catalog): pass pageId to plugin details body rather than duplicate logic

* test(catalog): remove query param from List item test hrefs

* test(catalog): introduce a test for default app config page for installed app plugins

(cherry picked from commit 694600ed04)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-11-25 11:29:44 +01:00
Grot (@grafanabot)
0d8d861b5b VisualizationSuggestions: Support image & text instead of real previews. Adds suggestions for all non data panels when there are no data (#42074) (#42280)
* Make suggestion cards support img & text mode instead of only preview

* Generic solution for non data panels

* minor review tweaks

(cherry picked from commit 781067ee45)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-25 11:25:36 +01:00
Grot (@grafanabot)
5bf9a6f649 pally-ci: Ignore version update element (#42249) (#42279)
* pa11y-ci: Ignore update version element

* Add hideElements to pa11yci-pr.conf.js

(cherry picked from commit a897154017)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-25 11:12:32 +01:00
Grot (@grafanabot)
58605aa8de CodeEditor: Prevent suggestions from being clipped (#42120) (#42129)
Closes #40792

Co-authored-by: Josh Hunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
(cherry picked from commit e3ef82203e)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-11-25 11:06:14 +01:00
Grot (@grafanabot)
fb3302351c Alerting: Add docs for DatasourceNoData alert (#42265) (#42278)
(cherry picked from commit 2863af3bc3)

Co-authored-by: George Robinson <george.robinson@grafana.com>
2021-11-25 10:59:52 +01:00
Grot (@grafanabot)
049351ec5d annotations editor menu should not appear if annotations are disabled (#42068) (#42128)
(cherry picked from commit 410044fa05)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
2021-11-25 10:55:28 +01:00
Grot (@grafanabot)
03cd416d9e PanelEditor: Present actionable suggestions when panel cannot visualize current data (#42083) (#42271)
* PanelDataError: Show actions when current panel cannot visualize data

* Fixed so that suggestions tab is opened from action

* Cleanup

* Fixed tests

* Fix tests

* Fixing tests

* Fixed ts issues

(cherry picked from commit 070344943c)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-25 10:51:08 +01:00
Grot (@grafanabot)
d5600b5854 Candlestick: Fixes typescript issue in tests (#42274) (#42275)
(cherry picked from commit 75fb1f8be6)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-25 10:47:44 +01:00
Grot (@grafanabot)
bbfd4c7406 ReleaseNotes: Updated changelog and release notes for 8.3.0-beta1 (#42044) (#42117)
(cherry picked from commit f186575693)
2021-11-25 10:36:41 +01:00
Grot (@grafanabot)
d91b6f9c67 Chore: Fix pass context for SetAlertStateCommand (#42135) (#42146)
* fix pass ctx for SetAlertStateCommand

* fix integration test

(cherry picked from commit 96b1776856)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2021-11-25 10:32:52 +01:00
Grot (@grafanabot)
53140c5b50 Table: Add space between values for the DefaultCell (#42246) (#42276)
fixes #42024

(cherry picked from commit 86a22a914d)

Co-authored-by: Derik Evangelista <derik.evangelista@grafana.com>
2021-11-25 10:27:50 +01:00
Grot (@grafanabot)
4f45b44a71 E2E: Skip running import dashboard test (#42270) (#42272)
(cherry picked from commit 12d2b9e997)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-25 10:06:10 +01:00
Grot (@grafanabot)
aab276315e fix small typo in UI display language (#42264) (#42273)
Co-authored-by: Clarity-89 <homes89@ukr.net>
(cherry picked from commit e447d5a53e)

Co-authored-by: matt abrams <37156449+zuchka@users.noreply.github.com>
2021-11-25 10:03:34 +01:00
Grot (@grafanabot)
5477b25488 Disable only built-in role selector for external users (#42197) (#42236)
(cherry picked from commit 177a0d69d1)

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2021-11-25 11:17:41 +03:00
Grot (@grafanabot)
3e437fb3be [Docs] Document FGAC user role assignment (#41797) (#42263)
(cherry picked from commit 5043448769)

Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2021-11-24 23:06:28 +01:00
Grot (@grafanabot)
5412a903b1 Alerting: Make Unified Alerting enabled by default for those who do not use legacy alerting (#42200) (#42259)
* update AlertingEnabled and UnifiedAlertingSettings.Enabled to be pointers
* add a pseudo migration to fix the AlertingEnabled and UnifiedAlertingSettings.Enabled if the latter is not defined
* update the default configuration file to make default value for both 'enabled' flags be undefined

Misc
* update Migrator to expose DB engine. This is needed for a ualert migration to access the database while the list of migrations is created.
* add more verbose failure when migrations do not match

Co-authored-by: gotjosh <josue@grafana.com>
Co-authored-by: Yuriy Tseretyan <yuriy.tseretyan@grafana.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
(cherry picked from commit 6523486122)
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
2021-11-24 22:16:03 +01:00
Grot (@grafanabot)
26b0ee5dcb Docs: Update the coverage of fine-grained access control (#41398) (#42261)
* Docs: Update the coverage of fine-grained access control
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: Vardan Torosyan <vardants@gmail.com>
2021-11-24 22:10:25 +01:00
Grot (@grafanabot)
71255a387c Docs: Whats new 8.3 - Preliminary (#41930) (#42076)
* Initial placeholder docs for candlestick panel

* Initial What's new for 8.3

* Delete candlestick.md

Removing this file as it's part of another branch/pr

* Oops forgot to hit save in VSCODE. Rookie mistake

(cherry picked from commit 3340d7ad44)

Co-authored-by: Petros Kolyvas <code@petros.io>
2021-11-24 21:56:34 +01:00
Grot (@grafanabot)
5d382b60c3 Add concept about Grafana and Grafana Enterprise database encryption (#41853) (#42260)
* Add concept about Grafana database encryption.
* Add database encryption information for Enterprise.

(cherry picked from commit 59b0f534c5)

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-11-24 21:31:41 +01:00
Grot (@grafanabot)
3fb72ba295 Add Azure Key Vault documentation. (#42257) (#42258)
(cherry picked from commit 1c261aea8e)

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-11-24 21:03:22 +01:00
Grot (@grafanabot)
5bfe95499e Graphite: Limit number of suggestions displayed in Graphite drop downs (#42056) (#42231)
* Limit number of suggestions displayed in Graphite dropdowns

* Use limit API to reduce number of loaded tags for autocomplete

* Make tests more explicit

(cherry picked from commit 8725d3d7e0)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-11-24 20:51:16 +01:00
Grot (@grafanabot)
0b0962ea13 Logs: Cancel log volume query when the main query is canceled (#41856) (#42239)
* Cancel log volume query when the main query is canceled

* Test keeping complete log volume data when main query is canceled

(cherry picked from commit 4e35d35e67)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-11-24 20:40:47 +01:00
Grot (@grafanabot)
c648189d87 Candlestick: fix auto field mapping & includeAllFields (#42020) (#42256)
(cherry picked from commit 24053d83d3)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-24 13:26:19 -06:00
Grot (@grafanabot)
6c8d6a1bbb Alerting: Move Alert Groups tab to end of tabs (#42241) (#42250)
* move alertgroups tab to end of tabs

* more reorder

(cherry picked from commit a5436b4435)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-11-24 19:53:53 +01:00
Grot (@grafanabot)
38a93f1a97 Document KMS integration part 1 (#41864) (#42251)
Co-authored-by: Tania B. <yalyna.ts@gmail.com>
(cherry picked from commit 782d5a27fd)

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
2021-11-24 19:27:49 +01:00
Grot (@grafanabot)
97397fb8f9 Azure Monitor: Fastpass Fixes -- Add trap focus for modals in grafana/ui and other small a11y fixes for Azure Monitor. (#41449) (#42248)
(cherry picked from commit fc8d93e231)

Co-authored-by: Sarah Zinger <sarahzinger@users.noreply.github.com>
2021-11-24 12:34:24 -05:00
Grot (@grafanabot)
527de60b71 Dashboard: Fix cache timeout persistence (#42204) (#42225)
* user essentials mob! 🔱

* user essentials mob! 🔱

* user essentials mob! 🔱

* WIP: Mob session work 🚧🔱

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: joshhunt <josh@trtr.co>
Co-authored-by: kay delaney <kay@grafana.com>
(cherry picked from commit 67a1052334)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-11-24 14:50:51 +00:00
Zoltán Bedi
4aa8740595 grafana/ui: Export types and utils required by grafana/experimental (#42133) (#42220)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
(cherry picked from commit d2d38c978f)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-11-24 15:45:56 +01:00
Dimitris Sotirakis
e8c9179f1a [v8.3.x] CI: Run e2e tests in parallel using multiple suites (#41748) (#42215)
* CI: Run e2e tests in parallel using multiple suites (#41748)

* Add missing slash
2021-11-24 15:42:54 +01:00
Grot (@grafanabot)
5c3dfaa1bc Grafana UI: Prevent mandatory css prop in bundled types (#42216) (#42227)
(cherry picked from commit b8c5ac63b1)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
2021-11-24 15:00:06 +01:00
Grot (@grafanabot)
fa19fa298d grafana/ui: Expose ButtonProps type (#42221) (#42226)
(cherry picked from commit 2dc30dff63)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-11-24 14:52:15 +01:00
Grot (@grafanabot)
01a53c349a Graphite: Run onChange/onRunQuery after reducer action finishes (#42136) (#42224)
(cherry picked from commit b3e417f768)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-11-24 14:37:24 +01:00
Grot (@grafanabot)
dfdb745e36 Encryption: Cleanup and add logging (#42084) (#42223)
* Encryption: Add more logs

* Add logging and checks

* Removed unused methods from secrets service

* Refactor and update tests

* Address review feedback

(cherry picked from commit 4014891971)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2021-11-24 14:22:04 +01:00
Grot (@grafanabot)
f59b10384b Jaeger: Make tags templateable (#42005) (#42206)
* make tags templateable

* cleanup files I didn't want to modify

(cherry picked from commit 8b95746f63)

Co-authored-by: Stephanie Closson <srclosson@gmail.com>
2021-11-24 06:21:31 -07:00
Grot (@grafanabot)
c1afc4deac Explore: query history: fix error when removing last item (#42179) (#42222)
* explore: rich-history: fix data inconsistency

* also handle starred-queries tab

(cherry picked from commit 06e474dfd5)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-24 14:15:29 +01:00
Grot (@grafanabot)
2e2e6c4920 Table: add space between values on JSONViewCell (#42156) (#42214)
fixes #42024

(cherry picked from commit 3110a9c238)

Co-authored-by: Derik Evangelista <derik.evangelista@grafana.com>
2021-11-24 12:20:20 +00:00
Grot (@grafanabot)
5ab8b3a765 Logs: Fix requesting of older logs when flipped order (#41966) (#42111)
* Logs: Fix requesting of older logs wehn flipped order

* Fix index change when requesting logs

(cherry picked from commit d7e4f303c4)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Ivana <ivana.huckova@gmail.com>
2021-11-24 13:14:51 +01:00
Grot (@grafanabot)
1a80ea3b05 Loki: Rename the hint header (#42205) (#42212)
X-Query-Tag -> X-Query-Tags (https://github.com/grafana/grafana/pull/42108#discussion_r755776672)

(cherry picked from commit 10f844e3ad)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-11-24 13:06:48 +01:00
Grot (@grafanabot)
df6223024f Prometheus: Fix running of health check query based on access mode (#42189) (#42213)
* Prometheus: Use this.query for health check

* Update alertMessage in e2e tests

(cherry picked from commit 1b4f6b19cb)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-11-24 13:04:44 +01:00
Grot (@grafanabot)
0baba05ed5 CloudWatch: Add missing AWS/Events metrics. (#42164) (#42198)
* Add missing InvocationsFailedToBeSentToDlq metric.

* Add missing InvocationsSentToDlq metric.

(cherry picked from commit eaf46600c4)

Co-authored-by: n2N8Z <n2N8Z@outlook.com>
2021-11-24 11:56:26 +01:00
Grot (@grafanabot)
5e74062b4b TextPanel: Fix suggestions for existing panels (#42195) (#42196)
Closes #42118

Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Josh Hunt <josh@trtr.co>
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Co-authored-by: Hugo Häggmark <hugo.haggmark@gmail.com>
(cherry picked from commit df22828d7d)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-11-24 11:40:04 +01:00
Alexander Emelin
61df5b04b3 [v8.3.x] up plugin sdk to v0.118.0 (#42167) (#42184)
(cherry picked from commit 7b95c86821)
2021-11-24 13:30:12 +03:00
Grot (@grafanabot)
2f262db612 AccessControl: Document orgs roles and orgs endpoints (#42171) (#42183)
* AccessControl: Document `orgs` roles and `orgs` endpoints

* Use maintainer instead of manager

(cherry picked from commit a93e649af5)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-11-24 11:09:22 +01:00
Grot (@grafanabot)
dcbf9ba7af AccessControl: Renamed orgs roles, removed fixed:orgs:reader introduced in beta1 (#42049) (#42182)
* AccessControl: Rework Orgs roles

* Increase version for name migration

* Update pkg/api/roles.go

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>

* Use maintainer instead of manager

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

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-11-24 11:09:06 +01:00
Grot (@grafanabot)
4319a934e9 Tracing: Show start time of trace with milliseconds precision (#42132) (#42138)
* Tracing header: Add setting to show start time with ms

* Add test

* Update test

(cherry picked from commit aefb2659ec)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-11-24 11:08:35 +01:00
Grot (@grafanabot)
ad308524bc Alerting: Document Alertmanager/Prometheus versions we support (#42160) (#42161)
* Alerting: Document Prometheus/Alertmanagers versions we support

* Illustrate with an example

(cherry picked from commit a5b29aed29)

Co-authored-by: gotjosh <josue@grafana.com>
2021-11-24 10:44:03 +01:00
Grot (@grafanabot)
f9acdff906 Loki: Pass log volume hint as a request header (#42108) (#42119)
(cherry picked from commit 4db4dc2ce9)

Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
2021-11-24 09:01:26 +01:00
Grot (@grafanabot)
d637d5d746 A11y/DashList: Make star button tab-navigable (#41479) (#42064)
(cherry picked from commit 47a7477cff)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2021-11-24 09:13:50 +02:00
idafurjes
33ebb859bd Bump grabpl version to 2.7.1 (#42089) (#42154)
(cherry picked from commit 5ac1dc1008)
2021-11-23 23:33:23 +01:00
Grot (@grafanabot)
f169300669 Encryption: Add settings to ini files (#42057) (#42166)
* Encryption: Add settings to ini files

* Rename a setting

(cherry picked from commit 3af36b7e23)

Co-authored-by: Tania B <yalyna.ts@gmail.com>
2021-11-23 22:14:42 +02:00
Grot (@grafanabot)
45eb4a0adf Alerting: validate mute timings in the alertmanager configuration (#42125) (#42144)
* Alerting: check for uniqueness of mutetime names

* add some testing

* add name validation

* add root route validation

* add tests for validation

* add check for root route mute_time_intervals

* add duplicate test

* remove useless yaml test

* refactor table test

(cherry picked from commit cec2d965ec)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
2021-11-23 19:40:27 +01:00
Grot (@grafanabot)
772ef1626f fix: use better type assertion for initialAsyncRequestState (#42087) (#42137)
(cherry picked from commit ca7a62682e)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2021-11-23 19:28:15 +01:00
Grot (@grafanabot)
33c6628c6a Timeseries Panel: render threshold at either top or bottom of graph when it is out… (#41649) (#42143)
(cherry picked from commit 3e16abc939)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2021-11-23 19:06:49 +01:00
Grot (@grafanabot)
1b14ed6e2a Docs: update auditing documentation with new logs (#41722) (#42158)
* Add detailed info on audit log contents

* Apply suggestions from code review

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>

* Docs: update auditing documentation with new logs

* add back remove datasource permission

* improve formatting

* fix incorrect action

* clean formatting

* formatting

Co-authored-by: Jesse Weaver <jesse.weaver@grafana.com>
Co-authored-by: Jesse Weaver <pianohacker@gmail.com>
(cherry picked from commit 934e4ad3af)

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
2021-11-23 18:35:13 +01:00
Grot (@grafanabot)
e741cef8be Update .pa11yci-pr.conf.js (#42148) (#42153)
(cherry picked from commit 993025c478)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-23 18:06:50 +01:00
Dimitris Sotirakis
67b8ea6df2 CI: Remove Linux grabpl step dependency from Windows builds (#42069) (#42112) 2021-11-23 12:26:03 +01:00
Grot (@grafanabot)
e85d45b0c2 Removed packahes_api relrefs. (#42017) (#42101)
(cherry picked from commit c4b21f7b51)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-22 17:23:07 -05:00
Grot (@grafanabot)
85ab6d10bf Access control: use delegatable flag to check if role can be granted (#42070) (#42082)
* Access control: use delegatable flag to check if role can be granted or not

* Fix naming

(cherry picked from commit da2c99a2e1)

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2021-11-22 16:05:24 +01:00
Grot (@grafanabot)
5d4d5bf296 Elasticsearch: Display custom values in version select (#42051) (#42081)
* Elasticsearch: Display custom values in version select

* Update public/app/plugins/datasource/elasticsearch/configuration/ElasticDetails.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 e7e5c54148)

Co-authored-by: Giordano Ricci <me@giordanoricci.com>
2021-11-22 15:34:37 +01:00
Grot (@grafanabot)
0f426e7a8c Role picker: extend width to prevent menu being out of page (#42047) (#42072)
(cherry picked from commit 6f8cfc6def)

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2021-11-22 14:54:48 +01:00
Dimitris Sotirakis
80945956aa Dockerfile: Bump Go and Alpine versions (#42063)
Co-authored-by: Dave Henderson <dhenderson@gmail.com>
2021-11-22 14:53:48 +01:00
Grot (@grafanabot)
8608a1f9c3 Tracing: Fix incorrect indentations due to reoccurring spanIDs (#41919) (#42066)
* Create unique keys for trace rows

* Add tests

* Fix tests

* Update public/app/features/explore/TraceView/TraceView.test.tsx

* Trigger Build

(cherry picked from commit d4ddd2373b)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-11-22 13:41:51 +01:00
Grot (@grafanabot)
9ef25eced1 Add deployment_tools_config.json to git and eslint ignore (#42053) (#42058)
(cherry picked from commit 15a603dae0)
(cherry picked from commit 4b2c90b834)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-11-22 12:57:36 +01:00
Grot (@grafanabot)
27d61b524a Tracing: Make query editors available in dashboard for Tempo and Zipkin (#41974) (#42055)
* Tempo: Set query editor

* Zipkin: Set query editor

* Set metrics to true so the data source as shown in dashboard data source list

(cherry picked from commit 9efd85a241)

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
2021-11-22 12:27:43 +01:00
Grot (@grafanabot)
f9fb2a4e59 Select: Select menus now properly scroll during keyboard navigation (#41917) (#42054)
* Select: Select menus now properly scroll when navigating with the keyboard

* Remove this unnecessary children declaration in the interface

* Guard this with an if statement to avoid the nullish coalescing

* Don't need the optional chaining if we're guarding with an if

(cherry picked from commit b6b75e919b)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2021-11-22 12:19:46 +01:00
Grot (@grafanabot)
a69b3ea212 Alerting: Add value to notifier template (#41951) (#42028)
* add value to email template

* add value to default template

* update test string

* test: fix ngalert test suite

* test: run CI

Co-authored-by: gillesdemey <gilles.de.mey@gmail.com>
(cherry picked from commit 97978a7c02)

Co-authored-by: Peter Holmberg <peterholmberg@users.noreply.github.com>
2021-11-22 10:51:06 +01:00
Grot (@grafanabot)
57ad07ae76 PanelEdit: Always show delete icon button for overrides, even when collapsed (#42029) (#42034)
(cherry picked from commit 942920cb36)

Co-authored-by: Torkel Ödegaard <torkel@grafana.org>
2021-11-22 10:20:26 +01:00
Dimitris Sotirakis
c782f3031a Make integration tests depend on initialize for enterprise-release-* branches (#42004) (#42027) 2021-11-22 08:48:35 +01:00
Grot (@grafanabot)
56693672ad Access control: Fix permission required to invite users (prevent access error) (#41943) (#42026)
* Fix permission required to invite users (prevent access error)

* Use hasAccess method with fallback

* Fix tests

(cherry picked from commit 6c3c82d132)

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2021-11-22 08:06:21 +01:00
Grot (@grafanabot)
fcd0c382b6 Variables: Make renamed or missing variable section expandable (#41964) (#42025)
* Variables: Make renamed or missing variable section expandable

* Chore: feedback after PR comments

(cherry picked from commit 44d7d6546f)

Co-authored-by: Hugo Häggmark <hugo.haggmark@grafana.com>
2021-11-22 08:04:34 +01:00
Grot (@grafanabot)
272f850fb2 Candlestick: exclude unmapped fields by default (#42011) (#42018)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit 403222e14e)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-11-20 02:00:14 +01:00
Grot (@grafanabot)
e36664bae8 TimeSeries: fix fillBelowTo wrongly affecting fills of unrelated series (#41998) (#42014)
(cherry picked from commit 07a440fd3a)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-19 15:52:26 -06:00
Grot (@grafanabot)
69c1626f8f Recorded Queries: Split extension reducers init and extension init (#41850) (#42016)
(cherry picked from commit cc471f2d58)

Co-authored-by: Todd Treece <360020+toddtreece@users.noreply.github.com>
2021-11-19 22:45:31 +01:00
achatterjee-grafana
3d5adeb620 Docs manual backport of 42006 (#42012)
* updated image name (fixed typo), removed redundant image and resized images. (#41999)

* Corrected the path. (#42006)
2021-11-19 16:08:50 -05:00
Grot (@grafanabot)
339fc9f15a updated image name (fixed typo), removed redundant image and resized images. (#41999) (#42003)
(cherry picked from commit e0db19e741)

Co-authored-by: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com>
2021-11-19 13:46:44 -05:00
Grot (@grafanabot)
a9da6b8175 ExtractFields: properly detect value types from extracted fields (#41995) (#42001)
(cherry picked from commit 82cf49143d)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-11-19 19:10:23 +01:00
Grot (@grafanabot)
3d4a5ce8fa Alerting: support mute timings configuration through the api for the embedded alertmanager (#41533) (#41990)
* Alerting: accept mute_timing_intervals through the api for the embedded alertmanager

* add workaround for mutetimeinterval

* add mute timings to routes

* revert changes

* Update pkg/services/ngalert/api/api_alertmanager.go

* Update pkg/services/ngalert/api/api_alertmanager.go

* Update pkg/services/ngalert/api/api_alertmanager.go

* update prometheus/alertmanager dependency

* add some var docs

(cherry picked from commit b9cdad3814)

Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
2021-11-19 17:17:08 +01:00
Grot (@grafanabot)
66a91bb55b docs: improved deprecation-info for elasticsearch and influxdb (#41981) (#41986)
(cherry picked from commit 91f9284e9d)

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-19 16:16:59 +01:00
Grot (@grafanabot)
4ab201e4b5 show admin nav link it the user only has permissions to view licensing and not other pages under admin node (#41948) (#41956)
(cherry picked from commit 03b7a55242)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2021-11-19 14:49:25 +00:00
Grot (@grafanabot)
984e477d00 Docs: add easier to find deprecation notices to certain data sources and to the changelog (#41938) (#41980)
* docs: add easier to find deprecation-info

* better indentation in the docs

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

* better indentation in the docs

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

* prettier fixes

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

Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
2021-11-19 15:41:49 +01:00
Grot (@grafanabot)
782d661710 refactor: fix displayname and description for serviceaccount role (#41946) (#41962)
* refactor: fix displayname and description for serviceaccount role

* add: ActionWrite, ActionCreate

* refactor: update description

(cherry picked from commit 253da4a936)

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2021-11-19 14:09:16 +00:00
Dimitris Sotirakis
5e0900609b Refactor drone yaml (#41969) 2021-11-19 14:46:00 +01:00
Grot (@grafanabot)
b6efbd6b28 ThresholdControls: Use correct scale key when calculating handle position (#41942) (#41971)
(cherry picked from commit 67f43cd7ab)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2021-11-19 14:26:14 +01:00
Grot (@grafanabot)
9027846b91 JWT: Split race-y test into two stable tests (#41950) (#41957)
(cherry picked from commit 12e0a94316)

Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
2021-11-19 12:30:01 +01:00
Grot (@grafanabot)
3dd2abbda7 Alerting: increase timeout for silences tests (#41918) (#41958)
(cherry picked from commit 81155e2d55)

Co-authored-by: Nathan Rodman <nathanrodman@gmail.com>
2021-11-19 12:28:46 +01:00
Grot (@grafanabot)
81043a763e Fix loop when cannot fetch roles (#41901) (#41945)
(cherry picked from commit d66158a042)

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
2021-11-19 14:05:43 +03:00
Grot (@grafanabot)
0838146d16 AzureMonitor: Fix metric namespace clear (#41878) (#41944)
(cherry picked from commit c5241731de)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-11-19 10:38:20 +01:00
Grot (@grafanabot)
ed00b3cf50 Access Control: use role groups in role picker (#41912) (#41941)
* use role groups in role picker UI

* Update public/app/core/components/RolePicker/RolePickerMenu.tsx

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
(cherry picked from commit 11f133b406)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2021-11-19 10:15:07 +01:00
Grot (@grafanabot)
8cfc96fa61 AccessControl: RolePicker fetch roles in org (#41927) (#41940)
(cherry picked from commit da5327ea14)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-11-19 10:08:53 +01:00
Grot (@grafanabot)
bc1aa104a2 add unsupported renderer message to catalog (#41898) (#41939) 2021-11-19 10:07:57 +01:00
Grot (@grafanabot)
f8ab11bd11 Docs: Add configuration option for the image renderer (#41798) (#41916)
* 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:19:37 +01:00
Grot (@grafanabot)
c708c92593 AccessControl: FGAC permissions for orgs endpoint on frontend (#41050) (#41928)
* AccessControl: FGAC permissions for orgs endpoint on frontend

Protect org update endpoints

add or refactor missing right messages

cover org page

* removing scopes from orgs

* Perform permission control with global org

* Perform the error handling in case of 403

* Simplify frontend code by requiring read access for sure

* Remove roles I added to decrease the number of changes

* Remove the check for server admin to reduce the number of changes

* change error message

* Cleaning todos

* Remove unecessary changes

* Fix tests

* Update test snapshot

* Update pkg/api/roles.go

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

* Update public/app/features/admin/AdminEditOrgPage.tsx

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

* Format AdminEditOrgPage for linting

* Update public/app/features/admin/AdminEditOrgPage.tsx

Co-authored-by: Vardan Torosyan <vardants@gmail.com>

* Update public/app/features/admin/AdminEditOrgPage.tsx

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Update public/app/features/admin/AdminListOrgsPage.tsx

Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>

* Commit suggestions

* Commit suggestion canRead canWrite

* fix typo

Co-authored-by: Ursula Kallio <73951760+osg-grafana@users.noreply.github.com>
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
(cherry picked from commit 0ee0a0b7a0)

Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
2021-11-19 09:12:13 +01:00
Grot (@grafanabot)
cdd89d2945 Transformers: extract fields from JSON and text (alpha) (#41791) (#41936)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit a6e60c62f4)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
2021-11-19 07:19:21 +01:00
Grot (@grafanabot)
fd81b1a9e4 Candlestick: fix volume histogram height by using mapped field name (#41931) (#41934)
(cherry picked from commit 17c2f52dcf)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2021-11-19 03:50:51 +01:00
Grot (@grafanabot)
94023f10a3 Make initialize depend on clone, only on enterprise pipelines (#41909) (#41910)
(cherry picked from commit 7dcc5ca199)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-11-18 18:11:43 +02:00
Grot (@grafanabot)
a6ce53136c Run integration tests after initialize (#41906) (#41908)
(cherry picked from commit e8a2a82d5c)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-11-18 18:00:35 +02:00
Grot (@grafanabot)
b4b13f8113 Disable lint-drone from release pipelines (#41899) (#41900)
(cherry picked from commit 53dc388dcf)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-11-18 17:34:13 +02:00
Grot (@grafanabot)
591d789f38 Azure Monitor: Clean up fields when editing Metrics (#41762) (#41891)
(cherry picked from commit f8192bf428)

Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
2021-11-18 16:05:29 +01:00
Grot (@grafanabot)
fe082e2210 Update grabpl version to 2.6.1 (#41892) (#41896)
(cherry picked from commit c82a15eafb)

Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
2021-11-18 16:01:05 +01:00
Grot (@grafanabot)
3140f630c1 ReleaseNotes: Updated changelog and release notes for 8.2.5 (#41886) (#41887)
(cherry picked from commit daa3cb831d)
2021-11-18 15:02:10 +01:00
Zoltán Bedi
b7b5a59437 Update yarn.lock after version bump (#41884) 2021-11-18 14:57:58 +01:00
Grot (@grafanabot)
64c575c115 "Release: Updated versions in package to 8.3.0-beta.1" (#41877) 2021-11-18 13:59:05 +01:00
1251 changed files with 30305 additions and 16107 deletions

View File

@@ -1,11 +0,0 @@
version: 2.1
jobs:
build:
docker:
- image: alpine:3.7
steps:
- run:
name: The First Step
command: |
echo 'Fake step!'

View File

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

4766
.drone.yml

File diff suppressed because it is too large Load Diff

View File

@@ -6,4 +6,6 @@ devenv
data
dist
e2e/tmp
scripts/grafana-server/tmp
public/lib/monaco
deployment_tools_config.json

2
.github/CODEOWNERS vendored
View File

@@ -83,7 +83,7 @@ go.sum @grafana/backend-platform
/packages/grafana-ui/src/utils/storybook @grafana/plugins-platform-frontend
/packages/jaeger-ui-components/ @grafana/observability-squad
/plugins-bundled @grafana/plugins-platform-frontend
/public @grafana/user-essentials
# public folder
/public/app/core/components/TimePicker @grafana/grafana-bi-squad
/public/app/features/canvas/ @grafana/grafana-edge-squad
/public/app/features/dimensions/ @grafana/grafana-edge-squad

View File

@@ -4,7 +4,9 @@ on:
inputs:
version:
required: true
default: '7.x.x'
default: '8.x.x'
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
jobs:
main:
runs-on: ubuntu-latest
@@ -33,12 +35,6 @@ jobs:
echo "::set-output name=branch_name::v${{steps.regex-match.outputs.group1}}"
echo "::set-output name=branch_exist::$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)"
- name: Check input version is aligned with branch(not main)
if: steps.intermedia.outputs.branch_exist != '0' && !contains(steps.intermedia.outputs.short_ref, steps.intermedia.outputs.branch_name)
run: |
echo " You need to run the workflow on branch v${{steps.regex-match.outputs.group1}}.x
exit 1
- name: Check input version is aligned with branch(main)
if: steps.intermedia.outputs.branch_exist == '0' && !contains(steps.intermedia.outputs.short_ref, 'main')
run: |
@@ -55,7 +51,7 @@ jobs:
ref: main
- uses: actions/setup-node@v2.4.1
with:
node-version: '14'
node-version: '16'
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run bump version

View File

@@ -0,0 +1,30 @@
name: "publish-technical-documentation-next"
on:
push:
branches:
- "main"
paths:
- "docs/sources/**"
workflow_dispatch:
jobs:
sync:
if: "github.repository == 'grafana/grafana'"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Grafana repo"
uses: "actions/checkout@v3"
- name: "Clone website-sync Action"
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"
- name: "Publish to website repository (next)"
uses: "./.github/actions/website-sync"
id: "publish-next"
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"

View File

@@ -0,0 +1,60 @@
name: "publish-technical-documentation-release"
on:
push:
branches:
- v[0-9]+.[0-9]+.x
tags:
- v[0-9]+.[0-9]+.[0-9]+
paths:
- "docs/sources/**"
workflow_dispatch:
jobs:
sync:
if: "github.repository == 'grafana/grafana'"
runs-on: "ubuntu-latest"
steps:
- name: "Checkout Grafana repo"
uses: "actions/checkout@v3"
with:
fetch-depth: 0
- name: "Checkout Actions library"
uses: "actions/checkout@v3"
with:
repository: "grafana/grafana-github-actions"
path: "./actions"
- name: "Install Actions from library"
run: "npm install --production --prefix ./actions"
- name: "Determine if there is a matching release tag"
id: "has-matching-release-tag"
uses: "./actions/has-matching-release-tag"
with:
ref_name: "${{ github.ref_name }}"
release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$"
- name: "Determine technical documentation version"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
uses: "./actions/docs-target"
id: "target"
with:
ref_name: "${{ github.ref_name }}"
- name: "Clone website-sync Action"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
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"
- name: "Publish to website repository (release)"
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
uses: "./.github/actions/website-sync"
id: "publish-release"
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/${{ steps.target.outputs.target }}"

View File

@@ -1,49 +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
- name: generate-packages-docs
uses: actions/setup-node@v2.4.1
id: generate-docs
with:
node-version: '14'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- uses: actions/cache@v2.1.6
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- run: yarn install --immutable
- 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 }}"

6
.gitignore vendored
View File

@@ -13,6 +13,7 @@ public/dist/tsconfig.tsbuildinfo
/emails/dist
/reports
/e2e/tmp
/scripts/grafana-server/tmp
vendor/
/docs/menu.yaml
/requests
@@ -137,6 +138,9 @@ compilation-stats.json
!/e2e/**/screenshots/expected/*
/e2e/**/videos/*
# grafana server
/scripts/grafana-server/server.log
# a11y tests
/pa11y-ci-results.json
/pa11y-ci-report
@@ -149,3 +153,5 @@ compilation-stats.json
# auto generated Go files
*_gen.go
deployment_tools_config.json

View File

@@ -6,6 +6,7 @@ var config = {
chromeLaunchConfig: {
args: ['--no-sandbox'],
},
hideElements: '#updateVersion',
},
urls: [

View File

@@ -6,6 +6,7 @@ var config = {
chromeLaunchConfig: {
args: ['--no-sandbox'],
},
hideElements: '#updateVersion',
},
urls: [

View File

@@ -7,6 +7,7 @@ public/vendor/
vendor/
/data/
e2e/tmp
scripts/grafana-server/tmp
public/build/
public/sass/*.generated.scss
devenv/

View File

@@ -1,3 +1,324 @@
<!-- 8.3.7 START -->
# 8.3.7 (2022-03-01)
### Bug fixes
- **Provisioning:** Ensure that the default value for orgID is set when provisioning datasources to be deleted. [#44244](https://github.com/grafana/grafana/pull/44244), [@filewalkwithme](https://github.com/filewalkwithme)
<!-- 8.3.7 END -->
<!-- 8.3.6 START -->
# 8.3.6 (2022-02-09)
### Features and enhancements
- **Cloud Monitoring:** Reduce request size when listing labels. [#44365](https://github.com/grafana/grafana/pull/44365), [@mtanda](https://github.com/mtanda)
- **Explore:** Show scalar data result in a table instead of graph. [#44362](https://github.com/grafana/grafana/pull/44362), [@tharun208](https://github.com/tharun208)
- **Snapshots:** Updates the default external snapshot server URL. [#44563](https://github.com/grafana/grafana/pull/44563), [@DanCech](https://github.com/DanCech)
- **Table:** Makes footer not overlap table content. [#44210](https://github.com/grafana/grafana/pull/44210), [@dprokop](https://github.com/dprokop)
- **Tempo:** Add request histogram to service graph datalink. [#44671](https://github.com/grafana/grafana/pull/44671), [@connorlindsey](https://github.com/connorlindsey)
- **Tempo:** Add time range to tempo search query behind a feature flag. [#43811](https://github.com/grafana/grafana/pull/43811), [@connorlindsey](https://github.com/connorlindsey)
- **Tempo:** Auto-clear results when changing query type. [#44390](https://github.com/grafana/grafana/pull/44390), [@connorlindsey](https://github.com/connorlindsey)
- **Tempo:** Display start time in search results as relative time. [#44568](https://github.com/grafana/grafana/pull/44568), [@tharun208](https://github.com/tharun208)
### Bug fixes
- **CloudMonitoring:** Fix resource labels in query editor. [#44550](https://github.com/grafana/grafana/pull/44550), [@iwysiu](https://github.com/iwysiu)
- **Cursor sync:** Apply the settings without saving the dashboard. [#44270](https://github.com/grafana/grafana/pull/44270), [@dprokop](https://github.com/dprokop)
- **LibraryPanels:** Fix for Error while cleaning library panels. [#45033](https://github.com/grafana/grafana/pull/45033), [@hugohaggmark](https://github.com/hugohaggmark)
- **Logs Panel:** fix timestamp parsing for string dates without timezone. [#44664](https://github.com/grafana/grafana/pull/44664), [@Elfo404](https://github.com/Elfo404)
- **Prometheus:** Fix some of the alerting queries that use reduce/math operation. [#44380](https://github.com/grafana/grafana/pull/44380), [@ivanahuckova](https://github.com/ivanahuckova)
- **TablePanel:** Fix ad-hoc variables not working on default datasources. [#44314](https://github.com/grafana/grafana/pull/44314), [@joshhunt](https://github.com/joshhunt)
- **Text Panel:** Fix alignment of elements. [#44313](https://github.com/grafana/grafana/pull/44313), [@ashharrison90](https://github.com/ashharrison90)
- **Variables:** Fix for constant variables in self referencing links. [#44631](https://github.com/grafana/grafana/pull/44631), [@hugohaggmark](https://github.com/hugohaggmark)
<!-- 8.3.6 END -->
<!-- 8.3.5 START -->
# 8.3.5 (2022-02-08)
- **Security**: Fixes CVE-2022-21702. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
- **Security**: Fixes CVE-2022-21703. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
- **Security**: Fixes CVE-2022-21713. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
<!-- 8.3.5 END -->
<!-- 8.3.4 START -->
# 8.3.4 (2022-01-17)
### Features and enhancements
- **Alerting:** Allow configuration of non-ready alertmanagers. [#43063](https://github.com/grafana/grafana/pull/43063), [@alexweav](https://github.com/alexweav)
- **Alerting:** Allow customization of Google chat message. [#43568](https://github.com/grafana/grafana/pull/43568), [@alexweav](https://github.com/alexweav)
- **Alerting:** Allow customization of Google chat message (#43568). [#43723](https://github.com/grafana/grafana/pull/43723), [@alexweav](https://github.com/alexweav)
- **AppPlugins:** Support app plugins with only default nav. [#43016](https://github.com/grafana/grafana/pull/43016), [@torkelo](https://github.com/torkelo)
- **InfluxDB:** InfluxQL: query editor: skip fields in metadata queries. [#42543](https://github.com/grafana/grafana/pull/42543), [@gabor](https://github.com/gabor)
- **Postgres/MySQL/MSSQL:** Cancel in-flight SQL query if user cancels query in grafana. [#43890](https://github.com/grafana/grafana/pull/43890), [@mdvictor](https://github.com/mdvictor)
- **Prometheus:** Forward oauth tokens after prometheus datasource migration. [#43686](https://github.com/grafana/grafana/pull/43686), [@MasslessParticle](https://github.com/MasslessParticle)
### Bug fixes
- **Azure Monitor:** Bug fix for variable interpolations in metrics dropdowns. [#43251](https://github.com/grafana/grafana/pull/43251), [@sarahzinger](https://github.com/sarahzinger)
- **Azure Monitor:** Improved error messages for variable queries. [#43213](https://github.com/grafana/grafana/pull/43213), [@sunker](https://github.com/sunker)
- **CloudMonitoring:** Fixes broken variable queries that use group bys. [#43914](https://github.com/grafana/grafana/pull/43914), [@sunker](https://github.com/sunker)
- **Configuration:** You can now see your expired API keys if you have no active ones. [#42452](https://github.com/grafana/grafana/pull/42452), [@ashharrison90](https://github.com/ashharrison90)
- **Elasticsearch:** Fix handling multiple datalinks for a single field. [#44029](https://github.com/grafana/grafana/pull/44029), [@Elfo404](https://github.com/Elfo404)
- **Export:** Fix error being thrown when exporting dashboards using query variables that reference the default datasource. [#44034](https://github.com/grafana/grafana/pull/44034), [@ashharrison90](https://github.com/ashharrison90)
- **ImportDashboard:** Fixes issue with importing dashboard and name ending up in uid. [#43451](https://github.com/grafana/grafana/pull/43451), [@torkelo](https://github.com/torkelo)
- **Login:** Page no longer overflows on mobile. [#43739](https://github.com/grafana/grafana/pull/43739), [@ashharrison90](https://github.com/ashharrison90)
- **Plugins:** Set backend metadata property for core plugins. [#43349](https://github.com/grafana/grafana/pull/43349), [@marefr](https://github.com/marefr)
- **Prometheus:** Fill missing steps with null values. [#43622](https://github.com/grafana/grafana/pull/43622), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus:** Fix interpolation of $\_\_rate_interval variable. [#44035](https://github.com/grafana/grafana/pull/44035), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus:** Interpolate variables with curly brackets syntax. [#42927](https://github.com/grafana/grafana/pull/42927), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus:** Respect the http-method data source setting. [#42753](https://github.com/grafana/grafana/pull/42753), [@gabor](https://github.com/gabor)
- **Table:** Fixes issue with field config applied to wrong fields when hiding columns. [#43376](https://github.com/grafana/grafana/pull/43376), [@torkelo](https://github.com/torkelo)
- **Toolkit:** Fix bug with rootUrls not being properly parsed when signing a private plugin. [#43014](https://github.com/grafana/grafana/pull/43014), [@dessen-xu](https://github.com/dessen-xu)
- **Variables:** Fix so data source variables are added to adhoc configuration. [#43881](https://github.com/grafana/grafana/pull/43881), [@hugohaggmark](https://github.com/hugohaggmark)
### Plugin development fixes & changes
- **Toolkit:** Revert build config so tslib is bundled with plugins to prevent plugins from crashing. [#43556](https://github.com/grafana/grafana/pull/43556), [@mckn](https://github.com/mckn)
<!-- 8.3.4 END -->
<!-- 8.3.3 START -->
# 8.3.3 (2021-12-10)
### Features and enhancements
- **BarChart:** Use new data error view component to show actions in panel edit. [#42474](https://github.com/grafana/grafana/pull/42474), [@torkelo](https://github.com/torkelo)
- **CloudMonitor:** Iterate over pageToken for resources. [#42546](https://github.com/grafana/grafana/pull/42546), [@iwysiu](https://github.com/iwysiu)
- **Macaron:** Prevent WriteHeader invalid HTTP status code panic. [#42973](https://github.com/grafana/grafana/pull/42973), [@bergquist](https://github.com/bergquist)
### Bug fixes
- **AnnoListPanel:** Fix interpolation of variables in tags. [#42318](https://github.com/grafana/grafana/pull/42318), [@francoisdtm](https://github.com/francoisdtm)
- **CloudWatch:** Allow queries to have no dimensions specified. [#42800](https://github.com/grafana/grafana/pull/42800), [@sunker](https://github.com/sunker)
- **CloudWatch:** Fix broken queries for users migrating from 8.2.4/8.2.5 to 8.3.0. [#42611](https://github.com/grafana/grafana/pull/42611), [@sunker](https://github.com/sunker)
- **CloudWatch:** Make sure MatchExact flag gets the right value. [#42621](https://github.com/grafana/grafana/pull/42621), [@sunker](https://github.com/sunker)
- **Dashboards:** Fix so that empty folders can be deleted from the manage dashboards/folders page. [#42527](https://github.com/grafana/grafana/pull/42527), [@ashharrison90](https://github.com/ashharrison90)
- **InfluxDB:** Improve handling of metadata query errors in InfluxQL. [#42500](https://github.com/grafana/grafana/pull/42500), [@gabor](https://github.com/gabor)
- **Loki:** Fix adding of ad hoc filters for queries with parser and line_format expressions. [#42590](https://github.com/grafana/grafana/pull/42590), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus:** Fix running of exemplar queries for non-histogram metrics. [#42749](https://github.com/grafana/grafana/pull/42749), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus:** Interpolate template variables in interval. [#42637](https://github.com/grafana/grafana/pull/42637), [@ivanahuckova](https://github.com/ivanahuckova)
- **StateTimeline:** Fix toolitp not showing when for frames with multiple fields. [#42741](https://github.com/grafana/grafana/pull/42741), [@dprokop](https://github.com/dprokop)
- **TraceView:** Fix virtualized scrolling when trace view is opened in right pane in Explore. [#42480](https://github.com/grafana/grafana/pull/42480), [@autoric](https://github.com/autoric)
- **Variables:** Fix repeating panels for on time range changed variables. [#42828](https://github.com/grafana/grafana/pull/42828), [@hugohaggmark](https://github.com/hugohaggmark)
- **Variables:** Fix so queryparam option works for scoped variables. [#42742](https://github.com/grafana/grafana/pull/42742), [@hugohaggmark](https://github.com/hugohaggmark)
<!-- 8.3.3 END -->
<!-- 8.3.2 START -->
# 8.3.2 (2021-12-10)
- **Security**: Fixes CVE-2021-43813 and CVE-2021-43815. For more information, see our [blog](https://grafana.com/blog/2021/12/10/grafana-8.3.2-and-7.5.12-released-with-moderate-severity-security-fix/
<!-- 8.3.2 END -->
<!-- 8.3.1 START -->
# 8.3.1 (2021-12-07)
- **Security**: Fixes CVE-2021-43798. For more information, see our [blog](https://grafana.com/blog/2021/12/07/grafana-8.3.1-8.2.7-8.1.8-and-8.0.7-released-with-high-severity-security-fix/)
<!-- 8.3.1 END -->
<!-- 8.3.0 START -->
# 8.3.0 (2021-11-30)
### Features and enhancements
- **Alerting:** Prevent folders from being deleted when they contain alerts. [#42307](https://github.com/grafana/grafana/pull/42307), [@peterholmberg](https://github.com/peterholmberg)
- **Alerting:** Show full preview value in tooltip. [#42445](https://github.com/grafana/grafana/pull/42445), [@peterholmberg](https://github.com/peterholmberg)
- **BarGauge:** Limit title width when name is really long. [#42346](https://github.com/grafana/grafana/pull/42346), [@torkelo](https://github.com/torkelo)
- **CloudMonitoring:** Avoid to escape regexps in filters. [#41961](https://github.com/grafana/grafana/pull/41961), [@andresmgot](https://github.com/andresmgot)
- **CloudWatch:** Add support for AWS Metric Insights. [#42487](https://github.com/grafana/grafana/pull/42487), [@sunker](https://github.com/sunker)
- **TooltipPlugin:** Remove other panels' shared tooltip in edit panel. [#42187](https://github.com/grafana/grafana/pull/42187), [@mdvictor](https://github.com/mdvictor)
- **Visualizations:** Limit y label width to 40% of visualization width. [#42350](https://github.com/grafana/grafana/pull/42350), [@torkelo](https://github.com/torkelo)
### Bug fixes
- **Alerting:** Clear alerting rule evaluation errors after intermittent failures. [#42386](https://github.com/grafana/grafana/pull/42386), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Fix refresh on legacy Alert List panel. [#42322](https://github.com/grafana/grafana/pull/42322), [@peterholmberg](https://github.com/peterholmberg)
- **Dashboard:** Fix queries for panels with non-integer widths. [#42420](https://github.com/grafana/grafana/pull/42420), [@gabor](https://github.com/gabor)
- **Explore:** Fix url update inconsistency. [#42288](https://github.com/grafana/grafana/pull/42288), [@gabor](https://github.com/gabor)
- **Prometheus:** Fix range variables interpolation for time ranges smaller than 1 second. [#42242](https://github.com/grafana/grafana/pull/42242), [@ivanahuckova](https://github.com/ivanahuckova)
- **ValueMappings:** Fixes issue with regex value mapping that only sets color. [#42311](https://github.com/grafana/grafana/pull/42311), [@torkelo](https://github.com/torkelo)
<!-- 8.3.0 END -->
<!-- 8.3.0-beta2 START -->
# 8.3.0-beta2 (2021-11-25)
### Features and enhancements
- **Alerting:** Create DatasourceError alert if evaluation returns error. [#41869](https://github.com/grafana/grafana/pull/41869), [@gerobinson](https://github.com/gerobinson)
- **Alerting:** Make Unified Alerting enabled by default for those who do not use legacy alerting. [#42200](https://github.com/grafana/grafana/pull/42200), [@armandgrillet](https://github.com/armandgrillet)
- **Alerting:** Support mute timings configuration through the api for the embedded alert manager. [#41533](https://github.com/grafana/grafana/pull/41533), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **CloudWatch:** Add missing AWS/Events metrics. [#42164](https://github.com/grafana/grafana/pull/42164), [@n2N8Z](https://github.com/n2N8Z)
- **Docs:** Add easier to find deprecation notices to certain data sources and to the changelog. [#41938](https://github.com/grafana/grafana/pull/41938), [@gabor](https://github.com/gabor)
- **Plugins Catalog:** Enable install controls based on the pluginAdminEnabled flag. [#41686](https://github.com/grafana/grafana/pull/41686), [@leventebalogh](https://github.com/leventebalogh)
- **Query caching:** Increase max_value_mb default to 10. (Enterprise)
- **Table:** Add space between values for the DefaultCell. [#42246](https://github.com/grafana/grafana/pull/42246), [@kirederik](https://github.com/kirederik)
- **Table:** Add space between values on JSONViewCell. [#42156](https://github.com/grafana/grafana/pull/42156), [@kirederik](https://github.com/kirederik)
- **Tracing:** Make query editors available in dashboard for Tempo and Zipkin. [#41974](https://github.com/grafana/grafana/pull/41974), [@ivanahuckova](https://github.com/ivanahuckova)
### Bug fixes
- **AccessControl:** Renamed `orgs` roles, removed `fixed:orgs:reader` introduced in beta1. [#42049](https://github.com/grafana/grafana/pull/42049), [@gamab](https://github.com/gamab)
- **Azure Monitor:** Add trap focus for modals in grafana/ui and other small a11y fixes for Azure Monitor. [#41449](https://github.com/grafana/grafana/pull/41449), [@sarahzinger](https://github.com/sarahzinger)
- **CodeEditor:** Prevent suggestions from being clipped. [#42120](https://github.com/grafana/grafana/pull/42120), [@kaydelaney](https://github.com/kaydelaney)
- **Dashboard:** Fix cache timeout persistence. [#42204](https://github.com/grafana/grafana/pull/42204), [@hugohaggmark](https://github.com/hugohaggmark)
- **Datasource:** Fix stable sort order of query responses. [#41868](https://github.com/grafana/grafana/pull/41868), [@marefr](https://github.com/marefr)
- **Explore:** Fix error in query history when removing last item. [#42179](https://github.com/grafana/grafana/pull/42179), [@gabor](https://github.com/gabor)
- **Logs:** Fix requesting of older logs when flipped order. [#41966](https://github.com/grafana/grafana/pull/41966), [@ivanahuckova](https://github.com/ivanahuckova)
- **Prometheus:** Fix running of health check query based on access mode. [#42189](https://github.com/grafana/grafana/pull/42189), [@ivanahuckova](https://github.com/ivanahuckova)
- **TextPanel:** Fix suggestions for existing panels. [#42195](https://github.com/grafana/grafana/pull/42195), [@hugohaggmark](https://github.com/hugohaggmark)
- **Tracing:** Fix incorrect indentations due to reoccurring spanIDs. [#41919](https://github.com/grafana/grafana/pull/41919), [@ivanahuckova](https://github.com/ivanahuckova)
- **Tracing:** Show start time of trace with milliseconds precision. [#42132](https://github.com/grafana/grafana/pull/42132), [@ivanahuckova](https://github.com/ivanahuckova)
- **Variables:** Make renamed or missing variable section expandable. [#41964](https://github.com/grafana/grafana/pull/41964), [@hugohaggmark](https://github.com/hugohaggmark)
### Breaking changes
### Grafana 8 Alerting enabled by default for installations that do not use legacy alerting
Starting with Grafana v8.3.0, if you have **not** explicitly disabled unified alerting and **do not** have legacy alerts set up you are automatically "migrated" to Grafana 8 Alerting.
A migration **from legacy to Grafana 8 Alerting** will never incur a data loss, as the previous data is kept around for rollback purposes. However, going from **Grafana 8 Alerting to legacy alerting** will delete all the data created for Grafana 8 Alerting. It is recommended that you **backup your database** before attempting a migration between systems.
If unclear, please verify the table below:
| `[alerting][enabled]` | `[unified_alerting][enabled]` | With Existing Legacy Alerts | Result |
| --------------------- | ----------------------------- | --------------------------- | ------------------ |
| `true` | `true` | N/A | Error |
| `true` | `false` | N/A | Legacy Alerting |
| `true` | not set | Yes | Legacy Alerting |
| `true` | not set | No | Grafana 8 Alerting |
| not set | `true` | N/A | Grafana 8 Alerting |
| not set | `false` | N/A | Legacy Alerting |
| not set | not set | Yes | Legacy Alerting |
| not set | not set | No | Grafana 8 Alerting |
| `false` | `true` | N/A | Grafana 8 Alerting |
| `false` | `false` | N/A | Alerting disabled |
| `false` | not set | N/A | Grafana 8 Alerting |
N/A in the "With Existing Legacy Alerts" column means that it does not matter if you have legacy alerts or not.
Issue [#42200](https://github.com/grafana/grafana/issues/42200)
### Keep Last State for "If execution error or timeout" when upgrading to Grafana 8 alerting
In Grafana 8.3.0-beta2 we changed how alert rules that use `Keep Last State` for `If execution error or timeout` are upgraded from Legacy Alerting to Grafana 8 alerting. In 8.3.0-beta1 and earlier, alert rules with `Keep Last State` for `If execution error or timeout` were changed to `Alerting` when upgrading from Legacy Alerting to Grafana 8 alerting. However, in 8.3.0-beta2 these alert rules are now upgraded to a new option called `Error`. With this option, on encountering an error evaluating an alert rule, Grafana creates a special alert called `DatasourceError` with the `rule_uid` and `ref_id` as labels and an annotation called `Error` with the error message. Issue [#41869](https://github.com/grafana/grafana/issues/41869)
### Deprecations
The access mode "browser" is deprecated in the following data sources and will be removed in a later release:
- Prometheus
- InfluxDB
- Elasticsearch Issue [#41938](https://github.com/grafana/grafana/issues/41938)
### Plugin development fixes & changes
- **Select:** Select menus now properly scroll during keyboard navigation. [#41917](https://github.com/grafana/grafana/pull/41917), [@ashharrison90](https://github.com/ashharrison90)
<!-- 8.3.0-beta2 END -->
<!-- 8.3.0-beta1 START -->
# 8.3.0-beta1 (2021-11-18)
### Features and enhancements
- **AccessControl:** Apply fine-grained access control to licensing. (Enterprise)
- **Alerting:** Add UI for contact point testing with custom annotations and labels. [#40491](https://github.com/grafana/grafana/pull/40491), [@nathanrodman](https://github.com/nathanrodman)
- **Alerting:** Make alert state indicator in panel header work with Grafana 8 alerts. [#38713](https://github.com/grafana/grafana/pull/38713), [@domasx2](https://github.com/domasx2)
- **Alerting:** Option for Discord notifier to use webhook name. [#40463](https://github.com/grafana/grafana/pull/40463), [@Skyebold](https://github.com/Skyebold)
- **Annotations:** Deprecate AnnotationsSrv. [#39631](https://github.com/grafana/grafana/pull/39631), [@hugohaggmark](https://github.com/hugohaggmark)
- **Auditing:** Add audit logs for unified alerting endpoints. (Enterprise)
- **Auditing:** Add endpoints (plugins, datasources, library elements). (Enterprise)
- **Auth:** Omit all base64 paddings in JWT tokens for the JWT auth. [#35602](https://github.com/grafana/grafana/pull/35602), [@gillg](https://github.com/gillg)
- **Azure Monitor:** Clean up fields when editing Metrics. [#41762](https://github.com/grafana/grafana/pull/41762), [@andresmgot](https://github.com/andresmgot)
- **AzureMonitor:** Add new starter dashboards. [#39876](https://github.com/grafana/grafana/pull/39876), [@jcolladokuri](https://github.com/jcolladokuri)
- **AzureMonitor:** Add starter dashboard for app monitoring with Application Insights. [#40725](https://github.com/grafana/grafana/pull/40725), [@jcolladokuri](https://github.com/jcolladokuri)
- **Barchart/Time series:** Allow x axis label. [#41142](https://github.com/grafana/grafana/pull/41142), [@oscarkilhed](https://github.com/oscarkilhed)
- **CLI:** Improve error handling for installing plugins. [#41257](https://github.com/grafana/grafana/pull/41257), [@marefr](https://github.com/marefr)
- **CloudMonitoring:** Migrate to use backend plugin SDK contracts. [#38650](https://github.com/grafana/grafana/pull/38650), [@idafurjes](https://github.com/idafurjes)
- **CloudWatch Logs:** Add retry strategy for hitting max concurrent queries. [#39290](https://github.com/grafana/grafana/pull/39290), [@aocenas](https://github.com/aocenas)
- **CloudWatch:** Add AWS RoboMaker metrics and dimension. [#41450](https://github.com/grafana/grafana/pull/41450), [@ilyastoli](https://github.com/ilyastoli)
- **CloudWatch:** Add AWS Transfer metrics and dimension. [#41168](https://github.com/grafana/grafana/pull/41168), [@ilyastoli](https://github.com/ilyastoli)
- **Dashboard:** replace datasource name with a reference object. [#33817](https://github.com/grafana/grafana/pull/33817), [@ryantxu](https://github.com/ryantxu)
- **Dashboards:** Show logs on time series when hovering. [#40110](https://github.com/grafana/grafana/pull/40110), [@ryantxu](https://github.com/ryantxu)
- **Elasticsearch:** Add support for Elasticsearch 8.0 (Beta). [#41729](https://github.com/grafana/grafana/pull/41729), [@Elfo404](https://github.com/Elfo404)
- **Elasticsearch:** Add time zone setting to Date Histogram aggregation. [#40882](https://github.com/grafana/grafana/pull/40882), [@Elfo404](https://github.com/Elfo404)
- **Elasticsearch:** Enable full range log volume histogram. [#41202](https://github.com/grafana/grafana/pull/41202), [@ifrost](https://github.com/ifrost)
- **Elasticsearch:** Full range logs volume. [#40700](https://github.com/grafana/grafana/pull/40700), [@ifrost](https://github.com/ifrost)
- **Explore:** Allow changing the graph type. [#40522](https://github.com/grafana/grafana/pull/40522), [@gabor](https://github.com/gabor)
- **Explore:** Show ANSI colors when highlighting matched words in the logs panel. [#40971](https://github.com/grafana/grafana/pull/40971), [@oliverfrye](https://github.com/oliverfrye)
- **Graph(old) panel:** Listen to events from Time series panel. [#41033](https://github.com/grafana/grafana/pull/41033), [@zoltanbedi](https://github.com/zoltanbedi)
- **Import:** Load gcom dashboards from URL. [#41799](https://github.com/grafana/grafana/pull/41799), [@ashharrison90](https://github.com/ashharrison90)
- **LibraryPanels:** Improves export and import of library panels between orgs. [#39214](https://github.com/grafana/grafana/pull/39214), [@hugohaggmark](https://github.com/hugohaggmark)
- **OAuth:** Support PKCE. [#39948](https://github.com/grafana/grafana/pull/39948), [@sakjur](https://github.com/sakjur)
- **Panel edit:** Overrides now highlight correctly when searching. [#41684](https://github.com/grafana/grafana/pull/41684), [@ashharrison90](https://github.com/ashharrison90)
- **PanelEdit:** Display drag indicators on draggable sections. [#41711](https://github.com/grafana/grafana/pull/41711), [@ashharrison90](https://github.com/ashharrison90)
- **Plugins:** Refactor Plugin Management. [#40477](https://github.com/grafana/grafana/pull/40477), [@wbrowne](https://github.com/wbrowne)
- **Prometheus:** Add custom query parameters when creating PromLink url. [#41213](https://github.com/grafana/grafana/pull/41213), [@Ian-Yy](https://github.com/Ian-Yy)
- **Prometheus:** Remove limits on metrics, labels, and values in Metrics Browser. [#40660](https://github.com/grafana/grafana/pull/40660), [@autoric](https://github.com/autoric)
- **StateTimeline:** Share cursor with rest of the panels. [#41038](https://github.com/grafana/grafana/pull/41038), [@zoltanbedi](https://github.com/zoltanbedi)
- **Tempo:** Add error details when json upload fails. [#41803](https://github.com/grafana/grafana/pull/41803), [@aocenas](https://github.com/aocenas)
- **Tempo:** Add filtering for service graph query. [#41162](https://github.com/grafana/grafana/pull/41162), [@aocenas](https://github.com/aocenas)
- **Tempo:** Add links to nodes in Service Graph pointing to Prometheus metrics. [#41135](https://github.com/grafana/grafana/pull/41135), [@aocenas](https://github.com/aocenas)
- **Time series/Bar chart panel:** Add ability to sort series via legend. [#40226](https://github.com/grafana/grafana/pull/40226), [@zoltanbedi](https://github.com/zoltanbedi)
- **TimeSeries:** Allow multiple axes for the same unit. [#41635](https://github.com/grafana/grafana/pull/41635), [@dprokop](https://github.com/dprokop)
- **TraceView:** Allow span links defined on dataFrame. [#40563](https://github.com/grafana/grafana/pull/40563), [@aocenas](https://github.com/aocenas)
- **Transformations:** Support a rows mode in labels to fields. [#41020](https://github.com/grafana/grafana/pull/41020), [@ryantxu](https://github.com/ryantxu)
- **ValueMappings:** Don't apply field config defaults to time fields. [#41132](https://github.com/grafana/grafana/pull/41132), [@torkelo](https://github.com/torkelo)
- **Variables:** Only update panels that are impacted by variable change. [#39420](https://github.com/grafana/grafana/pull/39420), [@hugohaggmark](https://github.com/hugohaggmark)
### Bug fixes
- **API:** Fix dashboard quota limit for imports. [#41495](https://github.com/grafana/grafana/pull/41495), [@yangkb09](https://github.com/yangkb09)
- **Alerting:** Fix rule editor issues with Azure Monitor data source. [#41317](https://github.com/grafana/grafana/pull/41317), [@domasx2](https://github.com/domasx2)
- **Azure monitor:** Make sure alert rule editor is not enabled when template variables are being used. [#41335](https://github.com/grafana/grafana/pull/41335), [@sunker](https://github.com/sunker)
- **CloudMonitoring:** Fix annotation queries. [#41529](https://github.com/grafana/grafana/pull/41529), [@sunker](https://github.com/sunker)
- **CodeEditor:** Trigger the latest getSuggestions() passed to CodeEditor. [#40544](https://github.com/grafana/grafana/pull/40544), [@DukeManh](https://github.com/DukeManh)
- **Dashboard:** Remove the current panel from the list of options in the Dashboard datasource. [#41826](https://github.com/grafana/grafana/pull/41826), [@ashharrison90](https://github.com/ashharrison90)
- **Encryption:** Fix decrypting secrets in alerting migration. [#41061](https://github.com/grafana/grafana/pull/41061), [@undef1nd](https://github.com/undef1nd)
- **InfluxDB:** Fix corner case where index is too large in ALIAS field. [#41562](https://github.com/grafana/grafana/pull/41562), [@gabor](https://github.com/gabor)
- **NavBar:** Order App plugins alphabetically. [#40078](https://github.com/grafana/grafana/pull/40078), [@ashharrison90](https://github.com/ashharrison90)
- **NodeGraph:** Fix zooming sensitivity on touchpads. [#40718](https://github.com/grafana/grafana/pull/40718), [@aocenas](https://github.com/aocenas)
- **Plugins:** Add OAuth pass-through logic to api/ds/query endpoint. [#41352](https://github.com/grafana/grafana/pull/41352), [@wbrowne](https://github.com/wbrowne)
- **Snapshots:** Fix panel inspector for snapshot data. [#41530](https://github.com/grafana/grafana/pull/41530), [@joshhunt](https://github.com/joshhunt)
- **Tempo:** Fix basic auth password reset on adding tag. [#41808](https://github.com/grafana/grafana/pull/41808), [@aocenas](https://github.com/aocenas)
- **ValueMapping:** Fixes issue with regex mappings. [#41515](https://github.com/grafana/grafana/pull/41515), [@mcdee](https://github.com/mcdee)
### Plugin development fixes & changes
- **grafana/ui:** Enable slider marks display. [#41275](https://github.com/grafana/grafana/pull/41275), [@dprokop](https://github.com/dprokop)
<!-- 8.2.7 START -->
# 8.2.7 (2021-12-07)
- **Security**: Fixes CVE-2021-43798. For more information, see our [blog](https://grafana.com/blog/2021/12/07/grafana-8.3.1-8.2.7-8.1.8-and-8.0.7-released-with-high-severity-security-fix/)
<!-- 8.2.7 END -->
<!-- 8.2.6 START -->
# 8.2.6 (2021-12-02)
### Features and enhancements
- **Security:** Upgrade Docker base image to Alpine 3.14.3. [#42061](https://github.com/grafana/grafana/pull/42061), [@dsotirakis](https://github.com/dsotirakis)
- **Security:** Upgrade Go to 1.17.2. [#42427](https://github.com/grafana/grafana/pull/42427), [@idafurjes](https://github.com/idafurjes)
### Bug fixes
- **TimeSeries:** Fix fillBelowTo wrongly affecting fills of unrelated series. [#41998](https://github.com/grafana/grafana/pull/41998), [@leeoniya](https://github.com/leeoniya)
<!-- 8.2.6 END -->
<!-- 8.3.0-beta1 END -->
<!-- 8.2.5 START -->
# 8.2.5 (2021-11-18)
@@ -5,6 +326,7 @@
### 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)
@@ -15,6 +337,14 @@
- **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 -->
@@ -253,6 +583,14 @@ Panel queries and/or annotation queries that used more than one statistic will b
<!-- 8.2.0-beta1 END -->
<!-- 8.1.8 START -->
# 8.1.8 (2021-12-07)
- **Security**: Fixes CVE-2021-43798. For more information, see our [blog](https://grafana.com/blog/2021/12/07/grafana-8.3.1-8.2.7-8.1.8-and-8.0.7-released-with-high-severity-security-fix/)
<!-- 8.1.8 END -->
<!-- 8.1.7 START -->
# 8.1.7 (2021-10-06)
@@ -527,6 +865,14 @@ Issue [#33879](https://github.com/grafana/grafana/issues/33879)
<!-- 8.1.0-beta1 END -->
<!-- 8.0.7 START -->
# 8.0.7 (2021-12-07)
- **Security**: Fixes CVE-2021-43798. For more information, see our [blog](https://grafana.com/blog/2021/12/07/grafana-8.3.1-8.2.7-8.1.8-and-8.0.7-released-with-high-severity-security-fix/)
<!-- 8.0.7 END -->
<!-- 8.0.6 START -->
# 8.0.6 (2021-07-14)
@@ -958,6 +1304,24 @@ Issue [#33352](https://github.com/grafana/grafana/issues/33352)
- **AGPL License:** Update license from Apache 2.0 to the GNU Affero General Public License (AGPL). [#33184](https://github.com/grafana/grafana/pull/33184)
<!-- 8.0.0-beta1 END -->
<!-- 7.5.15 START -->
# 7.5.15 (2022-02-08)
- **Security**: Fixes CVE-2022-21702. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
- **Security**: Fixes CVE-2022-21703. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
- **Security**: Fixes CVE-2022-21713. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
<!-- 7.5.15 END -->
<!-- 7.5.13 START -->
# 7.5.13 (2022-01-18)
### Bug fixes
- **[v7.5.x] Alerting:** Fix NoDataFound for alert rules using AND operator (#41305). [#44066](https://github.com/grafana/grafana/pull/44066), [@armandgrillet](https://github.com/armandgrillet)
<!-- 7.5.13 END -->
<!-- 7.5.11 START -->

View File

@@ -76,6 +76,6 @@ Before we can accept your pull request, you need to [sign our CLA](https://grafa
## Where do I go from here?
- Set up your [development environment](contribute/developer-guide.md).
- Learn how to [contribute documentation](contribute/documentation.md).
- Learn how to [contribute documentation](contribute/README.md).
- Get started [developing plugins](https://grafana.com/docs/grafana/latest/developers/plugins/) for Grafana.
- Look through the resources in the [contribute](https://github.com/grafana/grafana/tree/main/contribute) folder.
- Look through the resources in the [contribute](contribute) folder.

View File

@@ -1,4 +1,4 @@
FROM node:16-alpine3.14 as js-builder
FROM node:16-alpine3.15 as js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000
@@ -20,14 +20,13 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.0-alpine3.14 as go-builder
FROM golang:1.17.8-alpine3.15 as go-builder
RUN apk add --no-cache gcc g++ make
WORKDIR /grafana
COPY go.mod go.sum embed.go Makefile build.go package.json ./
COPY ./local/* ./local/
COPY cue cue
COPY packages/grafana-schema packages/grafana-schema
COPY public/app/plugins public/app/plugins
@@ -40,7 +39,7 @@ RUN go mod verify
RUN make build-go
# Final stage
FROM alpine:3.14.2
FROM alpine:3.15
LABEL maintainer="Grafana team <hello@grafana.com>"

View File

@@ -1,4 +1,4 @@
FROM node:16-alpine3.14 as js-builder
FROM node:16-alpine3.15 as js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000
@@ -21,7 +21,7 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM golang:1.17.0 AS go-builder
FROM golang:1.17.8 AS go-builder
WORKDIR /src/grafana

View File

@@ -158,7 +158,7 @@ gen-ts:
# you modify starlark files.
drone: $(DRONE)
$(DRONE) starlark --format
$(DRONE) lint .drone.yml
$(DRONE) lint .drone.yml --trusted
$(DRONE) --server https://drone.grafana.net sign --save grafana/grafana
help: ## Display this help.

View File

@@ -228,9 +228,12 @@ admin_password = admin
# used for signing
secret_key = SW2YcwTIb9zpOOhoPsMm
# key provider used for envelope encryption, default to static value specified by secret_key
# current key provider used for envelope encryption, default to static value specified by secret_key
encryption_provider = secretKey
# list of configured key providers, space separated (Enterprise only): e.g., awskms.v1 azurekv.v1
available_encryption_providers =
# disable gravatar profile images
disable_gravatar = false
@@ -285,8 +288,8 @@ content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-in
[snapshots]
# snapshot sharing options
external_enabled = true
external_snapshot_url = https://snapshots-origin.raintank.io
external_snapshot_name = Publish to snapshot.raintank.io
external_snapshot_url = https://snapshots.raintank.io
external_snapshot_name = Publish to snapshots.raintank.io
# Set to true to enable this Grafana instance act as an external snapshot server and allow unauthenticated requests for
# creating and deleting snapshots.
@@ -735,8 +738,8 @@ 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
# 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 when switching. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
enabled =
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
disabled_orgs =
@@ -790,8 +793,8 @@ min_interval = 10s
#################################### Alerting ############################
[alerting]
# Disable legacy alerting engine & UI features
enabled = true
# Enable the legacy alerting sub-system and interface. If Unified Alerting is already enabled and you try to go back to legacy alerting, all data that is part of Unified Alerting will be deleted. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
enabled =
# Makes it possible to turn off alert execution but alerting UI is visible
execute_alerts = true
@@ -954,6 +957,8 @@ container_name =
server_url =
# If the remote HTTP image renderer service runs on a different server than the Grafana server you may have to configure this to a URL where Grafana is reachable, e.g. http://grafana.domain/.
callback_url =
# An auth token that will be sent to and verified by the renderer. The renderer will deny any request without an auth token matching the one configured on the renderer side.
renderer_token = -
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
concurrent_render_request_limit = 30
@@ -968,7 +973,7 @@ enable_alpha = false
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.
# Enable or disable installing / uninstalling / updating plugins directly from within Grafana.
plugin_admin_enabled = true
plugin_admin_external_manage_enabled = false
plugin_catalog_url = https://grafana.com/grafana/plugins/
@@ -1040,12 +1045,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

@@ -222,9 +222,12 @@
# used for signing
;secret_key = SW2YcwTIb9zpOOhoPsMm
# key provider used for envelope encryption, default to static value specified by secret_key
# current key provider used for envelope encryption, default to static value specified by secret_key
;encryption_provider = secretKey
# list of configured key providers, space separated (Enterprise only): e.g., awskms.v1 azurekv.v1
;available_encryption_providers =
# disable gravatar profile images
;disable_gravatar = false
@@ -279,8 +282,8 @@
[snapshots]
# snapshot sharing options
;external_enabled = true
;external_snapshot_url = https://snapshots-origin.raintank.io
;external_snapshot_name = Publish to snapshot.raintank.io
;external_snapshot_url = https://snapshots.raintank.io
;external_snapshot_name = Publish to snapshots.raintank.io
# Set to true to enable this Grafana instance act as an external snapshot server and allow unauthenticated requests for
# creating and deleting snapshots.
@@ -713,7 +716,7 @@
#################################### 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
;enabled = true
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
;disabled_orgs =
@@ -768,7 +771,7 @@
#################################### Alerting ############################
[alerting]
# Disable legacy alerting engine & UI features
;enabled = true
;enabled = false
# Makes it possible to turn off alert execution but alerting UI is visible
;execute_alerts = true
@@ -928,6 +931,8 @@
;server_url =
# If the remote HTTP image renderer service runs on a different server than the Grafana server you may have to configure this to a URL where Grafana is reachable, e.g. http://grafana.domain/.
;callback_url =
# An auth token that will be sent to and verified by the renderer. The renderer will deny any request without an auth token matching the one configured on the renderer side.
;renderer_token = -
# Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
# which this setting can help protect against by only allowing a certain amount of concurrent requests.
;concurrent_render_request_limit = 30
@@ -941,7 +946,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.
# Enable or disable installing / uninstalling / updating plugins directly from within Grafana.
;plugin_admin_enabled = false
;plugin_admin_external_manage_enabled = false
;plugin_catalog_url = https://grafana.com/grafana/plugins/
@@ -1012,12 +1017,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

@@ -81,7 +81,23 @@ When you log in for the first time, Grafana asks you to change your password.
The Grafana backend includes SQLite which requires GCC to compile. So in order to compile Grafana on Windows you need to install GCC. We recommend [TDM-GCC](http://tdm-gcc.tdragon.net/download). Eventually, if you use [Scoop](https://scoop.sh), you can install GCC through that.
You can simply build the back-end as follows: `go run build.go build`. The Grafana binaries will be in bin\\windows-amd64.
You can build the back-end as follows:
1. Follow the [instructions](https://github.com/google/wire#installing) to install the Wire tool.
2. Generate code using Wire:
```
# Normally Wire tool installed at $GOPATH/bin/wire.exe
<Wire tool install path> gen -tags oss ./pkg/server ./pkg/cmd/grafana-cli/runner
```
3. Build the Grafana binaries:
```
go run build.go build
```
The Grafana binaries will be in bin\\windows-amd64.
Alternately, if you wish to use the `make` command, install [Make for Windows](http://gnuwin32.sourceforge.net/packages/make.htm) and use it in a Unix shell (f.ex. Git Bash).
## Test Grafana

View File

@@ -16,8 +16,8 @@ BASE_URL=http://172.0.10.2:3333 yarn e2e
The above commands use some utils scripts under [_\<repo-root>/e2e_](../../e2e) that can also be used for more control.
- `./e2e/start-server` This creates a fresh new grafana server working dir, setup's config and starts the server. It will also kill any previously started server that is still running using pid file at _\<repo-root>/e2e/tmp/pid_.
- `./e2e/wait-for-grafana` waits for `$HOST` and `$PORT` to be available. Per default localhost and 3001.
- `./scripts/grafana-server/start-server` This creates a fresh new grafana server working dir, setup's config and starts the server. It will also kill any previously started server that is still running using pid file at _\<repo-root>/scripts/grafana-server/tmp/pid_.
- `./scripts/grafana-server/wait-for-grafana` waits for `$HOST` and `$PORT` to be available. Per default localhost and 3001.
- `./e2e/run-suite <debug|dev|noarg>` Starts cypress in different modes.
## Test suites

View File

@@ -1991,7 +1991,7 @@
"axisLabel": "",
"axisPlacement": "auto",
"drawStyle": "line",
"fillOpacity": 29,
"fillOpacity": 0,
"gradientMode": {
"label": "None",
"value": "none"
@@ -2054,6 +2054,18 @@
"value": 0
}
]
},
{
"matcher": {
"id": "byName",
"options": "value"
},
"properties": [
{
"id": "custom.fillOpacity",
"value": 0
}
]
}
]
},

View File

@@ -1,522 +1,481 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 2,
"id": 319,
"links": [],
"liveNow": false,
"panels": [
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"dash": [
10,
10
],
"fill": "dash"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "currencyUSD"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "sma"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "orange",
"mode": "fixed"
}
},
{
"id": "custom.lineWidth",
"value": 5
},
{
"id": "custom.lineStyle",
"value": {
"dash": [
0,
20
],
"fill": "dot"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "bolup"
},
"properties": [
{
"id": "custom.fillBelowTo",
"value": "boldn"
},
{
"id": "custom.fillOpacity",
"value": 8
},
{
"id": "color",
"value": {
"fixedColor": "blue",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 16,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"colorStrategy": "open-close",
"colors": {
"down": "red",
"up": "green"
},
"fields": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "candles+volume",
"candleStyle": "candles"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Price & Volume",
"type": "candlestick"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "currencyUSD"
},
"overrides": []
},
"gridPos": {
"h": 20,
"w": 12,
"x": 12,
"y": 0
},
"id": 7,
"options": {
"colorStrategy": "close-close",
"colors": {
"down": "red",
"up": "green"
},
"fields": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "candles",
"candleStyle": "candles"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Price Only, Hollow Candles",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"time",
"open",
"high",
"low",
"close"
]
}
}
}
],
"type": "candlestick"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "currencyUSD"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 0,
"y": 16
},
"id": 6,
"options": {
"colorStrategy": "open-close",
"colors": {
"down": "red",
"up": "blue"
},
"fields": { },
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "candles",
"candleStyle": "ohlcbars"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Price Only, OHLC Bars",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"time",
"open",
"high",
"low",
"close"
]
}
}
}
],
"type": "candlestick"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 100,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "currencyUSD"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "open"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": true,
"tooltip": true,
"viz": true
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "close"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": true,
"tooltip": true,
"viz": true
}
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 20
},
"id": 4,
"options": {
"colorStrategy": "open-close",
"colors": {
"down": "red",
"up": "yellow"
},
"fields": {},
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "volume",
"candleStyle": "candles"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Volume Only, Alt Colors, 100% Opacity",
"transformations": [
{
"id": "filterFieldsByName",
"options": {
"include": {
"names": [
"time",
"volume",
"open",
"close"
]
}
}
}
],
"type": "candlestick"
"type": "dashboard"
}
],
"refresh": false,
"schemaVersion": 33,
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"graph-ng"
],
"templating": {
"list": []
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 2,
"links": [],
"liveNow": false,
"panels": [
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineStyle": {
"dash": [
10,
10
],
"fill": "dash"
},
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "never",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "currencyUSD"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "sma"
},
"properties": [
{
"id": "color",
"value": {
"fixedColor": "orange",
"mode": "fixed"
}
},
{
"id": "custom.lineWidth",
"value": 5
},
{
"id": "custom.lineStyle",
"value": {
"dash": [
0,
20
],
"fill": "dot"
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "bolup"
},
"properties": [
{
"id": "custom.fillBelowTo",
"value": "boldn"
},
{
"id": "custom.fillOpacity",
"value": 8
},
{
"id": "color",
"value": {
"fixedColor": "blue",
"mode": "fixed"
}
}
]
}
]
},
"gridPos": {
"h": 16,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"candleStyle": "candles",
"colorStrategy": "open-close",
"colors": {
"down": "red",
"up": "green"
},
"fields": {},
"includeAllFields": true,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "candles+volume"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Price & Volume",
"type": "candlestick"
},
"time": {
"from": "2021-07-13T22:13:30.740Z",
"to": "2021-07-13T22:46:18.921Z"
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "currencyUSD"
},
"overrides": []
},
"gridPos": {
"h": 20,
"w": 12,
"x": 12,
"y": 0
},
"id": 7,
"options": {
"candleStyle": "candles",
"colorStrategy": "close-close",
"colors": {
"down": "red",
"up": "green"
},
"fields": {},
"includeAllFields": false,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "candles"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Price Only, Hollow Candles",
"transformations": [],
"type": "candlestick"
},
"timepicker": {},
"timezone": "",
"title": "Candlestick",
"uid": "MP-Di9F7k",
"version": 7,
"weekStart": ""
}
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 0,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "currencyUSD"
},
"overrides": []
},
"gridPos": {
"h": 10,
"w": 12,
"x": 0,
"y": 16
},
"id": 6,
"options": {
"candleStyle": "ohlcbars",
"colorStrategy": "open-close",
"colors": {
"down": "red",
"up": "blue"
},
"fields": {},
"includeAllFields": false,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "candles"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Price Only, OHLC Bars",
"transformations": [],
"type": "candlestick"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "palette-classic"
},
"custom": {
"axisLabel": "",
"axisPlacement": "auto",
"barAlignment": 0,
"drawStyle": "line",
"fillOpacity": 100,
"gradientMode": "none",
"hideFrom": {
"legend": false,
"tooltip": false,
"viz": false
},
"lineInterpolation": "linear",
"lineWidth": 1,
"pointSize": 5,
"scaleDistribution": {
"type": "linear"
},
"showPoints": "auto",
"spanNulls": false,
"stacking": {
"group": "A",
"mode": "none"
},
"thresholdsStyle": {
"mode": "off"
}
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green"
},
{
"color": "red",
"value": 80
}
]
},
"unit": "currencyUSD"
},
"overrides": [
{
"matcher": {
"id": "byName",
"options": "open"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": true,
"tooltip": true,
"viz": true
}
}
]
},
{
"matcher": {
"id": "byName",
"options": "close"
},
"properties": [
{
"id": "custom.hideFrom",
"value": {
"legend": true,
"tooltip": true,
"viz": true
}
}
]
}
]
},
"gridPos": {
"h": 6,
"w": 12,
"x": 12,
"y": 20
},
"id": 4,
"options": {
"candleStyle": "candles",
"colorStrategy": "open-close",
"colors": {
"down": "red",
"up": "yellow"
},
"fields": {},
"includeAllFields": false,
"legend": {
"calcs": [],
"displayMode": "list",
"placement": "bottom"
},
"mode": "volume"
},
"targets": [
{
"csvFileName": "ohlc_dogecoin.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Volume Only, Alt Colors, 100% Opacity",
"transformations": [],
"type": "candlestick"
}
],
"refresh": false,
"schemaVersion": 33,
"style": "dark",
"tags": [
"gdev",
"panel-tests",
"graph-ng"
],
"templating": {
"list": []
},
"time": {
"from": "2021-07-13T22:13:30.740Z",
"to": "2021-07-13T22:46:18.921Z"
},
"timepicker": {},
"timezone": "",
"title": "Candlestick",
"uid": "MP-Di9F7k",
"version": 2,
"weekStart": ""
}

View File

@@ -0,0 +1,436 @@
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"target": {
"limit": 100,
"matchAny": false,
"tags": [],
"type": "dashboard"
},
"type": "dashboard"
}
]
},
"editable": true,
"fiscalYearStartMonth": 0,
"graphTooltip": 0,
"id": 157,
"links": [],
"liveNow": false,
"panels": [
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 20
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 22,
"w": 12,
"x": 0,
"y": 0
},
"id": 2,
"options": {
"basemap": {
"config": {},
"name": "Layer 0",
"type": "default"
},
"controls": {
"mouseWheelZoom": true,
"showAttribution": true,
"showDebug": false,
"showScale": false,
"showZoom": true
},
"layers": [
{
"config": {
"rules": [
{
"check": {
"operation": "eq",
"property": "name",
"value": "Greenland"
},
"style": {
"color": {
"fixed": "light-blue"
},
"opacity": 0.4,
"rotation": {
"fixed": 0,
"max": 360,
"min": -360,
"mode": "mod"
},
"size": {
"fixed": 5,
"max": 15,
"min": 2
},
"symbol": {
"fixed": "img/icons/marker/circle.svg",
"mode": "fixed"
},
"textConfig": {
"fontSize": 12,
"offsetX": 0,
"offsetY": 0,
"textAlign": "center",
"textBaseline": "middle"
}
}
},
{
"check": {
"operation": "eq",
"property": "name",
"value": "Antarctica"
},
"style": {
"color": {
"fixed": "#FCE2DE"
},
"opacity": 0.4,
"rotation": {
"fixed": 0,
"max": 360,
"min": -360,
"mode": "mod"
},
"size": {
"fixed": 5,
"max": 15,
"min": 2
},
"symbol": {
"fixed": "img/icons/marker/circle.svg",
"mode": "fixed"
},
"textConfig": {
"fontSize": 12,
"offsetX": 0,
"offsetY": 0,
"textAlign": "center",
"textBaseline": "middle"
}
}
},
{
"check": {
"operation": "eq",
"property": "name",
"value": "Canada"
},
"style": {
"color": {
"fixed": "#37872D"
},
"opacity": 0.4,
"rotation": {
"fixed": 0,
"max": 360,
"min": -360,
"mode": "mod"
},
"size": {
"fixed": 5,
"max": 15,
"min": 2
},
"symbol": {
"fixed": "img/icons/marker/circle.svg",
"mode": "fixed"
},
"textConfig": {
"fontSize": 12,
"offsetX": 0,
"offsetY": 0,
"textAlign": "center",
"textBaseline": "middle"
}
}
},
{
"check": {
"operation": "eq",
"property": "name",
"value": "Mexico"
},
"style": {
"color": {
"fixed": "#1F60C4"
},
"opacity": 0.4,
"rotation": {
"fixed": 0,
"max": 360,
"min": -360,
"mode": "mod"
},
"size": {
"fixed": 5,
"max": 15,
"min": 2
},
"symbol": {
"fixed": "img/icons/marker/circle.svg",
"mode": "fixed"
},
"textConfig": {
"fontSize": 12,
"offsetX": 0,
"offsetY": 0,
"textAlign": "center",
"textBaseline": "middle"
}
}
}
],
"src": "public/maps/countries.geojson",
"style": {
"color": {
"fixed": "dark-green"
},
"opacity": 0.1,
"rotation": {
"fixed": 0,
"max": 360,
"min": -360,
"mode": "mod"
},
"size": {
"fixed": 5,
"max": 15,
"min": 2
},
"symbol": {
"fixed": "img/icons/marker/circle.svg",
"mode": "fixed"
},
"textConfig": {
"fontSize": 12,
"offsetX": 0,
"offsetY": 0,
"textAlign": "center",
"textBaseline": "middle"
}
}
},
"name": "Countries",
"type": "geojson"
},
{
"config": {
"showLegend": true,
"style": {
"color": {
"fixed": "dark-blue"
},
"opacity": 0.4,
"rotation": {
"fixed": 0,
"max": 360,
"min": -360,
"mode": "mod"
},
"size": {
"fixed": 5,
"max": 15,
"min": 2
},
"symbol": {
"fixed": "img/icons/marker/square.svg",
"mode": "fixed"
},
"text": {
"field": "Count",
"fixed": "",
"mode": "field"
},
"textConfig": {
"fontSize": 16,
"offsetX": 10,
"offsetY": 10,
"textAlign": "center",
"textBaseline": "middle"
}
}
},
"location": {
"mode": "auto"
},
"name": "Flights",
"type": "markers"
}
],
"view": {
"id": "coords",
"lat": 42.826559,
"lon": -96.868893,
"zoom": 3.58
}
},
"pluginVersion": "8.3.0-pre",
"targets": [
{
"csvFileName": "flight_info_by_state.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Multi layers",
"type": "geomap"
},
{
"fieldConfig": {
"defaults": {
"color": {
"mode": "thresholds"
},
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": 20
},
{
"color": "red",
"value": 80
}
]
}
},
"overrides": []
},
"gridPos": {
"h": 22,
"w": 12,
"x": 12,
"y": 0
},
"id": 3,
"options": {
"basemap": {
"config": {},
"name": "Layer 0",
"type": "default"
},
"controls": {
"mouseWheelZoom": true,
"showAttribution": true,
"showDebug": false,
"showScale": false,
"showZoom": true
},
"layers": [
{
"config": {
"showLegend": true,
"style": {
"color": {
"fixed": "dark-green"
},
"opacity": 0.7,
"rotation": {
"field": "Lng",
"fixed": 0,
"max": 360,
"min": -360,
"mode": "mod"
},
"size": {
"fixed": 10,
"max": 15,
"min": 2
},
"symbol": {
"fixed": "img/icons/marker/plane.svg",
"mode": "fixed"
},
"text": {
"field": "Lng",
"fixed": "",
"mode": "field"
},
"textConfig": {
"fontSize": 12,
"offsetX": 0,
"offsetY": 18,
"textAlign": "center",
"textBaseline": "middle"
}
}
},
"name": "Layer 2",
"type": "markers"
}
],
"view": {
"id": "coords",
"lat": 42.826559,
"lon": -96.868893,
"zoom": 3.58
}
},
"pluginVersion": "8.3.0-pre",
"targets": [
{
"csvFileName": "flight_info_by_state.csv",
"refId": "A",
"scenarioId": "csv_file"
}
],
"title": "Markers",
"type": "geomap"
}
],
"schemaVersion": 33,
"style": "dark",
"tags": [
"gdev",
"geomap",
"panel-tests"
],
"templating": {
"list": []
},
"time": {
"from": "now-6h",
"to": "now"
},
"timepicker": {},
"timezone": "",
"title": "Panel Tests - Geomap Multi Layers",
"uid": "2jFpEvp7z",
"version": 8,
"weekStart": ""
}

View File

@@ -1346,7 +1346,7 @@
"axisPlacement": "auto",
"drawStyle": "line",
"fillGradient": "hue",
"fillOpacity": 25,
"fillOpacity": 0,
"hideFrom": {
"graph": false,
"legend": false,
@@ -1426,6 +1426,10 @@
"fixedColor": "blue",
"mode": "fixed"
}
},
{
"id": "custom.fillOpacity",
"value": 0
}
]
}

View File

@@ -2,7 +2,7 @@
title = "Grafana documentation"
description = "Guides, Installation and Feature Documentation"
keywords = ["grafana", "installation", "documentation"]
aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin", "/docs/grafana/v3.1"]
aliases = ["/docs/grafana/v1.1", "/docs/grafana/v8.3/guides/reference/admin", "/docs/grafana/v3.1"]
+++
# Grafana documentation

View File

@@ -2,7 +2,7 @@
title = "Configuration"
description = "Configuration documentation"
keywords = ["grafana", "configuration", "documentation"]
aliases = ["/docs/grafana/latest/installation/configuration/"]
aliases = ["/docs/grafana/v8.3/installation/configuration/"]
weight = 150
+++
@@ -565,11 +565,11 @@ Set to `false` to disable external snapshot publish endpoint (default `true`).
### external_snapshot_url
Set root URL to a Grafana instance where you want to publish external snapshots (defaults to https://snapshots-origin.raintank.io).
Set root URL to a Grafana instance where you want to publish external snapshots (defaults to https://snapshots.raintank.io).
### external_snapshot_name
Set name for external snapshot button. Defaults to `Publish to snapshot.raintank.io`.
Set name for external snapshot button. Defaults to `Publish to snapshots.raintank.io`.
### public_mode
@@ -610,7 +610,7 @@ Path to the default home dashboard. If this value is empty, then Grafana uses St
Set to `false` to prohibit users from being able to sign up / create
user accounts. Default is `false`. The admin user can still create
users from the [Grafana Admin Pages](/reference/admin).
users from the [Grafana Admin Pages]({{< relref "../manage-users/server-admin/server-admin-manage-users.md" >}}).
### allow_org_create
@@ -869,8 +869,6 @@ Email server settings.
Enable this to allow Grafana to send email. Default is `false`.
If the password contains `#` or `;`, then you have to wrap it with triple quotes. Example: """#password;"""
### host
Default is `localhost:25`.
@@ -881,7 +879,7 @@ In case of SMTP auth, default is `empty`.
### password
In case of SMTP auth, default is `empty`.
In case of SMTP auth, default is `empty`. If the password contains `#` or `;`, then you have to wrap it with triple quotes. Example: """#password;"""
### cert_file
@@ -1113,7 +1111,7 @@ Sets a global limit on number of alert rules that can be created. Default is -1
## [unified_alerting]
For more information about the Grafana 8 alerts, refer to [Unified Alerting]({{< relref "../alerting/unified-alerting/_index.md" >}}).
For more information about the Grafana alerts, refer to [Unified Alerting]({{< relref "../alerting/unified-alerting/_index.md" >}}).
### enabled
@@ -1197,15 +1195,15 @@ The interval string is a possibly signed sequence of decimal numbers, followed b
## [alerting]
For more information about the Alerting feature in Grafana, refer to [Alerts overview]({{< relref "../alerting/_index.md" >}}).
For more information about the legacy dashboard alerting feature in Grafana, refer to [Alerts overview]({{< relref "../alerting/_index.md" >}}).
### enabled
Set to `false` to [enable Grafana 8 alerting]({{<relref "#unified_alerting">}}) and to disable legacy alerting engine. Default is `true`.
Set to `false` to [enable Grafana alerting]({{<relref "#unified_alerting">}}) and to disable legacy alerting engine. to disable Grafana alerting, set to `true`.
### execute_alerts
Turns off alert rule execution, but Alerting is still visible in the Grafana UI.
Turns off alert rule execution, but alerting is still visible in the Grafana UI.
### error_or_timeout
@@ -1582,7 +1580,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 `true` by default. Set it to `false` to disable the app.
Available to Grafana administrators only, enables installing / uninstalling / updating plugins directly from the Grafana UI. Set to `true` by default. Setting it to `false` will hide the install / uninstall / update controls.
For more information, refer to [Plugin catalog]({{< relref "../plugins/catalog.md" >}}).
@@ -1711,13 +1709,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

View File

@@ -2,7 +2,7 @@
title = "Configure Grafana Docker image"
description = "Guide for configuring the Grafana Docker image"
keywords = ["grafana", "configuration", "documentation", "docker"]
aliases = ["/docs/grafana/latest/installation/configure-docker/"]
aliases = ["/docs/grafana/v8.3/installation/configure-docker/"]
weight = 200
+++

View File

@@ -0,0 +1,22 @@
+++
title = "Database encryption (Enterprise)"
description = "Grafana Enterprise database encryption"
keywords = ["grafana", "enterprise", "database", "encryption", "documentation"]
aliases = [""]
weight = 440
+++
# Grafana Enterprise database encryption
If you are using Grafana Enterprise, you can change Grafanas cryptographic mode of operation from AES-CFB to AES-GCM, and integrate with a key management system (KMS) provider.
## Changing your encryption mode to AES-GCM
Grafana encrypts secrets using Advanced Encryption Standard in Cipher
FeedBack mode (AES-CFB). You might prefer to use AES in Galois/Counter
Mode (AES-GCM) instead, to meet your companys security requirements or
in order to maintain consistency with other services.
To change your encryption mode, update the `algorithm` value in the
`[security.encryption]` section of your Grafana configuration file.
For details, refer to Enterprise configuration.

View File

@@ -0,0 +1,17 @@
+++
title = "Database encryption"
description = "Grafana database encryption"
keywords = ["grafana", "database", "encryption", "documentation"]
aliases = [""]
weight = 450
+++
# Grafana database encryption
Grafanas database contains secrets, which are used to query data sources, send alert notifications and perform other functions within Grafana.
Grafana encrypts these secrets before they are written to the database, by using a symmetric-key encryption algorithm called Advanced Encryption Standard (AES), and using a [secret key]({{< relref "../administration/configuration/#secret_key" >}}) that you can change when you configure a new Grafana instance.
You can choose to use [envelope encryption]({{< relref "./envelope-encryption.md" >}}), which complements a [KMS integration]({{< relref "../enterprise/kms-integration/_index.md" >}}) in Grafana Enterprise by adding a layer of indirection to the encryption process.
In Grafana Enterprise, you can also choose to [encrypt secrets in AES-GCM mode]({{< relref "../administration/database-encryption-enterprise.md" >}}) instead of AES-CFB.

View File

@@ -0,0 +1,21 @@
+++
title = "Envelope encryption"
description = "Envelope encryption"
keywords = ["grafana", "envelope encryption", "documentation"]
aliases = [""]
weight = 430
+++
# Envelope encryption
In Grafana, you can choose to use envelope encryption. Instead of
encrypting all secrets with a single key, Grafana uses a set of keys
called data encryption keys (DEKs) to encrypt them. These data
encryption keys are themselves encrypted with a single key encryption
key (KEK).
To turn on envelope encryption, add the term `envelopeEncryption` to the list of feature toggles in your [Grafana configuration]({{< relref "../administration/configuration/#feature_toggles" >}}).
> **Note:** Avoid turning off envelope encryption once you have turned it on, and back up your database before turning it on for the first time. If you turn envelope encryption on, create new secrets or update your existing secrets (for example, by creating a new data source or alert notification channel), and then turn envelope encryption off, then those data sources, alert notification channels, and other resources using envelope encryption will stop working and you will experience errors. This is because the secrets encrypted with envelope encryption cannot be decrypted or used by Grafana when envelope encryption is turned off.
Refer to [Database encryption]({{< relref "../administration/database-encryption.md" >}}) to learn more about how Grafana encrypts secrets in the database.

View File

@@ -1,6 +1,6 @@
+++
title = "Preferences"
aliases =["/docs/grafana/latest/administration/preferences.md"]
aliases =["/docs/grafana/v8.3/administration/preferences.md"]
weight = 50
+++

View File

@@ -8,7 +8,7 @@ weight = 100
In Grafana, you can change your names and emails associated with groups or accounts in the Settings or Preferences. This topic provides instructions for each task.
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
{{< docs/shared lookup="preferences/some-tasks-require-permissions.md" source="grafana" version="<GRAFANA VERSION>" >}}
## Change organization name
@@ -19,7 +19,7 @@ Grafana server administrators and organization administrators can change organiz
Follow these instructions if you are a Grafana Server Admin.
{{< docs/list >}}
{{< docs/shared "manage-users/view-server-org-list.md" >}}
{{< docs/shared lookup="manage-users/view-server-org-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
1. In the organization list, click the name of the organization that you want to change.
1. In **Name**, enter the new organization name.
@@ -31,7 +31,7 @@ Follow these instructions if you are a Grafana Server Admin.
If you are an Organization Admin, follow these steps:
{{< docs/list >}}
{{< docs/shared "preferences/org-preferences-list.md" >}}
{{< docs/shared lookup="preferences/org-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
1. In **Organization name**, enter the new name.
1. Click **Update organization name**.

View File

@@ -9,7 +9,7 @@ weight = 200
In Grafana, you can modify the UI theme configured in the Settings or Preferences. Set the UI theme for the server, an organization, a team, or your personal user account using the instructions in this topic.
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
{{< docs/shared lookup="preferences/some-tasks-require-permissions.md" source="grafana" version="<GRAFANA VERSION>" >}}
## Theme options
@@ -42,8 +42,8 @@ To see what the current settings are, refer to [View server settings]({{< relref
Organization administrators can change the UI theme for all users in an organization.
{{< docs/list >}}
{{< docs/shared "preferences/org-preferences-list.md" >}}
{{< docs/shared "preferences/select-ui-theme-list.md" >}}
{{< docs/shared lookup="preferences/org-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared lookup="preferences/select-ui-theme-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< /docs/list >}}
## Change team UI theme
@@ -51,10 +51,10 @@ Organization administrators can change the UI theme for all users in an organiza
Organization and team administrators can change the UI theme for all users in a team.
{{< docs/list >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
{{< docs/shared lookup="manage-users/view-team-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
1. Click on the team that you want to change the UI theme for and then navigate to the **Settings** tab.
{{< docs/shared "preferences/select-ui-theme-list.md" >}}
{{< docs/shared lookup="preferences/select-ui-theme-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< /docs/list >}}
## Change your personal UI theme
@@ -62,6 +62,6 @@ Organization and team administrators can change the UI theme for all users in a
You can change the UI theme for your user account. This setting overrides UI theme settings at higher levels.
{{< docs/list >}}
{{< docs/shared "preferences/navigate-user-preferences-list.md" >}}
{{< docs/shared "preferences/select-ui-theme-list.md" >}}
{{< docs/shared lookup="preferences/navigate-user-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared lookup="preferences/select-ui-theme-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< /docs/list >}}

View File

@@ -9,7 +9,7 @@ weight = 400
By default, Grafana uses the timezone in your web browser. However, you can override this setting at the server, organization, team, or individual user level. This topic provides instructions for each task.
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
{{< docs/shared lookup="preferences/some-tasks-require-permissions.md" source="grafana" version="<GRAFANA VERSION>" >}}
## Set server timezone
@@ -20,8 +20,8 @@ Grafana server administrators can choose a default timezone for all users on the
Organization administrators can choose a default timezone for their organization.
{{< docs/list >}}
{{< docs/shared "preferences/org-preferences-list.md" >}}
{{< docs/shared "preferences/select-timezone-list.md" >}}
{{< docs/shared lookup="preferences/org-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared lookup="preferences/select-timezone-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< /docs/list >}}
## Set team timezone
@@ -29,10 +29,10 @@ Organization administrators can choose a default timezone for their organization
Organization administrators and team administrators can choose a default timezone for all users in a team.
{{< docs/list >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
{{< docs/shared lookup="manage-users/view-team-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
1. Click on the team you that you want to change the timezone for and then navigate to the **Settings** tab.
{{< docs/shared "preferences/select-timezone-list.md" >}}
{{< docs/shared lookup="preferences/select-timezone-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< /docs/list >}}
## Set your personal timezone
@@ -40,6 +40,6 @@ Organization administrators and team administrators can choose a default timezon
You can change the timezone for your user account. This setting overrides timezone settings at higher levels.
{{< docs/list >}}
{{< docs/shared "preferences/navigate-user-preferences-list.md" >}}
{{< docs/shared "preferences/select-timezone-list.md" >}}
{{< docs/shared lookup="preferences/navigate-user-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared lookup="preferences/select-timezone-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< /docs/list >}}

View File

@@ -2,7 +2,7 @@
title = "Change home dashboard"
description = "How to replace the default home dashboard"
keywords = ["grafana", "configuration", "documentation", "home"]
aliases = ["/docs/grafana/latest/administration/change-home-dashboard/"]
aliases = ["/docs/grafana/v8.3/administration/change-home-dashboard/"]
weight = 300
+++
@@ -10,7 +10,7 @@ weight = 300
The home dashboard you set is the one all users will see by default when they log in. You can set the home dashboard for the server, an organization, a team, or your personal user account. This topic provides instructions for each task.
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
{{< docs/shared lookup="preferences/some-tasks-require-permissions.md" source="grafana" version="<GRAFANA VERSION>" >}}
## Navigate to the home dashboard
@@ -47,9 +47,9 @@ default_home_dashboard_path = data/main-dashboard.json
Organization administrators can choose a home dashboard for their organization.
{{< docs/list >}}
{{< docs/shared "preferences/navigate-to-the-dashboard-list.md" >}}
{{< docs/shared "preferences/org-preferences-list.md" >}}
{{< docs/shared "preferences/select-home-dashboard-list.md" >}}
{{< docs/shared lookup="preferences/navigate-to-the-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared lookup="preferences/org-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared lookup="preferences/select-home-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< /docs/list >}}
## Set home dashboard for your team
@@ -57,11 +57,11 @@ Organization administrators can choose a home dashboard for their organization.
Organization administrators and Team Admins can choose a home dashboard for a team.
{{< docs/list >}}
{{< docs/shared "preferences/navigate-to-the-dashboard-list.md" >}}
{{< docs/shared "manage-users/view-team-list.md" >}}
{{< docs/shared lookup="preferences/navigate-to-the-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared lookup="manage-users/view-team-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
1. Click on the team that you want to change the home dashboard for and then navigate to the **Settings** tab.
{{< docs/shared "preferences/select-home-dashboard-list.md" >}}
{{< docs/shared lookup="preferences/select-home-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< /docs/list >}}
## Set your personal home dashboard
@@ -69,7 +69,7 @@ Organization administrators and Team Admins can choose a home dashboard for a te
You can choose your own personal home dashboard. This setting overrides all home dashboards set at higher levels.
{{< docs/list >}}
{{< docs/shared "preferences/navigate-to-the-dashboard-list.md" >}}
{{< docs/shared "preferences/navigate-user-preferences-list.md" >}}
{{< docs/shared "preferences/select-home-dashboard-list.md" >}}
{{< docs/shared lookup="preferences/navigate-to-the-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared lookup="preferences/navigate-user-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared lookup="preferences/select-home-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< /docs/list >}}

View File

@@ -2,7 +2,7 @@
title = "Provisioning"
description = ""
keywords = ["grafana", "provisioning"]
aliases = ["/docs/grafana/latest/installation/provisioning"]
aliases = ["/docs/grafana/v8.3/installation/provisioning"]
weight = 800
+++

View File

@@ -2,7 +2,7 @@
title = "Security"
description = "Security Docs"
keywords = ["grafana", "security", "documentation"]
aliases = ["/docs/grafana/latest/installation/security/"]
aliases = ["/docs/grafana/v8.3/installation/security/"]
weight = 500
+++

View File

@@ -1,7 +1,7 @@
+++
title = "Set up Grafana for high availability"
keywords = ["grafana", "tutorials", "HA", "high availability"]
aliases = ["/docs/grafana/latest/tutorials/ha_setup/"]
aliases = ["/docs/grafana/v8.3/tutorials/ha_setup/"]
weight = 1200
+++

View File

@@ -2,7 +2,7 @@
title = "Internal Grafana metrics"
description = "Internal metrics exposed by Grafana"
keywords = ["grafana", "metrics", "internal metrics"]
aliases = ["/docs/grafana/latest/admin/metrics/"]
aliases = ["/docs/grafana/v8.3/admin/metrics/"]
weight = 200
+++

View File

@@ -2,7 +2,7 @@
title = "View server settings"
description = "How to view server settings in the Grafana UI"
keywords = ["grafana", "configuration", "server", "settings"]
aliases = ["/docs/grafana/latest/admin/view-server-settings/"]
aliases = ["/docs/grafana/v8.3/admin/view-server-settings/"]
weight = 300
+++

View File

@@ -1,7 +1,7 @@
+++
title = "View server stats"
keywords = ["grafana", "server", "statistics"]
aliases = ["/docs/grafana/latest/admin/view-server-stats/"]
aliases = ["/docs/grafana/v8.3/admin/view-server-stats/"]
weight = 400
+++

View File

@@ -7,21 +7,28 @@ weight = 110
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 alerting that centralizes alerting information in a single, searchable view. It allows you to:
Grafana 8.0 introduced new and improved alerting that centralizes alerting information in a single, searchable view. It allows you to:
- Create and manage Grafana alerts
- Create and manage Cortex and Loki managed alerts
- View alerting information from Prometheus and Alertmanager compatible data sources
Grafana 8 alerting has four key components:
Grafana alerting is enabled by default for new OSS installations. For older installations, it is still an [opt-in]({{< relref "./unified-alerting/opt-in.md" >}}) feature.
| Release | Cloud | Enterprise | OSS |
| ----------- | ------------- | ---------- | -------------------------------- |
| Grafana 8.2 | On by default | Opt-in | Opt-in |
| Grafana 8.3 | On by default | Opt-in | On by default for new installs\* |
> **Note:** New installs include existing installs which do not have any alerts configured.
Grafana alerting has four key components:
- 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.
To learn more, see [What's New with Grafana 8 alerting]({{< relref "../alerting/unified-alerting/difference-old-new.md" >}}).
To learn more, see [What's New with Grafana alerting]({{< relref "../alerting/unified-alerting/difference-old-new.md" >}}).
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:** 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.
For information on how to create and manage Grafana alerts and notifications, refer to [Overview of Grafana alerts]({{< relref "../alerting/unified-alerting/_index.md" >}}) and [Create and manage Grafana alerting rules]({{< relref "./unified-alerting/alerting-rules/_index.md" >}}).

View File

@@ -5,9 +5,11 @@ weight = 114
# Legacy Grafana 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.
Grafana alerting is enabled by default for new OSS installations. For older installations, it is still an [opt-in]({{< relref "../unified-alerting/opt-in.md" >}}) feature.
Legacy alerts have two main components:
> **Note**: Legacy dashboard alerts is deprecated and will be removed in a future release. We encourage you to migrate to [Grafana alerting]({{< relref "../unified-alerting/_index.md" >}}) for all existing installations.
Legacy dashboard alerts have two main components:
- Alert rule - 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.
@@ -21,4 +23,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" >}})
{{< docs/shared "alerts/grafana-managed-alerts.md" >}}
{{< docs/shared lookup="alerts/grafana-managed-alerts.md" source="grafana" version="<GRAFANA VERSION>" >}}

View File

@@ -2,7 +2,7 @@
title = "Alert notification templating"
keywords = ["grafana", "documentation", "alerting", "alerts", "notification", "templating"]
weight = 110
aliases = ["/docs/grafana/latest/alerting/add-notification-template/"]
aliases = ["/docs/grafana/v8.3/alerting/add-notification-template/"]
+++
# Alert notification templating

View File

@@ -3,7 +3,7 @@ title = "Create alerts"
description = "Configure alert rules"
keywords = ["grafana", "alerting", "guide", "rules"]
weight = 200
aliases = ["/docs/grafana/latest/alerting/create-alerts/"]
aliases = ["/docs/grafana/v8.3/alerting/create-alerts/"]
+++
# Create alerts

View File

@@ -3,7 +3,7 @@ title = "Alert notifications"
description = "Alerting notifications guide"
keywords = ["Grafana", "alerting", "guide", "notifications"]
weight = 100
aliases = ["/docs/grafana/latest/alerting/notifications/"]
aliases = ["/docs/grafana/v8.3/alerting/notifications/"]
+++
# Alert notifications

View File

@@ -3,7 +3,7 @@ title = "Pause alert rule"
description = "Pause an existing alert rule"
keywords = ["grafana", "alerting", "guide", "rules", "view"]
weight = 400
aliases = ["/docs/grafana/latest/alerting/pause-an-alert-rule/"]
aliases = ["/docs/grafana/v8.3/alerting/pause-an-alert-rule/"]
+++
# Pause an alert rule

View File

@@ -3,7 +3,7 @@ title = "Troubleshoot alerts"
description = "Troubleshoot alert rules"
keywords = ["grafana", "alerting", "guide", "rules", "troubleshoot"]
weight = 500
aliases = ["/docs/grafana/latest/alerting/troubleshoot-alerts/"]
aliases = ["/docs/grafana/v8.3/alerting/troubleshoot-alerts/"]
+++
# Troubleshoot alerts

View File

@@ -3,7 +3,7 @@ title = "View alerts"
description = "View existing alert rules"
keywords = ["grafana", "alerting", "guide", "rules", "view"]
weight = 400
aliases = ["/docs/grafana/latest/alerting/view-alerts/"]
aliases = ["/docs/grafana/v8.3/alerting/view-alerts/"]
+++
# View existing alert rules

View File

@@ -1,25 +1,26 @@
+++
title = "Grafana 8 Alerts"
aliases = ["/docs/grafana/latest/alerting/metrics/"]
title = "Grafana alerts"
aliases = ["/docs/grafana/v8.3/alerting/metrics/"]
weight = 113
+++
# Overview of Grafana 8 alerting
# Overview of Grafana alerting
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" >}}).
Grafana 8.0 has new and improved alerting that centralizes alerting information in a single, searchable view. It is enabled by default for all new OSS instances, and is an [opt-in]({{< relref "./opt-in.md" >}}) feature for older installations that still use legacy dashboard alerting. We encourage you to create issues in the Grafana GitHub repository for bugs found while testing Grafana alerting. See also, [What's New with Grafana alerting]({{< relref "./difference-old-new.md" >}}).
When Grafana 8 alerting is enabled, you can:
When Grafana alerting is enabled, you can:
- [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" >}})
- [Create Grafana managed alerting rules]({{< relref "alerting-rules/create-grafana-managed-rule.md" >}})
- [Create 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" >}})
- [Add or edit silences]({{< relref "./silences.md" >}})
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.
Before you begin using Grafana alerting, we recommend that you familiarize yourself with some [basic concepts]({{< relref "./fundamentals/_index.md" >}}) of Grafana alerting.
## Limitations
- 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.
- The Grafana 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.
- We aim to support the latest two minor versions of both Prometheus and Alertmanager. We cannot guarantee that older versions will work. As an example, if the current Prometheus version is `2.31.1`, we support >= `2.29.0`.

View File

@@ -1,20 +1,20 @@
+++
title = "Create and manage rules"
aliases = ["/docs/grafana/latest/alerting/rules/"]
aliases = ["/docs/grafana/v8.3/alerting/rules/"]
weight = 130
+++
# Create and manage Grafana 8 alerting rules
# Create and manage Grafana alerting rules
An alerting rule is a set of evaluation criteria that determines whether an alert will fire. The rule consists of one or more queries and expressions, a condition, the frequency of evaluation, and optionally, the duration over which the condition is met.
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:
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 hfundamentalsealth of alerting rules]({{< relref "../fundamentals/state-and-health.md" >}})
- [State and health of alerting rules]({{< relref "../fundamentals/state-and-health.md" >}})
- [Manage alerting rules]({{< relref "./rule-list.md" >}})

View File

@@ -7,54 +7,32 @@ 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 and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in [templates]({{< relref "../message-templating/" >}}) and [template functions]({{< relref "../message-templating/template-functions" >}}) to create notification contact dynamically.
## 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.
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 point message templates.
## 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.
Labels are key-value pairs that contain information about, and are used to uniquely identify an alert. The label set for an alert is generated and added to throughout the alerting evaluation and notification process.
### How are labels used?
- The complete set of labels for an alert is what uniquely identifies an alert within Grafana Alerts.
- The Alertmanager uses labels to match alerts for [silences]({{< relref "../silences/" >}}) and [alert groups]({{< relref "../alert-groups/" >}}) in [notification policies]({{< relref "../notification-policies/" >}}).
- The alerting UI displays labels for every alert instance generated by the evaluation of that rule.
- Contact points can access labels to dynamically generate notifications that contain information specific to the alert that is resulting in a notification.
- Labels can be added to an [alerting rule]({{< relref "../alerting-rules/" >}}). These manually configured labels are able to use template functions and reference other labels. Labels added to an alerting rule here take precedence in the event of a collision between labels.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-details-8-0.png" max-width="550px" caption="Alert details" >}}
#### Template variables
#### Variables available to alerting rule labels and annotations
The following template variables are available when expanding annotations and labels.
| Name | Description |
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. This is unavailable when the rule uses a classic condition. |
| $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 | string - JSON Object with `"expr"` and `"datasource"` fields | string | Returns the path to graphical view in [Explore](https://grafana.com/docs/grafana/latest/explore/) for the given expression and data source. |
| tableLink | string- JSON Object with `"expr"` and `"datasource"` fields | string | Returns the path to tabular view in [Explore](https://grafana.com/docs/grafana/latest/explore/) for the given expression and data source. |
| 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 |
| Name | Description |
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. This is unavailable when the rule uses a [classic condition]({{< relref "./create-grafana-managed-rule/#single-and-multi-dimensional-rule" >}}). |
| $values | The values of all reduce and math expressions that were evaluated for this alert rule. For example, `{{ $values.A }}`, `{{ $values.A.Labels }}` and `{{ $values.A.Value }}` where `A` is the `refID` of the expression. 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 ]`. |

View File

@@ -29,10 +29,10 @@ For Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the r
- 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" >}}
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-alert-type-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 2, add the query to evaluate.
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-cortex-query-8-0.png" max-width="550px" caption="Alert details" >}}
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-query-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 3, add additional metadata associated with the rule.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "./alert-annotation-label.md" >}}).
- Add Runbook URL, panel, dashboard, and alert IDs.

View File

@@ -11,11 +11,13 @@ Grafana allows you to create alerting rules for an external Cortex or Loki insta
## Before you begin
For Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the ruler API by configuring their respective services.
- Verify that you have write permission to the Prometheus data source. Otherwise, you will not be able to create or update Cortex managed alerting rules.
**Loki** - The `local` rule storage type, default for the Loki data source, supports only viewing of rules. To edit rules, configure one of the other rule storage types.
- For Cortex and Loki data sources, enable the ruler API by configuring their respective services.
**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.
- **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** - 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.
> **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.
@@ -29,10 +31,10 @@ For Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the r
- 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" >}}
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-alert-type-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 2, add the query to evaluate.
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
{{< figure src="/static/img/docs/alerting/unified/rule-edit-cortex-query-8-0.png" max-width="550px" caption="Alert details" >}}
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-query-8-0.png" max-width="550px" caption="Alert details" >}}
1. In Step 3, add conditions.
- 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.

View File

@@ -48,7 +48,7 @@ Use the classic condition expression to create a rule that triggers a single ale
To generate a separate alert for each series, create a multi-dimensional rule. Use `Math`, `Reduce`, or `Resample` expressions to create a multi-dimensional rule. For example:
- Add a `Reduce` expression for each query to aggregate values in the selected time range into a single value. (Not needed for [rules using numeric data]({{< relref "../fundamentals/grafana-managed-numeric-rule.md" >}})).
- 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')
@@ -63,13 +63,14 @@ For more information, see [expressions documentation]({{< relref "../../../panel
Configure alerting behavior in the absence of data using information in the following tables.
| No Data Option | Description |
| -------------- | ----------------------------------------------------------------------------------------------------- |
| No Data | Set alert state to `NoData` and rule state to `Normal` (notifications are not sent on NoData states). |
| Alerting | Set alert rule state to `Alerting`. |
| Ok | Set alert rule state to `Normal`. |
| No Data Option | Description |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| No Data | Create a new alert `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
| Alerting | Set alert rule state to `Alerting`. |
| Ok | Set alert rule state to `Normal`. |
| Error or timeout option | Description |
| ----------------------- | ---------------------------------- |
| Alerting | Set alert rule state to `Alerting` |
| OK | Set alert rule state to `Normal` |
| Error or timeout option | Description |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| Alerting | Set alert rule state to `Alerting` |
| OK | Set alert rule state to `Normal` |
| Error | Create a new alert `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |

View File

@@ -9,9 +9,9 @@ weight = 405
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')
![Group list](/static/img/docs/alerting/unified/rule-list-edit-mimir-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" >}}
{{< figure src="/static/img/docs/alerting/unified/rule-list-edit-mimir-loki-icon-8-2.png" max-width="550px" caption="Alert details" >}}
## Rename a namespace
@@ -36,4 +36,4 @@ The rules within a group are run sequentially at a regular interval, the default
When you rename the group, a new group with all the rules from the old group is created. The old group is deleted.
![Group edit modal](/static/img/docs/alerting/unified/rule-list-cortex-loki-edit-ns-group-8-2.png 'Rule group edit modal screenshot')
![Group edit modal](/static/img/docs/alerting/unified/rule-list-mimir-loki-edit-ns-group-8-2.png 'Rule group edit modal screenshot')

View File

@@ -7,7 +7,7 @@ weight = 430
# Contact points
Use contact points to define how your contacts are notified when an alert fires. A contact point can have one or more contact point types, for example, email, slack, webhook, and so on. When an alert fires, a notification is sent to all contact point types listed for a contact point. Optionally, use [mesasge templates]({{< relref "./message-templating/_index.md" >}}) to customize notification messages for the contact point types.
Use contact points to define how your contacts are notified when an alert fires. A contact point can have one or more contact point types, for example, email, slack, webhook, and so on. When an alert fires, a notification is sent to all contact point types listed for a contact point. Optionally, use [message templates]({{< relref "./message-templating/_index.md" >}}) to customize notification messages for the contact point types.
You can configure Grafana managed contact points as well as contact points for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager.md" >}}). For more information, see [Alertmanager]({{< relref "./fundamentals/alertmanager.md" >}}).
@@ -64,27 +64,27 @@ To edit global configuration options for an external Alertmanager, like SMTP ser
## List of notifiers supported by Grafana
| Name | Type |
| --------------------------------------------- | ------------------------- |
| [DingDing](#dingdingdingtalk) | `dingding` |
| [Discord](#discord) | `discord` |
| [Email](#email) | `email` |
| [Google Hangouts Chat](#google-hangouts-chat) | `googlechat` |
| [Kafka](#kafka) | `kafka` |
| Line | `line` |
| Microsoft Teams | `teams` |
| [Opsgenie](#opsgenie) | `opsgenie` |
| [Pagerduty](#pagerduty) | `pagerduty` |
| Prometheus Alertmanager | `prometheus-alertmanager` |
| [Pushover](#pushover) | `pushover` |
| Sensu | `sensu` |
| [Sensu Go](#sensu-go) | `sensugo` |
| [Slack](#slack) | `slack` |
| Telegram | `telegram` |
| Threema | `threema` |
| VictorOps | `victorops` |
| [Webhook](#webhook) | `webhook` |
| [Zenduty](#zenduty) | `webhook` |
| Name | Type | Grafana Alertmanager | Other Alertmanagers |
| --------------------------------------------- | ------------------------- | -------------------- | -------------------------------------------------------------------------------------------------------- |
| [DingDing](#dingdingdingtalk) | `dingding` | Supported | N/A |
| [Discord](#discord) | `discord` | Supported | N/A |
| [Email](#email) | `email` | Supported | Supported |
| [Google Hangouts Chat](#google-hangouts-chat) | `googlechat` | Supported | N/A |
| [Kafka](#kafka) | `kafka` | Supported | N/A |
| Line | `line` | Supported | N/A |
| Microsoft Teams | `teams` | Supported | N/A |
| [Opsgenie](#opsgenie) | `opsgenie` | Supported | Supported |
| [Pagerduty](#pagerduty) | `pagerduty` | Supported | Supported |
| Prometheus Alertmanager | `prometheus-alertmanager` | Supported | N/A |
| [Pushover](#pushover) | `pushover` | Supported | Supported |
| Sensu | `sensu` | Supported | N/A |
| [Sensu Go](#sensu-go) | `sensugo` | Supported | N/A |
| [Slack](#slack) | `slack` | Supported | Supported |
| Telegram | `telegram` | Supported | N/A |
| Threema | `threema` | Supported | N/A |
| VictorOps | `victorops` | Supported | Supported |
| [Webhook](#webhook) | `webhook` | Supported | Supported ([different format](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config)) |
| [Zenduty](#zenduty) | `webhook` | Supported | N/A |
### Webhook

View File

@@ -1,13 +1,13 @@
+++
title = "What's new in Grafana 8 alerting"
description = "What's New with Grafana 8 Alerts"
title = "What's new in Grafana alerting"
description = "What's New with Grafana alerts"
keywords = ["grafana", "alerting", "guide"]
weight = 114
+++
# What's new in Grafana 8 alerting
# What's new in Grafana alerting
Grafana 8.0 alerting has several enhancements over legacy dashboard alerting.
Grafana alerting has several enhancements over legacy dashboard alerting.
## Multi-dimensional alerting
@@ -15,12 +15,27 @@ You can now create alerts that give you system-wide visibility with a single ale
## 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.
Unlike legacy dashboard alerts, Grafana 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.
Since unified alerts are no longer directly tied to panel queries, they do not include images or query values in the notification email. You can use customized notification templates to view query values.
## 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.
In Grafana 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.
## Special alerts for alert state NoData and Error
Grafana alerting introduced a new concept of the alert states. When evaluation of an alerting rule produces state NoData or Error, Grafana alerting will generate special alerts that will have the following labels:
- `alertname` with value DatasourceNoData or DatasourceError depending on the state.
- `rulename` name of the alert rule the special alert belongs to.
- `datasource_uid` will have the UID of the data source that caused the state.
- all labels and annotations of the original alert rule
You can handle these alerts the same way as regular alerts by adding a silence, route to a contact point, and so on.
> **Note:** If the rule uses many data sources and one or many returns no data, the special alert will be created for each data source that caused the alert state.

View File

@@ -1,6 +1,6 @@
+++
title = "Alerting fundamentals"
aliases = ["/docs/grafana/latest/alerting/metrics/"]
aliases = ["/docs/grafana/v8.3/alerting/metrics/"]
weight = 120
+++

View File

@@ -1,6 +1,6 @@
+++
title = "Alertmanager"
aliases = ["/docs/grafana/latest/alerting/metrics/"]
aliases = ["/docs/grafana/v8.3/alerting/metrics/"]
weight = 116
+++
@@ -10,9 +10,9 @@ The Alertmanager helps both group and manage alert rules, adding a layer of orch
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.
> **Note:** Before v8.2, the configuration of the embedded Alertmanager was shared across organizations. If you are on an older Grafana version, we recommend that you use Grafana alerts only if you have one organization. Otherwise, your contact points are visible to all organizations.
Grafana 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.
Grafana alerting added support for external Alertmanager configuration. When you add an [Alertmanager data source]({{< relref "../../../datasources/alertmanager.md" >}}), the Alertmanager drop-down shows a list of available external Alertmanager data sources. Select a data source to create and manage alerting for standalone 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

@@ -1,6 +1,6 @@
+++
title = "Alerting on numeric data"
aliases = ["/docs/grafana/latest/alerting/metrics/"]
aliases = ["/docs/grafana/v8.3/alerting/metrics/"]
weight = 116
+++
@@ -17,7 +17,7 @@ Grafana managed alerts query the following backend data sources that have alerti
- 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" >}}))
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json](https://grafana.com/developers/plugin-tools/reference-plugin-json))
### Metrics from the alerting engine

View File

@@ -1,7 +1,7 @@
+++
title = "Message templating"
description = "Message templating"
aliases = ["/docs/grafana/latest/alerting/message-templating/"]
aliases = ["/docs/grafana/v8.3/alerting/message-templating/"]
keywords = ["grafana", "alerting", "guide", "contact point", "templating"]
weight = 440
+++
@@ -14,7 +14,7 @@ Since most of the contact point fields can be templated, you can create reusable
### Using templates
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.
The following example shows how to use default templates to render an alert message in Slack. The message title contains a count of alerts that are firing or were resolved. The message body lists the alerts and their status.
<img src="/static/img/docs/alerting/unified/contact-points-template-fields-8-0.png" width="450px">
@@ -52,12 +52,41 @@ The `define` tag in the Content section assigns the template name. This tag is o
Use caution when deleting a template since Grafana does not prevent you from deleting templates that are in use.
### Nested templates
You can embed templates within other templates.
For example, you can define a template fragment using the `define` keyword:
```
{{ define "mytemplate" }}
{{ len .Alerts.Firing }} firing. {{ len .Alerts.Resolved }} resolved.
{{ end }}
```
You can then embed custom templates within this fragment using the `template` keyword. For example:
```
Alert summary:
{{ template "mytemplate" . }}
```
You can use any of the following built-in template options to embed custom templates.
| Name | Notes |
| ----------------------- | ------------------------------------------------------------- |
| `default.title` | Displays high-level status information. |
| `default.message` | Provides a formatted summary of firing and resolved alerts. |
| `teams.default.message` | Similar to `default.messsage`, formatted for Microsoft Teams. |
### Custom template examples
Here are a few examples of how to use custom templates.
Template to render a single alert:
```
{{ define "alert" }}
{{ define "myalert" }}
[{{.Status}}] {{ .Labels.alertname }}
Labels:
@@ -84,14 +113,20 @@ Template to render a single alert:
Template to render entire notification message:
```
{{ define "message" }}
{{ define "mymessage" }}
{{ if gt (len .Alerts.Firing) 0 }}
{{ len .Alerts.Firing }} firing:
{{ range .Alerts.Firing }} {{ template "alert" .}} {{ end }}
{{ range .Alerts.Firing }} {{ template "myalert" .}} {{ end }}
{{ end }}
{{ if gt (len .Alerts.Resolved) 0 }}
{{ len .Alerts.Resolved }} resolved:
{{ range .Alerts.Resolved }} {{ template "alert" .}} {{ end }}
{{ range .Alerts.Resolved }} {{ template "myalert" .}} {{ end }}
{{ end }}
{{ end }}
```
### HTML in Message Templates
HTML in alerting message templates is escaped. We do not support rendering of HTML in the resulting notification.
Some notifiers support alternative methods of changing the look and feel of the resulting notification. For example, Grafana installs the base template for alerting emails to `<grafana-install-dir>/public/emails/ng_alert_notification.html`. You can edit this file to change the appearance of all alerting emails.

View File

@@ -59,17 +59,3 @@ In addition to direct access of data (labels and annotations) stored as KeyValue
| Remove | []string | KeyValue | Returns a copy of the Key/Value map without the given keys. |
| Names | | []string | List of label names |
| Values | | []string | List of label values |
## Functions
Some functions to transform values are also available, along with [default functions provided by Go templating](https://golang.org/pkg/text/template/#hdr-Functions).
| Name | Arguments | Returns |
| ------------ | ---------------------------- | ------------------------------------------------------------------------------------------------------------ |
| title | string | Capitalizes first character of each word. |
| toUpper | string | Converts all characters to upper case. |
| match | pattern, string | Match a string using RegExp. |
| reReplaceAll | pattern, replacement, string | RegExp substitution, unanchored. |
| join | string, []string | Concatenates the elements of the second argument to create a single string. First argument is the separator. |
| safeHtml | string | Marks string as HTML, not requiring auto-escaping. |
| stringSlice | ...string | Returns passed strings as slice of strings. |

View File

@@ -0,0 +1,138 @@
+++
title = "Template functions"
keywords = ["grafana", "alerting", "guide", "contact point", "templating"]
+++
# Template Functions
Template functions allow you to process labels and annotations to generate dynamic notifications.
| Name | Argument type | Return type | Description |
| ----------------------------------------- | ------------------------------------------------------------ | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| [humanize](#humanize) | number or string | string | Converts a number to a more readable format, using metric prefixes. |
| [humanize1024](#humanize1024) | number or string | string | Like humanize, but uses 1024 as the base rather than 1000. |
| [humanizeDuration](#humanizeduration) | number or string | string | Converts a duration in seconds to a more readable format. |
| [humanizePercentage](#humanizepercentage) | number or string | string | Converts a ratio value to a fraction of 100. |
| [humanizeTimestamp](#humanizetimestamp) | number or string | string | Converts a Unix timestamp in seconds to a more readable format. |
| [title](#title) | string | string | strings.Title, capitalises first character of each word. |
| [toUpper](#toupper) | string | string | strings.ToUpper, converts all characters to upper case. |
| [toLower](#tolower) | string | string | strings.ToLower, converts all characters to lower case. |
| [match](#match) | pattern, text | boolean | regexp.MatchString Tests for a unanchored regexp match. |
| [reReplaceAll](#rereplaceall) | pattern, replacement, text | string | Regexp.ReplaceAllString Regexp substitution, unanchored. |
| [graphLink](#graphlink) | string - JSON Object with `"expr"` and `"datasource"` fields | string | Returns the path to graphical view in [Explore](https://grafana.com/docs/grafana/v8.3/explore/) for the given expression and data source. |
| [tableLink](#tablelink) | string- JSON Object with `"expr"` and `"datasource"` fields | string | Returns the path to tabular view in [Explore](https://grafana.com/docs/grafana/v8.3/explore/) for the given expression and data source. |
| [args](#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](#externalurl) | nothing | string | Returns a string representing the external URL. |
| [pathPrefix](#pathprefix) | nothing | string | Returns the path of the external URL. |
## Examples
### humanize
**Template string** `{ humanize $value }`
**Input** `1234567.0`
**Expected** `1.235M`
### humanize1024
**TemplateString** `{ humanize1024 $value } `
**Input** `1048576.0`
**Expected** `1Mi`
### humanizeDuration
**TemplateString** `{ humanizeDuration $value }`
**Input** `899.99`
**Expected** `14m 59s`
### humanizePercentage
**TemplateString** `{ humanizePercentage $value }`
**Input** `0.1234567`
**Expected** `12.35%`
### humanizeTimestamp
**TemplateString** `{ $value | humanizeTimestamp }`
**Input** `1435065584.128`
**Expected** `2015-06-23 13:19:44.128 +0000 UTC`
### title
**TemplateString** `{ $value | title }`
**Input** `aa bb CC`
**Expected** `Aa Bb Cc`
### toUpper
**TemplateString** `{ $value | toUpper }`
**Input** `aa bb CC`
**Expected** `AA BB CC`
### toLower
**TemplateString** `{ $value | toLower }`
**Input** `aA bB CC`
**Expected** `aa bb cc`
### match
**TemplateString** `{ match "a+" $labels.instance }`
**Input** `aa`
**Expected** `true`
### reReplaceAll
**TemplateString** `{{ reReplaceAll "localhost:(.*)" "my.domain:$1" $labels.instance }}`
**Input** `localhost:3000`
**Expected** `my.domain:3000`
### graphLink
**TemplateString** `{{ graphLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}`
**Expected** `/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":false,"range":true}]`
### tableLink
**TemplateString** `{{ tableLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}`
**Expected** `/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":true,"range":false}]`
### args
**TemplateString** `{{define "x"}}{{.arg0}} {{.arg1}}{{end}}{{template "x" (args 1 "2")}}`
**Expected** `1 2`
### externalURL
**TemplateString** `{ externalURL }`
**Expected** `http://localhost/path/prefix`
### pathPrefix
**TemplateString** `{ pathPrefix }`
**Expected** `/path/prefix`

View File

@@ -11,6 +11,20 @@ Notification policies determine how alerts are routed to contact points. Policie
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" >}}).
## Grouping
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/notification-policies-grouping.png" max-width="650px" caption="Notification policies grouping" >}}
Grouping is a new and key concept of Grafana alerting that categorizes alert notifications of similar nature into a single funnel. This allows you to properly route alert notifications during larger outages when many parts of a system fail at once causing a high number of alerts to fire simultaneously.
For example, suppose you have 100 services connected to a database in different environments. These services are differentiated by the label `env=environmentname`. An alert rule is in place to monitor whether your services can reach the database named `alertname=DatabaseUnreachable`.
When a network partition occurs, half of your services can no longer reach the database. As a result, 50 different alerts (assuming half of your services) are fired. For this situation, you want to receive a single-page notification (as opposed to 50) with a list of the environments that are affected.
You can configure grouping to be `group_by: [alertname]` (take note that the `env` label is omitted). With this configuration in place, Grafana sends a single compact notification that has all the affected environments for this alert rule.
> **Note:** Grafana also has a special label named `...` that you can use to group all alerts by all labels (effectively disabling grouping), therefore each alert will go into its own group. It is different from the default of `group_by: null` where **all** alerts go into a single group.
## Edit root notification policy
> **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.

View File

@@ -1,56 +1,60 @@
+++
title = "Opt-in to Grafana 8 alerting"
description = "Enable Grafana 8 Alerts"
title = "Opt-in to Grafana alerting"
description = "Enable Grafana alerts"
weight = 115
+++
# Opt-in to Grafana 8 alerting
# Opt-in to Grafana alerting
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.
Grafana alerting is enabled by default for new Cloud and OSS installations.
**Note:** If you are an existing Grafana Cloud user and want to explore unified alerting, contact Grafana Support. They will enable unified alerting for your Cloud stack.
For older OSS installations that use legacy dashboard alerts, unified alerting is still an opt-in feature. This topic describes how to opt-in to Grafana alerting if you have an existing Grafana installation and the rules and restrictions that govern the migration of existing dashboard alerts to the new alerting system. You can [disable Grafana alerts]({{< relref "./opt-in.md#disable-grafana-alerts" >}}) and use the legacy dashboard alerting if needed.
Before you begin, we recommend that you backup Grafana's database. If you are using PostgreSQL as the backend database, then the minimum required version is 9.5.
## Enable Grafana 8 alerting
## Enable Grafana alerting
To enable Grafana 8 alerts:
To enable Grafana alerts:
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.
> **Note:** The `ngalert` toggle previously used to enable or disable Grafana 8 alerting is no longer available.
> **Note:** The `ngalert` toggle previously used to enable or disable Grafana 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
## Migrating legacy alerts to Grafana 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.
When Grafana alerting is enabled or Grafana is upgraded to version 8.3, existing legacy dashboard alerts migrate in a format compatible with the Grafana 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:
Read and write access to legacy dashboard alerts and Grafana 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.
> **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.
> **Note:** Since there is no `Keep Last State` option for [`No Data`]({{< relref "./alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) in Grafana alerting, this option becomes `NoData` during the legacy rules migration. Option "Keep Last State" for [`Error handling`]({{< relref "./alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a [silence]({{< relref "./silences.md" >}}) for each alert rule with a duration of 1 year.
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` 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.
Since `Hipchat` and `Sensu` notification channels are no longer supported, legacy alerts associated with these channels are not automatically migrated to Grafana 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.
### Limitation
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.
Grafana alerting system can retrieve rules from all available Prometheus, Loki, and Alertmanager data sources. It might not be able to fetch alerting rules from all other supported data sources at this time.
## Disable Grafana 8 alerts
## Disable Grafana alerts
To disable Grafana 8 alerts and enable legacy dashboard alerts:
To disable Grafana 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. In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the [Grafana 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.
> **Note:** Switching from one flavor of alerting to another can result in data loss. This is applicable to the fresh installation as well as upgraded setups.

View File

@@ -2,7 +2,7 @@
title = "Auth Proxy"
description = "Grafana Auth Proxy Guide "
keywords = ["grafana", "configuration", "documentation", "proxy"]
aliases = ["/docs/grafana/latest/tutorials/authproxy/"]
aliases = ["/docs/grafana/v8.3/tutorials/authproxy/"]
weight = 200
+++

View File

@@ -16,7 +16,7 @@ settings page). When you create the application you will need to specify
a callback URL. Specify this as callback:
```bash
http://<my_grafana_server_name_or_ip>:<grafana_server_port>/login/github
http://<my_grafana_server_name_or_ip>:<grafana_server_port>/grafana/login/github
```
This callback URL must match the full HTTP address that you use in your

View File

@@ -2,7 +2,7 @@
title = "LDAP Authentication"
description = "Grafana LDAP Authentication Guide "
keywords = ["grafana", "configuration", "documentation", "ldap", "active directory"]
aliases = ["/docs/grafana/latest/installation/ldap/"]
aliases = ["/docs/grafana/v8.3/installation/ldap/"]
weight = 300
+++

View File

@@ -2,7 +2,7 @@
title = "SAML Authentication"
description = "Grafana SAML Authentication"
keywords = ["grafana", "saml", "documentation", "saml-auth"]
aliases = ["/docs/grafana/latest/auth/saml/"]
aliases = ["/docs/grafana/v8.3/auth/saml/"]
weight = 1100
+++

View File

@@ -2,7 +2,7 @@
title = "Team Sync"
description = "Grafana Team Sync"
keywords = ["grafana", "auth", "documentation"]
aliases = ["/docs/grafana/latest/auth/saml/"]
aliases = ["/docs/grafana/v8.3/auth/saml/"]
weight = 1200
+++

View File

@@ -7,8 +7,8 @@ weight = 15
This section provides basic information about observability topics in general and Grafana in particular. These topics will help people who are just starting out with observability and monitoring.
{{< docs/shared "basics/what-is-grafana.md" >}}
{{< docs/shared lookup="basics/what-is-grafana.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared "basics/grafana-cloud.md" >}}
{{< docs/shared lookup="basics/grafana-cloud.md" source="grafana" version="<GRAFANA VERSION>" >}}
{{< docs/shared "basics/grafana-enterprise.md" >}}
{{< docs/shared lookup="basics/grafana-enterprise.md" source="grafana" version="<GRAFANA VERSION>" >}}

View File

@@ -2,7 +2,7 @@
title = "Glossary"
description = "Grafana glossary"
keywords = ["grafana", "intro", "glossary", "dictionary"]
aliases = ["/docs/grafana/latest/guides/glossary", "/docs/grafana/latest/getting-started/glossary"]
aliases = ["/docs/grafana/v8.3/guides/glossary", "/docs/grafana/v8.3/getting-started/glossary"]
weight = 800
+++
@@ -44,7 +44,7 @@ This topic lists words and abbreviations that are commonly used in the Grafana d
<tr>
<td style="vertical-align: top">Explore</td>
<td>
Explore allows a user to focus on building a query. Users can refine the query to return the expected metrics before building a dashboard. For more information, refer to the <a href="https://grafana.com/docs/grafana/latest/explore">Explore</a> topic.
Explore allows a user to focus on building a query. Users can refine the query to return the expected metrics before building a dashboard. For more information, refer to the <a href="https://grafana.com/docs/grafana/v8.3/explore">Explore</a> topic.
</td>
</tr>
<tr>
@@ -116,7 +116,7 @@ This topic lists words and abbreviations that are commonly used in the Grafana d
<tr>
<td style="vertical-align: top">transformation</td>
<td>
Transformations process the result set of a query before its passed on for visualization. For more information, refer to the <a href="https://grafana.com/docs/grafana/latest/panels/transformations">Transformations overview</a> topic.
Transformations process the result set of a query before its passed on for visualization. For more information, refer to the <a href="https://grafana.com/docs/grafana/v8.3/panels/transformations">Transformations overview</a> topic.
</td>
</tr>
<tr>

View File

@@ -2,7 +2,7 @@
title = "Histograms and heatmaps"
description = "An introduction to histograms and heatmaps"
keywords = ["grafana", "heatmap", "panel", "documentation", "histogram"]
aliases = ["/docs/grafana/latest/getting-started/intro-histograms"]
aliases = ["/docs/grafana/v8.3/getting-started/intro-histograms"]
weight = 700
+++

View File

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

View File

@@ -2,7 +2,7 @@
title = "Common observability strategies"
description = "Common observability strategies"
keywords = ["grafana", "intro", "guide", "concepts", "methods"]
aliases = ["/docs/grafana/latest/getting-started/strategies/"]
aliases = ["/docs/grafana/v8.3/getting-started/strategies/"]
weight = 300
+++

View File

@@ -1,6 +1,6 @@
+++
title = "Dashboards"
aliases = ["/docs/grafana/latest/features/dashboard/dashboards/"]
aliases = ["/docs/grafana/v8.3/features/dashboard/dashboards/"]
weight = 80
+++

View File

@@ -1,7 +1,7 @@
+++
title = "Annotations"
keywords = ["grafana", "annotations", "documentation", "guide"]
aliases = ["/docs/grafana/latest/reference/annotations/"]
aliases = ["/docs/grafana/v8.3/reference/annotations/"]
weight = 2
+++

View File

@@ -1,7 +1,7 @@
+++
title = "Dashboard Folders"
keywords = ["grafana", "dashboard", "dashboard folders", "folder", "folders", "documentation", "guide"]
aliases = ["/docs/grafana/latest/reference/dashboard_folders/"]
aliases = ["/docs/grafana/v8.3/reference/dashboard_folders/"]
weight = 3
+++

View File

@@ -1,7 +1,7 @@
+++
title = "Dashboard Version History"
keywords = ["grafana", "dashboard", "documentation", "version", "history"]
aliases = ["/docs/grafana/latest/reference/dashboard_history/"]
aliases = ["/docs/grafana/v8.3/reference/dashboard_history/"]
weight = 100
+++

View File

@@ -1,7 +1,7 @@
+++
title = "Export and import"
keywords = ["grafana", "dashboard", "documentation", "export", "import"]
aliases = ["/docs/grafana/latest/reference/export_import/"]
aliases = ["/docs/grafana/v8.3/reference/export_import/"]
weight = 800
+++

View File

@@ -1,7 +1,7 @@
+++
title = "JSON model"
keywords = ["grafana", "dashboard", "documentation", "json", "model"]
aliases = ["/docs/grafana/latest/reference/dashboard/"]
aliases = ["/docs/grafana/v8.3/reference/dashboard/"]
weight = 1200
+++

View File

@@ -1,7 +1,7 @@
+++
title = "Playlist"
keywords = ["grafana", "dashboard", "documentation", "playlist"]
aliases = ["/docs/grafana/latest/reference/playlist/"]
aliases = ["/docs/grafana/v8.3/reference/playlist/"]
weight = 4
+++

View File

@@ -2,7 +2,7 @@
title = "Reporting"
description = ""
keywords = ["grafana", "reporting"]
aliases = ["/docs/grafana/latest/administration/reports"]
aliases = ["/docs/grafana/v8.3/administration/reports"]
weight = 8
+++

View File

@@ -1,7 +1,7 @@
+++
title = "Scripted dashboards"
keywords = ["grafana", "dashboard", "documentation", "scripted"]
aliases = ["/docs/grafana/latest/reference/scripting/"]
aliases = ["/docs/grafana/v8.3/reference/scripting/"]
weight = 1500
+++

View File

@@ -1,7 +1,7 @@
+++
title = "Search"
keywords = ["grafana", "dashboard", "documentation", "search"]
aliases =["/docs/grafana/latest/reference/search/"]
aliases =["/docs/grafana/v8.3/reference/search/"]
weight = 5
+++

View File

@@ -1,13 +1,13 @@
+++
title = "Time range controls"
keywords = ["grafana", "dashboard", "documentation", "time range"]
aliases = ["/docs/grafana/latest/reference/timerange/"]
aliases = ["/docs/grafana/v8.3/reference/timerange/"]
weight = 7
+++
# Time range controls
Grafana provides several ways to manage the time ranges of the data being visualized, both at the dashboard level and the panel level.
Grafana provides several ways to manage the time ranges of the data being visualized, for dashboard, panels and also for alerting.
This page describes supported time units and relative ranges, the common time controls, dashboard-wide time settings, and panel-specific time settings.
@@ -34,11 +34,18 @@ Here are some examples:
| This Year | `now/Y` | `now/Y` |
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
### Note about Grafana alerting
For Grafana alerting, we do not support are the following syntaxes at this time.
- now+n for future timestamps.
- now-1n/n for "start of n until end of n" since this is an absolute timestamp.
## Common time range controls
The dashboard and panel time controls have a common user interface (UI).
<img class="no-shadow" src="/static/img/docs/time-range-controls/common-time-controls-8-2.png" max-width="700px">
<img class="no-shadow" src="/static/img/docs/time-range-controls/common-time-controls-7-0.png" max-width="700px">
The options are defined below.
@@ -112,6 +119,8 @@ For more advanced time settings, click the **Dashboard settings** (gear) icon at
In [Query options]({{< relref "../panels/queries.md#query-options" >}}), you can override the relative time range for individual panels, causing them to be different than what is selected in the dashboard time picker in the upper right. This allows you to show metrics from different time periods or days at the same time.
> **Note:** Panel time overrides have no effect when the time range for the dashboard is absolute.
## Control the time range using a URL
Time range of a dashboard can be controlled by providing following query parameters in the dashboard URL:

View File

@@ -1,6 +1,6 @@
+++
title = "Data sources"
aliases = ["/docs/grafana/latest/datasources/overview/"]
aliases = ["/docs/grafana/v8.3/datasources/overview/"]
weight = 60
+++

View File

@@ -1,6 +1,6 @@
+++
title = "Add data source"
aliases = ["/docs/grafana/latest/features/datasources/add-a-data-source/"]
aliases = ["/docs/grafana/v8.3/features/datasources/add-a-data-source/"]
weight = 100
+++

View File

@@ -2,13 +2,13 @@
title = "Alertmanager"
description = "Guide for using Alertmanager in Grafana"
keywords = ["grafana", "prometheus", "guide"]
aliases = ["/docs/grafana/latest/features/datasources/alertmanager"]
aliases = ["/docs/grafana/v8.3/features/datasources/alertmanager"]
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/v8.3/administration/configuration/#enable_alpha). Once you add it as a data source, you can use the [Grafana alerting UI](https://grafana.com/docs/grafana/v8.3/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.
## Alertmanager implementations

View File

@@ -2,54 +2,29 @@
title = "AWS CloudWatch"
description = "Guide for using CloudWatch in Grafana"
keywords = ["grafana", "cloudwatch", "guide"]
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
aliases = ["/docs/grafana/v8.3/datasources/cloudwatch"]
weight = 200
+++
# AWS CloudWatch data source
Grafana ships with built-in support for CloudWatch. Add it as a data source, then you are ready to build dashboards or use Explore with CloudWatch metrics and CloudWatch Logs.
Grafana ships with built-in support for CloudWatch. This topic describes queries, templates, variables, and other configuration specific to the CloudWatch data source. For instructions on how to add a data source to Grafana, refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}). Only users with the organization admin role can add data sources.
This topic describes queries, templates, variables, and other configuration specific to the CloudWatch data source. For instructions on how to add a data source to Grafana, refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}). Only users with the organization admin role can add data sources.
Once you have added the Cloudwatch data source, you can build dashboards or use Explore with CloudWatch metrics and CloudWatch Logs.
> **Note:** If you are having issues setting up the data source and Grafana is returning undescriptive errors, then check the log file located in /var/log/grafana/grafana.log).
> **Note:** For troubleshooting issues when setting up the Cloudwatch data source, check the `/var/log/grafana/grafana.log` file.
## Cloudwatch settings
## Configure the CloudWatch data source
To access data source settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the AWS Cloudwatch data source.
| Name | Description |
| -------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
| `Default` | Default data source means that it will be pre-selected for new panels. |
| `Default Region` | Used in query editor to set region (can be changed on per query basis) |
| `Custom Metrics namespace` | Specify the CloudWatch namespace of Custom metrics |
| `Auth Provider` | Specify the provider to get credentials. |
| `Credentials` profile name | Specify the name of the profile to use (if you use `~/.aws/credentials` file), leave blank for default. |
| `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.
## IAM policies
### CloudWatch specific data source configuration
Grafana needs permissions granted via IAM to be able to read CloudWatch metrics
and EC2 tags/instances/regions. You can attach these permissions to IAM roles and
utilize Grafana's built-in support for assuming roles.
#### IAM policies
Grafana needs permissions granted via IAM to be able to read CloudWatch metrics and EC2 tags/instances/regions/alarms. You can attach these permissions to the IAM role or IAM user configured in the previous step.
Here is a minimal policy example:
@@ -100,30 +75,57 @@ Here is a minimal policy example:
}
```
## Using the Query Editor
#### Namespaces of Custom Metrics
Grafana is not able to load custom namespaces through the GetMetricData API. If you still want your custom metrics to show up in the fields in the query editor, you can specify the names of the namespaces containing the custom metrics in the _Namespaces of Custom Metrics_ field. The field accepts a multiple namespaces, separated by a comma.
#### Timeout
Timeout specifically, for CloudWatch Logs queries. Log queries don't recognize standard Grafana query timeout as they don't keep a single request open and instead periodically poll for results. Because of limits on concurrently running queries in CloudWatch they can also take a longer time to finish.
#### 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')
## CloudWatch query editor
The CloudWatch data source can query data from both CloudWatch metrics and CloudWatch Logs APIs, each with its own specialized query editor. You select which API you want to query with using the query mode switch on top of the editor.
{{< figure src="/static/img/docs/v70/cloudwatch-metrics-query-field.png" max-width="800px" class="docs-image--left" caption="CloudWatch metrics query field" >}}
{{< figure src="/static/img/docs/v70/cloudwatch-logs-query-field.png" max-width="800px" class="docs-image--right" caption="CloudWatch Logs query field" >}}
![CloudWatch API modes](/static/img/docs/cloudwatch/cloudwatch-query-editor-api-modes-8.3.0.png)
## Using the Metric Query Editor
### Metrics query editor
To create a valid query, you need to specify the namespace, metric name and at least one statistic. If `Match Exact` is enabled, you also need to specify all the dimensions of the metric youre querying, so that the [metric schema](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html) matches exactly. If `Match Exact` is off, you can specify any number of dimensions by which youd like to filter. Up to 100 metrics matching your filter criteria will be returned.
The metrics query editor allows you to build two types of queries - **Metric Search** and **Metric Query**.
### Dynamic queries using dimension wildcards
#### Using the Metric Search option
To create a valid Metric Search query specify the namespace, metric name and at least one statistic.
If `Match Exact` is enabled, you also need to specify all the dimensions of the metric youre querying, so that the [metric schema](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html) matches exactly. If `Match Exact` is disabled, you can specify any number of dimensions by which youd like to filter. Up to 100 metrics matching your filter criteria will be returned.
##### Dynamic queries using dimension wildcards
You can monitor a dynamic list of metrics by using the asterisk (\*) wildcard for one or more dimension values.
{{< figure src="/static/img/docs/v65/cloudwatch-dimension-wildcard.png" max-width="800px" class="docs-image--right" caption="CloudWatch dimension wildcard" >}}
![CloudWatch dimension wildcard](/static/img/docs/cloudwatch/cloudwatch-dimension-wildcard-8.3.0.png)
In this example, the query returns all metrics in the namespace `AWS/EC2` with a metric name of `CPUUtilization` and ANY value for the `InstanceId` dimension are queried. This can help you monitor metrics for AWS resources, like EC2 instances or containers. For example, when new instances are created as part of an auto scaling event, they will automatically appear in the graph without needing to track the new instance IDs. This capability is currently limited to retrieving up to 100 metrics.
In this example, the query returns all metrics in the namespace `AWS/EC2` with a metric name of `CPUUtilization` and ANY value for the `InstanceId` dimension are queried. This can help you monitor metrics for AWS resources, like EC2 instances or containers. When new instances are created as part of an auto scaling event, they will automatically appear in the graph without you having to track the new instance IDs. This capability is currently limited to retrieving up to 100 metrics.
Click on `Show Query Preview` to see the search expression that is automatically built to support wildcards. To learn more about search expressions, visit the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html). By default, the search expression is defined in such a way that the queried metrics must match the defined dimension names exactly. This means that in the example only metrics with exactly one dimension with name InstanceId will be returned.
You can expand the [Query inspector](https://grafana.com/docs/grafana/v8.3/panels/queries/#query-inspector-button) button and click `Meta Data` to see the search expression that is automatically built to support wildcards. To learn more about search expressions, visit the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html). By default, the search expression is defined in such a way that the queried metrics must match the defined dimension names exactly. This means that in the example only metrics with exactly one dimension with the name InstanceId will be returned.
You can untoggle `Match Exact` to include metrics that have other dimensions defined. Disabling `Match Exact` also creates a search expression even if you dont use wildcards. We simply search for any metric that matches at least the namespace, metric name, and all defined dimensions.
![CloudWatch Meta Inspector](/static/img/docs/cloudwatch/cloudwatch-meta-inspector-8.3.0.png)
### Multi-value template variables
You can disable `Match Exact` to include metrics that have other dimensions defined. Disabling `Match Exact` also creates a search expression even if you dont use wildcards. We simply search for any metric that matches at least the namespace, metric name, and all defined dimensions.
##### Multi-value template variables
When defining dimension values based on multi-valued template variables, a search expression is used to query for the matching metrics. This enables the use of multiple template variables in one query and also allows you to use template variables for queries that have the `Match Exact` option disabled.
@@ -131,7 +133,7 @@ Search expressions are currently limited to 1024 characters, so your query may f
The use of multi-valued template variables is only supported for dimension values. Using multi-valued template variables for `Region`, `Namespace`, or `Metric Name` is not supported.
### Metric math expressions
##### Metric math expressions
You can create new time series metrics by operating on top of CloudWatch metrics using mathematical functions. Arithmetic operators, unary subtraction and other functions are supported and can be applied to CloudWatch metrics. More details on the available functions can be found on [AWS Metric Math](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html)
@@ -139,13 +141,7 @@ As an example, if you want to apply arithmetic operations on a metric, you can d
Please note that in the case you use the expression field to reference another query, like `queryA * 2`, it will not be possible to create an alert rule based on that query.
### Period
A period is the length of time associated with a specific Amazon CloudWatch statistic. Periods are defined in numbers of seconds, and valid values for period are 1, 5, 10, 30, or any multiple of 60.
If the period field is left blank or set to `auto`, then it calculates automatically based on the time range and [cloudwatch's retention policy](https://aws.amazon.com/about-aws/whats-new/2016/11/cloudwatch-extends-metrics-retention-and-new-user-interface/). The formula used is `time range in seconds / 2000`, and then it snaps to the next higher value in an array of predefined periods `[60, 300, 900, 3600, 21600, 86400]` after removing periods based on retention. By clicking `Show Query Preview` in the query editor, you can see what period Grafana used.
### Deep linking from Grafana panels to the CloudWatch console
##### Deep linking from Grafana panels to the CloudWatch console
{{< figure src="/static/img/docs/v65/cloudwatch-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch deep linking" >}}
@@ -153,257 +149,140 @@ Left clicking a time series in the panel shows a context menu with a link to `Vi
This feature is not available for metrics that are based on metric math expressions.
## Using the Logs Query Editor
### Using the Metric Query option
To query CloudWatch Logs, select the region and up to 20 log groups which you want to query. Use the main input area to write your query in [CloudWatch Logs Query Language](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html)
> **Note:** This query option is available in Grafana 8.3 and higher versions only.
Metrics Query in the CloudWatch plugin is what is referred to as **Metric Insights** in the AWS console. It's a fast, flexible, SQL-based query engine that enables you to identify trends and patterns across millions of operational metrics in real time. It uses a dialect of SQL. The query syntax is as follows.
```
SELECT FUNCTION(MetricName)
FROM Namespace | SCHEMA(...)
[ WHERE labelKey OPERATOR labelValue [AND|...]]
[ GROUP BY labelKey [, ...]]
[ ORDER BY FUNCTION() [DESC | ASC] ]
[ LIMIT number]
```
The following table provides basic explanation of the query keywords. For details about the Metrics Insights syntax, refer to the [AWS documentation](https://docs.aws.amazon.com/console/cloudwatch/metricsinsights-syntax).
| Keyword | Description |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `FUNCTION` | Required. Specifies the aggregate function to use, and also specifies the name of the metric that is to be queried. Valid values are AVG, COUNT, MAX, MIN, and SUM |
| `MetricName` | Required. For example, `CPUUtilization`. |
| `FROM` | Required. Specifies the source of the metric. You can specify either the metric namespace that contains the metric that is to be queried, or a SCHEMA table function. Some namespace examples are 1`AWS/EC2`, `AWS/Lambda`. |
| `SCHEMA` | Optional. Allows you to narrow down the query results to only the metrics that is an exact match or to metrics that do noy match. |
| `WHERE` | Optional. Filters the results to only those metrics that match your specified expression. For example, `WHERE InstanceType != 'c3.4xlarge'`. |
| `GROUP BY` | Optional. Groups the query results into multiple time series. For example, `GROUP BY ServiceName`. |
| `ORDER BY` | Optional. Specifies the order of time series that are returned. Options are `ASC`, `DESC`. |
| `LIMIT` | Optional. Limits the number of time series returned. |
For information about limits for the Metrics Insights, please refer to the [AWS documentation](https://docs.aws.amazon.com/console/cloudwatch/metricsinsights).
**Builder mode**
To create a query in Builder mode:
1. Browse and select a metric namespace, metric name, filter, group, and order options using information from the table above.
1. For each of these options, choose from the list of possible options.
Grafana automatically constructs a SQL query based on your selections.
**Code mode**
To create a query in the Code mode:
1. Write your SQL query.
1. To run the query, click the **Run query** above the code editor.
The code editor has a built in autocomplete feature that gives suggestions for keywords, aggregations, namespaces, metrics, labels and label values. The suggestions are shown when hitting space, comma or dollar character. You can also use the keyboard combination CTRL+Space.
![Code editor autocomplete](/static/img/docs/cloudwatch/cloudwatch-code-editor-autocomplete-8.3.0.gif)
> **Note:** Usage of template variables in the code editor might interfere the autocompletion.
### Common metric query editor fields
At the bottom of the metric query editor, you'll find three fields that are common to both _Metric Search_ and _Metric Query_.
#### Id
The GetMetricData API requires that all queries have a unique ID. Use this field to specify an ID of choice. The ID can include numbers, letters, and underscore, and must start with a lowercase letter. If no ID is specified, grafana will generate an ID using the following pattern `query[refId of the current query row]`, e.g `queryA` for the first query row in the panel editor.
The ID can be used to reference queries in Metric Math expressions.
#### Period
A period is the length of time associated with a specific Amazon CloudWatch statistic. Periods are defined in numbers of seconds, and valid values for period are 1, 5, 10, 30, or any multiple of 60.
If the period field is left blank or set to `auto`, then it calculates automatically based on the time range and [cloudwatch's retention policy](https://aws.amazon.com/about-aws/whats-new/2016/11/cloudwatch-extends-metrics-retention-and-new-user-interface/). The formula used is `time range in seconds / 2000`, and then it snaps to the next higher value in an array of predefined periods `[60, 300, 900, 3600, 21600, 86400]` after removing periods based on retention. By clicking `Show Query Preview` in the query editor, you can see what period Grafana used.
#### Alias
The alias field allows you to override the default name of the metric legend.
##### Alias patterns
| Alias Pattern | Description | Example Result |
| ---------------------- | ------------------------------------------------------------- | ---------------- |
| `{{region}}` | returns the region | `us-east-1` |
| `{{period}}` | returns the period | `3000` |
| `{{metric}}` | returns the metric | `CPUUtilization` |
| `{{label}}` | returns the label returned by the API (only in Metric Search) | `i-01343` |
| `{{namespace}}` | returns the namespace (only in Metric Search) | `AWS/EC2` |
| `{{stat}}` | returns the statistic (only in Metric Search) | `Average` |
| `{{[dimension name]}}` | returns the dimension name (only in Metric Search) | `i-01343` |
## Using the Logs query editor
To query CloudWatch Logs:
1. Select the region and up to 20 log groups which you want to query.
1. Use the main input area to write your query in [CloudWatch Logs Query Language](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_QuerySyntax.html).
You can also write queries returning time series data by using the [`stats` command](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/CWL_Insights-Visualizing-Log-Data.html). When making `stats` queries in Explore, you have to make sure you are in Metrics Explore mode.
{{< figure src="/static/img/docs/v70/explore-mode-switcher.png" max-width="500px" class="docs-image--right" caption="Explore mode switcher" >}}
To the right of the query input field is a CloudWatch Logs Insights link that opens the CloudWatch Logs Insights console with your query. You can continue exploration there if necessary.
{{< figure src="/static/img/docs/v70/cloudwatch-logs-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch Logs deep linking" >}}
### Using template variables
The CloudWatch data source supports use of template variables in queries.
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../variables/_index.md" >}}) documentation.
### Deep linking from Grafana panels to the CloudWatch console
{{< figure src="/static/img/docs/v70/cloudwatch-logs-deep-linking.png" max-width="500px" class="docs-image--right" caption="CloudWatch Logs deep linking" >}}
If you'd like to view your query in the CloudWatch Logs Insights console, simply click the `CloudWatch Logs Insights` button next to the query editor.
If you're not currently logged in to the CloudWatch console, the link will forward you to the login page. The provided link is valid for any account but will only display the right metrics if you're logged in to the account that corresponds to the selected data source in Grafana.
### Alerting
## Alerting
Since CloudWatch Logs queries can return numeric data, for example through the use of the `stats` command, alerts are supported.
For more information on Grafana alerts, refer to [Alerting]({{< relref "../../alerting/_index.md" >}}) documentation.
## Curated dashboards
## Configure CloudWatch with grafana.ini
The updated CloudWatch data source ships with pre-configured dashboards for five of the most popular AWS services:
The Grafana [configuration]({{< relref "../../administration/configuration.md#aws" >}}) file includes an `AWS` section where you can customize the data source.
- Amazon Elastic Compute Cloud `Amazon EC2`,
- Amazon Elastic Block Store `Amazon EBS`,
- AWS Lambda `AWS Lambda`,
- Amazon CloudWatch Logs `Amazon CloudWatch Logs`, and
- Amazon Relational Database Service `Amazon RDS`.
To import the pre-configured dashboards, go to the configuration page of your CloudWatch data source and click on the `Dashboards` tab. Click `Import` for the dashboard you would like to use. To customize the dashboard, we recommend saving the dashboard under a different name, because otherwise the dashboard will be overwritten when a new version of the dashboard is released.
{{< figure src="/static/img/docs/v65/cloudwatch-dashboard-import.png" caption="CloudWatch dashboard import" >}}
## Templated queries
Instead of hard-coding server, application, and sensor names in your metric queries, you can use variables. The variables are listed as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the display of data in your dashboard.
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../variables/_index.md" >}}) documentation.
### Query variable
The CloudWatch data source provides the following queries that you can specify in the `Query` field in the Variable edit view. They allow you to fill a variable's options list with things like `region`, `namespaces`, `metric names` and `dimension keys/values`.
In place of `region` you can specify `default` to use the default region configured in the data source for the query,
e.g. `metrics(AWS/DynamoDB, default)` or `dimension_values(default, ..., ..., ...)`.
Read more about the available dimensions in the [CloudWatch Metrics and Dimensions Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CW_Support_For_AWS.html).
| Name | Description |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `regions()` | Returns a list of all AWS regions |
| `namespaces()` | Returns a list of namespaces CloudWatch support. |
| `metrics(namespace, [region])` | Returns a list of metrics in the namespace. (specify region or use "default" for custom metrics) |
| `dimension_keys(namespace)` | Returns a list of dimension keys in the namespace. |
| `dimension_values(region, namespace, metric, dimension_key, [filters])` | Returns a list of dimension values matching the specified `region`, `namespace`, `metric`, `dimension_key` or you can use dimension `filters` to get more specific result as well. |
| `ebs_volume_ids(region, instance_id)` | Returns a list of volume ids matching the specified `region`, `instance_id`. |
| `ec2_instance_attribute(region, attribute_name, filters)` | Returns a list of attributes matching the specified `region`, `attribute_name`, `filters`. |
| `resource_arns(region, resource_type, tags)` | Returns a list of ARNs matching the specified `region`, `resource_type` and `tags`. |
| `statistics()` | Returns a list of all the standard statistics |
For details about the metrics CloudWatch provides, please refer to the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
#### Examples templated queries
Example dimension queries which will return list of resources for individual AWS Services:
| Query | Service |
| ----------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `dimension_values(us-east-1,AWS/ELB,RequestCount,LoadBalancerName)` | ELB |
| `dimension_values(us-east-1,AWS/ElastiCache,CPUUtilization,CacheClusterId)` | ElastiCache |
| `dimension_values(us-east-1,AWS/Redshift,CPUUtilization,ClusterIdentifier)` | RedShift |
| `dimension_values(us-east-1,AWS/RDS,CPUUtilization,DBInstanceIdentifier)` | RDS |
| `dimension_values(us-east-1,AWS/S3,BucketSizeBytes,BucketName)` | S3 |
| `dimension_values(us-east-1,CWAgent,disk_used_percent,device,{"InstanceId":"$instance_id"})` | CloudWatch Agent |
| `resource_arns(eu-west-1,elasticloadbalancing:loadbalancer,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})` | ELB |
| `resource_arns(eu-west-1,elasticloadbalancing:loadbalancer,{"Component":["$service"],"Environment":["$environment"]})` | ELB |
| `resource_arns(eu-west-1,ec2:instance,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})` | EC2 |
## ec2_instance_attribute examples
### JSON filters
The `ec2_instance_attribute` query takes `filters` in JSON format.
You can specify [pre-defined filters of ec2:DescribeInstances](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html).
Note that the actual filtering takes place on Amazon's servers, not in Grafana.
Filters syntax:
```javascript
{ "filter_name1": [ "filter_value1" ], "filter_name2": [ "filter_value2" ] }
```
Example `ec2_instance_attribute()` query
```javascript
ec2_instance_attribute(us - east - 1, InstanceId, { 'tag:Environment': ['production'] });
```
### Selecting attributes
Only 1 attribute per instance can be returned. Any flat attribute can be selected (i.e. if the attribute has a single value and isn't an object or array). Below is a list of available flat attributes:
- `AmiLaunchIndex`
- `Architecture`
- `ClientToken`
- `EbsOptimized`
- `EnaSupport`
- `Hypervisor`
- `IamInstanceProfile`
- `ImageId`
- `InstanceId`
- `InstanceLifecycle`
- `InstanceType`
- `KernelId`
- `KeyName`
- `LaunchTime`
- `Platform`
- `PrivateDnsName`
- `PrivateIpAddress`
- `PublicDnsName`
- `PublicIpAddress`
- `RamdiskId`
- `RootDeviceName`
- `RootDeviceType`
- `SourceDestCheck`
- `SpotInstanceRequestId`
- `SriovNetSupport`
- `SubnetId`
- `VirtualizationType`
- `VpcId`
Tags can be selected by prepending the tag name with `Tags.`
Example `ec2_instance_attribute()` query
```javascript
ec2_instance_attribute(us - east - 1, Tags.Name, { 'tag:Team': ['sysops'] });
```
## Using JSON format template variables
Some queries accept filters in JSON format and Grafana supports the conversion of template variables to JSON.
If `env = 'production', 'staging'`, following query will return ARNs of EC2 instances which `Environment` tag is `production` or `staging`.
```javascript
resource_arns(us-east-1, ec2:instance, {"Environment":${env:json}})
```
| Configuration option | Description |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `allowed_auth_providers` | Specifies which authentication providers are allowed for the CloudWatch data source. The following providers are enabled by default in OSS Grafana: `default` (AWS SDK default), keys (Access and secret key), credentials (Credentials file), ec2_IAM_role (EC2 IAM role). |
| `assume_role_enabled` | Allows you to disable `assume role (ARN)` in the CloudWatch data source. By default, assume role (ARN) is enabled for OSS Grafana. |
| `list_metrics_page_limit` | When a custom namespace is specified in the query editor, the [List Metrics API](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) is used to populate the _Metrics_ field and the _Dimension_ fields. The API is paginated and returns up to 500 results per page. The CloudWatch data source also limits the number of pages to 500. However, you can change this limit using the `list_metrics_page_limit` variable in the [grafana configuration file](https://grafana.com/docs/grafana/v8.3/administration/configuration/#aws). |
## Pricing
The Amazon CloudWatch data source for Grafana uses the `ListMetrics` and `GetMetricData` CloudWatch API calls to list and retrieve metrics.
Pricing for CloudWatch Logs is based on the amount of data ingested, archived, and analyzed via CloudWatch Logs Insights queries.
Please see the [CloudWatch pricing page](https://aws.amazon.com/cloudwatch/pricing/) for more details.
Every time you pick a dimension in the query editor Grafana will issue a ListMetrics request. Whenever you make a change to the queries in the query editor, one new request to GetMetricData will be issued.
Every time you pick a dimension in the query editor Grafana will issue a ListMetrics request.
Whenever you make a change to the queries in the query editor, one new request to GetMetricData will be issued.
In Grafana version 6.5 or higher, all API requests to GetMetricStatistics have been replaced with calls to GetMetricData to provide better support for CloudWatch metric math and enables the automatic generation of search expressions when using wildcards or disabling the `Match Exact` option. While GetMetricStatistics qualified for the CloudWatch API free tier, this is not the case for GetMetricData calls.
Please note that for Grafana version 6.5 or higher, all API requests to GetMetricStatistics have been replaced with calls to GetMetricData. This change enables better support for CloudWatch metric math and enables the automatic generation of search expressions when using wildcards or disabling the `Match Exact` option. While GetMetricStatistics qualified for the CloudWatch API free tier, this is not the case for GetMetricData calls. For more information, please refer to the [CloudWatch pricing page](https://aws.amazon.com/cloudwatch/pricing/).
For more information, please refer to the [CloudWatch pricing page](https://aws.amazon.com/cloudwatch/pricing/).
## Service quotas
AWS defines quotas, or limits, for resources, actions, and items in your AWS account. Depending on the number of queries in your dashboard and the number of users accessing the dashboard, you may reach the usage limits for various CloudWatch and CloudWatch Logs resources. Note that quotas are defined per account and per region. If you're using multiple regions or have set up more than one CloudWatch data source to query against multiple accounts, you need to request a quota increase for each account and each region in which you hit the limit.
To request a quota increase, visit the [AWS Service Quotas console](https://console.aws.amazon.com/servicequotas/home?r#!/services/monitoring/quotas/L-5E141212).
To request a quota increase, visit the [AWS Service Quotas console](https://console.aws.amazon.com/servicequotas/home?r#!/services/monitoring/quotas/L-5E141212). For more information, refer to the AWS documentation for [Service Quotas](https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html) and [CloudWatch limits](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_limits.html).
Please see the AWS documentation for [Service Quotas](https://docs.aws.amazon.com/servicequotas/latest/userguide/intro.html) and [CloudWatch limits](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/cloudwatch_limits.html) for more information.
## Configure the data source with grafana.ini
The Grafana [configuration]({{< relref "../../administration/configuration.md#aws" >}}) file includes an `AWS` section where you can customize the data source.
### allowed_auth_providers
Specify which authentication providers are allowed for the CloudWatch data source. The following providers are enabled by default in OSS Grafana: `default` (AWS SDK default), keys (Access and secret key), credentials (Credentials file), ec2_IAM_role (EC2 IAM role).
### assume_role_enabled
Allows you to disable `assume role (ARN)` in the CloudWatch data source. By default, assume role (ARN) is enabled for OSS Grafana.
### list_metrics_page_limit
When a custom namespace is specified in the query editor, the [List Metrics API](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) is used to populate the _Metrics_ field and the _Dimension_ fields. The API is paginated and returns up to 500 results per page. The CloudWatch data source also limits the number of pages to 500. However, you can change this limit using the `list_metrics_page_limit` variable in the [grafana configuration file](https://grafana.com/docs/grafana/latest/administration/configuration/#aws).
## Configure the data source with provisioning
You can configure the CloudWatch data source by customizing configuration files in Grafana's provisioning system. To know more about provisioning and learn about available configuration options, refer to the [Provisioning Grafana]({{< relref "../../administration/provisioning/#datasources" >}}) topic.
Here are some provisioning examples for this data source.
### Using AWS SDK (default)
```yaml
apiVersion: 1
datasources:
- name: CloudWatch
type: cloudwatch
jsonData:
authType: default
defaultRegion: eu-west-2
```
### Using credentials' profile name (non-default)
```yaml
apiVersion: 1
datasources:
- name: CloudWatch
type: cloudwatch
jsonData:
authType: credentials
defaultRegion: eu-west-2
customMetricsNamespaces: 'CWAgent,CustomNameSpace'
profile: secondary
```
### Using `accessKey` and `secretKey`
```yaml
apiVersion: 1
datasources:
- name: CloudWatch
type: cloudwatch
jsonData:
authType: keys
defaultRegion: eu-west-2
secureJsonData:
accessKey: '<your access key>'
secretKey: '<your secret key>'
```
### Using AWS SDK Default and ARN of IAM Role to Assume
```yaml
apiVersion: 1
datasources:
- name: CloudWatch
type: cloudwatch
jsonData:
authType: default
assumeRoleArn: arn:aws:iam::123456789012:root
defaultRegion: eu-west-2
```

View File

@@ -2,8 +2,8 @@
title = "Authentication"
description = "AWS authentication"
keywords = ["grafana", "aws", "authentication"]
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
weight = 205
aliases = ["/docs/grafana/v8.3/datasources/cloudwatch"]
weight = 5
+++
# AWS authentication
@@ -12,6 +12,14 @@ Requests from a Grafana plugin to AWS are made on behalf of an IAM role or an IA
All requests to AWS APIs are performed on the server side by the Grafana backend using the official AWS SDK.
This topic has the following sections:
- [Authentication methods](#authentication-methods)
- [Assuming a role](#assuming-a-role)
- [Endpoint](#endpoint)
- [AWS credentials file](#aws-credentials-file)
- [EKS IAM roles for service accounts](#eks-iam-roles-for-service-accounts)
## 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.
@@ -36,18 +44,7 @@ If you are assuming a role in another account that was created with an external
## Endpoint
The `Endpoint` field allows you to specify a custom endpoint URL that overrides the default generated endpoint for the CloudWatch API. Leave this field blank if you want to use the default generated endpoint. For more information on why and how to use Service endpoints, refer to the [AWS service endpoints documentation](https://docs.aws.amazon.com/general/latest/gr/rande.html).
## EKS IAM roles for service accounts
The Grafana process in the container runs as user 472 (called "grafana"). When Kubernetes mounts your projected credentials, they will by default only be available to the root user. To allow user 472 to access the credentials (and avoid falling back to the IAM role attached to the EC2 instance), you need to provide a [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for your pod.
```yaml
securityContext:
fsGroup: 472
runAsUser: 472
runAsGroup: 472
```
The `Endpoint` field allows you to specify a custom endpoint URL that overrides the default generated endpoint for the AWS service API. Leave this field blank if you want to use the default generated endpoint. For more information on why and how to use Service endpoints, refer to the [AWS service endpoints documentation](https://docs.aws.amazon.com/general/latest/gr/rande.html).
## AWS credentials file
@@ -63,3 +60,14 @@ aws_access_key_id = asdsadasdasdasd
aws_secret_access_key = dasdasdsadasdasdasdsa
region = us-west-2
```
## EKS IAM roles for service accounts
The Grafana process in the container runs as user 472 (called "grafana"). When Kubernetes mounts your projected credentials, they will by default only be available to the root user. To allow user 472 to access the credentials (and avoid falling back to the IAM role attached to the EC2 instance), you need to provide a [security context](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) for your pod.
```yaml
securityContext:
fsGroup: 472
runAsUser: 472
runAsGroup: 472
```

View File

@@ -0,0 +1,27 @@
+++
title = "Curated CloudWatch dashboards"
description = "Guide for using AWS CloudWatch in Grafana"
keywords = ["grafana", "stackdriver", "google", "guide", "cloud", "monitoring"]
aliases = ["/docs/grafana/v8.3/datasources/cloudwatch"]
weight = 15
+++
# Curated CloudWatch dashboards
The updated CloudWatch data source ships with pre-configured dashboards for five of the most popular AWS services:
- Amazon Elastic Compute Cloud `Amazon EC2`,
- Amazon Elastic Block Store `Amazon EBS`,
- AWS Lambda `AWS Lambda`,
- Amazon CloudWatch Logs `Amazon CloudWatch Logs`, and
- Amazon Relational Database Service `Amazon RDS`.
To import curatedd dashboards:
1. On the configuration page of your CloudWatch data source, click the **Dashboards** tab.
1. Click **Import** for the dashboard you would like to use.
In case you want to customize a dashboard, we recommend that you save it under a different name. Otherwise the dashboard will be overwritten when a new version of the dashboard is released.
{{< figure src="/static/img/docs/v65/cloudwatch-dashboard-import.png" caption="CloudWatch dashboard import" >}}

View File

@@ -0,0 +1,68 @@
+++
title = "Provision CloudWatch"
description = "Guide for provisioning CloudWatch"
weight = 400
aliases = ["/docs/grafana/v8.3/datasources/cloudwatch"]
+++
# Provision CloudWatch data source
You can configure the CloudWatch data source by customizing configuration files in Grafana's provisioning system. To know more about provisioning and learn about available configuration options, refer to the [Provisioning Grafana]({{< relref "../../administration/provisioning/#datasources" >}}) topic.
Here are some provisioning examples for this data source.
## Using AWS SDK (default)
```yaml
apiVersion: 1
datasources:
- name: CloudWatch
type: cloudwatch
jsonData:
authType: default
defaultRegion: eu-west-2
```
## Using credentials' profile name (non-default)
```yaml
apiVersion: 1
datasources:
- name: CloudWatch
type: cloudwatch
jsonData:
authType: credentials
defaultRegion: eu-west-2
customMetricsNamespaces: 'CWAgent,CustomNameSpace'
profile: secondary
```
## Using accessKey and secretKey
```yaml
apiVersion: 1
datasources:
- name: CloudWatch
type: cloudwatch
jsonData:
authType: keys
defaultRegion: eu-west-2
secureJsonData:
accessKey: '<your access key>'
secretKey: '<your secret key>'
```
## Using AWS SDK Default and ARN of IAM Role to Assume
```yaml
apiVersion: 1
datasources:
- name: CloudWatch
type: cloudwatch
jsonData:
authType: default
assumeRoleArn: arn:aws:iam::123456789012:root
defaultRegion: eu-west-2
```

View File

@@ -0,0 +1,122 @@
+++
title = "Template variables in CloudWatch query"
description = "Template variables in CloudWatch queryh"
weight = 10
aliases = ["/docs/grafana/v8.3/datasources/cloudwatch"]
+++
# Using template variables in CloudWatch queries
Instead of hard-coding server, application, and sensor names in your metric queries, you can use variables. The variables are listed as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the display of data in your dashboard.
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../variables/_index.md" >}}) documentation.
## Query variable
The CloudWatch data source provides the following queries that you can specify in the `Query` field in the Variable edit view. They allow you to fill a variable's options list with things like `region`, `namespaces`, `metric names` and `dimension keys/values`.
In place of `region` you can specify `default` to use the default region configured in the data source for the query,
e.g. `metrics(AWS/DynamoDB, default)` or `dimension_values(default, ..., ..., ...)`.
Read more about the available dimensions in the [CloudWatch Metrics and Dimensions Reference](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CW_Support_For_AWS.html).
| Name | Description |
| ----------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `regions()` | Returns a list of all AWS regions |
| `namespaces()` | Returns a list of namespaces CloudWatch support. |
| `metrics(namespace, [region])` | Returns a list of metrics in the namespace. (specify region or use "default" for custom metrics) |
| `dimension_keys(namespace)` | Returns a list of dimension keys in the namespace. |
| `dimension_values(region, namespace, metric, dimension_key, [filters])` | Returns a list of dimension values matching the specified `region`, `namespace`, `metric`, `dimension_key` or you can use dimension `filters` to get more specific result as well. |
| `ebs_volume_ids(region, instance_id)` | Returns a list of volume ids matching the specified `region`, `instance_id`. |
| `ec2_instance_attribute(region, attribute_name, filters)` | Returns a list of attributes matching the specified `region`, `attribute_name`, `filters`. |
| `resource_arns(region, resource_type, tags)` | Returns a list of ARNs matching the specified `region`, `resource_type` and `tags`. |
| `statistics()` | Returns a list of all the standard statistics |
For details about the metrics CloudWatch provides, please refer to the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
## Example of templated queries
Here is an example of the dimension queries which will return list of resources for individual AWS Services:
| Query | Service |
| ----------------------------------------------------------------------------------------------------------------------------- | ---------------- |
| `dimension_values(us-east-1,AWS/ELB,RequestCount,LoadBalancerName)` | ELB |
| `dimension_values(us-east-1,AWS/ElastiCache,CPUUtilization,CacheClusterId)` | ElastiCache |
| `dimension_values(us-east-1,AWS/Redshift,CPUUtilization,ClusterIdentifier)` | RedShift |
| `dimension_values(us-east-1,AWS/RDS,CPUUtilization,DBInstanceIdentifier)` | RDS |
| `dimension_values(us-east-1,AWS/S3,BucketSizeBytes,BucketName)` | S3 |
| `dimension_values(us-east-1,CWAgent,disk_used_percent,device,{"InstanceId":"$instance_id"})` | CloudWatch Agent |
| `resource_arns(eu-west-1,elasticloadbalancing:loadbalancer,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})` | ELB |
| `resource_arns(eu-west-1,elasticloadbalancing:loadbalancer,{"Component":["$service"],"Environment":["$environment"]})` | ELB |
| `resource_arns(eu-west-1,ec2:instance,{"elasticbeanstalk:environment-name":["myApp-dev","myApp-prod"]})` | EC2 |
## Using JSON format template variables
Some queries accept filters in JSON format and Grafana supports the conversion of template variables to JSON.
If `env = 'production', 'staging'`, following query will return ARNs of EC2 instances which `Environment` tag is `production` or `staging`.
```javascript
resource_arns(us-east-1, ec2:instance, {"Environment":${env:json}})
```
## ec2_instance_attribute examples
### JSON filters
The `ec2_instance_attribute` query takes `filters` in JSON format.
You can specify [pre-defined filters of ec2:DescribeInstances](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html).
Note that the actual filtering takes place on Amazon's servers, not in Grafana.
Filters syntax:
```javascript
{ "filter_name1": [ "filter_value1" ], "filter_name2": [ "filter_value2" ] }
```
Example `ec2_instance_attribute()` query
```javascript
ec2_instance_attribute(us - east - 1, InstanceId, { 'tag:Environment': ['production'] });
```
### Selecting attributes
Only 1 attribute per instance can be returned. Any flat attribute can be selected (i.e. if the attribute has a single value and isn't an object or array). Below is a list of available flat attributes:
- `AmiLaunchIndex`
- `Architecture`
- `ClientToken`
- `EbsOptimized`
- `EnaSupport`
- `Hypervisor`
- `IamInstanceProfile`
- `ImageId`
- `InstanceId`
- `InstanceLifecycle`
- `InstanceType`
- `KernelId`
- `KeyName`
- `LaunchTime`
- `Platform`
- `PrivateDnsName`
- `PrivateIpAddress`
- `PublicDnsName`
- `PublicIpAddress`
- `RamdiskId`
- `RootDeviceName`
- `RootDeviceType`
- `SourceDestCheck`
- `SpotInstanceRequestId`
- `SriovNetSupport`
- `SubnetId`
- `VirtualizationType`
- `VpcId`
Tags can be selected by prepending the tag name with `Tags.`
Example `ec2_instance_attribute()` query
```javascript
ec2_instance_attribute(us - east - 1, Tags.Name, { 'tag:Team': ['sysops'] });
```

View File

@@ -2,7 +2,7 @@
title = "Azure Monitor"
description = "Guide for using Azure Monitor in Grafana"
keywords = ["grafana", "microsoft", "azure", "monitor", "application", "insights", "log", "analytics", "guide"]
aliases = ["/docs/grafana/latest/features/datasources/azuremonitor"]
aliases = ["/docs/grafana/v8.3/features/datasources/azuremonitor"]
weight = 300
+++
@@ -265,7 +265,7 @@ See the following topics to learn more about the Azure Monitor data source:
Customers who host Grafana in Azure (e.g. App Service, Azure Virtual Machines) and have managed identity enabled on their VM, will now be able to use the managed identity to configure Azure Monitor in Grafana. This will simplify the data source configuration, requiring the data source to be securely authenticated without having to manually configure credentials via Azure AD App Registrations for each data source. For more details on Azure managed identities, refer to the [Azure documentation](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview).
To enable managed identity for Grafana, set the `managed_identity_enabled` flag in the `[azure]` section of the [Grafana server config](https://grafana.com/docs/grafana/latest/administration/configuration/#azure).
To enable managed identity for Grafana, set the `managed_identity_enabled` flag in the `[azure]` section of the [Grafana server config](https://grafana.com/docs/grafana/v8.3/administration/configuration/#azure).
```ini
[azure]

View File

@@ -2,7 +2,7 @@
title = "Elasticsearch"
description = "Guide for using Elasticsearch in Grafana"
keywords = ["grafana", "elasticsearch", "guide"]
aliases = ["/docs/grafana/latest/features/datasources/elasticsearch"]
aliases = ["/docs/grafana/v8.3/features/datasources/elasticsearch"]
weight = 325
+++
@@ -20,12 +20,12 @@ visualize logs or metrics stored in Elasticsearch. You can also annotate your gr
> **Note:** If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
| Name | Description |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
| `Default` | Default data source means that it will be pre-selected for new panels. |
| `Url` | The HTTP protocol, IP, and port of your Elasticsearch server. |
| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. |
| Name | Description |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
| `Default` | Default data source means that it will be pre-selected for new panels. |
| `Url` | The HTTP protocol, IP, and port of your Elasticsearch server. |
| `Access` | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. **Note**: Browser (direct) access is deprecated and will be removed in a future release. |
Access mode controls how requests to the data source will be handled. Server should be the preferred way if nothing else stated.

View File

@@ -2,7 +2,7 @@
title = "Google Cloud Monitoring"
description = "Guide for using Google Cloud Monitoring in Grafana"
keywords = ["grafana", "stackdriver", "google", "guide", "cloud", "monitoring"]
aliases = ["/docs/grafana/latest/features/datasources/stackdriver", "/docs/grafana/next/datasources/cloudmonitoring/", "/docs/grafana/next/features/datasources/cloudmonitoring/"]
aliases = ["/docs/grafana/v8.3/features/datasources/stackdriver", "/docs/grafana/next/datasources/cloudmonitoring/", "/docs/grafana/next/features/datasources/cloudmonitoring/"]
weight = 350
+++
@@ -12,7 +12,7 @@ Grafana ships with built-in support for Google Cloud Monitoring. Add it as a dat
> **Note** Before Grafana v7.1, Google Cloud Monitoring was referred to as Google Stackdriver.
## Google Cloud Monitoring settings
## Configure the Google Cloud Monitoring data source
To access Google Cloud Monitoring settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the Google Cloud Monitoring data source.
@@ -22,15 +22,9 @@ To access Google Cloud Monitoring settings, hover your mouse over the **Configur
| `Default` | Default data source means that it is pre-selected for new panels. |
| `Service Account Key` | Upload or paste in the Service Account Key file for a GCP Project. For more information, refer to [Using a Google Service Account Key File](#using-a-google-service-account-key-file). |
## Authentication
For authentication options and configuration details, see the [Google authentication]({{< relref "google-authentication.md" >}}) documentation.
There are two ways to authenticate the Google Cloud Monitoring plugin - either by uploading a Google JWT file, or by automatically retrieving credentials from Google metadata server. The latter option is only available when running Grafana on GCE virtual machine.
### Using a Google Service Account Key File
To authenticate with the Google Cloud Monitoring API, you need to create a Google Cloud Platform (GCP) Service Account for the Project you want to show data for. A Grafana data source integrates with one GCP Project. If you want to visualize data from multiple GCP Projects then you need to create one data source per GCP Project.
#### Enable APIs
### Google Cloud Monitoring specific data source configuration
The following APIs need to be enabled first:
@@ -41,39 +35,13 @@ Click on the links above and click the `Enable` button:
{{< figure src="/static/img/docs/v71/cloudmonitoring_enable_api.png" max-width="450px" class="docs-image--no-shadow" caption="Enable GCP APIs" >}}
#### Create a GCP Service Account for a Project
#### Using GCP Service Account Key File
1. Navigate to the [APIs and Services Credentials page](https://console.cloud.google.com/apis/credentials).
1. Click on the `Create credentials` dropdown/button and choose the `Service account key` option.
The GCP Service Account must have the **Monitoring Viewer** role as shown in the image below:
{{< figure src="/static/img/docs/v71/cloudmonitoring_create_service_account_button.png" max-width="500px" class="docs-image--no-shadow" caption="Create service account button" >}}
{{< figure src="/static/img/docs/v71/cloudmonitoring_create_service_account_button.png" max-width="500px" class="docs-image--no-shadow" caption="Create service account button" >}}
1. On the `Create service account key` page, choose key type `JSON`. Then in the `Service Account` dropdown, choose the `New service account` option:
{{< figure src="/static/img/docs/v71/cloudmonitoring_create_service_account_key.png" max-width="500px" class="docs-image--no-shadow" caption="Create service account key" >}}
1. Some new fields will appear. Fill in a name for the service account in the `Service account name` field and then choose the `Monitoring Viewer` role from the `Role` dropdown:
{{< figure src="/static/img/docs/v71/cloudmonitoring_service_account_choose_role.png" max-width="600px" class="docs-image--no-shadow" caption="Choose role" >}}
1. Click the Create button. A JSON key file will be created and downloaded to your computer. Store this file in a secure place as it allows access to your Google Cloud Monitoring data.
1. Upload it to Grafana on the data source Configuration page. You can either upload the file or paste in the contents of the file.
{{< figure src="/static/img/docs/v71/cloudmonitoring_grafana_upload_key.png" max-width="550px" class="docs-image--no-shadow" caption="Upload service key file to Grafana" >}}
1. The file contents will be encrypted and saved in the Grafana database. Don't forget to save after uploading the file!
{{< figure src="/static/img/docs/v71/cloudmonitoring_grafana_key_uploaded.png" max-width="600px" class="docs-image--no-shadow" caption="Service key file is uploaded to Grafana" >}}
### Using GCE Default Service Account
If Grafana is running on a Google Compute Engine (GCE) virtual machine, it is possible for Grafana to automatically retrieve default credentials from the metadata server. This has the advantage of not needing to generate a private key file for the service account and also not having to upload the file to Grafana. However for this to work, there are a few preconditions that need to be met.
1. First of all, you need to create a Service Account that can be used by the GCE virtual machine. For more information, refer to [Create new service account](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#createanewserviceaccount).
1. Make sure the GCE virtual machine instance is being run as the service account that you just created. For more information, refer to [using service account for instance](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances#using).
1. Allow access to the `Cloud Monitoring API` scope.
For more information about creating and enabling service accounts for GCE VM instances, refer to [enable service accounts for instances](https://cloud.google.com/compute/docs/access/create-enable-service-accounts-for-instances).
If Grafana is running on a Google Compute Engine (GCE) virtual machine, the service account in use must have access to the `Cloud Monitoring API` scope.
## Using the Query Editor

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