"Release: Updated versions in package to 10.1.11"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
"Release: Updated versions in package to 10.1.10"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Chore: Bump update checker interval to 1 day (#84404)
* Bump interval to 1hr
* 2 hours is better than 1
* Bump further to 1 day
(cherry picked from commit 391d14d091)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
"Release: Updated versions in package to 10.1.9"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Chore: Bumping go to 1.21.6 (#80709)
* Bumping go to 1.25.6
* bumping sqlite to 1.14.19
* Bumping sqlite version
(cherry picked from commit 4083d23f01)
# Conflicts:
# .drone.yml
# scripts/drone/variables.star
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
Area Build/Packaging: release process - remove image check for armhf rpm no longer being built (#82406)
remove image check for armhf rpm no longer being built
(cherry picked from commit 4aabfb7835)
Co-authored-by: Brian Gann <briangann@users.noreply.github.com>
Docs: Add copy dashboard instructions (#82155)
* Update index.md
Added description of how to copy an existing dashboard
* Moved Copy dashboard task from Import to Create page and edited for style
---------
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
(cherry picked from commit 7efa8c2840)
Co-authored-by: Varsha <66315875+VarshaSBhat@users.noreply.github.com>
"Release: Updated versions in package to 10.1.8"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
`ImagePullSecrets`: Add `GAR` secret to `image_pull_secret` in `.drone.yml` (#80912)
* Add GAR secret to image_pull_secret
* Fix starlark fmt
(cherry picked from commit 65104a7efa)
* Annotations: Split cleanup into separate queries and deletes to avoid deadlocks on MySQL (#80329)
* Split subquery when cleaning annotations
* update comment
* Raise batch size, now that we pay attention to it
* Iterate in batches
* Separate cancellable batch implementation to allow for multi-statement callbacks, add overload for single-statement use
* Use split-out utility in outer batching loop so it respects context cancellation
* guard against empty queries
* Use SQL parameters
* Use same approach for tags
* drop unused function
* Work around parameter limit on sqlite for large batches
* Bulk insert test data in DB
* Refactor test to customise test data creation
* Add test for catching SQLITE_MAX_VARIABLE_NUMBER limit
* Turn annotation cleanup test to integration tests
* lint
---------
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
(cherry picked from commit 81c45bfe44)
* Fix interval, remove logs
Update Grafana Kubernetes installation page (#80569)
Removed the Vimeo and added the YouTube link after an internal discussion with the team.
(cherry picked from commit 0f093c1463)
Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>
Release: Deprecate latest.json and replace with api call to grafana.com (#80537)
* remove latest.json and replace with api call to grafana.com
* remove latest.json
* Revert "remove latest.json"
This reverts commit bcff43d898.
* Revert "remove latest.json and replace with api call to grafana.com"
This reverts commit 02b867d84e.
* add deprecation message to latest.json
(cherry picked from commit 127decee1e)
updated Grafana Open Source documentation (#80357)
Added missing installation section to run Grafana on Kubernetes
(cherry picked from commit 4e6b0fd9ce)
Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>
Docs: adds docs on aggregation functions for alerting (#78893)
* Docs: adds docs on aggregation functions for alerting
* ran prettier
(cherry picked from commit 524debbe53)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
"Release: Updated versions in package to 10.1.7"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Chore: Fix timeout issues when gathering prometheus datasource stats (#74618)
* fix timeout issues when gathering prometheus flavor stats
* workaround data race in sdk tracing middleware
* cap concurrency at 10
---------
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
(cherry picked from commit 3c89e68fc1)
Co-authored-by: Dan Cech <dcech@grafana.com>
Chore: Upgrade Go to 1.21.5 (#79329)
* bumping grafanas go version to 1.21.5
* adding how to upgrade go doc
* removing the whole ci-build and corresponding pipelines
* clarifying that we have to run make drone
* fixing starlark linter and removing unused code
* Adding note about enterprise
* trying to change the underyling image to avoid musl issues
* only need to golang one
(cherry picked from commit 4991e71b85)
Auth: id response header (#77871)
* Add config options for identity id response header
* Add feature to add identity id response header to all responses
* Use util.SplitString
(cherry picked from commit 21f94c5b78)
Alerting: Attempt to retry retryable errors (#79161)
* Alerting: Attempt to retry retryable errors
Retrying has been broken for a good while now (at least since version 9.4) - this change attempts to re-introduce them in their simplest and safest form possible.
I first introduced #79095 to make sure we don't disrupt or put additional load on our customer's data sources with this change in a patch release. Paired with this change, retries can now work as expected.
There's two small differences between how retries work now and how they used to work in legacy alerting.
Retries only occur for valid alert definitions - if we suspect that that error comes from a malformed alert definition we skip retrying.
We have added a constant backoff of 1s in between retries.
---------
Signed-off-by: gotjosh <josue.abreu@gmail.com>
(cherry picked from commit c631261681)
Unified Alerting: Set `max_attempts` to 1 by default (#79095)
* Unified Alerting: Set `max_attempts` to 1 by default
The retry logic for unified alerting has been broken as far as v9.4.x, rather than fixing it in one go and causing a headache to our users with rules putting extra load on their datasources - I think a better approach is to simply set 1 as a default and then let our users change it.
I see two cons with this approach:
- Configuration for legacy to unified alerting cannot be ported over automatically, users will have to manually set `max_attempts` to 3 when migrating.
- Users expecting to get any sort of retrying (as with legacy alerting) will not have it out of the box and will have to manually edit the configuration.
Signed-off-by: gotjosh <josue.abreu@gmail.com>
---------
Signed-off-by: gotjosh <josue.abreu@gmail.com>
(cherry picked from commit 0c9356a3c7)
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Alerting: Fix deleting rules in a folder with matching UID in another organization (#78258)
* Remove usage of obsolete function for deleting alert rules under folder
* Apply suggestion from code review
* Update tests
(cherry picked from commit 6d4625ad52)
* fixup
Alerting: Only warm alert state cache if execute_alerts=true. (#78895)
* Alerting: Only warm alert state cache if execute_alerts=true.
If the Grafana instance is not executing alerts, then Warm()-ing the state
manager is wasteful and could lead to misleading rule status queries, as the
status returned will be always based on the state loaded from the database at
startup, and not the most recent evaluation state.
* Move Warm() down to shared conditional.
(cherry picked from commit 520c927931)
Co-authored-by: Steve Simpson <steve.simpson@grafana.com>
* Docs: adds info on location for mute timings
* ran prettier
* Update docs/sources/alerting/manage-notifications/mute-timings.md
* Update docs/sources/alerting/manage-notifications/mute-timings.md
* Adds note on not being able to retrieve alerting resources once deleted
---------
(cherry picked from commit 5fc68312c5)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Fixed broken url link for applying annotation in this doc page (#78673)
* Fixed broken url link
Fixed the incorrect link for applying annotation to the correct documentation page
* fixed the links using Shortcodes
fixed the [annotate visualizations] links using Shortcodes
* Prettier
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 17f3bbe4a1)
Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>
added youtube video link to the documentation (#78680)
Added Grafana Office Hours video link to this documentation which covers more explanation on using Grafana with Docker
(cherry picked from commit 4e40da5554)
Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>
Use latest grafana/docs-base image (#77299)
* Use latest grafana/docs-base image
The pinned tag does not support recent shortcodes like `docs/public-preview`.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Always pull the image
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit d8d7a40d13)
Docs: Add a section about using multiple auth providers in Grafana (#74710)
* Docs: Add a section about using multiple auth providers in Grafana
* Prettier and feedback
(cherry picked from commit e3288834b3)
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
CI: Test backend on feature-toggles documentation changes (#78177)
Run backend tests if the feature-toggles documentation changes
(cherry picked from commit d78b3fea2f)
CI: Fix race condition when building docker on main (#77504)
* build docker after packages are updated
* use my branch for main pipelines for testing
* use my branch for main pipelines for testing
* use main instead now
* formatting
(cherry picked from commit f6d3238505)
CI: Update RGM steps to use the artifacts command (#77470)
* update rgm steps to use artifacts subcmd
* format-drone
* make drone
(cherry picked from commit 8a5d4c4c6e)
Update `doc-validator` workflow (#77024)
Update doc-validator
No longer produce errors for the use of https://grafana.com/ links. This is the first step towards just using fully qualified URLs everywhere. The website link render-hook will internally transform these URLs into the partial URL that works across all hostnames.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 07909464f1)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Alerting: Fix confusion around what can and cannot be customized in notifications (#77032)
* Alerting: Fix confusion around what can and cannot be customized in notifications
* Small fix
* Second small fix
(cherry picked from commit 1cb1d174fd)
Co-authored-by: George Robinson <george.robinson@grafana.com>
CI: Rename scripts that build artifacts to use _build_ (#77005)
Rename scripts that build artifacts to use _build_
(cherry picked from commit 442e533803)
* Fix correlation links (#76738)
* Change link arguments to ensure that they resolve correctly regardless of version
Presently, the links take users to "latest" even if they are in other versions of documentation.
Sometimes, the destination doesn't even exist in "latest".
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Make myself CODEOWNER so I can ensure correct linking in the future
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Apply suggestions from code review
Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
(cherry picked from commit 87ca68540b)
* Fix spelling errors
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* CI: Update CI/CD tooling and pipelines from main
* Update Makefile
* Comment out validate_openapi_spec_step
* Update broken frontend tests
* Fix validate-npm-packages regex to work without suffix
* Fix cypress image version
Update angular-plugins.md (#76829)
Remove oracle plugins as these have migrated
(cherry picked from commit 4073e50da9)
Co-authored-by: David Harris <david.harris@grafana.com>
Documentation: Clean up Docker installation docs (#76164)
* docs: fix minor inaccuracies
- give content on the type of data that needs persistence
- Use more precise terminology
- persistent storage != Docker volumes
- filesystem changes remains in a stopped container
and only discard when container removed
- 'directory' is more accurate than 'folder'
- fix typo: `grafana_data` should be `grafana-storage`
* docs: fix grammar and use 'directory' consistently
* docs: replace 'sqlite3' with 'SQLite version 3'
(cherry picked from commit 67656ebd06)
Co-authored-by: Daniel Li <dan@danyll.com>
[Docs] Annotate visualizations update (#76395)
There is a sentence in the [Built-in query](https://grafana.com/docs/grafana/latest/dashboards/build-dashboards/annotate-visualizations/#built-in-query) section of the page that could use a "the" (emphasis added by me 😄) :
> When you copy a dashboard using the Save As feature it will get a new dashboard id, **so annotations created on source dashboard** will no longer be visible on the copy. You can still show them if you add a new Annotation Query and filter by tags. However, this only works if the annotations on the source dashboard had tags to filter by.
This PR adds "the" so the phrase reads "so annotations created on the source dashboard"
(cherry picked from commit 7562607319)
Co-authored-by: Leanna Shippy <11079957+lshippy@users.noreply.github.com>
"Release: Updated versions in package to 10.1.6"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
improved the sentence to make it clear for entering admin in both the username and password (#76141)
* improved the sentence to make it clear for entering admin in both the username and password
* Update docs/sources/getting-started/build-first-dashboard.md
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 186a9c2331)
Co-authored-by: Bilal Khan <64713734+ibilalkayy@users.noreply.github.com>
DataSourcePicker: Disable autocomplete for the search input (#75898)
(cherry picked from commit 6aa27607ae)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
* Cloudwatch: Prevent log group requests with ARNs if feature flag is off (#75672)
(cherry picked from commit b83a58ef55)
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Add alias to redirect /docs/grafana/latest/variables/templates-and-variables/ identified as missing by the website crawl (#75627)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 92e0a986da)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Update set-up-for-high-availability.md (#75356)
* Update set-up-for-high-availability.md
Added a note to Enforce the need to setup separately the Alerting HA, as some customers keep opening tickets complaining about duplicate alerts when setting up Grafana HA.
* Update set-up-for-high-availability.md
Corrected note (alerts instead of wueries)
* Update docs/sources/setup-grafana/set-up-for-high-availability.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/set-up-for-high-availability.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/set-up-for-high-availability.md
* Update docs/sources/setup-grafana/set-up-for-high-availability.md
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 1ff116e85c)
Co-authored-by: Marin N <marinnedea@users.noreply.github.com>
Fix migrating alerts aliases (#74898)
* Add comments to indicate which page I believe each alias is intending to redirect
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Remove difference-old-new redirect from migrating-alerts page since an alternative page exists
The alternative page is `docs/sources/alerting/difference-old-new.md`.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add comment to show intended absolute path redirect
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Remove `unified-alerting/difference-old-new/` redirect because it already exists in `docs/sources/alerting/difference-old-new.md`.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Remove `unified-alerting/` alias since the absolute URL already redirects to `/docs/grafana/latest/alerting/`
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix `/docs/grafana/<GRAFANA VERSION>/alerting/migrating-alerts/` redirect
The following example uses `latest` as _`GRAFANA VERSION`_ for simplicity and readability.
The desire is the following redirect:
```
src: /docs/grafana/latest/alerting/migrating-alerts/
dst: /docs/grafana/latest/alerting/set-up/migrating-alerts/
```
`dst` is the Hugo pretty URL for the current page (`docs/sources/alerting/set-up/migrating-alerts/_index.md`).
When constructing Hugo aliases we are working from the page's containing directory and not the page itself.
The path element `.` represents that directory.
For example:
```
page: /docs/grafana/latest/alerting/set-up/migrating-alerts/
alias: ./
dst: /docs/grafana/latest/alerting/set-up/
```
The path element `..` represents the parent directory of the page's containing directory.
For example:
```
page: /docs/grafana/latest/alerting/set-up/migrating-alerts/
alias: ../
dst: /docs/grafana/latest/alerting/
```
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 3ab31c345e)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Prometheus: Fix applying ad-hoc filters to the expression that has a template variable (#75250)
* Interpolate first and then apply ad-hoc filters
* More tests
(cherry picked from commit d076f733e9)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Docs: Fix Tempo link errors (#75169)
* fix configure it broken link
* fixed configure Grafana agent link
* fix service graph link
(cherry picked from commit c955eff1cb)
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
Plugins: Refresh plugin info after installation (#75074)
(cherry picked from commit 6600dd265b)
Co-authored-by: Hugo Kiyodi Oshiro <hugo.oshiro@grafana.com>
Loki: Fix filters not being added with multiple expressions and parsers (#75152)
* determine last positions per expr
* fix lint
(cherry picked from commit 480aa1ccca)
"Release: Updated versions in package to 10.1.3"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Alerting: Prevent showing "Permissions denied" alert when not accurate (#74887)
* Change way of obtaining external datasources info
* Remove unneeded import
* Create function to getExternalDsAlertManagers in datasource srv
* Remove unused import
(cherry picked from commit db2295bea2)
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Docs: Add multiple y-axes guidance (#74282)
* Added multiple y axes shared file
* Added shared content to time series page
* Updated shared content and added to heatmap and bar chart pages
(cherry picked from commit 9a389a80d8)
Docs: Fix nightly builds link (#73964)
* Fix nightly builds link
Replace dead link for nightly OSS builds
* Updated link
* Got updated link
* Fixed link properties
(cherry picked from commit a482795a96)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Auth: Refactor for revoking user tokens within last hours (#74616)
* fix: revoked tokens within last hours
adds check for unlimited sessions out of index
adds a function for specifing the hours to look back when revoking users tokens, otherwise we "assume" the clean up takes care of them adds a index for the `user_auth_token` - `revoked_at` for faster queries when using `revoked_at`
* fix: sqllite datetime conversion with unixtimestamps
* fix: postgres dialect
* fix: mysql dialect
* fix: mysql dialect missing closing )
* refactor: delete revoked tokens directly
* fix: tests for sqlite
* AuthToken: Simplify DeleteUserRevokedTokens and add test
* fix: linting newline
* Reset get time after test
* fix: test order by revoked
* fix: order by different db
* ascending
* test with seen at
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
(cherry picked from commit b00f3216c1)
BrowseDashboards: Only remember the most recent expanded folder (#74617)
* BrowseDashboards: Only remember the most recent expanded folder
* set to null
* cleanup
* only clear removed folder if it was the most recently opened
* comments + variable
(cherry picked from commit 5cb7eb5884)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Fix contact points aliases and add additional for `/docs/grafana/<GRAFANA_VERSION>/alerting/contact-points/` (#74673)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit de9b658b7f)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Remove set-up-cloud page as it has been moved to the website repository (#74755)
* Page has been moved to the website repository
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Update .codespellignore to ignore 'Operator Windrose' and fix typo
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit ac314855eb)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Tempo Service Map: Fix context menu links in service map when namespace is present (#74186)
* Add necessary fields to edges
* Add information about name and namespace to edge when available
* Use new fields to build search taking into account namespace
* Remove new fields from NodeGraphDataFrameFieldNames, define them locally
(cherry picked from commit 3bae1c564d)
Co-authored-by: Javier Ruiz <javiruiz01@users.noreply.github.com>
Logs Panel: Performance issue while scrolling within panel in safari (#74694)
* adding contain:strict to let browsers know the layout of logs panel can be rendered independently
* add new prop to allow LogRow component to contain content
(cherry picked from commit 4f5728233c)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
* Prometheus: Handle the response with different field key order (#74567)
* Handle the response with different field key order
* More unit tests to cover edge cases
* Cover more edge cases
* make it simpler
* Better test inputs
(cherry picked from commit 3107459e57)
* Adjust the code for 10.1.x
InfluxDB: Fix multiple tag selection (#74205)
Return all tag keys
(cherry picked from commit 9c50296a07)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
CI: Get Github Token and Docker username/password from Vault (#74555)
CI: Get Docker username/password from Vault
Not Drone secrets
(cherry picked from commit 566215c22c)
[DOC] Restructure Tempo data source doc (#74291)
Restructure Tempo data source doc
(cherry picked from commit ad63400a54)
# Conflicts:
# docs/sources/datasources/tempo/_index.md
Share link: Use panel relative time for direct link rendered image (#74438)
* Use relative timerange for share link
* Fix time range
(cherry picked from commit a14af5e680)
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
Docs: adjustments to Ubuntu install based on user feedback (#74406)
* adjustments based on user feedback
* makes prettier
* Apply suggestions from code review
* Update docs/sources/setup-grafana/installation/debian/index.md
* Update docs/sources/setup-grafana/installation/debian/index.md
(cherry picked from commit e027f1ef10)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Auth: Fix set basicrole to the previous role in UI on error from backend (#74395)
fix: onchange effect to set basicrole when error from backend
(cherry picked from commit 87e8b654a2)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Alerting: Do not exit if Redis ping fails when using redis-based Alertmanager clustering (#74144)
Do not fail redis peer construction if ping fails
(cherry picked from commit 5c9aeaef41)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
Docs: Replace relref with docs/ref link (#74215)
* Replaced relref with docs/ref link and fixed docs/ref shortcode content
* Removed trailing slashes
(cherry picked from commit 34be361299)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
PromLink: Fixes promlink test failing in CI and locally (#74299)
(cherry picked from commit 39b3b08926)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Alerting docs: link fixes and a note for expressions (#74317)
* Alerting docs: link fixes and a note for expressions
* changes format of note
* fixes extra space
* Update docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* update prometheus link
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit bccb5869a5)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Docs: Update the Elasticsearch data source docs (#73415)
* added new config doc
* edits to config doc
* updates to config and index docs
* minor edits to config page
* updates to query editor
* query editor update, added data source keyword
* index file updates
* updates to quey editor, index
* edits to index, configure and query editor docs
* final updates to config and index docs
* Update docs/sources/datasources/elasticsearch/configure-elasticsearch-data-source.md
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Update docs/sources/datasources/elasticsearch/query-editor/index.md
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Update docs/sources/datasources/elasticsearch/query-editor/index.md
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Update docs/sources/datasources/elasticsearch/configure-elasticsearch-data-source.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/datasources/elasticsearch/configure-elasticsearch-data-source.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/datasources/elasticsearch/configure-elasticsearch-data-source.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/datasources/elasticsearch/configure-elasticsearch-data-source.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/datasources/elasticsearch/configure-elasticsearch-data-source.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/datasources/elasticsearch/configure-elasticsearch-data-source.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* added date histogram options
* suggestions from Chris
* added bucket aggregations options
* bucket aggregation
* updates based on feedback
* removed panels info under logs query
* inspector now query inspector
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 71cf9341b6)
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
"Release: Updated versions in package to 10.1.2"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Docs: Remove docs reference to removed feature (#74139)
* Changed docs version in link
* Removed reference to dashboard previews docs
* Added back reference and replaced partial URL with relref
* Remove reference to removed docs
(cherry picked from commit b2f7476bb4)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Docker: Add musl as a ubuntu dependency (#74127)
Add musl as a ubuntu dependency
(cherry picked from commit 364ca3daa0)
Co-authored-by: Kevin Minehart <kmineh0151@gmail.com>
* [LDAP] Disable removed users on login (#74016)
* [LDAP] Disable removed users on login
* Fix tests
* Add test for user disabling
* Add tests for disabling user behind auth proxy
* Linting.
* Rename setup func
* Account for reviews comments
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
---------
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
(cherry picked from commit f900098cc9)
* manual backport of #74016
* LDAP: Fix active sync with large quantities of users (#73834)
* Fix middleware test
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gabriel.mabille@grafana.com>
CI: Mount /root/.docker/ dir in authenticate-gcr step (#73977)
Mount /root/.docker/ dir
(cherry picked from commit eea4adea29)
# Conflicts:
# .drone.yml
Alerting: Limit redis pool size to 5 and make configurable (#74057)
* Limit redis pool size to 5 and expose it in config ini
* Coerce negative pool sizes to the default
(cherry picked from commit dfba94e052)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
Docs: Include Cloud support with RBAC API (#73522)
Update access_control.md
Update to show that RBAC HTTP API can be used with a Cloud account also.
(cherry picked from commit d8fd4c2cbe)
Co-authored-by: sarah-spang <86264026+sarah-spang@users.noreply.github.com>
docs: update app plugin guidance (#74006)
Original text focusses on creation in a management topic. This change makes it more relevant to an administrator who is installing plugins.
(cherry picked from commit 0884f40c8d)
Co-authored-by: David Harris <david.harris@grafana.com>
* Plugins: Dynamic angular patterns: Add random offset to GCOM API calls, handle HTTP errors (#73494)
* Plugins: Dynamic angular patterns: Return error for != 2xx status code
* Add test for status code check
* Plugins: Dynamic angular patterns: Add random skew to periocic GCOM api calls
* Add test for random skew
* Changed randomSkew signature, ensure it is always positive
(cherry picked from commit 4ef98449ff)
* trigger
---------
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
Co-authored-by: Giuseppe Guerra <giuseppe@guerra.in>
access control api: Correction of typo in list your permissions endpoint (#64399)
Correction of API endpoint
Correction of an API endpoint in 'List your permissions' section. Current endpoint results in 404 page
(cherry picked from commit cb040a72bd)
Co-authored-by: bojankezele <79632099+bojankezele@users.noreply.github.com>
Docs: change headings on 2 data source pages for SEO (#73792)
* changed grafana alerting titles and headings
* changed H1 heading for SEO
(cherry picked from commit b654e5642c)
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
* "Release: Updated versions in package to 10.1.1"
* Update version to 10.1.1 in gen.ts files
---------
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Co-authored-by: Horst Gutmann <horst.gutmann@grafana.com>
Docs: Introduction topic title update (#73702)
updates introduction topic title to be consistent with Grafana Cloud and other products
(cherry picked from commit 2d388cfa55)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Kinds: Reconcile verify-kinds.go with kind-registry changes (#73689)
* Kinds: Reconcile verify-kinds.go with kind-registry changes
* Remove handwritten value specific for manual test
* Update grafana/kindsys dep
* Revert "Update grafana/kindsys dep"
This reverts commit e437e1879e.
* Fix generated code
(cherry picked from commit fb0165ab87)
Co-authored-by: Joan López de la Franca Beltran <5459617+joanlopez@users.noreply.github.com>
Codeowners: Add myself (Miki) as codeowner of connections and datasources (#73623)
add mikkancso as connections, datasources codeowner
(cherry picked from commit cf9da12975)
Co-authored-by: mikkancso <miklos.tolnai@grafana.com>
Alerting: Add new Recording Rule button when the list is empty (#73502)
* Add button to create RR when there are no alerts
* Remove unneeded import
* Change cards to be shown vertically
(cherry picked from commit 27fb922f9b)
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Drawer: Clicking a `Select` arrow within a `Drawer` no longer causes it to close (#73557)
ensure drawer doesn't close when clicking dropdown arrow
(cherry picked from commit 1f49d480a8)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Docs: Update OAuth entry to match What's new (#73512)
* Aligned oauth entry with What's new version
* Fixed menuTitle spelling in front matter
(cherry picked from commit f10f1874e6)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Logs: Fix log samples not present with empty first frame (#73612)
* fix log samples not present with empty first frame
* also test with empty frames
* rename test file
* remove import
(cherry picked from commit 997d21f6e5)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
disable a feature toggle that is on by default (#69438)
* disable a feature toggle that is on by default
We document how to enable a feature toggle, but not how to disable one. This adds the config setting to disable a toggle that is on by default.
* remove "alpha"
Alpha features are not the only ones that can be enabled, and we don't use the term "alpha" anymore.
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
* Update docs/sources/setup-grafana/configure-grafana/_index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* makes prettier
---------
Co-authored-by: Giordano Ricci <me@giordanoricci.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 4a6057db65)
Co-authored-by: Mitch Seaman <mjseaman@users.noreply.github.com>
Sync-mirror GHA updates (#73504)
fixing sync-mirror run-name and altering concurrency to use branch name
(cherry picked from commit 4047cdb213)
Co-authored-by: Ricky Whitaker <ricky.whitaker@grafana.com>
Docs: Data source picker everywhere updates (v10.1) (#73347)
* Added text about the updated data source picker
* Reformatted and reworded new language and removed from Correlations
(cherry picked from commit 5988da1aa8)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
SqlDataSources: Update metricFindQuery to pass on scopedVars to templateSrv (#73333)
(cherry picked from commit 3245e25273)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Grafana versioning: Remove `pre` suffix from Grafana version (#73357)
* Remove pre suffix from version
* Fix tests
(cherry picked from commit 0aba319ea0)
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
Docs: Fixed Grafana Fundamentals tutorial to match updated UI (#73168)
* Update index.md
The word `Configuration` was used to describe an action for getting started, when the actual UI has the word `Administration` and not Configuration. Updated the docs to reflect the actual environment created.
* Update index.md
Updated the tutorial to match the current UI options
* Made copy edits for styling and consistency with Cloud fundamentals tutorial
Made some copy edits to match our style guide and to make this tutorial a bit more consistent with the Cloud version. Also added the step for updating the legend back to the build dashboards section.
* Ran linter
* Edited text to match updated UI
Made edits to match UI behaviour as well as some further style edits.
* Made final copy edits
---------
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
(cherry picked from commit cc1ea31616)
Co-authored-by: C M <40527412+glitchwizard@users.noreply.github.com>
Loki: Fix validation of `step` values to also allow e.g. `ms` values (#73270)
* use go duration validation
* add `isValidGrafanaDuration`
* use `isValidGrafanaDuration`
* improve jsdoc
(cherry picked from commit c006ea18fb)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
docs: What’s New & Upgrade Guide 10.1 (#70636)
* added what's new 10.1
* created new upgrade guide
* updated index file to 10.1
* updated whats new index file
* Dataviz: add disconnect values whats new content
* Docs: Add Configure refresh token handling separately for OAuth providers to what's new 10.1 (#71648)
* Add what s new section for configuring refresh token handling
---------
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Whats new: Add step editor and copy link (#71964)
* Add step editor and copu link to the whats new
* Update docs/sources/whatsnew/whats-new-in-v10-1.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Update docs/sources/whatsnew/whats-new-in-v10-1.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Update docs/sources/whatsnew/whats-new-in-v10-1.md
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
---------
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* Add flamegraph section
* Added TraceQL response streaming section
* Updated tempo-streaming video link
* What's new: Add Loki, Elasticsearch, and Log changes (#72101)
* What's new: Add Loki, Elasticsearch, and Log changes
* Remove Lucene parser mention
* added contributor name to each entry
* Alerting: adds whats new entries and structure
* Elasticsearch: logs sample in explore
* Add span filtering is GA to whats new doc
* Transformations redesign and metrics explorer
* ran prettier
* What's new 10.1: Recategorize contents and add missing data (#72199)
What's new: recategorize content and add missing data
* Revert whats new refresh token handling (#72191)
Revert refresh token handling
* docs: What’s New & Upgrade Guide 10.1 AuthNZ (#72000)
* add what's new authnz
* Update docs/sources/upgrade-guide/upgrade-v10.1/index.md
---------
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Alerting: screenshots and updates
* Alerting: delete couple of entries
* Docs: Add Visualizations and Widgets Split to what's new 10.1 (#72009)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Docs: Add CloudWatch Logs Monaco query editor to what's new in 10.1 (#72221)
* Docs: Add CloudWatch Logs Monaco query editor to what's new in 10.1
* Add guidance for Cloud users to enable the feature
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
---------
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Alerting: adds notification policy entry
* Add Plugins/Angular deprecation sections to What's new 10.1
* Add Plugins/ds uid deprecation section to What's new 10.1
* Alerting: adds label color entry
* Adds whats new features for AWS Datasources
* Update what's new 10.1 angular deprecation section
* Docs: what's new for preventing manual role updates (#72279)
* what's new for disabling manual role updates
* add a reference to the feature toggle
* fix spelling
* Apply suggestions from code review
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* PR feedback
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* wording fixes
* whatsnew-10.1.0: add logs-context info (#72240)
* whatsnew-10.1.0: add logs-context info
* explain what log context is
* improved description
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* better phrasing
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Subfolders: folder picker
* Influxdb backend mode
* Dataviz: heatmap datalink support
* DataViz: geomap new beta network layer
* Dataviz: update geomap network layer image
* Dataviz: update availability wording to public preview from experimental for geomap network layer
* Docs: Add Activate draft reports section to what's new in 10.1
* Docs: Add format time transformation to what's new
* Docs: Adjust format time transformation language
* Explore: Add what's new about panel plugins (#72338)
* Add what's new about panel plugins
* Update docs/sources/whatsnew/whats-new-in-v10-1.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
---------
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* add tabular outer join to whats new
* Update traceql streaming section
* Added new tempo search section
* Update traceql streaming video name
* docs: what's new 10.1.0, easier to use elastic query editor (#72513)
* docs: elasticsearch: new mode selector
* improved text
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* mitch edits
* Added product labels
* Made general copy edits
* Removed editing notes
* Fixed broken relref
* Fixed typo and added contributor name
* Added contributor name
* Made minor copy edits
* Update format time transformation docs
* A small edit to the role list
* Added missing information and committed copy edits
* Move Reports item to under Dashboards & visualizations
* Changed heading level of Activate draft reports
* Fixed wording of Choose which fields to display in log line entry
* Made edits to Logs improved performance entry
* Added availability for Transformations redesign
* Added availability for Join by fields
* Made final copy edits
* Removed Loki query splitting
---------
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Co-authored-by: André Pereira <adrapereira@gmail.com>
Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Gareth Dawson <gwdawson.work@gmail.com>
Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
Co-authored-by: catherineymgui <catherine.gui@grafana.com>
Co-authored-by: Jo <joao.guerreiro@grafana.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: Alexa V <239999+axelavargas@users.noreply.github.com>
Co-authored-by: Kevin Yu <kevinwcyu@users.noreply.github.com>
Co-authored-by: Giuseppe Guerra <giuseppe@guerra.in>
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Zsofia <zsofia.komaromi@gmail.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Robert Horvath <robert.horvath@grafana.com>
Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
Co-authored-by: bohandley <brendan.ohandley@gmail.com>
Co-authored-by: Mitchel Seaman <mitchel.seaman@gmail.com>
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 3432d3b721)
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
Logs: Fix scrolling with `exploreScrollableLogsContainer` feature (#73272)
fix scrolling with `exploreScrollableLogsContainer`
(cherry picked from commit 98b3878231)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
Slug: Combine various slugify fixes for special character handling (#73164)
* combine various slugify fixes for special character handling
* a couple more test cases
* update more tests
* goimports
(cherry picked from commit dd97038b00)
Co-authored-by: Dan Cech <dcech@grafana.com>
docs: remove Moogsoft from angular list, update version for helm (#73204)
(cherry picked from commit 63ffd95110)
Co-authored-by: David Harris <david.harris@grafana.com>
AzureMonitor: Allow `serviceTags` and `tags` to be empty for trace results (#73145)
Allow serviceTags and tags to be empty
(cherry picked from commit 95546551bc)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Docs: Update to include keycloak link in oauth docs (#72698)
Update to include keycloak link in oauth docs
(cherry picked from commit 3c289d8a08)
Co-authored-by: Jess Sartin <jdoherty513@gmail.com>
Logs: Disable query splitting due to conflicts with transformations (#73086)
* disable query splitting for now
* change stage of `lokiQuerySplitting`
(cherry picked from commit 1343c74362)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
Auth: prevent auto_login redirect if user is already authenticated (#72477)
* Auth: prevent auto_login redirect if user is already authenticated
Before attempting an auto-login for OAuth, verifies if current context has already been
authenticated.
Fixes: #72476
Co-authored-by: Karl Persson <kalle.persson92@gmail.com>
(cherry picked from commit d9c232b331)
Co-authored-by: Maksym Revutskyi <maksym.revutskyi@gmail.com>
EditDatasource: Fix navtree when `dataSourcePageHeader` is on (#72827)
use useDataSourceSettingsNav from connections in DataSourceTabPage
(cherry picked from commit 1646b901af)
Co-authored-by: mikkancso <miklos.tolnai@grafana.com>
Add a warning in the documentation (#72975)
A partner complained in the name of a customer. They have 6k datasources and it took them some time to figure out why they only had 5k coming back.
This commit add a warning for this edge case, content is pretty clear.
(cherry picked from commit 5eef8291e2)
Co-authored-by: Clément Duveau <clement@duveau.eu>
InfluxDB: Fix handling flux response with no time and value column (#72833)
* Upgrade the influxdb-client-go version
* Handle flux response with no time and value column
(cherry picked from commit 1ac9e7eaab)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Logs: Fix displaying the wrong field as body (#73025)
* fix displaying the wrong field as body
* fix test
* fix `getFirstFieldOfType` with non-present type
(cherry picked from commit 533fae4c60)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
Docs: Update screenshots for generating an access token for signing a plugin (#73031)
updated screenshots path and name
(cherry picked from commit 3c4d2edb61)
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
Prometheus: Fix fetching label values when datasource has no labels match api support (#72960)
* interpolate match string
* provide unit test
* add the third parameter back to fix the unit test
(cherry picked from commit 29906847e1)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
sign-plugin-docs: information of usage of a new token has been added to the docs (#72912)
* Documentation for signing a plugin has been updated
* changes after review
* small review change
(cherry picked from commit ba3cbbef7f)
Co-authored-by: Yulia Shanyrova <yulia.shanyrova@grafana.com>
Admin: Add redirect notice for datasources to admin landing page (#72736)
* update copy of ConnectionsRedirectNotice
The Connections page is not that new anymore
* extend NavLandingPage with optional header
* show ConnectionsRedirectNotice on Admin landing page
* make ConnectionsRedirectNotice dismissable
* make ConnectionsRedirectNotice informational
(cherry picked from commit 290fc3aadf)
Co-authored-by: mikkancso <miklos.tolnai@grafana.com>
Auth: OAuth sets `skip_org_role_sync = true` for auth.google by default (#72819)
* sets skip_org_role_sync to true for google
* add google skiporgrolesync and sets to true always
* add field
* Update docs/sources/setup-grafana/configure-security/configure-authentication/google/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* add AKS to words
* script back to mina
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 95760cb021)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
InfluxDB: Fix retention policy handling for InfluxDB 3.0 engine by bringing back the hardcoded default (#72467)
* Revert retention policy handling
* Remove comment
* Send retention policy with request when it's possible
(cherry picked from commit 3395ad03a7)
Update bind-net-capabilities.md (#65181)
This doc fragment is included on multiple pages including this one: https://grafana.com/docs/grafana/latest/setup-grafana/installation/debian/
the only flaw is it's missing "sudo". Modern linux practice suggests using sudo for all administrative edits like this, and this change reinforces parallel structure in the target docs page. There may potentially be some other context this fragment is used in where sudo isn't appropriate, but this makes it easier to copy/paste the command and have it work on modern linuxes.
(cherry picked from commit 0d6e911fff)
Co-authored-by: David Allen <david.allen@grafana.com>
Auth: lock down Grafana admin sync for SAML (#72828)
lock down Grafana admin sync for SAML
(cherry picked from commit 3a2538c2ca)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
SAML: Add onclick action to providercard if the provider is configured (#72734)
* adds missign onclick for provider card
* simplified version
(cherry picked from commit 5d99fdeb46)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Auth: Add missing skipOrgRoleSync property to SocialBase for GenericOAuth (#72752)
* add missing cfg for skiporgrolesync
* add google skiporgrolesync
* removed google skip
* update docs to reflect google
* remove docs update for google
(cherry picked from commit 27f57fe112)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Fix setting oauthPassThru flag (#72472)
* Fix setting oauthPassThru flag
* Call onChange only if azure auth is enabled
* Move changes in onSettingsChange
(cherry picked from commit a44e0f2cfd)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Usage stats: Tune collector execution startup and interval (#72688)
* Do not update statistics at service collector startup
* Configurable collector interval
* Introduce initial random delay
* Prevent reporting metrics until the stats have been collected
* Apply suggestion from code review
(cherry picked from commit afb59af79b)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
Search v1: Remove unnecessary subqueries (#72388)
* Add feature flag
* Introduce interface and dummy implementation
* Add tests for the new filter
* accessControlDashboardPermissionFilterNoFolderSubquery implementation
* join only if it's necessary
* force ordering for tests
* Temporarily enable new query for benchmarks
(cherry picked from commit 2c26a02b82)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
Tempo: Only get span_names when they are in the response (#72663)
* Only get span names when they are in the response
* Find span_name field/labels
(cherry picked from commit b4c55765fe)
Co-authored-by: Joey <90795735+joey-grafana@users.noreply.github.com>
UserSync: Avoid UpdateLastSeenAt with invalid user ids (#72776)
* avoid user zero
* more errors
* more tests
* split
(cherry picked from commit 7431c0ddb1)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Update _index.md (#72222)
The existing link will take new users to the Data Source Management page which falls under that administration section and is perhaps more advanced that we want for a new user. The updated link takes new users to what I think was the intended "Data Sources" page.
(cherry picked from commit b8118520e4)
Co-authored-by: Iain Finlayson <ruffiain@gmail.com>
Update all links that have destinations outside of /docs/grafana/latest/datasources/ to use `docs/reference` shortcode (#72051)
* Update all links that have destinations outside of /docs/grafana/latest/datasources/ to use docs/reference shortcode
* Fix typo
* Prettier
---------
(cherry picked from commit 2b14b2d564)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Nested folders: Clear selection state in tree view when indeterminate (#72595)
* clear selection state when indeterminate
* ensure search state is properly cleared when toggling the indeterminate checkbox
* select everything in view
(cherry picked from commit dbef9899ac)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
docs: remove broken plugin from Angular guidance (#72614)
aceiot-svg-panel fails to load in G10 and is therefore (currently) an unviable alternative
(cherry picked from commit 01100f83ba)
Co-authored-by: David Harris <david.harris@grafana.com>
DS Picker: Ignore capitalization when sorting by name (#72665)
(cherry picked from commit 148b6186b7)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
InfluxDB: Fix fetching retention policies after manually entering a non-existent retention policy (#72564)
Don't fetch tag keys before fetching policies
(cherry picked from commit 31f4eddbb6)
Explore: Do not update URL when time range changes to absolute (#72436)
Allow passing updateURL flag to absolute time range event
(cherry picked from commit 89618e0c0f)
Docs: remove references to `groups_attribute_path` for Okta and GitLab docs (#72588)
remove references to groups_attribute_path for Okta and GitLab
(cherry picked from commit b96d6e2c8d)
docs: fix broken links (#72582)
* docs: fix broken link
To reflect changes on plugin-tools site
* fix more links
(cherry picked from commit d250927850)
Co-authored-by: David Harris <david.harris@grafana.com>
docs: add advanced data source picker option in Explore (#72412)
* updated screenshots in explore index page
* add advanced data picker option to jaeger, tempo, and zipkin data source docs
* Revert changes to data source files
Reverting changes to data source files to maintain scope of this PR as just updating Explore. Changes to other areas where DS picker has been updated will be addressed on another PR when that scope has been decided.
* Fixed indentation and made advanced ds picker language more robust
(cherry picked from commit 0c072770ca)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
CI: Make RGM the main pipeline for prerelease (#72295)
* Make RGM the main pipeline for prerelease
* Use grafana/grafana-build:dev-bd41660
* Use grafana/grafana-build:dev-fda506a
* Fix destination url
* Update vault secrets
* Move bucket path to environment
* Use grafana/grafana-build:dev-2f36afa
* Revert to grafana/grafana-build:main
* Add repo to rgm_main trigger
(cherry picked from commit 971f5f14be)
Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
Data sources: Dashboards page now loads correctly from direct url (#72264)
* ensure DataSourceDashboardsPage initialises data source settings
* fix unit test
* apply suggestions from review
(cherry picked from commit 7406c4ff51)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Chore: Refactor error when retrieving the plugin manifest key (#72492)
(cherry picked from commit a331c892a0)
Co-authored-by: Andres Martinez Gotor <andres.martinez@grafana.com>
@@ -1294,7 +1294,7 @@ This option to group query variable values into groups by tags has been an exper
**Deprecation warnings**
- Scripted dashboards is now deprecated. The feature is not removed but will be in a future release. We hope to address the underlying requirement of dynamic dashboards in a different way. [#24059](https://github.com/grafana/grafana/issues/24059)
- The unofficial first version of backend plugins together with usage of [grafana/grafana-plugin-model](https://github.com/grafana/grafana-plugin-model) is now deprecated and support for that will be removed in a future release. Please refer to [backend plugins documentation](https://grafana.com/docs/grafana/latest/developers/plugins/backend/) for information about the new officially supported backend plugins.
- The unofficial first version of backend plugins together with usage of [grafana/grafana-plugin-model](https://github.com/grafana/grafana-plugin-model) is now deprecated and support for that will be removed in a future release. Please refer to [backend plugins documentation](/developers/plugin-tools/introduction/backend-plugins) for information about the new officially supported backend plugins.
@@ -2204,7 +2204,7 @@ In the Loki data source, the dataframe format used to represent Loki logs-data h
### Deprecations
`setExploreQueryField`, `setExploreMetricsQueryField` and `setExploreLogsQueryField` are now deprecated and will be removed in a future release. If you need to set a different query editor for Explore, conditionally render based on `props.app` in your regular query editor. Please refer to https://grafana.com/docs/grafana/latest/developers/plugins/add-support-for-explore-queries/ for more information.
`setExploreQueryField`, `setExploreMetricsQueryField` and `setExploreLogsQueryField` are now deprecated and will be removed in a future release. If you need to set a different query editor for Explore, conditionally render based on `props.app` in your regular query editor. Please refer to https://grafana.com/developers/plugin-tools/create-a-plugin/extend-a-plugin/add-support-for-explore-queries for more information.
# Disabled by default, needs to be explicitly enabled
workload_identity_enabled=false
# Tenant ID of the Azure AD Workload Identity
# Allows to override default tenant ID of the Azure AD identity associated with the Kubernetes service account
workload_identity_tenant_id=
# Client ID of the Azure AD Workload Identity
# Allows to override default client ID of the Azure AD identity associated with the Kubernetes service account
workload_identity_client_id=
# Custom path to token file for the Azure AD Workload Identity
# Allows to set a custom path to the projected service account token file
workload_identity_token_file=
# Specifies whether user identity authentication (on behalf of currently signed-in user) should be enabled in datasources
# that support it (requires AAD authentication)
# Disabled by default, needs to be explicitly enabled
@@ -1059,6 +1088,9 @@ ha_redis_prefix =
# provided, a random one will be generated.
ha_redis_peer_name=
# The maximum number of simultaneous redis connections.
ha_redis_max_conns=5
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port.
ha_listen_address="0.0.0.0:9094"
@@ -1096,8 +1128,8 @@ execute_alerts = true
# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
evaluation_timeout=30s
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence.
max_attempts=3
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. The default value is 1.
max_attempts=1
# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
@@ -1292,6 +1324,8 @@ enabled = true
interval_seconds=10
# Disable total stats (stat_totals_*) metrics to be generated
disable_total_stats=false
# The interval at which the total stats collector will update the stats. Default is 1800 seconds.
total_stats_collector_interval_seconds=1800
#If both are set, basic auth will be required for the metrics endpoints.
# Disabled by default, needs to be explicitly enabled
;workload_identity_enabled = false
# Tenant ID of the Azure AD Workload Identity
# Allows to override default tenant ID of the Azure AD identity associated with the Kubernetes service account
;workload_identity_tenant_id =
# Client ID of the Azure AD Workload Identity
# Allows to override default client ID of the Azure AD identity associated with the Kubernetes service account
;workload_identity_client_id =
# Custom path to token file for the Azure AD Workload Identity
# Allows to set a custom path to the projected service account token file
;workload_identity_token_file =
# Specifies whether user identity authentication (on behalf of currently signed-in user) should be enabled in datasources
# that support it (requires AAD authentication)
# Disabled by default, needs to be explicitly enabled
@@ -1046,8 +1075,8 @@
# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
;evaluation_timeout = 30s
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence.
;max_attempts = 3
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. The default value is 1.
;max_attempts = 1
# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence.
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
@@ -1214,6 +1243,8 @@
;interval_seconds = 10
# Disable total stats (stat_totals_*) metrics to be generated
;disable_total_stats = false
# The interval at which the total stats collector will update the stats. Default is 1800 seconds.
;total_stats_collector_interval_seconds = 1800
#If both are set, basic auth will be required for the metrics endpoints.
Make sure to run `make drone` so that changes to `.star` files are reflected and `drone.yml` is generated.
### Additional files to change
- Take a look in `.github/workflows` folder for what `go` version is being used there in various workflows.
- Make sure to create a PR with the corresponding changes in `grafana/grafana-enterprise` repository.
## Updating the go.mod file
Please avoid updating the `go.mod` to the newest version unless really necessary. This ensures backwards compatibility and introduces less breaking changes. Always upgrade Go version in the runtime files above first, let them run for a couple of weeks and only then consider updating the `go.mod` file if necessary.
@@ -14,4 +14,4 @@ The Drone pipelines are built with [Starlark](https://github.com/bazelbuild/star
- Open a PR where you can do test runs for your changes. If you need to experiment with secrets, create a PR in the [grafana-ci-sandbox repo](https://github.com/grafana/grafana-ci-sandbox), before opening a PR in the main repo.
- Run `make drone` after making changes to the Starlark files. This builds the `.drone.yml` file.
For further questions, reach out to the grafana-delivery squad.
For further questions, reach out to the grafana-release-guild squad.
@@ -48,8 +48,8 @@ Instead, when it is merged & closed then a bot will look for the most appropriat
That milestone should always reflect the branch that the pull request is merged into.
For every major and minor release there is a milestone ending with `.x` (e.g. `10.0.x` for the 10.0.x releases).
Pull requests targetting `main` should use the `.x` milestone of the next minor (or major) version (you can find that version number inside the `package.json` file).
Backport pull requestss should use the version of the target branch (e.g. `9.4.x` for the `v9.4.x` branch).
Pull requests targeting `main` should use the `.x` milestone of the next minor (or major) version (you can find that version number inside the `package.json` file).
Backport pull requests should use the version of the target branch (e.g. `9.4.x` for the `v9.4.x` branch).
Use hook useStyles2(getStyles) to memoize the styles generation and try to avoid passing props to the the getStyles function and instead compose classes using emotion cx function.
Use hook useStyles2(getStyles) to memoize the styles generation and try to avoid passing props to the getStyles function and instead compose classes using emotion cx function.
@@ -76,11 +76,11 @@ docs-rm: ## Remove the docs container.
.PHONY:docs-pull
docs-pull:## Pull documentation base image.
$(PODMAN) pull $(DOCS_IMAGE)
$(PODMAN) pull -q $(DOCS_IMAGE)
make-docs:## Fetch the latest make-docs script.
make-docs:
if[[ ! -f "$(PWD)/make-docs"]];then
if[[ ! -f "$(CURDIR)/make-docs"]];then
echo'WARN: No make-docs script found in the working directory. Run `make update` to download it.' >&2
exit1
fi
@@ -88,27 +88,27 @@ make-docs:
.PHONY:docs
docs:## Serve documentation locally, which includes pulling the latest `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image. See also `docs-no-pull`.
docs:docs-pullmake-docs
$(PWD)/make-docs $(PROJECTS)
$(CURDIR)/make-docs $(PROJECTS)
.PHONY:docs-no-pull
docs-no-pull:## Serve documentation locally without pulling the `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image.
docs-no-pull:make-docs
$(PWD)/make-docs $(PROJECTS)
$(CURDIR)/make-docs $(PROJECTS)
.PHONY:docs-debug
docs-debug:## Run Hugo web server with debugging enabled. TODO: support all SERVER_FLAGS defined in website Makefile.
docs-debug:make-docs
WEBSITE_EXEC='hugo server --bind 0.0.0.0 --port 3002 --debug'$(PWD)/make-docs $(PROJECTS)
WEBSITE_EXEC='hugo server --bind 0.0.0.0 --port 3002 --debug'$(CURDIR)/make-docs $(PROJECTS)
.PHONY:doc-validator
doc-validator:## Run doc-validator on the entire docs folder.
You can create interactive links for Explore visualizations to run queries related to presented data by setting up Correlations.
A correlation defines how data in one [data source]({{< relref "/docs/grafana/latest/datasources/" >}}) is used to query data in another data source. Some examples:
A correlation defines how data in one [data source]({{< relref "../../datasources" >}}) is used to query data in another data source.
Some examples:
- an application name returned in a logs data source can be used to query metrics related to that application in a metrics data source, or
- a user name returned by an SQL data source can be used to query logs related to that particular user in a logs data source
[Explore]({{< relref "/docs/grafana/latest/explore/" >}}) takes user-defined correlations to display links inside the visualizations. You can click on a link to run the related query and see results in [Explore Split View]({{< relref "/docs/grafana/latest/explore/#split-and-compare" >}}).
[Explore]({{< relref "../../explore" >}}) takes user-defined correlations to display links inside the visualizations.
You can click on a link to run the related query and see results in [Explore Split View]({{< relref "../../explore#split-and-compare" >}}).
Explore visualizations that currently support showing links based on correlations:
You can configure correlations using [Administration > Correlation page]({{< relref "/docs/grafana/latest/administration/" >}}) or with [provisioning]({{< relref "/docs/grafana/latest/administration/provisioning" >}}).
You can configure correlations using the **Administration > Correlation** page in Grafana or with [provisioning]({{< relref "../provisioning" >}}).
> **Note:** Correlations are available in Grafana 10.0+ as an opt-in beta feature. Modify Grafana [configuration file]({{< relref "/docs/grafana/latest/setup-grafana/configure-grafana/#configuration-file-location" >}}) to enable the `correlations` [feature toggle]({{< relref "/docs/grafana/latest/setup-grafana/configure-grafana/#feature_toggles" >}}) to use it.
{{% admonition type="note" %}}
Correlations are available in Grafana 10.0+ as an opt-in beta feature.
Modify the Grafana [configuration file]({{< relref "../../setup-grafana/configure-grafana#configuration-file-location" >}}) to enable the `correlations` [feature toggle]({{< relref "../../setup-grafana/configure-grafana#feature_toggles" >}}) to use it.
{{% /admonition %}}
## Example of how links work in Explore once set up
{{< figure src="/static/img/docs/correlations/correlations-in-explore-10-0.gif" caption="Correlations links in Explore" >}}
{{< figure src="/static/img/docs/correlations/correlations-in-explore-10-0.gif" alt="Demonstration of following a correlation link in Grafana Explore" caption="Correlations links in Explore" >}}
Adding access to create correlations for [Viewers and Editors]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/" >}}) is available with [Role-based access control]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/" >}}).
Adding access to create correlations for [Viewers and Editors]({{< relref "../../../administration/roles-and-permissions" >}}) is available with [Role-based access control]({{< relref "../../../administration/roles-and-permissions/access-control" >}}).
@@ -33,7 +33,9 @@ Learn how to create correlations using the [Administration page]({{< relref "./c
## Source data source and result field
Links are shown in Explore visualizations for the results from the correlation’s source data source. A link is assigned to one of the fields from the result provided in the correlation configuration (the results field). Each visualization displays fields with links in a different way ([Correlations in Logs Panel]({{< relref "./use-correlations-in-visualizations#correlations-in-logs-panel">}}) and see [Correlations in Table]({{< relref "./use-correlations-in-visualizations#correlations-in-table">}}))
Links are shown in Explore visualizations for the results from the correlation’s source data source.
A link is assigned to one of the fields from the result provided in the correlation configuration (the results field).
Each visualization displays fields with links in a different way ([Correlations in Logs Panel]({{< relref "./use-correlations-in-visualizations#correlations-in-logs-panel">}}) and see [Correlations in Table]({{< relref "./use-correlations-in-visualizations#correlations-in-table">}})).
## Target query
@@ -41,9 +43,11 @@ The target query is run when a link is clicked in the visualization. You can use
### Correlation Variables
You can use variables inside the target query to access the source data related to the query. Correlations use [Grafana variable syntax]({{< relref "/docs/grafana/latest/dashboards/variables/variable-syntax" >}}). Variables are filled with values from the source results when the link is clicked. There are two types of variables you can use:
You can use variables inside the target query to access the source data related to the query.
Correlations use [Grafana variable syntax]({{< relref "../../../dashboards/variables/variable-syntax" >}}).
Variables are filled with values from the source results when the link is clicked. There are two types of variables you can use:
- [field variables]({{< relref "/docs/grafana/latest/panels-visualizations/configure-data-links#field-variables" >}}) (allows to access field values and labels)
- [field variables]({{< relref "../../../panels-visualizations/configure-data-links#field-variables" >}}) (allows to access field values and labels)
- correlation variables (allows to access field values and transformations)
Example: If source results contain a field called “employee”, the value of the field can be accessed with:
Users with [Viewer base role]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/" >}}) or with [datasources:query RBAC role]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/" >}}) can:
Users with [Viewer base role]({{< relref "../../../administration/roles-and-permissions" >}}) or with [datasources:query RBAC role]({{< relref "../../../administration/roles-and-permissions/access-control" >}}) can:
- Use correlations in Explore’s visualizations
- List all available correlations in read-only mode
- Use correlations in Explore’s visualizations.
- List all available correlations in read-only mode.
Users with [Admin base role]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/" >}}) or with [datasources:write RBAC role]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/" >}}) can:
Users with [Admin base role]({{< relref "../../../administration/roles-and-permissions" >}}) or with [datasources:write RBAC role]({{< relref "../../../administration/roles-and-permissions/access-control" >}}) can:
1. Select a data source that you chose as the source data source of the correlation.
1. Run a query that results in data containing fields required to build variables in the target query.
1. Links are added to cell rows in the column representing the field with the assigned link ([the results field]({{< relref "/docs/grafana/latest/administration/correlations/correlation-configuration#source-data-source-and-result-field" >}}).
1. Links are added to cell rows in the column representing the field with the assigned link ([the results field]({{< relref "../correlation-configuration#source-data-source-and-result-field" >}}).
1. Cells containing multiple links accessible with a context menu.
{{< figure src="/static/img/docs/correlations/correlations-in-table-10-0.png" max-width="600px" caption="Correlations links in table" >}}
@@ -73,7 +73,7 @@ Instructions below show how to set up a link that can run metrics query for the
- Required correlation type (query)
- Target query matching test data source model
- “App metrics” correlation contains the following configuration:
- Alias is set to ${application} variable (note that in provisioning files $ is used to access environment variables so it has to be [escaped]({{< relref "/docs/grafana/latest/administration/provisioning#using-environment-variables" >}})).
- Alias is set to ${application} variable (note that in provisioning files $ is used to access environment variables so it has to be [escaped]({{< relref "../../../administration/provisioning#using-environment-variables" >}})).
- Regular expression transformation is created to extract values from “msg” field
- Regular expression transformation is used to capture the application name from the full name of the service stored in the log line.
- The output of the transformation is mapped to a variable called “application”.
@@ -43,7 +43,7 @@ For links to data source-specific documentation, see [Data sources]({{< relref "
You can configure data source permissions to allow or deny certain users the ability to query or edit a data source. Each data source’s configuration includes a Permissions tab where you can restrict data source permissions to specific users, teams, or roles.
{{% admonition type="note" %}}
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud).
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
{{% /admonition %}}
By default, data sources in an organization can be queried by any user in that organization. For example, a user with the `Viewer` role can issue any possible query to a data source, not just queries that exist on dashboards to which they have access. Additionally, by default, data sources can be edited by the user who created the data source, as well as users with the `Admin` role.
@@ -89,12 +89,12 @@ You can assign data source permissions to users, teams, and roles which will all
When you enable query and resource caching, Grafana temporarily stores the results of data source queries and resource requests. When you or another user submit the same query or resource request again, the results will come back from the cache instead of from the data source.
When using Grafana, a query pertains to a request for data frames to be modified or displayed. A resource relates to any HTTP requests made by a plugin, such as the Amazon Timestream plugin requesting a list of available databases from AWS. For more information on data source queries and resources, please see the developers page on [backend plugins]({{< relref "../../developers/plugins/introduction-to-plugin-development/backend/" >}}).
When using Grafana, a query pertains to a request for data frames to be modified or displayed. A resource relates to any HTTP requests made by a plugin, such as the Amazon Timestream plugin requesting a list of available databases from AWS. For more information on data source queries and resources, please see the developers page on [backend plugins](/developers/plugin-tools/introduction/backend-plugins).
The caching feature works for **all** backend data sources. You can enable the cache globally in Grafana's [configuration]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}), and configure a cache duration (also called Time to Live, or TTL) for each data source individually.
{{% admonition type="note" %}}
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud/).
{{% /admonition %}}
The following cache backend options are available: in-memory, Redis, and Memcached.
@@ -124,7 +124,7 @@ Query caching works for Grafana's [built-in data sources]({{< relref "../../data
To verify that a data source works with query caching, follow the [instructions below](#enable-and-configure-query-caching) to **Enable and Configure query caching**. If caching is enabled in Grafana but the Caching tab is not visible for the given data source, then query caching is not available for that data source.
{{% admonition type="note" %}}
Some data sources, such as Elasticsearch, Prometheus, and Loki, cache queries themselves, so Grafana _query_ caching does not significantly improve performance. However, _resource_ caching may help. See the developers page on [plugin resources]({{< relref "../../developers/plugins/introduction-to-plugin-development/backend/#resources" >}}) for details.
Some data sources, such as Elasticsearch, Prometheus, and Loki, cache queries themselves, so Grafana _query_ caching does not significantly improve performance. However, _resource_ caching may help. See the developers page on [plugin resources](/developers/plugin-tools/introduction/backend-plugins#resources) for details.
{{% /admonition %}}
### Enable and configure query caching
@@ -195,4 +195,4 @@ For more documentation on a specific data source plugin's features, including it
### Create a data source plugin
To build your own data source plugin, refer to the ["Build a data source plugin"](/tutorials/build-a-data-source-plugin/) tutorial and our documentation about [building a plugin](/developers/plugins/).
To build your own data source plugin, refer to the ["Build a data source plugin"](/developers/plugin-tools/tutorials/build-a-data-source-plugin) tutorial and our documentation about [building a plugin](/developers/plugin-tools).
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]({{< relref "#install-a-plugin" >}}) one of the plugins built by the Grafana community, or [build one yourself]({{< relref "../../developers/plugins/" >}}).
You can [install](#install-a-plugin) one of the plugins built by the Grafana community, or [build one yourself](/developers/plugin-tools).
Grafana supports three types of plugins: [panels](/grafana/plugins?type=panel), [data sources](/plugins?type=datasource), and [apps](/grafana/plugins?type=app).
@@ -45,7 +45,7 @@ Applications, or _app plugins_, bundle data sources and panels to provide a cohe
Apps can also add custom pages for things like control panels.
Use app plugins when you want to create an custom out-of-the-box monitoring experience.
Use app plugins when you want an out-of-the-box monitoring experience.
### Managing app plugins access
@@ -100,6 +100,7 @@ To browse for available plugins:
To install a plugin:
1. In Grafana, click **Administration > Plugins** in the side navigation menu to view installed plugins.
1. Click the **All** filter to browse all available plugins.
1. Browse and find a plugin.
1. Click on the plugin logo.
1. Click **Install**.
@@ -171,7 +172,7 @@ Grafana also writes an error message to the server log:
WARN[05-26|12:00:00] Some plugin scanning errors were found errors="plugin '<plugin id>' is unsigned, plugin '<plugin id>' has an invalid signature"
```
If you are a plugin developer and want to know how to sign your plugin, refer to [Sign a plugin]({{< relref "../../developers/plugins/publish-a-plugin/sign-a-plugin.md" >}}).
If you are a plugin developer and want to know how to sign your plugin, refer to [Sign a plugin](/developers/plugin-tools/publish-a-plugin/sign-a-plugin).
@@ -101,7 +101,7 @@ The following tables list permissions associated with basic and fixed roles.
### Alerting roles
If alerting is [enabled]({{< relref "../../../../alerting/set-up/migrating-alerts/opt-out/" >}}), you can use predefined roles to manage user access to alert rules, alert instances, and alert notification settings and create custom roles to limit user access to alert rules in a folder.
If alerting is [enabled]({{< relref "../../../../alerting/set-up/migrating-alerts" >}}), you can use predefined roles to manage user access to alert rules, alert instances, and alert notification settings and create custom roles to limit user access to alert rules in a folder.
Access to Grafana alert rules is an intersection of many permissions:
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.3 and later, and [Grafana Cloud](/docs/grafana-cloud).
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) version 7.3 and later, and [Grafana Cloud](/docs/grafana-cloud).
{{% /admonition %}}
You can enable auditing in the Grafana configuration file.
@@ -30,6 +30,9 @@ Multiple alert instances can be created as a result of one alert rule (also know
Grafana managed alert rules can only be edited or deleted by users with Edit permissions for the folder storing the rules.
If you delete an alerting resource created in the UI, you can no longer retrieve it.
To make a backup of your configuration and to be able to restore deleted alerting resources, create your alerting resources using file provisioning, Terraform, or the Alerting API.
Watch this video to learn more about creating alert rules: {{< vimeo 720001934 >}}
In the following sections, we’ll guide you through the process of creating your Grafana-managed alert rules.
@@ -65,7 +68,10 @@ Define a query to get the data you want to measure and a condition that needs to
1. Add one or more [expressions][expression-queries].
a. For each expression, select either **Classic condition** to create a single alert rule, or choose from the **Math**, **Reduce**, and **Resample** options to generate separate alert for each series.
For details on these options, see [Single and multi dimensional rule]
{{% admonition type="note" %}}
When using Prometheus, you can use an instant vector and built-in functions, so you don't need to add additional expressions.
{{% /admonition %}}
b. Click **Preview** to verify that the expression is successful.
1. Click **Set as alert condition** on the query or expression you want to set as your alert condition.
@@ -91,11 +97,11 @@ To do this, you need to make sure that your alert rule is in the right evaluatio
1. Turn on pause alert notifications, if required.
**Note**:
Pause alert rule evaluation to prevent noisy alerting while tuning your alerts. Pausing stops alert rule evaluation and does not create any alert instances. This is different to mute timings, which stop notifications from being delivered, but still allow for alert rule evaluation and the creation of alert instances.
You can pause alert rule evaluation to prevent noisy alerting while tuning your alerts. Pausing stops alert rule evaluation and does not create any alert instances. This is different to mute timings, which stop notifications from being delivered, but still allow for alert rule evaluation and the creation of alert instances.
{{< admonition type="note" >}}
You can pause alert rule evaluation to prevent noisy alerting while tuning your alerts.
Pausing stops alert rule evaluation and doesn't create any alert instances.
This is different to mute timings, which stop notifications from being delivered, but still allows for alert rule evaluation and the creation of alert instances.
{{< /admonition >}}
1. In **Configure no data and error handling**, configure alerting behavior in the absence of data.
@@ -194,21 +200,21 @@ An alert instance is considered stale if its dimension or series has disappeared
Stale alert instances that are in the **Alerting**/**NoData**/**Error** states are automatically marked as **Resolved** and the grafana_state_reason annotation is added to the alert instance with the reason **MissingSeries**.
@@ -58,19 +58,16 @@ To create recording rules, follow these steps.
- Select your Loki or Prometheus data source.
- Enter a query.
1. Add namespace and group.
- From the **Namespace** dropdown, select an existing rule namespace or add a new one. Namespaces can contain one or more rule groups and only have an organizational purpose. For more information, see [Grafana Mimir or Loki rule groups and namespaces][edit-mimir-loki-namespace-group].
- From the **Namespace** dropdown, select an existing rule namespace or add a new one. Namespaces can contain one or more rule groups and only have an organizational purpose.
- From the **Group** dropdown, select an existing group within the selected namespace or add a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
1. Add labels.
- Add custom labels selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value .
1. Click **Save rule** to save the rule or **Save rule and exit** to save the rule and go back to the Alerting page.
@@ -28,6 +28,9 @@ Create alert rules for an external Grafana Mimir or Loki instance that has ruler
Alert rules for an external Grafana Mimir or Loki instance can be edited or deleted by users with Editor or Admin roles.
If you delete an alerting resource created in the UI, you can no longer retrieve it.
To make a backup of your configuration and to be able to restore deleted alerting resources, create your alerting resources using file provisioning, Terraform, or the Alerting API.
## Before you begin
- Verify that you have write permission to the Prometheus or Loki data source. Otherwise, you will not be able to create or update Grafana Mimir managed alert rules.
@@ -63,7 +66,10 @@ Define a query to get the data you want to measure and a condition that needs to
All alert rules are managed by Grafana by default. To switch to a data source-managed alert rule, click **Switch to data source-managed alert rule**.
1. Select a data source.
1. Select a data source from the drop-down list.
You can also click **Open advanced data source picker** to see more options, including adding a data source (Admins only).
1. Enter a PromQL or LogQL query.
1. Click **Preview alerts**.
@@ -86,7 +92,7 @@ Use alert rule evaluation to determine how frequently an alert rule should be ev
## Add annotations
Add [annotations][annotation-label]. to provide more context on the alert in your alert notifications.
Add [annotations][annotation-label] to provide more context on the alert in your alert notifications.
Annotations add metadata to provide more information on the alert in your alert notifications. For example, add a **Summary** annotation to tell you which value caused the alert to fire or which server it happened on.
@@ -120,15 +126,6 @@ All alert rules and instances, irrespective of their labels, match the default n
@@ -54,10 +54,12 @@ Before Grafana v8.2, the configuration of the embedded Alertmanager was shared a
## Add new nested policy
To create a new notification policy, you need to follow its tree structure. New policies created on the trunk of the tree (default policy), are the tree branches. And, subsequently, each branch can bear their own child policies. This is why you will always be adding a new **nested** policy under either the default policy, or under a already nested policy.
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
1. Click **Notification policies**.
1. From the **Choose Alertmanager** dropdown, select an Alertmanager. By default, the **Grafana Alertmanager** is selected.
1. To add a top level specific policy, go to the Specific routing section and click **+New specific policy**.
1. To add a top level specific policy, go to the Specific routing section (either to the default policy, or to another existing policy in which you would like to add a new nested policy) and click **+New nested policy**.
1. In the Matching labels section, add one or more rules for matching alert labels.
1. In the **Contact point** dropdown, select the contact point to send notification to if alert matches only this specific policy and not any of the nested policies.
1. Optionally, enable **Continue matching subsequent sibling nodes** to continue matching sibling policies even after the alert matched the current policy. When this option is enabled, you can get more than one notification for one alert.
@@ -109,6 +111,6 @@ An example of an alert configuration.
- Create specific routes for particular teams that handle their own on-call rotations.
@@ -65,6 +65,6 @@ Add silences to stop notifications from one or more alert instances or use mute
The difference between the two being that a silence only lasts for only a specified window of time whereas a mute timing recurs on a schedule, for example, during a maintenance period.
@@ -20,7 +20,7 @@ An alert rule is a set of evaluation criteria for when an alert rule should fire
While queries and expressions select the data set to evaluate, a condition sets the threshold that an alert must meet or exceed to create an alert.
An interval specifies how frequently an alerting rule is evaluated. Duration, when configured, indicates how long a condition must be met. The alert rules can also define alerting behavior in the absence of data.
An interval specifies how frequently an alert rule is evaluated. Duration, when configured, indicates how long a condition must be met. The alert rules can also define alerting behavior in the absence of data.
- [Alert rule types][alert-rule-types]
- [Alert instances][alert-instances]
@@ -28,15 +28,15 @@ An interval specifies how frequently an alerting rule is evaluated. Duration, wh
| avg | Reduce / Classic | Displays the average of the values |
| min | Reduce / Classic | Displays the lowest value |
| max | Reduce / Classic | Displays the highest value |
| sum | Reduce / Classic | Displays the sum of all values |
| count | Reduce / Classic | Counts the number of values in the result |
| last | Reduce / Classic | Displays the last value |
| median | Reduce / Classic | Displays the median value |
| diff | Classic | Displays the difference between the newest and oldest value |
| diff_abs | Classic | Displays the absolute value of diff |
| percent_diff | Classic | Displays the percentage value of the difference between newest and oldest value |
| percent_diff_abs | Classic | Displays the absolute value of percent_diff |
| count_non_null | Classic | Displays a count of values in the result set that aren't `null` |
## Alert condition
An alert condition is the query or expression that determines whether the alert will fire or not depending on the value it yields. There can be only one condition which will determine the triggering of the alert.
@@ -108,9 +129,9 @@ When the queried data satisfies the defined condition, Grafana triggers the asso
By default, the last expression added is used as the alert condition.
@@ -22,9 +22,11 @@ To do this, you need to make sure that your alert rule is in the right evaluatio
## Evaluation group
Every alert rule is part of an evaluation group. Each evaluation group contains an evaluation interval that determines how frequently the alert rule is checked. Alert rules within the same group are evaluated one after the other, while alert rules in different groups can be evaluated simultaneously.
Every alert rule is part of an evaluation group. Each evaluation group contains an evaluation interval that determines how frequently the alert rule is checked.
This feature is especially useful for Prometheus/Mimir rules when you want to ensure that recording rules are evaluated before any alert rules.
**Data-source managed** alert rules within the same group are evaluated one after the other, while alert rules in different groups can be evaluated simultaneously. This feature is especially useful when you want to ensure that recording rules are evaluated before any alert rules.
**Grafana-managed** alert rules are evaluated at the same time, regardless of alert rule group. The default evaluation interval is set at 10 seconds, which means that Grafana-managed alert rules are evaluated every 10 seconds to the closest 10-second window on the clock, for example, 10:00:00, 10:00:10, 10:00:20, and so on. You can also configure your own evaluation interval, if required.
**Note:**
@@ -45,7 +47,7 @@ Evaluation will occur as follows:
The state and health of alerting rules help you understand several key status indicators about your alerts.
The state and health of alert rules help you understand several key status indicators about your alerts.
There are three key components: [alert rule state](#alert-rule-state), [alert instance state](#alert-instance-state), and [alert rule health](#alert-rule-health). Although related, each component conveys subtly different information.
@@ -47,7 +47,7 @@ An alert instance can be in either of the following states:
| **Pending** | The state of an alert that has been active for less than the configured threshold duration. |
| **Alerting** | The state of an alert that has been active for longer than the configured threshold duration. |
| **NoData** | No data has been received for the configured time window. |
| **Error** | The error that occurred when attempting to evaluate an alerting rule. |
| **Error** | The error that occurred when attempting to evaluate an alert rule. |
## Alert rule health
@@ -55,13 +55,13 @@ An alert rule can have one the following health statuses:
| **Ok** | No error when evaluating an alerting rule. |
| **Error** | An error occurred when evaluating an alerting rule. |
| **Ok** | No error when evaluating an alert rule. |
| **Error** | An error occurred when evaluating an alert rule. |
| **NoData** | The absence of data in at least one time series returned during a rule evaluation. |
## Special alerts for `NoData` and `Error`
When evaluation of an alerting rule produces state `NoData` or `Error`, Grafana Alerting will generate alert instances that have the following additional labels:
When evaluation of an alert rule produces state `NoData` or `Error`, Grafana Alerting will generate alert instances that have the following additional labels:
@@ -48,6 +48,6 @@ It is also important to make sure that the label set for an alert does not have
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][variables-label-annotation].
@@ -103,15 +103,35 @@ If you were to print the value of the expression with RefID `B` in the summary o
The summary will contain just the value:
```
api has an over 5% of responses with 5xx errors: 6.789%
api has over 5% of responses with 5xx errors: 6.78912%
```
However, while `{{ $values.B }}` prints the number 6.789, it is actually a string as you are printing the object that contains both the labels and value for RefID B, not the floating point value of B. To use the floating point value of RefID B you must use the `Value` field from `$values.B`. If you were to humanize the floating point value in the summary of an alert:
However, while `{{ $values.B }}` prints the number 6.78912, it is actually a string as you are printing the object that contains both the labels and value for RefID B, not the floating point value of B. To use the floating point value of RefID B you must use the `Value` field from `$values.B`.
If you were to print the humanized floating point value in the summary of an alert:
```
{{ $labels.service }} has over 5% of responses with 5xx errors: {{ humanize $values.B.Value }}%
```
The summary will contain the humanized value:
```
api has over 5% of responses with 5xx errors: 6.789%
```
You can also compare the floating point value using the `eq`, `ne`, `lt`, `le`, `gt` and `ge` comparison operators:
```
{{ if gt $values.B.Value 50.0 -}}
Critical 5xx error rate
{{ else -}}
Elevated 5xx error rate
{{ end }}
```
When using comparison operators with `$values` make sure to compare it to a floating point number such as `50.0` and not an integer such as `50`. Go templates do not support implicit type coercion, and comparing a floating point number to an integer will break your template.
### No data, execution errors and timeouts
If the query in your alert rule returns no data, or fails because of a datasource error or timeout, then any Threshold, Reduce or Math expressions that use that query will also return no data or an error. When this happens these expression will be absent from `$values`. It is good practice to check that a RefID is present before using it as otherwise your template will break should your query return no data or an error. You can do this using an if statement:
There are a number of data sources that are compatible with Grafana Alerting. Each data source is supported by a plugin. You can use one of the built-in data sources listed below, use [external data source plugins](/grafana/plugins/?type=datasource), or create your own data source plugin.
@@ -20,75 +20,76 @@ Specifying `{ "alerting": true, “backend”: true }` in the plugin.json file i
These are the data sources that are compatible with and supported by Grafana Alerting.
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json][metadata])
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json](/developers/plugin-tools/reference-plugin-json))
### Metrics from the alerting engine
@@ -108,9 +108,6 @@ When this query is used as the **condition** in an alert rule, then the non-zero
Silences stop notifications from getting created and last for only a specified window of time.
**Note that inhibition rules are not supported in the Grafana Alertmanager.**
{{< admonition type="note" >}}
- Inhibition rules are not supported in the Grafana Alertmanager.
- The preview of silenced alerts only applies to alerts in firing state.
{{< /admonition >}}
## Add silences
@@ -38,7 +42,7 @@ To add a silence, complete the following steps.
1. Click **Create silence** to open the Create silence page.
1. In **Silence start and end**, select the start and end date to indicate when the silence should go into effect and expire.
1. Optionally, in **Duration**, specify how long the silence is enforced. This automatically updates the end time in the **Silence start and end** field.
1. In the **Label** and **Value** fields, enter one or more _Matching Labels_. Matchers determine which rules the silence will apply to.
1. In the **Label** and **Value** fields, enter one or more _Matching Labels_. Matchers determine which rules the silence will apply to. Any matching alerts (in firing state) will show in the **Affected alert instances** field
1. In **Comment**, add details about the silence.
1. Click **Submit**.
@@ -71,4 +75,4 @@ To remove a silence, complete the following steps.
@@ -69,9 +69,7 @@ If screenshots should be uploaded to cloud storage then `upload_external_image_s
# will be persisted to disk for up to temp_data_lifetime.
upload_external_image_storage = false
Please see [`[external_image_storage]`]({{< relref "../../setup-grafana/configure-grafana#external_image_storage" >}}) for instructions on how to configure cloud storage. Grafana will not start if `upload_external_image_storage` is `true` and `[external_image_storage]` contains missing or invalid configuration.
If Grafana is acting as its own cloud storage then `[upload_external_image_storage]` should be set to `true` and the `local` provider should be set in [`[external_image_storage]`]({{< relref "../../setup-grafana/configure-grafana#external_image_storage" >}}).
For more information on image rendering, refer to [image rendering][image-rendering].
Restart Grafana for the changes to take effect.
@@ -141,9 +139,9 @@ For example, if a screenshot could not be taken within the expected time (10 sec
@@ -57,18 +57,19 @@ The following table highlights the key differences between mute timings and sile
## Time intervals
A time interval is a definition for a moment in time. If an alert fires during this interval it will be suppressed. All fields are lists, and at least one list element must be satisfied to match the field. Fields also support ranges using `:` (ex: `monday:thursday`). The fields available for a time interval are: mute timing can contain multiple time intervals. A time interval is a specific duration when alerts are suppressed from firing. The duration typically consists of a specific time range along with days of a week, month, or year.
All properties for the time interval are lists, and at least one list element must be satisfied to match the field. The fields support ranges using `:` (ex: `monday:thursday`). If you leave a field blank, it will match with any moment of time.
A time interval is a specific duration during which alerts are suppressed. The duration typically consists of a specific time range and the days of the week, month, or year.
Supported time interval options are:
- Time range: The time inclusive of the starting time and exclusive of the end time in UTC.
- Time range: The time inclusive of the start and exclusive of the end time (in UTC if no location has been selected, otherwise local time).
- Location: Depending on the location you select, the time range is displayed in local time.
- Days of the week: The day or range of days of the week. Example: `monday:thursday`.
- Days of the month: The date 1-31 of a month. Negative values can also be used to represent days that begin at the end of the month. For example: `-1` for the last day of the month.
- Months: The months of the year in either numerical or the full calendar month. For example: `1, may:august`.
- Years: The year or years for the interval. For example: `2021:2024`.
All fields are lists; to match the field, at least one list element must be satisfied. Fields also support ranges using `:` (e.g., `monday:thursday`).
If a field is left blank, any moment of time will match the field. For an instant of time to match a complete time interval, all fields must match. A mute timing can contain multiple time intervals.
If you want to specify an exact duration, specify all the options. For example, if you wanted to create a time interval for the first Monday of the month, for March, June, September, and December, between the hours of 12:00 and 24:00 UTC your time interval specification would be:
@@ -81,9 +82,9 @@ If you want to specify an exact duration, specify all the options. For example,
@@ -25,15 +25,17 @@ Notification templates are not tied to specific contact point integrations, such
You can use notification templates to:
-Add, remove, or re-order information in the notification including the summary, description, labels and annotations, values, and links
-Format text in bold and italic, and add or remove line breaks
-Customize the subject of an email or the title of a message.
-Add, change or remove text in notifications. For example, to select or omit certain labels, annotations and links.
- Format text in bold and italic, and add or remove line breaks.
You cannot use notification templates to:
-Change how images are included in notifications, such as the number of images in each notification or where in the notification inline images are shown
- Change the design of notifications in instant messaging services such as Slack and Microsoft Teams
- Change the data in webhook notifications, including the structure of the JSON request or sending data in other formats such as XML
-Add or remove HTTP headers in webhook notifications other than those in the contact point configuration
-Add HTML and CSS to email notifications to change their visual appearance.
- Change the design of notifications in instant messaging services such as Slack and Microsoft Teams. For example, to add or remove custom blocks with Slack Block Kit or adaptive cards with Microsoft Teams.
- Choose the number and size of images, or where in the notification images are shown.
-Customize the data in webhooks, including the fields or structure of the JSON data or send the data in other formats such as XML.
- Add or remove HTTP headers in webhooks other than those in the contact point configuration.
For more information on how to write and execute templates, refer to [Using Go's templating language][using-go-templating-language] and [Create notification templates][create-notification-templates].
@@ -83,9 +83,9 @@ You can handle these alerts the same way as regular alerts by adding a silence,
Use the State history view to get insight into how your alert instances behave over time. View information on when a state change occurred, what the previous state was, the current state, any other alert instances that changed their state at the same time as well as what the query value was that triggered the change.
### Configure the state history view
To enable the state history view, see [Configuring alert state history]({{< relref "../set-up/configure-alert-state-history/index.md" >}}).
{{% admonition type="note" %}}
Open source users must configure alert state history in order to be able to access the view.
This applies to Open Source only. There is no configuration required if you are using Grafana Cloud.
{{% /admonition %}}
Starting with Grafana 10, Alerting can record all alert rule state changes for your Grafana managed alert rules in a Loki instance.
This allows you to explore the behavior of your alert rules in the Grafana explore view and levels up the existing state history modal with a powerful new visualisation.
@@ -33,9 +33,10 @@ Since gossiping of notifications and silences uses both TCP and UDP port `9094`,
1. In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the `[unified_alerting]` section.
2. Set `[ha_peers]` to the number of hosts for each Grafana instance in the cluster (using a format of host:port), for example, `ha_peers=10.0.0.5:9094,10.0.0.6:9094,10.0.0.7:9094`.
You must have at least one (1) Grafana instance added to the [`[ha_peer]` section.
You must have at least one (1) Grafana instance added to the `ha_peers` section.
3. Set `[ha_listen_address]` to the instance IP address using a format of `host:port` (or the [Pod's](https://kubernetes.io/docs/concepts/workloads/pods/) IP in the case of using Kubernetes).
By default, it is set to listen to all interfaces (`0.0.0.0`).
4. Set `[ha_peer_timeout]` in the `[unified_alerting]` section of the custom.ini to specify the time to wait for an instance to send a notification via the Alertmanager. The default value is 15s, but it may increase if Grafana servers are located in different geographic regions or if the network latency between them is high
## Enable alerting high availability using Kubernetes
Grafana Cloud Alerting allows you to edit and view configuration for your Alertmanager directly inside of Grafana. See the official [Alertmanager documentation](https://prometheus.io/docs/alerting/latest/configuration/) to learn how to configure.
@@ -28,9 +28,11 @@ There are three options to choose from:
1. Provision your alerting resources using the Alerting Provisioning HTTP API.
For more information on the Alerting Provisioning HTTP API, refer to [Alerting provisioning API]({{< relref "../../../developers/http_api/alerting_provisioning" >}}).
For more information on the Alerting Provisioning HTTP API, refer to [Alerting provisioning HTTP API][alerting_provisioning].
1.Provision your alerting resources using [Terraform](https://www.terraform.io/).
1.{{% admonition type="note" %}}
If you are using Open Source, you can provision your alerting resources using [Terraform](https://www.terraform.io/).
{{% /admonition %}}
**Note:**
@@ -40,14 +42,12 @@ Currently, provisioning for Grafana Alerting supports alert rules, contact point
Create or delete contact points in your Grafana instance(s).
1. Create a contact point in Grafana.
1. Use the [Alerting provisioning API]({{< relref "../../../../developers/http_api/alerting_provisioning" >}}) export endpoints to download a provisioning file for your contact point.
1. Use the [Alerting provisioning API][alerting_provisioning] export endpoints to download a provisioning file for your contact point.
1. Copy the contents into a YAML or JSON configuration file in the default provisioning directory or in your configured directory.
Example configuration files can be found below.
@@ -497,12 +497,12 @@ settings:
Create or reset the notification policy tree in your Grafana instance(s).
1. Create a notification policy in Grafana.
2. Use the [Alerting provisioning API]({{< relref "../../../../developers/http_api/alerting_provisioning" >}}) export endpoints to download a provisioning file for your notification policy.
3. Copy the contents into a YAML or JSON configuration file in the default provisioning directory or in your configured directory.
1. Use the [Alerting provisioning API][alerting_provisioning] export endpoints to download a provisioning file for your notification policy.
1. Copy the contents into a YAML or JSON configuration file in the default provisioning directory or in your configured directory.
Example configuration files can be found below.
4. Ensure that your files are in the right directory on the node running the Grafana server, so that they deploy alongside your Grafana instance(s).
1. Ensure that your files are in the right directory on the node running the Grafana server, so that they deploy alongside your Grafana instance(s).
Here is an example of a configuration file for creating notification policies.
@@ -603,10 +603,10 @@ apiVersion: 1
# List of templates to import or update
templates:
# <int> organization ID, default = 1
- orgID:1
- orgId:1
# <string, required> name of the template, must be unique
name:my_first_template
# <string, required> content of the the template
# <string, required> content of the template
template:Alerting with a custom text template
```
@@ -652,7 +652,7 @@ muteTimes:
- times:
- start_time:'06:00'
end_time:'23:59'
location:'UTC'
location:'UTC'
weekdays:['monday:wednesday','saturday','sunday']
months:['1:3','may:august','december']
years:['2020:2022','2030']
@@ -729,9 +729,9 @@ spec:
This eliminates the need for a persistent database to use Grafana Alerting in Kubernetes; all your provisioned resources appear after each restart or re-deployment. Grafana still requires a database for normal operation, you do not need to persist the contents of the database between restarts if all objects are provisioned using files.
@@ -138,7 +138,7 @@ By default, you cannot edit resources provisioned via Terraform from the UI. Thi
**Note:**
You can re-use the same templates across many contact points. In the example above, a shared template ie embedded using the statement `{{ template “Alert Instance Template” . }}`
You can reuse the same templates across many contact points. In the example above, a shared template ie embedded using the statement `{{ template “Alert Instance Template” . }}`
This fragment can then be managed separately in Terraform:
@@ -353,15 +353,15 @@ When the alert fires, Grafana routes a notification through the policy you defin
For example, if you chose Slack as a contact point, Grafana’s embedded [Alertmanager](https://github.com/prometheus/alertmanager) automatically posts a message to Slack.
Set up your implementation of Grafana Alerting for Cloud.
Grafana Cloud alerts are directly tied to metrics and log data.
They can be configured either using the UI or by uploading files containing Prometheus and Loki alert rules with mimirtool.
Grafana Cloud Alerting's Prometheus-style alerts are built by querying directly from the data source itself.
**Note:**
These are set up instructions for Grafana Alerting Cloud.
To set up Grafana Alerting for Open Source, see [Set up][set-up].
To set up Alerting, you need to:
1. Configure alert rules
- Create Mimir/Loki-managed alert rules and recording rules
2. Configure contact points
- Check the default contact point and update the email address
- [Optional] Add new contact points and integrations
3. Configure notification policies
- Check the default notification policy
- [Optional] Add additional nested policies
- [Optional] Add labels and label matchers to control alert routing
4. [Optional] Integrate with [Grafana OnCall](/docs/oncall/latest/integrations/grafana-alerting) and [Grafana Incident](/docs/grafana-cloud/incident/set-up)
## Advanced set up options
Grafana Alerting supports many additional configuration options, from configuring external Alertmanagers to routing Grafana-managed alerts outside of Grafana, to defining your alerting setup as code.
The following topics provide you with advanced configuration options for Grafana Alerting for Cloud.
### Provision alert rules using mimirtool
Use `mimirtool` to create and upload alert and recording rules to your Grafana Cloud instance.
Once created, you can view these alert and recordiing rules from within the Grafana Cloud Alerting page in the UI.
{{% admonition type="note" %}}
`mimirtool` does _not_ support Loki.
{{% /admonition %}}
Prometheus-style alerting is driven by your Grafana Cloud Metrics, Grafana Cloud Logs, and Grafana Cloud Alerts instances. The Metrics and Logs instance holds the rules definition, while the Alerts instance is in charge of routing and managing the alerts that fire from the Metrics and Logs instance. These are separate systems that must be individually configured in order for alerting to work correctly.
The following sections cover all of these concepts:
- How to upload alerting and recording rules definition to your Grafana Cloud Metrics instance
- How to upload alerting rules definition to your Grafana Cloud Logs instance
- How to configure an Alertmanager for your Grafana Cloud Alerts instance, giving you access to the Alertmanager UI.
**Note:** You need an API key with proper permissions. You can use the same API key for your Metric, Log, and Alerting instances.
#### Download and install mimirtool
`mimirtool` is a powerful command-line tool for interacting with Grafana Mimir, which powers Grafana Cloud Metrics and Alerts. Use `mimirtool` to upload your metric and log rules definition and the Alertmanager configuration using YAML files.
For more information, including installation instructions, see [Grafana Mimirtool](/docs/mimir/latest/operators-guide/tools/mimirtool).
{{% admonition type="note" %}}
For `mimirtool` to interact with Grafana Cloud, you must set the correct configuration variables. Set them using either environment variables or a command line flags.
{{% /admonition %}}
#### Upload rules definition to your Grafana Cloud Metrics and Logs instance
First, you'll need to upload your alerting and recording rules to your Metrics and Logs instance. You'll need the instance ID and the URL. These should be part of /orgs/`<yourOrgName>`/.
**Metrics instance**
Your Metrics instance is likely to be in the `us-central1` region. Its address would be in the form of [https://prometheus-us-central1.grafana.net](https://prometheus-us-central1.grafana.net).
**Logs instance**
Your Logs instance is likely to be in the `us-central1` region. Its address would be in the form of [https://logs-prod-us-central1.grafana.net](https://logs-prod-us-central1.grafana.net).
#### Use mimirtool
With your instance ID, URL, and API key you're now ready to upload your rules to your metrics instance. Use the following commands and files as a reference.
Below is an example alert and rule definition YAML file. Take note of the namespace key which replaces the concept of "files" in this context given each instance only supports 1 configuration file.
```yaml
# first_rules.yml
namespace:'first_rules'
groups:
- name:'shopping_service_rules_and_alerts'
rules:
- alert:'PromScrapeFailed'
annotations:
message:'Prometheus failed to scrape a target {{ $labels.job }} / {{ $labels.instance }}'
expr:'up != 1'
for:'1m'
labels:
'severity':'critical'
- record:'job:up:sum'
expr:'sum by(job) (up)'
```
Although both recording and alerting rules are defined under the key `rules` the difference between a rule and and alert is _generally_ (as there are others) whenever the key `record` or `alert` is defined.
With this file, you can run the following commands to upload your rules file in your Metrics or Logs instance. Keep in mind that these are example commands for your Metrics instance, and they use placeholders and command line flags. Follow a similar pattern for your Logs instances by switching the address to the correct one. The examples also assume that files are located in the same directory.
Output from the print command should look like this:
```yaml
first_rules:
- name:shopping_service_rules_and_alerts
interval:0s
rules:
- alert:PromScrapeFailed
expr:up != 1
for:1m
labels:
severity:critical
annotations:
message:Prometheus failed to scrape a target {{ $labels.job }} / {{ $labels.instance }}
- record:job:up:sum
expr:sum by(job) (up)
```
### Add an external Alertmanager using mimirtool
To receive alerts you need to upload your Alertmanager configuration to your Grafana Cloud Alerts instance. Similar to the previous step, you need the corresponding instance ID, URL and API key. These should be part of /orgs/`<yourOrgName>`/.
Your Alerts instance is likely to be in the `us-central1` region. Its address would be in the form of [https://alertmanager-us-central1.grafana.net](https://alertmanager-us-central1.grafana.net).
#### Use mimirtool
With your instance ID, URL, and API key you're now ready to upload your Alertmanager configuration to your Alerts instance. Use the following commands and files as a reference.
Ultimately, you'll need to [write your own](https://prometheus.io/docs/alerting/latest/configuration/) or adapt an [example config file](https://github.com/prometheus/alertmanager/blob/master/doc/examples/simple.yml) for alerts to be delivered.
Below is an example Alertmanager configuration. Please take that this not a working configuration, your alerts won't be delivered with the following configuration but your Alertmanager UI will be accessible.
```yaml
# alertmanager.yml
global:
smtp_smarthost:'localhost:25'
smtp_from:'youraddress@example.org'
route:
receiver:example-email
receivers:
- name:example-email
email_configs:
- to:'youraddress@example.org'
```
With this file, you can run the following commands to upload your Alertmanager configuration in your Alerts instance.
After you upload a working Alertmanager configuration file, you can access the Alertmanager UI at: https://alertmanager-us-central1.grafana.net/alertmanager.
### Provision alert rules using Terraform
For information on how to provision alert rule using Terraform, see [Provision alert rules using Terraform][terraform-provisioning].
@@ -343,7 +343,7 @@ Here are some of the benefits of create-plugin:
- **Improved testing capabilities:** Testing plugins with @grafana/create-plugin is much easier with GitHub workflows that automate unit and e2e test runs whenever changes are pushed to GitHub.
- **Better documentation:** The [documentation](https://grafana.github.io/plugin-tools/docs/creating-a-plugin) for @grafana/create-plugin is more comprehensive and easier to discover than that of @grafana/toolkit.
- **Better documentation:** The [documentation](https://grafana.github.io/plugin-tools/docs/get-started/) for @grafana/create-plugin is more comprehensive and easier to discover than that of @grafana/toolkit.
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.