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>
"Release: Updated versions in package to 10.0.12"
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, logs per backport
* empty commit to kick actions
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.0.11"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.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: 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>
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)
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)
* make drone
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)
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)
* CI: Update CI/CD tooling and pipelines from main (#76814)
* 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
(cherry picked from commit 03ecb1db39)
* Comment out kindsysreport/codegen/report.go on Makefile
* Remove modfile step, since modowners doesn't exist
* Disable i18n step
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)
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: 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>
[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.0.10"
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>
"Release: Updated versions in package to 10.0.9"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
* Fix all links to "Sign a plugin" pages
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* [publish_dashboards]
* Fix metadata links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* [publish-technical-documentation-next] Publish from grafana/agent:main/docs/sources
* Fix data-frames redirect
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* add collapse shortcode (#15422)
* Add note about missing rewrites
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix all data-frames links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix links to "plugins"
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix links to angular-react
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix "plugin-sdk-go" links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix backend links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix "Add query editor help" links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix some remaining links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Fix some stray links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* [publish_plugins]
* Add missing redirects and fix a couple more links
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Use partial URLs to appease `doc-validator` for now
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-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>
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>
Transformations: Fix partitionByValues when there is no match (#72981)
(cherry picked from commit 8d79d45972)
Co-authored-by: Ludovic Viaud <ludovic.viaud@gmail.com>
"Release: Updated versions in package to 10.0.7"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.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>
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)
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>
* 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)
* Fixes
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)
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>
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>
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>
"Release: Updated versions in package to 10.0.6"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@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>
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>
* Update all use of docs/shared in Grafana to use keyword arguments
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add version inference to remaining Grafana docs/shared usage
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.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
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>
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.0.5"
* Update version to 10.0.5 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>
* SSE: DSNode to update result with names to make each value identifiable by labels (only Graphite and TestData) (#71246)
* introduce a function checkIfSeriesNeedToBeFixed to scan all value fields in the response and provide a function that updates Series so they can be uniquely identifiable. Only Graphite and TestData are checked.
* update `DSNode.Execute` to run this function and provide it to WideToMany
* update WideToMany to run the fix function if it is not nil
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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)
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)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
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>
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>
Update _index.md (#72068)
* Update _index.md
Edits to the "Set up image rendering" doc.
1. First section, "Set up Image Rendering," last paragraph:
"You can also render a PNG by clicking hovering..." -- I removed "clicking" from that sentence.
2. "Alerting and Render Limits" section, link for "concurrent_render_limit" takes you to the page but not the section. This seems to be the case for all section links on this "Configure Grafana" page. I'm not sure how to fix it but switched from a relative link to a full path to see if that would help.
3. "Install Grafana Image Renderer Plugin," the link goes to the plugin overview page instead of the installation page. I tried adding the full path to see if that would go to the installation tab.
4. "Configuration" section, the same as the second edit I made, the first link, "Grafana configuration file," goes to the page but not the section link. I switched the relative path to a full path to see if it would work.
5. "Security" section, the very last sentence has the same Grafana configuration page link that goes to the correct page but not the correct section, "Grafana configuration" for the renderer token section. Same as previous ones, I switched out the relative path for the full path.
6. "Start browser with additional arguments," the second link in the first paragraph that goes to Puppeteer list of Chromium flags went to a 404 page. I couldn't figure out where they had moved it so I found a different site with a list of default flags and used that link instead.
* corrects links
* updates links
* fixes anchor link
---------
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit b88a321ad2)
Co-authored-by: Eva <ebuchala@gmail.com>
* Alerting: Fix state manager to not keep datasource_uid and ref_id labels in state after Error (#72216)
(cherry picked from commit 78fc3bcdf4)
* use old QueryError
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Docs: Loki data sources updates (#72041)
* added new configure loki doc
* finished first draft of config doc
* changed file name
* started updates to query editor
* updated config and qury editor
* updated index doc config doc and query editor
* updated query editor
* updates to query editor doc
* more updates to query editor and index doc
* one small update
* updates to query editor doc and index
* Update docs/sources/datasources/loki/_index.md
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* Update docs/sources/datasources/loki/query-editor/index.md
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* Update docs/sources/datasources/loki/query-editor/index.md
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* Update docs/sources/datasources/loki/query-editor/index.md
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* Update docs/sources/datasources/loki/_index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* made changes suggested in PR
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 443b4b0327)
AzureMonitor: revert Variable Editor region changes (#72306)
* Revert "remove regions/locations from variable editor"
This reverts commit 41dc6a8bfb.
* Revert "remove region pieces from e2e"
This reverts commit 6b1f82f14a.
* e2e: open resource picker correctly
(cherry picked from commit 51b199e986)
Dashboard: New Datasource picker link is keyboard accessible (#72134)
* WIP
* fixes for readability
* fix
* WIP
* Keep tab index working with portal
* Use callback and clean up
* Fix linting errors
* Ignore clickable element
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
(cherry picked from commit cae68b955b)
CI: use the base64 key in the windows installer steps (#72372)
use the base64 key in the windows installer steps
(cherry picked from commit 0c2b2219bb)
Chore: Remove topnav feature flag (#72337)
* Remove topnav feature flag
* Allow deprecated flags to be enabled by default
* change topnav feature flag to deprecated instead
* fix lint
(cherry picked from commit 488eac0e49)
"Release: Updated versions in package to 10.0.4"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
PluginExtensions: Allow to specify unkown properties in override but they will be ignored (#72273)
* fixed bug.
* Update public/app/features/plugins/extensions/getPluginExtensions.ts
Co-authored-by: Ben Sully <ben.sully@grafana.com>
* Update public/app/features/plugins/extensions/getPluginExtensions.test.ts
Co-authored-by: Ben Sully <ben.sully@grafana.com>
* Update public/app/features/plugins/extensions/getPluginExtensions.ts
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
* Update public/app/features/plugins/extensions/getPluginExtensions.test.ts
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
---------
Co-authored-by: Ben Sully <ben.sully@grafana.com>
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
(cherry picked from commit 1755f8c7b7)
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
* Alerting: Fix contact point testing with secure settings (#72235)
Fixes double encryption of secure settings during contact point testing and removes code duplication
that helped cause the drift between alertmanager and test endpoint. Also adds integration tests to cover
the regression.
Note: provisioningStore is created to remove cycle and the unnecessary dependency.
(cherry picked from commit d31d175109)
Update _index.md (#71400)
* Update _index.md
Added missing hyperlink for high availability and a small typo
* updates link
---------
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 4e50115d95)
Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>
* Alerting: Improve performance of matching captures (#71828)
This commit updates eval.go to improve the performance of matching
captures in the general case. In some cases we have reduced the
runtime of the function from 10s of minutes to a couple 100ms.
In the case where no capture matches the exact labels, we revert to
the current subset/superset match, but with a reduced search space
due to grouping captures.
(cherry picked from commit 8dd3eb856d)
* Add label fingerprints from grafana-plugin-sdk-go
* Remove unsafe.StringData as we use Go 1.19
* Fix lint
---------
Co-authored-by: George Robinson <george.robinson@grafana.com>
* CI: Try setting the vault secret for 'grafana_api_key' (#71981)
* Try setting the vault secret
* Maybe?
* forgot .drone.yml
* CI: Use GCP keys in vault and not drone secrets (#72023)
* CI: Run only Grafana builds on RGM for grafana/grafana (#72144)
* Run only OSS builds on RGM for grafana/grafana
* Update script name
* Ignore windows step failure for RGM
---------
Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
CloudMonitoring: Correctly set title and text fields for annotations (#71888)
Correctly set title and text fields
(cherry picked from commit c4d6509145)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
* Prometheus: Fix heatmap query format (#71971)
Check first numeric field instead of name: Value
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
(cherry picked from commit 1c358de190)
* fix conflicts in merge, add ts-ignore to ignore missing name in tests
Loki: Fix e2e flakiness (#69441)
fix loki e2e test flakiness by waiting for requests to finish
(cherry picked from commit b11c264df3)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
AuthNZ documentation revamp (#62581)
* init for base branch
* Add authnz code ownership
* Fix docs ownsership path
* docs revamp: Plan IAM strategy (#62582)
* Add planning page
* Add teams definition
* Expand on planning and benefits
* Add reasons to organize users
* Add description of User Teams
* Add Grafana organizations info
* Add a section between Teams and Orgs
* Add a section for external systems
* planning your role strategy
* Add service account documentation
* Add Auth Setup to index sidebar
* Address PR comments
* Add planning for API keys
* Add team and org sync
* Docs: role and permission section for planning docs (#64702)
* docs revamp: Service accounts (#63710)
* docs revamp: Add new documentation to sidebar index (#66104)
* docs revamp: synchronisation planning (#66409)
* Docs: api keys (#64803)
* Remove personal access tokens section
* Move auth integration planning page
* Remove auth folder
* Restore codeowners file
* reword and update info on user management and grouping
* Rename iam strategy page
* extend the section on teams and organizations
* Rename planning your IAM section
* Move to administration section
* Add definition for role sync
* Relocate planning
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
(cherry picked from commit 63346674e6)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Alerting: Add tests for matching captures (#71928)
This commit adds tests for matching captures, which we do not have
at present.
(cherry picked from commit f1af0502db)
Co-authored-by: George Robinson <george.robinson@grafana.com>
Alerting: Sort NumberCaptureValues in EvaluationString (#71927)
This commit changes extractEvalString to sort NumberCaptureValues
in ascending order of Var before building the output string. This
means that users will see EvaluationString in a consistent order,
but also make it possible to assert its output in tests.
(cherry picked from commit 89dcaaf049)
Co-authored-by: George Robinson <george.robinson@grafana.com>
AzureMonitor: Set timespan in Logs Portal URL link (#71841)
Set timespan in Logs Portal URL link
(cherry picked from commit 116e971af3)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Explicitly set all front matter labels in the source files (#71548)
* Set every page to have defaults of 'Enterprise' and 'Open source' labels
* Set administration pages to have of 'Cloud', 'Enterprise', and 'Open source' labels
* Set administration/enterprise-licensing pages to have 'Enterprise' labels
* Set administration/organization-management pages to have 'Enterprise' and 'Open source' labels
* Set administration/provisioning pages to have 'Enterprise' and 'Open source' labels
* Set administration/recorded-queries pages to have labels cloud,enterprise
* Set administration/roles-and-permissions/access-control pages to have labels cloud,enterprise
* Set administration/stats-and-license pages to have labels cloud,enterprise
* Set alerting pages to have labels cloud,enterprise,oss
* Set breaking-changes pages to have labels cloud,enterprise,oss
* Set dashboards pages to have labels cloud,enterprise,oss
* Set datasources pages to have labels cloud,enterprise,oss
* Set explore pages to have labels cloud,enterprise,oss
* Set fundamentals pages to have labels cloud,enterprise,oss
* Set introduction/grafana-cloud pages to have labels cloud
* Fix introduction pages products
* Set panels-visualizations pages to have labels cloud,enterprise,oss
* Set release-notes pages to have labels cloud,enterprise,oss
* Set search pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/audit-grafana pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-authentication pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/configure-authentication/enhanced-ldap pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-authentication/saml pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/configure-request-security pages to have labels cloud,enterprise,oss
* Set setup-grafana/configure-security/configure-team-sync pages to have labels cloud,enterprise
* Set setup-grafana/configure-security/export-logs pages to have labels cloud,enterprise
* Set troubleshooting pages to have labels cloud,enterprise,oss
* Set whatsnew pages to have labels cloud,enterprise,oss
* Apply updated labels from review
---------
(cherry picked from commit 7eb17bccca)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Docs: fix bullet lists for supported time interval (#67389)
* Docs: fix bullet lists for supported time interval
* Docs: run prettier
(cherry picked from commit b089281255)
Co-authored-by: Rodrigo Petter Daniel <rodrigopetterdaniel@gmail.com>
Auth: update GitHub OAuth documentation (#70459)
* github oauth doc improvements
* add skip_org_role_sync to config for github provider
* update links and section headings
* update the docs based on the first PR
* update references
(cherry picked from commit cb695cef8e)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Auth: Add support for custom signing keys in auth.azure_ad (#71365)
* fallthrough JWKS validation and caching for Azure
* remove unused field
(cherry picked from commit fbfdd6ba32)
Alerting: No longer silence paused alerts during legacy migration (#71596)
* Alerting: No longer silence paused alerts during legacy migration
Now that we migrate paused legacy alerts to paused UA alert rules, we no longer need to silence them.
(cherry picked from commit 8c6cdf51fc)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Plugins: Only configure plugin proxy transport once (#71735)
only configure plugin proxy transport once
(cherry picked from commit b59ca7fb22)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
CI: Re-enable milestone-check (#71718)
This will hopefully resolve stuck PRs until we find a better way to
disable that check.
(cherry picked from commit 44b55a1ca6)
Co-authored-by: Horst Gutmann <horst.gutmann@grafana.com>
Chore: Add auto-milestone workflow for pull-requests (#71177)
This adds a new auto-milestone workflow that will set the milestone for
a PR when it is closed. This way, contributors no longer have to think
about milestone at all.
(cherry picked from commit 8ae92db53d)
* CI: Update and rename pr-patch-mirror-and-apply.yml to sync-mirror.yml (#71608)
* CI: Update and rename pr-patch-mirror-and-apply.yml to sync-mirror.yml
* update CODEOWNERS
(cherry picked from commit 3afc20fae9)
* Add sync-mirror to codeowners
api: ignore /api/gnet proxy when gzipping responses (#71437)
This PR adds /api/gnet to the list of ignored paths in the gzip middleware.
Without this, when gzip is enabled (`server.enable_gzip = true`), responses
from the gnet proxy are double compressed: once by grafana.com and once by
Grafana itself. With this change we only do one round of compression for these
endpoints.
To test this out, try a request like this with `server.enable_gzip = true`
(after setting `GCOM_TOKEN` to a valid grafana.com token; you may need to
change the 'bsull' slug, too):
curl -v --user admin:admin \
-H "X-Api-Key: $GCOM_TOKEN" \
-H 'Accept-Encoding: gzip' \
localhost:3000/api/gnet/instances/bsull/provisioned-plugins/grafana-ml-app | gzip -d
Note that there are two Content-Encoding: gzip headers before this PR, and
the output is still compressed even after the `gzip -d`. After this PR things
look as expected.
(cherry picked from commit 51c94bccd7)
Co-authored-by: Ben Sully <ben.sully@grafana.com>
docs: update nodejs required version (#71469)
* docs: update nodejs required version
* docs: update nodejs version in plugin tutorials
* docs: update to LTS guidance
(cherry picked from commit 3a45f02ef3)
Co-authored-by: David Harris <david.harris@grafana.com>
Docs: Adding alias to package a plugin (#71478)
Adding alias to package a plugin
(cherry picked from commit 471c858e67)
Co-authored-by: Timur Olzhabayev <timur.olzhabayev@grafana.com>
Update info for the Support Bundle (#69419)
* Update info for the Support Bundle
Add in a note that access to the Support Bundle requires Grafana 9.5 and above.
* Make the user/permission restriction more visible since it gets lost a little in the code block
* Run prettier
* Move the new content to Before you begin section
This is the pattern that we're following with other doc topics as well.
* fix a typo
* linting
---------
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
(cherry picked from commit 7f865f627a)
Co-authored-by: Zach Day <zachary.day@grafana.com>
"Release: Updated versions in package to 10.0.3"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Alerting: Fix Alertmanager change detection for receivers with secure settings (#71307)
* Alerting: Make ApplyAlertmanagerConfiguration only decrypt/encrypt new/changed secure settings
Previously, ApplyAlertmanagerConfiguration would decrypt and re-encrypt all secure settings. However, this caused re-encrypted secure settings to be included in the raw configuration when applied to the embedded alertmanager, resulting in changes to the hash. Consequently, even if no actual modifications were made, saving any alertmanager configuration triggered an apply/restart and created a new historical entry in the database.
To address the issue, this modifies ApplyAlertmanagerConfiguration, which is called by POST `api/alertmanager/grafana/config/api/v1/alerts`, to decrypt and re-encrypt only new and updated secure settings. Unchanged secure settings are loaded directly from the database without alteration.
We determine whether secure settings have changed based on the following (already in-use) assumption: Only new or updated secure settings are provided via the POST `api/alertmanager/grafana/config/api/v1/alerts` request, while existing unchanged settings are omitted.
* Ensure saving a grafana-managed contact point will only send new/changed secure settings
Previously, when saving a grafana-managed contact point, empty string values were transmitted for all unset secure settings. This led to potential backend issues, as it assumed that only newly added or updated secure settings would be provided.
To address this, we now exclude empty ('', null, undefined) secure settings, unless there was a pre-existing entry in secureFields for that specific setting. In essence, this means we only transmit an empty secure setting if a previously configured value was cleared.
* Fix linting
* refactor omitEmptyUnlessExisting
* fixup
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
(cherry picked from commit e3787de470)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Elasticsearch: Fix using multiple indexes with comma separated string (#71284)
* Revert "Elasticsearch: Use array of strings as index in backend queries (#67276)"
This reverts commit d0ced39847.
* updated tests
(cherry picked from commit e17540bdcd)
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
Update Public Dashboards documentation (#71276)
The documentation for how to support public dashboards is slightly incorrect.
(cherry picked from commit 899de865fc)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Transformations: Fix `extractFields` throwing Error if one value is undefined or null (#71070)
* fix extract fields with null values
* rename test
* check for null values
* revert changes
* improve position
(cherry picked from commit b05cc2d651)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* CI: Add rgm to drone (#66991)
* add drone stub that build grafana using 'grafana/build' (dagger)
---------
Co-authored-by: Ricky Whitaker <ricky.whitaker@grafana.com>
(cherry picked from commit 768efe9748)
* Add dagger token to rgm builds (#68651)
(cherry picked from commit a870b227db)
* CI: Add GPG keys to rgm, don't clone RGM just use the docker image (#71143)
* Add GPG keys to rgm, dont' clone RGM just use the docker image
* remove the cd command
* forgot to make drone :(
* idk
* reference script more specifically
* i guess we'll just cd /src
* Only show not found artifacts
(cherry picked from commit d5a4c81fa1)
AsyncSegment: Display no-options placeholder for no items status (#70995)
AsyncSegment: Display no options dropdown placeholder for no items status
(cherry picked from commit ad5a36e7a3)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
docs: remove kentik from angular plugins (#71191)
As of v1.7.0 this plugin no longer uses Angular
(cherry picked from commit a9368aab7a)
Co-authored-by: David Harris <david.harris@grafana.com>
Docs: Adding the right syntax highlighting in a few places (#71141)
Adding the right syntax highlighting in a few places
(cherry picked from commit 536146de5f)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Prometheus: Heatmap Format with No Data (#68938)
* Prometheus: Heatmap Format with No Data
* Simplify conditional logic
(cherry picked from commit 0fa991a4b9)
Co-authored-by: Drew Slobodnjak <60050885+drew08t@users.noreply.github.com>
DS Picker: Filter available DS based on component props (#70613)
* Apply filters consistently to every list in the picker
* Display all built-in DS when editing a panel
* Add `uploadFile` prop to toggle the CSV file DS
(cherry picked from commit 6ad9e386ad)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Graphite: Fix infinite loop in text editor when using graphite in a Mixed datasource (#70970)
Fix infinite react state loop exhibited in mixed datasource by stringifying objects in useEffect dependencies
(cherry picked from commit 4217c8057b)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
AzureMonitor: Fix metric names for multi-resources. (#70864)
When building a query for multiple resources only a subset of metrics
are valid and that selection is only available via the API version `2017-12-01-preview`.
fixes#68603
(cherry picked from commit f32f1859a0)
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
docs/serviceaccount.md - Incorrect key "role" for creating token (#68809)
The key "role" in the JSON body doesn't make sense for creating service account *tokens* (and the method will happily create one without it). It is only required for creating the service account itself.
(cherry picked from commit ad8211cce7)
Co-authored-by: Frederic Hemberger <mail@frederic-hemberger.de>
Logs: Do not insert log-line into log-fields in json download (#70901)
* logs: do not insert log-line into log-fields in json download
* fixed test after merge
(cherry picked from commit 2084cc9955)
Fix: Change getExistingDashboardByTitleAndFolder to get dashboard by title, not slug (#70723)
* Fix: Change getExistingDashboardByTitleAndFolder to get dashboard by title, not slug
* test: add tests for get dashboard with existing name, get dashboard with non existing name, get dashboard with existing name in a folder
* Update pkg/services/dashboards/database/database_test.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* require specific error for Should be able to get dashboard with existing name
* Update pkg/services/dashboards/database/database_test.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* implement sofia suggestions to check for specific err, remove logs
* give test more specific name
* implement daniel suggestion of formatting documentation comment in safe way
* fix test title to refer to root directory not specific folder
---------
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
(cherry picked from commit 67cdae4b7d)
Co-authored-by: Kat Yang <69819079+yangkb09@users.noreply.github.com>
* Alerting: Support concurrent queries for saving alert instances (#70525)
This commit adds support for concurrent queries when saving alert
instances to the database. This is an experimental feature in
response to some customers experiencing delays between rule evaluation
and sending alerts to Alertmanager, resulting in flapping. It is
disabled by default.
(cherry picked from commit 7edbe72483)
* remove changes in api_testing.go
---------
Co-authored-by: George Robinson <george.robinson@grafana.com>
Alerting: Convert 'Both' type Prometheus queries to 'Range' in migration (#70781)
* Alerting: Convert 'Both' type Prometheus queries to 'Range' in migration
(cherry picked from commit 00d5f7fed7)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
Alerting: Add limit query parameter to Loki-based ASH api, drop default limit from 5000 to 1000, extend visible time range for new ASH UI (#70769)
* Add limit query parameter
* Drop copy paste comment
* Extend history query limit to 30 days and 250 entries
* Fix history log entries ordering
* Update no history message, add empty history test
---------
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
(cherry picked from commit f94fb765b5)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
* Chore: Generate plugin version and remove lineage version (#69781)
* Generate plugin version and remove lineage version
* Generate version for each major
* Remove pluginVersion from core plugins
* Remove code version generation
* Generate cue files
* Move grafana version into jenny
* fix go import
(cherry picked from commit b0893c29a7)
* Update versions
Variables: Detect a name for duplicated variable (#68110)
* Variables: Detect a name for duplicated variable
* Variables: create copies of copies
(cherry picked from commit db478ced45)
Co-authored-by: Jaryk <ugzuzg@gmail.com>
CI: Ignore .pr-body.txt file (#70798)
This file is used during the backporting process but should never be
committed.
(cherry picked from commit 2b10d31bac)
Co-authored-by: Horst Gutmann <horst.gutmann@grafana.com>
Fix: Create store only once in cli mode (#70391)
fix: create store only once in cli mode
(cherry picked from commit 47b2e7f1d7)
Co-authored-by: Serge Zaitsev <serge.zaitsev@grafana.com>
* Candlestick: Migrate to schema (#62113)
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
(cherry picked from commit 39433b5b9a)
* Revert to old schema structure for 10.0.x to fix build
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Correlations: Account for restricted datasource (#70717)
* Account for restricted datasource
* Allow for fetching datasource to return undefined and beef up filtering after to remove invalid datasources
* Revert "Account for restricted datasource"
This reverts commit 1087159b93.
* Empty-Commit
(cherry picked from commit 2738a3a6da)
Co-authored-by: Kristina <kristina.durivage@grafana.com>
Alerting: Move rule UID from Loki stream labels into log lines (#70637)
Move rule uid into log line to reduce cardinality
(cherry picked from commit 4aa477f48f)
Co-authored-by: William Wernert <william.wernert@gmail.com>
Alerting: Display correct results when using different filters on alerting panels (#70482)
* Trigger separate rules request for each alerting panel in a dashboard
* Add RTK method to fetch prom rules
* Use RTKQuery to get prom rules in UnifiedAlertList
* Fix lint
* Mock promRules call
* Address PR comments
* Fix tests
(cherry picked from commit f17c49e632)
docs: clarifies that only OSS or Enterprise are installed (#70619)
* clarifies that only OSS or Enterprise are installed, not both
* Apply suggestions from code review
(cherry picked from commit f77a886f0e)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
DS Picker: Add missing props and improve autoheight logic (#70393)
* DS Picker: Add `inputId` and `noDefault` options
* DS Picker: Add `disabled` state
* Add tests for `disabled`
* Select default DS if `current` is not provided
* Remove `width` from style
* Move types next to components
* Only calculate height when opening
(cherry picked from commit 3bf8dc1397)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
LogContext: Fix filtering out log lines with the same entry (#70538)
* fix bug with filtering out too many log lines
* fix acts
* remove unused line
(cherry picked from commit 9cf685cfda)
Navigation: Fix toolbar actions flickering on mobile (#70524)
* fix flickering overflow
* set everything to hidden by default
* extend intersectionobserver mock
(cherry picked from commit ff429c9af5)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
"Release: Updated versions in package to 10.0.2"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Explore: Clean up query subscriptions when a query is canceled (#70235)
* Ensure clean up functions are called when query subscriptions are canceled
* Fix unit tests
(cherry picked from commit cb2cc591da)
DataSourcePicker: refactor file drop out of query group (#68236)
* refactor file drop out of query group
* make sure we display errors when file upload fails
* refactor to make onChange take default queries
* let grafana datasource handle file -> query
* add dropdown tests
* add modal tests
* add filtering props to dropdown
---------
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
(cherry picked from commit cf4d86d95f)
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
Docs: changes link text and adds link to the download page (#70477)
achanges link text and add link to the download page
(cherry picked from commit 5426d519c6)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Tracing: supply Grafana build version (#69733)
* tracing: supply Grafana build version
Not etcd client version.
* go mod tidy
(cherry picked from commit c45ff94806)
Co-authored-by: Bryan Boreham <bjboreham@gmail.com>
XYChart: Ensure color scale is field-local and synced with data updates (#70480)
(cherry picked from commit 3007e3b209)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Alerting: Fix TestIntegration_GetAlertRulesForScheduling to make sure rules are created in different org (#69088)
make sure rules are created in different org
(cherry picked from commit b57ef1f2c7)
* Alerting: Fix flaky TestIntegrationUpdateAlertRules (#69106)
Prevents duplicate alert rule ids and 0 value for BaseInterval and IntervalSeconds
(cherry picked from commit 97ae6ae6ef)
* Alerting: Fix unique violation when updating rule group with title chains/cycles (#67868)
* Alerting: Fix unique violation when updating rule group with title chains/cycles
The uniqueness constraint for titles within an org+folder is enforced on every update within a transaction instead of on commit (deferred constraint). This means that there could be a set of updates that will throw a unique constraint violation in an intermediate step even though the final state is valid. For example, a chain of updates RuleA -> RuleB -> RuleC could fail if not executed in the correct order, or a swap of titles RuleA <-> RuleB cannot be executed in any order without violating the constraint.
The exact solution to this is complex and requires determining directed paths and cycles in the update graph, adding in temporary updates to break cycles, and then executing the updates in reverse topological order (see first commit in PR if curious).
This is not implemented here.
Instead, we choose a simpler solution that works in all cases but might perform more updates than necessary. This simpler solution makes a determination of whether an intermediate collision could occur and if so, adds a temporary title on all updated rules to break any cycles and remove the need for specific ordering.
In addition, we make sure diffs are executed in the following order: DELETES, UPDATES, INSERTS.
(cherry picked from commit 0c688190f7)
* Linting
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Explore: Remove storing derived "loading" property (#70324)
* Remove storing derived state (loading property) and use a selector instead
* Remove redundant tests
There's no way to change the interval while live streaming
* Remove check for isLive when deriving waiting for data
It was introduced in #18804
* Remove unused props
(cherry picked from commit a94ba7784a)
Alerting: Add debug logs for EndsAt timestamp (#70336)
This commit adds debug logs for previous_ends_at and next_ends_at
to state.go to help us debug issues where alerts are resolved in
Alertmanager due to expiration. This change is in response to a
support escalation where this information was needed but unavailable.
(cherry picked from commit 815e98ed95)
Co-authored-by: George Robinson <george.robinson@grafana.com>
Docs: List packages together, and fix or add menuTitles. (#70338)
List packages together, and fix or add menuTitles.
(cherry picked from commit a50afe67d3)
Co-authored-by: Ursula Kallio <ursula.kallio@grafana.com>
Tempo: Use pipe in TraceQL by default for multi-value variables (#70051)
* Use pipe in traceQL by default for multi value variables
* Use constant
(cherry picked from commit 06a4b6da62)
Co-authored-by: Joey <90795735+joey-grafana@users.noreply.github.com>
Command palette: Include help links (#70234)
enrich help node with frontend links
(cherry picked from commit db44ba305e)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Variables: allow `{}` type in `VariableWithOptions.current ` (#64358)
(cherry picked from commit 6f880b713a)
Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
Update make-docs procedure (#70265)
## 4.1.0 (2023-06-16)
### Added
- Mounts of `layouts` and `config` directories for the `website` project.
Ensures that local changes to mounts or shortcodes are reflected in the development server.
### Fixed
- Version inference for versioned docs pages.
Pages in versioned projects now have the `versioned: true` front matter set to ensure that "version" in $.Page.Scratch is set on builds.
## 4.0.0 (2023-06-06)
### Removed
- `doc-validator/%` target.
The behavior of the target was not as described.
Instead, to limit `doc-validator` to only specific files, refer to https://grafana.com/docs/writers-toolkit/writing-guide/tooling-and-workflows/validate-technical-documentation/#run-on-specific-files.
## 3.0.0 (2023-05-18)
### Fixed
- Compatibility with the updated Make targets in the `website` repository.
`docs` now runs this script itself, `server-docs` builds the site with the `docs` Hugo environment.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit a4a16b62c7)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Use docs/reference for flexible linking for content reused in Grafana Cloud (#70253)
* Use docs/reference for flexible linking for content reused in Grafana Cloud
Documented in https://github.com/grafana/website/pull/13878
* Use docs-base image that has docs/reference shortcode
---------
(cherry picked from commit 3d15d54a71)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
DS Picker: first item is always active when filtering (#70071)
(cherry picked from commit 6be0ca396f)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Alerting: Fix newlines in text/plain template (#70207)
Alerting: Fix newlines in text/plain template at last
(cherry picked from commit a773b722b1)
Co-authored-by: George Robinson <george.robinson@grafana.com>
Datasources: Extend optional reporting (#69061)
* feat: add default properties to the `reportInteraction()`
* chore: add more tracking events to the ds-config page
* refactor: adding the `path` to the `meta` instaed
(cherry picked from commit 6a995d526a)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
CI: Add CI check for `what's new` link (#70046)
* Add whatsnewchecker
* Add whatsnewchecker_test
* Small fixes
* Add step in CI
* Fix lint
* Fix starlark
* t.Cleanup instead of separate func
* Skip check for test tags
(cherry picked from commit 91272ee4f9)
# Conflicts:
# .drone.yml
Alerting: Fix email template for text/plain emails (#69951)
This commit fixes the email template for text/plain emails to
support custom messages. It also fixes the default template,
removing extra whitespace and showing Summary and Description
annotations separate from the other annotations.
(cherry picked from commit c1e3362e21)
Co-authored-by: George Robinson <george.robinson@grafana.com>
Explore: Fixed Starred query history tab to show all starred queries (#69914)
* Starred queries shouldn't have from and to params
* Update request id when starred is true
* Update tests
(cherry picked from commit a40e589db7)
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
DS Picker: Built-in datasources are not marked as selected (#70020)
(cherry picked from commit 908b248e10)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
CodeEditor: Ensure suggestions only apply to the instance of the editor that registered them (#69995)
* user essentials mob! 🔱
lastFile:packages/grafana-ui/src/components/Monaco/CodeEditor.internal.story.tsx
* user essentials mob! 🔱
lastFile:packages/grafana-ui/src/components/Monaco/suggestions.ts
* user essentials mob! 🔱
lastFile:packages/grafana-ui/src/components/Monaco/CodeEditor.internal.story.tsx
* user essentials mob! 🔱
lastFile:packages/grafana-ui/src/components/Monaco/suggestions.ts
* remove duplicate editor from story
* remove suggestions from story
---------
Co-authored-by: Laura Benz <laura.benz@grafana.com>
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
(cherry picked from commit 61dbad6905)
# Conflicts:
# packages/grafana-ui/src/components/Monaco/CodeEditor.tsx
* grafana/schema: Make composable types part of the package (#69678)
* grafana/schema: Make composable types part of the package
* Add glob as dev dependency
* Review
(cherry picked from commit cae3b4c6e6)
# Conflicts:
# packages/grafana-schema/package.json
# yarn.lock
* Fix cherry pick
NestedFolders: Fix select all in folder view selecting items out of folder (#69780)
* NestedFolders: Fix select all selecting items outside of folder when viewing a folder
* fix lint errors
(cherry picked from commit ff89217d66)
DS Picker: Fix React key issue for built-in data source list (#70018)
(cherry picked from commit bc48622919)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
NPM packages: Fail `build-frontend-packages` step if `package.json` and input tag differ (#70011)
* Fail if package.json version is different than the tag
* Add tests
* Update message
* Small refactoring
* Fix lint
(cherry picked from commit a6b524fd56)
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
* docs: update angular list (#69912)
* docs: update angular list
* Update docs/sources/developers/angular_deprecation/angular-plugins.md
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
---------
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
(cherry picked from commit 8926d616ac)
* docs: update angular list (#69912)
* docs: update angular list
* Update docs/sources/developers/angular_deprecation/angular-plugins.md
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
---------
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
(cherry picked from commit 8926d616ac)
Dashboards: Remove Explore option from panel menu when panel's datasource uid is "-- Dashboard --" (#69017)
* Remove Explore option from panel menu when panel's datasource uid is "-- Dashboard --"
* Use the constant SHARED_DASHBOARD_QUERY
(cherry picked from commit 3fd04edd81)
Co-authored-by: Haris Rozajac <58232930+harisrozajac@users.noreply.github.com>
Command Palette: Links opened in a new tab now route correctly when Grafana is served under a subpath (#69845)
don't strip base from url since we're not using locationSrv.push anymore
(cherry picked from commit 9eb8ec9fa9)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Heatmap: Sort fields by numeric names when single frame (#69879)
(cherry picked from commit cc8bedc173)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Alerting: Add image URI annotation only when there's an image (#69825)
* Alerting: Add image URI annotation only when there's an image
* fix function name (changed on main branch)
(cherry picked from commit ff3e028a85)
* Update compat_test.go
---------
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* Tempo/ServiceGraph: Specify explicit field types (#69759)
Assign field types to service graph fields
(cherry picked from commit 1696bc201e)
* fix merge
Service accounts: API key migration refactoring to parse as json object of the results (#69771)
refactoring to parse as json object of the results
(cherry picked from commit 5dceb5dff3)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Prometheus: Fix series to rows frame name issue for custom name from legend option (#69343)
* use custom name from legend
* revert prometheus change
* fix issue in the transformer and not prometheus
* getFrameDisplayName falls back to getFieldDisplayName already
* run prettier
(cherry picked from commit 32f27d10ff)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
docs: Azure doc link update (#69749)
Update index.md
Link update
(cherry picked from commit 3e48c0b570)
Co-authored-by: Jan Garaj <jan.garaj@gmail.com>
CloudMonitoring: Improve parsing of GCM labels (#69800)
Update parsing of GCM labels
- Include parsing of metadata labels
(cherry picked from commit 9fc1de62d5)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
docs: whats new breaking changes updates (#69489)
* make breaking changes note more prominent in whats new
* changed paragraph structure and added heading
* moved breaking changes section to after the template
* move deprecations to breaking changes page
* break up paragraph
* run prettier
(cherry picked from commit 365fd67c3f)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Alerting: Change text on cloud AM email addresses for contact points (#68143)
(cherry picked from commit e1ff434917)
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Service accounts: UI migration results (#68789)
* ui migration WIP
* merge
* migration tests for api
* revert chagnes to align with main
* revert chagnes to align with main
* revert chagnes to align with main
* remove unused code and comments
* revert gen files
* retry logic inplace
* fix a any
* fixed types
* migraiton results now show only result if no failures
* review comments
* wording to make it more actionable
* add migraiton summary text onyl for failed apikeys
* fixed wording and added a close button to the modal
* made the button close the modal
* moved state into component
* fix based on review, naming and removed unused code
* service account migration state optional
* making migration result undefined
* showing total and migrated numbers for a successful migration
* fix payload const to take the payload
(cherry picked from commit 081f59feba)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Docs/docker compose update (#64565)
* added CLI in heading for clearity
* added new heading
* new change
* updated final version for review
* fix small line breaks
* copy edit, restructuring
* Apply suggestions from code review
* Apply suggestions from code review
* removed internal notes
* updateding the docker configuraiton file which have advanced instructions
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* updated persistent stroage section
* updated heading typo
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* fixed code identation and minor typos
* added yaml file validation check in the troubleshooting section
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
added "also"
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* add more details to apline, cloudwatch and default path sections
* Apply suggestions from code review
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* added more detailes about docker ubuntu image, fixed headings, added more clarity to the persistent vs bind stroage
* Apply suggestions from code review
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* added more improvements for the examples
* Update docs/sources/setup-grafana/installation/docker/index.md
* Update docs/sources/setup-grafana/installation/docker/index.md
* Update docs/sources/setup-grafana/installation/docker/index.md
* Update docs/sources/setup-grafana/configure-docker.md
* updates links, edits Troubleshooting section
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Dan Cech <dcech@grafana.com>
* fixes doc-validator issues
* adds link to plugin install instructions
* added improvement in the AWS cloudwatch example
* Update docs/sources/setup-grafana/configure-docker.md
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Apply suggestions from code review
suggestions looks good
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* added dan suggestion for the tags, but skip the longer description part as not really useful for end user
* Update docs/sources/setup-grafana/installation/docker/index.md
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Dan Cech <dcech@grafana.com>
* Update docs/sources/setup-grafana/configure-docker.md
Co-authored-by: Dan Cech <dcech@grafana.com>
* Apply suggestions from code review
looks good
Co-authored-by: Dan Cech <dcech@grafana.com>
* added missing version
* fixed identation and small typo
* fixed the pwd data folder instruction
* fixed persistent volume creating and identation
* fixed identation
* fixed typo to get debug logs
* fixed custom plugin installation section
* created docker secret command instructions
* fixed missing path
* fixed code in docker secret and other minor typos
* incorporates feedback, copy edits secrets section
* fixed small typo in docker secrets section
* remove the additonal info command for secrets
* combined custom docker pre-installed plugin section as one
* fixed the build link typo
* various updates/fixes
* another fix
* added more clarity to the volume creating command
* fixed command for bind mounts
* fixed missing comman in the plugin command
* fixed small typo
* improve and simplifly the steps instructions
* fixed validation command
* Apply suggestions from code review
looks good!!
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* fixed typo in docker secret command explaination
* fixed minor stuff
* makes prettier
---------
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Dan Cech <dcech@grafana.com>
(cherry picked from commit d50e50be28)
Co-authored-by: Usman Ahmad <usman.ahmad@grafana.com>
docs: improvements to visualizations docs (#69503)
* made changes from PR 67118
* made changes from PR 67123
* made some changes from PR 67128
* made changes from PR 67129
* made changes from PR 67133
(cherry picked from commit 337ffd3015)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Alerting: Fix broken UI because of query being optional for some ExpressionQuer… (#69650)
* Fix broken UI because of query being optional for some ExpressionQuery coditions field
* Delete query field from conditions in utils.test.ts
(cherry picked from commit 848eb01a89)
Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
Auth: Skip org role sync moved in docs (#69676)
skip org role sync moved in docs
(cherry picked from commit 498f8ea4ea)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Docs: Remove duplicate word in edit panel of configure panel options (#69592)
Documentation: Remove duplicate word in edit panel of configure panel options
(cherry picked from commit f20a8eb2a7)
Co-authored-by: SatVeer Singh <developer.satveer@gmail.com>
Backport: Schema: Improve Dashboard kind docs and remove deprecated props (#69359)
Removes unused properties:
* `FieldColorModeId.PaletteSaturated`: It doesn't exist and it is not a valid palette.
* `VariableModel.rootStateKey`: It is not persisted in the DB, so it shouldn't be in the schema. It is a property only used in the frontend to store the Redux store key.
* `VariableModel.error`: It is not persisted in the DB, so it shouldn't be in the schema. It is a property only used in the frontend to store fetching errors.
* `Panel.thresholds`: old property only existing in previous versions of the dashboard schema.
* `Panel.timeRegions`: old property only existing in previous versions of the dashboard schema.
(cherry picked from commit 819041c732)
[DOC] Tracing: Add doc for Tempo Search query (#68923)
* Add doc for Tempo Search query
* Updates for wording and images
* Add note to Explore about query editor for tracing
* Fix prettier
* Apply suggestions from code review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Update docs/sources/shared/datasources/tempo-search-traceql.md
* Changes from prettier
* Update docs/sources/shared/datasources/tempo-search-traceql.md
* Update docs/sources/shared/datasources/tempo-search-traceql.md
* Updates from prettier
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 34ba2ddd84)
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
Prevent crash while executing concurrent mixed queries (#874)
limit parallel query execution to 1 at a time
(cherry picked from commit 96579a60e19e2a9f2d6bdaeba64e0e702211eb73)
Co-authored-by: Michael Mandrus <41969079+mmandrus@users.noreply.github.com>
Require alert.notifications:write permissions to test receivers and templates (#865)
(cherry picked from commit 3c21ab70075256d4ba8e4fbfdcb15f5a394161fa)
Co-authored-by: George Robinson <george.robinson@grafana.com>
Use doc-validator v3.0.0 (#69544)
- Structured output for use with [`reviewdog`](https://github.com/reviewdog/reviewdog).
You can achieve the original error output by piping the output to the following `jq` expression: `jq -r '"ERROR: \(.location.path):\(.location.range.start.line):\(.location.range.start.column): \(.message)"'`.
- Suggestions for simple link fixes.
In GitHub, [`reviewdog`](https://github.com/reviewdog/reviewdog) comments these suggestions for convenient replacement.
- Support for anchors referring to repeated headings.
In the case that a page has multiple headings that share the same text, a zero indexed, the renderer appends a numbered suffix to the identifier.
For example, when there are two headings that are both "Heading text", the first anchor identifier is `heading-text` and the second is `heading-text-1`.- Error when running `doc-validator` on no files.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit c46395ad88)
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
docs: add datasource selector content (#69280)
* updated create dashboard topic including adding screenshot of DS selector
* finished editing build dashboards - create dashboards
* finished data source selection edits'
:
* updated tutorials
* reverted tutorial to old nav to match reality and added that prom DS is preselected
* wording edits
* Apply suggestions from code review
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* add that configure DS is only for admins
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 865636993f)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
CloudMonitoring: Correctly set new query on type change (#69573)
Correctly set new query on type change
(cherry picked from commit 7bd85faa7f)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
This commit adds heuristics back to datasource healthchecks as
it was removed in #66198. The healthcheck for Prometheus datasources
also returns the kind (Prometheus or Mimir) and a boolean if the
ruler is enabled or disabled.
SparklineCell: Allow specifying time range (#69130)
add timeRange optional prop to Table and TablePanel
(cherry picked from commit 283c1c7dbe)
Co-authored-by: Domas <domasx2@gmail.com>
Alerting: Fix provisioned templates being ignored by alertmanager (#69485)
* Alerting: Fix provisioned templates being ignored by alertmanager
Template provisioning sets the template in cfg.TemplateFiles while a recent change
made it so that alertmanager reads cfg.AlertmanagerConfig.Templates instead.
This change fixes the issue on both ends, by having provisioning set boths fields and
reverts the change on the alertmanager side so that it uses cfg.TemplateFiles.
(cherry picked from commit c16f1f5e99)
Docs: Bring back the alias for external group sync HTTP API page (#69434)
* Docs: Bring back the alias for external group sync HTTP API page
* Update docs/sources/developers/http_api/team_sync.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 0e5e5175b1)
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
Docs: Rename External Group Sync references to Team Sync (#69395)
(cherry picked from commit 8235f774aa)
Co-authored-by: Vardan Torosyan <vardants@gmail.com>
Log Context: Fix split view button using the wrong query (#69369)
* fix wrong query used in split button
* refactor into one function
* don't act?
(cherry picked from commit cb4ad588b9)
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
Pyroscope: Fix wrong defaults when importing query from different datasource (#69307)
(cherry picked from commit fb904852af)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Alerting: Fix matching labels with spaces in their values (#68909)
Fix matching labels with spaces in their values
(cherry picked from commit fb7993d021)
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Alerting: Smaller fixes for long namespace / group names (#69095)
(cherry picked from commit 7e924e0d74)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Grafana UI: Fix plugin unit test errors (#69210)
* fix(grafana-ui): import from package to prevent import errors occurring in plugin tests
* style(grafana-ui): add e2e-selectors path to restricted imports rule
(cherry picked from commit 82f353c696)
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
fix: Chef cookbook has moved to sous-chefs (#68425)
* fix: Chef cookbook has moved to sous-chefs
Updates the github link for the chef configuration option.
* Update docs/sources/administration/provisioning/index.md
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 1ff5170c83)
Co-authored-by: Jason Field <Jason@avon-lea.co.uk>
PublicDashboards: Revoke public URL from audit table fix (#69032)
(cherry picked from commit 38fa41f51f)
Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
SQLStore: Align SQLite IsUniqueConstraintViolation() with other backend implementations (#69224)
* Add integration test for primary key and unique constrain violation
* Align SQLite IsUniqueConstraintViolation implementation with other backends
(cherry picked from commit 74e87ccbbd)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
Docs: Update the service account HTTP API documentation (#63235)
* doc: Add the service account deletion function
* doc: Add new service account documentation
(cherry picked from commit 4aa207ed83)
Co-authored-by: Pascal Zimmermann <pascal.zimmermann@theiotstudio.com>
Themes: Unify secondary button and ToolbarButton (#68250)
* Themes: Unify secondary button and ToolbarButton
* Update
* Update light theme
* fix test
* fix toolbar button border
* fix disabled outline button style
* Use transparent color instead of dynamic computed color for hover bg for text/outline versions. this is what figma components do
(cherry picked from commit d4df5e0519)
Query Editor: Ensure dropdown menus position correctly (#69062)
prevent showing menu until options have loaded
(cherry picked from commit c55c091145)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
[Timeseries] Place legend to bottom when on <lg display (#69045)
Place timeseries legend to bottom when on <lg display
(cherry picked from commit f515d2efac)
Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
TimeSeries: Fix centeredZero y axis ranging when all values are 0 (#69034)
(cherry picked from commit 014126a43e)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Alerting: Fix provenance guard checks for Alertmanager configuration to not cause panic when compared nested objects (#69009)
* fix current settings parsed as new
* replace map comparison with cmp.Diff and log the diff
(cherry picked from commit e00260465b)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
Auth: Fix visibility of the Invite button on /admin/users page (#68991)
* Fix for invite button visibility
* Align test
(cherry picked from commit df4db412cb)
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Alerting: Add support for Alert State History Loki primary (#69065)
add support for multiple ash targets with loki as primary
(cherry picked from commit 73681a251e)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Docs: Add JSON format for webhook notifications to differences (#68786)
(cherry picked from commit 65e2df7a2e)
Co-authored-by: George Robinson <george.robinson@grafana.com>
update prometheus query editor doc (#68595)
* initial updates to outdated info
* minor edits prior to draft PR
* commented out options no longer available
* additional edits
* removed tables, changed format to list
* updated code mode section
* finished edits to builder mode
* added revisions per Brendan
* removed commented out section
* added note short codes
(cherry picked from commit 3edeafa663)
Co-authored-by: lwandz13 <126723338+lwandz13@users.noreply.github.com>
InfluxDB: Fix adding FROM statement when the measurement is an empty string (#67827)
* If the measurement empty don't add FROM statement
* Add comment line
(cherry picked from commit 764f87b485)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Plugins: Correct the usage of mutex for gRPC plugin implementation (#68555)
correct usage of mutex
(cherry picked from commit bb6ec1470d)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
AzureMonitor: Support multi-resource aliases and subscription aliases (#68648)
Update legend aliases
- Add subscription response type
- Update AzureMonitorQuery type
- Update docs
- Update tests
- Add function to retrieve subscription display name if not present
(cherry picked from commit bca8428f63)
Docker: Add `mode` label when building docker images (#68865)
Add mode label when building docker image
(cherry picked from commit bad570ee86)
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
OpenTSDB: use an effect to get aggregators and filters (#68785)
* only update state if it's different
* use an effect
(cherry picked from commit 2cbd7f1be6)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Alerting: Fix stale query preview error (#68619)
* Use mutable ref to keep queries to be previewed to prevent stale state
* Extract code related to AlertQueryRunner to a separate hook
* Use hooks form state to keep fresh queries, fix recording rules preview
* Remove unused import
* Update query update explanation
(cherry picked from commit b37a6e9d4c)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Prometheus: Update schema with legendFormat and intervalFactor (#68687)
add legendFormat and intervalFactor to the schema
(cherry picked from commit 670c987409)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Graph: Fix bug with showing/hiding the legend (#68774)
* don't unmount the root when hiding the legend
* update comment
(cherry picked from commit 0b6c5722a5)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Alerting: Add additional contact points for external AM (#67920)
(cherry picked from commit a44ac0ed63)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
CI: Run `trigger-test-release` only on PRs against main (#68794)
Run trigger-test-release only on PRs against main
(cherry picked from commit 623c014cda)
# Conflicts:
# .drone.yml
# Conflicts:
# .drone.yml
Docker images: Don't fail if a PR comes from a fork (#68765)
* Update grabpl
* Allow publish images to fail for PRs
(cherry picked from commit 04e2d9055d)
# Conflicts:
# .drone.yml
fix: Use fall back alert type for data source healthcheck alert when status is not recognised (#68650)
(cherry picked from commit 39e57489a1)
Co-authored-by: Andriy <andriy.urbanas@grafana.com>
AzureMonitor: Ensure legacy properties containing template variables are correctly migrated (#68697)
* Update migration ordering
- Update migration in applyTemplateVariables to account for interpolation from expression datasource
- Update mock to ensure overrides are passed through correctly
- Update tests
- Update migrateQuery function name for clarity
* Fix tests
* Remove comment
(cherry picked from commit 0be29b4c78)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
RBAC: Remove legacy AC editor and admin role on new dashboard route (#68762)
remove legacy AC editor and admin role on new dashboard route
(cherry picked from commit 94283f5039)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
fixed broken table format in docs (#68711)
* fixed broken table format in docs
* added prettier version of doc
(cherry picked from commit dc656ecd8a)
Co-authored-by: Krishna Dutt Panchagnula <krishnadutt123@gmail.com>
Clarify Graphite version and type to set if using Grafana Cloud (#68239)
* Clarify Graphite version and type to set if using Grafana Cloud
* Update _index.md
(cherry picked from commit 9f7f82c3cc)
Co-authored-by: Fiona Liao <fiona.y.liao@gmail.com>
Nested folders: only stop recursing up the tree if we hit a folder (#68676)
only stop recursing up the tree if we hit a folder
(cherry picked from commit 0a44793390)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Service graph: Fix error when service graph metrics are aggregated (#68613)
make service graph work with aggregated metrics
(cherry picked from commit e1c2eb8c10)
Co-authored-by: Domas <domasx2@gmail.com>
Chore: Ignore unique constrain failure when creating the main organization (#68644)
Chore: Ignore unique constrain failure when creatin the main organization
(cherry picked from commit 633b7875e7)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
NodeGraph: Fix overlaps preventing opening an edge context menu when nodes were too close (#68571)
(cherry picked from commit 14936f85df)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Elasticsearch: Handle no-index case in backend mode (#68534)
* elastic: backend migration: fix no-index case
* improved code
(cherry picked from commit fcef387151)
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* Elasticsearch: Fix passing of limit and datalinks to logs data frame (#68554)
* Elasticsearch: Fix passing of limit and datalinks to logs data frame
* Update public/app/core/logsModel.ts
Co-authored-by: François Massot <francois.massot@gmail.com>
---------
Co-authored-by: François Massot <francois.massot@gmail.com>
(cherry picked from commit dbbbc46351)
* Add missing comment
TopNav: Tone down shadow a bit in light theme (#68282)
* TopNav: Tone down shadow a bit in light theme
* softer shadow
(cherry picked from commit 5f84dad7e4)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
NestedFolders: make sure DashboardPage code is feature toggled correctly (#68602)
make sure DashboardPage code is feature toggled correctly
(cherry picked from commit bbb6795757)
AzureMonitor: Traces updates (#68462)
* Use fully qualified resource identifiers
* Add additional data link to explore parent span
* Correctly order links to not break trace logs functionality
(cherry picked from commit bf75969794)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
elastic: more tests (#68533)
* elastic: more tests
* fix lint error
(cherry picked from commit 6189f48be7)
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
NestedFolders: Show Dashboard and Folder full breadcrumb hierarchy (#68308)
* update FolderDTO to match backend struct
* hacky way to get folder page breadcrumbs working
* hacky way to get dashboard nested breadcrumbs working
* undo route changes, get url from folder
* fix breadcrumbs in dashboard settings
* add parent pages to navIndex
* adjust getRootSectionForNode to just return the parent of a leaf node
* undo changes to generated files
* undo changes to toggles_gen.go
* feature toggle dashboardInit code
* remove unnecessary code in home dashboard
* build navModel directly, don't use getNavModel
* don't need fallback here
* remove getLoadingNav since it's not used anymore
* don't need to hide tabs from breadcrumbs anymore
* use id to find dashboards tab
(cherry picked from commit 82114cb316)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Nested folders: Allow renaming a folder multiple times (#68379)
Return folder version in response that is required for updating
the entry in the dashboard table.
(cherry picked from commit d458292b66)
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
DataLinks: Ensure replaceVariables provided to link.onBuildUrl is bound to data frame variables (#68371)
* bind variable replacer provided to link.onBuildUrl to data frame vars
* revert internal link change
(cherry picked from commit bb2cbd2e01)
PanelQueryRunner: Ensure same transformations before reusing lastProcessedFrames (#68498)
(cherry picked from commit 8ba1762618)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
AzureMonitor: Update docs with Traces information (#68104)
* Update docs for traces
- Include note on timespan changes for logs queries
* Review
* Review
(cherry picked from commit 778a09eaa7)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
ToolbarButtonRow: prevent closure of overflow menu when interacting with portal elements (#68319)
* don't close the overflow menu when interacting with something in a portal
* keep overflow ref logic
(cherry picked from commit 5d91ace745)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Nested folders: Clear selection state when navigating to a different folder (#68438)
* clear selection state when navigating to a different folder
* consolidate useEffects
(cherry picked from commit 7e3c68d3c1)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
FlameGraph: Fix table sort being reset when search changes (#68409)
(cherry picked from commit a0942bd1df)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Search: Fix Search returning results out of order (#68370)
* Search: Fix Search returning results out of order
* test
(cherry picked from commit 78afddebbf)
* Add/Edit Panel: Enable new DS picker toggle by default (#68380)
(cherry picked from commit ede8df846e)
---------
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Drawer: Introduce a size property that set's width percentage and minWidth (#67809)
* Drawer: Introduce drawer size that sets width and min-width
* media queries
* Change large drawer to 75%
* Change news drawer to medium as the news items have better layout then with images on the side
* Tweaks and fixed inline drawer issue
* review fixes
* Deprecate inline, update mdx docs
* remove inline var
(cherry picked from commit 20217db100)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Command Palette: Prevent stale search results from overwriting newer results (#68377)
* only update the state if this is the most recent request
* fix empty state as well
* improve perf of recent dashboards
(cherry picked from commit 446885bd1a)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Settings: Add ability to override `skip_org_role_sync` with Env variables (#68364)
Switch to using the SectionsWithOverride for settings for skip org role sync
(cherry picked from commit 1a79c8a601)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Navigation: Add keyboard shortcut to navigate directly to Dashboards (#68350)
* add go to dashboards keybinding
* add shortcut to keybindings modal
(cherry picked from commit 4f987a4a5d)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
CI: Add `.drone.yml` in pathschanged trigger for `lint_backend` pipeline (#68348)
Add .drone.yml in pathschanged for lint_backend
(cherry picked from commit b7b13067a5)
# Conflicts:
# .drone.yml
SAML UI: Adds documentation link to the Authentication UI (#68062)
* adds documentation link to the saml ui
* add correct link
* add link to docuemntation
* add documentation etxt
* documentation update wordings
(cherry picked from commit 09d7d25c9f)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Pyroscope: Add authentication when calling backendType resource API (#67667)
(cherry picked from commit 8da90f624d)
Co-authored-by: Andrej Ocenas <mr.ocenas@gmail.com>
Tempo: Escape regex-sensitive characters in span name before building promql query (#66301)
* Tempo: escape regex-sensitive characters in span name before building promql query
* Make gen-cue
* Add type
* Add tests
* Test
* Minor update
---------
Co-authored-by: Joey Tawadrous <joey.tawadrous@grafana.com>
(cherry picked from commit 8b1afb594d)
Co-authored-by: gordeevnm <gordeevnm@gmail.com>
SAML UI: configuration file tooltip info (#67861)
* adds icon and text to the card if enabled in inifile
* make use of verbose settings
* add state to enabledInIniFile
* rename to configFound and removal of default values
(cherry picked from commit 9b10664560)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
DS Picker: Do not create extra history entries for panel onboarding (#68227)
(cherry picked from commit 0565c3440f)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Candlestick: Fix panel not rendering in candles-only mode (#68279)
(cherry picked from commit b96a2c1b62)
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
Improve DS Advance Picker to give user context about the built in DS and CTA (#68203)
* Add description to DS built-in list of items
* Open the new DS view in a new tab
(cherry picked from commit cb293ecf1c)
Co-authored-by: Ivan Ortega Alba <ivanortegaalba@gmail.com>
Fix renaming columns when displayName or displayNameFromDS are present (#67751)
* Fix renaming columns when displayName or displayNameFromDS are present
* refactor
* Fix showing correct column header title
(cherry picked from commit d8dfef71e2)
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
docs: Geomap: Update docs to include link to official github discussion (#67795)
(cherry picked from commit bcebb2cb60)
Co-authored-by: Nathan Marrs <nathanielmarrs@gmail.com>
HelpWizard: Show snapshot preview regardless of scenes feature toggle (#68157)
(cherry picked from commit 1f43c62d03)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Folders: return an error when listing folders if permission guardian returns an error (#68109)
return an error when listing folders if perm gaurdian returns an error
(cherry picked from commit e51b92991d)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Remove windows backend tests from release pipelines
These are run in other places so there is no benefit to also include
them here.
(cherry picked from commit 1e8cad625b)
Backport of https://github.com/grafana/grafana/pull/68166
AzureMonitor: Bump credential wait time (#68120)
Bump credential wait time as 15s seems too short
(cherry picked from commit 0d3a78d86d)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Nested folders: remove behaviour where selecting all children selects parent (#68084)
remove behaviour where selecting all children selects parent
(cherry picked from commit 765da9c841)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Settings: Do not hide sensitive values if it's empty (#68088)
* Settings: Do not hide sensitive values if it's empty
* Fix implementation
* Add tests for RedactedValue function
(cherry picked from commit 0b6ae0d119)
Co-authored-by: Alexander Zobnin <alexanderzobnin@gmail.com>
AzureMonitor: Correctly set resource parameter for Logs queries (#68133)
* Update to ensure the resources parameter is passed through for logs queries only
* Use string slices for resources to ensure order remains the same
* Fix lint
* clarify test
(cherry picked from commit e059ce9c8a)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Graph: Fix legend overlapping graph area (#67912)
use render callback instead of requestIdleTimeout
(cherry picked from commit 8e752439c6)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
AzureMonitor: Appropriately handle trace correlation resources (#67934)
* Appropriately handle correlation resources
- Retrieve resources in buildQueries step
- Build updated queries based off of correlation results
- Update tests
* Fix query building and tests
* Fix lint
* Ensure multiple resource queries will work
- Correctly set resources to ensure there is no overlapping between multiple resource selection and correlated resources
- Add tests for these specific cases
- Remove unnecessary pointers
- Build queries correctly
(cherry picked from commit 5ddc37ee21)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Alerting: Show export button for org admins (#67939)
Show export button for org admins
(cherry picked from commit e7f11f2456)
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
* CI: Add Windows backend tests in more places
* CI: Add promotion pipeline for publishing new windows-test-images
* CI: Ignore windows backend-test failures for now
* CI: Fix linting issue in ci_images.star file
(cherry picked from commit b2fc285a5d)
Docs: Adds alert state history doc (#67976)
* Adds alert state history doc
* Adds config image
* Adds config as text
* correct spacing
(cherry picked from commit cb9d53708e)
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Alerting: Make two boxes in template form adaptative to the screen (#67967)
Make two boxes in template form adaptative to the screen width to be align in the same line when possible
(cherry picked from commit 97802e44a6)
Co-authored-by: Sonia Aguilar <33540275+soniaAguilarPeiron@users.noreply.github.com>
Alerting: Migration to not fail if alert_configuration table is not empty (#67924)
(cherry picked from commit 0ce7f7eaf4)
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
AzureMonitor: Clear queries if header value changes (#67916)
Clear queries if header value changes
(cherry picked from commit 765ae6cd90)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
AzureMonitor: Fix logs query multi-resource and timespan values (#67914)
* Update TimeGrain interface methods
- Make them util functions because it's simpler
* Update logs ds to appropiately set resources and timespan
* Set timespan using RCF times
* Update tests
(cherry picked from commit 9d16718acc)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Render analytics identifiers (#67860)
* Append analytics identifier upon authenticate session
* Add id and module upon syncing user to identity
* Add authModule & id to `IdentityFromSignedInUser`
* Allow req calls in test to use basic auth
* Add `intercom_secret` to grafana config in tests
* Add test for analytics render in html view
(cherry picked from commit 15e34505e2)
Co-authored-by: linoman <2051016+linoman@users.noreply.github.com>
Elasticsearch: Fix processing of logs with not-recognized time format (#67767)
* Elasticsearch: Fix parsing of invalid time
* Fix lint
* Add more test data to data.js
* Add tests
* Fix lint
* Update pkg/tsdb/elasticsearch/client/search_request.go
(cherry picked from commit 95cf598423)
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
Connections: Show core datasource plugins as well (#67815)
fix: add a new hook & selector that can show core plugins by default
(cherry picked from commit 21459c7c97)
Co-authored-by: Levente Balogh <balogh.levente.hu@gmail.com>
Alerting: Use standard validation/error pattern on group selection (#67787)
(cherry picked from commit 3c42dea10b)
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
RBAC: Do not search for parents of the root folder (#67746)
do not search for parents of the general folder
(cherry picked from commit b1382ac48e)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Update index.md (#67172)
Clarified some of the intro text and added JSON outer element to make the samples clearer
(cherry picked from commit 66ad704292)
Co-authored-by: Nabeel Saad <saadnabs@hotmail.com>
Cloudwatch: Fix description of plugin (#67744)
Fix description of Cloudwatch
(cherry picked from commit 43c7a5b603)
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
docs: add semi relative time ranges (#67559)
* add semi-relative time range section
* added second example and reworded
* formatting fixes
* added alerting note and fixed formatting
* wording fix
(cherry picked from commit 0271a1d094)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Connections: Rename "Your data source" to "Data source" page (#67662)
rename "Your data source" to "Data source" page
This page was meant to be named "Data source" in the previous PR [0].
I just made a mistake by naming it wrongly.
[0]: https://github.com/grafana/grafana/pull/66813/files
(cherry picked from commit 76284ed3a6)
Co-authored-by: mikkancso <miklos.tolnai@grafana.com>
Gauge: Set min and max for percent unit (#67517)
* Gauge: Set min and max for percent unit
* Remove exclamation mark
* Add parentheses around ternary
(cherry picked from commit 6570ec7afe)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
PluginCatalog: Update message about insufficient permissions (#67664)
Changed so we map the enum into different message.
(cherry picked from commit 21d28c1cb5)
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Nested folders: hook up `getAffectedItems` to the backend count route (#67677)
* hook up getAffectedItems to the backend count route
* mock out backendSrv in unit tests
* Don't delete alert rules while API doesn't return counts
* Show alert rule counts when API returns them
* use components for modal styles
* Revert "use components for modal styles"
This reverts commit 80ac1152f8.
---------
Co-authored-by: joshhunt <josh@trtr.co>
(cherry picked from commit 5d5a54979c)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
docs: add nav and users info for public dashboards (#67674)
* add content re admin and public dashboards navigation
* added admin users section
(cherry picked from commit 765735092a)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
NestedFolders: Use new Browse Dashboards UI behind feature flag (#67416)
NestedFolders: Put feature flagged new Browse Dashboards UI at main route
(cherry picked from commit c4a31390ef)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
Nested folders: hook up move/delete logic properly (#67648)
* clear selection post move/delete
* move actions out of rtk-query
* move findItems, create selectors, refetch children when moving/deleting
* cleaner syntax
* remove unnecessary function, just put logic in the selector
* handle moving/deleting from the root
* slightly cleaner
* handle when rootItems are undefined
* handle 'general' in the fetchChildren reducer
* only refresh at the end
* don't need thunk api
(cherry picked from commit 02086e843f)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
docs: move misplaced Configure legend page (#67597)
* move configure legend page and add alias
* updated page weight and tried fixing alias
* fixed alias
* add preemptive alias for current page location
* apply suggestion from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* apply suggestions from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* apply suggestions from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 688459f25c)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
NestedFolders: Add empty states for Browse and Search (#67423)
* NestedFolders: Add empty states for Browse and Search
* empty states
* fix types
* tests
(cherry picked from commit fd2c7594cf)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
NestedFolders: Indicate when folders have mixed-selection children (#67337)
* Show indeterminate checkbox for folders with partially selected children
* When selecting an item, check ancestors to see if all their children are now selected
* reword comment
* fix test
* fix lint
* Check all descendants for mixed state
* Use indeterminate checkbox
* fix test description
* make header checkbox select/unselect automatically
* mixed header checkbox:
* fix tests
* add tests
(cherry picked from commit 32d3e895b3)
Co-authored-by: Josh Hunt <joshhunt@users.noreply.github.com>
* move to me directory and sort by relevance
* refactor letter search, uFuzzy and styles out of ency
* begin state refactor
* refactor getMetaData useEffect call with useReducer
* refactor pagination with useReducer
* refactor fuzzy state for useReducer
* refactor all filters for useReducer
* remove haystacks arrays in favor of haystack dictionaries w object keys
* refactor out functions into state helpers
* switch label filter text color to work with light theme
* make each row clickable to select metric
* add pagination component
* fix max results
* make a better table with keystrokes, navigate to metric with up&down, select on enter, hide settings, make a nice button
* save space, give more real esate to the table
* add highlighting for fuzzy search matches
* add custom button in metric select option to open metric encyclopedia
* open the modal with enter keystroke
* remove unnecessary actions and variables from m.e.
* fix tests, clean code
* remove setting of selected idx on results row when hovering
* tests
* rename to metrics modal and have select option same as header
* reduce width for wider screens
* pass in initial metrics list and remove call to labels and series in metrics modal
* use createSlice from reduc toolkit to deduce actions
* save the metrics modal additional settings
* galen alphabet refactor suggestion
* remove extra row in results table
* fix storing settings, wrap in feature toggle
* remove metadata check & load because metric select already handles this
* Update public/app/plugins/datasource/prometheus/querybuilder/components/metrics-modal/LetterSearch.tsx
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* fix styles, show cursor as pointer for select option and clickable row
* taller modal for larger screens
* turn off metadata settings if usebackend is selected
* additional settings button space
* add pipe to ufuzzy metadata search
---------
Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
* Docs: Update Color Modes
Some color mode descriptions had mistakes and a few were missing.
* fixed typo
---------
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Add Preview template and payload editor to templates form
* Add TemplatePreview test and update css
* Preview errors for each template that is wrong
* Enable preview templating only for Grafana Alert Manager
* Use harcoded default payload instead of requesting it to the backend
* Update error response in the api definition
* Add spinner when loading result for preview
* Update api request followind DD changes
* Use pre instead of TextArea to render the preview
* Fix tests
* Add alert list editor
* Add start and end time for alert generator
* Add preview for data list added in the modal
* Update copies and move submit button in alert generator to the bottom
* Copy updates
* Refactor
* Use tab instead of button to preview
* Move payload editor next to the content
* Copy update
* Refactor
* Adress PR review comments
* Fix wrong json format throwing an exception when adding more data
* Use monaco editor for payload
* Only show text 'Preview for...' when we have more than one define
* Fix some errors
* Update CollapseSection style
* Add tooltip for the Payload info icon explaining the available list of alert data fields in preview
* Set payload as invalid if it's not an array
* Fix test
* Update text in AlertTemplateDataTable
* Add separators to distinguish lines that belong to the preview
* Use harcoded default payload instead of requesting it to the backend
* Add alert instance picker
* Add rule search capability and cleanup
* Display alert instance extra information on hover
* Rebase and integrate with existing view
* Display folder under rule name
* Display unique labels for alert instances
* Remove unneeded interface
* Reset state after closing the modal
* Refactor useEffect and useMemo
* Move common code to variable
* Refactor to avoid setting filtered rules as state
* Disable instance selector button when there are errors in the payload
* Validate payload on button click
* Change warning text
* Add support for state filters in alertmanager alerts request
* Use RTK Query to fetch alert instances
* Address review comments
* Fix lint
---------
Co-authored-by: Sonia Aguilar <soniaaguilarpeiron@gmail.com>
* enable case insensitive by default
* fix missing case-insensitive query
* fix missing case insensitive query
* fix missing case insensitive query in temp_user
* skip integration testing in mysql
* skip integration testing in mysql
* use t.cleanup
* lowercase only once
* aligned to only using sql as that is what we do in other parts
---------
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* Duplicate Exemplars Configuration Delete
I noticed there were double Exemplar configuration paragraphs one right after the other and deleted the upper one.
* makes prettier
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
* Add Preview template and payload editor to templates form
* Add TemplatePreview test and update css
* Preview errors for each template that is wrong
* Enable preview templating only for Grafana Alert Manager
* Use harcoded default payload instead of requesting it to the backend
* Update error response in the api definition
* Add spinner when loading result for preview
* Update api request followind DD changes
* Use pre instead of TextArea to render the preview
* Fix tests
* Add alert list editor
* Add start and end time for alert generator
* Add preview for data list added in the modal
* Update copies and move submit button in alert generator to the bottom
* Copy updates
* Refactor
* Use tab instead of button to preview
* Move payload editor next to the content
* Copy update
* Refactor
* Adress PR review comments
* Fix wrong json format throwing an exception when adding more data
* Use monaco editor for payload
* Only show text 'Preview for...' when we have more than one define
* Fix some errors
* Update CollapseSection style
* Add tooltip for the Payload info icon explaining the available list of alert data fields in preview
* Set payload as invalid if it's not an array
* Fix test
* Update text in AlertTemplateDataTable
* Add separators to distinguish lines that belong to the preview
* Fix text
* Use subDays instead of addDays for substracting days
* - initial work on data source config page
* - add links to test status box
- add tracking function
* - add test for the DataSourceConfigAlert component
* - fix flicker of the alert box
* - fix the build
* - small improvements
* - fix failing build
* - fix failing unit tests
* - prettier and betterer fixes
* - fix failing e2e tests
* - fix build again
* - rewrite solution according to the PR comments
* - cleanup
* - fix failing e2e
* - use absolute path in link
* Minor fixes
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* Update start-restart-grafana.md
update the `docker-compose.yaml` file as it was not incomplete. Also remove the `grafana-piechart-panel` from the `GF_INSTALL_PLUGIN` as this plugin is available in the core and does not require to be installed separately.
I tested the code and all looks good and also the backend logs look fine.
* Update start-restart-grafana.md
update the docker compose command instead of using the old docker-compose command
* makes prettier
---------
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
* fix , comparison regression
* intervalMs was not pressent before the regression and this value changes the adjusted interval calculating giving a false positive in favor of the regression
Moving call resource API stream handling within plugin management as a utility/wrapper.
Closes#66889
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
* change from role grant overrides to SAML UI specific config option
* update permissions needed to access SAML UI
* PR feedback: change config name, change required perms to write, add a comment
* Update behavior of defaults in connection limits
* Refactor to use config object instead
* Refactor remove unneeded function
---------
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
* Build out barebones Traces editor
- Add Traces query type and operation ID prop to query type
- Add necessary header types
- Update resource picker to appropriately work with traces query type
- Build out TracesQueryEditor component
- Include logic to retrieve operationId's for AI Workspaces
- Add backend route mapping
- Update macro to use timestamp as default time field for traces
* AzureMonitor: Traces - Response parsing (#65442)
* Update FormatAsField component
- Add trace ResultFormat type
- Generalise FormatAsField component
- Add component to TracesQueryEditor
- Remove duplicate code in setQueryValue
* Add custom filter function to improve performance
* Add basic conversion for logs to trace
- Add serviceTags converter
- Pass through required parameters (queryType and resultFormat)
- Appropriately set visualisation
* Update parsing to also fill trace tags
- Add constant values for each table schema (include legacy mapping for now if needed)
- Add constant for list of table tags
- Set the foundation for dynamic query building
- Update query to build tags value
- Appropriately set operationName
- Update tagsConverter to filter empty values
* Fix lint and test issues
* AzureMonitor: Traces - Data links (#65566)
* Add portal link for traces
- Pull out necessary values (itemId and itemType)
- Appropriately construct
- Fix ordering
* Set default format as value
- Also set default visualisation
* Fix event schema
* Set default formatAsField value
* Include logs link on traces results
- Adapt config links to allow custom title to be set
* Correctly set operationId for query
* Update backend types
- Include OperationID in query
- Pass forward datasource name and UID
* Ensure setTime doesn't consistently get called if operationID is defined
* Add explore link
- Update util functions to allow setting custom datalinks
* Fix tests
* AzureMonitor: Traces - Query and Editor updates (#66076)
* Add initial query
- Will query the resource as soon as a resource has been selected
- Updates the data links for the query without operationId
- Remove initial operationId query and timeRange dependency
- Update query building
* Add entirely separate traces query property
- Update shared types (also including future types for Azure traces)
- Update backend log analytics datasource to accept both azureLogAnalytics and azureTraces queries
- Update backend specific types
- Update frontend datasource for new properties
- Update mock query
* Update FormatAsField to be entirely generic
* Update query building to be done in backend
- Add required mappings in backend
- Update frontend querying
* Fix query and explore data link
* Add trace type selection
* Better method for setting explore link
* Fix operationId updating
* Run go mod tidy
* Unnecessary changes
* Fix tests
* AzureMonitor: Traces - Add correlation API support (#65855)
Add correlation API support
- Add necessary types
- Add correlation API request when conditions are met
- Update query
* Fix property from merge
* AzureMonitor: Traces - Filtering (#66303)
* Add initial query
- Will query the resource as soon as a resource has been selected
- Updates the data links for the query without operationId
- Remove initial operationId query and timeRange dependency
- Update query building
* Add entirely separate traces query property
- Update shared types (also including future types for Azure traces)
- Update backend log analytics datasource to accept both azureLogAnalytics and azureTraces queries
- Update backend specific types
- Update frontend datasource for new properties
- Update mock query
* Update FormatAsField to be entirely generic
* Update query building to be done in backend
- Add required mappings in backend
- Update frontend querying
* Fix query and explore data link
* Add trace type selection
* Better method for setting explore link
* Fix operationId updating
* Run go mod tidy
* Unnecessary changes
* Fix tests
* Start building out Filters component
- Configure component to query for Filter property values when a filter property is set
- Add setFilters function
- Add typing to tablesSchema
- Use component in TracesQueryEditor
* Update Filters
- Asynchronously pull property options
- Setup list of Filter components
* Update filters component
- Remove unused imports
- Have local filters state and query filters
- Correctly set filters values
- Don't update query every time a filter property changes (not performant)
* Update properties query
- Use current timeRange
- Get count to provide informative labels
* Reset map when time changes
* Add operation selection
* Reset filters when property changes
* Appropriate label name for empty values
* Add filtering to query
* Update filter components
- Fix rendering issue
- Correctly compare and update timeRange
- Split out files for simplicity
* Add checkbox option to multiselect
- Add custom option component
- Correctly call onChange
- Add variableOptionGroup for template variable selection
* Fix adding template vars
* Improve labels and refresh labels on query prop changes
* AzureMonitor: Traces - Testing (#66474)
* Select ds for template variable interpolation
* Update az logs ds tests
- Add templateVariables test
- Add filter test
- Update mock
- Remove anys
* Update QueryEditor test
- Update mocks with timeSrv for log analytics datasource
- Fix query mock
- Use appropriate and consistent selectors
* Add TracesQueryEditor test
- Update resourcePickerRows mock to include app insights resources
- Remove comments and extra new line
* Add FormatAsField test
- Remove unneeded condition
* Update resourcePicker utils test
* Don't hide selected options in filters
* Fix multi-selection on filters
* Add TraceTypeField test
- Add test file
- Update selectors (remove copy/paste mistake)
- Update placeholder text for select and add label
* Add basic filters test
* Begin filters test
* Update filters test
* Add final tests and simplify/generalise addFilter helper
* Minor update to datasource test
* Update macros test
* Update selectors in tests
* Add response-table-frame tests
* Add datasource tests
- Use sorting where JSON models are inconsistent
- Update filters clause
- Dedupe tags
- Correct operationId conditions
* Don't set a default value for blurInputOnSelect
* Simplify datasource test
* Update to use CheckGoldenJSON utils
- Update with generated frame files
- Remove redundant expected frame code
- Update all usages
* Fix lint
* AzureMonitor: Traces feedback (#67292)
* Filter traces if the visualisation is set to trace
- Update build query logic
- Added additional test cases
- Return an error if the traces type is set by itself with the trace visualisation
- Add descriptions to event types
- Update tests
* Fix bug for error displaying traces
* Update mappings and add error field
- Update tests
- Remove unnecessary comments
* Switch location of Operation ID field
* Re-order fields
* Update link title
* Update label for event type selection
* Update correct link title
* Update logs datalink to link to Azure Logs in explore
* Fix lint
* Draft: Feature: Trusted Types support
* remove trusted-types package
* Create policy before jQuery and Angular is loaded and add feature flag
* Add trustedTypePolicies
* Sanitize scriptURL
* Add TT meta tag for test env
* Move trusted types into core
* Add DOMParser support for TrustedHTML
* Seperate RSS sanitization and add better TrustedHTML support
* Get test CSP header from config
* Remove dompurify dep from core
* Add documentation for trusted types
* Apply suggestions from code review
Co-authored-by: Kristian Bremberg <114284895+KristianGrafana@users.noreply.github.com>
* Add comment about Github discussion thread and things breaking
* Remove changes from News panel
* Remove TT feature toggle
* Expose TT and CSPReportOnly to frontend
* Log errors in console when CSP report only is enabled
* Log error for reporting and remove test mode
* Only insert CSP header in HTML for dev env
* Update docs
---------
Co-authored-by: Tobias Skarhed <tobias.skarhed@gmail.com>
Co-authored-by: Tobias Skarhed <1438972+tskarhed@users.noreply.github.com>
* Add a method for getting descendant folders
* Include dashboard count for descendant folders
* Return subfolder count
* Replace references to children with descendants
* Update openapi specs
* Add test for descendant counts
* Add logging to GetDescendantCounts
* create http docs for query caching
* fix endpoints
* Update docs/sources/developers/http_api/query_and_resource_caching.md
Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
* run prettier
* super small change to reflect incoming API update
---------
Co-authored-by: Eve Meelan <81647476+Eve832@users.noreply.github.com>
* Fix files with two dots in the name not being returned by LocalFS.Files()
* Renamed variable for consistency
* Add test
* Fix typo
* Fix wrong upperLevelPrefix value
* Removed unnecessary check in LocalFS.Files()
* organize layout, make design uniform, add doc link
* fix e2e test
* move overhauled config parts into prometheus code
* update tooltips with doc links
* clean component styles for section padding, top and bottom 32px
* make additional settings subsection headers h6
* use secondary gray for section descriptions
* fix merge issues
* change inlineswitch to switch only in prom settings because the other components are shared
* remove legacy formfield and input, replace with inlinefield and input from grafana-ui
* find more formfield and UI design fixes like changing inlineformlabel to inlinefield
* remove unused inline form label
* replace legacy duration validations with <FieldValidationMessage>
* fix styles secondary gray from theme
* change language, headings and datasource -> data source
* update alert setting styles with new component
* update prom url heading and tooltip
* update default editor tooltip and set builder as default editor
* update interval tooltip
* update prom type tooltip
* update custom query params tooltip
* update exemplar internal link tooltip
* fix inline form styling inconsistency
* allow for using the DataSourceHTTPSettings component without the connection string
* remove overhaul component, re-use dshtttps comp, and use connection input in config editor
* make tooltips interactive to click links
* consistent label width across the elements we can control for now, fix exemplar switch
* make connection url a component
* refactor onBlur validation
* remove unused component
* add tests for config validations
* add more meaningful health check
* fix e2e test
* fix e2e test
* fix e2e test
* add error handling for more url errors
* remove unnecessary conversion
* health check tests
* Clean up the health check
* health check unit tests
* health check unit tests improved
* make pretty for drone
* lint check go
* lint check go
* add required attr to connection component
* Update public/app/plugins/datasource/prometheus/configuration/Connection.tsx
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* fix read only issue for provisioned datasources
* validate multiple durations for incremental query setting
* use sentence case for headers
* use className consistently for styles
* add tests for url regex
* remove console logs
* only use query as healthcheck as the healthy api is not supported by Mimir
* fix exemplar e2e test
* remove overhaul prop from custom headers setting component
* remove connection section and use DatasourceHttpSettings connection with custom label and interactive tooltip
* add spaces back
* spaces
---------
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
* remove opentracing and use otel instead
* add various samplers for jaeger
* remove useless test that is covered in otel now
* we do not need a struct there
* remove old tests
* restore tests that parse various configurations
* check errors in tests
* Update pkg/infra/tracing/tracing_test.go
fix typo
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* add test for both legacy and new config formats
* use named constants
---------
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Add CreateNewButton and tests
* Add translation support
* Move reused phrases to temp common file
* Use just a simple button
---------
Co-authored-by: joshhunt <josh@trtr.co>
* NestedFolders: Select all for BrowseView and SearchView
* show fake indeterminate state for SearchView
* fix types
* Select search results as additional pages are loaded
* fix (de)select all between browse and search
* tests
* fix test
* fix test
* use tokens or urls in image annotations
* improve tests, fix some comments
* fix empty tokens
* code review changes, check for url before checking for token (support old token formats)
* NestedFolders: Connect Search input fields to state manager
* Fix tag list not loading
* Clear includePanels checkbox when leaving search
* fix test
* Fix extra right margin
* fix missing style
* cleanup
* fix placeholder
* fix test
* Use alertmanager /alerts endpoint to show preview of instances affected by silence
* Fix debounce dependency, add no instances warning
* Rename silences preview component
* Fix the preview file name, use IsNulLDate to check the date
* Fix valid matchers condition
* Cleanup
* Remove unused code
* fix flickering
* refactor onClose/onOpen
* do not set value of input, make the placeholder look like the value instead
* Show search icon when the dropdown is open
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* update to alerting 20230418161049-5f374e58cb32
* rename renamed structs in https://github.com/grafana/alerting/pull/73
* update ValidateContactPoint to use BuildReceiverConfiguration
* update logger factory according to changes
* rewrite integration builder
Co-authored-by: Santiago <santiagohernandez.1997@gmail.com>
* add modal scaffolding
* add some unit tests
* remove dummy api, add some TODO comments
* small test refactor
* another small test refactor
* fix unit tests due to aria-label/data-testid change
* add isNew notPersistedProperty to PanelModel
* if panel is newly created and user "Discard"s it, the panel is removed entirely
* add Todo's for when we remove the emptyDashboardPage FF
* add isNew to new panel after file dropping on dashboard page
* handle the "Apply" case
* CSV file dropping is not relevant to a new panel bc it doesnt open edit page
* avoid mutable
* remove mutableDataFrame from utils also
* fix build and add couple more testss
---------
Co-authored-by: Victor Marin <victor.marin@grafana.com>
* WIP
* Add instance totals to combined rule. Use totals to display instances stats in the UI
* WIP
* add global summaries, fix TS errors
* fix useCombined test
* fix test
* use activeAt from rule when available
* Fix NaN in global stats
* Add no data total to global summary
* Add totals recalculation for filtered rules
* Fix instances totals, remove instances filtering from alert list view
* Update tests
* Fetch alerts considering filtering label matchers
* WIP - Fetch alerts appending state filter to endpoint
* Fix multiple values for state in request being applyied
* fix test
* Calculate hidden by for grafana managed alerts
* Use INSTANCES_DISPLAY_LIMIT constant for limiting alert instances instead of 1
* Rename matchers parameter according to API changes
* Fix calculating total number of grafana instances
* Rename matcher prop after previous change
* Display button to remove max instances limit
* Change matcher query param to be an array of strings
* Add test for paramsWithMatcherAndState method
* Refactor matcher to be an string array to be consistent with state
* Use matcher query string as matcher object type (encoded JSON)
* Avoind encoding matcher parameters twice
* fix tests
* Enable toggle for the limit/show all button and restore limit and filters when we come back from custom view
* Move getMatcherListFromString method to utils/alertmanager.ts
* Fix limit toggle button being shown when it's not necessary
* Use filteredTotals from be response to calculate hidden by count
* Fix variables not being replaced correctly
* Fix total shown to be all the instances filtered without limits
* Adress some PR review comments
* Move paramsWithMatcherAndState inside prometheusUrlBuilder method
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
* Alerting: Allow hooking into request handler functions.
Adds a facility to AlertNG for hooking into API handlers, allowing the
replacement of request handlers for specific paths. One of goals of this
approach was to allow hooking as late as possible in the request, e.g.
after all middleware has been applied, to simplfiy usage.
* Update pkg/services/ngalert/api/hooks.go
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Update pkg/services/ngalert/api/hooks.go
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Update pkg/services/ngalert/ngalert.go
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Fixes to review comments
* Fix passing logger in
---------
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* remove old page component
* add test to check initDashboard is only called once (prevent variables loading twice)
* add help node
* update unit tests
* remove last mentions of topnav
* fix unit tests
* remove unused props from ButtonRow interface
* remove prop from test
* Loki: Fix incorrect evaluation of real/extracted labels in context
* Add tests
* Improve caching and add more tests
* Use mockResolvedValue
* Flip logic for getInitContextFiltersFromLabels
* Update to logic to use fetchSeriesLabels for queries with more than 1 parser
remove elements of flaky e2e test
This test only checks 'undo' in the code editor and then checks if the query builder is present. The test is timing out when looking for the query builder. There should be a second test to check if undo works in the query builder so I'm removing the query builder check. I will add an issue to create a test for 'undo' in the query builder.
* Add CountInFolder to RegistryService interface
* Add folder children counts api route
* Update fake GetFolderChildrenCounts
* Add test for getting folder children counts
* Add validation to folder children counts handler
* Update openapi specs
* Update pkg/services/folder/folderimpl/folder.go
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
---------
Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
* Add kind to TraceQL intrinsics
* Fix after merging main
* Fix intrinsics array reference after merge
* Dispatch error message when TraceQL autocomplete fails to retrieve tag values
* adds alertstatehistory backend config to grafanaBootData
* add alertStateHistory api
* show different ASH modal when using loki implementation
* group log lines by instance (unique set of labels)
Co-Authored-By: Konrad Lalik <konrad.lalik@grafana.com>
* render log lines for each instance
Co-Authored-By: Konrad Lalik <konrad.lalik@grafana.com>
* Add visual improvements to the log record of state changes
* Add values to log records
* compute common labels and show unique labels
* Add state changes visualization
* fix common labels extraction
* Code cleanup
* Add timespan-based log record view
* WIP
* scroll to timestamp - poc
* Use SortedVector for timestamp field
* add conditional accessor for frames
* update some of the log formats and styles
* Timestamp-based visualization with scrolling
* minor improvements
* Split Loki's state history viewer into multiple files
* Add memoization to prevent graph rerender on filter updates
* make chart size shrink when fewer instances
* style updates
* show warning when instances are hidden
* Add basic label-based filtering
* Improve label-based filtering
* Add regex validation
* Improve no instances message when everything was filtered out
* Update warning message
* Move timeline viewer to a separate file, refactor handling timeline pointer changes
* Remove unused component, add comments
* Fix test snapshot, fix type error
* adds tests for common.ts
* Add tests for converting log records into data frames
* Add basic component test, fix type guards
* Use a constant for timeseries limit
* Improve a11y, update component test
* Memoize AlertStateTag, migrate from deprecated ArrayVector
* Update public/app/features/alerting/unified/components/rules/state-history/common.ts
* Move helper hook into a separate file. Add Search input component
* Change the limit of visible time series on the timeline
* Add LogRecordViewer perf improvements, refactor timeline cursor events tracking
* Use callback to pass timeline refs
* Add grouping tests for the log record viewer
---------
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
* Update the HandleResourceRequest function to mimic the HandleQueryRequest function
* Remove CacheResourceResponse function from interface
* revert additional thing I missed
* remove metadata for single folder listing
* extendTests
* remove ac metadata from dash and folder search results
* remove test
* remove one more test
* put ac metadata back for single folder API responses
* extend tests
* remove ac metadata from folder frontend object
* undo unneeded change
* PR feedback
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* FIX: Hide Invite Button with external user management
* Hide also when login form is disabled
* add tests and readability
---------
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
* Update ARG Subscription selection
- Filter out queries that do not contain at least one subscription
- Refactor SubscriptionField component
- Display error if no subscriptions are selected
- Update tests
* Fix test
This change better reflects the requirement on plugins to be signed, and removes ambiguity regarding whether unsigned plugins will be completely prohibited from working.
Alerting: Add totalsFiltered to RuleResponse to facilitate hidden by filters count
Currently, when both a limit_alerts and a matcher/state filter is applied, there is not enough information to determine how many alert instances were hidden by the filters. Only enough to determine the total hidden by the limit and filter combined.
This change adds a separate totalsFiltered field alongside the AlertRule totals that will contain the count of instances after filters but before limits.
* first pass at SAML UI docs
* doc updates
* Apply suggestions from code review
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* review feedback
* finish documentation for all the sections
* remove unneeded doc bit
* PR feedback
* cross-reference SAML UI docs from SAML config file docs
* extending the docs with the new fields and expaning the mapping section
* feedback
* add the permissions required to access SAML UI
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* add translation keys for empty dashboard redesign
* run yarn i18n:extract; rephrase one trans key because of [warning] Found translation key already mapped to a map or parent of new key already mapped to a string: dashboard.toolbar.add.visualization
* reduce to 3-step locale phrase IDs
* extract phrase IDs
This commit fixes a bug where DatasourceUID and RefID annotations are
missing for DatasourceNoData alerts in Grafana 9.5. This bug affects
datasource plugins that have moved to using the data plane contract.
* add information to what's new about upcoming react 18 upgrade
* update structure
* Apply suggestions from code review
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* add docs to plugin migration guide
* add link to forum discussion
* apply suggestions from review
---------
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* add show context button
* improve type definition
* change to default `maxLines`
* remove context query
* add provider to tests
* add test for split view button
* improve documentation
* add tests for `getLogRowContextQuery`
* refactor LogsContainer functions
* fix spelling
* add `contextQuery` as state
* fix tests
* fix lint
* do not use callIfDefined
* make button secondary
* Prompt DS modal when the user adds the first panel to a dashboard
* Rename state prop and use toggle
* Change modal size
* Avoid flickering for dashboard modal when changing number of results
* When editing panel 1, only display when new dashboard
* clean up the components and convert to functional components
* Create hooks for getting DS
* remove focus style override from input
---------
Co-authored-by: Ivan Ortega <ivanortegaalba@gmail.com>
* Remove focus on duration inputs to match the other selects
* Allow users to create options while they load
* Options without type default to not have quotes around them
* Fix#66571 - set query type to traceql when linking from logs to traces
* Fix test
* update library element tests to use RBAC
* update bits of code to use RBAC
* update library panel tests
* linting
* more linting
* and more linting
* PR feedback
* feat: add clear logs to explorer's live logs
* refactor live logs pause/resume updating logic
* add tests for clearing live logs
* rm unused imports
* move `onClear` live logs logic to redux
* move clear logs tests to `query.test`
* use utils `sortLogsRows` and Button's icon props
* rename `filterLogRows` and add `clearedAt` as an arg
* mv clearedAt type closer to live tailing items and add jsdoc
* mv `filterLogRowsByTime` to `/utils` and use it at `LiveLogs` component
* make `Exit live` button consistent with other actions
* use `sortLogRows` and fix timestamp by id on `makeLogs`
* change clear live logs from based on timestamp to index on logRows
* assign `null` to `clearedAtIndex` on first batch of logs live
* move `isFirstStreaming` implementation to `clearLogs` reducer
* fix `clearLogs` tests
* Update public/app/features/explore/state/query.ts
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
---------
Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
* NestedFolders: Item selection state
* Select children in state
* Unselect parents when children are unselected
* remove unneeded comment
* tests
* tidy test a little bit
* tidy test a little bit
* tidy test a little bit
* tidy test a little bit
* tidy test a little bit
* RBAC: Stop reading enabeld from ini file and always set to true
* Migrations: Add a migration for rbac to reset data migrations if rbac
was disabled
* If rbac was disabled we reset the data and data migrations that rbac
has to perform to get it to a correct state
* Migrator: Store migration logs on migrator and add function to clear it from the
in-memory stored logs
* update tests
---------
Co-authored-by: Karl Persson <kalle.persson@grafana.com>
docs: remove confusing singlestat reference
The removed phrase was confusing, why would I want to learn more about a removed component? Then given the link ends up going to the stat visualization page which replaced singlestatm and I can't find any dedicated page anymore on any version of our docs, it seems a redundant link.
* Add a wrapper to switch between the previous and new DS picker depending on the feature toggle advancedDataSourcePicker.
* Add a new component to represent the modal DS picker, which we will refer as advanced DS picker
Integrate this into the Edit panel, for now, until we're ready to replace everywhere the grafana-runtime DS picker by the wrapper.
* Replace Drawer component with the dropdown
* Adjust the first version of the styles to fit into this Figma design
* Adjust the design of the FileDropzoneDefaultChildren to match with the new DS modal but everywhere else is used nowadays.
---------
Co-authored-by: Oscar Kilhed <oscar.kilhed@grafana.com>
* feat(typescript): read and write index to jsonData
* feat(go): read index from jsonData
* clear database column when index-name is updated
* Update public/app/plugins/datasource/elasticsearch/datasource.ts
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* Update public/app/plugins/datasource/elasticsearch/configuration/ElasticDetails.tsx
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* add indexChangeHandler function
* fix
* fix failing tests
* fix
* fix
---------
Co-authored-by: Gábor Farkas <gabor.farkas@gmail.com>
* fix: dont call endpoint if invalid query
* fix: use latest lezer-logql
* refactor: use null instead of undefined
* test: returns null when query is invalid
* update
* fix logrowcontext scrolling behavior
* Loki: Update loki context ui menu
* Update
* Add test, update
* Use escapeLabelValueInSelector when displaying labels
* Update test for new appliedContextFilters
---------
Co-authored-by: Sven Grossmann <svennergr@gmail.com>
* There was an attempt
* Change disabled state based on transformation type
* Add validation to transformation type
* Revert "Add validation to transformation type"
This reverts commit 2188a3d9a93aec5eeafcdd40510391ba1a53671a.
* Add validation to transformation type
* Move transformations editor to a separate file
* Make name more descriptive
* Ensure type dropdown has always the same width
* Add tooltips around transformation options
* Slight style changes
* Remove autofocus on append, integrate read only to transformationeditor, save values that disappear so they come back
* Remove yaml changes
* Have variable background color work with alternating colors on different themes
* Make expression required for regular expressions
* Remove unused empty form object
* Fix bug about transformation’s values saved in memory
* Better validation formatting for expression
* Add labels and (for now) non working test, attempt to fix saved transformation delete/add bug
* Fix datalink comment
* Remove fancy CSS due to background change
* Fix deleting saved transformation bug, finish tests
* Consolidate transformation types
* Double check aria labels
* Change aria labels, fix tests
* Add a transformation with the create correlation test
---------
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
- Adds ability to build multiple projects simultaneously using, for example, `make docs PROJECTS='grafana grafana-cloud'`.
- Adds `make doc-validator` which runs [`doc-validator`](https://github.com/grafana/technical-documentation/tree/main/tools/cmd/doc-validator) on all documentation.
Using a centralized script will help ensure consistency in workflow across all projects.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* fix(packages): remove double trailing slash from npmrc credentials
* chore(packages): add new line to storybook config to trigger an npm canary release
This commit adds support for limits and filters to the Prometheus Rules
API.
Limits:
It adds a number of limits to the Grafana flavour of the Prometheus Rules
API:
- `limit` limits the maximum number of Rule Groups returned
- `limit_rules` limits the maximum number of rules per Rule Group
- `limit_alerts` limits the maximum number of alerts per rule
It sorts Rule Groups and rules within Rule Groups such that data in the
response is stable across requests. It also returns summaries (totals)
for all Rule Groups, individual Rule Groups and rules.
Filters:
Alerts can be filtered by state with the `state` query string. An example
of an HTTP request asking for just firing alerts might be
`/api/prometheus/grafana/api/v1/rules?state=alerting`.
A request can filter by two or more states by adding additional `state`
query strings to the URL. For example `?state=alerting&state=normal`.
Like the alert list panel, the `firing`, `pending` and `normal` state are
first compared against the state of each alert rule. All other states are
ignored. If the alert rule matches then its alert instances are filtered
against states once more.
Alerts can also be filtered by labels using the `matcher` query string.
Like `state`, multiple matchers can be provided by adding additional
`matcher` query strings to the URL.
The match expression should be parsed using existing regular expression
and sent to the API as URL-encoded JSON in the format:
{
"name": "test",
"value": "value1",
"isRegex": false,
"isEqual": true
}
The `isRegex` and `isEqual` options work as follows:
| IsEqual | IsRegex | Operator |
| ------- | -------- | -------- |
| true | false | = |
| true | true | =~ |
| false | true | !~ |
| false | false | != |
* try a different way to run integration tests
* fix formatting
* clean test cache again
* use previous command
* playing around with random commands
* dont run tests in parallel yet
* use parallel option instead of gomaxprocs
* use same package set for redis/memcached; use p=1
* TraceView: update the queryType to traceql for checking if same trace when clicking span link
* TraceView: linting
* TraceView: remove traceid check completely
* Use headings in bug report template
I've reported a lot of bugs recently, and I've found that headings
are a far better way to format bug reports.
See https://github.com/grafana/grafana/issues/65426 for an example. Thanks
* Switch from H1s to H2s
As per PR feedback, H1 already exists as the issue title :-)
* poc for virtual tree
* remove my silly debug stuff
* wip
* style table
* improve styles
* fix
* start to split tree into seperate component
* cleanup unused function
* split into more components
* more better
* secondary color type column
* simple tests for DashboardsTree
* restore styles from dodgy rebase
* remove my weirdo text component thing
* initial restructuring
* add weights for ordering
* fix links
* remove aliases, add script
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: David Harris <david.harris@grafana.com>
* make pretty
* use correct link for angular to react guide
* refactor: move the migration guide to /Developers
* Revert "refactor: move the migration guide to /Developers"
This reverts commit 8f31af8dfd.
* fix: only redirect if the URL-hash has a valid redirect
* fix: use a rel-ref for the Angular-React migration guide link
* fix: update the hash redirects
---------
Co-authored-by: David Harris <david.harris@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* Add key service
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Wire the service
* Rename Service
* Implement GetJWKS
* Slipt interface and implementation
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
* Change implementation, add tests
* Align to the expected package hierarchy
* Update CODEOWNERS
* Align names and fix wire.go
* Update pkg/services/signingkeys/signingkeysimpl/service.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update pkg/services/signingkeys/signingkeysimpl/service_test.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update pkg/services/signingkeys/signingkeysimpl/service_test.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update pkg/services/signingkeys/signingkeysimpl/service_test.go
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Add AddPrivateKey method to SigningKeysService
* Align tests to the guidelines
* Add test for GetJWKS() method
* Add comments to the interface
* Add FakeSigningKeysService
---------
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update e2e package
- Ensure health request is monitored for addDatasource flow
- Add custom timeout to configurePanel flow
* Make health check optional
* add how to start live tailing logs
* update old media
* Update docs/sources/datasources/loki/query-editor/index.md
Co-authored-by: Matias Chomicki <matyax@gmail.com>
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* RBAC: Feature to override default assignments
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* Add test and trim spaces
* Pass linting
* Apply the rbac overrides to fixed_authentication.config_writer
* Removing from the default ini file for now
* Add grants overrides section to cfg
* slimmer handleGrantOverrides function
---------
Co-authored-by: Kalle Persson <kalle.persson@grafana.com>
* Logs: Add new LogRowContext types to grafana/data
* use right type for `RowContextOptions`
* add missing renames
* add show context modal
* no need to call
* removed unused css
* sort properties
* rename
* use correct
* use
* add tests for
* wip
* remove add/minus buttons
* add tests
* disable processing of context results in Loki
* moved into table to align properly
* remove imports
* add highlighting of opened logline
* improve scrolling behavior
* correct style for the table
* use correct query direction
* fix text
* use LoadingBar
* use overflow auto
* rename `onToggleContext` to `onOpenContext`
* add missing import
* mock scrollIntoView
* update unused props
* remove unused import
* no need to process context dataframes
* only show `LogRowContextModal` if `getRowContext` is defined
* remove unused param
* use `userEvent` rather `fireEvent`
* change to `TimeZone`
* directly use style classes
* revert change to public_dashboard_service_mock.go
* improved styling
* add missing await in test
* fix lint
* fix lint
* remove LogRow scrolling when context is opened
* remove references to `scrollElement`
* Update public/app/features/logs/components/log-context/LogRowContextModal.tsx
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* fix lint
* add comment explaining `onCloseContext`
* add comment about debounced onClose
* add comments and remove `showRowMenu`
* scroll twice to correctly center the element
* revert double scrolling
* remove unnecessary `processDataFrame`
* trigger drone
---------
Co-authored-by: Matias Chomicki <matyax@gmail.com>
* make timestamp field time type
* Add test for type on handleLogEvents data frame field response
---------
Co-authored-by: Shirley Leu <4163034+fridgepoet@users.noreply.github.com>
* Use default retention policy instead of hardcoded retention policy
* Load retention policies for the editor
* Fix the typo
* Add more comment line
* Update comment
* Better error message
* Put back getTagKeys and getTagValues
* Fix unit test
* In dashboards splitOpenFn is not passed, instead "href" link is used. When we added tracking we changed the behaviour so onClickFn is always passed when generating the model. To bring back the previous behaviour we skip the onClickFn if the split function is not provided.
* Fix test and add a task to re-check the logic
* Switch back to the API where data provider for a supplementary query can be undefined
* Promote exploreMixedDatasource to beta
* Revert "Promote exploreMixedDatasource to beta"
This reverts commit a3bc167d1c.
* Resolve data source in parallel
* Do not modify function params
* Reorganize code for better readability
* Improve readability
* Simplify code
* Stop using a deprecated error property
* Elasticsearch: Change feature toggle for backend migration to enableElasticsearchBackendQuerying
* Update logic in data source
* Run test to re-genartate toggle
* Delete folders, dashboards with registry service
Co-authored-by: Serge Zaitsev <hello@zserge.com>
* Update signature of ProvideDashboardServiceImpl
* Regenerate mockery file
* Add test for DeleteInFolder
* Add test for DeleteDashboardsInFolder
* Delete child dashboard associations via registry
* Add validation of folder uid and org id
---------
Co-authored-by: Serge Zaitsev <hello@zserge.com>
* Dashboard: Add series color shades
Add color option "Shades of a color" which gives each series a color derived from a user-selected base color.
* Documentation: Add entry for color shades
Describe color option "Shades of a color" in documentation.
* Chore: formatting fixes
* Dashboard: Use better fallback color for color shades in fieldColor.ts
Fall back to a gray color if the configured color cannot be parsed.
* Chore: fix typo in fieldColor.test.ts
* Documentation: fix a sentence
* remove custom color parsing and change logic a bit
* Fix prettier issue
---------
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
Co-authored-by: Kristina Durivage <kristina.durivage@grafana.com>
* Put the numbers before dashboard elements.
Putting the numbers before the dashboard elements will make finding these easier for our customers as the first thing most people will do is look for the number that corresponds with the number in the photo.
* fixed icon name
---------
Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* remove dashboard previews backend
* remove dashboard previews backend
* bring back the migration
* bring back the migration
* bring back the migration
* replace receiver errors with one from alerting
* add the converter to alerting models
* update buildReceiverIntegration to accept GrafanaReceiver
---------
Co-authored-by: George Robinson <george.robinson@grafana.com>
* Add initial authentication config page skeleton
* Add initial SAML config page WIP
* Add few more pages
* Add connect to IdP page
* Assertion mappings page stub and url params
* Able to save settings
* Some tweaks for authentication page
* Tweak behaviour
* Tweak provider name
* Move SAML config pages to enterprise
* minor refactor
* Able to reset settings
* Configure key and cert from UI
* Refactor WIP
* Tweak styles
* Optional save button
* Some tweaks for the page
* Don't show info popup when save settings
* Improve key/cert validation
* Fetch provider status and display on auth page
* Add settings list to the auth page
* Show call to action card if no auth configured
* clean up
* Show authentication page only if SAML available
* Add access control for SSO config page
* Add feature toggle for auth config UI
* Add code owners for auth config page
* Auth config UI disabled by default
* Fix feature toggle check
* Apply suggestions from review
* Refactor: use forms for steps
* Clean up
* Improve authentication page loading
* Fix CTA link
* Minor tweaks
* Fix page route
* Fix formatting
* Fix generated code formatting
* FrameGraphTopTable: Use standard Table component
* Simplify
* Fix test
* Update tests
* Fixing test
* FlameGraph: Refactor and simplify styles
* updated
* add EditDataSourceActions to EditDataSourcePages
* fix tests
* EditDSPage: do not show buttons in header if topnav is off
* remove delete button from the header
* EditDSPage: hide buttons from footer when topnav is on
* update tests
* rename ActionProps to Props
* wrap setting of feature toggle in act in jest test
* fix jest test by using waitFor
Provide new feature in Prometheus dashboards to cache queried time series data, modify requests to not include previously cached data in order to improve dashboard refresh performance.
Co-authored-by: Galen <galen.kistler@grafana.com>
Co-authored-by: Leon <leon.sorokin@grafana.com>
* define initial service and add to wire
* update caching service interface
* add skipQueryCache header handler and update metrics query function to use it
* add caching service as a dependency to query service
* working caching impl
* propagate cache status to frontend in response
* beginning of improvements suggested by Lean - separate caching logic from query logic.
* more changes to simplify query function
* Decided to revert renaming of function
* Remove error status from cache request
* add extra documentation
* Move query caching duration metric to query package
* add a little bit of documentation
* wip: convert resource caching
* Change return type of query service QueryData to a QueryDataResponse with Headers
* update codeowners
* change X-Cache value to const
* use resource caching in endpoint handlers
* write resource headers to response even if it's not a cache hit
* fix panic caused by lack of nil check
* update unit test
* remove NONE header - shouldn't show up in OSS
* Convert everything to use the plugin middleware
* revert a few more things
* clean up unused vars
* start reverting resource caching, start to implement in plugin middleware
* revert more, fix typo
* Update caching interfaces - resource caching now has a separate cache method
* continue wiring up new resource caching conventions - still in progress
* add more safety to implementation
* remove some unused objects
* remove some code that I left in by accident
* add some comments, fix codeowners, fix duplicate registration
* fix source of panic in resource middleware
* Update client decorator test to provide an empty response object
* create tests for caching middleware
* fix unit test
* Update pkg/services/caching/service.go
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
* improve error message in error log
* quick docs update
* Remove use of mockery. Update return signature to return an explicit hit/miss bool
* create unit test for empty request context
* rename caching metrics to make it clear they pertain to caching
* Update pkg/services/pluginsintegration/clientmiddleware/caching_middleware.go
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
* Add clarifying comments to cache skip middleware func
* Add comment pointing to the resource cache update call
* fix unit tests (missing dependency)
* try to fix mystery syntax error
* fix a panic
* Caching: Introduce feature toggle to caching service refactor (#66323)
* introduce new feature toggle
* hide calls to new service behind a feature flag
* remove licensing flag from toggle (misunderstood what it was for)
* fix unit tests
* rerun toggle gen
---------
Co-authored-by: Arati R. <33031346+suntala@users.noreply.github.com>
Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
Takes a specific code path for data that identifies itself as dataplane instead of "guessing" what the data is.
The data must identify itself by being in the dataplane by having both the following frame metadata properties:
- TypeVersion property that is greater than 0.0
- 'Type' property
The flag is disableSSEDataplane and disables this functionality and uses the old code for all queries regardless.
See https://github.com/grafana/grafana-plugin-sdk-go/blob/main/data/contract_docs/contract.md for dataplane details.
* Fix expressions instance settings loading
* Introduce a new method to get name or uid
* Update public/app/features/plugins/datasource_srv.ts
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Move getNameOrUid method outside the class
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* Add usage stats about correlations
* Add stats.correlations.count to collected stats
* Expose grafana_stat_totals_correlations metric
* Organize imports
* Correlations: Add documentation
* Add info about the feature toggle and move it to beta
* Remove incorrect bullet point
* Remove a bullet point that is not a step
* Update punctuation
* Update punctuation
* Fix typo
* Fix typo
* Grammar
* Rephrase
* Clarify
* Update transformation.field documentation
* Revert automatic merge formatting
* added what's new and upgrade guide 9.5 and updated whats new index page
* Added new nav and nested folders.
* added empty dashboard state and dashboards section
* fixed caption
* fixed formatting of link and UI element
* Add: onlyExternalOrgRoleSync
* Adds Alerting entries
* Adds alerting screenshots
* More alerting screenshots
* add dashboard panel redesign
* Update _index.md
* Adds search to notification policy entry
* deletes old line
* Removed nested folders (will be private preview and not part of what's new)
* Docs: support bundle section for 9.5 What's New (#65641)
* support bundle section for 9.5 what's new
* Update whats-new-in-v9-5.md
* Update docs/sources/whatsnew/whats-new-in-v9-5.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* doc feedback
---------
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Influxdb database field deprecation notice
* Update reasoning
* fixed typo
* Docs: what's new API keys UI update (#65720)
* API keys deprecation
* Update docs/sources/whatsnew/whats-new-in-v9-5.md
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Update docs/sources/whatsnew/whats-new-in-v9-5.md
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
---------
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
* Docs: API keys UI updates (#65723)
update
* Docs: add dashboard previews deprecation notice (#65692)
* previews deprecation notice
* Apply suggestions from code review
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
---------
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* we set the FF emptyDashboardPage ON by default, so it's available by default
* Update docs/sources/whatsnew/whats-new-in-v9-5.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* add whats new toggle for prom browser cache feature
* Prometheus: metric encyclopedia feature toggle
* spell check
* Product editorial pass
Adds hyperlinks, notes release stages, updates intro, Adds content to upgrade guide
* add blurb for prom query cache
* Add more context to org role sync
Add more context to organization role sync about the ability to change a user's organization role even then sync is enabled. Also outlined why this is valuable and when it should be used.
* copy edit of upgrade guide
* copy edit and link fixes
* Update docs/sources/whatsnew/whats-new-in-v9-5.md
Makes it clear what can happen after sign in.
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Update docs/sources/whatsnew/whats-new-in-v9-5.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Update docs/sources/whatsnew/whats-new-in-v9-5.md
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
* Apply suggestions from code review
* fixes link
* Adds dark screenshot for alerting
* fixes alerting title
* Update whats-new-in-v9-5.md
* added missing quotation mark
* trigger linting
* small change to trigger linting
* fix title to follow pattern
* Update whats-new-in-v9-5.md
* Clearer explanation
* wording edits
* fixed heading levels
* fix title wording
* wording edit and availability fix
* remove extra space
* final copy edit
---------
Co-authored-by: Zsofia <zsofia.komaromi@gmail.com>
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Co-authored-by: brendamuir <100768211+brendamuir@users.noreply.github.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Co-authored-by: Artur Wierzbicki <artur.wierzbicki@grafana.com>
Co-authored-by: polinaboneva <polina.boneva@grafana.com>
Co-authored-by: Galen <galen.kistler@grafana.com>
Co-authored-by: bohandley <brendan.ohandley@gmail.com>
Co-authored-by: Mitchel Seaman <mitchel.seaman@gmail.com>
Co-authored-by: danielkenlee <115471695+danielkenlee@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
Co-authored-by: Fabrizia Rossano <117294258+frossano-grafana@users.noreply.github.com>
* scaffold new browse routes
* a part of rtk query
* load nested data
* .
* link nested dashboards items
* add comment about bad code, update codeowners
* tidies
* Create minimal EC2 interface
* convert regions variable to a function returning a copy
* Add test for multiple calls to regions to check regionsCache
* Add returns to handler after error
* Refactor handleGetRegions
* Plugins: Fix plugin signature calculation not working on Windows
* Plugins: Added test for NTFS path separators in signature verification
* Use filepath.ToSlash and replace its implementation in tests
* Fix typo
* add: deprecation to api keys write path
* boolean w. meessage
* add read and delete endpoints
* better description of deprecation
* updated with puncutations
* Logs: add reference to the start of the logs
* Logs: Improve pagination by scrolling to the first log
* Logs: move first log ref
* Logs navigation: reset scroll on page changes
* Update tests
* Logs navigation: unify reference to start of logs for scrolling to top
* Chore: update test title
* Move scrolling reference a bit more to the top
* Fix SQL query variable throwing error if query returns no data
* Tests to verify that metricFindQuery returns properly and doesn't throw error
* Fix all codepaths that might throw errors because of undefined backendSrv response
* update react 18 related deps
* fix some types
* make sure we're on react-router-dom >= 5.3.3
* Use new root API
* Remove StrictMode for now - react 18 double rendering causes issues
* fix + ignore some @grafana/ui types
* fix some more types
* use renderHook from @testing-library/react in almost all cases
* fix storybook types
* rewrite useDashboardSave to not use useEffect
* make props optional
* only render if props are provided
* add correct type for useCallback
* make resourcepicker tests more robust
* fix ModalManager rendering
* fix some more unit tests
* store the click coordinates in a ref as setState is NOT synchronous
* fix remaining e2e tests
* rewrite dashboardpage tests to avoid act warnings
* undo lint ignores
* fix ExpanderCell types
* set SymbolCell type correctly
* fix QueryAndExpressionsStep
* looks like the types were actually wrong instead :D
* undo this for now...
* remove spinner waits
* more robust tests
* rewrite errorboundary test to not explicitly count the number of renders
* make urlParam expect async
* increase timeout in waitFor
* revert ExplorePage test changes
* Update public/app/features/dashboard/containers/DashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Update public/app/features/dashboard/containers/PublicDashboardPage.test.tsx
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* skip fakeTimer test, ignore table types for now + other review comments
* update package peerDeps
* small tweak to resourcepicker test
* update lockfile...
* increase timeout in sharepublicdashboard tests
* ensure ExplorePaneContainer passes correct queries to initializeExplore
* fix LokiContextUI test
* fix unit tests
* make importDashboard flow more consistent
* wait for dashboard name before continuing
* more test fixes
* readd dashboard name to variable e2e tests
* wait for switches to be enabled before clicking
* fix modal rendering
* don't use @testing-library/dom directly
* quick fix for rendering of panels in firefox
* make PromQueryField test more robust
* don't wait for chartData - in react 18 this can happen before the wait code even gets executed
---------
Co-authored-by: kay delaney <kay@grafana.com>
Co-authored-by: Alex Khomenko <Clarity-89@users.noreply.github.com>
* Align log volumes on x an y axes
* Move helper functions to logs/utils
* Add tests
* Simplify supplementaryQueries.ts
* Fix tests
* Revert code simplifications
To simplify the PR, this can be added in a separate PR
* Fix reusing logs volume when limited/non-limited are used
* Use more specific property name
* Add missing property
* Stretch graph to selected range but only if there's data available
* Fix unit tests
* Fix calculating maximum when bars are stacked
* Sort log volumes by data source name
* Simplify logic to determine if log volumes can be zoomed in
* removes references to CentOS
* starts reorg
* complete restructure
* updates alias
* Update docs/sources/setup-grafana/installation/rpm/index.md
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* incorporates review feedback
* adds install on suse/opensuse
* updates aliases
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* removes start server content from both topics; adds link to start server docs in Next steps
* Apply suggestions from code review
Co-authored-by: Dan Cech <dcech@grafana.com>
* incorporates review feedback
* Apply suggestions from code review
* typo fix
---------
Co-authored-by: Dan Cech <dcech@grafana.com>
* Transformations: Improve UX and fix refId issues
* Show query names and frame names in description
* move to main grafan UI component
* Added unit test
* Fix lint error
---------
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
* fixed headings
* added Cross-account observability section back
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* broke out to 2 steps
* changed headings under Configure AWS aut
* changed headings, added link to IAM
* changed headings
* updated link
* formatting fixes
* more formatting fixes
* made requested change
* cleaned up wording
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Update docs/sources/datasources/aws-cloudwatch/query-editor/index.md
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* removed new
---------
Co-authored-by: Sarah Zinger <sarah.zinger@grafana.com>
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
* Alerting: Remove and revert flag alertingBigTransactions
This is a partial revert of #56575 and a removal of the `alertingBigTransactions` flag.
Real-word use has seen no clear performance incentive to maintain this flag. Lowered db connection count
came at the cost of significant increase in CPU usage and query latency.
* Fix lint backend
* Removed last bits of alertingBigTransactions
---------
Co-authored-by: Armand Grillet <2117580+armandgrillet@users.noreply.github.com>
* Alerting: Tiny refactor on the eval and schedule packages
two very small things:
- We had a constructor on something called a `Context` which is not a `context.Context` so let's just name that constructor `NewContext`
- The user that we use to run query evaluations is the same (with some variation) abstract it to a function so that it can be re-used when necessary.
* Update pkg/services/ngalert/schedule/schedule.go
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
* Update pkg/services/ngalert/schedule/schedule.go
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
---------
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
* Add features dependency to SQLBuilder
* Add features dependency to AccessControlDashboardPermissionFilter
* Add test for folder inheritance
* Dashboard permissions: Return recursive query
* Recursive query for inherited folders
* Modify search builder
* Adjust db.SQLBuilder
* Pass flag to SQLbuilder if CTEs are supported
* Add support for mysql < 8.0
* Add benchmarking for search with nested folders
* Set features to AlertStore
* Update pkg/infra/db/sqlbuilder.go
Co-authored-by: Ieva <ieva.vasiljeva@grafana.com>
* Set features to LibraryElementService
* SQLBuilder tests with nested folder flag set
* Apply suggestion from code review
Co-authored-by: IevaVasiljeva <ieva.vasiljeva@grafana.com>
Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
* Show variables used in the target query
* Remove redundant dot
* Add usage stats about correlations
* Revert "Add usage stats about correlations"
This reverts commit 6f0c70084a.
* Add new property to AlertmanagerConfig type
* Implement fetching successfully applied configurations
Added method to fetch them from the API and its corresponding action and reducer
* Extract ConfigEditor as component to avoid code duplication
* Display dropdown with valid configs upon error and allow to save them
* Fix tests
* Refactor to call new endpoint using RTK
* Improve texts
* Apply suggested refactor
* Change constant casing
* Only show config selector for Grafana AM
* Remove ts-ignore
* Move code together for simplicity
* Remove invalid mock
* Update endpoint and types based on backend changes
* Rename property
* Rename alermanager config property from backend changes
* Disable editing old configurations
Due to the latest backend changes, we no longer will provide the option to edit previous AM configurations in a textearea.
Instead users will only be allowed to reset to a specific one with the same content. For this reason the textearea for old conf
igurations is disabled and a different form action (not submit) is executed on the "reset config" button. The updateAlertManage
rConfigAction is reset to its old functionality due to these changes.
* Add id to AlertManagerCortexConfig type
We'll need it to pass as a parameter to the new reset endpoint
* Add new endpoint for resetting AM configs to an old version
* Move the "Reset to selected configuration" button next to the drop-down
* Add relative offset to configurations
* Alerting: Add endpoint to revert to a previous alertmanager configuration
This endpoint is meant to be used in conjunction with /api/alertmanager/grafana/config/history to
revert to a previously applied alertmanager configuration. This is done by ID instead of raw config
string in order to avoid secure field complications.
SDK release notes:
* Logs contract: ignore remaining fields by @gabor in #659
* Logs contract: more robust field finding, explicit approach by @gabor in #660
* Tracing: Support multiple OTel propagators by @xnyo in #663
* Tracing: Add more details to HTTP Outgoing Request by @xnyo in #664
* Data: Encode Nanosecond into JSON by @kylebrandt in #647
* Data: cmp tests using FrameTestCompareOptions() will no longer ignore time differences beyond millisecond resolution
* Run test datasource query when mounted
* Auto running test-datasource creates more query history entries
* Make exemplar query intercept more robust
* Delete unrelated query history queries
* Revert "Run test datasource query when mounted"
This reverts commit 28b37e4df9.
* Add default query to testdata and grafana datasources
* Templating: __data __field and __series macros
* filter out datacontext from json serialization
* Fix condition
* Update
* Added test cases for formatting data, and field macros
* tracing: show backend trace ids in frontend
* better trace id naming
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* better trace id naming
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* better trace id naming
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* added feature flag
* bind functionality to the feature flag
* use non-generic name for traceid header
* fixed tests
* loki: do not create empty fields
* do not add empty fields
* fixed graphite test mock data
* added unit-tests to queryResponse
* added unit-tests for backend_srv
* more typescript-friendly check
* added unit-tests for runRequest
---------
Co-authored-by: Sven Grossmann <sven.grossmann@grafana.com>
* Add fresh context with timeout and same log properties, re-derive logger
* Unify timeout constants
* Move ctx after shortcut that got added through rebasing
* Unify timeouts
* Port opentracing's SpanFromContext and ContextFromSpan to the grafana tracing package
* Support both opentracing and otel variants
* Better document why we're creating a new ctx
* Add new func to FakeSpan which was added after rebase
* Support grafana-specific traceID key in both tracer implementations
* Added note to contact Support
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
* makes prettier
* Apply suggestions from code review
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
* working but unsure if best strategy
* removal of roleoptions to pass into the profile component
* remove the dispatch of ac
* added comment
* added one more comment tro trigger pipeline
Remove chkconfig dependency
This dependency prevents installation on recent opensuse as they no longer provide chkconfig.
As far as I can tell we don't use it anywhere so it shouldn't be required under any modern linux using systemd,
* Feature Flags: Remove dev-mode from grpc server feature flag
---------
Co-authored-by: Todd Treece <todd.treece@grafana.com>
Co-authored-by: Ryan McKinley <ryantxu@gmail.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.
title:"Product-Area-Here: short description of bug here"
body:
- type:markdown
attributes:
value:|
Thanks for taking the time to fill out this bug report!
Please try to give your issue a good title. Try using the product-area where you are having an issue and a brief description of the problem. Like this:
- `Dashboards: Template Variables break when I do X` or
- `Alerting: message templating plus Slack channel breaks when I do X`
- type:markdown
attributes:
value:|
**HINT:** Have you tried [searching](https://github.com/grafana/grafana/issues) for similar issues? Duplicate issues are common.
**Are you reporting a security vulnerability?** [Submit it here instead](https://github.com/grafana/grafana/security/policy).
- type:markdown
attributes:
value:|
#
- type:textarea
id:bug-describe
attributes:
label:|
# What went wrong?
description:|
#
Describe your bug. What happened? What did you expect to happen?
**Hot Tip:** Record your screen and add it here as a gif.
placeholder:Tell us what you see!
value:|
**What happened**:
-
**What did you expect to happen**:
-
validations:
required:true
- type:markdown
attributes:
value:|
#
- type:textarea
id:bug-repro
attributes:
label:|
# How do we reproduce it?
description:|
#
Whenever possible, please provide **detailed** steps for reproducing your bug.
**This is very helpful info**
placeholder:"Step 1:..."
value:|
**Step 1**:
- Open Grafana and do X
**Step 2**:
- Now click button Y
**Step 3**:
- Wait for the browser to crash. Error message says: "Error..."
validations:
required:true
- type:markdown
attributes:
value:|
#
- type:input
id:gf-version
attributes:
label:|
# What Grafana version are you using?
description:|
#
- [How do I find my Grafana version info?](https://community.grafana.com/t/how-to-find-your-grafana-version-info-3-different-ways/86857)
placeholder:"ex: v9.5.0, or v9.5.0-cloud.5.a016665c (b2a5d45589)"
validations:
required:true
- type:markdown
attributes:
value:|
#
#
# Optional Questions:
#
- type:textarea
id:get-help
attributes:
label:|
## Optional Questions:
### Is the bug inside a Dashboard Panel?
description:|
If the bug appears inside a [dashboard panel](https://grafana.com/docs/grafana/latest/panels-visualizations/#panels-and-visualizations), please use the ["Get-Help" feature](https://grafana.com/docs/grafana/latest/troubleshooting/send-panel-to-grafana-support/). Select **copy to clipboard** and paste the data below.
No need for backticks--this text will get formatted as a code-block.
What's a [dashboard panel](https://grafana.com/docs/grafana/latest/panels-visualizations/#panels-and-visualizations)?
placeholder:Copy "get-help" data here
value:Copy the panel's ["get-help" data](https://grafana.com/docs/grafana/latest/troubleshooting/send-panel-to-grafana-support/) here
- type:dropdown
id:gf-deployment
attributes:
label:Grafana Platform?
description:|
**How** are you running/deploying Grafana?
options:
- I use Grafana Cloud
- Docker
- Kubernetes
- A package manager (APT, YUM, BREW, etc.)
- A downloaded binary
- Other
- I don't know
validations:
required:false
- type:input
id:user-os
attributes:
label:User's OS?
description:What operating system are you running locally?
placeholder:"ex. MacOS Big Sur 11.7, or Ubuntu 20.04..."
- type:input
id:user-browser
attributes:
label:User's Browser?
description:Is the bug occuring in Grafana's user-interface? If so, what browsers are you seeing the problem on? You may choose more than one.
placeholder:"ex. Google Chrome Version 112.0.5615.137 (Official Build) (arm64)..."
- type:dropdown
id:regression
attributes:
label:Is this a Regression?
description:|
A regression means that the feature was working, then you upgraded, and now it's broken.
options:
- 'No'
- 'Yes'
validations:
required:false
- type:input
id:gf-datasource
attributes:
label:Are Datasources involved?
description:|
Is this issue specific to a datasource plugin / plugins? Please list all that apply:
placeholder:"ex. Elasticsearch 5.0.0 or Infinity 1.4.1 ..."
Please use this template to create your bug report. By providing as much info as possible you help us understand the issue, reproduce it and resolve it for you quicker. Therefore take a couple of extra minutes to make sure you have provided all info needed.
PROTIP: record your screen and attach it as a gif to showcase the issue.
- Questions should be posted to: https://community.grafana.com
- Use query inspector to troubleshoot issues: https://bit.ly/2XNF6YS
- How to record and attach gif: https://bit.ly/2Mi8T6K
-->
**What happened**:
**What you expected to happen**:
**How to reproduce it (as minimally and precisely as possible)**:
@@ -23,7 +23,7 @@ Metrics are configured in [metrics-collector.json](https://github.com/grafana/gr
## Backport PR
To automatically backport a PR to a release branch like v7.3.x add a label named `backport v7.3.x`. The label name should follow the pattern `backport <branch-name>`. Once merged grafanabot will automatically
try to cherry-pick the PR merge commit into that branch and open a PR. It will sync the milestone with the source PR so make sure the source PR also is assigned the milestone for the patch release. If the PR is already merged you can still add this label and trigger the backport automation.
try to cherry-pick the PR merge commit into that branch and open a PR. You must then add the milestone to your backport PR.
If there are merge conflicts the bot will write a comment on the source PR saying the cherry-pick failed. In this case you have to do the cherry pick and backport PR manually.
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example:7.4.3or 7.4.3-beta1'
required:true
env:
YARN_ENABLE_IMMUTABLE_INSTALLS:false
YARN_ENABLE_IMMUTABLE_INSTALLS:false
jobs:
main:
runs-on:ubuntu-latest
steps:
# This is a basic workflow to help you get started with Actions
# This is a basic workflow to help you get started with Actions
description: 'The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example:7.4.3or 7.4.3-beta1'
description: 'The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example:7.4.3,7.4.3-preview or 7.4.3-preview1'
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example:7.4.3or 7.4.3-beta1'
@@ -15,7 +15,7 @@ You can contribute to Grafana in several ways. Here are some examples:
- Organize meetups and user groups in your local area.
- Help others by answering questions about Grafana.
**Please note:** We do not currently accept contributions for translations. Please do not submit pull requests for messages.po files - they will be rejected.
**Please note:** We do not currently accept contributions for translations. Please do not submit pull requests translating grafana.json files - they will be rejected. We do accept contributions to mark up phrases for translation. See [Internationalization](contribute/internationalization.md).
For more ways to contribute, check out the [Open Source Guides](https://opensource.guide/how-to-contribute/).
@@ -82,6 +82,6 @@ Before we can accept your pull request, you need to [sign our CLA](https://grafa
## Where do I go from here?
- Set up your [development environment](contribute/developer-guide.md).
- Learn how to [contribute documentation](contribute/README.md).
- Get started [developing plugins](https://grafana.com/docs/grafana/latest/developers/plugins/) for Grafana.
- Learn how to [contribute to our documentation](contribute/documentation/README.md).
- Get started [developing plugins](https://grafana.com/developers/plugin-tools) for Grafana.
- Look through the resources in the [contribute](contribute) folder.
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
datasource_limit=5000
################################### SQL Data Sources #####################
[sql_datasources]
# Default maximum number of open connections maintained in the connection pool
# when connecting to SQL based data sources
max_open_conns_default=100
# Default maximum number of idle connections maintained in the connection pool
# when connecting to SQL based data sources
max_idle_conns_default=100
# Default maximum connection lifetime used when connecting
# 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.
alertmanager_config_poll_interval=60s
# The redis server address that should be connected to.
ha_redis_address=
# The username that should be used to authenticate with the redis server.
ha_redis_username=
# The password that should be used to authenticate with the redis server.
ha_redis_password=
# The redis database, by default it's 0.
ha_redis_db=
# A prefix that is used for every key or channel that is created on the redis server
# as part of HA for alerting.
ha_redis_prefix=
# The name of the cluster peer that will be used as identifier. If none is
# provided, a random one will be generated.
ha_redis_peer_name=
# 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"
@@ -971,13 +1070,18 @@ 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.
min_interval=10s
# This is an experimental option to add parallelization to saving alert states in the database.
# It configures the maximum number of concurrent queries per rule evaluated. The default value is 1
# (concurrent queries per rule disabled).
max_state_save_concurrency=1
[unified_alerting.screenshots]
# Enable screenshots in notifications. You must have either installed the Grafana image rendering
# plugin, or set up Grafana to use a remote rendering service.
@@ -1010,6 +1114,54 @@ disabled_labels =
# Enable the state history functionality in Unified Alerting. The previous states of alert rules will be visible in panels and in the UI.
enabled=true
# Select which pluggable state history backend to use. Either "annotations", "loki", or "multiple"
# "loki" writes state history to an external Loki instance. "multiple" allows history to be written to multiple backends at once.
# Defaults to "annotations".
backend=
# For "multiple" only.
# Indicates the main backend used to serve state history queries.
# Either "annotations" or "loki"
primary=
# For "multiple" only.
# Comma-separated list of additional backends to write state history data to.
secondaries=
# For "loki" only.
# URL of the external Loki instance.
# Either "loki_remote_url", or both of "loki_remote_read_url" and "loki_remote_write_url" is required for the "loki" backend.
loki_remote_url=
# For "loki" only.
# URL of the external Loki's read path. To be used in configurations where Loki has separated read and write URLs.
# Either "loki_remote_url", or both of "loki_remote_read_url" and "loki_remote_write_url" is required for the "loki" backend.
loki_remote_read_url=
# For "loki" only.
# URL of the external Loki's write path. To be used in configurations where Loki has separated read and write URLs.
# Either "loki_remote_url", or both of "loki_remote_read_url" and "loki_remote_write_url" is required for the "loki" backend.
loki_remote_write_url=
# For "loki" only.
# Optional tenant ID to attach to requests sent to Loki.
loki_tenant_id=
# For "loki" only.
# Optional username for basic authentication on requests sent to Loki. Can be left blank to disable basic auth.
loki_basic_auth_username=
# For "loki" only.
# Optional password for basic authentication on requests sent to Loki. Can be left blank.
loki_basic_auth_password=
[unified_alerting.state_history.external_labels]
# Optional extra labels to attach to outbound state history records or log streams.
# Any number of label key-value-pairs can be provided.
# Enable the legacy alerting sub-system and interface. If Unified Alerting is already enabled and you try to go back to legacy alerting, all data that is part of Unified Alerting will be deleted. When this configuration section and flag are not defined, the state is defined at runtime. See the documentation for more details.
@@ -1104,6 +1256,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.
# You can configure the database connection by specifying type, host, name, user and password
@@ -153,6 +161,9 @@
# For "sqlite" only. How many times to retry transaction in case of database is locked failures. Default is 5.
;transaction_retries = 5
# Set to true to add metrics and tracing for database queries.
;instrument_queries = false
################################### Data sources #########################
[datasources]
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
@@ -238,7 +249,7 @@
# for new versions of grafana. The check is used
# in some UI views to notify that a grafana update exists.
# This option does not cause any auto updates, nor send any information
# only a GET request to https://raw.githubusercontent.com/grafana/grafana/main/latest.json to get the latest version.
# only a GET request to https://grafana.com/api/grafana/versions/stable to get the latest version.
;check_for_updates = true
# Set to false to disable all checks to https://grafana.com
@@ -367,6 +378,9 @@
# List of allowed headers to be set by the user, separated by spaces. Suggested to use for if authentication lives behind reverse proxies.
;csrf_additional_headers =
# The CSRF check will be executed even if the request has no login cookie.
;csrf_always_check = false
[security.encryption]
# Defines the time-to-live (TTL) for decrypted data encryption keys stored in memory (cache).
# Please note that small values may cause performance issues due to a high frequency decryption operations.
@@ -455,6 +469,22 @@
# Enter a comma-separated list of users login to hide them in the Grafana UI. These users are shown to Grafana admins and themselves.
; hidden_users =
[secretscan]
# Enable secretscan feature
;enabled = false
# Interval to check for token leaks
;interval = 5m
# base URL of the grafana token leak check service
;base_url = https://secret-scanning.grafana.net
# URL to send outgoing webhooks to in case of detection
;oncall_url =
# Whether to revoke the token if a leak is detected or just send a notification
;revoke = true
[service_accounts]
# Service account maximum expiration date in days.
# When set, Grafana will not allow the creation of tokens with expiry greater than this setting.
@@ -512,6 +542,20 @@
# Set to skip the organization role from JWT login and use system's role assignment instead.
; skip_org_role_sync = false
# Use email lookup in addition to the unique ID provided by the IdP
;oauth_allow_insecure_email_lookup = false
# Set to true to include id of identity as a response header
;id_response_header_enabled = false
# Prefix used for the id response header, X-Grafana-Identity-Id
;id_response_header_prefix = X-Grafana
# List of identity namespaces to add id response headers for, separated by space.
# Available namespaces are user, api-key and service-account.
# The header value will encode the namespace ("user:<id>", "api-key:<id>", "service-account:<id>")
;id_response_header_namespaces = user api-key service-account
# 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 =
#################################### Role-based Access Control ###########
[rbac]
;permission_cache = true
@@ -923,6 +987,26 @@
# 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.
;alertmanager_config_poll_interval = 60s
# The redis server address that should be connected to.
;ha_redis_address =
# The username that should be used to authenticate with the redis server.
;ha_redis_username =
# The password that should be used to authenticate with the redis server.
;ha_redis_password =
# The redis database, by default it's 0.
;ha_redis_db =
# A prefix that is used for every key or channel that is created on the redis server
# as part of HA for alerting.
;ha_redis_prefix =
# The name of the cluster peer that will be used as identifier. If none is
# provided, a random one will be generated.
;ha_redis_peer_name =
# 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. The default value is `0.0.0.0:9094`.
;ha_listen_address = "0.0.0.0:9094"
@@ -955,8 +1039,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.
@@ -967,6 +1051,56 @@
# For example: `disabled_labels=grafana_folder`
;disabled_labels =
[unified_alerting.state_history]
# Enable the state history functionality in Unified Alerting. The previous states of alert rules will be visible in panels and in the UI.
; enabled = true
# Select which pluggable state history backend to use. Either "annotations", "loki", or "multiple"
# "loki" writes state history to an external Loki instance. "multiple" allows history to be written to multiple backends at once.
# Defaults to "annotations".
; backend = "multiple"
# For "multiple" only.
# Indicates the main backend used to serve state history queries.
# Either "annotations" or "loki"
; primary = "loki"
# For "multiple" only.
# Comma-separated list of additional backends to write state history data to.
; secondaries = "annotations"
# For "loki" only.
# URL of the external Loki instance.
# Either "loki_remote_url", or both of "loki_remote_read_url" and "loki_remote_write_url" is required for the "loki" backend.
; loki_remote_url = "http://loki:3100"
# For "loki" only.
# URL of the external Loki's read path. To be used in configurations where Loki has separated read and write URLs.
# Either "loki_remote_url", or both of "loki_remote_read_url" and "loki_remote_write_url" is required for the "loki" backend.
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.
@@ -13,7 +13,6 @@ The following checklist/summary should give you a quick overview of what to ask/
- Reviewed and approved?
- All checks passed?
- Proper pull request title?
- Milestone assigned?
- Add to changelog/release notes?
- Needs backporting?
@@ -40,10 +39,18 @@ See [formatting guidelines](create-pull-request.md#formatting-guidelines) for mo
### Assign a milestone
A milestone **should** be added to every pull request. Several things in the Grafana release process requires at least pull requests to be in a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
Several things in the Grafana release process requires at least pull requests to be in a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
This makes it easier to track what changes go into a certain release. Without this information, release managers have to go through git commits which is not an efficient process.
That being said, _you don't have to assign a milestone manually_ to a pull request.
Instead, when it is merged & closed then a bot will look for the most appropriate miletone and assign it to the pull request.
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 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 requestss should use the version of the target branch (e.g. `9.4.x` for the `v9.4.x` branch).
### Include in changelog and release notes?
At Grafana we generate the [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) and [release notes](https://grafana.com/docs/grafana/latest/release-notes/) based on merged pull requests. Including changes in the changelog/release notes is very important to provide a somewhat complete picture of what changes a Grafana release actually includes.
@@ -78,15 +85,15 @@ The changelog/release notes are divided into sections and here's a description o
**Features and enhancements:**
Milestone assigned and labeled with `add to changelog` and any of the other section rules don't apply.
Labeled with `add to changelog` and any of the other section rules don't apply.
**Bug fixes:**
Milestone assigned and labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
Labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
**Plugin development fixes & changes:**
Milestone assigned and labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
Labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
In more complex cases, especially when you need to style multiple DOM elements in one component, or when using styles that depend on properties and/or state you
can have your getStyles function return an object with many class names and use [Emotion's `cx` function](https://emotion.sh/docs/emotion#cx) to compose them.
can have your getStyles function return an object with many class names and use [Emotion's `cx` function](https://emotion.sh/docs/@emotion/css#cx) to compose them.
Let's say you need to style a component that has a different background depending on the `isActive` property :
"title":"Timeseries panel requires a transform to render timeseries-long",
"type":"timeseries"
},
{
"datasource":{
"type":"testdata",
"uid":"PD8C576611E62080A"
},
"gridPos":{
"h":8,
"w":5,
"x":19,
"y":0
},
"id":4,
"options":{
"code":{
"language":"plaintext",
"showLineNumbers":false,
"showMiniMap":false
},
"content":"The timeseries panel can not show timeseries-long directly, it must first be converted to `timeseries-wide` or `timeseries-multi` first.\n\nThe UI should show a button indicating this.",
1. Make a copy of `oauth2-proxy.example.cfg` and rename it to `oauth2-proxy.cfg`
1. Fill in the required information (`azure client id`, `azure client secret`, `azure tenant id`)
1. Start the containers by executing `make devenv sources="prometheus,auth/prometheus_oauth2_proxy_azure"`
> If you would like to test the login flow from the browser then you need to setup TLS or start a tunnel. I usually use a tunnel (`cloudflared tunnel --url http://localhost:4180`). Do not forget to set the Redirect URIs on Azure's App Registration page
## How to add a new Prometheus datasource with Azure Authentication enabled
1. Navigate to Grafana and login
1. Add a new Prometheus datasource
1. On the new Prometheus datasource page
1. Set the URL
1. Enable Azure Authentication
1. Fill in the required fields of the `Azure Authentication` section
1. Click `Save & test`
1. You should get a "Data source is working" message
If you check the logs of OAuth2-proxy, you should see similar lines to this:
# You can specify HTTP/1.1 server keep alive timeout in seconds for incoming connections.
# A value of 0 makes the http server behave similarly to Node.js versions prior to 8.0.0, which did not have a keep-alive timeout.
# WORKAROUND: Through given configuration you can workaround following issue https://github.com/verdaccio/verdaccio/issues/301. Set to 0 in case 60 is not enough.
server:
keepAliveTimeout:60
# Allow `req.ip` to resolve properly when Verdaccio is behind a proxy or load-balancer
# PATH-like list of directories within which to find projects.
# If all projects are checked out into the same directory, ~/repos/ for example, then the default should work.
ifeq($(originREPOS_PATH),undefined)
export REPOS_PATH:=$(realpath $(GIT_ROOT)/..)
endif
# How to treat Hugo relref errors.
ifeq($(originHUGO_REFLINKSERRORLEVEL),undefined)
export HUGO_REFLINKSERRORLEVEL:= WARNING
endif
.PHONY:docs-rm
docs-rm:## Remove the docs container.
$(PODMAN) rm -f $(DOCS_CONTAINER)
.PHONY:docs-pull
docs-pull:## Pull documentation base image.
$(PODMAN) pull -q $(DOCS_IMAGE)
make-docs:## Fetch the latest make-docs script.
make-docs:
if[[ ! -f "$(PWD)/make-docs"]];then
echo'WARN: No make-docs script found in the working directory. Run `make update` to download it.' >&2
exit1
fi
.PHONY:docs
docs:## Serve documentation locally, which includes pulling the latest `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image. See also `docs-no-pull`.
docs:docs-pullmake-docs
$(PWD)/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)
.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)
.PHONY:doc-validator
doc-validator:## Run doc-validator on the entire docs folder.
@@ -6,6 +6,10 @@ description: This section contains information about API keys in Grafana
keywords:
- API keys
- Service accounts
labels:
products:
- enterprise
- oss
menuTitle: API keys
title: API keys
weight: 700
@@ -17,7 +21,9 @@ An API key is a randomly generated string that external systems use to interact
When you create an API key, you specify a **Role** that determines the permissions associated with the API key. Role permissions control that actions the API key can perform on Grafana resources.
> **Note:** If you use Grafana v8.5 or newer, use service accounts instead of API keys. For more information, refer to [Grafana service accounts]({{< relref "../service-accounts/" >}}).
{{% admonition type="note" %}}
If you use Grafana v9.1 or newer, use service accounts instead of API keys. For more information, refer to [Grafana service accounts]({{< relref "../service-accounts/" >}}).
{{% /admonition %}}
{{< section >}}
@@ -61,7 +67,9 @@ For more information about the benefits of service accounts, refer to [Grafana s
The service account endpoints generate a machine user for authentication instead of using API keys. When you migrate an API key to a service account, a service account will be created with a service account token.
> **Note:** If you are using API keys for authentication, we recommend that you migrate your integration to the service account authentication method. The API key will continue to work. You can locate the API key in the [Grafana service account tokens]({{< relref "../service-accounts/#service-account-tokens" >}}) details.
{{% admonition type="note" %}}
If you're currently using API keys for authentication, we strongly recommend to use Grafana Service Accounts instead. Rest assured, when migrating to Service Accounts, your existing API keys will continue working as before. To find the migrated API keys, navigate to the Service Accounts section and select the Service Account Tokens tab. For more information, please refer to the [Grafana service account tokens]({{< relref "../service-accounts/#service-account-tokens" >}}) details.
{{% /admonition %}}
## Ways of migrating API keys to service accounts
@@ -106,9 +114,9 @@ To migrate a single API key to a service account, complete the following steps:
1. Find the API Key you want to migrate.
1. Click **Migrate to service account**.
### Migrate API keys to Grafana service accounts using the API
### Migrate API keys to Grafana service accounts for API calls
This section shows you how to migrate API keys to Grafana service accounts using the Grafana API.
This section shows you how to migrate API keys to Grafana service accounts for Grafana API workflows. For references see: [Grafana Service Accounts for the Grafana API]({{< relref "../../developers/http_api/serviceaccount/#create-service-account" >}}).
#### Before you begin
@@ -120,14 +128,14 @@ To follow these instructions, you need one of the following:
#### Steps
Complete the following steps to migrate from API keys to service accounts using the API:
Complete the following steps to migrate from API keys to service accounts for API:
1. Call the `POST /api/serviceaccounts` endpoint and the `POST /api/serviceaccounts/<id>/tokens`.
This action generates a service account token.
1. Store the ID and secret that the system returns to you.
1. Pass the token in the `Authrorization` header, prefixed with `Bearer`.
1. Pass the token in the `Authorization` header, prefixed with `Bearer`.
This action authenticates API requests.
@@ -135,9 +143,44 @@ Complete the following steps to migrate from API keys to service accounts using
1. Remove code that handles the old `/api/auth/keys` endpoint.
1. Track the [API keys](http://localhost:3000/org/apikeys) in use and migrate them to SATs.
### Migrate API keys to Grafana service accounts using Terraform
#### Example
This section shows you how to migrate API keys to Grafana service accounts using Terraform.
### Migrate API keys to Grafana service accounts in Terraform
This section shows you how to migrate your Terraform configuration for API keys to Grafana service accounts. For resources, see [Grafana Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/service_account_token).
For migration your cloud stack api keys, use the `grafana_cloud_stack_service_account` and `gafana_cloud_stack_service_account_token` resources see [Grafana Cloud Stack Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/cloud_stack_service_account).
#### Steps
@@ -147,3 +190,170 @@ Complete the following steps to migrate from API keys to service accounts using
1. Specify the desired scopes and expiration date when creating the service account.
1. Use the token returned from `grafana_service_account_token` to authenticate the API requests.
1. Remove the terraform configuration for creating your `grafana_api_key` resources.
**Example: your current Terraform configuration**
```tf
terraform{
required_providers{
grafana={
source="grafana/grafana"
}
}
}
# configure the provider with basic auth
provider"grafana"{
url="http://localhost:3000"
auth="admin:admin"
}
resource"grafana_api_key""foo"{
name="key_foo"
role="Viewer"
}
resource"grafana_api_key""bar"{
name="key_bar"
role="Admin"
seconds_to_live=30
}
```
**Your new Terraform configuration**
_Note:_ you can create multiple tokens using one service account.
```tf
terraform{
required_providers{
grafana={
source="grafana/grafana"
}
}
}
# configure the provider with basic auth
provider"grafana"{
url="http://localhost:3000"
auth="admin:admin"
}
# Creating a service account in Grafana instance to be used as auth and attach tokens
# notice we can attach multiple tokens to one service account
resource"grafana_service_account""sa-admin"{
name="sa-admin"
role="Admin"
}
# Creating a service account token in Grafana instance to be used for creating resources in Grafana instance
### Migrate Cloud **Stack** API keys to Grafana cloud stack service accounts in Terraform
This section shows you how to migrate your Terraform configuration for Grafana cloud stack API keys to Grafana cloud stack service accounts. For migration your cloud stack api keys, use the `grafana_cloud_stack_service_account` and `gafana_cloud_stack_service_account_token` resources see [Grafana Cloud Stack Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/cloud_stack_service_account).
{{% admonition type="note" %}}
This is only relevant for Grafana Cloud **Stack** API keys `grafana_cloud_stack_api_key`. Grafana Cloud API keys resource `grafana_cloud_api_key` are not deprecated and should be used for authentication for managing your Grafana cloud.
{{% /admonition %}}
#### Steps
Complete the following steps to migrate from cloud stack API keys to cloud stack service accounts using Terraform:
1. Generate `grafana_cloud_stack_service_account` and `grafana_cloud_stack_service_account_token` resources.
1. Specify the desired scopes and expiration date when creating the service account.
1. Use the token returned from `grafana_cloud_stack_service_account_token` to authenticate the API requests.
1. Remove the Terraform configuration for creating your `grafana_cloud_stack_api_key` resources.
**Example: Your current Terraform configuration**
```tf
terraform{
required_providers{
grafana={
source="grafana/grafana"
}
}
}
# Declaring the first provider to be only used for creating the cloud-stack
You can configure correlations using the **Administration > Correlation** page in Grafana or with [provisioning]({{< relref "../provisioning" >}}).
{{% 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" 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 "../../../administration/roles-and-permissions" >}}) is available with [Role-based access control]({{< relref "../../../administration/roles-and-permissions/access-control" >}}).
## Add permissions to create correlations
1. Go to the Administration section in Grafana.
1. Open Users page.
1. Select the user to be granted access to create correlations.
Each correlation is configured with the following options:
**Label**
: Link label, shown in the visualization
**Description**
: Optional description
**Source data source**
: The source of results that have links displayed
**Results field**
: Defines where the link is shown in a visualization
**Target query**
: The target query run when a link is clicked
**Transformations**
: Optional manipulations to the source data included passed to the target query
Learn how to create correlations using the [Administration page]({{< relref "./create-a-new-correlation#create-a-correlation-in-administration-page" >}}) or with [provisioning]({{< relref "./create-a-new-correlation#create-a-correlation-with-provisioning" >}}).
## 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">}})).
## Target query
The target query is run when a link is clicked in the visualization. You can use the query editor of the selected target data source to specify the target query. Source data results can be accessed inside the target query with variables.
### Correlation Variables
You can use variables inside the target query to access the source data related to the query.
Correlations use [Grafana variable syntax]({{< relref "../../../dashboards/variables/variable-syntax" >}}).
Variables are filled with values from the source results when the link is clicked. There are two types of variables you can use:
- [field variables]({{< relref "../../../panels-visualizations/configure-data-links#field-variables" >}}) (allows to access field values and labels)
- 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:
- A field variable ${\_\_data.fields.employee}
- A correlation variable that maps the field value above to ${employee}
In addition to mapping field values to shorter variable names, more correlation variables can be created by applying transformations to existing fields
For more details, please see the example in [Use variables and transformations in a correlation]({{< relref "./use-variables-and-transformations" >}}).
### Correlation Transformations
Correlations provide a way to extract more variables out of field values. The output of transformations is a set of new variables that can be accessed as any other variable.
There are two types of transformations: logfmt and regular expression.
Each transformation uses a selected field value as the input. The output of a transformation is a set of new variables based on the type and options of the transformation.
For more details, please see the example in [Use variables and transformations in a correlation]({{< relref "./use-variables-and-transformations" >}}) for more details.
### Logfmt transformation
The logfmt transformation deconstructs a field value containing text formatted with [logfmt key/value pairs](https://brandur.org/logfmt). Each pair becomes a variable with the key being the name of the variable.
The logfmt transformation only requires specifying the input field name if you would like the transformation to apply to a different field than the results field.
Example output variables for field = “host=srv001 endpoint=/test app=foo”:
| name | value |
| :------- | :----- |
| host | srv001 |
| endpoint | /test |
| app | foo |
### Regular expression transformation
The regular expression transformation deconstructs a field value based on the provided regular expression.
Regular expression transformation options:
**field**
: Input field name
**expression**
: Regular expression. Named capture groups are mapped to variables matching the group name. If non-named matching groups are used a variable is created out of the first match. The value overrides the variable matching the input field or a new variable is created if mapValue is provided (check the example below)
**mapValue**
: Used with simple regex groups without named matching groups. By default, the first match overrides the variable with the name of the field that is used as the input. To change that default behavior you can specify the mapValue property. The provided name is used to create a new variable. This can be useful if your target query requires both the exact value and a part of the value extracted with the transformation.
Example: Assuming the selected field name is “employee” and the field value is “John Doe”.
Various output variables based on expression and mapValue options:
| /\\w+ (\\w+)/ | - | employee=Doe | No mapValue provided. The first matching is mapped to the existing field name variable (employee) |
| /(\\w+) (\\w+)/ | name | name=John | The first matching is mapped to a new variable called “name” |
| /(?\\w+) (?\\w+)/ | - | firstName=John, lastName=Doe | When named groups are used they are the names of the output variables and mapValue is ignored. |
| /(?\\w+) (?\\w+)/ | name | firstName=John, lastName=Doe | Same as above |
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.
Users with [Admin base role]({{< relref "../../../administration/roles-and-permissions" >}}) or with [datasources:write RBAC role]({{< relref "../../../administration/roles-and-permissions/access-control" >}}) can:
: The field that will be transformed. If this is not defined, it will apply the transformation to the data from the correlation's config.field.
**transformation.expression**
: Regex expression (regex transformation only)
**transformation.mapValue**
: New name of the variable from the first regex match (regex transformation only)
### Determine target query model structure
When you set up a correlation with admin page you can use the target query editor. When you use provisioning you may need to know the structure of the target query which may not be well documented depending on the plugin. Here is a quick step-by-step guide on how to determine the target query model:
1. Open Explore.
1. Select the data source you want to use as the target of the correlation.
1. Open the inspector tab and select “Query”.
1. Run a sample query.
1. Inspect results.
1. Look for the “queries” list object. Each object is created using the query model structure defined by the data source. You can use the same structure in your provisioning file.
The query model in this example is represented by the first entry in the queries list. Properties “refId” and “datasource” are added to all queries in runtime and can be omitted:
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. Expand log row details.
1. If the selected row contains all the information required to build the target query a link appears in the “Links” section at the bottom.
1. Additional information about used variables and their values is shown next to each link.
{{< figure src="/static/img/docs/correlations/correlations-in-logs-panel-10-0.png" max-width="600px" caption="Correlation links in Logs panel" >}}
## Correlations in Table
1. Setup a correlation.
1. Open Explore.
1. Select a data source that you chose as the source data source of the correlation.
1. Run a query that results in data containing fields required to build variables in the target query.
1. Links are added to cell rows in the column representing the field with the assigned link ([the results field]({{< relref "../correlation-configuration#source-data-source-and-result-field" >}}).
1. 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" >}}
title: Use variables and transformations in a correlation
weight: 60
---
# Use variables and transformations in a correlation
## Before you begin
This example walks through creating a link in a test data source but the same principles apply to any data source.
The example emulates a scenario with two data sources:
- Logs containing lines in the format: “2020-01-01 10:00 level=error message=error service=app1.loginService” stored in a field named “msg”
- Metrics for application included in the service name of a log line (e.g. app1)
Instructions below show how to set up a link that can run metrics query for the host included in each log line with provisioning and regex transformation. Additionally, a link with a query containing the full name of the service is set up to demonstrate the logfmt transformation.
## Use variables and transformations in provisioning
1. Add the following provisioning configuration to your Grafana:
```yaml
datasources:
- name: Target
uid: test-target
type: testdata
- name: Source
uid: test-source
type: testdata
- name: Source
uid: test-source
type: testdata
correlations:
- targetUID: test-target
label: App metrics
description: Application HTTP request metrics
config:
type: query
target:
scenario_id: random_walk
alias: $${application}
field: msg
transformations:
- type: regex
field: msg
expression: service=(\w+)\.\w+
mapValue: application
- targetUID: test-target
label: Service metrics
description: Service metrics
config:
type: query
target:
scenario_id: random_walk
alias: $${service}
field: msg
transformations:
- type: logfmt
field: msg
```
Two data sources are created: Source (emulating logs data source) and Target (emulating metrics data source):
- A correlation called “App metrics” is created targeting the Target data source with its UID.
- The label and description are provided as text
- Each correlation contains the following configuration:
- Required correlation type (query)
- Target query matching test data source model
- “App metrics” correlation contains the following configuration:
- Alias is set to ${application} variable (note that in provisioning files $ is used to access environment variables so it has to be [escaped]({{< relref "../../../administration/provisioning#using-environment-variables" >}})).
- 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”.
- “Service metrics” correlation is created in a similar way but with logfmt transformation to break down log message and access full name of the service (e.g. “app1.loginService”).
- For example, when a logline “2020-01-01 10:00 level=error message=error service=app1.loginService” is provided as the input, the transformation produces new variables: level, message, and service.
- “service” variable is used as the alias in the target query.
1. Navigate to Explore and open “Source” data source.
1. Select the “Raw Frames” scenario and provide the following data frames to emulate returning log lines:
description: Data source management information for Grafana administrators
labels:
products:
- enterprise
- oss
title: Data source management
weight: 100
---
@@ -21,7 +25,9 @@ Only users with the organization admin role can add data sources.
Before you can create your first dashboard, you need to add your data source.
> **Note:** Only users with the organization admin role can add data sources.
{{% admonition type="note" %}}
Only users with the organization admin role can add data sources.
{{% /admonition %}}
**To add a data source:**
@@ -30,13 +36,15 @@ Before you can create your first dashboard, you need to add your data source.
1. Click the data source you want to add.
1. Configure the data source following instructions specific to that data source.
For links to data source-specific documentation, see [Data sources]({{< relref "../../datasources" >}}).
For links to data source-specific documentation, see [Data sources]({{< relref "../../datasources" >}}).
## Data source permissions
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.
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud).
{{% admonition type="note" %}}
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.
@@ -46,7 +54,8 @@ By default, data sources in an organization can be queried by any user in that o
You can assign data source permissions to users, teams, and roles which will allow access to query or edit the data source.
1.Navigate to **Administration > Data sources**.
1.Click **Connections** in the left-side menu.
1. Under Your connections, click **Data sources**.
1. Select the data source to which you want to assign permissions.
1. On the Permissions tab, click **Add a permission**.
1. Select **User**, **Team**, or **Role**.
@@ -58,7 +67,8 @@ You can assign data source permissions to users, teams, and roles which will all
### Edit data source permissions for users, teams, or roles
1.Navigate to **Administration > Data sources**.
1.Click **Connections** in the left-side menu.
1. Under Your connections, click **Data sources**.
1. Select the data source for which you want to edit permissions.
1. On the Permissions tab, find the user, team, or role permission you want to update.
1. Select a different option in the **Permission** dropdown.
@@ -67,32 +77,41 @@ You can assign data source permissions to users, teams, and roles which will all
### Remove data source permissions for users, teams, or roles
1.Navigate to **Administration > Data sources**.
1.Click **Connections** in the left-side menu.
1. Under Your connections, click **Data sources**.
1. Select the data source from which you want to remove permissions.
1. On the Permissions tab, find the user, team, or role permission you want to remove.
1. Click the **X** next to the permission.
<div class="clearfix"></div>
## Query caching
## Query and resource caching
When query caching is enabled, Grafana temporarily stores the results of data source queries. When you or another user submit the exact same query again, the results will come back from the cache instead of from the data source (like Splunk or ServiceNow) itself.
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.
Query caching works for all backend data sources. You can enable the cache globally and configure the cache duration (also called Time to Live, or TTL).
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).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
The caching feature works for **all** backend data sources. You can enable the cache globally in Grafana's [configuration]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}), and configure a cache duration (also called Time to Live, or TTL) for each data source individually.
The following cache backends are available: in-memory, Redis, and Memcached.
{{% admonition type="note" %}}
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud/).
{{% /admonition %}}
> **Note:** Storing cached queries in-memory can increase Grafana's memory footprint. In production environments, a Redis or Memcached backend is highly recommended.
The following cache backend options are available: in-memory, Redis, and Memcached.
When a panel queries a cached data source, the time until this query fetches fresh data is determined by the panel's **interval.** This means that wider panels and dashboards with shorter time ranges fetch new data more frequently than narrower panels and dashboards with longer time ranges.
{{% admonition type="note" %}}
Storing cached queries in-memory can increase Grafana's memory footprint. In production environments, a Redis or Memcached backend is highly recommended.
{{% /admonition %}}
Interval is visible in a panel's [query options]({{< relref "../../panels-visualizations/query-transform-data/" >}}). It is calculated like this: `(max data points) / time range`. Max data points are calculated based on the width of the panel. For example, a full-width panel on a dashboard with a time range of `last 7 days` will retrieve fresh data every 10 minutes. In this example, cached data for this panel will be served for up to 10 minutes before Grafana queries the data source again and returns new data.
When a panel queries a data source with cached data, it will either fetch fresh data or use cached data depending on the panel's **interval.** The interval is used to round the query time range to a nearby cached time range, increasing the likelihood of cache hits. Therefore, wider panels and dashboards with shorter time ranges fetch new data more often than narrower panels and dashboards with longer time ranges.
You can make a panel retrieve fresh data more frequently by increasing the **Max data points** setting in the panel's [query options]({{< relref "../../panels-visualizations/query-transform-data/" >}}).
A panel's interval is visible in the [query options]({{< relref "../../panels-visualizations/query-transform-data/" >}}). It is calculated as follows: `time range / max data points`. Max data points are calculated based on the width of the panel. For example, a wide panel with `1000 data points` on a dashboard with a time range of `last 7 days` will retrieve fresh data every 10 minutes: `7d / 1000 = 10m`. In this example, cached data for this panel will be served for up to 10 minutes before Grafana needs to query the data source again for new data.
### Query caching benefits
You can configure a panel to retrieve data more often by increasing the **Max data points** setting in the panel's [query options]({{< relref "../../panels-visualizations/query-transform-data/" >}}).
### Caching benefits
By reducing the number of queries and requests sent to data sources, caching can provide the following benefits:
- Faster dashboard load times, especially for popular dashboards.
- Reduced API costs.
@@ -100,21 +119,13 @@ You can make a panel retrieve fresh data more frequently by increasing the **Max
### Data sources that work with query caching
Query caching works for all [Enterprise data sources](/grafana/plugins/?type=datasource&enterprise=1) as well as the following [built-in data sources]({{< relref "../../datasources/" >}}):
Query caching works for Grafana's [built-in data sources]({{< relref "../../datasources/#built-in-core-data-sources" >}}), and [backend data source plugins](https://grafana.com/grafana/plugins/?type=datasource) that extend the `DataSourceWithBackend` class in the plugins SDK.
- CloudWatch Metrics
- Google Cloud Monitoring
- InfluxDB
- Microsoft SQL Server
- MySQL
- Postgres
- Tempo
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.
Some data sources, such as Elasticsearch, Prometheus, and Loki, cache queries themselves, so Grafana query caching does not improve performance.
Query caching also works for all data sources that include a backend. More specifically, caching works with data sources that extend the `DataSourceWithBackend` class in the plugins SDK.
To tell if a data source works with query caching, follow the instructions below 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](/developers/plugin-tools/introduction/backend-plugins) for details.
{{% /admonition %}}
### Enable and configure query caching
@@ -122,37 +133,44 @@ You must be an Org admin or Grafana admin to enable query caching for a data sou
By default, data source queries are not cached. To enable query caching for a single data source:
1.On the left-side menu, click **Administration > Data sources**.
1.Click **Connections** in the left-side menu.
1. Under Your Connections, click **Data sources**.
1. In the data source list, click the data source that you want to turn on caching for.
1.Open the Cache tab.
1.Go to the Cache tab.
1. Click **Enable**.
1. (Optional) Choose custom TTLs for the data source's queries and resources caching. If you skip this step, then Grafana uses the default TTL.
You can optionally override a data source's configured TTL for individual dashboard panels. This can be be useful when you have queries whose results change more or less often than the configured TTL. In the Edit Panel view, select the caching-enabled data source, expand the Query options, and enter your the TTL in milliseconds.
You can optionally override a data source's configured TTL for individual dashboard panels. This can be useful when you have queries whose results change more or less often than the configured TTL. In the Edit Panel view, select the caching-enabled data source, expand the Query options, and enter your the TTL in milliseconds.
{{< figure max-width="500px" src="/media/docs/grafana/per-panel-cache-ttl-9-4.png" caption="Set Cache TTL for a single panel" >}}
> **Note:** If query caching is enabled and the Cache tab is not visible in a data source's settings, then query caching is not available for that data source.
{{% admonition type="note" %}}
If query caching is enabled and the Cache tab is not visible in a data source's settings, then query caching is not available for that data source.
{{% /admonition %}}
To configure global settings for query caching, refer to the [Query caching section of Enterprise Configuration]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}).
To configure global settings for query caching, refer to the `caching` section of [Configure Grafana Enterprise]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}).
### Disable query caching
To disable query caching for a single data source:
1.On the left-side menu, click **Administration > Data sources**.
1.Click **Connections** in the left-side menu.
1. Under Your Connections, click **Data sources**.
1. In the data source list, click the data source that you want to turn off caching for.
1.In the Cache tab, click **Disable**.
1.On the Cache tab, click **Disable**.
To disable query caching for an entire Grafana instance, set the `enabled` flag to `false` in the [Query caching section of Enterprise Configuration]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}). You will no longer see the Cache tab on any data sources, and no data source queries will be cached.
To disable query caching for an entire Grafana instance, set the `enabled` flag to `false` in the `caching` section of [Configure Grafana Enterprise]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}). You will no longer see the Cache tab on any data sources, and no data source queries will be cached.
### Clear cache
If you experience performance issues or repeated queries become slower to execute, consider clearing your cache.
> **Note:** This action impacts all cache-enabled data sources. If you are using Memcached, the system clears all data from the Memcached instance.
{{% admonition type="note" %}}
This action impacts all cache-enabled data sources. If you are using Memcached, the system clears all data from the Memcached instance.
{{% /admonition %}}
1.On the left-side menu, click **Administration > Data sources**.
1.Click **Connections** in the left-side menu.
1. Under Your Connections, click **Data sources**.
1. In the data source list, click the data source that you want to clear the cache for.
1. In the Cache tab, click **Clear cache**.
@@ -177,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).
title: Manage your Grafana Enterprise license in AWS Marketplace
weight: 400
---
@@ -32,9 +36,9 @@ You can use AWS Marketplace to make the following modifications to your Grafana
1. Sign in to Grafana as a Server Administrator.
1. Click **Administration** in the left-side menu, and then **Stats and license**.
1. Click **Administration** in the side navigation menu, and then **Stats and license**.
1. In the **Token** section under **Enterprise License**, click **Renew License**.
1. In the **Token** section under **Enterprise License**, click **Renew token**.
This action retrieves updated license information from AWS.
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.