Compare commits

...

299 Commits

Author SHA1 Message Date
github-actions[bot]
d620e09f8c apply security patch: release-11.4.3/343-202503050952.patch
commit b5f57f419b374f3329d93c17ad30ed52d1a84ed5
Author: oscarkilhed <oscar.kilhed@grafana.com>
Date:   Fri Feb 28 16:32:58 2025 +0100

    Limit number of characters in the title
2025-03-18 14:01:09 +00:00
Denis Vodopianov
0eade5207c [release-11.4.3] Chore: Revert golangci PR + bump golangic version (#102238)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Chore: Revert golangci PR + bump golangic version (#96326)

* Chore: Clean up some excludes and fix makefile (#96052)

clean up some excludes and fix makefile

* Chore: Enable cache on golangci linter (#95471)

* try to enable cache on golangci linter

* bump version

* exclude G115

* reduce timeout

* remove deprecated linter

* bump linter version in bingo

* try a different syntax for workspace modules

* try another command

* add apps to linter path

* try disabling cue codegen

* skip some linting in devenv

* exclude dirs and try again

* try workaround for pkg

* try path instead of dir

* make it one line

* replace package prefix

* exclude xorm

* exclude wire

* file-based aproach to nolint in workspaces

* missing quote

* simplify command line

* change ownership

* upgrade linter

* revert bingo readme

* revert devenv changes

* upgrade golint

* use dashes to stay consistent with other workflows

* also change name in its own workflow file

* rename in codeowners

(cherry picked from commit 3dbd3a7a81)

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
2025-03-18 14:59:45 +01:00
Denis Vodopianov
324ee3bc75 [release-11.4.3] Chore: update golang version in .drone.yaml (#102135)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
2025-03-14 14:05:22 +01:00
Matthew Jacobson
e824a602e0 [release-11.4.3] Alerting: Re-encrypt existing contact points before get and patch in legacy config API (#101841)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
* Alerting: Re-encrypt existing contact points before get and patch in legacy config API (#101263)

* Test covering Get+Save interaction for newly secret fields

* Alerting: Re-encrypt existing contact points before get and patch

(cherry picked from commit b73c59547c)

* googlechat url test fix

(cherry picked from commit 0f4af56177)
2025-03-08 01:06:45 +02:00
Isabel Matwawana
e8e617cd85 [release-11.4.3] Docs: traces visualization refactor (#101832)
Docs: traces visualization refactor (#101476)

* Added Config options heading, bumped heading levels, and changed heading

* Updated task sub-heading and added to do notes

* Moved span filter options into a table and moved sentences after table

* Removed image

* Replaced captions with alt text

* Updated image path for main screenshot

* Fixed image path

* Updated screenshot and made to do notes

* Updated link to new heading

* Removed comments

(cherry picked from commit b26fdf8f5e)
2025-03-07 16:49:52 -05:00
Ieva
3d185ab56c [release-11.4.3] Service Accounts: Do not show error pop-ups for Service Account and Renderer UI flows (#101790)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
* Service Accounts: Don't show error pop-ups for Service Account and Renderer UI flows (#101679)

don't show error pop-ups for SAs and renderer

(cherry picked from commit f0d260ba5b)

* Service Accounts: Don't show error pop-ups for Service Account and Renderer UI flows (#101776)

* don't show error pop-ups for SAs and renderer

* only hide non 4xx error pop'ups

* linting

(cherry picked from commit 392124de00)
2025-03-07 15:09:10 +00:00
Robby Milo
2b9a49a63e [v11.4] Remove relref shortcodes (#101716)
* manually replce all shared relrefs

* relref replace - previous grafana versions

* Merge branch 'master' into robbymilo/relref-replace-grafana-previous

* update test

* prettier
2025-03-07 11:37:37 +02:00
Jack Baldry
019184b710 [release-11.4.3] Add LOKI_VERSION and ONCALL_VERSION (#101702)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Add LOKI_VERSION and ONCALL_VERSION  (#101684)

* Add LOKI_VERSION

* Add ONCALL_VERSION

(cherry picked from commit beb884292e)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
2025-03-06 14:47:53 +00:00
Matheus Macabu
43fe75f8a7 [release-11.4.3] Chore: Bump dependencies to address security issues (#101636)
* Chore: Bump golang.org/x/net to v0.36.0

* Chore: Bump filippo.io/age to v1.2.1

* Chore: Bump github.com/ua-parser/uap-go to v0.0.0-20250213224047-9c035f085b90

* Chore: Bump github.com/moby/moby to v27.5.1

* Chore: Bump github.com/go-jose/go-jose/v3 to v3.0.4

* Zanzana: bump openfga version (#94485)

* Bump openfga

* Remove internall sqlite implementation for openfga

* Use sqlite implementation from openfga

(cherry picked from commit 9ece88d585)

* Chore: Bump github.com/openfga/openfga to v1.8.5

* Chore: Bump github.com/elazarl/goproxy to v1.7.1

* Chore: Pin Prometheus to v1.20.3 for ngalert

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2025-03-06 10:46:15 +01:00
Isabel Matwawana
4986595f6e [release-11.4.3] Docs: Fix broken profiling link (#101653)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Docs: Fix broken profiling link (#101637)

Fixed broken link

(cherry picked from commit 5ffca57a5d)
2025-03-05 15:38:01 -05:00
Matheus Macabu
d1354c6c6f [release-11.4.3] Chore: Bump Go to 1.23.7 (#101582)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Chore: Bump Go to 1.23.7
2025-03-05 10:17:28 +01:00
Jev Forsberg
a21a78e2e5 [release-11.4.3] Chore: Update base alpine docker image (#101327)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
* Chore: Update base alpine docker image (#101320)

* baldm0mma/ update base image arg

* baldm0mma/ update alpine image

* baldm0mma/ skip failing test

* baldm0mma/ specifiy patch

* baldm0mma/ flaky test?

(cherry picked from commit a7ecb19c31)

* baldm0mma/ revert node update
2025-02-26 08:18:23 -07:00
Matheus Macabu
00b587d44b [release-11.4.3] Chore: Update golang.org/x/crypto and golang.org/x/oauth2 to address security issues (#101279)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Chore: Update golang.org/x/crypto and golang.org/x/oauth2 to address security issues (#101268)

- CVE-2025-22869 and Go issue https://go.dev/issue/71931.
- CVE-2025-22868 and Go issue https://go.dev/issue/71490.

(cherry picked from commit 3aedb9159e)
2025-02-26 08:42:04 +01:00
Larissa Wandzura
9c4f29409e [release-11.4.3] Docs: Overhaul of PostgreSQL data source documenation (#101175)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Docs: Overhaul of PostgreSQL data source documenation (#99908)

* created new topic docs

* added info to config doc

* updates to config doc

* updates to config doc

* finished config doc

* updated Query editor doc

* final edits

* rename, ref URI work

* a few more updates prior to PR issue

* fixed the double Macros heading issue

* final edits and cleanup

* edits based on feedback

* ran prettier

* added updates

* updates based on feedback

* vale linter issues

* more vale linting issues addressed

* small addition on main page

* ran prettier again

* changed title

* Update docs/sources/datasources/postgres/query-editor/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/configure/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/configure/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/query-editor/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/configure/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/configure/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/configure/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* changed Grafana's

* added changes

* Update docs/sources/datasources/postgres/query-editor/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/query-editor/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/query-editor/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/query-editor/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/postgres/query-editor/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* ran prettier again

* Remove aliases

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

* Fix link

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

* Put code in `code`

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

* Avoid bold for emphasis

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

* Fix link

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

---------

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 9780a9c49f)
2025-02-24 08:13:36 -06:00
Witek Bedyk
18103b650f [release-11.4.3] Bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1 (#100593)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
[release-11.4.2] Bump github.com/golang-jwt/jwt/v4 from 4.5.0 to 4.5.1

Backport from #95807

Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
2025-02-24 10:41:39 +01:00
Kevin Minehart
5f52372e57 [release-11.4.3] CI: Remove unused release_publisher scripts (#101157)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
* CI: Remove unused release_publisher scripts (#101019)

* Remove the unused `release_publisher` script.
* Remove the "whats new check" in Drone.
* Automatically set the What's New URL in releases based on the tagged version.

(cherry picked from commit 49e5f77dd1)

* Update package.json

* rerun?
2025-02-21 09:28:11 -07:00
xavi
05e182cd49 [release-11.4.3] IAM: fix grafana_com OAuth connector config overriding (#101073) 2025-02-21 09:53:58 +01:00
Jev Forsberg
24b72cc7b3 Chore: Fix linting error in release branch [11.4.3] (#101093)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
balm0mma/ run goimports -w pkg/services/dashboards/service/dashboard_service.go
2025-02-20 12:51:07 -07:00
Matthew Jacobson
5e81bb456e [release-11.4.3] Alerting: Fix token-based Slack image upload to work with channel names (#101072)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting: Fix token-based Slack image upload to work with channel names

Upgrades grafana/alerting to 171d63d which includes the v11.4 fix.
2025-02-20 10:29:26 -05:00
Andreas Christou
6fb18ecf33 [release-11.4.3] InfluxDB: Improve handling of template variables contained in regular expressions (InfluxQL) (#100987)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
InfluxDB: Improve handling of template variables contained in regular expressions (InfluxQL) (#100762)

* Improve handling of template vars in regex

* Review

* Minor update

(cherry picked from commit 8b3047ba1e)
2025-02-19 19:23:52 +02:00
Andreas Christou
3065be4a7e Revert "InfluxDB: Improve handling of template variables contained in regular expressions (InfluxQL) (#100762)"
This reverts commit 8c525e68da.
2025-02-19 17:07:25 +00:00
Andreas Christou
8c525e68da InfluxDB: Improve handling of template variables contained in regular expressions (InfluxQL) (#100762)
* Improve handling of template vars in regex

* Review

* Minor update

(cherry picked from commit 8b3047ba1e)
2025-02-19 16:06:23 +00:00
github-actions[bot]
696f41a7c2 Release: 11.4.2 (#100918)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
* Update changelog

* Update version to 11.4.2

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-02-18 17:11:54 -07:00
Kevin Minehart
c8f8c81e1c [release-11.4.2] CI: Post-release process branch / PR migration (#100935)
CI: Post-release process branch / PR migration (#100930)

* update output for token in release-comms

* use token from needs

* generate token in individual workflows

* Set secrets

* define secrest in referenced workflows

* wrong secret lol

* oops

* grafana/grafana -> grafana/grafana-enterprise

(cherry picked from commit 75189de4f7)
2025-02-19 01:52:25 +02:00
github-actions[bot]
13945ba51b apply security patch: release-11.4.2/318-202502130514.patch
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
commit a9340d4a6e697441c1bf8353b81c273b48bf3916
Author: AgnesToulet <35176601+AgnesToulet@users.noreply.github.com>
Date:   Tue Feb 11 10:57:05 2025 +0100

    Dashboards: Prevent title longer than 5 000 characters

    (cherry picked from commit f9e0789210004b0bd7902255644ef348ae7b3aa8)
2025-02-18 21:10:03 +00:00
Kevin Minehart
8229a4c073 [release-11.4.2] CI: release comms should trigger on merges to release- branches (#100910)
CI: release comms should trigger on merges to release- branches (#100901)

release comms should trigger on merges to release- branches

(cherry picked from commit 14477a7fe9)
2025-02-18 23:08:40 +02:00
Matheus Macabu
bf3be6309a [release-11.4.2] Chore: Update alpine docker image (minor) - 3.20.5 to 3.20.6 [security] (#100828)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Chore: Update alpine docker image (minor) - 3.20.5 to 3.20.6 [security] (#100791)

* Chore: Update alpine docker image (minor) - 3.20.5 to 3.20.6 [sec-fixes]

* Chore: Regenerate .drone.yml

---------

Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
(cherry picked from commit 27837ee937)

Co-authored-by: Robert Goltz <github@rgoltz.de>
2025-02-18 10:10:03 +01:00
Kevin Minehart
5c316a5113 [release-11.4.2] Docker: Missing libresolv.so.2 from glibc (#100745)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Docker: Missing libresolv.so.2 from glibc (#100729)

* Docker: Missing libresolv.so.2 from glibc

* Misplaced &&

(cherry picked from commit 3a8a24e662)
2025-02-14 17:22:01 +02:00
Kevin Minehart
0c2af5a880 [release-11.4.2] CI: Backport to release branches (#100694)
* CI: Backport to release branches (#100067)

* update backport and release comms

* Backport to release branches and change docs source branch for publishing

* Add new workflows to CODEOWNERS

* Re-add removed line oops

* backport-testing -> grafana

* checkout grafana repo in backport action, reference repo / branch in reusable action

* generate -> create

(cherry picked from commit 6787cdccb9)

* remove v
2025-02-14 07:56:15 -06:00
Todd Treece
a3a4c2565a [release-11.4.2] Metrics: Use correct gatherer in graphite bridge (#100677)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Metrics: Use correct gatherer in graphite bridge (#100624)

(cherry picked from commit 5a74a1a0f6)
2025-02-13 23:33:51 +02:00
Misi
2451837fb8 [release-11.4.2] IAM: log error when malformed json arrays are found in SSO configs (#100651)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
IAM: Log error when malformed json arrays are found in SSO configs (#99896)

(cherry picked from commit eeadb7e771)

Co-authored-by: xavi <114113189+volcanonoodle@users.noreply.github.com>
2025-02-13 18:36:43 +01:00
Dominik Prokop
27251b44fc [release-11.4.2] Dashboards: Bring back scripted dashboards (#100629)
Dashboards: Bring back scripted dashboards (#100575)

* Dashboards: Bring back scripted dashboards

* Fix scripted dashboard examples

* Fix dashboard-solo page not respecnig scripted dashboards

(cherry picked from commit 7edcde6365)
2025-02-13 17:48:36 +01:00
Oscar Kilhed
38ae17fbc3 [release-11.4.2] Dashboards: Fix repeats not being added on refresh when using searchLayout (#100635)
Dashboards: Fix repeats not being added on refresh when using searchLayout (#100621)

Fix repeats not being added

(cherry picked from commit 1018aec6bc)
2025-02-13 18:48:18 +02:00
Karl Persson
bc6beda11e [release-11.4.2] AuthN: Refetch user on "ErrUserAlreadyExists" (#100585)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
* AuthN: Refetch user on "ErrUserAlreadyExists" (#100346)

* AuthN: Refetch user on "ErrUserAlreadyExists"

(cherry picked from commit 0b4c622df8)

* Fix test
2025-02-13 13:30:20 +01:00
Misi
dff8f508d5 [release-11.4.2] Auth: Add early return if auth_token is in the URL for JWT auth (#100580)
Auth: Add early return if `auth_token` is in the URL for JWT auth (#100539)

* Add early return

* Update public/app/app.ts

Co-authored-by: Victor Cinaglia <victor@grafana.com>

---------

Co-authored-by: Victor Cinaglia <victor@grafana.com>
(cherry picked from commit 5a6d2f2e49)
2025-02-13 12:13:29 +01:00
Misi
08f66dd50c [release-11.4.2] Auth: Fix redirect with JWT auth URL login (#100494)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Auth: Fix redirect with JWT auth URL login (#100295)

fix

(cherry picked from commit acc1521929)
2025-02-12 18:16:02 +01:00
Kevin Minehart
e9f564277f [release-11.4.2] CI: Add release branches to patch automation (#100530)
CI: Add release branches to patch automation (#100442)

* CI: Add release branches to patch automation

* Update .github/workflows/create-security-patch-from-security-mirror.yml

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

---------

Co-authored-by: Agnès Toulet <35176601+AgnesToulet@users.noreply.github.com>
(cherry picked from commit a8b98ded66)
2025-02-12 11:05:26 -06:00
Josh Hunt
ef65865de0 [release-11.4.2] Chore: pin tonistiigi/binfmt version (#100521)
Chore: pin tonistiigi/binfmt version (#100510)

* Chore: pin tonistiigi/binfmt version

* change version to qemu-v7.0.0-28

* uninstall first, log version

* uninstall first, log version

* uninstall first, log version

(cherry picked from commit a9b4b1e5be)
2025-02-12 16:03:06 +00:00
Jacob Valdez
33cf9d6cd4 [release-11.4.2] Docs: Updating manual installation instructions (#100454)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Docs: Updating manual installation instructions (#98834)

* Docs: adding additional installation steps to Grafana on openSUSE docs

* Docs: Adding systemd service info for grafana manual install

* Finalizing first edit with tested steps

* spacing adjustment and adding steps to RHEL/Fedora

* Adding a note based on Marins feedback

* A slight adjustment based on feedback from Marin and adding steps to Debian installation

* adjusting some wording

* adjusting naming conventions for Debian instructions

* changing "open-source" to "open source"

* vale and review edits

* deleting erroneous character in shortcode

* updating some shortcodes

---------

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
(cherry picked from commit b6ea06f259)
2025-02-11 15:00:50 -06:00
Jev Forsberg
10b95276ae [release-11.4.2] Chore: Update grabpl version to v3.1.2 (#100242)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Chore: Update grabpl version to v3.1.2 (#100157)

baldm0mma/ update grabpl version

(cherry picked from commit 8e3327a446)
2025-02-07 08:29:23 -07:00
Jacob Valdez
54db7b0992 [v11.4.x] Docs: Adding info on decrypting encrypted certificates (#100155) 2025-02-07 08:57:27 -06:00
grafana-delivery-bot[bot]
30e5410f4e [v11.4.x] RBAC: Don't check folder access if annotationPermissionUpdate FT is enabled (#100116)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
RBAC: Don't check folder access if `annotationPermissionUpdate` FT is enabled (#99717)

don't check folder access if annotation permission update is enabled

(cherry picked from commit 095593c018)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2025-02-05 13:35:57 +02:00
Jev Forsberg
96c8b4bcdf [v11.4.x] Chore: Update alpine build docker image (#100082)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
Chore: Update alpine build docker image (#99998)

baldm0mma/ update alpine build image

(cherry picked from commit 46af49f907)
2025-02-04 14:33:19 -07:00
grafana-delivery-bot[bot]
e1cde0f2d9 [v11.4.x] Plugin Metrics: Eliminate data race in plugin metrics middleware (#100077)
Plugin Metrics: Eliminate data race in plugin metrics middleware (#99396)

fix: eliminate data race in plugin metrics middleware

A data race was detected when multiple goroutines accessed the `MetricsMiddleware`
simultaneously. The race occurred because a single `MetricsMiddleware` instance
was being shared across goroutines while its `BaseHandler` field was being
modified during middleware chain setup.

Fix by creating a new `MetricsMiddleware` instance for each middleware chain,
while safely sharing the thread-safe Prometheus metrics and plugin registry.
This maintains proper metrics collection while eliminating the mutable shared
state that caused the race condition.

Original error was detected here:

```
WARNING: DATA RACE
Read at 0x00c0039c0790 by goroutine 4486:
  github.com/grafana/grafana-plugin-sdk-go/backend.(*ErrorSourceMiddleware).CallResource()
      /Users/clord/src/grafana/irm-devstack/.devenv/state/go/pkg/mod/github.com/grafana/grafana-plugin-sdk-go@v0.261.0/backend/error_source_middleware.go:93 +0x40
  github.com/grafana/grafana-plugin-sdk-go/backend.BaseHandler.CallResource()
  ...

```

(cherry picked from commit e74cf72d99)

Co-authored-by: Christopher Lord <christopher.lord@grafana.com>
2025-02-04 17:49:35 +00:00
Dan Cech
ced52a53ad [v11.4.x] Docker: Use our own glibc 2.40 binaries (#99924)
Docker: Use our own glibc 2.40 binaries (#99903)

* use our own glibc 2.40 binaries

(cherry picked from commit 481f99b07f)
2025-01-31 15:20:49 -05:00
Yuri Tseretyan
47c6551b50 [v11.4.x] Alerting: k8s receivers api encrypt existing unencrypted secureFields on update (#99848)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-30 16:43:37 -07:00
grafana-delivery-bot[bot]
c74bb4952e [v11.4.x] Update make docs procedure (#99835)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-01-30 17:28:23 +00:00
grafana-delivery-bot[bot]
6f95b96fe3 [v11.4.x] Remove old admonition (#99828)
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
2025-01-30 18:31:44 +02:00
grafana-delivery-bot[bot]
d9bfaa0efe [v11.4.x] Bar Gauge: Add extra padding for scrollbar (#99779)
Bar Gauge: Add extra padding for scrollbar (#99722)

* Add extra padding in bar gauge if scroll exists

* Add thin scroll bars, and fix test

* add comment about height calculation

(cherry picked from commit 1795a2b4e3)

Co-authored-by: Kristina <kristina.durivage@grafana.com>
2025-01-30 08:23:50 -06:00
Sergej-Vlasov
d41e17725c DashboardScenes: Fix issue where relative time does not pass properly (#99282) (#99798)
fix issue where relative time does not pass properly

(cherry picked from commit bf1a0837af)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2025-01-30 10:48:25 +00:00
github-actions[bot]
c7917bf9c8 Release: 11.4.1 (#99651)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
* Update changelog

* Update version to 11.4.1

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-28 08:42:57 -07:00
grafana-delivery-bot[bot]
3e2b2f35af [v11.4.x] Azure: Correctly set application insights resource values (#99598)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
* Azure: Correctly set application insights resource values (#99214)

Correctly set resource values

(cherry picked from commit 30ee8b9813)

* Fix test

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2025-01-27 21:18:06 +02:00
grafana-delivery-bot[bot]
e215d16299 [v11.4.x] Graphite: Fix issue where duplicated panels share same query object (#99100)
Graphite: Fix issue where duplicated panels share same query object (#99077)

(cherry picked from commit c0b3932168)

Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
2025-01-27 18:19:11 +02:00
grafana-delivery-bot[bot]
ccb40e3bba [v11.4.x] MSSQL: Correctly type UDPConnectionLimit (#99583)
MSSQL: Correctly type `UDPConnectionLimit` (#99011)

* Correctly type UDPConnectionLimit

* Update tests

* Handle legacy case

(cherry picked from commit cc09f38421)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2025-01-27 18:15:51 +02:00
Jack Baldry
350d9c71ce [v11.4.x] Remove codespell (#99429)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
2025-01-24 08:28:21 +00:00
grafana-delivery-bot[bot]
a7ea2a3b73 [v11.4.x] LibraryPanel: Fallback to panel title if library panel title is not set (#99410)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
LibraryPanel: Fallback to panel title if library panel title is not set (#99377)

(cherry picked from commit c862aa4d68)

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2025-01-23 13:30:18 +02:00
grafana-delivery-bot[bot]
690a223f6b [v11.4.x] Docs: add user de-duplication description, update usage billing instructions (#99406)
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
2025-01-23 09:56:59 +02:00
grafana-delivery-bot[bot]
8dd4637706 [v11.4.x] Panel inspect: Fix inspect keyboard shortcut when grafana served from subpath (#99373)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Panel inspect: Fix inspect keyboard shortcut when grafana served from subpath (#99366)

* Panel inspect: Fix inspect keyboard shortcut when grafana served from a subpath

* Add e2e test

(cherry picked from commit 51b4ac50aa)

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
2025-01-22 14:44:57 +02:00
grafana-delivery-bot[bot]
0fc69d16e9 [v11.4.x] docs>alert-rules>templates:example-fix (#99360)
docs>alert-rules>templates:example-fix (#99355)

* docs>alert-rules>templates:example-fix

* second-fix

* fixed 2 other label templates

(cherry picked from commit 88d5ae8153)

Co-authored-by: antonio <45235678+tonypowa@users.noreply.github.com>
2025-01-22 13:21:35 +02:00
grafana-delivery-bot[bot]
f433bc770f [v11.4.x] Alerting docs: add Admonitions to Link Doc pages with practical Tutorials (#99323)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting docs: add Admonitions to Link Doc pages with practical Tutorials (#99317)

Alerting docs: add admonitions to link to practical tutorials

(cherry picked from commit c7edbffd82)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2025-01-21 16:01:05 +01:00
grafana-delivery-bot[bot]
d4331c9d0b [v11.4.x] Alerting docs: add instructions to execute notification template examples (#99303)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting docs: add instructions to execute notification template examples (#99275)

(cherry picked from commit 9ce9ad1777)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2025-01-21 10:48:51 +01:00
grafana-delivery-bot[bot]
074a1cf348 [v11.4.x] Azure: Correctly set instance settings based on new credentials (#99212)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Azure: Correctly set instance settings based on new credentials (#99112)

Correctly set value based on new credentials

(cherry picked from commit f39c5bb45c)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2025-01-20 12:54:12 +00:00
grafana-delivery-bot[bot]
9aa8526e7d [v11.4.x] Add Apache instructions (#99210)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Co-authored-by: Joseph Perez <45749060+josmperez@users.noreply.github.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
Co-authored-by: Ronald McCollam <mccollam@gmail.com>
2025-01-17 12:32:37 -06:00
grafana-delivery-bot[bot]
122642a6d7 [v11.4.x] QueryVariable: Default query is not set when creating a new variable (#99197)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
QueryVariable: Default query is not set when creating a new variable (#99029)

* QueryVariable: Default query is not set when creating a new variable

* use correct getDefaultQuery

---------

Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
(cherry picked from commit feae06d81c)

Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
2025-01-17 17:34:15 +02:00
Isabel Matwawana
805ab7bd8a Docs: Updated unsupported and unconfirmed lists (#99119) 2025-01-17 08:27:38 -05:00
Mariell Hoversholm
86bb6dd4b1 Security: Update to Go 1.23.5 - Backport to v11.4.x (#99123)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
* feat: update to Go 1.23.5

* chore: make drone

* fix: update in Makefile

* CI: Force re-build

* build: update mariadb connection

The new Alpine base that the Golang images are built on no longer trust the CA of MySQL.

This is a backport of: https://github.com/grafana/grafana/pull/98857

* chore: go mod tidy
2025-01-17 09:33:07 +01:00
grafana-delivery-bot[bot]
7b5235f06d [v11.4.x] Docs: add that traces panel works with traceID to show a singular trace (#99070)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: Gaurav Soni <raveformails@gmail.com>
2025-01-16 11:22:10 -05:00
grafana-delivery-bot[bot]
f83e0a8a39 [v11.4.x] setDashboardPanelContext: Allow to add filters from the table with the same key (#99089)
setDashboardPanelContext: Allow to add filters from the table with the same key (#99004)

* always add filters for elastic seach ds when filtering table value

* simplify update filter logic and restore behaviour from old arch

* remove unnecessary modifications

* adjust namig

(cherry picked from commit 3df1fa86ae)

Co-authored-by: Sergej-Vlasov <37613182+Sergej-Vlasov@users.noreply.github.com>
2025-01-16 15:21:44 +00:00
Sergej-Vlasov
0c7f575149 Update scenes to v5.37.0 (#98958) (#99082)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit 2594b4f7af)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-16 14:02:55 +00:00
grafana-delivery-bot[bot]
696d22a3fe [v11.4.x] Docs: update broken Play link (#98986)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2025-01-14 22:10:35 -05:00
grafana-delivery-bot[bot]
fc1d9c1719 [v11.4.x] Alerting docs: clarify data source-managed rules for Prometheus (#98954)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting docs: clarify data source-managed rules for Prometheus (#98378)

* Clarify DS managed rules support only the creation of Mimir and Loki rules

* additional copy changes

* Extend `Manage alerts via Alerting UI` description

* fix capital letter

* further details for `Manage alerts via Alerting UI`

(cherry picked from commit 7771768363)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2025-01-14 14:04:31 +01:00
Larissa Wandzura
de310cb88c [v11.4.x] Docs: MySQL data source updates/revamp (#98906)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Docs: MySQL data source updates/revamp (#98652)

* made initial edits

* continued updates

* finished initial config doc updates

* updates

* updates to query editor

* edits to query editor

* final edits prior to PR

* more final edits :-)

* edits based on feedback meeting

* fixed some spelling and grammar issues

* final edits

* ran prettier

* minor change to intro description

* Fix prettier

* Update docs/sources/datasources/mysql/query-editor/_index.md

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

* Update docs/sources/datasources/mysql/query-editor/_index.md

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

* Update docs/sources/datasources/mysql/query-editor/_index.md

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

* edits based on feedback

* fixed mistake

* Fix prettier

* fixed ref UIs, edits based on feedback

* one minor change

* ran prettier again

---------

Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
(cherry picked from commit ab6d82a33c)
2025-01-13 14:35:01 -06:00
grafana-delivery-bot[bot]
227c8392e0 [v11.4.x] OAuth: Return SocialError on membership check failure (#98861)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
OAuth: Return SocialError on membership check failure (#98330)

use socialerror

(cherry picked from commit ddca09fb02)

Co-authored-by: Daniel-Davies <33356828+Daniel-Davies@users.noreply.github.com>
2025-01-13 12:18:49 +02:00
grafana-delivery-bot[bot]
dc2c257c1a [v11.4.x] Alerting docs: fix template example link (#98817)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Alerting docs: fix template example link (#98715)

* Alerting docs: fix template example link

* ran prettier

* adjust spacing

* Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Alerting docs: fix `Explore` ref link

* updates other links

* correcting link

* Update docs/sources/alerting/alerting-rules/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/alerting/alerting-rules/templates/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* fix label ref

---------

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
(cherry picked from commit 619e7d3d3f)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2025-01-10 15:28:26 +01:00
grafana-delivery-bot[bot]
97517f41cf [v11.4.x] InfluxDB: Adhoc filters can use template vars as values (#98786)
InfluxDB: adhoc filters can use template vars as values (#98567)

---------

Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
(cherry picked from commit be1505f2fb)

Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
2025-01-10 15:08:36 +01:00
grafana-delivery-bot[bot]
a13443ad11 [v11.4.x] ContactPoints: Remove blank lines prefixes in contact point types (#98766)
ContactPoints: Remove blank lines prefixes in contact point types (#98590)

Remove blank lines prefixes in contact point types

(cherry picked from commit 7cad430ca7)

Co-authored-by: Selene <selenepinillos@gmail.com>
2025-01-10 13:06:22 +01:00
grafana-delivery-bot[bot]
2d06a936c3 [v11.4.x] Grafana UI: Re-add react-router-dom as a dependency (#98422)
Grafana UI: Re-add react-router-dom as a dependency (#97540)

* chore(grafana/ui): add react-router-dom v5 as a dependency

* chore(grafana-ui): align version of react-router with core

---------

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit 7e4b05c268)

Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
2025-01-10 09:51:07 +01:00
grafana-delivery-bot[bot]
860a25f7fd [v11.4.x] Docs: Add 11.4 to supported versions table (#98773)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Zach Day <zachary.day@grafana.com>
2025-01-09 17:44:53 -05:00
Ivan Ortega Alba
ede278c767 [v11.4.x] Dashboards: Fixes issue with panel header showing even when hide time override was enabled (#98747)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Dashboards: Fixes issue with panel header showing even when hide time override was enabled (#95814)

* Dashboards: Fixes issue with panel header showing even when hide time override was enabled


(cherry picked from commit 6fd3620d50)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2025-01-09 18:30:06 +01:00
grafana-delivery-bot[bot]
dab5a49df0 [v11.4.x] Docs: Add G12 release date to upgrade guide (#98748)
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
Co-authored-by: margotphelps <123196595+margotphelps@users.noreply.github.com>
2025-01-09 11:47:59 -05:00
Oscar Kilhed
49ea20d027 [v11.4.x] Dashboards: Fix issue where filtered panels would not react to variable changes (#98734)
Dashboards: Fix issue where filtered panels would not react to variable changes (#98718)

* Make sure we activate the parent and tree even if current panel is active

* force activate full scene object tree

---------

Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
(cherry picked from commit 56be39ed4f)
2025-01-09 17:08:12 +01:00
grafana-delivery-bot[bot]
ed927a143c [v11.4.x] Alerting: Fix label escaping in rule export (#98649)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting: Fix label escaping in rule export (#97985)

(cherry picked from commit 25538bcfdf)

Co-authored-by: Moustafa Baiou <moustafa.baiou@grafana.com>
2025-01-08 13:35:30 -05:00
grafana-delivery-bot[bot]
4e072ffe50 [v11.4.x] Update index.md [2025 release dates added] (#98636)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
Co-authored-by: margotphelps <123196595+margotphelps@users.noreply.github.com>
2025-01-07 15:26:25 -05:00
Kim Nylander
07841886b6 [v11.4.x] [DOC] Updates for profile doc restructure (#98629)
[DOC] Updates for profile doc restructure (#98301)

* Updates for profile doc restructure

* Updates from prettier

(cherry picked from commit 1d551a86dc)
2025-01-07 12:37:02 -05:00
grafana-delivery-bot[bot]
1547a09645 [v11.4.x] Docs: Add Google Sheets to unsupported list (#98537)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Jay <92761481+JayEkin@users.noreply.github.com>
2025-01-06 12:06:10 -05:00
grafana-delivery-bot[bot]
ea930b2a51 [v11.4.x] OptionsPicker: Fix matching non-latin template vars in filter (#98425)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
OptionsPicker: Fix matching non-latin template vars in filter (#98416)

(cherry picked from commit e43e86376e)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-12-31 14:26:05 +02:00
grafana-delivery-bot[bot]
2c408c8139 [v11.4.x] Alerting docs/internal: leaf bundle page becomes a branch bundle (#98405)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
Alerting docs/internal: leaf bundle page becomes a branch bundle (#98391)

(cherry picked from commit 6178320257)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-12-30 12:19:25 +01:00
grafana-delivery-bot[bot]
4a6f5ebe23 [v11.4.x] Update make docs procedure (#98400)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-30 12:16:04 +02:00
grafana-delivery-bot[bot]
86c21cee85 [v11.4.x] Alerting docs: update configuring and using additional Alertmanagers in Grafana Alerting (#98381)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Alerting docs: update configuring and using additional Alertmanagers in Grafana Alerting (#98363)

* Alerting docs: Alertmanager data source

* Alertmanager data source: minor intro changes

* Update `Intro > Notifications`

* Complete Configure alertmanager update

* Configure alertmanager

* minor final edits

(cherry picked from commit 6976908597)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-12-27 14:54:49 +02:00
grafana-delivery-bot[bot]
0573e4d9a9 [v11.4.x] Update make docs procedure (#98384)
Co-authored-by: grafanabot <bot@grafana.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-12-27 14:24:44 +02:00
grafana-delivery-bot[bot]
6a08b1cdc2 [v11.4.x] Alerting docs: fix broken link (#98307)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Alerting docs: fix broken link (#98259)

(cherry picked from commit 9f0e1a1053)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-12-20 11:34:33 +01:00
grafana-delivery-bot[bot]
b12cab40d1 [v11.4.x] Docs: Updated Grafana Enterprise page with missing data sources (#98292)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Docs:  Updated Grafana Enterprise page with missing data sources (#98286)

added 5 missing data sources, changed one name

(cherry picked from commit c172bbba50)

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
2024-12-19 14:31:58 -06:00
grafana-delivery-bot[bot]
9b1414e2ef [v11.4.x] Dashboards: Fixes week relative time ranges when weekStart was changed (#98269)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Dashboards: Fixes week relative time ranges when weekStart was changed (#98167)

* Dashborads: Fixes week relative time ranges when weekStart was changed

* Fix

* Update

(cherry picked from commit 02aded2743)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-12-19 15:57:42 +01:00
grafana-delivery-bot[bot]
96060e359f [v11.4.x] Update configure-tempo-data-source.md (#98264)
Update configure-tempo-data-source.md (#98228)

(cherry picked from commit 848f03928c)

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2024-12-19 09:17:34 -05:00
grafana-delivery-bot[bot]
cd060b0791 [v11.4.x] Docs: Gauge visualization refactor (#98219)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-12-18 12:56:49 -05:00
Erik Sundell
f2c2883a0f [v11.4.x] Fix: Add support for datasource variable queries (#98119)
Fix: Add support for datasource variable queries
2024-12-18 14:08:08 +01:00
Moustafa Baiou
b7fff35a8a [v11.4.x] Alerting: Fix slack image uploading to use new api (#98066) 2024-12-18 08:03:57 -05:00
grafana-delivery-bot[bot]
122c417f8c [v11.4.x] Alerting docs: update Monitor status section (#98183)
Alerting docs: update `Monitor status` section (#98179)

* Minor updates to `Declare incidents` docs

* change URL

* View alert state history + restructuring

* Complete alert state

* alert state

* change heading

* View alert rules

* Monitor alerts

(cherry picked from commit 001cc853a5)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-12-18 13:44:02 +01:00
Isabel Matwawana
fb86150321 [v11.4.x]Docs: Add clarifying information about embeds in Cloud (#97894)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
2024-12-17 15:23:54 -05:00
grafana-delivery-bot[bot]
e0dd77c05a [v11.4.x] Use v2 of publishing workflow that checks out HEAD of version branch on tag events (#98078)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Use v2 of publishing workflow that checks out HEAD of version branch on tag events (#98029)

This uses a script check in the first step of tag events that switches the checkout to the version branch that the tag refers to: https://github.com/grafana/writers-toolkit/blob/main/publish-technical-documentation-release/determine-release-branch.

Implemented in:

- 305f9896c4
- 541fb6e8bd

Because the script uses Bash regular expression pattern matching, inputs must use Extended Regular Expression syntax.


(cherry picked from commit 331c602c5e)

Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2024-12-17 13:32:27 +00:00
Isabel Matwawana
a69e5fb0a2 [v11.4.x] Docs - Update variable limitation (#98071)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
2024-12-16 16:49:14 -05:00
grafana-delivery-bot[bot]
e1ba2dd355 [v11.4.x] Fix: Show organization attribute path only for GrafanaAdmins on the UI (#98043)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Fix: Show organization attribute path only for GrafanaAdmins on the UI (#98002)

* Show organization attribute path only for GrafanaAdmins

* prettier

(cherry picked from commit 7b24c4404d)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2024-12-16 17:18:40 +02:00
grafana-delivery-bot[bot]
4c288f39ee [v11.4.x] Alerting docs: reorder rules action in DS rules (#98016)
Alerting docs: `reorder rules` action in DS rules (#97974)

Alerting docs (minor) - mention `reorder rules` action in DS rules

(cherry picked from commit c983af1755)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-12-16 12:22:08 +01:00
grafana-delivery-bot[bot]
d9045acddb [v11.4.x] DateTimePicker: Fixes issue with date picker showing invalid date (#97971)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
DateTimePicker: Fixes issue with date picker showing invalid date (#97888)

* DateTimePicker: Fixes issue with date picker showing invalid date

* Fix lint

(cherry picked from commit d93a5a7c53)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-12-16 10:19:32 +01:00
Adam Yeats
c705a3eb36 [v11.4.x] MSSQL: Bump go-mssqldb to v1.8.0 (#97835)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
MSSQL: Bump `go-mssqldb` to v1.8.0 (#97773)

(cherry picked from commit 60f093e3d3)
2024-12-13 16:18:57 +00:00
grafana-delivery-bot[bot]
03e84aca2b [v11.4.x] Alerting docs: update Configure notifications (#97954)
Alerting docs: update `Configure notifications` (#97862)

* Update `Configure notifications`

* wip notification policies

* Finish Create Notification Policy

* Minor update to Contact point intro

* Fix `How label matching works` links and remove links from contact point intro

* Silences and Mute timings

* Reorder + MuteTimings  + Silences

* Complete Create silence

* fix mispell

* Update docs/sources/alerting/configure-notifications/_index.md

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

* Update docs/sources/alerting/configure-notifications/_index.md

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

* Update docs/sources/alerting/configure-notifications/_index.md

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

* Update docs/sources/alerting/configure-notifications/_index.md

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

* fix prettier error

---------

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

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-12-13 16:41:50 +01:00
grafana-delivery-bot[bot]
20f9416142 [v11.4.x] GrafanaData: Add now parameter to dateMath.parse to subsitute now string (#97911)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
GrafanaData: Add now parameter to dateMath.parse to subsitute now string (#97151)

* Add now parameter to dateMath.parse to subsitute now string

* Create new function, deprecate the old

* Add docstring

* Typo

(cherry picked from commit e3e7086a91)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2024-12-13 15:46:27 +01:00
grafana-delivery-bot[bot]
7e1f67f9d7 [v11.4.x] Docs: Fix broken link (#97906)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Fix broken link (#97891)
2024-12-13 09:43:29 -05:00
grafana-delivery-bot[bot]
66a7e6a60a [v11.4.x] Alerting docs: State and health of alerts minor updates (#97923)
Alerting docs: `State and health of alerts` minor updates (#97880)

* Alerting docs: Update `State and health of alerts`

* correct internal ref name

(cherry picked from commit 0cce224adb)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-12-13 11:54:19 +01:00
grafana-delivery-bot[bot]
620534891d [v11.4.x] Azure: Add documentation for Basic Logs (#97877)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Azure: Add documentation for Basic Logs (#97193)

* Add documentation for Basic Logs

* Lint

* Update docs/sources/datasources/azure-monitor/query-editor/index.md

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>

---------

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
(cherry picked from commit dbe2d7ac47)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2024-12-12 18:45:32 +02:00
Gilles De Mey
de338282c1 [v11.4.x] Alerting: AlertingQueryRunner should skip descendant nodes of invalid queries (#97830)
Alerting: AlertingQueryRunner should skip descendant nodes of invalid queries (#97528)

(cherry picked from commit 9c396b74f9)
2024-12-12 16:58:13 +01:00
Mariell Hoversholm
72acd7f000 Backport 0a390cc069 from #97823 (#97861) 2024-12-12 16:10:41 +01:00
Sergej-Vlasov
0e6b320f4d Dependencies: Scenes bump 5.30 (#97745) (#97751)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Dependencies: Scenes bump 5.40
(cherry picked from commit 4cbb56256c)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-12-12 09:33:20 +00:00
grafana-delivery-bot[bot]
bed84aefdf [v11.4.x] Docs: Added clarification to Azure monitor config doc (#97810)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
2024-12-11 19:10:53 +02:00
grafana-delivery-bot[bot]
cb0f9b4093 [v11.4.x] Clarifies documentation around what the annotations.tags_length setting does (#97798)
Co-authored-by: Bruno Abrantes <bruno.abrantes@grafana.com>
2024-12-11 16:48:22 +02:00
grafana-delivery-bot[bot]
9bfc35ec25 [v11.4.x] Docs: Add units after "CPU" (#97749)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
2024-12-10 16:46:14 +02:00
grafana-delivery-bot[bot]
e076682a17 [v11.4.x] Docs: pie chart visualization refactor (#97707)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-12-09 16:05:25 -05:00
grafana-delivery-bot[bot]
01a0baf5c1 [v11.4.x] Table: RowsList passing incorrect index to onRowHover (#97678)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Table: RowsList passing incorrect index to onRowHover (#97599)

* chore: fix table returning the wrong index to onRowHover

(cherry picked from commit 645776afc9)

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2024-12-09 13:02:20 -06:00
Isabel Matwawana
8a0b736610 [v11.4.x] Docs: heatmap visualization refactor (#97686) 2024-12-09 11:55:44 -05:00
grafana-delivery-bot[bot]
006d2b2b72 [v11.4.x] Docs: state timeline visualization refactor (#97668)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-12-09 10:57:04 -05:00
grafana-delivery-bot[bot]
df43a3fff4 [v11.4.x] Docs: alert list visualization refactor (#97671)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-12-09 10:40:01 -05:00
Pepe Cano
93c507cc8f [v11.4.x] Alerting docs: update Configure alert rules (#97624)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting docs: update `Configure alert rules` (#97430)

* Simplify a bit more Intro to Alert rules

* Update `Configure alert rules` docs

* Configure Grafana-managed alert rules

* Update `Configure data source-managed alert rules`

* fix mispelled word

* fix grammar error

* remove unnecessary space

* remove whitespace

* address brand name convention

(cherry picked from commit 7f99388576)
2024-12-09 11:08:49 +01:00
grafana-delivery-bot[bot]
626c15c1a5 [v11.4.x] Azure/GCM: Improve error display (#97594)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
* Azure/GCM: Improve error display (#96921)

Improve handling of errors

(cherry picked from commit 9f75a448d4)

* Update var name and import

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2024-12-06 22:06:20 +02:00
grafana-delivery-bot[bot]
ac481509c7 [v11.4.x] Alerting: Fix alert rules unpausing after moving rule to different folder (#97583)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting: Fix alert rules unpausing after moving rule to different folder (#97580)

Alerting: Fix alert rules unpaused after moving rule to different folder
(cherry picked from commit f60caf6932)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2024-12-06 15:49:54 -03:00
grafana-delivery-bot[bot]
e4a7eb6b69 [v11.4.x] docs: update Logs in Explore topic (#97526)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
docs: update Logs in Explore topic (#97517)

* docs: update Logs in Explore topic

* Fixes from prettier

---------

Co-authored-by: Kim Nylander <kim.nylander@grafana.com>
(cherry picked from commit bf5fef8b64)

Co-authored-by: J Stickler <julie.stickler@grafana.com>
2024-12-05 17:52:08 -05:00
grafana-delivery-bot[bot]
c9859478ee [v11.4.x] CI: Fix latest tag not being correctly applied to releases (#97522)
CI: Fix `latest` tag not being correctly applied to releases (#96497)

* baldm0mma/tag_latest_bug/ update github-release.yml default values

* baldm0mma/tag_latest_bug/ update release-comms.yml

* baldm0mma/tag_latest_bug/ update logic

* baldm0mma/tag_latest_bug/ update logic

* baldm0mma/tag_latest_bug/ update logic

* baldm0mma/tag_latest_bug/ update logic for both cases

* baldm0mma/tag_latest_bug/ update comment

(cherry picked from commit d8c19136bf)

Co-authored-by: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com>
2024-12-05 15:32:12 -07:00
grafana-delivery-bot[bot]
0b732db623 [v11.4.x] Docs: Comment video link back in (#97513)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-12-05 15:49:10 -05:00
grafana-delivery-bot[bot]
88aa744512 [v11.4.x] Docs: What’s new & Upgrade guide v11.4 (#97510)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-12-05 15:33:44 -05:00
github-actions[bot]
443dcc026d Release: 11.4.0 (#97500)
* Update changelog

* Update version to 11.4.0

* Update CHANGELOG.md

* update versions

* run gen-cue

* update plugin dep

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com>
Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
2024-12-05 12:24:12 -07:00
jev forsberg
b58701869e update whats new url 2024-12-04 14:19:30 -07:00
idastambuk
b12308499b Cloudwatch: OpenSearch PPL and SQL support in Logs Insights
Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Nathan Vērzemnieks <njvrzm@users.noreply.github.com>
2024-12-04 09:13:15 -07:00
Jev Forsberg
80691e4297 [v11.3.x] CI: add missing github app volume to release pipeline (#97414)
CI: add missing github app volume to release pipeline (#97406)

add github app volume to release pipeline

(cherry picked from commit 6fe184a565)

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2024-12-04 08:46:54 -07:00
grafana-delivery-bot[bot]
8bc94106e2 [v11.3.x] Alerting docs: clarify $labels and query labels (#97356)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
Alerting docs: clarify `$labels` and query labels (#97350)

* Alerting docs: clarify `$labels` and query labels

* fix mispell

(cherry picked from commit 8fe36e1c83)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-12-03 16:11:23 +01:00
grafana-delivery-bot[bot]
54ff80afb1 [v11.3.x] Deprecate notice for metrics summary and Aggregate by (#94788)
Deprecate notice for metrics summary and Aggregate by (#94761)

(cherry picked from commit a5022d9dc6)

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2024-12-03 10:06:38 -05:00
grafana-delivery-bot[bot]
780e191177 [v11.3.x] Packaging: Remove sysvinit references / support from rhel packaging (#97309)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Packaging: Remove sysvinit references / support from rhel packaging (#97068)

Remove sysvinit references / support from rhel packaging

(cherry picked from commit 3448384e0d)

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2024-12-02 22:20:45 +02:00
Jev Forsberg
e80e6e532c [v11.3.x] Chore: Remove verification steps for deb/rpm in drone (#97297)
Chore: Remove verification steps for deb/rpm in drone (#96991)

remove verification steps for deb/rpm in drone

(cherry picked from commit feeb2c6ce0)

Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
2024-12-02 11:57:59 -07:00
grafana-delivery-bot[bot]
17d7ca7232 [v11.3.x] Docs: Canvas visualization refactor (#97286)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-12-02 12:11:29 -05:00
grafana-delivery-bot[bot]
bc3fd9d808 [v11.3.x] Docs: Add more information on wrap text override (#97273)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-12-02 11:12:36 -05:00
grafana-delivery-bot[bot]
1de9f9477f [v11.3.x] Fix: Do not fetch Orgs if the user is authenticated by apikey/sa or render key (#97262)
Fix: Do not fetch Orgs if the user is authenticated by apikey/sa or render key (#97162)

* Do not fetch Orgs if the user is authenticated by apikey/sa or render svc

* Lint

(cherry picked from commit fa634e1476)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2024-12-02 16:06:48 +01:00
grafana-delivery-bot[bot]
4428bf7025 [v11.3.x] Alerting: Fix incorrect 500 code on missing alert rule dashboardUID / panelID (#96775)
Alerting: Fix incorrect 500 code on missing alert rule dashboardUID / panelID (#96491)

(cherry picked from commit 64c93217ff)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2024-12-02 09:15:40 -05:00
grafana-delivery-bot[bot]
b35522672b [v11.3.x] doc: Fix spacing in sample values for enabling persistence (#97238)
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
Co-authored-by: horacimacias <horacimacias@gmail.com>
Fix spacing in sample values for enabling persistence (#97220)
2024-12-02 12:47:48 +02:00
grafana-delivery-bot[bot]
c8031ed338 [v11.3.x] Update index.md to add a note about provisioned data source (#97232)
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Gaurav Soni <raveformails@gmail.com>
2024-12-02 12:00:00 +02:00
Sergej-Vlasov
9c606f2302 Update to scenes 5.28.1 (#97204) (#97207)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
update to scenes 5.28.1

(cherry picked from commit 174e9ae193)
2024-11-29 18:16:56 +02:00
grafana-delivery-bot[bot]
8395bda60f [v11.3.x] Alerting: Fix contact points secure settings migration (#97146)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Alerting: Fix contact points secure settings migration (#95787)

Add missing migration for secure settings, add types to notifiers mocks

(cherry picked from commit 3c8d29fa46)

Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
2024-11-28 14:40:16 +01:00
grafana-delivery-bot[bot]
f8dfaebf4c [v11.3.x] DashboardScene: Fix layout issues with repeated panels when repeatDirection is missing (#97156)
DashboardScene: Fix layout issues with repeated panels when `repeatDirection` is missing (#97149)

fix

(cherry picked from commit 0bf9d68070)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2024-11-28 14:48:02 +02:00
grafana-delivery-bot[bot]
1c201629d5 [v11.3.x] Docs: Fix broken link (#97121)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Fix broken link (#97119)
2024-11-27 12:07:19 -05:00
grafana-delivery-bot[bot]
37858e7e24 [v11.3.x] Docs: Add note to refresh page after saving dashboards (#97114)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-11-27 11:28:46 -05:00
grafana-delivery-bot[bot]
60370b4ea6 [v11.3.x] Docs: Add column lists to panel config pages (#97111)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-11-27 10:37:12 -05:00
Sergej-Vlasov
70c37c9b03 Update scenes to v5.26.0 (#96968) (#97089)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit b23805a78a)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-27 13:38:19 +00:00
Sergej-Vlasov
55cb58b8be Update scenes to v5.25.1 (#96782) (#97086)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit 68e7f6069c)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-27 09:53:29 +00:00
Sergej-Vlasov
1695d2716f Update scenes to v5.25.0 (#96463) (#97060)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit 8375fcd350)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-27 09:06:10 +00:00
Sergej-Vlasov
9ab6d23f77 Update scenes to v5.23.1 (#95951) (#97050)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
* Update scenes to v5.23.1

* Fix e2e tests

* Fix unit tests

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
(cherry picked from commit 70c21a2e4d)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-26 15:43:57 +00:00
Sergej-Vlasov
13e8921d27 Update scenes to v5.22.1 (#95655) (#97047)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(cherry picked from commit b4012b6ac8)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-26 14:58:43 +00:00
grafana-delivery-bot[bot]
d0e5c87992 [v11.3.x] [DOC] Remove simple configuration in Tempo data source docs (#97002)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
[DOC] Remove simple configuration in Tempo data source docs (#96932)

* Remove simple configuration from Tempo data source docs

* Change deprecation to 11.5 for aggregate by

* Update docs/sources/shared/datasources/tempo-search-traceql.md

(cherry picked from commit 18c8ed3088)

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2024-11-25 21:11:36 -05:00
grafana-delivery-bot[bot]
4cb555fa8b [v11.3.x] Docs: Add correlations youtube link to What's new (#95281)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-11-25 10:07:12 -05:00
Alexander Akhmetov
98be4ac047 [v11.3.x] Alerting: Update state manager to have immutable state in cache (#96843)
* Alerting: Update state manager to have immutable state in cache (#95985)

* create a new state and set at the end
* propagate labels datasource_uid and ref_id from current state if it's error
* copy the state when apply to all

(cherry picked from commit 420db99d16)

* Remove unused states variables

---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-11-25 15:22:40 +01:00
Kevin Minehart
9c7c333856 [v11.3.x] CI: Add github app token generation in pipelines that use GITHUB_TOKEN (#96874)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
CI: Add github app token generation in pipelines that use GITHUB_TOKEN (#96646)

* Add github app token generation in pipelines that use GITHUB_TOKEN

* ci?

* clone gh repo using x-access-token user

* address linting issues

* use mounted volume for exporting token

* remove unused github_token env var swagger gen step

* replace pat on release_pr pipepline

* cleanup GH PAT references

* linting

* Update scripts/drone/steps/lib.star

* make drone

---------

Co-authored-by: Matheus Macabu <macabu.matheus@gmail.com>
(cherry picked from commit 2400483d6c)
2024-11-21 21:08:48 -06:00
Jacob Valdez
d15321179e [v11.3.x] Docs: Removing outdated versioning info in create reports (#96808)
Docs: Removing outdated versioning info in create reports (#96804)

Removing outdated versioning info in create reports

(cherry picked from commit e6a771cf4a)

Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-11-21 15:28:19 -06:00
grafana-delivery-bot[bot]
f0e56bdf64 [v11.3.x] Docs: Update InfluxDB data source documentation (#96864)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Docs:  Update InfluxDB data source documentation (#96343)

* created config doc, made initial changes

* initial draft of config doc completed

* additional edits

* moved config doc into directory, renamed

* made additional updates

* template variables updates/cleanup

* cleaned up intro page, some more minor edits

* edited and re-formatted configure the data source doc

* final edits

* more edits

* minor changes prior to PR

* fix typo

* Update docs/sources/datasources/influxdb/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/influxdb/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/influxdb/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/influxdb/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/influxdb/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/influxdb/query-editor/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/influxdb/query-editor/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/influxdb/template-variables/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/influxdb/query-editor/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/influxdb/configure-influxdb-data-source/_index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* Update docs/sources/datasources/influxdb/query-editor/index.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

* updates based on feedback

* ran prettier

---------

Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 26be86ee15)

Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
2024-11-21 13:48:12 -06:00
grafana-delivery-bot[bot]
bc89fe04b9 [v11.3.x] Alerting docs: fix data source link (#96844)
Alerting docs: fix data source link (#96819)

* Alerting docs: fix data source link

* updates

* corrects menu path

* correct pattern destination

(cherry picked from commit b392a44737)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-11-21 15:10:28 +01:00
grafana-delivery-bot[bot]
e3367ccf9a [v11.3.x] Scenes: Fix angular migrations that are using the targets property on the old panel model (#96831)
Scenes: Fix angular migrations that are using the targets property on the old panel model (#96626)

Fix angular migrations using target

(cherry picked from commit 5986b03a8f)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2024-11-21 13:32:12 +01:00
grafana-delivery-bot[bot]
dfb1f9a3c1 [v11.3.x] Docs: stat visualization refactor (#96801)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-11-20 15:40:58 -05:00
grafana-delivery-bot[bot]
f5cf121eb5 [v11.3.x] Docs: Moved and renamed navigation section (#96797)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-11-20 15:25:33 -05:00
grafana-delivery-bot[bot]
64b556c137 [v11.3.x] Added docket tag note to security section (#96726)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: margotphelps <123196595+margotphelps@users.noreply.github.com>
2024-11-19 15:45:02 -05:00
github-actions[bot]
8d6bbb7a4b Release: 11.3.1 (#96714)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
* Update changelog

* Update version to 11.3.1

* Update version

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2024-11-19 18:36:29 +00:00
Isabel Matwawana
08e10ff665 [v11.3.x] Docs: Node graph visualization refactor (#96707) 2024-11-19 11:40:10 -05:00
grafana-delivery-bot[bot]
13d60c9bd4 [v11.3.x] Docs: Logs visualization refactor (#96637)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-11-18 10:22:53 -05:00
grafana-delivery-bot[bot]
96d1d5a07b [v11.3.x] Alerting docs: fix query syntax sentence (#96618)
Alerting docs: fix query syntax sentence (#96614)

* Alerting docs: fix query syntax sentence

* updates sentence

* pepes feedback

(cherry picked from commit d187716e73)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-11-18 12:26:24 +01:00
grafana-delivery-bot[bot]
c97b64e9ff [v11.3.x] Docs: Added New Release Dates,Security Versioning and Freezes (#96571)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
Co-authored-by: margotphelps <123196595+margotphelps@users.noreply.github.com>
2024-11-15 11:09:33 -05:00
grafana-delivery-bot[bot]
54eca5c73f [v11.3.x] Docs: Bar chart visualization refactor (#96560)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-11-15 10:09:40 -05:00
grafana-delivery-bot[bot]
4b634e887d [v11.3.x] Docs: Plugin Installation - reorganize and add air-gapped environments (#96533)
Docs: Plugin Installation - reorganize and add air-gapped environments (#96437)

* rewriting installation docs and including info about airgapped environments

* Changing example to lokieexplore app

* run prettier

* adding corrections

* running prettier

---------

Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
(cherry picked from commit 0f4517df98)

Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
2024-11-15 13:55:27 +01:00
Konrad Lalik
9225f4a1cb [v11.3.x] Alerting: Add useReturnTo hook to safely handle returnTo parameter (#96481)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting: Add useReturnTo hook to safely handle returnTo parameter (#96474)

Add useReturnTo hook to safely handle returnTo parameter

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

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2024-11-15 10:10:37 +02:00
grafana-delivery-bot[bot]
a09dcda92d [v11.3.x] Alerting: Fix per-receiver RBAC for receivers with long names (#95165)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting: Fix per-receiver RBAC for receivers with long names (#95084)

* Implement uidToResourceID

* add middleware

* Move uidToResourceID to alerting package

* Only hash uid if it's too long

* Use hashed uid in access control

* Move ReceiverUidToResourceId to ScopeProvider

* resolve uid in middleware only if param exists

* Tests

* Linting

---------

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
(cherry picked from commit 4aad44e848)

Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
2024-11-14 13:01:31 -05:00
grafana-delivery-bot[bot]
a6bc76df32 [v11.3.x] Docs: Add canvas custom images and icon guidance (#96470)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-11-14 11:02:48 -05:00
grafana-delivery-bot[bot]
d5cbf07090 [v11.3.x] Docs/adding information on using variable expansion and env variable for TLS certs when provisioning data sources (#96471)
Docs/adding information on using variable expansion and env variable for TLS certs when provisioning data sources (#96400)

Docs/adding information on using variable expansion and env variables for TLS certs when provisioning data sources

(cherry picked from commit 28ad9684e9)

Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
2024-11-14 17:36:23 +02:00
kay delaney
d32c02ae14 [v11.3.x] Dashboard datasource: Return annotations as series when query topic is "annotations" (#95971)
Dashboard datasource: Return annotations as series when query topic is "annotations" (#95965)

(cherry picked from commit 26b0e8f105)
2024-11-14 14:45:17 +00:00
grafana-delivery-bot[bot]
d815e1107d [v11.3.x] Alerting docs: adds cloud alert rule limits (#96442)
Alerting docs: adds cloud alert rule limits (#96441)

(cherry picked from commit 14d868a791)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-11-14 12:38:07 +02:00
Victor Marin
700f59a0ea [v11.3.x] Fix dashboards listing table appearing distorted (#96390)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Fix dashboards listing table appearing distorted (#96371)

* fix CSS

* approx height calc to account for header div

(cherry picked from commit 19c04168c3)
2024-11-14 09:37:27 +02:00
grafana-delivery-bot[bot]
a6cdb48249 [v11.3.x] Docs: Add auth entries to what's new 11.2 (#96394)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-11-13 09:29:15 -05:00
grafana-delivery-bot[bot]
ecf127c0fa [v11.3.x] Docs/removing outdated versioning info in OSS data source docs (#96352)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Docs/removing outdated versioning info in OSS data source docs (#96351)

docs/removing outdated versioning info in oss data source docs

(cherry picked from commit f83f7332a1)

Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
2024-11-12 15:02:20 -06:00
lean.dev
9241bc5f5c [v11.3.x] MigrationAssistant: Restrict dashboards, folders and datasources by the org id of the signed in user (#96345)
apply security patch: v11.3.x/194-202410181505.patch
2024-11-12 16:33:00 -03:00
github-actions[bot]
a2b1cda210 Release: 11.3.0+security-01 (#96295)
* Update changelog

* add relevant CVE fix to the changelog

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Sergej-Vlasov <sergej.s.vlasov@gmail.com>
2024-11-12 16:01:43 +00:00
grafana-delivery-bot[bot]
50762226a0 [v11.3.x] docs: Fixed title wording from bar gauge to canvas (#96319)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Señor Performo - Leandro Melendez <54183040+srperf@users.noreply.github.com>
Fixed title wording from bar gauge to canvas (#96312)
2024-11-12 10:13:31 -05:00
grafana-delivery-bot[bot]
58333e0507 [v11.3.x] Alerting: Fix setting datasource uid, when datasource is string in old version (#96273)
Alerting: Fix setting datasource uid, when datasource is string in old version (#96085)

fix setting datasource uid, when datasource is string in old versions rules

(cherry picked from commit 2f58311eea)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2024-11-12 14:23:44 +01:00
Adela Almasan
5cc78ea219 [v11.3.x] Actions: Fix interpolation (#96247)
øActions: Fix interpolation  (#96161)

(cherry picked from commit 754351273b)
2024-11-12 07:21:59 -06:00
grafana-delivery-bot[bot]
a8cb62f05a [v11.3.x] Alerting docs: adds prereqs to configure data source (#96274)
Alerting docs: adds prereqs to configure data source (#96272)

* Alerting docs: adds prereqs to configure data source

* fixes numbering

(cherry picked from commit 35572c9731)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-11-12 11:59:30 +01:00
grafana-delivery-bot[bot]
89ea2a15ce [v11.3.x] docs: Update CanvasDoc adding video link (#95994)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
docs: Update CanvasDoc adding video link (#95953)

Update CanvasDoc adding video link

(cherry picked from commit cd3a71e7cb)

Co-authored-by: Señor Performo - Leandro Melendez <54183040+srperf@users.noreply.github.com>
2024-11-11 15:14:34 +01:00
grafana-delivery-bot[bot]
5e1479d887 [v11.3.x] Alerting docs: fixes broken oncall link (#96217)
Alerting docs: fixes broken oncall link (#96215)

(cherry picked from commit ca04cf780b)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-11-11 14:08:58 +01:00
grafana-delivery-bot[bot]
f1c4e83865 [v11.3.x] Flame Graph: Fix crash when it receives empty data (#96211)
Flame Graph: Fix crash when it receives empty data (#95604)

flame graph crash

(cherry picked from commit 3012d4c043)

Co-authored-by: jackyin <yincong@baidu.com>
2024-11-11 13:00:23 +00:00
grafana-delivery-bot[bot]
cfa3ef73a1 [v11.3.x] Alerting docs: updates to landing page (#96214)
Alerting docs: updates to landing page (#96200)

* Alerting docs: updates to landing page

* Update docs/sources/alerting/_index.md

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>

---------

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
(cherry picked from commit 19bed65d9b)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-11-11 13:45:21 +01:00
grafana-delivery-bot[bot]
c99c8c56e2 [v11.3.x] Alerting docs: Move Meta monitoring to Additional configuration section (#96207)
Alerting docs: Move `Meta monitoring` to `Additional configuration` section (#96150)

(cherry picked from commit 154a2e0d06)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-11-11 11:23:50 +01:00
grafana-delivery-bot[bot]
5b1a386dac [v11.3.x] BarChart: Fix threshold lines rendering for horizontal orientation (#96137)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
BarChart: Fix threshold lines rendering for horizontal orientation (#95737)

* Use different threshold x/y coordinates depending on orientation

* invert wording / semantics

---------

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

Co-authored-by: Kristina <kristina.durivage@grafana.com>
2024-11-09 13:45:03 -06:00
Fayzal Ghantiwala
8bc0014845 [v11.3.x] Alerting: Make context deadline on AlertNG service startup configurable (#96135)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
Alerting: Make context deadline on AlertNG service startup configurable (#96053)

* Make alerting context deadline configurable

* Remove debug logs

* Change default timeout

* Update tests

(cherry picked from commit 1fdc48faba)
2024-11-08 16:46:50 +00:00
grafana-delivery-bot[bot]
8f10dbe12d [v11.3.x] Alerting: Fix editing expressions refId (#95035)
Alerting: Fix editing expressions refId (#94941)

Fix refId editing

(cherry picked from commit 836881b713)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2024-11-08 16:54:01 +01:00
grafana-delivery-bot[bot]
546e0e214b [v11.3.x] Alerting: Force refetch prom rules when refreshing panel (#96125)
Alerting: Force refetch prom rules when refreshing panel (#96120)

Force refetch prom rules when refreshing panel

(cherry picked from commit ea0a6a1f7f)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2024-11-08 16:36:51 +01:00
grafana-delivery-bot[bot]
3704073e6f [v11.3.x] Alerting docs: reuse Additional configuration page for Cloud docs (#96121)
Alerting docs: reuse `Additional configuration` page for Cloud docs (#96101)

(cherry picked from commit b953190328)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-11-08 16:19:04 +01:00
grafana-delivery-bot[bot]
c9c1bbfa6e [v11.3.x] Alerting docs: changes advanced to additional (#96092)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting docs: changes advanced to additional (#96083)

(cherry picked from commit 86bc087257)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-11-08 14:32:30 +02:00
grafana-delivery-bot[bot]
402b023b45 [v11.3.x] Alerting docs: adds advanced config section (#96050)
Alerting docs: adds advanced config section (#96013)

* Alerting docs: adds advanced config section

* corrects ref

* feedback from pepe

* renames detect and respond

(cherry picked from commit b2af163dc5)

Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
2024-11-08 09:58:18 +01:00
grafana-delivery-bot[bot]
be895603c8 [v11.3.x] Docs: clarify the description of actions_allow_post_url (#96045)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Docs: clarify the description of actions_allow_post_url (#95995)

* Docs: clarify the description of actions_allow_post_url

* adding a word to clarify this extends the default behavior and doesn't replace it

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Beverly Buchanan <131809838+BeverlyJaneJ@users.noreply.github.com>

* Update docs/sources/setup-grafana/configure-grafana/_index.md

Co-authored-by: Beverly Buchanan <131809838+BeverlyJaneJ@users.noreply.github.com>

---------

Co-authored-by: Beverly Buchanan <131809838+BeverlyJaneJ@users.noreply.github.com>
(cherry picked from commit 4cc204affe)

Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
2024-11-07 10:15:59 -06:00
grafana-delivery-bot[bot]
c2d85230b1 [v11.3.x] Alerting docs: Introduction - brief overview of notification messages. (#96042)
Alerting docs: Introduction - brief overview of notification messages. (#95987)

* Intro: simplify `Architecture`. Add a new guideline

* Define `Notification policies` as an advanced option

* Intro: include about "Notification messages"

* Minor copy changes

(cherry picked from commit ff2f612412)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-11-07 16:51:12 +01:00
Jack Westbrook
3824dc412d [v11.3.x] Chore: Resolve duplicate e2e-selectors packages to workspace (#94945)
chore(yarn): resolve scenes e2e selectors to workspace version
2024-11-07 16:40:35 +01:00
grafana-delivery-bot[bot]
0e0a2c0371 [v11.3.x] Alerting: Fix saving advanced mode toggle state in the alert rule editor (#95981)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting: Fix saving advanced mode toggle state in the alert rule editor (#95924)

(cherry picked from commit 4ce1abc6f9)

Co-authored-by: Alexander Akhmetov <me@alx.cx>
2024-11-06 19:04:59 +01:00
grafana-delivery-bot[bot]
8273628550 [v11.3.x] Alerting docs: specify using multiple contact point integrations in the UI and HTTP API (#95967)
Alerting docs: specify using multiple contact point integrations in the UI and HTTP API (#95890)

* Sort list of contact points on the sidebar

* Update `Configure contact points` to clarify contact point integrations

* Alerting HTTP API: fix `EmbeddedContactPoint` properties table

* HTTP Alerting API: clarify how `ContactPoint.name` groups contact points

* Update docs/sources/alerting/configure-notifications/manage-contact-points/_index.md

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

---------

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

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-11-06 15:45:52 +01:00
grafana-delivery-bot[bot]
d489ecf794 [v11.3.x] Dashboard: Append orgId to URL (#95963)
Dashboard: Append orgId to URL (#95960)

(cherry picked from commit 52f4bd64e0)

Co-authored-by: Bogdan Matei <bogdan.matei@grafana.com>
2024-11-06 16:28:37 +02:00
grafana-delivery-bot[bot]
16411b1b4a [v11.3.x] ServerLock: Fix pg concurrency/locking issue (#95935)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
ServerLock: Fix pg concurrency/locking issue (#95916)

Fix pg unique constraint validation in serverlock

(cherry picked from commit ab974ddf14)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2024-11-06 11:09:20 +02:00
grafana-delivery-bot[bot]
8567089ed2 [v11.3.x] Docs: Updating steps for pulling Grafana metrics into Prometheus (#95918)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Docs: Updating steps for pulling Grafana metrics into Prometheus (#95913)

* Docs: Updating steps for pulling Grafana metrics into Prometheus

* slight update based on review

(cherry picked from commit 9a1e7de79d)

Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
2024-11-06 00:17:12 +02:00
grafana-delivery-bot[bot]
1100a0409f [v11.3.x] [DOC] Add Pyroscope to list of products (#95911)
[DOC] Add Pyroscope to list of products (#95884)

* Add Pyroscope to list of products

* Update docs/sources/shared/basics/what-is-grafana.md

* Apply suggestions from code review

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

---------

Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Bryan Huhta <32787160+bryanhuhta@users.noreply.github.com>
(cherry picked from commit 78c5fe61df)

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2024-11-05 15:00:20 -05:00
grafana-delivery-bot[bot]
a7c1f37435 [v11.3.x] Azure: Handle namespace request rejection (#95909)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Azure: Handle namespace request rejection (#95574)

Handle rejection and add test

(cherry picked from commit da1a5426d0)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2024-11-05 21:06:30 +02:00
grafana-delivery-bot[bot]
cbf9e323b6 [v11.3.x] Docs: updating auto_refresh_license information (#95902)
Docs: updating auto_refresh_license information (#95804)

(cherry picked from commit a8578484bb)

Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
2024-11-05 18:38:53 +01:00
grafana-delivery-bot[bot]
0826aa0078 [v11.3.x] Alerting docs: Update Create alert rules from panels (#95818)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting docs: Update `Create alert rules from panels` (#95566)

* Alerting docs: Update `Create alert rules from panels`

* Remove screenshots except when the panel displays alert status

* Further changes sync with Brenda

* minor changes

* Relocate admonition

* Specify `dashboardUId` and `panelId` must be set together

* Update docs/sources/alerting/alerting-rules/link-alert-rules-to-dashboards.md

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

* change title

* change URL

* fix spell error

---------

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

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-11-05 10:13:57 +01:00
grafana-delivery-bot[bot]
9bb7d77cdb [v11.3.x] Timeseries: Utilize min/max on stacking percentage (#95793)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Timeseries: Utilize min/max on stacking percentage (#95581)

* Bring in defined min/max into stacking range

* simplify logic

* different approach

---------

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

Co-authored-by: Kristina <kristina.durivage@grafana.com>
2024-11-04 15:09:28 -06:00
grafana-delivery-bot[bot]
e31c4fc59b [v11.3.x] Alerting: Fix contact points secrets validation (#95777)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting: Fix contact points secrets validation (#95651)

Add new condition to the determineRequired function

(cherry picked from commit e43bec2cd8)

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2024-11-04 15:10:03 +01:00
grafana-delivery-bot[bot]
28f9eb3221 [v11.3.x] Alerting docs: add Time type documentation for notification templates (#95776)
Alerting docs: add `Time` type documentation for notification templates (#95688)

* Improve `tz` and `date` docs

* Add documentation for `Time` type

(cherry picked from commit 9d937725ad)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-11-04 12:48:55 +01:00
grafana-delivery-bot[bot]
693ed6dddd [v11.3.x] Alerting docs: fix alertname label name (#95767)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting docs: fix `alertname` label name (#95665)

(cherry picked from commit 8a0c920106)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-11-04 10:54:58 +01:00
grafana-delivery-bot[bot]
8f030aa210 [v11.3.x] Alerting docs: Add one notification template example that prints a title or subject (#95766)
Alerting docs: Add one notification template example that prints a title or subject (#95680)

(cherry picked from commit d3a3e53354)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-11-04 10:54:40 +01:00
grafana-delivery-bot[bot]
ef12cfe67d [v11.3.x] E2E: remove duplicate loki e2e tests (#95667)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
E2E: remove duplicate loki e2e tests (#95644)

* remove duplicate loki e2e tests to avoid flakiness

* unskip test

* adjust panel ids

(cherry picked from commit 9f5258717e)

Co-authored-by: Sergej-Vlasov <37613182+Sergej-Vlasov@users.noreply.github.com>
2024-11-01 09:56:38 +00:00
grafana-delivery-bot[bot]
4f80c4c55c [v11.3.x] Unified Storage: Use ssl_mode instead of sslmode (#95662)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
Unified Storage: Use ssl_mode instead of sslmode (#95658)

change unistore to use ssl_mode instead of sslmode

(cherry picked from commit 76b43267c8)

Co-authored-by: Georges Chaudy <chaudyg@gmail.com>
2024-10-31 15:30:34 +00:00
grafana-delivery-bot[bot]
66518db34c [v11.3.x] Docs: Updating versions in activating AWS marketplace license (#95656)
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
2024-10-31 15:08:25 +01:00
grafana-delivery-bot[bot]
855dcd7b7b [v11.3.x] Migration: Remove table aliasing in delete statement to make it work for mariadb (#95232)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Migration: Remove table aliasing in delete statement to make it work for mariadb (#95226)

Migration: remove table aliasing in delete statement to make it work in mariadb
(cherry picked from commit 6f7528f896)

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
2024-10-31 07:51:27 +00:00
grafana-delivery-bot[bot]
ab85eacea6 [v11.3.x] Docs: adding SAML name parameter configuration info (#95621)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
2024-10-30 18:03:22 +01:00
grafana-delivery-bot[bot]
11aedea347 [v11.3.x] Graphite: Fix Multi Dimensional Alias Name (#95618)
Graphite: Fix Multi Dimensional Alias Name (#94563)

(cherry picked from commit 89da7d6fe5)

Co-authored-by: Alyssa (Bull) Joyner <58453566+alyssabull@users.noreply.github.com>
2024-10-30 16:12:41 +00:00
grafana-delivery-bot[bot]
fdc1859d0d [v11.3.x] GCM: Fix error checking for GCE project getter (#95617)
GCM: Fix error checking for GCE project getter (#95613)

Appropriately check error

(cherry picked from commit 08e880a823)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2024-10-30 15:50:25 +00:00
grafana-delivery-bot[bot]
1540c767cc [v11.3.x] Folders: Don't show error pop-up if the user can't fetch the root folder (#95600)
Folders: Don't show error pop-up if the user can't fetch the root folder (#95569)

don't show error pop-up if the user can't read general folder

(cherry picked from commit 092a1813ef)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-10-30 11:06:06 +00:00
grafana-delivery-bot[bot]
7f36355451 [v11.3.x] Remove second aliases section (#95595)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2024-10-30 10:00:21 +00:00
grafana-delivery-bot[bot]
397c96c1cc [v11.3.x] Docs: Adding memory requirements to image renderer docs (#95572)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Docs: Adding memory requirements to image renderer docs (#95571)

Adding memory requirements to image renderer docs

(cherry picked from commit d480900a9b)

Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
2024-10-29 13:10:44 -05:00
grafana-delivery-bot[bot]
13336dd198 [v11.3.x] Alerting docs: Update Recording Rules (#95535)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting docs: Update Recording Rules (#95435)

* WIP - Restructure recording rule pages

* Add more `Recording rules` use cases

* Update `Intro > Alert rules`. Minor style changes and updates to the recording rules section

* Minor verb change

* Switch `aliases` and fix broken link

* Bold for clarity

* Complete `Create recording rules in Grafana Alerting`

* Complete data source-managed recording rules

* Final update

(cherry picked from commit 9b91be739d)

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-10-29 09:58:35 +01:00
grafana-delivery-bot[bot]
cb5df488a8 [v11.3.x] Replace myself with Irene who oversees Grafana documentation (#95494)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2024-10-28 15:35:58 +02:00
grafana-delivery-bot[bot]
5af40ed44f [v11.3.x] User: Check SignedInUser OrgID in RevokeInvite (#95490)
User: Check SignedInUser OrgID in RevokeInvite (#95476)

Check SignedInUser OrgID in RevokeInvite

(cherry picked from commit fedcf47702)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2024-10-28 14:42:19 +02:00
grafana-delivery-bot[bot]
c081bb53d0 [v11.3.x] Update _index.md (#95475)
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Jay <92761481+JayEkin@users.noreply.github.com>
2024-10-28 12:01:23 +02:00
grafana-delivery-bot[bot]
8ea5af7335 [v11.3.x] Update _index.md (#95470)
Co-authored-by: Irene Rodríguez <irene.rodriguez@grafana.com>
Co-authored-by: Jay <92761481+JayEkin@users.noreply.github.com>
2024-10-28 11:28:27 +02:00
grafana-delivery-bot[bot]
d763aae5f2 [v11.3.x] Service Accounts: Run service account creation in transaction (#94803)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Service Accounts: Run service account creation in transaction (#94744)

* run service account creation DB queries in transaction

* extract the signed in user from the context

* undo unneeded change

* don't error out if a user is not found

* Update pkg/services/serviceaccounts/manager/service.go

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>

* Update pkg/services/serviceaccounts/manager/service.go

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

---------

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
(cherry picked from commit ca1fd028a2)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-10-27 20:50:20 +01:00
Kevin Minehart
4a30c85b77 [v11.3.x] CI: Consolidate package and docker steps (#95419)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
update .drone.yml
2024-10-25 12:44:15 -05:00
Drew Slobodnjak
a78607432e [v11.3.x] Table: Fix text wrapping applying to wrong field (#95425)
Table: Fix text wrapping applying to wrong field (#93707)

* Fix text wrap
---------

Co-authored-by: Ihor Yeromin <yeryomin.igor@gmail.com>
(cherry picked from commit d7ee3ea086)

Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
2024-10-25 08:55:39 -07:00
grafana-delivery-bot[bot]
12a54c2414 [v11.3.x] Docs: Fix shared file references (#95289)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Fix shared file references (#95287)
2024-10-25 11:15:23 -04:00
grafana-delivery-bot[bot]
bb4e253c76 [v11.3.x] Docs: Table visualization update (#95286)
Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-10-25 11:09:50 -04:00
Kevin Minehart
90a562257c [v11.3.x] CI: Remove drone steps for building windows because its done in grafana-… (#95413)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
CI: Remove drone steps for building windows because it's done in grafana-… (#95373)

Remove drone steps for building windows because it's done in grafana-build now

(cherry picked from commit 67b3848fd9)
2024-10-25 07:53:52 -06:00
grafana-delivery-bot[bot]
5889d680e9 [v11.3.x] Folders: Add admin permissions upon creation of a folder w. SA (#95365)
Folders: Add admin permissions upon creation of a folder w. SA (#95072)

* add admin permissions upon creation of a folder w. SA

* Update pkg/services/folder/folderimpl/folder.go

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

* Grant service account permissions for creation of dashboards

* Grant service account admin permissions upon creating a datasource

* fetch user using the userservice with the userid

* Revert "fetch user using the userservice with the userid"

This reverts commit 23cba78752.

* revert back to original datasource creation

---------

Co-authored-by: Karl Persson <kalle.persson@grafana.com>
(cherry picked from commit 9ab064bfc5)

Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
2024-10-25 08:51:09 +01:00
grafana-delivery-bot[bot]
86deb2b4c4 [v11.3.x] Auth: Increase name_id and session_id length to 1024 in user_external_session (#95360)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Auth: Increase name_id and session_id length to 1024 in user_external_session (#95352)

Increase name_id and session_id length to 1024

(cherry picked from commit b8b7c7901c)

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2024-10-24 18:36:43 +03:00
grafana-delivery-bot[bot]
c5d7a954ef [v11.3.x] Alerting: Fix escaping of silence matchers in utf8 mode (#95347)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Tom Ratcliffe <tom.ratcliffe@grafana.com>
Fix escaping of silence matchers in utf8 mode (#95067)
2024-10-24 16:33:15 +03:00
kay delaney
54e5e6c1b5 [v11.3.x] Update scenes to v5.20.4 (#95337)
Update scenes to v5.20.4
2024-10-24 12:57:24 +01:00
grafana-delivery-bot[bot]
c99956285b [v11.3.x] Dashboards: Fixes performance issue expanding a row (#95321)
Dashboards: Fixes performance issue expanding a row  (#95311)

* DashboardScene: Optimize change detection

* Remove arg

* remove console log

(cherry picked from commit 3523289e98)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
2024-10-24 12:23:21 +03:00
grafana-delivery-bot[bot]
9d867a4441 [v11.3.x] Remove doc-validator requirement to run on all pull requests (#95316)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2024-10-24 11:38:12 +03:00
grafana-delivery-bot[bot]
a9088a7bbb [v11.3.x] CI: use linux to build msi installers (#95292)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
CI: use linux to build msi installers (#95215)

* Build the MSI installers using Linux and wine

(cherry picked from commit 66c728d26b)

Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
2024-10-23 14:51:29 -05:00
grafana-delivery-bot[bot]
7cf08ebaf9 [v11.3.x] Prometheus: Fix passing query timeout to upstream queries (#95264)
Prometheus: Fix passing query timeout to upstream queries (#95104)

* remove queryTimeout from constructor

* use queryTimeout for range and instant queries

* remove comment

* remove default query timeout

* fix linting

(cherry picked from commit 78a00d09cd)

Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
2024-10-23 17:02:18 +02:00
grafana-delivery-bot[bot]
c76d97bb13 [v11.3.x] Azure: Fix duplicated traces in multi-resource trace query (#95247)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
Azure: Fix duplicated traces in multi-resource trace query (#95156)

Use first resource as base resource for query

(cherry picked from commit 8bb7475e4f)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2024-10-23 15:24:33 +03:00
Pepe Cano
f8cb0ccb71 [v11.3.x] Alerting Docs: Update Alert rule and Notification Templating (#95242)
Alerting Docs: Update Alert rule and Notification Templating (#94069)

* Update links to the new location of the Templates intro page

* Set alert rule template structure

* Update the `Template notifications` structure/sidebar

* Move examples to examples pages

* Update menu titles and URL paths

* WIP reference

* added intro to examples.md

* reference page section intros

* examples title

* Template

* Continue Alert Template Reference

* example sections

* Almost finish with Reference page

* weight pages

* WIP - template variables Intro

* Edits Alert rule templates + Differences with notification templates

* examples-draft-2

* how to map annotations to notif templates

* examples v2

* moved example

* Continue Template annotations and labels

* Preview annotation templates

* Complete `Template annotations and labels`

* Update `Differences with notification templates`

* Polish a bit `Differences with notification tempaltes`

* added logic examples to `Examples`

* Finish sharing Template language

* Minor: set `anchor` link

* Minor edit

* Minor edit

* Minor changes

* Template language changes

* Document missing functions for alert rule templates

* 'Examples' v3

* `Examples` v3.1

* `Examples` v3.2

* added context/intro to `Examples`

* added a how to section to `Examples`

* moved legacy info in `Examples`

* added examples, sections in `Examples`

* formatting

* examples v5

* examples v5.1

* Complete update to `Notification template reference`

* Update `$values` description

* moved steps to `index`

* fixed urls

* removed section in `examples`

* added refs

* fixed urls

* refs fix

* blended the use case into the explanation

* Notification template reference: Minor readibility changes

* Edit `$value` in Alert rule template reference

* Edit `Manage notification templates

* links to ref and lang pages

* Minor copy changes

* Edit Template annotation overview + Prepare Template notifications overview

* `Select` vs `Choose`

* Template Overview

* Fix `heading` does not match `title`

* examples v6

* examples v6.1

* Fix spell errors

* Run `prettier --write` to fix md format errors

* examples v7

* examples v7.1

* examples v7.2

* examples v7.4

* examples v7.5

* examples v7.6

* all pretty, no pity

* Update alert rule examples

* Complete `Labels and annotations template examples`

* Minor changes

* Use `.` notation instead of `index` in examples

* rename `extendeddata` to `notificationdata`

* Complete Notification examples

* minor changes

* Set `go` language when displaying template examples

* Revert "minor changes"

This reverts commit f647c55c87.

* Update example and admonition for consistency

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md

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

* Update docs/sources/shared/alerts/template-language.md

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

* Update docs/sources/shared/alerts/template-language.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/language.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/_index.md

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

* Update docs/sources/alerting/alerting-rules/templates/examples.md

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

* Update docs/sources/alerting/alerting-rules/templates/examples.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/examples.md

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

* Update docs/sources/alerting/alerting-rules/templates/examples.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/examples.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md

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

* Update docs/sources/alerting/configure-notifications/template-notifications/manage-notification-templates.md

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

* use `add` instead of `enrich`

* fix prettier content errors

* minor copy change

* Specify which Alert properties are exclusive to Grafana-managed alerts

* Use `Monitor` instead of `Meta monitoring`

* Be more detailed about notifation template limitations

---------

Co-authored-by: tonypowa <tonypowa@gmail.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
(cherry picked from commit 813632dff1)
2024-10-23 13:03:58 +02:00
grafana-delivery-bot[bot]
f702577e83 [v11.3.x] format datasources list with columns (#95234)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Robby Milo <robbymilo@fastmail.com>
2024-10-23 10:07:21 +01:00
grafana-delivery-bot[bot]
b8c43bcf3d [v11.3.x] Alerting docs: Update Labels and Annotations to detail use cases (#95221)
Alerting docs: Update `Labels and Annotations` to detail use cases (#95213)

* Alerting docs: Update `Labels and Annotations` to detail use cases

* Update docs/sources/alerting/fundamentals/alert-rules/annotation-label.md

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

---------

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

Co-authored-by: Pepe Cano <825430+ppcano@users.noreply.github.com>
2024-10-23 09:07:06 +02:00
grafana-delivery-bot[bot]
d865fa64ce [v11.3.x] Docs: Add what's new video (#95210)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-10-22 16:43:14 -04:00
Kevin Yu
a292f838fe fix changelog (#95208) 2024-10-22 13:09:39 -07:00
github-actions[bot]
50c5d806c1 Release: 11.3.0 (#95196)
* Update changelog

* Update version to 11.3.0

* bump @grafana/plugin-configs from 11.3.0-pre to 11.3.0

* update changelog

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
2024-10-22 12:39:12 -07:00
grafana-delivery-bot[bot]
6d5fa7b7a0 [v11.3.x] Docs: Add Correlations entry to what's new (#95172)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-10-22 10:58:26 -04:00
grafana-delivery-bot[bot]
035f6dde73 [v11.3.x] Canvas: Fix data links target (#95171)
Canvas: Fix data links target (#95113)

(cherry picked from commit b2e53997e2)

Co-authored-by: Adela Almasan <88068998+adela-almasan@users.noreply.github.com>
2024-10-22 17:54:54 +03:00
grafana-delivery-bot[bot]
494ddad79d [v11.3.x] Azure Monitor: Support metric namespaces fallback (#95155)
Azure Monitor: Support metric namespaces fallback (#94722)

* Update display names

* Update multi-resource types

* Update default metric namespace list

* Initialise namespace list with fallback namespaces

* Add test

* Update test

(cherry picked from commit 986bd2f9f8)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2024-10-22 16:39:56 +03:00
grafana-delivery-bot[bot]
2e81653b68 [v11.3.x] Anonymous User: Adds validator service for anonymous users (#94994)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Anonymous User: Adds validator service for anonymous users (#94700)

(cherry picked from commit 3438196010)

Co-authored-by: lean.dev <34773040+leandro-deveikis@users.noreply.github.com>
2024-10-22 09:26:00 -03:00
grafana-delivery-bot[bot]
6924b9641a [v11.3.x] Alerting: Fix overflow for long receiver names (#95133)
Alerting: Fix overflow for long receiver names (#95064)

(cherry picked from commit 94f5e21493)

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
2024-10-22 14:23:38 +02:00
grafana-delivery-bot[bot]
f68938c842 [v11.3.x] DashboardScene: Re-add support for default datasource var (#95138)
DashboardScene: Re-add support for default datasource var (#94806)

re-add support for default datasource var

(cherry picked from commit 96893aef2a)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2024-10-22 13:52:01 +03:00
grafana-delivery-bot[bot]
c426f12df7 [v11.3.x] DashboardScene: Rerender dashboard links on timerange change (#95140)
DashboardScene: Rerender dashboard links on timerange change (#94570)

* fix

* refactor

* refactor

(cherry picked from commit aaba5a43bd)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2024-10-22 13:49:07 +03:00
grafana-delivery-bot[bot]
bbc76071b5 [v11.3.x] DashboardScene: Update timerange in datalinks on change (#95137)
DashboardScene: Update timerange in datalinks on change (#94419)

* fix types

* mods

* refactor

* refactor

(cherry picked from commit 516e0cf7e2)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2024-10-22 13:27:29 +03:00
grafana-delivery-bot[bot]
ca7156d411 [v11.3.x] DashboardScenes: Fix missing query options in library panels (#95132)
DashboardScenes: Fix missing query options in library panels (#94808)

Fix missing query options in library panels

(cherry picked from commit d608668335)

Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
2024-10-22 13:09:16 +03:00
grafana-delivery-bot[bot]
8e7ba6f123 [v11.3.x] Docs note on Cross-account observability permissions for CW datasource (#95125)
Co-authored-by: Jara Suárez de Puga García <jara.suarezdepuga@grafana.com>
2024-10-22 10:07:02 +01:00
grafana-delivery-bot[bot]
6e0e8d0370 [v11.3.x] Loki query editor: update CompletionDataProvider time range when it changes (#95127)
Loki query editor: update CompletionDataProvider time range when it changes (#94905)

* Loki query editor: update CompletionDataProvider time range when it changes

* CompletionDataProvider: update test and add regression

* Formatting

* Completion Data Provider: clear cache when the time range changes

* Completion Data Provider: specifically test for undefined values vs empty string

(cherry picked from commit 89c215a9ff)

Co-authored-by: Matias Chomicki <matyax@gmail.com>
2024-10-22 12:06:54 +03:00
grafana-delivery-bot[bot]
073436f2f8 [v11.3.x] [docs] fix provisioning folder name (#95101)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
fix provisioning folder name (#95099)
2024-10-21 23:43:52 +03:00
grafana-delivery-bot[bot]
367c82bd51 [v11.3.x] BarChart: Skip formatting null-valued ticks (#95094)
BarChart: Skip formatting null-valued ticks (#94935)

Co-authored-by: Ihor Yeromin <yeryomin.igor@gmail.com>
(cherry picked from commit 594e9b1b73)

Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
2024-10-21 22:48:13 +03:00
grafana-delivery-bot[bot]
a2db7105a9 [v11.3.x] Docs: What’s new & Upgrade guide v11.3 (#95088)
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
2024-10-21 15:20:12 -04:00
grafana-delivery-bot[bot]
bdf41feda9 [v11.3.x] Alerting: Fix remote Alertmanager readiness check path (#95066)
Alerting: Fix remote Alertmanager readiness check path (#95063)

(cherry picked from commit 4f8f82f5f1)

Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
2024-10-21 18:45:49 +03:00
grafana-delivery-bot[bot]
aa8c58abd0 [v11.3.x] Alerting: Fix templates editing validation (#94963)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
* Alerting: Fix templates editing validation (#94960)

Fix title validation when editing template files

(cherry picked from commit 5548e5976b)

* Adjust tests

---------

Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
2024-10-21 10:52:10 +02:00
grafana-delivery-bot[bot]
48d083d495 [v11.3.x] Chore: Fix population of details when converting from errutil errors to K8s error (#94998)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Chore: Fix population of details when converting from errutil errors to K8s error (#94996)

(cherry picked from commit 672d5f92f2)

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-10-18 23:11:44 +03:00
grafana-delivery-bot[bot]
e0da40ea8c [v11.3.x] CloudWatch: Interpolate region in log context query (#94990)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
CloudWatch: Interpolate region in log context query (#94930)

CloudWatch: interpolate region in log context query
(cherry picked from commit fd5f351a6f)

Co-authored-by: Isabella Siu <Isabella.siu@grafana.com>
2024-10-18 14:25:21 -04:00
grafana-delivery-bot[bot]
aba5388a42 [v11.3.x] Alerting: Fix time-interval conversion to return bad request if payload is incorrect (#94999)
Alerting: Fix time-interval conversion to return bad request if payload is incorrect (#94995)

(cherry picked from commit 00bb3215cb)

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-10-18 20:35:15 +03:00
Isabel Matwawana
48ce1636bd Revert "[v11.3.x] Revert some scenes documentation" (#94984) 2024-10-18 11:42:32 -04:00
Josh Hunt
71e980ee9a bump whatsnew url (#94982) 2024-10-18 18:32:07 +03:00
grafana-delivery-bot[bot]
060846d056 [v11.3.x] Dashboards: Links to explore should respect subpath (#94975)
Dashboards: Links to explore should respect subpath (#94525)

* Links to explore should respect subpath

* Change to using assureBaseUrl

* Change back to normal single quotes

(cherry picked from commit 315778227b)

Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
2024-10-18 17:38:26 +03:00
Sam Jewell
df57ba1b70 [v11.3.x] ServerSideExpressions: Disable SQL Expressions to prevent RCE and LFI vulnerability (#94955)
ServerSideExpressions: Disable SQL Expressions to prevent RCE and LFI vulnerability (#94942)

* disable sql expressions

remove duckdb ref

* Run `make update-workspace`

---------

Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
(cherry picked from commit ea71201ddc)
2024-10-18 12:46:53 +01:00
grafana-delivery-bot[bot]
4a800ace30 [v11.3.x] Docs: Update Grafana-Managed Recording Rule docs (#94908)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Docs: Update Grafana-Managed Recording Rule docs (#94895)

* Config ini section

* Extend header

* Drop hysteresis line which doesnt apply to recording rules

* Touch up evaluation behavior section

* Dissolve incorrect/unrelated section

* Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md

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

* Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md

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

* Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md

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

* Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md

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

* Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md

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

* Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md

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

* Run linter

---------

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

Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
2024-10-17 16:43:29 -05:00
grafana-delivery-bot[bot]
a577031ba9 [v11.3.x] CI: Additional changes for +security versions (#94923)
CI: Additional changes for +security versions (#94854)

* Build: Fix docker manifest create not using correct IMAGE_TAG

* Support publishing security versions of NPM packages

---------

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
(cherry picked from commit 8f7352e862)

Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
2024-10-17 17:12:44 -03:00
grafana-delivery-bot[bot]
efeb05386b [v11.3.x] DataLinks: Fix onClick functionality (#94907)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
DataLinks: Fix onClick functionality (#94815)

* fix: add onclick functionality back to DataLinks in VizPanelFooter

---------

Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
Co-authored-by: Matias Chomicki <matyax@gmail.com>
(cherry picked from commit 5fe5e8a5a6)

Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
2024-10-17 20:27:29 +03:00
grafana-delivery-bot[bot]
1ac972f086 [v11.3.x] Revert some scenes documentation (#94903)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
2024-10-17 17:12:20 +01:00
grafana-delivery-bot[bot]
4590698e10 [v11.3.x] Alerting: Update texts for gm rr in the form (#94886)
Alerting: Update texts for gm rr in the form (#94844)

* Update texts for gm rr in the form

* fix translations

* Fix test

* address review comments

* address review comments - part2

* translations

* update docs for new term: output

(cherry picked from commit 1860737117)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2024-10-17 16:29:16 +02:00
grafana-delivery-bot[bot]
ab368bfb06 [v11.3.x] Alerting: Update docs for grafana recording rules (#94841)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting: Update docs for grafana recording rules (#94811)

* update docs for grafana recording rules

* Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md

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

* Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md

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

* remove notes

* fix note tag

* update note for grafana-managed feature toggle

* Update docs/sources/alerting/alerting-rules/create-mimir-loki-managed-recording-rule.md

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

---------

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

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2024-10-17 11:14:03 +02:00
grafana-delivery-bot[bot]
489c9db173 [v11.3.x] Geomap: Fix tooltip positioning when screen is scrolled (#94842)
Geomap: Fix tooltip positioning when screen is scrolled (#94827)

* account for y-scrolling when positioning geomap tooltip

* remove config import

(cherry picked from commit 241dca57cf)

Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
2024-10-17 12:02:13 +03:00
grafana-delivery-bot[bot]
8bbf0a1869 [v11.3.x] Update Pyroscope data source for Exlore Profiles (#94832)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Update Pyroscope data source for Exlore Profiles (#94825)

* Update Pyroscope data source for Exlore Profiles

* Update docs/sources/datasources/pyroscope/query-profile-data.md

* Update docs/sources/datasources/pyroscope/query-profile-data.md

(cherry picked from commit e8f23bb2cf)

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2024-10-16 20:57:07 -04:00
grafana-delivery-bot[bot]
8b8a67fad6 [v11.3.x] [DOC] Add streamingEnabled to Tempo ds docs (#94830)
[DOC] Add streamingEnabled to Tempo ds docs (#94751)

* Add streamingEnabled to Tempo ds docs

* Update docs/sources/datasources/tempo/configure-tempo-data-source.md

Co-authored-by: Jack Baldry <jack.baldry@grafana.com>

---------

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

Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
2024-10-16 16:53:37 -04:00
grafana-delivery-bot[bot]
2e956696a4 [v11.3.x] GCM: Time field naming (#94819)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
GCM: Time field naming (#94548)

* Name time field correctly

* Update tests

* Lint

(cherry picked from commit 7c79f8f7a5)

Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
2024-10-16 18:34:50 +03:00
grafana-delivery-bot[bot]
d58468b60b [v11.3.x] Plugins: Skip install errors if dependency plugin already exists (#94718)
Plugins: Skip install errors if dependency plugin already exists (#94710)

* skip install errors if dependency plugin already exists

* add test

(cherry picked from commit f97f489c2c)

Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
2024-10-16 13:13:41 +03:00
Kevin Minehart
d784d370d3 [v11.3.x] CI: Support more version formats in publishing (#94750)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
CI: Support more version formats in publishing (#94575)

* cleanup dead code
* add tests and rewrite publish grafanacom steps to reuse
* add pkg/build tests; don't upload CDN assets on grafana releases

(cherry picked from commit 7a2edd35d5)
2024-10-15 13:57:07 -05:00
grafana-delivery-bot[bot]
d4beddfb0e [v11.3.x] Docs: Update alerting notifications documentation (#94733)
Some checks failed
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
publish-technical-documentation-release / sync (push) Has been cancelled
Docs: Update alerting notifications documentation  (#93944)

* add new permissions and fixed roles

* Apply suggestions from code review

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

* address comments

* add actions to complete list

* fmt

---------

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

Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
2024-10-15 11:20:31 -04:00
grafana-delivery-bot[bot]
ae3419cd79 [v11.3.x] Folders: Correctly show new folder button under root folder (#94713)
Folders: Correctly show new folder button under root folder (#94687)

show new folder button under root folder if nested folders are disabled and user has the right perms

(cherry picked from commit 284c2d6f71)

Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
2024-10-15 13:05:13 +03:00
grafana-delivery-bot[bot]
65c759c76a [v11.3.x] Fix list indentation to ensure continuous numbering (#94696)
Some checks are pending
publish-technical-documentation-release / sync (push) Waiting to run
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Fix list indentation to ensure continuous numbering (#94692)
2024-10-14 19:27:48 +01:00
grafana-delivery-bot[bot]
e6475b80c2 [v11.3.x] Alerting: Use advanced options when query params are not transformable (#94670)
Some checks are pending
Sync to mirror / trigger_downstream_patch_mirror (push) Waiting to run
Alerting: Use advanced options when query params are not transformable (#94588)

* Use advanced options when query params are not transformable

* Update public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/QueryAndExpressionsStep.tsx

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

---------

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

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2024-10-14 12:16:36 +02:00
grafana-delivery-bot[bot]
749714fe50 [v11.3.x] Create strategies-for-upgrading-grafana (#94635)
Some checks failed
publish-technical-documentation-release / sync (push) Has been cancelled
Sync to mirror / trigger_downstream_patch_mirror (push) Has been cancelled
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
2024-10-11 17:33:50 +02:00
grafana-delivery-bot[bot]
e1a4fcda48 [v11.3.x] fix missing hyperlink to permissions page in docs (#94630)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Vishal N <vnaccounts@tutanota.com>
fix missing hyperlink to permissions page in docs (#94077)
2024-10-11 10:40:01 -04:00
grafana-delivery-bot[bot]
9af2af8b9f [v11.3.x] docs: added configure structure and youtube video link (#94629)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Señor Performo - Leandro Melendez <54183040+srperf@users.noreply.github.com>
2024-10-11 10:30:42 -04:00
Jack Baldry
50de92f873 Revert Sharing documentation changes (#94585)
Fix Sharing page aliases (#94118)"
2024-10-11 14:58:36 +01:00
grafana-delivery-bot[bot]
2a7d8279a2 [v11.3.x] OrgSync: Do not set default Organization for a user to a non-existent Organization (#94613)
OrgSync: Do not set default Organization for a user to a non-existent Organization (#94537)

Do not set default org for a user to a missing org

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

Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
2024-10-11 15:44:17 +03:00
grafana-delivery-bot[bot]
f5d29152c9 [v11.3.x] SSO: Fix client side validations for LDAP (#94596)
SSO: Fix client side validations for LDAP (#94561)

* fix client side validations for LDAP

* add translations for new messages

* simplify code in isInvalidField()

(cherry picked from commit 0bd3ad1d5a)

Co-authored-by: Mihai Doarna <mihai.doarna@grafana.com>
2024-10-11 13:04:31 +03:00
grafana-delivery-bot[bot]
c938b751cf [v11.3.x] Alerting: Fix detail view not showing instances nor history tab (#94586)
Alerting: Fix detail view not showing instances nor history tab (#94424)

* Fix detail view not showing instances nor history tab

* small refactor

* Update public/app/features/alerting/unified/hooks/useCombinedRule.ts

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

* refactor

---------

Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
(cherry picked from commit 3924751827)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2024-10-11 11:12:17 +03:00
grafana-delivery-bot[bot]
f24f59225d [v11.3.x] Alerting: Fix getSimpleConditionFromExpressions (#94584)
Alerting: Fix getSimpleConditionFromExpressions (#94516)

fix getSimpleConditionFromExpressions

(cherry picked from commit 419598c745)

Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
2024-10-11 11:07:16 +03:00
grafana-delivery-bot[bot]
5f7e46f886 [v11.3.x] Explore metrics: set options directly because of scenes error when options not set (#94571)
Explore metrics: set options directly because of scenes error when options not set (#94284)

* scenes error when options not set

* add all of the options that are updated in onOptionsChange

* add options to all the other places we are building timeseries panels

* Update public/app/features/trails/AutomaticMetricQueries/graph-builders/percentiles.ts

Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>

* remove activation handlers and unused code

* Update public/app/features/trails/AutomaticMetricQueries/graph-builders/simple.ts

Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>

* Update public/app/features/trails/AutomaticMetricQueries/graph-builders/percentiles.ts

Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>

---------

Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
(cherry picked from commit ce857c2680)

Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
2024-10-10 20:35:08 +03:00
893 changed files with 25844 additions and 19591 deletions

View File

@@ -1697,9 +1697,6 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "10"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "11"]
],
"public/app/features/alerting/unified/components/expressions/ExpressionStatusIndicator.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/alerting/unified/components/extensions/AlertInstanceExtensionPointMenu.tsx:5381": [
[0, 0, 0, "Do not re-export imported variable (\`app/features/explore/extensions/ToolbarExtensionPointMenu\`)", "0"]
],
@@ -1935,8 +1932,7 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "10"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "11"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "12"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "13"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "14"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "13"]
],
"public/app/features/alerting/unified/components/rule-editor/NeedHelpInfo.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
@@ -2035,16 +2031,13 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "5"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "6"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"]
],
"public/app/features/alerting/unified/components/rule-editor/labels/LabelsFieldInForm.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "4"]
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"]
],
"public/app/features/alerting/unified/components/rule-editor/notificaton-preview/NotificationPolicyMatchers.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
@@ -5686,9 +5679,6 @@ exports[`better eslint`] = {
"public/app/plugins/datasource/cloudwatch/components/ConfigEditor/XrayLinkConfig.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/plugins/datasource/cloudwatch/components/QueryEditor/LogsQueryEditor/LogsQueryEditor.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
"public/app/plugins/datasource/cloudwatch/components/QueryEditor/MetricsQueryEditor/DynamicLabelsField.tsx:5381": [
[0, 0, 0, "Styles should be written using objects.", "0"]
],
@@ -7399,14 +7389,6 @@ exports[`no gf-form usage`] = {
"public/app/plugins/datasource/cloudwatch/components/ConfigEditor/XrayLinkConfig.tsx:5381": [
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"]
],
"public/app/plugins/datasource/cloudwatch/components/QueryEditor/LogsQueryEditor/LogsQueryEditor.tsx:5381": [
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"]
],
"public/app/plugins/datasource/cloudwatch/components/QueryEditor/LogsQueryEditor/LogsQueryField.tsx:5381": [
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"],
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"],
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"]
],
"public/app/plugins/datasource/cloudwatch/components/shared/LogGroups/LegacyLogGroupNamesSelection.tsx:5381": [
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"],
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"]

View File

@@ -35,11 +35,11 @@ $(DRONE): $(BINGO_DIR)/drone.mod
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
@cd $(BINGO_DIR) && GOWORK=off CGO_ENABLED=0 $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.60.1
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.62.0
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/golangci-lint-v1.60.1"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.60.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
@echo "(re)installing $(GOBIN)/golangci-lint-v1.62.0"
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.62.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
JB := $(GOBIN)/jb-v0.5.1
$(JB): $(BINGO_DIR)/jb.mod

View File

@@ -1,7 +1,5 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.22.1
go 1.23
toolchain go1.23.0
require github.com/golangci/golangci-lint v1.60.1 // cmd/golangci-lint
require github.com/golangci/golangci-lint v1.62.0 // cmd/golangci-lint

View File

@@ -41,14 +41,22 @@ github.com/4meepo/tagalign v1.3.4 h1:P51VcvBnf04YkHzjfclN6BbsopfJR5rxs1n+5zHt+w8
github.com/4meepo/tagalign v1.3.4/go.mod h1:M+pnkHH2vG8+qhE5bVc/zeP7HS/j910Fwa9TUSyZVI0=
github.com/Abirdcfly/dupword v0.0.14 h1:3U4ulkc8EUo+CaT105/GJ1BQwtgyj6+VaBVbAX11Ba8=
github.com/Abirdcfly/dupword v0.0.14/go.mod h1:VKDAbxdY8YbKUByLGg8EETzYSuC4crm9WwI6Y3S0cLI=
github.com/Abirdcfly/dupword v0.1.1 h1:Bsxe0fIw6OwBtXMIncaTxCLHYO5BB+3mcsR5E8VXloY=
github.com/Abirdcfly/dupword v0.1.1/go.mod h1:B49AcJdTYYkpd4HjgAcutNGG9HZ2JWwKunH9Y2BA6sM=
github.com/Abirdcfly/dupword v0.1.3 h1:9Pa1NuAsZvpFPi9Pqkd93I7LIYRURj+A//dFd5tgBeE=
github.com/Abirdcfly/dupword v0.1.3/go.mod h1:8VbB2t7e10KRNdwTVoxdBaxla6avbhGzb8sCTygUMhw=
github.com/Antonboom/errname v0.1.12 h1:oh9ak2zUtsLp5oaEd/erjB4GPu9w19NyoIskZClDcQY=
github.com/Antonboom/errname v0.1.12/go.mod h1:bK7todrzvlaZoQagP1orKzWXv59X/x0W0Io2XT1Ssro=
github.com/Antonboom/errname v0.1.13 h1:JHICqsewj/fNckzrfVSe+T33svwQxmjC+1ntDsHOVvM=
github.com/Antonboom/errname v0.1.13/go.mod h1:uWyefRYRN54lBg6HseYCFhs6Qjcy41Y3Jl/dVhA87Ns=
github.com/Antonboom/errname v1.0.0 h1:oJOOWR07vS1kRusl6YRSlat7HFnb3mSfMl6sDMRoTBA=
github.com/Antonboom/errname v1.0.0/go.mod h1:gMOBFzK/vrTiXN9Oh+HFs+e6Ndl0eTFbtsRTSRdXyGI=
github.com/Antonboom/nilnil v0.1.7 h1:ofgL+BA7vlA1K2wNQOsHzLJ2Pw5B5DpWRLdDAVvvTow=
github.com/Antonboom/nilnil v0.1.7/go.mod h1:TP+ScQWVEq0eSIxqU8CbdT5DFWoHp0MbP+KMUO1BKYQ=
github.com/Antonboom/nilnil v0.1.9 h1:eKFMejSxPSA9eLSensFmjW2XTgTwJMjZ8hUHtV4s/SQ=
github.com/Antonboom/nilnil v0.1.9/go.mod h1:iGe2rYwCq5/Me1khrysB4nwI7swQvjclR8/YRPl5ihQ=
github.com/Antonboom/nilnil v1.0.0 h1:n+v+B12dsE5tbAqRODXmEKfZv9j2KcTBrp+LkoM4HZk=
github.com/Antonboom/nilnil v1.0.0/go.mod h1:fDJ1FSFoLN6yoG65ANb1WihItf6qt9PJVTn/s2IrcII=
github.com/Antonboom/testifylint v1.2.0 h1:015bxD8zc5iY8QwTp4+RG9I4kIbqwvGX9TrBbb7jGdM=
github.com/Antonboom/testifylint v1.2.0/go.mod h1:rkmEqjqVnHDRNsinyN6fPSLnoajzFwsCcguJgwADBkw=
github.com/Antonboom/testifylint v1.3.0 h1:UiqrddKs1W3YK8R0TUuWwrVKlVAnS07DTUVWWs9c+y4=
@@ -57,6 +65,8 @@ github.com/Antonboom/testifylint v1.3.1 h1:Uam4q1Q+2b6H7gvk9RQFw6jyVDdpzIirFOOrb
github.com/Antonboom/testifylint v1.3.1/go.mod h1:NV0hTlteCkViPW9mSR4wEMfwp+Hs1T3dY60bkvSfhpM=
github.com/Antonboom/testifylint v1.4.3 h1:ohMt6AHuHgttaQ1xb6SSnxCeK4/rnK7KKzbvs7DmEck=
github.com/Antonboom/testifylint v1.4.3/go.mod h1:+8Q9+AOLsz5ZiQiiYujJKs9mNz398+M6UgslP4qgJLA=
github.com/Antonboom/testifylint v1.5.0 h1:dlUIsDMtCrZWUnvkaCz3quJCoIjaGi41GzjPBGkkJ8A=
github.com/Antonboom/testifylint v1.5.0/go.mod h1:wqaJbu0Blb5Wag2wv7Z5xt+CIV+eVLxtGZrlK13z3AE=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8=
github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
@@ -69,6 +79,8 @@ github.com/Crocmagnon/fatcontext v0.2.2 h1:OrFlsDdOj9hW/oBEJBNSuH7QWf+E9WPVHw+x5
github.com/Crocmagnon/fatcontext v0.2.2/go.mod h1:WSn/c/+MMNiD8Pri0ahRj0o9jVpeowzavOQplBJw6u0=
github.com/Crocmagnon/fatcontext v0.4.0 h1:4ykozu23YHA0JB6+thiuEv7iT6xq995qS1vcuWZq0tg=
github.com/Crocmagnon/fatcontext v0.4.0/go.mod h1:ZtWrXkgyfsYPzS6K3O88va6t2GEglG93vnII/F94WC0=
github.com/Crocmagnon/fatcontext v0.5.2 h1:vhSEg8Gqng8awhPju2w7MKHqMlg4/NI+gSDHtR3xgwA=
github.com/Crocmagnon/fatcontext v0.5.2/go.mod h1:87XhRMaInHP44Q7Tlc7jkgKKB7kZAOPiDkFMdKCC+74=
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 h1:sHglBQTwgx+rWPdisA5ynNEsoARbiCBOyGcJM4/OzsM=
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs=
github.com/GaijinEntertainment/go-exhaustruct/v3 v3.2.0 h1:sATXp1x6/axKxz2Gjxv8MALP0bXaNRfQinEwyfMcx8c=
@@ -79,10 +91,14 @@ github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3Q
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0=
github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ=
github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0=
github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
github.com/OpenPeeDeeP/depguard/v2 v2.2.0 h1:vDfG60vDtIuf0MEOhmLlLLSzqaRM8EMcgJPdp74zmpA=
github.com/OpenPeeDeeP/depguard/v2 v2.2.0/go.mod h1:CIzddKRvLBC4Au5aYP/i3nyaWQ+ClszLIuVocRiCYFQ=
github.com/alecthomas/go-check-sumtype v0.1.4 h1:WCvlB3l5Vq5dZQTFmodqL2g68uHiSwwlWcT5a2FGK0c=
github.com/alecthomas/go-check-sumtype v0.1.4/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ=
github.com/alecthomas/go-check-sumtype v0.2.0 h1:Bo+e4DFf3rs7ME9w/0SU/g6nmzJaphduP8Cjiz0gbwY=
github.com/alecthomas/go-check-sumtype v0.2.0/go.mod h1:WyYPfhfkdhyrdaligV6svFopZV8Lqdzn5pyVBaV6jhQ=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
@@ -90,6 +106,8 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/alexkohler/nakedret/v2 v2.0.4 h1:yZuKmjqGi0pSmjGpOC016LtPJysIL0WEUiaXW5SUnNg=
github.com/alexkohler/nakedret/v2 v2.0.4/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU=
github.com/alexkohler/nakedret/v2 v2.0.5 h1:fP5qLgtwbx9EJE8dGEERT02YwS8En4r9nnZ71RK+EVU=
github.com/alexkohler/nakedret/v2 v2.0.5/go.mod h1:bF5i0zF2Wo2o4X4USt9ntUWve6JbFv02Ff4vlkmS/VU=
github.com/alexkohler/prealloc v1.0.0 h1:Hbq0/3fJPQhNkN0dR95AVrr6R7tou91y0uHG5pOcUuw=
github.com/alexkohler/prealloc v1.0.0/go.mod h1:VetnK3dIgFBBKmg0YnD9F9x6Icjd+9cvfHR56wJVlKE=
github.com/alingse/asasalint v0.0.11 h1:SFwnQXJ49Kx/1GghOFz1XGqHYKp21Kq1nHad/0WQRnw=
@@ -104,6 +122,8 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bkielbasa/cyclop v1.2.1 h1:AeF71HZDob1P2/pRm1so9cd1alZnrpyc4q2uP2l0gJY=
github.com/bkielbasa/cyclop v1.2.1/go.mod h1:K/dT/M0FPAiYjBgQGau7tz+3TMh4FWAEqlMhzFWCrgM=
github.com/bkielbasa/cyclop v1.2.3 h1:faIVMIGDIANuGPWH031CZJTi2ymOQBULs9H21HSMa5w=
github.com/bkielbasa/cyclop v1.2.3/go.mod h1:kHTwA9Q0uZqOADdupvcFJQtp/ksSnytRMe8ztxG8Fuo=
github.com/blizzy78/varnamelen v0.8.0 h1:oqSblyuQvFsW1hbBHh1zfwrKe3kcSj0rnXkKzsQ089M=
github.com/blizzy78/varnamelen v0.8.0/go.mod h1:V9TzQZ4fLJ1DSrjVDfl89H7aMnTvKkApdHeyESmyR7k=
github.com/bombsimon/wsl/v4 v4.2.1 h1:Cxg6u+XDWff75SIFFmNsqnIOgob+Q9hG6y/ioKbRFiM=
@@ -112,8 +132,12 @@ github.com/bombsimon/wsl/v4 v4.4.1 h1:jfUaCkN+aUpobrMO24zwyAMwMAV5eSziCkOKEauOLd
github.com/bombsimon/wsl/v4 v4.4.1/go.mod h1:Xu/kDxGZTofQcDGCtQe9KCzhHphIe0fDuyWTxER9Feo=
github.com/breml/bidichk v0.2.7 h1:dAkKQPLl/Qrk7hnP6P+E0xOodrq8Us7+U0o4UBOAlQY=
github.com/breml/bidichk v0.2.7/go.mod h1:YodjipAGI9fGcYM7II6wFvGhdMYsC5pHDlGzqvEW3tQ=
github.com/breml/bidichk v0.3.2 h1:xV4flJ9V5xWTqxL+/PMFF6dtJPvZLPsyixAoPe8BGJs=
github.com/breml/bidichk v0.3.2/go.mod h1:VzFLBxuYtT23z5+iVkamXO386OB+/sVwZOpIj6zXGos=
github.com/breml/errchkjson v0.3.6 h1:VLhVkqSBH96AvXEyclMR37rZslRrY2kcyq+31HCsVrA=
github.com/breml/errchkjson v0.3.6/go.mod h1:jhSDoFheAF2RSDOlCfhHO9KqhZgAYLyvHe7bRCX8f/U=
github.com/breml/errchkjson v0.4.0 h1:gftf6uWZMtIa/Is3XJgibewBm2ksAQSY/kABDNFTAdk=
github.com/breml/errchkjson v0.4.0/go.mod h1:AuBOSTHyLSaaAFlWsRSuRBIroCh3eh7ZHh5YeelDIk8=
github.com/butuzov/ireturn v0.3.0 h1:hTjMqWw3y5JC3kpnC5vXmFJAWI/m31jaCYQqzkS6PL0=
github.com/butuzov/ireturn v0.3.0/go.mod h1:A09nIiwiqzN/IoVo9ogpa0Hzi9fex1kd9PSD6edP5ZA=
github.com/butuzov/mirror v1.1.0 h1:ZqX54gBVMXu78QLoiqdwpl2mgmoOJTk7s4p4o+0avZI=
@@ -139,6 +163,10 @@ github.com/ckaznocha/intrange v0.1.0 h1:ZiGBhvrdsKpoEfzh9CjBfDSZof6QB0ORY5tXasUt
github.com/ckaznocha/intrange v0.1.0/go.mod h1:Vwa9Ekex2BrEQMg6zlrWwbs/FtYw7eS5838Q7UjK7TQ=
github.com/ckaznocha/intrange v0.1.2 h1:3Y4JAxcMntgb/wABQ6e8Q8leMd26JbX2790lIss9MTI=
github.com/ckaznocha/intrange v0.1.2/go.mod h1:RWffCw/vKBwHeOEwWdCikAtY0q4gGt8VhJZEEA5n+RE=
github.com/ckaznocha/intrange v0.2.0 h1:FykcZuJ8BD7oX93YbO1UY9oZtkRbp+1/kJcDjkefYLs=
github.com/ckaznocha/intrange v0.2.0/go.mod h1:r5I7nUlAAG56xmkOpw4XVr16BXhwYTUdcuRFeevn1oE=
github.com/ckaznocha/intrange v0.2.1 h1:M07spnNEQoALOJhwrImSrJLaxwuiQK+hA2DeajBlwYk=
github.com/ckaznocha/intrange v0.2.1/go.mod h1:7NEhVyf8fzZO5Ds7CRaqPEm52Ut83hsTiL5zbER/HYk=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
@@ -149,6 +177,8 @@ github.com/daixiang0/gci v0.12.3 h1:yOZI7VAxAGPQmkb1eqt5g/11SUlwoat1fSblGLmdiQc=
github.com/daixiang0/gci v0.12.3/go.mod h1:xtHP9N7AHdNvtRNfcx9gwTDfw7FRJx4bZUsiEfiNNAI=
github.com/daixiang0/gci v0.13.4 h1:61UGkmpoAcxHM2hhNkZEf5SzwQtWJXTSws7jaPyqwlw=
github.com/daixiang0/gci v0.13.4/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk=
github.com/daixiang0/gci v0.13.5 h1:kThgmH1yBmZSBCh1EJVxQ7JsHpm5Oms0AMed/0LaH4c=
github.com/daixiang0/gci v0.13.5/go.mod h1:12etP2OniiIdP4q+kjUGrC/rUagga7ODbqsom5Eo5Yk=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -164,6 +194,8 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/fatih/color v1.17.0 h1:GlRw1BRJxkpqUCBKzKOw098ed57fEsKeNjpTe3cSjK4=
github.com/fatih/color v1.17.0/go.mod h1:YZ7TlrGPkiz6ku9fK3TLD/pl3CpsiFyu8N92HLgmosI=
github.com/fatih/color v1.18.0 h1:S8gINlzdQ840/4pfAwic/ZE0djQEH3wM94VfqLTZcOM=
github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU=
github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=
github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94=
github.com/firefart/nonamedreturns v1.0.4 h1:abzI1p7mAEPYuR4A+VLKn4eNDOycjYo2phmY9sfv40Y=
@@ -178,10 +210,14 @@ github.com/ghostiam/protogetter v0.3.5 h1:+f7UiF8XNd4w3a//4DnusQ2SZjPkUjxkMEfjbx
github.com/ghostiam/protogetter v0.3.5/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw=
github.com/ghostiam/protogetter v0.3.6 h1:R7qEWaSgFCsy20yYHNIJsU9ZOb8TziSRRxuAOTVKeOk=
github.com/ghostiam/protogetter v0.3.6/go.mod h1:7lpeDnEJ1ZjL/YtyoN99ljO4z0pd3H0d18/t2dPBxHw=
github.com/ghostiam/protogetter v0.3.8 h1:LYcXbYvybUyTIxN2Mj9h6rHrDZBDwZloPoKctWrFyJY=
github.com/ghostiam/protogetter v0.3.8/go.mod h1:WZ0nw9pfzsgxuRsPOFQomgDVSWtDLJRfQJEhsGbmQMA=
github.com/go-critic/go-critic v0.11.2 h1:81xH/2muBphEgPtcwH1p6QD+KzXl2tMSi3hXjBSxDnM=
github.com/go-critic/go-critic v0.11.2/go.mod h1:OePaicfjsf+KPy33yq4gzv6CO7TEQ9Rom6ns1KsJnl8=
github.com/go-critic/go-critic v0.11.4 h1:O7kGOCx0NDIni4czrkRIXTnit0mkyKOCePh3My6OyEU=
github.com/go-critic/go-critic v0.11.4/go.mod h1:2QAdo4iuLik5S9YG0rT4wcZ8QxwHYkrr6/2MWAiv/vc=
github.com/go-critic/go-critic v0.11.5 h1:TkDTOn5v7EEngMxu8KbuFqFR43USaaH8XRJLz1jhVYA=
github.com/go-critic/go-critic v0.11.5/go.mod h1:wu6U7ny9PiaHaZHcvMDmdysMqvDem162Rh3zWTrqk8M=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -213,6 +249,10 @@ github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1 h1:TQcrn6Wq+sKGkpyPvppOz99zsM
github.com/go-viper/mapstructure/v2 v2.0.0-alpha.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/go-viper/mapstructure/v2 v2.0.0 h1:dhn8MZ1gZ0mzeodTG3jt5Vj/o87xZKuNAprG2mQfMfc=
github.com/go-viper/mapstructure/v2 v2.0.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/go-viper/mapstructure/v2 v2.1.0 h1:gHnMa2Y/pIxElCH2GlZZ1lZSsn6XMtufpGyP1XxdC/w=
github.com/go-viper/mapstructure/v2 v2.1.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIxtHqx8aGss=
github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
github.com/go-xmlfmt/xmlfmt v1.1.2 h1:Nea7b4icn8s57fTx1M5AI4qQT5HEM3rVUO8MuE6g80U=
github.com/go-xmlfmt/xmlfmt v1.1.2/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM=
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
@@ -253,8 +293,12 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a h1:w8hkcTqaFpzKqonE9uMCefW1WDie15eSP/4MssdenaM=
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk=
github.com/golangci/go-printf-func-name v0.1.0 h1:dVokQP+NMTO7jwO4bwsRwLWeudOVUPPyAKJuzv8pEJU=
github.com/golangci/go-printf-func-name v0.1.0/go.mod h1:wqhWFH5mUdJQhweRnldEywnR5021wTdZSNgwYceV14s=
github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e h1:ULcKCDV1LOZPFxGZaA6TlQbiM3J2GCPnkx/bGF6sX/g=
github.com/golangci/gofmt v0.0.0-20231018234816-f50ced29576e/go.mod h1:Pm5KhLPA8gSnQwrQ6ukebRcapGb/BG9iUkdaiCcGHJM=
github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9 h1:/1322Qns6BtQxUZDTAT4SdcoxknUki7IAoK4SAXr8ME=
github.com/golangci/gofmt v0.0.0-20240816233607-d8596aa466a9/go.mod h1:Oesb/0uFAyWoaw1U1qS5zyjCg5NP9C9iwjnI4tIsXEE=
github.com/golangci/golangci-lint v1.57.1 h1:cqhpzkzjDwdN12rfMf1SUyyKyp88a1SltNqEYGS0nJw=
github.com/golangci/golangci-lint v1.57.1/go.mod h1:zLcHhz3NHc88T5zV2j75lyc0zH3LdOPOybblYa4p0oI=
github.com/golangci/golangci-lint v1.59.0 h1:st69YDnAH/v2QXDcgUaZ0seQajHScPALBVkyitYLXEk=
@@ -263,6 +307,10 @@ github.com/golangci/golangci-lint v1.59.1 h1:CRRLu1JbhK5avLABFJ/OHVSQ0Ie5c4ulsOI
github.com/golangci/golangci-lint v1.59.1/go.mod h1:jX5Oif4C7P0j9++YB2MMJmoNrb01NJ8ITqKWNLewThg=
github.com/golangci/golangci-lint v1.60.1 h1:DRKNqNTQRLBJZ1il5u4fvgLQCjQc7QFs0DbhksJtVJE=
github.com/golangci/golangci-lint v1.60.1/go.mod h1:jDIPN1rYaIA+ijp9OZcUmUCoQOtZ76pOlFbi15FlLJY=
github.com/golangci/golangci-lint v1.61.0 h1:VvbOLaRVWmyxCnUIMTbf1kDsaJbTzH20FAMXTAlQGu8=
github.com/golangci/golangci-lint v1.61.0/go.mod h1:e4lztIrJJgLPhWvFPDkhiMwEFRrWlmFbrZea3FsJyN8=
github.com/golangci/golangci-lint v1.62.0 h1:/G0g+bi1BhmGJqLdNQkKBWjcim8HjOPc4tsKuHDOhcI=
github.com/golangci/golangci-lint v1.62.0/go.mod h1:jtoOhQcKTz8B6dGNFyfQV3WZkQk+YvBDewDtNpiAJts=
github.com/golangci/misspell v0.4.1 h1:+y73iSicVy2PqyX7kmUefHusENlrP9YwuHZHPLGQj/g=
github.com/golangci/misspell v0.4.1/go.mod h1:9mAN1quEo3DlpbaIKKyEvRxK1pwqR9s/Sea1bJCtlNI=
github.com/golangci/misspell v0.5.1 h1:/SjR1clj5uDjNLwYzCahHwIOPmQgoH04AyQIiWGbhCM=
@@ -365,6 +413,8 @@ github.com/karamaru-alpha/copyloopvar v1.1.0 h1:x7gNyKcC2vRBO1H2Mks5u1VxQtYvFiym
github.com/karamaru-alpha/copyloopvar v1.1.0/go.mod h1:u7CIfztblY0jZLOQZgH3oYsJzpC2A7S6u/lfgSXHy0k=
github.com/kisielk/errcheck v1.7.0 h1:+SbscKmWJ5mOK/bO1zS60F5I9WwZDWOfRsC4RwfwRV0=
github.com/kisielk/errcheck v1.7.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ=
github.com/kisielk/errcheck v1.8.0 h1:ZX/URYa7ilESY19ik/vBmCn6zdGQLxACwjAcWbHlYlg=
github.com/kisielk/errcheck v1.8.0/go.mod h1:1kLL+jV4e+CFfueBmI1dSK2ADDyQnlrnrY/FqKluHJQ=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kkHAIKE/contextcheck v1.1.4 h1:B6zAaLhOEEcjvUgIYEqystmnFk1Oemn8bvJhbt0GMb8=
github.com/kkHAIKE/contextcheck v1.1.4/go.mod h1:1+i/gWqokIa+dm31mqGLZhZJ7Uh44DJGZVmr6QRBNJg=
@@ -384,6 +434,8 @@ github.com/kyoh86/exportloopref v0.1.11 h1:1Z0bcmTypkL3Q4k+IDHMWTcnCliEZcaPiIe0/
github.com/kyoh86/exportloopref v0.1.11/go.mod h1:qkV4UF1zGl6EkF1ox8L5t9SwyeBAZ3qLMd6up458uqA=
github.com/lasiar/canonicalheader v1.1.1 h1:wC+dY9ZfiqiPwAexUApFush/csSPXeIi4QqyxXmng8I=
github.com/lasiar/canonicalheader v1.1.1/go.mod h1:cXkb3Dlk6XXy+8MVQnF23CYKWlyA7kfQhSw2CcZtZb0=
github.com/lasiar/canonicalheader v1.1.2 h1:vZ5uqwvDbyJCnMhmFYimgMZnJMjwljN5VGY0VKbMXb4=
github.com/lasiar/canonicalheader v1.1.2/go.mod h1:qJCeLFS0G/QlLQ506T+Fk/fWMa2VmBUiEI2cuMK4djI=
github.com/ldez/gomoddirectives v0.2.3 h1:y7MBaisZVDYmKvt9/l1mjNCiSA1BVn34U0ObUcJwlhA=
github.com/ldez/gomoddirectives v0.2.3/go.mod h1:cpgBogWITnCfRq2qGoDkKMEVSaarhdBr6g8G04uz6d0=
github.com/ldez/gomoddirectives v0.2.4 h1:j3YjBIjEBbqZ0NKtBNzr8rtMHTOrLPeiwTkfUJZ3alg=
@@ -414,12 +466,16 @@ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWE
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0=
github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/mgechev/revive v1.3.7 h1:502QY0vQGe9KtYJ9FpxMz9rL+Fc/P13CI5POL4uHCcE=
github.com/mgechev/revive v1.3.7/go.mod h1:RJ16jUbF0OWC3co/+XTxmFNgEpUPwnnA0BRllX2aDNA=
github.com/mgechev/revive v1.3.9 h1:18Y3R4a2USSBF+QZKFQwVkBROUda7uoBlkEuBD+YD1A=
github.com/mgechev/revive v1.3.9/go.mod h1:+uxEIr5UH0TjXWHTno3xh4u7eg6jDpXKzQccA9UGhHU=
github.com/mgechev/revive v1.5.0 h1:oaSmjA7rP8+HyoRuCgC531VHwnLH1AlJdjj+1AnQceQ=
github.com/mgechev/revive v1.5.0/go.mod h1:L6T3H8EoerRO86c7WuGpvohIUmiploGiyoYbtIWFmV8=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
@@ -445,6 +501,8 @@ github.com/nunnatsa/ginkgolinter v0.16.1 h1:uDIPSxgVHZ7PgbJElRDGzymkXH+JaF7mjew+
github.com/nunnatsa/ginkgolinter v0.16.1/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ=
github.com/nunnatsa/ginkgolinter v0.16.2 h1:8iLqHIZvN4fTLDC0Ke9tbSZVcyVHoBs0HIbnVSxfHJk=
github.com/nunnatsa/ginkgolinter v0.16.2/go.mod h1:4tWRinDN1FeJgU+iJANW/kz7xKN5nYRAOfJDQUS9dOQ=
github.com/nunnatsa/ginkgolinter v0.18.0 h1:ZXO1wKhPg3A6LpbN5dMuqwhfOjN5c3ous8YdKOuqk9k=
github.com/nunnatsa/ginkgolinter v0.18.0/go.mod h1:vPrWafSULmjMGCMsfGA908if95VnHQNAahvSBOjTuWs=
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
@@ -458,6 +516,8 @@ github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeB
github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pelletier/go-toml/v2 v2.2.2 h1:aYUidT7k73Pcl9nb2gScu7NSrKCSHIDE89b3+6Wq+LM=
github.com/pelletier/go-toml/v2 v2.2.2/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs=
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -495,6 +555,8 @@ github.com/prometheus/procfs v0.7.3 h1:4jVXhlkAyzOScmCkXBTOLRLTz8EeU+eyjrwB/EPq0
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/quasilyte/go-ruleguard v0.4.2 h1:htXcXDK6/rO12kiTHKfHuqR4kr3Y4M0J0rOL6CH/BYs=
github.com/quasilyte/go-ruleguard v0.4.2/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI=
github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1 h1:+Wl/0aFp0hpuHM3H//KMft64WQ1yX9LdJY64Qm/gFCo=
github.com/quasilyte/go-ruleguard v0.4.3-0.20240823090925-0fe6f58b47b1/go.mod h1:GJLgqsLeo4qgavUoL8JeGFNS7qcisx3awV/w9eWTmNI=
github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE=
github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU=
github.com/quasilyte/gogrep v0.5.0 h1:eTKODPXbI8ffJMN+W2aE0+oL0z/nh8/5eNdiO34SOAo=
@@ -503,7 +565,14 @@ github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727 h1:TCg2WBOl
github.com/quasilyte/regex/syntax v0.0.0-20210819130434-b3f0c404a727/go.mod h1:rlzQ04UMyJXu/aOvhd8qT+hvDrFpiwqp8MRXDY9szc0=
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 h1:M8mH9eK4OUR4lu7Gd+PU1fV2/qnDNfzT635KRSObncs=
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567/go.mod h1:DWNGW8A4Y+GyBgPuaQJuWiy0XYftx4Xm/y5Jqk9I6VQ=
github.com/raeperd/recvcheck v0.1.2 h1:SjdquRsRXJc26eSonWIo8b7IMtKD3OAT2Lb5G3ZX1+4=
github.com/raeperd/recvcheck v0.1.2/go.mod h1:n04eYkwIR0JbgD73wT8wL4JjPC3wm0nFtzBnWNocnYU=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryancurrah/gomodguard v1.3.1 h1:fH+fUg+ngsQO0ruZXXHnA/2aNllWA1whly4a6UvyzGE=
github.com/ryancurrah/gomodguard v1.3.1/go.mod h1:DGFHzEhi6iJ0oIDfMuo3TgrS+L9gZvrEfmjjuelnRU0=
@@ -511,6 +580,8 @@ github.com/ryancurrah/gomodguard v1.3.2 h1:CuG27ulzEB1Gu5Dk5gP8PFxSOZ3ptSdP5iI/3
github.com/ryancurrah/gomodguard v1.3.2/go.mod h1:LqdemiFomEjcxOqirbQCb3JFvSxH2JUYMerTFd3sF2o=
github.com/ryancurrah/gomodguard v1.3.3 h1:eiSQdJVNr9KTNxY2Niij8UReSwR8Xrte3exBrAZfqpg=
github.com/ryancurrah/gomodguard v1.3.3/go.mod h1:rsKQjj4l3LXe8N344Ow7agAy5p9yjsWOtRzUMYmA0QY=
github.com/ryancurrah/gomodguard v1.3.5 h1:cShyguSwUEeC0jS7ylOiG/idnd1TpJ1LfHGpV3oJmPU=
github.com/ryancurrah/gomodguard v1.3.5/go.mod h1:MXlEPQRxgfPQa62O8wzK3Ozbkv9Rkqr+wKjSxTdsNJE=
github.com/ryanrolds/sqlclosecheck v0.5.1 h1:dibWW826u0P8jNLsLN+En7+RqWWTYrjCB9fJfSfdyCU=
github.com/ryanrolds/sqlclosecheck v0.5.1/go.mod h1:2g3dUjoS6AL4huFdv6wn55WpLIDjY7ZgUR4J8HOO/XQ=
github.com/sanposhiho/wastedassign/v2 v2.0.7 h1:J+6nrY4VW+gC9xFzUc+XjPD3g3wF3je/NsJFwFK7Uxc=
@@ -529,6 +600,10 @@ github.com/securego/gosec/v2 v2.19.0 h1:gl5xMkOI0/E6Hxx0XCY2XujA3V7SNSefA8sC+3f1
github.com/securego/gosec/v2 v2.19.0/go.mod h1:hOkDcHz9J/XIgIlPDXalxjeVYsHxoWUc5zJSHxcB8YM=
github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9 h1:rnO6Zp1YMQwv8AyxzuwsVohljJgp4L0ZqiCgtACsPsc=
github.com/securego/gosec/v2 v2.20.1-0.20240525090044-5f0084eb01a9/go.mod h1:dg7lPlu/xK/Ut9SedURCoZbVCR4yC7fM65DtH9/CDHs=
github.com/securego/gosec/v2 v2.21.2 h1:deZp5zmYf3TWwU7A7cR2+SolbTpZ3HQiwFqnzQyEl3M=
github.com/securego/gosec/v2 v2.21.2/go.mod h1:au33kg78rNseF5PwPnTWhuYBFf534bvJRvOrgZ/bFzU=
github.com/securego/gosec/v2 v2.21.4 h1:Le8MSj0PDmOnHJgUATjD96PaXRvCpKC+DGJvwyy0Mlk=
github.com/securego/gosec/v2 v2.21.4/go.mod h1:Jtb/MwRQfRxCXyCm1rfM1BEiiiTfUOdyzzAhlr6lUTA=
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU=
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs=
github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
@@ -544,8 +619,12 @@ github.com/sivchari/tenv v1.7.1 h1:PSpuD4bu6fSmtWMxSGWcvqUUgIn7k3yOJhOIzVWn8Ak=
github.com/sivchari/tenv v1.7.1/go.mod h1:64yStXKSOxDfX47NlhVwND4dHwfZDdbp2Lyl018Icvg=
github.com/sivchari/tenv v1.10.0 h1:g/hzMA+dBCKqGXgW8AV/1xIWhAvDrx0zFKNR48NFMg0=
github.com/sivchari/tenv v1.10.0/go.mod h1:tdY24masnVoZFxYrHv/nD6Tc8FbkEtAQEEziXpyMgqY=
github.com/sivchari/tenv v1.12.1 h1:+E0QzjktdnExv/wwsnnyk4oqZBUfuh89YMQT1cyuvSY=
github.com/sivchari/tenv v1.12.1/go.mod h1:1LjSOUCc25snIr5n3DtGGrENhX3LuWefcplwVGC24mw=
github.com/sonatard/noctx v0.0.2 h1:L7Dz4De2zDQhW8S0t+KUjY0MAQJd6SgVwhzNIc4ok00=
github.com/sonatard/noctx v0.0.2/go.mod h1:kzFz+CzWSjQ2OzIm46uJZoXuBpa2+0y3T36U18dWqIo=
github.com/sonatard/noctx v0.1.0 h1:JjqOc2WN16ISWAjAk8M5ej0RfExEXtkEyExl2hLW+OM=
github.com/sonatard/noctx v0.1.0/go.mod h1:0RvBxqY8D4j9cTTTWE8ylt2vqj2EPI8fHmrxHdsaZ2c=
github.com/sourcegraph/go-diff v0.7.0 h1:9uLlrd5T46OXs5qpp8L/MTltk0zikUGi0sNNyCpA8G0=
github.com/sourcegraph/go-diff v0.7.0/go.mod h1:iBszgVvyxdc8SFZ7gm69go2KDdt3ag071iBaWPF6cjs=
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
@@ -592,12 +671,20 @@ github.com/tenntenn/modver v1.0.1/go.mod h1:bePIyQPb7UeioSRkw3Q0XeMhYZSMx9B8ePqg
github.com/tenntenn/text/transform v0.0.0-20200319021203-7eef512accb3/go.mod h1:ON8b8w4BN/kE1EOhwT0o+d62W65a6aPw1nouo9LMgyY=
github.com/tetafro/godot v1.4.16 h1:4ChfhveiNLk4NveAZ9Pu2AN8QZ2nkUGFuadM9lrr5D0=
github.com/tetafro/godot v1.4.16/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio=
github.com/tetafro/godot v1.4.17 h1:pGzu+Ye7ZUEFx7LHU0dAKmCOXWsPjl7qA6iMGndsjPs=
github.com/tetafro/godot v1.4.17/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio=
github.com/tetafro/godot v1.4.18 h1:ouX3XGiziKDypbpXqShBfnNLTSjR8r3/HVzrtJ+bHlI=
github.com/tetafro/godot v1.4.18/go.mod h1:2oVxTBSftRTh4+MVfUaUXR6bn2GDXCaMcOG4Dk3rfio=
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966 h1:quvGphlmUVU+nhpFa4gg4yJyTRJ13reZMDHrKwYw53M=
github.com/timakin/bodyclose v0.0.0-20230421092635-574207250966/go.mod h1:27bSVNWSBOHm+qRp1T9qzaIpsWEP6TbUnei/43HK+PQ=
github.com/timonwong/loggercheck v0.9.4 h1:HKKhqrjcVj8sxL7K77beXh0adEm6DLjV/QOGeMXEVi4=
github.com/timonwong/loggercheck v0.9.4/go.mod h1:caz4zlPcgvpEkXgVnAJGowHAMW2NwHaNlpS8xDbVhTg=
github.com/timonwong/loggercheck v0.10.1 h1:uVZYClxQFpw55eh+PIoqM7uAOHMrhVcDoWDery9R8Lg=
github.com/timonwong/loggercheck v0.10.1/go.mod h1:HEAWU8djynujaAVX7QI65Myb8qgfcZ1uKbdpg3ZzKl8=
github.com/tomarrell/wrapcheck/v2 v2.8.3 h1:5ov+Cbhlgi7s/a42BprYoxsr73CbdMUTzE3bRDFASUs=
github.com/tomarrell/wrapcheck/v2 v2.8.3/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo=
github.com/tomarrell/wrapcheck/v2 v2.9.0 h1:801U2YCAjLhdN8zhZ/7tdjB3EnAoRlJHt/s+9hijLQ4=
github.com/tomarrell/wrapcheck/v2 v2.9.0/go.mod h1:g9vNIyhb5/9TQgumxQyOEqDHsmGYcGsVMOx/xGkqdMo=
github.com/tommy-muehle/go-mnd/v2 v2.5.1 h1:NowYhSdyE/1zwK9QCLeRb6USWdoif80Ie+v+yU8u1Zw=
github.com/tommy-muehle/go-mnd/v2 v2.5.1/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw=
github.com/ultraware/funlen v0.1.0 h1:BuqclbkY6pO+cvxoq7OsktIXZpgBSkYTQtmwhAK81vI=
@@ -610,6 +697,8 @@ github.com/uudashr/gocognit v1.1.2 h1:l6BAEKJqQH2UpKAPKdMfZf5kE4W/2xk8pfU1OVLvni
github.com/uudashr/gocognit v1.1.2/go.mod h1:aAVdLURqcanke8h3vg35BC++eseDm66Z7KmchI5et4k=
github.com/uudashr/gocognit v1.1.3 h1:l+a111VcDbKfynh+airAy/DJQKaXh2m9vkoysMPSZyM=
github.com/uudashr/gocognit v1.1.3/go.mod h1:aKH8/e8xbTRBwjbCkwZ8qt4l2EpKXl31KMHgSS+lZ2U=
github.com/uudashr/iface v1.2.0 h1:ECJjh5q/1Zmnv/2yFpWV6H3oMg5+Mo+vL0aqw9Gjazo=
github.com/uudashr/iface v1.2.0/go.mod h1:Ux/7d/rAF3owK4m53cTVXL4YoVHKNqnoOeQHn2xrlp0=
github.com/xen0n/gosmopolitan v1.2.2 h1:/p2KTnMzwRexIW8GlKawsTWOxn7UHA+jCMF/V8HHtvU=
github.com/xen0n/gosmopolitan v1.2.2/go.mod h1:7XX7Mj61uLYrj0qmeN0zi7XDon9JRAEhYQqAPLVNTeg=
github.com/yagipy/maintidx v1.0.0 h1:h5NvIsCz+nRDapQ0exNv4aJ0yXSI0420omVANTv3GJM=
@@ -635,6 +724,8 @@ go-simpler.org/musttag v0.9.0 h1:Dzt6/tyP9ONr5g9h9P3cnYWCxeBFRkd0uJL/w+1Mxos=
go-simpler.org/musttag v0.9.0/go.mod h1:gA9nThnalvNSKpEoyp3Ko4/vCX2xTpqKoUtNqXOnVR4=
go-simpler.org/musttag v0.12.2 h1:J7lRc2ysXOq7eM8rwaTYnNrHd5JwjppzB6mScysB2Cs=
go-simpler.org/musttag v0.12.2/go.mod h1:uN1DVIasMTQKk6XSik7yrJoEysGtR2GRqvWnI9S7TYM=
go-simpler.org/musttag v0.13.0 h1:Q/YAW0AHvaoaIbsPj3bvEI5/QFP7w696IMUpnKXQfCE=
go-simpler.org/musttag v0.13.0/go.mod h1:FTzIGeK6OkKlUDVpj0iQUXZLUO1Js9+mvykDQy9C5yM=
go-simpler.org/sloglint v0.5.0 h1:2YCcd+YMuYpuqthCgubcF5lBSjb6berc5VMOYUHKrpY=
go-simpler.org/sloglint v0.5.0/go.mod h1:EUknX5s8iXqf18KQxKnaBHUPVriiPnOrPjjJcsaTcSQ=
go-simpler.org/sloglint v0.7.0 h1:rMZRxD9MbaGoRFobIOicMxZzum7AXNFDlez6xxJs5V4=
@@ -652,6 +743,8 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8=
go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0=
go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU=
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
@@ -676,10 +769,16 @@ golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EH
golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU=
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc h1:ao2WRsKSzW6KuUY9IWPwWahcHCgR0s52IfwutMfEbdM=
golang.org/x/exp v0.0.0-20240103183307-be819d1f06fc/go.mod h1:iRJReGqOEeBhDZGkGbynYwcHlctCvnjTYIamk7uXpHI=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e h1:I88y4caeGeuDQxgdoFPUq097j7kNfw6uvuiNxUBfcBk=
golang.org/x/exp v0.0.0-20240904232852-e7e105dedf7e/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk=
golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY=
golang.org/x/exp/typeparams v0.0.0-20220428152302-39d4317da171/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/exp/typeparams v0.0.0-20230203172020-98cc5a0785f9/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f h1:phY1HzDcf18Aq9A8KkmRtY9WvOFIxN8wgfvy6Zm1DV8=
golang.org/x/exp/typeparams v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0 h1:bVwtbF629Xlyxk6xLQq2TDYmqP0uiWaet5LwRebuY0k=
golang.org/x/exp/typeparams v0.0.0-20240909161429-701f63a606c0/go.mod h1:AbB0pIl9nAr9wVwH+Z2ZpaocVmF5I4GyWCDIsVjR0bk=
golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
@@ -716,6 +815,10 @@ golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0=
golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=
golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0=
golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/mod v0.22.0 h1:D4nJWe9zXqHOmWqj4VMOJhvzj7bEZg4wEYa759z1pH4=
golang.org/x/mod v0.22.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -779,6 +882,8 @@ golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=
golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ=
golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -841,6 +946,10 @@ golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.23.0 h1:YfKFowiIMvtgl1UERQoTPPToxltDeZfbj4H7dVUCwmM=
golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34=
golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -861,6 +970,8 @@ golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -933,6 +1044,8 @@ golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA=
golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c=
golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=
golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ=
golang.org/x/tools v0.27.0 h1:qEKojBykQkQ4EynWy4S8Weg69NumxKdn40Fce3uc/8o=
golang.org/x/tools v0.27.0/go.mod h1:sUi0ZgbwW9ZPAq26Ekut+weQPR5eIM6GQLQ1Yjm1H0Q=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -1014,6 +1127,8 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -1042,8 +1157,12 @@ honnef.co/go/tools v0.4.7 h1:9MDAWxMoSnB6QoSqiVr7P5mtkT9pOc1kSxchzPCnqJs=
honnef.co/go/tools v0.4.7/go.mod h1:+rnGS1THNh8zMwnd2oVOTL9QF6vmfyG6ZXBULae2uc0=
honnef.co/go/tools v0.5.0 h1:29uoiIormS3Z6R+t56STz/oI4v+mB51TSmEOdJPgRnE=
honnef.co/go/tools v0.5.0/go.mod h1:e9irvo83WDG9/irijV44wr3tbhcFeRnfpVlRqVwpzMs=
honnef.co/go/tools v0.5.1 h1:4bH5o3b5ZULQ4UrBmP+63W9r7qIkqJClEA9ko5YKx+I=
honnef.co/go/tools v0.5.1/go.mod h1:e9irvo83WDG9/irijV44wr3tbhcFeRnfpVlRqVwpzMs=
mvdan.cc/gofumpt v0.6.0 h1:G3QvahNDmpD+Aek/bNOLrFR2XC6ZAdo62dZu65gmwGo=
mvdan.cc/gofumpt v0.6.0/go.mod h1:4L0wf+kgIPZtcCWXynNS2e6bhmj73umwnuXSZarixzA=
mvdan.cc/gofumpt v0.7.0 h1:bg91ttqXmi9y2xawvkuMXyvAA/1ZGJqYAEGjXuP0JXU=
mvdan.cc/gofumpt v0.7.0/go.mod h1:txVFJy/Sc/mvaycET54pV8SW8gWxTlUuGHVEcncmNUo=
mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14 h1:zCr3iRRgdk5eIikZNDphGcM6KGVTx3Yu+/Uu9Es254w=
mvdan.cc/unparam v0.0.0-20240104100049-c549a3470d14/go.mod h1:ZzZjEpJDOmx8TdVU6umamY3Xy0UAQUI2DHbf05USVbI=
mvdan.cc/unparam v0.0.0-20240427195214-063aff900ca1 h1:Nykk7fggxChwLK4rUPYESzeIwqsuxXXlFEAh5YhaMRo=

View File

@@ -14,7 +14,7 @@ CUE="${GOBIN}/cue-v0.5.0"
DRONE="${GOBIN}/drone-v1.5.0"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.60.1"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.62.0"
JB="${GOBIN}/jb-v0.5.1"

View File

@@ -18,18 +18,10 @@ load(
"publish_packages_pipeline",
)
load("scripts/drone/events/rrc-patch.star", "rrc_patch_pipelines")
load(
"scripts/drone/pipelines/ci_images.star",
"publish_ci_windows_test_image_pipeline",
)
load(
"scripts/drone/pipelines/publish_images.star",
"publish_image_pipelines_public",
)
load(
"scripts/drone/pipelines/windows.star",
"windows_test_backend",
)
load(
"scripts/drone/rgm.star",
"rgm",
@@ -46,12 +38,7 @@ def main(_ctx):
publish_npm_pipelines() +
publish_packages_pipeline() +
rgm() +
[windows_test_backend({
"event": ["promote"],
"target": ["test-windows"],
}, "oss", "testing")] +
integration_test_pipelines() +
publish_ci_windows_test_image_pipeline() +
cronjobs() +
secrets()
)

1505
.drone.yml

File diff suppressed because it is too large Load Diff

26
.github/CODEOWNERS vendored
View File

@@ -38,17 +38,11 @@
/docs/.codespellignore @grafana/docs-tooling
/docs/sources/ @irenerl24
/docs/sources/administration/ @jdbaldry
/docs/sources/alerting/ @brendamuir
/docs/sources/dashboards/ @imatwawana
/docs/sources/datasources/ @jdbaldry
/docs/sources/explore/ @grafana/explore-squad @lwandz13
/docs/sources/fundamentals @irenerl24
/docs/sources/getting-started/ @irenerl24
/docs/sources/introduction/ @irenerl24
/docs/sources/panels-visualizations/ @imatwawana
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
/docs/sources/setup-grafana/ @irenerl24
/docs/sources/release-notes/ @irenerl24 @GrafanaWriter
/docs/sources/upgrade-guide/ @imatwawana
/docs/sources/whatsnew/ @imatwawana
@@ -66,7 +60,7 @@
/pkg/README.md @grafana/grafana-backend-group
/pkg/ruleguard.rules.go @grafana/grafana-backend-group
/.bra.toml @grafana/grafana-backend-group
/.golangci.toml @grafana/grafana-backend-group
/.golangci.yml @grafana/grafana-backend-group
/build.go @grafana/grafana-backend-services-squad
/scripts/modowners/ @grafana/grafana-backend-services-squad
/scripts/go-workspace @grafana/grafana-app-platform-squad
@@ -701,12 +695,14 @@ embed.go @grafana/grafana-as-code
/.github/renovate.json5 @grafana/frontend-ops
/.github/teams.yml @armandgrillet
/.github/workflows/alerting-swagger-gen.yml @grafana/alerting-backend
/.github/workflows/auto-milestone.yml @grafana/grafana-release-guild
/.github/workflows/backport.yml @grafana/grafana-release-guild
/.github/workflows/bump-version.yml @grafana/grafana-release-guild
/.github/workflows/close-milestone.yml @grafana/grafana-release-guild
/.github/workflows/release-pr.yml @grafana/grafana-release-guild
/.github/workflows/release-comms.yml @grafana/grafana-release-guild
/.github/workflows/auto-milestone.yml @grafana/grafana-developer-enablement-squad
/.github/workflows/backport.yml @grafana/grafana-developer-enablement-squad
/.github/workflows/bump-version.yml @grafana/grafana-developer-enablement-squad
/.github/workflows/close-milestone.yml @grafana/grafana-developer-enablement-squad
/.github/workflows/release-pr.yml @grafana/grafana-developer-enablement-squad
/.github/workflows/release-comms.yml @grafana/grafana-developer-enablement-squad
/.github/workflows/migrate-prs.yml @grafana/grafana-developer-enablement-squad
/.github/workflows/create-next-release-branch.yml @grafana/grafana-developer-enablement-squad
/.github/workflows/codeowners-validator.yml @tolzhabayev
/.github/workflows/codeql-analysis.yml @DanCech
/.github/workflows/commands.yml @torkelo
@@ -747,7 +743,7 @@ embed.go @grafana/grafana-as-code
/.github/workflows/i18n-crowdin-download.yml @grafana/grafana-frontend-platform
/.github/workflows/pr-go-workspace-check.yml @grafana/grafana-app-platform-squad
/.github/workflows/pr-k8s-codegen-check.yml @grafana/grafana-app-platform-squad
/.github/workflows/go_lint.yml @grafana/grafana-backend-services-squad
/.github/workflows/go-lint.yml @grafana/grafana-backend-services-squad
/.github/workflows/trivy-scan.yml @grafana/grafana-backend-services-squad
/.github/workflows/changelog.yml @zserge
/.github/workflows/actions/changelog @zserge

View File

@@ -10,24 +10,19 @@ jobs:
if: github.repository == 'grafana/grafana'
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
- name: Checkout
uses: actions/checkout@v4
with:
repository: "grafana/grafana-github-actions"
path: ./actions
ref: main
- name: Install Actions
run: npm install --production --prefix ./actions
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- run: git config --global user.email '132647405+grafana-delivery-bot[bot]@users.noreply.github.com'
- run: git config --global user.name 'grafana-delivery-bot[bot]'
- run: git remote set-url origin "https://grafana-delivery-bot:${{ steps.generate_token.outputs.token }}@github.com/grafana/grafana.git"
- name: Run backport
uses: ./actions/backport
uses: grafana/grafana-github-actions-go/backport@main
with:
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
token: ${{ steps.generate_token.outputs.token }}
labelsToAdd: "backport"
title: "[{{base}}] {{originalTitle}}"

View File

@@ -0,0 +1,53 @@
name: Create next release branch
on:
workflow_call:
inputs:
ownerRepo:
type: string
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
required: true
source:
description: The release branch to increment (eg providing `release-11.2.3` will result in `release-11.2.4` being created)
type: string
required: true
secrets:
GRAFANA_DELIVERY_BOT_APP_ID:
required: true
GRAFANA_DELIVERY_BOT_APP_PEM:
required: true
outputs:
branch:
description: The new branch that was created
value: ${{ jobs.main.outputs.branch }}
workflow_dispatch:
inputs:
ownerRepo:
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
source:
description: The release branch to increment (eg providing `release-11.2.3` will result in `release-11.2.4` being created)
type: string
required: true
secrets:
GRAFANA_DELIVERY_BOT_APP_ID:
required: true
GRAFANA_DELIVERY_BOT_APP_PEM:
required: true
jobs:
main:
runs-on: ubuntu-latest
outputs:
branch: ${{ steps.branch.outputs.branch }}
steps:
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Create release branch
id: branch
uses: grafana/grafana-github-actions-go/bump-release@main
with:
ownerRepo: ${{ inputs.ownerRepo }}
source: ${{ inputs.source }}
token: ${{ steps.generate_token.outputs.token }}

View File

@@ -11,6 +11,7 @@ on:
branches:
- "main"
- "v*.*.*"
- "release-*.*.*"
# This is run before the pull request has been merged, so we'll run against the src branch
jobs:

View File

@@ -1,13 +1,18 @@
name: "doc-validator"
on:
pull_request:
paths: ["docs/sources/**"]
workflow_dispatch:
inputs:
include:
description: |
Regular expression that matches paths to include in linting.
For example: docs/sources/(?:alerting|fundamentals)/.+\.md
required: true
jobs:
doc-validator:
runs-on: "ubuntu-latest"
container:
image: "grafana/doc-validator:v5.0.0"
image: "grafana/doc-validator:v5.2.0"
steps:
- name: "Checkout code"
uses: "actions/checkout@v4"
@@ -15,15 +20,7 @@ jobs:
# Only run doc-validator on specific directories.
run: >
doc-validator
'--include=^docs/sources/(?:alerting|fundamentals|getting-started|introduction|setup-grafana|upgrade-guide|whatsnew/whats-new-in-v(?:9|10))/.+\.md$'
'--include=${{ inputs.include }}'
'--skip-checks=^(?:image.+|canonical-does-not-match-pretty-URL)$'
./docs/sources
/docs/grafana/latest
| reviewdog
-f=rdjsonl
--fail-on-error
--filter-mode=nofilter
--name=doc-validator
--reporter=github-pr-review
env:
REVIEWDOG_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

View File

@@ -8,7 +8,7 @@ on:
type: string
latest:
required: false
default: false
default: "0"
description: Mark this release as latest (`1`) or not (`0`, default)
type: string
dry_run:
@@ -23,6 +23,7 @@ on:
type: string
latest:
required: false
default: "0"
description: Mark this release as latest (`1`) or not (`0`, default)
type: string
dry_run:

View File

@@ -3,7 +3,7 @@ on:
push:
paths:
- pkg/**
- .github/workflows/go_lint.yml
- .github/workflows/go-lint.yml
- go.*
branches:
- main
@@ -20,13 +20,11 @@ jobs:
- uses: actions/setup-go@v5
with:
go-version-file: ./go.mod
- run: CODEGEN_VERIFY=1 make gen-cue
- run: make gen-go
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.60.1
version: v1.62.0
args: |
--config .golangci.toml --max-same-issues=0 --max-issues-per-linter=0 --verbose $(./scripts/go-workspace/golangci-lint-includes.sh)
skip-cache: true
--verbose $(go list -m -f '{{.Dir}}' | xargs -I{} sh -c 'test ! -f {}/.nolint && echo {}/...')
install-mode: binary

60
.github/workflows/migrate-prs.yml vendored Normal file
View File

@@ -0,0 +1,60 @@
name: Migrate open PRs
# Migrate open PRs from a superseded release branch to the current release branch and notify authors
on:
workflow_call:
inputs:
from:
description: 'The base branch to check for open PRs'
required: true
type: string
to:
description: 'The base branch to migrate open PRs to'
required: true
type: string
ownerRepo:
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
required: true
type: string
secrets:
GRAFANA_DELIVERY_BOT_APP_ID:
required: true
GRAFANA_DELIVERY_BOT_APP_PEM:
required: true
workflow_dispatch:
inputs:
from:
description: 'The base branch to check for open PRs'
required: true
type: string
to:
description: 'The base branch to migrate open PRs to'
required: true
type: string
ownerRepo:
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
required: true
type: string
secrets:
GRAFANA_DELIVERY_BOT_APP_ID:
required: true
GRAFANA_DELIVERY_BOT_APP_PEM:
required: true
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: "Generate token"
id: generate_token
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Migrate PRs
uses: grafana/grafana-github-actions-go/migrate-open-prs@main
with:
token: ${{ steps.generate_token.outputs.token }}
ownerRepo: ${{ inputs.ownerRepo }}
from: ${{ inputs.from }}
to: ${{ inputs.to }}
binary_release_tag: 'dev'

View File

@@ -3,7 +3,7 @@ name: publish-technical-documentation-release
on:
push:
branches:
- v[0-9]+.[0-9]+.x
- release-[0-9]+.[0-9]+.[0-9]+
tags:
- v[0-9]+.[0-9]+.[0-9]+
paths:
@@ -20,10 +20,10 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: grafana/writers-toolkit/publish-technical-documentation-release@publish-technical-documentation-release/v1
- uses: grafana/writers-toolkit/publish-technical-documentation-release@publish-technical-documentation-release/v2
with:
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$"
release_branch_with_patch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
release_tag_regexp: "^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
release_branch_regexp: "^release-(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
release_branch_with_patch_regexp: "^release-(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
website_directory: content/docs/grafana
version_suffix: ""

View File

@@ -8,17 +8,18 @@ on:
dry_run:
required: false
default: true
type: boolean
version:
required: true
latest:
type: bool
type: boolean
default: false
pull_request:
types:
- closed
branches:
- 'main'
- 'v*.*.*'
- 'release-*.*.*'
jobs:
setup:
@@ -26,30 +27,77 @@ jobs:
name: Setup and establish latest
outputs:
version: ${{ steps.output.outputs.version }}
release_branch: ${{ steps.output.outputs.release_branch }}
dry_run: ${{ steps.output.outputs.dry_run }}
latest: ${{ steps.output.outputs.latest }}
runs-on: ubuntu-latest
steps:
# The github-release action expects a `LATEST` value of a string of either '1' or '0'
- if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
echo setting up GITHUB_ENV for ${{ github.event_name }}
echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
echo "DRY_RUN=${{ inputs.dry_run }}" >> $GITHUB_ENV
echo "LATEST=${{ inputs.latest }}" >> $GITHUB_ENV
echo "LATEST=${{ inputs.latest && '1' || '0' }}" >> $GITHUB_ENV
- if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') }}
run: |
echo "VERSION=$(echo ${{ github.head_ref }} | sed -e 's/release\/.*\///g')" >> $GITHUB_ENV
echo "DRY_RUN=${{ contains(github.event.pull_request.labels.*.name, 'release/dry-run') }}" >> $GITHUB_ENV
echo "LATEST=${{ contains(github.event.pull_request.labels.*.name, 'release/latest') }}" >> $GITHUB_ENV
echo "LATEST=${{ contains(github.event.pull_request.labels.*.name, 'release/latest') && '1' || '0' }}" >> $GITHUB_ENV
- id: output
run: |
echo "dry_run: $DRY_RUN"
echo "latest: $LATEST"
echo "version: $VERSION"
echo "release_branch=$(echo $VERSION | sed -s 's/^v/release-/g')" >> "$GITHUB_OUTPUT"
echo "dry_run=$DRY_RUN" >> "$GITHUB_OUTPUT"
echo "latest=$LATEST" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
create_next_release_branch_grafana:
name: Create next release branch (Grafana)
needs: setup
uses: ./.github/workflows/create-next-release-branch.yml
secrets:
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
with:
ownerRepo: 'grafana/grafana'
source: ${{ needs.setup.outputs.release_branch }}
create_next_release_branch_enterprise:
name: Create next release branch (Grafana Enterprise)
needs: setup
uses: ./.github/workflows/create-next-release-branch.yml
secrets:
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
with:
ownerRepo: 'grafana/grafana-enterprise'
source: ${{ needs.setup.outputs.release_branch }}
migrate_prs_grafana:
needs:
- setup
- create_next_release_branch_grafana
uses: ./.github/workflows/migrate-prs.yml
secrets:
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
with:
ownerRepo: 'grafana/grafana'
from: ${{ needs.setup.outputs.release_branch }}
to: ${{ needs.create_next_release_branch_grafana.outputs.branch }}
migrate_prs_enterprise:
needs:
- setup
- create_next_release_branch_enterprise
uses: ./.github/workflows/migrate-prs.yml
secrets:
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
with:
ownerRepo: 'grafana/grafana-enterprise'
from: ${{ needs.setup.outputs.release_branch }}
to: ${{ needs.create_next_release_branch_enterprise.outputs.branch }}
post_changelog_on_forum:
needs: setup
uses: ./.github/workflows/community-release.yml

View File

@@ -4,7 +4,7 @@
# Please refrain from including any processes that do not result in code changes in this workflow. Instead, they should
# either be triggered in the release promotion process or in the release comms process (that is triggered by merging
# this PR).
name: Complete a Grafana release
name: Grafana Release PR
on:
workflow_dispatch:
inputs:
@@ -19,7 +19,7 @@ on:
target:
required: true
type: string
description: The base branch that these changes are being merged into
description: The release branch pattern (eg v9.5.x) that these changes are being merged into
backport:
required: false
type: string
@@ -61,10 +61,17 @@ jobs:
with:
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
- name: Get release branch
id: branch
uses: grafana/grafana-github-actions-go/latest-release-branch@main
with:
token: ${{ steps.generate_token.outputs.token }}
ownerRepo: 'grafana/grafana'
pattern: ${{ inputs.target }}
- name: Checkout Grafana
uses: actions/checkout@v4
with:
ref: ${{ inputs.target }}
ref: ${{ steps.branch.outputs.branch }}
fetch-depth: 0
fetch-tags: true
- name: Checkout Grafana (main)
@@ -124,7 +131,6 @@ jobs:
rm -f CHANGELOG.part changelog_items.md
git diff CHANGELOG.md
- name: "Prettify CHANGELOG.md"
run: npx prettier --write CHANGELOG.md
- name: Commit CHANGELOG.md changes
@@ -151,7 +157,7 @@ jobs:
$( [ "x${{ inputs.latest }}" == "xtrue" ] && printf %s '-l "release/latest"') \
-l "no-changelog" \
--dry-run=${{ inputs.dry_run }} \
-B "${{ inputs.target }}" \
-B "${{ steps.branch.outputs.branch }}" \
--title "Release: ${{ inputs.version }}" \
--body "These code changes must be merged after a release is complete"
env:
@@ -165,7 +171,7 @@ jobs:
-l "product-approved" \
-l "no-changelog" \
--dry-run=${{ inputs.dry_run }} \
-B "${{ inputs.target }}" \
-B "${{ steps.branch.outputs.branch }}" \
--title "Release: ${{ inputs.version }}" \
--body "These code changes must be merged after a release is complete"
env:

View File

@@ -1,315 +0,0 @@
[run]
timeout = "20m"
concurrency = 10
allow-parallel-runners = true
[linters-settings.exhaustive]
default-signifies-exhaustive = true
[linters-settings.revive]
ignore-generated-header = false
severity = "warning"
confidence = 3
[linters-settings.depguard.rules.main]
allow = [] # allow all
deny = [
{ pkg = "io/ioutil", desc = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details." },
{ pkg = "gopkg.in/yaml.v2", desc = "Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as gopkg.in/yaml.v3 is now available" },
{ pkg = "github.com/pkg/errors", desc = "Deprecated: Go 1.13 supports the functionality provided by pkg/errors in the standard library." },
{ pkg = "github.com/xorcare/pointer", desc = "Use pkg/util.Pointer instead, which is a generic one-liner alternative" },
{ pkg = "github.com/gofrs/uuid", desc = "Use github.com/google/uuid instead, which we already depend on." },
{ pkg = "github.com/bmizerany/assert", desc = "Use github.com/stretchr/testify/assert instead, which we already depend on." },
]
[linters-settings.depguard.rules.coreplugins]
deny = [
{ pkg = "github.com/grafana/grafana/pkg/api", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/cmd", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/cuectx", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/extensions", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/kinds", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/middleware", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/modules", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/registry", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/services", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/build", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/codegen", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/events", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/ifaces", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/kindsysreport", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/mocks", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/plugins", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/setting", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/util", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/bus", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/components", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/expr", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/infra", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/login", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/models", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/server", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/tests", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/web", desc = "Core plugins are not allowed to depend on Grafana core packages" },
{ pkg = "github.com/grafana/grafana/pkg/tsdb/intervalv2", desc = "Core plugins are not allowed to depend on Grafana core packages" },
]
files = [
"**/pkg/tsdb/grafana-pyroscope-datasource/*",
"**/pkg/tsdb/grafana-pyroscope-datasource/**/*",
"**/pkg/tsdb/grafana-testdata-datasource/*",
"**/pkg/tsdb/grafana-testdata-datasource/**/*",
"**/pkg/tsdb/azuremonitor/*",
"**/pkg/tsdb/azuremonitor/**/*",
"**/pkg/tsdb/cloud-monitoring/*",
"**/pkg/tsdb/cloud-monitoring/**/*",
"**/pkg/tsdb/mysql/*",
"**/pkg/tsdb/mysql/**/*",
"**/pkg/tsdb/parca/*",
"**/pkg/tsdb/parca/**/*",
"**/pkg/tsdb/tempo/*",
"**/pkg/tsdb/tempo/**/*",
"**/pkg/tsdb/cloudwatch/*",
"**/pkg/tsdb/cloudwatch/**/*",
]
[linters-settings.depguard.rules.apiserver]
list-mode = "lax"
allow = [
"github.com/grafana/grafana/pkg/apimachinery",
"github.com/grafana/grafana/pkg/apiserver",
]
deny = [
{ pkg = "github.com/grafana/grafana/pkg", desc = "apiserver is not allowed to import grafana core" }
]
files = [
"**/pkg/apiserver/*",
"**/pkg/apiserver/**/*"
]
[linters-settings.depguard.rules.apimachinery]
list-mode = "lax"
allow = [
"github.com/grafana/grafana/pkg/apimachinery",
]
deny = [
{ pkg = "github.com/grafana/grafana/pkg", desc = "apimachinery is not allowed to import grafana core" }
]
files = [
"**/pkg/apimachinery/*",
"**/pkg/apimachinery/**/*"
]
[linters-settings.depguard.rules.aggregator]
list-mode = "lax"
allow = [
"github.com/grafana/grafana/pkg/aggregator",
"github.com/grafana/grafana/pkg/semconv",
"github.com/grafana/grafana/pkg/apimachinery",
]
deny = [
{ pkg = "github.com/grafana/grafana/pkg", desc = "apimachinery is not allowed to import grafana core" }
]
files = [
"./pkg/aggregator/*",
"./pkg/aggregator/**/*"
]
[linters-settings.depguard.rules.promlib]
list-mode = "lax" # allow unless explicitely denied
deny = [
{ pkg = "github.com/grafana/grafana/pkg", desc = "promlib is not allowed to import grafana core" }
]
allow = [
"github.com/grafana/grafana/pkg/promlib"
]
files = [
"**/pkg/promlib/**/*"
]
[linters-settings.depguard.rules.storage-unified-resource]
list-mode = "lax"
allow = [
"github.com/grafana/grafana/pkg/apimachinery",
]
deny = [
{ pkg = "github.com/grafana/grafana/pkg", desc = "pkg/storage/unified/resource is not allowed to import grafana core" }
]
files = [
"./pkg/storage/unified/resource/*",
"./pkg/storage/unified/resource/**/*"
]
[linters-settings.depguard.rules.storage-unified-apistore]
list-mode = "lax"
allow = [
"github.com/grafana/grafana/pkg/apimachinery",
"github.com/grafana/grafana/pkg/apiserver",
"github.com/grafana/grafana/pkg/unified/resource",
]
deny = [
{ pkg = "github.com/grafana/grafana/pkg", desc = "pkg/storage/unified/apistore is not allowed to import grafana core" }
]
files = [
"./pkg/storage/unified/apistore/*",
"./pkg/storage/unified/apistore/**/*"
]
[linters-settings.depguard.rules.apps-playlist]
list-mode = "lax"
allow = []
deny = [
{ pkg = "github.com/grafana/grafana/pkg", desc = "apps/playlist is not allowed to import grafana core" }
]
files = [
"./apps/playlist/*",
"./apps/playlist/**/*"
]
[linters-settings.gocritic]
enabled-checks = ["ruleguard"]
[linters-settings.gocritic.settings.ruleguard]
rules = "pkg/ruleguard.rules.go"
[linters-settings.misspell]
ignore-words = ["Unknwon", "Creater"]
[linters-settings.nakedret]
max-func-lines = 60
[linters]
disable-all = true
# try to keep this list sorted, please
enable = [
"asciicheck",
"bodyclose",
"depguard",
"dogsled",
"errcheck",
"errorlint",
"exhaustive",
"exportloopref",
# "gochecknoinits",
# "goconst",
# "gocritic", # Temporarily disabled on 2022-09-09, running into weird bug "ruleguard: execution error: used Run() with an empty rule set; forgot to call Load() first?"
"gocyclo",
"goimports",
"goprintffuncname",
"gosec",
"gosimple",
"govet",
"ineffassign",
"misspell",
"nakedret",
"prealloc",
"revive",
"staticcheck",
"stylecheck",
"unconvert",
"unused",
"whitespace",
]
# Disabled linters (might want them later)
# "unparam"
# "rowserrcheck" # The linter doesn't detect that both Scan and Close also returns the error message returned by Err.
[issues]
exclude-use-default = false
max-same-issues = 0
# Enable when appropriate
# Poorly chosen identifier
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1003"
# Enable when appropriate
# Dot imports that aren't in external test packages are discouraged.
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1001"
# Enable when appropriate
# http.CloseNotifier has been deprecated since Go 1.11 and an alternative has been available since Go 1.7: We currently need it in pkg/web/response_writer.go.
[[issues.exclude-rules]]
linters = ["staticcheck"]
text = "SA1019: http.CloseNotifier"
# strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly.
# Use golang.org/x/text/cases instead.
[[issues.exclude-rules]]
linters = ["staticcheck"]
text = "SA1019: strings.Title"
# go.opentelemetry.io/otel/exporters/jaeger" is deprecated: This module is no longer supported. OpenTelemetry dropped support for Jaeger exporter in July 2023.
# Jaeger officially accepts and recommends using OTLP.
# Use [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp] or [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc] instead.
[[issues.exclude-rules]]
linters = ["staticcheck"]
text = "SA1019: \"go.opentelemetry.io/otel/exporters/jaeger\""
[[issues.exclude-rules]]
linters = ["staticcheck"]
text = "use fake service and real access control evaluator instead"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G108"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G110"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G201"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G202"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "G306"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "401"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "402"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "501"
[[issues.exclude-rules]]
linters = ["gosec"]
text = "404"
[[issues.exclude-rules]]
linters = ["errorlint"]
text = "non-wrapping format verb for fmt.Errorf"
# TODO: Enable
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1000"
# TODO: Enable
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1020"
# TODO: Enable
[[issues.exclude-rules]]
linters = ["stylecheck"]
text = "ST1021"
# Remove this when we have go v1.22 in place
# https://stackoverflow.com/a/68247837/767660
[[issues.exclude-rules]]
linters = ["gosec"]
path = '(.+)_test\.go'
text = "G601"

298
.golangci.yml Normal file
View File

@@ -0,0 +1,298 @@
run:
timeout: 10m
concurrency: 10
allow-parallel-runners: true
linters-settings:
exhaustive:
default-signifies-exhaustive: true
revive:
ignore-generated-header: false
severity: warning
confidence: 3
depguard:
rules:
main:
allow: []
deny:
- pkg: io/ioutil
desc: >-
Deprecated: As of Go 1.16, the same functionality is now provided
by package io or package os, and those implementations should be
preferred in new code. See the specific function documentation for
details.
- pkg: gopkg.in/yaml.v2
desc: >-
Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as
gopkg.in/yaml.v3 is now available
- pkg: github.com/pkg/errors
desc: >-
Deprecated: Go 1.13 supports the functionality provided by
pkg/errors in the standard library.
- pkg: github.com/xorcare/pointer
desc: >-
Use pkg/util.Pointer instead, which is a generic one-liner
alternative
- pkg: github.com/gofrs/uuid
desc: 'Use github.com/google/uuid instead, which we already depend on.'
- pkg: github.com/bmizerany/assert
desc: >-
Use github.com/stretchr/testify/assert instead, which we already
depend on.
coreplugins:
deny:
- pkg: github.com/grafana/grafana/pkg/api
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/cmd
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/cuectx
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/extensions
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/kinds
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/middleware
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/modules
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/registry
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/services
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/build
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/codegen
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/events
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/ifaces
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/kindsysreport
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/mocks
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/plugins
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/setting
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/util
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/bus
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/components
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/expr
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/infra
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/login
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/models
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/server
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/tests
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/web
desc: Core plugins are not allowed to depend on Grafana core packages
- pkg: github.com/grafana/grafana/pkg/tsdb/intervalv2
desc: Core plugins are not allowed to depend on Grafana core packages
files:
- '**/pkg/tsdb/grafana-pyroscope-datasource/*'
- '**/pkg/tsdb/grafana-pyroscope-datasource/**/*'
- '**/pkg/tsdb/grafana-testdata-datasource/*'
- '**/pkg/tsdb/grafana-testdata-datasource/**/*'
- '**/pkg/tsdb/azuremonitor/*'
- '**/pkg/tsdb/azuremonitor/**/*'
- '**/pkg/tsdb/cloud-monitoring/*'
- '**/pkg/tsdb/cloud-monitoring/**/*'
- '**/pkg/tsdb/mysql/*'
- '**/pkg/tsdb/mysql/**/*'
- '**/pkg/tsdb/parca/*'
- '**/pkg/tsdb/parca/**/*'
- '**/pkg/tsdb/tempo/*'
- '**/pkg/tsdb/tempo/**/*'
- '**/pkg/tsdb/cloudwatch/*'
- '**/pkg/tsdb/cloudwatch/**/*'
apiserver:
list-mode: lax
allow:
- github.com/grafana/grafana/pkg/apimachinery
- github.com/grafana/grafana/pkg/apiserver
deny:
- pkg: github.com/grafana/grafana/pkg
desc: apiserver is not allowed to import grafana core
files:
- '**/pkg/apiserver/*'
- '**/pkg/apiserver/**/*'
apimachinery:
list-mode: lax
allow:
- github.com/grafana/grafana/pkg/apimachinery
deny:
- pkg: github.com/grafana/grafana/pkg
desc: apimachinery is not allowed to import grafana core
files:
- '**/pkg/apimachinery/*'
- '**/pkg/apimachinery/**/*'
aggregator:
list-mode: lax
allow:
- github.com/grafana/grafana/pkg/aggregator
- github.com/grafana/grafana/pkg/semconv
- github.com/grafana/grafana/pkg/apimachinery
deny:
- pkg: github.com/grafana/grafana/pkg
desc: apimachinery is not allowed to import grafana core
files:
- ./pkg/aggregator/*
- ./pkg/aggregator/**/*
promlib:
list-mode: lax
deny:
- pkg: github.com/grafana/grafana/pkg
desc: promlib is not allowed to import grafana core
allow:
- github.com/grafana/grafana/pkg/promlib
files:
- '**/pkg/promlib/**/*'
storage-unified-resource:
list-mode: lax
allow:
- github.com/grafana/grafana/pkg/apimachinery
deny:
- pkg: github.com/grafana/grafana/pkg
desc: pkg/storage/unified/resource is not allowed to import grafana core
files:
- ./pkg/storage/unified/resource/*
- ./pkg/storage/unified/resource/**/*
storage-unified-apistore:
list-mode: lax
allow:
- github.com/grafana/grafana/pkg/apimachinery
- github.com/grafana/grafana/pkg/apiserver
- github.com/grafana/grafana/pkg/unified/resource
deny:
- pkg: github.com/grafana/grafana/pkg
desc: pkg/storage/unified/apistore is not allowed to import grafana core
files:
- ./pkg/storage/unified/apistore/*
- ./pkg/storage/unified/apistore/**/*
apps-playlist:
list-mode: lax
allow: []
deny:
- pkg: github.com/grafana/grafana/pkg
desc: apps/playlist is not allowed to import grafana core
files:
- ./apps/playlist/*
- ./apps/playlist/**/*
gocritic:
enabled-checks:
- ruleguard
settings:
ruleguard:
rules: pkg/ruleguard.rules.go
misspell:
ignore-words:
- Unknwon
- Creater
nakedret:
max-func-lines: 60
linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- depguard
- dogsled
- errcheck
- errorlint
- exhaustive
- gocyclo
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- prealloc
- revive
- staticcheck
- stylecheck
- unconvert
- unused
- whitespace
issues:
exclude-use-default: false
max-same-issues: 0
exclude-dirs:
- devenv
- scripts
exclude-rules:
- linters:
- stylecheck
text: ST1003
- linters:
- stylecheck
text: ST1001
- linters:
- staticcheck
text: 'SA1019: http.CloseNotifier'
- linters:
- staticcheck
text: 'SA1019: strings.Title'
- linters:
- staticcheck
text: 'SA1019: "go.opentelemetry.io/otel/exporters/jaeger"'
- linters:
- staticcheck
text: use fake service and real access control evaluator instead
- linters:
- gosec
text: G108
- linters:
- gosec
text: G110
- linters:
- gosec
text: G115
- linters:
- gosec
text: G201
- linters:
- gosec
text: G202
- linters:
- gosec
text: G306
- linters:
- gosec
text: '401'
- linters:
- gosec
text: '402'
- linters:
- gosec
text: '501'
- linters:
- gosec
text: '404'
- linters:
- errorlint
text: non-wrapping format verb for fmt.Errorf
- linters:
- stylecheck
text: ST1000
- linters:
- stylecheck
text: ST1020
- linters:
- stylecheck
text: ST1021
- linters:
- gosec
path: (.+)_test\.go
text: G601

View File

@@ -1,3 +1,144 @@
<!-- 11.4.2 START -->
# 11.4.2 (2025-02-18)
### Features and enhancements
- **Docker:** Use our own glibc 2.40 binaries [#99924](https://github.com/grafana/grafana/pull/99924), [@DanCech](https://github.com/DanCech)
### Bug fixes
- **Auth:** Fix redirect with JWT auth URL login [#100494](https://github.com/grafana/grafana/pull/100494), [@mgyongyosi](https://github.com/mgyongyosi)
- **AuthN:** Refetch user on "ErrUserAlreadyExists" [#100585](https://github.com/grafana/grafana/pull/100585), [@kalleep](https://github.com/kalleep)
- **Azure:** Correctly set application insights resource values [#99598](https://github.com/grafana/grafana/pull/99598), [@aangelisc](https://github.com/aangelisc)
- **Dashboards:** Bring back scripted dashboards [#100629](https://github.com/grafana/grafana/pull/100629), [@dprokop](https://github.com/dprokop)
- **Plugin Metrics:** Eliminate data race in plugin metrics middleware [#100077](https://github.com/grafana/grafana/pull/100077), [@clord](https://github.com/clord)
- **RBAC:** Don't check folder access if `annotationPermissionUpdate` FT is enabled [#100116](https://github.com/grafana/grafana/pull/100116), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
<!-- 11.4.2 END -->
<!-- 11.4.1 START -->
# 11.4.1 (2025-01-28)
### Features and enhancements
- **Security:** Update to Go 1.23.5 - Backport to v11.4.x [#99123](https://github.com/grafana/grafana/pull/99123), [@Proximyst](https://github.com/Proximyst)
- **Security:** Update to Go 1.23.5 - Backport to v11.4.x (Enterprise)
### Bug fixes
- **Alerting:** AlertingQueryRunner should skip descendant nodes of invalid queries [#97830](https://github.com/grafana/grafana/pull/97830), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fix alert rules unpausing after moving rule to different folder [#97583](https://github.com/grafana/grafana/pull/97583), [@santihernandezc](https://github.com/santihernandezc)
- **Alerting:** Fix label escaping in rule export [#98649](https://github.com/grafana/grafana/pull/98649), [@moustafab](https://github.com/moustafab)
- **Alerting:** Fix slack image uploading to use new api [#98066](https://github.com/grafana/grafana/pull/98066), [@moustafab](https://github.com/moustafab)
- **Azure/GCM:** Improve error display [#97594](https://github.com/grafana/grafana/pull/97594), [@aangelisc](https://github.com/aangelisc)
- **Dashboards:** Fix issue where filtered panels would not react to variable changes [#98734](https://github.com/grafana/grafana/pull/98734), [@oscarkilhed](https://github.com/oscarkilhed)
- **Dashboards:** Fixes issue with panel header showing even when hide time override was enabled [#98747](https://github.com/grafana/grafana/pull/98747), [@torkelo](https://github.com/torkelo)
- **Dashboards:** Fixes week relative time ranges when weekStart was changed [#98269](https://github.com/grafana/grafana/pull/98269), [@torkelo](https://github.com/torkelo)
- **Dashboards:** Panel react for `timeFrom` and `timeShift` changes using variables [#98659](https://github.com/grafana/grafana/pull/98659), [@Sergej-Vlasov](https://github.com/Sergej-Vlasov)
- **DateTimePicker:** Fixes issue with date picker showing invalid date [#97971](https://github.com/grafana/grafana/pull/97971), [@torkelo](https://github.com/torkelo)
- **Fix:** Add support for datasource variable queries [#98119](https://github.com/grafana/grafana/pull/98119), [@sunker](https://github.com/sunker)
- **InfluxDB:** Adhoc filters can use template vars as values [#98786](https://github.com/grafana/grafana/pull/98786), [@bossinc](https://github.com/bossinc)
- **LibraryPanel:** Fallback to panel title if library panel title is not set [#99410](https://github.com/grafana/grafana/pull/99410), [@ivanortegaalba](https://github.com/ivanortegaalba)
### Plugin development fixes & changes
- **Grafana UI:** Re-add react-router-dom as a dependency [#98422](https://github.com/grafana/grafana/pull/98422), [@leventebalogh](https://github.com/leventebalogh)
<!-- 11.4.1 END -->
<!-- 11.4.0 START -->
# 11.4.0 (2024-12-05)
### Features and enhancements
- **Cloudwatch:** OpenSearch PPL and SQL support in Logs Insights
<!-- 11.4.0 END -->
<!-- 11.3.1 START -->
# 11.3.1 (2024-11-19)
### Features and enhancements
- **Alerting:** Make context deadline on AlertNG service startup configurable [#96135](https://github.com/grafana/grafana/pull/96135), [@fayzal-g](https://github.com/fayzal-g)
- **MigrationAssistant:** Restrict dashboards, folders and datasources by the org id of the signed in user [#96345](https://github.com/grafana/grafana/pull/96345), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **User:** Check SignedInUser OrgID in RevokeInvite [#95490](https://github.com/grafana/grafana/pull/95490), [@mgyongyosi](https://github.com/mgyongyosi)
### Bug fixes
- **Alerting:** Fix escaping of silence matchers in utf8 mode [#95347](https://github.com/grafana/grafana/pull/95347), [@tomratcliffe](https://github.com/tomratcliffe)
- **Alerting:** Fix overflow for long receiver names [#95133](https://github.com/grafana/grafana/pull/95133), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Fix saving advanced mode toggle state in the alert rule editor [#95981](https://github.com/grafana/grafana/pull/95981), [@alexander-akhmetov](https://github.com/alexander-akhmetov)
- **Alerting:** Fix setting datasource uid, when datasource is string in old version [#96273](https://github.com/grafana/grafana/pull/96273), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Force refetch prom rules when refreshing panel [#96125](https://github.com/grafana/grafana/pull/96125), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Anonymous User:** Adds validator service for anonymous users [#94994](https://github.com/grafana/grafana/pull/94994), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Anonymous User:** Adds validator service for anonymous users (Enterprise)
- **Azure Monitor:** Support metric namespaces fallback [#95155](https://github.com/grafana/grafana/pull/95155), [@aangelisc](https://github.com/aangelisc)
- **Azure:** Fix duplicated traces in multi-resource trace query [#95247](https://github.com/grafana/grafana/pull/95247), [@aangelisc](https://github.com/aangelisc)
- **Azure:** Handle namespace request rejection [#95909](https://github.com/grafana/grafana/pull/95909), [@aangelisc](https://github.com/aangelisc)
- **CloudWatch:** Interpolate region in log context query [#94990](https://github.com/grafana/grafana/pull/94990), [@iwysiu](https://github.com/iwysiu)
- **Dashboard datasource:** Return annotations as series when query topic is "annotations" [#95971](https://github.com/grafana/grafana/pull/95971), [@kaydelaney](https://github.com/kaydelaney)
- **Dashboard:** Append orgId to URL [#95963](https://github.com/grafana/grafana/pull/95963), [@bfmatei](https://github.com/bfmatei)
- **Dashboards:** Fixes performance issue expanding a row [#95321](https://github.com/grafana/grafana/pull/95321), [@torkelo](https://github.com/torkelo)
- **Flame Graph:** Fix crash when it receives empty data [#96211](https://github.com/grafana/grafana/pull/96211), [@yincongcyincong](https://github.com/yincongcyincong)
- **Folders:** Add admin permissions upon creation of a folder w. SA [#95365](https://github.com/grafana/grafana/pull/95365), [@eleijonmarck](https://github.com/eleijonmarck)
- **Folders:** Don't show error pop-up if the user can't fetch the root folder [#95600](https://github.com/grafana/grafana/pull/95600), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Migration:** Remove table aliasing in delete statement to make it work for mariadb [#95232](https://github.com/grafana/grafana/pull/95232), [@kalleep](https://github.com/kalleep)
- **ServerLock:** Fix pg concurrency/locking issue [#95935](https://github.com/grafana/grafana/pull/95935), [@mgyongyosi](https://github.com/mgyongyosi)
- **Service Accounts:** Run service account creation in transaction [#94803](https://github.com/grafana/grafana/pull/94803), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Table:** Fix text wrapping applying to wrong field [#95425](https://github.com/grafana/grafana/pull/95425), [@codeincarnate](https://github.com/codeincarnate)
- **Unified Storage:** Use ssl_mode instead of sslmode [#95662](https://github.com/grafana/grafana/pull/95662), [@chaudyg](https://github.com/chaudyg)
<!-- 11.3.1 END -->
<!-- 11.3.0+security-01 START -->
# 11.3.0+security-01 (2024-11-12)
### Bug fixes
- **MigrationAssistant:** Fix Migration Assistant issue [CVE-2024-9476]
<!-- 11.3.0+security-01 END -->
<!-- 11.3.0 START -->
# 11.3.0 (2024-10-22)
### Features and enhancements
- **Alerting:** Add manage permissions UI logic for Contact Points [#92885](https://github.com/grafana/grafana/pull/92885), [@tomratcliffe](https://github.com/tomratcliffe)
- **Alerting:** Allow linking to silence form with `__alert_rule_uid__` value preset [#93526](https://github.com/grafana/grafana/pull/93526), [@tomratcliffe](https://github.com/tomratcliffe)
- **Alerting:** Hide query name when using simplified mode in the alert rule [#93779](https://github.com/grafana/grafana/pull/93779), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Limit and clean up old alert rules versions [#89754](https://github.com/grafana/grafana/pull/89754), [@igloo12](https://github.com/igloo12)
- **Alerting:** Style nits for the simple query mode [#93930](https://github.com/grafana/grafana/pull/93930), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Update texts in annotations step [#93977](https://github.com/grafana/grafana/pull/93977), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Use useProduceNewAlertmanagerConfiguration for contact points [#88456](https://github.com/grafana/grafana/pull/88456), [@gillesdemey](https://github.com/gillesdemey)
- **Auth:** Attach external session info to Grafana session [#93849](https://github.com/grafana/grafana/pull/93849), [@mgyongyosi](https://github.com/mgyongyosi)
- **Auth:** Replace jmespath/go-jmespath with jmespath-community/go-jmespath [#94203](https://github.com/grafana/grafana/pull/94203), [@mgyongyosi](https://github.com/mgyongyosi)
- **CloudMigrations:** Add support for migration of Library Elements (Panels) resources [#93898](https://github.com/grafana/grafana/pull/93898), [@macabu](https://github.com/macabu)
- **Cloudwatch:** Update grafana-aws-sdk [#94155](https://github.com/grafana/grafana/pull/94155), [@iwysiu](https://github.com/iwysiu)
- **Explore Logs:** Preinstall for onprem Grafana instances [#94221](https://github.com/grafana/grafana/pull/94221), [@svennergr](https://github.com/svennergr)
- **ExploreMetrics:** Ensure compatibility with Incremental Querying [#94355](https://github.com/grafana/grafana/pull/94355), [@NWRichmond](https://github.com/NWRichmond)
- **FieldConfig:** Add support for Actions [#92874](https://github.com/grafana/grafana/pull/92874), [@adela-almasan](https://github.com/adela-almasan)
- **Plugin Extensions:** Require meta-data to be defined in `plugin.json` during development mode [#93429](https://github.com/grafana/grafana/pull/93429), [@leventebalogh](https://github.com/leventebalogh)
- **Reporting:** Display template variables in the PDF (Enterprise)
- **Tempo:** Add deprecation notice for Aggregate By [#94050](https://github.com/grafana/grafana/pull/94050), [@joey-grafana](https://github.com/joey-grafana)
### Bug fixes
- **Alerting/Chore:** Fix TimeRangeInput not working across multiple months [#93622](https://github.com/grafana/grafana/pull/93622), [@tomratcliffe](https://github.com/tomratcliffe)
- **Alerting:** Fix default value for input in simple condition [#94248](https://github.com/grafana/grafana/pull/94248), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Fix eval interval not being saved when creating a new group [#93821](https://github.com/grafana/grafana/pull/93821), [@tomratcliffe](https://github.com/tomratcliffe)
- **Alerting:** Fix incorrect permission on POST external rule groups endpoint [CVE-2024-8118] [#93940](https://github.com/grafana/grafana/pull/93940), [@alexweav](https://github.com/alexweav)
- **Alerting:** Fix panics when attempting to create an Alertmanager after failing [#94023](https://github.com/grafana/grafana/pull/94023), [@santihernandezc](https://github.com/santihernandezc)
- **DashboardScene:** Fixes url issue with subpath when exiting edit mode [#93962](https://github.com/grafana/grafana/pull/93962), [@torkelo](https://github.com/torkelo)
- **Dashboards:** Enable scenes by default [#93818](https://github.com/grafana/grafana/pull/93818), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **Dashboards:** Fixes view & edit keyboard shortcuts when grafana is behind a subpath [#93955](https://github.com/grafana/grafana/pull/93955), [@torkelo](https://github.com/torkelo)
- **ElasticSearch:** Fix errorsource in newInstanceSettings [#93859](https://github.com/grafana/grafana/pull/93859), [@iwysiu](https://github.com/iwysiu)
- **Reporting:** Fix reports on multi-org instance (Enterprise)
- **SubMenu:** Fix expanding sub menu items on touch devices [#93208](https://github.com/grafana/grafana/pull/93208), [@yincongcyincong](https://github.com/yincongcyincong)
<!-- 11.3.0 END -->
<!-- 11.2.2 START -->
# 11.2.2 (2024-10-01)

View File

@@ -1,14 +1,19 @@
# syntax=docker/dockerfile:1
ARG BASE_IMAGE=alpine:3.19.1
# to maintain formatting of multiline commands in vscode, add the following to settings.json:
# "docker.languageserver.formatter.ignoreMultilineInstructions": true
ARG BASE_IMAGE=alpine:3.21
ARG JS_IMAGE=node:20-alpine
ARG JS_PLATFORM=linux/amd64
ARG GO_IMAGE=golang:1.23.1-alpine
ARG GO_IMAGE=golang:1.23.7-alpine
# Default to building locally
ARG GO_SRC=go-builder
ARG JS_SRC=js-builder
FROM --platform=${JS_PLATFORM} ${JS_IMAGE} as js-builder
# Javascript build stage
FROM --platform=${JS_PLATFORM} ${JS_IMAGE} AS js-builder
ENV NODE_OPTIONS=--max_old_space_size=8000
@@ -33,7 +38,8 @@ COPY emails emails
ENV NODE_ENV production
RUN yarn build
FROM ${GO_IMAGE} as go-builder
# Golang build stage
FROM ${GO_IMAGE} AS go-builder
ARG COMMIT_SHA=""
ARG BUILD_BRANCH=""
@@ -91,7 +97,8 @@ ENV BUILD_BRANCH=${BUILD_BRANCH}
RUN make build-go GO_BUILD_TAGS=${GO_BUILD_TAGS} WIRE_TAGS=${WIRE_TAGS}
FROM ${BASE_IMAGE} as tgz-builder
# From-tarball build stage
FROM ${BASE_IMAGE} AS tgz-builder
WORKDIR /tmp/grafana
@@ -103,8 +110,8 @@ COPY ${GRAFANA_TGZ} /tmp/grafana.tar.gz
RUN tar x -z -f /tmp/grafana.tar.gz --strip-components=1
# helpers for COPY --from
FROM ${GO_SRC} as go-src
FROM ${JS_SRC} as js-src
FROM ${GO_SRC} AS go-src
FROM ${JS_SRC} AS js-src
# Final stage
FROM ${BASE_IMAGE}
@@ -139,19 +146,20 @@ RUN if grep -i -q alpine /etc/issue; then \
fi
# glibc support for alpine x86_64 only
# docker run --rm --env STDOUT=1 sgerrand/glibc-builder 2.40 /usr/glibc-compat > glibc-bin-2.40.tar.gz
ARG GLIBC_VERSION=2.40
RUN if grep -i -q alpine /etc/issue && [ `arch` = "x86_64" ]; then \
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk \
-O /tmp/glibc-2.35-r0.apk && \
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk \
-O /tmp/glibc-bin-2.35-r0.apk && \
apk add --force-overwrite --no-cache /tmp/glibc-2.35-r0.apk /tmp/glibc-bin-2.35-r0.apk && \
rm -f /lib64/ld-linux-x86-64.so.2 && \
ln -s /usr/glibc-compat/lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \
rm -f /tmp/glibc-2.35-r0.apk && \
rm -f /tmp/glibc-bin-2.35-r0.apk && \
rm -f /lib/ld-linux-x86-64.so.2 && \
rm -f /etc/ld.so.cache; \
wget -qO- "https://dl.grafana.com/glibc/glibc-bin-$GLIBC_VERSION.tar.gz" | tar zxf - -C / \
usr/glibc-compat/lib/ld-linux-x86-64.so.2 \
usr/glibc-compat/lib/libc.so.6 \
usr/glibc-compat/lib/libdl.so.2 \
usr/glibc-compat/lib/libm.so.6 \
usr/glibc-compat/lib/libpthread.so.0 \
usr/glibc-compat/lib/librt.so.1 \
usr/glibc-compat/lib/libresolv.so.2 && \
mkdir /lib64 && \
ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 /lib64; \
fi
COPY --from=go-src /tmp/grafana/conf ./conf

View File

@@ -8,7 +8,7 @@ WIRE_TAGS = "oss"
include .bingo/Variables.mk
GO = go
GO_VERSION = 1.23.1
GO_VERSION = 1.23.7
GO_LINT_FILES ?= $(shell ./scripts/go-workspace/golangci-lint-includes.sh)
GO_TEST_FILES ?= $(shell ./scripts/go-workspace/test-includes.sh)
SH_FILES ?= $(shell find ./scripts -name *.sh)
@@ -300,7 +300,7 @@ test: test-go test-js ## Run all tests.
golangci-lint: $(GOLANGCI_LINT)
@echo "lint via golangci-lint"
$(GOLANGCI_LINT) run \
--config .golangci.toml \
--config .golangci.yml \
$(GO_LINT_FILES)
.PHONY: lint-go

View File

@@ -1,6 +1,6 @@
module github.com/grafana/grafana/apps/playlist
go 1.23.1
go 1.23.7
require (
github.com/grafana/grafana-app-sdk v0.19.0
@@ -24,10 +24,13 @@ require (
github.com/mailru/easyjson v0.7.7 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/rogpeppe/go-internal v1.13.1 // indirect
github.com/spf13/pflag v1.0.6 // indirect
github.com/stretchr/testify v1.10.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/text v0.18.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
golang.org/x/net v0.36.0 // indirect
golang.org/x/text v0.22.0 // indirect
google.golang.org/protobuf v1.36.4 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect

View File

@@ -48,14 +48,14 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRIccs7FGNTlIRMkT8wgtp5eCXdBlqhYGL6U=
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -69,8 +69,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo=
golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0=
golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -79,8 +79,8 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
@@ -89,8 +89,8 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=
google.golang.org/protobuf v1.36.4 h1:6A3ZDJHn/eNqc1i+IdefRzy/9PokBTPvcqMySR7NNIM=
google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

View File

@@ -1209,6 +1209,9 @@ enabled =
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
disabled_orgs =
# Specify how long to wait for the alerting service to initialize
initialization_timeout = 30s
# Specify the frequency of polling for admin config changes.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
admin_config_poll_interval = 60s

View File

@@ -1197,6 +1197,9 @@
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
;disabled_orgs =
# Specify how long to wait for the alerting service to initialize
;initialization_timeout = 30s
# Specify the frequency of polling for admin config changes.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;admin_config_poll_interval = 60s

View File

@@ -1,6 +1,6 @@
module high-card
go 1.22.4
go 1.23.7
require (
github.com/prometheus/client_golang v1.20.2
@@ -15,6 +15,6 @@ require (
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/sys v0.30.0 // indirect
google.golang.org/protobuf v1.34.2 // indirect
)

View File

@@ -20,7 +20,7 @@ github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0leargg
github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948 h1:kx6Ds3MlpiUHKj7syVnbp57++8WpuKPcR5yjLBjvLEA=
golang.org/x/exp v0.0.0-20240823005443-9b4947da3948/go.mod h1:akd2r19cwCdwSwWeIdzYQGa/EZZyqcOdwWiwj5L5eKQ=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
google.golang.org/protobuf v1.34.2 h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=
google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw=

View File

@@ -1,6 +0,0 @@
aks
eror
iam
wan
[Operato Windrose](https://grafana.com/grafana/plugins/operato-windrose-panel/)
sergent

View File

@@ -1,4 +1,6 @@
#!/bin/sh
# shellcheck disable=SC2034
#
# The source of this file is https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs.
# # `make-docs` procedure changelog
#
@@ -6,6 +8,26 @@
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
# Changes are relevant to this script and the support docs.mk GNU Make interface.
#
# ## 8.4.0 (2025-01-27)
#
# ### Fixed
#
# - Correct mount for the /docs/grafana-cloud/send-data/fleet-management/ project.
#
# ## 8.3.0 (2024-12-27)
#
# ### Added
#
# - Debug output of the final command when DEBUG=true.
#
# Useful to inspect if the script is correctly constructing the final command.
#
# ## 8.2.0 (2024-12-22)
#
# ### Removed
#
# - Special cases for Oracle and Datadog plugins now that they exist in the plugins monorepo.
#
# ## 8.1.0 (2024-08-22)
#
# ### Added
@@ -13,7 +35,7 @@
# - Additional website mounts for projects that use the website repository.
#
# Mounts are required for `make docs` to work in the website repository or with the website project.
# The Makefile is also mounted for convenient development of the procedure that repository.
# The Makefile is also mounted for convenient development of the procedure in that repository.
#
# ## 8.0.1 (2024-07-01)
#
@@ -290,6 +312,7 @@ PODMAN="$(if command -v podman >/dev/null 2>&1; then echo podman; else echo dock
if ! command -v curl >/dev/null 2>&1; then
if ! command -v wget >/dev/null 2>&1; then
# shellcheck disable=SC2016
errr 'either `curl` or `wget` must be installed for this script to work.'
exit 1
@@ -297,6 +320,7 @@ if ! command -v curl >/dev/null 2>&1; then
fi
if ! command -v "${PODMAN}" >/dev/null 2>&1; then
# shellcheck disable=SC2016
errr 'either `podman` or `docker` must be installed for this script to work.'
exit 1
@@ -343,6 +367,10 @@ EOF
exit 1
fi
# The following variables comprise a pseudo associative array of project names to source repositories.
# You only need to set a SOURCES variable if the project name does not match the source repository name.
# You can get a key identifier using the `identifier` function.
# To look up the value of any pseudo associative array, use the `aget` function.
SOURCES_as_code='as-code-docs'
SOURCES_enterprise_metrics='backend-enterprise'
SOURCES_enterprise_metrics_='backend-enterprise'
@@ -352,13 +380,16 @@ SOURCES_grafana_cloud_alerting_and_irm_slo='slo'
SOURCES_grafana_cloud_k6='k6-docs'
SOURCES_grafana_cloud_data_configuration_integrations='cloud-onboarding'
SOURCES_grafana_cloud_frontend_observability_faro_web_sdk='faro-web-sdk'
SOURCES_grafana_cloud_send_data_fleet_management='fleet-management'
SOURCES_helm_charts_mimir_distributed='mimir'
SOURCES_helm_charts_tempo_distributed='tempo'
SOURCES_opentelemetry='opentelemetry-docs'
SOURCES_plugins_grafana_datadog_datasource='datadog-datasource'
SOURCES_plugins_grafana_oracle_datasource='oracle-datasource'
SOURCES_resources='website'
# The following variables comprise a pseudo associative array of project names to versions.
# You only need to set a VERSIONS variable if it is not the default of 'latest'.
# You can get a key identifier using the `identifier` function.
# To look up the value of any pseudo associative array, use the `aget` function.
VERSIONS_as_code='UNVERSIONED'
VERSIONS_grafana_cloud='UNVERSIONED'
VERSIONS_grafana_cloud_alerting_and_irm_machine_learning='UNVERSIONED'
@@ -366,20 +397,21 @@ VERSIONS_grafana_cloud_alerting_and_irm_slo='UNVERSIONED'
VERSIONS_grafana_cloud_k6='UNVERSIONED'
VERSIONS_grafana_cloud_data_configuration_integrations='UNVERSIONED'
VERSIONS_grafana_cloud_frontend_observability_faro_web_sdk='UNVERSIONED'
VERSIONS_grafana_cloud_send_data_fleet_management='UNVERSIONED'
VERSIONS_opentelemetry='UNVERSIONED'
VERSIONS_plugins_grafana_datadog_datasource='latest'
VERSIONS_plugins_grafana_oracle_datasource='latest'
VERSIONS_resources='UNVERSIONED'
VERSIONS_technical_documentation='UNVERSIONED'
VERSIONS_website='UNVERSIONED'
VERSIONS_writers_toolkit='UNVERSIONED'
# The following variables comprise a pseudo associative array of project names to source repository paths.
# You only need to set a PATHS variable if it is not the default of 'docs/sources'.
# You can get a key identifier using the `identifier` function.
# To look up the value of any pseudo associative array, use the `aget` function.
PATHS_grafana_cloud='content/docs/grafana-cloud'
PATHS_helm_charts_mimir_distributed='docs/sources/helm-charts/mimir-distributed'
PATHS_helm_charts_tempo_distributed='docs/sources/helm-charts/tempo-distributed'
PATHS_mimir='docs/sources/mimir'
PATHS_plugins_grafana_datadog_datasource='docs/sources'
PATHS_plugins_grafana_oracle_datasource='docs/sources'
PATHS_resources='content'
PATHS_tempo='docs/sources/tempo'
PATHS_website='content'
@@ -631,7 +663,7 @@ POSIX_HERESTRING
case "${_project}" in
# Workaround for arbitrary mounts where the version field is expected to be the local directory
# and the repo field is expected to be the container directory.
# and the repo field is expected to be the container directory.
arbitrary)
echo "${_project}^${_version}^${_repo}^" # TODO
;;
@@ -801,10 +833,16 @@ case "${image}" in
| sed "s#$(proj_dst "${proj}")#sources#"
EOF
if [ -n "${DEBUG}" ]; then
debg "${cmd}"
fi
case "${OUTPUT_FORMAT}" in
human)
if ! command -v jq >/dev/null 2>&1; then
# shellcheck disable=SC2016
errr '`jq` must be installed for the `doc-validator` target to work.'
# shellcheck disable=SC2016
note 'To install `jq`, refer to https://jqlang.github.io/jq/download/,'
exit 1
@@ -837,6 +875,10 @@ EOF
/hugo/content/docs
EOF
if [ -n "${DEBUG}" ]; then
debg "${cmd}"
fi
case "${OUTPUT_FORMAT}" in
human)
${cmd} --output=line \

View File

@@ -4,7 +4,9 @@ aliases:
- /docs/grafana/v3.1/
- guides/reference/admin/
cascade:
LOKI_VERSION: latest
TEMPO_VERSION: latest
ONCALL_VERSION: latest
PYROSCOPE_VERSION: latest
description: Find answers to your technical questions and learn how to use Grafana OSS and Enterprise products.
keywords:

View File

@@ -14,23 +14,23 @@ weight: 900
You can create interactive links for Explore visualizations by setting up Correlations. These links can either run queries or generate external URLs related to presented data.
A correlation defines how data in one [data source]({{< relref "../../datasources" >}}) is used to query data in another data source or to generate an external URL.
A correlation defines how data in one [data source](../../datasources/) is used to query data in another data source or to generate an external URL.
Some examples:
- an application name returned in a logs data source can be used to query metrics related to that application in a metrics data source, or
- a user name returned by an SQL data source can be used to query logs related to that particular user in a logs data source
- a customer ID in a logs data source can link to a different platform that has a profile on that customer.
[Explore]({{< relref "../../explore" >}}) takes user-defined correlations to display links inside the visualizations.
If a correlation links to a query, you can click on that link to run the related query and see results in [Explore Split View]({{< relref "../../explore#split-and-compare" >}}).
[Explore](../../explore/) takes user-defined correlations to display links inside the visualizations.
If a correlation links to a query, you can click on that link to run the related query and see results in [Explore Split View](../../explore/#split-and-compare).
If a correlation links to an external URL, you can click on the link to open the URL in a new tab in your browser.
Explore visualizations that currently support showing links based on correlations:
- [Logs Panel]({{< relref "./use-correlations-in-visualizations#correlations-in-logs-panel">}})
- [Table]({{< relref "./use-correlations-in-visualizations#correlations-in-table">}})
- [Logs Panel](use-correlations-in-visualizations/#correlations-in-logs-panel)
- [Table](use-correlations-in-visualizations/#correlations-in-table)
You can configure correlations using [provisioning]({{< relref "../provisioning" >}}), the **Administration > Plugins and data > Correlations** page in Grafana or directly in [Explore]({{< relref "../../explore/correlations-editor-in-explore" >}}).
You can configure correlations using [provisioning](../provisioning/), the **Administration > Plugins and data > Correlations** page in Grafana or directly in [Explore](../../explore/correlations-editor-in-explore/).
## Example of how links work in Explore once set up

View File

@@ -12,7 +12,7 @@ weight: 30
## Before you begin
Adding access to create correlations for [Viewers and Editors]({{< relref "../../../administration/roles-and-permissions" >}}) is available with [Role-based access control]({{< relref "../../../administration/roles-and-permissions/access-control" >}}).
Adding access to create correlations for [Viewers and Editors](../../roles-and-permissions/) is available with [Role-based access control](../../roles-and-permissions/access-control/).
## Add permissions to create correlations

View File

@@ -29,13 +29,13 @@ Each correlation is configured with the following options:
**Transformations**
: Optional manipulations to the source data included passed to the target query
Learn how to create correlations using the [Administration page]({{< relref "./create-a-new-correlation#create-a-correlation-in-administration-page" >}}) or with [provisioning]({{< relref "./create-a-new-correlation#create-a-correlation-with-provisioning" >}}).
Learn how to create correlations using the [Administration page](../create-a-new-correlation/#create-a-correlation-in-administration-page) or with [provisioning](../create-a-new-correlation/#create-a-correlation-with-provisioning).
## Source data source and result field
Links are shown in Explore visualizations for the results from the correlations source data source.
A link is assigned to one of the fields from the result provided in the correlation configuration (the results field).
Each visualization displays fields with links in a different way ([Correlations in Logs Panel]({{< relref "./use-correlations-in-visualizations#correlations-in-logs-panel">}}) and see [Correlations in Table]({{< relref "./use-correlations-in-visualizations#correlations-in-table">}})).
Each visualization displays fields with links in a different way ([Correlations in Logs Panel](../use-correlations-in-visualizations/#correlations-in-logs-panel) and see [Correlations in Table](../use-correlations-in-visualizations/#correlations-in-table)).
## Target query
@@ -44,10 +44,10 @@ The target query is run when a link is clicked in the visualization. You can use
### Correlation Variables
You can use variables inside the target query to access the source data related to the query.
Correlations use [Grafana variable syntax]({{< relref "../../../dashboards/variables/variable-syntax" >}}).
Correlations use [Grafana variable syntax](../../../dashboards/variables/variable-syntax/).
Variables are filled with values from the source results when the link is clicked. There are two types of variables you can use:
- [field variables]({{< relref "../../../panels-visualizations/configure-data-links#field-variables" >}}) (allows to access field values and labels)
- [field variables](../../../panels-visualizations/configure-data-links/#field-variables) (allows to access field values and labels)
- correlation variables (allows to access field values and transformations)
Example: If source results contain a field called “employee”, the value of the field can be accessed with:
@@ -57,9 +57,9 @@ Example: If source results contain a field called “employee”, the value of t
In addition to mapping field values to shorter variable names, more correlation variables can be created by applying transformations to existing fields
For more details, please see the example in [Use variables and transformations in a correlation]({{< relref "./use-variables-and-transformations" >}}).
For more details, please see the example in [Use variables and transformations in a correlation](../use-variables-and-transformations/).
Correlation creates a data link only if all variables have values in the selected data row. [Global variables]({{< relref "/docs/grafana/latest/dashboards/variables/add-template-variables#global-variables" >}}) are exception to this rule and are not required to be filled in from the returned data. These variables are interpolated automatically by data sources.
Correlation creates a data link only if all variables have values in the selected data row. [Global variables](/docs/grafana/latest/dashboards/variables/add-template-variables/#global-variables) are exception to this rule and are not required to be filled in from the returned data. These variables are interpolated automatically by data sources.
### Correlation Transformations
@@ -69,7 +69,7 @@ There are two types of transformations: logfmt and regular expression.
Each transformation uses a selected field value as the input. The output of a transformation is a set of new variables based on the type and options of the transformation.
For more details, please see the example in [Use variables and transformations in a correlation]({{< relref "./use-variables-and-transformations" >}}) for more details.
For more details, please see the example in [Use variables and transformations in a correlation](../use-variables-and-transformations/) for more details.
### Logfmt transformation

View File

@@ -9,11 +9,11 @@ weight: 20
# Permissions
Users with [Viewer base role]({{< relref "../../../administration/roles-and-permissions" >}}) or with [datasources:query RBAC role]({{< relref "../../../administration/roles-and-permissions/access-control" >}}) can:
Users with [Viewer base role](../../roles-and-permissions/) or with [datasources:query RBAC role](../../roles-and-permissions/access-control/) can:
- Use correlations in Explores visualizations.
- List all available correlations in read-only mode.
Users with [Admin base role]({{< relref "../../../administration/roles-and-permissions" >}}) or with [datasources:write RBAC role]({{< relref "../../../administration/roles-and-permissions/access-control" >}}) can:
Users with [Admin base role](../../roles-and-permissions/) or with [datasources:write RBAC role](../../roles-and-permissions/access-control/) can:
- Add, edit and delete correlations.

View File

@@ -15,7 +15,7 @@ Make sure you have permission to add new correlations. Only users with write per
## Create a correlation in Explore's correlations editor
To learn more, refer to Explore's [documentation]({{< relref "../../../explore/correlations-editor-in-explore" >}}) about building correlations in Explore.
To learn more, refer to Explore's [documentation](../../../explore/correlations-editor-in-explore/) about building correlations in Explore.
## Create a correlation in Administration page

View File

@@ -27,7 +27,7 @@ weight: 70
1. Open Explore.
1. Select a data source that you chose as the source data source of the correlation.
1. Run a query that results in data containing fields required to build variables in the target query.
1. Links are added to cell rows in the column representing the field with the assigned link ([the results field]({{< relref "../correlation-configuration#source-data-source-and-result-field" >}}).
1. Links are added to cell rows in the column representing the field with the assigned link ([the results field](../correlation-configuration/#source-data-source-and-result-field).
1. Cells containing multiple links accessible with a context menu.
{{< figure src="/static/img/docs/correlations/correlations-in-table-10-0.png" max-width="600px" caption="Correlations links in table" >}}

View File

@@ -73,7 +73,7 @@ Instructions below show how to set up a link that can run metrics query for the
- Required correlation type (query)
- Target query matching test data source model
- “App metrics” correlation contains the following configuration:
- Alias is set to ${application} variable (note that in provisioning files $ is used to access environment variables so it has to be [escaped]({{< relref "../../../administration/provisioning#using-environment-variables" >}})).
- Alias is set to ${application} variable (note that in provisioning files $ is used to access environment variables so it has to be [escaped](../../provisioning/#using-environment-variables)).
- Regular expression transformation is created to extract values from “msg” field
- Regular expression transformation is used to capture the application name from the full name of the service stored in the log line.
- The output of the transformation is mapped to a variable called “application”.

View File

@@ -18,10 +18,10 @@ weight: 100
# Data source management
Grafana supports many different storage backends for your time series data (data source).
Refer to [data sources]({{< relref "../../datasources" >}}) for more information about using data sources in Grafana.
Refer to [data sources](../../datasources/) for more information about using data sources in Grafana.
Only users with the organization admin role can add data sources.
For links to data source-specific documentation, see [Data sources]({{< relref "../../datasources" >}}).
For links to data source-specific documentation, see [Data sources](../../datasources/).
## Data source permissions
@@ -32,7 +32,7 @@ You can configure data source permissions to allow or deny certain users the abi
- The `admin` permission allows users to query and edit the data source, change permissions on the data source and enable or disable query caching for the data source.
{{% admonition type="note" %}}
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
Available in [Grafana Enterprise](../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
{{% /admonition %}}
By default, data sources in an organization can be queried by any user in that organization. For example, a user with the `Viewer` role can issue any possible query to a data source, not just queries that exist on dashboards to which they have access. Additionally, by default, data sources can be edited by the user who created the data source, as well as users with the `Admin` role.
@@ -80,10 +80,10 @@ When you enable query and resource caching, Grafana temporarily stores the resul
When using Grafana, a query pertains to a request for data frames to be modified or displayed. A resource relates to any HTTP requests made by a plugin, such as the Amazon Timestream plugin requesting a list of available databases from AWS. For more information on data source queries and resources, please see the developers page on [backend plugins](https://grafana.com/developers/plugin-tools/key-concepts/backend-plugins/).
The caching feature works for **all** backend data sources. You can enable the cache globally in Grafana's [configuration]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}), and configure a cache duration (also called Time to Live, or TTL) for each data source individually.
The caching feature works for **all** backend data sources. You can enable the cache globally in Grafana's [configuration](../../setup-grafana/configure-grafana/enterprise-configuration/#caching), and configure a cache duration (also called Time to Live, or TTL) for each data source individually.
{{% admonition type="note" %}}
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud/).
Available in [Grafana Enterprise](../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud/).
{{% /admonition %}}
The following cache backend options are available: in-memory, Redis, and Memcached.
@@ -94,9 +94,9 @@ Storing cached queries in-memory can increase Grafana's memory footprint. In pro
When a panel queries a data source with cached data, it will either fetch fresh data or use cached data depending on the panel's **interval.** The interval is used to round the query time range to a nearby cached time range, increasing the likelihood of cache hits. Therefore, wider panels and dashboards with shorter time ranges fetch new data more often than narrower panels and dashboards with longer time ranges.
A panel's interval is visible in the [query options]({{< relref "../../panels-visualizations/query-transform-data/" >}}). It is calculated as follows: `time range / max data points`. Max data points are calculated based on the width of the panel. For example, a wide panel with `1000 data points` on a dashboard with a time range of `last 7 days` will retrieve fresh data every 10 minutes: `7d / 1000 = 10m`. In this example, cached data for this panel will be served for up to 10 minutes before Grafana needs to query the data source again for new data.
A panel's interval is visible in the [query options](../../panels-visualizations/query-transform-data/). It is calculated as follows: `time range / max data points`. Max data points are calculated based on the width of the panel. For example, a wide panel with `1000 data points` on a dashboard with a time range of `last 7 days` will retrieve fresh data every 10 minutes: `7d / 1000 = 10m`. In this example, cached data for this panel will be served for up to 10 minutes before Grafana needs to query the data source again for new data.
You can configure a panel to retrieve data more often by increasing the **Max data points** setting in the panel's [query options]({{< relref "../../panels-visualizations/query-transform-data/" >}}).
You can configure a panel to retrieve data more often by increasing the **Max data points** setting in the panel's [query options](../../panels-visualizations/query-transform-data/).
### Caching benefits
@@ -108,7 +108,7 @@ By reducing the number of queries and requests sent to data sources, caching can
### Data sources that work with query caching
Query caching works for Grafana's [built-in data sources]({{< relref "../../datasources/#built-in-core-data-sources" >}}), and [backend data source plugins](https://grafana.com/grafana/plugins/?type=datasource) that extend the `DataSourceWithBackend` class in the plugins SDK.
Query caching works for Grafana's [built-in data sources](../../datasources/#built-in-core-data-sources), and [backend data source plugins](https://grafana.com/grafana/plugins/?type=datasource) that extend the `DataSourceWithBackend` class in the plugins SDK.
To verify that a data source works with query caching, follow the [instructions below](#enable-and-configure-query-caching) to **Enable and Configure query caching**. If caching is enabled in Grafana but the Caching tab is not visible for the given data source, then query caching is not available for that data source.
@@ -118,7 +118,7 @@ Some data sources, such as Elasticsearch, Prometheus, and Loki, cache queries th
### Enable and configure query caching
You must be an Org admin or Grafana admin to enable query caching for a data source. For more information on Grafana roles and permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/" >}}).
You must be an Org admin or Grafana admin to enable query caching for a data source. For more information on Grafana roles and permissions, refer to [About users and permissions](../roles-and-permissions/).
By default, data source queries are not cached. To enable query caching for a single data source:
@@ -137,7 +137,7 @@ You can optionally override a data source's configured TTL for individual dashbo
If query caching is enabled and the Cache tab is not visible in a data source's settings, then query caching is not available for that data source.
{{% /admonition %}}
To configure global settings for query caching, refer to the `caching` section of [Configure Grafana Enterprise]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}).
To configure global settings for query caching, refer to the `caching` section of [Configure Grafana Enterprise](../../setup-grafana/configure-grafana/enterprise-configuration/#caching).
### Disable query caching
@@ -148,7 +148,7 @@ To disable query caching for a single data source:
1. In the data source list, click the data source that you want to turn off caching for.
1. On the Cache tab, click **Disable**.
To disable query caching for an entire Grafana instance, set the `enabled` flag to `false` in the `caching` section of [Configure Grafana Enterprise]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}). You will no longer see the Cache tab on any data sources, and no data source queries will be cached.
To disable query caching for an entire Grafana instance, set the `enabled` flag to `false` in the `caching` section of [Configure Grafana Enterprise](../../setup-grafana/configure-grafana/enterprise-configuration/#caching). You will no longer see the Cache tab on any data sources, and no data source queries will be cached.
### Clear cache

View File

@@ -15,6 +15,8 @@ weight: 250
LBAC for data sources is available in private preview on Grafana Cloud for Loki created with basic authentication. Loki data sources for LBAC for data sources can only be created, provisioning is currently not available.
You cannot configure LBAC rules for Grafana-provisioned data sources from the UI. Alternatively, you can replicate the setting of the provisioned data source in a new data source as described in [LBAC Configuration for New Loki Data Source](https://grafana.com/docs/grafana/latest/administration/data-source-management/teamlbac/configure-teamlbac-for-loki/#task-1-lbac-configuration-for-new-loki-data-source) and then add the LBAC configuration to the new data source.
## Before you begin
To be able to use LBAC for data sources rules, you need to enable the feature toggle `teamHttpHeaders` on your Grafana instance. Contact support to enable the feature toggle for you.

View File

@@ -23,11 +23,11 @@ weight: 500
# Grafana Enterprise license
When you become a Grafana Enterprise customer, you gain access to Grafana's premium observability features, including enterprise data source plugins, reporting, and role-based access control. In order to use these [enhanced features of Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise" >}}), you must purchase and activate a Grafana Enterprise license.
When you become a Grafana Enterprise customer, you gain access to Grafana's premium observability features, including enterprise data source plugins, reporting, and role-based access control. In order to use these [enhanced features of Grafana Enterprise](../../introduction/grafana-enterprise/), you must purchase and activate a Grafana Enterprise license.
To purchase a license directly from Grafana Labs, [Contact a Grafana Labs representative](/contact?about=grafana-enterprise). To activate an Enterprise license purchased from Grafana Labs, refer to [Activate an Enterprise license]({{< relref "#activate-an-enterprise-license" >}}).
To purchase a license directly from Grafana Labs, [Contact a Grafana Labs representative](/contact?about=grafana-enterprise). To activate an Enterprise license purchased from Grafana Labs, refer to [Activate an Enterprise license](#activate-an-enterprise-license).
You can also purchase a Grafana Enterprise license through the AWS Marketplace. To learn more about activating a license purchased through AWS, refer to [Activate a Grafana Enterprise license purchased through AWS Marketplace]({{< relref "./activate-aws-marketplace-license/" >}}).
You can also purchase a Grafana Enterprise license through the AWS Marketplace. To learn more about activating a license purchased through AWS, refer to [Activate a Grafana Enterprise license purchased through AWS Marketplace](activate-aws-marketplace-license/).
{{< section >}}
@@ -94,9 +94,9 @@ environment variable.
### Step 3. Ensure that the license file's root URL matches the root_url configuration option
Update the [`root_url`]({{< relref "../../setup-grafana/configure-grafana/#root_url" >}}) in your configuration. It should be the URL that users type in their browsers to access the frontend, not the node hostname(s).
Update the [`root_url`](../../setup-grafana/configure-grafana/#root_url) in your configuration. It should be the URL that users type in their browsers to access the frontend, not the node hostname(s).
This is important, because as part of the validation checks at startup, Grafana compares the license URL to the [`root_url`]({{< relref "../../setup-grafana/configure-grafana/#root_url" >}}) in your configuration.
This is important, because as part of the validation checks at startup, Grafana compares the license URL to the [`root_url`](../../setup-grafana/configure-grafana/#root_url) in your configuration.
In your configuration file:
@@ -113,7 +113,7 @@ GF_SERVER_ROOT_URL=https://grafana.example.com/
### Step 4. Restart Grafana
To finalize the installation of Grafana Enterprise, restart Grafana to enable all Grafana Enterprise features. Refer to [restart Grafana]({{< relref "../../setup-grafana/start-restart-grafana/" >}}) for more information.
To finalize the installation of Grafana Enterprise, restart Grafana to enable all Grafana Enterprise features. Refer to [restart Grafana](../../setup-grafana/start-restart-grafana/) for more information.
## License expiration
@@ -123,7 +123,7 @@ If your license has expired, most of Grafana keeps working as normal. Some enter
### Update your license
1. Locate your current `license.jwt` file. In a standard installation it is stored inside the Grafana data directory, which on a typical Linux installation is in `/var/lib/grafana/data`. This location might be overridden in the ini file [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}).
1. Locate your current `license.jwt` file. In a standard installation it is stored inside the Grafana data directory, which on a typical Linux installation is in `/var/lib/grafana/data`. This location might be overridden in the ini file [Configuration](../../setup-grafana/configure-grafana/).
```ini
[enterprise]
@@ -135,7 +135,7 @@ If your license has expired, most of Grafana keeps working as normal. Some enter
2. Log in to your [Grafana Cloud Account](/login) and make sure you're in the correct organization in the dropdown at the top of the page.
3. Under the **Grafana Enterprise** section in the menu bar to the left, choose licenses and download the currently valid license with which you want to run Grafana. If you cannot see a valid license on Grafana.com, please contact your account manager at Grafana Labs to renew your subscription.
4. Replace the current `license.jwt`-file with the one you've just downloaded.
5. [Restart Grafana]({{< relref "../../setup-grafana/start-restart-grafana/" >}}).
5. [Restart Grafana](../../setup-grafana/start-restart-grafana/).
### If your license expires
@@ -244,11 +244,11 @@ Your license is controlled by the following rules:
**License expiration date:** The license includes an expiration date, which is the date when a license becomes inactive.
As the license expiration date approaches, you will see a banner in Grafana that encourages you to renew. To learn about how to renew your license and what happens in Grafana when a license expires, refer to [License expiration]({{< relref "#license-expiration" >}}).
As the license expiration date approaches, you will see a banner in Grafana that encourages you to renew. To learn about how to renew your license and what happens in Grafana when a license expires, refer to [License expiration](#license-expiration).
**Grafana License URL:** Your license does not work with an instance of Grafana with a different root URL.
The License URL is the complete URL of your Grafana instance, for example `https://grafana.your-company.com/`. It is defined in the [root_url]({{< relref "../../setup-grafana/configure-grafana/#root_url" >}}) configuration setting.
The License URL is the complete URL of your Grafana instance, for example `https://grafana.your-company.com/`. It is defined in the [root_url](../../setup-grafana/configure-grafana/#root_url) configuration setting.
**Concurrent sessions limit**: As of Grafana Enterprise 7.5, users can initiate up to three concurrent sessions of Grafana.
@@ -256,14 +256,24 @@ The system creates a session when a user signs in to Grafana from a new device,
When a user reaches the session limit, the fourth connection succeeds and the longest inactive session is signed out.
### Request usage billing
You can request Grafana Labs to activate usage billing which allows an unlimited number of active users. When usage billing is enabled, Grafana does not enforce active user limits or display warning banners. Instead, you are charged for active users that exceed the limit, according to your customer contract.
Usage billing involves a contractual agreement between you and Grafana Labs, and it is only available if Grafana Enterprise is configured to [automatically refresh its license token]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#auto_refresh_license" >}}).
### Request a change to your license
To increase the number of licensed users within Grafana, extend a license, or change your licensed URL, contact [Grafana support](/profile/org#support) or your Grafana Labs account team. They will update your license, which you can activate from within Grafana.
For instructions about how to activate your license after it is updated, refer to [Activate an Enterprise license]({{< relref "#activate-an-enterprise-license" >}}).
For instructions about how to activate your license after it is updated, refer to [Activate an Enterprise license](#activate-an-enterprise-license).
## Usage billing
Standard Grafana Enterprise licenses include a certain number of seats that can be used, and prevent more users logging into Grafana than have been licensed. This makes sense if you prefer a predictable bill. It can however be a problem if you anticipate uneven usage patterns over time or when it's critical that no user ever be prevented from logging into Grafana due to capacity constraints.
For those use-cases we support usage-based billing, where your license includes a certain number of included users and you are billed on a monthly basis for any excess active users during the month.
Usage billing involves a contractual agreement between you and Grafana Labs and an update to your license, and it is only available if Grafana Enterprise version 10.0.0 or higher is configured to [automatically refresh its license token](../../setup-grafana/configure-grafana/enterprise-configuration/#auto_refresh_license).
### User deduplication
If your organization has multiple Grafana Enterprise instances with usage billing enabled, then each active user counts only once toward your license, regardless of how many instances that user signs into. Each Grafana Enterprise instance submits a hashed list of users to Grafana Labs via API every day. Each user email address or anonymous device ID is hashed using a one-way sha256 algorithm, and submitted to Grafana where the hashed users are deduplicated across instances.
### Request usage billing
To request usage billing, contact your Grafana Labs account team or [submit a support ticket](https://grafana.com/profile/org#support).

View File

@@ -30,7 +30,7 @@ You can deploy Grafana Enterprise in the following ways:
- Using AWS services like ECS, EKS or EC2.
- In an instance outside AWS.
In each case, you must activate the Grafana Enterprise license purchased in AWS Marketplace to take advantage of Grafana Enterprise observability features. Grafana Enterprise licenses purchased through AWS Marketplace are subject to the same [restrictions]({{< relref "../#license-restrictions" >}}) as Grafana Enterprise licensed purchased directly from Grafana Labs.
In each case, you must activate the Grafana Enterprise license purchased in AWS Marketplace to take advantage of Grafana Enterprise observability features. Grafana Enterprise licenses purchased through AWS Marketplace are subject to the same [restrictions](../#license-restrictions) as Grafana Enterprise licensed purchased directly from Grafana Labs.
> To purchase a license directly from Grafana Labs or learn more about other Grafana offerings, [Contact a Grafana Labs representative](/contact?about=grafana-enterprise).

View File

@@ -35,9 +35,9 @@ To activate your license, complete the following tasks.
For more information about deploying an application on Amazon ECS, refer to [Creating an Amazon ECS service](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-service.html).
1. As you create the Amazon ECS service, use the Grafana Enterprise version 8.3.0 or later container image.
1. As you create the Amazon ECS service, use the intended Grafana Enterprise container image version.
For example, enter `grafana/grafana-enterprise:8.3.3`.
For example, enter `grafana/grafana-enterprise:11.3.0`.
> Only Grafana Enterprise versions 8.3.0 and later support licenses granted through AWS Marketplace.
@@ -48,7 +48,7 @@ Grafana requires that you configure a database to hold dashboards, users, and ot
### Before you begin
- Ensure that you have a supported Grafana database available.
- For a list of supported databases, refer to [Supported databases]({{< relref "../../../../setup-grafana/installation/#supported-databases" >}}).
- For a list of supported databases, refer to [Supported databases](../../../../setup-grafana/installation/#supported-databases).
- For information about creating a database, refer to [Creating an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateDBInstance.html).
- Review the information required to connect to the RDS DB instance. For more information, refer to [Connecting to an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_CommonTasks.Connect.html).
@@ -56,7 +56,7 @@ To configure Grafana for high availability:
1. In AWS ECS, use environment variables to update the `database` parameters.
For a list of database parameters, refer to [Configuration]({{< relref "../../../../setup-grafana/configure-grafana/#database" >}}).
For a list of database parameters, refer to [Configuration](../../../../setup-grafana/configure-grafana/#database).
1. Create a revision of the task definition for the ECS Task that runs Grafana Enterprise.
@@ -114,4 +114,4 @@ In this task you configure Grafana Enterprise to validate the license with AWS i
1. To restart Grafana and activate your license, update the service running Grafana to use the latest revision of the task definition that you created.
1. After you update the service, navigate to your Grafana instance, sign in with Grafana Admin credentials, and navigate to **Administration > General > Stats and license** to validate that your license is active.
For more information about validating that your license is active, refer to [Grafana Enterprise license restrictions]({{< relref "../../#grafana-enterprise-license-restrictions" >}}).
For more information about validating that your license is active, refer to [Grafana Enterprise license restrictions](../../#grafana-enterprise-license-restrictions).

View File

@@ -20,7 +20,7 @@ weight: 200
# Activate a Grafana Enterprise license from AWS Marketplace on EKS
If you have purchased a Grafana Enterprise subscription through AWS Marketplace, you must activate it in order to use Grafana Enterprise data source plugins and features in Grafana.
If you have purchased a Grafana Enterprise subscription through AWS Marketplace, you must activate it to use Grafana Enterprise data source plugins and features in Grafana.
## Before you begin:
@@ -37,9 +37,9 @@ To activate your license, complete the following tasks:
For more information about installing Grafana on Kubernetes using the Helm Chart, refer to the [Grafana Helm Chart](https://github.com/grafana/helm-charts/tree/main/charts/grafana#readme).
1. Use `kubectl set image deployment/my-release grafana=grafana/grafana-enterprise:<version>` to update the container image to Grafana Enterprise version 8.3.0 or later.
1. Use `kubectl set image deployment/my-release grafana=grafana/grafana-enterprise:<version>` to update the container image.
For example, enter `grafana/grafana-enterprise:8.3.3`.
For example, enter `grafana/grafana-enterprise:11.3.0`.
> Only Grafana Enterprise versions 8.3.0 and later support licenses granted through AWS Marketplace.
@@ -50,7 +50,7 @@ Grafana requires that you configure a database to hold dashboards, users, and ot
### Before you begin
- Ensure that you have a supported Grafana database available.
- For a list of supported databases, refer to [Supported databases]({{< relref "../../../../setup-grafana/installation/#supported-databases" >}}).
- For a list of supported databases, refer to [Supported databases](../../../../setup-grafana/installation/#supported-databases).
- For information about creating a database, refer to [Creating an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateDBInstance.html).
- Review the information required to connect to the RDS DB instance. For more information, refer to [Connecting to an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_CommonTasks.Connect.html).
@@ -82,7 +82,7 @@ To configure Grafana for high availability, choose **one** of the following opti
value: [database password]
```
For more information on Grafana High Availability setup, refer to [Set up Grafana for high availability]({{< relref "../../../../setup-grafana/set-up-for-high-availability/" >}}).
For more information on Grafana High Availability setup, refer to [Set up Grafana for high availability](../../../../setup-grafana/set-up-for-high-availability/).
## Task 3: Configure Grafana Enterprise to validate its license with AWS
@@ -99,7 +99,7 @@ In this task, you configure Grafana Enterprise to validate the license with AWS
For more information about AWS license permissions, refer to [Actions, resources, and condition keys for AWS License Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awslicensemanager.html).
1. Choose **one** of the following options to update the [license_validation_type]({{< relref "../../../../setup-grafana/configure-grafana/enterprise-configuration/#license_validation_type" >}}) configuration to `aws`:
1. Choose **one** of the following options to update the [license_validation_type](../../../../setup-grafana/configure-grafana/enterprise-configuration/#license_validation_type) configuration to `aws`:
- **Option 1:** Use `kubectl edit configmap grafana` to edit `grafana.ini` add the following section to the configuration:
@@ -125,6 +125,6 @@ To restart Grafana on a Kubernetes cluster,
1. After you update the service, navigate to your Grafana instance, sign in with Grafana Admin credentials, and navigate to **Administration > General > Stats and license** to validate that your license is active.
For more information about restarting Grafana, refer to [Restart Grafana]({{< relref "../../../../setup-grafana/start-restart-grafana/" >}}).
For more information about restarting Grafana, refer to [Restart Grafana](../../../../setup-grafana/start-restart-grafana/).
> If you experience issues when you update the EKS cluster, refer to [Amazon EKS troubleshooting](https://docs.aws.amazon.com/eks/latest/userguide/troubleshooting.html).

View File

@@ -35,9 +35,9 @@ To activate a Grafana Enterprise license from AWS on a Grafana Enterprise instan
To install Grafana, refer to the documentation specific to your implementation.
- [Install Grafana]({{< relref "../../../../setup-grafana/installation/" >}}).
- [Run Grafana Docker image]({{< relref "../../../../setup-grafana/installation/docker/" >}}).
- [Deploy Grafana on Kubernetes]({{< relref "../../../../setup-grafana/installation/kubernetes/#deploy-grafana-enterprise-on-kubernetes" >}}).
- [Install Grafana](../../../../setup-grafana/installation/).
- [Run Grafana Docker image](../../../../setup-grafana/installation/docker/).
- [Deploy Grafana on Kubernetes](../../../../setup-grafana/installation/kubernetes/#deploy-grafana-enterprise-on-kubernetes).
## Task 2: Create an AWS IAM user with access to your Grafana Enterprise license
@@ -110,7 +110,7 @@ To retrieve your license, Grafana Enterprise requires access to your AWS account
In this task you configure Grafana Enterprise to validate the license with AWS instead of Grafana Labs.
Choose one of the following options to update the [license_validation_type]({{< relref "../../../../setup-grafana/configure-grafana/enterprise-configuration/#license_validation_type" >}}) configuration to `aws`:
Choose one of the following options to update the [license_validation_type](../../../../setup-grafana/configure-grafana/enterprise-configuration/#license_validation_type) configuration to `aws`:
- **Option 1:** In the `[enterprise]` section of the grafana.ini configuration file, add `license_validation_type=aws`.
@@ -131,4 +131,4 @@ Choose one of the following options to update the [license_validation_type]({{<
To activate Grafana Enterprise features, start (or restart) Grafana.
For information about restarting Grafana, refer to [Restart Grafana]({{< relref "../../../../setup-grafana/start-restart-grafana/" >}}).
For information about restarting Grafana, refer to [Restart Grafana](../../../../setup-grafana/start-restart-grafana/).

View File

@@ -42,4 +42,4 @@ You can use AWS Marketplace to make the following modifications to your Grafana
This action retrieves updated license information from AWS.
> To learn more about licensing and active users, refer to [Activate a Grafana Enterprise license purchased through AWS Marketplace]({{< relref "../" >}}).
> To learn more about licensing and active users, refer to [Activate a Grafana Enterprise license purchased through AWS Marketplace](../).

View File

@@ -19,7 +19,7 @@ For detailed information about particular features and how they operate, refer t
## Manage feature toggles
In the **Administration** page, the **Feature Management** section enables authorized users to view and edit the various features that are active in their Grafana environment.
Authorized users include administrators, and users with the [fixed roles]({{< relref "../roles-and-permissions/access-control#fixed-roles" >}}) `featuremgmt.read` and `featuremgmt.write`.
Authorized users include administrators, and users with the [fixed roles](../roles-and-permissions/access-control/#fixed-roles) `featuremgmt.read` and `featuremgmt.write`.
There are different options for visibility and customization depending on the development stage of the feature.

View File

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

View File

@@ -20,9 +20,9 @@ Grafana preferences are basic settings. They control the Grafana UI theme, home
Preferences are sometimes confusing because they can be set at four different levels, listed from highest level to lowest:
- **Server -** Affects all users on the Grafana server. Set by a [Grafana server admin]({{< relref "../roles-and-permissions/#grafana-server-administrators" >}}).
- **Organization -** Affects all users in an organization. Set by an [Organization admin]({{< relref "../roles-and-permissions/#organization-roles" >}}).
- **Team -** Affects all users assigned to a team. Set by an Organization Admin or Team Admin. To learn more about these roles, refer to [Teams and permissions]({{< relref "../roles-and-permissions/#teams-and-permissions" >}}).
- **Server -** Affects all users on the Grafana server. Set by a [Grafana server admin](../roles-and-permissions/#grafana-server-administrators).
- **Organization -** Affects all users in an organization. Set by an [Organization admin](../roles-and-permissions/#organization-roles).
- **Team -** Affects all users assigned to a team. Set by an Organization Admin or Team Admin. To learn more about these roles, refer to [Teams and permissions](../roles-and-permissions/#teams-and-permissions).
- **User account -** Affects the individual user. Set by the user on their own account.
The lowest level always takes precedence. For example, if a user sets their theme to **Light**, then their visualization of Grafana displays the light theme. Nothing at any higher level can override that.
@@ -33,7 +33,7 @@ If the user is aware of the change and intended it, then that's great! But if th
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.
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions]({{< relref "../roles-and-permissions/" >}}).
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions](../roles-and-permissions/).
### Change organization name
@@ -75,13 +75,13 @@ To change the team name or email, follow these steps:
### Change user name or email
To learn how to edit your user information, refer to [Edit your profile]({{< relref "../user-management/user-preferences/#edit-your-profile" >}}).
To learn how to edit your user information, refer to [Edit your profile](../user-management/user-preferences/#edit-your-profile).
## Change Grafana UI theme
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.
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions]({{< relref "../roles-and-permissions/" >}}).
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions](../roles-and-permissions/).
### Theme options
@@ -105,9 +105,9 @@ Here is an example of the light theme.
### Change server UI theme
As a Grafana server administrator, you can change the default Grafana UI theme for all users who are on the server by setting the [default_theme]({{< relref "../../setup-grafana/configure-grafana/#default_theme" >}}) option in the Grafana configuration file.
As a Grafana server administrator, you can change the default Grafana UI theme for all users who are on the server by setting the [default_theme](../../setup-grafana/configure-grafana/#default_theme) option in the Grafana configuration file.
To see what the current settings are, refer to [View server settings]({{< relref "../stats-and-license#view-server-settings" >}}).
To see what the current settings are, refer to [View server settings](../stats-and-license/#view-server-settings).
### Change organization UI theme
@@ -141,11 +141,11 @@ You can change the UI theme for your user account. This setting overrides UI the
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.
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions]({{< relref "../roles-and-permissions/" >}}).
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions](../roles-and-permissions/).
### Set server timezone
Grafana server administrators can choose a default timezone for all users on the server by setting the [default_timezone]({{< relref "../../setup-grafana/configure-grafana/#default_timezone" >}}) option in the Grafana configuration file.
Grafana server administrators can choose a default timezone for all users on the server by setting the [default_timezone](../../setup-grafana/configure-grafana/#default_timezone) option in the Grafana configuration file.
### Set organization timezone
@@ -179,7 +179,7 @@ You can change the timezone for your user account. This setting overrides timezo
The home dashboard you set is the one all users will see by default when they log in. Click the Grafana icon or **Home** in the breadcrumb to return to it. 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.
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions]({{< relref "../roles-and-permissions/" >}}).
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions](../roles-and-permissions/).
### Set the home dashboard for the server
@@ -194,7 +194,7 @@ Users with the Grafana Server Admin flag on their account or access to the confi
#### Use a JSON file as the home dashboard
1. Save your JSON file somewhere that Grafana can access it. For example, in the Grafana `data` folder of Grafana.
1. Update your configuration file to set the path to the JSON file. Refer to [default_home_dashboard_path]({{< relref "../../setup-grafana/configure-grafana/#default_home_dashboard_path" >}}) for more information about modifying the Grafana configuration files.
1. Update your configuration file to set the path to the JSON file. Refer to [default_home_dashboard_path](../../setup-grafana/configure-grafana/#default_home_dashboard_path) for more information about modifying the Grafana configuration files.
```ini
[dashboards]
@@ -244,7 +244,7 @@ You can choose your own personal home dashboard. This setting overrides all home
### Change server language
Grafana server administrators can change the default Grafana UI language for all users on the server by setting the [default_language]({{< relref "../../setup-grafana/configure-grafana/#default_language" >}}) option in the Grafana configuration file.
Grafana server administrators can change the default Grafana UI language for all users on the server by setting the [default_language](../../setup-grafana/configure-grafana/#default_language) option in the Grafana configuration file.
### Change organization language

View File

@@ -56,17 +56,17 @@ Use app plugins when you want an out-of-the-box monitoring experience.
### Managing access for app plugins
Customize access to app plugins with [RBAC]({{< relref "../roles-and-permissions/access-control/rbac-for-app-plugins" >}}).
Customize access to app plugins with [RBAC](../roles-and-permissions/access-control/rbac-for-app-plugins/).
By default, the Viewer, Editor and Admin roles have access to all app plugins that their Organization role allows them to access. Access is granted by the `fixed:plugins.app:reader` role.
{{% admonition type="note" %}}
To prevent users from seeing an app plugin, refer to [these permissions scenarios]({{< relref "../roles-and-permissions/access-control/plan-rbac-rollout-strategy#prevent-viewers-from-accessing-an-app-plugin" >}}).
To prevent users from seeing an app plugin, refer to [these permissions scenarios](../roles-and-permissions/access-control/plan-rbac-rollout-strategy/#prevent-viewers-from-accessing-an-app-plugin).
{{% /admonition %}}
## Plugin catalog
The Grafana plugin catalog allows you to browse and manage plugins from within Grafana. Only Grafana server administrators and Organization administrators can access and use the plugin catalog. For more information about Grafana roles and permissions, refer to [Roles and permissions]({{< relref "../administration/roles-and-permissions" >}}).
The Grafana plugin catalog allows you to browse and manage plugins from within Grafana. Only Grafana server administrators and Organization administrators can access and use the plugin catalog. For more information about Grafana roles and permissions, refer to [Roles and permissions](../roles-and-permissions/).
The following access rules apply depending on the user role:
@@ -88,7 +88,7 @@ The Grafana plugin catalog is designed to work with a single Grafana server inst
_Video shows the Plugin catalog in a previous version of Grafana._
{{% admonition type="note" %}}
If required, the Grafana plugin catalog can be disabled using the `plugin_admin_enabled` flag in the [configuration]({{< relref "../../setup-grafana/configure-grafana/#plugin_admin_enabled" >}}) file.
If required, the Grafana plugin catalog can be disabled using the `plugin_admin_enabled` flag in the [configuration](../../setup-grafana/configure-grafana/#plugin_admin_enabled) file.
{{% /admonition %}}
<a id="#plugin-catalog-entry"></a>
@@ -103,53 +103,45 @@ To browse for available plugins:
### Install a plugin
To install a plugin:
The most common way to install a plugin is through the Grafana UI, but alternative methods are also available.
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view all plugins.
1. Browse and find a plugin.
1. Click the plugin's logo.
1. Click **Install**.
When the update is complete, you'll see a confirmation message that the installation was successful.
There are also additional ways to install plugins depending on your setup.
### Update a plugin
#### Install a plugin using Grafana CLI
To update a plugin:
Grafana CLI allows you to install, upgrade, and manage your Grafana plugins using a command line. For more information about Grafana CLI plugin commands, refer to [Plugin commands](../../cli/#plugins-commands).
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view all plugins.
1. Click the **Installed** filter to show only installed plugins.
1. Click the plugin's logo.
1. Click **Update**.
#### Install a plugin from a ZIP file
When the update is complete, you'll see a confirmation message that the update was successful.
This method is typically used for plugins not available in the Plugin Catalog or in environments without internet access.
### Uninstall a plugin
Download the archive containing the plugin assets, and install it by extracting the archive into the plugin directory. For example:
To uninstall a plugin:
```bash
unzip my-plugin-0.2.0.zip -d YOUR_PLUGIN_DIR/my-plugin
```
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view all plugins.
1. Click the plugin's logo.
1. Click the **Installed** filter to show only installed plugins.
1. Click **Uninstall**.
The path to the plugin directory is defined in the configuration file. For more information, refer to [Configuration](../../setup-grafana/configure-grafana/#plugins).
When the update is complete, you'll see a confirmation message that the uninstall was successful.
#### Install a plugin in air-gapped environment
## Install Grafana plugins
Plugin installation usually requires an internet connection. You can check which endpoints are used during the installation on your instance and add them to your instances allowlist.
Grafana supports data source, panel, and app plugins.
If this is not possible you can go via installing a plugin using [Grafana CLI](#install-a-plugin-using-grafana-cli) or as a [ZIP file](#install-a-plugin-from-a-zip-file).
1. In a web browser, navigate to the [Grafana plugin catalog](https://grafana.com/plugins) and find a plugin that you want to install.
1. Click the plugin, and then click the **Installation** tab.
You can fetch any plugin from Grafana.com API following the download link referenced in the API.
Here is an example based on `grafana-lokiexplore-app` plugins.
### Install plugin on Grafana Cloud
1. Open `https://grafana.com/api/plugins/grafana-lokiexplore-app` and look for `links` section
1. Find a `download` url which looks something like `https://grafana.com/api/plugins/grafana-lokiexplore-app/versions/1.0.2/download`
1. Use this URL to download the plugin ZIP file, which you can then install as described above.
On the **Installation tab**, in the **For** field, click the name of the Grafana instance on which you want to install the plugin.
Grafana Cloud handles the plugin installation automatically.
If you're logged in to Grafana Cloud when you add a plugin, log out and then log back in again to use the new plugin.
### Install plugins using the Grafana Helm chart
#### Install plugins using the Grafana Helm chart
With the Grafana Helm chart, add the plugins you want to install as a list using the `plugins` field in the your values file. For more information about the configuration, refer to [the Helm chart configuration reference](https://github.com/grafana/helm-charts/tree/main/charts/grafana#configuration).
@@ -162,21 +154,29 @@ plugins:
- redis-datasource
```
### Install plugin on local Grafana
When the update is complete, a confirmation message will indicate the installation was successful.
Follow the instructions on the **Install** tab. You can either install the plugin with a Grafana CLI command or by downloading and uncompressing a zip file into the Grafana plugins directory. We recommend using Grafana CLI in most instances. The zip option is available if your Grafana server doesn't have access to the internet.
### Update a plugin
For more information about Grafana CLI plugin commands, refer to [Plugin commands]({{< relref "../../cli/#plugins-commands" >}}).
To update a plugin:
#### Install a packaged plugin
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view all plugins.
1. Click the **Installed** filter to show only installed plugins.
1. Click the plugin's logo.
1. Click **Update**.
After the user has downloaded the archive containing the plugin assets, they can install it by extracting the archive into their plugin directory. For example:
When the update is complete, a confirmation message will indicate the installation was successful.
```bash
unzip my-plugin-0.2.0.zip -d YOUR_PLUGIN_DIR/my-plugin
```
### Uninstall a plugin
The path to the plugin directory is defined in the configuration file. For more information, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/#plugins" >}}).
To uninstall a plugin:
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view all plugins.
1. Click the plugin's logo.
1. Click the **Installed** filter to show only installed plugins.
1. Click **Uninstall**.
When the update is complete, a confirmation message will indicate the installation was successful.
## Plugin signatures
@@ -216,7 +216,7 @@ All plugins are signed under a _signature level_. The signature level determines
Unsigned plugins are not supported in Grafana Cloud.
{{% /admonition %}}
We strongly recommend that you don't run unsigned plugins in your Grafana instance. However, if you're aware of the risks and you still want to load an unsigned plugin, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/#allow_loading_unsigned_plugins" >}}).
We strongly recommend that you don't run unsigned plugins in your Grafana instance. However, if you're aware of the risks and you still want to load an unsigned plugin, refer to [Configuration](../../setup-grafana/configure-grafana/#allow_loading_unsigned_plugins).
If you've allowed loading of an unsigned plugin, then Grafana writes a warning message to the server log:

View File

@@ -20,7 +20,7 @@ This makes GitOps more natural since data sources and dashboards can be defined
## Configuration file
Refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) for more information on what you can configure in `grafana.ini`.
Refer to [Configuration](../../setup-grafana/configure-grafana/) for more information on what you can configure in `grafana.ini`.
### Configuration file locations
@@ -73,7 +73,7 @@ Therefore, we heavily rely on the expertise of the community.
## Data sources
You can manage data sources in Grafana by adding YAML configuration files in the [`provisioning/data sources`]({{< relref "../../setup-grafana/configure-grafana#provisioning" >}}) directory.
You can manage data sources in Grafana by adding YAML configuration files in the [`provisioning/datasources`](../../setup-grafana/configure-grafana/#provisioning) directory.
Each configuration file can contain a list of `datasources` to add or update during startup.
If the data source already exists, Grafana reconfigures it to match the provisioned configuration file.
@@ -96,7 +96,7 @@ This prevents old configurations from overwriting newer ones if you have differe
### Example data source configuration file
This example provisions a [Graphite data source]({{< relref "../../datasources/graphite" >}}):
This example provisions a [Graphite data source](../../datasources/graphite/):
```yaml
# Configuration file version
@@ -176,14 +176,14 @@ datasources:
editable: false
```
For provisioning examples of specific data sources, refer to that [data source's documentation]({{< relref "../../datasources" >}}).
For provisioning examples of specific data sources, refer to that [data source's documentation](../../datasources/).
#### JSON data
Not all data sources have the same configuration settings. Only the most common fields are included in examples.
To provision the rest of a data source's settings, include them as a JSON blob in the `jsonData` field.
Common settings in the [built-in core data sources]({{< relref "../../datasources#built-in-core-data-sources" >}}) include:
Common settings in the [built-in core data sources](../../datasources/#built-in-core-data-sources) include:
{{< admonition type="note" >}}
Data sources tagged with _HTTP\*_ communicate using the HTTP protocol, which includes all core data source plugins except MySQL, PostgreSQL, and MSSQL.
@@ -244,11 +244,11 @@ Data sources tagged with _HTTP\*_ communicate using the HTTP protocol, which inc
| implementation | string | AlertManager | The implementation of the AlertManager data source, such as `prometheus`, `cortex` or `mimir` |
| handleGrafanaManagedAlerts | boolean | AlertManager | When enabled, Grafana-managed alerts are sent to this Alertmanager |
For examples of specific data sources' JSON data, refer to that [data source's documentation]({{< relref "../../datasources" >}}).
For examples of specific data sources' JSON data, refer to that [data source's documentation](../../datasources/).
#### Secure JSON Data
Secure JSON data is a map of settings that are encrypted with a [secret key]({{< relref "../../setup-grafana/configure-grafana#secret_key" >}}) from the Grafana configuration.
Secure JSON data is a map of settings that are encrypted with a [secret key](../../setup-grafana/configure-grafana/#secret_key) from the Grafana configuration.
The encryption hides content from the users of the application.
This should be used for storing the TLS Cert and password that Grafana appends to the request on the server side.
All of these settings are optional.
@@ -257,17 +257,17 @@ All of these settings are optional.
The _HTTP\*_ tag denotes data sources that communicate using the HTTP protocol, including all core data source plugins except MySQL, PostgreSQL, and MS SQL.
{{< /admonition >}}
| Name | Type | Data source | Description |
| ----------------- | ------ | ---------------------------------- | -------------------------------------------------------- |
| tlsCACert | string | _HTTP\*_, MySQL, PostgreSQL | CA cert for out going requests |
| tlsClientCert | string | _HTTP\*_, MySQL, PostgreSQL | TLS Client cert for outgoing requests |
| tlsClientKey | string | _HTTP\*_, MySQL, PostgreSQL | TLS Client key for outgoing requests |
| password | string | _HTTP\*_, MySQL, PostgreSQL, MSSQL | password |
| basicAuthPassword | string | _HTTP\*_ | password for basic authentication |
| accessKey | string | Cloudwatch | Access key for connecting to Cloudwatch |
| secretKey | string | Cloudwatch | Secret key for connecting to Cloudwatch |
| sigV4AccessKey | string | Elasticsearch and Prometheus | SigV4 access key. Required when using keys auth provider |
| sigV4SecretKey | string | Elasticsearch and Prometheus | SigV4 secret key. Required when using keys auth provider |
| Name | Type | Data source | Description |
| ----------------- | ------ | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| tlsCACert | string | _HTTP\*_, MySQL, PostgreSQL | CA cert for out going requests. You can point directly to your stored cert by using an environment variable following the `$__file{path/to/ca}` format. |
| tlsClientCert | string | _HTTP\*_, MySQL, PostgreSQL | TLS Client cert for outgoing requests. You can point directly to your stored cert by using an environment variable following the `$__file{path/to/cert}` format. |
| tlsClientKey | string | _HTTP\*_, MySQL, PostgreSQL | TLS Client key for outgoing requests. You can point directly to your stored key by using an environment variable following the `$__file{path/to/key}` format. |
| password | string | _HTTP\*_, MySQL, PostgreSQL, MSSQL | password |
| basicAuthPassword | string | _HTTP\*_ | password for basic authentication |
| accessKey | string | Cloudwatch | Access key for connecting to Cloudwatch |
| secretKey | string | Cloudwatch | Secret key for connecting to Cloudwatch |
| sigV4AccessKey | string | Elasticsearch and Prometheus | SigV4 access key. Required when using keys auth provider |
| sigV4SecretKey | string | Elasticsearch and Prometheus | SigV4 secret key. Required when using keys auth provider |
#### Custom HTTP headers for data sources
@@ -289,7 +289,7 @@ datasources:
## Plugins
You can manage plugin applications in Grafana by adding one or more YAML configuration files in the [`provisioning/plugins`]({{< relref "../../setup-grafana/configure-grafana#provisioning" >}}) directory.
You can manage plugin applications in Grafana by adding one or more YAML configuration files in the [`provisioning/plugins`](../../setup-grafana/configure-grafana/#provisioning) directory.
Each configuration file can contain a list of `apps` that update during start up.
Grafana updates each app to match the configuration file.
@@ -324,7 +324,7 @@ apps:
## Dashboards
You can manage dashboards in Grafana by adding one or more YAML configuration files in the [`provisioning/dashboards`]({{< relref "../../setup-grafana/configure-grafana#dashboards" >}}) directory.
You can manage dashboards in Grafana by adding one or more YAML configuration files in the [`provisioning/dashboards`](../../setup-grafana/configure-grafana/#dashboards) directory.
Each configuration file can contain a list of `dashboards providers` that load dashboards into Grafana from the local filesystem.
The dashboard provider configuration file looks somewhat like this:
@@ -384,7 +384,7 @@ The JSON definition in the input field when using `Copy JSON to Clipboard` or `S
### Reusable dashboard URLs
If the dashboard in the JSON file contains an [UID]({{< relref "../../dashboards/build-dashboards/view-dashboard-json-model" >}}), Grafana forces insert/update on that UID.
If the dashboard in the JSON file contains an [UID](../../dashboards/build-dashboards/view-dashboard-json-model/), Grafana forces insert/update on that UID.
This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
When Grafana starts, it updates and inserts all dashboards available in the configured folders.
If you modify the file, then the dashboard is also updated.
@@ -440,7 +440,7 @@ You can't create nested folders structures, where you have folders within folder
## Alerting
For information on provisioning Grafana Alerting, refer to [Provision Grafana Alerting resources]({{< relref "../../alerting/set-up/provision-alerting-resources/" >}}).
For information on provisioning Grafana Alerting, refer to [Provision Grafana Alerting resources](../../alerting/set-up/provision-alerting-resources/).
### Supported settings
@@ -644,5 +644,5 @@ The following sections detail the supported settings and secure settings for eac
Grafana Enterprise supports:
- [Provisioning role-based access control with Grafana]({{< relref "../roles-and-permissions/access-control/rbac-grafana-provisioning/" >}})
- [Provisioning role-based access control with Terraform]({{< relref "../roles-and-permissions/access-control/rbac-terraform-provisioning/" >}})
- [Provisioning role-based access control with Grafana](../roles-and-permissions/access-control/rbac-grafana-provisioning/)
- [Provisioning role-based access control with Terraform](../roles-and-permissions/access-control/rbac-terraform-provisioning/)

View File

@@ -35,7 +35,7 @@ Recorded queries only work with backend data source plugins. Refer to [Backend d
- single row and column - A query that returns a single row and column.
- row count - A query that returns meaningful rows to be counted.
- expression - Any expression. To learn more about creating and using expressions, see [Write expression queries]({{< relref "../../panels-visualizations/query-transform-data/expression-queries" >}}).
- expression - Any expression. To learn more about creating and using expressions, see [Write expression queries](../../panels-visualizations/query-transform-data/expression-queries/).
- dataplane numeric - A query that returns [dataplane numeric kind](/developers/dataplane/numeric) data.
After a recorded query is created or enabled, it immediately creates a snapshot and continues to create snapshots at the set interval. The recorded query stops taking snapshots when it is disabled, deleted, or when Grafana is not running. Data points are gathered in the backend by running the recorded query and forwarding each result to a remote-write enabled Prometheus instance.
@@ -48,7 +48,7 @@ To use a recorded query, create one and add it to a dashboard. After that, it ca
1. Find/create a query you want to record on a dashboard in an edit panel. The query must only return one row and column. If it returns more, you can still record the number of results returned using the “count” option.
- The query's data source must be a backend data source.
- Expressions can be used to aggregate data from a time series query. Refer to [Write expression queries]({{< relref "../../panels-visualizations/query-transform-data/expression-queries" >}}) to learn more about creating and using expressions.
- Expressions can be used to aggregate data from a time series query. Refer to [Write expression queries](../../panels-visualizations/query-transform-data/expression-queries/) to learn more about creating and using expressions.
1. Click the record query button located in the top right of the query editor.
1. Enter recorded query information. All fields are required unless otherwise indicated.
- Name - Name of the recorded query.
@@ -68,7 +68,7 @@ You can add existing recorded queries to panels in a dashboard. For each recorde
1. If you want to filter recorded queries by data source, select a data source from the filter by data source drop down menu.
1. Click the `Add` button on your recorded query to add it to the panel.
After adding your recorded query to the panel, the panel data source will become `-- Mixed --`. Your recorded query is represented by a `Prometheus` query with a name label matching your recorded query name. Refer to [Prometheus]({{< relref "../../datasources/prometheus/" >}}) to learn more about the `Prometheus` data source.
After adding your recorded query to the panel, the panel data source will become `-- Mixed --`. Your recorded query is represented by a `Prometheus` query with a name label matching your recorded query name. Refer to [Prometheus](../../datasources/prometheus/) to learn more about the `Prometheus` data source.
If after adding a recorded query, a query with a `-- Mixed --` data source instead of `Prometheus` data source appears, this could mean that a Prometheus remote write target was not set up for recorded queries. Refer to [Remote write target](#remote-write-target) to set up a remote write point.

View File

@@ -34,14 +34,14 @@ If you are running Grafana Enterprise, you can also control access to data sourc
A Grafana server administrator manages server-wide settings and access to resources such as organizations, users, and licenses. Grafana includes a default server administrator that you can use to manage all of Grafana, or you can divide that responsibility among other server administrators that you create.
{{% admonition type="note" %}}
The server administrator role does not mean that the user is also a Grafana [organization administrator]({{< relref "#organization-roles" >}}).
The server administrator role does not mean that the user is also a Grafana [organization administrator](#organization-roles).
{{% /admonition %}}
A server administrator can perform the following tasks:
- Manage users and permissions
- Create, edit, and delete organizations
- View server-wide settings defined in the [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) file
- View server-wide settings defined in the [Configuration](../../setup-grafana/configure-grafana/) file
- View Grafana server statistics, including total users and active sessions
- Upgrade the server to Grafana Enterprise.
@@ -49,7 +49,7 @@ A server administrator can perform the following tasks:
The server administrator role does not exist in Grafana Cloud.
{{% /admonition %}}
To assign or remove server administrator privileges, see [Server user management]({{< relref "../user-management/server-user-management/assign-remove-server-admin-privileges/" >}}).
To assign or remove server administrator privileges, see [Server user management](../user-management/server-user-management/assign-remove-server-admin-privileges/).
## Organization users and permissions
@@ -69,11 +69,11 @@ Permissions assigned to a user within an organization control the extent to whic
- library panels
- API keys
For more information about managing organization users, see [User management]({{< relref "../user-management/manage-org-users/" >}}).
For more information about managing organization users, see [User management](../user-management/manage-org-users/).
### Organization roles
Organization role-based permissions are global, which means that each permission level applies to all Grafana resources within an given organization. For example, an editor can see and update _all_ dashboards in an organization, unless those dashboards have been specifically restricted using [dashboard permissions]({{< relref "../user-management/manage-dashboard-permissions/" >}}).
Organization role-based permissions are global, which means that each permission level applies to all Grafana resources within an given organization. For example, an editor can see and update _all_ dashboards in an organization, unless those dashboards have been specifically restricted using [dashboard permissions](../user-management/manage-dashboard-permissions/).
Grafana uses the following roles to control user access:
@@ -117,9 +117,9 @@ You can specify the following permissions to dashboards and folders.
> Important: When a user creates a dashboard or a folder they are automatically granted **Admin** permissions for it.
For more information about assigning dashboard folder permissions, refer to [Grant dashboard folder permissions]({{< relref "../user-management/manage-dashboard-permissions/#grant-dashboard-folder-permissions" >}}).
For more information about assigning dashboard folder permissions, refer to [Grant dashboard folder permissions](../user-management/manage-dashboard-permissions/#grant-dashboard-folder-permissions).
For more information about assigning dashboard permissions, refer to [Grant dashboard permissions]({{< relref "../user-management/manage-dashboard-permissions/#grant-dashboard-permissions" >}}).
For more information about assigning dashboard permissions, refer to [Grant dashboard permissions](../user-management/manage-dashboard-permissions/#grant-dashboard-permissions).
## Editors with administrator permissions
@@ -131,18 +131,18 @@ This permission does not allow editors to manage folders, dashboards, and teams
This setting can be used to enable self-organizing teams to administer their own dashboards.
For more information about assigning administrator permissions to editors, refer to [Grant editors administrator permissions]({{< relref "../user-management/server-user-management/grant-editor-admin-permissions/" >}}).
For more information about assigning administrator permissions to editors, refer to [Grant editors administrator permissions](../user-management/server-user-management/grant-editor-admin-permissions/).
## Viewers with dashboard preview and Explore permissions
If you have access to the Grafana server, you can modify the default viewer role so that viewers can:
- Edit and preview dashboards, but cannot save their changes or create new dashboards.
- Access and use [Explore]({{< relref "../../explore" >}}).
- Access and use [Explore](../../explore/).
Extending the viewer role is useful for public Grafana installations where you want anonymous users to be able to edit panels and queries, but not be able to save or create new dashboards.
For more information about assigning dashboard preview permissions to viewers, refer to [Enable viewers to preview dashboards and use Explore]({{< relref "../user-management/manage-dashboard-permissions/#enable-viewers-to-edit-but-not-save-dashboards-and-use-explore" >}}).
For more information about assigning dashboard preview permissions to viewers, refer to [Enable viewers to preview dashboards and use Explore](../user-management/manage-dashboard-permissions/#enable-viewers-to-edit-but-not-save-dashboards-and-use-explore).
## Teams and permissions
@@ -153,15 +153,15 @@ You can assign a team member one of the following permissions:
- **Member**: Includes the user as a member of the team. Members do not have team administrator privileges.
- **Admin**: Administrators have permission to manage various aspects of the team, including team membership, permissions, and settings.
Because teams exist inside an organization, the organization administrator can manage all teams. When the `editors_can_admin` setting is enabled, editors can create teams and manage teams that they create. For more information about the `editors_can_admin` setting, refer to [Grant editors administrator permissions]({{< relref "../user-management/server-user-management/grant-editor-admin-permissions/" >}}).
Because teams exist inside an organization, the organization administrator can manage all teams. When the `editors_can_admin` setting is enabled, editors can create teams and manage teams that they create. For more information about the `editors_can_admin` setting, refer to [Grant editors administrator permissions](../user-management/server-user-management/grant-editor-admin-permissions/).
For details on managing teams, see [Team management]({{< relref "../team-management/" >}}).
For details on managing teams, see [Team management](../team-management/).
## Grafana Enterprise user permissions features
While Grafana OSS includes a robust set of permissions and settings that you can use to manage user access to server and organization resources, you might find that you require additional capabilities.
[Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise">}}) provides the following permissions-related features:
[Grafana Enterprise](../../introduction/grafana-enterprise/) provides the following permissions-related features:
- Data source permissions
- Role-based access control (RBAC)
@@ -170,13 +170,13 @@ While Grafana OSS includes a robust set of permissions and settings that you can
By default, a user can query any data source in an organization, even if the data source is not linked to the user's dashboards.
Data source permissions enable you to restrict data source query permissions to specific **Users**, **Service Accounts**, and **Teams**. For more information about assigning data source permissions, refer to [Data source permissions]({{< relref "../data-source-management/#data-source-permissions/" >}}).
Data source permissions enable you to restrict data source query permissions to specific **Users**, **Service Accounts**, and **Teams**. For more information about assigning data source permissions, refer to [Data source permissions](../data-source-management/#data-source-permissions/).
### Role-based access control
RBAC provides you a way of granting, changing, and revoking user read and write access to Grafana resources, such as users, reports, and authentication.
For more information about RBAC, refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}).
For more information about RBAC, refer to [Role-based access control](access-control/).
### Learn more

View File

@@ -79,7 +79,7 @@ The following list contains role-based access control actions.
| `dashboards.permissions:write` | <ul><li>`dashboards:*`</li><li>`dashboards:uid:*`</li><li>`folders:*`</li><li>`folders:uid:*`</li></ul> | Update permissions for one or more dashboards. |
| `dashboards:read` | <ul><li>`dashboards:*`</li><li>`dashboards:uid:*`</li><li>`folders:*`</li><li>`folders:uid:*`</li></ul> | Read one or more dashboards. |
| `dashboards:write` | <ul><li>`dashboards:*`</li><li>`dashboards:uid:*`</li><li>`folders:*`</li><li>`folders:uid:*`</li></ul> | Update one or more dashboards. |
| `dashboards.public:write` | <ul><li>`dashboards:*`</li><li>`dashboards:uid:*`</li></ul> | Write shared dashboard configuration. |
| `dashboards.public:write` | <ul><li>`dashboards:*`</li><li>`dashboards:uid:*`</li></ul> | Write public dashboard configuration. |
| `datasources.caching:read` | <ul><li>`datasources:*`</li><li>`datasources:uid:*`</li></ul> | Read data source query caching settings. |
| `datasources.caching:write` | <ul><li>`datasources:*`</li><li>`datasources:uid:*`</li></ul> | Update data source query caching settings. |
| `datasources:create` | None | Create data sources. |
@@ -199,6 +199,26 @@ The following list contains role-based access control actions used by Grafana Ad
| `grafanaadaptivemetricsapp.exemptions:read` | None | Read recommendation exemptions. |
| `grafanaadaptivemetricsapp.exemptions:write` | None | Create, update, and delete recommendation exemptions. |
### Grafana Alerting Notification action definitions
To enable these permissions, enable the `alertingApiServer` feature toggle.
| Action | Applicable scopes | Description |
| -------------------------------------------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `alert.notifications.receivers:read` | `receivers:*`<br>`receivers:uid:*` | Read contact points. None |
| `alert.notifications.receivers.secrets:read` | `receivers:*`<br>`receivers:uid:*` | Export contact points with decrypted secrets.None |
| `alert.notifications.receivers:create` | None | Create a new contact points. The creator is automatically granted full access to the created contact point.None |
| `alert.notifications.receivers:write` | `receivers:*`<br>`receivers:uid:*` | Update existing contact points.None |
| `alert.notifications.receivers:delete` | `receivers:*`<br>`receivers:uid:*` | Update and delete existing contact points.None |
| `receivers.permissions:read` | `receivers:*`<br>`receivers:uid:*` | Read permissions for contact points.None |
| `receivers.permissions:write` | `receivers:*`<br>`receivers:uid:*` | Manage permissions for contact points.None |
| `alert.notifications.time-intervals:read` | None | Read mute time intervals.None |
| `alert.notifications.time-intervals:write` | None | Create new or update existing mute time intervals.None |
| `alert.notifications.time-intervals:delete` | None | Delete existing time intervals.None |
| `alert.notifications.templates:read` | None | Read templates. |
| `alert.notifications.templates:write` | None | Create new or update existing templates.None |
| `alert.notifications.templates:delete` | None | Delete existing templates.None |
## Scope definitions
The following list contains role-based access control scopes.

View File

@@ -98,7 +98,7 @@ To learn how to use the roles API to determine the role UUIDs, refer to [Manage
| `fixed:dashboards.insights:reader` | `fixed_JlBJ2_gizP8zhgaeGE2rjyZe2Rs` | `dashboards.insights:read` | Read dashboard insights data and see presence indicators. |
| `fixed:dashboards.permissions:reader` | `fixed_f17oxuXW_58LL8mYJsm4T_mCeIw` | `dashboards.permissions:read` | Read all dashboard permissions. |
| `fixed:dashboards.permissions:writer` | `fixed_CcznxhWX_Yqn8uWMXMQ-b5iFW9k` | All permissions from `fixed:dashboards.permissions:reader` and <br>`dashboards.permissions:write` | Read and update all dashboard permissions. |
| `fixed:dashboards.public:writer` | `fixed_f_GHHRBciaqESXfGz2oCcooqHxs` | `dashboards.public:write` | Create, update, delete or pause a shared dashboard. |
| `fixed:dashboards.public:writer` | `fixed_f_GHHRBciaqESXfGz2oCcooqHxs` | `dashboards.public:write` | Create, update, delete or pause a public dashboard. |
| `fixed:datasources:creator` | `fixed_XX8jHREgUt-wo1A-rPXIiFlX6Zw` | `datasources:create` | Create data sources. |
| `fixed:datasources:explorer` | `fixed_qDzW9mzx9yM91T5Bi8dHUM2muTw` | `datasources:explore` | Enable the Explore feature. Data source permissions still apply, you can only query data sources for which you have query permissions. |
| `fixed:datasources:reader` | `fixed_C2x8IxkiBc1KZVjyYH775T9jNMQ` | `datasources:read`<br>`datasources:query` | Read and query data sources. |

View File

@@ -25,11 +25,11 @@ This setting contains information about tools that Grafana Server Admins can use
## View Grafana server settings
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
> Refer to [Role-based access control](../roles-and-permissions/access-control/) in Grafana Enterprise to understand how you can control access with RBAC permissions.
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration]({{< relref "../../setup-grafana/configure-grafana#configuration-file-location" >}}) file and any environmental variables.
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration](../../setup-grafana/configure-grafana/#configuration-file-location) file and any environmental variables.
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions#grafana-server-administrators" >}}).
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions](../roles-and-permissions/#grafana-server-administrators).
### View server settings
@@ -38,15 +38,15 @@ If you are a Grafana server administrator, use the Settings tab to view the sett
### Available settings
For a full list of server settings, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana#server" >}}).
For a full list of server settings, refer to [Configuration](../../setup-grafana/configure-grafana/#server).
## View Grafana server stats
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
> Refer to [Role-based access control](../roles-and-permissions/access-control/) in Grafana Enterprise to understand how you can control access with RBAC permissions.
If you are a Grafana server admin, then you can view useful statistics about your Grafana server in the Stats & Licensing tab.
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions#grafana-server-administrators" >}}).
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions](../roles-and-permissions/#grafana-server-administrators).
### View server stats

View File

@@ -14,7 +14,7 @@ weight: 500
Dashboard and folder permissions enable you to grant a viewer the ability to edit and save dashboard changes, or limit an editor's permission to modify a dashboard.
For more information about dashboard permissions, refer to [Dashboard permissions]({{< relref "../../roles-and-permissions/#dashboard-permissions" >}}).
For more information about dashboard permissions, refer to [Dashboard permissions](../../roles-and-permissions/#dashboard-permissions).
## Grant folder permissions
@@ -23,7 +23,7 @@ When you grant user permissions for folders, that setting applies to all dashboa
### Before you begin
- Ensure you have organization administrator privileges
- Identify the dashboard folder permissions you want to modify and the users, service accounts or teams to which you want to grant access. For more information about dashboard permissions, refer to [Dashboard permissions]({{< relref "../../roles-and-permissions/#dashboard-permissions" >}}).
- Identify the dashboard folder permissions you want to modify and the users, service accounts or teams to which you want to grant access. For more information about dashboard permissions, refer to [Dashboard permissions](../../roles-and-permissions/#dashboard-permissions).
**To grant dashboard folder permissions**:
@@ -77,7 +77,7 @@ This modification is useful for public Grafana installations where you want anon
1. Open the Grafana configuration file.
For more information about the Grafana configuration file and its location, refer to [Configuration]({{< relref "../../../setup-grafana/configure-grafana/" >}}).
For more information about the Grafana configuration file and its location, refer to [Configuration](../../../setup-grafana/configure-grafana/).
1. Locate the `viewers_can_edit` parameter.
1. Set the `viewers_can_edit` value to `true`.
@@ -85,7 +85,7 @@ This modification is useful for public Grafana installations where you want anon
## Edit dashboard permissions
Edit dashboard permissions when you are want to enhance or restrict a user's access to a dashboard. For more information about dashboard permissions, refer to [Dashboard permissions]({{< relref "../../roles-and-permissions/#dashboard-permissions" >}}).
Edit dashboard permissions when you are want to enhance or restrict a user's access to a dashboard. For more information about dashboard permissions, refer to [Dashboard permissions](../../roles-and-permissions/#dashboard-permissions).
### Before you begin
@@ -155,4 +155,4 @@ Folder permissions settings:
Result: User1 has editor permissions for the folder because user1 has permissions on a folder that contains this folder.
> Refer to [Role-based access Control]({{< relref "../../roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how to use RBAC permissions to restrict access to dashboards, folders, administrative functions, and other resources.
> Refer to [Role-based access Control](../../roles-and-permissions/access-control/) in Grafana Enterprise to understand how to use RBAC permissions to restrict access to dashboards, folders, administrative functions, and other resources.

View File

@@ -19,7 +19,7 @@ weight: 400
Organization administrators can invite users to join their organization. Organization users have access to organization resources based on their role, which is **Admin**, **Editor**, or **Viewer**. Permissions associated with each role determine the tasks a user can perform in the system.
For more information about organization user permissions, refer to [Organization users and permissions]({{< relref "../../roles-and-permissions/#organization-users-and-permissions" >}}).
For more information about organization user permissions, refer to [Organization users and permissions](../../roles-and-permissions/#organization-users-and-permissions).
{{% admonition type="note" %}}
Users added at the organization level will have access to all stacks and services by default, without the ability to be filtered by stack unless Single Sign-On (SSO) or Role-Based Access Control (RBAC) is implemented.
@@ -41,15 +41,15 @@ You can see a list of users with accounts in your Grafana organization. If neces
1. Navigate to **Administration > Users and access > Users**.
{{% admonition type="note" %}}
If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can also [view a global list of users]({{< relref "../server-user-management#view-a-list-of-users" >}}) in the Server Admin section of Grafana.
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also [view a global list of users](../server-user-management/#view-a-list-of-users) in the Server Admin section of Grafana.
{{% /admonition %}}
## Change a user's organization permissions
Update user permissions when you want to enhance or restrict a user's access to organization resources. For more information about organization permissions, refer to [Organization roles]({{< relref "../../roles-and-permissions/#organization-roles" >}}).
Update user permissions when you want to enhance or restrict a user's access to organization resources. For more information about organization permissions, refer to [Organization roles](../../roles-and-permissions/#organization-roles).
{{% admonition type="note" %}}
Organization roles sync from the authentication provider on user sign-in. To prevent synchronization of organization roles from the authentication provider regardless of their role in the authentication provider, then refer to the `skip_org_role_sync` setting in your Grafana configuration. Refer to [skip org role sync]({{< relref "../../../setup-grafana/configure-grafana/#authgrafana_com-skip_org_role_sync" >}}) for more information.
Organization roles sync from the authentication provider on user sign-in. To prevent synchronization of organization roles from the authentication provider regardless of their role in the authentication provider, then refer to the `skip_org_role_sync` setting in your Grafana configuration. Refer to [skip org role sync](../../../setup-grafana/configure-grafana/#authgrafana_com-skip_org_role_sync) for more information.
{{% /admonition %}}
### Before you begin
@@ -69,7 +69,7 @@ Organization roles sync from the authentication provider on user sign-in. To pre
1. Click **Update**.
{{% admonition type="note" %}}
If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can also [change a user's organization permissions]({{< relref "../server-user-management/change-user-org-permissions/" >}}) in the Server Admin section.
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also [change a user's organization permissions](../server-user-management/change-user-org-permissions/) in the Server Admin section.
{{% /admonition %}}
## Invite a user to join an organization
@@ -80,14 +80,14 @@ When you invite users to join an organization, you assign the **Admin**, **Edito
- If the user is new to Grafana, then use their email address to issue an invitation. The system automatically creates the user account on first sign in.
{{% admonition type="note" %}}
If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can also manually [add a user to an organization]({{< relref "../server-user-management/add-remove-user-to-org/" >}}).
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also manually [add a user to an organization](../server-user-management/add-remove-user-to-org/).
{{% /admonition %}}
### Before you begin
- Ensure you have organization administrator privileges.
- If the user already has access to Grafana, obtain their user name.
- Determine the permissions you want to assign to the user. For more information about organization permissions, refer to [Organization roles]({{< relref "../../roles-and-permissions/#organization-roles" >}}).
- Determine the permissions you want to assign to the user. For more information about organization permissions, refer to [Organization roles](../../roles-and-permissions/#organization-roles).
**To invite or add an existing user account to your organization**:
@@ -105,7 +105,7 @@ If you have [server administrator]({{< relref "../../roles-and-permissions/#graf
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Email or username | Either the email or username that the user will use to sign in to Grafana. |
| Name | The user's name. |
| Role | Click the organization role to assign this user. For more information about organization roles, refer to [Organization roles]({{< relref "../../roles-and-permissions/#organization-roles" >}}).. |
| Role | Click the organization role to assign this user. For more information about organization roles, refer to [Organization roles](../../roles-and-permissions/#organization-roles).. |
| Send invite email | Switch to on if your organization has configured. The system sends an email to the user inviting them to sign in to Grafana and join the organization. Switch to off if you are not using email. The user can sign in to Grafana with the email or username you entered. |
1. Click **Submit**.
@@ -156,4 +156,4 @@ This action does not remove the user account from the Grafana server.
1. Click the red **X** to remove the user from the organization.
> **Note:** If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can also [remove a user from an organization]({{< relref "../server-user-management/add-remove-user-to-org/#remove-a-user-from-an-organization" >}}) on the Users page of the Server Admin section.
> **Note:** If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also [remove a user from an organization](../server-user-management/add-remove-user-to-org/#remove-a-user-from-an-organization) on the Users page of the Server Admin section.

View File

@@ -20,13 +20,13 @@ weight: 100
A _user_ is defined as any individual who can log in to Grafana. Each user is associated with a _role_ that includes _permissions_. Permissions determine the tasks a user can perform in the system.
If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions in Grafana, you can manage all users for a Grafana instance in the Server Admin section:
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions in Grafana, you can manage all users for a Grafana instance in the Server Admin section:
{{< section >}}
If you have [organization administrator]({{< relref "../../roles-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, refer to [Manage users in a organization]({{< relref "../manage-org-users/" >}}).
If you have [organization administrator](../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, refer to [Manage users in a organization](../manage-org-users/).
For more information about user roles and permissions, refer to [Roles and permissions]({{< relref "../../roles-and-permissions/" >}}). For more information about managing users in general, see [User management]({{< relref "../" >}}).
For more information about user roles and permissions, refer to [Roles and permissions](../../roles-and-permissions/). For more information about managing users in general, see [User management](../).
## View a list of users
@@ -42,7 +42,7 @@ You can see a list of users with accounts on your Grafana server. This action mi
1. Click **Administration** in the left-side menu, **Users and access**, and then **Users**.
{{% admonition type="note" %}}
If you have [organization administrator]({{< relref "../../roles-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can still [view of list of users in a given organization]({{< relref "../manage-org-users/#view-a-list-of-organization-users" >}}).
If you have [organization administrator](../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can still [view of list of users in a given organization](../manage-org-users/#view-a-list-of-organization-users).
{{% /admonition %}}
## View user details
@@ -104,7 +104,7 @@ Edit a user account when you want to modify user login credentials, or delete, d
Add users when you want to manually provide individuals with access to Grafana.
When you create a user using this method, you must create their password. The user does not receive a notification by email. To invite a user to Grafana and allow them to create their own password, [invite a user to join an organization]({{< relref "../manage-org-users#invite-a-user-to-join-an-organization" >}}).
When you create a user using this method, you must create their password. The user does not receive a notification by email. To invite a user to Grafana and allow them to create their own password, [invite a user to join an organization](../manage-org-users/#invite-a-user-to-join-an-organization).
When you configure advanced authentication using Oauth, SAML, LDAP, or the Auth proxy, users are created automatically.
@@ -119,10 +119,10 @@ When you configure advanced authentication using Oauth, SAML, LDAP, or the Auth
1. Click **New user**.
1. Complete the fields and click **Create user**.
When you create a user, the system assigns the user viewer permissions in a default organization, which you can change. You can now [add a user to a second organization]({{< relref "add-remove-user-to-org/" >}}).
When you create a user, the system assigns the user viewer permissions in a default organization, which you can change. You can now [add a user to a second organization](add-remove-user-to-org/).
{{% admonition type="note" %}}
If you have [organization administrator]({{< relref "../../roles-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can still add users by [inviting a user to join an organization]({{< relref "../manage-org-users#invite-a-user-to-join-an-organization" >}}).
If you have [organization administrator](../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can still add users by [inviting a user to join an organization](../manage-org-users/#invite-a-user-to-join-an-organization).
{{% /admonition %}}
## Force a user to log out of Grafana

View File

@@ -14,7 +14,7 @@ weight: 30
# Add or remove a user in an organization
Server administrators can add and remove users in organizations. To do this as an organization administrator, see [Manage users in an organization]({{< relref "../../manage-org-users/" >}}).
Server administrators can add and remove users in organizations. To do this as an organization administrator, see [Manage users in an organization](../../manage-org-users/).
## Add a user to an organization
@@ -24,9 +24,9 @@ You are required to specify an Admin role for each organization. The first user
### Before you begin
- [Create an organization]({{< relref "../../../organization-management/#create-an-organization" >}})
- [Add a user]({{< relref "./#add-a-user" >}}) to Grafana
- Ensure you have [Grafana server administrator privileges]({{< relref "./assign-remove-server-admin-privileges" >}})
- [Create an organization](../../../organization-management/#create-an-organization)
- [Add a user](./#add-a-user) to Grafana
- Ensure you have [Grafana server administrator privileges](../assign-remove-server-admin-privileges/)
**To add a user to an organization**:
@@ -36,14 +36,14 @@ You are required to specify an Admin role for each organization. The first user
1. In the Organizations section, click **Add user to organization**.
1. Select an organization and a role.
For more information about user permissions, refer to [Organization roles]({{< relref "../../../roles-and-permissions#organization-roles" >}}).
For more information about user permissions, refer to [Organization roles](../../../roles-and-permissions/#organization-roles).
1. Click **Add to organization**.
The next time the user signs in, they will be able to navigate to their new organization using the Switch Organizations option in the user profile menu.
{{% admonition type="note" %}}
If you have [organization administrator]({{< relref "../../../roles-and-permissions#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../../roles-and-permissions#grafana-server-administrators" >}}) permissions, you can still [invite a user to join an organization]({{< relref "../../manage-org-users#invite-a-user-to-join-an-organization" >}}).
If you have [organization administrator](../../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../../roles-and-permissions/#grafana-server-administrators) permissions, you can still [invite a user to join an organization](../../manage-org-users/#invite-a-user-to-join-an-organization).
{{% /admonition %}}
## Remove a user from an organization
@@ -62,4 +62,4 @@ Remove a user from an organization when they no longer require access to the das
1. In the Organization section, click **Remove from organization** next to the organization from which you want to remove the user.
1. Click **Confirm removal**.
> **Note:** If you have [organization administrator]({{< relref "../../../roles-and-permissions#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../../roles-and-permissions#grafana-server-administrators" >}}) permissions, you can still [remove a user from an organization]({{< relref "../../manage-org-users#remove-a-user-from-an-organization" >}}) in the Users section of organization configuration.
> **Note:** If you have [organization administrator](../../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../../roles-and-permissions/#grafana-server-administrators) permissions, you can still [remove a user from an organization](../../manage-org-users/#remove-a-user-from-an-organization) in the Users section of organization configuration.

View File

@@ -13,7 +13,7 @@ weight: 20
# Assign or remove Grafana server administrator privileges
Grafana server administrators are responsible for creating users, organizations, and managing permissions. For more information about the server administration role, refer to [Grafana server administrators]({{< relref "../../../roles-and-permissions#grafana-server-administrators" >}}).
Grafana server administrators are responsible for creating users, organizations, and managing permissions. For more information about the server administration role, refer to [Grafana server administrators](../../../roles-and-permissions/#grafana-server-administrators).
{{% admonition type="note" %}}
Server administrators are "super-admins" with full permissions to create, read, update, and delete all resources and users in all organizations, as well as update global settings such as licenses. Only grant this permission to trusted users.
@@ -21,7 +21,7 @@ Server administrators are "super-admins" with full permissions to create, read,
## Before you begin
- [Add a user]({{< relref "../#add-a-user" >}})
- [Add a user](../#add-a-user)
- Ensure you have Grafana server administrator privileges
**To assign or remove Grafana administrator privileges**:

View File

@@ -11,11 +11,11 @@ weight: 50
# Change a user's organization permissions
Update organization permissions when you want to enhance or restrict a user's access to organization resources. For more information about organization permissions, refer to [Organization roles]({{< relref "../../../roles-and-permissions/#organization-roles" >}}).
Update organization permissions when you want to enhance or restrict a user's access to organization resources. For more information about organization permissions, refer to [Organization roles](../../../roles-and-permissions/#organization-roles).
## Before you begin
- [Add a user to an organization]({{< relref "./add-remove-user-to-org/" >}})
- [Add a user to an organization](../add-remove-user-to-org/)
- Ensure you have Grafana server administrator privileges
**To change a user's organization permissions**:

View File

@@ -13,7 +13,7 @@ weight: 60
By default, the editor organization role does not allow editors to creator and manage teams. You can allow them to do so using the `editors_can_admin` configuration option.
When `editors_can_admin` is enabled, users with the Editor role in an organization can create teams, and they are Administrators of the teams they create. To learn more about team permissions, refer to [Team management]({{< relref "../../../team-management/" >}}).
When `editors_can_admin` is enabled, users with the Editor role in an organization can create teams, and they are Administrators of the teams they create. To learn more about team permissions, refer to [Team management](../../../team-management/).
## Before you begin
@@ -23,7 +23,7 @@ When `editors_can_admin` is enabled, users with the Editor role in an organizati
1. Log in to the Grafana server and open the Grafana configuration file.
For more information about the Grafana configuration file and its location, refer to [Configuration]({{< relref "../../../../setup-grafana/configure-grafana/" >}}).
For more information about the Grafana configuration file and its location, refer to [Configuration](../../../../setup-grafana/configure-grafana/).
1. Locate the `editors_can_admin` parameter.
1. Set the `editors_can_admin` value to `true`.

View File

@@ -50,7 +50,7 @@ Your profile includes your name, user name, and email address, which you can upd
## Edit your preferences
You can choose the way you would like data to appear in Grafana, including the UI theme, home dashboard, timezone, and first day of the week. You can set these preferences for your own account, for a team, for an organization, or Grafana-wide using configuration settings. Your user preferences take precedence over team, organization, and Grafana default preferences. For more information, see [Grafana preferences]({{< relref "../../organization-preferences/" >}}).
You can choose the way you would like data to appear in Grafana, including the UI theme, home dashboard, timezone, and first day of the week. You can set these preferences for your own account, for a team, for an organization, or Grafana-wide using configuration settings. Your user preferences take precedence over team, organization, and Grafana default preferences. For more information, see [Grafana preferences](../../organization-preferences/).
- **UI theme** determines whether Grafana appears in light mode or dark mode. By default, UI theme is set to dark mode.
- **Home dashboard** refers to the dashboard you see when you sign in to Grafana. By default, this is set to the Home dashboard.
@@ -85,7 +85,7 @@ Every user is a member of at least one organization. You can have different role
1. Click the user icon in the top right corner of the page and select **Profile**.
1. Scroll down to the Organizations section and review the following information:
- **Name**: The name of the organizations of which you are a member.
- **Role**: The role to which you are assigned in the organization. For more information about roles and permissions, refer to [Organization users and permissions]({{< relref "../../roles-and-permissions/#organization-users-and-permissions" >}}).
- **Role**: The role to which you are assigned in the organization. For more information about roles and permissions, refer to [Organization users and permissions](../../roles-and-permissions/#organization-users-and-permissions).
- **Current**: Grafana indicates the organization that you are currently signed into as _Current_. If you are a member of multiple organizations, you can click **Select** to switch to that organization.
## View your Grafana sessions

View File

@@ -27,10 +27,6 @@ cards:
href: ./fundamentals/
description: Learn more about the fundamentals and available features that help you create, manage, and respond to alerts; and improve your teams ability to resolve issues quickly.
height: 24
- title: Set up
href: ./set-up/
description: Set up your implementation of Grafana Alerting.
height: 24
- title: Configure alert rules
href: ./alerting-rules/
description: Create, manage, view, and adjust alert rules to alert on your metrics data or log entries from multiple data sources — no matter where your data is stored.
@@ -39,13 +35,13 @@ cards:
href: ./configure-notifications/
description: Choose how, when, and where to send your alert notifications.
height: 24
- title: Detect and respond
href: ./manage-notifications/
- title: Monitor status
href: ./monitor-status/
description: Monitor, respond to, and triage issues within your services.
height: 24
- title: Monitor
href: ./monitor/
description: Monitor your alerting metrics to ensure you identify potential issues before they become critical.
- title: Additional configuration
href: ./set-up/
description: Use advanced configuration options to further tailor your alerting setup. These options can enhance security, scalability, and automation in complex environments.
height: 24
---

View File

@@ -12,37 +12,59 @@ labels:
- oss
title: Configure alert rules
weight: 120
refs:
alert-rules:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/
configure-grafana-alerts:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-grafana-managed-rule/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-grafana-managed-rule/
configure-ds-alerts:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-data-source-managed-rule/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-data-source-managed-rule/
recording-rules:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-recording-rules/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-recording-rules/
alert-types-comparison-table:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/#comparison-between-alert-rule-types
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/#comparison-between-alert-rule-types
templating-labels-annotations:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/templates/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/templates/
---
# Configure alert rules
An alert rule consists of one or more queries and expressions that select the data you want to measure. It also contains a condition, which is the threshold that an alert rule must meet or exceed in order to fire.
[Alert rules](ref:alert-rules) are the central component of your alerting system.
Create, manage, view, and adjust alert rules to alert on your metrics data or log entries from multiple data sources — no matter where your data is stored.
An alert rule consists of one or more queries and expressions that select the data you want to measure. It contains a condition to trigger the alert, an evaluation period that determines how often the rule is evaluated, and additional options to manage alert events and their notifications.
The main parts of alert rule creation are:
Grafana supports two types of alert rules:
1. Select your data source
1. Query your data
1. Normalize your data
1. Set your threshold
1. Grafana-managed alert rules: These can query multiple data sources.
**Query, expressions, and alert condition**
1. Data source-managed alert rules: These can only query Prometheus-based data sources and support horizontal scaling.
What are you monitoring? How are you measuring it?
We recommend using Grafana-managed alert rules whenever possible, and opting for data source-managed alert rules when horizontal scaling is required. Refer to the [comparison table of alert rule types](ref:alert-types-comparison-table) for a more detailed overview.
{{< admonition type="note" >}}
Expressions can only be used for Grafana-managed alert rules.
{{< /admonition >}}
Both types of alert rules can be configured in Grafana using the **+ New alert rule** flow. For step-by-step instructions, refer to:
**Evaluation**
- [Configure Grafana-managed alert rules](ref:configure-grafana-alerts)
- [Configure data source-managed alert rules](ref:configure-ds-alerts)
- [Create and link alert rules to panels](ref:templating-labels-annotations)
How do you want your alert to be evaluated?
Alert rules can also query metrics generated by recording rules. To learn more, refer to:
**Labels and notifications**
How do you want to route your alert? What kind of additional labels could you add to annotate your alert rules and ease searching?
**Annotations**
Do you want to add more context on the alert in your notification messages, for example, what caused the alert to fire? Which server did it happen on?
- [Create recording rules](ref:recording-rules)

View File

@@ -1,45 +0,0 @@
---
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/create-alerts-panels/
description: Create alert rules from panels. Reuse the queries in the panel and create alert rules based on them.
keywords:
- grafana
- alerting
- panels
- create
- grafana-managed
- data source-managed
labels:
products:
- cloud
- enterprise
- oss
title: Create alert rules from panels
weight: 400
---
## Create alert rules from panels
Create alert rules from time series panels. By doing so, you can reuse the queries in the panel and create alert rules based on them.
1. Navigate to a dashboard in the **Dashboards** section.
2. Hover over the top-right corner of a time series panel and click the panel menu icon.
3. From the dropdown menu, select **More...** > **New alert rule**.
The New alert rule form opens where you can configure and create your alert rule based on the query used in the panel.
{{% admonition type="note" %}}
Changes to the panel aren't reflected on the linked alert rules. If you change a query, you have to update it in both the panel and the alert rule.
Alert rules are only supported in [time series](ref:time-series) visualizations.
{{% /admonition %}}
{{< docs/play title="visualizations with linked alerts in Grafana" url="https://play.grafana.org/d/000000074/" >}}
## View alert rules from panels
To view alert rules associated with a time series panel, complete the following steps.
1. Open the panel editor by hovering over the top-right corner of any panel
1. Click the panel menu icon that appears.
1. Click **Edit**.
1. Click the **Alert** tab to view existing alert rules or create a new one.

View File

@@ -0,0 +1,157 @@
---
aliases:
- ../unified-alerting/alerting-rules/create-mimir-loki-managed-rule/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alerting-rules/create-mimir-loki-managed-rule/
- ../unified-alerting/alerting-rules/edit-cortex-loki-namespace-group/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alerting-rules/edit-cortex-loki-namespace-group/
- ../unified-alerting/alerting-rules/edit-mimir-loki-namespace-group/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alerting-rules/edit-mimir-loki-namespace-group/
- ../alerting-rules/create-mimir-loki-managed-rule/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-mimir-loki-managed-rule/
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/create-data-source-managed-rule/
description: Configure data source-managed alert rules alert for an external Grafana Mimir or Loki instance
keywords:
- grafana
- alerting
- guide
- rules
- create
labels:
products:
- cloud
- enterprise
- oss
title: Configure data source-managed alert rules
weight: 200
refs:
shared-configure-prometheus-data-source-alerting:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/prometheus/configure-prometheus-data-source/#alerting
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/prometheus/configure-prometheus-data-source/#alerting
configure-grafana-managed-rules:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-grafana-managed-rule/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-grafana-managed-rule/notification-policies/
notification-policies:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/notification-policies/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/
pending-period:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rule-evaluation/#pending-period
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rule-evaluation/#pending-period
alert-rules:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/
alert-rule-labels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#labels
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#labels
alert-rule-evaluation:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rule-evaluation/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rule-evaluation/
shared-provision-alerting-resources:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/set-up/provision-alerting-resources/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/
shared-alert-rule-template:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/
shared-annotations:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#annotations
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#annotations
shared-link-alert-rules-to-panels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/link-alert-rules-to-panels/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/link-alert-rules-to-panels/
---
# Configure data source-managed alert rules
Data source-managed alert rules can only be created using Grafana Mimir or Grafana Loki data sources.
The rules are stored within the data source. In a distributed architecture, they can scale horizontally to provide high-availability. For more details, refer to [alert rule types](ref:alert-rules).
We recommend using [Grafana-managed alert rules](ref:configure-grafana-managed-rules) whenever possible and opting for data source-managed alert rules when scaling your alerting setup is necessary.
{{< docs/shared lookup="alerts/note-prometheus-ds-rules.md" source="grafana" version="<GRAFANA_VERSION>" >}}
To create or edit data source-managed alert rules, follow these instructions.
## Before you begin
Verify that you have write permission to the Mimir or Loki data source. Otherwise, you cannot create or update data source-managed alert rules.
### Enable the Ruler API
For more information, refer to the [Mimir Ruler API](/docs/mimir/latest/references/http-api/#ruler) or [Loki Ruler API](/docs/loki/latest/api/#ruler).
- **Mimir** - use the `/prometheus` prefix. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](/docs/mimir/latest/operators-guide/reference-http-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.
### Permissions
Alert rules for Mimir or Loki instances can be edited or deleted by users with **Editor** or **Admin** roles.
If you do not want to manage alert rules for a particular data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
{{< docs/shared lookup="alerts/configure-provisioning-before-begin.md" source="grafana" version="<GRAFANA_VERSION>" >}}
{{< docs/shared lookup="alerts/configure-alert-rule-name.md" source="grafana" version="<GRAFANA_VERSION>" >}}
## Define query and condition
Define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires.
{{% admonition type="note" %}}
By default, new alert rules are Grafana-managed. To switch to **Data source-managed**, follow these instructions.
{{% /admonition %}}
1. Select a Prometheus-based data source from the drop-down list.
You can also click **Open advanced data source picker** to find more options.
1. Enter a PromQL or LogQL query, including the alert condition.
1. In the **Rule type** option, select **Data source-managed**.
1. Click **Preview alerts**.
## Set alert evaluation behavior
Use [alert rule evaluation](ref:alert-rule-evaluation) to determine how frequently an alert rule should be evaluated and how quickly it should change its state.
1. Select a namespace or click **+ New namespace**.
1. Select an evaluation group or click **+ New evaluation group**.
If you are creating a new evaluation group, specify the interval for the group.
All rules within the same group are evaluated sequentially over the same time interval. You can reorder them from the **Alert rules** page.
1. Enter a pending period.
The [pending period](ref:pending-period) is the period in which an alert rule can be in breach of the condition until it fires.
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.
## Configure labels and notifications
Add [labels](ref:alert-rule-labels) to your alert rules to set which [notification policy](ref:notification-policies) should handle your firing alert instances.
All alert rules and instances, irrespective of their labels, match the default notification policy. If there are no nested policies, or no nested policies match the labels in the alert rule or alert instance, then the default notification policy is the matching policy.
1. Add labels if you want to change the way your notifications are routed.
Add custom labels by selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value.
{{< docs/shared lookup="alerts/configure-notification-message.md" source="grafana" version="<GRAFANA_VERSION>" >}}

View File

@@ -24,108 +24,144 @@ refs:
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/use-dashboards/#time-units-and-relative-ranges
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/dashboards/use-dashboards/#time-units-and-relative-ranges
fundamentals:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/
alert-instance-state:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rule-evaluation/state-and-health/#alert-instance-state
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rule-evaluation/state-and-health/#alert-instance-state
keep-last-state:
modify-the-no-data-or-error-state:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rule-evaluation/state-and-health/#keep-last-state
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rule-evaluation/state-and-health/#modify-the-no-data-or-error-state
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rule-evaluation/state-and-health/#keep-last-state
add-a-query:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/#add-a-query
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/panels-visualizations/query-transform-data/#add-a-query
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rule-evaluation/state-and-health/#modify-the-no-data-or-error-state
pending-period:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rule-evaluation/#pending-period
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rule-evaluation/#pending-period
alerting-on-numeric-data:
alert-rule-evaluation:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/queries-conditions/#alert-on-numeric-data
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rule-evaluation/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/queries-conditions/#alert-on-numeric-data
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rule-evaluation/
mute-timings:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/mute-timings/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/mute-timings/
alert-rule-query:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/queries-conditions/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/queries-conditions/
alert-rule-labels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#labels
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#labels
expression-queries:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/expression-queries/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/queries-conditions/#expression-queries
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/panels-visualizations/query-transform-data/expression-queries/
annotation-label:
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/queries-conditions/#expression-queries
alert-condition:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/queries-conditions/#alert-condition
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/
alert-list:
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/queries-conditions/#alert-condition
contact-points:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/alert-list/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/contact-points/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/alert-list/
time-series:
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/contact-points/
notification-policies:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/time-series/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/notification-policies/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/time-series/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/
data-sources:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
- pattern: /docs/grafana-cloud/
- destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/
alert-rules:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/
compatible-data-sources:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/#supported-data-sources
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/#supported-data-sources
shared-provision-alerting-resources:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/set-up/provision-alerting-resources/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/provision-alerting-resources/
shared-alert-rule-template:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/
shared-annotations:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#annotations
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#annotations
shared-link-alert-rules-to-panels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/link-alert-rules-to-panels/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/link-alert-rules-to-panels/
---
# Configure Grafana-managed alert rules
Grafana-managed rules are the most flexible alert rule type. They allow you to create alerts that can act on data from any of our supported data sources. In addition to supporting multiple data sources, you can also add expressions to transform your data and set alert conditions. Using images in alert notifications is also supported. This is the only type of rule that allows alerting from multiple data sources in a single rule definition.
Multiple alert instances can be created as a result of one alert rule (also known as a multi-dimensional alerting).
Grafana-managed rules can query data from multiple data sources in a single alert rule. They are the most flexible [alert rule type](ref:alert-rules). You can also add expressions to transform your data, set alert conditions, and images in alert notifications.
{{% admonition type="note" %}}
For Grafana Cloud Free Forever, you can create up to 100 free Grafana-managed alert rules with each alert rule having a maximum of 1000 alert instances.
In Grafana Cloud, the number of Grafana-managed alert rules you can create depends on your Grafana Cloud plan.
- Free Forever plan: You can create up to 100 free alert rules, with each alert rule having a maximum of 1000 alert instances.
- All paid plans (Pro and Advanced): They have a soft limit of 2000 alert rules and support unlimited alert instances. To increase the limit, open a support ticket from the [Cloud portal](/docs/grafana-cloud/account-management/support/).
{{% /admonition %}}
Grafana-managed alert rules can only be edited or deleted by users with Edit permissions for the folder storing the rules.
If you delete an alert resource created in the UI, you can no longer retrieve it.
To make a backup of your configuration and to be able to restore deleted alerting resources, create your alerting resources using file provisioning, Terraform, or the Alerting API.
To create or edit Grafana-managed alert rules, follow the instructions below. For a practical example, check out our [tutorial on getting started with Grafana alerting](http://grafana.com/tutorials/alerting-get-started/).
## Before you begin
Verify that the data sources you plan to query in the alert rule are [compatible with Grafana-managed alert rules](ref:compatible-data-sources) and are properly configured.
### Permissions
Only users with **Edit** permissions for the folder storing the rules can edit or delete Grafana-managed alert rules.
{{< docs/shared lookup="alerts/configure-provisioning-before-begin.md" source="grafana" version="<GRAFANA_VERSION>" >}}
### Default vs Advanced options
You can use default or advanced options for Grafana-managed alert rule creation. The default options streamline rule creation with a cleaner header and a single query and condition. For more complex rules, use advanced options to add multiple queries and expressions.
Default and advanced options are enabled by default for Grafana Cloud users and this feature is being rolled out progressively.
You can toggle between the two options. Once you have created an alert rule, the system defaults to your previous choice for the next alert rule.
For OSS users,enable the `alertingQueryAndExpressionsStepMode` feature toggle.
Switching from advanced to default may result in queries and expressions that cannot be converted. In this case, a warning message asks if you want to continue to reset to default settings.
{{% admonition type="note" %}}
Once you have created an alert rule using one of the options, the system defaults to this option for the next alert rule you create.
Default and advanced options are enabled by default for Grafana Cloud users and this feature is being rolled out progressively. OSS users can enable them via the [`alertingQueryAndExpressionsStepMode` feature toggle](/setup-grafana/configure-grafana/feature-toggles/).
You can toggle between the two options. However, if you want to switch from advanced options to the default, it may be that your query and expressions cannot be converted. In this case, a warning message checks whether you want to continue to reset to default settings.
{{% /admonition %}}
## Steps
To create a Grafana-managed alert rule, use the in-product alert creation flow and follow these steps.
To get started quickly, refer to our [tutorial on getting started with Grafana alerting](http://grafana.com/tutorials/alerting-get-started/).
## Set alert rule name
1. Click **Alerts & IRM** -> **Alert rules** -> **+ New alert rule**.
1. Enter a name to identify your alert rule.
This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
{{< docs/shared lookup="alerts/configure-alert-rule-name.md" source="grafana" version="<GRAFANA_VERSION>" >}}
## Define query and condition
Define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires.
You can toggle between **Default** and **Advanced** options. If the [Default vs. Advanced feature](#default-vs-advanced-options) is not enabled in your Grafana instance, follow the **Advanced options** instructions.
{{< collapse title="Default options" >}}
1. Add a query.
1. Add an alert condition.
1. Add a [query](ref:alert-rule-query).
1. Add an [alert condition](ref:alert-condition).
The **When** input includes the reducer function and the last input is the threshold.
@@ -137,15 +173,11 @@ Define a query to get the data you want to measure and a condition that needs to
1. Select a data source.
1. From the **Options** dropdown, specify a [time range](ref:time-units-and-relative-ranges).
{{% admonition type="note" %}}
Grafana Alerting only supports fixed relative time ranges, for example, `now-24hr: now`.
It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:59:592` or semi-relative time ranges: `now/d to: now`.
{{% /admonition %}}
Note that Grafana Alerting only supports fixed relative time ranges, for example, `now-24hr: now`. It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:59:592` or semi-relative time ranges: `now/d to: now`.
1. Add a query.
To add multiple [queries](ref:add-a-query), click **Add query**.
To add multiple [queries](ref:alert-rule-query), click **Add query**.
All alert rules are managed by Grafana by default. If you want to switch to a data source-managed alert rule, click **Switch to data source-managed alert rule**.
@@ -153,9 +185,7 @@ It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:
a. For each expression, select either **Classic condition** to create a single alert rule, or choose from the **Math**, **Reduce**, and **Resample** options to generate separate alert for each series.
{{% admonition type="note" %}}
When using Prometheus, you can use an instant vector and built-in functions, so you don't need to add additional expressions.
{{% /admonition %}}
b. Click **Preview** to verify that the expression is successful.
@@ -163,12 +193,24 @@ It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:
You can only add one recovery threshold in a query and it must be the alert condition.
1. Click **Set as alert condition** on the query or expression you want to set as your alert condition.
1. Click **Set as alert condition** on the query or expression you want to set as your [alert condition](ref:alert-condition).
{{< /collapse >}}
## Set alert evaluation behavior
## Set folder and labels
Use alert rule evaluation to determine how frequently an alert rule should be evaluated and how quickly it should change its state.
Organize your alert rule with a folder and set of labels.
In the **Labels** section, you can optionally choose whether to add labels to organize your alert rules and their notifications. For more details, refer to [alert rule labels](ref:alert-rule-labels).
1. Select a folder or click **+ New folder**.
1. Add labels, if required.
Add custom labels by selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value.
## Configure alert evaluation behavior
Use [alert rule evaluation](ref:alert-rule-evaluation) to determine how frequently an alert rule should be evaluated and how quickly it should change its state.
To do this, you need to make sure that your alert rule is in the right evaluation group and set a pending period time that works best for your use case.
@@ -179,7 +221,7 @@ To do this, you need to make sure that your alert rule is in the right evaluatio
All rules within the same group are evaluated concurrently over the same time interval.
1. Enter a pending period.
1. Enter a [pending period](ref:pending-period).
The pending period is the period in which an alert rule can be in breach of the condition until it fires.
@@ -187,15 +229,20 @@ To do this, you need to make sure that your alert rule is in the right evaluatio
1. Turn on pause alert notifications, if required.
{{< admonition type="note" >}}
You can pause alert rule evaluation to prevent noisy alerting while tuning your alerts.
Pausing stops alert rule evaluation and doesn't create any alert instances.
This is different to mute timings, which stop notifications from being delivered, but still allows for alert rule evaluation and the creation of alert instances.
{{< /admonition >}}
This is different to [mute timings](ref:mute-timings), which stop notifications from being delivered, but still allows for alert rule evaluation and the creation of alert instances.
1. In **Configure no data and error handling**, configure alerting behavior in the absence of data.
1. In **Configure no data and error handling**, you can define the alerting behavior and alerting state for two scenarios:
Use the guidelines in [No data and error handling](#configure-no-data-and-error-handling).
- When the evaluation returns **No data** or all values are null.
- When the evaluation returns **Error** or timeout.
### Configure no data and error handling
{{< docs/shared lookup="alerts/table-configure-no-data-and-error.md" source="grafana" version="<GRAFANA_VERSION>" >}}
For more details, refer to [alert instance states](ref:alert-instance-state) and [modify the no data or error state](ref:modify-the-no-data-or-error-state).
## Configure labels and notifications
@@ -213,7 +260,7 @@ Complete the following steps to set up labels and notifications.
**Select contact point**
1. Choose this option to select an existing contact point.
1. Choose this option to select an existing [contact point](ref:contact-points).
All notifications for this alert rule are sent to this contact point automatically and notification policies are not used.
@@ -224,71 +271,18 @@ Complete the following steps to set up labels and notifications.
**Use notification policy**
3. Choose this option to use the notification policy tree to direct your notifications.
1. Choose this option to use the [notification policy tree](ref:notification-policies) to direct your notifications.
{{< admonition type="note" >}}
All alert rules and instances, irrespective of their labels, match the default notification policy. If there are no nested policies, or no nested policies match the labels in the alert rule or alert instance, then the default notification policy is the matching policy.
{{< /admonition >}}
4. Preview your alert instance routing set up.
2. Preview your alert instance routing set up.
Based on the labels added, alert instances are routed to the following notification policies displayed.
5. Expand each notification policy below to view more details.
3. Expand each notification policy below to view more details.
6. Click **See details** to view alert routing details and an email preview.
4. Click **See details** to view alert routing details and an email preview.
## Add annotations
Add [annotations](ref:annotation-label). to provide more context on the alert in your alert notification message.
Annotations add metadata to provide more information on the alert in your alert notification message. For example, add a **Summary** annotation to tell you which value caused the alert to fire or which server it happened on.
1. Optional: Add a summary.
Short summary of what happened and why.
1. Optional: Add a description.
Description of what the alert rule does.
1. Optional: Add a Runbook URL.
Webpage where you keep your runbook for the alert
1. Optional: Add a custom annotation
1. Optional: Add a **dashboard and panel link**.
Links alert rules to panels in a dashboard.
{{% admonition type="note" %}}
At the moment, alert rules are only supported in [time series](ref:time-series) and [alert list](ref:alert-list) visualizations.
{{% /admonition %}}
1. Click **Save rule**.
## Configure no data and error handling
In **Configure no data and error handling**, you can define the alerting behavior when the evaluation returns no data or an error.
For details about alert states, refer to [lifecycle of alert instances](ref:alert-instance-state).
You can configure the alert instance state when its evaluation returns no data:
| No Data configuration | Description |
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| No Data | The default option. Sets alert instance state to `No data`. <br/> The alert rule also creates a new alert instance `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
| Alerting | Sets the alert instance state to `Pending` and then transitions to `Alerting` once the [pending period](ref:pending-period) ends. If you sent the pending period to 0, the alert instance state is immediately set to `Alerting`. |
| Normal | Sets alert instance state to `Normal`. |
| Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). |
You can also configure the alert instance state when its evaluation returns an error or timeout.
| Error configuration | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Error | The default option. Sets alert instance state to `Error`. <br/> The alert rule also creates a new alert instance `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
| Alerting | Sets alert instance state to `Alerting`. It transitions from `Pending` to `Alerting` after the [pending period](ref:pending-period) has finished. |
| Normal | Sets alert instance state to `Normal`. |
| Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). |
When you configure the No data or Error behavior to `Alerting` or `Normal`, Grafana will attempt to keep a stable set of fields under notification `Values`. If your query returns no data or an error, Grafana re-uses the latest known set of fields in `Values`, but will use `-1` in place of the measured value.
{{< docs/shared lookup="alerts/configure-notification-message.md" source="grafana" version="<GRAFANA_VERSION>" >}}

View File

@@ -1,184 +0,0 @@
---
aliases:
- ../unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule/
- ../unified-alerting/alerting-rules/create-mimir-loki-managed-recording-rule/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alerting-rules/create-mimir-loki-managed-recording-rule/
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/create-mimir-loki-managed-recording-rule/
description: Create recording rules for an external Grafana Mimir or Loki instance
keywords:
- grafana
- alerting
- guide
- rules
- recording rules
- configure
labels:
products:
- cloud
- enterprise
- oss
title: Configure recording rules
weight: 300
refs:
configure-grafana:
- pattern: /docs/
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/
annotation-label:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/
---
# Configure recording rules
{{< admonition type="note" >}}
In Grafana Cloud, you can only create data source-managed recording rules.
In Grafana OSS and Enterprise, you can create both Grafana-managed and data source-managed recording rules if you enable the `grafanaManagedRecordingRules` feature flag.
For more information on enabling feature toggles, refer to [Configure feature toggles](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/feature-toggles).
{{< /admonition >}}
Recording rules calculate frequently needed expressions or computationally expensive expressions in advance and save the result as a new set of time series. Querying this new time series is faster, especially for dashboards since they query the same expression every time the dashboards refresh.
For more information on recording rules in Prometheus, refer to [Defining recording rules in Prometheus](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/).
Recording rules are run as instant rules, which means that they run every 10s. To overwrite this configuration, update the min_interval in your custom configuration file.
[min_interval](ref:configure-grafana) sets the minimum interval to enforce between rule evaluations. The default value is 10s which equals the scheduler interval. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as fewer evaluations are scheduled over time.
This setting has precedence over each individual rule frequency. If a rule frequency is lower than this value, then this value is enforced.
## Configure data source-managed recording rules
Configure data source-managed recording rules.
### Before you begin
- Verify that you have write permission to the Prometheus or Loki data source. Otherwise, you will not be able to create or update Grafana Mimir managed alerting rules.
- For Grafana Mimir and Loki data sources, enable the ruler API by configuring their respective services.
- **Loki** - The `local` rule storage type, default for the Loki data source, supports only viewing of rules. To edit rules, configure one of the other rule storage types.
- **Grafana Mimir** - use the `/prometheus` prefix. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](/docs/mimir/latest/operators-guide/reference-http-api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
To configure data-source managed recording rules, complete the following steps.
1. Click **Alerts & IRM** -> **Alerting** ->
**Alert rules**.
1. Scroll to the **Data source-managed section** and click **+New recording rule**.
#### Enter recording rule name
The recording rule name must be a Prometheus metric name and contain no whitespace.
#### Define recording rule
Select your data source and enter a query.
#### Add namespace and group
1. From the **Namespace** dropdown, select an existing rule namespace or add a new one.
Namespaces can contain one or more rule groups and only have an organizational purpose.
1. From the **Group** dropdown, select an existing group within the selected namespace or add a new one.
Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
#### Add labels
1. Add custom labels selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value.
1. Click **Save rule** to save the rule or **Save rule and exit** to save the rule and go back to the Alerting page.
## Configure Grafana-managed recording rules
Configure Grafana-managed recording rules.
{{< admonition type="note" >}}
This feature is only available for Grafana OSS and Enterprise users. It is not available in Grafana Cloud.
{{< /admonition >}}
### Before you begin
- Enable the `grafanaManagedRecordingRules` [feature flag](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/feature-toggles/).
To configure Grafana-managed recording rules, complete the following steps.
1. Click **Alerts & IRM** -> **Alerting** ->
**Alert rules**.
1. Scroll to the **Grafana-managed section** and click **+New recording rule**.
#### Enter a recording rule and metric name
Enter a names to identify your recording rule and metric. The metric name must be a Prometheus metric name and contain no whitespace.
For more information, refer to [Metrics and labels](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
#### Define recording rule
Define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires.
1. Select a data source.
1. From the **Options** dropdown, specify a time range.
{{< admonition type="note" >}}
Grafana Alerting only supports fixed relative time ranges, for example, `now-24hr: now`.
It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:59:592` or semi-relative time ranges: `now/d to: now`.
{{< /admonition >}}
1. Add a query.
To add multiple queries, click **Add query**.
All alert rules are managed by Grafana by default. If you want to switch to a data source-managed alert rule, click **Switch to data source-managed alert rule**.
2. Add one or more [expressions].
a. For each expression, select either **Classic condition** to create a single alert rule, or choose from the **Math**, **Reduce**, and **Resample** options to generate separate alert for each series.
{{% admonition type="note" %}}
When using Prometheus, you can use an instant vector and built-in functions, so you don't need to add additional expressions.
{{% /admonition %}}
b. Click **Preview** to verify that the expression is successful.
3. To add a recovery threshold, turn the **Custom recovery threshold** toggle on and fill in a value for when your alert rule should stop firing.
You can only add one recovery threshold in a query and it must be the alert condition.
4. Click **Set as alert condition** on the query or expression you want to set as your alert condition.
#### Set evaluation behavior
Use alert rule evaluation to determine how frequently an alert rule should be evaluated and how quickly it should change its state.
To do this, you need to make sure that your alert rule is in the right evaluation group and set a pending period time that works best for your use case.
1. Select a folder or click **+ New folder**.
1. Select an evaluation group or click **+ New evaluation group**.
If you are creating a new evaluation group, specify the interval for the group.
All rules within the same group are evaluated concurrently over the same time interval.
1. Enter a pending period.
The pending period is the period in which an alert rule can be in breach of the condition until it fires.
Once a condition is met, the alert goes into the **Pending** state. If the condition remains active for the duration specified, the alert transitions to the **Firing** state, else it reverts to the **Normal** state.
1. Turn on pause alert notifications, if required.
{{< admonition type="note" >}}
You can pause alert rule evaluation to prevent noisy alerting while tuning your alerts.
Pausing stops alert rule evaluation and doesn't create any alert instances.
This is different to mute timings, which stop notifications from being delivered, but still allows for alert rule evaluation and the creation of alert instances.
{{< /admonition >}}
#### Add labels
Add labels to your rule for searching, silencing, or routing to a notification policy.

View File

@@ -1,153 +0,0 @@
---
aliases:
- ../unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule/
- ../unified-alerting/alerting-rules/create-mimir-loki-managed-recording-rule/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alerting-rules/create-mimir-loki-managed-recording-rule/
- ../unified-alerting/alerting-rules/create-mimir-loki-managed-rule/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alerting-rules/create-mimir-loki-managed-rule/
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/create-mimir-loki-managed-rule/
description: Configure data source-managed alert rules alert for an external Grafana Mimir or Loki instance
keywords:
- grafana
- alerting
- guide
- rules
- create
labels:
products:
- cloud
- enterprise
- oss
title: Configure data source-managed alert rules
weight: 200
refs:
alerting:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/
annotation-label:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/
alert-list:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/alert-list/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/alert-list/
time-series:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/time-series/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/time-series/
---
# Configure data source-managed alert rules
Create data source-managed alert rules for Grafana Mimir or Grafana Loki data sources, which have been configured to support rule creation.
To configure your Grafana Mimir or Loki data source for alert rule creation, enable either the Loki Ruler API or the Mimir Ruler API.
For more information, refer to [Loki Ruler API](/docs/loki/<GRAFANA_VERSION>/api/#ruler) or [Mimir Ruler API](/docs/mimir/<GRAFANA_VERSION>/references/http-api/#ruler).
**Note**:
Alert rules for a Grafana Mimir or Loki instance can be edited or deleted by users with Editor or Admin roles.
If you delete an alerting resource created in the UI, you can no longer retrieve it.
To make a backup of your configuration and to be able to restore deleted alerting resources, create your alerting resources using file provisioning, Terraform, or the Alerting API.
## Before you begin
- Verify that you have write permission to the Mimir or Loki data source. Otherwise, you cannot create or update Grafana Mimir or Loki-managed alert rules.
- Enable the Mimir or Loki 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.
- **Grafana Mimir** - use the `/prometheus` prefix. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](/docs/mimir/latest/operators-guide/reference-http-api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
Watch this video to learn more about how to create a Mimir-managed alert rule: {{< vimeo 720001865 >}}
{{% admonition type="note" %}}
If you do not want to manage alert rules for a particular Loki or Mimir data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
{{% /admonition %}}
To create a data source-managed alert rule, use the in-product alert creation flow and follow these steps to help you.
## Set alert rule name
1. Click **Alerts & IRM** -> **Alert rules** -> **+ New alert rule**.
1. Enter a name to identify your alert rule.
This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
## Define query and condition
Define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires.
**Note**:
All alert rules are managed by Grafana by default. To switch to a data source-managed alert rule, click **Switch to data source-managed alert rule**.
1. Select a data source from the drop-down list.
You can also click **Open advanced data source picker** to see more options, including adding a data source (Admins only).
1. Enter a PromQL or LogQL query.
1. Click **Preview alerts**.
## Set alert evaluation behavior
Use alert rule evaluation to determine how frequently an alert rule should be evaluated and how quickly it should change its state.
1. Select a namespace or click **+ New namespace**.
1. Select an evaluation group or click **+ New evaluation group**.
If you are creating a new evaluation group, specify the interval for the group.
All rules within the same group are evaluated sequentially over the same time interval.
1. Enter a pending period.
The pending period is the period in which an alert rule can be in breach of the condition until it fires.
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.
## Configure notifications
Add labels to your alert rules to set which notification policy should handle your firing alert instances.
All alert rules and instances, irrespective of their labels, match the default notification policy. If there are no nested policies, or no nested policies match the labels in the alert rule or alert instance, then the default notification policy is the matching policy.
1. Add labels if you want to change the way your notifications are routed.
Add custom labels by selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value.
## Add annotations
Add [annotations](ref:annotation-label). to provide more context on the alert in your alert notifications.
Annotations add metadata to provide more information on the alert in your alert notifications. For example, add a **Summary** annotation to tell you which value caused the alert to fire or which server it happened on.
1. Optional: Add a summary.
Short summary of what happened and why.
1. Optional: Add a description.
Description of what the alert rule does.
1. Optional: Add a Runbook URL.
Webpage where you keep your runbook for the alert
1. Optional: Add a custom annotation
1. Optional: Add a **dashboard and panel link**.
Links alerts to panels in a dashboard.
{{% admonition type="note" %}}
At the moment, alert rules are only supported in [time series](ref:time-series) and [alert list](ref:alert-list) visualizations.
{{% /admonition %}}
1. Click **Save rule**.

View File

@@ -0,0 +1,54 @@
---
aliases:
- ../fundamentals/alert-rules/recording-rules/ # /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/recording-rules/
- ../unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alerting-rules/create-cortex-loki-managed-recording-rule/
- ../unified-alerting/alerting-rules/create-mimir-loki-managed-recording-rule/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/alerting-rules/create-mimir-loki-managed-recording-rule/
- ../alerting-rules/create-mimir-loki-managed-recording-rule/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-mimir-loki-managed-recording-rule/
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/create-recording-rules/
description: Recording rules allow you to pre-compute frequently needed or computationally expensive expressions and save the results as a new set of time series. Querying precomputed results is faster and can reduce system load.
keywords:
- grafana
- alerting
- guide
- rules
- recording rules
- configure
labels:
products:
- cloud
- enterprise
- oss
title: Create recording rules
weight: 400
refs:
grafana-managed-recording-rules:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-recording-rules/create-grafana-managed-recording-rules/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-recording-rules/create-grafana-managed-recording-rules/
data-source-managed-recording-rules:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-recording-rules/create-data-source-managed-recording-rules/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-recording-rules/create-data-source-managed-recording-rules/
---
# Configure recording rules
Recording rules allows you to periodically pre-compute frequently used or computationally expensive queries, saving the results as a new time series metric.
For instance, you can create a recording rule generating a new metric, `error_9001_count`, which counts occurrences of a specific log error within one minute. Then, query the `error_9001_count` metric in dashboards and alert rules.
Recording rules can be helpful in various scenarios, such as:
- **Faster queries** are needed: Performing heavy aggregations or querying large data sets is quicker with precomputed results than real-time queries.
- **Reducing system load:** Precomputing specific queries in advance can reduce system overload caused by multiple simultaneous queries.
- **Simplifying complex aggregations:** Create a new metric from complex aggregations to facilitate alert and dashboard setup.
- **Reusing queries across alerts:** Improve efficiency by reusing the same query across similar alert rules and dashboards.
The evaluation group of the recording rule determines how often the metric is pre-computed.
Similar to alert rules, Grafana supports two types of recording rules:
1. [Grafana-managed recording rules](ref:grafana-managed-recording-rules), which can query any Grafana data source supported by alerting.
2. [Data source-managed recording rules](ref:data-source-managed-recording-rules), which can query Prometheus-based data sources like Mimir or Loki.

View File

@@ -0,0 +1,81 @@
---
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/create-recording-rules/create-data-source-managed-recording-rules/
description: Recording rules allow you to pre-compute expensive queries in advance and save the results as a new set of time series. Data source-managed recording rules can create a recording rule for Prometheus-based data sources like Mimir or Loki.
keywords:
- grafana
- alerting
- guide
- rules
- recording rules
- configure
labels:
products:
- cloud
- enterprise
- oss
title: Create data source-managed recording rules
weight: 402
refs:
create-recording-rules:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-recording-rules/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-recording-rules/
---
# Create data source-managed recording rules
[Recording rules](ref:create-recording-rules) allow you to periodically pre-compute frequently used or computationally expensive queries, saving the results as a new time series metric.
Alert rules and dashboards can then query the new metric resulting from the recording rule. This is faster than querying real-time data and can help to reduce system load.
Data source-managed recording rules can query Prometheus-based data sources like Mimir or Loki. For more information on recording rules in Prometheus, refer to [Defining recording rules in Prometheus](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/).
Note that in data source-managed groups, the alert rules and recording rules within the same evaluation group are evaluated sequentially. This is useful to ensure that a recording rule is evaluated before any other alert rule queries the pre-computed metric.
## Before you begin
- Verify that you have write permission to the Prometheus or Loki data source. Otherwise, you will not be able to create or update Grafana Mimir managed alerting rules.
- For Grafana Mimir and Loki data sources, enable the ruler API by configuring their respective services.
- **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.
- **Mimir** - use the `/prometheus` prefix. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](/docs/mimir/latest/operators-guide/reference-http-api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
## Add new recording rule
To create a new data source-managed recording rule:
1. Click **Alerts & IRM** -> **Alerting** -> **Alert rules**.
1. Scroll to the **Data source-managed section** and click **+New recording rule**.
## Enter recording rule name
The recording rule name must be a Prometheus metric name and contain no whitespace.
## Define recording rule
Select your data source and enter a query. The queries used in data source-managed recording rules always run as instant queries.
## Add namespace and group
1. From the **Namespace** dropdown, select an existing rule namespace or add a new one.
Namespaces can contain one or more rule groups and only have an organizational purpose.
1. From the **Group** dropdown, select an existing group within the selected namespace or add a new one.
Rules within a group are run sequentially at a regular interval, with the same evaluation time.
Newly created rules are appended to the end of the group, and you can reorder them from the **Alert rules** page.
## Add labels
Optionally, you can add custom labels to the resulting metric by selecting existing key-value pairs from the drop down or entering the new key or value.
## Query the new metric in dashboards or alert rules
Click **Save rule** or **Save rule and exit** to save the rule.
Once saved, the new recording metric is available for use in dashboards and alert rules.

View File

@@ -0,0 +1,151 @@
---
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/create-recording-rules/create-grafana-managed-recording-rules/
description: Recording rules allow you to pre-compute expensive queries in advance and save the results as a new set of time series. Grafana-managed recording rules can create a recording rule for any data source supported by alerting.
keywords:
- grafana
- alerting
- guide
- rules
- recording rules
- configure
labels:
products:
- cloud
- enterprise
- oss
title: Create Grafana-managed recording rules
weight: 401
refs:
expressions:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/queries-conditions/#expression-queries
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/queries-conditions/#expression-queries
create-recording-rules:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-recording-rules/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/create-recording-rules/
alerting-data-sources:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/#supported-data-sources
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/#supported-data-sources
configure-grafana-min-interval:
- pattern: /docs/
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#min_interval
configure-feature-toggles:
- pattern: /docs/
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/feature-toggles/
---
# Create Grafana-managed recording rules
[Recording rules](ref:create-recording-rules) allow you to periodically pre-compute frequently used or computationally expensive queries, saving the results as a new time series metric.
Alert rules and dashboards can then query the new metric resulting from the recording rule. This is faster than querying real-time data and can help to reduce system load.
Grafana does not contain an embedded time-series database to store recording rule results. You must bring your own Prometheus-compatible database to store the series generated by recording rules.
Grafana-managed recording rules offer the same Prometheus-like semantics but allow you to query [data sources supported by alerting](ref:alerting-data-sources). Additionally, you can use recording rules to import and map data from other data sources into Prometheus.
{{< admonition type="note" >}}
Grafana-managed recording rules are enabled by default in Grafana Cloud.
In Grafana OSS and Enterprise, you must enable them by following the [Before you begin](#before-you-begin) instructions.
{{< /admonition >}}
To configure Grafana-managed recording rules, complete the following steps.
## Before you begin
This section only applies to Grafana OSS and Grafana Enterprise.
First, enable the `grafanaManagedRecordingRules` [feature flag](ref:configure-feature-toggles).
Then, enable the feature by setting `enabled = true` in the `[recording_rules]` section of the Grafana config .ini. Provide the URL of your Prometheus-compatible remote-write endpoint in the `url` field, along with optional credentials or headers.
```
[recording_rules]
enabled = true
url = http://my-example-prometheus.local:9090/api/prom/push
basic_auth_username = my-user
basic_auth_password = my-pass
[recording_rules.custom_headers]
X-My-Header = MyValue
```
## Add new recording rule
To create a new Grafana-managed recording rule:
1. Click **Alerts & IRM** -> **Alerting** ->
**Alert rules**.
1. Scroll to the **Grafana-managed section** and click **+New recording rule**.
1. Enter the names to identify your recording rule and metric.
The metric name must be a Prometheus metric name and contain no whitespace. For details, refer to [Prometheus metric names](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
## Define recording rule
Define a query to get the data you want to measure and set the recording rule output.
1. Select a data source.
1. From the **Options** dropdown, specify a time range.
{{< admonition type="note" >}}
Grafana Alerting only supports fixed relative time ranges, for example, `now-24hr: now`.
It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:59:592` or semi-relative time ranges: `now/d to: now`.
{{< /admonition >}}
1. Add a query.
To add multiple queries, click **Add query**.
1. Add one or more [expressions](ref:expressions).
a. For each expression, select either **Classic condition** to create a single recording rule, or choose from the **Math**, **Reduce**, and **Resample** options.
When using Prometheus, you can use an instant vector and built-in functions, so you don't need to add additional expressions.
b. Click **Preview** to verify that the expression is successful.
1. Click **Set as recording rule output** on the query or expression you want to set as your rule output.
## Set evaluation behavior
Use recording rule evaluation to determine how frequently a recording rule should be evaluated.
To do this, you need to make sure that your recording rule is in the right evaluation group with an interval that works best for your use case.
1. Select a folder or click **+ New folder**.
1. Select an evaluation group or click **+ New evaluation group**.
If you are creating a new evaluation group, specify the interval for the group.
All rules within the same group are evaluated concurrently over the same time interval. Every recording rule in a group uses the same evaluation time, meaning that all queries from the same group are always aligned with each other.
1. Before or after creating a recording rule, you have the option to **Pause evaluation** if necessary.
### Advanced configuration
[min_interval](ref:configure-grafana-min-interval) sets the minimum interval to enforce between rule evaluations. The default value is 10s which equals the scheduler interval. Rules are adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as fewer evaluations are scheduled over time.
This setting has precedence over each individual rule frequency. If a rule frequency is lower than this value, then this value is enforced.
This setting applies to both Grafana-managed alert and recording rules.
## Add labels
Optionally, you can add custom labels to the resulting metric by selecting existing key-value pairs from the drop down or entering the new key or value.
## Query the new metric in dashboards or alert rules
Click **Save rule** or **Save rule and exit** to save the rule.
Once saved, the new recording metric is available for use in dashboards and alert rules.

View File

@@ -0,0 +1,84 @@
---
aliases:
- ../../alerting/alerting-rules/create-alerts-panels/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/create-alerts-panels/
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/link-alert-rules-to-panels/
description: Grafana allows you to link alert rules with panels and dashboards. This helps connect alerts with an existing dashboard and informs alert responders on where to investigate.
keywords:
- grafana
- alerting
- panels
- create
- grafana-managed
- data source-managed
labels:
products:
- cloud
- enterprise
- oss
title: Create and link alert rules to panels
weight: 300
refs:
time-series-visualizations:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/time-series/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/time-series/
annotations:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#annotations
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#annotations
view-alert-state-on-panels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/monitor-status/view-alert-state/#view-alert-state-on-panels
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/monitor-status/view-alert-state/#view-alert-state-on-panels
---
# Create and link alert rules to panels
Grafana allows you to link an alert rule to a dashboard panel. This can help you:
- Inform alert responders about where to investigate and which data to examine.
- Visualize the alert state directly from dashboards.
An alert rule is linked to a panel by setting the [`dashboardUId` and `panelId` annotations](ref:annotations). Both annotations must be set together.
## Link alert rules to panels
When configuring the alert rule, you can set the dashboard and panel annotations as shown in this [video](https://youtu.be/ClLp-iSoaSY?si=qKWnvSVaQuvYcuw9&t=170).
1. Configure the alert rule.
1. In the **Configure notification message** section, click **Link dashboard and panel**.
1. Select an existing dashboard, then choose a panel from the selected dashboard.
1. Complete the alert rule configuration and click **Save rule** to initiate the alert rule.
You can then [view the alert state on the panel](ref:view-alert-state-on-panels).
{{< figure src="/media/docs/alerting/panel-displays-alert-state.png" max-width="1200px" caption="A panel displaying the alert status and state changes." >}}
## Create alert rules from panels
To streamline alert creation, you can create an alert rule directly from a panel.
1. Navigate to a dashboard in the **Dashboards** section.
1. Hover over the top-right corner of a panel and click the panel menu icon.
1. From the dropdown menu, select **More...** > **New alert rule**.
1. This opens the **Edit rule** form and pre-fills some values:
- Sets the `dashboardUId` and `panelId` annotations to the corresponding dashboard and panel.
- Sets the alert rule query using the panel query.
1. Complete the alert rule configuration and click **Save rule** to initiate the alert rule.
You can then [view the alert state on the panel](ref:view-alert-state-on-panels).
{{% admonition type="note" %}}
Changes to panel and alert rule queries aren't synchronized. If you change a query, you have to update it in both the panel and the alert rule.
{{% /admonition %}}
## Access linked alert rules from panels
This option is available only in [time series panels](ref:time-series-visualizations). To access alert rules associated to a time series panel, complete the following steps.
1. Hover over the top-right corner of the panel and click the panel menu icon.
1. Click **Edit**.
1. Click the **Alert** tab to view existing alert rules or create a new one.

View File

@@ -0,0 +1,224 @@
---
aliases:
- ../fundamentals/annotation-label/variables-label-annotation/ # /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/annotation-label/variables-label-annotation/
- ../alerting-rules/templating-labels-annotations/ # /docs/grafana/<GRAFANA_VERSION>/alerting-rules/templating-labels-annotations/
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/templates/
description: Learn how to template annotations and labels to include data from queries and expressions in alert messages
keywords:
- grafana
- alerting
- templating
- labels
- annotations
labels:
products:
- cloud
- enterprise
- oss
title: Template annotations and labels
weight: 500
refs:
reference-labels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#labels
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#labels
reference-values:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#values
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#values
annotations:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#annotations
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#annotations
explore:
- pattern: /docs/
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
intro-to-templates:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/templates/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/templates/
alert-rule-template-reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/
alert-rule-template-examples:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/examples/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/examples/
notification-template-reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/
notification-data-reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/#notification-data
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/#notification-data
view-alert-state:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/monitor-status/view-alert-state/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/monitor-status/view-alert-state/
preview-notifications:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/manage-notification-templates/#preview-notification-templates
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/manage-notification-templates/#preview-notification-templates
labels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/latest/alerting/fundamentals/alert-rules/annotation-label/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/
---
# Template annotations and labels
You can use templates to customize alert and notification messages, including dynamic data from alert rule queries.
In Grafana Alerting, you can template alert messages in two ways.
1. **Template annotations and labels**: In the alert rule definition, you can template annotations and labels to include extra information from query data to the alert, adding meaningful details based on the query results.
1. **Template notifications**: You can template notifications to control the content and appearance of your notifications.
## How templating works
In this diagram, you can see the differences between both types of templates.
{{< figure src="/media/docs/alerting/how-notification-templates-works.png" max-width="1200px" alt="How templating works" >}}
Refer to [Templates Introduction](ref:intro-to-templates) for a more detailed explanation of this diagram.
Both types of templates are written in the Go templating system. However, it's important to understand that variables and functions used in notification templates are different from those used in annotation and label templates.
1. **Template annotations and labels**: These templates add extra information to individual alert instances. Template variables like [`$labels`](ref:reference-labels) and [`$values`](ref:reference-values) represent alert query data of the individual alert instance.
1. **Template notifications**: Notification templates format the notification content for a group of alerts. Variables like [`.Alerts`](ref:notification-data-reference) include all firing and resolved alerts in the notification.
## Template annotations
[Annotations](ref:annotations) add additional information to alert instances and are often used to help identify the alert and guide responders on how to address the issue.
Annotations are key-value pairs defined in the alert rule. They can contain plain text or template code that is evaluated when the alert fires.
Grafana includes several optional annotations, such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`, which can be edited in the alert rule. You can also create your custom annotations. For example, you might create a new annotation named `location` to report the location of the system that triggered the alert.
Heres an example of a `summary` annotation explaining why the alert was triggered, using plain text.
```
CPU usage has exceeded 80% for the last 5 minutes.
```
However, if you want to display dynamic query values in annotations, you need to use template code. Common use cases include:
- Displaying the query value that triggered the alert.
- Highlighting label information that identifies the alert, such as the environment, instance, or region.
- Providing specific instructions based on query values.
- Customizing runbook links depending on query labels.
- Including contact information based on query labels.
For instance, you can template the previous example to display the specific instance and CPU value that triggered the alert.
```
CPU usage for {{ $labels.instance }} has exceeded 80% ({{ $values.A.Value }}) for the last 5 minutes.
```
Alternatively, you can use the `index` function to print query values.
```
CPU usage for {{ index $labels "instance" }} has exceeded 80% ({{ index $values "A" }}) for the last 5 minutes.
```
The result of the annotation would be as follows.
```
CPU usage for Instance 1 has exceeded 80% (81.2345) for the last 5 minutes.
```
### How to template an annotation
Complete the following steps to template an annotation.
1. Navigate to **Alerts & IRM** -> **Alert rules** -> create or edit an alert rule.
1. Scroll down to the **Configure notification message** section.
1. Copy in your template in the corresponding annotation field (`summary`, `description`, `runbook_url`, `custom`).
### Preview annotation templates
You can template annotations when creating or editing an alert rule.
{{< figure src="/media/docs/alerting/alert-rule-using-annotation-template.png" max-width="1200px" alt="An alert rule templating the annotation summary" >}}
Two common methods are used to test and preview annotation templates:
1. Trigger the alert and [view the alert instance state in the Grafana UI](ref:view-alert-state), where all annotations of the alert instance are displayed.
1. Use a notification template that displays all annotations, then [preview the notification template](ref:preview-notifications) using the alert instance.
## Template labels
The set of [labels](ref:labels) for an alert instance is used to uniquely identify that alert among all other alert instances.
Labels determine how alerts are routed and managed for notifications, making their design key to the effectiveness of your alerting system.
Labels can be returned from an alert rule query, such as the `pod` label in a Kubernetes Prometheus query. You can also define additional labels in the alert rule to provide extra information for processing alerts.
Like annotations, labels are key-value pairs that can contain plain text or template code evaluated when the alert fires.
Template labels when the labels returned by your queries are insufficient. For instance:
- A new label based on a query value can group a subset of alerts differently, changing how notifications are sent.
- A new label based on a query value can be used in a notification policy to alter the notification contact point.
Heres an example of templating a `severity` label based on the query value.
```
{{ if (gt $values.A.Value 90.0) -}}
critical
{{ else if (gt $values.A.Value 80.0) -}}
high
{{ else if (gt $values.A.Value 60.0) -}}
medium
{{ else -}}
low
{{- end }}
```
In this example, the value of the `severity` label is determined by the query value, and the possible options are `critical`, `high`, `medium`, or `low`. You can then use the `severity` label to change their notifications—for instance, sending `critical` alerts immediately or routing `low` alerts to a specific team for further review.
{{% admonition type="note" %}}
You should avoid displaying query values in labels, as this may create numerous unique alert instances—one for each distinct label value. Instead, use annotations for query values.
{{% /admonition %}}
### How to template a label
Complete the following steps to template a label.
1. Navigate to **Alerts & IRM** -> **Alert rules** -> create or edit an alert rule.
1. Scroll down to the **Configure labels and notifications** section.
1. Click **+ Add labels**.
1. Enter a **key** that identifies the label.
1. Copy in your template in the **value** field.
### Preview label templates
You can template label values when creating or editing an alert rule.
To preview label values, select `Use notification policy`, and then click on `Preview routing`.
{{< figure src="/media/docs/alerting/alert-instance-routing-preview.png" max-width="1200px" alt="Routing preview displays label values" >}}
## More information
For further details on how to template alert rules, refer to:
- [Annotation and label template reference](ref:alert-rule-template-reference)
- [Annotation and label examples](ref:alert-rule-template-examples)
{{< admonition type="tip" >}}
For a practical example of templating, refer to our [Getting Started with Templating tutorial](https://grafana.com/tutorials/alerting-get-started-pt4/).
{{< /admonition >}}

View File

@@ -0,0 +1,312 @@
---
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/templates/examples/
description: Examples of templating labels and annotations in Grafana alert rules
keywords:
- grafana
- alerting
- templating
- labels
- annotations
labels:
products:
- cloud
- enterprise
- oss
title: Labels and annotations template examples
menuTitle: Examples
weight: 102
refs:
labels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#labels
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#labels
annotations:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#annotations
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#annotations
alert-rule-templates:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/
- pattern: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/
reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/
reference-labels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#labels
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#labels
reference-values:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#values
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#values
reference-humanize:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#humanize
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#humanize
reference-humanizepercentage:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#humanizepercentage
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#humanizepercentage
reference-match:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#match
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#match
reference-functions:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#functions
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#functions
language-functions:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/language/#functions
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/language/#functions
language-index:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/language/#functions
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/language/#functions
language:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/language
- pattern: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/language
---
# Labels and annotations template examples
Templating allows you to add dynamic data from queries to alert labels and annotations. Dynamic data enhances alert context, making it easier for responders to quickly assess and address the issue.
This page provides common examples for templating labels and annotations. For more information on templating, refer to:
- [Template annotations and labels](ref:alert-rule-templates)
- [Annotation and label template reference](ref:reference)
- [Alerting template language](ref:language)
## Annotation example
[Annotations](ref:annotations) add extra details to alert instances and are often used to provide helpful information for identifying the issue and guiding the response.
A common use case for annotations is to display the specific query value or threshold that triggered the alert.
For example, you can display the query value from the [`$values`](ref:reference-values) variable to inform about the CPU value that triggered the alert.
```
CPU usage has exceeded 80% ({{ $values.A.value }}) for the last 5 minutes.
```
Alternatively, you can use the [`index()`](ref:language-index) function to retrieve the query value as follows.
```
CPU usage has exceeded 80% ({{ index $values "A" }}) for the last 5 minutes.
```
```template_output
CPU usage has exceeded 80% (81.2345) for the last 5 minutes.
```
### Include labels for extra details
To provide additional context, you can include labels from the query using the [`$labels`](ref:reference-labels) variable.
For instance, the previous case could also include the affected `instance`.
```
CPU usage for {{ $labels.instance }} has exceeded 80% ({{ $values.A.Value }}) for the last 5 minutes.
```
```template_output
CPU usage for Instance 1 has exceeded 80% (81.2345) for the last 5 minutes.
```
You can incorporate any labels returned by the query into the template. For instance, the following template includes information about the environment and region where the alert occurred.
```
Alert triggered in {{ $labels.environment }} on {{ $labels.region }} region.
```
```template_output
Alert triggered in production on AMER region.
```
### Print a range query
To print the value of an instant query you can print its Ref ID using the `index` function or the `$values` variable:
```
{{ $values.A.Value }}
```
For range queries, reduce them from a time series to an instant vector using a reduce expression. You can then print the result by referencing its Ref ID. For example, if the reduce expression averages `A` with the Ref ID `B`, you would then print `$values.B`:
```
{{ $values.B.Value }}
```
### Humanize the value of a query
To print the humanized value of an instant query, use the [`humanize`](ref:reference-humanize) function:
```
{{ humanize $values.A.Value }}
```
Alternatively:
```
{{ humanize (index $values "A").Value }}
```
```template_output
554.9
```
To print the value of an instant query as a percentage, use the [`humanizePercentage`](ref:reference-humanizepercentage) function:
```
{{ humanizePercentage $values.A.Value }}
```
```template_output
10%
```
For additional functions to display or format data, refer to:
- [Annotation and label template functions](ref:reference-functions)
- [Template language functions](ref:language-functions)
## Label example
[Labels](ref:labels) determine how alerts are routed and managed, ensuring that notifications reach the right teams at the right time. If the labels returned by your queries dont fully capture the necessary context, you can create a new label and sets its value based on query data.
### Based on query value
Heres an example of creating a `severity` label based on a query value:
```go
{{- if (gt $values.A.Value 90.0) -}}critical
{{- else if (gt $values.A.Value 80.0) -}}high
{{- else if (gt $values.A.Value 60.0) -}}medium
{{- else -}}low
{{- end -}}
```
In this example, the `severity` label is determined by the query value:
- `critical` for values above 90,
- `high` for values above 80,
- `medium` for values above 60,
- and `low` for anything below.
You can then use the `severity` label to control how alerts are handled. For instance, you could send `critical` alerts immediately, while routing `low` severity alerts to a team for further investigation.
{{% admonition type="note" %}}
You should avoid displaying query values in labels, as this may create many alert instances—one for each distinct label value. Instead, use annotations to convey query values.
{{% /admonition %}}
### Based on query label
You can use labels to differentiate alerts coming from various environments (e.g., production, staging, dev). For example, you may want to add a label that sets the environment based on the instances label. Heres how you can template it:
```go
{{- if eq $labels.instance "prod-server-1" -}}
production
{{- else if eq $labels.instance "staging-server-1" -}}
staging
{{- else -}}
development
{{- end -}}
```
This would print:
- For instance `prod-server-1`, the label would be `production`.
- For `staging-server-1`, the label would be `staging`.
- All other instances would be labeled `development`.
To make this template more flexible, you can use a regular expression that matches the instance name with the instance name prefix using the [`match()`](ref:reference-match) function:
```go
{{- if match "^prod-server-.*" $labels.instance -}}
production
{{- else if match "^staging-server-.*" $labels.instance -}}
staging
{{- else -}}
development
{{- end -}}
```
{{< collapse title="Legacy Alerting templates" >}}
## Legacy Alerting templates
For users working with Grafana's legacy alerting system, templates can still be utilized to extract useful information from alert conditions. However, it's important to note that you cannot use `$labels` to print labels from the query if you are using classic conditions, and must use `$values` instead. The reason for this is classic conditions discard these labels to enforce uni-dimensional behavior (at most one alert per alert rule). If classic conditions didn't discard these labels, then queries that returned many time series would cause alerts to flap between firing and resolved constantly as the labels would change every time the alert rule was evaluated.
Instead, the `$values` variable contains the reduced values of all time series for all conditions that are firing. For example, if you have an alert rule with a query A that returns two time series, and a classic condition B with two conditions, then `$values` would contain `B0`, `B1`, `B2` and `B3`. If the classic condition B had just one condition, then `$values` would contain just `B0` and `B1`.
#### Print all labels from a classic condition
To print all labels of all firing time series use the following template (make sure to replace `B` in the regular expression with the Ref ID of the classic condition if it's different):
```go
{{ range $k, $v := $values -}}
{{ if (match "B[0-9]+" $k) -}}
{{ $k }}: {{ $v.Labels }}{{ end }}
{{ end }}
```
For example, a classic condition for two time series exceeding a single condition would print:
```
B0: instance=server1
B1: instance=server2
```
If the classic condition has two or more conditions, and a time series exceeds multiple conditions at the same time, then its labels will be duplicated for each condition that is exceeded:
```
B0: instance=server1
B1: instance=server2
B2: instance=server1
B3: instance=server2
```
If you need to print unique labels you should consider changing your alert rules from uni-dimensional to multi-dimensional instead. You can do this by replacing your classic condition with reduce and math expressions.
#### Print all values from a classic condition
To print all values from a classic condition take the previous example and replace `$v.Labels` with `$v.Value`:
```go
{{ range $k, $v := $values -}}
{{ if (match "B[0-9]+" $k) -}}
{{ $k }}: {{ $v.Value }}{{ end }}
{{ end }}
```
For example, a classic condition for two time series exceeding a single condition would print:
```
B0: 81.2345
B1: 84.5678
```
If the classic condition has two or more conditions, and a time series exceeds multiple conditions at the same time, then `$values` will contain the values of all conditions:
```
B0: 81.2345
B1: 92.3456
B2: 84.5678
B3: 95.6789
```
{{< /collapse >}}

View File

@@ -0,0 +1,81 @@
---
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/template-notifications/language/
description: Use Go template language to create your notification and alert rule templates
keywords:
- grafana
- alerting
- templates
- write templates
labels:
products:
- cloud
- enterprise
- oss
title: Alerting template language
menuTitle: Template language
refs:
alert-rule-template-reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/
alert-rule-template-reference-variables:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/reference/#variables
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/reference/#variables
notification-template-reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/
reference-notificationdata:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/#notification-data
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/#notification-data
---
# Alerting template language
Notification templates and alert rule templates, such as annotations and labels, both use the Go template language, [text/template](https://pkg.go.dev/text/template).
Both types of templates can use the same keywords, functions, and comparison operators of the Go template language, such as `range`, `if`, `and`, `index`, `eq`, and more.
However, it's important to note that because notifications and alert rules operate in distinct contexts, some additional variables and functions are only available for either notification or alert rule templates. Refer to:
- [Annotation and label template reference](ref:alert-rule-template-reference)
- [Notification template reference](ref:notification-template-reference)
This documentation provides an overview of the functions and operators of the Go template language that are available for both notification and alert rule templates.
## Print
To print the value of something, use `{{` and `}}`. You can print the value of a [variable](#variables), a field of a variable, the result of a function, or the value of dot.
```go
{{ $values }}
{{ $values.A.Value }}
{{ humanize 1000.0 }}
{{ .Alerts }}
```
## Dot
In `text/template`, there is a special cursor called dot, written as `.`. You can think of this cursor as a variable whose value changes depending on where in the template it is used.
At the start of notification templates, dot (`.`) refers to [Notification Data](ref:reference-notificationdata).
```go
{{ .Alerts }}
```
In annotation and label templates, dot (`.`) is initialized with all alert data. Its recommended to use the [`$labels` and `$values` variables](ref:alert-rule-template-reference-variables) instead to directly access the alert labels and query values.
{{% admonition type="note" %}}
Dot (`.`) might refer to something else when used in a [range](#range), a [with](#with), or when writing [templates](#templates) used in other templates.
{{% /admonition %}}
[//]: <> (The above section is not included in the shared file because `refs` links are not supported in shared files.)
{{< docs/shared lookup="alerts/template-language.md" source="grafana" version="<GRAFANA_VERSION>" >}}

View File

@@ -0,0 +1,455 @@
---
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/templates/reference/
description: Reference for variables and functions in Grafana alert rule templating.
keywords:
- grafana
- alerting
- templating
- labels
- annotations
labels:
products:
- cloud
- enterprise
- oss
title: Annotation and label template reference
menuTitle: Template reference
weight: 101
refs:
label-types:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#label-types
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#label-types
notification-template-reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/
language:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/language/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/language/
language-functions:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/language/#functions
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/language/#functions
language-index:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/language/#functions
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/language/#functions
print-all-labels-from-a-classic-condition:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/examples/#print-all-labels-from-a-classic-condition
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/examples/#print-all-labels-from-a-classic-condition
template-annotations-and-labels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/
explore:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
---
# Annotation and label template reference
Annotations and labels in alert rules can be defined using plain text. However, you can also define templates to customize their values with dynamic data from alert rule queries.
For example, you can template the `summary` annotation to include information from query values, providing relevant alert context for responders. Refer to [Template annotations and labels](ref:template-annotations-and-labels) for various use cases.
In templates, variables represent dynamic values from queries, while functions perform actions to transform or format this data.
## Variables
Variables represent dynamic values from alert rule queries that can be displayed or accessed in your templates.
The `$` and `.` symbols are used to reference variables and their properties. You can reference variables directly in your alert rule definitions using the `$` symbol followed by the variable name. Similarly, you can access properties of variables using the dot (`.`) notation in alert rule templates.
```
{{ $values.A.Value }}
```
Templates are based on the **Go templating system**. Refer to [Template language](ref:language) for additional information.
The following variables are available when templating annotations and labels:
| Variables | Description |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| [$labels](#labels) | Contains all labels from the query, only query labels. |
| [$values](#values) | Contains the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs. |
| [$value](#value) | A string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule. |
### $labels
The `$labels` variable contains all labels from the query. It excludes [user-configured and reserved labels](ref:label-types), containing only query labels.
{{< figure src="/media/docs/alerting/query-labels-and-values.png" max-width="1200px" caption="An alert rule displaying labels and value from a query." >}}
For example, suppose you have a query that returns CPU usage for all of your servers, and you have an alert rule that fires when any of your servers have exceeded 80% CPU usage for the last 5 minutes. You want to add a summary annotation to the alert that tells you which server is experiencing high CPU usage. With the `$labels` variable you can write a template that prints a human-readable sentence such as:
```
CPU usage for {{ $labels.instance }} has exceeded 80% for the last 5 minutes
```
The outcome of this template would be:
```
CPU usage for server1 has exceeded 80% for the last 5 minutes
```
> If you are using a classic condition then `$labels` will not contain any labels from the query. Classic conditions discard these labels in order to enforce uni-dimensional behavior (at most one alert per alert rule). If you want to use labels from the query in your template then use the example [here](ref:print-all-labels-from-a-classic-condition).
### $values
The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs (e.g, `A`, `B`, `C`, etc.). It does not contain the results of range queries, as they can return hundreds or thousands of rows.
Each Ref IDs, such as `$values.A`, has the following properties
| Property | Type | Description |
| -------- | --------------- | ------------------------------------------------------------ |
| `Value` | Float | The value returned by the instant query or expression. |
| `Labels` | Key/value pairs | The labels associated with the instance query or expression. |
Here's the previous example printing now the value of the instant query with Ref ID `A`:
```
{{ $values.A.Value }} CPU usage for {{ $labels.instance }} over the last 5 minutes.
```
If the alert has the label `instance=server1` and the query returns `81.2345`, the template would print:
```
81.2345 CPU usage for instance1 over the last 5 minutes.
```
If the query in Ref ID `A` is a range query rather than an instant query then add a reduce expression with Ref ID `B` and replace `$values.A.Value` with `$values.B.Value`:
```
{{ $values.B.Value }} CPU usage for {{ $labels.instance }} over the last 5 minutes.
```
Alternatively, you can use the `index()` function to retrieve the query value:
```
{{ index $values "B" }} CPU usage for {{ index $labels "instance" }} over the last 5 minutes.
```
#### $value
The `$value` variable is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule.
This example prints the `$value` variable:
```
{{ $value }}: CPU usage has exceeded 80% for the last 5 minutes.
```
It would display something like this:
```
[ var='A' labels={instance=instance1} value=81.234 ]: CPU usage has exceeded 80% for the last 5 minutes.
```
Instead, we recommend using [$values](#values), which contains the same information as `$value` but is structured in an easier-to-use table format.
## Functions
Functions can perform actions in templates such as transforming or formatting data.
Note that the [functions provided by Go's template language](ref:language-functions), such as `index`, `and`, `printf`, and `len`, are available, along with many others.
In addition, the following functions are also available for templating annotations and labels:
**Numbers**
| Name | Arguments | Returns | Description |
| ----------------------------------------- | ---------------- | ------- | ---------------------------------------------------------------- |
| [humanize](#humanize) | number or string | string | Humanizes decimal numbers. |
| [humanize1024](#humanize1024) | number or string | string | Like `humanize`, but but uses 1024 as the base rather than 1000. |
| [humanizeDuration](#humanizeduration) | number or string | string | Humanizes a duration in seconds. |
| [humanizePercentage](#humanizepercentage) | number or string | string | Humanizes a ratio value to a percentage. |
| [humanizeTimestamp](#humanizetimestamp) | number or string | string | Humanizes a Unix timestamp. |
| [toTime](#totime) | number or string | time | Converts a Unix timestamp in seconds to time. |
**Strings**
| Name | Arguments | Returns | Description |
| ------------------------------- | -------------------------- | ------- | --------------------------------------------------------------------------------------------- |
| [title](#title) | string | string | Capitalizes the first character of each word. |
| [toUpper](#toupper) | string | string | Returns all text in uppercase. |
| [toLower](#tolower) | string | string | Returns all text in lowercase. |
| [stripPort](#stripport) | string | string | Returns only host. |
| [match](#match) | pattern, text | boolean | Matches the text against a regular expression pattern. |
| [reReplaceAll](#rereplaceall) | pattern, replacement, text | string | Replaces text matching the regular expression. |
| [graphLink](#graphlink) | expr | string | Returns the path to the graphical view in `Explore` for the given expression and data source. |
| [tableLink](#tablelink) | expr | string | Returns the path to the tabular view in `Explore` for the given expression and data source. |
| [parseDuration](#parseduration) | string | float | Parses a duration string such as "1h" into the number of seconds it represents. |
| [stripDomain](#stripdomain) | string | string | Returns the result of removing the domain part of a FQDN. |
**Others**
| Name | Arguments | Returns | Description |
| --------------------------- | ------------- | ---------------------- | -------------------------------------------------------------------------------- |
| [args](#args) | []interface{} | map[string]interface{} | Translates a list of objects to a map with keys arg0, arg1 etc. |
| [safeHtml](#safehtml) | string | string | Marks string as HTML not requiring auto-escaping. |
| [externalURL](#externalurl) | none | string | Returns the external URL of the Grafana server as configured in the ini file(s). |
| [pathPrefix](#pathprefix) | none | string | Returns the path of the Grafana server as configured in the ini file(s). |
For further context on these functions, note that templating in Grafana is based on the [Prometheus template implementation](https://prometheus.io/docs/prometheus/latest/configuration/template_reference/), enabling the use of these functions and Prometheus-like templates for formatting alert messages within Grafana.
#### humanize
The `humanize` function humanizes decimal numbers:
```
{{ humanize 1000.0 }}
```
```
1k
```
#### humanize1024
The `humanize1024` works similar to `humanize` but but uses 1024 as the base rather than 1000:
```
{{ humanize1024 1024.0 }}
```
```
1ki
```
#### humanizeDuration
The `humanizeDuration` function humanizes a duration in seconds:
```
{{ humanizeDuration 60.0 }}
```
```
1m 0s
```
#### humanizePercentage
The `humanizePercentage` function humanizes a ratio value between 0 and 1 to a percentage:
```
{{ humanizePercentage 0.2 }}
```
```
20%
```
#### humanizeTimestamp
The `humanizeTimestamp` function humanizes a Unix timestamp:
```
{{ humanizeTimestamp 1577836800.0 }}
```
```
2020-01-01 00:00:00 +0000 UTC
```
#### toTime
The `toTime` function converts a Unix timestamp in seconds to time.:
```
{{ toTime 1727802106 }}
```
```
2024-10-01 17:01:46 +0000 UTC
```
#### title
The `title` function capitalizes the first character of each word:
```
{{ title "hello, world!" }}
```
```
Hello, World!
```
#### toUpper
The `toUpper` function returns all text in uppercase:
```
{{ toUpper "Hello, world!" }}
```
```
HELLO, WORLD!
```
#### toLower
The `toLower` function returns all text in lowercase:
```
{{ toLower "Hello, world!" }}
```
```
hello, world!
```
#### stripPort
The `stripPort` splits string into host and port, then returns only host:
```
{{ stripPort "example.com:8080" }}
```
```
example.com
```
#### match
The `match` function matches the text against a regular expression pattern:
```
{{ match "a.*" "abc" }}
```
```
true
```
#### reReplaceAll
The `reReplaceAll` function replaces text matching the regular expression:
```
{{ reReplaceAll "localhost:(.*)" "example.com:$1" "localhost:8080" }}
```
```
example.com:8080
```
#### graphLink
The `graphLink` function returns the path to the graphical view in [Explore](ref:explore) for the given expression and data source:
```
{{ graphLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}
```
```
/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":false,"range":true}]
```
#### parseDuration
The `parseDuration` function parses a duration string such as "1h" into the number of seconds it represents.
```
{{ parseDuration "1h" }}
```
```
3600
```
#### stripDomain
The `stripDomain` removes the domain part of a FQDN, leaving port untouched:
```
{{ stripDomain "example.com:8080" }}
```
```
example:8080
```
#### tableLink
The `tableLink` function returns the path to the tabular view in [Explore](ref:explore) for the given expression and data source:
```
{{ tableLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}
```
```
/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":true,"range":false}]
```
#### args
The `args` function translates a list of objects to a map with keys arg0, arg1 etc. This is intended to allow multiple arguments to be passed to templates:
```
{{define "x"}}{{.arg0}} {{.arg1}}{{end}}{{template "x" (args 1 "2")}}
```
```
1 2
```
#### safeHtml
The `safeHtml` function marks string as HTML not requiring auto-escaping:
```
{{ safeHtml "<b>Text</b>"}}
```
```
<b>Text</b>
```
#### externalURL
The `externalURL` function returns the external URL of the Grafana server as configured in the ini file(s):
```
{{ externalURL }}
```
```
https://example.com/grafana
```
#### pathPrefix
The `pathPrefix` function returns the path of the Grafana server as configured in the ini file(s):
```
{{ pathPrefix }}
```
```
/grafana
```
## Differences with notification templates
Both notification templates and alert rule templates use the Go templating system. However, the [functions and variables available in notification templates](ref:notification-template-reference) differ from those used in annotations and labels templates, which are described in this documentation.
Annotation and label templates operate in the context of an individual alert instance, while notification templates apply to a notification that includes a group of alert(s).
For example, notification templates provide the `.Alerts` variable, which includes the list of all firing and resolved alerts in the notification. This variable is not available in alert rule templates, which operate within the context of a single alert instance.
Additionally, you cannot reuse templates for labels and annotations as you can with notification templates. Instead, you need to write each template inline within the label or annotation fields and manually copy them wherever you want to reuse the templates.

View File

@@ -1,459 +0,0 @@
---
aliases:
- ../fundamentals/annotation-label/variables-label-annotation/ # /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/annotation-label/variables-label-annotation/
canonical: https://grafana.com/docs/grafana/latest/alerting/alerting-rules/templating-labels-annotations/
description: Learn about how to template labels and annotations
keywords:
- grafana
- alerting
- templating
- labels
- annotations
labels:
products:
- cloud
- enterprise
- oss
title: Template labels and annotations
weight: 500
refs:
explore:
- pattern: /docs/
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
---
# Template labels and annotations
You can use templates to include data from queries and expressions in labels and annotations. For example, you might want to set the severity label for an alert based on the value of the query, or use the instance label from the query in a summary annotation so you know which server is experiencing high CPU usage.
When using custom labels with templates it is important to make sure that the label value does not change between consecutive evaluations of the alert rule as this will end up creating large numbers of distinct alerts. However, it is OK for the template to produce different label values for different alerts. For example, do not put the value of the query in a custom label as this will end up creating a new set of alerts each time the value changes. Instead use annotations.
All templates should be written in [text/template](https://pkg.go.dev/text/template). Regardless of whether you are templating a label or an annotation, you should write each template inline inside the label or annotation that you are templating. This means you cannot share templates between labels and annotations, and instead you will need to copy templates wherever you want to use them.
Each template is evaluated whenever the alert rule is evaluated, and is evaluated for every alert separately. For example, if your alert rule has a templated summary annotation, and the alert rule has 10 firing alerts, then the template will be executed 10 times, once for each alert. You should try to avoid doing expensive computations in your templates as much as possible.
{{% admonition type="caution" %}}
Extra whitespace in label templates can break matches with notification policies.
{{% /admonition %}}
## Variables
In Grafana templating, the `$` and `.` symbols are used to reference variables and their properties. You can reference variables directly in your alert rule definitions using the `$` symbol followed by the variable name. Similarly, you can access properties of variables using the dot (`.`) notation within alert rule definitions.
The following variables are available to you when templating labels and annotations:
### The labels variable
The `$labels` variable contains all labels from the query. For example, suppose you have a query that returns CPU usage for all of your servers, and you have an alert rule that fires when any of your servers have exceeded 80% CPU usage for the last 5 minutes. You want to add a summary annotation to the alert that tells you which server is experiencing high CPU usage. With the `$labels` variable you can write a template that prints a human-readable sentence such as:
```
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
```
> If you are using a classic condition then `$labels` will not contain any labels from the query. Classic conditions discard these labels in order to enforce uni-dimensional behavior (at most one alert per alert rule). If you want to use labels from the query in your template then use the example [here](#print-all-labels-from-a-classic-condition).
### The value variable
The `$value` variable is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule. It does not contain the results of range queries, as these can return anywhere from 10s to 10,000s of rows or metrics. If it did, for especially large queries a single alert could use 10s of MBs of memory and Grafana would run out of memory very quickly.
To print the `$value` variable in the summary you would write something like this:
```
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
```
And would look something like this:
```
CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
```
Here `var='A'` refers to the instant query with Ref ID A, `labels={instance=instance1}` refers to the labels, and `value=81.234` refers to the average CPU usage over the last 5 minutes.
If you want to print just some of the string instead of the full string then use the `$values` variable. It contains the same information as `$value`, but in a structured table, and is much easier to use then writing a regular expression to match just the text you want.
### The values variable
The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs.
To print the value of the instant query with Ref ID A:
```
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
```
For example, given an alert with the labels `instance=server1` and an instant query with the value `81.2345`, this would print:
```
CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
```
If the query in Ref ID A is a range query rather than an instant query then add a reduce expression with Ref ID B and replace `(index $values "A")` with `(index $values "B")`:
```
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "B" }}
```
## Examples
The following examples attempt to show the most common use-cases we have seen for templates. You can use these examples verbatim, or adapt them as necessary for your use case. For more information on how to write text/template refer see [the beginner's guide to alert notification templates in Grafana](https://grafana.com/blog/2023/04/05/grafana-alerting-a-beginners-guide-to-templating-alert-notifications/).
### Print all labels, comma separated
To print all labels, comma separated, print the `$labels` variable:
```
{{ $labels }}
```
For example, given an alert with the labels `alertname=High CPU usage`, `grafana_folder=CPU alerts` and `instance=server1`, this would print:
```
alertname=High CPU usage, grafana_folder=CPU alerts, instance=server1
```
> If you are using classic conditions then `$labels` will not contain any labels from the query. Refer to [the $labels variable](#the-labels-variable) for more information.
### Print all labels, one per line
To print all labels, one per line, use a `range` to iterate over each key/value pair and print them individually. Here `$k` refers to the name and `$v` refers to the value of the current label:
```
{{ range $k, $v := $labels -}}
{{ $k }}={{ $v }}
{{ end }}
```
For example, given an alert with the labels `alertname=High CPU usage`, `grafana_folder=CPU alerts` and `instance=server1`, this would print:
```
alertname=High CPU usage
grafana_folder=CPU alerts
instance=server1
```
> If you are using classic conditions then `$labels` will not contain any labels from the query. Refer to [the $labels variable](#the-labels-variable) for more information.
### Print an individual label
To print an individual label use the `index` function with the `$labels` variable:
```
The host {{ index $labels "instance" }} has exceeded 80% CPU usage for the last 5 minutes
```
For example, given an alert with the labels `instance=server1`, this would print:
```
The host server1 has exceeded 80% CPU usage for the last 5 minutes
```
> If you are using classic conditions then `$labels` will not contain any labels from the query. Refer to [the $labels variable](#the-labels-variable) for more information.
### Print the value of a query
To print the value of an instant query you can print its Ref ID using the `index` function and the `$values` variable:
```
{{ index $values "A" }}
```
For example, given an instant query that returns the value 81.2345, this will print:
```
81.2345
```
To print the value of a range query you must first reduce it from a time series to an instant vector with a reduce expression. You can then print the result of the reduce expression by using its Ref ID instead. For example, if the reduce expression takes the average of A and has the Ref ID B you would write:
```
{{ index $values "B" }}
```
### Print the humanized value of a query
To print the humanized value of an instant query use the `humanize` function:
```
{{ humanize (index $values "A").Value }}
```
For example, given an instant query that returns the value 81.2345, this will print:
```
81.234
```
To print the humanized value of a range query you must first reduce it from a time series to an instant vector with a reduce expression. You can then print the result of the reduce expression by using its Ref ID instead. For example, if the reduce expression takes the average of A and has the Ref ID B you would write:
```
{{ humanize (index $values "B").Value }}
```
### Print the value of a query as a percentage
To print the value of an instant query as a percentage use the `humanizePercentage` function:
```
{{ humanizePercentage (index $values "A").Value }}
```
This function expects the value to be a decimal number between 0 and 1. If the value is instead a decimal number between 0 and 100 you can either divide it by 100 in your query or using a math expression. If the query is a range query you must first reduce it from a time series to an instant vector with a reduce expression.
### Set a severity from the value of a query
To set a severity label from the value of a query use an if statement and the greater than comparison function. Make sure to use decimals (`80.0`, `50.0`, `0.0`, etc) when doing comparisons against `$values` as text/template does not support type coercion. You can find a list of all the supported comparison functions [here](https://pkg.go.dev/text/template#hdr-Functions).
```
{{ if (gt $values.A.Value 80.0) -}}
high
{{ else if (gt $values.A.Value 50.0) -}}
medium
{{ else -}}
low
{{- end }}
```
### Print all labels from a classic condition
You cannot use `$labels` to print labels from the query if you are using classic conditions, and must use `$values` instead. The reason for this is classic conditions discard these labels to enforce uni-dimensional behavior (at most one alert per alert rule). If classic conditions didn't discard these labels, then queries that returned many time series would cause alerts to flap between firing and resolved constantly as the labels would change every time the alert rule was evaluated.
Instead, the `$values` variable contains the reduced values of all time series for all conditions that are firing. For example, if you have an alert rule with a query A that returns two time series, and a classic condition B with two conditions, then `$values` would contain `B0`, `B1`, `B2` and `B3`. If the classic condition B had just one condition, then `$values` would contain just `B0` and `B1`.
To print all labels of all firing time series use the following template (make sure to replace `B` in the regular expression with the Ref ID of the classic condition if it's different):
```
{{ range $k, $v := $values -}}
{{ if (match "B[0-9]+" $k) -}}
{{ $k }}: {{ $v.Labels }}{{ end }}
{{ end }}
```
For example, a classic condition for two time series exceeding a single condition would print:
```
B0: instance=server1
B1: instance=server2
```
If the classic condition has two or more conditions, and a time series exceeds multiple conditions at the same time, then its labels will be duplicated for each condition that is exceeded:
```
B0: instance=server1
B1: instance=server2
B2: instance=server1
B3: instance=server2
```
If you need to print unique labels you should consider changing your alert rules from uni-dimensional to multi-dimensional instead. You can do this by replacing your classic condition with reduce and math expressions.
### Print all values from a classic condition
To print all values from a classic condition take the previous example and replace `$v.Labels` with `$v.Value`:
```
{{ range $k, $v := $values -}}
{{ if (match "B[0-9]+" $k) -}}
{{ $k }}: {{ $v.Value }}{{ end }}
{{ end }}
```
For example, a classic condition for two time series exceeding a single condition would print:
```
B0: 81.2345
B1: 84.5678
```
If the classic condition has two or more conditions, and a time series exceeds multiple conditions at the same time, then `$values` will contain the values of all conditions:
```
B0: 81.2345
B1: 92.3456
B2: 84.5678
B3: 95.6789
```
## Functions
The following functions are available to you when templating labels and annotations:
### args
The `args` function translates a list of objects to a map with keys arg0, arg1 etc. This is intended to allow multiple arguments to be passed to templates:
```
{{define "x"}}{{.arg0}} {{.arg1}}{{end}}{{template "x" (args 1 "2")}}
```
```
1 2
```
### externalURL
The `externalURL` function returns the external URL of the Grafana server as configured in the ini file(s):
```
{{ externalURL }}
```
```
https://example.com/grafana
```
### graphLink
The `graphLink` function returns the path to the graphical view in [Explore](ref:explore) for the given expression and data source:
```
{{ graphLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}
```
```
/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":false,"range":true}]
```
### humanize
The `humanize` function humanizes decimal numbers:
```
{{ humanize 1000.0 }}
```
```
1k
```
### humanize1024
The `humanize1024` works similar to `humanize` but but uses 1024 as the base rather than 1000:
```
{{ humanize1024 1024.0 }}
```
```
1ki
```
### humanizeDuration
The `humanizeDuration` function humanizes a duration in seconds:
```
{{ humanizeDuration 60.0 }}
```
```
1m 0s
```
### humanizePercentage
The `humanizePercentage` function humanizes a ratio value to a percentage:
```
{{ humanizePercentage 0.2 }}
```
```
20%
```
### humanizeTimestamp
The `humanizeTimestamp` function humanizes a Unix timestamp:
```
{{ humanizeTimestamp 1577836800.0 }}
```
```
2020-01-01 00:00:00 +0000 UTC
```
### match
The `match` function matches the text against a regular expression pattern:
```
{{ match "a.*" "abc" }}
```
```
true
```
### pathPrefix
The `pathPrefix` function returns the path of the Grafana server as configured in the ini file(s):
```
{{ pathPrefix }}
```
```
/grafana
```
### tableLink
The `tableLink` function returns the path to the tabular view in [Explore](ref:explore) for the given expression and data source:
```
{{ tableLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}
```
```
/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":true,"range":false}]
```
### title
The `title` function capitalizes the first character of each word:
```
{{ title "hello, world!" }}
```
```
Hello, World!
```
### toLower
The `toLower` function returns all text in lowercase:
```
{{ toLower "Hello, world!" }}
```
```
hello, world!
```
### toUpper
The `toUpper` function returns all text in uppercase:
```
{{ toUpper "Hello, world!" }}
```
```
HELLO, WORLD!
```
### reReplaceAll
The `reReplaceAll` function replaces text matching the regular expression:
```
{{ reReplaceAll "localhost:(.*)" "example.com:$1" "localhost:8080" }}
```
```
example.com:8080
```

View File

@@ -14,29 +14,75 @@ menuTitle: Configure notifications
title: Configure notifications
weight: 125
refs:
contact-points:
intro-notifications:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/contact-points/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/contact-points/
notification-policies:
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/
configure-contact-points:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/notification-policies/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/
templates-page:
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/
configure-notification-policies:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/templates/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-notification-policy/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/templates/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-notification-policy/
configure-templates:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/
configure-silences:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-silence/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-silence/
configure-mute-timings:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/mute-timings/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/mute-timings/
---
# Configure notifications
Choose how, when, and where to send your alert notifications.
Configuring how, when, and where to send alert notifications is an essential part of your alerting system.
As a first step, define your [contact points](ref:contact-points) where to send your alert notifications to. A contact point is a set of one or more integrations that are used to deliver notifications.
By default, Grafana Alerting provides default notification messages with relevant alert information, so you don't need to configure messages initially. In the alert rule, you need to configure how to forward alerts:
Next, create a [notification policy](ref:notification-policies) which is a set of rules for where, when and how your alerts are routed to contact points. In a notification policy, you define where to send your alert notifications by choosing one of the contact points you created.
1. Directly to a contact point.
2. To a contact point via notification policies (more flexible).
Optionally, you can add [notification templates](ref:templates-page) to contact points for reuse and consistent messaging in your notifications.
{{< figure src="/media/docs/alerting/alerting-configure-notifications-v2.png" max-width="750px" alt="In the alert rule, you can configure alert forwarding directly to a contact point or through notification policies" >}}
Notification setup is essential for an effective alerting system to scale across multiple teams and services. For a quick overview about the various components involved in handling notifications, refer to the [introduction about notifications](ref:intro-notifications).
The topics in this section include step-by-step instructions for:
- [Configuring contact points](ref:configure-contact-points) to specify where to receive alert notifications.
- [Configuring notification policies](ref:configure-notification-policies) to determine how alerts are routed to contact points.
- [Templating notifications](ref:configure-templates) to customize notification messages.
- [Configuring silences](ref:configure-silences) or [mute timings](ref:configure-mute-timings) to stop notifications.
## Alertmanager architecture
Grafana Alerting is based on the Prometheus Alerting model, whose architecture decouples rule evaluation from notification handling.
- The alert rule evaluator, either Grafana or the data source, evaluates alert rules and triggers alerts.
- The alert notification manager, known as the **Alertmanager**, receives alerts and manages their notifications.
{{< figure src="/media/docs/alerting/alerting-alertmanager-architecture.png" max-width="750px" alt="A diagram with the alert generator and alert manager architecture" >}}
In Grafana, you can use different types of alert rules and configure multiple Alertmanagers.
By default, Grafana uses its built-in Alertmanager, and Grafana Cloud instances include an additional Alertmanager.
{{< figure src="/media/docs/alerting/alerting-choose-alertmanager.png" max-width="750px" alt="A screenshot choosing an Alertmanager in the notification policies UI" >}}
When having multiple Alertmanagers, note that each Alertmanager manages its own independent notification resources, such as contact points, templates, policies, silences, mute timings, and active notifications.
These notification resources cannot be shared across different Alertmanagers.
Use the **Choose Alertmanager** dropdown to select the Alertmanager you want to configure.

View File

@@ -20,26 +20,67 @@ labels:
title: Configure notification policies
weight: 420
refs:
notification-policies:
alertmanager-architecture:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/#alertmanager-architecture
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/#alertmanager-architecture
intro-notification-policies:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/notification-policies/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/
configure-mute-timings:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/mute-timings/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/mute-timings/
configure-contact-points:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/
policy-routing:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/notification-policies/#routing
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/#routing
policy-inheritance:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/notification-policies/#inheritance
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/#inheritance
policy-grouping:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/group-alert-notifications/#group-notifications
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/group-alert-notifications/#group-notifications
policy-timing-options:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/group-alert-notifications/#timing-options
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/group-alert-notifications/#timing-options
---
# Configure notification policies
Notification policies determine how alerts are routed to contact points.
Policies have a tree structure and each policy can have one or more child policies. Each policy, except for the default policy, can also match specific alert labels.
Policies have a tree structure. Each policy can have one or more child policies and a set of label matchers.
Each alert is evaluated by the default policy and subsequently by each child policy.
Each alert (or alert instance) is evaluated by the default policy and subsequently by each child policy. Alerts are routed to the appropriate notification policy by matching alert labels with the policy's label matchers. For further details, refer to [label matching and routing in notification policies](ref:intro-notification-policies).
If the **Continue matching subsequent sibling nodes** option is enabled for a child policy, evaluation continues even after one or more matches. A parent policys configuration settings and contact point information govern the behavior of an alert that does not match any of the child policies. A default policy governs any alert that does not match a child policy.
{{< figure src="/media/docs/alerting//get-started-notification-policy-tree-combo.png" max-width="750px" alt="A diagram displaying how the notification policy tree routes alerts" >}}
You can configure Grafana-managed notification policies as well as notification policies for an external Alertmanager data source.
When an alert instance is assigned to a notification policy, the notification policy is responsible for:
For more information on notification policies, refer to [fundamentals of Notification Policies](ref:notification-policies).
- [Grouping similar alerts](ref:policy-grouping) to minimize the number of notifications.
- Controlling when notifications are sent using the [timing options](ref:policy-timing-options).
- Determining the [contact points](ref:configure-contact-points) that receive the alert notification.
{{% admonition type="note" %}}
The default notification policy and its child policies are assigned to a [specific Alertmanager](ref:alertmanager-architecture), and they cannot use contact points or mute timings from other Alertmanagers.
{{% /admonition %}}
## Edit the default notification policy
@@ -47,12 +88,12 @@ For more information on notification policies, refer to [fundamentals of Notific
1. Click **Notification policies**.
1. From the **Choose Alertmanager** dropdown, select an external Alertmanager. By default, the **Grafana Alertmanager** is selected.
1. In the Default policy section, click **...** -> **Edit**.
1. In **Default contact point**, update the contact point for where to send notifications when alert rules do not match any specific policy.
1. In **Group by**, choose labels to group alerts by. If multiple alerts are matched for this policy, then they are grouped by these labels. A notification is sent per group. If the field is empty (default), then all notifications are sent in a single group. Use a special label `...` to group alerts by all labels (which effectively disables grouping).
1. In **Timing options**, select from the following options:
- **Group wait** Time to wait to buffer alerts of the same group before sending an initial notification. Default is 30 seconds.
- **Group interval** Minimum time interval between two notifications for a group. Default is 5 minutes.
- **Repeat interval** Minimum time interval for re-sending a notification if no new alerts were added to the group. Default is 4 hours.
1. In **Default contact point**, update the [contact point](ref:configure-contact-points) for where to send notifications when alert rules do not match any specific policy.
1. In **Group by**, choose labels to group alerts. If multiple alerts match this policy, they are grouped by the selected labels, and notifications are sent per group. For more details on using this option, refer to [Group notifications](ref:policy-grouping).
1. In **Timing options**, set the [timing options](ref:policy-timing-options) to configure when notifications are sent.
- **Group wait**: the time to wait before sending the first notification for a new group of alerts. Default is 30 seconds.
- **Group interval**: the time to wait before sending a notification about changes in the alert group. Default is 5 minutes.
- **Repeat interval**: the time to wait before sending a notification if the group has not changed since the last notification. Default is 4 hours.
1. Click **Save** to save your changes.
## Add a child policy
@@ -62,15 +103,18 @@ You can create a child policy under a default policy or under an existing child
If you want to choose where to position your policy, see the section on **Add a sibling policy**.
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
2. Click **Notification policies**.
3. From the **Choose Alertmanager** dropdown, select an Alertmanager. By default, the **Grafana Alertmanager** is selected.
4. Click **+New child policy** from the default policy.
5. In the Matching labels section, add one or more rules for matching alert labels.
6. In the **Contact point** dropdown, select the contact point to send notification to if alert matches only this specific policy and not any of the child policies.
7. Optionally, enable **Continue matching subsequent sibling nodes** to continue matching sibling policies even after the alert matched the current policy. When this option is enabled, you can get more than one notification for one alert.
8. Optionally, enable **Override grouping** to specify the same grouping as the default policy. If this option is not enabled, the default policy grouping is used.
9. Optionally, enable **Override general timings** to override the timing options configured in the group notification policy.
10. Click **Save policy** to save your changes.
1. Click **Notification policies**.
1. From the **Choose Alertmanager** dropdown, select an Alertmanager. By default, the **Grafana Alertmanager** is selected.
1. Click **+New child policy** from the default policy or an existing child policy.
1. In the Matching labels section of the child policy, add one or more matching label rules to narrow down a specific case from the parent policy.
For instance, a child policy of the default policy handles `team=security` alerts, or a child policy handles only the `severity=critical` alerts of a parent policy.
1. In the **Contact point** dropdown, select the [contact point](ref:configure-contact-points) to send notifications. If left empty, the contact point of the parent policy is [inherited](ref:policy-inheritance).
1. Optionally, enable **Continue matching subsequent sibling nodes** to continue matching sibling policies even after the alert matched the current policy. If enabled, multiple policies can handle the same alert.
1. Optionally, enable **Override grouping** to set different [grouping](ref:policy-grouping) than the parent policy. If disabled, the grouping of the parent policy is [inherited](ref:policy-inheritance).
1. Optionally, enable **Override general timings** to set different [timing options](ref:policy-timing-options) than the parent policy. If disabled, the timing options of the parent policy are [inherited](ref:policy-inheritance).
1. Click **Save policy** to save your changes.
## Add a sibling policy
@@ -79,9 +123,11 @@ If you want to choose where to position your policy, see the section on **Add a
1. Find the child policy you want to create a sibling for.
1. Click **Add new policy** -> **New sibling above** or **New sibling below**.
Notification policies are evaluated from top to bottom, so it is key to be able to choose which notification policy receives alerts first. Adding sibling notification policies instead of always inserting a child policy as well as being able to choose where to insert is key to managing where your alerts go.
It's important to determine which policy receives the alert first and to set the correct order of sibling and child policies.
1. Click **Save policy** to save your changes.
Policies are evaluated from top to bottom. If a matching policy is found, the system continues to evaluate its child policies in the order they are displayed. For more details, refer to [notification policies routing](ref:policy-routing).
1. Follow the instructions from step 5 onward in [adding a child policy](#add-a-child-policy).
## Search for policies
@@ -98,7 +144,7 @@ It is important to note that all matched policies are **exact** matches. Grafana
## Mute timings
Mute timings are not inherited from a parent notification policy. They have to be configured in full on each level.
Mute timings are not inherited from a parent notification policy, and they have to be configured on each level. For instructions, refer to [Configure mute timings](ref:configure-mute-timings).
## Example

View File

@@ -22,32 +22,52 @@ labels:
title: Configure silences
weight: 440
refs:
alert-labels:
configure-alertmanager:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alertmanager/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager/
silence-url:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/#alert
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/#alert
shared-alert-labels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/
notification-policies:
shared-notification-policies:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/notification-policies/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/notifications/notification-policies/
silences:
shared-silences:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-silence/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-silence/
shared-mute-timings:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/mute-timings/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/mute-timings/
alertmanager-architecture:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alertmanager/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager/
---
# Configure silences
Silences stop notifications from getting created and last for only a specified window of time.
Silences stop notifications from getting created and last for only a specified window of time. Use them to temporarily prevent alert notifications, such as during incident response or a maintenance window.
{{< admonition type="note" >}}
Silences are assigned to a [specific Alertmanager](ref:alertmanager-architecture) and only suppress notifications for alerts managed by that Alertmanager.
{{< /admonition >}}
- Inhibition rules are not supported in the Grafana Alertmanager.
- The preview of silenced alerts only applies to alerts in firing state.
{{< /admonition >}}
{{< docs/shared lookup="alerts/mute-timings-vs-silences.md" source="grafana" version="<GRAFANA_VERSION>" >}}
## Add silences
@@ -59,10 +79,12 @@ To add a silence, complete the following steps.
1. Click **Create silence** to open the Create silence page.
1. In **Silence start and end**, select the start and end date to indicate when the silence should go into effect and expire.
1. Optionally, in **Duration**, specify how long the silence is enforced. This automatically updates the end time in the **Silence start and end** field.
1. In the **Label** and **Value** fields, enter one or more _Matching Labels_. Matchers determine which rules the silence will apply to. Any matching alerts (in firing state) will show in the **Silenced alert instances** field
1. In the **Label** and **Value** fields, enter one or more _Matching Labels_ to determine which alerts the silence applies to.
{{< docs/shared lookup="alerts/how_label_matching_works.md" source="grafana" version="<GRAFANA_VERSION>" >}}
Any matching alerts (in the firing state only) will show under **Affected alert rule instances**.
1. In **Comment**, add details about the silence.
1. Click **Submit**.
@@ -75,14 +97,6 @@ To edit a silence, complete the following steps.
1. Find the silence you want to edit, then click **Edit** (pen icon).
1. Make the desired changes, then click **Submit** to save your changes.
## Create a URL to link to a silence form
When linking to a silence form, provide the default matching labels and comment via `matcher` and `comment` query parameters. The `matcher` parameter should be in the following format `[label][operator][value]` where the `operator` parameter can be one of the following: `=` (equals, not regular expression), `!=` (not equals, not regular expression), `=~` (equals, regular expression), `!~` (not equals, regular expression).
The URL can contain many query parameters with the key `matcher`.
For example, to link to silence form with matching labels `severity=critical` & `cluster!~europe-.*` and comment `Silence critical EU alerts`, create a URL `https://mygrafana/alerting/silence/new?matcher=severity%3Dcritical&matcher=cluster!~europe-*&comment=Silence%20critical%20EU%20alert`.
To link to a new silence page for an external Alertmanager, add a `alertmanager` query parameter with the Alertmanager data source name.
## Remove silences
To remove a silence, complete the following steps.
@@ -95,13 +109,30 @@ To remove a silence, complete the following steps.
## Rule-specific silences
Rule-specific silences are silences that apply only to a specific alert rule.
They're created when you silence an alert rule directly using the **Silence notifications** action in the UI.
Rule-specific silences are silences that apply only to a specific alert rule. They're created when you silence an alert rule directly using the **Silence notifications** action in the UI.
{{< admonition type="note" >}}
As opposed to general silences, rule-specific silence access is tied directly to the alert rule they act on. They can be created manually by including the specific label matcher: `__alert_rule_uid__=<alert rule UID>`.
{{< /admonition >}}
## Useful links
## URL link to a silence form
[Aggregation operators](https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators)
Default notification messages often include a link to silence alerts.
In custom notification templates, you can use [`.Alert.SilenceURL`](ref:silence-url) to redirect users to the UI where they can silence the given alert.
If [`.Alert.SilenceURL`](ref:silence-url) doesnt fit your specific use case, you can also create a custom silence link for your custom templates.
{{< collapse title="Create a custom silence link" >}}
When linking to a silence form, provide the default matching labels and comment via `matcher` and `comment` query parameters. The `matcher` parameter should be in the following format `[label][operator][value]` where the `operator` parameter can be one of the following: `=` (equals, not regular expression), `!=` (not equals, not regular expression), `=~` (equals, regular expression), `!~` (not equals, regular expression).
The URL can contain many query parameters with the key `matcher`.
For example, to link to silence form with matching labels `severity=critical` & `cluster!~europe-.*` and comment `Silence critical EU alerts`, create a URL `https://mygrafana/alerting/silence/new?matcher=severity%3Dcritical&matcher=cluster!~europe-*&comment=Silence%20critical%20EU%20alert`.
To link to a new silence page for an external Alertmanager, add a `alertmanager` query parameter with the Alertmanager data source name.
{{< /collapse >}}
## Inhibition rules
Inhibition rules are supported in the Prometheus Alertmanager. You can [configure a Prometheus Alertmanager](ref:configure-alertmanager) to handle the notification of alerts and suppress notifications via inhibition rules.
Inhibition rules are not currently supported in the Grafana Alertmanager. For tracking the progress of this feature request, follow [this GitHub issue](https://github.com/grafana/grafana/issues/68822).

View File

@@ -26,6 +26,16 @@ labels:
title: Configure contact points
weight: 410
refs:
sns:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-amazon-sns/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-amazon-sns/
gchat:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-google-chat/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-google-chat/
email:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-email/
@@ -71,36 +81,46 @@ refs:
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-teams/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-teams/
external-alertmanager:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alertmanager/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager/
mqtt:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-mqtt/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-mqtt/
alertmanager-architecture:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/#alertmanager-architecture
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/#alertmanager-architecture
external-alertmanager:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alertmanager/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager/
manage-notification-templates:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/manage-notification-templates/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/manage-notification-templates/
---
# Configure contact points
Use contact points to select your preferred communication channel for receiving notifications when your alert rules are firing. You can add, edit, delete, export, and test a contact point.
Use contact points to specify where to receive alert notifications. Contact points contain the configuration for sending alert notifications, including destinations like email, Slack, OnCall, webhooks, and their notification messages.
Testing a contact point is only available for Grafana Alertmanager.
A contact point can have one or multiple destinations, known as [contact point integrations](#list-of-supported-integrations). Alert notifications are sent to each integration within the chosen contact point.
On the **Contact Points** tab, you can:
- Add, edit, and view contact points and integrations.
- Search for name and type of contact points and integrations.
- View all existing contact points and integrations.
- View how many notification policies each contact point is being used for and navigate directly to the linked notification policies.
- View the status of notification deliveries.
- Export individual contact points or all contact points in JSON, YAML, or Terraform format.
- Delete contact points. Note that you cannot delete contact points that are in use by a notification policy. To proceed, either delete the notification policy or update it to use another contact point.
On the **Notification templates** tab, you can:
- View, edit, copy or delete existing notification templates.
{{% admonition type="note" %}}
Contact points are assigned to a [specific Alertmanager](ref:alertmanager-architecture) and cannot be used by notification policies in other Alertmanagers.
{{% /admonition %}}
## Add a contact point
@@ -114,41 +134,23 @@ Complete the following steps to add a contact point.
1. From **Integration**, select a type and fill out mandatory fields. For example, if you choose email, enter the email addresses. Or if you choose Slack, enter the Slack channel and users who should be contacted.
1. Some contact point integrations, like email or Webhook, have optional settings. In **Optional settings**, specify additional settings for the selected contact point integration.
1. In Notification settings, optionally select **Disable resolved message** if you do not want to be notified when an alert resolves.
1. To add another contact point integration, click **Add contact point integration** and repeat steps 6 through 8.
1. Save your changes.
## Use notification templates
## Add another contact point integration
Use templates in contact points to customize your notifications.
A contact point can have multiple integrations, or destinations for sending notifications.
Complete the following steps to add templates to your contact point.
To add another integration to a contact point, complete the following steps.
1. Click an existing contact point or create a new one
1. In **Optional settings**, click any field that contains templates.
For example, if you are creating an email contact point integration, click **Message** or **Subject**.
1. Click **Edit**.
A dialog box opens where you can select templates.
1. [Optional] Click **Select existing template** to select a template and preview it using the default payload.
Click **Save** to use just a single template in the field.
You can also copy the selected template and use it in the custom tab.
1. [Optional] Click **Enter custom message** to customize and edit the field directly. Note that the title changes depending on the field you are editing.
Click **Save** to use just a single template in the field.
1. You can switch between the two tabs to access the list of available templates and copy them across to the customized version.
1. Click **Save contact point**.
1. Add or edit an existing contact point.
1. Click **Add contact point integration** and repeat the same steps as [Add a contact point](#add-a-contact-point).
- From **Integration**, select a type and fill out mandatory fields.
- In **Optional settings**, specify additional settings for the selected contact point integration.
1. Save your changes.
## Test a contact point
** For Grafana Alertmanager only.**
Complete the following steps to test a contact point.
Testing a contact point is only available for Grafana Alertmanager. Complete the following steps to test a contact point.
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
1. Click **Contact points** to view a list of existing contact points.
@@ -157,6 +159,16 @@ Complete the following steps to test a contact point.
1. Choose whether to send a predefined test notification or choose custom to add your own custom annotations and labels to include in the notification.
1. Click **Send test notification** to fire the alert.
## Customize notification messages
In contact points, you can also customize notification messages. For example, when setting up an email contact point integration, click **Message** or **Subject** to modify it.
By default, notification messages include common alert details, which are usually sufficient for most cases.
If necessary, you can customize the content and format of notification messages. You can create a custom notification template, which can then be applied to one or more contact points.
On the **Notification templates** tab, you can view, edit, copy or delete notification templates. Refer to [manage notification templates](ref:manage-notification-templates) for instructions on selecting or creating a template for a contact point.
## List of supported integrations
Each contact point integration has its own configuration options and setup process. In most cases, this involves providing an API key or a Webhook URL.
@@ -166,17 +178,17 @@ The following table lists the contact point integrations supported by Grafana.
| Name | Type |
| ---------------------------- | ------------------------- |
| Alertmanager | `prometheus-alertmanager` |
| Amazon SNS | `sns` |
| [Amazon SNS](ref:sns) | `sns` |
| Cisco Webex Teams | `webex` |
| DingDing | `dingding` |
| [Discord](ref:discord) | `discord` |
| [Email](ref:email) | `email` |
| Google Chat | `googlechat` |
| [Google Chat](ref:gchat) | `googlechat` |
| [Grafana Oncall](ref:oncall) | `oncall` |
| Kafka REST Proxy | `kafka` |
| [MQTT](ref:mqtt) | `mqtt` |
| Line | `line` |
| [Microsoft Teams](ref:teams) | `teams` |
| [MQTT](ref:mqtt) | `mqtt` |
| [Opsgenie](ref:opsgenie) | `opsgenie` |
| [Pagerduty](ref:pagerduty) | `pagerduty` |
| Pushover | `pushover` |
@@ -185,7 +197,7 @@ The following table lists the contact point integrations supported by Grafana.
| [Telegram](ref:telegram) | `telegram` |
| Threema Gateway | `threema` |
| VictorOps | `victorops` |
| WeCom | `wecom` |
| [Webhook](ref:webhook) | `webhook` |
| WeCom | `wecom` |
Some of these integrations are not compatible with [external Alertmanagers](ref:external-alertmanager). For the list of Prometheus Alertmanager integrations, refer to the [Prometheus Alertmanager receiver settings](https://prometheus.io/docs/alerting/latest/configuration/#receiver-integration-settings).

View File

@@ -13,7 +13,7 @@ labels:
- oss
menuTitle: Amazon SNS
title: Configure Amazon SNS for Alerting
weight: 0
weight: 100
---
# Configure Amazon SNS for Alerting
@@ -27,7 +27,7 @@ Before you begin, ensure you have the following:
- **AWS SNS Topic**: An SNS topic to send notifications to.
- **AWS IAM Identity with necessary access**: An IAM identity (e.g. user, role) with the necessary permissions to publish messages to the SNS topic.
For an example setup, see [Example Minimal Setup Using Assumed IAM Role]({{< relref "#example-minimal-setup-using-assumed-iam-role" >}}).
For an example setup, see [Example Minimal Setup Using Assumed IAM Role](#example-minimal-setup-using-assumed-iam-role).
## Adding the SNS Contact Point in Grafana
@@ -181,7 +181,7 @@ This section outlines a minimal setup to configure SNS with Grafana using an ass
### 5. Add the SNS Contact Point in Grafana
After creating the IAM user and obtaining the necessary credentials, proceed to [configure the SNS contact point in Grafana]({{< relref "#adding-the-sns-contact-point-in-grafana" >}}) using the following details:
After creating the IAM user and obtaining the necessary credentials, proceed to [configure the SNS contact point in Grafana](#adding-the-sns-contact-point-in-grafana) using the following details:
- **The Amazon SNS API URL**: `https://sns.us-east-1.amazonaws.com`
- **Signature Version (sigv4)**:
@@ -200,4 +200,4 @@ Replace the placeholder values (`https://sns.us-east-1.amazonaws.com`, `us-east-
- [Amazon SNS Documentation](https://docs.aws.amazon.com/sns/index.html)
- [AWS IAM Documentation](https://docs.aws.amazon.com/iam/index.html)
- [Prometheus Alertmanager SNS Integration](https://prometheus.io/docs/alerting/configuration/#sns_config)
- [Cloudwatch AWS Authentication]({{< relref "../../../../datasources/aws-cloudwatch/aws-authentication" >}})
- [Cloudwatch AWS Authentication](../../../../../datasources/aws-cloudwatch/aws-authentication/)

View File

@@ -13,7 +13,7 @@ labels:
- oss
menuTitle: Discord
title: Configure Discord for Alerting
weight: 0
weight: 105
---
# Configure Discord for Alerting

View File

@@ -13,13 +13,21 @@ labels:
- oss
menuTitle: Email
title: Configure email for Alerting
weight: 0
weight: 110
refs:
notification-templates:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/
---
# Configure email for Alerting
Use the Grafana Alerting - email integration to send email notifications when your alerts are firing. An email is sent when an alert fires and when an alert gets resolved.
Note that you can customize the `subject` and `message` of the email using [notification templates](ref:notification-templates). However, you cannot add HTML and CSS to email notifications for visual changes.
## Before you begin
{{<admonition type="note">}}

View File

@@ -13,7 +13,7 @@ labels:
- oss
menuTitle: Google Chat
title: Configure Google Chat for Alerting
weight: 0
weight: 115
---
# Configure Google Chat for Alerting

View File

@@ -12,9 +12,9 @@ labels:
- cloud
- enterprise
- oss
menuTitle: MQTT notifier
menuTitle: MQTT
title: Configure the MQTT notifier for Alerting
weight: 0
weight: 140
---
# Configure the MQTT notifier for Alerting

View File

@@ -2,6 +2,7 @@
aliases:
- ../../../alerting-rules/manage-contact-points/configure-oncall/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/manage-contact-points/configure-oncall/
- ../../../alerting-rules/manage-contact-points/integrations/configure-oncall/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/manage-contact-points/integrations/configure-oncall/
- ../configure-oncall/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/manage-contact-points/configure-oncall/
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-oncall/
description: Configure the Alerting - Grafana OnCall integration to connect alerts generated by Grafana Alerting with Grafana OnCall
keywords:
@@ -9,8 +10,6 @@ keywords:
- alerting
- oncall
- integration
aliases:
- ../configure-oncall/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/manage-contact-points/configure-oncall/
labels:
products:
- cloud
@@ -18,7 +17,7 @@ labels:
- oss
menuTitle: Grafana OnCall
title: Configure Grafana OnCall for Alerting
weight: 0
weight: 120
---
# Configure Grafana OnCall for Alerting
@@ -26,7 +25,7 @@ weight: 0
Use the Grafana Alerting - Grafana OnCall integration to effortlessly connect alerts generated by Grafana Alerting with Grafana OnCall, where you can then route them according to defined escalation chains and schedules.
{{< admonition type="note" >}}
You can also configure the integration from Grafana OnCall. For more information, refer to [Grafana OnCall documentation](http://grafana.com/docs/oncall/latest/integrations/grafana-alerting/).
You can also configure the integration from Grafana OnCall. For more information, refer to [Grafana OnCall documentation](http://grafana.com/docs/oncall/latest/configure/integrations/references/grafana-alerting/).
{{< /admonition >}}
## Before you begin

View File

@@ -13,7 +13,7 @@ labels:
- oss
menuTitle: Opsgenie
title: Configure Opsgenie for Alerting
weight: 0
weight: 145
---
# Configure Opsgenie for Alerting

View File

@@ -13,8 +13,13 @@ labels:
- oss
menuTitle: Slack
title: Configure Slack for Alerting
weight: 0
weight: 155
refs:
notification-templates:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/
nested-policy:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-notification-policy/#add-new-nested-policy
@@ -36,9 +41,9 @@ There are two ways of integrating Slack into Grafana Alerting.
Webhooks is the simpler way to post messages into Slack. Slack automatically creates a bot user with all the necessary permissions to post messages to one particular channel of your choice.
{{< admonition type="note" >}}
Grafana Alerting only allows one Slack channel per contact point.
{{< /admonition >}}
Note that you can only setup one Slack channel per contact point.
You can customize the `title` and `body` of the Slack message using [notification templates](ref:notification-templates); however, you cannot modify its visual appearance with custom blocks.
## Before you begin
@@ -53,17 +58,12 @@ If you are using a Slack API Token, complete the following steps.
1. Right click the channel you want to receive notifications in.
1. Click View channel details.
1. Scroll down and copy the Channel ID.
{{< admonition type="note" >}}
While going through these steps, Slack may prompt you to Reinstall your app in order for the changes to take effect.
{{< /admonition >}}
Note that while going through these steps, Slack may prompt you to Reinstall your app in order for the changes to take effect.
### Webhook URL
If you are using a Webhook URL, follow steps 1 and 5 in the [Slack API Quickstart](https://api.slack.com/start/quickstart).
{{< admonition type="note" >}}
Make sure you copy the Slack app Webhook URL. You need this when setting up your contact point integration in Grafana Alerting.
{{< /admonition >}}
If you are using a Webhook URL, follow steps 1 and 5 in the [Slack API Quickstart](https://api.slack.com/start/quickstart), and copy the Slack app Webhook URL. You need this when setting up your contact point integration in Grafana Alerting.
## Procedure

View File

@@ -13,13 +13,21 @@ labels:
- oss
menuTitle: Microsoft Teams
title: Configure Microsoft Teams for Alerting
weight: 0
weight: 135
refs:
notification-templates:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/
---
# Configure Microsoft Teams for Alerting
Use the Grafana Alerting - Microsoft Teams integration to receive notifications in your teams channel when your alerts are firing.
Note that you can customize the `title` and `message` of the notification using [notification templates](ref:notification-templates); however, you cannot modify its visual appearance with adaptive cards.
## Before you begin
To set up Microsoft Teams for integration with Grafana Alerting, create a new workflow that accepts Webhook requests. This allows Grafana to send alert notifications to Microsoft Teams channels.

View File

@@ -13,7 +13,7 @@ labels:
- oss
menuTitle: Telegram
title: Configure Telegram for Alerting
weight: 0
weight: 160
---
# Configure Telegram for Alerting

View File

@@ -14,7 +14,7 @@ labels:
- oss
menuTitle: PagerDuty
title: Configure PagerDuty for Alerting
weight: 0
weight: 150
---
# Configure PagerDuty for Alerting

View File

@@ -19,9 +19,15 @@ labels:
- cloud
- enterprise
- oss
menuTitle: Webhook notifier
menuTitle: Webhook
title: Configure the webhook notifier for Alerting
weight: 0
weight: 165
refs:
notification-templates:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/
---
# Configure the webhook notifier for Alerting
@@ -139,7 +145,11 @@ The webhook notification is a simple way to send information about a state chang
| imageURL | string | URL of a screenshot of a panel assigned to the rule that created this notification |
{{< admonition type="note" >}}
Alert rules are not coupled to dashboards anymore therefore the fields related to dashboards `dashboardId` and `panelId` have been removed.
You can customize the `title` and `message` fields using [notification templates](ref:notification-templates).
However, you cannot customize webhook data structure or format, including JSON fields or sending data in XML, nor can you change the webhook HTTP headers.
{{< /admonition >}}
## Procedure

View File

@@ -18,31 +18,34 @@ labels:
- enterprise
- oss
title: Configure mute timings
weight: 450
weight: 430
refs:
external-alertmanager:
alertmanager-architecture:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alertmanager/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/#alertmanager-architecture
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/set-up/configure-alertmanager/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/#alertmanager-architecture
shared-silences:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-silence/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-silence/
shared-mute-timings:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/mute-timings/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/mute-timings/
---
# Configure mute timings
A mute timing is a recurring interval of time when no new notifications for a policy are generated or sent. Use them to prevent alerts from firing a specific and reoccurring period, for example, a regular maintenance period.
A mute timing is a recurring interval of time when no new notifications for a policy are generated or sent. Use them to prevent alerts from firing a specific and reoccurring period, for example, a regular maintenance period or weekends.
Similar to silences, mute timings do not prevent alert rules from being evaluated, nor do they stop alert instances from being shown in the user interface. They only prevent notifications from being created.
{{< admonition type="note" >}}
Mute timings are assigned to a [specific Alertmanager](ref:alertmanager-architecture) and only suppress notifications for alerts managed by that Alertmanager.
{{< /admonition >}}
You can configure Grafana managed mute timings as well as mute timings for an [external Alertmanager](ref:external-alertmanager).
## Mute timings vs silences
The following table highlights the key differences between mute timings and silences.
| Mute timing | Silence |
| -------------------------------------------------- | ---------------------------------------------------------------------------- |
| Uses time interval definitions that can reoccur | Has a fixed start and end time |
| Is created and then added to notification policies | Uses labels to match against an alert to determine whether to silence or not |
{{< docs/shared lookup="alerts/mute-timings-vs-silences.md" source="grafana" version="<GRAFANA_VERSION>" >}}
## Add mute timings
@@ -65,6 +68,8 @@ The following table highlights the key differences between mute timings and sile
A time interval is a specific duration during which alerts are suppressed. The duration typically consists of a specific time range and the days of the week, month, or year.
A mute timing can contain multiple time intervals.
Supported time interval options are:
- Time range: The time inclusive of the start and exclusive of the end time (in UTC if no location has been selected, otherwise local time).
@@ -76,9 +81,13 @@ Supported time interval options are:
All fields are lists; to match the field, at least one list element must be satisfied. Fields also support ranges using `:` (e.g., `monday:thursday`).
If a field is left blank, any moment of time matches the field. For an instant of time to match a complete time interval, all fields must match. A mute timing can contain multiple time intervals.
If a field is left blank, any moment of time matches the field. For an instant of time to match a complete time interval, all fields must match.
If you want to specify an exact duration, specify all the options. For example, if you wanted to create a time interval for the first Monday of the month, for March, June, September, and December, between the hours of 12:00 and 24:00 UTC your time interval specification would be:
If you want to specify an exact duration, specify all the options.
**Example**
If you wanted to create a time interval for the first Monday of the month, for March, June, September, and December, between the hours of 12:00 and 24:00 UTC your time interval specification would be:
- Time range:
- Start time: `12:00`

View File

@@ -13,55 +13,102 @@ labels:
- cloud
- enterprise
- oss
title: Configure notification messages
weight: 430
title: Template notifications
weight: 450
refs:
use-notification-templates:
template-annotations-and-labels:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/use-notification-templates/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templates/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/use-notification-templates/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templates/
manage-notification-templates:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/manage-notification-templates/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/manage-notification-templates/
reference:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/
using-go-templating-language:
examples:
- pattern: /docs/grafana/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/using-go-templating-language/
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/examples/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/using-go-templating-language/
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/examples/
---
# Configure notification messages
# Template notifications
Customize the content of your notifications with notifications templates.
You can use notification templates to change the title, message, and format of notifications.
You can use notification templates to change the title, message, and format of the message in your notifications.
Grafana provides a **default template** for notification titles (`default.title`) and one default template for notification messages (`default.message`). Both templates display common alert details.
Notification templates are not tied to specific contact point integrations, such as email or Slack. However, you can choose to create separate notification templates for different contact point integrations.
You can also create a notification template to customize the content and format of your notification messages. For example:
You can use notification templates to:
- Customize content: Personalize the subject of an email or the title of a message. Modify text within notifications, like selecting or omitting certain labels, annotations, and links. Format text with bold and italic styles, and add or remove line breaks.
- Personalize the subject of an email or the title of a message.
- Modify text within notifications, like selecting or omitting certain labels, annotations, and links.
- Format text with bold and italic styles, and add or remove line breaks.
However, there are limitations. You cannot:
- Modify Visual Appearance: Add HTML and CSS to email notifications for visual changes. Alter the design of notifications in messaging services like Slack and Microsoft Teams, such as adding custom blocks or adaptive cards.
- Manage Media and Data: Adjust the number and size of images or their placement in notifications. Customize webhook data structure or format, including JSON fields or sending data in XML. Modify HTTP headers in webhooks beyond those in the contact point configuration.
- Modify Visual Appearance: Add HTML or CSS to email notifications for visual changes. Alter the design of notifications in messaging services like Slack or Microsoft Teams, such as adding custom blocks or adaptive cards.
- Manage Media and Data: Customize the data structure or format passed to the templates, like adding new JSON fields or sending XML data for webhooks. Modify HTTP headers in webhooks beyond those defined in the configuration, or adjust the number, size, or placement of images.
## Learn more
Here's an [example](ref:examples) that displays the summary and description annotations for each alert in the notification:
[Using Go's templating language](ref:using-go-templating-language)
```go
{{ define "custom.alerts" -}}
{{ len .Alerts }} alert(s)
{{ range .Alerts -}}
{{ template "alert.summary_and_description" . -}}
{{ end -}}
{{ end -}}
{{ define "alert.summary_and_description" }}
Summary: {{.Annotations.summary}}
Status: {{ .Status }}
Description: {{.Annotations.description}}
{{ end -}}
```
Learn how to write the content of your notification templates in Gos templating language.
The notification message would look like this:
Create reusable notification templates for your contact points.
```
2 alert(s)
[Use notification templates](ref:use-notification-templates)
Summary: The database server db1 has exceeded 75% of available disk space.
Status: firing
Description: This alert fires when a database server is at risk of running out of disk space. You should take measures to increase the maximum available disk space as soon as possible to avoid possible corruption.
Use notification templates to send notifications to your contact points.
Summary: The web server web1 has been responding to 5% of HTTP requests with 5xx errors for the last 5 minutes.
Status: resolved
Description: This alert fires when a web server responds with more 5xx errors than is expected. This could be an issue with the web server or a backend service.
```
[Reference](ref:reference)
{{% admonition type="note" %}}
Avoid adding extra information about alert instances in notification templates, as this information will only be visible in the notification message.
Data that is available when writing templates.
Instead, you should [use annotations or labels](ref:template-annotations-and-labels) to add information directly to the alert, ensuring it's also visible in the alert state and alert history within Grafana. You can then print the new alert annotation or label in notification templates.
{{% /admonition %}}
#### Select a notification template for a contact point
Notification templates are not tied to specific contact point integrations, such as email or Slack, and the same template can be shared across multiple contact points.
The notification template is assigned to the contact point to determine the notification message sent to contact point integrations.
{{< figure src="/media/docs/alerting/how-notification-templates-works.png" max-width="1200px" caption="A flow of the alert notification process, from querying the alert rule to sending the alert notification message." >}}
By default, Grafana provides default templates, such as `default.title` and `default.message`, to format notification messages.
## More information
For further details on how to write notification templates, refer to:
- [Select, create, and preview a notification template](ref:manage-notification-templates)
- [Notification template reference](ref:reference)
- [Notification template examples](ref:examples)
{{< admonition type="tip" >}}
For a practical example of templating, refer to our [Getting Started with Templating tutorial](https://grafana.com/tutorials/alerting-get-started-pt4/).
{{< /admonition >}}

View File

@@ -1,376 +0,0 @@
---
aliases:
- ../../manage-notifications/template-notifications/create-notification-templates/ # /docs/grafana/<GRAFANA_VERSION>/alerting/manage-notifications/template-notifications/create-notification-templates/
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/template-notifications/create-notification-templates/
description: Create notification templates to sent to your contact points
keywords:
- grafana
- alerting
- notifications
- templates
- create templates
- edit templates
- delete templates
labels:
products:
- cloud
- enterprise
- oss
title: Create notification templates
weight: 200
---
# Create notification templates
Create reusable notification templates to send to your contact points.
You can add one or more templates to your notification template.
Your notification template name must be unique. You cannot have two templates with the same name in the same notification template or in different notification templates. Avoid defining templates with the same name as default templates, such as: `__subject`, `__text_values_list`, `__text_alert_list`, `default.title` and `default.message`.
To create a notification template, complete the following steps.
1. Click **Alerts & IRM** -> **Contact points**.
1. Click the **Notification Templates** tab and then **+ Add notification template**.
1. Enter a name for the notification template.
1. Write the content of the template in the content field.
1. Save your changes.
`{{ define "email.subject" }}` and `{{ end }}` is automatically added to the start and end of the content:
To create a notification template that contains more than one template:
1. Click **+ Add notification template**.
2. Enter a name for the notification template.
3. Write each template in the Content field, including `{{ define "name-of-template" }}` and `{{ end }}` at the start and end of each template.
4. Save your changes.
## Preview notification templates
Preview how your notification templates should look before using them in your contact points, helping you understand the result of the template you are creating as well as enabling you to fix any errors before saving it.
**Note:** This feature is only for Grafana Alertmanager.
To preview your notification templates:
1. Navigate to **Alerts&IRM** -> **Alerting** -> **Contact points** -> **Notification Templates**.
1. Click **+ Add notification template** or edit an existing template.
1. Add or update your template content.
Default data is provided and you can add or edit alert data to it as well as alert instances. You can add alert data directly in the Payload data window itself or click **Select alert instances** or **Add custom alerts**.
1. Optional: To add alert data from existing alert instances:
a. Click **Select alert instances**.
b. Hover over the alert instances to view more information on each alert instance.
c. Click **Confirm** to add the alert instance(s) to the payload.
1. Optional: To add alert data using the Alert data editor, click **Add custom data:**
a. Add annotations, custom labels and/or set a dashboard or a panel.
b. Toggle Firing/resolved depending on whether you want to add firing or resolved alerts to your notification.
c. Click **Add alert data**.
d. Click **Refresh preview** to see what your template content should look like and the corresponding payload data.
If there are any errors in your template, they are displayed in the Preview and you can correct them before saving.
1. Save your changes.
## Template the subject of an email
Template the subject of an email to contain the number of firing and resolved alerts:
```
1 firing alert(s), 0 resolved alerts(s)
```
1. Create a template called `email.subject` with the following content:
```
{{ define "email.subject" }}
{{ len .Alerts.Firing }} firing alert(s), {{ len .Alerts.Resolved }} resolved alert(s)
{{ end }}
```
2. Execute the template from the subject field in your contact point integration:
```
{{ template "email.subject" . }}
```
## Template the message of an email
Template the message of an email to contain a summary of all firing and resolved alerts:
```
There are 2 firing alert(s), and 1 resolved alert(s)
Firing alerts:
- alertname=Test 1 grafana_folder=GrafanaCloud has value(s) B=1
- alertname=Test 2 grafana_folder=GrafanaCloud has value(s) B=2
Resolved alerts:
- alertname=Test 3 grafana_folder=GrafanaCloud has value(s) B=0
```
1. Create a notification template called `email` with two templates in the content: `email.message_alert` and `email.message`.
The `email.message_alert` template is used to print the labels and values for each firing and resolved alert while the `email.message` template contains the structure of the email.
```
{{- define "email.message_alert" -}}
{{- range .Labels.SortedPairs }}{{ .Name }}={{ .Value }} {{ end }} has value(s)
{{- range $k, $v := .Values }} {{ $k }}={{ $v }}{{ end }}
{{- end -}}
{{ define "email.message" }}
There are {{ len .Alerts.Firing }} firing alert(s), and {{ len .Alerts.Resolved }} resolved alert(s)
{{ if .Alerts.Firing -}}
Firing alerts:
{{- range .Alerts.Firing }}
- {{ template "email.message_alert" . }}
{{- end }}
{{- end }}
{{ if .Alerts.Resolved -}}
Resolved alerts:
{{- range .Alerts.Resolved }}
- {{ template "email.message_alert" . }}
{{- end }}
{{- end }}
{{ end }}
```
2. Execute the template from the message field in your contact point integration:
```
{{ template "email.message" . }}
```
## Group multiple alert instances into one email notification
To make alerts more concise, you can group multiple instances of a firing alert into a single email notification in a table format. This way, you avoid long, repetitive emails and make alerts easier to digest.
Follow these steps to create a custom notification template that consolidates alert instances into a table.
1. Modify the alert rule to include an annotation that is referenced in the notification template later on.
1. Enter a name for the **custom annotation**: In this example, _ServerInfo_.
1. Enter the following code as the value for the annotation. It retrieves the server's instance name and a corresponding metric value, formatted as a table row:
```
{{ index $labels "instance" }}{{- "\t" -}}{{ index $values "A"}}{{- "\n" -}}
```
This line of code returns the labels and their values in the form of a table. Assuming $labels has `{"instance": "node1"}` and $values has `{"A": "123"}`, the output would be:
```
node1 123
```
1. Create a notification template that references the _ServerInfo_ annotation.
```go
{{ define "Table" }}
{{- "\nHost\t\tValue\n" -}}
{{ range .Alerts -}}
{{ range .Annotations.SortedPairs -}}
{{ if (eq .Name "ServerInfo") -}}
{{ .Value -}}
{{- end }}
{{- end }}
{{- end }}
{{ end }}
```
The notification template outputs a list of server information from the "ServerInfo" annotation for each alert instance.
1. Navigate to your contact point in Grafana
1. In the **Message** field, reference the template by name (see **Optional Email settings** section):
```
{{ template "Table" . }}
```
This generates a neatly formatted table in the email, grouping information for all affected servers into a single notification.
## Conditional notification template
Template alert notifications based on a label. In this example the label represents a namespace.
1. Use the following code in your notification template to display different messages based on the namespace:
```go
{{ define "my_conditional_notification" }}
{{ if eq .CommonLabels.namespace "namespace-a" }}
Alert: CPU limits have reached 80% in namespace-a.
{{ else if eq .CommonLabels.namespace "namespace-b" }}
Alert: CPU limits have reached 80% in namespace-b.
{{ else if eq .CommonLabels.namespace "namespace-c" }}
Alert: CPU limits have reached 80% in namespace-c.
{{ else }}
Alert: CPU limits have reached 80% for {{ .CommonLabels.namespace }} namespace.
{{ end }}
{{ end }}
```
`.CommonLabels` is a map containing the labels that are common to all the alerts firing.
Make sure to replace the `.namespace` label with a label that exists in your alert rule.
1. Replace `namespace-a`, `namespace-b`, and `namespace-c` with your specific namespace values.
1. Navigate to your contact point in Grafana
1. In the **Message** field, reference the template by name (see **Optional settings** section):
```
{{ template "my_conditional_notification" . }}
```
This template alters the content of alert notifications depending on the namespace value.
## Template the title of a Slack message
Template the title of a Slack message to contain the number of firing and resolved alerts:
```
1 firing alert(s), 0 resolved alerts(s)
```
1. Create a template called `slack.title` with the following content:
```
{{ define "slack.title" }}
{{ len .Alerts.Firing }} firing alert(s), {{ len .Alerts.Resolved }} resolved alert(s)
{{ end }}
```
2. Execute the template from the title field in your contact point integration:
```
{{ template "slack.title" . }}
```
## Template the content of a Slack message
Template the content of a Slack message to contain a description of all firing and resolved alerts, including their labels, annotations, Silence URL and Dashboard URL.
**Note:**
This template is for Grafana-managed alerts only.
To use the template for Grafana Mimir/Loki-managed alerts, delete the references to DashboardURL and SilenceURL.
For more information, see the [Prometheus documentation on notifications](https://prometheus.io/docs/alerting/latest/notifications/).
```
1 firing alert(s):
[firing] Test1
Labels:
- alertname: Test1
- grafana_folder: GrafanaCloud
Annotations:
- description: This is a test alert
Silence: https://example.com/alerting/silence/new?alertmanager=grafana&matcher=alertname%3DTest1&matcher=grafana_folder%3DGrafanaCloud
Go to dashboard: https://example.com/d/dlhdLqF4z?orgId=1
1 resolved alert(s):
[firing] Test2
Labels:
- alertname: Test2
- grafana_folder: GrafanaCloud
Annotations:
- description: This is another test alert
Silence: https://example.com/alerting/silence/new?alertmanager=grafana&matcher=alertname%3DTest2&matcher=grafana_folder%3DGrafanaCloud
Go to dashboard: https://example.com/d/dlhdLqF4z?orgId=1
```
1. Create a template called `slack` with two templates in the content: `slack.print_alert` and `slack.message`.
The `slack.print_alert` template is used to print the labels, annotations, SilenceURL and DashboardURL while the `slack.message` template contains the structure of the notification.
```
{{ define "slack.print_alert" -}}
[{{.Status}}] {{ .Labels.alertname }}
Labels:
{{ range .Labels.SortedPairs -}}
- {{ .Name }}: {{ .Value }}
{{ end -}}
{{ if .Annotations -}}
Annotations:
{{ range .Annotations.SortedPairs -}}
- {{ .Name }}: {{ .Value }}
{{ end -}}
{{ end -}}
{{ if .SilenceURL -}}
Silence: {{ .SilenceURL }}
{{ end -}}
{{ if .DashboardURL -}}
Go to dashboard: {{ .DashboardURL }}
{{- end }}
{{- end }}
{{ define "slack.message" -}}
{{ if .Alerts.Firing -}}
{{ len .Alerts.Firing }} firing alert(s):
{{ range .Alerts.Firing }}
{{ template "slack.print_alert" . }}
{{ end -}}
{{ end }}
{{ if .Alerts.Resolved -}}
{{ len .Alerts.Resolved }} resolved alert(s):
{{ range .Alerts.Resolved }}
{{ template "slack.print_alert" .}}
{{ end -}}
{{ end }}
{{- end }}
```
2. Execute the template from the text body field in your contact point integration:
```
{{ template "slack.message" . }}
```
## Template both email and Slack with shared templates
Instead of creating separate notification templates for email and Slack, you can share the same template.
For example, if you want to send an email with this subject and Slack message with this title:
```
1 firing alert(s), 0 resolved alerts(s)
```
1. Create a template called `common.subject_title` with the following content:
```
{{ define "common.subject_title" }}
{{ len .Alerts.Firing }} firing alert(s), {{ len .Alerts.Resolved }} resolved alert(s)
{{ end }}
```
2. For email, execute the template from the subject field in your email contact point integration:
```
{{ template "common.subject_title" . }}
```
3. For Slack, execute the template from the title field in your Slack contact point integration:
```
{{ template "common.subject_title" . }}
```

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