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>
* feat: update to Go 1.22.11
* chore: make drone
* CI: Force re-build
* chore: go work use
* 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
(cherry picked from commit e1bb8ccb79)
(cherry picked from commit 5becd9ac03)
Docs: Updating ldd example command for image renderer troubleshooting (#97443)
(cherry picked from commit 0025876659)
Co-authored-by: Jacob Valdez <jacob.valdez@grafana.com>
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>
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>
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>
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)
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>
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)
* Fix: Deduplicate OrgID in SA logins (#94378)
* Fix: Deduplicate OrgID in SA logins
(cherry picked from commit b90e09e966)
* Fix: Actually call the DedupOrgInLogin migration (#94520)
* Fix: Account for conflicting logins in dedupOrgInlogin migration (#94669)
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
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>
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>
* Update changelog
* Update version to 11.0.5+security-01
* Revert "Update version to 11.0.5+security-01"
This reverts commit 9f3c59c1e3.
* add cve to changelog
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: joshhunt <josh@trtr.co>
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)
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>
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)
Fix: Ensure SA migrations doesn't hit migrated SAs if rerun (#94347)
* ensure mig doesn't hit migrated SAs if rerun
* Fix small issue with the test
---------
Co-authored-by: gamab <gabriel.mabille@grafana.com>
(cherry picked from commit 945dd052b1)
Co-authored-by: Jo <joao.guerreiro@grafana.com>
ServiceAccounts: Run migration in batches (#94429)
* ServiceAccounts: Run migration in batches
(cherry picked from commit 2d0ea60017)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
ServiceAccounts: Remove permissions to service account when it is deleted (#93877)
* Service account: clean up permissions related to service accounts when deleted
* Add migration for deleting orphaned service account permissions
CI: Remove redundant FE and BE tests from release pipeline (#94173)
baldm0mma/remove_tests/ remove fe and be tests
(cherry picked from commit 0e8fa1f5f8)
Alerting: Fix incorrect permission on POST external rule groups endpoint [CVE-2024-8118] (#93940)
Fix endpoint permission on rule write endpoint
(cherry picked from commit c2799b4901)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
Correlations: Limit access to correlations page to users who can access Explore (#93519)
Correlations: Limit access to correlations page to users who can access Explore
(cherry picked from commit 813e1c1364)
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
AzureMonitor: Deduplicate resource picker rows (#93129)
* Use URI for querying resources in RG
- Ensure resource group names are correctly slash separated
* Update test
(cherry picked from commit 76c8975b4f)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Annotations: Optimize search by tags (#93547)
* Annotations: Optimize search on large number of dashboards
* refactor
* fix batch size
* Return early if no annotations found
* revert go.mod
* return nil in case of error
* Move default limit to the API package
* fix empty access control filter
* Set default limit to 100
* optimize query when number of annotations is less than limit
* Update pkg/services/annotations/annotationsimpl/annotations.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* remove limit from store since it's set in API
* set default limit in Find method (do not break tests)
* Only add limit to the query if it's set
* use limit trick for all searches without dashboard filter
* set default page if not provided
---------
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
(cherry picked from commit 5e713673e1)
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
AzureMonitor: Improve resource picker efficiency (#93127)
* Parameterise region building metric namespace URL
- Add parameter for region (this parameter takes precedence over if global is set)
- Update tests
- Support this parameter on the data source method
* Refactor fetchAllNamespaces
- Use Set rather than an array for greater performance
- Request namespaces across WestEurope, EastUS, and JapanEast concurrently
- Update test
* Maintain existing behaviour
(cherry picked from commit 6a3dbe7d41)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
CI: Ensure changelogs are prettified prior to commit (#92580)
* Ensure changelogs are prettified prior to commit
* Remove cache property
* Include .yarn directory
* Include packages directory
* Try just using npx
* Update workflows
(cherry picked from commit 8daa6f1f30)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Alerting docs: adds caps not supported in email contact points (#92902)
* Alerting docs: adds caps not supported in email contact points
* ran prettier
* feedback from antonio
* ran prettier
(cherry picked from commit 9d3d1703f7)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
DashboardModel - Add fallback for variable current value fallback (#91833)
* add variable current value fallback when null
* refactor to avoid loosing reference
(cherry picked from commit 7c8184d5bf)
Co-authored-by: Sergej-Vlasov <37613182+Sergej-Vlasov@users.noreply.github.com>
Capitalized list items under "With Explore Metrics, you can:" (#91879)
capitalised list items under "With Explore Metrics, you can:"
(cherry picked from commit 62abaea8f5)
Co-authored-by: Irene Rodriguez <irene.rodriguez@grafana.com>
* Update changelog
* Update version to 11.0.3
* fix changelog
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Diego Augusto Molina <diegoaugustomolina@gmail.com>
OpenTSDB: Fix data frame construction (#90991)
* Update type and frame construction
* Update tests
* Keep dataField name as value
(cherry picked from commit 06509712ec)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
AzureMonitor: Add authproxy as supported user auth method (#91754)
Add authproxy as supported user auth method
(cherry picked from commit d52626be3f)
# Conflicts:
# public/app/plugins/datasource/azuremonitor/components/QueryEditor/QueryEditor.tsx
TemplateSrv: Backportable version of 90808 (#90833)
TemplateSrv: Backportable version of 90808 (#90816)
* TemplateSrv: Add test case for SafeSerializableSceneObject
* Update dashboard data source to use scoped vars scene object valueOf
* 11.1.x Backportable version of 90808
* lint
(cherry picked from commit 2e5b41cbcb)
Alerting: Fix persisting result fingerprint that is used by recovery threshold (#91224)
(cherry picked from commit 537f1fb857)
# Conflicts:
# pkg/services/ngalert/state/persister_sync.go
Snapshots: Fix panic when snapshot_remove_expired is true (#91232)
(cherry picked from commit bb5d2c83ef)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
CI: set dry-run if `release/dry-run` label is set on `release-comms.yml` and set latest on github release if `latest` is set (#91089)
set dry-run and set latest on github release
(cherry picked from commit 4e84234424)
Update version of docker-compose.yaml (#90539)
* Update version of docker-compose.yaml
* Update index.md
(cherry picked from commit 3c405e8b1f)
Co-authored-by: lnnt <770954908@qq.com>
CI: fix changelog push error (#90971)
* add --set-upstream origin to release-pr workflow git push
* use a different branch name for the changelog workflow
* disable backport support for now
* remove backport condition
(cherry picked from commit 089a5710b6)
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
CI: changelog boolean type (#90948)
* bool -> boolean
* add missing type keys
* provide secrets in release-pr
* use permissions and built-in github token
(cherry picked from commit 14396048d7)
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
Dashboards: Change datemath parse logic so parsed dates always take timezone into account (#88182)
* Dashboards: Change datemath parse logic so parsed dates always take timezone into account
(cherry picked from commit 2e0175c3eb)
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
CI: For every release PR created, also push a changelog PR to main (#90698)
For every release PR created, also push a changelog PR to main
(cherry picked from commit 9232db2416)
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
Chore: update changelog workflow (#90608)
* try integrating
* pass tags
* change section order
* use better terminology
* one more attempt
* keep delimiters
* attempt to patch changelog
* quotes, bash quotes...
* use proper content file
* parens around date
* time for a pr
* first checkout, then create user
* add latest input
* git push
* use square brackets
* formatting
* update release-pr
* fix typo
* try sparse checkout
* fetch depth zero
* clean up after changelog generator
(cherry picked from commit f8b092aba6)
CI: replace publish image step with a much simpler one that supports LATEST (#90498)
* replace publish image step with a much simpler one that supports LATEST
(cherry picked from commit 6a2a6b0fbc)
highlighting the part of the Grafana enterprise section so easir for … (#90177)
highlighting the part of the Grafana enterprise section so easir for users to find it
(cherry picked from commit 677d2a8b70)
Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>
CI: fix release pr condition (#90299)
* Release comms should only run when the source PR is
* Fix release-comms workflow condition
(cherry picked from commit a28db90dd5)
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
* Azure: Fix default subscription setting (#90185)
* Ensure default subscription is set
* Include some info for when the default subscription is required
* Rename settings mock
- Add mockDatasourceSettings function
* Add MonitorConfig test
* Revert "Rename settings mock"
- Avoid issues when backporting
* Remove description
* Remove required field
* Remove unused import
(cherry picked from commit bba26f8e13)
* Add react
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
CI: Sync branch and tag after release (#89967)
* Added `workflow_call` event to allow other workflows to invoke the "Create or update GitHub release"
* Added `dry_run` to `github-release.yml`
* Added `latest` to `release-pr.yml` which will cause the release PR to add a `release/latest` label.
* Removed unnecessary github app creation from github-release workflow and just used permissions.
(cherry picked from commit 63e715f6a9)
Co-authored-by: Kevin Minehart <5140827+kminehart@users.noreply.github.com>
Alerting: Skip loading alert rules for dashboards when disabled (#89361)
(cherry picked from commit 781e394118)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Notifications: Do not log email address in error message (#89314)
Do not log email address in error message
(cherry picked from commit c2c30c25ed)
Co-authored-by: William Wernert <william.wernert@grafana.com>
Analytics: Fix ApplicationInsights integration (#89299)
change ApplicationInsights backend to use SystemJS to load
(cherry picked from commit 7bb883e375)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Use ref URIs with the reference style links (#89204)
* Use ref URIs with the reference style links
If I remember correctly, the UI needs reference style links so it can substitute its own link destinations.
ref URIs work both inline and as the destination for reference style links.
* Remove unused ref URI
* Remove unused Data frames link
---------
(cherry picked from commit f5468542ba)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Alerting: Fix rule storage to filter by group names using case-sensitive comparison (#88992)
* add test for the bug
* remove unused struct
* update db store to post process filters by group using go-lang's case-sensitive string comparison
--------
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
# Conflicts:
# pkg/services/ngalert/store/alert_rule.go
# pkg/services/ngalert/store/alert_rule_test.go
Added Grafana Play Links to Panel visualization docs (#88995)
* Update index.md on Node panels to Grafana Play link
* Update index.md add Traces docs link to Grafana Play
* Update index.md News documentation link to Grafana Play
* Update index.md Alert list documentation link to Grafana Play
* Update index.md Alert list fixed missing link
* Update index.md Fixed title
* Update index.md Trying code fix
* Ran prettier command
* Matched link text to dashboard titles
* Replaced URL with ref URI key
---------
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
(cherry picked from commit 404617b33d)
Co-authored-by: Señor Performo - Leandro Melendez <54183040+srperf@users.noreply.github.com>
RBAC: List only the folders that the user has access to (#88599)
only check folder permissions when listing folders
(cherry picked from commit 095ca66d9f)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
DashboardScene: Fixes lack of re-render when updating field override properties (#88796)
* DashboardScene: Fixes lack of re-render when updating field override properties
* Added unit test
(cherry picked from commit db25886f9c)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Transformations: Keep original `field.labels.name` when joining frames (#88873)
(cherry picked from commit 89a0bec208)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
User: add second migration for lowercasing login/email of users (#88915)
(cherry picked from commit 39bd13f877)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Chore: Fix test to retry fetching provisioned dashboard until is in place (#85408)
Retry fetching provisioned dashboard until is in place
(cherry picked from commit 88be09420c)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
added youtube video link (#88901)
* added youtube video link
* Update index.md
(cherry picked from commit 5095ea84b2)
Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>
DashboardScene: Fixes issue with some query editors to not adapt to width changes (#88718)
DashboardScene: Fixes issue with panel editor causing moncao query editors to not adapt to width changes
(cherry picked from commit e735573852)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Update proxy/index.md (#88261)
* Update index.md
Specify proxy support is for SOCKS5 in Title. So it is clear this is not for TCP or HTTP proxy
* update title to match header
(cherry picked from commit 36c66e3e94)
Co-authored-by: Kyle Hounslow <7102778+kylehounslow@users.noreply.github.com>
Docs: add pinning of terraform for migration (#88528)
* Docs: update with terraform version
* added the terraform version pinning
* formatting
* Update docs/sources/administration/api-keys/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* formatting
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 221e036233)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
LibraryPanels/RBAC: Ignore old folder permission check when deleting/patching lib panel (#88422)
* LibraryPanels/RBAC: Ignore old folder permission check when deleting lib panel
* Same for patching
(cherry picked from commit 8f45003192)
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
Dashboards: Correctly display Admin access to dashboards in the UI (#88439)
* include folder wildcard scope in dash permission inheritance
* Update pkg/services/accesscontrol/ossaccesscontrol/permissions_services.go
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
(cherry picked from commit 1c2ae2c72d)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Docs: Rename variables pages (#87844)
* Renamed Manage variables page to Add variables
* Renamed Inspect variables page to Manage and inspect variables
* Updated H1 on Add variables
* Moved Manage variables content to from Add varibles page to Manage and inspect variables page and updated text to fit
* Updated link style to ref URIs in Manage and inspect variables
(cherry picked from commit 197ce3042d)
Alerting/Annotations: Return nothing from historian store if filtering by tags and matchAny is false (#85488)
* Return nothing from historian store if filtering by tag
(cherry picked from commit cad8190a91)
Co-authored-by: William Wernert <william.wernert@grafana.com>
DashboardScene: Re-enabled skipped scenes e2e tests due to bugs (#87723)
* enabled skipped tests
* adjust to wait for loading indicator
* adjust typos
* adjust e2e workflow for test PR run
* restore workflow
* adjust workflow for test run
* restore workflow to sheduled runs
(cherry picked from commit e324a346f6)
Co-authored-by: Sergej-Vlasov <37613182+Sergej-Vlasov@users.noreply.github.com>
* Alerting: Fix scheduler to sort rules before evaluation (#88006)
sort rules scheduled for evaluation to make sure that the order is stable between evaluations.
This is especially important in HA mode.
(cherry picked from commit 05d6813a09)
* use old generators
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
CloudMonitoring: Fix query type selection issue (#87990)
* Use deepEqual to ensure migratedQuery is only returned when query is unchanged
* Add selectors for query editors
* Add more tests for query editor component
* Clarifying comments
* Fix how state is set
* Simplify query editor loading and migration
(cherry picked from commit 58d382e5dd)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Azure: Fix for username assertion (#87853)
Fix for username assertion
- Allow setting username assertion in INI
- Correctly set the azsettings value
- Update tests
(cherry picked from commit edae5fc791)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Docs: public dashboards fixes (#87870)
* Made minor style fixes
* Converted docs ref links to ref URIs and updated note style to admonitions
* Fixed link text and version syntax
(cherry picked from commit 80e2af5d25)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Alerting: use logger with same context within rule scheduling loop (#87934)
(cherry picked from commit f410c7fca1)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
DashboardScene: Fixes checkbox orienation in save forms (#86408)
(cherry picked from commit 1d513f66b8)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
PublicDashboards: Public dashboard refreshed when access token changes (#87913)
(cherry picked from commit a6d64c6ed5)
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
Explore: lookup datasource by name when present in legacy URLs (#85222)
* [explore] lookup datasource by name when present in legacy compact URLs
* update unit test
* prettier fix
---------
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
(cherry picked from commit 867d36fe59)
Co-authored-by: Christian Briones <cwbriones@gmail.com>
Docs: Adds video embed for the Understanding Dashboards youtube video (#87449)
* Adds video embed for the Understanding Dashboards youtube video
* Moved video to Use dashboards page
---------
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
(cherry picked from commit 1e2c58fc80)
Co-authored-by: Tom Glenn <289945+tomglenn@users.noreply.github.com>
DashboardScene: Default `hoverHeaderOffset` to 0 (#87561)
* remove hoverHeaderOffsetBehavior and force offset to 0
* force headerHoverOffset in addPanel flow
(cherry picked from commit 5f147644d4)
Co-authored-by: Sergej-Vlasov <37613182+Sergej-Vlasov@users.noreply.github.com>
Alerting: Do not store series values from past evaluations in state manager for no reason (#87525)
Do not store previous execution results on states
(cherry picked from commit a6a9ab4008)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
"Release: Updated versions in package to 11.0.1"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
* AuthN: Fix signout redirect url (#87631)
* Add missing return
* Use sign out redirect url from auth config if configured
* remove option from auth.jwt that is not used
(cherry picked from commit 0f3080ecb8)
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
CloudMonitoring: Improve legacy query migrations (#86069)
* Match backend and correctly migrate metricType
Update tests
* Ensure project is migrated or set if not defined
* Improve migrations logic
(cherry picked from commit 95667f6a53)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Azure data sources: Set selected config type before save (#87481)
* set selected config type before save
* use effect once and move in mssql
* add to prom
* Update ConfigurationEditor.tsx
* Update ConfigurationEditor.tsx
* Delete public/app/plugins/datasource/mssql/configuration/ConfigurationEditor.tsx
* omadsfdsa
* remove unneeded assign
(cherry picked from commit 5e19aa7bd1)
Co-authored-by: Andrew Hackmann <5140848+bossinc@users.noreply.github.com>
Chore: Add login protection when user is trying different uppercase letters (#87588)
* add login protection when the user is trying different uppercase letters
(cherry picked from commit cd98aaf89b)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Chore: Implement GetOAuthProviders in FakeSocialService (#87590)
Implement GetOAuthProviders in FakeSocialService
(cherry picked from commit 896882b004)
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Alerting: Add two sets of provisioning actions for rules and notifications (#87149)
(cherry picked from commit 356a29592b)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
alerting/webhook doc update (#87492)
* alerting/webhook doc update
* text formath
* fixed admonition
* typo
* headings
* formatted headings and prettified it all
* one more heading
(cherry picked from commit d83cbe4d85)
DashboardDataSource: Fixes issue where sometimes untransformed data could be returned (#87433)
* DashboardDataSource: always return a result key
* Update
* Update
(cherry picked from commit e7c39f18be)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Provisioning: Look up provisioned folders by UID when possible (#87465)
look up provisioned folders by uid when possible
(cherry picked from commit 1884b03511)
Co-authored-by: Dan Cech <dcech@grafana.com>
Alerting: Also fix HCL field name for MuteTimeIntervals (#87079)
* Correct HCL field name for MuteTimeIntervals
* Update test
(cherry picked from commit 93519f70ca)
Co-authored-by: William Wernert <william.wernert@grafana.com>
datatrails: reloaded trail bugs related to no selected metric (#87344)
* fix: reloaded scene first step topScene
The top scene was not being initialized
when reloading trails, causing it to use
the top scene of whatever was selected
previously.
* fix: select new metric node not reloading right
On reloading trails, any metric node that
was 'green' with a undefined metric due to
clicking on the "select new metric" button,
was reloading with the metric of the step
directly before it (in index order).
(cherry picked from commit e9b932c8f6)
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
datatrails: only fetch metrics metadata when using the language provider, avoid redundant fetch of metric names (#87067)
* fix: only fetch metrics metadata, not metric names
(cherry picked from commit f93c330b66)
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
scenes: update to v4.14.0: opt-in to `useQueriesAsFilterForOptions` (#87244)
* fix: opt-in to `useQueriesAsFilterForOptions`
With updating the scenes library, dashboards must now explicitly
opt in to `useQueriesAsFilterForOptions`.
(cherry picked from commit 5b424ed6bb)
datatrails: recently loaded trails modify parent variables when making new steps (#87284)
* fix: loaded trails modified parent var on new step
This ensures that recently loaded trails won't have variable changes
which create new steps modify the previous step.
(cherry picked from commit 046eedaa4c)
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
DashboardScene: Measure and report scene load time (#86267)
* measure scene load time
* Fix tests that fail due to performance not being the proper global performance object in jest
* add isScene parameter to tracking test
(cherry picked from commit e7f40493e4)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
fix: sql expressions - sql parser table name case (#87196)
* fix: sql parser table name case
(cherry picked from commit 4fd2cb6014)
Co-authored-by: Scott Lepper <scott.lepper@gmail.com>
InfluxDB: Support cardinality queries with backend mode (#87264)
support cardinality queries
(cherry picked from commit 3317691615)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Docs: Fix link to values.yaml file (#87014)
Fix link to values.yaml file
Linking to the "edit" URL fails if the reader doesn't have write access
to the repo: they'll be prompted to fork the repo or to sign in to
GitHub. Instead link to the "blob" URL which is accessible to all
readers.
(cherry picked from commit 64d5440c5a)
Co-authored-by: Nicholas P. Cole <nicholas@nicholaspcole.com>
DashboardScenes: Pin go version to go.mod file in scenes e2e workflow (#87238)
* adjust workflow to use correct go version
* finalise wokflow adjustments
(cherry picked from commit 838e36bd99)
Co-authored-by: Sergej-Vlasov <37613182+Sergej-Vlasov@users.noreply.github.com>
Dashboard Scene: Chore - Add missing unit test to PanelDataQueryTab (#87139)
* Create basic structure PanelDataQueriesTab unit test
* Add more test cases to the PanelDataQueriesTab test
* Update public/app/features/dashboard-scene/panel-edit/VizPanelManager.tsx
(cherry picked from commit eae1cafebd)
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
DashboardScene: adjust lib panel as a dashboard datasource refresh logic (#87120)
* activate library viz panel and adjust id extractor
* revert parts that are fixed in #87125
* clean up after activation handler
(cherry picked from commit afbd02c4ec)
Co-authored-by: Sergej-Vlasov <37613182+Sergej-Vlasov@users.noreply.github.com>
Dashboard Scene - Variable Fix: cancel out margin-bottom of placeholder in loading state (#87107)
fix: cancel out margin-bottom of placeholder in loading state
(cherry picked from commit 6dbc44920c)
Co-authored-by: Tim Mulqueen <Multimo@users.noreply.github.com>
Auth: Force lowercase login/email for users (#86359)
* [WIP]: Force lowercase login/email for user CRUD
* warn and remove use of userCaseInsensitiveLogin check
* remove log warning
* reimplementation of the caseinsensitive
* need to decide if we want the conflict check or not
* remvoved the tests for conflict user by getEmail, getLogin
* added tests for user lowercase migration
* wip: emails next
* tests for email lowercasing
* review comments
* optimized login and email lookup before migrating
(cherry picked from commit e394e16073)
RBAC: Do not set permissions on data sources with wildcard UID in OSS (#87220)
do not set permissions on DS with wildcard UID
(cherry picked from commit 28dd1ddd8e)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Docs: Add data links shared content (#86893)
* Added data link options shared file and added file to relevant visualizations
* Updated some text and links in canvas
* Added shared file to xy chart
* Fixed list of visualizations using shared file
* Removed unneeded level offset
* Removed future tense
* Update data links description
* Updated wording
* Removed redundant sentence
(cherry picked from commit 1ef0e240e9)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
DashboardScene: Fixes issue referring to library panel in dashboard data source (#87125)
* DashboardScene: Fixes issue using a library panel as source for dashboard data source
* Added test
(cherry picked from commit 4034a26972)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
DashboardScene: Fixes issue with panel edit options pane and data (#87161)
(cherry picked from commit 7a5c17d613)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Docs: add legends shared content (#86814)
* Updated shared file name and added missing options
* Added legend options 1 shared file to relevant visualizations
* Updated shared file name and corrected options
* Added legend options 2 shared file to relevant visualizations
* Updated legend content for heatmap and pie chart
* Added where shared legend files are used in each file
* Moved intro text out of viz pages into legend options shared files
* Added reasoning to front matter of shared files
* Added reasoning to front matter of shared files
* Fixed version interpolation and added cloud links
* Updated links in shared files
(cherry picked from commit dad3069594)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* Data source: Maintain the default data source permissions when switching from unlicensed to licensed Grafana (#87119)
set managed data source permissions upon resource creation for unlicensed Grafana, remove them on deletion
(cherry picked from commit 5e060d2d99)
* remove code for older version
---------
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Alerting: Use expected field name for receiver in HCL export (#87065)
* Use expected field name for receiver in hcl
Terraform provider expects `contact_point` instead of `receiver` in
notification settings on a rule.
(cherry picked from commit 70ff229bed)
Co-authored-by: William Wernert <william.wernert@grafana.com>
Alerting: Improve error when receiver or time interval used by rule is deleted (#86865)
* Alerting: Improve error when receiver used by rule is deleted
* Remove RuleUID from public error and data
* Improve fallback error in am config post
* Refactor to expand to time intervals
* Fix message on unchecked errors to be same as before
(cherry picked from commit 3397e8bf09)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Docs: Update Explore Metrics doc based on feedback (#87062)
* changed from private preview to public preview
* commented out pivot to logs and traces
(cherry picked from commit 3845033308)
Co-authored-by: Larissa Wandzura <126723338+lwandz13@users.noreply.github.com>
Canvas: Connection original persistence check (#86476)
* Canvas: Connection original persistence check
* modify current connection state directly instead of copying and needing to call "onChange"
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit 7590f4afe1)
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
DateTimePicker: Alternate timezones now behave correctly (#86750)
* Add failing tests for timezone handling
* Fix `DateTimePicker.tsx` timezone handling
- Resolves `onBlur` issue
- Resolve Calendar and TimeOfDay issues
- Update test to cover different timezone
* Handle `console.warn` in test
* Handle `console.warn` in test #2
* Better handling of invalid date
When parsing date string with `dateTime`, adding a second `formatInput` aids in both parsing the actual string and avoid `console.warn` when `moment` reverts to be using `Date`.
* add more test cases
* Ash/proposed changes (#86854)
* simplify
* only need this change
* formatting
* const > let
* add test to ensure calendar is always showing the matching day
* separate state
* undo story changes
* update util function comments
* fix for selecting date in the calendar
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
(cherry picked from commit 7fab894e9b)
Co-authored-by: Thomas Wikman <thomas@w1kman.se>
Dashboard scenes: Fix min interval not saving (#86962)
* Fix min interval not saving
* Add tests
* Fix test
(cherry picked from commit fdc1023586)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Docs: Add value mappings shared content (#86996)
* Added value mappings shared file
* Fixed name of file
* Fixed list of visualizations using shared file
* Added shared file to visualizations
* Updated shared file and added to canvas
* Updated shared file intro text
* Removed future tense
(cherry picked from commit d5fde99c6d)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
Dasbhoard scenes: Don't return null when uids are not matching for new dashboards (#86998)
Don't return null when uids not matching for new dashboards
(cherry picked from commit c3cde17b33)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
datatrails: fix bookmark/recent trail detection, prevent duplications, save trail on browser close/reload (#85677)
* fix: persistence trail detection, save on unload
- fixes detection on bookmarks and recents when current step isn't final
- now save current trail on browser close or reload (unload)
- refresh page or return to URL that corresponds to a recent trail will
resume that trail instead of creating a duplicate recent trail
- do not create a recent trail out of an empty starting trail
* fix: bookmarks status after making new step
- clone bookmark trail state to prevent it from being changed by user
- re-evaluate bookmark status after creating new step
(cherry picked from commit 9af4607e78)
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
DataTrails: Exploring alternatives to history issues (#86843)
* DataTrails: Exploring alternatives to history issues
* incorporated unit tests from #86817 and #86741
---------
Co-authored-by: Darren Janeczek <darren.janeczek@grafana.com>
(cherry picked from commit c965c27994)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Tooltips: Ensure new viz tooltips are visible within modals (alternative solution) (#86716)
fix: ensure new viz tooltips are visible within modals
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
(cherry picked from commit ff761bb7d6)
Canvas: Fix division by zero (#85443)
* Canvas: Fix division by zero
* Fix last add vertex control
* Apply fix to existing vertices
* Apply deltas to temporary paths
* Persist original source and target coorindates
* Add follow up TODO
* Update connection svg to handle originals
* Get rid of minimum constraints for deltas
* Apply persist coordinate system to vertex handlers
* Consolidate and rename selected value
* Update connection arcs to use new coordinates
* fix editor crashing with scenes
---------
Co-authored-by: Adela Almasan <adela.almasan@grafana.com>
(cherry picked from commit ed8eacbc7e)
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
Alerting: Fix instances link when served from subpath (#86432)
Fix instances link when served from subpath
(cherry picked from commit 9614126cb7)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Table Panel: Fix images not showing on hover with multiple data links (#86732)
* Fix issue
* Prettier
* codeincarnate/image-table-fix/ lint
* Make linter happy by using div with role of button + improve a11y
---------
Co-authored-by: jev forsberg <jev.forsberg@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit 37d086d49c)
Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
Docs: add tooltips shared content (#86553)
* Replaced shared tooltips file with text in xy chart
* Added tooltip info for heatmap
* Updated tooltip shared files, renamed one file, updated configure tooltips
* updated tooltip shared file paths
* Added tooltips shared files in relevant visualizations
* Added where shared file is used in tooltip-options-1
* Added where shared file is used in tooltip-options-2
* Added intro text and justifications to shared files
* Removed tooltips intro text from visualizations with shared files
* Added names of files to comments in shared files
(cherry picked from commit 0e81fdffbe)
fix: datatrail link to "open in explore" prefix with `config.appSubUrl` (#86375)
* fix: datatrail link to explore needs appSubUrl
* fix: use `appUrl` when creating URL for sharing
(cherry picked from commit 2ed7eecf2d)
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
datatrails: interpolate adhoc variables and datasource variables when opening "explore metrics" from dashboard panels (#86252)
* fix: interpolate "explore metrics" from panels
---------
Co-authored-by: Darren Janeczek <darren.janeczek@grafana.com>
* fix: remove support for legacy dashboard
- simplify code
- take advantage of scenes dashboard async and datasource api object
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
(cherry picked from commit 53ead9904d)
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
Add onClick behaviour to links to new tooltips (#84974)
* Add onClick behaviour to new tooltips
* Prefer using DataLink component
(cherry picked from commit 9e54c450d7)
Co-authored-by: Javier Ruiz <javiruiz01@users.noreply.github.com>
SQLStore: Disable redundant create and drop unique index migrations on dashboard table (#86857)
SQLStore: Disable create and drop unique index migrations
(cherry picked from commit a5a3ee9fa3)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
LogContext: Fix structured metadata labels being added as stream selectors (#86825)
* LogContext: Fix structured metadata labels being added as stream selectors
* use row index
(cherry picked from commit a8424f4831)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
Dashboard: Migration [Panel Edit] Missing Query Editor when datasource is not found (#86789)
* Return default datasource if datasource is not found
* Set query runner datasource state to default, else refreshing will not work
(cherry picked from commit de589b98c7)
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
TimeOfDayPicker: Fix text colours in light mode (#86771)
fix text colours in light mode
(cherry picked from commit a1321d17ca)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Dashboards: Check if dashboard.meta is undefined, if undefined handle redirect in dashboard scene. (#86674)
dashboard meta is not available if the dashboard response is a redirect
(cherry picked from commit 12771e49fc)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Dashboard scenes: fix textbox value only set to first character of default value (#86595)
Dashboard scene: fix textbox value only set to first character in default value
(cherry picked from commit dccad4e081)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
XYChart2: Remove common series name from tooltip items (#86739)
(cherry picked from commit 7754d0d4dc)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Alerting: Take receivers into account when custom grouping Alertmanager groups (#86127)
* Take receiver into account when custom grouping Alertmanager alert groups
* Fix and add tests
(cherry picked from commit acd3e83c1c)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
LDAP: Fix listing all non-matching groups (#86682)
Fix getRowId in LdapUserGroups to list all non-matching groups
(cherry picked from commit 6ab9dcde8d)
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Alerting: Fix max_alerts field handling (#86651)
Fix max_alerts field parsing
(cherry picked from commit 1b930c341d)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Change folder breadcrumb on folder change in general settings (#86342)
* Change folder breadcrumb on folder change in general settings
* tests and refactor
* refactor to fix broken tests
* fix test
(cherry picked from commit 60e6dd56bf)
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
MSSQL: Add `SQL_VARIANT` converter and update test (#85823)
Add SQL_VARIANT converter and update test
(cherry picked from commit 420067a7e1)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Docs: Update example docs for `rename by regex` (#86627)
* baldm0mma/update_regex/ update example docs
* baldm0mma/ push ts
* baldm0mma/update_regex with new exmaples
* baldm0mma/update_regex/ update images
* baldm0mma/regex_update/ update text
(cherry picked from commit ad679c62c6)
Co-authored-by: Jev Forsberg <46619047+baldm0mma@users.noreply.github.com>
IntervalVariableEditor: Do not add current value as interval prop (#86446)
(cherry picked from commit 65afe90124)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
CommandPalette: Fix keyboard shortcut alignment (#86540)
* use full typography properties
* use Text component
(cherry picked from commit 63427ccd98)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
EmptyState: Set a max width on the empty state component (#86569)
set a max width on the empty state component
(cherry picked from commit 21588ce7e2)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
InfluxDB: Fix interpolating field keys in influxql (#86401)
* interpolate field keys
* use scopedVars
(cherry picked from commit 842c8dd206)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Alerting: Fix simplified routing group by override (#86552)
* Alerting: Fix simplified routing custom group by override
Custom group by overrides for simplified routing were missing required fields
GroupBy and GroupByAll normally set during upstream Route validation.
This fix ensures those missing fields are applied to the generated routes.
* Inline GroupBy and GroupByAll initialization instead of normalize after
(cherry picked from commit 71445002b7)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Docs: Add GeoMaps YouTube Video (#86472)
* Update index.md on GeoMaps adding YouTube Video
Added the GeoMap YouTube video to the documentation
* Update docs/sources/panels-visualizations/visualizations/geomap/index.md
Totally agree, I tend to use those words and not realize :P
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
---------
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
(cherry picked from commit 0d11f9b2f4)
Co-authored-by: Señor Performo - Leandro Melendez <54183040+srperf@users.noreply.github.com>
InfluxDB: Fix interpolation for floating point number values (#86396)
return number as it is
(cherry picked from commit 635d85db7a)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Transforms: Fix 'Filter data by values' removing rows in unrelated frames (#86087)
(cherry picked from commit 9682022b1d)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Alerting: Fix simplified routes '...' groupBy creating invalid routes (#86006)
* Alerting: Fix simplified routes '...' groupBy creating invalid routes
There were a few ways to go about this fix:
1. Modifying our copy of upstream validation to allow this
2. Modify our notification settings validation to prevent this
3. Normalize group by on save
4. Normalized group by on generate
Option 4. was chosen as the others have a mix of the following cons:
- Generated routes risk being incompatible with upstream/remote AM
- Awkward FE UX when using '...'
- Rule definition changing after save and potential pitfalls with TF
With option 4. generated routes stay compatible with external/remote AMs, FE
doesn't need to change as we allow mixed '...' and custom label groupBys, and
settings we save to db are the same ones requested.
In addition, it has the slight benefit of allowing us to hide the internal
implementation details of `alertname, grafana_folder` from the user in the
future, since we don't need to send them with every FE or TF request.
* Safer use of DefaultNotificationSettingsGroupBy
* Fix missed API tests
(cherry picked from commit 533bed6d94)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Docs: add panels & visualizations landing page (#86073)
* Added landing page front structure
* Added description and overview content and card titles
* Added placeholder tile and work notes
* Finalized text and updated link type
* Updated panel overview tile link
(cherry picked from commit 7c441011f2)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
CloudMigrations: Add instance metadata to auth token (#85381)
* update how tokens are passed around
* rename structs
(cherry picked from commit 5a5f76ae0a)
Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
Auth: add Dex example to generic OAuth2 documentation (#84744)
This patch adds an example configuration for setting up generic OAuth2
authentication using [Dex IdP](https://dexidp.io/).
(cherry picked from commit e9969e3542)
Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com>
Graphite: second function as another function argument parsing error fix (#85224)
* update language around query editor parsing issues
* add special handling for second function arguments in divideSeriesLists
* additional check for first argument as series(string) and not a function
(cherry picked from commit 3c28a3d494)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
JWT: Find login and email claims with JMESPATH (#85305)
* add function to static function to static service
* find email and login claims with jmespath
* rename configuration files
* Replace JWTClaims struct for map
* check for subclaims error
(cherry picked from commit e4250a72db)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Explore: Nested Content Outline (#80688)
* indentation levels
* Highlight parent section when child is selected
* Fix context, add rotation to toggle button
* Merge single child logic; fix styling
* Fix collapsed logic, make elipsis work, reorganize for better readability;
* Add connector
* Tooltip placement
* Update tests so they test components the same way users would interact with them
* Clean up indendation levels
* Support collapsing logic for multiple section; highlight all items in a section of an active child - parent is active only when section is collapsed and child inside of it is active
* Simplify making ellipsis work
* Show tooltip if the text overflows in expanded mode
* The whole button container should have same background when section is expanded in mini view
* Fix a bug where root items were not being sorted by document position
* Update query order when query rows are changed through dragging and dropping
* Fix the issue where chaning the title of a query row would remove the query
(cherry picked from commit 649c456eab)
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
User: email verification completion (#85259)
* TempUser: Include InvitedById in TempUserDTO
* Extract email verfication completion flow to service
(cherry picked from commit 73e426b081)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Panel: Description display event is reported multiple times (#85283)
(cherry picked from commit 233f119037)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Revert "Update ephemeral instances workflow to get version from package.json" (#85347)
Revert "Update ephemeral instances workflow to get version from package.json …"
This reverts commit dda1531952.
(cherry picked from commit 29c76b98d4)
Co-authored-by: Leonor Oliveira <9090754+leonorfmartins@users.noreply.github.com>
Storage: GuaranteedUpdate fix & other improvements (#85206)
make GuaranteedUpdate work when ignoring not found errors, increase poll frequency, fix Delete
(cherry picked from commit ef26fe95dc)
Co-authored-by: Dan Cech <dcech@grafana.com>
AuthN: Add IsAuthenticatedBy to identity interface and replace checks (#85262)
Add IsAuthenticatedBy to identity interface and replace checks
(cherry picked from commit 152cb47692)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
* EmptyState: use `not-found` empty state variant everywhere in core (#85007)
* use EmptyState component everywhere in core
* remove GrotNotFound core component
* update unit tests
* search -> not-found
* fix 3 more
(cherry picked from commit 7ad2ec9665)
* EmptyState: Provide custom messages for existing empty states (#86021)
provide custom messages for existing empty states
---------
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Dashboard scenes: Export isExpressionReference to be accessible from scenes (#85228)
Export isExpressionRef to be accessible from scenes
(cherry picked from commit b7156ef2c2)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Chore: InfluxQL stream parser improvements (#85041)
* don't iterate over first column as it is a time column already
* don't iterate over first column as it was handled earlier
* add more flexibility to run the commands
* Update pkg/tsdb/influxdb/influxql/converter/converter.go
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
---------
Co-authored-by: Nick Richmond <5732000+NWRichmond@users.noreply.github.com>
(cherry picked from commit fec7765111)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Alerting: Reduce set of fields that could trigger alert state change (#83496)
We want to avoid too much change of alert state based on change on
alert's fields. For that we ignore some fields from the diff.
(cherry picked from commit 6f38ac6615)
Co-authored-by: Benoit Tigeot <benoittgt@users.noreply.github.com>
Auth: Improve org role sync debugging (#85146)
add login to the context of the logger
(cherry picked from commit da40158fed)
Co-authored-by: Jo <joao.guerreiro@grafana.com>
docs: add annotations play link (#86206)
* docs: add annotations play link
* PR feedback
(cherry picked from commit c9350a25c4)
Co-authored-by: David Allen <david.allen@grafana.com>
docs: add thresholds play link (#86212)
* docs: add thresholds play link
* PR review
(cherry picked from commit f50e29e004)
Co-authored-by: David Allen <david.allen@grafana.com>
docs: query data/relative time range override play link (#86213)
(cherry picked from commit c450d61d32)
Co-authored-by: David Allen <david.allen@grafana.com>
Nodegraph: Fix issue with rendering single node (#84930)
Fix for single node graph case
(cherry picked from commit aba65747c9)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Tooltip / Toggletip content link styling: Remove global a element selector inside tooltips (#84353)
* fix: remove global a tag styles inside tooltips
* corret inside / outside button references in toggletip test
* Remove code and pre styling rules from tooltipUtils
(cherry picked from commit b4ed72f1b6)
Co-authored-by: Chris Bedwell <christopher.bedwell@grafana.com>
Provisioning: Fix regression when dashboardProvisioner is accessed before being initialised (#85011)
* Provisioning: Fix regression when dashboardProvisioner is accessed before being initialized
* Set dashboard provisioner in the provider
(cherry picked from commit 5ebf2d08f6)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
DataTrails: Fixes home page background issue to make Cards work better (#85055)
* DataTrails: Fixes home page background issue to make Cards work better
* Update DataTrailsHome.tsx
(cherry picked from commit d039a0a485)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Update ephemeral instances workflow to get version from package.json (#85088)
* use the same value for GRAFANA_VERSION and HOSTED_GRAFANA_IMAGE_TAG
* update codeowners for these files
(cherry picked from commit dda1531952)
Co-authored-by: Dafydd <72009875+dafydd-t@users.noreply.github.com>
postgres: improved tests (#84677)
* postgres: tests: better test aligning time-series results
* postgres: add snapshot test for a backward-compat code
(cherry picked from commit c835022861)
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Datasources: Add fixed width to name field in config editor (#84970)
add fixed width to name field
(cherry picked from commit 28ecd83987)
Co-authored-by: Erik Sundell <erik.sundell87@gmail.com>
Alerting: Return a 400 and errutil error when trying to delete a contact point that is referenced by a policy (#85481)
Return a 400 and errutil error when trying to delete a contact point that is referenced by a policy
(cherry picked from commit 5b1498f98f)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
SSO: fix reloading settings when a provider contains empty settings (#85102)
* fix reloading settings when a provider contains empty settings
* do not increment reloadFailures if settings are empty
(cherry picked from commit fad6dc4db1)
Co-authored-by: Mihai Doarna <mihai.doarna@grafana.com>
OAuth: Make sub claim required for generic oauth behind feature toggle (#85065)
* Add feature toggle for sub claims requirement
* OAuth: require valid auth id
* Fix feature toggle description
(cherry picked from commit 2f3a01f79f)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Fix InteractiveTable: React, less hooks rendered than previous render (#85043)
fix: react-hooks error if data length switches from above or below pageSize
(cherry picked from commit d7f739c8e5)
Co-authored-by: Adam Bannach <113929542+abannachGrafana@users.noreply.github.com>
Chore: Vendor wire into pkg/build (#84637)
* vendor latest wire into pkg/build
* use vendored wire in builds
* fix wire import path
* remove wire from bingo
* also support google/wire import
* make prettier happy
* change package in tess
* add debug walk for drone
* add wire_gen in tests
* remove debug walk
* restore imports
(cherry picked from commit 4d4c06b480)
Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
samlsettings: api integration (#84300)
* add strategy and tests
* use settings provider service and remove multiple providers strategy
* Move SAML strategy to ssosettings service
* Update codeowners file
* reload from settings provider
* add saml as configurable provider
* Add new SAML strategy
* rename old saml settings interface
* update saml string references
* use OSS license
* validate saml provider depends on license for List
* add tests for list rendering including saml
* change the licensing validation to service init
* replace service struct for provider
(cherry picked from commit fc205db466)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Alerting: Fix evaluation metrics to not count retries (#85873)
* Change evaluation metrics to only count once per eval, and add new metrics.
* Cosmetic: Move eval total Inc() to orginal place.
(cherry picked from commit ad7f804255)
Co-authored-by: Steve Simpson <steve.simpson@grafana.com>
TimeSeries: Fix series rendering with data links and extra fields (#86007)
(cherry picked from commit 2bedbcf344)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
EmptyState: make "message" a required prop (#86029)
* make "message" a required prop on EmptyState
* run i18n:extract
(cherry picked from commit b3401c802c)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Docs: add Table visualization Play link (#85896)
Docs: add stat visualization Play link
(cherry picked from commit 83438bd231)
Co-authored-by: David Allen <david.allen@grafana.com>
datatrails: ensure breakdown yaxis sync is maintained when layout changes (#85380)
fix: ensure breakdown yaxis sync is maintained when layout changes
(cherry picked from commit 2e1e45bbb1)
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
Chore: Fix position for RolePickerMenu being out of bounds (#85604)
* Fix position for RolePickerMenu being out of bounds
* adjust the offset of the role picker menu
(cherry picked from commit 85e66d8edb)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
InfluxDB: Fix panic when reading concurrency count during influxql health check (#85771)
fix panic when reading concurrency count during influxql health check
(cherry picked from commit 96f49bfaee)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Dashboard scenes: Fix export tab not including variables when exporting externally (#85807)
Fix export tab not including variables when exporting externally
(cherry picked from commit 96abe65fe4)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Check source panel for updates in Dashboard DS panel (#85655)
* Check source panel for updates in Dashboard DS panel
* Test
* made it better
* cleanup
* cleanup and tests
* fix failing tests
* find the correct dashboard query
* revert mixed check in dashboard behaviour
* Dashboard data source: Return error when used in mixed data source (#85765)
* MixedDS: Inform about dashboard ds not being supported
* lint fix
---------
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
(cherry picked from commit b6249d6a50)
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
Time Zones: Fix relative time when using UTC timezone (#85637)
add UTC case to e2e test + let UTC pass through to moment.tz
(cherry picked from commit 4b5b738646)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Dashboard: Move "add" actions into a dropdown (#85776)
* Move all add actions into a dropdown
* Hide alerts rules when editing
* Hide fav icon when editing
(cherry picked from commit df72cfd38e)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
PostgreSQL: Fix the verify-ca mode (#85530)
postgres: fix the verify-ca problem
(cherry picked from commit 8a15ed42ae)
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Update teamHttpHeaders casing (#85767)
teamHTTPHeaders does not work.
teamHttpHeaders is the correct syntax for the feature toggle.
(cherry picked from commit 9d7e758e04)
Co-authored-by: Dai Nguyen <88277570+ej25a@users.noreply.github.com>
Docs: g11 preview whats new fixes (#85759)
* Made style fixes to intro
* Updated upgrade guide menu title
* Commented Explore metrics docs link back in
(cherry picked from commit 8014665ab5)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
PR to document Explore Metrics (previously datatrails) (#85212)
* text dump
* initial edits
* more edits
* added more info, made edits
* first draft
* removed some commented out content
* final edits
* made requested changes
* feature name change
* missed a metrics explore - fixed
* ran prettier
---------
Co-authored-by: lwandz13 <larissa.wandzura@grafana.com>
(cherry picked from commit 3721682a02)
Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
DashboardScene: Fixes issue with mobile responsive layout due to repeated grid item class (#85731)
(cherry picked from commit edf36d9ec0)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Docs: Re-order features and update intro in Grafana 11.0-preview What's new (#85702)
* Re-order features and update intro in Grafana 11.0-preview What's new
* Removed title casing
---------
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
(cherry picked from commit 3865b8c980)
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
"Release: Updated versions in package to 11.0.0"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Chore: update go version used in `bump-version` so it works with the new format (#85111)
update go version used in bump-version
(cherry picked from commit 4974a89316)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Loki: Remove API restrictions on resource calls (#85191)
Loki: Remove API restrictions
(cherry picked from commit c80b31a0d4)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
DashboardScene: Fixes panel edit issue with clearing title not resulting in hover header mode (#85621)
* PanelEditor: Update hoverHeader state when changing panel title
* refactor test and remove duplicate
(cherry picked from commit 49a3a95dd1)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Angular deprecation: Prefer local "angularDetected" value to the remote one (#85571)
* Angular deprecation: Prefer local value to remote
* Update tests
(cherry picked from commit c033a15aaa)
Chore: Fix trailing spaces in prometheus min step (#85507)
Fix trailing spaces in prometheus min step
(cherry picked from commit 4e60f44d98)
Co-authored-by: Eunice Kim <kimeuni@amazon.com>
Fix sending `maxDataPoints` as string (#85561)
* make sure maxDataPoints is a number
* add migration for maxDataPoints
* remove migration
(cherry picked from commit 9c0f9f6ba4)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Docs: add YouTube video link and description (#85484)
* Update index.md Adding YouTube video link and description
Added a short description about the video and added the video to the page.
* Update docs/sources/panels-visualizations/visualizations/logs/index.md
Some edits went in. All nice :)
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
* Removed repetition
---------
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
(cherry picked from commit f6a94837c5)
Co-authored-by: Señor Performo - Leandro Melendez <54183040+srperf@users.noreply.github.com>
datatrails: hide "add to filter" button when there is no label value to add to filter (#85270)
fix: hide add to filters button when it won't work
(cherry picked from commit 2ecc1bb646)
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
DashboardScene: Detect changes when live is enabled from settings (#85409)
* Adapt the code to the new live timer API
* Update scenes
(cherry picked from commit 89638238e5)
DashboardScene: Fix explore to dashboard flow (#85140)
* DashboardScene: Fix explore to dashboard flow
* Tests
* Make sure dashboard is in edit mode when adding from explore
* Allow discarding changes when coming from explore
* Tests
(cherry picked from commit b4dc79401b)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Revert "Postgres: Switch the datasource plugin from lib/pq to pgx (#8… (#85509)
Revert "Postgres: Switch the datasource plugin from lib/pq to pgx (#83768)"
This reverts commit ecd6de826a.
(cherry picked from commit 8159e1db3a)
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
datatrails: handle "single" layout when switching to "all" labels (#85373)
* fix: handle "single" layout when switching to "all" labels
(cherry picked from commit 18f3c7188b)
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
Bump scenes to 4.1.2 (#85470)
* Bump scenes to 4.1.2
* Fix tests after fixing the sorting in rows
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
(cherry picked from commit 9ba9cbf300)
RBAC: Fix slow user permission search query on MySQL (#85058)
* Bench testing search user perm
* Add BenchmarkSearchUsersPermissions_1K_1K
* Clarify benchmark searches by action prefix
* Make MySQL more efficient
* Move all filter options
* Expand after assignments union
* update comments
(cherry picked from commit 5e48804364)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
DashboardScene: Fix issues with dashboard empty state (#85406)
Fix
Tests
Make sure edit mode is on when adding panel/library panel
Co-authored-by: kay delaney <kay@grafana.com>
(cherry picked from commit fa9e139123)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Plugins: Send PDC file paths and contents for backwards compatibility (#85287)
* send paths and contents
* go work sync
(cherry picked from commit 1a0ac381eb)
OptionsPicker: Allow storing raw input even when matches exist (#84790)
(cherry picked from commit db6b51cb88)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
datatrails: fix stability issues between conflict between browser history, URL sync, and trail history (#85134)
* fix: conflict between browser history and trail history
- ensure the back button or url changes don't generate trail steps
- ensure label breakdown TextLinks which appear on the summary tab work in embedded mode
(cherry picked from commit 137061d1d5)
Co-authored-by: Darren Janeczek <38694490+darrenjaneczek@users.noreply.github.com>
DashboardScene: Fix constant variable not being hidden after creation (#85196)
(cherry picked from commit ae9a4b6467)
Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
Azure/GCM: Update `filterQuery` methods to carry out migrations (#85355)
Update filterQuery methods to carry out migrations
(cherry picked from commit 697a18737d)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Scenes: Fix row crash when removing a panel from it (#85339)
* Fix row crash when removing a panel from it
* fix tests
* fix tests
(cherry picked from commit 30c9307539)
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
Tempo: Check for liveEnabled before trying to stream (#85173)
* Check for liveEnabled before attempting to stream
* Add tests
* Range const
* Update test text
(cherry picked from commit df39fc54a6)
Co-authored-by: Joey <90795735+joey-grafana@users.noreply.github.com>
StateTimeline: Fix data links causing unrendering of string fields (#85260)
(cherry picked from commit 1ffeb7c365)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Prometheus: Use correct logic for frontend package feature flag (#85294)
use correct logic for frontend package feature flag
(cherry picked from commit d4a68d6662)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
Added YouTube video to index.md on Time Series (#85188)
* Added YouTube video to index.md on Time Series
Added a brief description and the YouTube link for the Time Series video.
* Update index.md
Did quick fix
* Update index.md
Found double space, removed, hope PR goes through
* Update docs/sources/panels-visualizations/visualizations/time-series/index.md
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
---------
Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com>
(cherry picked from commit d4953f4a1f)
Co-authored-by: Señor Performo - Leandro Melendez <54183040+srperf@users.noreply.github.com>
NodeGraph: Fix possible metadata mismatch between nodes in graph (#85254)
(cherry picked from commit 20e70838e3)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Alerting: Fix receiver inheritance when provisioning a notification policy (#82007)
Terraform Issue: grafana/terraform-provider-grafana#1007
Nested routes should be allowed to inherit the contact point from the root (or direct parent) route but this fails in the provisioning API (it works in the UI)
(cherry picked from commit 2188516a21)
Co-authored-by: Julien Duchesne <julien.duchesne@grafana.com>
Auth Drawer: Use redux store to load settings (#85110)
* use actions instead of importing the backend service
* Replace the test render for redux-rtl
(cherry picked from commit 4e5bff0ada)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
SSO: add the missing fields to the okta provider (#85152)
* add the missing allowSignUp field to okta provider
* add autoLogin to okta
(cherry picked from commit 6ddced7ba8)
Co-authored-by: Mihai Doarna <mihai.doarna@grafana.com>
SQLEngine: Use `debug` method instead of custom implementation (#85118)
Use debug method instead of custom implementation
(cherry picked from commit 19159a89a2)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
EmptyState: Rename "search" variant to "not-found" (#85062)
* rename "search" variant to "not-found"
* run i18n:extract
(cherry picked from commit 36ee1571b6)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* add feature toggle usePrometheusFrontendPackage
* add feature toggle logic to Prometheus module
* use config editor with package and remove configOverhaul feature toggle
* update betterer because we will be removing other files as we replace with files from @grafana/prometheus
* fix exemplar ds picker selector
* add more description to ts-ignore
* remove go.work.sum change
* copy go.work.sum from main
* update go.work.sum after talking with ismail
* put back the promlib entry
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
* attempt at solving issue and resetting bounds to match panel content
* cleanup failed experiments
* add toggle for infinite pan - dont love naming but open to suggestions; clean up scene transform function
* add ability to "infinite" zoom (i.e. render more canvas via zooming out)
* slight refactor
* revert refactor as it broke things
Public dashboards: fix public dashboard permissions so that annotations are displayed (#85091)
* fix public dashboard anonymous user permissions so they include the new annotation permissions
* test fix
(cherry picked from commit df40e13333)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example:7.4.3,7.4.3-preview or 7.4.3-preview1'
required:true
env:
YARN_ENABLE_IMMUTABLE_INSTALLS:false
push:
default:true
required:false
dry_run:
default:false
required:false
jobs:
main:
runs-on:ubuntu-latest
steps:
# This is a basic workflow to help you get started with Actions
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example:7.4.3,7.4.3-preview or 7.4.3-preview1'
dry_run:
type:boolean
required:false
default:false
description:When enabled, this workflow will print a preview instead of creating an actual post.
secrets:
GRAFANA_MISC_STATS_API_KEY:
required:true
GRAFANABOT_FORUM_KEY:
required:true
workflow_dispatch:
inputs:
version:
type:string
required:true
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example:7.4.3,7.4.3-preview or 7.4.3-preview1'
dry_run:
type:boolean
required:false
default:false
description:When enabled, this workflow will print a preview instead of creating an actual post.
{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.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/*",
"**/pkg/promlib/**/*"
]
[linters-settings.gocritic]
enabled-checks=["ruleguard"]
[linters-settings.gocritic.settings.ruleguard]
@@ -87,7 +123,7 @@ enable = [
"dogsled",
"errcheck",
# "gochecknoinits",
"goconst",
# "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?"
"goimports",
"goprintffuncname",
@@ -143,6 +179,10 @@ text = "SA1019: http.CloseNotifier"
linters=["staticcheck"]
text="SA1019: strings.Title"
[[issues.exclude-rules]]
linters=["staticcheck"]
text="SA1019: grpc.Dial"
[[issues.exclude-rules]]
linters=["staticcheck"]
text="use fake service and real access control evaluator instead"
- **Security:** Update to Go 1.22.11 - Backport to v11.0.x [#99127](https://github.com/grafana/grafana/pull/99127), [@Proximyst](https://github.com/Proximyst)
- **Security:** Update to Go 1.22.11 - Backport to v11.0.x (Enterprise)
- **Fix:** Do not fetch Orgs if the user is authenticated by apikey/sa or render key [#97265](https://github.com/grafana/grafana/pull/97265), [@mgyongyosi](https://github.com/mgyongyosi)
<!-- 11.0.9 END -->
<!-- 11.0.8 START -->
# 11.0.8 (2024-11-19)
### Features and enhancements
- **Alerting:** Make context deadline on AlertNG service startup configurable [#96131](https://github.com/grafana/grafana/pull/96131), [@fayzal-g](https://github.com/fayzal-g)
- **User:** Check SignedInUser OrgID in RevokeInvite [#95487](https://github.com/grafana/grafana/pull/95487), [@mgyongyosi](https://github.com/mgyongyosi)
### Bug fixes
- **Anonymous User:** Adds validator service for anonymous users [#95151](https://github.com/grafana/grafana/pull/95151), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Anonymous User:** Adds validator service for anonymous users (Enterprise)
- **Azure Monitor:** Support metric namespaces fallback [#95152](https://github.com/grafana/grafana/pull/95152), [@aangelisc](https://github.com/aangelisc)
- **Migration:** Remove table aliasing in delete statement to make it work for mariadb [#95229](https://github.com/grafana/grafana/pull/95229), [@kalleep](https://github.com/kalleep)
- **ServerSideExpressions:** Disable SQL Expressions to prevent RCE and LFI vulnerability [#94971](https://github.com/grafana/grafana/pull/94971), [@samjewell](https://github.com/samjewell)
<!-- 11.0.8 END -->
<!-- 11.0.7 START -->
# 11.0.7 (2024-10-22)
### Bug fixes
- **Alerting:** Fix incorrect permission on POST external rule groups endpoint [CVE-2024-8118] [#93949](https://github.com/grafana/grafana/pull/93949), [@alexweav](https://github.com/alexweav)
- **Dashboard:** Make dashboard search faster [#94702](https://github.com/grafana/grafana/pull/94702), [@knuzhdin](https://github.com/knuzhdin)
- **OrgSync:** Do not set default Organization for a user to a non-existent Organization [#94552](https://github.com/grafana/grafana/pull/94552), [@mgyongyosi](https://github.com/mgyongyosi)
- **ServerSideExpressions:** Disable SQL Expressions to prevent RCE and LFI vulnerability [#94971](https://github.com/grafana/grafana/pull/94971), [@samjewell](https://github.com/samjewell)
<!-- 11.0.7 END -->
<!-- 11.0.6+security-01 START -->
# 11.0.6+security-01 (2024-10-17)
### Features and enhancements
- **Chore:** Bump Go to 1.22.7 [#93358](https://github.com/grafana/grafana/pull/93358), [@hairyhenderson](https://github.com/hairyhenderson)
- **Correlations:** Limit access to correlations page to users who can access Explore [#93674](https://github.com/grafana/grafana/pull/93674), [@ifrost](https://github.com/ifrost)
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93486](https://github.com/grafana/grafana/pull/93486), [@wbrowne](https://github.com/wbrowne)
- **SQL Expressions**: Fixes CVE-2024-9264
<!-- 11.0.6+security-01 END -->
<!-- 11.0.5+security-01 START -->
# 11.0.5+security-01 (2024-10-17)
### Features and enhancements
- **Chore:** Update swagger ui (4.3.0 to 5.17.14) [#92345](https://github.com/grafana/grafana/pull/92345), [@ryantxu](https://github.com/ryantxu)
- **TutorialCard:** Fix link to tutorial not opening [#92645](https://github.com/grafana/grafana/pull/92645), [@eledobleefe](https://github.com/eledobleefe)
- **SQL Expressions**: Fixes CVE-2024-9264
<!-- 11.0.5+security-01 END -->
<!-- 11.0.6 START -->
# 11.0.6 (2024-10-01)
### Features and enhancements
- **Chore:** Bump Go to 1.22.7 [#93358](https://github.com/grafana/grafana/pull/93358), [@hairyhenderson](https://github.com/hairyhenderson)
- **Correlations:** Limit access to correlations page to users who can access Explore [#93674](https://github.com/grafana/grafana/pull/93674), [@ifrost](https://github.com/ifrost)
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93486](https://github.com/grafana/grafana/pull/93486), [@wbrowne](https://github.com/wbrowne)
<!-- 11.0.6 END -->
<!-- 11.0.5 START -->
# 11.0.5 (2024-09-26)
### Features and enhancements
- **Chore:** Update swagger ui (4.3.0 to 5.17.14) [#92345](https://github.com/grafana/grafana/pull/92345), [@ryantxu](https://github.com/ryantxu)
- **TutorialCard:** Fix link to tutorial not opening [#92645](https://github.com/grafana/grafana/pull/92645), [@eledobleefe](https://github.com/eledobleefe)
- **Alerting:** Fixed CVE-2024-8118.
<!-- 11.0.5 END -->
<!-- 11.0.4 START -->
# 11.0.4 (2024-08-27)
### Bug fixes
- **Alerting:** Fix persisting result fingerprint that is used by recovery threshold [#91328](https://github.com/grafana/grafana/pull/91328), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Auditing:** Fix a possible crash when audit logger parses responses for failed requests (Enterprise)
- **RBAC:** Fix seeder failures when inserting duplicated permissions (Enterprise)
- **Snapshots:** Fix panic when snapshot_remove_expired is true [#91330](https://github.com/grafana/grafana/pull/91330), [@ryantxu](https://github.com/ryantxu)
<!-- 11.0.4 END -->
<!-- 11.0.3 START -->
# 11.0.3 (2024-08-14)
### Bug fixes
- **Swagger:** Fixed CVE-2024-6837.
<!-- 11.0.3 END -->
<!-- 11.0.2 START -->
# 11.0.2 (2024-07-25)
### Features and enhancements
- **Alerting:** Update grafana/alerting to c340765c985a12603bbdfcd10576ddfdbf9dc284 [#90388](https://github.com/grafana/grafana/pull/90388), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Prometheus:** Reintroduce Azure audience override feature flag [#90558](https://github.com/grafana/grafana/pull/90558), [@aangelisc](https://github.com/aangelisc)
### Bug fixes
- **Alerting:** Skip loading alert rules for dashboards when disabled [#89904](https://github.com/grafana/grafana/pull/89904), [@gillesdemey](https://github.com/gillesdemey)
- **BrowseDashboards:** Prepend subpath to New Browse Dashboard actions. [#89130](https://github.com/grafana/grafana/issues/89130), [@joshhunt](https://github.com/joshhunt)
- **Alerting:** Fix rule storage to filter by group names using case-sensitive comparison. [#89063](https://github.com/grafana/grafana/issues/89063), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **RBAC:** List only the folders that the user has access to. [#89015](https://github.com/grafana/grafana/issues/89015), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **DashboardScene:** Fixes lack of re-render when updating field override properties. [#88985](https://github.com/grafana/grafana/issues/88985), [@torkelo](https://github.com/torkelo)
- **DashboardScene:** Fixes inspect with transforms issue. [#88862](https://github.com/grafana/grafana/issues/88862), [@torkelo](https://github.com/torkelo)
- **Access Control:** Clean up permissions for deprovisioned data sources. [#88700](https://github.com/grafana/grafana/issues/88700), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Loki:** Fix editor history in wrong order. [#88669](https://github.com/grafana/grafana/issues/88669), [@svennergr](https://github.com/svennergr)
- **SSE:** Fix threshold unmarshal to avoid panic. [#88651](https://github.com/grafana/grafana/issues/88651), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **LibraryPanels/RBAC:** Ignore old folder permission check when deleting/patching lib panel. [#88493](https://github.com/grafana/grafana/issues/88493), [@kaydelaney](https://github.com/kaydelaney)
- **Dashboards:** Correctly display Admin access to dashboards in the UI. [#88473](https://github.com/grafana/grafana/issues/88473), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **LogsTable:** Fix default sort by time. [#88434](https://github.com/grafana/grafana/issues/88434), [@svennergr](https://github.com/svennergr)
- **Alerting:** Fix typo in JSON response for rule export. [#88090](https://github.com/grafana/grafana/issues/88090), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **CloudMonitoring:** Fix query type selection issue. [#88024](https://github.com/grafana/grafana/issues/88024), [@aangelisc](https://github.com/aangelisc)
- **Alerting:** Fix scheduler to sort rules before evaluation. [#88021](https://github.com/grafana/grafana/issues/88021), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **DashboardScene:** Skip panel repeats when values are the same. [#87896](https://github.com/grafana/grafana/issues/87896), [@torkelo](https://github.com/torkelo)
- **Alerting:** Do not store series values from past evaluations in state manager for no reason. [#87845](https://github.com/grafana/grafana/issues/87845), [@alexweav](https://github.com/alexweav)
- **DashboardScene:** Fixing major row repeat issues. [#87800](https://github.com/grafana/grafana/issues/87800), [@torkelo](https://github.com/torkelo)
- **DashboardScene:** Fixes checkbox orienation in save forms. [#86490](https://github.com/grafana/grafana/issues/86490), [@torkelo](https://github.com/torkelo)
- **Provisioning:** Add override option to role provisioning. (Enterprise)
### Breaking changes
If you had selected your language as "Português Brasileiro" previously, this will be reset. You have to select it again in your Preferences for the fix to be applied and the translations will then be shown. Issue [#89374](https://github.com/grafana/grafana/issues/89374)
<!-- 11.0.1 END -->
<!-- 11.0.0 START -->
# 11.0.0 (2024-05-14)
### Features and enhancements
- **Alerting:** Add two sets of provisioning actions for rules and notifications . [#87572](https://github.com/grafana/grafana/issues/87572), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Chore:** Upgrade go to 1.21.10. [#87472](https://github.com/grafana/grafana/issues/87472), [@stephaniehingtgen](https://github.com/stephaniehingtgen)
- **Auth:** Force lowercase login/email for users. [#86985](https://github.com/grafana/grafana/issues/86985), [@eleijonmarck](https://github.com/eleijonmarck)
- **Navigation:** Add a return to previous button when navigating to different sections. [#86797](https://github.com/grafana/grafana/issues/86797), [@eledobleefe](https://github.com/eledobleefe)
- **DashboardScene:** Move add library panel view from grid item to drawer. [#86409](https://github.com/grafana/grafana/issues/86409), [@torkelo](https://github.com/torkelo)
- **Alerting:** Reduce set of fields that could trigger alert state change. [#86266](https://github.com/grafana/grafana/issues/86266), [@benoittgt](https://github.com/benoittgt)
- **OAuth:** Make sub claim required for generic oauth behind feature toggle. [#86118](https://github.com/grafana/grafana/issues/86118), [@kalleep](https://github.com/kalleep)
- **Loki:** Remove API restrictions on resource calls. [#85201](https://github.com/grafana/grafana/issues/85201), [@svennergr](https://github.com/svennergr)
- **Azure data sources:** Set selected config type before save. [#87632](https://github.com/grafana/grafana/issues/87632), [@bossinc](https://github.com/bossinc)
- **Loki:** Fix log context when no label types are present. [#87600](https://github.com/grafana/grafana/issues/87600), [@svennergr](https://github.com/svennergr)
- **DashboardDataSource:** Fixes issue where sometimes untransformed data could be returned . [#87484](https://github.com/grafana/grafana/issues/87484), [@torkelo](https://github.com/torkelo)
- **Provisioning:** Look up provisioned folders by UID when possible. [#87468](https://github.com/grafana/grafana/issues/87468), [@DanCech](https://github.com/DanCech)
- **Cloudwatch:** Update grafana-aws-sdk to fix sts endpoints. [#87345](https://github.com/grafana/grafana/issues/87345), [@iwysiu](https://github.com/iwysiu)
- **Select:** Fixes issue preserving search term (input) when selecting a value. [#87249](https://github.com/grafana/grafana/issues/87249), [@torkelo](https://github.com/torkelo)
- **Alerting:** Prevent search from locking the browser. [#87230](https://github.com/grafana/grafana/issues/87230), [@gillesdemey](https://github.com/gillesdemey)
- **DashboardScene:** Fixes issue referring to library panel in dashboard data source . [#87173](https://github.com/grafana/grafana/issues/87173), [@torkelo](https://github.com/torkelo)
- **Data source:** Maintain the default data source permissions when switching from unlicensed to licensed Grafana. [#87142](https://github.com/grafana/grafana/issues/87142), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Alerting:** Allow deleting contact points referenced only by auto-generated policies. [#87115](https://github.com/grafana/grafana/issues/87115), [@gillesdemey](https://github.com/gillesdemey)
- **Auth:** Sign sigV4 request after adding headers. [#87072](https://github.com/grafana/grafana/issues/87072), [@iwysiu](https://github.com/iwysiu)
- **DashboardScene:** Fixes issues with relative time range in panel edit. [#87026](https://github.com/grafana/grafana/issues/87026), [@torkelo](https://github.com/torkelo)
- **DashboardScene:** Fixes issue with dashboard links and variables. [#87025](https://github.com/grafana/grafana/issues/87025), [@torkelo](https://github.com/torkelo)
- **SQLStore:** Disable redundant create and drop unique index migrations on dashboard table. [#86867](https://github.com/grafana/grafana/issues/86867), [@papagian](https://github.com/papagian)
- **LogContext:** Fix structured metadata labels being added as stream selectors. [#86826](https://github.com/grafana/grafana/issues/86826), [@svennergr](https://github.com/svennergr)
- **DashboardScene:** Fixes issue with editing panels that uses instanceState. [#86824](https://github.com/grafana/grafana/issues/86824), [@torkelo](https://github.com/torkelo)
- **Alerting:** Take receivers into account when custom grouping Alertmanager groups. [#86699](https://github.com/grafana/grafana/issues/86699), [@konrad147](https://github.com/konrad147)
- **LDAP:** Fix listing all non-matching groups. [#86689](https://github.com/grafana/grafana/issues/86689), [@mgyongyosi](https://github.com/mgyongyosi)
- **Alerting:** Fix simplified routing group by override. [#86563](https://github.com/grafana/grafana/issues/86563), [@JacobsonMT](https://github.com/JacobsonMT)
- **NodeGraph:** Fix invisible arrow tips in Editor. [#86548](https://github.com/grafana/grafana/issues/86548), [@timo](https://github.com/timo)
- **Dashboard:** DashboardPageProxy - Use chaining operators to prevent runtime error. [#86536](https://github.com/grafana/grafana/issues/86536), [@axelavargas](https://github.com/axelavargas)
- **DashboardScene:** Fixes issue saving new dashboard from panel edit. [#86480](https://github.com/grafana/grafana/issues/86480), [@torkelo](https://github.com/torkelo)
- **DashboardScene:** Fixes minor issue transitioning between dashboards. [#86475](https://github.com/grafana/grafana/issues/86475), [@torkelo](https://github.com/torkelo)
- **MSSQL:** Add `SQL_VARIANT` converter and update test. [#86469](https://github.com/grafana/grafana/issues/86469), [@aangelisc](https://github.com/aangelisc)
- **DashboardScene:** Fixes react panels with old angular options. [#86411](https://github.com/grafana/grafana/issues/86411), [@torkelo](https://github.com/torkelo)
- **Nodegraph:** Fix issue with rendering single node. [#86195](https://github.com/grafana/grafana/issues/86195), [@aocenas](https://github.com/aocenas)
- **Datasources:** Add fixed width to name field in config editor. [#86179](https://github.com/grafana/grafana/issues/86179), [@sunker](https://github.com/sunker)
- **Alerting:** Return a 400 and errutil error when trying to delete a contact point that is referenced by a policy. [#86163](https://github.com/grafana/grafana/issues/86163), [@alexweav](https://github.com/alexweav)
- **DashboardScene:** Fixes issue moving between dashboards. [#86096](https://github.com/grafana/grafana/issues/86096), [@torkelo](https://github.com/torkelo)
- **Alerting:** Fix evaluation metrics to not count retries. [#86059](https://github.com/grafana/grafana/issues/86059), [@stevesg](https://github.com/stevesg)
- **Google Cloud Monitor:** Fix interface conversion for incorrect type in `cloudMonitoringProm.run`. [#85928](https://github.com/grafana/grafana/issues/85928), [@adamyeats](https://github.com/adamyeats)
- **Dashboard:** Allow `auto` refresh option when saving a dashboard. [#85922](https://github.com/grafana/grafana/issues/85922), [@bfmatei](https://github.com/bfmatei)
- **Time Zones:** Fix relative time when using UTC timezone. [#85779](https://github.com/grafana/grafana/issues/85779), [@ashharrison90](https://github.com/ashharrison90)
- **PostgreSQL:** Fix the verify-ca mode. [#85775](https://github.com/grafana/grafana/issues/85775), [@gabor](https://github.com/gabor)
- **DashboardScene:** Fixes issue with mobile responsive layout due to repeated grid item class. [#85741](https://github.com/grafana/grafana/issues/85741), [@torkelo](https://github.com/torkelo)
- **DashboardScene:** Fixes panel edit issue with clearing title not resulting in hover header mode . [#85633](https://github.com/grafana/grafana/issues/85633), [@torkelo](https://github.com/torkelo)
- **Angular deprecation:** Prefer local "angularDetected" value to the remote one. [#85632](https://github.com/grafana/grafana/issues/85632), [@xnyo](https://github.com/xnyo)
- **Chore:** Fix trailing spaces in prometheus min step. [#85579](https://github.com/grafana/grafana/issues/85579), [@euniceek](https://github.com/euniceek)
- **SAML:** Fix Authn request generation in case of HTTP-POST binding. (Enterprise)
- **Reporting:** Fix CSVs for library panels within folders. (Enterprise)
### Breaking changes
The `@grafana/e2e` package is deprecated in Grafana 11.0.0. If your Grafana plugin has end-to-end tests that use `@grafana/e2e`, it's recommended to replace them with [`@grafana/plugin-e2e`](https://www.npmjs.com/package/@grafana/plugin-e2e?activeTab=readme) and Playwright. For information on how to migrate, please refer to the plugin-e2e [docs](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/migrate-from-grafana-e2e). Issue [#85778](https://github.com/grafana/grafana/issues/85778)
### Plugin development fixes & changes
- **DateTimePicker:** Alternate timezones now behave correctly. [#87041](https://github.com/grafana/grafana/issues/87041), [@ashharrison90](https://github.com/ashharrison90)
- **TimeOfDayPicker:** Fix text colours in light mode. [#86776](https://github.com/grafana/grafana/issues/86776), [@ashharrison90](https://github.com/ashharrison90)
<!-- 11.0.0 END -->
<!-- 11.0.0-preview START -->
# 11.0.0-preview
### Features and enhancements
- **Alerting:** Editor role can access all provisioning API. [#85022](https://github.com/grafana/grafana/issues/85022), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **SQLStore:** Enable migration locking by default. [#84983](https://github.com/grafana/grafana/issues/84983), [@papagian](https://github.com/papagian)
- **Auth:** Remove `oauth_skip_org_role_update_sync` as an option. [#84972](https://github.com/grafana/grafana/issues/84972), [@eleijonmarck](https://github.com/eleijonmarck)
- **Canvas:** Add "infinite" pan / zoom functionality. [#84968](https://github.com/grafana/grafana/issues/84968), [@nmarrs](https://github.com/nmarrs)
- **InteractiveTable:** Add expand all to column. [#84966](https://github.com/grafana/grafana/issues/84966), [@abannachGrafana](https://github.com/abannachGrafana)
- **Snapshots:** Viewers can not create a Snapshot. [#84952](https://github.com/grafana/grafana/issues/84952), [@evictorero](https://github.com/evictorero)
- **GenAI:** Autogenerate title and description for panels and dashboards. [#84933](https://github.com/grafana/grafana/issues/84933), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **Alerting:** Enable simplified routing FF by default. [#84856](https://github.com/grafana/grafana/issues/84856), [@JacobsonMT](https://github.com/JacobsonMT)
- **Auth:** Enable case insensitive logins/emails by default. [#84840](https://github.com/grafana/grafana/issues/84840), [@eleijonmarck](https://github.com/eleijonmarck)
- **RBAC:** Enable annotation permission update by default. [#84787](https://github.com/grafana/grafana/issues/84787), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Azure:** Support multi-resource namespace (NetApp Volumes). [#84779](https://github.com/grafana/grafana/issues/84779), [@aangelisc](https://github.com/aangelisc)
- **Prometheus:** Default support labels value endpoint with match param when prom type and version not set. [#84778](https://github.com/grafana/grafana/issues/84778), [@bohandley](https://github.com/bohandley)
- **MSSQL:** Add Windows AD/Kerberos auth. [#84742](https://github.com/grafana/grafana/issues/84742), [@asimpson](https://github.com/asimpson)
- **Chore:** Disable angular support by default. [#84738](https://github.com/grafana/grafana/issues/84738), [@tolzhabayev](https://github.com/tolzhabayev)
- **Elasticsearch:** Remove xpack button and make includeFrozen not dependant on it. [#84734](https://github.com/grafana/grafana/issues/84734), [@ivanahuckova](https://github.com/ivanahuckova)
- **Plugins:** Enable feature toggle `pluginsDynamicAngularDetectionPatterns` by default. [#84723](https://github.com/grafana/grafana/issues/84723), [@xnyo](https://github.com/xnyo)
- **Plugins:** Enable managedPluginsInstall by default. [#84721](https://github.com/grafana/grafana/issues/84721), [@oshirohugo](https://github.com/oshirohugo)
- **Alerting:** Stop persisting silences and nflog to disk. [#84706](https://github.com/grafana/grafana/issues/84706), [@JacobsonMT](https://github.com/JacobsonMT)
- **Histogram:** Add support for stacking mode. [#84693](https://github.com/grafana/grafana/issues/84693), [@adela-almasan](https://github.com/adela-almasan)
- **Teams:** Display teams page to team reader if they also have the access to list team permissions. [#84650](https://github.com/grafana/grafana/issues/84650), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Plugins:** Enable feature toggle `enablePluginsTracingByDefault` by default. [#84645](https://github.com/grafana/grafana/issues/84645), [@xnyo](https://github.com/xnyo)
- **NestedFolders:** Enable nested folders by default. [#84631](https://github.com/grafana/grafana/issues/84631), [@zserge](https://github.com/zserge)
- **Canvas:** Add direction options for connections. [#84620](https://github.com/grafana/grafana/issues/84620), [@drew08t](https://github.com/drew08t)
- **CloudWatch:** Static labels should use label name. [#84611](https://github.com/grafana/grafana/issues/84611), [@iwysiu](https://github.com/iwysiu)
- **Tempo:** Deprecate old search. [#84498](https://github.com/grafana/grafana/issues/84498), [@joey-grafana](https://github.com/joey-grafana)
- **Canvas:** Support dashed connection lines. [#84496](https://github.com/grafana/grafana/issues/84496), [@Develer](https://github.com/Develer)
- **I18n:** Expose current UI language in @grafana/runtime config. [#84457](https://github.com/grafana/grafana/issues/84457), [@joshhunt](https://github.com/joshhunt)
- **Canvas:** Add snapping to vertex edit. [#84417](https://github.com/grafana/grafana/issues/84417), [@drew08t](https://github.com/drew08t)
- **CloudWatch Logs:** Remove toggle for cloudWatchLogsMonacoEditor. [#84414](https://github.com/grafana/grafana/issues/84414), [@iwysiu](https://github.com/iwysiu)
- **Prometheus:** Use frontend package in Prometheus DS with a feature toggle. [#84397](https://github.com/grafana/grafana/issues/84397), [@bohandley](https://github.com/bohandley)
- **Alerting:** Show error message when error is thrown after clicking create alert f…. [#84367](https://github.com/grafana/grafana/issues/84367), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Storage:** Add support for listing resource history. [#84331](https://github.com/grafana/grafana/issues/84331), [@DanCech](https://github.com/DanCech)
- **Documentation:** Updated yaml for influxdb data sources. [#84119](https://github.com/grafana/grafana/issues/84119), [@ldomesjo](https://github.com/ldomesjo)
- **Queries:** Improve debug logging of metrics queries. [#84048](https://github.com/grafana/grafana/issues/84048), [@mmandrus](https://github.com/mmandrus)
- **Storage:** Support listing deleted entities. [#84043](https://github.com/grafana/grafana/issues/84043), [@DanCech](https://github.com/DanCech)
- **Explore:** Remove deprecated `query` option from `splitOpen`. [#83973](https://github.com/grafana/grafana/issues/83973), [@Elfo404](https://github.com/Elfo404)
- **Auth:** Set the default org after User login. [#83918](https://github.com/grafana/grafana/issues/83918), [@mgyongyosi](https://github.com/mgyongyosi)
- **Canvas:** Add datalink support to rectangle and ellipse elements. [#83870](https://github.com/grafana/grafana/issues/83870), [@nmarrs](https://github.com/nmarrs)
- **NodeGraph:** Edge color and stroke-dasharray support. [#83855](https://github.com/grafana/grafana/issues/83855), [@morrro01](https://github.com/morrro01)
- **Plugins:** Fetch instance provisioned plugins in cloud, to check full installation. [#83784](https://github.com/grafana/grafana/issues/83784), [@oshirohugo](https://github.com/oshirohugo)
- **Alerting:** Implement correct RBAC checks for creating new notification templates. [#83767](https://github.com/grafana/grafana/issues/83767), [@gillesdemey](https://github.com/gillesdemey)
- **Library panels:** Ensure all filters are visible on mobile . [#83759](https://github.com/grafana/grafana/issues/83759), [@ashharrison90](https://github.com/ashharrison90)
- **Alerting:** Allow inserting before or after existing policy. [#83704](https://github.com/grafana/grafana/issues/83704), [@gillesdemey](https://github.com/gillesdemey)
- **Chore:** Taint ArrayVector with `never` to further discourage. [#83681](https://github.com/grafana/grafana/issues/83681), [@joshhunt](https://github.com/joshhunt)
- **Canvas:** Add vertex control to connections. [#83653](https://github.com/grafana/grafana/issues/83653), [@drew08t](https://github.com/drew08t)
- **Alerting:** Disable legacy alerting for ever. [#83651](https://github.com/grafana/grafana/issues/83651), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Table:** Preserve filtered value state. [#83631](https://github.com/grafana/grafana/issues/83631), [@codeincarnate](https://github.com/codeincarnate)
- **Canvas:** Add ability to edit selected connections in the inline editor. [#83625](https://github.com/grafana/grafana/issues/83625), [@nmarrs](https://github.com/nmarrs)
- **Auth:** Add all settings to Azure AD SSO config UI. [#83618](https://github.com/grafana/grafana/issues/83618), [@mgyongyosi](https://github.com/mgyongyosi)
- **Cfg:** Add a setting to configure if the local file system is available. [#83616](https://github.com/grafana/grafana/issues/83616), [@mgyongyosi](https://github.com/mgyongyosi)
- **Server:** Reload TLS certs without a server restart. [#83589](https://github.com/grafana/grafana/issues/83589), [@chalapat](https://github.com/chalapat)
- **Transformations:** Add substring matcher to the 'Filter by Value' transformation. [#83548](https://github.com/grafana/grafana/issues/83548), [@timlevett](https://github.com/timlevett)
- **Folders:** Allow listing folders with write permission. [#83527](https://github.com/grafana/grafana/issues/83527), [@papagian](https://github.com/papagian)
- **Alerting:** Support deleting rule groups in the provisioning API. [#83514](https://github.com/grafana/grafana/issues/83514), [@joeblubaugh](https://github.com/joeblubaugh)
- **Cloudwatch:** Bump grafana/aws-sdk-go to 0.24.0. [#83480](https://github.com/grafana/grafana/issues/83480), [@idastambuk](https://github.com/idastambuk)
- **Alerting:** Stop persisting user-defined templates to disk. [#83456](https://github.com/grafana/grafana/issues/83456), [@JacobsonMT](https://github.com/JacobsonMT)
- **Transformer:** Config from Query: set threshold colours. [#83366](https://github.com/grafana/grafana/issues/83366), [@LarsStegman](https://github.com/LarsStegman)
- **Canvas:** Add ability to rotate elements. [#83295](https://github.com/grafana/grafana/issues/83295), [@nmarrs](https://github.com/nmarrs)
- **Tempo:** Add support for ad-hoc filters. [#83290](https://github.com/grafana/grafana/issues/83290), [@joey-grafana](https://github.com/joey-grafana)
- **Page:** Use browser native scrollbars for the main page content. [#82919](https://github.com/grafana/grafana/issues/82919), [@joshhunt](https://github.com/joshhunt)
- **Parca:** Apply template variables for labelSelector in query. [#82910](https://github.com/grafana/grafana/issues/82910), [@lzakharov](https://github.com/lzakharov)
- **Grafana/UI:** Replace Splitter with useSplitter hook and refactor PanelEdit snapping logic to useSnappingSplitter hook . [#82895](https://github.com/grafana/grafana/issues/82895), [@torkelo](https://github.com/torkelo)
- **Cloudwatch:** Add linting to restrict imports from core. [#82538](https://github.com/grafana/grafana/issues/82538), [@idastambuk](https://github.com/idastambuk)
- **Image Rendering:** Add settings for default width, height and scale. [#82040](https://github.com/grafana/grafana/issues/82040), [@khushijain21](https://github.com/khushijain21)
- **AzureMonitor:** User authentication support. [#81918](https://github.com/grafana/grafana/issues/81918), [@aangelisc](https://github.com/aangelisc)
- **Plugins:** Disable uninstall while cloud uninstall is not completed. [#81907](https://github.com/grafana/grafana/issues/81907), [@oshirohugo](https://github.com/oshirohugo)
- **Plugins:** Disable update button when cloud install is not completed. [#81716](https://github.com/grafana/grafana/issues/81716), [@oshirohugo](https://github.com/oshirohugo)
- **Expressions:** Sql expressions with Duckdb. [#81666](https://github.com/grafana/grafana/issues/81666), [@scottlepp](https://github.com/scottlepp)
- **Grafana:** Replace magic number with a constant variable in response status. [#80132](https://github.com/grafana/grafana/issues/80132), [@rlaisqls](https://github.com/rlaisqls)
- **Alerting:** Update rule access control to explicitly check for permissions "alert.rules:read" and "folders:read". [#78289](https://github.com/grafana/grafana/issues/78289), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Update provisioning API to support regular permissions. [#77007](https://github.com/grafana/grafana/issues/77007), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Whitelabelling:** Override version in UI from config. (Enterprise)
- **Reporting:** Delete Deprecated Endpoint for Single Dashboard. (Enterprise)
- **Plugins:** Add endpoint to get provisioned plugins from an instance. (Enterprise)
- **Reporting:** Delete Deprecated Endpoint for Scheduling. (Enterprise)
- **Reporting:** Delete Deprecated Endpoint for Email. (Enterprise)
### Bug fixes
- **RBAC:** Fix access checks for interactions with RBAC roles in hosted Grafana. [#85520](https://github.com/grafana/grafana/issues/85520), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
- **Keybindings:** Replace mod+h as help shortcut with ? . [#85449](https://github.com/grafana/grafana/issues/85449), [@tskarhed](https://github.com/tskarhed)
- **RBAC:** Fix slow user permission search query on MySQL. [#85410](https://github.com/grafana/grafana/issues/85410), [@gamab](https://github.com/gamab)
- **BrowseDashboards:** Add subpath to URLs on Browse Dashboards page. [#85354](https://github.com/grafana/grafana/issues/85354), [@butkovv](https://github.com/butkovv)
- **Dashboards:** Fix issue where long ad-hoc values broke UI. [#85290](https://github.com/grafana/grafana/issues/85290), [@kaydelaney](https://github.com/kaydelaney)
- **NodeGraph:** Fix possible metadata mismatch between nodes in graph. [#85261](https://github.com/grafana/grafana/issues/85261), [@aocenas](https://github.com/aocenas)
- **Alerting:** Fix receiver inheritance when provisioning a notification policy. [#85193](https://github.com/grafana/grafana/issues/85193), [@julienduchesne](https://github.com/julienduchesne)
- **RBAC:** Fix slow user permission search query on MySQL. [#85058](https://github.com/grafana/grafana/issues/85058), [@gamab](https://github.com/gamab)
- **CloudMonitoring:** Only run query if filters are complete. [#85004](https://github.com/grafana/grafana/issues/85004), [@aangelisc](https://github.com/aangelisc)
- **BrowseDashboards:** Add subpath to URLs on Browse Dashboards page. [#84992](https://github.com/grafana/grafana/issues/84992), [@butkovv](https://github.com/butkovv)
- **Datasources:** Fix expressions that reference hidden queries. [#84977](https://github.com/grafana/grafana/issues/84977), [@sunker](https://github.com/sunker)
- **Canvas:** Fix crash when trying to add wind turbine element. [#84962](https://github.com/grafana/grafana/issues/84962), [@nmarrs](https://github.com/nmarrs)
- **InfluxDB:** Fix alias interpolation when it has $\_\_interval or multiple tags. [#84940](https://github.com/grafana/grafana/issues/84940), [@itsmylife](https://github.com/itsmylife)
- **Alerting:** Stop returning autogen routes for non-admin on api/v2/status. [#84864](https://github.com/grafana/grafana/issues/84864), [@JacobsonMT](https://github.com/JacobsonMT)
- **RolePicker:** Don't try to fetch roles for new form. [#84630](https://github.com/grafana/grafana/issues/84630), [@kalleep](https://github.com/kalleep)
- **Scenes:** Fix public dashboard email sharing section. [#84467](https://github.com/grafana/grafana/issues/84467), [@juanicabanas](https://github.com/juanicabanas)
- **Alerting:** Fix AlertsFolderView not showing rules when using nested folders. [#84465](https://github.com/grafana/grafana/issues/84465), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Scenes:** Fix issue with discarding unsaved changes modal in new dashboards. [#84369](https://github.com/grafana/grafana/issues/84369), [@kaydelaney](https://github.com/kaydelaney)
- **PostgreSQL:** Display correct initial value for tls mode. [#84356](https://github.com/grafana/grafana/issues/84356), [@gabor](https://github.com/gabor)
- **Cloudwatch:** Fix issue with Grafana Assume Role. [#84315](https://github.com/grafana/grafana/issues/84315), [@sarahzinger](https://github.com/sarahzinger)
- **Playlists:** Fix kiosk mode not activating when starting a playlist. [#84262](https://github.com/grafana/grafana/issues/84262), [@joshhunt](https://github.com/joshhunt)
- **Google Cloud Monitor:** Fix `res` being accessed after it becomes `nil` in `promql_query.go`. [#84223](https://github.com/grafana/grafana/issues/84223), [@adamyeats](https://github.com/adamyeats)
- **Elasticsearch:** Fix using of individual query time ranges when querying. [#84201](https://github.com/grafana/grafana/issues/84201), [@ivanahuckova](https://github.com/ivanahuckova)
- **InfluxDB:** Fix for wrong query generated with template variable and non regex operator on frontend mode. [#84175](https://github.com/grafana/grafana/issues/84175), [@wasim-nihal](https://github.com/wasim-nihal)
- **Prometheus:** Remove < and > from Query Builder Label Matcher operations. [#83981](https://github.com/grafana/grafana/issues/83981), [@kylebrandt](https://github.com/kylebrandt)
- **Worker:** Use CorsWorker to avoid CORS issues. [#83976](https://github.com/grafana/grafana/issues/83976), [@ivanortegaalba](https://github.com/ivanortegaalba)
- **Tempo:** Fix by operator to support multiple arguments. [#83947](https://github.com/grafana/grafana/issues/83947), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
- **Loki:** Interpolate variables in live queries. [#83831](https://github.com/grafana/grafana/issues/83831), [@ivanahuckova](https://github.com/ivanahuckova)
- **Alerting:** Fix bug in screenshot service using incorrect limit. [#83786](https://github.com/grafana/grafana/issues/83786), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Cloudwatch:** Fix new ConfigEditor to add the custom namespace field . [#83762](https://github.com/grafana/grafana/issues/83762), [@idastambuk](https://github.com/idastambuk)
- **LDAP:** Fix LDAP users authenticated via auth proxy not being able to use LDAP active sync. [#83715](https://github.com/grafana/grafana/issues/83715), [@Jguer](https://github.com/Jguer)
- **Elasticsearch:** Fix adhoc filters not applied in frontend mode. [#83592](https://github.com/grafana/grafana/issues/83592), [@svennergr](https://github.com/svennergr)
- **RBAC:** Fix delete team permissions on team delete. [#83442](https://github.com/grafana/grafana/issues/83442), [@gamab](https://github.com/gamab)
- **Dashboards:** Fixes issue where panels would not refresh if time range updated while in panel view mode. [#83418](https://github.com/grafana/grafana/issues/83418), [@kaydelaney](https://github.com/kaydelaney)
- **AzureMonitor:** Fix mishandled resources vs workspaces. [#83184](https://github.com/grafana/grafana/issues/83184), [@adamyeats](https://github.com/adamyeats)
- **Sql:** Fix an issue with connection limits not updating when jsonData is updated. [#83175](https://github.com/grafana/grafana/issues/83175), [@jarben](https://github.com/jarben)
- **Alerting:** Use time_intervals instead of the deprecated mute_time_intervals in a…. [#83147](https://github.com/grafana/grafana/issues/83147), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **DataFrame:** Improve typing of arrayToDataFrame helper and fix null/undefined handling. [#83104](https://github.com/grafana/grafana/issues/83104), [@aocenas](https://github.com/aocenas)
- **Cloudwatch:** Fix filter button issue in VariableEditor. [#83082](https://github.com/grafana/grafana/issues/83082), [@wilguo](https://github.com/wilguo)
- **Alerting:** Fix panic in provisioning filter contacts by unknown name. [#83070](https://github.com/grafana/grafana/issues/83070), [@JacobsonMT](https://github.com/JacobsonMT)
- **Search:** Include collapsed panels in search v2. [#83047](https://github.com/grafana/grafana/issues/83047), [@suntala](https://github.com/suntala)
- **Plugins:** Fix loading modules that only export a default. [#82299](https://github.com/grafana/grafana/issues/82299), [@sd2k](https://github.com/sd2k)
- **Table:** Fix units showing in footer after reductions without units. [#82081](https://github.com/grafana/grafana/issues/82081), [@codeincarnate](https://github.com/codeincarnate)
- **AuthProxy:** Invalidate previous cached item for user when changes are made to any header. [#81445](https://github.com/grafana/grafana/issues/81445), [@klesh](https://github.com/klesh)
- **Unit:** Add SI prefix for empty unit. [#79897](https://github.com/grafana/grafana/issues/79897), [@raymalt](https://github.com/raymalt)
- **Variables:** Multi-select DataSource variables are inconsistently displayed in the Data source picker. [#76039](https://github.com/grafana/grafana/issues/76039), [@polibb](https://github.com/polibb)
- **SAML:** Better error message for saml private key type errors. (Enterprise)
- **Reporting:** Fix monthly schedule text and modify monthly schedule inputs behavior. (Enterprise)
### Breaking changes
In 9.3 we released a way to set `case_insensitive_login` to true. This enables, lowercased username, login for users signing up with Grafana, for more information read our [blog post](https://grafana.com/blog/2022/12/12/guide-to-using-the-new-grafana-cli-user-identity-conflict-tool-in-grafana-9.3/).
If you encounter any issues with users signing up, we recommend everyone to use lowercase in their login, username otherwise refer to the blog post for how to solve any of the users that can be conflicting with their login/username. Issue [#84972](https://github.com/grafana/grafana/issues/84972)
This is a breaking change for users who use uppercase in their login or emails. The users are by default now using lowercase as part of their login and emails.
Before this code change, users would be able to still log in as either `aUser@user.com` or `auser@user.com`, users are now only able to login and signup with grafana using lowercasing `auser@user.com`.
We recommend reviewing the [blog post](https://grafana.com/blog/2022/12/12/guide-to-using-the-new-grafana-cli-user-identity-conflict-tool-in-grafana-9.3/#:~:text=A%20user%20identity%20conflict%20occurs,more%20capitalized%20letters%20%E2%80%9Cgrafana_LOGIN%E2%80%9D.) about using the CLI and why this is important for us to consolidate our security efforts. Issue [#84840](https://github.com/grafana/grafana/issues/84840)
This is a breaking change for users who have restricted the default access to annotation permissions by removing annotation related actions from the Viewer or Editor basic roles. In such cases we are not able to complete the permission migration automatically, and you will see the following log in your Grafana server logs: `basic role permissions missing annotation permissions, skipping annotation permission migration`. You will also notice that dashboard and folder permissions do not appear in the user interface. Don't worry, all the permissions that you assigned are still there, they are just not being displayed.
We recommend reviewing what annotation permissions you have revoked from the basic roles (you can reference [our documentation](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/) to see what permissions are missing). If you are fine granting them back to the basic roles, do that, then run the following data base command: `DELETE FROM migration_log WHERE migration_id="managed dashboard permissions annotation actions migration"` and restart Grafana. This will make sure that the annotation permission migration gets run again, and this time it should succeed.
If you are not willing to grant the annotation permissions back to the basic roles, please disable `annotationPermissionUpdate` feature toggle (add `annotationPermissionUpdate = false` to `[feature_toggles]` in Grafana's configuration file) and reach out to Grafana's support team. When we can learn more about your use case, we will work with you to find a solution. Issue [#84787](https://github.com/grafana/grafana/issues/84787)
Angular support is turned `off` by default starting Grafana 11, you can find all the details in a [dedicated documentation page.](https://grafana.com/docs/grafana/latest/developers/angular_deprecation/)
The **xpack** checkbox dependency for enabling the **Include Frozen Indices** functionality has been removed, allowing direct control over frozen indices inclusion. Users should review their datasource settings to ensure the "Include Frozen Indices" option is configured as desired, particularly if xpack was previously disabled. This change aims to simplify configuration options and may affect queries if settings are not adjusted accordingly. Issue [#84734](https://github.com/grafana/grafana/issues/84734)
For data sources that extend `DataSourceWithBackend`, the `filterQuery` method is now called **before** the data source `query` method. If the `filterQuery` method assumes that some kind of query migration happens before this method is called, you now need to do the migration inside this method.
Users of data source plugins that did not previously remove hidden queries will see a change of behaviour: Before this change, clicking the `Disable query` button had no impact on the query result, but starting from Grafana 11 responses associated with hidden queries will no longer be returned to the panel. Issue [#84656](https://github.com/grafana/grafana/issues/84656)
SystemJS is no longer exported from `@grafana/runtime`. Plugin developers should instead rely on importing modules / packages using standard TS import syntax and npm/yarn for package installation.
We've removed the Loki tab from the Tempo data source. You can still access Logs through the Loki data source or can also create a link from Tempo to Loki via our [trace to logs](https://grafana.com/docs/grafana/latest/datasources/tempo/configure-tempo-data-source/#trace-to-logs) feature. Issue [#84346](https://github.com/grafana/grafana/issues/84346)
The `query` option in `splitOpen` was deprecated in `10.1` and is now being removed. Issue [#83973](https://github.com/grafana/grafana/issues/83973)
Since https://github.com/grafana/grafana/pull/38942 (Grafana `8.2.0`) the `ExploreQueryFieldProps` type was deprecated and is now removed. Issue [#83972](https://github.com/grafana/grafana/issues/83972)
Since https://github.com/grafana/grafana/pull/38942 `exploreId` is no longer supplied to query editors in Explore. The property was deprecated in `10.3.0` and is now removed. If your query editor needs to know from which app is being rendered, you can check the `app` prop in `QueryEditorProps`. Issue [#83971](https://github.com/grafana/grafana/issues/83971)
The Vector interface that was deprecated in Grafana 10 has been further deprecated. Using it will now generate build-time Typescript errors, but remain working at runtime. If you're still using ArrayVector in your code, it should be removed immediately and replaced with plain arrays. Plugins compiled against older versions and depend on calling get/set will continue to work because the Array prototype still has a modified prototype. This will be removed in the future Issue [#83681](https://github.com/grafana/grafana/issues/83681)
In Grafana 11 the legacy alerting reaches the end-of-life. Users cannot enable it and Grafana will refuse to start if the settings are not updated to run the new Grafana Alerting. Migration from legacy alerting is not available as well. Grafana 10.4.x is the last version that offers the migration.
- If the setting `[alerting].enable` is set to `true` Grafana will not start and emit the log message with recommendations to change the configuration
- Setting `[alerting].max_annotation_age` is replaced by `[unified_alerting.state_history.annotations].max_age`
- Setting `[alerting].max_annotations_to_keep` is replaced by `[unified_alerting.state_history.annotations].max_annotations_to_keep`
- setting `[unified_alerting].execute_alerts` does not fall back to the legacy `[alerting].execute_alerts` anymore. Instead, the default value `true` is used.
- setting `[unified_alerting].evaluation_timeout` does not fall back to the legacy setting `[alerting].evaluation_timeout_seconds` in the case when it is either invalid or has the default value. Now, if the setting is invalid, it will cause Grafana to exit.
- setting `[unified_alerting].min_interval` does not fall back to the legacy setting `[alerting].min_interval_seconds` in the case when it is either invalid or has the default value. Now, if the setting is invalid, it will cause Grafana to exit. Issue [#83651](https://github.com/grafana/grafana/issues/83651)
We've removed React 17 as a peer dependency from our packages. Anyone using the new versions of these packages should ensure they've upgraded to React 18 following the upgrade steps: https://react.dev/blog/2022/03/08/react-18-upgrade-guide Issue [#83524](https://github.com/grafana/grafana/issues/83524)
We're adding a validation between the response of the ID token HD parameter and the list of allowed domains as an extra layer of security. In the event that the HD parameter doesn't match the list of allowed domains, we're denying access to Grafana.
If you set Google OAuth configuration using `api_url,` you might be using the legacy implementation of OAuth, which doesn't have the HD parameter describing the organisation the approved token comes from. This could break your login flow.
This feature can be turned off through the configuration toggle `validate_hd `. Anyone using the legacy Google OAuth configuration should turn off this validation if the ID Token response doesn't have the HD parameter. Issue [#83229](https://github.com/grafana/grafana/issues/83229)
The direct input datasource plugin has been removed in Grafana 11. It has been in alpha for 4 years and is superseded by [TestData](https://grafana.com/docs/grafana/latest/datasources/testdata/) that ships with Grafana.
The alert rule API methods now require more permissions for users to perform changes to rules. To create a new rule or update or delete an existing one, the user must have permission to read from the folder that stores the rules (i.e. permission `folder:read` in the scope of the rule's folder) and permission to read alert rules in that folder (i.e. permission `alert.rules:read`
The standard roles already have all required permissions, and therefore, neither OSS nor Grafana Enterprise users who use the fixed roles (standard roles provided by Grafana) are affected. **Only Grafana Enterprise users who create custom roles can be affected** Issue [#78289](https://github.com/grafana/grafana/issues/78289)
The deprecated endpoint for rendering pdf of a single dashboard `GET /render/pdf/:dashboardID` and report model fields `dashboardId`, `dashboardName`, `dashboardUid`, and `templateVars` have been removed. Only new endpoint `GET /api/reports/render/pdfs` accepting `dashboards` list is support moving forward Issue [#6362](https://github.com/grafana/grafana/issues/6362)
The deprecated old schedule setting with separate fields `hour,``minute`, `day` have been removed. Only new schedule setting with `startDate` will be supported moving forward Issue [#6329](https://github.com/grafana/grafana/issues/6329)
The deprecated `email` field to send a report via `/api/reports/email` endpoint have been removed. Only `emails` field will be supported moving forward. Issue [#6328](https://github.com/grafana/grafana/issues/6328)
### Plugin development fixes & changes
- **GrafanaUI:** Add new `EmptyState` component. [#84891](https://github.com/grafana/grafana/issues/84891), [@ashharrison90](https://github.com/ashharrison90)
- **Grafana UI:** Add code variant to Text component. [#82318](https://github.com/grafana/grafana/issues/82318), [@tskarhed](https://github.com/tskarhed)
<!-- 11.0.0-preview END -->
<!-- 10.4.1 START -->
# 10.4.1 (2024-03-20)
@@ -400,6 +952,24 @@ Users who have InfluxDB datasource configured with SQL querying language must up
Removes `NamespaceID` from responses of all GET routes underneath the path `/api/ruler/grafana/api/v1/rules` - 3 affected endpoints. All affected routes are not in the publicly documented or `stable` marked portion of the ngalert API. This only breaks clients who are directly using the unstable portion of the API. Such clients should use `NamespaceUID` rather than `NamespaceID` to identify namespaces. Issue [#79359](https://github.com/grafana/grafana/issues/79359)
<!-- 10.3.0 END -->
<!-- 10.2.6 START -->
# 10.2.6 (2024-03-25)
### Features and enhancements
- **Postgres:** Allow disabling SNI on SSL-enabled connections. [#84258](https://github.com/grafana/grafana/issues/84258), [@papagian](https://github.com/papagian)
### Bug fixes
- **CloudMonitoring:** Only run query if filters are complete. [#85014](https://github.com/grafana/grafana/issues/85014), [@aangelisc](https://github.com/aangelisc)
- **Snapshots:** Require delete within same org (backport). [#84730](https://github.com/grafana/grafana/issues/84730), [@ryantxu](https://github.com/ryantxu)
- **Dashboards:** Run shared queries even when source panel is in collapsed row. [#84166](https://github.com/grafana/grafana/issues/84166), [@kaydelaney](https://github.com/kaydelaney)
- **Prometheus:** Fix calculating rate interval when there is no interval specified. [#84082](https://github.com/grafana/grafana/issues/84082), [@itsmylife](https://github.com/itsmylife)
@@ -1094,6 +1664,15 @@ Starting with 10.2, `parentRowIndex` is deprecated. It will be removed in a futu
- **Drawer:** Make content scroll by default. [#75287](https://github.com/grafana/grafana/issues/75287), [@ashharrison90](https://github.com/ashharrison90)
<!-- 10.2.0 END -->
<!-- 10.1.9 START -->
# 10.1.9 (2024-03-25)
### Bug fixes
- **Snapshots:** Require delete within same org (backport). [#84765](https://github.com/grafana/grafana/issues/84765), [@ryantxu](https://github.com/ryantxu)
<!-- 10.1.9 END -->
<!-- 10.1.8 START -->
# 10.1.8 (2024-03-06)
@@ -1613,6 +2192,15 @@ Starting with 10.0, changing the folder UID is deprecated. It will be removed in
- **Grafana/ui:** Fix margin in RadioButtonGroup option when only icon is present. [#68899](https://github.com/grafana/grafana/issues/68899), [@aocenas](https://github.com/aocenas)
<!-- 10.1.0 END -->
<!-- 10.0.13 START -->
# 10.0.13 (2024-03-25)
### Bug fixes
- **Snapshots:** Require delete within same org (backport). [#84764](https://github.com/grafana/grafana/issues/84764), [@ryantxu](https://github.com/ryantxu)
<!-- 10.0.13 END -->
<!-- 10.0.12 START -->
# 10.0.12 (2024-03-06)
@@ -2163,6 +2751,15 @@ The `database` field has been deprecated in the Elasticsearch datasource provisi
- **InteractiveTable:** Updated design and minor tweak to Correlactions page. [#66443](https://github.com/grafana/grafana/issues/66443), [@torkelo](https://github.com/torkelo)
<!-- 10.0.0-preview END -->
<!-- 9.5.18 START -->
# 9.5.18 (2024-03-25)
### Bug fixes
- **Snapshots:** Require delete within same org (backport). [#84762](https://github.com/grafana/grafana/issues/84762), [@ryantxu](https://github.com/ryantxu)
# By default is the same as used in AAD authentication or can be set to another application (for OBO flow)
user_identity_client_secret=
# Allows the usage of a custom token request assertion when Grafana is behind an authentication proxy
# In most cases this will not need to be used. To enable this set the value to "username"
# The default is empty and any other value will not enable this functionality
username_assertion=
# Set the plugins that will receive Azure settings for each request (via plugin context)
# By default this will include all Grafana Labs owned Azure plugins, or those that make use of Azure settings (Azure Monitor, Azure Data Explorer, Prometheus, MSSQL).
# For "mysql" and "postgres" only. Lock the database for the migrations, default is true.
;migration_locking = true
# For "mysql" and "postgres" only if migrationLocking is set. How many seconds to wait before failing to lock the database for the migrations, default is 0.
# For "mysql" and "postgres" only. How many seconds to wait before failing to lock the database for the migrations, default is 0.
;locking_attempt_timeout_sec = 0
# For "sqlite" only. How many times to retry query in case of database is locked failures. Default is 0 (disabled).
# By default is the same as used in AAD authentication or can be set to another application (for OBO flow)
;user_identity_client_secret =
# Allows the usage of a custom token request assertion when Grafana is behind an authentication proxy
# In most cases this will not need to be used. To enable this set the value to "username"
# The default is empty and any other value will not enable this functionality
;username_assertion =
# Set the plugins that will receive Azure settings for each request (via plugin context)
# By default this will include all Grafana Labs owned Azure plugins, or those that make use of Azure settings (Azure Monitor, Azure Data Explorer, Prometheus, MSSQL).
@@ -172,7 +172,7 @@ make test-go-integration-postgres
### Run end-to-end tests
The end to end tests in Grafana use [Cypress](https://www.cypress.io/) and [Playwright](https://playwright.dev/) to run automated scripts in a browser. Read more about our Cypress [e2e framework](/contribute/style-guides/e2e.md).
Grafana uses [Cypress](https://www.cypress.io/) to end-to-end test core features. Core plugins use [Playwright](https://playwright.dev/) to run automated end-to-end tests. You can find more information on how to add end-to-end tests to your core plugin [here](./style-guides/e2e-plugins.md)
@@ -22,4 +22,4 @@ The above commands use some utils scripts under [_\<repo-root>/e2e_](../../e2e)
## Test suites
All the integration tests are located at _\<repo-root>/e2e/suite\<x>/specs_. The page objects and reusable flows are in the [_\<repo-root>/packages/grafana-e2e_](../../packages/grafana-e2e) package.
All the integration tests are located at _\<repo-root>/e2e/suite\<x>/specs_.
Be sure that you've read the [generalized E2E document](e2e.md).
When end-to-end testing Grafana plugins, it's recommended to use the [`@grafana/plugin-e2e`](https://www.npmjs.com/package/@grafana/plugin-e2e?activeTab=readme) testing tool. `@grafana/plugin-e2e` extends [`@playwright/test`](https://playwright.dev/) capabilities with relevant fixtures, models, and expect matchers; enabling comprehensive end-to-end testing of Grafana plugins across multiple versions of Grafana. For information on how to get started with Plugin end-to-end testing and Playwright, checkout the [Get started](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/get-started) guide.
## Adding end-to-end tests for a core plugin
Playwright end-to-end tests for plugins should be added to the [`e2e/plugin-e2e`](https://github.com/grafana/grafana/tree/main/e2e/plugin-e2e) directory.
1. Add a new directory that has the name as your plugin [`here`](https://github.com/grafana/grafana/tree/main/e2e/plugin-e2e). This is where your plugin tests will be kept.
2. Playwright uses [projects](https://playwright.dev/docs/test-projects) to logically group tests together. All tests in a project share the same configuration.
In the [Playwright config file](https://github.com/grafana/grafana/blob/main/playwright.config.ts), add a new project item. Make sure the `name` and the `testDir` sub directory matches the name of the directory that contains your plugin tests.
Adding `'authenticate'` to the list of dependencies and specifying `'playwright/.auth/admin.json'` as storage state will ensure all tests in your project will start already authenticated as an admin user. If you wish to use a different role for and perhaps test RBAC for some of your tests, please refer to the plugin-e2e [documentation](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/use-authentication).
```ts
{
name: 'mysql',
testDir: path.join(testDirRoot, '/mysql'),
use: {
...devices['Desktop Chrome'],
storageState: 'playwright/.auth/admin.json',
},
dependencies: ['authenticate'],
},
```
3. Update the [CODEOWNERS](https://github.com/grafana/grafana/blob/main/.github/CODEOWNERS/#L315) file so that your team is owner of the tests in the directory you added in step 1.
## Commands
-`yarn test:e2e` will run [Grafana's E2E utility](../../packages/grafana-e2e) against an already running Grafana server.
-`yarn test:e2e:update` will run `test:e2e` but instead of asserting that screenshots match their expected fixtures, they'll be replaced with new ones.
- `yarn e2e:playwright` will run all Playwright tests. Optionally, you can provide the `--project mysql` argument to run tests in a certain project.
Your running Grafana instance can be targeted by setting the `CYPRESS_BASE_URL`, `CYPRESS_USERNAME` and `CYPRESS_PASSWORD` environment variableS:
The script above assumes you have Grafana running on `localhost:3000`. You may change this by providing environment variables.
Grafana Labs uses a minimal [homegrown solution](../../packages/grafana-e2e) built on top of [Cypress](https://cypress.io) for its end-to-end (E2E) tests.
Grafana Labs uses a minimal [homegrown solution](../../e2e/utils/index.ts) built on top of [Cypress](https://cypress.io) for its end-to-end (E2E) tests.
Important notes:
- We generally store all element identifiers ([CSS selectors](https://mdn.io/docs/Web/CSS/CSS_Selectors)) within the framework for reuse and maintainability.
- We generally do not use stubs or mocks as to fully simulate a real user.
- Cypress' promises [do not behave as you'd expect](https://docs.cypress.io/guides/core-concepts/introduction-to-cypress.html#Mixing-Async-and-Sync-code).
- [Testing core Grafana](e2e-core.md) is slightly different than [testing plugins](e2e-plugins.md).
- [Testing core Grafana](e2e-core.md) is different than [testing plugins](e2e-plugins.md) - core Grafana uses Cypress whereas plugins use [Playwright test](https://playwright.dev/).
# Whether to pull the latest container image before running the container.
ifeq($(originPULL),undefined)
export PULL:=true
endif
.PHONY:docs-rm
docs-rm:## Remove the docs container.
$(PODMAN) rm -f $(DOCS_CONTAINER)
@@ -81,13 +86,12 @@ make-docs:
fi
.PHONY:docs
docs:## Serve documentation locally, which includes pulling the latest `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image. See also `docs-no-pull`.
docs:## Serve documentation locally, which includes pulling the latest `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image. To not pull the image, set `PULL=false`.
ifeq($(PULL),true)
docs:docs-pullmake-docs
$(CURDIR)/make-docs $(PROJECTS)
.PHONY:docs-no-pull
docs-no-pull:## Serve documentation locally without pulling the `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image.
docs-no-pull:make-docs
else
docs:make-docs
endif
$(CURDIR)/make-docs$(PROJECTS)
.PHONY:docs-debug
@@ -96,13 +100,19 @@ docs-debug: make-docs
WEBSITE_EXEC='hugo server --bind 0.0.0.0 --port 3002 --debug'$(CURDIR)/make-docs $(PROJECTS)
.PHONY:doc-validator
doc-validator:## Run doc-validator on the entire docs folder.
doc-validator:## Run doc-validator on the entire docs folder which includes pulling the latest `DOC_VALIDATOR_IMAGE` (default: `grafana/doc-validator:latest`) container image. To not pull the image, set `PULL=false`.
vale:## Run vale on the entire docs folder which includes pulling the latest `VALE_IMAGE` (default: `grafana/vale:latest`) container image. To not pull the image, set `PULL=false`.
### Migrate API keys to Grafana service accounts in Terraform
{{< admonition type="note" >}}
The terraform resource `api_key` is removed from the Grafana Terraform Provider in v3.0.0.
Before you migrate and remove the use of the resource, you should pin your terraform version to a version less-than or equal-to v2.19.0.
For more information, refer to the [Grafana Terraform Provider release notes](https://github.com/grafana/terraform-provider-grafana/releases/tag/v3.0.0).
{{< /admonition >}}
To pin the Grafana Terraform Provider to v2.19.0:
```hcl
terraform {
required_providers {
grafana= {
source="grafana/grafana"
version="2.19.0"
}
}
}
```
This section shows you how to migrate your Terraform configuration for API keys to Grafana service accounts. For resources, see [Grafana Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/service_account_token).
For migration your cloud stack api keys, use the `grafana_cloud_stack_service_account` and `gafana_cloud_stack_service_account_token` resources see [Grafana Cloud Stack Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/cloud_stack_service_account).
Team LBAC is available in private preview on Grafana Cloud for Loki created with basic authentication. Loki datasources for Team LBAC 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 Team LBAC rules, you need to enable the feature toggle `teamHTTPHeaders` on your Grafana instance. Contact support to enable the feature toggle for you.
To be able to use Team LBAC rules, you need to enable the feature toggle `teamHttpHeaders` on your Grafana instance. Contact support to enable the feature toggle for you.
- Be sure that you have the permission setup to create a loki tenant in Grafana Cloud
- Be sure that you have admin data source permissions for Grafana.
@@ -42,4 +44,4 @@ We recommend that you remove all permissions for roles and teams that are not re
1. Navigate to Data Source Permissions
- Go to the permissions tab of the newly created Loki data source. Here, you'll find the Team LBAC rules section.
For more information on how to setup Team LBAC rules for a Loki data source, [Add Team LBAC rules]({{< relref "./../create-teamlbac-rules/" >}}).
For more information on how to setup Team LBAC rules for a Loki data source, refer to [Create Team LBAC rules for the Loki data source](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/teamlbac/create-teamlbac-rules/).
Besides the wide range of visualizations and data sources that are available immediately after you install Grafana, you can extend your Grafana experience with _plugins_.
You can enhance your Grafana experience with _plugins_, extensions to Grafana beyond the wide range of visualizations and data sources that are built-in.
You can [install](#install-a-plugin) one of the plugins built by the Grafana community, or [build one yourself](/developers/plugin-tools).
This guide shows you how to [install](#install-a-plugin) plugins that are built by Grafana Labs, commercial partners, our community, or plugins that you have [built yourself](/developers/plugin-tools).
Grafana supports three types of plugins: [panels](/grafana/plugins?type=panel), [data sources](/plugins?type=datasource), and [apps](/grafana/plugins?type=app).
## Types of plugins
Grafana supports three types of plugins:
- [Panels](/grafana/plugins/panel-plugins) - These plugins make it easy to create and add any kind of panel, to show your data, or improve your favorite dashboards.
- [Data sources](/grafana/plugins/data-source-plugins) - These plugins allow you to pull data from various data sources such as databases, APIs, log files, and so on, and display it in the form of graphs, charts, and dashboards in Grafana.
- [Apps](/grafana/plugins/app-plugins) - These plugins enable the bundling of data sources, panels, dashboards, and Grafana pages into a cohesive experience.
## Panel plugins
@@ -37,7 +44,7 @@ Data source plugins add support for new databases, such as [Google BigQuery](/gr
Data source plugins communicate with external sources of data and return the data in a format that Grafana understands. By adding a data source plugin, you can immediately use the data in any of your existing dashboards.
Use data source plugins when you want to import data from external systems.
Use data source plugins when you want to query data from external or third-party systems.
## App plugins
@@ -47,29 +54,29 @@ Apps can also add custom pages for things like control panels.
Use app plugins when you want an out-of-the-box monitoring experience.
### Managing app plugins access
### Managing access for app plugins
With [RBAC]({{< relref "../roles-and-permissions/access-control/#about-rbac" >}}), it is now possible to customize access to app plugins.
Customize access to app plugins with [RBAC]({{< relref "../roles-and-permissions/access-control/#about-rbac" >}}).
By default, Viewers, Editors and Admins have access to all App Plugins that their organization role allows them to access, thanks to the `fixed:plugins.app:reader` role.
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" %}}
Revoking this RBAC role from some users, will prevent them from accessing app plugins. But granting this RBAC role to users will only allow them to see app plugins their organizationrole allows them to see.
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" >}}).
{{% /admonition %}}
To prevent users from seeing an app plugin, refer to [this permissions scenarios]({{< relref "../roles-and-permissions/access-control/plan-rbac-rollout-strategy#prevent-viewers-from-accessing-an-app-plugin" >}}).
## Plugin catalog
The 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. The following access rules apply depending on the user role:
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 following access rules apply depending on the user role:
> **Note:** The Plugin catalog is designed to work with a single Grafana server instance only. Support for Grafana clusters will be added in future Grafana releases.
- If you are an **Org Admin**, you can configure app plugins, but you can't install, uninstall, or update them.
- If you are a **Server Admin**, you can't configure app plugins, but you can install, uninstall, or update them.
- If you are both **Org Admin** and **Server Admin**, you can configure app plugins and also install, uninstall, or update them.
{{% admonition type="note" %}}
The Grafana plugin catalog is designed to work with a single Grafana server instance only. Support for Grafana clusters is planned for future Grafana releases.
{{% /admonition %}}
<div class="medium-6 columns">
<video width="700" height="600" controls>
@@ -80,81 +87,79 @@ The Plugin catalog allows you to browse and manage plugins from within Grafana.
_Video shows the Plugin catalog in a previous version of Grafana._
In order to be able to install / uninstall / update plugins using plugin catalog, you must enable it via the `plugin_admin_enabled` flag in the [configuration]({{< relref "../../setup-grafana/configure-grafana/#plugin_admin_enabled" >}}) file.
Before following the steps below, make sure you are logged in as a Grafana administrator.
{{% 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.
{{% /admonition %}}
<a id="#plugin-catalog-entry"></a>
Administrators can find the Plugin catalog at **Administration > Plugins and data > Plugins**.
### Browse plugins
To browse for available plugins:
1.In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view installed plugins.
1.Click the **All** filter to browse all available plugins.
1.While logged into Grafana as an administrator, click **Administration > Plugins and data > Plugins** in the side menu to view installed and available plugins.
1.Use the search to filter based on name, keywords, organization and other metadata.
1. Click the **Data sources**, **Panels**, or **Applications** buttons to filter by plugin type.
### Install a plugin
To install a plugin:
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view installed plugins.
1. Click the **All** filter to browse all available plugins.
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 on the plugin logo.
1. Click the plugin's logo.
1. Click **Install**.
When the update is complete, you see a confirmation message that the installation was successful.
When the update is complete, you'll see a confirmation message that the installation was successful.
### Update a plugin
To update a plugin:
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view installed plugins.
1. Click on the plugin logo.
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**.
When the update is complete, you see a confirmation message that the update was successful.
When the update is complete, you'll see a confirmation message that the update was successful.
### Uninstall a plugin
To uninstall a plugin:
1. In Grafana, click **Administration > Plugins and data > Plugins** in the side navigation menu to view installed plugins.
1. Click on the plugin logo.
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, you see a confirmation message that the uninstall was successful.
When the update is complete, you'll see a confirmation message that the uninstall was successful.
## Install Grafana plugins
Grafana supports data source, panel, and app plugins. Having panels as plugins makes it easy to create and add any kind of panel, to show your data, or improve your favorite dashboards. Apps enable the bundling of data sources, panels, dashboards, and Grafana pages into a cohesive experience.
Grafana supports data source, panel, and app plugins.
1. In a web browser, navigate to the official [Grafana Plugins page](/plugins) and find a plugin that you want to install.
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.
### Install plugin on Grafana Cloud
On the Installation tab, in the **For** field, click the name of the Grafana instance that you want to install the plugin on.
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 are logged in to Grafana Cloud when you add a plugin, log out and back in again to use the new plugin.
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 plugin on local Grafana
Follow the instructions on the Install tab. You can either install the plugin with a Grafana CLI command or by downloading and uncompress 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 does not have access to the internet.
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.
For more information about Grafana CLI plugin commands, refer to [Plugin commands]({{< relref "../../cli/#plugins-commands" >}}).
As of Grafana v8.0, a plugin catalog app was introduced in order to make managing plugins easier. For more information, refer to [Plugin catalog]({{< relref "#plugin-catalog" >}}).
#### Install a packaged plugin
After the user has downloaded the archive containing the plugin assets, they can install it by extracting the archive into their plugin directory.
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:
@@ -162,9 +167,9 @@ The path to the plugin directory is defined in the configuration file. For more
## Plugin signatures
Plugin signature verification (signing) is a security measure to make sure plugins haven't been tampered with. Upon loading, Grafana checks to see if a plugin is signed or unsigned when inspecting and verifying its digital signature.
Plugin signature verification, also known as _signing_, is a security measure to make sure plugins haven't been tampered with. Upon loading, Grafana checks to see if a plugin is signed or unsigned when inspecting and verifying its digital signature.
At startup, Grafana verifies the signatures of every plugin in the plugin directory. If a plugin is unsigned, then Grafana does not load nor start it. To see the result of this verification for each plugin, navigate to **Configuration** -> **Plugins**.
At startup, Grafana verifies the signatures of every plugin in the plugin directory. If a plugin is unsigned, then Grafana neither loads nor starts it. To see the result of this verification for each plugin, navigate to **Configuration** -> **Plugins**.
Grafana also writes an error message to the server log:
@@ -177,26 +182,28 @@ If you are a plugin developer and want to know how to sign your plugin, refer to
| Private | <p>Private plugins are for use on your own Grafana. They may not be distributed to the Grafana community, and are not published in the Grafana catalog.</p> |
| Community | <p>Community plugins have dependent technologies that are open source and not for profit.</p><p>Community plugins are published in the official Grafana catalog, and are available to the Grafana community.</p> |
| Commercial | <p>Commercial plugins have dependent technologies that are closed source or commercially backed.</p><p>Commercial Plugins are published on the official Grafana catalog, and are available to the Grafana community.</p> |
| Commercial | <p>Commercial plugins have dependent technologies that are closed source or commercially backed.</p><p>Commercial plugins are published on the official Grafana catalog, and are available to the Grafana community.</p> |
### Allow unsigned plugins
> **Note:** Unsigned plugins are not supported in Grafana Cloud.
{{% admonition type="note" %}}
Unsigned plugins are not supported in Grafana Cloud.
{{% /admonition %}}
We strongly recommend that you don't run unsigned plugins in your Grafana instance. 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]({{< relref "../../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:
@@ -210,4 +217,6 @@ If you're developing a plugin, then you can enable development mode to allow all
## Learn more
- Browse the available [Plugins](/grafana/plugins)
-[Browse plugins](/grafana/plugins)
- [Develop plugins](/developers/plugin-tools)
- [Plugin development Community](https://community.grafana.com/c/plugin-development/30)
@@ -28,7 +28,7 @@ RBAC provides a standardized way of granting, changing, and revoking access when
## About RBAC
Role-based access control (RBAC) provides a standardized way of granting, changing, and revoking access so that users can view and modify Grafana resources, such as users and reports.
RBAC extends Grafana basic roles that are included in Grafana OSS, and enables you more granular control of users’ actions.
RBAC extends Grafana basic roles that are included in Grafana OSS, and enables more granular control of users’ actions.
By using RBAC you can provide users with permissions that extend the permissions available with basic roles. For example, you can use RBAC to:
@@ -43,6 +43,8 @@ RBAC roles contain multiple permissions, each of which has an action and a scope
- **Action:** `datasources:read`
- **Scope:** `datasources:*`
For information on the RBAC API refer to [RBAC API](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/#rbac-api).
### Basic roles
Basic roles are the standard roles that are available in Grafana OSS. If you have purchased a Grafana Enterprise license, you can still use basic roles.
@@ -78,6 +80,10 @@ For example, if you modify Viewer basic role and grant additional permission, Ed
For more information about the permissions associated with each basic role, refer to [Basic role definitions]({{< relref "./rbac-fixed-basic-role-definitions/#basic-role-assignments" >}}).
To interact with the API and view or modify basic roles permissions, refer to [the table]({{< relref "./manage-rbac-roles/#basic-role-uid-mapping" >}}) that maps basic role names to the associated UID.
{{% admonition type="note" %}}
You cannot use a service account to modify basic roles via the RBAC API. To update basic roles, you must be a Grafana administrator and use basic authentication with the request.
{{% /admonition %}}
### Fixed roles
Grafana Enterprise includes the ability for you to assign discrete fixed roles to users, teams, and service accounts. This gives you fine-grained control over user permissions than you would have with basic roles alone. These roles are called "fixed" because you cannot change or delete fixed roles. You can also create _custom_ roles of your own; see more information in the [custom roles section]({{< relref "#custom-roles" >}}) below.
description: This document introduces Grafana Teams and Teams concepts.
labels:
products:
- enterprise
- oss
- cloud
keywords:
- authorization
- microservices
- architecture
menuTitle: Grafana Teams
title: Grafana Teams
weight: 100
---
# Grafana Teams
Grafana Teams makes it easy to organize and administer groups of users in your enterprise. Teams allows you to grant permissions to a group of users instead of granting permissions to individual users one at a time.
Teams are useful in a wide variety of scenarios, such as when onboarding new colleagues or needing access to reports on secure financial data. When you add a user to a team, they get access to all resources assigned to that team.
## Teams concepts
A Grafana Team is a group of users within an organization that have common permissions, including access to dashboards and data sources, and those permissions apply to **all members** of that team. For example, instead of assigning six users access to the same dashboard, you can create a team that consists of those users and assign dashboard permissions to the team. A user can belong to multiple teams.
A Team grants permissions to a wide variety of resources including:
- dashboards
- data sources
- folders
- alerts
- reports
- cloud access policies
- annotations
- playlists
{{< admonition type="note" >}}
All members of a Grafana Team have the same exact permissions. A single Team can't have members with different access levels to resources shared within that Team.
{{< /admonition >}}
A user can be a `Member` or an `Administrator` for a given Team. `Members` of a Team inherit permissions from the team, but they don't have team administrator privileges, and can't edit the team itself. Team `Administrators` can add members to a team and update its settings, such as the team name, team member’s team roles, UI preferences, and home dashboard.
There are two types of Teams, `isolated` or `collaborative`. Isolated teams can only see their own resources. They can't see other team’s resources like dashboards, data, or alerts. Collaborative teams have access to other team’s resources.
For information about how to optimize Teams, refer to [How to best organize your teams and resources in Grafana](https://grafana.com/blog/2022/03/14/how-to-best-organize-your-teams-and-resources-in-grafana/).
description: Learn how to administer Grafana Teams.
labels:
products:
- enterprise
- oss
- cloud
keywords:
- authorization
- microservices
- architecture
menuTitle: Administer Grafana Teams
title: Administer Grafana Teams
weight: 300
---
# Administer Grafana Teams
This topic describes how to administer Grafana Teams.
## View a list of Teams
See the complete list of teams in your Grafana organization.
To view a list of teams:
1. Sign in to Grafana as an organization administrator or a team administrator.
1. Click the arrow next to **Administration** in the left-side menu, click **Users and access**, and select **Teams**.
The role you use to sign in to Grafana determines how you see Teams lists.
### Organization administrator view
The following example shows a list as it appears to an `organization` administrator.

### Team administrator view
The following example shows a list as it appears to a `team` administrator.

## Teams best practices
Grafana recommends you use Teams to organize and manage access to Grafana’s core resources, such as dashboards and alerts. Teams is an easy organizational tool to manage, and allows flexible sharing between teams.
Grafana recommends that you use Instances or Stacks to separate Teams if you want true isolation, to ensure that no information leaks between Teams. You can synchronize some resources between instances using provisioning.
## Secure Grafana Teams
The most important thing to consider for securing Teams is to only grant team administrator rights to the users you trust to administer the Team.
This topic describes how to set up and configure Grafana Teams.
For a tutorial on working with Teams, refer to [Create users and teams](https://grafana.com/tutorials/create-users-and-teams/).
## Before you begin
Before you begin creating and working with Grafana Teams:
- Ensure that you have either the `Organization Administrator` role or team administrator permissions.
Refer to [Organization roles](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/#organization-roles) and [RBAC permissions, actions, and scopes](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/custom-role-actions-scopes/#rbac-permissions-actions-and-scopes) for a list of Grafana roles and role-based access control actions.
- Decide which users belong to which teams and what permissions team members receive.
- Configure the default basic role for users to join Grafana. This role applies to users where no role is set by the identity provider (IDP).
- No basic role - by default can't view any resources.
Recommended for `isolated` teams.
- Viewer role - by default can view all resources. Recommended for `collaborative` teams.
- Ensure team sync is turned on if you plan to manage team members through team sync.
Refer to [Configure Team Sync](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-security/configure-team-sync/) for a list of providers and instructions on how to turn on team sync for each provider.
<!-- - Turn on nested folders. __This is a new feature, add when it goes live.__ -->
{{< admonition type="note" >}}
[Grafana Organizations](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/organization-management/) do not exist in Grafana Cloud.
Grafana Cloud uses the term _organization_ to refer to accounts in grafana.com, or GCOM.
In Grafana Enterprise and OSS, Teams belong to Grafana Organizations.
Refer to [About organizations](/docs/grafana/<GRAFANA_VERSION>/administration/organization-management/#about-organizations) for more information.
{{< /admonition >}}
## Create a Grafana Team
A team is a group of users within a Grafana instance that have common permissions needs. Teams to help make user-permission management more efficient. A user can belong to multiple Teams.
Grafana Teams includes common access to the following:
- dashboards
- data sources
- folders
- alerts
- reports
- cloud access policies
- annotations
- playlists
To create a Team, complete the following steps:
1. Sign in to Grafana as an `org administrator` or `team administrator`.
1. Click the arrow next to **Administration** in the left-side menu, click **Users and access**, and select **Teams**.
1. Click **New Team**.
1. Fill in each field and click **Create**.
1. Click **Save**. You can now add a Team member.
## Add a Team member
Add a member to a new Team or add a team member to an existing Team when you want to provide access to team dashboards and folders to another user. This task requires that you have `organization administrator` permissions.
To add a team member, complete the following steps:
1. Sign in to Grafana as an `org administrator` or `team administrator`.
1. Click the arrow next to **Administration** in the left-side menu, click **Users and access**, and select **Teams**.
1. Click the name of the Team to which you want to add members, and click **+ Add member**.
1. Search for and select a user.
1. Choose whether to add the user as a Team **Member** or **Admin**.
1. Click **Save**.
## Grant or change Team member permissions
Complete this task when you want to add or modify team member permissions.
To grant team member permissions:
1. Sign in to Grafana as an `org administrator` or `team administrator`.
1. Click the arrow next to **Administration** in the left-side menu, click **Users and access**, and select **Teams**.
1. Click the pencil next to the name of the Team for which you want to add or modify team member permissions.
1. In the team member list, locate the user that you want to change. You can use the search field to filter the list if necessary.
1. Under the **Permission** column, select the new permission level.
## Add roles to a Grafana Team
You can add or delete roles from a specified team.
To add a role, complete the following steps:
1. Sign in to Grafana as an `org administrator` or `team administrator`.
1. Click the arrow next to **Administration** in the left-side menu, click **Users and access**, and select **Teams**.
1. Select the Team and click under the **Role** column.
Select from a list of current fixed or plugin roles or clear all roles and start over.
As you hover over each role a list of permissions appears to the right.
You can clear any permission for additional fine-grained control.
1. Click **Update** to add the new role or roles.
To delete a role, remove the check next to the role name and click **Update**.
## Delete a team
Delete a team when you no longer need it. This action permanently deletes the team and removes all team permissions from dashboards and folders. This task requires that you have `organization administrator` permissions.
1. Sign in to Grafana as an `org administrator` or `team administrator`.
1. Click the arrow next to **Administration** in the left-side menu, click **Users and access**, and select **Teams**.
1. Click the **red X** on the right side of the name of the team.
1. Click **Delete**.
<!-- ## Create isolated or collaborative teams
Grafana Teams can either be `isolated` or `collaborative`. Isolated teams can only see their own resources. They can't see other team’s dashboards, data, or alerts. Collaborative teams have access to other team’s resources. Grafana Cloud users must contact Support.
To create an isolated team add the following to the Grafana configuration file:
A team is a group of users within an organization that have common dashboard and data source permission needs. For example, instead of assigning five users access to the same dashboard, you can create a team that consists of those users and assign dashboard permissions to the team. A user can belong to multiple teams.
A user can be a Member or an Administrator for a given team. Members of a team inherit permissions from the team, but they cannot edit the team itself. Team Administrators can add members to a team and update its settings, such as the team name, team member's team roles, UI preferences, and home dashboard.
For more information about teams, refer to [Teams and permissions]({{< relref "../roles-and-permissions/#teams-and-permissions" >}}).
For information about how to optimize your teams, refer to [How to best organize your teams and resources in Grafana](https://grafana.com/blog/2022/03/14/how-to-best-organize-your-teams-and-resources-in-grafana/).
This topic describes how to:
- Create a team
- Add a team member
- Grant team member permissions
- Remove a team member
- Delete a team
- View a list of teams
## Before you begin
- Ensure that you have either organization administrator permissions or team administrator permissions
- Make a plan for which users belong to which teams and the permissions team members receive
## Create a team
A team is a group of users within an organization that have common dashboard and data source permission needs. Use teams to help make user-permission management more efficient.
A user can belong to multiple teams.
To create a team:
1. Sign in to Grafana as an organization administrator or team administrator.
1. Click **Administration** in the left-side menu, **Users and access**, and select **Teams**.
1. Click **New Team**.
1. Complete the fields and click **Create**.
1. Click **Add member**.
1. In the **Add member** field, locate and select a user.
1. Click **Save**.
## Add a team member
Add a team member to an existing team whenever you want to provide access to team dashboards and folders to another user. This task requires that you have organization administrator permissions.
To add a team member:
1. Sign in to Grafana as an organization administrator.
1. Click **Administration** in the left-side menu, **Users and access**, and select **Teams**.
1. Click the name of the team to which you want to add members, and click **Add member**.
1. Locate and select a user.
1. Choose if you want to add the user as a team Member or an Admin.
1. Click **Save**.
## Grant team member permissions
Complete this task when you want to add or modify team member permissions.
To grant team member permissions:
1. Sign in to Grafana as an organization administrator or a team administrator.
1. Click **Administration** in the left-side menu, **Users and access**, and select **Teams**.
1. Click the name of the team for which you want to add or modify team member permissions.
1. In the team member list, find and click the user that you want to change. You can use the search field to filter the list if necessary.
1. In the Permission column, select the new user permission level.
## Remove a team member
You can remove a team member when you no longer want to apply team permissions to the user
To remove a team member:
1. Sign in to Grafana as an organization administrator or team administrator.
1. Click **Administration** in the left-side menu, **Users and access**, and select **Teams**.
1. Click a team from which you want to remove a user.
1. Click the **X** next to the name of the user.
## Delete a team
Delete a team when you no longer need it. This action permanently deletes the team and removes all team permissions from dashboards and folders. This task requires that you have organization administrator permissions.
To delete a team:
1. Sign in to Grafana as an organization administrator.
1. Click **Administration** in the left-side menu, **Users and access**, and select **Teams**.
1. Click the **X** next to the name of the team.
1. Click **Delete**.
## View a list of teams
See the complete list of teams in your Grafana organization.
To view a list of teams:
1. Sign in to Grafana as an organization administrator or a team administrator.
1. Click **Administration** in the left-side menu, **Users and access**, and select **Teams**.
The role you use to sign in to Grafana determines how you see team lists.
## Organization administrator view
The following example shows a list as it appears to an organization administrator.

## Team administrator view
The following example shows a list as it appears to a team administrator.

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. For example, the **Admin** role includes permissions for an administrator to create and delete users.
Watch the following video to learn how to manage users and permissions in Grafana OSS and Grafana Cloud:
{{< youtube id="59uCGJN5hPI" >}}
The following topics describe how to use permissions to control user access to data sources, dashboards, users, and teams.
@@ -40,7 +81,9 @@ To make a backup of your configuration and to be able to restore deleted alertin
In the following sections, we’ll guide you through the process of creating your Grafana-managed alert rules.
To create a Grafana-managed alert rule, use the in-product alert creation flow and follow these steps to help you.
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
@@ -54,7 +97,7 @@ To create a Grafana-managed alert rule, use the in-product alert creation flow a
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][time-units-and-relative-ranges].
1. From the **Options** dropdown, specify a [time range](ref:time-units-and-relative-ranges).
**Note:**
@@ -64,11 +107,11 @@ Define a query to get the data you want to measure and a condition that needs to
1. Add a query.
To add multiple [queries][add-a-query], click **Add query**.
To add multiple [queries](ref:add-a-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**.
1. Add one or more [expressions][expression-queries].
1. Add one or more [expressions](ref:expression-queries).
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.
@@ -158,27 +201,33 @@ Complete the following steps to set up labels and notifications.
## Add annotations
Add [annotations][annotation-label]. to provide more context on the alert in your alert notification message.
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.
1. Optional: Add a summary.
Short summary of what happened and why.
1.[Optional] Add a description.
1. Optional: Add a description.
Description of what the alert rule does.
1.[Optional] Add a Runbook URL.
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.
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, alerts are only supported in the [time series](ref:time-series) and [alert list](ref:alert-list) visualizations.
{{% /admonition %}}
{{< docs/play title="visualizations with linked alerts in Grafana" url="https://play.grafana.org/d/000000074/" >}}
1. Click **Save rule**.
### Single and multi-dimensional rule
@@ -189,13 +238,13 @@ For Grafana managed alerts, you can create a rule with a classic condition or yo
Use the classic condition expression to create a rule that triggers a single alert when its condition is met. For a query that returns multiple series, Grafana does not track the alert state of each series. As a result, Grafana sends only a single alert even when alert conditions are met for multiple series.
For more information, see [expressions documentation][expression-queries].
For more information, see [expressions documentation](ref:expression-queries).
**Multi-dimensional rule**
To generate a separate alert for each series, create a multi-dimensional rule. Use `Math`, `Reduce`, or `Resample` expressions to create a multi-dimensional rule. For example:
- Add a `Reduce` expression for each query to aggregate values in the selected time range into a single value. (Not needed for [rules using numeric data][alerting-on-numeric-data]).
- Add a `Reduce` expression for each query to aggregate values in the selected time range into a single value. (Not needed for [rules using numeric data](ref:alerting-on-numeric-data)).
- Add a `Math` expression with the condition for the rule. Not needed in case a query or a reduce expression already returns 0 if rule should not fire, or a positive number if it should fire. Some examples: `$B > 70` if it should fire in case value of B query/expression is more than 70. `$B < $C * 100` in case it should fire if value of B is less than value of C multiplied by 100. If queries being compared have multiple series in their results, series from different queries are matched if they have the same labels or one is a subset of the other.

@@ -239,23 +288,3 @@ Create alerts from any panel type. This means you can reuse the queries in the p
3. From the dropdown menu, select **More...** and then choose **New alert rule**.
This will open the alert rule form, allowing you to configure and create your alert based on the current panel's query.
@@ -31,7 +40,7 @@ For more information on recording rules in Prometheus, refer to [Defining record
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][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.
[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.
@@ -67,10 +76,3 @@ To create recording rules, follow these steps.
1. Add labels.
- 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.
@@ -102,33 +123,31 @@ All alert rules and instances, irrespective of their labels, match the default n
## Add annotations
Add [annotations][annotation-label]. to provide more context on the alert in your alert notifications.
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.
1. Optional: Add a summary.
Short summary of what happened and why.
1.[Optional] Add a description.
1. Optional: Add a description.
Description of what the alert rule does.
1.[Optional] Add a Runbook URL.
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.
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, alerts are only supported in the [time series](ref:time-series) and [alert list](ref:alert-list) visualizations.
{{% /admonition %}}
{{< docs/play title="visualizations with linked alerts in Grafana" url="https://play.grafana.org/d/000000074/" >}}
@@ -28,6 +32,10 @@ All templates should be written in [text/template](https://pkg.go.dev/text/templ
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 %}}
## Examples
Rather than write a complete tutorial on text/template, 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 to the [text/template](https://pkg.go.dev/text/template) documentation.
@@ -294,7 +302,7 @@ https://example.com/grafana
### graphLink
The `graphLink` function returns the path to the graphical view in [Explore][explore] for the given expression and data source:
The `graphLink` function returns the path to the graphical view in [Explore](ref:explore) for the given expression and data source:
description: Configure the Discord integration to receive notifications when your alerts are firing
keywords:
- grafana
- alerting
- Discord
- integration
labels:
products:
- cloud
- enterprise
- oss
menuTitle: Discord
title: Configure Discord for Alerting
weight: 10
---
# Configure Discord for Alerting
Use the Grafana Alerting - Discord integration to receive alert notifications in your Discord channels when your Grafana alert rules are triggered and resolved.
## Before you begin
Create a Webhook to enable Grafana to send alert notifications to Discord channels.
To create a Webhook in Discord, complete the following steps.
1. Follow the steps in the [Intro to Webhooks guide](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks).
1. Copy the Webhook URL.
## Procedure
To create your Discord integration in Grafana Alerting, complete the following steps.
description: Configure email integration to send email notifications when your alerts are firing
keywords:
- grafana
- alerting
- email
- integration
labels:
products:
- cloud
- enterprise
- oss
menuTitle: Email
title: Configure email for Alerting
weight: 20
---
# 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.
## Before you begin
{{<admonition type="note">}}
This section is for Grafana OSS only. For Grafana Cloud, SMTP configuration is not required.
{{</admonition>}}
For Grafana OSS, you enable email notifications by first configuring [SMTP settings](https://grafana.com/docs/grafana/next/setup-grafana/configure-grafana/#smtp) in the Grafana configuration settings.
### SMTP configuration
1. Access the configuration file.
Locate the Grafana configuration file. This file is typically named `grafana.ini` or `custom.ini` and is located in the `conf` directory within the Grafana installation directory.
1. Open the configuration file:
Open the configuration file using a text editor.
1. Locate SMTP settings section.
Search for the [SMTP settings section](https://grafana.com/docs/grafana/next/setup-grafana/configure-grafana/#smtp) in the configuration file. It starts with `[smtp]`.
1. Configure SMTP settings.
Within the `[smtp]` settings section, specify the following parameters:
-`enabled = true`: Enables SMTP.
-`host`: The hostname or IP address of your SMTP server, and the port number of your SMTP server (commonly 25, 465, or 587). Default is `localhost:25`.
-`user`: Your SMTP username (if authentication is required).
-`password`: Your SMTP password (if authentication is required).
-`from_address`: The email address from which Grafana notifications will be sent.
-`from_name`: The name associated with the from_address.
-`skip_verify = true`: Skip SSL/TLS certificate verification (useful for testing, but not recommended for production).
1. Save and close the configuration file.
After configuring the SMTP settings, save the changes to the configuration file and close the text editor.
1. Restart Grafana.
Restart the Grafana service to apply the changes made to the configuration file. The method for restarting Grafana depends on your operating system and how Grafana was installed (e.g., `systemctl restart grafana-server` for systems using systemd).
1. Test email notifications.
After restarting Grafana, test the email notification functionality by creating an email contact point.
## Procedure
To set up email integration, complete the following steps.
description: Configure the Google Chat integration to receive notifications when your alerts are firing
keywords:
- grafana
- alerting
- Google Chat
- integration
labels:
products:
- cloud
- enterprise
- oss
menuTitle: Google Chat
title: Configure Google Chat for Alerting
weight: 30
---
# Configure Google Chat for Alerting
Use the Grafana Alerting - Google Chat integration to receive alert notifications in your Google Chat space when your Grafana alert rules are triggered and resolved.
## Before you begin
Create a Webhook to enable Grafana to send alert notifications to a Google Chat space.
To create a Webhook in Google Chat space, complete the following steps.
1. Follow the steps in [Google's Chat app guide](https://developers.google.com/workspace/chat/quickstart/webhooks#create_a_webhook).
1. Copy the Webhook URL.
## Procedure
To create your Google Chat integration in Grafana Alerting, complete the following steps.
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.
You can set up the integration using the Grafana Alerting application or the Grafana OnCall application. For more information on setting it up from the Grafana OnCall application, see [Grafana OnCall documentation][oncall-integration].
{{< 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/).
{{< /admonition >}}
### Before you begin
## Before you begin
- Ensure you have Installed and enabled the Grafana OnCall plugin
- Ensure your version of Grafana is up-to-date and supports the new features
Grafana OnCall is available in Grafana Cloud by default.
### Procedure
If you are using Grafana OSS, [install and enable the Grafana OnCall plugin](http://grafana.com/docs/oncall/latest/set-up/open-source/#install-grafana-oncall-oss). Also, ensure your version of Grafana is up-to-date and supports the new features.
## Procedure
To set up the Grafana OnCall integration using the Grafana Alerting application, complete the following steps.
1. Navigate to **Alerts&IRM** -> **Alerting** -> **Contact points**.
1. From the Integration list, select Grafana OnCall.
**Note:**
1. From the **Integration** list, select **Grafana OnCall**.
{{< admonition type="note" >}}
The Grafana OnCall integration is only available for Grafana Alertmanager.
{{< /admonition >}}
1. Choose whether to add a new OnCall integration or add an existing one.
- If you add a new one, enter an Integration name.
- If you add an existing one, choose from the list of available integrations
- If you add an existing one, choose from the list of available integrations.
1. Click **Save contact point**.
1. On the contact points list view page, you should see a link to Grafana OnCall.
1. On the Contact points list view page, you can see the contact point with the Grafana OnCall icon.
If the integration is not being used anywhere in the notification policies tree, it has **Unused** as its status in the **Health** column. It won’t receive any notifications, because there are no notifications using that integration.
If the integration is not yet being used anywhere in the notification policies tree, it will have **Unused** as its status in the **Health** column. It won’t receive any notifications, because there are no notifications using that integration.
1. To see the integration details and test the integration, click the link to Grafana OnCall on the contact points list view page.
1. Click **Send demo alert** > **Send alert**.
1. Go to Grafana OnCall **Alert Groups**. You should see the demo alert.
1. Connect your contact point to a notification policy.
## Next steps
For more information on connecting your contact point to a notification policy, see
The OnCall contact point is ready to receive alert notifications.
1. To view your integration in the Grafana OnCall application and set up routes and escalation chains, click the Link next to the integration on the Contact points list view page in the **Type** column.
To add the contact point to your alert rule, complete the following next steps:
This redirects you to the Grafana OnCall integration page in the Grafana OnCall application. From there, you can add [routes and escalation chains][escalation-chain].
description: Configure the Opsgenie integration to receive notifications when your alerts are firing
keywords:
- grafana
- alerting
- Opsgenie
- integration
labels:
products:
- cloud
- enterprise
- oss
menuTitle: Opsgenie
title: Configure Opsgenie for Alerting
weight: 60
---
# Configure Opsgenie for Alerting
Use the Grafana Alerting - Opsgenie integration to receive alert notifications in your Opsgenie alert dashboard when your Grafana alert rules are triggered and resolved.
## Before you begin
Create an API key to enable Grafana to send alert notifications to Opsgenie alert dashboard.
To create an API key in Opsgenie, complete the following steps.
1. Follow the steps in the [API integration guide](https://support.atlassian.com/opsgenie/docs/create-a-default-api-integration/).
Make sure you turn on the integration.
1. Copy the API key.
## Procedure
To create your Opsgenie integration in Grafana Alerting, complete the following steps.
1. In the **Default policy**, click the ellipsis icon (…) and then **Edit**,
1. Change the default policy to the contact point you created.
1. Click **Update default policy**.
To add this contact point to your alert, complete the following steps.
**Note:**
If you have more than one contact point, add a new notification policy rather than edit the default one, so you can route specific alerts to Slack. For more information, refer to [Notification policies][nested-policy].
description: Configure Microsoft Teams integration to receive notifications when your alerts are firing
keywords:
- grafana
- alerting
- Microsoft Teams
- integration
labels:
products:
- cloud
- enterprise
- oss
menuTitle: Microsoft Teams
title: Configure Microsoft Teams for Alerting
weight: 50
---
# Configure Microsoft Teams for Alerting
Use the Grafana Alerting - Microsoft Teams integration to receive notifications in your team’s channel when your alerts are firing.
## 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.
### Create a workflow in Microsoft Teams
1. To create a new workflow, follow the steps in [Create flows in Microsoft Teams](https://learn.microsoft.com/en-us/power-automate/teams/teams-app-create).
1. Microsoft provides a template library. You can use the template **Post to a channel when a webhook request is received**.
1. At the end of workflow creation wizard, copy the URL that is provided.
**Note**
If you chose a private channel for the target of the workflow, you need to edit workflow before using it. Expand the step "Send each adaptive card", and then expand action "Post your own adaptive card as the Flow bot to a channel". Change "Post as" to User, and save the workflow.
## Procedure
To create your MS Teams integration in Grafana Alerting, complete the following steps.
1. From the Integration list, select **Microsoft Teams**.
1. In the **URL** field, copy in your Webhook URL.
1. Click **Test** to check that your integration works.
A test alert notification should be sent to the MS Team channel.
1. Click **Save** contact point.
## Next steps
The Microsoft Teams contact point is ready to receive alert notifications.
To add this contact point to your alert, complete the following steps.
1. In Grafana, navigate to **Alerting** > **Alert rules**.
1. Edit or create a new alert rule.
1. Scroll down to the **Configure labels and notifications** section.
1. Under Notifications click **Select contact point**.
1. From the drop-down menu, select the previously created contact point.
1.**Click Save rule and exit**.
## Troubleshooting
- If Grafana reports that notification was sent successfully but it was not delivered to the channel, check the workflow's run history. You can find it in the workflow details page.
description: Configure the Telegram integration to connect alerts generated by Grafana Alerting
keywords:
- grafana
- alerting
- telegram
- integration
labels:
products:
- cloud
- enterprise
- oss
menuTitle: Telegram
title: Configure Telegram for Alerting
weight: 90
---
# Configure Telegram for Alerting
Use the Grafana Alerting - Telegram integration to send [Telegram](https://telegram.org/) notifications when your alerts are firing.
## Before you begin
### Telegram bot API token and chat ID
To integrate Grafana with Telegram, you need to get a Telegram **bot API token** and a **chat ID** (the ID of the Telegram chat where you want to receive the alert notifications). To complete the integration, use the browser version of Telegram.
### Set up your Telegram bot
Create a [Telegram bot](https://core.telegram.org/bots/api). You can associate this bot to your chats and perform different actions with it, such as receiving alerts from Grafana.
To set up the bot, complete the following steps.
1.**Open the Telegram app** on your device.
1. Find the Telegram bot named **BotFather**.
1. Type or press `/newbot`.
1. Choose a name for the bot. It must end in **bot** or **\_bot**. E.g. "my_bot".
1.**Copy the API token**.
### Chat ID
Add the bot to a group chat by following the steps below. Once the bot is added to the chat, you will be able to route your alert notifications to that group.
1. In the Telegram app, **open a group or start a new one**.
1. Search and **add the bot to the group**.
1. Copy the **chat ID** from the URL in your browser's address bar. It should look like this: `https://web.telegram.org/a/#-4266674385`.
The chat ID is the sequence of numbers that follows the `#` symbol. For example: `-4266674385`.
## Procedure
To create your Telegram integration in Grafana Alerting, complete the following steps.
| Integration Key | Integration key for PagerDuty |
| Severity | Level for dynamic notifications, default is `critical` |
| Custom Details | Additional details about the event |
## Before you begin
The `CustomDetails` field is an object containing arbitrary key-value pairs. The user-defined details are merged with the ones we use by default.
To set up PagerDuty for integration with Grafana Alerting, you need to create a [PagerDuty](https://www.pagerduty.com/) account. There are several set up steps to perform within PagerDuty before you set up the integration in Grafana Alerting.
title: Configure the webhook notifier for Alerting
weight: 200
weight: 100
---
### Configure the webhook notifier for Alerting
# Configure the webhook notifier for Alerting
Example JSON body:
The webhook notification is a simple way to send information about a state change over HTTP to a custom endpoint. Using this notification you could integrate Grafana into a system of your choosing.
| panelURL | string | **Will be deprecated soon** |
| imageURL | string | URL of a screenshot of a panel assigned to the rule that created this notification |
### Removed fields related to dashboards
{{< admonition type="note" >}}
Alert rules are not coupled to dashboards anymore therefore the fields related to dashboards `dashboardId` and `panelId` have been removed.
{{< /admonition >}}
Alerts are not coupled to dashboards anymore therefore the fields related to dashboards `dashboardId` and `panelId` have been removed.
## Procedure
## WeCom
To create your webhook integration in Grafana Alerting, complete the following steps:
WeCom contact points need a Webhook URL. These are obtained by setting up a WeCom robot on the corresponding group chat. To obtain a Webhook URL using the WeCom desktop Client please follow these steps:
@@ -27,7 +38,7 @@ A mute timing is a recurring interval of time when no new notifications for a po
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.
You can configure Grafana managed mute timings as well as mute timings for an [external Alertmanager data source][datasources/alertmanager]. For more information, refer to [Alertmanager documentation][intro-alertmanager].
You can configure Grafana managed mute timings as well as mute timings for an [external Alertmanager data source](ref:datasources/alertmanager). For more information, refer to [Alertmanager documentation](ref:intro-alertmanager).
## Mute timings vs silences
@@ -80,11 +91,3 @@ If you want to specify an exact duration, specify all the options. For example,
@@ -27,39 +43,25 @@ Notification templates are not tied to specific contact point integrations, such
You can use notification templates to:
- Customize the subject of an email or the title of a message.
- Add, change or remove text in notifications. For example, to select or omit certain labels, annotations and links.
- Format text in bold and italic, and add or remove line breaks.
- 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.
You cannot use notification templates to:
However, there are limitations. You cannot:
- Add HTML and CSS to email notifications to change their visual appearance.
-Change the design of notifications in instant messaging services such as Slack and Microsoft Teams. For example, to add or remove custom blocks with Slack Block Kit or adaptive cards with Microsoft Teams.
- Choose the number and size of images, or where in the notification images are shown.
- Customize the data in webhooks, including the fields or structure of the JSON data or send the data in other formats such as XML.
- Add or remove HTTP headers in webhooks other than those in the contact point configuration.
- 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.
@@ -53,7 +53,7 @@ To create a notification template that contains more than one template:
## Preview notification templates
Preview how your notification templates will 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.
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.
@@ -65,7 +65,7 @@ To preview your notification templates:
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:
1. Optional: To add alert data from existing alert instances:
a. Click **Select alert instances**.
@@ -73,7 +73,7 @@ To preview your notification templates:
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:**
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.
@@ -81,7 +81,7 @@ To preview your notification templates:
c. Click **Add alert data**.
d. Click **Refresh preview** to see what your template content will look like and the corresponding payload 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.
@@ -162,6 +162,86 @@ Resolved alerts:
{{ 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:
For more information on how to write and execute templates, refer to [Using Go's templating language][using-go-templating-language] and [Create notification templates][create-notification-templates].
For more information on how to write and execute templates, refer to [Using Go's templating language](ref:using-go-templating-language) and [Create notification templates](ref:create-notification-templates).
@@ -26,7 +42,7 @@ Before you start creating your own notification templates, we recommend that you
## Dot
In text/template there is a special cursor called dot, and is written as `.`. You can think of this cursor as a variable whose value changes depending where in the template it is used. For example, at the start of a notification template `.` refers to something called [`ExtendedData`][extendeddata] which contains a number of fields including `Alerts`, `Status`, `GroupLabels`, `CommonLabels`, `CommonAnnotations` and `ExternalURL`. However, dot might refer to something else when used in a range over a list, when used inside a `with`, or when writing feature templates to be used in other templates. You can see examples of this in [Create notification templates][create-notification-templates], and all data and functions in the [Reference][reference].
In text/template there is a special cursor called dot, and is written as `.`. You can think of this cursor as a variable whose value changes depending where in the template it is used. For example, at the start of a notification template `.` refers to something called [`ExtendedData`](ref:extendeddata) which contains a number of fields including `Alerts`, `Status`, `GroupLabels`, `CommonLabels`, `CommonAnnotations` and `ExternalURL`. However, dot might refer to something else when used in a range over a list, when used inside a `with`, or when writing feature templates to be used in other templates. You can see examples of this in [Create notification templates](ref:create-notification-templates), and all data and functions in the [Reference](ref:reference).
## Opening and closing tags
@@ -280,14 +296,3 @@ The indentation and line breaks in the template are now absent from the text:
Whether you’re just starting out or you're a more experienced user of Grafana Alerting, learn more about the fundamentals and available features that help you create, manage, and respond to alerts; and improve your team’s ability to resolve issues quickly.
{{< admonition type="tip" >}}
For a hands-on introduction, refer to our [tutorial to get started with Grafana Alerting](http://grafana.com/tutorials/alerting-get-started/).
{{< /admonition >}}
The following diagram gives you an overview of Grafana Alerting and introduces you to some of the fundamental features that are the principles of how Grafana Alerting works.
@@ -35,7 +80,7 @@ The following concepts are key to your understanding of how Grafana Alerting wor
### Alert rules
An [alert rule][alert-rules] 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.
An [alert rule](ref:alert-rules) 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.
Add labels to uniquely identify your alert rule and configure alert routing. Labels link alert rules to notification policies, so you can easily manage which policy should handle which alerts and who gets notified.
@@ -55,11 +100,11 @@ A rule using the PromQL expression above creates as many alert instances as the
{{< figure src="/static/img/docs/alerting/unified/multi-dimensional-alert.png" caption="Multiple alert instances from a single alert rule" >}}
[Alert rules are frequently evaluated][alert-rule-evaluation] and the state of their alert instances is updated accordingly. Only alert instances that are in a firing or resolved state are routed to notification policies to be handled.
[Alert rules are frequently evaluated](ref:alert-rule-evaluation) and the state of their alert instances is updated accordingly. Only alert instances that are in a firing or resolved state are routed to notification policies to be handled.
### Notification policies
[Notification policies][notification-policies] group alerts and then route them to contact points. They determine when notifications are sent, and how often notifications should be repeated.
[Notification policies](ref:notification-policies) group alerts and then route them to contact points. They determine when notifications are sent, and how often notifications should be repeated.
Alert instances are matched to notification policies using label matchers. This provides a flexible way to organize and route alerts to different receivers.
@@ -69,13 +114,13 @@ Each policy consists of a set of label matchers (0 or more) that specify which a
### Contact points
[Contact points][contact-points] determine where notifications are sent. For example, you might have a contact point that sends notifications to an email address, to Slack, to an incident management system (IRM) such as Grafana OnCall or Pagerduty, or to a webhook.
[Contact points](ref:contact-points) determine where notifications are sent. For example, you might have a contact point that sends notifications to an email address, to Slack, to an incident management system (IRM) such as Grafana OnCall or Pagerduty, or to a webhook.
Notifications sent from contact points are customizable with notification templates, which can be shared between contact points.
### Silences and mute timings
[Silences][silences] and [mute timings][mute-timings] allow you to pause notifications for specific alerts or even entire notification policies. Use a silence to pause notifications on an ad-hoc basis, such as during a maintenance window; and use mute timings to pause notifications at regular intervals, such as evenings and weekends.
[Silences](ref:silences) and [mute timings](ref:mute-timings) allow you to pause notifications for specific alerts or even entire notification policies. Use a silence to pause notifications on an ad-hoc basis, such as during a maintenance window; and use mute timings to pause notifications at regular intervals, such as evenings and weekends.
### Architecture
@@ -88,7 +133,7 @@ Prometheus-based alerting systems have two main components:
Grafana doesn’t use Prometheus as its default alert generator because Grafana Alerting needs to work with many other data sources in addition to Prometheus.
However, Grafana can also use Prometheus as an alert generator as well as external Alertmanagers. For more information about how to use distinct alerting systems, refer to the [Grafana alert rule types][alert-rules].
However, Grafana can also use Prometheus as an alert generator as well as external Alertmanagers. For more information about how to use distinct alerting systems, refer to the [Grafana alert rule types](ref:alert-rules).
## Design your Alerting system
@@ -121,29 +166,3 @@ Here are some tips on how to create an effective alert management set up for you
- Continually tune your alert rules to review effectiveness. Remove alert rules to avoid duplication or ineffective alerts.
- Think carefully about priority and severity levels.
- Continually review your thresholds and evaluation rules.
@@ -25,7 +59,7 @@ An alert rule is a set of evaluation criteria for when an alert rule should fire
- Queries and expressions that select the data set to evaluate.
- A condition (the threshold) that the query must meet or exceed to trigger the alert instance.
- An interval that specifies the frequency of [alert rule evaluation][alert-rule-evaluation] and a duration indicating how long the condition must be met to trigger the alert instance.
- An interval that specifies the frequency of [alert rule evaluation](ref:alert-rule-evaluation) and a duration indicating how long the condition must be met to trigger the alert instance.
- Other customizable options, for example, setting what should happen in the absence of data, notification messages, and more.
Grafana supports two different alert rule types: Grafana-managed alert rules and data source-managed alert rules.
@@ -34,7 +68,7 @@ Grafana supports two different alert rule types: Grafana-managed alert rules and
Grafana-managed alert 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](#supported-data-sources), and use multiple data sources in a single alert rule.
Additionally, you can also add [expressions to transform your data][expression-queries], set custom alert conditions, and include [images in alert notifications][notification-images].
Additionally, you can also add [expressions to transform your data](ref:expression-queries), set custom alert conditions, and include [images in alert notifications](ref:notification-images).
{{< figure src="/media/docs/alerting/grafana-managed-alerting-architecture.png" max-width="750px" caption="How Grafana-managed alerting works by default" >}}
@@ -42,7 +76,7 @@ Additionally, you can also add [expressions to transform your data][expression-q
1. Alert rules are evaluated by the Alert Rule Evaluation Engine from within Grafana.
1. Firing and resolved alert instances are delivered to the internal Grafana [Alertmanager][alert-manager] which handles notifications.
1. Firing and resolved alert instances are delivered to the internal Grafana [Alertmanager](ref:alert-manager) which handles notifications.
### Supported data sources
@@ -64,15 +98,15 @@ They are only supported for Prometheus-based or Loki data sources with the Ruler
1. Alert rules are created and stored within the data source itself.
1. Alert rules can only query Prometheus-based data. It can use either queries or [recording rules](#recording-rules).
1. Alert rules are evaluated by the Alert Rule Evaluation Engine.
1. Firing and resolved alert instances are delivered to the configured [Alertmanager][alert-manager] which handles notifications.
1. Firing and resolved alert instances are delivered to the configured [Alertmanager](ref:alert-manager) which handles notifications.
### Recording rules
A recording rule allows you to pre-compute frequently needed or computationally expensive expressions and save their result as a new set of time series. This is useful if you want to run alerts on aggregated data or if you have dashboards that query computationally expensive expressions repeatedly.
Querying this new time series is faster, especially for dashboards since they query the same expression every time the dashboards refresh. For more information, refer to [Create recording rules][create-recording-rules].
Querying this new time series is faster, especially for dashboards since they query the same expression every time the dashboards refresh. For more information, refer to [Create recording rules](ref:create-recording-rules).
Alternatively, Grafana Enterprise and Grafana Cloud offer [recorded queries][recorded-queries] that can be executed against any data source.
Alternatively, Grafana Enterprise and Grafana Cloud offer [recorded queries](ref:recorded-queries) that can be executed against any data source.
## Comparison between alert rule types
@@ -87,27 +121,3 @@ When choosing which alert rule type to use, consider the following comparison be
| Use images in alert notifications | Yes | No |
| Scaling | More resource intensive, depend on the database, and are likely to suffer from transient errors. They only scale vertically. | Store alert rules within the data source itself and allow for “infinite” scaling. Generate and send alert notifications from the location of your data. |
| Alert rule evaluation and delivery | Alert rule evaluation and delivery is done from within Grafana, using an external Alertmanager; or both. | Alert rule evaluation and alert delivery is distributed, meaning there is no single point of failure. |
@@ -136,8 +142,3 @@ Labels prefixed with `grafana_` are reserved by Grafana for special use. To stop
Both labels and annotations have the same structure: a set of named values; however their intended uses are different. The purpose of annotations is to add additional information to existing alerts.
There are a number of suggested annotations in Grafana such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`. Like custom labels, annotations must have a name, and their value can contain a combination of text and template code that is evaluated when an alert is fired.
In Grafana, queries play a vital role in fetching and transforming data from supported data sources, which include databases like MySQL and PostgreSQL, time series databases like Prometheus, InfluxDB and Graphite, and services like Elasticsearch, AWS CloudWatch, Azure Monitor and Google Cloud Monitoring.
For more information on supported data sources, see [Data sources][data-source-alerting].
For more information on supported data sources, see [Data sources](ref:data-source-alerting).
The process of executing a query involves defining the data source, specifying the desired data to retrieve, and applying relevant filters or transformations. Query languages or syntaxes specific to the chosen data source are utilized for constructing these queries.
@@ -30,7 +41,7 @@ In Alerting, you define a query to get the data you want to measure and a condit
An alert rule consists of one or more queries and expressions that select the data you want to measure.
For more information on queries and expressions, see [Query and transform data][query-transform-data].
For more information on queries and expressions, see [Query and transform data](ref:query-transform-data).
## Data source queries
@@ -211,11 +222,3 @@ When this query is used as the **condition** in an alert rule, then the non-zero
@@ -34,13 +40,8 @@ In Grafana, you can use the Cloud Alertmanager, Grafana Alertmanager, or an exte
- **External Alertmanager** can receive all your Grafana, Loki, Mimir, and Prometheus alerts. External Alertmanagers can be configured and administered from within Grafana itself.
Here are two examples of when you may want to [add your own external alertmanager][configure-alertmanager] and send your alerts there instead of the Grafana Alertmanager:
Here are two examples of when you may want to [add your own external alertmanager](ref:configure-alertmanager) and send your alerts there instead of the Grafana Alertmanager:
1. You may already have Alertmanagers on-premises in your own Cloud infrastructure that you have set up and still want to use, because you have other alert generators, such as Prometheus.
2. You want to use both Prometheus on-premises and hosted Grafana to send alerts to the same Alertmanager that runs in your Cloud infrastructure.
@@ -31,7 +37,7 @@ Notification policies are _not_ a list, but rather are structured according to a
Each policy consists of a set of label matchers (0 or more) that specify which labels they are or aren't interested in handling.
For more information on label matching, see [how label matching works][labels-and-label-matchers].
For more information on label matching, see [how label matching works](ref:labels-and-label-matchers).
{{% admonition type="note" %}}
If you haven't configured any label matchers for your notification policy, your notification policy will match _all_ alert instances. This may prevent child policies from being evaluated unless you have enabled **Continue matching siblings** on the notification policy.
@@ -49,8 +55,12 @@ If a notification policy has label matchers that match the labels of the alert i
If no child policies are defined in a notification policy or if none of the child policies have any label matchers that match the alert instance's labels, the default notification policy is used.
{{% admonition type="note" %}}
As soon as a matching policy is found, the system does not continue to look for other matching policies. If you want to continue to look for other policies that may match, enable **Continue matching siblings** on that particular policy.
If alerts use multiple labels, these labels must also be present in a notification policy to match and route notifications to a specific contact point.
{{% /admonition %}}
Lastly, if none of the notification policies are selected the default notification policy is used.
### Routing example
@@ -67,6 +77,10 @@ The `team=security` policy is not evaluated since we already found a match and *
**Disk Usage – 80%** has both a `team` and `severity` label, and matches a child policy of the operations team.
{{% admonition type="note" %}}
When an alert matches both a parent policy and a child policy (like it does in this case), the routing follows the child policy (`severity`) as it provides a more specific match.
{{% /admonition %}}
**Unauthorized log entry** has a `team` label but does not match the first policy (`team=operations`) since the values are not the same, so it will continue searching and match the `team=security` policy. It does not have any child policies, so the additional `severity=high` label is ignored.
## Inheritance
@@ -129,8 +143,3 @@ Once the first notification has been sent for a new group of alerts, Grafana sta
Repeat interval decides how often notifications are repeated if the group has not changed since the last notification. You can think of these as reminders that some alerts are still firing. Repeat interval is closely related to Group interval, which means your Repeat interval must not only be greater than or equal to Group interval, but also must be a multiple of Group interval. If Repeat interval is not a multiple of Group interval it will be coerced into one. For example, if your Group interval is 5 minutes, and your Repeat interval is 9 minutes, the Repeat interval will be rounded up to the nearest multiple of 5 which is 10 minutes.
Use templating to customize, format, and reuse alert notification messages. Create more flexible and informative alert notification messages by incorporating dynamic content, such as metric values, labels, and other contextual information.
In Grafana, there are two ways to template your alert notification messages:
1. Labels and annotations
- Template labels and annotations in alert rules.
- Labels and annotations contain information about an alert.
- Labels are used to differentiate an alert from all other alerts, while annotations are used to add additional information to an existing alert.
2. Notification templates
- Template notifications in contact points.
- Add notification templates to contact points for reuse and consistent messaging in your notifications.
- Use notification templates to change the title, message, and format of the message in your notifications.
This diagram illustrates the entire process of templating, from the creation of labels and annotations in alert rules or notification templates in contact points, to what they look like when exported and applied in your alert notification messages.
- **Monitored Application**: A web server, database, or any other service generating metrics. For example, it could be an NGINX server providing metrics about request rates, response times, and so on.
- **Prometheus**: Prometheus collects metrics from the monitored application. For example, it might scrape metrics from the NGINX server, including labels like instance (the server hostname) and job (the service name).
- **Grafana**: Grafana queries Prometheus to retrieve metrics data. For example, you might create an alert rule to monitor NGINX request rates over time, and template labels or annotations based on the instance label.
- **Alertmanager**: Part of the Prometheus ecosystem, Alertmanager handles alert notifications. For example, if the request rate exceeds a certain threshold on a particular NGINX server, Alertmanager can send an alert notification to, for example, Slack or email, including the server name and the exceeded threshold (the instance label will be interpolated, and the actual server name will appear in the alert notification).
- **Alert notification**: When an alert rule condition is met, Alertmanager sends a notification to various channels such as Slack, Grafana OnCall, etc. These notifications can include information from the labels associated with the alerting rule. For example, if an alert triggers due to high CPU usage on a specific server, the notification message can include details like server name (instance label), disk usage percentage, and the threshold that was exceeded.
## Labels and annotations
Labels and annotations contain information about an alert. Labels are used to differentiate an alert from all other alerts, while annotations are used to add additional information to an existing alert.
### Template labels
Label templates are applied in the alert rule itself (i.e. in the Configure labels and notifications section of an alert).
{{<admonition type="note">}}
Think about templating labels when you need to improve or change how alerts are uniquely identified. This is especially helpful if the labels you get from your query aren't detailed enough. Keep in mind that it's better to keep long sentences for summaries and descriptions. Also, avoid using the query's value in labels because it may result in the creation of many alerts when you actually only need one.
{{</admonition>}}
Templating can be applied by using variables and functions. These variables can represent dynamic values retrieved from your data queries.
{{<admonition type="note">}}
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.
{{</admonition>}}
Here are some commonly used built-in [variables](ref:variables-label-annotation) to interact with the name and value of labels in Grafana alerting:
- The `$labels` variable, which contains all labels from the query.
For example, let's say you have an alert rule that triggers when the CPU usage exceeds a certain threshold. You want to create annotations that provide additional context when this alert is triggered, such as including the specific server that experienced the high CPU usage.
The host {{ index $labels "instance" }} has exceeded 80% CPU usage for the last 5 minutes
The outcome of this template would print:
The host instance 1 has exceeded 80% CPU usage for the last 5 minutes
- The `$value` variable, which is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule.
In the context of the previous example, $value variable would write something like this:
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
The outcome of this template would print:
CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
- The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs (i.e. the id that identifies the query or expression. By default the Red ID of the query is “A”).
Given an alert with the labels instance=server1 and an instant query with the value 81.2345, would write like this:
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
And it would print:
CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
{{% admonition type="caution" %}}
Extra whitespace in label templates can break matches with notification policies.
{{% /admonition %}}
### Template annotations
Both labels and annotations have the same structure: a set of named values; however their intended uses are different. The purpose of annotations is to add additional information to existing alerts.
There are a number of suggested annotations in Grafana such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`. Like labels, annotations must have a name, and their value can contain a combination of text and template code that is evaluated when an alert is fired.
Here is an example of templating an annotation in the context of an alert rule. The text/template is added into the Add annotations section.
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
The outcome of this template would print
CPU usage for Instance 1 has exceeded 80% for the last 5 minutes
### Template notifications
Notification templates represent the alternative approach to templating designed for reusing templates. Notifications are messages to inform users about events or conditions triggered by alerts. You can create reusable notification templates to customize the content and format of alert notifications. Variables, labels, or other context-specific details can be added to the templates to dynamically insert information like metric values.
Here is an example of a notification template:
```go
{define"alerts.message"-}}
{{if.Alerts.Firing-}}
{{len.Alerts.Firing}}firingalert(s)
{{template"alerts.summarize".Alerts.Firing}}
{{-end}}
{{-if.Alerts.Resolved-}}
{{len.Alerts.Resolved}}resolvedalert(s)
{{template"alerts.summarize".Alerts.Resolved}}
{{-end}}
{{-end}}
{{define"alerts.summarize"-}}
{{range.-}}
-{{index.Annotations"summary"}}
{{end}}
{{end}}
```
This is the message you would receive in your contact point:
1 firing alert(s)
- The database server db1 has exceeded 75% of available disk space. Disk space used is 76%, please resize the disk size within the next 24 hours
1 resolved alert(s)
- The web server web1 has been responding to 5% of HTTP requests with 5xx errors for the last 5 minutes
Once the template is created, you need to make reference to it in your **Contact point** (in the Optional `[contact point]` settings) .
{{<admonition type="note">}}
It's not recommended to include individual alert information within notification templates. Instead, it's more effective to incorporate such details within the rule using labels and annotations.
@@ -28,7 +55,7 @@ You cannot edit imported alerting resources in the Grafana UI in the same way as
Choose from the options below to import (or provision) your Grafana Alerting resources.
1. [Use configuration files to provision your alerting resources][alerting_file_provisioning], such as alert rules and contact points, through files on disk.
1. [Use configuration files to provision your alerting resources](ref:alerting_file_provisioning), such as alert rules and contact points, through files on disk.
{{< admonition type="note" >}}
@@ -36,11 +63,16 @@ Choose from the options below to import (or provision) your Grafana Alerting res
- Provisioning with configuration files is not available in Grafana Cloud.
{{< /admonition >}}
1. Use [Terraform to provision alerting resources][alerting_tf_provisioning].
1. Use [Terraform to provision alerting resources](ref:alerting_tf_provisioning).
1. Use the [Alerting provisioning HTTP API][alerting_http_provisioning] to manage alerting resources.
1. Use the [Alerting provisioning HTTP API](ref:alerting_http_provisioning) to manage alerting resources.
{{< admonition type="note" >}}
The Alerting provisioning HTTP API can be used to create, modify, and delete resources for Grafana-managed alerts.
To manage resources related to data source-managed alerts, including recording rules, use the Mimir or Cortex tool.
The JSON output from the majority of Alerting HTTP endpoints isn't compatible for provisioning via configuration files.
If you need the alerting resources for file provisioning, use [Export Alerting endpoints](/docs/grafana/<GRAFANA_VERSION>/alerting/set-up/provision-alerting-resources/export-alerting-resources#export-api-endpoints) to return or download them in provisioning format.
@@ -50,7 +82,7 @@ Choose from the options below to import (or provision) your Grafana Alerting res
You can export both manually created and provisioned alerting resources. You can also edit and export an alert rule without applying the changes.
For detailed instructions on the various export options, refer to [Export alerting resources][alerting_export].
For detailed instructions on the various export options, refer to [Export alerting resources](ref:alerting_export).
## View provisioned alerting resources
@@ -61,19 +93,3 @@ To view your provisioned resources in Grafana, complete the following steps.
1. Click an alerting resource folder, for example, Alert rules.
Provisioned resources are labeled **Provisioned**, so that it is clear that they were not created manually.
@@ -35,7 +117,7 @@ If you need to modify provisioned alerting resources in Grafana, refer to [edit
## Export from the Grafana UI
The export options listed below enable you to download resources in YAML, JSON, or Terraform format, facilitating their provisioning through [configuration files][alerting_file_provisioning] or [Terraform][alerting_tf_provisioning].
The export options listed below enable you to download resources in YAML, JSON, or Terraform format, facilitating their provisioning through [configuration files](ref:alerting_file_provisioning) or [Terraform](ref:alerting_tf_provisioning).
### Export alert rules
@@ -92,7 +174,7 @@ However, you can export it by manually copying the content template and title di
1. Adjust it for the [file provisioning format][alerting_file_provisioning_template] or [Terraform resource][alerting_tf_provisioning_template].
1. Adjust it for the [file provisioning format](ref:alerting_file_provisioning_template) or [Terraform resource](ref:alerting_tf_provisioning_template).
### Export the notification policy tree
@@ -128,86 +210,35 @@ To export mute timings from the Grafana UI, complete the following steps.
## HTTP Alerting API
You can use the [Alerting HTTP API][alerting_http_provisioning] to return existing alerting resources in JSON and import them to another Grafana instance using the same endpoint.
You can use the [Alerting HTTP API](ref:alerting_http_provisioning) to return existing alerting resources in JSON and import them to another Grafana instance using the same endpoint.
However, note the standard endpoints return a JSON format that is not compatible for provisioning through configuration files or Terraform, except the `/export` endpoints listed below.
### Export API endpoints
The **Alerting HTTP API** provides specific endpoints for exporting alerting resources in YAML or JSON, facilitating [provisioning via configuration files][alerting_file_provisioning], or Terraform (HCL).
The **Alerting HTTP API** provides specific endpoints for exporting alerting resources in YAML or JSON, facilitating [provisioning via configuration files](ref:alerting_file_provisioning), or Terraform (HCL).
| Alert rules | GET /api/v1/provisioning/alert-rules/export | [Export all alert rules in provisioning file format.][export_rules] |
| Alert rules | GET /api/v1/provisioning/folder/:folderUid/rule-groups/:group/export | [Export an alert rule group in provisioning file format.][export_rule_group] |
| Alert rules | GET /api/v1/provisioning/alert-rules/:uid/export | [Export an alert rule in provisioning file format.][export_rule] |
| Contact points | GET /api/v1/provisioning/contact-points/export | [Export all contact points in provisioning file format.][export_contacts] |
| Notification policy tree | GET /api/v1/provisioning/policies/export | [Export the notification policy tree in provisioning file format.][export_notifications] |
| Mute timings | GET /api/v1/provisioning/mute-timings/export | [Export all mute timings in provisioning file format.][export_mute_timings] |
| Mute timings | GET /api/v1/provisioning/mute-timings/:name/export | [Export a mute timing in provisioning file format.][export_mute_timing] |
| Alert rules | GET /api/v1/provisioning/alert-rules/export | [Export all alert rules in provisioning file format.](ref:export_rules) |
| Alert rules | GET /api/v1/provisioning/folder/:folderUid/rule-groups/:group/export | [Export an alert rule group in provisioning file format.](ref:export_rule_group) |
| Alert rules | GET /api/v1/provisioning/alert-rules/:uid/export | [Export an alert rule in provisioning file format.](ref:export_rule) |
| Contact points | GET /api/v1/provisioning/contact-points/export | [Export all contact points in provisioning file format.](ref:export_contacts) |
| Notification policy tree | GET /api/v1/provisioning/policies/export | [Export the notification policy tree in provisioning file format.](ref:export_notifications) |
| Mute timings | GET /api/v1/provisioning/mute-timings/export | [Export all mute timings in provisioning file format.](ref:export_mute_timings) |
| Mute timings | GET /api/v1/provisioning/mute-timings/:name/export | [Export a mute timing in provisioning file format.](ref:export_mute_timing) |
These endpoints accept a `download` parameter to download a file containing the exported resources.
# Use configuration files to provision alerting resources
Manage your alerting resources using configuration files that can be version controlled. When Grafana starts, it provisions the resources defined in your configuration files. [Provisioning][provisioning] can create, update, or delete existing resources in your Grafana instance.
Manage your alerting resources using configuration files that can be version controlled. When Grafana starts, it provisions the resources defined in your configuration files. [Provisioning](ref:provisioning) can create, update, or delete existing resources in your Grafana instance.
This guide outlines the steps and references to provision alerting resources using YAML files. For a practical demo, you can clone and try [this example using Grafana OSS and Docker Compose](https://github.com/grafana/provisioning-alerting-examples/tree/main/config-files).
@@ -40,7 +72,7 @@ Details on how to set up the files and which fields are required for each object
Create or delete alert rules using provisioning files in your Grafana instance(s).
1. Find the alert rule group in Grafana.
1. [Export][export_alert_rules] and download a provisioning file for your alert rules.
1. [Export](ref:export_alert_rules) and download a provisioning file for your alert rules.
1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to.
Example configuration files can be found below.
@@ -139,7 +171,7 @@ deleteRules:
Create or delete contact points using provisioning files in your Grafana instance(s).
1. Find the contact point in Grafana.
1. [Export][export_contact_points] and download a provisioning file for your contact point.
1. [Export](ref:export_contact_points) and download a provisioning file for your contact point.
1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to.
Example configuration files can be found below.
@@ -572,7 +604,7 @@ settings:
Create or delete templates using provisioning files in your Grafana instance(s).
1. Find the notification template in Grafana.
1. [Export][export_templates] a template by copying the template content and title.
1. [Export](ref:export_templates) a template by copying the template content and title.
1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to.
Example configuration files can be found below.
@@ -625,7 +657,7 @@ Since the policy tree is a single resource, provisioning it will overwrite a pol
{{< /admonition >}}
1. Find the notification policy tree in Grafana.
1. [Export][export_policies] and download a provisioning file for your notification policy tree.
1. [Export](ref:export_policies) and download a provisioning file for your notification policy tree.
1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to.
Example configuration files can be found below.
@@ -711,7 +743,7 @@ resetPolicies:
Create or delete mute timings via provisioning files using provisioning files in your Grafana instance(s).
1. Find the mute timing in Grafana.
1. [Export][export_mute_timings] and download a provisioning file for your mute timing.
1. [Export](ref:export_mute_timings) and download a provisioning file for your mute timing.
1. Copy the contents into a YAML or JSON configuration file and add it to the `provisioning/alerting` directory of the Grafana instance you want to import the alerting resources to.
Example configuration files can be found below.
@@ -762,28 +794,5 @@ deleteMuteTimes:
For more examples on the concept of this guide:
- Try provisioning alerting resources in Grafana OSS with YAML files through a demo project using [Docker Compose](https://github.com/grafana/provisioning-alerting-examples/tree/main/config-files) or [Kubernetes deployments](https://github.com/grafana/provisioning-alerting-examples/tree/main/kubernetes).
- Review the distinct options about how Grafana provisions resources in the [Provision Grafana documentation][provisioning].
- Review the distinct options about how Grafana provisions resources in the [Provision Grafana documentation](ref:provisioning).
- For Helm support, review the examples provisioning alerting resources in the [Grafana Helm Chart documentation](https://github.com/grafana/helm-charts/blob/main/charts/grafana/README.md).
- or writing the [Terraform Alerting schemas](https://registry.terraform.io/providers/grafana/grafana/latest/docs).
> By default, you cannot edit provisioned resources. Enable [`disable_provenance` in the Terraform resource](#enable-editing-resources-in-the-grafana-ui) to allow changes in the Grafana UI.
1. Run `terraform apply` to provision your alerting resources.
@@ -36,10 +89,10 @@ Before you begin, you should have available a Grafana instance and [Terraform in
## Create an API key and configure the Terraform provider
You can create a [service account token][service-accounts] to authenticate Terraform with Grafana. To create an API key for provisioning alerting resources, complete the following steps.
You can create a [service account token](ref:service-accounts) to authenticate Terraform with Grafana. To create an API key for provisioning alerting resources, complete the following steps.
1. Create a new service account.
1. Assign the role or permission to access the [Alerting provisioning API][alerting_http_provisioning].
1. Assign the role or permission to access the [Alerting provisioning API](ref:alerting_http_provisioning).
1. Create a new service account token.
1. Name and save the token for use in Terraform.
@@ -68,29 +121,29 @@ Replace the following values:
This Terraform configuration installs the [Grafana Terraform provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs) and authenticates against your Grafana instance using an API token. For other authentication alternatives including basic authentication, refer to the [`auth` option documentation](https://registry.terraform.io/providers/grafana/grafana/latest/docs#authentication).
For Grafana Cloud, refer to the [instructions to manage a Grafana Cloud stack with Terraform][provision-cloud-with-terraform]. For role-based access control, refer to [Provisioning RBAC with Terraform][rbac-terraform-provisioning] and the [alerting provisioning roles (`fixed:alerting.provisioning.*`)][rbac-role-definitions].
For Grafana Cloud, refer to the [instructions to manage a Grafana Cloud stack with Terraform](ref:provision-cloud-with-terraform). For role-based access control, refer to [Provisioning RBAC with Terraform](ref:rbac-terraform-provisioning) and the [alerting provisioning roles (`fixed:alerting.provisioning.*`)](ref:rbac-role-definitions).
## Create Terraform configurations for alerting resources
[Grafana Terraform provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs) enables you to manage the following alerting resources.
@@ -110,7 +163,7 @@ In this section, we'll create Terraform configurations for each alerting resourc
1. Create or find an alert rule you want to import in Grafana.
1. [Export][alerting_export] the alert rule group in Terraform format. This exports the alert rule group as [`grafana_rule_group` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/rule_group).
1. [Export](ref:alerting_export) the alert rule group in Terraform format. This exports the alert rule group as [`grafana_rule_group` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/rule_group).
You can edit the exported resource, or alternatively, consider creating the resource from scratch.
@@ -192,11 +245,11 @@ In this section, we'll create Terraform configurations for each alerting resourc
### Add contact points
[Contact points][contact-points] are the receivers of alert notifications.
[Contact points](ref:contact-points) are the receivers of alert notifications.
1. Create or find the contact points you want to import in Grafana. Alternatively, consider writing the resource in code as demonstrated in the example below.
1. [Export][alerting_export] the contact point in Terraform format. This exports the contact point as [`grafana_contact_point` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/contact_point)—edit it if necessary.
1. [Export](ref:alerting_export) the contact point in Terraform format. This exports the contact point as [`grafana_contact_point` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/contact_point)—edit it if necessary.
1. In this example, notifications are muted on weekends.
@@ -219,11 +272,11 @@ In this section, we'll create Terraform configurations for each alerting resourc
### Add and enable templates
[Notification templates][notification-template] allow customization of alert notifications across multiple contact points.
[Notification templates](ref:notification-template) allow customization of alert notifications across multiple contact points.
1. Create or find the notification template you want to import in Grafana. Alternatively, consider writing the resource in code as demonstrated in the example below.
1. [Export][alerting_export] the template as [`grafana_message_template` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/message_template).
1. [Export](ref:alerting_export) the template as [`grafana_message_template` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/message_template).
This example is a simple demo template defined as `custom_email.message`.
@@ -256,11 +309,11 @@ In this section, we'll create Terraform configurations for each alerting resourc
### Add mute timings
[Mute timings][mute-timings] pause alert notifications during predetermined intervals.
[Mute timings](ref:mute-timings) pause alert notifications during predetermined intervals.
1. Create or find the mute timings you want to import in Grafana. Alternatively, consider writing the resource in code as demonstrated in the example below.
1. [Export][alerting_export] the mute timing in Terraform format. This exports the mute timing as [`grafana_mute_timing` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/mute_timing)—edit it if necessary.
1. [Export](ref:alerting_export) the mute timing in Terraform format. This exports the mute timing as [`grafana_mute_timing` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/mute_timing)—edit it if necessary.
1. This example turns off notifications on weekends.
@@ -282,7 +335,7 @@ In this section, we'll create Terraform configurations for each alerting resourc
### Add the notification policy tree
[Notification policies][notification-policy] defines how to route alert instances to your contact points.
[Notification policies](ref:notification-policy) defines how to route alert instances to your contact points.
{{% admonition type="warning" %}}
@@ -292,7 +345,7 @@ Since the policy tree is a single resource, provisioning the `grafana_notificati
1. Find the default notification policy tree. Alternatively, consider writing the resource in code as demonstrated in the example below.
1. [Export][alerting_export] the notification policy tree in Terraform format. This exports it as [`grafana_notification_policy` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/notification_policy)—edit it if necessary.
1. [Export](ref:alerting_export) the notification policy tree in Terraform format. This exports it as [`grafana_notification_policy` Terraform resource](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/notification_policy)—edit it if necessary.
@@ -384,40 +437,4 @@ For more examples on the concept of this guide:
- Try the demo [provisioning alerting resources in Grafana OSS using Terraform and Docker Compose](https://github.com/grafana/provisioning-alerting-examples/tree/main/terraform).
- Review all the available options and examples of the Terraform Alerting schemas in the [Grafana Terraform Provider documentation](https://registry.terraform.io/providers/grafana/grafana/latest/docs).
- Review the [tutorial to manage a Grafana Cloud stack using Terraform][provision-cloud-with-terraform].
@@ -81,7 +81,7 @@ Grafana legacy alerting (dashboard alerts) has been deprecated since Grafana v9.
#### Migration path
The new Grafana Alerting was introduced in Grafana 8 and is a superset of legacy alerting. Learn how to migrate your alerts in the [Upgrade Alerting documentation]({{< relref "./v10.4/alerting/set-up/migrating-alerts/" >}}).
The new Grafana Alerting was introduced in Grafana 8 and is a superset of legacy alerting. Learn how to migrate your alerts in the [Upgrade Alerting documentation](https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts/).
Following are breaking changes that you should be aware of when upgrading to Grafana v11.0.
For our purposes, a breaking change is any change that requires users or operators to do something. This includes:
- Changes in one part of the system that could cause other components to fail
- Deprecations or removal of a feature
- Changes to an API that could break automation
- Changes that affect some plugins or functions of Grafana
- Migrations that can’t be rolled back
For each change, the provided information:
- Helps you determine if you’re affected
- Describes the change or relevant background information
- Guides you in how to mitigate for the change or migrate
- Provides more learning resources
For release highlights and deprecations, refer to our [v11.0 What’s new](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/whatsnew/whats-new-in-v11-0/). For the specific steps we recommend when you upgrade to v11.0, check out our [Upgrade guide](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/upgrade-guide/upgrade-v11.0/).
<!--
## Feature
You must use relative references when linking to docs within the Grafana repo. Please do not use absolute URLs. For more information about relrefs, refer to [Links and references](/docs/writers-toolkit/writing-guide/references/).-->
<!-- Last copied from Google Doc March 26th 8:45pm -->
## Users and Operators
### AngularJS support is turned off by default
#### Description
In Grafana v11, support for the deprecated AngularJS framework is turned off by default for all self-managed (on-premise) and Cloud instances of Grafana. This prevents any data source or panel visualization which relies on AngularJS from being loaded, and therefore has the potential to significantly disrupt your dashboards. Support will be fully removed in the next major release of Grafana.
#### Migration/mitigation
To avoid disruption, ensure all plugins are up to date and migrate from any remaining AngularJS plugins to a React-based alternative. If a plugin relies on AngularJS, a warning icon and message will be displayed in the [plugins catalog](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/plugin-management/#plugin-catalog) in Grafana and any dashboard panel where it's used. Additionally, a warning banner will appear in any impacted dashboards. A list of all impacted dashboards can also be generated using the [`detect-angular-dashboards`](https://github.com/grafana/detect-angular-dashboards) tool.
Our [documentation](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developers/angular_deprecation/angular-plugins/) lists all known public plugins and provides migration advice when possible.
For self-managed users of Grafana and existing Grafana Cloud instances, you can temporarily re-enable support through the [configuration parameter](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#angular_support_enabled), `angular_support_enabled=false`. However, AngularJS-based plugins will not receive any further updates and we strongly recommend migration as soon as possible. This configuration parameter will also be removed in the next major release after Grafana v11.
New Grafana Cloud users will be unable to request that support be added to their instance.
#### Learn more
Refer to this [blog post](https://grafana.com/blog/2024/03/11/removal-of-angularjs-support-in-grafana-what-you-need-to-know/) for more information.
### Grafana Enterprise: Anonymous devices are billed as users
#### Description
Effective starting in Grafana v11, anonymous users are counted and charged as users in Grafana Enterprise. When you upgrade to v11, anonymous users will be automatically counted as active users against your Grafana Enterprise license.
#### Migration/mitigation
Turn off anonymous access, and consider using public dashboards to allow view-only access to publicly-accessible dashboards.
Legacy alerting has reached its end-of-life. In Grafana v11 you can no longer enable legacy alerting, and Grafana will fail to start if the settings are not updated to run the new Grafana Alerting. This also means that starting in Grafana v11, it is no longer possible to migrate from legacy alerting to our new alerting. Grafana v10.4.x is the last version that offers migration, so make sure to migrate to the new Grafana Alerting system _before_ upgrading to Grafana v11. Learn more about Grafana Alerting and the advantages of the new system in the [legacy alerting deprecation documentation](https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts/legacy-alerting-deprecation/). Learn more about migration in the [upgrade alerting documentation](https://grafana.com/docs/grafana/v10.4/alerting/set-up/migrating-alerts/).
For more details on the code removal, review the following PRs:
### Deprecated endpoints and fields in Reporting removed
#### Description
In Grafana v11, support for deprecated endpoints and fields in **Reporting** related to the old scheduling format, email, and dashboard is fully removed. This prevents any calls to deprecated endpoints and passing in values to deprecated fields. This feature only affects Cloud and Enterprise customers who use the API to generate reports.
#### Migration/mitigation
Ensure deprecated endpoints are updated to new corresponding endpoints and deprecated fields are removed and replaced with new corresponding fields.
#### Learn more
The [Reporting API documentation](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developers/http_api/reporting/) lists all supported endpoints and fields.
### Change custom branding public dashboard footer behavior
#### Description
In Grafana v11, custom branding public dashboard footer behavior is changed to default to the Grafana logo if no footer logo or footer text is set. There is no option to hide the public dashboard footer anymore. This feature only affects Cloud Advanced and Enterprise customers.
#### Migration/mitigation
Ensure you have a public dashboard footer logo or footer text set if you don't want to display the default Grafana footer.
#### Learn more
[Configure custom branding documentation](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/configure-custom-branding/#custom-branding-for-public-dashboards) for public dashboards
### Subfolders cause very rare issues with folders that have forward slashes in their names
#### Description and migration/mitigation
The upgrade to enable subfolders can cause some issues with alerts in certain cases. If you've previously set up a folder that uses a forward slash in its name, you have an alert rule in that folder, and the notification policy is set to match that folder's name, notifications will be sent to the default receiver instead of the configured receiver.
In these cases, we recommend that you take these steps before the upgrade to enable subfolders:
- Create a copy of the affected routes and rewrite the matchers for the new copy. For example, if the original matcher was `grafana_folder=MyFolder/sub-folder`, then the new route matcher will be `grafana_folder=MyFolder\/sub-folder`.
- After enabling subfolders, you can delete the old routes.
Please note that if you use file provisioning, you can upgrade and update the routes at the same time.
[Provisioning: Provision dashboards into subfolders PR](https://github.com/grafana/grafana/pull/79793)
### The Input data source is removed
The direct input data source plugin has been removed in Grafana v11. It has been in alpha for four years and is superseded by [TestData](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/testdata/), which ships with Grafana. This is a small deprecation.
Review [this PR](https://github.com/grafana/grafana/pull/83163) for details.
### Data sources: Query filtering changes
The **Disable query** button in the query editor row has caused a lot of confusion among data source developers and end-users. Until now, it has been up to data source developers to filter out any hidden queries before or after they’re executed. Starting from Grafana v11, the tooltip of this button is changed from **Disable query** to **Hide response/Show response**. Responses that are associated with hidden queries will be removed by Grafana before they’re passed to the panel.
Users of data source plugins that didn't previously remove hidden queries (before or after they were executed) will see a change of behavior as, previously, clicking the **Disable query** button had no impact on the query result. Starting from Grafana v11, responses associated with hidden queries are longer returned to the panel.
We’re also moving the call to the `datasource.filterQuery` method to the query runner. This means that frontend-only data sources (or any data source that doesn't extend `DataSourceWithBackend` class) can implement this method. This streamlines data source plugin behavior, ensuring filtering works in the same way for all kinds of data source plugins.
#### Migration/mitigation
If data is missing in panels, make sure the query editor **Hide response** button is not clicked.
For data sources that extend `DataSourceWithBackend`, the filterQuery method is now called before the data source query method. If the `filterQuery` method assumes that some kind of query migration happens before this method is called, you now need to do the migration inside this method too.
We've added a validation between the response of the ID token HD parameter and the list of allowed domains as an extra layer of security. In the event that the HD parameter doesn't match the list of allowed domains, we're denying access to Grafana.
If you set Google OAuth configuration using `api_url,` you might be using the legacy implementation of OAuth, which doesn't have the HD parameter describing the organization from which the approved token comes. This could break your login flow.
You can turn off this feature through the configuration toggle `validate_hd `. Anyone using the legacy Google OAuth configuration should turn off this validation if the ID Token response doesn't have the HD parameter.
### Changes to how the panel view URL is generated for repeated panels
#### Description
With the introduction of the Scenes library to dashboards, the URL that’s generated when viewing an individual repeated panel has changed. We’ve changed how these panels are referenced and what used to be `&viewPanel=panel-5` is now `&viewPanel=panel-3-clone1`.
This means that the previous URLs won’t work anymore and instead you'll be redirected to the dashboard view and you'll get a _Panel not found_ error. From this point on, the dashboard will continue to work as expected.
#### Migration/mitigation
Reopen the panel in view mode and you'll get the new URL.
## Plugin developers
### React Router is deprecated
#### Description
In Grafana v11 we're marking react-router v5 as deprecated. App plugins should start migrating to use react-router v6.
#### Migration/mitigation
For a complete guide, please follow our [migration docs on the developer portal](https://grafana.com/developers/plugin-tools/migration-guides/update-from-grafana-versions/migrate-9_x-to-10_x#update-to-react-router-v6).
#### Learn more
- Grafana v9.x to v10.x [migration guide](https://grafana.com/developers/plugin-tools/migration-guides/update-from-grafana-versions/migrate-9_x-to-10_x#update-to-react-router-v6)
- Official react-router v5 to v6 [migration guide](https://reactrouter.com/en/main/upgrading/v5)
- Grafana community forum [topic](https://community.grafana.com/t/migrating-app-plugins-to-use-react-router-v6/115410)
### The grafana/e2e testing tool is deprecated
#### Description
The Cypress based grafana/e2e end-to-end testing tool is now deprecated.
#### Migration/mitigation
We recommend all plugin authors to migrate their end-to-end tests to use the new Playwright-based [grafana/plugin-e2e](https://www.npmjs.com/package/@grafana/plugin-e2e?activeTab=readme) package instead. Find details on how to migrate from grafana/e2e to grafana/plugin-e2e in the [migration guide](https://grafana.com/developers/plugin-tools/e2e-test-a-plugin/migrate-from-grafana-e2e).
### Chore: Taint ArrayVector with `never` to further discourage
The Vector interface that was deprecated in Grafana v10 is further deprecated. Using it now generates build-time Typescript errors, but it remains working at runtime. If you're still using ArrayVector in your code, you should remove it immediately and replace it with plain arrays. Plugins that are compiled against older versions and depend on calling get/set will continue to work because the Array prototype still has a modified prototype. This will be removed in the future.
We've removed React 17 as a peer dependency from our packages. Anyone using the new versions of these packages should ensure they've upgraded to React 18 following [the upgrade steps](https://react.dev/blog/2022/03/08/react-18-upgrade-guide).
SystemJS is no longer exported from `@grafana/runtime`. Plugin developers should instead rely on importing modules/packages using standard TS import syntax and npm/yarn for package installation.
Dashboards allow you to query, transform, visualize, and understand your data no matter where it’s stored.
cards:
title_class: pt-0 lh-1
items:
- title: Build dashboards
href: ./build-dashboards/
description: Get step-by-step directions for how to create or import your first dashboard and modify dashboard settings. Learn about reusable library panels, dashboard links, annotatations, and dashboard JSON.
height: 24
- title: Manage dashboards
href: ./manage-dashboards/
description: Learn about dashboard and folder management, as well as generative AI features for dashboards.
height: 24
- title: Variables
href: ./variables/
description: Add variables to metric queries and panel titles to create interactive and dynamic dashboards.
height: 24
- title: Public dashboards
href: ./dashboard-public/
description: Make your Grafana dashboards public and share them with anyone without requiring access to your Grafana organization.
height: 24
- title: Reporting
href: ./create-reports/
description: Automatically generate and share PDF reports from your Grafana dashboards.
height: 24
- title: Sharing
href: ./share-dashboards-panels/
description: Share Grafana dashboards and panels within your organization using links, snapshots, and JSON exports.
A dashboard is a set of one or more [panels][] organized and arranged into one or more rows. Grafana ships with a variety of panels making it easy to construct the right queries, and customize the visualization so that you can create the perfect dashboard for your need. Each panel can interact with data from any configured Grafana [data source][].
---
Dashboard snapshots are static. Queries and expressions cannot be re-executed from snapshots. As a result, if you update any variables in your query or expression, it will not change your dashboard data.
## Overview
Before you begin, ensure that you have configured a data source. See also:
A Grafana dashboard is a set of one or more [panels](ref:panels), organized and arranged into one or more rows, that provide an at-a-glance view of related information. These panels are created using components that query and transform raw data from a data source into charts, graphs, and other visualizations.
- [Use dashboards][]
- [Build dashboards][]
- [Create dashboard folders][]
- [Manage dashboards][]
- [Public dashboards][]
- [Annotations][]
- [Playlist][]
- [Reporting][]
- [Version history][]
- [Import][]
- [Export and share][]
- [JSON model][]
A data source can be an SQL database, Grafana Loki, Grafana Mimir, or a JSON-based API. It can even be a basic CSV file. Data source plugins take a query you want answered, retrieve the data from the data source, and reconcile the differences between the data model of the data source and the data model of Grafana dashboards.
Queries allow you to reduce the entirety of your data to a specific dataset, providing a more manageable visualization. Since data sources have their own distinct query languages, Grafana dashboards provide you with a query editor to accommodate these differences.
A panel is the container that displays the visualization and provides you with various controls to manipulate it. Panel options let you customize many aspects of a visualization and the options differ based on which visualization you select. When the data format in a visualization doesn’t meet your requirements, you can apply a transformation that manipulates the data returned by a query.
With 150+ data source plugins, you can unify all your data sources into a single dashboard to streamline data monitoring and troubleshooting. With Grafana, you can translate, transform, and visualize data in flexible and versatile dashboards.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.