`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 logs and interval 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)
"Release: Updated versions in package to 9.5.16"
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.
---------
(cherry picked from commit c631261681)
Signed-off-by: gotjosh <josue.abreu@gmail.com>
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)
CI: Test backend on feature-toggles documentation changes (#78177)
Run backend tests if the feature-toggles documentation changes
(cherry picked from commit d78b3fea2f)
"Release: Updated versions in package to 9.5.15"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
* Alerting: Fix state manager to not keep datasource_uid and ref_id labels in state after Error (#72216)
(cherry picked from commit 78fc3bcdf4)
* user QueryError
---------
Co-authored-by: Yuri Tseretyan <yuriy.tseretyan@grafana.com>
CI: Fix race condition when building docker on main (#77504)
* build docker after packages are updated
* use my branch for main pipelines for testing
* use my branch for main pipelines for testing
* use main instead now
* formatting
(cherry picked from commit f6d3238505)
CI: Update RGM steps to use the artifacts command (#77470)
* update rgm steps to use artifacts subcmd
* format-drone
* make drone
(cherry picked from commit 8a5d4c4c6e)
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
* Disable steps that don't work for older versions
* Fix permissions of validate-npm-packages.sh
[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 9.5.14"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
"Release: Updated versions in package to 9.5.13"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
Transformations: Config overrides being lost when config from query transform is applied (#69720)
fix config overides being lost by transforms
(cherry picked from commit a5b9eac88e)
Co-authored-by: Ibrahim <93064150+IbrahimCSAE@users.noreply.github.com>
"Release: Updated versions in package to 9.5.11"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
* Docs: replace broken link with current docs location (#74884)
Replaced broken link with current docs location
(cherry picked from commit fb91919e3b)
* Updated link location
* 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)
* Removed bad commands from file
Docs: 404 fix - updated alerting link (#74628)
* Fixed contact points link in 8.4 what's new
* Updated link per Jack's suggestion
(cherry picked from commit 84106568aa)
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)
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)
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>
"Release: Updated versions in package to 9.5.10"
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>
* 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>
* 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
Sync-mirror GHA updates (#73504)
fixing sync-mirror run-name and altering concurrency to use branch name
(cherry picked from commit 4047cdb213)
Co-authored-by: Ricky Whitaker <ricky.whitaker@grafana.com>
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>
* 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)
* Trigger PR automation
---------
Co-authored-by: George Robinson <george.robinson@grafana.com>
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>
GenericOAuth: Set sub as auth id (#65902)
* GenericOAuth: Set sud as auth id
* GenericOAuth: Extract function to reduce complexity
(cherry picked from commit 7cd6018253)
Co-authored-by: Karl Persson <kalle.persson@grafana.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>
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 _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)
* Apply suggestions from code review
---------
Co-authored-by: Eva <ebuchala@gmail.com>
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)
* 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)
* make drone
---------
Co-authored-by: Guilherme Caulada <guilherme.caulada@grafana.com>
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)
"Release: Updated versions in package to 9.5.8"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.com>
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>
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>
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)
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>
Auth: update generic OAuth documentation (#70330)
* update generic OAuth docs
* update examples and sync sections
* formatting and adding more links to OAuth integrations
* add a section with config walkthrough
* move examples to the end of the doc
* extend role mapping
* add a before you begin section, clean up steps, remove some text
* remove unnecessary section
* OAuth -> OAuth2
* remove Centrify example because it's likely outdated
* add shared intro content
* add refresh token to tasks, clean up more sections
* Update docs/sources/setup-grafana/configure-security/configure-authentication/generic-oauth/index.md
* indentation and small descriptions under headings
* add a table for config options
* clean up more sections
* rewrite email address section
* rewriting login and display name sections, plus adding line breaks
* update role mapping section
* update section names
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
(cherry picked from commit 276c63a656)
Co-authored-by: Ieva <ieva.vasiljeva@grafana.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)
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>
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)
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.
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
"Release: Updated versions in package to 9.5.7"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.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>
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: Remove and revert flag alertingBigTransactions (#65976)
* 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>
(cherry picked from commit 63187fae0c)
Co-authored-by: Matthew Jacobson <matthew.jacobson@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)
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>
SQLStore: Fix Postgres dialect treating "false" migrator default as true (#69353)
* SQLStore: Fix Postgres dialect treating "false" migrator default as true
Previously, when creating a migration you could choose a default value for a new
boolean column that looked correct but would be interpreted incorrectly by the
Postgres dialect. For example, values such as "false" or "FALSE" would be treated
as true by the Postgres dialect.
This refactors how migration dialects determine the Default column value for boolean
type columns. Each dialect now uses the same base code to parse the Default literal
and panics if an unknown value is encountered.
So, now AddColumnMigration and AddTableMigration will ensure that across dialects:
- The exact same Default literals will be allowed.
- The literals are converted to equivalent defaults in their DDL.
- An error will be thrown if an invalid literal is provided.
(cherry picked from commit 44972d0cd5)
Co-authored-by: Matthew Jacobson <matthew.jacobson@grafana.com>
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>
"Release: Updated versions in package to 9.5.6"
Co-authored-by: grafana-delivery-bot[bot] <132647405+grafana-delivery-bot[bot]@users.noreply.github.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>
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>
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.
(cherry picked from commit a4a16b62c7)
Signed-off-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>
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
# scripts/drone/events/release.star
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: Azure doc link update (#69749)
Update index.md
Link update
(cherry picked from commit 3e48c0b570)
Co-authored-by: Jan Garaj <jan.garaj@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: 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>
[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)
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>
* Update cascading front matter to use sequence form (#67094)
* Update cascading front matter to use sequence form
The map form does not override the sequence form that is used in the website repository to specify the default labels.
For more information, refer to https://github.com/grafana/writers-toolkit/pull/234.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Remove useless alias
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Update labels for pages noted in code review
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Move all product labeling to the project index file
All changes can be made in a single place.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Move all individual page product labels to project index file
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Shorten YAML
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Add newlines to aid readability
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Document front matter ordering
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Rewrite labels for breaking-changes pages
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* updated labels for whats new and breaking changes
---------
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
(cherry picked from commit f29b058927)
* Remove breaking changes section that is not in this version of the docs
Could be confusing to readers.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
* Remove changes that do not relate to this version
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>
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>
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>
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>
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>
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>
Revert "[v9.5.x] [feat] docs; update admonition syntax (#68856)"
This reverts commit 08ea5c94c6.
I believe that because of automatic conflict resolution, this backport PR contained a number of extra changes that were not part of the update to use admonition syntax.
I'm first going to revert this PR to prevent the confusing behavior in PRs like #68832.
If we still want admonition changes backported, we can open a new PR which I would like to be a reviewer on to double check.
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
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>
Utils: Reimplement util.GetRandomString to avoid modulo bias (#64481)
* reimplement GetRandomString, add tests that results are unbiased
(cherry picked from commit 7e765c870a)
Co-authored-by: Dan Cech <dcech@grafana.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
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>
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
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>
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>
Revert: Allow editors to access GET /datasources (#68632)
Revert "Allow editors to access GET /datasources"
This reverts commit 5a830c43c0.
(cherry picked from commit 6a2bcba078)
Co-authored-by: Eric Leijonmarck <eric.leijonmarck@gmail.com>
Dashboard: Re-align Save form (#68565)
flex direction column does not add anything to the layout in the save form, but has an alignment issue in safari
(cherry picked from commit 71e7ec1c83)
Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
CloudMonitor: Show template variables by default (#68331)
CloudMonitor: show template variables by default
(cherry picked from commit 9503f22f53)
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
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>
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
* 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)
* Changelog prettier
---------
Co-authored-by: gordeevnm <gordeevnm@gmail.com>
Row-repeats: Fix disappearing panel when viewed panel is refreshed (#58392)
* Row-repeats: Fix disappearing panel when viewed panel is refreshed
Close#57159
Co-authored-by: kay delaney <45561153+kaydelaney@users.noreply.github.com>
* Prometheus: Fix Query Inspector expression range value (#67919)
* Use metadata from respective query
* Unit test to cover having proper metadata for each query we run
(cherry picked from commit 69a38def63)
* Fix test
* CI: Add Windows backend tests in more places
* CI: Add promotion pipeline for publishing new windows-test-images
* CI: Ignore windows backend-test failures for now
* CI: Fix linting issue in ci_images.star file
(cherry picked from commit b2fc285a5d)
Backport of https://github.com/grafana/grafana/pull/66438
Google Cloud Monitor: Fix mem usage for dropdown (#67683)
* Google Cloud Monitor: Fix mem usage for dropdown
Previously the Metric name dropdown would attempt to load _all_ the
available metric names into the Select which would eventually crash the
browser if the dataset was large enough.
We can fix this by using AsyncSelect and making another query once a
Service is selected _and_ the user types a few characters.
* fix: update tests for AsyncSelect
* fix lint
* fix: add subset of metrics on initial load
(cherry picked from commit b2e1b3ad91)
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
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: 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>
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>
docs: add semi relative time ranges (#67559)
* add semi-relative time range section
* added second example and reworded
* formatting fixes
* added alerting note and fixed formatting
* wording fix
(cherry picked from commit 0271a1d094)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Update index.md (#67172)
Clarified some of the intro text and added JSON outer element to make the samples clearer
(cherry picked from commit 66ad704292)
Co-authored-by: Nabeel Saad <saadnabs@hotmail.com>
docs: move misplaced Configure legend page (#67597)
* move configure legend page and add alias
* updated page weight and tried fixing alias
* fixed alias
* add preemptive alias for current page location
* apply suggestion from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* apply suggestions from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
* apply suggestions from review
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
---------
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
(cherry picked from commit 688459f25c)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
docs: reverse what's new order in TOC (#67596)
* reverse order of what's new pages
* fix page weight numbering to follow original pattern
(cherry picked from commit 01aa776522)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
[Chore] Dashboard: Add i18n for creating a panel, row, library panel, and pasted panel (#66234)
* 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
(cherry picked from commit 2f0f5ca09e)
Co-authored-by: Polina Boneva <13227501+polibb@users.noreply.github.com>
Grafana Cloud: Put cloud artifacts to `*/release` dir (#66168)
Put cloud artifacts to */release dir
(cherry picked from commit a2634495e5)
Co-authored-by: Dimitris Sotirakis <dimitrios.sotirakis@grafana.com>
Prometheus: Fix regression for $__rate_interval comparison (#67460)
* 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
(cherry picked from commit d4a22cff0a)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
Influxdb: Handle legacy Influxdb influxql annotations with target in migration (#63225)
* handle legacy influxdb annotations with target in migration
* add types
* don't check tags that are empty strings and give annotation a type
(cherry picked from commit 7a3f7e26ce)
Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com>
Update start-restart-grafana.md (#67455)
* 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>
(cherry picked from commit e13fff0f21)
Co-authored-by: Usman Ahmad <69509548+usmangt@users.noreply.github.com>
Docs: Fix broken links to section on Variable syntax page (#67340)
These links have a trailing slash which don't work when linking to a
specific element.
(cherry picked from commit 278a8fccc9)
Co-authored-by: Eric Wang <2069450+ericdwang@users.noreply.github.com>
Explore: Update table min height (#67321)
* Set table min content height to 300px
* Cleanup code that changes height of table component
(cherry picked from commit fb45cb6237)
Docs: Fix help docs for SQL datasources (#66749)
Fix example queries for SQL datasources
(cherry picked from commit a5e3157540)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
Fix panic when reparenting receivers to groups following an attempted rename via Provisioning (#67167)
Alerting: Allow hooking into request handler functions. (#67000)
* 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>
(cherry picked from commit 9effb9a708)
AzureMonitor: Correct series name accounting for dimensions (#67050)
Correct displayName accounting for dimensions
(cherry picked from commit a2b97547a6)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Fix: Hide invite when disabled login form is set (#67031)
* 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>
(cherry picked from commit b7f047c8dd)
Co-authored-by: Gabriel MABILLE <gamab@users.noreply.github.com>
Alerting: Fix filtering when panel variables are in use (#66977)
Fix alert instances filtering when panel variables are in use
(cherry picked from commit 9f1fe51edc)
Co-authored-by: Konrad Lalik <konrad.lalik@grafana.com>
AzureMonitor: Update ARG Subscription selection (#66890)
* 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
(cherry picked from commit f3dbb7b34a)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Alerting: Fix DatasourceUID and RefID missing for DatasourceNoData alerts (#66733)
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.
(cherry picked from commit 35342a3c76)
Co-authored-by: George Robinson <george.robinson@grafana.com>
docs: add migration guide and notes for upcoming react 18 upgrade (#66656)
* 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>
(cherry picked from commit 1917857186)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Tempo: TraceQL query builder QoL improvements (#66865)
* 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
(cherry picked from commit 6e8b17efd8)
Co-authored-by: Andre Pereira <adrapereira@gmail.com>
Chore: Update @grafana/e2e (#66365)
* Update e2e package
- Ensure health request is monitored for addDatasource flow
- Add custom timeout to configurePanel flow
* Make health check optional
(cherry picked from commit b2e32a70b9)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Chore: Update AddPanel selectors for top nav (#65871)
* Update add panel selectors for top nav
* trigger build
(cherry picked from commit 61599de32c)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
CloudMonitor: Correctly re-render `VisualMetricQueryEditor` on `TimeRange` updates (#66756)
Compare string value rather than object
(cherry picked from commit adf12d0e90)
Co-authored-by: Andreas Christou <andreas.christou@grafana.com>
Alerting: Fix share URL for Prometheus rules on subpath (#66752)
(cherry picked from commit 2cec402647)
Co-authored-by: Gilles De Mey <gilles.de.mey@gmail.com>
Update index.md (#66698)
The useful links were down as they were using /docs/grafana/next/ instead of /docs/grafana/latest/ in the path
(cherry picked from commit 58e3b3a90e)
Co-authored-by: Sébastien Dauphin <dauphin.sebastien@gmail.com>
* SQL Datasources: Update Max Connection and Max Idle Connection Defaults to 100 and add auto mode (#65834)
* Update connection configuration for SQL datasources
* Working auto state for connection numbers
* Add migration
* Use defaults from constants file
* Remove dead code
* Add tests and restructure useMigrateDatabaseField
* Update function names
* Update docs
* Make sure we don't continually issue updates
* Update docs
* Use onOptionsChnage in ConnectionLimits
* Update docs
* Clean up docs
* Update migration
* Fix default values in docs
* Fix spacing issue
* Fix test
* Update default values for SQL connections
* Include consts
* Allow override for default SQL datasource connection parameters
* Fix linter errors
* Remove extra @ts-ignore
* Centralize logic for default values
* Remove debugging
* Remove unecessary function
* Update configuration docs
* minor suggested change
* Fix comment misspelling
* Remove unecessary default setting code
* Update docs to indicate that code was included for backport version
* Remove dead code
---------
Co-authored-by: lwandz13 <larissa.wandzura@grafana.com>
(cherry picked from commit 92d92187d9)
* Add brackets around property name so that it's dynamic
---------
Co-authored-by: Kyle Cunningham <codeincarnate@users.noreply.github.com>
Co-authored-by: Kyle Cunningham <kyle@codeincarnate.com>
Navigation: Redirect to root page when switching organization (#66655)
* just redirect to root when switching org
* remove old orgswitcher modal
(cherry picked from commit 90f0b1c6e2)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
Explore: Allow supplementary query data provider to be undefined for mixed data sources (#66422)
* 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
(cherry picked from commit b5e2b0d14c)
# Conflicts:
# public/app/features/explore/state/query.ts
Google Cloud Monitoring: Fix project variable (#66524)
Google Cloud Monitoring: fix project variable
Also fix typo found while debugging
(cherry picked from commit 02951e8a26)
Co-authored-by: Adam Simpson <adam@adamsimpson.net>
InfluxDB: Fix querying with hardcoded retention policy (#66466)
* 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
(cherry picked from commit 6d53c87862)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
Dashboards: Fix broken internal data links (#66567)
* 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
(cherry picked from commit 4f5b80095e)
Co-authored-by: Piotr Jamróz <pm.jamroz@gmail.com>
E2E: Fixed so openPanelMenuItem flow works with new/old panel chrome without breaking changes (#66118)
Fixed so the openPanelMenuItem works with both angular and react panels.
(cherry picked from commit c3fee5881f)
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Prometheus: Fix ad-hoc filters (#66521)
* refactor label names back to getTagKeys to fulfill contract with parent class required for ad-hoc functionality
(cherry picked from commit 4a7f27489e)
Co-authored-by: Galen Kistler <109082771+gtk-grafana@users.noreply.github.com>
Put the numbers before dashboard elements. (#65749)
* 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>
(cherry picked from commit d208324331)
Co-authored-by: samu6851 <samuel.oswalt@grafana.com>
Alerting: Allow Rules to Schedule to be filtered by Rule Group (#59990)
* Alerting: Allow Rules to Schedule to be filtered by Rule Group
(cherry picked from commit 2bbf0c9de4)
Co-authored-by: gotjosh <josue.abreu@gmail.com>
* Plugins: Fix module.js file not being closed when loading plugins (#66288)
* Plugins: Loader: Fix module.js file not being closed
* Plugins: LocalFS: Add comments, ensure same Read() behaviour as os.File's
* Changed comment for Close()
* Add tests for LocalFS
* "Fix" linter error
* "Fix" linter error again
(cherry picked from commit 1c3ad81826)
* trigger ci
---------
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
Co-authored-by: Giuseppe Guerra <to@nyo.zz.mu>
Alerting: Fix creating a recording rule when having multiple datasources (#66415)
Fix creating recording rules when having multiple datasources
(cherry picked from commit 2991d4c213)
Co-authored-by: Virginia Cepeda <virginia.cepeda@grafana.com>
Auth: Remove the session cookie only if it's invalid or revoked (#65984)
Remove the cookie if it's invalid or revoked
(cherry picked from commit 4cac95d1c2)
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
Table Panel: Fix panel migration for options cell type (#66305)
(cherry picked from commit b83627a661)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Prometheus: Show initial hint on builder mode when metric lookup disabled (#65827)
* Show initial hint on builder mode when metric lookup disabled
* Disable MetricEncyclopedia and label request when metric lookup is disabled
(cherry picked from commit 08727b7d6c)
Expressions: Fix expression load with legacy UID -100 (#65950)
* 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>
(cherry picked from commit d4bd024951)
Co-authored-by: ismail simsek <ismailsimsek09@gmail.com>
AccessControl: Allow editors to access GET /api/datasources (#66343)
Allow editors to access GET /datasources
(cherry picked from commit 2c21090931)
Co-authored-by: Misi <mgyongyosi@users.noreply.github.com>
docs: What's New & Upgrade Guide 9.5 (#64168)
* 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>
(cherry picked from commit f9fdeafe35)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Plugins: Fix plugin signature calculation not working on Windows (#66273)
* 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
(cherry picked from commit facd4eca7e)
Co-authored-by: Giuseppe Guerra <giuseppe.guerra@grafana.com>
Library panels: Ensure pagination controls are always correctly displayed (#65283)
correctly count library panels in the general folder
(cherry picked from commit fda38de293)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
SQL Datasources: Fix variable throwing error if query returns no data (#65937)
* 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
(cherry picked from commit 02a8bc76d2)
Co-authored-by: Victor Marin <36818606+mdvictor@users.noreply.github.com>
Navigation: Scrolled hamburger menu links now navigate correctly in Safari (#66261)
overlayProps/dialogProps need to go inside FocusScope
(cherry picked from commit 0aa301e251)
Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com>
docs: nav updates for dashboards (#66078)
* navigation related text and image updates in dashboards topics
* fix typo
* fixed style and formatting issues
(cherry picked from commit 3725463c43)
Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
Docs: updates Grafana installation for Red Hat, Fedora, RHEL, SUSE, and OpenSUSE (#65232)
* 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>
(cherry picked from commit fcdbb7a86f)
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Query Splitting: Fix for handling queries with no requestId (#66161)
Loki query splitting fix for when there's no request id
(cherry picked from commit 5dc529a55d)
Co-authored-by: Domas <domasx2@gmail.com>
Alerting: Tiny refactor on the eval and schedule packages (#66130)
* 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>
(cherry picked from commit 1c3ce0735f)
Co-authored-by: gotjosh <josue.abreu@gmail.com>
Admin/Plugins: Change alert about Connections to subtitle (#65913)
* change ConnectionRedirectNotice to a subtitle on Admin/Plugins
* cleanup ConnectionsRedirectNotice a bit
Plugins: Skip instrumenting plugin build info for core and bundled plugins (#66105)
* only instrument plugin build for non core/bundled plugins
* fix import
(cherry picked from commit 7808e74260)
Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
Table: Fix migrations from old angular table for cell color modes (#65760)
* Table: Fix migrations from old angular table
* Update defaults
(cherry picked from commit 3843c73162)
Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
PluginExtensions: Adding full targets to the panel menu context (#65861)
* Making sure we add the whole query to the dashboard panel context.
* Adding some more tests.
* Synced with main.
(cherry picked from commit c8ecd0679b)
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
PluginExtensions: Fixed issue in typings for the onClick link callback (#65978)
* Fixed bug with event being forced.
* Made onClick undefinable in the config as well.
* Fixed some more type issues.
(cherry picked from commit 9719ee9bd3)
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
Alerting: Use a completely isolated context for state history writes (#64989)
* 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
(cherry picked from commit fb520edd72)
Co-authored-by: Alexander Weaver <weaver.alex.d@gmail.com>
Docs: Added note to contact Support (#65235)
* Added note to contact Support
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
* Update docs/sources/setup-grafana/configure-security/configure-authentication/enhanced-ldap/index.md
* makes prettier
* Apply suggestions from code review
---------
Co-authored-by: Christopher Moyer <35463610+chri2547@users.noreply.github.com>
Co-authored-by: Chris Moyer <chris.moyer@grafana.com>
(cherry picked from commit 445734888b)
Co-authored-by: melGL <81323402+melgl@users.noreply.github.com>
PluginExtensions: Fixed issue with incorrect type being exposed when configuring an extension (#65910)
Fixed issue with wrong type required in configureExtensionLink
(cherry picked from commit 68796a9f31)
Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
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
# 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
# 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]
# If enabled, cache permissions in a in memory cache
@@ -971,13 +1027,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.
# 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
@@ -955,8 +996,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.
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 targetting `main` should use the `.x` milestone of the next minor (or major) version (you can find that version number inside the `package.json` file).
Backport pull requestss should use the version of the target branch (e.g. `9.4.x` for the `v9.4.x` branch).
### 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`.
When you contribute to documentation, it is a good practice to build the docs on your local machine to make sure your changes appear as you expect. This README explains the process for doing that.
When you contribute to documentation, it's a good practice to build the docs on your local machine to make sure your changes appear as you expect. This README explains the process for doing that.
To build a local version, you need to run a process in a Docker container.
Grafana periodically updates the Docker image, [`docs-base`](https://hub.docker.com/r/grafana/docs-base), to update the styling of the Docs.
## Requirements
Docker >= 2.1.0.3
Yarn >= 1.22.4
-Docker >= 2.1.0.3
-Yarn >= 1.22.4
## Build the doc site
First, make sure the Docker daemon is running on your machine. Then, follow these steps:
1. On the command line, first change to the docs folder: `cd docs`.
1. Run `make docs`. This launches a preview of the website with the current grafana docs at `http://localhost:3002/docs/grafana/latest/` which will refresh automatically when changes are made to content in the `sources` directory.
# 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 "$(CURDIR)/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
$(CURDIR)/make-docs $(PROJECTS)
.PHONY:docs-no-pull
docs-no-pull:## Serve documentation locally without pulling the `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image.
docs-no-pull:make-docs
$(CURDIR)/make-docs $(PROJECTS)
.PHONY:docs-debug
docs-debug:## Run Hugo web server with debugging enabled. TODO: support all SERVER_FLAGS defined in website Makefile.
docs-debug:make-docs
WEBSITE_EXEC='hugo server --bind 0.0.0.0 --port 3002 --debug'$(CURDIR)/make-docs $(PROJECTS)
.PHONY:doc-validator
doc-validator:## Run doc-validator on the entire docs folder.
# The source of this file is https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs.
# # `make-docs` procedure changelog
#
# Updates should conform to the guidelines in https://keepachangelog.com/en/1.1.0/.
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
# Changes are relevant to this script and the support docs.mk GNU Make interface.
# ## 4.2.1 (2023-09-13)
# ## Fixed
# - Improved consistency of the webserver request loop by polling the Hugo port rather than the proxy port.
# ## 4.2.0 (2023-09-01)
# ### Added
# - Retry the initial webserver request up to ten times to allow for the process to start.
# If it is still failing after ten seconds, an error message is logged.
# ## 4.1.1 (2023-07-20)
# ### Fixed
# - Replaced use of `realpath` with POSIX compatible alternative to determine default value for REPOS_PATH.
# ## 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.
# ## 2.0.0 (2023-05-18)
# ### Added
# - Support for the grafana-cloud/frontend-observability/faro-web-sdk project.
# - Use of `doc-validator` v2.0.x which includes breaking changes to command line options.
# ### Fixed
# - Source grafana-cloud project from website repository.
# ### Added
# - Support for running the Vale linter with `make vale`.
# ## 1.2.1 (2023-05-05)
# ### Fixed
# - Use `latest` tag of `grafana/vale` image by default instead of hardcoded older version.
# - Fix mounting multiple projects broken by the changes in 1.0.1
# ## 1.2.0 (2023-05-05)
# ### Added
# - Support for running the Vale linter with `make vale`.
# ### Fixed
# ## 1.1.0 (2023-05-05)
# ### Added
# - Rewrite error output so it can be followed by text editors.
# ### Fixed
# - Fix `docs-debug` container process port.
# ## 1.0.1 (2023-05-04)
# ### Fixed
# - Ensure complete section hierarchy so that all projects have a visible menu.
# ## 1.0.0 (2023-05-04)
# ### Added
# - Build multiple projects simultaneously if all projects are checked out locally.
# - Run [`doc-validator`](https://github.com/grafana/technical-documentation/tree/main/tools/cmd/doc-validator) over projects.
# - Redirect project root to mounted version.
# For example redirect `/docs/grafana/` to `/docs/grafana/latest/`.
# - Support for Podman or Docker containers with `PODMAN` environment variable.
@@ -46,7 +46,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 +59,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,7 +69,8 @@ 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.
@@ -122,9 +125,10 @@ 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.
@@ -140,9 +144,10 @@ To configure global settings for query caching, refer to the [Query caching sect
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.
@@ -152,7 +157,8 @@ If you experience performance issues or repeated queries become slower to execut
> **Note:** This action impacts all cache-enabled data sources. If you are using Memcached, the system clears all data from the Memcached instance.
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.
Besides the wide range of visualizations and data sources that are available immediately after you install Grafana, you can extend your Grafana experience with _plugins_.
You can [install]({{< relref "#install-a-plugin" >}}) one of the plugins built by the Grafana community, or [build one yourself]({{< relref "../../developers/plugins/" >}}).
You can [install]({{< relref "#install-a-plugin" >}}) one of the plugins built by the Grafana community, or [build one yourself](https://grafana.com/developers/plugin-tools).
Grafana supports three types of plugins: [panels](/grafana/plugins?type=panel), [data sources](/plugins?type=datasource), and [apps](/grafana/plugins?type=app).
@@ -72,18 +72,20 @@ The Plugin catalog allows you to browse and manage plugins from within Grafana.
</video>
</div>
_Video shows the Plugin catalog in a previous version of Grafana._
In order to be able to install / uninstall / update plugins using plugin catalog, you must enable it via the `plugin_admin_enabled` flag in the [configuration]({{< relref "../../setup-grafana/configure-grafana/#plugin_admin_enabled" >}}) file.
Before following the steps below, make sure you are logged in as a Grafana administrator.
<a id="#plugin-catalog-entry"></a>
-Administrators can find the Plugin catalog at **Configuration > Plugins**.
Administrators can find the Plugin catalog at **Administration > Plugins**.
### Browse plugins
To browse for available plugins:
1. In Grafana, [navigate to the Plugin catalog](#plugin-catalog-entry) to view installed plugins.
1. In Grafana, click **Administration > Plugins** in the side navigation menu to view installed plugins.
1. Click the **All** filter to browse all available plugins.
1. Click the **Data sources**, **Panels**, or **Applications** buttons to filter by plugin type.
@@ -91,7 +93,7 @@ To browse for available plugins:
To install a plugin:
1. In Grafana, [navigate to the Plugin catalog](#plugin-catalog-entry) to view installed plugins.
1. In Grafana, click **Administration > Plugins** in the side navigation menu to view installed plugins.
1. Browse and find a plugin.
1. Click on the plugin logo.
1. Click **Install**.
@@ -102,7 +104,7 @@ When the update is complete, you see a confirmation message that the installatio
To update a plugin:
1. In Grafana, [navigate to the Plugin catalog](#plugin-catalog-entry) to view installed plugins.
1. In Grafana, click **Administration > Plugins** in the side navigation menu to view installed plugins.
1. Click on the plugin logo.
1. Click **Update**.
@@ -112,7 +114,7 @@ When the update is complete, you see a confirmation message that the update was
To uninstall a plugin:
1. In Grafana, [navigate to the Plugin catalog](#plugin-catalog-entry) to view installed plugins.
1. In Grafana, click **Administration > Plugins** in the side navigation menu to view installed plugins.
1. Click on the plugin logo.
1. Click **Uninstall**.
@@ -163,7 +165,7 @@ Grafana also writes an error message to the server log:
WARN[05-26|12:00:00] Some plugin scanning errors were found errors="plugin '<plugin id>' is unsigned, plugin '<plugin id>' has an invalid signature"
```
If you are a plugin developer and want to know how to sign your plugin, refer to [Sign a plugin]({{< relref "../../developers/plugins/sign-a-plugin/" >}}).
If you are a plugin developer and want to know how to sign your plugin, refer to [Sign a plugin](https://grafana.com/developers/plugin-tools/publish-a-plugin/sign-a-plugin).
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
{{% admonition type="note" %}}
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
{{% /admonition %}}
A permission is comprised of an action and a scope. When creating a custom role, consider the actions the user can perform and the resource(s) on which they can perform those actions.
@@ -23,128 +25,129 @@ To learn more about the Grafana resources to which you can apply RBAC, refer to
The following list contains role-based access control actions.
| `alert.instances.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alerts and silences in data sources that support alerting. |
| `alert.instances.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage alerts and silences in data sources that support alerting. |
| `alert.instances:create` | n/a | Create silences in the current organization. |
| `alert.instances:read` | n/a | Read alerts and silences in the current organization. |
| `alert.instances:write` | n/a | Update and expire silences in the current organization. |
| `alert.notifications.external:read` | `datasources:*`<br>`datasources:uid:*` | Read templates, contact points, notification policies, and mute timings in data sources that support alerting. |
| `alert.notifications.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage templates, contact points, notification policies, and mute timings in data sources that support alerting. |
| `alert.notifications:write` | n/a | Manage templates, contact points, notification policies, and mute timings in the current organization. |
| `alert.notifications:read` | n/a | Read all templates, contact points, notification policies, and mute timings in the current organization. |
| `alert.rules.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alert rules in data sources that support alerting (Prometheus, Mimir, and Loki) |
| `alert.rules.external:write` | `datasources:*`<br>`datasources:uid:*` | Create, update, and delete alert rules in data sources that support alerting (Mimir and Loki). |
| `alert.rules:create` | `folders:*`<br>`folders:uid:*` | Create Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
| `alert.rules:delete` | `folders:*`<br>`folders:uid:*` | Delete Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
| `alert.rules:read` | `folders:*`<br>`folders:uid:*` | Read Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
| `alert.rules:write` | `folders:*`<br>`folders:uid:*` | Update Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
| `alert.provisioning:read` | n/a | Read all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
| `alert.provisioning:write` | n/a | Update all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
| `apikeys:read` | `apikeys:*`<br>`apikeys:id:*` | Read API keys. |
| `apikeys:delete` | `apikeys:*`<br>`apikeys:id:*` | Delete API keys. |
| `dashboards:create` | `folders:*`<br>`folders:uid:*` | Create dashboards in one or more folders. |
| `dashboards:delete` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Delete one or more dashboards. |
| `dashboards.insights:read` | n/a | Read dashboard insights data and see presence indicators. |
| `dashboards.permissions:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read permissions for one or more dashboards. |
| `dashboards.permissions:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update permissions for one or more dashboards. |
| `dashboards:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read one or more dashboards. |
| `dashboards:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update one or more dashboards. |
| `orgs:delete` | `orgs:*` <br> `orgs:id:*` | Delete one or more organizations. |
| `orgs:read` | `orgs:*` <br> `orgs:id:*` | Read one or more organizations. |
| `orgs:write` | `orgs:*` <br> `orgs:id:*` | Update one or more organizations. |
| `plugins.app:access`| `plugins:*` <br> `plugins:id:*`| Access one or more application plugins (still enforcing the organization role) |
| `plugins:install` | n/a | Install and uninstall plugins. |
| `plugins:write` | `plugins:*` <br> `plugins:id:*` | Edit settings for one or more plugins. |
| `provisioning:reload` | `provisioners:*` | Reload provisioning files. To find the exact scope for specific provisioner, see [Scope definitions]({{< relref "#scope-definitions" >}}). |
| `serviceaccounts:write` | `serviceaccounts:*` | Create Grafana service accounts. |
| `serviceaccounts:create` | n/a | Update Grafana service accounts. |
| `serviceaccounts:delete` | `serviceaccounts:*` | Delete Grafana service accounts. |
| `serviceaccounts:read` | `serviceaccounts:*` | Read Grafana service accounts. |
| `serviceaccounts.permissions:write` | `serviceaccounts:*` | Update Grafana service account permissions to control who can do what with the service account. |
| `serviceaccounts.permissions:read` | `serviceaccounts:*` | Read Grafana service account permissions to see who can do what with the service account. |
| `settings:write` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Update any Grafana configuration settings that can be [updated at runtime]({{< relref "../../../../setup-grafana/configure-grafana/settings-updates-at-runtime" >}}). |
| `status:accesscontrol` | `services:accesscontrol` | Get access-control enabled status. |
| `teams.permissions:read` | `teams:*`<br>`teams:id:*` | Read members and External Group Synchronization setup for teams. |
| `teams.permissions:write` | `teams:*`<br>`teams:id:*` | Add, remove and update members and manage External Group Synchronization setup for teams. |
| `teams.roles:add` | `permissions:type:delegate` | Assign a role to a team. |
| `teams.roles:read` | `teams:*` | List roles assigned directly to a team. |
| `teams.roles:remove` | `permissions:type:delegate`| Unassign a role from a team. |
| `teams:create` | n/a | Create teams. |
| `teams:delete` | `teams:*`<br>`teams:id:*` | Delete one or more teams. |
| `teams:read` | `teams:*`<br>`teams:id:*` | Read one or more teams and team preferences. |
| `teams:write` | `teams:*`<br>`teams:id:*` | Update one or more teams and team preferences. |
| `users.authtoken:read` | `global.users:*`<br>`global.users:id:*`| List authentication tokens that are assigned to a user. |
| `users.authtoken:write` | `global.users:*` <br> `global.users:id:*` | Update authentication tokens that are assigned to a user. |
| `alert.instances.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alerts and silences in data sources that support alerting. |
| `alert.instances.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage alerts and silences in data sources that support alerting. |
| `alert.instances:create` | n/a | Create silences in the current organization. |
| `alert.instances:read` | n/a | Read alerts and silences in the current organization. |
| `alert.instances:write` | n/a | Update and expire silences in the current organization. |
| `alert.notifications.external:read` | `datasources:*`<br>`datasources:uid:*` | Read templates, contact points, notification policies, and mute timings in data sources that support alerting. |
| `alert.notifications.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage templates, contact points, notification policies, and mute timings in data sources that support alerting. |
| `alert.notifications:write` | n/a | Manage templates, contact points, notification policies, and mute timings in the current organization. |
| `alert.notifications:read` | n/a | Read all templates, contact points, notification policies, and mute timings in the current organization. |
| `alert.rules.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alert rules in data sources that support alerting (Prometheus, Mimir, and Loki) |
| `alert.rules.external:write` | `datasources:*`<br>`datasources:uid:*` | Create, update, and delete alert rules in data sources that support alerting (Mimir and Loki). |
| `alert.rules:create` | `folders:*`<br>`folders:uid:*` | Create Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
| `alert.rules:delete` | `folders:*`<br>`folders:uid:*` | Delete Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
| `alert.rules:read` | `folders:*`<br>`folders:uid:*` | Read Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
| `alert.rules:write` | `folders:*`<br>`folders:uid:*` | Update Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
| `alert.provisioning:read` | n/a | Read all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
| `alert.provisioning:write` | n/a | Update all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
| `apikeys:read` | `apikeys:*`<br>`apikeys:id:*` | Read API keys. |
| `apikeys:delete` | `apikeys:*`<br>`apikeys:id:*` | Delete API keys. |
| `dashboards:create` | `folders:*`<br>`folders:uid:*` | Create dashboards in one or more folders and their subfolders. |
| `dashboards:delete` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Delete one or more dashboards. |
| `dashboards.insights:read` | n/a | Read dashboard insights data and see presence indicators. |
| `dashboards.permissions:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read permissions for one or more dashboards. |
| `dashboards.permissions:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update permissions for one or more dashboards. |
| `dashboards:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read one or more dashboards. |
| `dashboards:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update one or more dashboards. |
| `dashboards.public:write` | `dashboards:*`<br>`dashboards:uid:*` | Write public dashboard configuration. |
| `datasources.permissions:read` | `datasources:*`<br>`datasources:uid:*` | List data source permissions. |
| `datasources.permissions:write` | `datasources:*`<br>`datasources:uid:*` | Update data source permissions. |
| `datasources:query` | `datasources:*`<br>`datasources:uid:*` | Query data sources. |
| `datasources:read` | `datasources:*`<br>`datasources:uid:*` | List data sources. |
| `datasources:write` | `datasources:*`<br>`datasources:uid:*`| Update data sources. |
| `folders.permissions:read` | `folders:*`<br>`folders:uid:*` | Read permissions for one or more folders and their subfolders. |
| `folders.permissions:write` | `folders:*`<br>`folders:uid:*` | Update permissions for one or more folders and their subfolders. |
| `folders:create` | n/a | Create folders in the root level. If granted together with `folders:write`, also allows creating subfolders under all folders that the user can update. |
| `folders:delete` | `folders:*`<br>`folders:uid:*` | Delete one or more folders and their subfolders. |
| `folders:read` | `folders:*`<br>`folders:uid:*` | Read one or more folders and their subfolders. |
| `folders:write` | `folders:*`<br>`folders:uid:*` | Update one or more folders and their subfolders. If granted together with `folders:create` permission, also allows creating subfolders under these folders. |
| `ldap.config:reload` | n/a | Reload the LDAP configuration. |
| `ldap.status:read` | n/a | Verify the availability of the LDAP server or servers. |
| `ldap.user:read` | n/a | Read users via LDAP. |
| `ldap.user:sync` | n/a | Sync users via LDAP. |
| `licensing.reports:read` | n/a | Get custom permission reports. |
| `licensing:delete` | n/a | Delete the license token. |
| `orgs:delete` | `orgs:*` <br> `orgs:id:*` | Delete one or more organizations. |
| `orgs:read` | `orgs:*` <br> `orgs:id:*` | Read one or more organizations. |
| `orgs:write` | `orgs:*` <br> `orgs:id:*` | Update one or more organizations. |
| `plugins.app:access`| `plugins:*` <br> `plugins:id:*`| Access one or more application plugins (still enforcing the organization role) |
| `plugins:install` | n/a | Install and uninstall plugins. |
| `plugins:write` | `plugins:*` <br> `plugins:id:*` | Edit settings for one or more plugins. |
| `provisioning:reload` | `provisioners:*`| Reload provisioning files. To find the exact scope for specific provisioner, see [Scope definitions]({{< relref "#scope-definitions" >}}). |
| `serviceaccounts:write`| `serviceaccounts:*`| Create Grafana service accounts. |
| `serviceaccounts:create` | n/a | Update Grafana service accounts. |
| `serviceaccounts:delete` | `serviceaccounts:*` | Delete Grafana service accounts. |
| `serviceaccounts:read` | `serviceaccounts:*` | Read Grafana service accounts. |
| `serviceaccounts.permissions:write` | `serviceaccounts:*` | Update Grafana service account permissions to control who can do what with the service account. |
| `serviceaccounts.permissions:read` | `serviceaccounts:*` | Read Grafana service account permissions to see who can do what with the service account. |
| `settings:write` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Update any Grafana configuration settings that can be [updated at runtime]({{< relref "../../../../setup-grafana/configure-grafana/settings-updates-at-runtime" >}}). |
| `status:accesscontrol` | `services:accesscontrol`| Get access-control enabled status. |
| `teams.permissions:read` | `teams:*`<br>`teams:id:*` | Read members and Team Sync setup for teams. |
| `teams.permissions:write` | `teams:*`<br>`teams:id:*` | Add, remove and update members and manage Team Sync setup for teams. |
| `teams.roles:add` | `permissions:type:delegate`| Assign a role to a team. |
| `teams.roles:read` | `teams:*` | List roles assigned directly to a team. |
| `teams.roles:remove`| `permissions:type:delegate`| Unassign a role from a team. |
| `teams:create` | n/a | Create teams. |
| `teams:delete` | `teams:*`<br>`teams:id:*` | Delete one or more teams. |
| `teams:read` | `teams:*`<br>`teams:id:*` | Read one or more teams and team preferences. |
| `teams:write` | `teams:*`<br>`teams:id:*` | Update one or more teams and team preferences. |
| `users.authtoken:read` | `global.users:*` <br> `global.users:id:*` | List authentication tokens that are assigned to a user. |
| `users.authtoken:write` | `global.users:*` <br> `global.users:id:*` | Update authentication tokens that are assigned to a user. |
| `users.password:write` | `global.users:*`<br> `global.users:id:*`| Update a user’s password. |
| `users.permissions:read` | `users:*` | List permissions of a user. |
@@ -193,7 +196,7 @@ The following list contains role-based access control scopes.
| `apikeys:*`<br>`apikeys:id:*` | Restrict an action to a set of API keys. For example, `apikeys:*` matches any API key, `apikey:id:1` matches the API key whose id is `1`. |
| `dashboards:*`<br>`dashboards:uid:*` | Restrict an action to a set of dashboards. For example, `dashboards:*` matches any dashboard, and `dashboards:uid:1` matches the dashboard whose UID is `1`. |
| `datasources:*`<br>`datasources:uid:*` | Restrict an action to a set of data sources. For example, `datasources:*` matches any data source, and `datasources:uid:1` matches the data source whose UID is `1`. |
| `folders:*`<br>`folders:uid:*` | Restrict an action to a set of folders. For example, `folders:*` matches any folder, and `folders:uid:1` matches the folder whose UID is `1`. |
| `folders:*`<br>`folders:uid:*` | Restrict an action to a set of folders. For example, `folders:*` matches any folder, and `folders:uid:1` matches the folder whose UID is `1`. Note that permissions granted to a folder cascade down to subfolders located under it |
| `global.users:*` <br> `global.users:id:*` | Restrict an action to a set of global users. For example, `global.users:*` matches any user and `global.users:id:1` matches the user whose ID is `1`. |
| `orgs:*` <br> `orgs:id:*` | Restrict an action to a set of organizations. For example, `orgs:*` matches any organization and `orgs:id:1` matches the organization whose ID is `1`. |
| `permissions:type:delegate` | The scope is only applicable for roles associated with the Access Control itself and indicates that you can delegate your permissions only, or a subset of it, by creating a new role or making an assignment. |
@@ -207,3 +210,4 @@ The following list contains role-based access control scopes.
| `settings:*` | Restrict an action to a subset of settings. For example, `settings:*` matches all settings, `settings:auth.saml:*` matches all SAML settings, and `settings:auth.saml:enabled` matches the enable property on the SAML settings. |
| `teams:*` <br> `teams:id:*` | Restrict an action to a set of teams from an organization. For example, `teams:*` matches any team and `teams:id:1` matches the team whose ID is `1`. |
| `users:*` <br> `users:id:*` | Restrict an action to a set of users from an organization. For example, `users:*` matches any user and `users:id:1` matches the user whose ID is `1`. |
| `n/a` | `n/a` means not applicable. If an action has `n/a` specified for the scope, then the action does not require a scope. For example, the `teams:create` action does not require a scope and allows users to create teams. |
@@ -31,7 +31,8 @@ In [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}})
> **Note:** Service accounts can only act in the organization they are created for. If you have the same task that is needed for multiple organizations, we recommend creating service accounts in each organization.
{{< vimeo 742056367 >}}
<br>
_Video shows service accounts in Grafana v9.1. Refer to [Create a service account in Grafana]({{< relref "#create-a-service-account-in-grafana" >}}) for current instructions._
@@ -25,11 +21,11 @@ This setting contains information about tools that Grafana Server Admins can use
## View Grafana server settings
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration]({{< relref "../../setup-grafana/configure-grafana/#config-file-locations" >}}) file and any environmental variables.
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration]({{< relref "../../setup-grafana/configure-grafana#configuration-file-location" >}}) file and any environmental variables.
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions/#grafana-server-administrators" >}}).
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions#grafana-server-administrators" >}}).
### View server settings
@@ -38,15 +34,15 @@ If you are a Grafana server administrator, use the Settings tab to view the sett
### Available settings
For a full list of server settings, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}).
For a full list of server settings, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana#server" >}}).
## View Grafana server stats
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
If you are a Grafana server admin, then you can view useful statistics about your Grafana server in the Stats & Licensing tab.
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions/#grafana-server-administrators" >}}).
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions#grafana-server-administrators" >}}).
Dashboard and dasboard folder permissions enable you to grant a viewer the ability to edit and save dashboard changes, or limit an editor's permission to modify a dashboard.
Dashboard and dashboard folder permissions enable you to grant a viewer the ability to edit and save dashboard changes, or limit an editor's permission to modify a dashboard.
For more information about dashboard permissions, refer to [Dashboard permissions]({{< relref "../../roles-and-permissions/#dashboard-permissions" >}}).
@@ -19,6 +14,8 @@ Grafana Alerting is available for Grafana OSS, Grafana Enterprise, or Grafana Cl
Watch this video to learn more about Grafana Alerting: {{< vimeo 720001629 >}}
_Video shows Alerting in Grafana v9.0. Refer to [Manage your alert rules]({{< relref "../alerting/alerting-rules/" >}}) for current instructions._
## Overview
The following diagram gives you an overview of how Grafana Alerting works and introduces you to some of the key concepts that work together and form the core of our flexible and powerful alerting engine.
Grafana allows you to create alerting rules that query one or more data sources, reduce or transform the results and compare them to each other or to fixed thresholds. When these are executed, Grafana sends notifications to the contact point. For information on Grafana Alerting, see [About Grafana Alerting]({{< relref "../" >}}) which explains the various components of Grafana Alerting. We also recommend that you familiarize yourself with some of the [fundamental concepts]({{< relref "../fundamentals/" >}}) of Grafana Alerting.
Grafana-managed rules are the most flexible alert rule type. They allow you to create alerts that can act on data from any of our supported data sources. In addition to supporting multiple data sources, you can also add expressions to transform your data and set alert conditions. Using images in alert notifications is also supported. This is the only type of rule that allows alerting from multiple data sources in a single rule definition.
Multiple alert instances can be created as a result of one alert rule (also known as a multi-dimensional alerting).
For information on Grafana Alerting, see [Introduction to Grafana Alerting](/docs/grafana/next/alerting/fundamentals/), which explains the key concepts and features of Grafana Alerting.
Watch this video to learn more about creating alerts: {{< vimeo 720001934 >}}
## Add Grafana managed rule
_Video shows Alerting in Grafana v9.0. Refer to [Add Grafana managed rule]({{< relref "#add-grafana-managed-rule" >}}) (following) for current instructions._
To create a Grafana-managed alert rule, complete the following steps.
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
1. Click **Alert rules**.
1. Click **+ Create alert rule**. The new alerting rule page opens where the **Grafana managed alerts** option is selected by default.
1. In Step 1, add the rule name.
2. Click **Alert rules**.
3. Click **+ Create alert rule**. The new alert rule page opens where the **Grafana managed alerts** option is selected by default.
4. In Step 1, add the rule name.
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
1. In Step 2, add queries and expressions to evaluate, and then select the alert condition.
5. In Step 2, add queries and expressions to evaluate, and then select the alert condition.
- For queries, select a data source from the dropdown.
- Specify a [time range](/docs/grafana/latest/dashboards/use-dashboards/?pg=blog&plcmt=body-txt#time-units-and-relative-ranges).
**Note:**
Grafana Alerting only supports fixed relative time ranges, for example, `now-24hr: now`.
It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:59:592` or semi-relative time ranges: `now/d to: now`.
- Add one or more [queries]({{< relref "/docs/grafana/latest/panels-visualizations/query-transform-data#add-a-query" >}}) or [expressions]({{< relref "/docs/grafana/latest/panels-visualizations/query-transform-data/expression-queries" >}}).
- For each expression, select either **Classic condition** to create a single alert rule, or choose from the **Math**, **Reduce**, and **Resample** options to generate separate alert for each series. For details on these options, see [Single and multi dimensional rule](#single-and-multi-dimensional-rule).
- Click **Run queries** to verify that the query is successful.
- Next, select the query or expression for your alert condition.
1. In Step 3, specify the alert evaluation interval.
6. In Step 3, specify the alert evaluation interval.
- From the **Condition** dropdown, select the query or expression to trigger the alert rule.
- For **Evaluate every**, specify the frequency of evaluation. Must be a multiple of 10 seconds. For examples, `1m`, `30s`.
- For **Evaluate for**, specify the duration for which the condition must be true before an alert fires.
> **Note:** Once a condition is breached, the alert goes into the Pending state. If the condition remains breached for the duration specified, the alert transitions to the `Firing` state, otherwise it reverts back to the `Normal` state.
- In **Configure no data and error handling**, configure alerting behavior in the absence of data. Use the guidelines in [No data and error handling](#no-data-and-error-handling).
- In **Configure no data and error handling**, configure alerting behavior in the absence of data. Use the guidelines in [No data and error handling](#configure-no-data-and-error-handling).
- Click **Preview** to check the result of running the query at this moment. Preview excludes no data and error handling.
**Note:**
You can pause alert rule evaluation to prevent noisy alerting while tuning your alerts. Pausing stops alert rule evaluation and does not create any alert instances. This is different to mute timings, which stop notifications from being delivered, but still allow for alert rule evaluation and the creation of alert instances.
1. In Step 4, add the storage location, rule group, as well as additional metadata associated with the rule.
7. In Step 4, add the storage location, rule group, as well as additional metadata associated with the rule.
- From the **Folder** dropdown, select the folder where you want to store the rule.
- For **Group**, specify a pre-defined group. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "../fundamentals/annotation-label/" >}}).
- Add Runbook URL, panel, dashboard, and alert IDs.
1. In Step 5, add custom labels.
8. In Step 5, add custom labels.
- Add custom labels selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value .
1. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.
1. Next, create a for the rule.
9. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.
10. Next, create a for the rule.
### Single and multidimensional rule
### Single and multi-dimensional rule
For Grafana managed alerts, you can create a rule with a classic condition or you can create a multi-dimensional rule.
@@ -62,7 +77,9 @@ For Grafana managed alerts, you can create a rule with a classic condition or yo
Use the classic condition expression to create a rule that triggers a single alert when its condition is met. For a query that returns multiple series, Grafana does not track the alert state of each series. As a result, Grafana sends only a single alert even when alert conditions are met for multiple series.
**Multi dimensional rule**
For more information, see [expressions documentation]({{< relref "/docs/grafana/latest/panels-visualizations/query-transform-data/expression-queries" >}}).
**Multi-dimensional rule**
To generate a separate alert for each series, create a multi-dimensional rule. Use `Math`, `Reduce`, or `Resample` expressions to create a multi-dimensional rule. For example:
@@ -73,22 +90,24 @@ To generate a separate alert for each series, create a multi-dimensional rule. U
> **Note:** Grafana does not support alert queries with template variables. More information is available at <https://community.grafana.com/t/template-variables-are-not-supported-in-alert-queries-while-setting-up-alert/2514>.
#### Rule with classic condition
### Configure no data and error handling
For more information, see [expressions documentation]({{< relref "/docs/grafana/latest/panels-visualizations/query-transform-data/expression-queries" >}}).
Configure alerting behavior when your alert rule evaluation returns no data or an error.
### No data and error handling
**Note:** Alert rules that are configured to fire when an evaluation returns no data or error only fire when the entire duration of the evaluation period has finished. This means that rather than immediately firing when the alert rule condition is breached, the alert rule waits until the time set as the **For** field has finished and then fires, reducing alert noise and allowing for temporary data availability issues.
Configure alerting behavior in the absence of data using information in the following tables.
If your alert rule evaluation returns no data, you can set the state on your alert rule to appear as follows:
| No Data | Create a new alert `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
| Alerting | Set alert rule state to `Alerting`. This option will respect the configured **Evaluate for** pending period. |
| No Data | Creates a new alert `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
| Alerting | Sets alert rule state to `Alerting`. The alert rule waits until the time set in the **For** field has finished before firing. |
| Error | Creates an alert instance `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
| Alerting | Sets alert rule state to `Alerting`. The alert rule waits until the time set in the **For** field has finished before firing. |
@@ -30,6 +30,8 @@ Grafana allows you to create alerting rules for an external Grafana Mimir or Lok
Watch this video to learn more about how to create a Mimir managed alert rule: {{< vimeo 720001865 >}}
_Video shows Alerting in Grafana v8.5. Refer to [Add a Grafana Mimir or Loki managed alerting rule]({{< relref "#add-a-grafana-mimir-or-loki-managed-alerting-rule" >}}) (following) for current instructions._
> **Note:** If you do not want to manage alerting rules for a particular Loki or Prometheus data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
## Add a Grafana Mimir or Loki managed alerting rule
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "/docs/grafana/latest/developers/plugins/metadata" >}}))
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json](https://grafana.com/developers/plugin-tools/reference-plugin-json)
Starting with Grafana v9.0.0, legacy alerting is deprecated, meaning that it is no longer actively maintained or supported by Grafana. As of Grafana v10.0.0, we do not contribute or accept external contributions to the codebase apart from CVE fixes.
Legacy alerting refers to the old alerting system that was used prior to the introduction of Grafana Alerting; the new alerting system in Grafana.
The decision to deprecate legacy alerting was made to encourage users to migrate to the new alerting system, which offers a more powerful and flexible alerting experience based on Prometheus Alertmanager.
Users who are still using legacy alerting are encouraged to migrate their alerts to the new system as soon as possible to ensure that they continue to receive new features, bug fixes, and support.
However, we will still patch CVEs until legacy alerting is completely removed in Grafana 11; honoring our commitment to building and distributing secure software.
We have provided [instructions](https://grafana.com/docs/grafana/v9.5/alerting/migrating-alerts/) on how to migrate to the new alerting system, making the process as easy as possible for users.
## Why are we deprecating legacy alerting?
The new Grafana alerting system is more powerful and flexible than the legacy alerting feature.
The new system is based on Prometheus Alertmanager, which offers a more comprehensive set of features for defining and managing alerts. With the new alerting system, users can create alerts based on complex queries, configure alert notifications via various integrations, and set up sophisticated alerting rules with support for conditional expressions, aggregation, and grouping.
Overall, the new alerting system in Grafana is a major improvement over the legacy alerting feature, providing users with a more powerful and flexible alerting experience.
Additionally, legacy alerting still requires Angular to function and we are [planning to remove support for it](https://grafana.com/docs/grafana/v9.5/developers/angular_deprecation/) in Grafana 11.
## When will we remove legacy alerting completely?
Legacy alerting will be removed from the code-base in Grafana 11, following the same timeline as the [Angular deprecation](https://grafana.com/docs/grafana/v9.5/developers/angular_deprecation/).
## How do I migrate to the new Grafana alerting?
Refer to our [migration instructions](https://grafana.com/docs/grafana/v9.5/alerting/migrating-alerts/opt-in/).
Configure integrations in Grafana to select your preferred communication channel for receiving notifications when your alert rules are fire. Each integration has its own configuration options and setup process. In most cases, this involves providing an API key or a Webhook URL.
Configure integrations in Grafana to select your preferred communication channel for receiving notifications when your alert rules are firing. Each integration has its own configuration options and setup process. In most cases, this involves providing an API key or a Webhook URL.
Once configured, you can use integrations as part of your contact points to receive notifications whenever your alert changes its state. In this section, we'll cover the basic steps to configure your integrations, so you can start receiving real-time alerts and stay on top of your monitoring data.
@@ -20,8 +20,6 @@ A mute timing is a recurring interval of time when no new notifications for a po
Similar to silences, mute timings do not prevent alert rules from being evaluated, nor do they stop alert instances from being shown in the user interface. They only prevent notifications from being created.
You can configure Grafana managed mute timings as well as mute timings for an [external Alertmanager data source]({{< relref "/docs/grafana/latest/datasources/alertmanager" >}}). For more information, refer to [Alertmanager documentation]({{< relref "/docs/grafana/latest/alerting/manage-notifications/alertmanager" >}}).
## Mute timings vs silences
The following table highlights the key differences between mute timings and silences.
Starting with Grafana v9.0.0, legacy alerting is deprecated. It is no longer actively maintained or supported by Grafana and will be removed in Grafana v11.0.0.
You have two options to configure alerts within the Grafana Cloud GUI and a third option that enables you to set Grafana Cloud Alerts using the command line.
- **Grafana alerts** are the same as in an on-prem instance of Grafana.
These alerts are created from a graph panel within a Grafana dashboard.
This is useful when you want to create a simple alert based on one metric from within a panel.
It also has a much simpler learning curve when you are getting started.
- **Grafana Cloud alerts - GUI** are an implementation of Prometheus-style rules that enable you to query your Grafana Cloud Metrics and then set up Prometheus Alertmanager-style alerts based on those rules.
This is useful when you want to create precise, PromQL-based rules or create alerts from across many metrics and logs being collected into your Grafana Cloud Metrics.
This form of alerting is much more powerful and configurable, but that comes with some complexity.
- **Grafana Cloud alerts - CLI** use mimirtool to create and upload the same types of Prometheus-style recording and alerting rules definitions to your Grafana Cloud Metrics instance.
Once created, you will also be able to view these rules from within the Grafana Cloud Alerting page in the GUI.
- **Synthetic Monitoring alerts** are built on Prometheus alerts, just like in Grafana Cloud alerting.
You can configure synthetic monitoring alerts separately using the UI in synthetic monitoring.
Another option to create alerts for synthetic monitoring checks is to simply use Grafana Cloud alerting.
## Using Grafana alerts in Grafana Cloud
Grafana alerts are dashboard panel-driven and can only be created using the Graph panel.
This style of alerting builds on top of the query defined for the graph visualization, so alerts and notifications are sent based on breaking some threshold in the associated panel.
This also means that there is a one-to-one relationship between a Grafana alert and a graph panel.
So although Grafana alerts can be viewed centrally, they can only be managed directly from the panel that they’re tied to.
As a result, Grafana alerting is best suited for smaller setups, where there are only a few individuals or teams responsible for a small set of dashboards and where there are few dependencies between the dashboards.
{{% admonition type="note" %}}
Most curated dashboards, such as those provided with an integration or with Synthetic Monitoring do not allow you to alert from panels.
This is to preserve the ability to upgrade these dashboards automatically when the integration or Synthetic Monitoring abilities are updated.
To create an editable copy that you can edit and alert from, click settings (the gear logo) within any dashboard and then click **Make Editable**.
The copy will not be upgraded when/if the curated dashboard receives an update.
This is one reason why Grafana Cloud Alerts may be considered a better option.
{{% /admonition %}}
### What makes Grafana alerts unique?
With Grafana alerts, alerts are limited to only graph panels within dashboards.
In addition:
- Alerts can be edited by both Editor and Admin roles
- Alerts are visual, with an associated alerting threshold line
- Alerts work with many non-Prometheus data sources, including Graphite
- Alert notifications can be routed to many external notifier systems, directly from Grafana
- Alerts are directly associated with a dashboard
- Alerts can be tested
## Using Grafana Cloud Alerts
Because the metrics you collect and send to Grafana Cloud are centrally stored in one large time-series database, Grafana Cloud Metrics, you can query across these metrics using [PromQL](https://prometheus.io/docs/prometheus/latest/querying/basics/) and build alerts directly around those metrics rather than around a panel.
You can also query across any logs you have sent using Loki.
Grafana Cloud Alerts are directly tied to metrics and log data.
They can be configured either through the UI or by uploading files containing Prometheus and Loki alert rules with mimirtool.
Grafana Cloud Alerting's Prometheus-style alerts are built by querying directly from the data source itself.
Because these alerts are based on the data, they are not tied to a single panel.
This makes it possible to evaluate and centrally manage alerts across several different Prometheus and Loki data source instances.
### What makes Grafana Cloud Alerts unique?
With Grafana Cloud Alerts, alerts are not limited to coming from a graph panel.
In addition, you can:
- Prevent alerts from being edited, except by users with accounts that are assigned Admin roles.
- Centrally manage and create alerts across many systems, teams, and dashboards.
Alerts are not bound to just one system, team, or dashboard.
- Create alerts for both metric _and_ log data, based on Prometheus and Loki, respectively.
- Silence and mute alerts in bulk, even using a schedule, using the Alertmanager.
- Route alert notifications to [many external notifier systems](https://prometheus.io/docs/operating/integrations/#alertmanager-webhook-receiver) using Alertmanager configurations
- Dedupe alert notifications automatically.
### Grafana Cloud Alert configuration methods
In a traditional on-prem environment, Prometheus-style alert configuration is done through the combination of defining a [Prometheus configuration file](https://prometheus.io/docs/prometheus/latest/configuration/configuration/) and an [Alertmanager configuration file](https://prometheus.io/docs/alerting/latest/configuration/), which live close to the Prometheus server.
With Grafana Cloud, you can still use this setup as well as more flexible architectures.
- You can use `mimirtool` to upload your configuration files to be hosted and evaluated entirely in Grafana Cloud.
- You can manage both alerting rules and Alertmanager configurations directly through the UI.
Configuration files are unnecessary with this setup.
- You can use both methods concurrently to manage the alerts.
For example, updates made using the `mimirtool` are automatically updated and visible within the Grafana Cloud Alerting interface in minutes.
This page outlines the steps to use mimirtool and Prometheus-style rules with Grafana Cloud Alerting. You can load Prometheus alerting and recording rules that are evaluated entirely in Grafana Cloud. This allows for global rule evaluation over all of the metrics and logs stored in your Grafana Cloud stack.
{{% admonition type="note" %}}
`mimirtool` does _not_ support Loki.
{{% /admonition %}}
Prometheus-style alerting is driven by your Grafana Cloud Metrics, Grafana Cloud Logs, and Grafana Cloud Alerts instances. The Metrics and Logs instance holds the rules definition, while the Alerts instance is in charge of routing and managing the alerts that fire from the Metrics and Logs instance. These are separate systems that must be individually configured in order for alerting to work correctly.
The following sections cover all of these concepts:
- How to upload alerting and recording rules definition to your Grafana Cloud Metrics instance
- How to upload alerting rules definition to your Grafana Cloud Logs instance
- How to configure an Alertmanager for your Grafana Cloud Alerts instance, giving you access to the Alertmanager UI.
**Note:** You need an API key with proper permissions. You can use the same API key for your Metric, Log, and Alerting instances.
## Download and install mimirtool
mimirtool is a powerful command-line tool for interacting with Mimir, which powers Grafana Cloud Metrics and Alerts. You'll use mimirtool to upload your metric and log rules definition and the Alertmanager configuration using YAML files.
For more information, including installation instructions, see [Grafana Mimirtool](/docs/mimir/latest/operators-guide/tools/mimirtool).
{{% admonition type="note" %}}
For mimirtool to interact with Grafana Cloud, you must set the correct configuration variables. Set them using either environment variables or a command line flags.
{{% /admonition %}}
## Upload rules definition to your Grafana Cloud Metrics and Logs instance
First, you'll need to upload your alerting and recording rules to your Metrics and Logs instance. You'll need the instance ID and the URL. These should be part of /orgs/`<yourOrgName>`/.
### Metrics instance
Your Metrics instance is likely to be in the `us-central1` region. Its address would be in the form of [https://prometheus-us-central1.grafana.net](https://prometheus-us-central1.grafana.net).
### Logs instance
Your Logs instance is likely to be in the `us-central1` region. Its address would be in the form of [https://logs-prod-us-central1.grafana.net](https://logs-prod-us-central1.grafana.net).
### Using mimirtool
With your instance ID, URL, and API key you're now ready to upload your rules to your metrics instance. Use the following commands and files as a reference.
Below is an example alert and rule definition YAML file. Take note of the namespace key which replaces the concept of "files" in this context given each instance only supports 1 configuration file.
```yaml
# first_rules.yml
namespace:'first_rules'
groups:
- name:'shopping_service_rules_and_alerts'
rules:
- alert:'PromScrapeFailed'
annotations:
message:'Prometheus failed to scrape a target {{ $labels.job }} / {{ $labels.instance }}'
expr:'up != 1'
for:'1m'
labels:
'severity':'critical'
- record:'job:up:sum'
expr:'sum by(job) (up)'
```
Although both recording and alerting rules are defined under the key `rules` the difference between a rule and and alert is _generally_ (as there are others) whenever the key `record` or `alert` is defined.
With this file, you can run the following commands to upload your rules file in your Metrics or Logs instance. Keep in mind that these are example commands for your Metrics instance, and they use placeholders and command line flags. Follow a similar pattern for your Logs instances by switching the address to the correct one. The examples also assume that files are located in the same directory.
Output from the print command should look like this:
```yaml
first_rules:
- name:shopping_service_rules_and_alerts
interval:0s
rules:
- alert:PromScrapeFailed
expr:up != 1
for:1m
labels:
severity:critical
annotations:
message:Prometheus failed to scrape a target {{ $labels.job }} / {{ $labels.instance }}
- record:job:up:sum
expr:sum by(job) (up)
```
## Upload Alertmanager configuration to your Grafana Cloud Alerts instance
To receive alerts you'll need to upload your Alertmanager configuration to your Grafana Cloud Alerts instance. Similar to the previous step, you'll need the corresponding instance ID, URL and API key. These should be part of /orgs/`<yourOrgName>`/.
Your Alerts instance is likely to be in the `us-central1` region. Its address would be in the form of [https://alertmanager-us-central1.grafana.net](https://alertmanager-us-central1.grafana.net).
### Using mimirtool
With your instance ID, URL, and API key you're now ready to upload your Alertmanager configuration to your Alerts instance. Use the following commands and files as a reference.
Ultimately, you'll need to [write your own](https://prometheus.io/docs/alerting/latest/configuration/) or adapt an [example config file](https://github.com/prometheus/alertmanager/blob/master/doc/examples/simple.yml) for alerts to be delivered.
Below is an example Alertmanager configuration. Please take that this not a working configuration, your alerts won't be delivered with the following configuration but your Alertmanager UI will be accessible.
```yaml
# alertmanager.yml
global:
smtp_smarthost:'localhost:25'
smtp_from:'youraddress@example.org'
route:
receiver:example-email
receivers:
- name:example-email
email_configs:
- to:'youraddress@example.org'
```
With this file, you can run the following commands to upload your Alertmanager configuration in your Alerts instance.
After you upload a working Alertmanager configuration file, you can access the Alertmanager UI at: https://alertmanager-us-central1.grafana.net/alertmanager.
Grafana Cloud Alerting allows you to create and manage all of your Prometheus-style alerting rules, for both Prometheus metrics and Loki log data. With this feature, you don't need to leave Grafana, upload or edit configuration files, or install additional tools.
All members of an organization that have alerts set up can view alerts in Grafana Cloud Alerting. This includes everyone with a Viewer, Editor, or Admin role.
Users with the organization Admin role can also create, edit, or delete alerts.
## Data sources
Grafana Cloud Alerting supports rule management across multiple data sources, for both metrics and logs, across all of the stacks in your org. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to configure rules.
{{% admonition type="note" %}}
Pay attention to which data source you select. Cloud alerts are tied to a specific data source. For example, if you have a Loki data source selected you will not be able to create an alert based on a Prometheus data source.

{{% /admonition %}}
## Alerts and recording rules
Prometheus supports two types of rules:
- [Recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) - Recording rules allow you to execute expressions or queries, by saving them off as a stored rule instead.
- [Alerting rules](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) - Alerting rules allow you to define alert conditions and to route those notifications to an external service. An alert fires if metrics meet criteria defined in the alerting rule.
Both of these rules are configurable from the Grafana Cloud Alerting interface and configured in the same way.
## Alert states
Alert states are identical to the standard format found in Prometheus rule configurations. In Grafana Cloud Alerting, each individual alert is highlighted by its state to more clearly distinguish between alerts.
- **Firing -** Alerts that have been active for longer than the configured threshold. Alerts are highlighted in red and tagged with a red `firing` label.
- **Pending -** Alerts that have been active for less than the configured threshold. Alerts are highlighted in orange.
- **Inactive -** Alerts that are neither firing nor pending. Alerts are highlighted in green.
## Notifications
The **Notifications** tab is where you can view all current notifications and sort them by various states, receivers, and labels.
Grafana Cloud Alerting allows you to edit and view configuration for your Alertmanager directly inside of Grafana. See the official [Alertmanager documentation](https://prometheus.io/docs/alerting/latest/configuration/) to learn how to configure.
{{% admonition type="note" %}}
Only organization Admins can view or update Alertmanger configurations.
{{% /admonition %}}
## Edit a config for Grafana Cloud Alerting
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alertmanager**.
1. If you have more than one Alertmanager source, there will be a dropdown at the top for you to select the data source to edit configurations.
1. Currently active configuration for the Alertmanager will be displayed. Click the **Edit** button to enter edit mode and start making changes. Click "Save and finish editing" once done to persist your changes.
1. Alternatively, updates to the Alertmanager configurations made using the mimirtool will also sync and appear here.
## Use the Grafana Labs-supplied SMTP option to configure email notifications
Grafana Cloud users who do not have an SMTP server available for sending alert emails may use Grafana-Labs supplied SMTP relay (available at `smtprelay:2525`).
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alertmanager**.
1. If you have more than one Alertmanager source, there will be a dropdown at the top for you to select the data source to edit configurations.
1. Find info box with heading **Send alert email notifications from Grafana Cloud** at the top
1. Enter desired email address into the **email address** field
1. Click **Update configuration** button. Alertmanager config will be updated with grafana SMTP relay settings and an "email" receiver that will send to the specified email address.
{{% admonition type="note" %}}
Following these steps will overwrite any custom global SMTP settings that you might have. Default route configuration will send all notifications to the "email" receiver. If you have already customized routes, they will not be updated and you will have to configure "email" receiver on the appropriate route.
{{% /admonition %}}
Use these settings in your Grafana Cloud Alerting YAML, if you do not find them already set. Most important is the `smtp_require_tls: false` line. If this is not set properly, alert emails will not be received. If you use mimirtool to configure alertmanager, by default this will be set to `true`, which will cause problems.
```yaml
global:
smtp_from:noreply@grafana.net
smtp_smarthost:smtprelay:2525
smtp_require_tls:false
```
## Troubleshooting Alertmanager failures
Configuration errors can cause Alertmanager notification failures, e.g. a typo in an email address recipient or an expired token for a webhook. Grafana Cloud provisions a Loki datasource `grafanacloud-<stack_slug>-usage-insights` which can be used to display select notification errors with a query similar to the example below. The `instance_type` label of `alerts` is what selects the Grafana Cloud Alertmanager logs.
Creating alerts in Grafana Cloud differs from creating alerts directly with Prometheus or Loki. While the rule format is the same, everything is done in the Grafana Cloud Alerting interface, rather than with configuration files.
{{% admonition type="note" %}}
Only organization Admins can create or edit alert rules.
{{% /admonition %}}
## Create an alert rule
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
1. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
1. Click **Edit rules**.
1. Click **Add rule**.
Grafana creates a new rule with placeholders.
```
alert: ""
expr: ""
```
Enter text according to regular Prometheus rule configuration guidelines:
When you are finished, click **Save**. You can then repeat the process to create more rules or click **Finish editing** to return to the rules list.
## Edit an alert rule
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
1. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
1. Click **Edit rules**.
1. Scroll down to the rule that you want to edit and then click **Edit**.
1. Make any necessary changes to the rule text and then click **Save**.
1. Click **Finish editing** to return to the rules list.
## Delete an alert rule
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
1. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
1. Click **Edit rules**.
1. Scroll down to the rule that you want to edit and then click **Delete**.
1. Click **Finish editing** to return to the rules list.
By default, all alerting and recording rules created in Grafana Cloud Alerting will default to a single namespace and a single rule group.
## Managing namespaces
While Grafana Cloud Alerting does support viewing multiple namespaces that have been added through the mimirtool, it is currently not possible to add new namespaces or to rename the existing ones.
## Managing rule groups
Rule groups can be managed directly within the Grafana Cloud Alerting interface or through the mimirtool, similar to managing namespaces.
{{% admonition type="note" %}}
By default, Grafana Cloud limits the number of rule groups to 20, with a limit of up to 15 rules per group. If you wish to increase the default limits, please [open a support ticket](/profile/org#support) or reach out to your account manager.
{{% /admonition %}}
### Create a new rule group:
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
2. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
3. Click **Create new rule group**.
4. Enter text to name your new rule group.
5. Enter text for the new rule in your new rule group, according to regular Prometheus rule configuration guidelines:
Grafana Cloud Alerting allows you to manage silences for your alertmanager notifications directly inside of Grafana. This applies to alerting rules created for both Prometheus metrics and Loki logs.
## Create a silence
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Silences**.
2. Click **New silence**.
3. Enter a date in **Start of silence** to indicate when the silence should go into effect.
4. Enter a date in **End of silence** to indicate when the silence should expire.
5. Enter one or more matchers by filling out the **Name** and **Value** fields. Matchers determine which rules the silence will apply to.
6. Enter the name of the owner in **Creator**.
7. Enter a **Comment**.
8. To view which rules will be affected by your silence, click **Preview alerts**.
9. Otherwise, when you are finished, click **Create**
## Update an existing silence
You can always update an existing silence by clicking the **Edit silence** button under the silence.
It is also possible to expire a silence, on-demand, by clicking the **Expire silence** button under the silence. This will override the original scheduled expiration date of the silence.
Grafana Cloud Alerting displays a list of all recording and alerting rules assigned to a selected data source in the Alerts and rules tab.
All members of an organization that have access to a particular data source can view the list of rules and filter or reorder their view.
## View alert rules
1. Hover your cursor over the **Grafana Cloud Alerting** icon (alarm bell with Prometheus logo) and then click **Alerts and rules**.
1. In the list at the top of the tab, select the data source for which you want to view rules.
Grafana displays rules according to rule groups. If your instance has added namespaces and alert groups, then they will be ordered alphabetically. Otherwise, you will have one namespace called `default` and an alert group called `rules`.
If an alert is firing, then click the down carrot arrow to see additional information. The Label and annotations section appears.
## Filter your alert rule view
You can control which alerts you see and in what order they appear several ways. Combine different filters to personalize your view so that you can quickly find the information that you need.
- **Filter by alert state -** Click the toggles to show or hide alerts in different states. Turn off the toggle to hide alerts matching the state.
- **Filter by rule type -** Click the toggles to show or hide alerting rules or recording rules.
- **View options -** Click the toggle to show or hide the Prometheus annotations shown in the Labels and annotations section.
- **Rule sorting -** Click an option to sort alert rules within each rule group.
- **None -** No special sort is applied and sorts as if in a file, ordered according to the editing list order.
- **A-Z -** Sorts rules alphabetically according to the rule name.
- **Alert state -** Sorts rules according to the alert state (Firing, Pending, or Inactive).
## View alert in Explore
Click **View in Explore** or click the `expr` link to open the `expr` in [Explore](/docs/grafana/latest/explore/).
> **Note:** Only users with Admin or Editor roles in an organization can use the Explore feature unless the viewers can edit.
@@ -20,18 +20,24 @@ longer supported. We refer to these as [Differences]({{< relref "#differences" >
2. Read and write access to legacy dashboard alerts and Grafana alerts are governed by the permissions of the folders storing them. During migration, legacy dashboard alert permissions are matched to the new rules permissions as follows:
- If alert's dashboard has permissions, it will create a folder named like `Migrated {"dashboardUid": "UID", "panelId": 1, "alertId": 1}` to match permissions of the dashboard (including the inherited permissions from the folder).
- If there are no dashboard permissions and the dashboard is under a folder, then the rule is linked to this folder and inherits its permissions.
- If there are no dashboard permissions and the dashboard is under the General folder, then the rule is linked to the `General Alerting` folder, and the rule inherits the default permissions.
- If there are dashboard permissions, a folder named `Migrated {"dashboardUid": "UID", "panelId": 1, "alertId": 1}` is created to match the permissions of the dashboard (including the inherited permissions from the folder).
- If there are no dashboard permissions and the dashboard is in a folder, then the rule is linked to this folder and inherits its permissions.
- If there are no dashboard permissions and the dashboard is in the General folder, then the rule is linked to the `General Alerting` folder and the rule inherits the default permissions.
3.Since there is no `Keep Last State` option for [`NoData`]({{< relref "../alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) in Grafana Alerting, this option becomes `NoData` during the legacy rules migration. Option "Keep Last State" for [`Error handling`]({{< relref "../alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a silence for each alert rule with a duration of 1 year.
3.`NoData` and `Error` settings are migrated as is to the corresponding settings in Grafana Alerting, except in two situations:
3.1. As there is no `Keep Last State` option for `No Data` in Grafana Alerting, this option becomes `NoData`. The `Keep Last State` option for `Error` is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a silence for each alert rule with a duration of 1 year.
3.2. Due to lack of validation, legacy alert rules imported via JSON or provisioned along with dashboards can contain arbitrary values for `NoData` and [`Error`](/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md#configure-no-data-and-error-handling). In this situation, Grafana will use the default setting: `NoData` for No data, and `Error` for Error.
4. Notification channels are migrated to an Alertmanager configuration with the appropriate routes and receivers. Default notification channels are added as contact points to the default route. Notification channels not associated with any Dashboard alert go to the `autogen-unlinked-channel-recv` route.
5. Unlike legacy dashboard alerts where images in notifications are enabled per contact point, images in notifications for Grafana Alerting must be enabled in the Grafana configuration, either in the configuration file or environment variables, and are enabled for either all or no contact points. Refer to [images in notifications](https://grafana.com/docs/grafana/latest/alerting/manage-notifications/images-in-notifications/).
6. Grafana Alerting does not support pausing the evaluation of alert rules. After migration, all paused alert rules will become active, which may cause unexpected notifications to be sent.
5. Unlike legacy dashboard alerts where images in notifications are enabled per contact point, images in notifications for Grafana Alerting must be enabled in the Grafana configuration, either in the configuration file or environment variables, and are enabled for either all or no contact points. Refer to [images in notifications]({{< relref "../manage-notifications/images-in-notifications" >}}).
6. The JSON format for webhook notifications has changed in Grafana Alerting and uses the format from [Prometheus Alertmanager](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config).
7. Alerting on Prometheus `Both` type queries is not supported in Grafana Alerting. Existing legacy alerts with `Both` type queries are migrated to Grafana Alerting as alerts with `Range` type queries.
## Limitations
1. Since `Hipchat` and `Sensu` notification channels are no longer supported, legacy alerts associated with these channels are not automatically migrated to Grafana Alerting. Assign the legacy alerts to a supported notification channel so that you continue to receive notifications for those alerts.
Silences (expiring after one year) are created for all paused dashboard alerts.
@@ -47,4 +47,4 @@ Grafana cannot be used to receive external alerts. You can only send alerts to t
You have the option to send Grafana managed alerts to an external Alertmanager, you can find this option in the admin tab on the Alerting page.
For more information, refer to [this GitHub discussion](https://github.com/grafana/grafana/discussions/45773). For more information on the different Alertmanagers, refer to [Alertmanager]([{{< relref "../manage-notifications/alertmanager/" >}}](https://grafana.com/docs/grafana/next/alerting/manage-notifications/alertmanager/).
For more information, refer to [this GitHub discussion](https://github.com/grafana/grafana/discussions/45773).
@@ -28,7 +28,7 @@ Since gossiping of notifications and silences uses both TCP and UDP port `9094`,
1. In your custom configuration file ($WORKING_DIR/conf/custom.ini), go to the `[unified_alerting]` section.
2. Set `[ha_peers]` to the number of hosts for each Grafana instance in the cluster (using a format of host:port), for example, `ha_peers=10.0.0.5:9094,10.0.0.6:9094,10.0.0.7:9094`.
You must have at least one (1) Grafana instance added to the [`[ha_peer]` section.
You must have at least one (1) Grafana instance added to the `ha_peers` section.
3. Set `[ha_listen_address]` to the instance IP address using a format of `host:port` (or the [Pod's](https://kubernetes.io/docs/concepts/workloads/pods/) IP in the case of using Kubernetes).
By default, it is set to listen to all interfaces (`0.0.0.0`).
@@ -24,22 +24,21 @@ There are three options to choose from:
For more information on the Alerting Provisioning HTTP API, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/).
**Note:**
Typically, you cannot edit API-provisioned alert rules from the Grafana UI.
In order to enable editing, add the x-disable-provenance header to the following requests when creating or editing your alert rules in the API:
POST /api/v1/provisioning/alert-rules
PUT /api/v1/provisioning/alert-rules/{UID}
1. Provision your alerting resources using Terraform.
**Note:**
Currently, provisioning for Grafana Alerting supports alert rules, contact points, mute timings, and templates. Provisioned alerting resources using file provisioning or Terraform can only be edited in the source that created them and not from within Grafana or any other source. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
To allow editing of provisioned resources in the Grafana UI, add the `X-Disable-Provenance` header to the following requests in the API:
-`POST /api/v1/provisioning/alert-rules`
-`PUT /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}` (calling this endpoint will change provenance for all alert rules within the alert group)
@@ -110,7 +110,7 @@ You cannot edit resources provisioned via Terraform from the UI. This ensures th
**Note:**
You can re-use the same templates across many contact points. In the example above, a shared template ie embedded using the statement `{{ template “Alert Instance Template” . }}`
You can reuse the same templates across many contact points. In the example above, a shared template ie embedded using the statement `{{ template “Alert Instance Template” . }}`
This fragment can then be managed separately in Terraform:
@@ -43,11 +43,9 @@ For every dashboard and data source, you can access usage information.
### Dashboard insights
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
To see dashboard usage information, click the dashboard insights icon in the header.
To see dashboard usage information, click **Dashboardinsights** in the top bar.
Dashboard insights show the following information:
@@ -58,8 +56,6 @@ Dashboard insights show the following information:
### Data source insights
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.3 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
Data source insights provides information about how a data source has been used in the past 30 days, such as:
- Queries per day
@@ -68,17 +64,16 @@ Data source insights provides information about how a data source has been used
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
When you are signed in and looking at a dashboard, you can know who is looking at the same dashboard as you are via a presence indicator, which displays avatars of users who have recently interacted with the dashboard. The default timeframe is 10 minutes. To see the user's name, hover over the user's avatar. The avatars come from [Gravatar](https://gravatar.com) based on the user's email.
When you are signed in and looking at a dashboard, you can know who is looking at the same dashboard as you are via a presence indicator, which displays avatars of users who have recently interacted with the dashboard. The default time frame is 10 minutes. To see the user's name, hover over the user's avatar. The avatars come from [Gravatar](https://gravatar.com) based on the user's email.
When there are more active users on a dashboard than can fit within the presence indicator, click the **+X** icon. Doing so opens [dashboard insights]({{< relref "#dashboard-and-data-source-insights" >}}), which contains more details about recent user activity.
@@ -88,29 +83,38 @@ To change _recent_ to something other than the past 10 minutes, edit the [config
```ini
[analytics.views]
# Set age for recent active users
# Set age for recent active users to 10 minutes
recent_users_age=10m
```
To disable the presence indicator, edit the [configuration][] file as follows:
```ini
[analytics.views]
# Disables the presence indicator
recent_users_age=0
```
The dashboard won't show any avatars and thus no recent user activity.
## Sort dashboards by using insights data
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
In the search view, you can use insights data to help you find most-used, broken, and unused dashbaords.
In the search view, you can use insights data to help you find most-used, broken, and unused dashboards.
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
If you set up your installation to [export logs of usage insights]({{< relref "../../setup-grafana/configure-security/export-logs/" >}}), we've created two dashboards to help you take advantage of this data.
1. [Usage Insights overview](/grafana/dashboards/13785) provides a top-level perspective of user activity.
Annotations provide a way to mark points on the graph with rich events. When you hover over an annotation
you can get event description and event tags. The text field can include links to other systems with more detail.
Annotations provide a way to mark points on a visualization with rich events. They are visualized as vertical lines and icons on all graph panels. When you hover over an annotation, you can get event description and event tags. The text field can include links to other systems with more detail.
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../../../developers/http_api/annotations/" >}}).
- Directly in the panel, using the [built-in annotations query](#built-in-query)
- Using the HTTP API
- Configuring annotation queries in the dashboard settings
### Add annotation
In the first two cases, you're creating new annotations, while in the last you're querying existing annotations from data sources. The built-in annotation query also supports this.
1. In the dashboard click on the Time series panel. A context menu will appear.
1. In the context menu click on **Add annotation**.
This page explains the first and third options; for information about using the HTTP API, refer to [Annotations API]({{< relref "../../../developers/http_api/annotations/" >}}).
Annotations are supported for the following visualization types:
- Time series
- State timeline
- Candlestick
## Create annotations in panels
Grafana comes with the ability to add annotation events directly from a panel using the [built-in annotation query](#built-in-query) that exists on all dashboards. Annotations that you create this way are stored in Grafana.
To add annotations directly in the panel, the built-in query must be enabled. Learn more in [Built-in query](#built-in-query)
### Add an annotation
To add an annotation, complete the following steps:
1. In the dashboard click the panel to which you're adding the annotation. A context menu will appear.
1. Click on the trash icon in the annotation tooltip.
### Built-in query
## Fetch annotations through dashboard settings
After you added an annotation they will still be visible. This is due to the builtin annotation query that exists on all dashboards. This annotation query will
fetch all annotation events that originate from the current dashboard and show them on the panel where they were created. This includes alert state history annotations. You can
stop annotations from being fetched and drawn by opening the **Annotations** settings (via Dashboard cogs menu) and modifying the query named `Annotations & Alerts (Built-in)`.
In the dashboard settings, under **Annotations**, you can add new queries to fetch annotations using any data source, including the built-in data annotation data source. Annotation queries return events that can be visualized as event markers in graphs across the dashboard.
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. But this only works if the annotations on the source dashboard had tags to filter by.
### Add new annotation queries
### Query by tag
To add a new annotation query to a dashboard, take the following steps:
You can create new queries to fetch annotations from the native annotation store via the `-- Grafana --` data source by setting _Filter by_ to `Tags`.
1. Click the dashboard settings (gear) icon in the dashboard header to open the settings menu.
1. Select **Annotations**.
1. Click **Add annotation query**.
If you've added a query before, the **+ New query** button is displayed.
1. Enter a name for the annotation query.
This name is given to the toggle (checkbox) that will allow you to enable/disable showing annotation events from this query.
1. Select the data source for the annotations.
1. If you don't want to use the annotation query right away, clear the **Enabled** checkbox.
1. If you don't want the annotation query toggle to be displayed in the dashboard, select the **Hidden** checkbox.
1. Select a color for the event markers.
1. Configure the query.
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../../../datasources/" >}}) topic.
## Built-in query
After you add an annotation, they will still be visible. This is due to the built-in annotation query that exists on all dashboards. This annotation query will fetch all annotation events that originate from the current dashboard, which are stored in Grafana, and show them on the panel where they were created. This includes alert state history annotations.
To add annotations directly to the dashboard, this query must be enabled.
To confirm if the built-in query is enabled, take the following steps:
1. Click the dashboard settings (gear) icon in the dashboard header to open the dashboard settings menu.
1. Click **Annotations**.
1. Find the **Annotations & Alerts (Built-in)** query.
If it says **Disabled** before the name of the query, then you'll need to click the query name to open it and update the setting.
You can stop annotations from being fetched and drawn by taking the following steps:
1. Click the dashboard settings (gear) icon in the dashboard header to open the settings menu.
1. Click **Annotations**.
1. Find and click the **Annotations & Alerts (Built-in)** query to open it.
1. Click the **Enabled** toggle to turn it off.
When you copy a dashboard using the **Save As** feature it will get a new dashboard id, so annotations created on the 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.
### Filter queries by tag
You can create new queries to fetch annotations from the built-in annotation query using the `-- Grafana --` data source by setting _Filter by_ to `Tags`.
Grafana v8.1 and later versions also support typeahead of existing tags, provide at least one tag.
For example, create an annotation query name `outages` and specify a tag `outage`. This query will show all annotations (from any dashboard or via API) with the `outage` tag. If multiple tags are defined in an annotation query, then Grafana will only show annotations matching all the tags. To modify the behavior, enable `Match any`, and Grafana will show annotations that contain any one of the tags you provided.
In Grafana v5.3+ it's possible to use template variables in the tag query. So if you have a dashboard showing stats for different services and a template variable that dictates which services to show, you can now use the same template variable in your annotation query to only show annotations for those services.
You can also use template variables in the tag query. This means if you have a dashboard showing stats for different services and a template variable that dictates which services to show, you can use the same template variable in your annotation query to only show annotations for those services.
Specify a name for the annotation query. This name is given to the toggle (checkbox) that will allow
you to enable/disable showing annotation events from this query. For example you might have two
annotation queries named `Deploys` and `Outages`. The toggle will allow you to decide what annotations
to show.
### Annotation query details
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../../../datasources/" >}}) topic.
@@ -65,7 +65,7 @@ The query parameter `var-adhoc=key|=|value` applies the ad hoc filter configured
### Example
See [https://play.grafana.org/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica] - this passes the ad hoc filter variable `adhoc` with the filter value `datacenter = America`.
[This example in Grafana Play](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica) passes the ad hoc filter variable `adhoc` with the filter value `datacenter = America`.
1. Click **Library panels**, and then click **+ Create library panel** to open the create dialog.
1. In **Library panel name**, enter the name.
1. In **Save in folder**, select the folder to save the library panel.
1. Click **Create library panel** to save your changes.
@@ -34,14 +34,16 @@ When you create a library panel, the panel on the source dashboard is converted
Once created, you can modify the library panel using any dashboard on which it appears. After you save the changes, all instances of the library panel reflect these modifications.
{{< figure src="/static/img/docs/library-panels/create-from-more-8-0.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the edit panel" >}}
You can also create a librarypanel directly from the edit menu of any panel.
Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are never lost. A list of these versions is available by entering the dashboard settings and then selecting "Versions" in the left side menu.
The dashboard version history feature lets you compare and restore to previously saved dashboard versions.
@@ -25,20 +25,18 @@ The dashboard version history feature lets you compare and restore to previously
To compare two dashboard versions, select the two versions from the list that you wish to compare. Once selected, the "Compare versions" button will become clickable. Click the button to view the diff between the two versions.
If you want to view the diff of the raw JSON that represents your dashboard, you can do that as well by clicking the "View JSON Diff" button at the bottom.
If you want to restore to the version you are diffing against, you can do so by clicking the "Restore to version \<x\>" button in the top right.
If you want to view the diff of the raw JSON that represents your dashboard, you can do that as well by clicking the expand icon for the View JSON Diff section at the bottom.
## Restoring to a previously saved dashboard version
If you need to restore to a previously saved dashboard version, you can do so by either clicking the "Restore" button on the right of a row in the dashboard version list, or by clicking the "Restore to version \<x\>" button appearing in the diff view. Clicking the button will bring up the following popup prompting you to confirm the restoration.
If you need to restore to a previously saved dashboard version, you can do so by either clicking the "Restore" button on the right of a row in the dashboard version list, or by clicking the **Restore to version \<x\>** button appearing in the diff view. Clicking the button will bring up the following popup prompting you to confirm the restoration.
After restoring to a previous version, a new version will be created containing the same exact data as the previous version, only with a different version number. This is indicated in the "Notes column" for the row in the new dashboard version. This is done simply to ensure your previous dashboard versions are not affected by the change.
- Edit general dashboard properties, including time settings
- Add annotation queries
@@ -31,7 +31,7 @@ Adjust dashboard time settings when you want to change the dashboard timezone, t
1. On the **Dashboard settings** page, click **General**.
1. Navigate to the **Time Options** section.
1. Specify time settings according to the following descriptions.
1. Specify time settings as follows.
- **Timezone:** Specify the local time zone of the service or system that you are monitoring. This can be helpful when monitoring a system or service that operates across several time zones.
- **Default:** Grafana uses the default selected time zone for the user profile, team, or organization. If no time zone is specified for the user profile, a team the user is a member of, or the organization, then Grafana uses the local browser time.
@@ -62,7 +62,7 @@ the dashboard. These dropdowns make it easy to change the data being displayed i
For more information about variables, refer to [Variables]({{< relref "../../variables/" >}}).
1. On the **Dashboard settings** page, click **Variable** in the left side section menu and then the **Add variable** button.
1. In the **General** section, the the name of the variable. This is the name that you will later use in queries.
1. In the **General** section, the name of the variable. This is the name that you will later use in queries.
1. Select a variable **Type**.
> **Note:** The variable type you select impacts which fields you populate on the page.
@@ -74,7 +74,7 @@ For more information about variables, refer to [Variables]({{< relref "../../var
Dashboard links enable you to place links to other dashboards and web sites directly below the dashboard header. Links provide for easy navigation to other, related dashboards and content.
1. On the **Dashboard settings** page, click **Links** in the left side section menu and then the **Add link** button.
1. Enter title and and in the **Type** field, select **Dashboard** or **Link**.
1. Enter title and in the **Type** field, select **Dashboard** or **Link**.
1. To add a dashboard link:
a. Add an optional tag. Tags are useful creating a dynamic dropdown of dashboards that all have a specific tag.
@@ -26,21 +26,22 @@ Use the information in this section to access existing playlists. Start and cont
### Access a playlist
1.Hover your cursor over Grafana’s side menu.
1. Click **Playlists**. You will see a list of existing playlists.
1.Click **Dashboards** in the left-side menu.
1. Click **Playlists** to see a list of existing playlists.
### Start a playlist
You can start a playlist in five different view modes. View mode determine how the menus and navigation bar appear on the dashboards.
You can start a playlist in five different view modes. View modes determine how the menus and navigation bar appear on the dashboards.
By default, each dashboard is displayed for the amount of time entered in the Interval field, which you set when you create or edit a playlist. After you start a playlist, you can control it with the navbar at the top of the page.
1.[Access](#access-playlist) the playlist page to see a list of existing playlists.
1.Find the playlist you want to start, then click **Start playlist**. The start playlist dialog opens.
1.Select one of the five playlist modes available based on the information in the following table.
1.Click **Start <playlist name>**.
1.Click **Dashboards** in the left-side menu.
1.Click **Playlists** to see a list of existing playlists.
1.Find the playlist you want to start, then click **Start playlist**.
1.In the modal that opens, select one of the five playlist modes available, based on the information in the table below.
1. Click **Start \<playlist name\>**.
The playlist displays each dashboard for the time specified in the `Interval` field, set when creating or editing a playlist. Once a playlist starts, you can [control](#control-a-playlist) it using the navbar at the top of your screen.
The playlist displays each dashboard for the time specified in the **Interval** field, set when creating or editing a playlist. Once a playlist starts, you can [control](#control-a-playlist) it using the navbar at the top of your screen.
@@ -67,7 +68,9 @@ You can control a playlist in **Normal** or **TV** mode after it's started, usin
You can create a playlist to present dashboards in a sequence, with a set order and time interval between dashboards.
1.In the playlist page, click**Newplaylist**. The New playlist page opens.
1.Click**Dashboards** in the left-side menu.
1. Click **Playlists** to see a list of existing playlists.
1. Click**Newplaylist**. The New playlist page opens.
1. Inthe**Name**text box, enter a descriptive name.
1. In the **Interval** text box, enter a time interval. Grafana displays a particular dashboard for the interval of time specified here before moving on to the next dashboard.
1. In Dashboards, add existing dashboards to the playlist using **Add by title** and **Add by tag** drop-down options. The dashboards you add are listed in a sequential order.
@@ -82,8 +85,8 @@ You can create a playlist to present dashboards in a sequence, with a set order
You can save a playlist and add it to your **Playlists** page, where you can start it. Be sure that all the dashboards you want to appear in your playlist are added when creating or editing the playlist before saving it.
1.To access the Playlist feature, hover your cursor over Grafana's side menu.
1. Click **Playlists**.
1.Click **Dashboards** in the left-side menu.
1. Click **Playlists** to see a list of existing playlists.
1. Click on the playlist.
1. Edit the playlist.
1. Ensure that your playlist has a **Name**, **Interval**, and at least one **Dashboard** added to it.
@@ -95,36 +98,47 @@ You can edit a playlist by updating its name, interval time, and by adding, remo
### Edit a playlist
1.In the playlist page, click**Editplaylist**. The Edit playlist page opens.
1.Click**Dashboards** in the left-side menu.
1. Click **Playlists** to see a list of existing playlists.
1. Find the playlist you want to update and click**Editplaylist**.
1. Update the name and time interval, then add or remove dashboards from the playlist using instructions in [Create a playlist](#create-a-playlist).
1. Click **Save** to save your changes.
### Delete a playlist
1. Click **Playlists**.
1.Next to the Playlist you want to delete, click **Remove[x]**.
1. Click **Dashboards** in the left-side menu.
1.Click **Playlists** to see a list of existing playlists.
1. Find the playlist you want to remove.
1. Click **Delete playlist**.
### Rearrange dashboard order
1.Next to the dashboard you want to move, click the up or down arrow.
1.Click **Dashboards** in the left-side menu.
1. Click **Playlists** to see a list of existing playlists.
1. Find the playlist you want to update and click**Editplaylist**.
1. Click and drag the dashboards into your desired order.
1. Click **Save** to save your changes.
### Remove a dashboard
1. Click **Remove[x]** to remove a dashboard from the playlist.
1. Click **Dashboards** in the left-side menu.
1. Click **Playlists** to see a list of existing playlists.
1. Find the playlist you want to update and click**Editplaylist**.
1. Click **\[x\]** on the name of the dashboard you want to remove from the playlist.
1. Click **Save** to save your changes.
## Share a playlist in a view mode
You can share a playlist by copying the link address on the view mode you prefer, and pasting the URL to your destination.
1. From the Dashboards submenu, click **Playlists**.
1. Next to the playlist you want to share, click **Start playlist**.
1. In the dropdown, right click the view mode you prefer.
1. Click **Copy Link Address** to copy the URL to your clipboard.
1.Click **Dashboards** in the left-side menu.
1.Click **Playlists** to see a list of existing playlists.
1.Click the share icon of the playlist you want to share.
1.Select the view mode you prefer.
1. Click **Copy** next to the Link URL to copy it to your clipboard.
Example: The URL for the first playlist on the Grafana Play site in Kiosk mode will look like this:
For example, the URL for the first playlist on the Grafana Play site in Kiosk mode will look like this:
Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report also changes.
Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report also changes, unless you've configured a custom time range.
For information about recent improvements to the reporting UI, refer to [Grafana reporting: How we improved the UX in Grafana](https://grafana.com/blog/2022/06/29/grafana-reporting-how-we-improved-the-ux-in-grafana/).
@@ -43,10 +47,11 @@ When [RBAC]({{< relref "../../administration/roles-and-permissions/access-contro
Only organization administrators can create reports by default. You can customize who can create reports with [Role-based access control]({{< relref "../../administration/roles-and-permissions/access-control/" >}}).
1. Click on the Reports icon in the side navigation menu.
1. Click **Dashboards > Reports** in the side navigation menu.
The Reports tab allows you to view, create, and update your reports. The report form has a multi-step layout. The steps do not need to be completed in succession and can be skipped over by clicking a step name.
The Reports page allows you to view, create, and update your reports. The report form has a multi-step layout. The steps do not need to be completed in succession and can be skipped over by clicking a step name.
1. Click **+ Create a new report**.
1. Select report dashboard.
- **Source dashboard:** Select the dashboard from which you want to generate the report.
- **Time range:** (optional) Use custom time range for the report. For more information, refer to [Report time range]({{< relref "#report-time-range" >}}).
@@ -68,6 +73,14 @@ Only organization administrators can create reports by default. You can customiz
- **Send test email:** To verify that the configuration works as expected. You can choose to send this email to the recipients configured for the report, or to a different set of email addresses only used for testing.
1. Preview and save the report.
### Save as draft
{{% admonition type="note" %}}
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 9.1.0 and later and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
{{% /admonition %}}
You can save a report as a draft at any point during the report creation or update process. You can save a report as a draft even if it's missing required fields. Also, the report won't be sent according to its schedule while it's a draft.
### Choose template variables
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.5 and later behind the `reportVariables` feature flag, Grafana Enterprise version 8.0 and later without a feature flag, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
@@ -183,7 +196,7 @@ You can generate and save PDF files of any dashboard.
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 6.7 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
1. In the upper-right corner of the dashboard that you want to export as PDF, click the **Share dashboard** icon.
1. In the dashboard that you want to export as PDF, click the **Share dashboard** icon.
1. On the PDF tab, select a layout option for the exported dashboard: **Portrait** or **Landscape**.
1. Click **Save as PDF** to render the dashboard as a PDF file.
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.2 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
You can configure organization-wide report settings in the **Settings**tab on the **Reporting** page. Settings are applied to all the reports for current organization.
You can configure organization-wide report settings in the **Settings**under **Dashboards > Reporting**. Settings are applied to all the reports for current organization.
> **Caution:** Making your dashboard public could result in a large number of queries to the datasources used by your dashboard.
This feature is experimental.
{{% /admonition %}}
> **Caution:** Making your dashboard public could result in a large number of queries to the data sources used by your dashboard.
> This can be mitigated by utilizing the enterprise [caching](https://grafana.com/docs/grafana/latest/enterprise/query-caching/) and/or rate limiting features.
Public dashboards allow you to share your Grafana dashboard with anyone. This is useful when you want to expose your
@@ -20,7 +24,7 @@ dashboard to the world.
- Anyone with the URL can access the dashboard.
- Public dashboards are read-only.
- Arbitrary queries **cannot** be run against your datasources through public dashboards. Public dashboards can only execute the
- Arbitrary queries **cannot** be run against your datasources through public dashboards. Public dashboards can only execute the
queries stored on the original dashboard.
## Enable the feature
@@ -66,21 +70,16 @@ The link no longer works. You must create a new public URL as in [Make a dashboa
## Email sharing
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud).
{{% admonition type="note" %}}
This feature is experimental in [Grafana Cloud Pro and Advanced](/docs/grafana-cloud). The feature will have a cost by active users after being promoted into general availability.
Please contact support to have the feature enabled.
{{% /admonition %}}
Email sharing allows you to share your public dashboard with only specific people via email, instead of having it accessible to anyone with the URL.
### Enable email sharing
> **Note:** For Grafana Cloud, contact support to have the feature enabled.
Add the `publicDashboardsEmailSharing` feature toggle to your `custom.ini` file.
```
[feature_toggles]
publicDashboardsEmailSharing = true
```
### Invite a viewer
1. Click the sharing icon to the right of the dashboard title.
@@ -158,7 +157,7 @@ guaranteed because plugin developers can override this functionality. The follow
### Unconfirmed:
> **Note:** If you've confirmed one of these datasources work with public dashboards, let us know in our [Github](https://github.com/grafana/grafana/discussions/49253) discussion, and we'll mark it as confirmed!
> **Note:** If you've confirmed one of these datasources work with public dashboards, let us know in our [Github](https://github.com/grafana/grafana/discussions/49253) discussion, and we'll mark it as confirmed!
<table>
<tr>
@@ -220,14 +219,14 @@ guaranteed because plugin developers can override this functionality. The follow
## Limitations
- Panels that use frontend datasources will fail to fetch data.
- Panels that use frontend datasources will fail to fetch data.
- Template variables are currently not supported, but are planned to be in the future.
- Exemplars will be omitted from the panel.
- Only annotations that query the `-- Grafana --` datasource are supported.
- Only annotations that query the `-- Grafana --` datasource are supported.
- Organization annotations are not supported.
- Grafana Live and real-time event streams are not supported.
- Library panels are currently not supported, but are planned to be in the future.
- Datasources using Reverse Proxy functionality are not supported.
- Datasources using Reverse Proxy functionality are not supported.
We are excited to share this enhancement with you and we’d love your feedback! Please check out the [Github](https://github.com/grafana/grafana/discussions/49253) discussion and join the conversation.
@@ -48,14 +48,18 @@ Folders help you organize and group dashboards, which is useful when you have ma
**To create a dashboard folder:**
1. Sign in to Grafana and on the side menu, click **Dashboards > New folder**.
1. Sign in to Grafana.
1. Click **Dashboards** in the left-side menu.
1. On the Dashboards page, click **New** and select **New folder** in the dropdown.
1. Enter a unique name and click **Create**.
Do not use the name of a folder that has already been provisioned (such as "General") and avoid special characters (except underscores and hyphens).
When you save a dashboard, you can either select a folder for the dashboard to be saved in or create a new folder.
## Manage dashboards
On the **Manage dashboards and folders** page, you can:
On the Dashboards page, you can:
- create a folder
- create a dashboard
@@ -65,17 +69,17 @@ On the **Manage dashboards and folders** page, you can:
### Dashboard folder page
You can complete the following tasks on the **Dashboard Folder** page:
You can complete the following tasks on a dashboard folder page:
- Move or delete dashboards in a folder
- Rename a folder (available under the **Settings** tab)
- Rename a folder (available on the Settings tab)
- Assign permissions to folders (which are inherited by the dashboards in the folder)
To navigate to the dashboard folder page, click the cog appears when you hover over a folder in the dashboard search result list or the **Manage dashboards and folders** page.
To navigate to the dashboard folder page, hover over the name of the folder and click **Go to folder** in the dashboard search result list or on the Dashboards page.
### Dashboard permissions
You can assign permissions to a folder. Any permissions you assign are inherited by the dashboards in the folder. An Access Control List (ACL) is used where **Organization Role**, **Team** and a **User** can be assigned permissions.
You can assign permissions to a folder. Any permissions you assign are inherited by the dashboards in the folder. An Access Control List (ACL) is used where **Organization Role**, **Team**, and a **User** can be assigned permissions.
For more information about dashboard permissions, refer to [Dashboard permissions]({{< relref "../../administration/roles-and-permissions/#dashboard-permissions" >}}).
@@ -87,10 +91,11 @@ You can use the Grafana UI or the [HTTP API]({{< relref "../../developers/http_a
The dashboard export action creates a Grafana JSON file that contains everything you need, including layout, variables, styles, data sources, queries, and so on, so that you can later import the dashboard.
1. Click **Dashboards** in the left-side menu.
1. Open the dashboard you want to export.
2. Click the **Share** icon.
3. Click **Export**.
4. Click **Save to file**.
1. Click the **Share** icon.
1. Click **Export**.
1. Click **Save to file**.
Grafana downloads a JSON file to your local machine.
@@ -102,7 +107,8 @@ A template variable of the type `Constant` will automatically be hidden in the d
### Import a dashboard
1. Click **Dashboards > Import** in the side menu.
1. Click **Dashboards** in the left-side menu.
1. Click **New** and select **Import** in the dropdown menu.
1. Perform one of the following steps:
- Upload a dashboard JSON file
@@ -118,7 +124,7 @@ The import process enables you to change the name of the dashboard, pick the dat
Find dashboards for common server applications at [Grafana.com/dashboards](https://grafana.com/dashboards).
@@ -52,10 +52,11 @@ You can share a dashboard as a direct link or as a snapshot. You can also export
> **Note:** If you change a dashboard, ensure that you save the changes before sharing.
1.Navigate to the home page of your Grafana instance.
1. Click on the share icon in the top navigation.
1.Click **Dashboards** in the left-side menu.
1. Click the dashboard you want to share.
1. Click the share icon at the top of the screen.
The share dialog opens and shows the **Link** tab.
The share dialog opens and shows the Link tab.
### Share a direct link
@@ -73,7 +74,8 @@ A dashboard snapshot shares an interactive dashboard publicly. Grafana strips se
You can publish snapshots to your local instance or to [snapshots.raintank.io](http://snapshots.raintank.io). The latter is a free service provided by Grafana Labs that enables you to publish dashboard snapshots to an external Grafana instance. Anyone with the link can view it. You can set an expiration time if you want the snapshot removed after a certain time period.
1. Click **Local Snapshot**or **Publish to snapshots.raintank.io**.
1. Click the **Snapshot**tab.
1. Click **Publish to snapshots.raintank.io** or **Local Snapshot**.
Grafana generates a link of the snapshot.
@@ -91,7 +93,9 @@ You can generate and save PDF files of any dashboard.
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}).
1.In the upper-right corner of the dashboard that you want to export as PDF, click the **Share dashboard** icon.
1.Click **Dashboards** in the left-side menu.
1. Click the dashboard you want to share.
1. Click the share icon at the top of the screen.
1. On the PDF tab, select a layout option for the exported dashboard: **Portrait** or **Landscape**.
1. Click **Save as PDF** to render the dashboard as a PDF file.
@@ -101,8 +105,8 @@ You can generate and save PDF files of any dashboard.
You can share a panel as a direct link, as a snapshot, or as an embedded link. You can also create library panels using the **Share** option on any panel.
1.Click a panel title to open the panel menu.
1. Click **Share**.
1.Hover over any part of the panel to display the actions menu on the top right corner.
1. Click the menu and select **Share**.
The share dialog opens and shows the **Link** tab.
@@ -139,8 +143,8 @@ A panel snapshot shares an interactive panel publicly. Grafana strips sensitive
You can publish snapshots to your local instance or to [snapshots.raintank.io](http://snapshots.raintank.io). The latter is a free service provided by [Grafana Labs](https://grafana.com), that enables you to publish dashboard snapshots to an external Grafana instance. You can optionally set an expiration time if you want the snapshot to be removed after a certain time period.
1. In the **Share Panel** dialog, click **Snapshot** to open the tab.
1. Click **Local Snapshot** or **Publish to snapshots.raintank.io**.
1. In the **Share Panel** dialog, click **Snapshot** to go to the tab.
1. Click **Publish to snapshots.raintank.io** or **Local Snapshot**.
- **Grafana home** (1): Click the Grafana home icon to be redirected to the home page configured in the Grafana instance.
- **Dashboard title** (2): When you click the dashboard title you can search for dashboard contained in the current folder.
- **Share dashboard** (3): Use this option to share the current dashboard by link or snapshot. You can also export the dashboard definition from the share modal.
-**Add a new panel** (4): Use this option to add a panel, dashboard row, or library panel to the current dashboard.
-**Dashboard settings** (5): Use this option to change dashboard name, folder, and tags and manage variables and annotation queries. For more information about dashboard settings, refer to [Modify dashboard settings]({{< relref "../build-dashboards/modify-dashboard-settings/" >}}).
-**Time picker dropdown** (6): Click to select relative time range options and set custom absolute time ranges.
-(1) **Grafana home**: Click **Home** in the breadcrumb to be redirected to the home page configured in the Grafana instance.
-(2) **Dashboard title**: When you click the dashboard title, you can search for dashboards contained in the current folder.
-(3) **Share dashboard or panel**: Use this option to share the current dashboard or panel using a link or snapshot. You can also export the dashboard definition from the share modal.
-(4) **Add**: Use this option to add a panel, dashboard row, or library panel to the current dashboard.
-(5) **Save dashboard**: Click to save changes to your dashboard.
-(6) **Dashboard insights**: Click to view analytics about your dashboard including information about users, activity, query counts. Learn more about [dashboard analytics]({{< relref "../assess-dashboard-usage/" >}}).
- (7) **Dashboard settings**: Use this option to change dashboard name, folder, and tags and manage variables and annotation queries. Learn more about [dashboard settings]({{< relref "../build-dashboards/modify-dashboard-settings/" >}}).
- (8) **Time picker dropdown**: Click to select relative time range options and set custom absolute time ranges.
- You can change the **Timezone** and **fiscal year** settings from the time range controls by clicking the **Change time settings** button.
- Time settings are saved on a per-dashboard basis.
- **Zoom out time range** (7): Click to zoom out the time range. For more information about how to use time range controls, refer to [Common time range controls]({{< relref "#common-time-range-controls" >}}).
- **Refresh dashboard** (8): Click to immediately trigger queries and refresh dashboard data.
- **Refresh dashboard time interval** (9): Click to select a dashboard auto refresh time interval.
- **View mode** (10): Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. For more information about view mode, refer to [How to Create Kiosks to Display Dashboards on a TV](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
- **Dashboard panel** (11): The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
-(9) **Zoom out time range**: Click to zoom out the time range. Learn more about how to use [common time range controls]({{< relref "#common-time-range-controls" >}}).
-(10) **Refresh dashboard**: Click to immediately trigger queries and refresh dashboard data.
-(11) **Refresh dashboard time interval**: Click to select a dashboard auto refresh time interval.
-(12) **View mode**: Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. Learn more about view mode in our [How to Create Kiosks to Display Dashboards on a TV blog post](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
-(13) **Dashboard panel**: The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
- Library panels can be shared among many dashboards.
- To move a panel, drag the panel header to another location.
- To resize a panel, click and drag the lower right corner of the panel.
- **Graph legend** (12): Change series colors, y-axis and series visibility directly from the legend.
-**Search** (13): Click **Search** to search for dashboards by name or panel title.
- **Dashboard row** (14): A dashboard row is a logical divider within a dashboard that groups panels together.
-(14) **Graph legend**: Change series colors, y-axis and series visibility directly from the legend.
-(15) **Dashboard row**: A dashboard row is a logical divider within a dashboard that groups panels together.
- Rows can be collapsed or expanded allowing you to hide parts of the dashboard.
- Panels inside a collapsed row do not issue queries.
- Use [repeating rows]({{< relref "../build-dashboards/create-dashboard/#configure-repeating-rows" >}}) to dynamically create rows based on a template variable.
@@ -85,7 +86,7 @@ This section describes supported time units and relative ranges, the common time
Grafana supports the following time units: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `Q (quarters)` and `y (years)`.
The minus operator enables you to step back in time, relative to now. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
The minus operator enables you to step back in time, relative to the current date and time, or `now`. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
The plus operator enables you to step forward in time, relative to now. For example, you can use this feature to look at predicted data in the future.
@@ -104,13 +105,15 @@ The following table provides example relative ranges:
| This Year | `now/Y` | `now/Y` |
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
#### Note about Grafana Alerting
{{% admonition type="note" %}}
For Grafana Alerting, we do not support the following syntaxes at this time.
Grafana Alerting does not support the following syntaxes at this time:
- now+n for future timestamps.
- now-1n/n for "start of n until end of n" because this is an absolute timestamp.
{{% /admonition %}}
### Common time range controls
The dashboard and panel time controls have a common UI.
@@ -129,7 +132,7 @@ Hover your cursor over the field to see the exact time stamps in the range and t
Click the current time range to change it. You can change the current time using a _relative time range_, such as the last 15 minutes, or an _absolute time range_, such as `2020-05-14 00:00:00 to 2020-05-15 23:59:59`.
@@ -155,6 +158,32 @@ You can set an absolute time range in the following ways:
This section also displays recently used absolute ranges.
#### Semi-relative time range
{{% admonition type="note" %}}
Grafana Alerting does not support semi-relative time ranges.
{{% /admonition %}}
You can also use the absolute time range settings to set a semi-relative time range. Semi-relative time range dashboards are useful when you need to monitor the progress of something over time, but you also want to see the entire history from a starting point.
Set a semi-relative time range by setting the start time to an absolute timestamp and the end time to a “now” that is relative to the current time. For example:
**Start time:**`2023-05-01 00:00:00`
**End time:**`now`
If you wanted to track the progress of something during business hours, you could set a time range that covers the current day, but starting at 8am, like so:
**Start time:**`now/d+8h`
**End time:**`now`
This is equivalent to the **Today so far** time range preset, but it starts at 8:00am instead of 12:00am by appending +8h to the periodic start time.
Using a semi-relative time range, as time progresses, your dashboard will automatically and progressively zoom out to show more history and fewer details. At the same rate, as high data resolution decreases, historical trends over the entire time period will become more clear.
#### Zoom out (Cmd+Z or Ctrl+Z)
Click the **Zoom out** icon to view a larger time range in the dashboard or panel visualization.
@@ -45,20 +45,19 @@ To see variable settings, navigate to **Dashboard Settings > Variables**. Click
Variables can be used in titles, descriptions, text panels, and queries. Queries with text that starts with `$` are templates. Not all panels will have template queries.
The following dashboards in Grafana Play provide examples of template variables.
The following dashboards in Grafana Play provide examples of template variables:
- [Elasticsearch Metrics](https://play.grafana.org/d/z8OZC66nk/elasticsearch-8-2-0-sample-flight-data?orgId=1) - Uses ad hoc filters, global variables, and a custom variable.
- [Graphite Templated Nested](https://play.grafana.org/d/000000056/graphite-templated-nested?orgId=1) - Uses query variables, chained query variables, an interval variable, and a repeated panel.
- [Influx DB Group By Variable](https://play.grafana.org/d/000000137/influxdb-group-by-variable?orgId=1) - Query variable, panel uses the variable results to group the metric data.
- [InfluxDB Raw Query Template Var](https://play.grafana.org/d/000000083/influxdb-raw-query-template-var?orgId=1) - Uses query variables, chained query variables, and an interval variable.
- [InfluxDB Server Monitoring](https://play.grafana.org/d/AAy9r_bmk/influxdb-server-monitoring?orgId=1) - Uses query variables, chained query variables, an interval variable, and an ad hoc filter.
- [Template Redux](https://play.grafana.org/d/p-k6QtkGz/template-redux?orgId=1) - Uses query variables, chained query variables, ad hoc filters, an interval variable, a text box variable, a custom variable, and a data source variable.
- [Graphite Templated Nested](https://play.grafana.org/d/000000056/templated-dynamic-dashboard?orgId=1&var-app=backend&var-server=backend_01&var-server=backend_02&var-server=backend_03&var-server=backend_04&var-interval=1h) - Uses query variables, chained query variables, an interval variable, and a repeated panel.
- [Global variables and interpolation](https://play.grafana.org/d/HYaGDGIMk/templating-global-variables-and-interpolation?orgId=1&var-Server=A%27A%22A&var-Server=BB%5CB)
- [Elasticsearch Dummy Flight Data](https://play.grafana.org/d/z8OZC66nk/elasticsearch-8-2-0-sample-flight-data?orgId=1&var-Filters=Carrier%7C%3D%7CLogstash%20Airways&var-query0=) - Uses ad hoc filters.
- [Templating, repeated panels](https://play.grafana.org/d/000000025/templating-repeated-panels?orgId=1) - Two sets of repeated panels use query variables.
- [Templating showcase](https://play.grafana.org/d/000000091/templating-showcase?orgId=1) - Uses custom, query, chained query, and data source variables.
- [Templating value groups](https://play.grafana.org/d/000000024/templating-value-groups?orgId=1) - Uses query variable with value groups.
- [Template Redux](https://play.grafana.org/d/p-k6QtkGz/template-redux?orgId=1) - Uses query variables, chained query variables, an interval variable, a text box variable, a custom variable, and a data source variable.
- Variable drop-down lists are displayed in the order they are listed in the variable list in Dashboard settings.
- Put the variables that you will change often at the top, so they will be shown first (far left on the dashboard).
- By default, variables don't have a default value. This means that the topmost value in the drop-down is always preselected. If you want to pre-populate a variable with an empty value, you can use the following workaround in the variable settings:
1. Select the **Include All Option** checkbox.
2. In the **Custom all value** field, enter a value like `+`.
| Query | Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on. [Add a query variable]({{< relref "#add-a-query-variable" >}}). |
| Custom | Define the variable options manually using a comma-separated list. [Add a custom variable]({{< relref "#add-a-custom-variable" >}}). |
| Text box | Display a free text input field with an optional default value. [Add a text box variable]({{< relref "#add-a-text-box-variable" >}}). |
| Constant | Define a hidden constant. [Add a constant variable]({{< relref "#add-a-constant-variable" >}}). |
| Data source | Quickly change the data source for an entire dashboard. [Add a data source variable]({{< relref "#add-a-data-source-variable" >}}). |
| Interval | Interval variables represent time spans. [Add an interval variable]({{< relref "#add-an-interval-variable" >}}). |
| Ad hoc filters | Key/value filters that are automatically added to all metric queries for a data source (InfluxDB, Prometheus, and Elasticsearch only). [Add ad hoc filters]({{< relref "#add-ad-hoc-filters" >}}). |
| Global variables | Built-in variables that can be used in expressions in the query editor. Refer to [Global variables]({{< relref "#global-variables" >}}). |
| Chained variables | Variable queries can contain other variables. Refer to [Chained variables]({{< relref "#chained-variables" >}}). |
| Query | Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on. [Add a query variable]({{< relref "#add-a-query-variable" >}}). |
| Custom | Define the variable options manually using a comma-separated list. [Add a custom variable]({{< relref "#add-a-custom-variable" >}}). |
| Text box | Display a free text input field with an optional default value. [Add a text box variable]({{< relref "#add-a-text-box-variable" >}}). |
| Constant | Define a hidden constant. [Add a constant variable]({{< relref "#add-a-constant-variable" >}}). |
| Data source | Quickly change the data source for an entire dashboard. [Add a data source variable]({{< relref "#add-a-data-source-variable" >}}). |
| Interval | Interval variables represent time spans. [Add an interval variable]({{< relref "#add-an-interval-variable" >}}). |
| Ad hoc filters | Key/value filters that are automatically added to all metric queries for a data source (Prometheus, Loki, InfluxDB, and Elasticsearch only). [Add ad hoc filters]({{< relref "#add-ad-hoc-filters" >}}). |
| Global variables | Built-in variables that can be used in expressions in the query editor. Refer to [Global variables]({{< relref "#global-variables" >}}). |
| Chained variables | Variable queries can contain other variables. Refer to [Chained variables]({{< relref "#chained-variables" >}}). |
## Enter General options
You must enter general options for any type of variable that you create.
1. Navigate to the dashboard you want to make a variable for and click the **Dashboard settings** (gear) icon at the top of the page.
1. On the **Variables** tab, click **New**.
1. On the **Variables** tab, click **New variable**.
1. Enter a **Name** for the variable.
1. In the **Type** list, select **Query**.
1. (Optional) In **Label**, enter the display name of the variable dropdown.
@@ -87,9 +87,10 @@ Query expressions can contain references to other variables and in effect create
1. In the **Data source** list, select the target data source for the query. For more information about data sources, refer to [Add a data source]({{< relref "../../../administration/data-source-management#add-a-data-source" >}}).
1. In the **Refresh** list, select when the variable should update options.
- **On Dashboard Load:** Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized.
- **On Time Range Change:** Queries the data source when the dashboard time range changes. Only use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
- **On Time Range Change:** Queries the data source every time the dashboard loads and when the dashboard time range changes. Use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
1. In the **Query** field, enter a query.
- The query field varies according to your data source. Some data sources have custom query editors.
- Make sure that the query returns values named `__text` and `__value` as appropriate in your query syntax. For example, in SQL, you can use a query such as `SELECT hostname AS __text, id AS __value FROM MyTable`. Queries for other languages will vary depending on syntax.
- If you need more room in a single input field query editor, then hover your cursor over the lines in the lower right corner of the field and drag downward to expand.
1. (Optional) In the **Regex** field, type a regex expression to filter or capture specific parts of the names returned by your data source query. To see examples, refer to [Filter variables with regex]({{< relref "#filter-variables-with-regex" >}}).
1. In the **Sort** list, select the sort order for values to be displayed in the dropdown list. The default option, **Disabled**, means that the order of options returned by your data source query will be used.
@@ -194,7 +195,7 @@ Ad hoc filters are one of the most complex and flexible variable options availab
Interpolating a variable with multiple values selected is tricky as it is not straight forward how to format the multiple values into a string that is valid in the given context where the variable is used. Grafana tries to solve this by allowing each data source plugin to inform the templating interpolation engine what format to use for multiple values.
> **Note:** The **Custom all value** option on the variable must be blank for Grafana to format all values into a single string. If leave it blank, then the Grafana concatenates (adds together) all the values in the query. Something like `value1,value2,value3`. If a custom `all` value is used, then instead the value will be something like `*` or `all`.
> **Note:** The **Custom all value** option on the variable must be blank for Grafana to format all values into a single string. If it is left blank, then Grafana concatenates (adds together) all the values in the query. Something like `value1,value2,value3`. If a custom `all` value is used, then instead the value will be something like `*` or `all`.
#### Multi-value variables with a Graphite data source
@@ -247,13 +248,13 @@ Grafana has two built-in time range variables: `$__from` and `$__to`. They are c
> **Note:** This special formatting syntax is only available in Grafana 7.1.2+
| `${__from:date:YYYY-MM}` | 2020-07 | Any custom [date format](https://momentjs.com/docs/#/displaying/) that does not include the `:` character. Uses browser time. Use `:date` or `:date:iso` for UTC |
The syntax above also works with `${__to}`.
@@ -281,6 +282,8 @@ This variable is the `$__interval` variable in milliseconds, not a time interval
This variable is only available in the Singlestat panel and can be used in the prefix or suffix fields on the Options tab. The variable will be replaced with the series name or alias.
> **Note:** The Singlestat panel is no longer available from Grafana 8.0.
### $\_\_org
This variable is the ID of the current organization.
@@ -326,7 +329,7 @@ Extremely complex linked templated dashboards are possible, 5 or 10 levels deep.
The following Grafana Play dashboards contain fairly simple chained variables, only two layers deep. To view the variables and their settings, click **Dashboard settings** (gear icon) and then click **Variables**. Both examples are expanded in the following section.
In this example, you have several data centers. Each data center has a different subset of hosts. It is based on the [InfluxDB Templated](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1).
In this example, you have several data centers. Each data center has a different subset of hosts. It is based on the [InfluxDB Templated](https://play.grafana.org/d/e7bad3ef-db0c-4bbd-8245-b85c0b2ca2b9/influx-2-73a-hourly-electric-grid-monitor-for-us?orgId=1&refresh=1m) dashboard.
In this example, when the user changes the value of the `datacenter` variable, it changes the dropdown options returned by the `host` variable. The `host` variable uses the **Multi-value** option and **Include all option**, allowing users to select some or all options presented at any time. The `datacenter` does not use either option, so you can only select one data center at a time.
@@ -407,7 +410,7 @@ In this example, when the user changes the value of the `datacenter` variable, i
The query for this variable basically says, "Give me all the data centers that exist."
```
SHOW TAG VALUES WITH KEY = "datacenter"
SHOW TAG VALUES WITH KEY = "datacenter"
```
The values returned are `America`, `Africa`, `Asia`, and `Europe`.
@@ -567,7 +570,7 @@ demo.robustperception.io:9100
Using named capture groups, you can capture separate 'text' and 'value' parts from the options returned by the variable query. This allows the variable drop-down list to contain a friendly name for each value that can be selected.
For example, when querying the `node_hwmon_chip_names` Prometheus metric, the `chip_name` is a lot friendlier that the `chip` value. So the following variable query result:
For example, when querying the `node_hwmon_chip_names` Prometheus metric, the `chip_name` is a lot friendlier than the `chip` value. So the following variable query result:
@@ -22,7 +22,7 @@ Panel titles and metric queries can refer to variables using two different synta
This syntax is easy to read, but it does not allow you to use a variable in the middle of a word.
**Example:** apps.frontend.$server.requests.count
-`${var_name}` Use this syntax when you want to interpolate a variable in the middle of an expression.
-`${var_name:<format>}` This format gives you more control over how Grafana interpolates values. Refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options/" >}}) for more detail on all the formatting types.
-`${var_name:<format>}` This format gives you more control over how Grafana interpolates values. Refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options" >}}) for more detail on all the formatting types.
-`[[varname]]` Do not use. Deprecated old syntax, will be removed in a future release.
Before queries are sent to your data source the query is _interpolated_, meaning the variable is replaced with its current value. During
@@ -30,7 +30,7 @@ interpolation, the variable value might be _escaped_ in order to conform to the
For example, a variable used in a regex expression in an InfluxDB or Prometheus query will be regex escaped. Read the data source specific
documentation topic for details on value escaping during interpolation.
For advanced syntax to override data source default formatting, refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options/" >}}).
For advanced syntax to override data source default formatting, refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options" >}}).
@@ -29,7 +24,7 @@ After you add and configure a data source, you can use it as an input for many o
This documentation describes how to manage data sources in general,
and how to configure or query the built-in data sources.
For other data sources, refer to the list of [datasource plugins](/grafana/plugins/).
To develop a custom plugin, refer to [Build a plugin]({{< relref "../developers/plugins/" >}}).
To develop a custom plugin, refer to [Build a plugin](https://grafana.com/developers/plugin-tools).
## Manage data sources
@@ -52,7 +47,7 @@ For example, this video demonstrates the visual Prometheus query builder:
{{< vimeo 720004179 >}}
For general information about querying in Grafana, and common options and user interface elements across all query editors, refer to [Query and transform data]({{< relref "../panels-visualizations/query-transform-data/" >}}).
For general information about querying in Grafana, and common options and user interface elements across all query editors, refer to [Query and transform data]({{< relref "../panels-visualizations/query-transform-data" >}}).
| **Name**| Sets the name you use to refer to the data source |
| **Default** | Sets whether the data source is pre-selected for new panels and queries |
| **Alertmanager** | |
| **Implementation** | Alertmanager implementation. **Mimir**, **Cortex,** and **Prometheus** are supported |
| **Receive Grafana Alerts** | When enabled the Alertmanager receives alert instances from Grafana-managed alert rules. **Important:** It works only if Grafana alerting is configured to send its alert instances to external Alertmanagers |
| **HTTP** | |
| **URL** | Sets the HTTP protocol, IP, and port of your Alertmanager instance, such as `https://alertmanager.example.org:9093` |
| **Access** | Only **Server** access mode is functional |
| | |
1. Set the data source's basic configuration options:
| **Name** | Sets the name you use to refer to the data source |
| **Default** | Sets whether the data source is pre-selected for new panels and queries |
| **Alertmanager Implementation** | Alertmanager implementation. **Mimir**, **Cortex,** and **Prometheus** are supported |
| **Receive Grafana Alerts** | When enabled the Alertmanager receives alert instances from Grafana-managed alert rules. **Important:** It works only if Grafana alerting is configured to send its alert instances to external Alertmanagers |
| **HTTP URL** | Sets the HTTP protocol, IP, and port of your Alertmanager instance, such as `https://alertmanager.example.org:9093` |
| **Access** | Only **Server** access mode is functional |
@@ -31,11 +31,12 @@ Once you've added the data source, you can [configure it]({{< relref "#configure
## Configure the data source
**To access the data source configuration page:**
1. Click **Connections** in the left-side menu.
1. Under Your connections, click **Data sources**.
1. Enter `CloudWatch` in the search bar.
1. Click **CloudWatch**.
1. Hover the cursor over the **Configuration** (gear) icon.
1. Select **Data Sources**.
1. Select the CloudWatch data source.
The **Settings** tab of the data source is displayed.
### Configure AWS authentication
@@ -375,3 +376,7 @@ For more information, refer to the AWS documentation for [Service Quotas](https:
The CloudWatch plugin enables you to monitor and troubleshoot applications across multiple regional accounts. Using cross-account observability, you can seamlessly search, visualize and analyze metrics and logs without worrying about account boundaries.
To use this feature, configure in the [AWS console under Cloudwatch Settings](https://aws.amazon.com/blogs/aws/new-amazon-cloudwatch-cross-account-observability/), a monitoring and source account, and then add the necessary IAM permissions as described above.
## CloudWatch Logs data protection
CloudWatch Logs can safeguard data by using log group data protection policies. If you have data protection enabled for a log group, then any sensitive data that matches the data identifiers you've selected will be masked. In order to view masked data you will need to have the `logs:Unmask` IAM permission enabled. See the AWS documentation on how to [help protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html) to learn more about this.
@@ -58,6 +58,9 @@ For more information, refer to [Azure documentation for role assignments](https:
If you host Grafana in Azure, such as in App Service or Azure Virtual Machines, you can configure the Azure Monitor data source to use Managed Identity for secure authentication without entering credentials into Grafana.
For details, refer to [Configuring using Managed Identity]({{< relref "#configuring-using-managed-identity" >}}).
You can configure the Azure Monitor data source to use Workload Identity for secure authentication without entering credentials into Grafana if you host Grafana in a Kubernetes environment, such as AKS, and require access to Azure resources.
For details, refer to [Configuring using Workload Identity](#configuring-using-workload-identity).
| **Authentication** | Enables Managed Identity. Selecting Managed Identity hides many of the other fields. For details, see [Configuring using Managed Identity](#configuring-using-managed-identity). |
If you host Grafana in Azure, such as an App Service or with Azure Virtual Machines, and have managed identity enabled on your VM, you can use managed identity to configure Azure Monitor in Grafana.
This lets you securely authenticate data sources without manually configuring credentials via Azure AD App Registrations for each.
You can use managed identity to configure Azure Monitor in Grafana if you host Grafana in Azure (such as an App Service or with Azure Virtual Machines) and have managed identity enabled on your VM.
This lets you securely authenticate data sources without manually configuring credentials via Azure AD App Registrations.
For details on Azure managed identities, refer to the [Azure documentation](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview).
**To enable managed identity for Grafana:**
@@ -136,7 +154,46 @@ For details on Azure managed identities, refer to the [Azure documentation](http
This hides the directory ID, application ID, and client secret fields, and the data source uses managed identity to authenticate to Azure Monitor Metrics and Logs, and Azure Resource Graph.
3. You can set the `managed_identity_client_id` field in the `[azure]` section of the [Grafana server configuration][configure-grafana-azure] to allow a user-assigned managed identity to be used instead of the default system-assigned identity.
You can use workload identity to configure Azure Monitor in Grafana if you host Grafana in a Kubernetes environment, such as AKS, in conjunction with managed identities.
This lets you securely authenticate data sources without manually configuring credentials via Azure AD App Registrations.
For details on workload identity, refer to the [Azure workload identity documentation](https://azure.github.io/azure-workload-identity/docs/).
**To enable workload identity for Grafana:**
1. Set the `workload_identity_enabled` flag in the `[azure]` section of the [Grafana server configuration][configure-grafana-azure].
```ini
[azure]
workload_identity_enabled = true
```
2. In the Azure Monitor data source configuration, set **Authentication** to **Workload Identity**.
This hides the directory ID, application ID, and client secret fields, and the data source uses workload identity to authenticate to Azure Monitor Metrics and Logs, and Azure Resource Graph.
3. There are additional configuration variables that can control the authentication method.`workload_identity_tenant_id` represents the Azure AD tenant that contains the managed identity, `workload_identity_client_id` represents the client ID of the managed identity if it differs from the default client ID, `workload_identity_token_file` represents the path to the token file. Refer to the [documentation](https://azure.github.io/azure-workload-identity/docs/) for more information on what values these variables should use, if any.
@@ -129,6 +129,11 @@ The Azure documentation includes resources to help you learn KQL:
- [Tutorial: Use Kusto queries in Azure Monitor](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/tutorial?pivots=azuremonitor)
- [SQL to Kusto cheat sheet](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/sqlcheatsheet)
> **Implicit dashboard time range usage:** As of Grafana v9.4.12 and v10.0, all Azure Monitor Logs queries
> will use the specified dashboard or Explore time range by default.
> Any query making use of a time range explicitly specified in the query body will have their query
> executed against the intersection of the two time ranges. For more details on this change, refer to the [Azure Monitor Logs API documentation](https://learn.microsoft.com/en-us/rest/api/loganalytics/dataaccess/query/get?tabs=HTTP#uri-parameters).
This example query returns a virtual machine's CPU performance, averaged over 5ms time grains:
@@ -134,7 +134,7 @@ The default values for "cloud monitoring auto" are:
The other automatic option is "grafana auto", which automatically sets the Group By time depending on the time range chosen and width of the time series panel.
For more information about "grafana auto", refer to [Interval variable]({{< relref "../../../dashboards/variables/add-template-variables/#add-an-interval-variable" >}}).
For more information about "grafana auto", refer to [Interval variable]({{< relref "../../../dashboards/variables/add-template-variables#add-an-interval-variable" >}}).
You can also choose fixed time intervals to group by, like `1h` or `1d`.
This topic explains options, variables, querying, and other features specific to the InfluxDB data source, which include its [feature-rich code editor for queries and visual query builder]({{< relref "./query-editor/" >}}).
@@ -41,14 +41,13 @@ To configure basic settings for the data source, complete the following steps:
1. Set the data source's basic configuration options carefully:
| **Name** | Sets the name you use to refer to the data source in panels and queries. We recommend something like `InfluxDB-InfluxQL`. |
| **Default** | Sets whether the data source is pre-selected for new panels. |
| **URL** | The HTTP protocol, IP address, and port of your InfluxDB API. InfluxDB's default API port is 8086. |
| **Min time interval** | _(Optional)_ Refer to [Min time interval]({{< relref "#configure-min-time-interval" >}}). |
| **Max series** | _(Optional)_ Limits the number of series and tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have many small time series and not all are shown. Defaults to 1,000. |
| **Name** | Sets the name you use to refer to the data source in panels and queries. We recommend something like `InfluxDB-InfluxQL`. |
| **Default** | Sets whether the data source is pre-selected for new panels. |
| **URL** | The HTTP protocol, IP address, and port of your InfluxDB API. InfluxDB's default API port is 8086. |
| **Min time interval** | _(Optional)_ Refer to [Min time interval]({{< relref "#configure-min-time-interval" >}}). |
| **Max series** | _(Optional)_ Limits the number of series and tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have many small time series and not all are shown. Defaults to 1,000. |
You can also configure settings specific to the InfluxDB data source. These options are described in the sections below.
The Loki data source's query editor helps you create [log]({{< relref "#create-a-logs-query" >}}) and [metric]({{< relref "#create-a-metrics-query" >}}) queries that use Loki's query language, [LogQL](/docs/loki/latest/logql/).
The Loki data source's query editor helps you create [log]({{< relref "#create-a-log-query" >}}) and [metric]({{< relref "#create-a-metric-query" >}}) queries that use Loki's query language, [LogQL](/docs/loki/latest/logql/).
This topic explains querying specific to the Loki data source.
For general documentation on querying data sources in Grafana, see [Query and transform data]({{< relref "../../../panels-visualizations/query-transform-data" >}}).
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.