Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0d9d392834 | |||
| 66f32f6e08 |
+2
-1
@@ -7064,7 +7064,8 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "19"]
|
||||
],
|
||||
"public/app/plugins/datasource/graphite/gfunc.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
|
||||
@@ -1,33 +1,3 @@
|
||||
<!-- 11.6.4 START -->
|
||||
|
||||
# 11.6.4 (2025-07-23)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Dependencies:** Bump github.com/go-viper/mapstructure/v2 from 2.2.1 to 2.3.0 [#107555](https://github.com/grafana/grafana/pull/107555), [@macabu](https://github.com/macabu)
|
||||
- **StateTimeline:** Add endTime to tooltip [#107605](https://github.com/grafana/grafana/pull/107605), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Unified storage:** Respect GF_DATABASE_URL override [#107573](https://github.com/grafana/grafana/pull/107573), [@pstibrany](https://github.com/pstibrany)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix group interval override when adding new rules [#107496](https://github.com/grafana/grafana/pull/107496), [@konrad147](https://github.com/konrad147)
|
||||
- **Azure:** Fix legend formatting [#106934](https://github.com/grafana/grafana/pull/106934), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Azure:** Fix resource name determination in template variable queries [#106939](https://github.com/grafana/grafana/pull/106939), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Graphite:** Fix annotation queries [#106940](https://github.com/grafana/grafana/pull/106940), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Graphite:** Fix date mutation [#107523](https://github.com/grafana/grafana/pull/107523), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Graphite:** Fix nested variable interpolation for repeated rows [#107564](https://github.com/grafana/grafana/pull/107564), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Security:** Fixes for CVE-2025-6197 and CVE-2025-6023 [#108281](https://github.com/grafana/grafana/pull/108281), [@volcanonoodle](https://github.com/volcanonoodle)
|
||||
|
||||
<!-- 11.6.4 END -->
|
||||
<!-- 11.6.3 START -->
|
||||
|
||||
# 11.6.3 (2025-06-17)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Security:** Fixes CVE-2025-3415
|
||||
|
||||
<!-- 11.6.3 END -->
|
||||
<!-- 11.6.2 START -->
|
||||
|
||||
# 11.6.2 (2025-05-22)
|
||||
|
||||
@@ -24,7 +24,6 @@ require (
|
||||
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
||||
github.com/go-openapi/jsonreference v0.21.0 // indirect
|
||||
github.com/go-openapi/swag v0.23.0 // indirect
|
||||
github.com/go-viper/mapstructure/v2 v2.3.0 // indirect
|
||||
github.com/gogo/protobuf v1.3.2 // indirect
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
github.com/google/gnostic-models v0.6.8 // indirect
|
||||
|
||||
@@ -35,8 +35,6 @@ github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1v
|
||||
github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
|
||||
github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
|
||||
github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
|
||||
github.com/go-viper/mapstructure/v2 v2.3.0 h1:27XbWsHIqhbdR5TIC911OfYvgSaW93HM+dX7970Q7jk=
|
||||
github.com/go-viper/mapstructure/v2 v2.3.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
|
||||
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
|
||||
github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q=
|
||||
github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
|
||||
|
||||
@@ -31,9 +31,9 @@ You can configure data source permissions to allow or deny certain users the abi
|
||||
- The `edit` permission allows users to query the data source, edit the data source’s configuration and delete the data source.
|
||||
- The `admin` permission allows users to query and edit the data source, change permissions on the data source and enable or disable query caching for the data source.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
By default, data sources in an organization can be queried by any user in that organization. For example, a user with the `Viewer` role can issue any possible query to a data source, not just queries that exist on dashboards to which they have access. Additionally, by default, data sources can be edited by the user who created the data source, as well as users with the `Admin` role.
|
||||
|
||||
@@ -82,15 +82,15 @@ When using Grafana, a query pertains to a request for data frames to be modified
|
||||
|
||||
The caching feature works for **all** backend data sources. You can enable the cache globally in Grafana's [configuration](../../setup-grafana/configure-grafana/enterprise-configuration/#caching), and configure a cache duration (also called Time to Live, or TTL) for each data source individually.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud/).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
The following cache backend options are available: in-memory, Redis, and Memcached.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Storing cached queries in-memory can increase Grafana's memory footprint. In production environments, a Redis or Memcached backend is highly recommended.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
When a panel queries a data source with cached data, it will either fetch fresh data or use cached data depending on the panel's **interval.** The interval is used to round the query time range to a nearby cached time range, increasing the likelihood of cache hits. Therefore, wider panels and dashboards with shorter time ranges fetch new data more often than narrower panels and dashboards with longer time ranges.
|
||||
|
||||
@@ -110,15 +110,15 @@ By reducing the number of queries and requests sent to data sources, caching can
|
||||
|
||||
Query caching works for Grafana's [built-in data sources](../../datasources/#built-in-core-data-sources), and [backend data source plugins](https://grafana.com/grafana/plugins/?type=datasource) that extend the `DataSourceWithBackend` class in the plugins SDK.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Logs Insights for the CloudWatch data source does not support query caching due to the way logs are requested from AWS.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To verify that a data source works with query caching, follow the [instructions below](#enable-and-configure-query-caching) to **Enable and Configure query caching**. If caching is enabled in Grafana but the Caching tab is not visible for the given data source, then query caching is not available for that data source.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Some data sources, such as Elasticsearch, Prometheus, and Loki, cache queries themselves, so Grafana _query_ caching does not significantly improve performance. However, _resource_ caching may help. Refer to [plugin resources](https://grafana.com/developers/plugin-tools/key-concepts/backend-plugins/) for details.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Enable and configure query caching
|
||||
|
||||
@@ -137,9 +137,9 @@ You can optionally override a data source's configured TTL for individual dashbo
|
||||
|
||||
{{< figure max-width="500px" src="/media/docs/grafana/per-panel-cache-ttl-9-4.png" caption="Set Cache TTL for a single panel" >}}
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If query caching is enabled and the Cache tab is not visible in a data source's settings, then query caching is not available for that data source.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To configure global settings for query caching, refer to the `caching` section of [Configure Grafana Enterprise](../../setup-grafana/configure-grafana/enterprise-configuration/#caching).
|
||||
|
||||
@@ -158,9 +158,9 @@ To disable query caching for an entire Grafana instance, set the `enabled` flag
|
||||
|
||||
If you experience performance issues or repeated queries become slower to execute, consider clearing your cache.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
This action impacts all cache-enabled data sources. If you are using Memcached, the system clears all data from the Memcached instance.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your Connections, click **Data sources**.
|
||||
|
||||
@@ -29,9 +29,9 @@ LBAC for data sources is currently generally available for `Loki` and in **exper
|
||||
| Loki | GA | GA |
|
||||
| Prometheus | PrivatePreview | PrivatePreview |
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
For enterprise this feature requires Grafana Enterprise Metrics (GEM) or Grafana Enterprise Logs (GEL) to function.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**LBAC for data sources offers:**
|
||||
|
||||
|
||||
@@ -52,13 +52,13 @@ To download your Grafana Enterprise license:
|
||||
|
||||
You must install a Grafana Enterprise build to use the enterprise features, which you can [download](https://grafana.com/grafana/download?edition=enterprise).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
If you already use Grafana OSS, you can replace it with the same version of Grafana Enterprise.
|
||||
Ensure that you back up the configuration and database before proceeding.
|
||||
For more information, refer to [Back up Grafana](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/back-up-grafana/).
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
There is more than one way to add the license to a Grafana instance:
|
||||
|
||||
|
||||
@@ -158,10 +158,6 @@ The migration assistant can migrate the majority of Grafana Alerting resources t
|
||||
- Notification policy tree
|
||||
- Notification templates
|
||||
|
||||
{{< admonition type="note">}}
|
||||
The `grafana-default-email` contact point that's provisioned with every new Grafana instance doesn't have a UID by default and won't be migrated unless you edit or update and save it. You do not need to change the contact point for a UID to be generated when saved.
|
||||
{{< /admonition >}}
|
||||
|
||||
This is sufficient to have your Alerting configuration up and running in Grafana Cloud with minimal effort.
|
||||
|
||||
Migration of Silences is not supported by the migration assistant and needs to be configured manually. Alert History is also not available for migration.
|
||||
|
||||
@@ -88,9 +88,9 @@ For more information about adding users to an organization, refer to [Add a user
|
||||
|
||||
This action permanently removes an organization from your Grafana server.
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
Deleting the organization also deletes all teams and dashboards associated the organization.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Before you begin
|
||||
|
||||
|
||||
@@ -202,9 +202,9 @@ Users with the Grafana Server Admin flag on their account or access to the confi
|
||||
default_home_dashboard_path = data/main-dashboard.json
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
On Linux, Grafana uses `/usr/share/grafana/public/dashboards/home.json` as the default home dashboard location.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Set the home dashboard for your organization
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ All plugins are signed under a _signature level_. The signature level determines
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Unsigned plugins are not supported in Grafana Cloud.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
We strongly recommend that you don't run unsigned plugins in your Grafana instance. However, if you're aware of the risks and you still want to load an unsigned plugin, refer to [Configuration](../../setup-grafana/configure-grafana/#allow_loading_unsigned_plugins).
|
||||
|
||||
|
||||
@@ -21,15 +21,15 @@ Recorded queries allow you to see trends over time by taking a snapshot of a dat
|
||||
|
||||
For our plugins that do not return time series, it might be useful to plot historical data. For example, you might want to query ServiceNow to see a history of request response times but it can only return current point-in-time metrics.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](https://grafana.com/docs/grafana-cloud/).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## How recorded queries work
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
An administrator must configure a Prometheus data source and associate it with a [Remote write target](#remote-write-target) before recorded queries can be used.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Recorded queries only work with backend data source plugins. Refer to [Backend data source plugin](/tutorials/build-a-data-source-backend-plugin/) for more information about backend data source plugins. You can recorded four types of queries:
|
||||
|
||||
|
||||
@@ -25,17 +25,17 @@ You can assign a user one of three types of permissions:
|
||||
- Organization permissions: Manage access to dashboards, alerts, plugins, teams, playlists, and other resources for an entire organization. The available roles are Viewer, Editor, and Admin.
|
||||
- Dashboard and folder permission: Manage access to dashboards and folders
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you are running Grafana Enterprise, you can also control access to data sources and use role-based access control to grant user access to read and write permissions to specific Grafana resources. For more information about access control options available with Grafana Enterprise, refer to [Grafana Enterprise user permissions features](#grafana-enterprise-user-permissions-features).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Grafana server administrators
|
||||
|
||||
A Grafana server administrator manages server-wide settings and access to resources such as organizations, users, and licenses. Grafana includes a default server administrator that you can use to manage all of Grafana, or you can divide that responsibility among other server administrators that you create.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
The server administrator role does not mean that the user is also a Grafana [organization administrator](#organization-roles).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
A server administrator can perform the following tasks:
|
||||
|
||||
@@ -45,9 +45,9 @@ A server administrator can perform the following tasks:
|
||||
- View Grafana server statistics, including total users and active sessions
|
||||
- Upgrade the server to Grafana Enterprise.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
The server administrator role does not exist in Grafana Cloud.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To assign or remove server administrator privileges, see [Server user management](../user-management/server-user-management/assign-remove-server-admin-privileges/).
|
||||
|
||||
|
||||
@@ -102,9 +102,9 @@ refs:
|
||||
|
||||
# Role-based access control (RBAC)
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
RBAC provides a standardized way of granting, changing, and revoking access when it comes to viewing and modifying Grafana resources, such as dashboards, reports, and administrative settings.
|
||||
|
||||
@@ -151,9 +151,9 @@ Each basic role is comprised of a number of _permissions_. For example, the view
|
||||
- `Action: annotations:write, Scope: annotations:type:dashboard`: Enables the viewer to modify annotations of a dashboard.
|
||||
- `Action: annotations:delete, Scope: annotations:type:dashboard`: Enables the viewer to remove annotations from a dashboard.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
You can't have a Grafana user without a basic role assigned. The `None` role contains no permissions.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
#### Basic role modification
|
||||
|
||||
@@ -165,9 +165,9 @@ For example, if you modify Viewer basic role and grant additional permission, Ed
|
||||
For more information about the permissions associated with each basic role, refer to [Basic role definitions](ref:rbac-role-definitions-basic-role-assignments).
|
||||
To interact with the API and view or modify basic roles permissions, refer to [the table](ref:rbac-basic-role-uid-mapping) that maps basic role names to the associated UID.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
You cannot use a service account to modify basic roles via the RBAC API. To update basic roles, you must be a Grafana administrator and use basic authentication with the request.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Fixed roles
|
||||
|
||||
|
||||
+2
-2
@@ -41,9 +41,9 @@ refs:
|
||||
|
||||
# Assign RBAC roles
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
In this topic you'll learn how to use the role picker, provisioning, and the HTTP API to assign fixed and custom roles to users and teams.
|
||||
|
||||
|
||||
+2
-2
@@ -13,9 +13,9 @@ weight: 30
|
||||
|
||||
# Configure RBAC in Grafana
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
The table below describes all RBAC configuration options. Like any other Grafana configuration, you can apply these options as [environment variables](/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#override-configuration-with-environment-variables).
|
||||
|
||||
|
||||
+8
-8
@@ -72,9 +72,9 @@ refs:
|
||||
|
||||
# Manage RBAC roles
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
This section includes instructions for how to view permissions associated with roles, create custom roles, and update and delete roles.
|
||||
|
||||
@@ -255,9 +255,9 @@ roles:
|
||||
|
||||
The following examples show you how to create a custom role using the Grafana HTTP API. For more information about the HTTP API, refer to [Create a new custom role](ref:api-rbac-create-a-new-custom-role).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
You cannot create a custom role with permissions that you do not have. For example, if you only have `users:create` permissions, then you cannot create a role that includes other permissions.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
The following example creates a `custom:users:admin` role and assigns the `users:create` action to it.
|
||||
|
||||
@@ -314,9 +314,9 @@ If the default basic role definitions do not meet your requirements, you can cha
|
||||
|
||||
- Determine the permissions you want to add or remove from a basic role. For more information about the permissions associated with basic roles, refer to [RBAC role definitions](ref:rbac-fixed-basic-role-definitions-basic-role-assignments).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
You cannot modify the `No Basic Role` permissions.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**To change permissions from a basic role:**
|
||||
|
||||
@@ -371,10 +371,10 @@ roles:
|
||||
scope: 'folder:*'
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
You can add multiple `fixed`, `basic` or `custom` roles to the `from` section. Their permissions will be copied and added to the basic role.
|
||||
Make sure to **increment** the role version for the changes to be accounted for.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
You can also change basic roles' permissions using the API. Refer to the [RBAC HTTP API](ref:api-rbac-update-a-role) for more details.
|
||||
|
||||
|
||||
+8
-8
@@ -41,9 +41,9 @@ refs:
|
||||
|
||||
# Plan your RBAC rollout strategy
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
An RBAC rollout strategy helps you determine _how_ you want to implement RBAC prior to assigning RBAC roles to users and teams.
|
||||
|
||||
@@ -92,13 +92,13 @@ Consider the following guidelines when you determine if you should modify basic
|
||||
|
||||
- **Modify basic roles** when Grafana's definitions of what viewers, editors, and admins can do does not match your definition of these roles. You can add or remove permissions from any basic role.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Changes that you make to basic roles impact the role definition for all [organizations](/docs/grafana/<GRAFANA_VERSION>/administration/organization-management/) in the Grafana instance. For example, when you add the `fixed:users:writer` role's permissions to the viewer basic role, all viewers in any org in the Grafana instance can create users within that org.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
You cannot modify the `No Basic Role` permissions.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
- **Create custom roles** when fixed role definitions don't meet you permissions requirements. For example, the `fixed:dashboards:writer` role allows users to delete dashboards. If you want some users or teams to be able to create and update but not delete dashboards, you can create a custom role with a name like `custom:dashboards:creator` that lacks the `dashboards:delete` permission.
|
||||
|
||||
@@ -115,9 +115,9 @@ Use any of the following methods to assign RBAC roles to users and teams.
|
||||
|
||||
We've compiled the following permissions rollout scenarios based on current Grafana implementations.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you have a use case that you'd like to share, feel free to contribute to this docs page. We'd love to hear from you!
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Provide internal viewer employees with the ability to use Explore, but prevent external viewer contractors from using Explore
|
||||
|
||||
|
||||
+6
-6
@@ -46,9 +46,9 @@ refs:
|
||||
|
||||
# RBAC role definitions
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
The following tables list permissions associated with basic and fixed roles.
|
||||
|
||||
@@ -167,14 +167,14 @@ For more information about the permissions required to access alert rules, refer
|
||||
|
||||
### Grafana OnCall roles (beta)
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available from Grafana 9.4 in early access.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
This feature is behind the `accessControlOnCall` feature toggle.
|
||||
You can enable feature toggles through configuration file or environment variables. See configuration [docs](/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#feature_toggles) for details.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
If you are using [Grafana OnCall](ref:oncall), you can try out the integration between Grafana OnCall and RBAC.
|
||||
For a detailed list of the available OnCall RBAC roles, refer to the table in [Available Grafana OnCall RBAC roles and granted actions](ref:available-grafana-oncall-rbac-roles--granted-actions).
|
||||
|
||||
+2
-2
@@ -33,9 +33,9 @@ refs:
|
||||
|
||||
# RBAC for app plugins
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
RBAC can be used to manage access to [app plugins](https://grafana.com/docs/grafana/latest/administration/plugin-management/#app-plugins).
|
||||
Each app plugin grants the basic Viewer, Editor and Admin organization roles a default set of plugin permissions.
|
||||
|
||||
+2
-2
@@ -51,9 +51,9 @@ refs:
|
||||
|
||||
# Provisioning RBAC with Grafana
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
You can create, change or remove [Custom roles](ref:manage-rbac-roles-create-custom-roles-using-provisioning) and create or remove [basic role assignments](ref:assign-rbac-roles-assign-a-fixed-role-to-a-basic-role-using-provisioning), by adding one or more YAML configuration files in the `provisioning/access-control/` directory.
|
||||
|
||||
|
||||
+2
-2
@@ -45,9 +45,9 @@ refs:
|
||||
|
||||
# Provisioning RBAC with Terraform
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
You can create, change or remove [Custom roles](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/role) and create or remove [basic and custom role assignments](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/role_assignment), by using [Terraform's Grafana provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs).
|
||||
|
||||
|
||||
+4
-4
@@ -26,9 +26,9 @@ filters = accesscontrol:debug accesscontrol.evaluator:debug dashboard.permission
|
||||
|
||||
## Enable audit logging
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
You can enable auditing in the Grafana configuration file.
|
||||
|
||||
@@ -46,10 +46,10 @@ Learn more about [access control audit logs](/docs/grafana/<GRAFANA_VERSION>/set
|
||||
This happens when an instance is downgraded from a version that uses RBAC to a version that uses the legacy access control, and dashboard, folder or data source permissions are updated.
|
||||
These permission updates will not be applied to RBAC, so permissions will be out of sync when the instance is next upgraded to a version with RBAC.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
the steps provided below will set all dashboard, folder and data source permissions to what they are set to with the legacy access control.
|
||||
If you have made dashboard, folder or data source permission updates with RBAC enabled, these updates will be wiped.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To resynchronize the permissions:
|
||||
|
||||
|
||||
@@ -76,11 +76,11 @@ A common use case for creating a service account is to perform operations on aut
|
||||
|
||||
In [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/), you can also use service accounts in combination with [role-based access control](ref:rbac) to grant very specific permissions to applications that interact with Grafana.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="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.
|
||||
|
||||
Service accounts can't be used for instance-wide operations, such as global user management and organization management. For these tasks, you need to use a user with [Grafana server administrator permissions](ref:roles-and-permissions).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< vimeo 742056367 >}}
|
||||
|
||||
@@ -166,9 +166,9 @@ You can assign organization roles to a service account using the Grafana UI or v
|
||||
|
||||
In [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/), you can also [assign RBAC roles](ref:rbac-assign-rbac-roles) to grant very specific permissions to applications that interact with Grafana.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Since Grafana 10.2.0, the `No Basic Role` is available for organization users or service accounts. This role has no permissions. Permissions can be granted with RBAC.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Before you begin
|
||||
|
||||
@@ -235,10 +235,10 @@ To list your token's permissions, use the `/api/access-control/user/permissions`
|
||||
|
||||
#### Example
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
The following command output is shortened to show only the relevant content.
|
||||
Authorize your request with the token whose permissions you want to check.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
```bash
|
||||
curl -H "Authorization: Bearer glsa_HOruNAb7SOiCdshU9algkrq7FDsNSLAa_54e2f8be" -X GET '<grafana_url>/api/access-control/user/permissions' | jq
|
||||
|
||||
@@ -40,9 +40,9 @@ refs:
|
||||
|
||||
# Migrate API keys to service account tokens
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
API keys are deprecated. [Service accounts](ref:service-accounts) now replace API keys for authenticating with the **HTTP APIs** and interacting with Grafana.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
API keys specify a role—either **Admin**, **Editor**, or **Viewer**—that determine the permissions associated with interacting with Grafana.
|
||||
|
||||
@@ -252,9 +252,9 @@ This section shows you how to migrate your Terraform configuration for Grafana c
|
||||
|
||||
For migration your cloud stack api keys, use the `grafana_cloud_stack_service_account` and `gafana_cloud_stack_service_account_token` resources. For additional information, refer to [Grafana Cloud Stack Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/cloud_stack_service_account).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
This is only relevant for Grafana Cloud **Stack** API keys `grafana_cloud_stack_api_key`. Grafana Cloud API keys resource `grafana_cloud_api_key` are not deprecated and should be used for authentication for managing your Grafana cloud.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
#### Steps
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ When you grant folder permissions, that setting applies to all dashboards and su
|
||||
|
||||
For example, if a user with the viewer organization role requires editor (or admin) access to a dashboard, you can assign those elevated permissions on an individual basis.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you have assigned a user dashboard folder permissions, you cannot also assign the user permission to dashboards contained in the folder.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Grant dashboard permissions when you want to restrict or enhance dashboard access for users who do not have permissions defined in the associated folder.
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ Organization administrators can invite users to join their organization. Organiz
|
||||
|
||||
For more information about organization user permissions, refer to [Organization users and permissions](../../roles-and-permissions/#organization-users-and-permissions).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Users added at the organization level will have access to all stacks and services by default, without the ability to be filtered by stack unless Single Sign-On (SSO) or Role-Based Access Control (RBAC) is implemented.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< section >}}
|
||||
|
||||
@@ -40,17 +40,17 @@ You can see a list of users with accounts in your Grafana organization. If neces
|
||||
1. Sign in to Grafana as an organization administrator.
|
||||
1. Navigate to **Administration > Users and access > Users**.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also [view a global list of users](../server-user-management/#view-a-list-of-users) in the Server Admin section of Grafana.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Change a user's organization permissions
|
||||
|
||||
Update user permissions when you want to enhance or restrict a user's access to organization resources. For more information about organization permissions, refer to [Organization roles](../../roles-and-permissions/#organization-roles).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Organization roles sync from the authentication provider on user sign-in. To prevent synchronization of organization roles from the authentication provider regardless of their role in the authentication provider, then refer to the `skip_org_role_sync` setting in your Grafana configuration. Refer to [skip org role sync](../../../setup-grafana/configure-grafana/#authgrafana_com-skip_org_role_sync) for more information.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Before you begin
|
||||
|
||||
@@ -68,9 +68,9 @@ Organization roles sync from the authentication provider on user sign-in. To pre
|
||||
1. Select the role that you want to assign.
|
||||
1. Click **Update**.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also [change a user's organization permissions](../server-user-management/change-user-org-permissions/) in the Server Admin section.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Invite a user to join an organization
|
||||
|
||||
@@ -79,9 +79,9 @@ When you invite users to join an organization, you assign the **Admin**, **Edito
|
||||
- If you know that the user already has access Grafana and you know their user name, then you issue an invitation by entering their user name.
|
||||
- If the user is new to Grafana, then use their email address to issue an invitation. The system automatically creates the user account on first sign in.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also manually [add a user to an organization](../server-user-management/add-remove-user-to-org/).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Before you begin
|
||||
|
||||
@@ -116,9 +116,9 @@ If the invitee is not already a user, the system adds them.
|
||||
|
||||
Periodically review invitations you have sent so that you can see a list of users that have not yet accepted the invitation or cancel a pending invitation.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
The **Pending Invites** button is only visible if there are unanswered invitations.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Before you begin
|
||||
|
||||
|
||||
@@ -41,9 +41,9 @@ You can see a list of users with accounts on your Grafana server. This action mi
|
||||
1. Sign in to Grafana as a server administrator.
|
||||
1. Click **Administration** in the left-side menu, **Users and access**, and then **Users**.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you have [organization administrator](../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can still [view of list of users in a given organization](../manage-org-users/#view-a-list-of-organization-users).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## View user details
|
||||
|
||||
@@ -121,9 +121,9 @@ When you configure advanced authentication using Oauth, SAML, LDAP, or the Auth
|
||||
|
||||
When you create a user, the system assigns the user viewer permissions in a default organization, which you can change. You can now [add a user to a second organization](add-remove-user-to-org/).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you have [organization administrator](../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can still add users by [inviting a user to join an organization](../manage-org-users/#invite-a-user-to-join-an-organization).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Force a user to log out of Grafana
|
||||
|
||||
|
||||
+2
-2
@@ -42,9 +42,9 @@ You are required to specify an Admin role for each organization. The first user
|
||||
|
||||
The next time the user signs in, they will be able to navigate to their new organization using the Switch Organizations option in the user profile menu.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you have [organization administrator](../../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../../roles-and-permissions/#grafana-server-administrators) permissions, you can still [invite a user to join an organization](../../manage-org-users/#invite-a-user-to-join-an-organization).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Remove a user from an organization
|
||||
|
||||
|
||||
+2
-2
@@ -15,9 +15,9 @@ weight: 20
|
||||
|
||||
Grafana server administrators are responsible for creating users, organizations, and managing permissions. For more information about the server administration role, refer to [Grafana server administrators](../../../roles-and-permissions/#grafana-server-administrators).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Server administrators are "super-admins" with full permissions to create, read, update, and delete all resources and users in all organizations, as well as update global settings such as licenses. Only grant this permission to trusted users.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Before you begin
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ You can also view important information about your account, such as the organiza
|
||||
|
||||
You can change your Grafana password at any time.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If your Grafana instance uses an external authentication provider, then you might not be able to change your password in Grafana. Contact your Grafana administrator for more information.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**To change your password**:
|
||||
|
||||
|
||||
@@ -115,9 +115,9 @@ If you do not want to manage alert rules for a particular data source, go to its
|
||||
|
||||
Define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
By default, new alert rules are Grafana-managed. To switch to **Data source-managed**, follow these instructions.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
1. Select a Prometheus-based data source from the drop-down list.
|
||||
|
||||
|
||||
@@ -81,9 +81,9 @@ You can then [view the alert state on the panel](ref:view-alert-state-on-panels)
|
||||
|
||||
By default, notification messages include a link to the dashboard panel. Additionally, you can [enable displaying panel screenshots in notifications](ref:images-in-notifications).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Changes to panel and alert rule queries aren't synchronized. If you change a query, you have to update it in both the panel and the alert rule.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Access linked alert rules from panels
|
||||
|
||||
@@ -95,4 +95,4 @@ This option is available only in [time series panels](ref:time-series-visualizat
|
||||
|
||||
{{< admonition type="tip" >}}
|
||||
For a practical example that links a panel to an alert rule, refer to [Part 5 of our Get Started with Grafana Alerting tutorial](http://www.grafana.com/tutorials/alerting-get-started-pt5/).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
@@ -72,9 +72,9 @@ At the start of notification templates, dot (`.`) refers to [Notification Data](
|
||||
|
||||
In annotation and label templates, dot (`.`) is initialized with all alert data. It’s recommended to use the [`$labels` and `$values` variables](ref:alert-rule-template-reference-variables) instead to directly access the alert labels and query values.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Dot (`.`) might refer to something else when used in a [range](#range), a [with](#with), or when writing [templates](#templates) used in other templates.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
[//]: <> (The above section is not included in the shared file because `refs` links are not supported in shared files.)
|
||||
|
||||
|
||||
@@ -78,9 +78,9 @@ When an alert instance is assigned to a notification policy, the notification po
|
||||
- Controlling when notifications are sent using the [timing options](ref:policy-timing-options).
|
||||
- Determining the [contact points](ref:configure-contact-points) that receive the alert notification.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
The default notification policy and its child policies are assigned to a [specific Alertmanager](ref:alertmanager-architecture), and they cannot use contact points or mute timings from other Alertmanagers.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Edit the default notification policy
|
||||
|
||||
|
||||
@@ -133,9 +133,9 @@ On the **Contact Points** tab, you can:
|
||||
- Export individual contact points or all contact points in JSON, YAML, or Terraform format.
|
||||
- Delete contact points. Note that you cannot delete contact points that are in use by a notification policy. To proceed, either delete the notification policy or update it to use another contact point.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Contact points are assigned to a [specific Alertmanager](ref:configure-alertmanager) and cannot be used by notification policies in other Alertmanagers.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Supported contact point integrations
|
||||
|
||||
|
||||
+2
-2
@@ -37,11 +37,11 @@ For example, a team might run its own Alertmanager to manage notifications from
|
||||
|
||||
This setup avoids duplicating Alertmanager configurations for better maintenance.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
To send all Grafana-managed alerts to an Alertmanager, add it as a data source and enable it to receive all alerts. With this setup, you can configure multiple Alertmanagers to receive all alerts.
|
||||
|
||||
For setup instructions, refer to [Configure Alertmanagers](ref:configure-alertmanagers).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Configure an Alertmanager for a contact point
|
||||
|
||||
|
||||
@@ -85,11 +85,11 @@ The notification message would look like this:
|
||||
Description: This alert fires when a web server responds with more 5xx errors than is expected. This could be an issue with the web server or a backend service.
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Avoid adding extra information about alert instances in notification templates, as this information will only be visible in the notification message.
|
||||
|
||||
Instead, you should [use annotations or labels](ref:template-annotations-and-labels) to add information directly to the alert, ensuring it's also visible in the alert state and alert history within Grafana. You can then print the new alert annotation or label in notification templates.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
#### Select a notification template for a contact point
|
||||
|
||||
|
||||
@@ -63,11 +63,11 @@ Notification templates allows you to change the default notification messages.
|
||||
|
||||
You can modify the content and format of notification messages. For example, you can customize the content to show only specific information or adjust the format to suit a particular contact point, such as Slack or Email.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Avoid adding extra information about alert instances in notification templates, as this information is only visible in the notification message.
|
||||
|
||||
Instead, you should [use annotations or labels](ref:template-annotations-and-labels) to add information directly to the alert, ensuring it's also visible in the alert state and alert history within Grafana. You can then print the new alert annotation or label in notification templates.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
This page provides various examples illustrating how to template common notification messages. For more details about notification templates, refer to:
|
||||
|
||||
|
||||
+6
-6
@@ -20,15 +20,15 @@ weight: 105
|
||||
|
||||
# Use images in notifications
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Grafana Cloud users can request this feature by [opening a support ticket in the Cloud Portal](/profile/org#support).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Images in notifications helps recipients of alert notifications better understand why an alert has fired or resolved by including a screenshot of the panel associated with the alert.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
This feature is not supported in Mimir or Loki, or when Grafana is configured to send alerts to other Alertmanagers such as the Prometheus Alertmanager.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
When an alert is fired or resolved Grafana takes a screenshot of the panel associated with the alert. This is determined via the Dashboard UID and Panel ID annotations of the rule. Grafana cannot take a screenshot for alerts that are not associated with a panel.
|
||||
|
||||
@@ -60,9 +60,9 @@ Refer to the table at the end of this page for a list of contact points and thei
|
||||
|
||||
## Configuration
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Grafana Cloud users can request this feature by [opening a support ticket in the Cloud Portal](/profile/org#support).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Having installed either the image rendering plugin, or set up Grafana to use a remote rendering service, set `capture` in `[unified_alerting.screenshots]` to `true`:
|
||||
|
||||
|
||||
@@ -76,9 +76,9 @@ At the start of notification templates, dot (`.`) refers to [Notification Data](
|
||||
|
||||
In annotation and label templates, dot (`.`) is initialized with all alert data. It’s recommended to use the [`$labels` and `$values` variables](ref:alert-rule-template-reference-variables) instead to directly access the alert labels and query values.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Dot (`.`) might refer to something else when used in a [range](#range), a [with](#with), or when writing [templates](#templates) used in other templates.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
[//]: <> (The above section is not included in the shared file because `refs` links are not supported in shared files.)
|
||||
|
||||
|
||||
+2
-2
@@ -100,9 +100,9 @@ For more details on how to write notification templates, refer to the [template
|
||||
|
||||
Preview how your notification templates should look before using them in your contact points, helping you understand the result of the template you are creating as well as enabling you to fix any errors before saving it.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Notification template preview is only for Grafana Alertmanager.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To preview your notification templates:
|
||||
|
||||
|
||||
@@ -87,13 +87,13 @@ If a matching policy is found, the system continues to evaluate its child polici
|
||||
|
||||
By default, once a matching policy is found, the system does not continue to look for sibling policies. If you want sibling policies of one matching policy to handle the alert instance as well, then enable **Continue matching siblings** on the particular matching policy.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
The default notification policy matches all alert instances. It always handles alert instances if there are no child policies or if none of the child policies match the alert instance's labels—this prevents any alerts from being missed.
|
||||
|
||||
If alerts use multiple labels, these labels must also be present in a notification policy to match and route notifications to a specific contact point.
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< collapse title="Routing example" >}}
|
||||
|
||||
@@ -105,9 +105,9 @@ The `team=security` policy is not a match and **Continue matching siblings** was
|
||||
|
||||
**Disk Usage – 80%** has both a `team` and `severity` label, and matches a child policy of the operations team.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
When an alert matches both a parent policy and a child policy (like it does in this case), the routing follows the child policy (`severity`) as it provides a more specific match.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Unauthorized log entry** has a `team` label but does not match the first policy (`team=operations`) since the values are not the same, so it will continue searching and match the `team=security` policy. It does not have any child policies, so the additional `severity=high` label is ignored.
|
||||
|
||||
|
||||
@@ -89,11 +89,11 @@ If an alert does not contain labels specified either in the grouping of the defa
|
||||
|
||||
## View notification errors
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
Notification errors are only available with [pre-configured Grafana Alertmanagers](ref:alertmanager).
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Notification errors provide information about why they failed to be sent or were not received.
|
||||
|
||||
|
||||
@@ -24,13 +24,13 @@ An alert event is displayed each time an alert instance changes its state over a
|
||||
|
||||
## View from the History page
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
For Grafana Enterprise and OSS users:
|
||||
The feature is available starting with Grafana 11.2.
|
||||
To try out the new alert history page, enable the `alertingCentralAlertHistory` feature toggle and configure [Loki annotations](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alert-state-history/).
|
||||
|
||||
Users can only see the history and transitions of alert rules they have access to (RBAC).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To access the History view, complete the following steps.
|
||||
|
||||
@@ -44,9 +44,9 @@ To access the History view, complete the following steps.
|
||||
3. Filter by current state and previous state by selecting a state from the drop-down or by clicking the states from the list of events.
|
||||
Zoom in by dragging on the chart or use the time picker.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you exceed the 5000 alerts limit, you may see data missing from the chart. To see complete results, narrow the time frame.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
4. Under the chart, there is a list of events. Each event represents a state change on an alert instance. Expand a row to see the number of transitions for the alert instance, a state graph, and the value in the transition.
|
||||
5. Click the alert rule name to jump to the History tab in the Alert Rule view.
|
||||
@@ -59,9 +59,9 @@ Use the State history view to get insight into how your individual alert instanc
|
||||
|
||||
View information on when a state change occurred, what the previous state was, the current state, any other alert instances that changed their state at the same time as well as what the query value was that triggered the change.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Open source users must [configure alert state history](/docs/grafana/latest/alerting/set-up/configure-alert-state-history/) in order to be able to access the view.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To access the State history view, complete the following steps.
|
||||
|
||||
|
||||
@@ -101,9 +101,9 @@ For provisioning instructions, refer to the [Alertmanager data source documentat
|
||||
|
||||
After adding an Alertmanager, you can use the Grafana Alerting UI to manage notification policies, contact points, silences, and other alerting resources from within Grafana.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
When using Prometheus, you can manage silences in the Grafana Alerting UI. However, other Alertmanager resources such as contact points, notification policies, and templates are read-only because the Prometheus Alertmanager HTTP API does not support updates for these resources.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
When using multiple Alertmanagers, use the `Choose Alertmanager` dropdown to switch between Alertmanagers.
|
||||
|
||||
@@ -119,9 +119,9 @@ After enabling **Receive Grafana Alerts** in the Data Source Settings, you must
|
||||
|
||||
All Grafana-managed alerts are forwarded to Alertmanagers marked as `Receiving Grafana-managed alerts`.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Grafana Alerting does not support forwarding Grafana-managed alerts to the AlertManager in Amazon Managed Service for Prometheus. For more details, refer to [this GitHub issue](https://github.com/grafana/grafana/issues/64064).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Use an Alertmanager as a contact point to receive specific alerts
|
||||
|
||||
|
||||
@@ -155,13 +155,13 @@ For a demo, see this [example using Docker Compose](https://github.com/grafana/a
|
||||
|
||||
When running multiple Grafana instances, all alert rules are evaluated on every instance. This multiple evaluation of alert rules is visible in the [state history](ref:state-history) and provides a straightforward way to verify that your high availability configuration is working correctly.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
If using a mix of `execute_alerts=false` and `execute_alerts=true` on the HA nodes, since the alert state is not shared amongst the Grafana instances, the instances with `execute_alerts=false` do not show any alert status.
|
||||
|
||||
The HA settings (`ha_peers`, etc.) apply only to communication between alertmanagers, synchronizing silences and attempting to avoid duplicate notifications, as described in the introduction.
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
You can also confirm your high availability setup by monitoring Alertmanager metrics exposed by Grafana.
|
||||
|
||||
|
||||
+3
-3
@@ -137,7 +137,7 @@ To export alert rules from the Grafana UI, complete the following steps.
|
||||
|
||||
### Modify alert rule and export rule group without saving changes
|
||||
|
||||
{{< admonition type="note" >}} This feature is for Grafana-managed alert rules only. It is available to Admin, Viewer, and Editor roles. {{< /admonition >}}
|
||||
{{% admonition type="note" %}} This feature is for Grafana-managed alert rules only. It is available to Admin, Viewer, and Editor roles. {{% /admonition %}}
|
||||
|
||||
Use the **Modify export** mode to edit and export an alert rule without updating it. The exported data includes all alert rules within the same alert group.
|
||||
|
||||
@@ -155,7 +155,7 @@ To export a modified alert rule without saving the modifications, complete the f
|
||||
|
||||
### Export a new alert rule definition without saving changes
|
||||
|
||||
{{< admonition type="note" >}} You can only export in Terraform (HCL) format. {{< /admonition >}}
|
||||
{{% admonition type="note" %}} You can only export in Terraform (HCL) format. {{% /admonition %}}
|
||||
|
||||
Add a new alert rule definition to an existing provisioned rule group rather than creating the code manually. You can then copy it to your Terraform pipeline, and quickly deploy and manage alert rules as part of your infrastructure as code.
|
||||
|
||||
@@ -197,7 +197,7 @@ However, you can export it by manually copying the content and name of the notif
|
||||
|
||||
All notification policies are provisioned through a single resource: the root of the notification policy tree.
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
|
||||
Since the policy tree is a single resource, provisioning it overwrites a policy tree created through any other means.
|
||||
|
||||
|
||||
+1
-1
@@ -702,7 +702,7 @@ Create or reset the notification policy tree using provisioning files in your Gr
|
||||
|
||||
In Grafana, the entire notification policy tree is considered a single, large resource. Add new specific policies as sub-policies under the root policy. Since specific policies may depend on each other, you cannot provision subsets of the policy tree; the entire tree must be defined in a single place.
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
|
||||
Since the policy tree is a single resource, provisioning it will overwrite a policy tree created through any other means.
|
||||
|
||||
|
||||
+1
-1
@@ -341,7 +341,7 @@ In this section, we'll create Terraform configurations for each alerting resourc
|
||||
|
||||
[Notification policies](ref:notification-policy) defines how to route alert instances to your contact points.
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
|
||||
Since the policy tree is a single resource, provisioning the `grafana_notification_policy` resource will overwrite a policy tree created through any other means.
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@ For our purposes, a breaking change is any change that requires users or operato
|
||||
- Changes that affect some plugins or functions of Grafana
|
||||
- Migrations that can’t be rolled back
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
To learn what's available in a Grafana release, refer to the [What's new ](../whatsnew/) page for each version. For the steps we recommend when you upgrade, check out the [Upgrade guide](../upgrade-guide/) for each version.
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Refer to any of the following breaking changes guides:
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@ To view the JSON of a dashboard:
|
||||
|
||||
When a user creates a new dashboard, a new dashboard JSON object is initialized with the following fields:
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
In the following JSON, id is shown as null which is the default value assigned to it until a dashboard is saved. Once a dashboard is saved, an integer value is assigned to the `id` field.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
@@ -86,9 +86,9 @@ When you nest folders, you can do so up to four levels deep.
|
||||
|
||||
When you save a dashboard, you can optionally select a folder to save the dashboard in.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Alerts can't be placed in folders with slashes (\ /) in the name. If you wish to place alerts in the folder, don't use slashes in the folder name.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**To edit the name of a folder:**
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ The search is:
|
||||
- _Not_ case sensitive
|
||||
- Functional across stored _and_ file based dashboards and folders.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
You can use your keyboard arrow keys to navigate the results and press `Enter` to open the selected dashboard or folder.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
The following images show:
|
||||
|
||||
@@ -64,9 +64,9 @@ Searching by dashboard name inside a folder.
|
||||
|
||||
{{< figure src="/media/docs/grafana/dashboards/search-in-folder.png" width="700px" >}}
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
When you search within a folder, its subfolders are not part of the results returned. You need to be on the **Dashboards** page (or the root level) to search for subfolders by name.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Search dashboards using panel title
|
||||
|
||||
@@ -120,6 +120,6 @@ To filter dashboard search result by a tag, complete one of the following steps:
|
||||
|
||||
All tags will be shown, and when you select a tag, the dashboard search will be instantly filtered.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
When using only a keyboard, press the `tab` key and navigate to the **Filter by tag** drop-down menu, press the down arrow key `▼` to activate the menu and locate a tag, and press `Enter` to select the tag.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
@@ -296,7 +296,7 @@ https://play.grafana.org/render/d-solo/ktMs4D6Mk?from=2024-09-03T11:55:44.442Z&t
|
||||
You can share a panel by embedding it on another website using an iframe. Users must be signed into Grafana to view the panel unless you have anonymous access permission enabled for your Grafana instance.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Panel embedding and anonymous access permissions are not available in Grafana Cloud, even for panels in [externally shared dashboards](ref:shared-dashboards). These capabilities are only supported in Grafana Enterprise and Grafana Open Source.
|
||||
Anonymous access permission is no longer available for Grafana Cloud even for panels in [externally shared dashboards](ref:shared-dashboards). This feature is only supported for Grafana Enterprise and Grafana Open Source.
|
||||
{{< /admonition >}}
|
||||
|
||||
To create a panel that can be embedded, follow these steps:
|
||||
|
||||
@@ -174,14 +174,14 @@ The following table provides example relative ranges:
|
||||
| This Year | `now/Y` | `now/Y` |
|
||||
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
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 >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Common time range controls
|
||||
|
||||
@@ -229,11 +229,11 @@ This section also displays recently used absolute ranges.
|
||||
|
||||
#### Semi-relative time range
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
Grafana Alerting does not support semi-relative time ranges.
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /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.
|
||||
|
||||
|
||||
@@ -84,9 +84,9 @@ For details on data source management, including instructions on how configure u
|
||||
|
||||
Before you can create your first dashboard, you need to add your data source.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Only users with the organization admin role can add data sources.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**To add a data source:**
|
||||
|
||||
|
||||
@@ -68,9 +68,9 @@ Administrators can also [provision the data source](#provision-the-data-source)
|
||||
|
||||
Once you've added the data source, you can [configure it](#configure-the-data-source) so that your Grafana instance's users can create queries in its [query editor](query-editor/) when they [build dashboards](ref:build-dashboards) and use [Explore](ref:explore).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
To troubleshoot issues while setting up the CloudWatch data source, check the `/var/log/grafana/grafana.log` file.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Configure the data source
|
||||
|
||||
@@ -407,9 +407,9 @@ filter @message like /Exception/
|
||||
| sort exceptionCount desc
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you receive an error like `input data must be a wide series but got ...` when trying to alert on a query, make sure that your query returns valid numeric data that can be output to a Time series panel.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
For more information on Grafana alerts, refer to [Alerting](ref:alerting).
|
||||
|
||||
@@ -420,10 +420,10 @@ Pricing for CloudWatch Logs is based on the amount of data ingested, archived, a
|
||||
Each time you select a dimension in the query editor, Grafana issues a `ListMetrics` API request.
|
||||
Each time you change queries in the query editor, Grafana issues a new request to the `GetMetricData` API.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Grafana replaced all `GetMetricStatistics` API requests with calls to GetMetricData to provide better support for CloudWatch metric math, and enables the automatic generation of search expressions when using wildcards or disabling the `Match Exact` option.
|
||||
The `GetMetricStatistics` API qualified for the CloudWatch API free tier, but `GetMetricData` calls don't.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
For more information, refer to the [CloudWatch pricing page](https://aws.amazon.com/cloudwatch/pricing/).
|
||||
|
||||
|
||||
@@ -67,9 +67,9 @@ Open source Grafana enables the `AWS SDK Default`, `Credentials file`, and `Acce
|
||||
|
||||
## Assume a role
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Assume a role is required for the Grafana Assume Role.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
You can specify an IAM role to assume in the **Assume Role ARN** field.
|
||||
|
||||
@@ -87,9 +87,9 @@ To disable this feature in open source Grafana or Grafana Enterprise, refer to t
|
||||
|
||||
### Use an external ID
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
You cannot use an external ID for the Grafana Assume Role authentication provider.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To assume a role in another account that was created with an external ID, specify the external ID in the **External ID** field.
|
||||
|
||||
@@ -128,9 +128,9 @@ For more information on why and how to use service endpoints, refer to the [AWS
|
||||
|
||||
Create a file at `~/.aws/credentials`, the `HOME` path for the user running the `grafana-server` service.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you think you have the credentials file in the right location, but it's not working, try moving your `.aws` file to `/usr/share/grafana/` and grant your credentials file at most 0644 permissions.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Credentials file example
|
||||
|
||||
@@ -159,13 +159,13 @@ securityContext:
|
||||
|
||||
## Use Grafana Assume Role
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Grafana Assume Role is currently in [private preview](https://grafana.com/docs/release-life-cycle/) for Grafana Cloud.
|
||||
|
||||
It's currently only available for Amazon CloudWatch.
|
||||
|
||||
To get early access this feature, reach out to Customer Support and ask for the `awsDatasourcesTempCredentials` feature toggle to be enabled and the `cloudwatchRemoteDatasource` and `athenaRemoteDatasource` feature toggles to be disabled on your account.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
The Grafana Assume Role authentication provider lets you authenticate with AWS without having to create and maintain long term AWS users or rotate their access and secret keys. Instead, you can create an IAM role that has permissions to access CloudWatch and a trust relationship with Grafana's AWS account. Grafana's AWS account then makes an STS request to AWS to create temporary credentials to access your AWS data. It makes this STS request by passing along an `externalID` that's unique per Cloud account, to ensure that Grafana Cloud users can only access their own AWS data. For more information, refer to the [AWS documentation on external ID](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user_externalid.html).
|
||||
|
||||
|
||||
@@ -111,9 +111,9 @@ For details on the available functions, refer to [AWS Metric Math](https://docs.
|
||||
|
||||
For example, to apply arithmetic operations to a metric, apply a unique string id to the raw metric, then use this id and apply arithmetic operations to it in the Expression field of the new metric.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you use the expression field to reference another query, like `queryA * 2`, you can't create an alert rule based on that query.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
#### Period macro
|
||||
|
||||
@@ -192,9 +192,9 @@ The suggestions appear after typing a space, comma, or dollar (`$`) character, o
|
||||
|
||||
{{< figure src="/static/img/docs/cloudwatch/cloudwatch-code-editor-autocomplete-8.3.0.png" max-width="500px" class="docs-image--right" caption="Code editor autocomplete" >}}
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Template variables in the code editor can interfere with autocompletion.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To run the query, click **Run query** above the code editor.
|
||||
|
||||
|
||||
@@ -66,9 +66,9 @@ In contrast, Azure Monitor Logs can store a variety of data types, each with the
|
||||
1. Select a resource from which to query metrics by using the subscription, resource group, resource type, and resource fields. Multiple resources can also be selected as long as they belong to the same subscription, region and resource type. Note that only a limited amount of resource types support this feature.
|
||||
1. To select a different namespace than the default—for instance, to select resources like storage accounts that are organized under multiple namespaces—use the **Namespace** option.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Not all metrics returned by the Azure Monitor Metrics API have values.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
> The data source retrieves lists of supported metrics for each subscription and ignores metrics that never have values.
|
||||
|
||||
@@ -139,10 +139,10 @@ The Azure Monitor data source also supports querying of [Basic Logs](https://lea
|
||||
1. Select a resource to query. Multiple resources can be selected as long as they are of the same type.
|
||||
|
||||
Alternatively, you can dynamically query all resources under a single resource group or subscription.
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If a timespan is specified in the query, the overlap of the timespan between the query and the dashboard will be used as the query timespan. See the [API documentation for
|
||||
details.](https://learn.microsoft.com/en-us/rest/api/loganalytics/dataaccess/query/get?tabs=HTTP#uri-parameters)
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
1. Enter your KQL query.
|
||||
|
||||
@@ -155,10 +155,10 @@ You can also augment queries by using [template variables](../template-variables
|
||||
1. Select the **Logs** service.
|
||||
1. Select a resource to query. Multiple resources can be selected as long as they are of the same type.
|
||||
1. Switch the `Logs` toggle from `Analytics` to `Basic`. A modal will display to notify users of potential additional costs.
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Basic Logs queries do not support time-ranges specified in the query. The time-range will be hardcoded to the dashboard time-range. There are also other query limitations. See the
|
||||
[documentation for details.](https://learn.microsoft.com/en-us/azure/azure-monitor/logs/basic-logs-query?tabs=portal-1#limitations)
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
1. Enter your KQL query.
|
||||
|
||||
You can also augment queries by using [template variables](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/datasources/azure-monitor/template-variables/).
|
||||
@@ -348,17 +348,17 @@ Application Insights stores trace data in an underlying Log Analytics workspace
|
||||
1. Select the **Traces** service.
|
||||
1. Select a resource to query. Multiple resources can be selected as long as they are of the same type.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
This query type only supports Application Insights resources.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Running a query of this kind will return all trace data within the timespan specified by the panel/dashboard.
|
||||
|
||||
Optionally, you can apply further filtering or select a specific Operation ID to query. The result format can also be switched between a tabular format or the trace format which will return the data in a format that can be used with the Trace visualization.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Selecting the trace format will filter events with the `trace` type.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
1. Specify an Operation ID value.
|
||||
1. Specify event types to filter by.
|
||||
|
||||
@@ -65,11 +65,11 @@ Our maintenance policy for Elasticsearch data source is aligned with the [Elasti
|
||||
You can define and configure the data source in YAML files as part of Grafana's provisioning system.
|
||||
For more information about provisioning, and for available configuration options, refer to [Provisioning Grafana](ref:provisioning-grafana).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
The previously used `database` field has now been [deprecated](https://github.com/grafana/grafana/pull/58647).
|
||||
You should now use the `index` field in `jsonData` to store the index name.
|
||||
Please see the examples below.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Provisioning examples
|
||||
|
||||
|
||||
@@ -95,9 +95,9 @@ Select one of the following authentication methods from the dropdown menu.
|
||||
|
||||
### TLS settings
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Use TLS (Transport Layer Security) for an additional layer of security when working with Elasticsearch. For information on setting up TLS encryption with Elasticsearch see [Configure TLS](https://www.elastic.co/guide/en/elasticsearch/reference/8.8/configuring-tls.html#configuring-tls). You must add TLS settings to your Elasticsearch configuration file **prior** to setting these options in Grafana.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
- **Add self-signed certificate** - Check the box to authenticate with a CA certificate. Follow the instructions of the CA (Certificate Authority) to download the certificate file. Required for verifying self-signed TLS certificates.
|
||||
|
||||
@@ -164,9 +164,9 @@ You can also override this setting in a dashboard panel under its data source op
|
||||
|
||||
- **Include frozen indices** - Toggle on when the `X-Pack enabled` setting is active. Includes frozen indices in searches. You can configure Grafana to include [frozen indices](https://www.elastic.co/guide/en/elasticsearch/reference/7.13/frozen-indices.html) when performing search requests.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Frozen indices are [deprecated in Elasticsearch](https://www.elastic.co/guide/en/elasticsearch/reference/7.17/frozen-indices.html) since v7.14.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Logs
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ refs:
|
||||
Grafana provides a query editor for Elasticsearch. Elasticsearch queries are in Lucene format.
|
||||
See [Lucene query syntax](https://www.elastic.co/guide/en/kibana/current/lucene-query.html) and [Query string syntax](https://www.elastic.co/guide/en/elasticsearch/reference/8.9/query-dsl-query-string-query.html#query-string-syntax) if you are new to working with Lucene queries in Elasticsearch.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
When composing Lucene queries, ensure that you use uppercase boolean operators: `AND`, `OR`, and `NOT`. Lowercase versions of these operators are not supported by the Lucene query syntax.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< figure src="/static/img/docs/elasticsearch/elastic-query-editor-10.1.png" max-width="800px" class="docs-image--no-shadow" caption="Elasticsearch query editor" >}}
|
||||
|
||||
@@ -137,9 +137,9 @@ Run a raw data query to retrieve a table of all fields that are associated with
|
||||
|
||||
- **Raw data size** - Number of raw data documents. You can specify a different amount. The default is `500`.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
The option to run a **raw document query** is deprecated as of Grafana v10.1.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Use template variables
|
||||
|
||||
|
||||
@@ -68,9 +68,9 @@ These queries by default return results in term order (which can then be sorted
|
||||
To produce a list of terms sorted by doc count (a top-N values list), add an `orderBy` property of "doc_count".
|
||||
This automatically selects a descending sort.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
To use an ascending sort (`asc`) with doc_count (a bottom-N list), set `order: "asc"`. However, Elasticsearch [discourages this](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-order) because sorting by ascending doc count can return inaccurate results.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To keep terms in the doc count order, set the variable's Sort dropdown to **Disabled**.
|
||||
You can alternatively use other sorting criteria, such as **Alphabetical**, to re-sort them.
|
||||
|
||||
@@ -74,9 +74,9 @@ In the case that the metric value type is a distribution, the aggregation will b
|
||||
|
||||
The various metrics are documented [here](https://cloud.google.com/monitoring/api/metrics_gcp) and further details on the kinds and types of metrics can be found [here](https://cloud.google.com/monitoring/api/v3/kinds-and-types).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Distribution metrics are typically best visualized as either a heatmap or histogram. When visualizing in this way, aggregation is not necessary. However, for other visualization types, performance degradation may be observed when attempting to query distribution metrics that are not aggregated due to the number of potential buckets that can be returned. For more information on how to visualize distribution metrics refer to [this page](https://cloud.google.com/monitoring/charts/charting-distribution-metrics).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Apply a filter
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
aliases:
|
||||
- ../data-sources/graphite/
|
||||
- ../features/datasources/graphite/
|
||||
description: Introduction to the Graphite data source in Grafana.
|
||||
description: Guide for using Graphite in Grafana
|
||||
keywords:
|
||||
- grafana
|
||||
- graphite
|
||||
@@ -46,36 +46,6 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/
|
||||
transformations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/transform-data/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/query-transform-data/transform-data/
|
||||
alerting:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/
|
||||
visualizations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/
|
||||
variables:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/
|
||||
annotate-visualizations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/annotate-visualizations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/annotate-visualizations/
|
||||
set-up-grafana-monitoring:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/set-up-grafana-monitoring/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/set-up-grafana-monitoring/
|
||||
---
|
||||
|
||||
# Graphite data source
|
||||
@@ -84,30 +54,87 @@ Grafana includes built-in support for Graphite.
|
||||
This topic explains options, variables, querying, and other features specific to the Graphite data source, which include its feature-rich query editor.
|
||||
|
||||
For instructions on how to add a data source to Grafana, refer to the [administration documentation](ref:data-source-management).
|
||||
Only users with the organization administrator role can add data sources.
|
||||
|
||||
Once you've added the Graphite data source, you can [configure it](#configure-the-data-source) so that your Grafana instance's users can create queries in its [query editor](query-editor/) when they [build dashboards](ref:build-dashboards) and use [Explore](ref:explore).
|
||||
|
||||
{{< docs/play title="Graphite: Sample Website Dashboard" url="https://play.grafana.org/d/000000003/" >}}
|
||||
|
||||
Grafana exposes metrics for Graphite on the `/metrics` endpoint.
|
||||
For detailed instructions, refer to [Internal Grafana metrics](ref:internal-grafana-metrics).
|
||||
## Configure the data source
|
||||
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Enter `Graphite` in the search bar.
|
||||
1. Click **Graphite**.
|
||||
|
||||
The **Settings** tab of the data source is displayed.
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Sets whether the data source is pre-selected for new panels. You can set only one default data source per organization. |
|
||||
| **URL** | Sets the HTTP protocol, IP, and port of your graphite-web or graphite-api installation. |
|
||||
| **Auth** | For details, refer to [Configure Authentication](ref:configure-authentication). |
|
||||
| **Basic Auth** | Enables basic authentication to the data source. |
|
||||
| **User** | Sets the user name for basic authentication. |
|
||||
| **Password** | Sets the password for basic authentication. |
|
||||
| **Custom HTTP Headers** | Click **Add header** to add a custom HTTP header. |
|
||||
| **Header** | Defines the custom header name. |
|
||||
| **Value** | Defines the custom header value. |
|
||||
|
||||
You can also configure settings specific to the Graphite data source:
|
||||
|
||||
| Name | Description |
|
||||
| ----------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| **Version** | Select your version of Graphite. If you are using Grafana Cloud Graphite, this should be set to `1.1.x`. |
|
||||
| **Type** | Select your type of Graphite. If you are using Grafana Cloud Graphite, this should be set to `Default`. |
|
||||
|
||||
### Integrate with Loki
|
||||
|
||||
When you change the data source selection in [Explore](ref:explore), Graphite queries are converted to Loki queries.
|
||||
Grafana extracts Loki label names and values from the Graphite queries according to mappings provided in the Graphite data source configuration.
|
||||
Queries using tags with `seriesByTags()` are also transformed without any additional setup.
|
||||
|
||||
### Provision the data source
|
||||
|
||||
You can define and configure the data source in YAML files as part of Grafana's provisioning system.
|
||||
For more information about provisioning, and for lists of common configuration options and JSON data options, refer to [Provisioning data sources](ref:provisioning-data-sources).
|
||||
|
||||
#### Provisioning example
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Graphite
|
||||
type: graphite
|
||||
access: proxy
|
||||
url: http://localhost:8080
|
||||
jsonData:
|
||||
graphiteVersion: '1.1'
|
||||
```
|
||||
|
||||
## Query the data source
|
||||
|
||||
Grafana includes a Graphite-specific query editor to help you build queries.
|
||||
The query editor helps you quickly navigate the metric space, add functions, and change function parameters.
|
||||
It can handle all types of Graphite queries, including complex nested queries through the use of query references.
|
||||
|
||||
For details, refer to the [query editor documentation](query-editor/).
|
||||
|
||||
## Use template variables
|
||||
|
||||
Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables.
|
||||
Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
|
||||
Grafana refers to such variables as template variables.
|
||||
|
||||
For details, see the [template variables documentation](template-variables/).
|
||||
|
||||
## Get Grafana metrics into Graphite
|
||||
|
||||
Grafana exposes metrics for Graphite on the `/metrics` endpoint.
|
||||
Refer to [Internal Grafana metrics](ref:set-up-grafana-monitoring) for more information.
|
||||
|
||||
## Graphite and Loki integration
|
||||
|
||||
When you change the data source selection in [Explore](ref:explore), Graphite queries are converted to Loki queries.
|
||||
Grafana extracts Loki label names and values from the Graphite queries according to mappings provided in the Graphite data source configuration. Grafana automatically transforms queries using tags with `seriesByTags()` without requiring additional setup.
|
||||
|
||||
## Get the most out of the data source
|
||||
|
||||
After installing and configuring the Graphite data source you can:
|
||||
|
||||
- Create a wide variety of [visualizations](ref:visualizations)
|
||||
- Configure and use [templates and variables](ref:variables)
|
||||
- Add [transformations](ref:transformations)
|
||||
- Add [annotations](ref:annotate-visualizations)
|
||||
- Set up [alerting](ref:alerting)
|
||||
For detailed instructions, refer to [Internal Grafana metrics](ref:internal-grafana-metrics).
|
||||
|
||||
@@ -1,179 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- ../data-sources/graphite/
|
||||
- ../datasources/graphite/
|
||||
- ../features/datasources/graphite/
|
||||
description: This document provides instructions for configuring the Graphite data source.
|
||||
keywords:
|
||||
- grafana
|
||||
- graphite
|
||||
- guide
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Configure
|
||||
title: Configure the Graphite data source
|
||||
weight: 100
|
||||
refs:
|
||||
explore:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
provisioning-data-sources:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
|
||||
internal-grafana-metrics:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/set-up-grafana-monitoring/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/set-up-grafana-monitoring/
|
||||
build-dashboards:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/
|
||||
configure-authentication:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-security/configure-authentication/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-security/configure-authentication/
|
||||
data-source-management:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/
|
||||
private-data-source-connect:
|
||||
- pattern: /docs/grafana/
|
||||
destination: docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/
|
||||
configure-pdc:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/configure-pdc/#configure-grafana-private-data-source-connect-pdc
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/configure-pdc/#configure-grafana-private-data-source-connect-pdc
|
||||
---
|
||||
|
||||
# Configure the Graphite data source
|
||||
|
||||
This document provides instructions for configuring the Graphite data source and explains available configuration options. For general information on managing data sources, refer to [Data source management](ref:data-source-management).
|
||||
|
||||
## Before you begin
|
||||
|
||||
- You must have the `Organization administrator` role to configure the Graphite data source.
|
||||
Organization administrators can also [configure the data source via YAML](#provision-the-data-source) with the Grafana provisioning system.
|
||||
|
||||
- Grafana comes with a built-in Graphite data source plugin, eliminating the need to install a plugin.
|
||||
|
||||
- Familiarize yourself with your Graphite security configuration and gather any necessary security certificates and client keys.
|
||||
|
||||
## Add the Graphite data source
|
||||
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Click **Add new connection**
|
||||
1. Type `Graphite` in the search bar.
|
||||
1. Select the **Graphite data source**.
|
||||
1. Click **Add new data source** in the upper right.
|
||||
|
||||
Grafana takes you to the **Settings** tab, where you will set up your Graphite configuration.
|
||||
|
||||
## Configuration options in the UI
|
||||
|
||||
Following is a list of configuration options for Graphite.
|
||||
|
||||
| Setting | Description |
|
||||
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Name** | The display name for the data source. This is how you'll reference it in panels and queries. <br>Examples: `graphite-1`, `graphite-metrics`. |
|
||||
| **Default** | When enabled, sets this data source as the default for dashboard panels. It will be automatically selected when creating new panels. |
|
||||
|
||||
**HTTP:**
|
||||
|
||||
| Setting | Description |
|
||||
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| **URL** | Sets the HTTP protocol, IP, and port of your `graphite-web` or `graphite-api` installation. <br>Since the access method is set to _Server_, the URL must be accessible from the Grafana backend. |
|
||||
| **Allowed cookies** | By default, Grafana removes forwarded cookies. Specify cookie names here to allow them to be forwarded to the data source. |
|
||||
| **Timeout** | Sets the HTTP request timeout in seconds. |
|
||||
|
||||
**Auth:**
|
||||
|
||||
| **Setting** | **Description** |
|
||||
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Basic Auth** | Toggle on to enable basic authentication to the data source. |
|
||||
| **User** | Sets the username used for basic authentication. |
|
||||
| **Password** | Enter the password used for basic authentication. |
|
||||
| **With Credentials** | Toggle on to include cookies and authentication headers in cross-origin requests. |
|
||||
| **TLS Client Auth** | Toggle on to enable TLS client authentication (both server and client are verified). |
|
||||
| **ServerName** | The server name used to verify the hostname on the certificate returned by the server. |
|
||||
| **Client Cert** | Client certificate generated by a Certificate Authority (CA) or self-signed. |
|
||||
| **Client Key** | Private key used to encrypt communication between the client and server. Also generated by a CA or self-signed. |
|
||||
| **With CA Cert** | Toggle on to authenticate with a CA certificate. |
|
||||
| **CA Cert** | CA certificate used to validate the server certificate. |
|
||||
| **Skip TLS Verify** | Toggle on to bypass TLS certificate validation. Not recommended unless necessary or for testing purposes. |
|
||||
| **Forward OAuth Identity** | Toggle on to forward the user's upstream OAuth identity to the data source. Grafana includes the access token in the request. |
|
||||
|
||||
**Custom HTTP Headers:**
|
||||
|
||||
Pass along additional information and metadata about the request or response.
|
||||
|
||||
| **Setting** | **Description** |
|
||||
| ----------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| **Header** | Add a custom header. This allows custom headers to be passed based on the needs of your Graphite instance. |
|
||||
| **Value** | The value of the header. |
|
||||
|
||||
**Graphite details:**
|
||||
|
||||
| **Setting** | **Description** |
|
||||
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Version** | Select your Graphite version from the drop-down. This controls which functions are available in the Graphite query editor. Use `1.1.x` for Grafana Cloud Graphite. |
|
||||
| **Graphite backend type** | Select the Graphite backend type. Choosing `Metrictank` enables additional features like query processing metadata. (`Metrictank` is a multi-tenant time series engine compatible with Graphite.) Use `Default` for Grafana Cloud Graphite. |
|
||||
| **Rollup indicator** | Toggle on to display an info icon in panel headers when data aggregation (rollup) occurs. Only available when `Metrictank` is selected. |
|
||||
|
||||
**Label mappings:**
|
||||
|
||||
Label mappings are the rules you define to tell Grafana how to pull pieces of the Graphite metric path into Loki labels when switching data sources. They are currently only supported between Graphite and Loki queries.
|
||||
|
||||
When you change your data source from Graphite to Loki, your queries are automatically mapped based on the rules you define. To create a mapping, specify the full path of the metric and replace the nodes you want to map with label names, using parentheses. The corresponding label values are extracted from your Graphite query during the data source switch.
|
||||
|
||||
Grafana automatically maps all Graphite tags to labels, even if you haven’t defined explicit mappings. When using matching patterns with `{}`(e.g., `metric.{a,b}.value`), Grafana converts them to Loki’s regular expression matching syntax. If your queries include functions, Graphite extracts the relevant metrics and tags, then matches them against your mappings.
|
||||
|
||||
| **Graphite Query** | **Mapped to Loki Query** |
|
||||
| -------------------------------------------------------- | -------------------------------- |
|
||||
| `alias(servers.west.001.cpu,1,2)` | `{cluster="west", server="001"}` |
|
||||
| `alias(servers.*.{001,002}.*,1,2)` | `{server=~"(001,002)"}` |
|
||||
| `interpolate(seriesByTag('foo=bar', 'server=002'), inf)` | `{foo="bar", server="002"}` |
|
||||
|
||||
| **Setting** | **Description** |
|
||||
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| **Private data source connect** | _Only for Grafana Cloud users._ Establishes a private, secured connection between a Grafana Cloud stack and data sources within a private network. Use the drop-down to locate the PDC URL. For setup instructions, refer to [Private data source connect (PDC)](ref:private-data-source-connect) and [Configure PDC](ref:configure-pdc). Click **Manage private data source connect** to open your PDC connection page and view your configuration details. |
|
||||
|
||||
|
|
||||
|
||||
After configuring your Graphite data source options, click **Save & test** at the bottom to test the connection. You should see a confirmation dialog box that says:
|
||||
|
||||
**Data source is working**
|
||||
|
||||
## Provision the data source
|
||||
|
||||
You can define and configure the data source in YAML files as part of the Grafana provisioning system.
|
||||
For more information about provisioning, and for lists of common configuration options and JSON data options, refer to [Provisioning data sources](ref:provisioning-data-sources).
|
||||
|
||||
Example Graphite YAML provisioning file:
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Graphite
|
||||
type: graphite
|
||||
access: proxy
|
||||
url: http://localhost:8080
|
||||
jsonData:
|
||||
graphiteVersion: '1.1'
|
||||
```
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
aliases:
|
||||
- ../../data-sources/graphite/query-editor/
|
||||
description: Guide for using the Graphite data source query editor.
|
||||
description: Guide for using the Graphite data source's query editor
|
||||
keywords:
|
||||
- grafana
|
||||
- microsoft
|
||||
@@ -41,53 +41,45 @@ refs:
|
||||
|
||||
Grafana includes a Graphite-specific query editor to help you build queries.
|
||||
The query editor helps you quickly navigate the metric space, add functions, and change function parameters.
|
||||
It supports a variety of Graphite queries, including complex nested queries, through the use of query references.
|
||||
It can handle all types of Graphite queries, including complex nested queries through the use of query references.
|
||||
|
||||
For general documentation on querying data sources in Grafana, see [Query and transform data](ref:query-transform-data).
|
||||
|
||||
## Query editor elements
|
||||
## View the raw query
|
||||
|
||||
The query editor consists of the following elements:
|
||||
|
||||
- **Series** - A series in Graphite is a unique time-series dataset, represented by a specific metric name and timestamped values. Click **select metric** to select a metric from the drop-down.
|
||||
|
||||
- **Functions** - Graphite uses functions to manipulate data. Click the **+ sign** to view a list of functions in the drop-down. You can create a query with multiple functions.
|
||||
|
||||
To view the raw query, click the **Pencil icon** in the upper right. Click the **Pencil icon** again to continue adding series and functions.
|
||||
To see the raw text of the query that Grafana sends to Graphite, click the **Toggle text edit mode** (pencil) icon.
|
||||
|
||||
## Choose metrics to query
|
||||
|
||||
Click **Select metric** to browse the available metrics. You can navigate using your mouse or arrow keys. You can also select a wildcard.
|
||||
Click **Select metric** to navigate the metric space.
|
||||
Once you begin, you can use the mouse or keyboard arrow keys.
|
||||
You can also select a wildcard and still continue.
|
||||
|
||||
{{< figure src="/static/img/docs/graphite/graphite-query-editor-still.png" animated-gif="/static/img/docs/graphite/graphite-query-editor.gif" >}}
|
||||
|
||||
## Functions
|
||||
|
||||
Click the **+ sign** next to **Function** to add a function from the drop-down. You can also search by typing the first few letters of the function name.
|
||||
Click the plus icon next to **Function** to add a function. You can search for the function or select it from the menu. Once
|
||||
a function is selected, it will be added and your focus will be in the text box of the first parameter.
|
||||
|
||||
After selecting a function, Grafana adds it to your query and automatically places your cursor in the first parameter field.
|
||||
|
||||
To edit a parameter, click it to open an editable text box.
|
||||
|
||||
To remove a function simply click on it, then click the **X icon** that appears above it.
|
||||
- To edit or change a parameter, click on it and it will turn into a text box.
|
||||
- To delete a function, click the function name followed by the x icon.
|
||||
|
||||
{{< figure src="/static/img/docs/graphite/graphite-functions-still.png" animated-gif="/static/img/docs/graphite/graphite-functions-demo.gif" >}}
|
||||
|
||||
Some functions like `aliasByNode` support an optional second argument. To add this argument, hover your mouse over the argument and a dialog box appears. To remove the second optional parameter, click on it to delete it.
|
||||
Some functions like aliasByNode support an optional second argument. To add an argument, hover your mouse over the first argument and then click the `+` symbol that appears. To remove the second optional parameter, click on it and leave it blank and the editor will remove it.
|
||||
|
||||
Refer to [Functions](https://graphite.readthedocs.io/en/latest/functions.html) in the Graphite documentation for more information.
|
||||
To learn more, refer to [Graphite's documentation on functions](https://graphite.readthedocs.io/en/latest/functions.html).
|
||||
|
||||
{{% admonition type="warning" %}}
|
||||
Some functions accept a second argument, which can itself be another function that returns a series. If you need to add a second argument that is a function, Grafana recommends using a series reference from a second query instead of embedding the function directly.
|
||||
|
||||
Currently, the query editor does not support parsing a second function argument when switching between the query builder and the code editor.
|
||||
Some functions take a second argument that may be a function that returns a series. If you are adding a second argument that is a function, it is suggested to use a series reference from a second query instead of the function itself. The query editor does not currently support parsing of a second argument that is a function when switching between the query editor and the code editor.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Sort labels
|
||||
|
||||
If the same labels appear on multiple graphs, they may be sorted differently and assigned different colors.
|
||||
If you have the same labels on multiple graphs, they are both sorted differently and use different colors.
|
||||
|
||||
To ensure consistent sorting and coloring, use the `sortByName()` function to order labels alphabetically.
|
||||
To avoid this and consistently order labels by name, use the `sortByName()` function.
|
||||
|
||||
### Modify the metric name in my tables or charts
|
||||
|
||||
@@ -100,17 +92,17 @@ By default, Grafana consolidates data points using the `avg` function.
|
||||
To control how Graphite consolidates metrics, use the Graphite `consolidateBy()` function.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Grafana calculates legend summary values like `max`, `min`, and `total` on the client side, after data has been calculated.
|
||||
Depending on the consolidation function used, only one or two of these values may be accurate at the same time.
|
||||
Legend summary values (max, min, total) can't all be correct at the same time because they are calculated client-side by Grafana.
|
||||
Depending on your consolidation function, only one or two can be correct at the same time.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Combine time series
|
||||
|
||||
To combine time series, click **Combine** in the **Functions** list.
|
||||
|
||||
### Select and explore data with tags
|
||||
### Select and explor data with tags
|
||||
|
||||
In Graphite, everything is a tag.
|
||||
In Graphite, _everything_ is a tag.
|
||||
|
||||
When exploring data, previously selected tags filter the remaining result set.
|
||||
To select data, use the `seriesByTag` function, which takes tag expressions (`=`, `!=`, `=~`, `!=~`) to filter timeseries.
|
||||
@@ -118,33 +110,41 @@ To select data, use the `seriesByTag` function, which takes tag expressions (`=`
|
||||
The Grafana query builder does this for you automatically when you select a tag.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Regular expression searches can be slow on high-cardinality tags, so try to use other tags to reduce the scope first. To help reduce the results, start by filtering on a particular name or namespace.
|
||||
The regular expression search can be slow on high-cardinality tags, so try to use other tags to reduce the scope first.
|
||||
To help reduce the results, start by filtering on a particular name or namespace.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Nested queries
|
||||
## Nest queries
|
||||
|
||||
Grafana lets you reference one query from another using its query letter, similar to how cell references work in a spreadsheet.
|
||||
You can reference a query by the "letter" of its row, similar to a spreadsheet.
|
||||
|
||||
For example, if you add a second query and want to build on the results of query A, you can reference it using #A.
|
||||
|
||||
This approach allows you to build compound or nested queries, making your panels more flexible and easier to manage.
|
||||
If you add a second query to a graph, you can reference the first query by entering `#A`.
|
||||
This helps you build compounded queries.
|
||||
|
||||
## Use wildcards to make fewer queries
|
||||
|
||||
To display multiple time series on the same graph, use wildcards in your query to return all matching series at once.
|
||||
To view multiple time series plotted on the same graph, use wildcards in your search to return all of the matching time series in one query.
|
||||
|
||||
For example, to monitor CPU utilization across a variety of metrics, you can use a single query like `cpu.percent.*.g` to retrieve all matching time series.
|
||||
This approach is more efficient than writing separate queries for each series, such as `cpu.percent.user.g`, `cpu.percent.system.g`, and others, which would result in multiple queries to the data source.
|
||||
For example, to see how the CPU is being utilized on a machine, you can create a graph and use the single query `cpu.percent.*.g` to retrieve all time series that match that pattern.
|
||||
This is more efficient than adding a query for each time series, such as `cpu.percent.user.g`, `cpu.percent.system.g`, and so on, which results in many queries to the data source.
|
||||
|
||||
## Apply annotations
|
||||
|
||||
[Annotations](ref:annotate-visualizations) overlay rich event information on top of graphs. You can add annotation queries in the dashboard menu's **Annotations** view.
|
||||
[Annotations](ref:annotate-visualizations) overlay rich event information on top of graphs.
|
||||
You can add annotation queries in the Dashboard menu's Annotations view.
|
||||
|
||||
Graphite supports two ways to query annotations:
|
||||
|
||||
- A regular metric query, using the `Graphite query` textbox.
|
||||
- A Graphite events query, using the `Graphite event tags` textbox with a tag, wildcard, or empty value
|
||||
|
||||
## Get Grafana metrics into Graphite
|
||||
|
||||
Grafana exposes metrics for Graphite on the `/metrics` endpoint.
|
||||
For detailed instructions, refer to [Internal Grafana metrics](ref:set-up-grafana-monitoring).
|
||||
|
||||
## Integration with Loki
|
||||
|
||||
When you change the data source to Loki in Explore, your Graphite queries are automatically converted to Loki queries. Loki label names and values are extracted based on the mapping information defined in your Graphite data source configuration. Grafana automatically transforms queries that use tags with `seriesByTags()` without requiring additional setup.
|
||||
Graphite queries get converted to Loki queries when the data source selection changes in Explore. Loki label names and values are extracted from the Graphite queries according to mappings information provided in Graphite data source configuration. Queries using tags with `seriesByTags()` are also transformed without any additional setup.
|
||||
|
||||
Refer to the Graphite data source settings for more details.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
aliases:
|
||||
- ../../data-sources/graphite/template-variables/
|
||||
description: Guide for using template variables when querying the Graphite data source.
|
||||
description: Guide for using template variables when querying the Graphite data source
|
||||
keywords:
|
||||
- grafana
|
||||
- graphite
|
||||
@@ -37,153 +37,122 @@ refs:
|
||||
# Graphite template variables
|
||||
|
||||
Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables.
|
||||
Grafana lists these variables in drop-down selection boxes at the top of the dashboard to help you change the data displayed in your dashboard.
|
||||
Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
|
||||
Grafana refers to such variables as template variables.
|
||||
|
||||
For an introduction to templating and template variables, refer to the [Templating](ref:variables) and [Add and manage variables](ref:add-template-variables) documentation.
|
||||
|
||||
To view an example templated dashboard, refer to [Graphite Templated Nested dashboard](https://play.grafana.org/d/cvDFGseGz/graphite-templated-nested).
|
||||
## Select a query type
|
||||
|
||||
## Use query variables
|
||||
There are three query types for Graphite template variables
|
||||
|
||||
With Graphite data sources, you can only create query variables. Grafana supports three specific query types for Graphite-based variables:
|
||||
|
||||
| Query type | Description | Example usage |
|
||||
| --------------------- | -------------------------------------------------------------------------------------- | ---------------------------------------- |
|
||||
| **Default query** | Allows you to dynamically list metrics, nodes, or tag values using Graphite functions. | `tag_values(apps.*.requests.count, app)` |
|
||||
| **Value query** | Returns all the values for a query that includes a metric and function. | `tag_values(apps.*.status.*, status)` |
|
||||
| **Metric name query** | Returns all the names for a query that includes a metric and function. | `apps.*.requests.count` |
|
||||
|
||||
### Choose a variable syntax
|
||||
|
||||
The Graphite data source supports two variable syntaxes for use in the **Query** field.
|
||||
|
||||

|
||||
|
||||
Grafana allows two ways to reference variables in a query:
|
||||
|
||||
| **Syntax** | **Example** |
|
||||
| ------------ | ---------------------------------------- |
|
||||
| `$varname` | `apps.frontend.$server.requests.count` |
|
||||
| `${varname}` | `apps.frontend.${server}.requests.count` |
|
||||
|
||||
- **Shorthand syntax (`$varname`)** is convenient for simple paths but doesn't work when the variable is adjacent to characters (e.g., `cpu$coreLoad`).
|
||||
- **Full syntax (`${varname}`)** is more flexible and works in any part of the string, including embedded within words.
|
||||
|
||||
Choose the format that best fits the structure of your Graphite metric path.
|
||||
| Query Type | Description |
|
||||
| ----------------- | ------------------------------------------------------------------------------- |
|
||||
| Default Query | Use functions such as `tags()`, `tag_values()`, `expand(<metric>)` and metrics. |
|
||||
| Value Query | Returns all the values for a query that includes a metric and function. |
|
||||
| Metric Name Query | Returns all the names for a query that includes a metric and function. |
|
||||
|
||||
## Use tag variables
|
||||
|
||||
Grafana supports tag-based variables for Graphite, allowing you to dynamically populate drop-downs based on tag keys and values in your metric series. To do this, use the Graphite functions `tags()` and `tag_values()` in your variable queries.
|
||||
To create a variable using tag values, use the Grafana functions `tags` and `tag_values`.
|
||||
|
||||
| Query | Description |
|
||||
| --------------------------------------- | ------------------------------------------------------------------------------------------ |
|
||||
| `tags()` | Returns a list of all tag keys in the Graphite database. |
|
||||
| `tags(server=~backend\*)` | Returns tag keys only from series that match the provided filter expression. |
|
||||
| `tag_values(server)` | Returns all values for the specified tag key. |
|
||||
| `tag_values(server, server=~backend\*)` | Returns tag values for a given key, filtered to only those that appear in matching series. |
|
||||
| Query | Description |
|
||||
| --------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
||||
| `tags()` | Returns all tags. |
|
||||
| `tags(server=~backend\*)` | Returns only tags that occur in series matching the filter expression. |
|
||||
| `tag_values(server)` | Returns tag values for the specified tag. |
|
||||
| `tag_values(server, server=~backend\*)` | Returns filtered tag values that occur for the specified tag in series matching those expressions. |
|
||||
|
||||
You can use multiple filter expressions, and those expressions can include other Grafana variables. For example:
|
||||
Multiple filter expressions and expressions can contain other variables. For example:
|
||||
|
||||
```
|
||||
tag_values(server, server=~backend\*, app=~${apps:regex})
|
||||
```
|
||||
|
||||
This query returns all server tag values from series where the `server` tag matches backend\* and the `app` tag matches the regex-filtered values from another variable ${apps}.
|
||||
|
||||
For details, refer to the [Graphite docs on the autocomplete API for tags](http://graphite.readthedocs.io/en/latest/tags.html#auto-complete-support).
|
||||
|
||||
**Using regular expression formatting and the equal tilde operator `=~`:**
|
||||
### Use multi-value variables in tag queries
|
||||
|
||||
```
|
||||
Multi-value variables in tag queries use the advanced formatting syntax for variables: `{var:regex}`.
|
||||
Non-tag queries use the default glob formatting for multi-value variables.
|
||||
|
||||
#### Tag expression example
|
||||
|
||||
**Using regex formatting and the Equal Tilde operator, `=~`:**
|
||||
|
||||
```text
|
||||
server=~${servers:regex}
|
||||
```
|
||||
|
||||
This query tells Grafana to format the selected values in the `servers` variable as a regular expression (e.g., (`server1`|`server2`) if two servers are selected).
|
||||
|
||||
For more information, refer to [Advanced variable format options](ref:variable-syntax-advanced-variable-format-options).
|
||||
|
||||
### Filter with multiple expressions
|
||||
|
||||
When using multi-value variables in tag queries, append `${var:regex}` to the variable name to apply regex formatting.
|
||||
|
||||
```
|
||||
tag_values(server, app=~${apps:regex})
|
||||
```
|
||||
|
||||
This query returns only series where the app tag matches the selected values in $`{apps}`, formatted as a regular expression. `=~` is the regular expression operator
|
||||
|
||||
Non-tag queries use the default `glob` formatting for multi-value variables.
|
||||
|
||||
## Use other query variables
|
||||
|
||||
When writing queries, use the **metric find** query type to retrieve dynamic values.
|
||||
When writing queries, use the metric find type of query.
|
||||
|
||||
For example, the query `prod.servers.*` populates the variable with all values that exist at the wildcard position (\*).
|
||||
For example, a query like `prod.servers.*` fills the variable with all possible values that exist in the wildcard position.
|
||||
|
||||
Note that the results include only the values found at the last level of the query path.
|
||||
|
||||
To return full metric paths that match your query, use the expand() function:
|
||||
|
||||
```
|
||||
expand(*.servers.*).
|
||||
```
|
||||
The results contain all possible values occurring only at the last level of the query.
|
||||
To get full metric names matching the query, use the `expand` function: `expand(*.servers.*)`.
|
||||
|
||||
### Compare expanded and non-expanded metric search results
|
||||
|
||||
When querying Graphite metrics in Grafana, you can choose between using an **expanded** or **non-expanded** query:
|
||||
The expanded query returns the full names of matching metrics.
|
||||
In combination with regular expressions, you can use it to extract any part of the metric name.
|
||||
By contrast, a non-expanded query returns only the last part of the metric name, and doesn't let you extract other parts of metric names.
|
||||
|
||||
- **Expanded queries** (using the `expand()` function) return the **full metric paths** that match your query.
|
||||
- **Non-expanded queries** return only the **last segment** of each matching metric path, which limits your ability to extract or filter based on deeper parts of the metric name.
|
||||
|
||||
Expanded queries are especially useful when working with regular expressions to match or extract specific parts of the metric path.
|
||||
|
||||
Suppose your Graphite database contains the following metrics:
|
||||
Given these example metrics:
|
||||
|
||||
- `prod.servers.001.cpu`
|
||||
- `prod.servers.002.cpu`
|
||||
- `test.servers.001.cpu`
|
||||
|
||||
The following table illustrates the difference between expanded and non-expanded queries:
|
||||
These examples demonstrate how expanded and non-expanded queries can fetch specific parts of the metrics name:
|
||||
|
||||
| **Non-expanded query** | **Results** | **Expanded query** | **Expanded results** |
|
||||
| ---------------------- | -------------- | ------------------------- | ---------------------------------------------------------------------- |
|
||||
| `*` | `prod`, `test` | `expand(*)` | `prod`, `test` |
|
||||
| `*.servers` | `servers` | `expand(*.servers)` | `prod.servers`, `test.servers` |
|
||||
| `test.servers` | `servers` | `expand(test.servers)` | `test.servers` |
|
||||
| `*.servers.*` | `001`, `002` | `expand(*.servers.*)` | `prod.servers.001`, `prod.servers.002`, `test.servers.001` |
|
||||
| `test.servers.*` | `001` | `expand(test.servers.*)` | `test.servers.001` |
|
||||
| `*.servers.*.cpu` | `cpu` | `expand(*.servers.*.cpu)` | `prod.servers.001.cpu`, `prod.servers.002.cpu`, `test.servers.001.cpu` |
|
||||
| Non-expanded query | Results | Expanded query | Expanded results |
|
||||
| ------------------ | ---------- | ------------------------- | ---------------------------------------------------------------- |
|
||||
| `*` | prod, test | `expand(*)` | prod, test |
|
||||
| `*.servers` | servers | `expand(*.servers)` | prod.servers, test.servers |
|
||||
| `test.servers` | servers | `expand(test.servers)` | test.servers |
|
||||
| `*.servers.*` | 001,002 | `expand(*.servers.*)` | prod.servers.001, prod.servers.002, test.servers.001 |
|
||||
| `test.servers.*` | 001 | `expand(test.servers.*)` | test.servers.001 |
|
||||
| `*.servers.*.cpu` | cpu | `expand(*.servers.*.cpu)` | prod.servers.001.cpu, prod.servers.002.cpu, test.servers.001.cpu |
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
A non-expanded query query works like an expanded query but returns only the final segment of each matched metric.
|
||||
{{% /admonition %}}
|
||||
The non-expanded query is the same as an expanded query, with a regex matching the last part of the name.
|
||||
|
||||
Grafana also supports **nested variables**, which allow you to reference other variables in a query.
|
||||
You can also create nested variables that use other variables in their definition.
|
||||
For example, `apps.$app.servers.*` uses the variable `$app` in its query definition.
|
||||
|
||||
For example:
|
||||
### Use `__searchFilter` to filter query variable results
|
||||
|
||||
```
|
||||
apps.$app.servers.*
|
||||
```
|
||||
You can use `__searchFilter` in the query field to filter the query result based on what the user types in the dropdown select box.
|
||||
The default value for `__searchFilter` is `*` if you've not entered anything, and `` when used as part of a regular expression.
|
||||
|
||||
This query uses the selected value of the `$app` variable to dynamically filter the metric path. The variable `$app` contains one or more application names and `servers.*` matches all servers for the given application.
|
||||
#### Search filter example
|
||||
|
||||
### Filter query variable results with `__searchFilter`
|
||||
To use `__searchFilter` as part of the query field to enable searching for `server` while the user types in the dropdown select box:
|
||||
|
||||
Grafana provides the variable `__searchFilter`, which you can use to dynamically filter query results based on what the user types into the variable drop-down.
|
||||
When the drop-down is empty or blank, `__searchFilter` defaults to `*`, which means it returns all possible values. If you type a string, Grafana replaces `__searchFilter` with that input.
|
||||
Query
|
||||
|
||||
To use `__searchFilter` as part of the query field to enable searching for `server` while the user types in the drop-down select box:
|
||||
|
||||
Query:
|
||||
|
||||
```
|
||||
```bash
|
||||
apps.$app.servers.$__searchFilter
|
||||
```
|
||||
|
||||
TagValues:
|
||||
TagValues
|
||||
|
||||
```
|
||||
```bash
|
||||
tag_values(server, server=~${__searchFilter:regex})
|
||||
```
|
||||
|
||||
## Choose a variable syntax
|
||||
|
||||

|
||||
|
||||
The Graphite data source supports two variable syntaxes for use in the **Query** field:
|
||||
|
||||
- `$<varname>`, for example `apps.frontend.$server.requests.count`, which is easier to read and write but does not allow you to use a variable in the middle of a word.
|
||||
- `${varname}`, for example `apps.frontend.${server}.requests.count`, to use in expressions like `my.server${serverNumber}.count`.
|
||||
|
||||
### Templated dashboard example
|
||||
|
||||
To view an example templated dashboard, refer to [Graphite Templated Nested dashboard](https://play.grafana.org/d/cvDFGseGz/graphite-templated-nested).
|
||||
|
||||
@@ -176,10 +176,10 @@ You can define and configure the data source in YAML files as part of Grafana's
|
||||
For more information about provisioning, and for available configuration options, refer
|
||||
to [Provision Grafana](ref:provision-grafana).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
The `database` [field is deprecated](https://github.com/grafana/grafana/pull/58647).
|
||||
Grafana recommends using the `dbName` field in `jsonData`. There is no need to change existing provisioning settings.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Provisioning examples
|
||||
|
||||
|
||||
@@ -109,9 +109,9 @@ You can also configure settings specific to the Jaeger data source. These option
|
||||
|
||||

|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you use Grafana Cloud, open a [support ticket in the Cloud Portal](/profile/org#support) to access this feature.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
The **Trace to logs** setting configures the [trace to logs feature](ref:explore-trace-integration) that is available when you integrate Grafana with Jaeger.
|
||||
|
||||
|
||||
@@ -72,9 +72,9 @@ Administrators can also [configure the data source via YAML](#provision-the-data
|
||||
|
||||
Once you've added the Loki data source, you can [configure it](#configure-the-data-source) so that your Grafana instance's users can create queries in its [query editor](query-editor/) when they [build dashboards](ref:build-dashboards), use [Explore](ref:explore), and [annotate visualizations](query-editor/#apply-annotations).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
To troubleshoot configuration and other issues, check the log file located at `/var/log/grafana/grafana.log` on Unix systems, or in `<grafana_install_dir>/data/log` on other platforms and manual installations.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Provision the data source
|
||||
|
||||
|
||||
@@ -61,9 +61,9 @@ The first option to configure is the name of your connection:
|
||||
|
||||
There are several authentication methods you can choose in the Authentication section.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Use TLS (Transport Layer Security) for an additional layer of security when working with Loki. For information on setting up TLS encryption with Loki see [Grafana Loki configuration parameters](/docs/loki/latest/configuration/).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
- **Basic authentication** - The most common authentication method. Use your `data source` user name and `data source` password to connect.
|
||||
|
||||
@@ -91,9 +91,9 @@ Use TLS (Transport Layer Security) for an additional layer of security when work
|
||||
|
||||
- **Maximum lines** - Sets the maximum number of log lines returned by Loki. Increase the limit to have a bigger results set for ad-hoc analysis. Decrease the limit if your browser is sluggish when displaying log results. The default is `1000`.
|
||||
|
||||
<!-- {{< admonition type="note" >}}
|
||||
<!-- {{% admonition type="note" %}}
|
||||
To troubleshoot configuration and other issues, check the log file located at `/var/log/grafana/grafana.log` on Unix systems, or in `<grafana_install_dir>/data/log` on other platforms and manual installations.
|
||||
{{< /admonition >}} -->
|
||||
{{% /admonition %}} -->
|
||||
|
||||
### Derived fields
|
||||
|
||||
@@ -104,9 +104,9 @@ These links appear in the [log details](ref:log-details).
|
||||
|
||||
You can add multiple derived fields.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you use Grafana Cloud, you can request modifications to this feature by clicking **Open a Support Ticket** from the Grafana Cloud Portal.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Each derived field consists of the following:
|
||||
|
||||
@@ -114,9 +114,9 @@ Each derived field consists of the following:
|
||||
|
||||
- **Type** - Defines the type of the derived field. It can be either:
|
||||
|
||||
{{< admonition type="caution" >}}
|
||||
{{% admonition type="caution" %}}
|
||||
Using complex regular expressions in either type can impact browser performance when processing large volumes of logs. Consider using simpler patterns when possible.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
- **Regex**: A regular expression to parse a part of the log message and capture it as the value of the new field. Can contain only one capture group.
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@ To switch between the editor modes, select the corresponding **Builder** and **C
|
||||
|
||||
To run a query, select **Run queries** located at the top of the editor.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
To run Loki queries in [Explore](ref:explore), select **Run query**.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Each mode is synchronized, so you can switch between them without losing your work, although there are some limitations. Builder mode doesn't support some complex queries.
|
||||
When you switch from Code mode to Builder mode with such a query, the editor displays a warning message that explains how you might lose parts of the query if you continue.
|
||||
|
||||
@@ -66,9 +66,9 @@ Grafana’s query editors are unique for each data source. For general informati
|
||||
|
||||
The MySQL query editor is located on the [Explore page](ref:explore). You can also access the MySQL query editor from a dashboard panel. Click the ellipsis in the upper right of the panel and select **Edit**.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If a default database is configured in the **Data Source Configuration page**, or via a provisioning configuration file, users will be restricted to querying only that pre-configured database. This feature is behind a feature flag and is available once you enable `sqlDatasourceDatabaseSelection`.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## MySQL query editor components
|
||||
|
||||
@@ -76,9 +76,9 @@ The MySQL query editor has two modes: **Builder** and **Code**.
|
||||
|
||||
Builder mode helps you build a query using a visual interface. Code mode allows for advanced querying and offers support for complex SQL query writing.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If your table or database name contains a reserved word or a [prohibited character](https://dev.mysql.com/doc/en/identifiers.html) the editor will put quotes around the name. For example, the name `table-name` will be quoted with backticks - `` `table-name` ``.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## MySQL Builder mode
|
||||
|
||||
@@ -121,9 +121,9 @@ To create advanced queries, switch to **Code mode** by clicking **Code** in the
|
||||
|
||||
Select **Table** or **Time Series** as the format. Click the **{}** in the bottom right to format the query. Click the **downward caret** to expand the Code mode editor. **CTRL/CMD + Return** serves as a keyboard shortcut to execute the query.
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
Changes made to a query in Code mode will not transfer to Builder mode and will be discarded. You will be prompted to copy your code to the clipboard to save any changes.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Macros
|
||||
|
||||
@@ -174,9 +174,9 @@ Table panel results:
|
||||
|
||||
Set the **Format** option to **Time series** to create and run time series queries.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
To run a time series query you must include a column named `time` that returns either a SQL datetime value or a numeric datatype representing the UNIX epoch time in seconds. Additionally, the query results must be sorted by the `time` column for proper visualization in panels.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
The examples in this section refer to the data in the following table:
|
||||
|
||||
@@ -194,9 +194,9 @@ The examples in this section refer to the data in the following table:
|
||||
|
||||
A time series query result is returned in a [wide data frame format](https://grafana.com/developers/plugin-tools/key-concepts/data-frames#wide-format). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
For backward compatibility, an exception to the aforementioned rule applies to queries returning three columns, including a string column named `metric`. Instead of converting the metric column into field labels, it is used as the field name, and the series name is set to the value of the metric column. Refer to the following example with a metric column.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Example with `metric` column:**
|
||||
|
||||
|
||||
@@ -94,13 +94,13 @@ can be used to query OpenTSDB. Fill Policy is also introduced in OpenTSDB 2.2.
|
||||
|
||||

|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
While using OpenTSDB 2.2 data source, make sure you use either Filters or Tags as they are mutually exclusive. If used together, might give you weird results.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
When using OpenTSDB 2.4 with alerting, queries are executed with the parameter `arrays=true`. This causes OpenTSDB to return data points as an array of arrays instead of a map of key-value pairs. Grafana then converts this data into the appropriate data frame format.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Auto complete suggestions
|
||||
|
||||
|
||||
@@ -111,9 +111,9 @@ For more information on how to query other Prometheus-compatible projects from G
|
||||
You can define and configure the data source in YAML files as part of Grafana's provisioning system.
|
||||
For more information about provisioning, and for available configuration options, refer to [Provisioning Grafana](ref:provisioning-data-sources).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Once you have provisioned a data source you cannot edit it.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Provisioning example
|
||||
|
||||
@@ -177,17 +177,17 @@ Add the following setting in the **[auth]** section :
|
||||
azure_auth_enabled = true
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you are using Azure authentication settings do not enable `Forward OAuth identity`. Both use the same HTTP authorization headers. Azure settings will get overwritten by the Oauth token.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Exemplars
|
||||
|
||||
Exemplars associate higher-cardinality metadata from a specific event with traditional time series data. See [Introduction to exemplars](ref:exemplars) in Prometheus documentation for detailed information on how they work.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in Prometheus v2.26 and higher with Grafana v7.4 and higher.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Grafana can show exemplars data alongside a metric both in Explore and in Dashboards.
|
||||
|
||||
|
||||
@@ -92,11 +92,11 @@ You should use the IP address of the Prometheus container, or the hostname if yo
|
||||
|
||||
There are several authentication methods you can choose in the Authentication section.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
Use TLS (Transport Layer Security) for an additional layer of security when working with Prometheus. For information on setting up TLS encryption with Prometheus see [Securing Prometheus API and UI Endpoints Using TLS Encryption](https://prometheus.io/docs/guides/tls-encryption/). You must add TLS settings to your Prometheus configuration file **prior** to setting these options in Grafana.
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
- **Basic authentication** - The most common authentication method. Use your `data source` user name and `data source` password to connect.
|
||||
|
||||
@@ -130,11 +130,11 @@ Following are additional configuration options.
|
||||
|
||||
- **Manage alerts via Alerting UI** - Toggle to enable [data source-managed rules in Grafana Alerting](ref:alerting-alert-rules) for this data source. For `Mimir`, it enables managing data source-managed rules and alerts. For `Prometheus`, it only supports viewing existing rules and alerts, which are displayed as data source-managed.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
The **Manage alerts via Alerting UI** toggle is enabled by default. You can change this behavior by setting the [default_manage_alerts_ui_toggle](../../../setup-grafana/configure-grafana/#default_manage_alerts_ui_toggle) option in the Grafana configuration file.
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Interval behavior
|
||||
|
||||
|
||||
@@ -120,18 +120,18 @@ The **Type** setting sets the query type. These include:
|
||||
|
||||
For more information, refer to the [Time Series Transform option documentation](ref:time-series-transform).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Grafana modifies the request dates for queries to align them with the dynamically calculated step.
|
||||
This ensures a consistent display of metrics data and Prometheus requires this for caching results. But, aligning the range with the step can result in a small gap of data at the right edge of a graph or change the start date of the range. For example, a 15s step aligns the range to Unix time divisible by 15s and a 1w minstep aligns the range to the start of the week on a Thursday.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Exemplars
|
||||
|
||||
Toggle **Exemplars** to run a query that includes exemplars in the graph. Exemplars are unique to Prometheus. For more information see [Introduction to exemplars](ref:exemplars).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
There is no option to add exemplars with an **Instant** query type.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Inspector
|
||||
|
||||
@@ -243,9 +243,9 @@ You can then select one or more labels shown in Step 2.
|
||||
Select one or more values in Step 3 for each label to tighten your query scope.
|
||||
In Step 4, you can select **Use query** to run the query, **Use as rate query** to add the rate operation to your query (`$__rate_interval`), **Validate selector** to verify the selector is valid and show the number of series found, or **Clear** to clear your selections and start over.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you do not remember a metric name, you can also select a few labels to narrow down the list, then find relevant label values.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
All lists in the metrics browser have a search field above them to quickly filter for metrics or labels that match a certain string.
|
||||
The values section has only one search field, and its filtering applies to all labels to help you find values across labels once selected.
|
||||
|
||||
+2
-2
@@ -120,9 +120,9 @@ That makes it much easier for the developers to replicate and solve your issue.
|
||||
|
||||
## Use a custom version of TestData
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
This feature is experimental and requires Grafana version 10.3.0 or later.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
If you want to use a version of TestData different from the one shipped with Grafana, follow these steps:
|
||||
|
||||
|
||||
@@ -102,9 +102,9 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||

|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you use Grafana Cloud, open a [support ticket in the Cloud Portal](/profile/org#support) to access this feature.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
The **Trace to logs** setting configures the [trace to logs feature](ref:trace-integration) that is available when you integrate Grafana with Zipkin.
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ The use of AngularJS in Grafana has been [deprecated](../) in favor of React. Su
|
||||
|
||||
This page explains how Grafana users might be impacted by the removal of Angular support based on plugins dependent on this legacy framework. You will also see if there is a migration option available for a given plugin.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
We are greatly appreciative of the developers who have contributed plugins to the Grafana ecosystem. Guidance on migrating a plugin to React can be found in our [migration guide](/developers/plugin-tools/migration-guides/migrate-angularjs-to-react).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## What should I do with the list of AngularJS plugins?
|
||||
|
||||
@@ -34,9 +34,9 @@ Refer to the [table below](#angularjs-based-plugins) and take the appropriate ac
|
||||
- Customers of Grafana Enterprise and users of Grafana Cloud can also leverage [usage insights](../../../dashboards/assess-dashboard-usage/) to prioritize any migration efforts.
|
||||
- Review the plugin source repositories to add your support to any migration issues or consider forking the repo.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you want to add any specific migration guidance for your plugin here or update our assessment, please open a PR by clicking **Suggest an edit** at the bottom of this page.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Private plugins
|
||||
|
||||
|
||||
@@ -203,9 +203,9 @@ Content-Type: application/json
|
||||
|
||||
`PUT /api/admin/settings`
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in Grafana Enterprise v8.0+.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Updates / removes and reloads database settings. You must provide either `updates`, `removals` or both.
|
||||
|
||||
|
||||
@@ -21,18 +21,18 @@ title: 'Authentication HTTP API '
|
||||
|
||||
The Authentication HTTP API is used to manage API keys.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Grafana recommends using service accounts instead of API keys. For more information, refer to [Grafana service account API reference](../serviceaccount/).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you would need to have relevant permissions. Refer to [Role-based access control permissions](../../../administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## List API keys
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
This endpoint is deprecated.
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
`GET /api/auth/keys`
|
||||
|
||||
@@ -80,10 +80,10 @@ Content-Type: application/json
|
||||
|
||||
## Create API Key
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
This endpoint has been made obsolete in Grafana 11.3.0.
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Endpoint is obsolete and has been moved to [Grafana service account API](../serviceaccount/). For more information, refer to [Migrate to Grafana service account API](/docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/migrate-api-keys/).
|
||||
|
||||
@@ -100,11 +100,11 @@ Content-Type: application/json
|
||||
|
||||
## Delete API Key
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
|
||||
### DEPRECATED
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
`DELETE /api/auth/keys/:id`
|
||||
|
||||
|
||||
@@ -262,9 +262,9 @@ Status Codes:
|
||||
|
||||
## Hard delete dashboard by uid
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
This feature is currently in private preview and behind the `dashboardRestore` feature toggle.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
`DELETE /api/dashboards/uid/:uid/trash`
|
||||
|
||||
@@ -312,9 +312,9 @@ Status Codes:
|
||||
|
||||
## Restore deleted dashboard by uid
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
This feature is currently in private preview and behind the `dashboardRestore` feature toggle.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
`PATCH /api/dashboards/uid/:uid/trash`
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ refs:
|
||||
|
||||
# Shared Dashboards API
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
If you're running Grafana Enterprise, you'll need to have specific permissions for some endpoints. Refer to [Role-based access control permissions](ref:role-based-access-control-permissions) for more information.
|
||||
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Create a shared dashboard
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ title: Data source HTTP API
|
||||
|
||||
`GET /api/datasources`
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
This API currently doesn't handle pagination. The default maximum number of data sources returned is 5000. You can change this value in the default.ini file.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Required permissions**
|
||||
|
||||
@@ -84,9 +84,9 @@ Content-Type: application/json
|
||||
|
||||
`GET /api/datasources/:datasourceId`
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
This API is deprecated since Grafana v9.0.0 and will be removed in a future release. Refer to the [API for getting a single data source by UID](#get-a-single-data-source-by-uid) or to the [API for getting a single data source by its name](#get-a-single-data-source-by-name).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Required permissions**
|
||||
|
||||
@@ -351,9 +351,9 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
By defining `password` and `basicAuthPassword` under `secureJsonData` Grafana encrypts them securely as an encrypted blob in the database. The response then lists the encrypted fields under `secureJsonFields`.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Example Graphite Request with basic auth enabled**:
|
||||
|
||||
@@ -440,9 +440,9 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
`PUT /api/datasources/:datasourceId`
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
This API is deprecated since Grafana v9.0.0 and will be removed in a future release. Refer to the [new data source update API](#update-an-existing-data-source).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Required permissions**
|
||||
|
||||
@@ -519,9 +519,9 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Similar to [creating a data source](#create-a-data-source), `password` and `basicAuthPassword` should be defined under `secureJsonData` in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under `secureJsonFields` section in the response.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Update an existing data source
|
||||
|
||||
@@ -603,17 +603,17 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Similar to [creating a data source](#create-a-data-source), `password` and `basicAuthPassword` should be defined under `secureJsonData` in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under `secureJsonFields` section in the response.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Delete an existing data source by id
|
||||
|
||||
`DELETE /api/datasources/:datasourceId`
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
This API is deprecated since Grafana v9.0.0 and will be removed in a future release. Refer to the [API for deleting an existing data source by UID](#delete-an-existing-data-source-by-uid) or to the [API for deleting an existing data source by its name](#delete-an-existing-data-source-by-name)
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Required permissions**
|
||||
|
||||
@@ -715,9 +715,9 @@ Content-Type: application/json
|
||||
|
||||
## Data source proxy calls by id
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
This API is deprecated since Grafana v9.0.0 and will be removed in a future release. Refer to the [new data source API for proxying requests](#data-source-proxy-calls).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
`GET /api/datasources/proxy/:datasourceId/*`
|
||||
|
||||
@@ -791,9 +791,9 @@ Content-Type: application/json
|
||||
|
||||
## Fetch data source resources by id
|
||||
|
||||
{{< admonition type="warning" >}}
|
||||
{{% admonition type="warning" %}}
|
||||
This API is deprecated since Grafana v9.0.0 and will be removed in a future release. Refer to the [new data source resources API](#fetch-data-source-resources).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
`GET /api/datasources/:datasourceId/resources/*`
|
||||
|
||||
@@ -893,9 +893,9 @@ Queries a data source having a backend implementation.
|
||||
|
||||
`POST /api/ds/query`
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Grafana's built-in data sources usually have a backend implementation.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Example request for the Test data source**:
|
||||
|
||||
|
||||
@@ -21,9 +21,9 @@ The Group Attribute Sync API allows you to configure [group attribute sync featu
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise) and [Grafana Cloud](https://grafana.com/docs/grafana-cloud/)
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
This feature is currently in [private preview](https://grafana.com/docs/release-life-cycle/#private-preview) and behind the `groupAttributeSync` feature toggle. Please contact support to have this feature enabled.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## List group mappings
|
||||
|
||||
|
||||
@@ -441,9 +441,9 @@ Status Codes:
|
||||
|
||||
Deletes an existing library element as specified by the UID. This operation cannot be reverted.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
You cannot delete a library element that is connected. This operation cannot be reverted.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Example Request**:
|
||||
|
||||
|
||||
@@ -75,9 +75,9 @@ Status codes:
|
||||
|
||||
## Add license
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in Grafana Enterprise v7.4+.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
`POST /api/licensing/token`
|
||||
|
||||
@@ -151,9 +151,9 @@ Status Codes:
|
||||
|
||||
## Manually force license refresh
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in Grafana Enterprise v7.4+.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
`POST /api/licensing/token/renew`
|
||||
|
||||
@@ -212,9 +212,9 @@ Status Codes:
|
||||
|
||||
## Remove license from database
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available in Grafana Enterprise v7.4+.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
`DELETE /api/licensing/token`
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ title: Query and Resource Caching HTTP API
|
||||
|
||||
# Query and resource caching API
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Enable caching for a data source
|
||||
|
||||
|
||||
@@ -69,9 +69,9 @@ JSON Body schema:
|
||||
- **key** - Optional. Define the unique key. Required if **external** is `true`.
|
||||
- **deleteKey** - Optional. Unique key used to delete the snapshot. It is different from the **key** so that only the creator can delete the snapshot. Required if **external** is `true`.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Example Response**:
|
||||
|
||||
|
||||
@@ -22,9 +22,9 @@ title: SSO Settings API
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Available since Grafana 11. SAML support is in public preview behind the `ssoSettingsSAML` feature flag.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
The API can be used to create, update, delete, get, and list SSO Settings for OAuth2 and SAML.
|
||||
|
||||
@@ -167,11 +167,11 @@ Grafana verifies whether the given settings are allowed and valid.
|
||||
If they are, then Grafana stores the settings in the database and reloads
|
||||
Grafana services with no need to restart the instance.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you run Grafana in high availability mode, configuration changes
|
||||
may not get applied to all Grafana instances immediately. You may need
|
||||
to wait a few minutes for the configuration to propagate to all Grafana instances.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
**Required permissions**
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ weight: 20
|
||||
|
||||
# Correlations Editor in Explore
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
The Explore editor is available in 10.1 and later versions. In the editor, transformations is available in Grafana 10.3 and later versions.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
Correlations allow users to build a link between any two data sources. For more information about correlations in general, please see the [correlations](/docs/grafana/<GRAFANA_VERSION>/administration/correlations/) topic in the administration page.
|
||||
|
||||
|
||||
@@ -127,10 +127,10 @@ Select **Mixed** from the data source dropdown to run queries across multiple da
|
||||
|
||||
When using Explore, the URL in the browser address bar updates as you make changes to the queries. You can share or bookmark this URL.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Explore may generate long URLs, which some tools, like messaging or videoconferencing applications, might truncate due to fixed message lengths. In such cases, Explore displays a warning and loads a default state.
|
||||
If you encounter issues when sharing Explore links in these applications, you can generate shortened links. See [Share shortened link](#share-shortened-link) for more information.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Generate Explore URLs from external tools
|
||||
|
||||
|
||||
@@ -16,17 +16,17 @@ weight: 10
|
||||
|
||||
Grafana Explore provides a variety of tools to help manage your queries.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
For help with debugging queries, Explore allows you to investigate query requests and responses, as well as query statistics, via the Query inspector. Refer to [Query inspector in Explore](/docs/grafana/<GRAFANA_VERSION>/explore/explore-inspector/) for more information.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
## Query history
|
||||
|
||||
Query history contains the list of queries that you created in Explore. This history is stored in the Grafana database and isn't shared with other users. The retention period for a query history is **two weeks**. Queries older than two weeks are automatically deleted.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Starred queries aren't subject to the two-week retention period and aren't deleted.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
To view your query history:
|
||||
|
||||
@@ -65,9 +65,9 @@ Filter query history in both the **Query history** and **Starred** tabs by data
|
||||
1. Click the **Filter queries for specific data source(s)** field.
|
||||
1. Select the data source in the dropdown by which you want to filter your history. You can select multiple data sources.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Queries with the **Mixed** data source appear only when filtering for "Mixed" and not when filtering by individual data source.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
You can also filter queries by date using the vertical slider:
|
||||
|
||||
@@ -87,8 +87,8 @@ You can customize your query history in the **Settings** tab.
|
||||
|
||||
Toggle **Change the default active tab from "Query history" to "Starred"** to make the **Starred tab** the default active tab.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Query history settings are global, and applied to both panels in split mode.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
<!-- All queries that have been starred in the Query history tab are displayed in the Starred tab. This allows you to access your favorite queries faster and to reuse these queries without typing them from scratch. -->
|
||||
|
||||
@@ -100,14 +100,14 @@ If the query is updated to select and group by more than just one string column,
|
||||
|
||||
In this case the labels that represent the dimensions will have two keys based on the two string typed columns `Location` and `Sensor`. This data results four series: `Temp {Location=LGA,Sensor=A}`, `Temp {Location=LGA,Sensor=B}`, `Temp {Location=BOS,Sensor=A}`, and `Temp {Location=BOS,Sensor=B}`.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
More than one dimension is currently only supported in the Logs queries within the Azure Monitor service as of version 7.1.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Multiple dimensions are not supported in a way that maps to multiple alerts in Grafana, but rather they are treated as multiple conditions to a single alert.
|
||||
For more information, see the documentation on [creating alerts with multiple series](ref:create-grafana-managed-rule).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
### Multiple values
|
||||
|
||||
|
||||
@@ -16,9 +16,9 @@ weight: 200
|
||||
|
||||
This topic helps you get started with Grafana and build your first dashboard using the built-in `Grafana` data source. To learn more about Grafana, refer to [Introduction to Grafana](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/introduction/).
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Grafana also offers a [free account with Grafana Cloud](/signup/cloud/connect-account?pg=gsdocs) to help getting started even easier and faster. You can install Grafana to self-host or get a free Grafana Cloud account.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
#### Install Grafana
|
||||
|
||||
|
||||
@@ -42,9 +42,9 @@ Prometheus node_exporter is a widely used tool that exposes system metrics. For
|
||||
|
||||
When you run node_exporter locally, navigate to `http://localhost:9100/metrics` to check that it is exporting metrics.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
The instructions in the referenced topic are intended for Linux users. You may have to alter the instructions slightly depending on your operating system. For example, if you are on Windows, use the [windows_exporter](https://github.com/prometheus-community/windows_exporter) instead.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
#### Install and configure Prometheus
|
||||
|
||||
@@ -108,9 +108,9 @@ remote_write:
|
||||
password: <Your Grafana.com API Key>
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
To configure your Prometheus instance to work with Grafana locally instead of Grafana Cloud, install Grafana [here](/grafana/download) and follow the configuration steps listed [here](/docs/grafana/latest/datasources/prometheus/#configure-the-data-source).
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
#### Check Prometheus metrics in Grafana Explore view
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user