Require alert.notifications:write permissions to test receivers and templates (#865)
(cherry picked from commit 3c21ab70075256d4ba8e4fbfdcb15f5a394161fa)
CI: Run `trigger-test-release` only on PRs against main (#68794)
Run trigger-test-release only on PRs against main
(cherry picked from commit 623c014cda)
# Conflicts:
# .drone.yml
Auth: Remove the session cookie only if it's invalid or revoked (#65984)
Remove the cookie if it's invalid or revoked
(cherry picked from commit 4cac95d1c2)
Docker images: Don't fail if a PR comes from a fork (#68765)
* Update grabpl
* Allow publish images to fail for PRs
(cherry picked from commit 04e2d9055d)
# Conflicts:
# .drone.yml
Clarify Graphite version and type to set if using Grafana Cloud (#68239)
* Clarify Graphite version and type to set if using Grafana Cloud
* Update _index.md
(cherry picked from commit 9f7f82c3cc)
Co-authored-by: Fiona Liao <fiona.y.liao@gmail.com>
CI: Add `.drone.yml` in pathschanged trigger for `lint_backend` pipeline (#68348)
Add .drone.yml in pathschanged for lint_backend
(cherry picked from commit b7b13067a5)
# Conflicts:
# .drone.yml
Remove windows backend tests from release pipelines
These are run in other places so there is no benefit to also include
them here.
(cherry picked from commit 1e8cad625b)
Backport of https://github.com/grafana/grafana/pull/68166
* CI: Add Windows backend tests in more places
* CI: Add promotion pipeline for publishing new windows-test-images
* CI: Ignore windows backend-test failures for now
* CI: Fix linting issue in ci_images.star file
(cherry picked from commit b2fc285a5d)
Backport of https://github.com/grafana/grafana/pull/66438
docs: Updates installation instruction for Debian/Ubuntu (#64232)
* draft changes
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* reworks debian/ubuntu instructions, updates start server topic
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* incorporates feedback; restructures to align with writers toolkit guidelines
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* tweaks structure of server topic; renames directory, corrects relrefs
* corrects spelling
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* removed web parameter
* removes unnecessary word
* incorporates feedback from internal reviewer
* updates alias
* updates alias
* adjust alias
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
(cherry picked from commit 13af5afaf3)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
docs: add semi relative time ranges (#67559)
* add semi-relative time range section
* added second example and reworded
* formatting fixes
* added alerting note and fixed formatting
* wording fix
(cherry picked from commit 0271a1d094)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Update index.md (#67172)
Clarified some of the intro text and added JSON outer element to make the samples clearer
(cherry picked from commit 66ad704292)
Co-authored-by: Nabeel Saad <saadnabs@hotmail.com>
docs: move misplaced Configure legend page (#67597)
* move configure legend page and add alias
* updated page weight and tried fixing alias
* fixed alias
* add preemptive alias for current page location
* apply suggestion from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* apply suggestions from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* apply suggestions from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 688459f25c)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
docs: move misplaced Configure legend page (#67597)
* move configure legend page and add alias
* updated page weight and tried fixing alias
* fixed alias
* add preemptive alias for current page location
* apply suggestion from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* apply suggestions from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* apply suggestions from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 688459f25c)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Grafana Cloud: Put cloud artifacts to `*/release` dir (#66168)
Put cloud artifacts to */release dir
(cherry picked from commit a2634495e5)
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
Influxdb: Handle legacy Influxdb influxql annotations with target in migration (#63225)
* handle legacy influxdb annotations with target in migration
* add types
* don't check tags that are empty strings and give annotation a type
(cherry picked from commit 7a3f7e26ce)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
Docs: Fix broken links to section on Variable syntax page (#67340)
These links have a trailing slash which don't work when linking to a
specific element.
(cherry picked from commit 278a8fccc9)
Co-authored-by: Eric Wang <2069450+ericdwang@users.noreply.github.com>
* Alerting: Update migration to put alerts to the default folder if dashboard folder is missing (#65577)
* extract function
* use context logger
* put alert to general folder if folder is missing
* move folderHelper init
* add test
* Update pkg/services/sqlstore/migrations/ualert/ualert.go
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
---------
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
(cherry picked from commit 7b2f44762e)
* rename ID to Id and dashboards.Dashboard to models.Dashboard
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
* CI: Split subcommand (#66005)
* Update e2e package
- Ensure health request is monitored for addDatasource flow
- Add custom timeout to configurePanel flow
(cherry picked from commit 155fcae4aa)
* Make health check optional
(cherry picked from commit 91f66d61e1)
---------
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Fix reference to Grafana CLI
- Make relref for relative permalink
- Use relative path for unambiguous resolution
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 58edeeaba6)
* Remove reference to non-existent shared page
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 89af5b60f2)
* Fix reference to Grafana Cloud
- Make relref for relative permalink
- Use absolute resolution
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix reference to Alertmanager page
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Docs: Added note to contact Support (#65235)
* Added note to contact Support
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
* makes prettier
* Apply suggestions from code review
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 445734888b)
Co-authored-by: melGL <81323402+melgl@users.noreply.github.com>
Build: Add CloudMode to build versions (#65651)
* Add CloudMode to build versions
* Use linux-amd64 variant without musl for cloud mode
* Add cloud mode to version folder on package upload
* Use musl variant for CloudMode
* Only sign rpm packages if there's any to sign
* Remove trailing whitespace
(cherry picked from commit 8f282b8a6e)
Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
update enhanced-ldap (#65687)
* update enhanced-ldap
documenting a potential issue with ldap active sync, when search filter and username attributes do not match.
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
* formats example
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 99ac39f0d2)
Co-authored-by: annelaurefroment <49911675+annelaurefroment@users.noreply.github.com>
Alerting: Fix integration test for creating silences (#65722)
* fix integration test for creating silences
to create correct silence with endsAt in the future
* Update api_alertmanager_test.go
(cherry picked from commit ed8628e39d)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Remove redundant content or delete this page entirely (#65446)
* Remove redundant content or delete this page entirely
The top of the page has redundant content pitching Grafana Cloud.
"You can also configure the MS SQL Server data source on a Grafana Cloud instance without having to host Grafana yourself." Which is directly under the highlighted area explaining the same thing. The same content is floating in the right side of all the pages as well.
Removed "> **Note:** You must install Grafana 5.1+ in order to use the integrated MS SQL data source."
Wait, why does this page exist if the data source page has the relevant updated content? https://grafana.com/docs/grafana/latest/datasources/mssql/
* makes prettier
---------
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 2b73f8cfd5)
Co-authored-by: mallettjared <110853992+mallettjared@users.noreply.github.com>
CI: Allow overwriting of existing GitHub release assets (#65127)
* CI: Allow overwriting of existing GitHub release assets
This closes#63698
* Use c for *cli.Context in publishgithub.go
(cherry picked from commit 4ab3bd6f7e)
Co-authored-by: Horst Gutmann <horst.gutmann@grafana.com>
* Improve showing nextEvaluationDate for rules
Co-Authored-By: Konrad Lalik <konradlalik@gmail.com>
* Improve imports and comments
---------
Co-authored-by: Konrad Lalik <konradlalik@gmail.com>
(cherry picked from commit b90aed4fd7)
Docs/updates amazon cloudwatch (#64987)
* updated AWS to Amazon in the index file
* edited query editor index file -AWS with Amazon
(cherry picked from commit 0975e53fc0)
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
Table Panel: Fix image of image cell overflowing table cell when a data link is added. (#59392)
* TablePanel: fix image of image cell overflowing table cell when a data link is added
* Fix image cell and gauge panel in respective places instead
(cherry picked from commit 004705a10b)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Alerting: Fix queries not being previewed in detail view (#64198)
(cherry picked from commit 4e81aab60a)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Alerting: QoL improvements to the unified alerting multi-replica devenv (#64907)
(cherry picked from commit 406431df4e)
Co-authored-by: gotjosh <josue.abreu@gmail.com>
Alerting: Update scheduler to get updates only from database (#64635)
* stop using the scheduler's Update and Delete methods all communication must be via the database
* update scheduler's registry to calculate diff before re-setting the cache
* update fetcher to return the diff generated by registry
* update processTick to update rule eval routine if the rule was updated and it is not going to be evaluated at this tick.
* remove references to the scheduler from api package
* remove unused methods in the scheduler
(cherry picked from commit 85a954cd81)
# Conflicts:
# pkg/services/ngalert/api/api_ruler.go
# pkg/services/ngalert/ngalert.go
# pkg/services/ngalert/ngalert_test.go
# pkg/services/ngalert/schedule/schedule.go
# pkg/services/ngalert/schedule/schedule_mock.go
# pkg/services/ngalert/schedule/schedule_unit_test.go
* Display last & next rule eval date plus eval duration
* Show next evaluation date in a humanized format
Full date still visible on hover
* Only show next evaluation column is group has an interval
(cherry picked from commit 6b95b3f8aa)
CI: Add `PrereleaseBucket` field in `versions.go` (#64519)
Add PrereleaseBucket in versions.go
(cherry picked from commit 29b3f3fbf4)
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
* Alerting: Update Prometheus Alertmanager
* Move to TruncateInRunes
* Use updated FromGlobs signature
* Avoid indirection around InhibitRule based on 61810
* Work around new API for nflog
* One more template FromGlobs api change
* One more FromGlobs change in test files. Searched for them all...
* Missing line from cherrypicked change
* Run maintenance on correct state object
---------
Co-authored-by: Alex Weaver <weaver.alex.d@gmail.com>
Docker Build: Use `tonistiigi/binfmt` image for cross compilation (#64108)
* Change docker image used for cross-compilation
* Replace fmt.Println with log.Println
* Add specific tag for docker image
(cherry picked from commit b42fd92fad)
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
TimeSeries: Fix legend and tooltip colors changing after data refreshes (#63823)
(cherry picked from commit b2c0175777)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
NPM: Stop using the folder path before the name path (#63851)
Stop using the folder path before the name path
(cherry picked from commit 177aa254c5)
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
Docs: Update default value for geomaps enable_custom_baselayers option (#61880)
Docs: Update default value for geomaps disable_custom_baselayers option
The `disable_custom_baselayers` configuration option name and default
value were inverted in commit e604e69d93,
but the update to the description in the documentation was missed.
(cherry picked from commit 22f51602ba)
Co-authored-by: zsrv <95176387+zsrv@users.noreply.github.com>
MSSQL Datasource: Revert functions within macros change (#63592)
* Revert functions within macros change
* Add tests for function and macro for mssql
* Remove macro support tests
---------
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
(cherry picked from commit 356e2e1933)
Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
Alerting: Fix incorrect comment in eval.go (#63510)
This commit fixes an incorrect comment in the Result struct in eval.go
that I had written some time ago. The comment now documents the
actual behaviour and content of this field.
(cherry picked from commit f93a9c794d)
Co-authored-by: George Robinson <george.robinson@grafana.com>
Alerting: Fix a bug taking screenshots with Dashboard UID (#63220)
This commit fixes a bug where Grafana would fail to take a screenshot if
the same Dashboard UID was present across two or more different orgs.
(cherry picked from commit 1f984409a2)
Annotations: Fix EpochEnd being zero for Alert-generated annotations (#60931)
* Revert linter suggestion
* Re-add nolint
* Work in terms of pointer rather than copy
* Add tests covering validation
* Add comment
(cherry picked from commit 1381fb6dfc)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
* Alerting: Fix template validation in provisioning api (#62530)
* Alerting: Fix template validation in provisioning api
Fix issue where provisioning API accepts a malformed template having extra
text outside of definition block and template name matching definition name.
(cherry picked from commit f9ec16e74f)
---------
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Update publishing workflows to use organization secret (#63001)
The new tokens are managed centrally and have a longer expiry.
Administrators of the grafanabot account will be
notified of the pending expiry and the secret can be rotated centrally
without the need for a repository administrator to update their
secrets.
The existing repository secrets can safely be removed. The tokens for
those secrets will be removed by the end of this week.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit ba9bdf3455)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Add canonical URL to all HTTP API docs (#62957)
Facilitates mounting these docs in the Grafana Cloud documentation set
without affecting SEO.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 4037e5e325)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
docs: fix broken annotations link (#62834)
* docs: fix broken annotations link
Link to annotations section is broken because the section was never added. A placeholder for it was removed on this commit, but the link wasn't. This seems like the best place to point to.
* fix relref formatting
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* removed TODOs from tables
* prettier linting
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 09943407e4)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Fix: Save and test error message does not persist across datasource instance settings anymore
(cherry picked from commit ce50168b70)
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
* Server: Switch from separate server & cli to a unified grafana binary (#58286)
* avoid the need for a second bulky binary for grafana-cli
* look for grafana-server in $PATH as well as same directory
* implement unified "grafana" command
* update dockerfiles, fix grafana-cli -v
* update packaging to work with single binary
- add wrapper scripts for grafana and grafana-server
- update and sync package files
- implement --sign flag of build package command
- stop packaging scripts folder, they are not useful for end users
- add support for --configOverrides in server command
- remove unused nfpm.yaml config file
* windows support
(cherry picked from commit de99ce139c)
* Build: don't remove grafana-server and grafana-cli binaries from deb and rpm packages (#59890)
* don't remove grafana-server and grafana-cli binaries from /usr/share/grafana/bin in deb and rpm packages
* don't add config overrides in /usr/sbin/grafana-server
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
Expressions: Fixes the issue showing expressions editor (#62510)
* Use suggested value for uid
* update the snapshot
* use __expr__
* replace all -100 with __expr__
* update snapshot
* more changes
* revert redundant change
* Use expr.DatasourceUID where it's possible
* generate files
(cherry picked from commit 91221bc436)
Time Series Panel: Fix legend text selection in Firefox (#60809)
Add user-select property to legend items.
(cherry picked from commit 38d7168921)
Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
Auth: Fix catch both both ErrInvalidAPIKey for context with APIKey (#62193)
* fix: capture both ErrInvalidAPIKey
* rename of variable
(cherry picked from commit c5cb5be3cc)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
docs: clarify note re export dashboard as PDF (#62398)
clarify note re export dashboard as PDF
Update note under Export dashboard as PDF to indicate that it's only available on Enterprise and Cloud, as well as which version of Enterprise it's available on.
(cherry picked from commit 290f23a50b)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Move Grafana tutorials from grafana/tutorials repository (#62309)
* Add Grafana tutorials originally from tutorials repository
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Replace tutorials/step shortcode with ordinary headings
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix typos reported by codespell
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix doc-validator linting and run prettier
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Specify version in tutorials lookup as non-rendered pages do not have a relative permalink used to infer the version
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Use latest version
Ensures CI passes and only breaks one website build as the backport to
v9.3.x will solve the missing "latest" pages on publishing.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 4563111180)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
StateTimeline: Show correct legend label when value mappings set (#62282)
* StateTimeline: Show correct legend label when value mappings set
* Add test dashboard for thresholds and value mappings
* run stripnulls.sh
(cherry picked from commit 846acd28ff)
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
Encryption: Cache new DEKs (only) after a caution period (#60664)
* Encryption: Cache new DEKs (only) after commit
* Fix typo
* Update secrets manager tests with new failing case
* Update secrets manager tests with new clarifications (comments)
* Correct broken method calls
* Unify methods
* Cache data keys only after a caution period
* Caution period for data keys caching only for encrypt ops
(cherry picked from commit c4e067d49d)
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
Oauth: Remove extra decoding of redirect url (#60875)
Oauth: remove extra decoding of redirect cookie url
(cherry picked from commit 5b4e1ee6fc)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Explore: Be sure time range key bindings are mounted after clear (#61892)
* Add list of bindings for updating on change
* Revert "Add list of bindings for updating on change"
This reverts commit 092707371d.
* Clear keybindings before component render
(cherry picked from commit 6ab79c4fba)
Co-authored-by: Kristina <kristina.durivage@grafana.com>
Datasources: Fix Proxy by UID Failing for UIDs with a Hyphen (#61723)
Fix Proxy by UID Failing for UIDs with a Hyphen
Hyphens are allowed in short IDs but not picked up by the
proxyPathRegexp. This caused the end of the uid to be proxied as part of
the path to the backing datasource which would usually cause a 404.
(cherry picked from commit f85d072c17)
Co-authored-by: Chris Marchbanks <csmarchbanks@gmail.com>
Docs: Update index.md to not escape dollar sign (#61694)
Update index.md to not escape dollar sign
the backslash is useful in json files, but not where most users will see it
(cherry picked from commit 3146740d82)
Co-authored-by: jeremybanzhaf <88380596+jeremybanzhaf@users.noreply.github.com>
Elasticsearch: Fix failing requests when using SigV4 (#61923)
fix setting of `es` servicename
(cherry picked from commit c5610450b2)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
Query Builder: Fix max width of input component to prevent overflows (#61798)
* fix(auto-size-input): return maxWidth when realWidth exceeds limit
* fix(query-builder): sex madWidth for simple editor component
* fix(auto-size-input): add unit test
(cherry picked from commit 87f8e7e223)
Co-authored-by: Matias Chomicki <matyax@gmail.com>
grafana/e2e: Add ability to customise scenario config (#60646)
* Add ability to retry e2e test scenarios
* Add wait and remove retries
* Revert retry logic and elaborate on 15s wait time
* No need to update datasource name now
(cherry picked from commit c34aa05548)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Docs: rewrite data source intro (#61639)
* Docs: rewrite data source intro
- Include more than just "databases", which was overly narrow
- Try to make doc a "TL;DR" of the essential information
* docs, link data source to build plugin task
* Reduce jargon and sentence length
* Link out to different features
* Data source, docs turn examples into list
And trim language
* Better phrasing to introduce query editor
Old way implied that Grafana provides all query editors,
which isn't true of custom plugins.
* use relref for in-repo anchor
* remove double "in"
Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
* Simplify list
Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
* Restructure intro, clarify plugins and their URLs
* Add and configure
It's sometimes both.
* Apply suggestions from code review
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* makes prettier
Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit fb6df56464)
Co-authored-by: Matt Dodson <47385188+MattDodsonEnglish@users.noreply.github.com>
Docs: Use the correct name for the feedback_links_enabled option (#61825)
Also updates the description to be more in line with the style conventions.
(cherry picked from commit d0cf7ff8e9)
Co-authored-by: zsrv <95176387+zsrv@users.noreply.github.com>
Update _index.md (#61662)
* Update _index.md
The troubleshooting page was missing how to send dashboard panels for debugging so added it here.
* Update docs/sources/troubleshooting/_index.md
* Update docs/sources/troubleshooting/_index.md
* removed empty lines
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 6c6c0f5402)
Co-authored-by: Usman Ahmad <69509548+usmangt@users.noreply.github.com>
Plugins: enable the plugin sdk to get the json data for all datasources (#61729)
(cherry picked from commit 3b718a3e8f)
Co-authored-by: Stephanie Hingtgen <stephanie.hingtgen@grafana.com>
Logs: Lines with long words do not break properly (#61707)
really break anywhere
(cherry picked from commit fd70f6034f)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
Elasticsearch: Fix toggle-settings are not shown correctly (#61751)
* changed `checked` propery to `value`
* revert changing the prop in the event
(cherry picked from commit dd8f95a201)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
Loki: Use queries `maxLines` if configured, even if it is zero (#61652)
* user `query.maxLines` even if it is zero
* remove unnecessary comment
(cherry picked from commit 6c566a391d)
Dashboard: Making a dashboard editable does not allow resizing of panels (#59255)
* DashboardGrid should rerender ReactGridLayout when mutable dashboard updates
* add missing prop to test
(cherry picked from commit db1e19fe86)
Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
Alerting: Fix group select not being filled by selected folder when creating alert from panel (#61577)
Add fetchRulerRulesIfNotFetchedYet fetching when results are an empty object
(cherry picked from commit 04b5e6ed9e)
Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
Add object_matchers example (#61235)
* Add object_matchers example
* Use better terminology
(cherry picked from commit 3db08d4e36)
Co-authored-by: Alex Moreno <alexander.moreno@grafana.com>
Auth: Fix correct error for updateapikey in context handler (#61544)
* fix: correct error for updateapikey
* refactor: send the correct err forward
* update: based on review
(cherry picked from commit 07bbc0716c)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* Alerting: Set error annotation on EvaluationError regardless of underlying error type (#61506)
Set error annotation regardless of underlying error type
(cherry picked from commit b289b8ac6e)
* Also cherrypick the nilcheck that got added prior to 9.4
Live: Fix `Subscription to the channel already exists` live streaming error (#61406)
#60570: Fix `subscription to the channel already exists`
(cherry picked from commit 23dbc916e8)
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
Levitate: Only run against the main branch (#61401)
chore: only run Levitate against the main branch
(cherry picked from commit b8aaf85fdc)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
* Explore: Unsync time ranges when a pane is closed (#61369)
* Explore: Unsync time ranges when a pane is closed
* remove unintentional import
(cherry picked from commit 1e33e56dbd)
* remove unneeded property
Bugfix: Prevent previous query editor to set default values when changing data source (#60218)
* Fixed issue where the query editor of the previous ds sets default values on query passed to the query editor of the next ds.
* Fixed issue with changing data source for query in Alerting.
* Will apply default values from DS if available.
* Fix failing tests.
* fixed spell error.
* reverted getDefaultQuery call so it can be added in a separate PR.
(cherry picked from commit b633d5395d)
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Log volume: Fix functionality if query has multiple comments (#61306)
* Log volume: Fix functionality if query has comments
* Add additional test
(cherry picked from commit 8bda8b8272)
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
TimeSeries: Fix y-axis Yes/No and On/Off boolean units (#61207)
(cherry picked from commit a1609230f8)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Alerting: Fix conversion of alert state from db state during manager warmup (#60933)
(cherry picked from commit 4d989860fb)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Plugins: add option to proxy ds connections through a secure socks proxy (#59254)
* Plugins: add feature to proxy data source connections
(cherry picked from commit 6805c951e9)
Remove packages path from branch filter (#60128)
That directory is no longer used in published docs and causes this
workflow to fail when changes only affect the packages directory.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 1516aa2762)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Prometheus: Code editor - upgrade /series API endpoints to use label/values and /labels for supported prometheus clients (#59576)
* Allow prometheus code editor API to use new prometheus API calls for supported data source clients.
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
(cherry picked from commit 4ed0cc7d18)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
Plugins: Fix plugin query help markdown (#60485)
* refactor(pluginhelp): rewrite as functional component with useAsync
* mimic old behaviour
* feat(pluginhelp): display message if backend returned an empty string
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit 9aed364898)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
fix(cli): correct wire binding for reset-admin-password
The cli methods were updated to use the db.DB interface, but that interface was still wired in as the fake DB - it had only been used for tests previously. This isn't an issue in the main branch now that it's been collapsed into a single binary all using the same wire graph.
Fixes#59915
Alerting: Prevent uid collision in migration when db is case-insensitive (#60494)
* Alerting: Prevent short uid collision in legacy migration when db is case-insensitive
Two factors come into play that cause sporadic uid conflicts during legacy alert migration:
- MySQL and MySQL-compatible backends use case-insensitive collation.
- Our short uid generator is not a uniform RNG and generates uids in such a way that generations in quick succession have a higher probability of creating similar uids.
Normally we would be guaranteed unique short uid generation, however if the source alphabet contains
duplicate characters (for example, if we use case-insensitive comparison) this guarantee is void.
Generating even ~1000 uids in quick succession is nearly guaranteed to create a case-insensitive
duplicate.
(cherry picked from commit 570b62091c)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Prometheus: Fix Instant query time calculation (#60815)
* Use single point in time instead of doing time range calculation
* Comment update
(cherry picked from commit 15d32546ea)
* Alerting: Improve threshold displays (#60046)
(cherry picked from commit e9fe9baf66)
* TimeSeriesPanel: Allow threshold indicators without change handler (#60575)
(cherry picked from commit 16c6f223ba)
* update jest snapshots
it looks like snapshots are encoded differently on this branch
Elasticsearch: Fix adding of adhoc filters when jumping to explore (#60691)
* Elasticsearch: Fix adding of adhoc filters when jumping to explore
* Change NOT operator to - as it is preffered solution
(cherry picked from commit c289cd136c)
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Logs: Fix height of logs component when used with topnav (#60669)
fix height for topNav
(cherry picked from commit 01c4783c0b)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
AzureMonitor: Set Logs portal URL from resource URI (#60583)
Set URL based off of resource URI
(cherry picked from commit f3f043e097)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Wait for locations call to complete
* Update drone to run cloud suite on tests update
(cherry picked from commit 0367036108)
# Conflicts:
# .drone.yml
# scripts/drone/steps/lib.star
AzureMonitor: Correctly set filter values in portal URL (#60627)
* Correctly set filter values in portal URL
* Refactor to include dimensions as a part of AzureMonitor query
* Correctly set splitting value in URL
- Add type for dimension filters object
* Update tests
* Don't test dimensions
(cherry picked from commit 2e4bc200f5)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
ToolbarButtonRow: Overflow button now toggles visibility correctly (#60635)
* only close the overlay if we're interacting with something other than the overflow button/the overlay itself
* use a ref instead of a test id
(cherry picked from commit 44232569a8)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Plugins: Fix parsing of Azure settings for plugins (#60611)
Fix parsing of Azure settings for plugins
(cherry picked from commit 96b7fb15de)
Co-authored-by: Sergey Kostrukov <sekost@microsoft.com>
Removing hardcoded Cloud CTA in favor of a programmatic from website (#60179)
* Removing hardcoded Cloud CTA in favor of a programmatic from website
* makes prettier
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 17696f8dec)
Co-authored-by: Nicholas Auger <nick@qkombur.com>
RBAC: Fix DeleteUserPermissions not being called on Upsert org sync (#60531)
* fix DeleteUserPermissions not being called on RemoveOrgUser
* do not error out of auth flow
* fix test missing service
(cherry picked from commit 77786f236a)
Co-authored-by: Jo <joao.guerreiro@grafana.com>
RelativeTimeRangePicker: Don't respond to submit event when nested in a form element (#60495)
(cherry picked from commit 68b044fb7c)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Command Palette: Correctly clear button styles when changing theme (#60511)
add topnav feature toggle to new theme created when using 'c t'
(cherry picked from commit bc3d1fdd2a)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Prometheus: Fix X-Id-Token and X-ID-Token sent to Prometheus in query requests (#60342)
* Prometheus: Use Set rather than map assignment in sdkHeaderToHttpHeader
Fixes#59940
* Prometheus: Add TestPrometheusCanonicalHeaders
(cherry picked from commit 92c01e416e)
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
Prometheus: Updating editor value on Monaco's onDidChangeContent performance issues (#60191)
debounce slow function that is running on each keystroke
(cherry picked from commit f7bd85d7f4)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
Prometheus: Add POST support to client (#60243)
* Prometheus: Add POST support to client
* Prometheus: Revert client test change from 1c503908
(cherry picked from commit 055c3b7332)
Co-authored-by: Fionera <fionera@fionera.de>
Alerting: Set Dashboard and Panel IDs on rule group replacement (#60374)
* Set Dashboard and Panel IDs on rule group replacement
* fix comments and abbreviate test variable name
* Update pkg/services/ngalert/provisioning/alert_rules.go
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
Co-authored-by: Jean-Philippe Quéméner <JohnnyQQQQ@users.noreply.github.com>
(cherry picked from commit 174c61b949)
Co-authored-by: Alex Moreno <alexander.moreno@grafana.com>
Transformations: Fix bug in convert fields boolean to number (#60277)
* fix bug in convert fields boolean to number
* check for string outside of loop
(cherry picked from commit 286af5a53b)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
Graphite: bug fix, strip white space from queries before comparing them (#60133)
strip white space from queries before comparing them
(cherry picked from commit d5d07894b1)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
Dashboards: Fix 'Make Editable' button not working in Dashboard Settings (#60306)
* Dashboards: Fix 'Make Editable' button not working in Dashboard Settings
* comment
(cherry picked from commit 258696409d)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Dashboards: Wrap MakeEditable in the new Page layout (#60311)
Wrap MakeEditable in the new Page layout
(cherry picked from commit 495fceeeef)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Dashboards: Show error when data source is missing (#60099)
Return caught exceptions to panel as error state
(cherry picked from commit 9a41277ecd)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Traces: Fix for multiple $__tags in trace to metrics (#59641)
* Fix interpolation of multiple in query
* Add another to test case
(cherry picked from commit bf8814749e)
Co-authored-by: Joey Tawadrous <90795735+joey-grafana@users.noreply.github.com>
Influx: Query segment menus now position correctly near the bottom of the screen (#60087)
* only open the menu once options are loaded for better positioning
* use !loadState.loading instead of Boolean(loadState.value)
(cherry picked from commit bb2ecb1468)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Command Palette: Fix not being able to type if triggered whilst another modal is open (#59728)
handle command palette in the same way as other modals
(cherry picked from commit 535c4576f7)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
TimePicker: Fix time picker selection (#60104)
fix time picker selection
(cherry picked from commit 4e7a316903)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Dropdown: Menu now closes correctly when selecting options on touch devices (#60181)
update the version of react-popper-tooltip in @grafana/ui
(cherry picked from commit 75a11e92b2)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Docs: adds workaround for editing provisioned rules using the HTTP API (#59094)
* Docs: adds workaround for editing provisioned rules using api
* updates text
* updates text take two
(cherry picked from commit 6c6103d573)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Navigation: Fix some missing pages in admin section (#60143)
* add stats and licensing under admin -> general when topnav is enabled
* add ldap to users and access
* use ID instead of Id
* add enterprise licensing node
(cherry picked from commit 39a4ba4396)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Prometheus: Fix exception being thrown when toggling visibility in explore (#60159)
fix error being thrown when frameIndex is out of bounds of dataframe
(cherry picked from commit b0f8e803a1)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
TimeZonePicker: Scroll menu correctly when using keyboard controls (#60008)
pass innerRef to TimeZoneOption so the menu scrolls properly
(cherry picked from commit 97fa63d14d)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
* Use relative aliases for all non-current Grafana aliases
Prevents non-latest documentation "stealing" the page away from latest
and through permanent redirects for latest pages that no longer exist.
The redirected pages are indexed by search engines but our robots.txt
forbids them crawling the non-latest page.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Remove all current page aliases
find docs/sources -type f -name '*.md' -exec sed -z -i 's#\n *- /docs/grafana/next/[^\n]*\n#\n#' {} \;
find docs/sources -type f -name '*.md' -exec sed -z -i 's#\n *- /docs/grafana/latest/[^\n]*\n#\n#' {} \;
find docs/sources -type f -name '*.md' -exec sed -Ez -i 's#\n((aliases:\n *-)|aliases:\n)#\n\2#' {} \;
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Chore: All tests under pkg/tests should be integration tests (#59521)
* Chore: All tests under pkg/tests should be integrationtests
* run alerting integration tests only for sqlite
(cherry picked from commit 2db8ed9441)
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Fix branch filter for release workflows (#59963)
Ensures the workflow is run on every push to all version branches.
This was thought to be working because it was tested with a manual
dispatch, however, that trigger does not consider filters and was not
an accurate test.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 6f9ee7acf9)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
TimePicker: Prevent TimePicker overflowing viewport on small screens (#59808)
* render timepicker in a modal style on small screens
* remove top: -1
* apply styles
* prevent bug where selecting a relative range wouldn't apply if the absolute ranges were expanded
* Revert "prevent bug where selecting a relative range wouldn't apply if the absolute ranges were expanded"
This reverts commit 7090443c12.
(cherry picked from commit 1497ad4760)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Navigation: Prevent app crash when importing a dashboard with a uid of `home` (#59874)
* change home id to be more unique, refactor so that home circular reference is never created
* prefix starred dashboards
* update reducer
(cherry picked from commit a589929c92)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Login: Fix failure to login a new user via an external provider if quota are enabled (#60015)
* Login: Fix failure to login a new user via an external provider if quota are enabled
(cherry picked from commit 341d7b01ee)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
TimeRangePicker: Fix recent ranges not showing all items (#59836)
* Fix not all recently used time ranges showing
* Refactor time picker history to store simpler json objects
* Don't store duplicate items
* update todo tests:
* Add tests for TimePickerWithHistory
* better fix for focus scope issues in test
(cherry picked from commit 6280780e0c)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
* Panel Edit: Fix data links edit icons being off screen when provided title is too long (#59829)
* Fix data links edit icons being off screen
* Remove unused imports
* Review
(cherry picked from commit 6f930f4836)
* Fix backport
Update docs regarding Grafana as an alert receiver (#59938)
* Update docs regarding Grafana as an alert receiver
* Add link to AM docs
(cherry picked from commit 64ccbf0a98)
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
Alerting: Use the QuotaTargetSrv instead of the QuotaTarget in quota check (#60026)
Before this change, the alerting provisioning system incorrectly used
the QuotaTarget to check if alerting's request quota had been reached.
The quota service requires the QuotaTargetSrv, which is what's
registered with the service at startup time. This is leading to errors
in the provisioning system.
(cherry picked from commit e6743a7e9a)
Co-authored-by: Joe Blubaugh <joe.blubaugh@grafana.com>
Prometheus: Fix exemplar fill color to match series color in time series. (#59908)
* Implementing new optional color property to ExemplarMarker component
* Refactor some changes from #59743
(cherry picked from commit dfc15163da)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
Prometheus: Fix exemplars not respecting corresponding series display status. (#59743)
* Exemplar filtering when series are toggled in legend UI
(cherry picked from commit 22f828300d)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
Prometheus: Add traceID field on top of the exemplar popover (#59920)
Prioritize trace link
(cherry picked from commit 694dc60724)
Co-authored-by: Ludovic Viaud <ludovic.viaud@gmail.com>
ServiceAccounts: Do not display warnings about secret scanner when scanner is disabled (#59952)
ServiceAccounts: Fix warnings about secret scanner when scanner is disabled
(cherry picked from commit d833031726)
Co-authored-by: Jo <joao.guerreiro@grafana.com>
Accessibility: Improved keyboard accessibility in BarGauge (#59382)
* Accessibility: Improved keyboard accessibility in BarGauge
* use appropriate elements when rendering bargauge
* added space for focus-visible outline border
* Revert "added space for focus-visible outline border"
This reverts commit 9b83fa3a0b.
(cherry picked from commit d9f697b41e)
Co-authored-by: Leo <108552997+lpskdl@users.noreply.github.com>
Navigation: handle case where navIndex is undefined (#59826)
handle case where navIndex is undefined
(cherry picked from commit 5d0029c647)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Loki: Fix wrongly escaped label values when using LabelFilter (#59812)
* change backticks to quotes
* add unescaping to `addFilterAsLabelFilter`
* fix removal of wrong quotes
* change unescape order
(cherry picked from commit 932349b5ab)
TimeseriesPanel: Preserve string fields for data link interpolation (#58424)
* TimeseriesPanel: Preserve string fields for data link interpolation
* clean code
* Modify tests so that string fields are allowed only when a valid time/number dataframe exists
* performance mods
* fix wrong length
* remove console.log
* Check if aligned dataframe has links
(cherry picked from commit 0da77201bf)
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
Datasource: Fix - apply default query also to queries in new panels (#59625)
* apply default query also to new panels
* add comment
* add tests
(cherry picked from commit 32309a8373)
Tempo: Fix traceQL suggestions for tag names with dots (#59736)
(cherry picked from commit c6840cfdec)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
DataSourcePermissions: Handle licensing properly for ds permissions (#59694)
* RBAC: add viewer grand if dspermissions enforcement is not enabled
* RBAC: Change permissions based on role prefix
* RBAC: Add option to for permission service to add a license middleware
* RBAC: Remove actions from query struct
(cherry picked from commit 6d1bcd9f40)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
AzureMonitor: Fix panic from empty response in ARG (#59691)
AzureMonitor: Avoid panic from empty response in ARG
(cherry picked from commit 231b5b587c)
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
TimeSeries: Fix rendering when zooming to time ranges between datapoints (#59444)
(cherry picked from commit e1e858323a)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Packaging: Use rpm-digest sha256 when creating rpm packages (#59510)
* Use rpm-digest sha256 when creating rpm packages
* only append this argument with rpm builds
(cherry picked from commit 76a586195a)
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
RBAC: Handle edge case where there is duplicated acl entries for a role on a single dashboard (#58079)
* RBAC: Handle edge case where there is duplicated acl entries for a role
on a single dashboard
(cherry picked from commit 6aaf36776b)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
Accessibility: Increase badge constrast to be WCAG AA compliant (#59531)
(cherry picked from commit ddc3706f19)
Co-authored-by: Laura Fernández <laura.fernandez@grafana.com>
Fix XSS in runbook URL (#681)
(cherry picked from commit db1548c1491c2f5b522e3c0ceb1832b914a4b2f0)
Co-authored-by: George Robinson <george.robinson@grafana.com>
(cherry picked from commit e9cb2a313e)
Docs: What's New content for v9.3 (#57991)
* initial content for What's New 9.3
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
* makes prettier
* docs: add conflict cli tool
* remoed the conflict users tool in favor of not having it completely out yet
* Adds note about pubdash annotations support in 9.3-beta notes
* puts audit table photo back in right section
* Docs: Add OAuth improvements to what's new in 9.3 (#58756)
* Add OAuth improvements to what's new in v9.3
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Docs: Add conflict cli tool (#58827)
docs: add conflict cli tool
* docs: add Terraform updates for What's New in Grafana 9.3 (#58858)
* Terraform updates for Grafana 9.3
* Remove empty line
* linting
* Docs: Update OAuth improvements section of what's new in 9.3 (#59045)
Update OAuth improvement docs for 9.3
* fix incorrect version number
* Adds Alerting whats new entries
* Add edge squad 9.3 whats new information
* Docs: Update whats-new 9.3 with auth related news (#59093)
* LDAP role mapping improvements
* RBAC list token's permissions
* Azure force_use_graph_api
* Reorder
* LDAP uniformize
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* adds new nav and new language to what's new
* Add report zoom to What's New in 9.3 (#59345)
* Add report zoom to What's New in 9.3
Still needs a link to docs, a double-check on the name of the feature toggle, and a screenshot.
* Update whats-new-in-v9-3.md
* Apply suggestions from code review
* makes prettier
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
* add report zoom image
* fix typo
* fix link to upload images in template description
* Copy edits
* copy and format updates
* Apply suggestions from code review
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/whatsnew/whats-new-in-v9-3.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Fix prettier
* Update whats-new-in-v9-3.md
* update nav wording
* Screenshots for navigation and internazionalization
* adds alerting images
* fixes path to new nav and localization screenshots
Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Owen Smallwood <owen.smallwood@grafana.com>
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Mitchel Seaman <mitchel.seaman@gmail.com>
Co-authored-by: Zsofia <97596715+zsofiakomaromigrafana@users.noreply.github.com>
(cherry picked from commit 823a40bc85)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Alerting: Fix swallowing of errors when attaching images to notifications (#59432)
* Break out image logic and add logging
* Attach alert log context to image attachment
* Fix capitalization
(cherry picked from commit 1481ace528)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
Docs: Minor improvements to Preferences documentation (#59498)
Small improvements to Preferences documentation
(cherry picked from commit b2fdf46820)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Tempo: TraceQL table and editor (#59313)
* Tempo: Add the ability to show/hide the Span column in the table when using TraceQL
* Add optional chaining
* Update tests
* Show subcols in a subtable
* Add more space for the subtable
* Remove unused import
* Better expander icon. Improved the subtable styling. Integrated with real data
* Fix expanding the wrong index when table already has an expanded row
* ⚠️ Hack ⚠️ - Fix table links
* Link to spans
* Tempo: [TraceQL] Don't wrap the autocomplete vals for the status tag in quotes
* TraceQL result table improvements and fixes
* Include span name in the subtable
* Loop through data only if it is not nullish
* Integrate traceql with sub-tables
* Added booleans as keywords. Make query editor multiline
* Make date format consistent between trace and span
* Reset expanded indexes when data or subdata change
* Dynamic attributes by trace
* Fix test. Cleanup and refactor
* Tiny refactor
Co-authored-by: Hamas Shafiq <hamas.shafiq@grafana.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
(cherry picked from commit 8dbde1b921)
Co-authored-by: Andre Pereira <adrapereira@gmail.com>
Docs: Improve Labels and annotations docs (#59325)
This commit makes a number of changes to the docs for Labels and
annotations.
1. It changes the order in which Labels and annotations are mentioned
from Annotations and labels to Labels and annotations as this is
the order shown in the UI when creating and editing alert rules.
It is also the order in the Prometheus documentation.
2. It changes most of the documentation explaining what labels and
annotations are and the differences between them. It also adds
some paragraphs on Custom Labels.
(cherry picked from commit e7316ff13f)
Co-authored-by: George Robinson <george.robinson@grafana.com>
OptionsUI: SliderValueEditor does not get auto focused on slider change (#59209)
(cherry picked from commit 45d3125919)
Co-authored-by: Laura Fernández <laura.fernandez@grafana.com>
Breadcrumbs: Remove semi-bold and change current/last breadcrumb text color (#58875)
(cherry picked from commit c14cbfc65d)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Navigation: Support rbac for new dashboard, import dashboard and new folder (#59303)
RBAC: Support rbac for new dashboard, import dashboard and new folder
page
(cherry picked from commit a53f57cc43)
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
PostgreSQL: Fix missing CA field from configuration (#59280)
* PostgreSQL: Fix missing CA field from configuration
(cherry picked from commit be73418d00)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
User: Optimize signed in user cache management (#59090)
* only access the cache if a user ID is set
* ignore all negative values
(cherry picked from commit d7a652ff7f)
Co-authored-by: Jo <joao.guerreiro@grafana.com>
Explore: Sub-tables support for Table component (#58682)
* First commit with working version of sub-tables using subData array
* Update TableContainer and query result to support a dataframe array for the table result
* Fix border issue by moving the subtable to above the cells in the DOM
* Allow header to be configurable using custom options.
* Update TablePanel to support sub-tables
* Fix main row links
* Added tests
* Fix TablePanel correctly splitting frames and sub-frames by using refId
(cherry picked from commit 183b279274)
Co-authored-by: Andre Pereira <adrapereira@gmail.com>
Internationalization: Enable internationalization by default (#59204)
* Enable internationalization feature flag by default
* Change i18n feature to beta
* Set i18n feature flag to stable
* update features
(cherry picked from commit ba0ac08465)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Azure Monitor Logs: Avoid warning when the response is empty (#59211)
(cherry picked from commit 9d88e14f01)
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
Navigation: always show `GetStartedWithPlugin` even if there's install control wa… (#59127)
always show `GetStartedWithPlugin` even if there's install control warnings
(cherry picked from commit c2f31c2685)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Solo Panel: Configurable timezone (#59153)
* Allow to set timezone in query
* Use optional timestamp
* Update timeZone
(cherry picked from commit a0334a92f5)
Co-authored-by: Selene <selenepinillos@gmail.com>
Navigation: share logic between `buildBreadcrumbs` and `usePageTitle` (#58819)
* simplify usePageTitle logic a bit
* use buildBreadcrumbs logic in usePageTitle
* always add home item to navTree, fix some tests
* fix remaining unit tests
(cherry picked from commit 824a562b03)
Navigation: use correct id to find cloud access policies page (#59123)
use correct id to find cloud access policies page
(cherry picked from commit 8761a71da2)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Heatmap: Fix tooltip y range of top and bottom buckets in calculated heatmaps (#59172)
Co-authored-by: xdavidwu <xdavidwuph@gmail.com>
(cherry picked from commit 2a8706b025)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Geomap: Improve location editor (#58017)
* add custom component for location editor
* FC cleanup
* Apply filter to add location fields call
* Create custom editor for location mode
* Apply validation logic and render warning
* Improve alert styling
* Add help url button to location alert
* Add success alert for auto
* Remove completed TODOs
* Only use alert on error, not success
* Change location mode to dropdown
* Change alert severity to less severe, info
* Prevent auto field selection during manual
* Update location testing to be for auto mode
* Run geo transformer editor init once
* Fix breaking test
* Clean up some anys
* Update styling for alert
* Remove auto success styling
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit ee8f292c6a)
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
Internationalization: Translate ViewJSONmodal and ClipboardButton (#58807)
(cherry picked from commit 8f567d57fa)
Co-authored-by: Laura Fernández <laura.fernandez@grafana.com>
Internationalization: Translate 'Hide / show legend' of PanelHeaderMenuItem (#58800)
(cherry picked from commit f2cb248d93)
Co-authored-by: Laura Fernández <laura.fernandez@grafana.com>
AzureMonitor: Separate subscription health check API version (#58253)
Separate subscription health check API version
(cherry picked from commit f8656d269d)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Fix: Add checkForPathSeparator validation in group name for grafana-managed alerts in form
* Build: Disable flaky RuleEditor frontend test
* trigger CI
Chore: Document theme toggle keybinding (#59031)
* make theme toggle keybinding dev only
* fix bug + add support for theme change keybinding
(cherry picked from commit 6f26668a9f)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
DataSourceWithBackend - Set postResource method to POST (#59114)
Set postResource method to POST
(cherry picked from commit 4eed56193f)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
@grafana/runtime: Avoid calling applyTemplateVariables for the wrong datasource (#57921)
(cherry picked from commit 448358ac66)
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
Alerting: Support Prometheus durations in Provisioning API (#58293)
Provisioning API should support Prometheus durations
(cherry picked from commit 57d6adbc7c)
Co-authored-by: Bart Peeters <birtpeeters@hotmail.com>
Prometheus: fix Heatmap y buckets when legendFormat: auto (#59053)
(cherry picked from commit 1f4834a144)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Navigation: Prevent viewer role accessing dashboard creation, import and folder creation (#58842)
hide pages related dashboard import create and folder creation for viewer role
(cherry picked from commit 14fbd44ac0)
Co-authored-by: Leo <108552997+lpskdl@users.noreply.github.com>
Nav: Split Admin into three sections for new IA (#58229)
* start to split admin into two sections
* most of new admin nav implemented
* landing pages
* hide admin for non-admins
* update admin redirects if not topnav
* clean up
* updated IA for admin (still WIP)
* move plugin pages into correct admin sections
* fix backend unit test
* move correlations into the correct section
* add translations for admin sections
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
(cherry picked from commit 5978dc138e)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Navigation: Stop clearing search state when opening a result in a new tab (#58880)
search: only clear search state if not opening in a new tab
(cherry picked from commit 5226a61f67)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Navigation: move connections + integrations to be a top level item (#58902)
* move connections + integrations to be a top level item
* add a test to check we can move apps to the root
* split out movePlugin logic into a separate function
* fix linting
* rename movePlugin -> addPluginToSection
(cherry picked from commit d46e3916a1)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
OAuth: Refactor OAuth parameters handling to support obtaining refresh tokens for Google OAuth (#58782)
* Add ApprovalForce to AuthCodeOptions
* Extract access token validity check to a function
* Refactor
* Oauth: set options internally instead of exposing new function
* Align tests
* Remove unused function
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
(cherry picked from commit 9c98314e9f)
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Navigation: rename Grafana Machine Learning to just Machine Learning (#58893)
rename Grafana Machine Learning to just Machine Learning
(cherry picked from commit ac66e14054)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Chore: Extract server lock error so it can be used with errors.As (#58899)
chore: extract server lock Error so it can be used with error.As
(cherry picked from commit 7e9d94cfda)
Co-authored-by: Jo <joao.guerreiro@grafana.com>
Navigation: Change quick add styling (#58854)
Change quick add styling + allow for returning isOpen state to dropdown children
(cherry picked from commit b398e8640d)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
QueryData: fix header parsing to support expressions (#58826)
fixes#58821
(cherry picked from commit 934fb2f0ee)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
AppRootPage: Render app plugins without pages (#58776)
fix: render app plugins that don't have a page in includes
(cherry picked from commit 4ee83a5f2b)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Fix: Bump-version action regex pattern to work with beta1 (#58805)
Fixing bump version regex
(cherry picked from commit 174a039ee1)
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
- **Alerting:** Update scheduler to receive rule updates only from database. [#64662](https://github.com/grafana/grafana/pull/64662), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Chore:** Update Grafana to use Alertmanager v0.25.1-0.20230308154952-78fedf89728b. [#64784](https://github.com/grafana/grafana/pull/64784), [@yuri-tceretian](https://github.com/yuri-tceretian)
<!-- 9.3.11 END -->
<!-- 9.3.8 START -->
# 9.3.8 (2023-02-28)
<!-- 9.3.8 END -->
<!-- 9.3.7 START -->
# 9.3.7 (2023-02-28)
### Bug fixes
- **Alerting:** Validate that tags are 100 characters or less. [#62335](https://github.com/grafana/grafana/pull/62335), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Expressions:** Fixes the issue showing expressions editor. [#62510](https://github.com/grafana/grafana/pull/62510), [@itsmylife](https://github.com/itsmylife)
- **Logs:** Fix stats not being updated when log results change. [#62317](https://github.com/grafana/grafana/pull/62317), [@svennergr](https://github.com/svennergr)
- **Plugins:** Fix circular reference in customOptions leading to MarshalJSON errors. [#62328](https://github.com/grafana/grafana/pull/62328), [@yoziru](https://github.com/yoziru)
- **Time Series Panel:** Fix legend text selection in Firefox. [#60809](https://github.com/grafana/grafana/pull/60809), [@codeincarnate](https://github.com/codeincarnate)
<!-- 9.3.7 END -->
<!-- 9.3.6 START -->
# 9.3.6 (2023-01-26)
### Bug fixes
- **QueryEditorRow:** Fixes issue loading query editor when data source variable selected. [#61927](https://github.com/grafana/grafana/pull/61927), [@torkelo](https://github.com/torkelo)
- **TextPanel:** Refactor to functional component (#60885). [#61937](https://github.com/grafana/grafana/pull/61937), [@ryantxu](https://github.com/ryantxu)
### Bug fixes
- **Alerting:** Fix webhook to use correct key for decrypting token. [#61717](https://github.com/grafana/grafana/pull/61717), [@yuri-tceretian](https://github.com/yuri-tceretian)
- **Alerting:** Set error annotation on EvaluationError regardless of underlying error type. [#61506](https://github.com/grafana/grafana/pull/61506), [@alexweav](https://github.com/alexweav)
- **Datasources:** Fix Proxy by UID Failing for UIDs with a Hyphen. [#61723](https://github.com/grafana/grafana/pull/61723), [@csmarchbanks](https://github.com/csmarchbanks)
- **Elasticsearch:** Fix creating of span link with no tags. [#61753](https://github.com/grafana/grafana/pull/61753), [@ivanahuckova](https://github.com/ivanahuckova)
- **Elasticsearch:** Fix failing requests when using SigV4. [#61923](https://github.com/grafana/grafana/pull/61923), [@svennergr](https://github.com/svennergr)
- **Elasticsearch:** Fix toggle-settings are not shown correctly. [#61751](https://github.com/grafana/grafana/pull/61751), [@svennergr](https://github.com/svennergr)
- **Explore:** Be sure time range key bindings are mounted after clear. [#61892](https://github.com/grafana/grafana/pull/61892), [@gelicia](https://github.com/gelicia)
- **Explore:** Unsync time ranges when a pane is closed. [#61369](https://github.com/grafana/grafana/pull/61369), [@Elfo404](https://github.com/Elfo404)
- **Logs:** Lines with long words do not break properly. [#61707](https://github.com/grafana/grafana/pull/61707), [@svennergr](https://github.com/svennergr)
- **Query Builder:** Fix max width of input component to prevent overflows. [#61798](https://github.com/grafana/grafana/pull/61798), [@matyax](https://github.com/matyax)
- **Search:** Auto focus input elements. [#61443](https://github.com/grafana/grafana/pull/61443), [@ryantxu](https://github.com/ryantxu)
- **Search:** Fix empty folder message showing when by starred dashboards. [#61610](https://github.com/grafana/grafana/pull/61610), [@eledobleefe](https://github.com/eledobleefe)
- **Table Panel:** Fix image of image cell overflowing table cell and cells ignoring text alignment setting when a data link is added. [#59392](https://github.com/grafana/grafana/pull/59392), [@oscarkilhed](https://github.com/oscarkilhed)
<!-- 9.3.4 END -->
<!-- 9.3.2 START -->
# 9.3.2 (unreleased)
### Features and enhancements
- **Graphite:** Process multiple queries to Graphite plugin. [#59608](https://github.com/grafana/grafana/pull/59608), [@mmandrus](https://github.com/mmandrus)
### Bug fixes
- **API:** Fix delete user failure due to quota not enabled. [#59875](https://github.com/grafana/grafana/pull/59875), [@papagian](https://github.com/papagian)
- **Accessibility:** Improved keyboard accessibility in BarGauge. [#59382](https://github.com/grafana/grafana/pull/59382), [@lpskdl](https://github.com/lpskdl)
- **Accessibility:** Improved keyboard accessibility in BigValue. [#59830](https://github.com/grafana/grafana/pull/59830), [@lpskdl](https://github.com/lpskdl)
- **Alerting:** Use the QuotaTargetSrv instead of the QuotaTarget in quota check. [#60026](https://github.com/grafana/grafana/pull/60026), [@joeblubaugh](https://github.com/joeblubaugh)
- **AzureMonitor:** Fix bad request when setting dimensions. [#59700](https://github.com/grafana/grafana/pull/59700), [@andresmgot](https://github.com/andresmgot)
- **BarChart:** Fix value mappings. [#60066](https://github.com/grafana/grafana/pull/60066), [@leeoniya](https://github.com/leeoniya)
- **Build:** Streamline and sync dockerfiles. [#58101](https://github.com/grafana/grafana/pull/58101), [@DanCech](https://github.com/DanCech)
- **Build:** Unified dockerfile for all builds. [#59173](https://github.com/grafana/grafana/pull/59173), [@DanCech](https://github.com/DanCech)
- **CloudWatch:** Fix - make sure dimensions are propagated to alert query editor. [#58281](https://github.com/grafana/grafana/pull/58281), [@conorevans](https://github.com/conorevans)
- **Cloudwatch:** Fix deeplink with default region (#60260). [#60274](https://github.com/grafana/grafana/pull/60274), [@iwysiu](https://github.com/iwysiu)
- **Command Palette:** Fix not being able to type if triggered whilst another modal is open. [#59728](https://github.com/grafana/grafana/pull/59728), [@ashharrison90](https://github.com/ashharrison90)
- **Command Palette:** Maintain page state when changing theme. [#59787](https://github.com/grafana/grafana/pull/59787), [@ashharrison90](https://github.com/ashharrison90)
- **Dashboards:** Fix 'Make Editable' button not working in Dashboard Settings. [#60306](https://github.com/grafana/grafana/pull/60306), [@joshhunt](https://github.com/joshhunt)
- **Dashboards:** Show error when data source is missing. [#60099](https://github.com/grafana/grafana/pull/60099), [@joshhunt](https://github.com/joshhunt)
- **Datasource:** Fix - apply default query also to queries in new panels. [#59625](https://github.com/grafana/grafana/pull/59625), [@sunker](https://github.com/sunker)
- **Dropdown:** Menu now closes correctly when selecting options on touch devices. [#60181](https://github.com/grafana/grafana/pull/60181), [@ashharrison90](https://github.com/ashharrison90)
- **Influx:** Query segment menus now position correctly near the bottom of the screen. [#60087](https://github.com/grafana/grafana/pull/60087), [@ashharrison90](https://github.com/ashharrison90)
- **Login:** Fix failure to login a new user via an external provider if quota are enabled. [#60015](https://github.com/grafana/grafana/pull/60015), [@papagian](https://github.com/papagian)
- **Loki:** Fix wrongly escaped label values when using LabelFilter. [#59812](https://github.com/grafana/grafana/pull/59812), [@svennergr](https://github.com/svennergr)
- **Navigation:** Prevent app crash when importing a dashboard with a uid of `home`. [#59874](https://github.com/grafana/grafana/pull/59874), [@ashharrison90](https://github.com/ashharrison90)
- **Panel Edit:** Fix data links edit icons being off screen when provided title is too long. [#59829](https://github.com/grafana/grafana/pull/59829), [@dprokop](https://github.com/dprokop)
- **Prometheus:** Fix exemplar fill color to match series color in time series. [#59908](https://github.com/grafana/grafana/pull/59908), [@gtk-grafana](https://github.com/gtk-grafana)
- **Prometheus:** Fix exemplars not respecting corresponding series display status. [#59743](https://github.com/grafana/grafana/pull/59743), [@gtk-grafana](https://github.com/gtk-grafana)
- **StateTimeline:** Fix negative infinity legend/tooltip from thresholds. [#60279](https://github.com/grafana/grafana/pull/60279), [@leeoniya](https://github.com/leeoniya)
- **Table:** Fixes row border style not showing and colored rows blending together. [#59660](https://github.com/grafana/grafana/pull/59660), [@torkelo](https://github.com/torkelo)
- **TimePicker:** Prevent TimePicker overflowing viewport on small screens. [#59808](https://github.com/grafana/grafana/pull/59808), [@ashharrison90](https://github.com/ashharrison90)
- **TimeRangePicker:** Fix recently ranges only not showing all recent ranges. [#59836](https://github.com/grafana/grafana/pull/59836), [@joshhunt](https://github.com/joshhunt)
- **TimeZonePicker:** Scroll menu correctly when using keyboard controls. [#60008](https://github.com/grafana/grafana/pull/60008), [@ashharrison90](https://github.com/ashharrison90)
- **Accessibility:** Increase badge constrast to be WCAG AA compliant. [#59531](https://github.com/grafana/grafana/pull/59531), [@eledobleefe](https://github.com/eledobleefe)
<!-- 9.3.1 END -->
<!-- 9.3.0 START -->
# 9.3.0 (2022-11-30)
### Features and enhancements
- **Alerting:** Enable interpolation for notification policies in file provisioning. [#58956](https://github.com/grafana/grafana/pull/58956), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
- **Azure Monitor Logs:** Avoid warning when the response is empty. [#59211](https://github.com/grafana/grafana/pull/59211), [@andresmgot](https://github.com/andresmgot)
- **Azure Monitor:** Add support to customized routes. [#54829](https://github.com/grafana/grafana/pull/54829), [@ms-hujia](https://github.com/ms-hujia)
- **Canvas:** Add icon value mapping. [#59013](https://github.com/grafana/grafana/pull/59013), [@nmarrs](https://github.com/nmarrs)
- **GaugePanel:** Setting the neutral-point of a gauge. [#53989](https://github.com/grafana/grafana/pull/53989), [@sfranzis](https://github.com/sfranzis)
- **Loki:** Add `gzip` compression to resource calls. [#59059](https://github.com/grafana/grafana/pull/59059), [@svennergr](https://github.com/svennergr)
- **Loki:** Add improvements to loki label browser. [#59387](https://github.com/grafana/grafana/pull/59387), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Make label browser accessible in query builder. [#58525](https://github.com/grafana/grafana/pull/58525), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Remove raw query toggle. [#59125](https://github.com/grafana/grafana/pull/59125), [@gwdawson](https://github.com/gwdawson)
- **Middleware:** Add CSP Report Only support. [#58074](https://github.com/grafana/grafana/pull/58074), [@jcalisto](https://github.com/jcalisto)
- **Navigation:** Prevent viewer role accessing dashboard creation, import and folder creation. [#58842](https://github.com/grafana/grafana/pull/58842), [@lpskdl](https://github.com/lpskdl)
- **OAuth:** Refactor OAuth parameters handling to support obtaining refresh tokens for Google OAuth. [#58782](https://github.com/grafana/grafana/pull/58782), [@mgyongyosi](https://github.com/mgyongyosi)
- **Oauth:** Display friendly error message when role_attribute_strict=true and no valid role found. [#57818](https://github.com/grafana/grafana/pull/57818), [@kalleep](https://github.com/kalleep)
- **TablePanel:** Add support for Count calculation per column or per entire dataset. [#58134](https://github.com/grafana/grafana/pull/58134), [@mdvictor](https://github.com/mdvictor)
- **Tempo:** Send the correct start time when making a TraceQL query. [#59128](https://github.com/grafana/grafana/pull/59128), [@CrypticSignal](https://github.com/CrypticSignal)
- **Various Panels:** Remove beta label from Bar Chart, Candlestick, Histogram, State Timeline, & Status History Panels. [#58557](https://github.com/grafana/grafana/pull/58557), [@codeincarnate](https://github.com/codeincarnate)
- **Heatmap:** Fix blurry text & rendering. [#59260](https://github.com/grafana/grafana/pull/59260), [@leeoniya](https://github.com/leeoniya)
- **Heatmap:** Fix tooltip y range of top and bottom buckets in calculated heatmaps. [#59172](https://github.com/grafana/grafana/pull/59172), [@leeoniya](https://github.com/leeoniya)
- **Logs:** Fix misalignment of LogRows. [#59279](https://github.com/grafana/grafana/pull/59279), [@svennergr](https://github.com/svennergr)
- **Navigation:** Stop clearing search state when opening a result in a new tab. [#58880](https://github.com/grafana/grafana/pull/58880), [@ashharrison90](https://github.com/ashharrison90)
- **OptionsUI:** SliderValueEditor does not get auto focused on slider change. [#59209](https://github.com/grafana/grafana/pull/59209), [@eledobleefe](https://github.com/eledobleefe)
- **PanelEdit:** Fixes bug with not remembering panel options pane collapse/expand state. [#59265](https://github.com/grafana/grafana/pull/59265), [@torkelo](https://github.com/torkelo)
- **Query Caching:** Skip 207 status codes. (Enterprise)
- **Quota:** Fix failure in store due to missing scope parameters. [#58874](https://github.com/grafana/grafana/pull/58874), [@papagian](https://github.com/papagian)
- **Quota:** Fix failure when checking session limits. [#58865](https://github.com/grafana/grafana/pull/58865), [@papagian](https://github.com/papagian)
- **Reports:** Fix time preview. (Enterprise)
- **StateTimeline:** Prevent label text from overflowing state rects. [#59169](https://github.com/grafana/grafana/pull/59169), [@leeoniya](https://github.com/leeoniya)
- **Tempo:** Fix search table duration unit. [#58642](https://github.com/grafana/grafana/pull/58642), [@joey-grafana](https://github.com/joey-grafana)
- **TraceView:** Fix broken rendering when scrolling in Dashboard panel in Firefox. [#56642](https://github.com/grafana/grafana/pull/56642), [@zdg-github](https://github.com/zdg-github)
### Plugin development fixes & changes
- **GrafanaUI:** Add disabled option for menu items. [#58980](https://github.com/grafana/grafana/pull/58980), [@going-confetti](https://github.com/going-confetti)
- **Alerting:** Cache result of dashboard ID lookups. [#56587](https://github.com/grafana/grafana/pull/56587), [@alexweav](https://github.com/alexweav)
- **Alerting:** Fall back to "range" query type for unified alerting when "both" is specified. [#57288](https://github.com/grafana/grafana/pull/57288), [@gillesdemey](https://github.com/gillesdemey)
- **Alerting:** Implement the Webex notifier. [#58480](https://github.com/grafana/grafana/pull/58480), [@gotjosh](https://github.com/gotjosh)
- **Alerting:** Improve group modal with validation on evaluation interval. [#57830](https://github.com/grafana/grafana/pull/57830), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
- **Alerting:** Persist annotations from multidimensional rules in batches. [#56575](https://github.com/grafana/grafana/pull/56575), [@alexweav](https://github.com/alexweav)
- **Alerting:** Query time logging. [#57585](https://github.com/grafana/grafana/pull/57585), [@konrad147](https://github.com/konrad147)
- **Alerting:** Remove the alert manager selection from the data source configuration. [#57369](https://github.com/grafana/grafana/pull/57369), [@VikaCep](https://github.com/VikaCep)
- **Alerting:** Remove the alert manager selection from the data source configuration. [#56460](https://github.com/grafana/grafana/pull/56460), [@gitstart](https://github.com/gitstart)
- **Alerting:** Support values in notification templates. [#56457](https://github.com/grafana/grafana/pull/56457), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **Alerting:** Templated URLs for webhook type contact points. [#57296](https://github.com/grafana/grafana/pull/57296), [@santihernandezc](https://github.com/santihernandezc)
- **Annotations:** Disable "Add annotation" button when annotations are disabled. [#57481](https://github.com/grafana/grafana/pull/57481), [@ryantxu](https://github.com/ryantxu)
- **Auth:** Add validation and ingestion of conflict file. [#53014](https://github.com/grafana/grafana/pull/53014), [@eleijonmarck](https://github.com/eleijonmarck)
- **Auth:** Make built-in login configurable. [#46978](https://github.com/grafana/grafana/pull/46978), [@TsotosA](https://github.com/TsotosA)
- **Auth:** Refresh OAuth access_token automatically using the refresh_token. [#56076](https://github.com/grafana/grafana/pull/56076), [@mgyongyosi](https://github.com/mgyongyosi)
- **Auth:** Validate Azure ID token version on login is not v1. [#58088](https://github.com/grafana/grafana/pull/58088), [@Jguer](https://github.com/Jguer)
- **BackendSrv:** Make it possible to pass `options` to `.get|post|patch...` methods. [#51316](https://github.com/grafana/grafana/pull/51316), [@leventebalogh](https://github.com/leventebalogh)
- **Canvas:** Add tabs to inline editor. [#57778](https://github.com/grafana/grafana/pull/57778), [@adela-almasan](https://github.com/adela-almasan)
- **Chore:** Switch Grafana to using faro libraries. [#58186](https://github.com/grafana/grafana/pull/58186), [@tolzhabayev](https://github.com/tolzhabayev)
- **Chore:** Use strings.ReplaceAll and preallocate containers. [#58483](https://github.com/grafana/grafana/pull/58483), [@sashamelentyev](https://github.com/sashamelentyev)
- **CloudWatch:** Cache resource request responses in the browser. [#57082](https://github.com/grafana/grafana/pull/57082), [@sunker](https://github.com/sunker)
- **Config:** Change jwt config value to be "expect_claims". [#58284](https://github.com/grafana/grafana/pull/58284), [@conorevans](https://github.com/conorevans)
- **Configuration:** Update ssl_mode documentation in sample.ini to match default.ini. [#55138](https://github.com/grafana/grafana/pull/55138), [@alecxvs](https://github.com/alecxvs)
- **Correlations:** Add query editor and target field to settings page. [#55567](https://github.com/grafana/grafana/pull/55567), [@Elfo404](https://github.com/Elfo404)
- **Dashboard:** Record the number of cached queries for usage insights. [#56050](https://github.com/grafana/grafana/pull/56050), [@juanicabanas](https://github.com/juanicabanas)
- **Dashboard:** Record the number of cached queries for usage insights. (Enterprise)
- **Datasources:** Support mixed datasources in a single query. [#56832](https://github.com/grafana/grafana/pull/56832), [@mmandrus](https://github.com/mmandrus)
- **Docs:** Add documentation for Custom Branding on Public Dashboards. [#58090](https://github.com/grafana/grafana/pull/58090), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **Docs:** Add missing documentation for enterprise features. [#56753](https://github.com/grafana/grafana/pull/56753), [@mmandrus](https://github.com/mmandrus)
- **Docs:** Clarify that audit logs are generated only for API requests. [#57521](https://github.com/grafana/grafana/pull/57521), [@spinillos](https://github.com/spinillos)
- **Echo:** Add config option to prevent duplicate page views for GA4. [#57619](https://github.com/grafana/grafana/pull/57619), [@tolzhabayev](https://github.com/tolzhabayev)
- **Elasticsearch:** Add trace to logs functionality. [#58063](https://github.com/grafana/grafana/pull/58063), [@ivanahuckova](https://github.com/ivanahuckova)
- **Elasticsearch:** Reuse http client in the backend. [#55172](https://github.com/grafana/grafana/pull/55172), [@gabor](https://github.com/gabor)
- **Explore:** Support fields interpolation in logs panel. [#58426](https://github.com/grafana/grafana/pull/58426), [@ifrost](https://github.com/ifrost)
- **Frontend Routing:** Always render standalone plugin pages using the `<AppRootPage>`. [#57771](https://github.com/grafana/grafana/pull/57771), [@leventebalogh](https://github.com/leventebalogh)
- **GRPC Server:** Add gRPC server service. [#47849](https://github.com/grafana/grafana/pull/47849), [@FZambia](https://github.com/FZambia)
- **LDAPSync:** Improve performance of sync and make it case insensitive. (Enterprise)
- **LibraryPanels:** Load library panels in the frontend rather than the backend. [#50560](https://github.com/grafana/grafana/pull/50560), [@ryantxu](https://github.com/ryantxu)
- **LogContext:** Add header and close button to modal. [#56283](https://github.com/grafana/grafana/pull/56283), [@svennergr](https://github.com/svennergr)
- **LogContext:** Improve text describing the loglines. [#55475](https://github.com/grafana/grafana/pull/55475), [@svennergr](https://github.com/svennergr)
- **Logs:** Allow collapsing the logs volume histogram. [#52808](https://github.com/grafana/grafana/pull/52808), [@gabor](https://github.com/gabor)
- **Logs:** Center `show context` modal on click. [#55989](https://github.com/grafana/grafana/pull/55989), [@svennergr](https://github.com/svennergr)
- **Logs:** Center `show context` modal on click. [#55405](https://github.com/grafana/grafana/pull/55405), [@svennergr](https://github.com/svennergr)
- **Logs:** Show LogRowMenu also for long logs and wrap-lines turned off. [#56030](https://github.com/grafana/grafana/pull/56030), [@svennergr](https://github.com/svennergr)
- **LogsContext:** Added button to load 10 more log lines. [#55923](https://github.com/grafana/grafana/pull/55923), [@svennergr](https://github.com/svennergr)
- **Loki:** Add case insensitive line contains operation. [#58177](https://github.com/grafana/grafana/pull/58177), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Monaco Query Editor enabled by default. [#58080](https://github.com/grafana/grafana/pull/58080), [@matyax](https://github.com/matyax)
- **Loki:** Redesign and improve query patterns. [#55097](https://github.com/grafana/grafana/pull/55097), [@ivanahuckova](https://github.com/ivanahuckova)
- **Loki:** Rename log browser to label browser. [#58416](https://github.com/grafana/grafana/pull/58416), [@gwdawson](https://github.com/gwdawson)
- **Loki:** Show invalid fields in label filter. [#55751](https://github.com/grafana/grafana/pull/55751), [@ivanahuckova](https://github.com/ivanahuckova)
- **Navigation:** Expose new props to extend `Page`/`PluginPage`. [#58465](https://github.com/grafana/grafana/pull/58465), [@ashharrison90](https://github.com/ashharrison90)
- **Navtree:** Make it possible to configure standalone plugin pages. [#56393](https://github.com/grafana/grafana/pull/56393), [@leventebalogh](https://github.com/leventebalogh)
- **Node Graph:** Always show context menu. [#56876](https://github.com/grafana/grafana/pull/56876), [@joey-grafana](https://github.com/joey-grafana)
- **Number formatting:** Strip trailing zeros after decimal point when decimals=auto. [#57373](https://github.com/grafana/grafana/pull/57373), [@leeoniya](https://github.com/leeoniya)
- **OAuth:** Feature toggle for access token expiration check and docs. [#58179](https://github.com/grafana/grafana/pull/58179), [@mgyongyosi](https://github.com/mgyongyosi)
- **Opentsdb:** Allow template variables for filter keys. [#57226](https://github.com/grafana/grafana/pull/57226), [@bohandley](https://github.com/bohandley)
- **PanelEdit:** Allow test id to be passed to panel editors. [#55417](https://github.com/grafana/grafana/pull/55417), [@mckn](https://github.com/mckn)
- **Plugins:** Add hook to make it easier to track interactions in plugins. [#56126](https://github.com/grafana/grafana/pull/56126), [@mckn](https://github.com/mckn)
- **Plugins:** Introduce new Flame graph panel. [#56376](https://github.com/grafana/grafana/pull/56376), [@joey-grafana](https://github.com/joey-grafana)
- **Plugins:** Make "README" the default markdown request param. [#58264](https://github.com/grafana/grafana/pull/58264), [@wbrowne](https://github.com/wbrowne)
- **PostgreSQL:** Migrate to React. [#52831](https://github.com/grafana/grafana/pull/52831), [@zoltanbedi](https://github.com/zoltanbedi)
- **PublicDashboards:** Add custom branding for Public Dashboard. (Enterprise)
- **PublicDashboards:** Add delete public dashboard button in public dashboard modal. [#58095](https://github.com/grafana/grafana/pull/58095), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Cached queries column added in public dashboard insight query. (Enterprise)
- **PublicDashboards:** Can toggle annotations in modal. [#57312](https://github.com/grafana/grafana/pull/57312), [@owensmallwood](https://github.com/owensmallwood)
- **PublicDashboards:** Delete public dashboard in public dashboard table. [#57766](https://github.com/grafana/grafana/pull/57766), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Delete public dashboard when dashboard is deleted. [#57291](https://github.com/grafana/grafana/pull/57291), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Extract config of Public Dashboard. [#57788](https://github.com/grafana/grafana/pull/57788), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **PublicDashboards:** Hide top navigation bar. [#56873](https://github.com/grafana/grafana/pull/56873), [@evictorero](https://github.com/evictorero)
- **PublicDashboards:** Make mixed datasource calls concurrently. [#56421](https://github.com/grafana/grafana/pull/56421), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Orphaned public dashboard item list modified. [#58014](https://github.com/grafana/grafana/pull/58014), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Validate access token not to be duplicated and add retries. [#56755](https://github.com/grafana/grafana/pull/56755), [@juanicabanas](https://github.com/juanicabanas)
- **RBAC:** Improve performance of dashboard filter query. [#56813](https://github.com/grafana/grafana/pull/56813), [@kalleep](https://github.com/kalleep)
- **Rendering:** Add configuration options for `renderKey` lifetime. [#57339](https://github.com/grafana/grafana/pull/57339), [@Willena](https://github.com/Willena)
- **Reports:** Dynamic scale factor per report. (Enterprise)
- **SAML:** Set cookie option SameSite=none and Secure=true. (Enterprise)
- **SQLStore:** Optionally retry queries if sqlite returns database is locked. [#56096](https://github.com/grafana/grafana/pull/56096), [@papagian](https://github.com/papagian)
- **Server:** Make unix socket permission configurable. [#52944](https://github.com/grafana/grafana/pull/52944), [@unknowndevQwQ](https://github.com/unknowndevQwQ)
- **Tempo:** Add start time and end time parameters while querying traces. [#48068](https://github.com/grafana/grafana/pull/48068), [@bikashmishra100](https://github.com/bikashmishra100)
- **TimeSeries:** Render null-bounded points at data edges. [#57798](https://github.com/grafana/grafana/pull/57798), [@leeoniya](https://github.com/leeoniya)
- **Tracing:** Allow trace to logs for OpenSearch. [#58161](https://github.com/grafana/grafana/pull/58161), [@gabor](https://github.com/gabor)
- **UsageStats:** Add traces when sending usage stats. [#55474](https://github.com/grafana/grafana/pull/55474), [@sakjur](https://github.com/sakjur)
### Bug fixes
- **Alerting:** Fix mathexp.NoData in ConditionsCmd. [#56812](https://github.com/grafana/grafana/pull/56812), [@grobinson-grafana](https://github.com/grobinson-grafana)
- **BarChart:** Fix coloring from thresholds and value mappings. [#58285](https://github.com/grafana/grafana/pull/58285), [@leeoniya](https://github.com/leeoniya)
- **Flame Graph:** Fix for dashboard scrolling. [#56555](https://github.com/grafana/grafana/pull/56555), [@joey-grafana](https://github.com/joey-grafana)
- **LogContext:** Fix scroll behavior in context modal. [#56070](https://github.com/grafana/grafana/pull/56070), [@svennergr](https://github.com/svennergr)
- **Loki:** Fix showing of history of querying in query editor. [#57344](https://github.com/grafana/grafana/pull/57344), [@ivanahuckova](https://github.com/ivanahuckova)
- **OAuth:** Fix misleading warn log related to oauth and increase logged content. [#57336](https://github.com/grafana/grafana/pull/57336), [@Jguer](https://github.com/Jguer)
- **PublicDashboards:** Fix GET public dashboard that doesn't match. [#57571](https://github.com/grafana/grafana/pull/57571), [@juanicabanas](https://github.com/juanicabanas)
- **PublicDashboards:** Fix annotations error for public dashboards. [#57455](https://github.com/grafana/grafana/pull/57455), [@leandro-deveikis](https://github.com/leandro-deveikis)
- **PublicDashboards:** Fix granularity discrepancy between public and original dashboard. [#57129](https://github.com/grafana/grafana/pull/57129), [@guicaulada](https://github.com/guicaulada)
- **PublicDashboards:** Fix granularity issue caused by query caching. (Enterprise)
- **RBAC:** Add primary key to seed_assignment table. [#56540](https://github.com/grafana/grafana/pull/56540), [@kalleep](https://github.com/kalleep)
- **Tempo:** Fix search removing service name from query. [#58630](https://github.com/grafana/grafana/pull/58630), [@joey-grafana](https://github.com/joey-grafana)
Removes the unused close-milestone command from `@grafana/toolkit`. Issue [#57062](https://github.com/grafana/grafana/issues/57062)
@grafana/toolkit`cherrypick` command was removed. Issue [#56114](https://github.com/grafana/grafana/issues/56114)
`EmotionPerfTest` is no longer exported from the `@grafana/ui` bundle. Issue [#56100](https://github.com/grafana/grafana/issues/56100)
Removing the unused `changelog` command in `@grafana/toolkit`. Issue [#56073](https://github.com/grafana/grafana/issues/56073)
### Deprecations
The interface type `LogsParser` in `grafana-data` is deprecated. Issue [#56242](https://github.com/grafana/grafana/issues/56242)
The following functions and classes related to logs are deprecated in the `grafana-ui` package: `getLogLevel`, `getLogLevelFromKey`, `addLogLevelToSeries`, `LogsParsers`, `calculateFieldStats`, `calculateLogsLabelStats`, `calculateStats`, `getParser`, `sortInAscendingOrder`, `sortInDescendingOrder`, `sortLogsResult`, `sortLogRows`, `checkLogsError`, `escapeUnescapedString`. Issue [#56077](https://github.com/grafana/grafana/issues/56077)
- **Toolkit:** Deprecate `plugin:bundle-managed` command and move its functionality to a bash script. [#57719](https://github.com/grafana/grafana/pull/57719), [@academo](https://github.com/academo)
- **Toolkit:** Deprecate and replace toolkit:build with plain yarn scripts. [#57620](https://github.com/grafana/grafana/pull/57620), [@academo](https://github.com/academo)
@@ -135,6 +135,14 @@ Some examples when backport is not required:
- The change is supposed to be released in the next major/minor release, e.g. v8.0.0, but the release branch, e.g. v8.0.x, has not yet been created.
#### Required labels
To ensure that we don't backport pull requests that don't need to be backported, i.e. implement new features, and only backport pull requests that address bugs, have a product approval, or refer to docs changes, backport labels need to be followed by either:
-`type/bug` label: Pull requests which address bugs,
-`product-approved` label: Urgent fixes which need product approval, in order to get merged,
-`type/docs` label: Docs changes`.
> **Note:** You can still backport a pull request after it's been merged.
This section includes information for Grafana administrators, team administrators, and users performing administrative tasks:
{{< section >}}
For information about authorization and authentication for your Grafana Cloud Stack and Grafana Cloud Portal, refer to [Grafana Cloud Access Policies](/docs/grafana-cloud/authentication-and-permissions/access-policies/).
description: This section contains information about API keys in Grafana
keywords:
- API keys
@@ -48,7 +47,7 @@ This topic shows you how to create an API key using the Grafana UI. You can also
## Migrate API Keys to Grafana service accounts
You can migrate one or all API keys to [Grafana service accounts]({{< relref "../service-accounts/" >}}). When you migrate an API key to a service account, a service account will be created with a service account token.
The API key will continue to work, and you can find it in the [Grafana service account tokens]({{< relref "../service-accounts/#service-account-benefits/#service-account-tokens" >}}) details.
The API key will continue to work, and you can find it in the [Grafana service account tokens]({{< relref "../service-accounts/#service-account-tokens" >}}) details.
For more information about benefits of service accounts, refer to [Grafana service account benefits]({{< relref "../service-accounts/#service-account-benefits" >}}).
You can choose to migrate a single API key or all API keys. Note that when you migrate all API keys, you can't create new API keys anymore and will have to use service accounts instead.
By default, data sources in an organization can be queried by any user in that organization. For example, a user with the `Viewer` role can issue any possible query to a data source, not just
queries that exist on dashboards they have access to.
@@ -82,8 +74,6 @@ When permissions are enabled for a data source in an organization, the user who
After you have enabled permissions for a data source you can assign query permissions to users and teams which will allow access to query the data source.
**Assign query permission to users and teams:**
@@ -98,8 +88,6 @@ After you have enabled permissions for a data source you can assign query permis
If you have enabled permissions for a data source and want to return data source permissions to the default, then you can disable permissions with a click of a button.
Note that _all_ existing permissions created for the data source will be deleted.
@@ -138,7 +126,7 @@ You can make a panel retrieve fresh data more frequently by increasing the **Max
### Data sources that work with query caching
Query caching works for all [Enterprise data sources](https://grafana.com/grafana/plugins/?type=datasource&enterprise=1) as well as the following [built-in data sources]({{< relref "../../datasources/" >}}):
Query caching works for all [Enterprise data sources](/grafana/plugins/?type=datasource&enterprise=1) as well as the following [built-in data sources]({{< relref "../../datasources/" >}}):
- CloudWatch Metrics
- Google Cloud Monitoring
@@ -206,7 +194,7 @@ To view available data source plugins, go to the [plugin catalog](/grafana/plugi
For details about the plugin catalog, refer to [Plugin management]({{< relref "../../administration/plugin-management/" >}}).
You can further filter the plugin catalog's results for data sources provided by the Grafana community, Grafana Labs, and partners.
If you use [Grafana Enterprise]{{< relref "../../enterprise/" >}}, you can also filter by Enterprise-supported plugins.
If you use [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}), you can also filter by Enterprise-supported plugins.
For more documentation on a specific data source plugin's features, including its query language and editor, refer to its plugin catalog page.
description: Activate and manage a Grafana Enterprise license
keywords:
- grafana
- licensing
- enterprise
title: Enterprise licensing
title: Grafana Enterprise license
weight: 500
---
@@ -22,7 +21,7 @@ weight: 500
When you become a Grafana Enterprise customer, you gain access to Grafana's premium observability features, including enterprise data source plugins, reporting, and role-based access control. In order to use these [enhanced features of Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise" >}}), you must purchase and activate a Grafana Enterprise license.
To purchase a license directly from Grafana Labs, [Contact a Grafana Labs representative](https://grafana.com/contact?about=grafana-enterprise). To activate an Enterprise license purchased from Grafana Labs, refer to [Activate an Enterprise license]({{< ref "#activate-an-enterprise-license" >}}).
To purchase a license directly from Grafana Labs, [Contact a Grafana Labs representative](/contact?about=grafana-enterprise). To activate an Enterprise license purchased from Grafana Labs, refer to [Activate an Enterprise license]({{< relref "#activate-an-enterprise-license" >}}).
You can also purchase a Grafana Enterprise license through the AWS Marketplace. To learn more about activating a license purchased through AWS, refer to [Activate a Grafana Enterprise license purchased through AWS Marketplace]({{< relref "./activate-aws-marketplace-license/" >}}).
@@ -36,7 +35,7 @@ Follow these steps to activate your Grafana Enterprise license:
To download your Grafana Enterprise license:
1. Sign in to your [Grafana Cloud](https://grafana.com) account.
1. Sign in to your [Grafana Cloud](/) account.
1. Go to **My Account** and select an organization from the drop-down menu at the top left of the page. On the Overview page for each organization, you can see a section for Grafana Enterprise licenses. Click **Details** next to a license.
1. At the bottom of the license details page, select **Download token** to download the `license.jwt` file that contains your license.
@@ -81,9 +80,9 @@ environment variable.
### Step 3. Ensure that the license file's root URL matches the root_url configuration option
Update the [`root_url`]({{< relref "../../setup-grafana/configure-grafana/#root-url" >}}) in your configuration. It should be the URL that users type in their browsers to access the frontend, not the node hostname(s).
Update the [`root_url`]({{< relref "../../setup-grafana/configure-grafana/#root_url" >}}) in your configuration. It should be the URL that users type in their browsers to access the frontend, not the node hostname(s).
This is important, because as part of the validation checks at startup, Grafana compares the license URL to the [`root_url`]({{< relref "../../setup-grafana/configure-grafana/#root-url" >}}) in your configuration.
This is important, because as part of the validation checks at startup, Grafana compares the license URL to the [`root_url`]({{< relref "../../setup-grafana/configure-grafana/#root_url" >}}) in your configuration.
To finalize the installation of Grafana Enterprise, restart Grafana to enable all Grafana Enterprise features. Refer to [restart Grafana]({{< relref "../../setup-grafana/restart-grafana/" >}}) for more information.
To finalize the installation of Grafana Enterprise, restart Grafana to enable all Grafana Enterprise features. Refer to [restart Grafana]({{< relref "../../setup-grafana/start-restart-grafana/" >}}) for more information.
## License expiration
@@ -119,10 +118,10 @@ If your license has expired, most of Grafana keeps working as normal. Some enter
The configuration file's location may also be overridden by the `GF_ENTERPRISE_LICENSE_PATH` environment variable.
2. Log in to your [Grafana Cloud Account](https://grafana.com/login) and make sure you're in the correct organization in the dropdown at the top of the page.
2. Log in to your [Grafana Cloud Account](/login) and make sure you're in the correct organization in the dropdown at the top of the page.
3. Under the **Grafana Enterprise** section in the menu bar to the left, choose licenses and download the currently valid license with which you want to run Grafana. If you cannot see a valid license on Grafana.com, please contact your account manager at Grafana Labs to renew your subscription.
4. Replace the current `license.jwt`-file with the one you've just downloaded.
@@ -222,7 +221,7 @@ Your license is controlled by the following rules:
**License expiration date:** The license includes an expiration date, which is the date when a license becomes inactive.
As the license expiration date approaches, you will see a banner in Grafana that encourages you to renew. To learn about how to renew your license and what happens in Grafana when a license expires, refer to [License expiration]({{< ref "#license-expiration" >}}).
As the license expiration date approaches, you will see a banner in Grafana that encourages you to renew. To learn about how to renew your license and what happens in Grafana when a license expires, refer to [License expiration]({{< relref "#license-expiration" >}}).
**Grafana License URL:** Your license does not work with an instance of Grafana with a different root URL.
@@ -242,6 +241,6 @@ Usage billing involves a contractual agreement between you and Grafana Labs, and
### Request a change to your license
To increase the number of licensed users within Grafana, extend a license, or change your licensed URL, contact [Grafana support](https://grafana.com/profile/org#support) or your Grafana Labs account team. They will update your license, which you can activate from within Grafana.
To increase the number of licensed users within Grafana, extend a license, or change your licensed URL, contact [Grafana support](/profile/org#support) or your Grafana Labs account team. They will update your license, which you can activate from within Grafana.
For instructions about how to activate your license after it is updated, refer to [Activate an Enterprise license]({{< ref "#activate-an-enterprise-license" >}}).
For instructions about how to activate your license after it is updated, refer to [Activate an Enterprise license]({{< relref "#activate-an-enterprise-license" >}}).
description: Activate your Grafana Enterpriselicense purchased in AWS Marketplace
to take advantage of Grafana Enterprise observability features
keywords:
- grafana
- aws
- marketplace
- enterprise
- license
title: Enterprise licenses through AWS Marketplace
title: Activate a Grafana Enterprise license purchased through AWS Marketplace
weight: 400
---
@@ -28,7 +28,7 @@ You can deploy Grafana Enterprise in the following ways:
In each case, you must activate the Grafana Enterprise license purchased in AWS Marketplace to take advantage of Grafana Enterprise observability features. Grafana Enterprise licenses purchased through AWS Marketplace are subject to the same [restrictions]({{< relref "../#license-restrictions" >}}) as Grafana Enterprise licensed purchased directly from Grafana Labs.
> To purchase a license directly from Grafana Labs or learn more about other Grafana offerings, [Contact a Grafana Labs representative](https://grafana.com/contact?about=grafana-enterprise).
> To purchase a license directly from Grafana Labs or learn more about other Grafana offerings, [Contact a Grafana Labs representative](/contact?about=grafana-enterprise).
description: Activate a Grafana Enterprise license from AWS Marketplace on EKS
keywords:
- grafana
@@ -122,6 +121,6 @@ To restart Grafana on a Kubernetes cluster,
1. After you update the service, navigate to your Grafana instance, sign in with Grafana Admin credentials, and navigate to the Statistics and Licensing page to validate that your license is active.
For more information about restarting Grafana, refer to [Restart Grafana]({{< relref "../../../../setup-grafana/restart-grafana/" >}}).
For more information about restarting Grafana, refer to [Restart Grafana]({{< relref "../../../../setup-grafana/start-restart-grafana/" >}}).
> If you experience issues when you update the EKS cluster, refer to [Amazon EKS troubleshooting](https://docs.aws.amazon.com/eks/latest/userguide/troubleshooting.html).
description: Manage your Grafana Enterprise license in AWS Marketplace
keywords:
- grafana
@@ -39,4 +38,4 @@ You can use AWS Marketplace to make the following modifications to your Grafana
This action retrieves updated license information from AWS.
> To learn more about licensing and active users, refer to [Understanding Grafana Enterprise licensing]({{< relref "../#license-restrictions" >}}).
> To learn more about licensing and active users, refer to [Activate a Grafana Enterprise license purchased through AWS Marketplace]({{< relref "../" >}}).
@@ -101,7 +100,7 @@ Here is an example of the light theme.
### Change server UI theme
Grafana server administrators can change the Grafana UI theme for all users on the server by setting the [default_theme]({{< relref "../../setup-grafana/configure-grafana/#default-theme" >}}) option in the Grafana configuration file.
As a Grafana server administrator, you can change the default Grafana UI theme for all users who are on the server by setting the [default_theme]({{< relref "../../setup-grafana/configure-grafana/#default_theme" >}}) option in the Grafana configuration file.
To see what the current settings are, refer to [View server settings]({{< relref "../stats-and-license#view-server-settings" >}}).
@@ -111,17 +110,18 @@ Organization administrators can change the UI theme for all users in an organiza
1. Hover your cursor over the **Configuration** (gear) icon.
1. Click **Preferences**.
1. In the Preferences section, select the **UI theme**.
1. In the **Preferences** section, select the **UI theme**.
1. Click **Save**.
### Change team UI theme
Organization and team administrators can change the UI theme for all users in a team.
Organization and team administrators can change the UI theme for all users on a team.
1. Hover your cursor over the **Configuration** (gear) icon in the side menu.
1. Click **Teams**. Grafana displays the team list.
1. Click on the team that you want to change the UI theme for and then navigate to the **Settings** tab.
1.In the Preferences section, select the **UI theme**.
1. Click the team for which you want to change the UI theme.
1.Click **Settings**.
1. In the **Preferences** section, select the **UI theme**.
1. Click **Save**.
### Change your personal UI theme
@@ -129,7 +129,7 @@ Organization and team administrators can change the UI theme for all users in a
You can change the UI theme for your user account. This setting overrides UI theme settings at higher levels.
1. On the left menu, hover your cursor over your avatar and then click **Preferences**.
1. In the Preferences section, select the **UI theme**.
1. In the **Preferences** section, select the **UI theme**.
1. Click **Save**.
## Change the Grafana default timezone
@@ -140,7 +140,7 @@ Some tasks require certain permissions. For more information about roles, refer
### Set server timezone
Grafana server administrators can choose a default timezone for all users on the server by setting the [default_timezone]({{< relref "../../setup-grafana/configure-grafana/#default-timezone" >}}) option in the Grafana configuration file.
Grafana server administrators can choose a default timezone for all users on the server by setting the [default_timezone]({{< relref "../../setup-grafana/configure-grafana/#default_timezone" >}}) option in the Grafana configuration file.
### Set organization timezone
@@ -148,17 +148,18 @@ Organization administrators can choose a default timezone for their organization
1. Hover your cursor over the **Configuration** (gear) icon.
1. Click **Preferences**.
1. Click to select an option in the **Timezone** list. **Default** is either the browser local timezone or the timezone selected at a higher level. Refer to [Time range controls]({{< relref "../../dashboards/manage-dashboards/#configure-dashboard-time-range-controls" >}}) for more information about Grafana time settings.
1. Click to select an option in the **Timezone** list. **Default** is either the browser local timezone or the timezone selected at a higher level.
1. Click **Save**.
### Set team timezone
Organization administrators and team administrators can choose a default timezone for all users in a team.
Organization administrators and team administrators can choose a default timezone for all users on a team.
1. Hover your cursor over the **Configuration** (gear) icon in the side menu.
1. Click **Teams**. Grafana displays the team list.
1. Click on the team you that you want to change the timezone for and then navigate to the **Settings** tab.
1. Click to select an option in the **Timezone** list. **Default** is either the browser local timezone or the timezone selected at a higher level. Refer to [[Time range controls]({{< relref "../../dashboards/manage-dashboards/#configure-dashboard-time-range-controls" >}}) for more information about Grafana time settings.
1. Click the team for which you want to change the timezone.
1. Click **Settings**
1. Click to select an option in the **Timezone** list. **Default** is either the browser local timezone or the timezone selected at a higher level.
1. Click **Save**.
### Set your personal timezone
@@ -166,7 +167,7 @@ Organization administrators and team administrators can choose a default timezon
You can change the timezone for your user account. This setting overrides timezone settings at higher levels.
1. On the left menu, hover your cursor over your avatar and then click **Preferences**.
1. Click to select an option in the **Timezone** list. **Default** is either the browser local timezone or the timezone selected at a higher level. Refer to [Time range controls]({{< relref "../../dashboards/manage-dashboards/#configure-dashboard-time-range-controls" >}}) for more information about Grafana time settings.
1. Click to select an option in the **Timezone** list. **Default** is either the browser local timezone or the timezone selected at a higher level.
Organization administrators can choose a home dashboard for their organization.
Organization administrators can choose a default home dashboard for their organization.
1. Navigate to the dashboard you want to set as the home dashboard.
1. Click the star next to the dashboard title to mark the dashboard as a favorite if it is not already.
@@ -218,13 +219,14 @@ Organization administrators can choose a home dashboard for their organization.
### Set home dashboard for your team
Organization administrators and Team Admins can choose a home dashboard for a team.
Organization administrators and Team Admins can set a default home dashboard for all users on a team.
1. Navigate to the dashboard you want to set as the home dashboard.
1. Click the star next to the dashboard title to mark the dashboard as a favorite if it is not already.
1. Hover your cursor over the **Configuration** (gear) icon in the side menu.
1. Click **Teams**. Grafana displays the team list.
1. Click on the team that you want to change the home dashboard for and then navigate to the **Settings** tab.
1. Click the team for which you want to change the home dashboard.
1. Click **Settings**.
1. In the **Home Dashboard** field, select the dashboard that you want to use for your home dashboard. Options include all starred dashboards.
1. Click **Save**.
@@ -237,3 +239,37 @@ You can choose your own personal home dashboard. This setting overrides all home
1. On the left menu, hover your cursor over your avatar and then click **Preferences**.
1. In the **Home Dashboard** field, select the dashboard that you want to use for your home dashboard. Options include all starred dashboards.
1. Click **Save**.
## Change Grafana language
### Change server language
Grafana server administrators can change the default Grafana UI language for all users on the server by setting the [default_language]({{< relref "../../setup-grafana/configure-grafana/#default_language" >}}) option in the Grafana configuration file.
### Change organization language
Organization administrators can change the language for all users in an organization.
1. Hover your cursor over the **Configuration** (gear) icon.
1. Click **Preferences**.
1. In the **Preferences** section, select the **Language**.
1. Click **Save**.
### Change team language
Organization and team administrators can set a default language for all users on a team.
1. Hover your cursor over the **Configuration** (gear) icon in the side menu.
1. Click **Teams**. Grafana displays the team list.
1. Click the team for which you want to change the language.
1. Click **Settings**
1. In the **Preferences** section, select the **Language**.
1. Click **Save**.
### Change your personal language
You can change the language for your user account. This setting overrides language settings at higher levels.
1. On the left menu, hover your cursor over your avatar and then click **Preferences**.
1. In the **Preferences** section, select the **language**.
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 [install]({{< ref "#install-a-plugin" >}}) one of the plugins built by the Grafana community, or [build one yourself]({{< relref "../../developers/plugins/" >}}).
You can [install]({{< relref "#install-a-plugin" >}}) one of the plugins built by the Grafana community, or [build one yourself]({{< relref "../../developers/plugins/" >}}).
Grafana supports three types of plugins: [panels](https://grafana.com/grafana/plugins?type=panel), [data sources](https://grafana.com/grafana/plugins?type=datasource), and [apps](https://grafana.com/grafana/plugins?type=app).
Grafana supports three types of plugins: [panels](/grafana/plugins?type=panel), [data sources](/plugins?type=datasource), and [apps](/grafana/plugins?type=app).
## Panel plugins
Add new visualizations to your dashboard with panel plugins, such as the [Worldmap Panel](https://grafana.com/grafana/plugins/grafana-worldmap-panel), [Clock](https://grafana.com/grafana/plugins/grafana-clock-panel), and [Pie Chart](https://grafana.com/grafana/plugins/grafana-piechart-panel).
Add new visualizations to your dashboard with panel plugins, such as the [Worldmap Panel](/grafana/plugins/grafana-worldmap-panel), [Clock](/grafana/plugins/grafana-clock-panel), and [Pie Chart](/grafana/plugins/grafana-piechart-panel).
Use panel plugins when you want to:
@@ -30,7 +29,7 @@ Use panel plugins when you want to:
## Data source plugins
Data source plugins add support for new databases, such as [Google BigQuery](https://grafana.com/grafana/plugins/doitintl-bigquery-datasource).
Data source plugins add support for new databases, such as [Google BigQuery](/grafana/plugins/doitintl-bigquery-datasource).
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.
@@ -38,7 +37,7 @@ Use data source plugins when you want to import data from external systems.
## App plugins
Applications, or _app plugins_, bundle data sources and panels to provide a cohesive experience, such as the [Zabbix](https://grafana.com/grafana/plugins/alexanderzobnin-zabbix-app) app.
Applications, or _app plugins_, bundle data sources and panels to provide a cohesive experience, such as the [Zabbix](/grafana/plugins/alexanderzobnin-zabbix-app) app.
Apps can also add custom pages for things like control panels.
@@ -88,8 +87,6 @@ To browse for available plugins:
1. Click the **All** filter to browse all available plugins.
1. Click the **Data sources**, **Panels**, or **Applications** buttons to filter by plugin type.
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.
1. In a web browser, navigate to the official [Grafana Plugins page](https://grafana.com/plugins) and find a plugin that you want to install.
1. In a web browser, navigate to the official [Grafana Plugins page](/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
@@ -148,7 +139,7 @@ Follow the instructions on the Install tab. You can either install the plugin wi
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]({{< ref "#plugin-catalog" >}}).
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" >}}).
description: Describes provisioning settings for Grafana using configuration files.
keywords:
- grafana
@@ -392,11 +391,11 @@ providers:
## Alerting
For information on provisioning Grafana Alerting, refer to [Provision Grafana Alerting resources](https://grafana.com/docs/grafana/latest/alerting/set-up/provision-alerting-resources/).
For information on provisioning Grafana Alerting, refer to [Provision Grafana Alerting resources]({{< relref "../../alerting/set-up/provision-alerting-resources/" >}}).
## Alert Notification Channels
> **Note:** Alert Notification Channels are part of legacy alerting, which is deprecated and will be removed in Grafana 10. Use the Provision contact points section in [Create and manage alerting resources using file provisioning](https://grafana.com/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/).
> **Note:** Alert Notification Channels are part of legacy alerting, which is deprecated and will be removed in Grafana 10. Use the Provision contact points section in [Create and manage alerting resources using file provisioning]({{< relref "../../alerting/set-up/provision-alerting-resources/file-provisioning" >}}).
Alert Notification Channels can be provisioned by adding one or more YAML config files in the [`provisioning/notifiers`](/administration/configuration/#provisioning) directory.
@@ -643,6 +642,7 @@ The following sections detail the supported settings and secure settings for eac
## Grafana Enterprise
Grafana Enterprise supports provisioning for the following resources:
Grafana Enterprise supports:
- [Role-based access control provisioning]({{< relref "../roles-and-permissions/access-control/rbac-provisioning/" >}})
- [Provisioning role-based access control with Grafana]({{< relref "../roles-and-permissions/access-control/rbac-grafana-provisioning/" >}})
- [Provisioning role-based access control with Terraform]({{< relref "../roles-and-permissions/access-control/rbac-terraform-provisioning/" >}})
@@ -24,11 +23,11 @@ For our plugins that do not return time series, it might be useful to plot histo
> **Note:** An administrator must configure a Prometheus data source and associate it with a [Remote write target](#remote-write-target) before recorded queries can be used.
Recorded queries only work with backend data source plugins. Refer to [Backend data source plugin](https://grafana.com/tutorials/build-a-data-source-backend-plugin/) for more information about backend data source plugins. You can recorded three types of queries:
Recorded queries only work with backend data source plugins. Refer to [Backend data source plugin](/tutorials/build-a-data-source-backend-plugin/) for more information about backend data source plugins. You can recorded three types of queries:
- single row and column - A query that returns a single row and column.
- row count - A query that returns meaningful rows to be counted.
- expression - Any expression. To learn more about creating and using expressions, see [Expressions](https://grafana.com/docs/grafana/latest/panels/expressions/).
- expression - Any expression. To learn more about creating and using expressions, see [Write expression queries]({{< relref "../../panels-visualizations/query-transform-data/expression-queries" >}}).
After a recorded query is created or enabled, it immediately creates a snapshot and continues to create snapshots at the set interval. The recorded query stops taking snapshots when it is disabled, deleted, or when Grafana is not running. Data points are gathered in the backend by running the recorded query and forwarding each result to a remote-write enabled Prometheus instance.
@@ -40,7 +39,7 @@ To use a recorded query, create one and add it to a dashboard. After that, it ca
1. Find/create a query you want to record on a dashboard in an edit panel. The query must only return one row and column. If it returns more, you can still record the number of results returned using the “count” option.
- The query's data source must be a backend data source.
- Expressions can be used to aggregate data from a time series query. Refer to [Expressions](https://grafana.com/docs/grafana/latest/panels/expressions/) to learn more about creating and using expressions.
- Expressions can be used to aggregate data from a time series query. Refer to [Write expression queries]({{< relref "../../panels-visualizations/query-transform-data/expression-queries" >}}) to learn more about creating and using expressions.
1. Click the record query button located in the top right of the query editor.
1. Enter recorded query information. All fields are required unless otherwise indicated.
- Name - Name of the recorded query.
@@ -60,7 +59,7 @@ You can add existing recorded queries to panels in a dashboard. For each recorde
1. If you want to filter recorded queries by data source, select a data source from the filter by data source drop down menu.
1. Click the `Add` button on your recorded query to add it to the panel.
After adding your recorded query to the panel, the panel data source will become `-- Mixed --`. Your recorded query is represented by a `Prometheus` query with a name label matching your recorded query name. Refer to [Prometheus](https://grafana.com/docs/grafana/latest/datasources/prometheus/) to learn more about the `Prometheus` data source.
After adding your recorded query to the panel, the panel data source will become `-- Mixed --`. Your recorded query is represented by a `Prometheus` query with a name label matching your recorded query name. Refer to [Prometheus]({{< relref "../../datasources/prometheus/" >}}) to learn more about the `Prometheus` data source.
If after adding a recorded query, a query with a `-- Mixed --` data source instead of `Prometheus` data source appears, this could mean that a Prometheus remote write target was not set up for recorded queries. Refer to [Remote write target](#remote-write-target) to set up a remote write point.
description: Information about Grafana user, team, and organization roles and permissions
title: Roles and permissions
weight: 300
@@ -27,7 +26,7 @@ You can assign a user one of three types of permissions:
A Grafana server administrator manages server-wide settings and access to resources such as organizations, users, and licenses. Grafana includes a default server administrator that you can use to manage all of Grafana, or you can divide that responsibility among other server administrators that you create.
> **Note:** The server administrator role does not mean that the user is also a Grafana [organization administrator]({{< ref "#organization-roles" >}}).
> **Note:** The server administrator role does not mean that the user is also a Grafana [organization administrator]({{< relref "#organization-roles" >}}).
A server administrator can perform the following tasks:
@@ -124,7 +123,7 @@ For more information about assigning administrator permissions to editors, refer
If you have access to the Grafana server, you can modify the default viewer role so that viewers can:
- Edit and preview dashboards, but cannot save their changes or create new dashboards.
- Access and use [Explore]({{< ref "/explore" >}}).
- Access and use [Explore]({{< relref "../../explore" >}}).
Extending the viewer role is useful for public Grafana installations where you want anonymous users to be able to edit panels and queries, but not be able to save or create new dashboards.
description: 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.
@@ -15,7 +13,7 @@ weight: 120
# Role-based access control (RBAC)
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced]({{< ref "/docs/grafana-cloud" >}}).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
RBAC provides a standardized way of granting, changing, and revoking access when it comes to viewing and modifying Grafana resources, such as dashboards, reports, and administrative settings.
description: Learn how to assign RBAC roles to users and teams in Grafana.
menuTitle: Assign RBAC roles
title: Assign Grafana RBAC roles
@@ -12,7 +11,7 @@ weight: 40
# Assign RBAC roles
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced]({{< ref "/docs/grafana-cloud" >}}).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
In this topic you'll learn how to use the role picker, provisioning, and the HTTP API to assign fixed and custom roles to users and teams.
@@ -53,8 +52,6 @@ In both cases, the assignment applies only to the user, team or service account
4. In the **Role** column, select the fixed role that you want to assign to the user, team or service account.
5. Click **Update**.

**To assign a fixed role as a server administrator:**
1. Sign in to Grafana, hover your cursor over **Server Admin** (the shield icon) in the left navigation menu, and click **Users**.
@@ -62,15 +59,13 @@ In both cases, the assignment applies only to the user, team or service account
1. In the **Organizations** section, select a role within an organization that you want to assign to the user.
1. Click **Update**.

## Assign fixed or custom roles to a team using provisioning
Instead of using the Grafana role picker, you can use file-based provisioning to assign fixed roles to teams. If you have a large number of teams, provisioning can provide an easier approach to assigning and managing role assignments.
**Before you begin:**
- Refer to [Role provisioning]({{< relref "./rbac-provisioning/#rbac-provisioning" >}})
- Refer to [Role provisioning]({{< relref "./rbac-grafana-provisioning/" >}})
- Ensure that the team to which you are adding the fixed role exists. For more information about creating teams, refer to [Manage teams]({{< relref "../../../team-management/" >}})
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced]({{< ref "/docs/grafana-cloud" >}}).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
The table below describes all RBAC configuration options. Like any other Grafana configuration, you can apply these options as [environment variables]({{< relref "../../../../setup-grafana/configure-grafana/#configure-with-environment-variables" >}}).
| `permission_cache` | No | Enable to use in memory cache for loading and evaluating users' permissions. | `true` |
| `permission_validation_enabled` | No | Grafana enforces validation for permissions when a user creates or updates a role. The system checks the internal list of scopes and actions for each permission to determine they are valid. By default, if a scope or action is not recognized, Grafana logs a warning message. When set to `true`, Grafana returns an error. | `false` |
description: Learn about Grafana RBAC permissions, actions, and scopes.
menuTitle: RBAC permissions, actions, and scopes
title: Grafana RBAC permissions, actions, and scopes
@@ -11,7 +10,7 @@ weight: 80
# RBAC permissions, actions, and scopes
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced]({{< ref "/docs/grafana-cloud" >}}).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
A permission is comprised of an action and a scope. When creating a custom role, consider the actions the user can perform and the resource(s) on which they can perform those actions.
@@ -160,7 +159,7 @@ The following list contains role-based access control scopes.
| `orgs:*` <br> `orgs:id:*` | Restrict an action to a set of organizations. For example, `orgs:*` matches any organization and `orgs:id:1` matches the organization whose ID is `1`. |
| `permissions:type:delegate` | The scope is only applicable for roles associated with the Access Control itself and indicates that you can delegate your permissions only, or a subset of it, by creating a new role or making an assignment. |
| `permissions:type:escalate` | The scope is required to trigger the reset of basic roles permissions. It indicates that users might acquire additional permissions they did not previously have. |
| `provisioners:*` | Restrict an action to a set of provisioners. For example, `provisioners:*` matches any provisioner, and `provisioners:accesscontrol` matches the role-based access control [provisioner]({{< relref "./rbac-provisioning/" >}}). |
| `provisioners:*` | Restrict an action to a set of provisioners. For example, `provisioners:*` matches any provisioner, and `provisioners:accesscontrol` matches the role-based access control [provisioner]({{< relref "./rbac-grafana-provisioning/" >}}). |
| `reports:*` <br> `reports:id:*` | Restrict an action to a set of reports. For example, `reports:*` matches any report and `reports:id:1` matches the report whose ID is `1`. |
| `roles:*` <br> `roles:uid:*` | Restrict an action to a set of roles. For example, `roles:*` matches any role and `roles:uid:randomuid` matches only the role whose UID is `randomuid`. |
| `services:accesscontrol` | Restrict an action to target only the role-based access control service. You can use this in conjunction with the `status:accesscontrol` actions. |
description: Learn how to view permissions associated with roles, create custom roles,
and update and delete roles in Grafana.
menuTitle: Manage RBAC roles
@@ -13,7 +12,7 @@ weight: 50
# Manage RBAC roles
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced]({{< ref "/docs/grafana-cloud" >}}).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
This section includes instructions for how to view permissions associated with roles, create custom roles, and update and delete roles.
@@ -91,7 +90,7 @@ Create a custom role when basic roles and fixed roles do not meet your permissio
- [Plan your RBAC rollout strategy]({{< relref "./plan-rbac-rollout-strategy/" >}}).
- Determine which permissions you want to add to the custom role. To see a list of actions and scope, refer to [RBAC permissions, actions, and scopes]({{< relref "./custom-role-actions-scopes/" >}}).
- [Enable role provisioning]({{< relref "./rbac-provisioning/" >}}).
- [Enable role provisioning]({{< relref "./rbac-grafana-provisioning/" >}}).
- Ensure that you have permissions to create a custom role.
- By default, the Grafana Admin role has permission to create custom roles.
- A Grafana Admin can delegate the custom role privilege to another user by creating a custom role with the relevant permissions and adding the `permissions:type:delegate` scope.
description: Plan your RBAC rollout strategy before you begin assigning roles to users
and teams.
menuTitle: Plan your RBAC rollout strategy
@@ -12,7 +11,7 @@ weight: 20
# Plan your RBAC rollout strategy
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced]({{< ref "/docs/grafana-cloud" >}}).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
An RBAC rollout strategy helps you determine _how_ you want to implement RBAC prior to assigning RBAC roles to users and teams.
@@ -83,7 +82,7 @@ We've compiled the following permissions rollout scenarios based on current Graf
### Provide internal viewer employees with the ability to use Explore, but prevent external viewer contractors from using Explore
1. In Grafana, create a team with the name `Internal employees`.
1. Assign the `fixed:datasources:querier` role to the `Internal employees` team.
1. Assign the `fixed:datasources:explorer` role to the `Internal employees` team.
1. Add internal employees to the `Internal employees` team, or map them from a SAML, LDAP, or Oauth team using [Team Sync]({{< relref "../../../../setup-grafana/configure-security/configure-team-sync/" >}}).
1. Assign the viewer role to both internal employees and contractors.
description: This topic includes a table that lists permission associated with Grafana
fixed and basic roles.
menuTitle: RBAC role definitions
@@ -12,7 +11,7 @@ weight: 70
# RBAC role definitions
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced]({{< ref "/docs/grafana-cloud" >}}).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
The following tables list permissions associated with basic and fixed roles.
@@ -21,7 +20,7 @@ The following tables list permissions associated with basic and fixed roles.
| Basic role | Associated fixed roles | Description |
| Editor | `fixed:datasources:explorer`<br>`fixed:dashboards:creator`<br>`fixed:folders:creator`<br>`fixed:annotations:writer`<br>`fixed:teams:creator` if the `editors_can_admin` configuration flag is enabled<br>`fixed:alerting:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader` | Default [Editor]({{< relref "../#organization-users-and-permissions" >}}) assignments. |
description: Learn about RBAC Grafana provisioning and view an example YAML provisioning
file that configures Grafana role assignments.
menuTitle: Provisioning RBAC with Grafana
title: Provisioning RBAC with Grafana
weight: 60
@@ -12,7 +11,7 @@ weight: 60
# Provisioning RBAC with Grafana
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced]({{< ref "/docs/grafana-cloud" >}}).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
You can create, change or remove [Custom roles]({{< relref "./manage-rbac-roles/#create-custom-roles-using-provisioning" >}}) and create or remove [basic role assignments]({{< relref "./assign-rbac-roles/#assign-a-fixed-role-to-a-basic-role-using-provisioning" >}}), by adding one or more YAML configuration files in the `provisioning/access-control/` directory.
@@ -26,13 +25,17 @@ Grafana performs provisioning during startup. After you make a change to the con
1. Sign in to the Grafana server.
2. Locate the Grafana provisioning folder.
1. Locate the Grafana provisioning folder.
3. Create a new YAML in the following folder: **provisioning/access-control**. For example, `provisioning/access-control/custom-roles.yml`
1. Create a new YAML in the following folder: **provisioning/access-control**. For example, `provisioning/access-control/custom-roles.yml`
4. Add RBAC provisioning details to the configuration file. See [manage RBAC roles]({{< relref "./manage-rbac-roles/" >}}) and [assign RBAC roles]({{< relref "./assign-rbac-roles/" >}}) for instructions, and see this [example role provisioning file]({{< relref "./rbac-provisioning/#example" >}}) for a complete example of a provisioning file.
1. Add RBAC provisioning details to the configuration file.
5. Reload the provisioning configuration file.
Refer to [Manage RBAC roles]({{< relref "./manage-rbac-roles/" >}}) and [Assign RBAC roles]({{< relref "./assign-rbac-roles/" >}}) for instructions.
Refer to [example role provisioning file]({{< relref "#example-role-configuration-file-using-grafana-provisioning" >}}) for a complete example of a provisioning file.
1. Reload the provisioning configuration file.
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
@@ -46,7 +49,7 @@ The following example shows a complete YAML configuration file that:
description: Learn about RBAC Terraform provisioning and view an example of provisioning
configuration for Grafana roles and role assignments.
menuTitle: Provisioning RBAC with Terraform
title: Provisioning RBAC with Terraform
weight: 60
@@ -10,7 +10,7 @@ weight: 60
# Provisioning RBAC with Terraform
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced]({{< ref "/docs/grafana-cloud" >}}).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
You can create, change or remove [Custom roles](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/role) and create or remove [basic and custom role assignments](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/role_assignment), by using [Terraform's Grafana provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs).
@@ -22,15 +22,15 @@ You can create, change or remove [Custom roles](https://registry.terraform.io/pr
## Create a Service Account Token for provisioning
We recommend using service account tokens for provisioning. [Service accounts](https://grafana.com/docs/grafana/latest/administration/service-accounts/) support fine grained permissions, which allows you to easily authenticate and use the minimum set of permissions needed to provision your RBAC infrastructure.
We recommend using service account tokens for provisioning. [Service accounts]({{< relref "../../../service-accounts/" >}}) support fine grained permissions, which allows you to easily authenticate and use the minimum set of permissions needed to provision your RBAC infrastructure.
To create a service account token for provisioning, complete the following steps.
1. [Create a new service account](https://grafana.com/docs/grafana/latest/administration/service-accounts/#create-a-service-account-in-grafana) for your CI pipeline.
1. [Assign permissions to service account](https://grafana.com/docs/grafana/latest/administration/service-accounts/#assign-roles-to-a-service-account-in-grafana):
1. You will need roles “Role reader”, "Role writer" and roles including any permissions that will be provisioned. For example, to create or assign a role that allows creating users, a service account needs permissions to create users.
1. Alternatively, you can assign "Admin" basic role to the service account.
1. [Create a new service account token](https://grafana.com/docs/grafana/latest/administration/service-accounts/#to-add-a-token-to-a-service-account) for use in Terraform.
1. [Create a new service account]({{< relref "../../../service-accounts/#create-a-service-account-in-grafana" >}}) for your CI pipeline.
1. [Assign permissions to service account]({{< relref "../../../service-accounts/#assign-roles-to-a-service-account-in-grafana" >}}):
- You will need roles “Role reader”, "Role writer" and roles including any permissions that will be provisioned. For example, to create or assign a role that allows creating users, a service account needs permissions to create users.
- Alternatively, you can assign "Admin" basic role to the service account.
1. [Create a new service account token]({{< relref "../../../service-accounts/#to-add-a-token-to-a-service-account" >}}) for use in Terraform.
Alternatively, you can use basic authentication. To view all the supported authentication formats, see [here](https://registry.terraform.io/providers/grafana/grafana/latest/docs#authentication).
@@ -33,8 +32,6 @@ You can see a list of users with accounts in your Grafana organization. If neces
1. Sign in to Grafana as an organization administrator.
1. Hover your cursor over the **Configuration** (gear) icon in the side menu and click **Users**.

> **Note:** If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can also [view a global list of users]({{< relref "../server-user-management#view-a-list-of-users" >}}) in the Server Admin section of Grafana.
## Change a user's organization permissions
@@ -96,8 +93,6 @@ When you invite users to join an organization, you assign the **Admin**, **Edito
If the invitee is not already a user, the system adds them.
Periodically review invitations you have sent so that you can see a list of users that have not yet accepted the invitation or cancel a pending invitation.
@@ -116,14 +111,10 @@ Periodically review invitations you have sent so that you can see a list of user
The **Pending Invites** button appears only when there are unaccepted invitations.
You can remove a user from an organization when they no longer require access to the dashboard or data sources owned by the organization. No longer requiring access to an organization might occur when the user has left your company or has internally moved to another organization.
@@ -38,8 +37,6 @@ You can see a list of users with accounts on your Grafana server. This action mi
1. Sign in to Grafana as a server administrator.
1. Hover your cursor over the **Server Admin** (shield) icon until a menu appears, and click **Users**.

> **Note:** If you have [organization administrator]({{< relref "../../roles-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can still [view of list of users in a given organization]({{< relref "../manage-org-users/#view-a-list-of-organization-users" >}}).
## View user details
@@ -62,26 +59,18 @@ A user account contains the following sections.
This section contains basic user information, which users can update.

#### Permissions
This indicates whether the user account has the Grafana administrator flag applied. If the flag is set to **Yes**, then the user is a Grafana server administrator.
This section includes recent user sessions and information about the time the user logged in and they system they used. You can force logouts, if necessary.
Annotations and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in templates and template functions to create notification content dynamically.
Labels and annotations contain information about an alert. Both labels and annotations have the same structure: a set of named values; however their intended uses are different. An example of label, or the equivalent annotation, might be `alertname="test"`.
## Annotations
The main difference between a label and an annotation is that labels are used to differentiate an alert from all other alerts, while annotations are used to add additional information to an existing alert.
Annotations are key-value pairs that provide additional meta-information about an alert. You can use the following annotations: `description`, `summary`, `runbook_url`, `alertId`, `dashboardUid`, and `panelId`. For example, a description, a summary, and a runbook URL. These are displayed in rule and alert details in the UI and can be used in contact point message templates.
For example, consider two high CPU alerts: one for `server1` and another for `server2`. In such an example we might have a label called `server` where the first alert has the label `server="server1"` and the second alert has the label `server="server2"`. However, we might also want to add a description to each alert such as `"The CPU usage for server1 is above 75%."`, where `server1` and `75%` are replaced with the name and CPU usage of the server (please refer to the documentation on [templating labels and annotations]({{< relref "./variables-label-annotation" >}}) for how to do this). This kind of description would be more suitable as an annotation.
## Labels
Labels are key-value pairs that contain information about, and are used to uniquely identify an alert. The label set for an alert is generated and added to throughout the alerting evaluation and notification process.
Labels contain information that identifies an alert. An example of a label might be `server=server1`. Each alert can have more than one label, and the complete set of labels for an alert is called its label set. It is this label set that identifies the alert.
For example, an alert might have the label set `{alertname="High CPU usage",server="server1"}` while another alert might have the label set `{alertname="High CPU usage",server="server2"}`. These are two separate alerts because although their `alertname` labels are the same, their `server` labels are different.
The label set for an alert is a combination of the labels from the datasource, custom labels from the alert rule, and a number of reserved labels such as `alertname`.
### Custom Labels
Custom labels are additional labels from the alert rule. Like annotations, custom labels must have a name, and their value can contain a combination of text and template code that is evaluated when an alert is fired. Documentation on how to template custom labels can be found [here]({{< relref "./variables-label-annotation" >}}).
When using custom labels with templates it is important to make sure that the label value does not change between consecutive evaluations of the alert rule as this will end up creating large numbers of distinct alerts. However, it is OK for the template to produce different label values for different alerts. For example, do not put the value of the query in a custom label as this will end up creating a new set of alerts each time the value changes. Instead use annotations.
It is also important to make sure that the label set for an alert does not have two or more labels with the same name. If a custom label has the same name as a label from the datasource then it will replace that label. However, should a custom label have the same name as a reserved label then the custom label will be omitted from the alert.
## Annotations
Annotations are named pairs that 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. If an annotation contains template code, the template is evaluated once when the alert is fired. It is not re-evaluated, even when the alert is resolved. Documentation on how to template annotations can be found [here]({{< relref "./variables-label-annotation" >}}).
description: Learn about labels and label matchers in alerting
description: Learn about templating of labels and annotations
keywords:
- grafana
- alerting
- guide
- fundamentals
title: How to template annotations and labels
title: Templating labels and annotations
weight: 117
---
# How to template annotations and labels
# Templating labels and annotations
In Grafana it is possible to template annotations and labels just like you would in Prometheus. Those who have used
Prometheus before should be familiar with the `$labels` variable which holds the label key/value pairs of the alert
instance and the `$value` variable which holds the evaluated value of the alert instance.
In Grafana it is possible to template labels and annotations just like you would in Prometheus. Those who have used Prometheus before should be familiar with the `$labels` variable which holds the label key/value pairs of the alert instance and the `$value` variable which holds the evaluated value of the alert instance.
In Grafana it is possible to use the same variables from Prometheus to template annotations and labels, even if your
alert does not use a Prometheus datasource.
In Grafana it is possible to use the same variables from Prometheus to template labels and annotations, even if your alert does not use a Prometheus datasource.
For example, let's suppose we want to create an alert in Grafana that tells us when one of our instances is down for
more than 5 minutes. Like in Prometheus, we can add a summary annotation to show the instance which is down:
For example, let's suppose we want to create an alert in Grafana that tells us when one of our instances is down for more than 5 minutes. Like in Prometheus, we can add a summary annotation to show the instance which is down:
```
Instance {{ $labels.instance }} has been down for more than 5 minutes
@@ -43,17 +37,13 @@ of the condition at the time the alert fired. For example:
## Alert rules with two or more queries or expressions
In the case where an alert rule has two or more queries, or uses reduce and math expressions, it is possible to template
the reduced result of each query and expression with the `$values` variable. This variable holds the labels and value of
each reduced query, and the results of any math expressions. However, it does not hold the samples for each query.
In the case where an alert rule has two or more queries, or uses reduce and math expressions, it is possible to template the reduced result of each query and expression with the `$values` variable. This variable holds the labels and value of each reduced query, and the results of any math expressions. However, it does not hold the samples for each query.
For example, suppose you have the following alert rule:
{{< figure src="/static/img/docs/alerting/unified/grafana-alerting-histogram-quantile.png" class="docs-image--no-shadow" caption="An alert rule that uses histogram_quantile to compute 95th percentile" >}}
Should this rule create an alert instance `$values` will hold the result of the reduce expression `B` and the math
expression `C`. It will not hold the results returned by query `A` because query `A` does not return a single value
but rather a series of values over time.
Should this rule create an alert instance `$values` will hold the result of the reduce expression `B` and the math expression `C`. It will not hold the results returned by query `A` because query `A` does not return a single value but rather a series of values over time.
If we were to write a summary annotation such as:
@@ -61,15 +51,13 @@ If we were to write a summary annotation such as:
{{ $labels.instance }} has a 95th percentile request latency above 1s: {{ $value }})
```
We would find that because the condition of the alert, the math expression `C` must be a boolean comparison, it must
return either a `0` or a `1`. What we want instead is the 95th percentile from the reduce expression `B`:
We would find that because the condition of the alert, the math expression `C` must be a boolean comparison, it must return either a `0` or a `1`. What we want instead is the 95th percentile from the reduce expression `B`:
```
{{ $labels.instance }} has a 95th percentile request latency above 1s: {{ $values.B }})
```
We can also show the labels of `B`, however since this alert rule has just one query the labels of `B` are equivalent to
`$labels`:
We can also show the labels of `B`, however since this alert rule has just one query the labels of `B` are equivalent to`$labels`:
```
{{ $values.B.Labels.instance }} has a 95th percentile request latency above 1s: {{ $values.B }})
@@ -78,8 +66,7 @@ We can also show the labels of `B`, however since this alert rule has just one q
### No data and execution errors or timeouts
Should query `A` return no data then the reduce expression `B` will also return no data. This means that
`{{ $values.B }}` will be nil. To ensure that annotations and labels can still be templated even when a query returns
no data, we can use an if statement to check for `$values.B`:
`{{ $values.B }}` will be nil. To ensure that labels and annotations can still be templated even when a query returns no data, we can use an if statement to check for `$values.B`:
```
{{ if $values.B }}{{ $labels.instance }} has a 95th percentile request latency above 1s: {{ $values.B }}){{ end }}
@@ -87,15 +74,28 @@ no data, we can use an if statement to check for `$values.B`:
## Classic conditions
If the rule uses a classic condition instead of a reduce and math expression, then `$values` contains the combination
of the `refID` and position of the condition. For example, `{{ $values.A0 }}` and `{{ $values.A1 }}`.
If the rule uses a classic condition instead of a reduce and math expression, then `$values` contains the combination of the `refID` and position of the condition. For example, `{{ $values.A0 }}` and `{{ $values.A1 }}`.
## Variables
The following template variables are available when expanding annotations and labels.
The following template variables are available when expanding labels and annotations.
| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. This is unavailable when the rule uses a [classic condition]({{< relref "../../alerting-rules/create-grafana-managed-rule/#single-and-multi-dimensional-rule" >}}). |
| $values | The values of all reduce and math expressions that were evaluated for this alert rule. For example, `{{ $values.A }}`, `{{ $values.A.Labels }}` and `{{ $values.A.Value }}` where `A` is the `refID` of the reduce or math expression. If the rule uses a classic condition instead of a reduce and math expression, then `$values` contains the combination of the `refID` and position of the condition. |
| $value | The value string of the alert instance. For example, `[ var='A' labels={instance=foo} value=10 ]`. |
### Labels with dots
If a label contains a dot (full stop or period) in its name then the following will not work:
```
Instance {{ $labels.instance.name }} has been down for more than 5 minutes
```
This is because we are printing a non-existing field `name` in `$labels.instance` rather than `instance.name` in `$labels`. Instead we can use the `index` function to print `instance.name`:
```
Instance {{ index $labels "instance.name" }} has been down for more than 5 minutes
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.