Compare commits
230 Commits
sriram/SQL
...
v11.2.3+se
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9840d56957 | ||
|
|
ecc4799abc | ||
|
|
17012180c7 | ||
|
|
742c101ba4 | ||
|
|
0968388f88 | ||
|
|
6a5aeba21c | ||
|
|
39d9542f7f | ||
|
|
3965e68c8d | ||
|
|
da025b1bd3 | ||
|
|
7db056f19b | ||
|
|
74c59a7ab3 | ||
|
|
a0819a1f33 | ||
|
|
09cfd78a21 | ||
|
|
65fd818f9e | ||
|
|
56cf32e5eb | ||
|
|
dd1d25e21d | ||
|
|
ed33d8c6de | ||
|
|
b014f56c1c | ||
|
|
c6652ff5e1 | ||
|
|
29bba2362b | ||
|
|
db61b04c40 | ||
|
|
b500645bfe | ||
|
|
422b1ef402 | ||
|
|
1833377202 | ||
|
|
86e3ac0021 | ||
|
|
ba1d98e1d8 | ||
|
|
d0df683dd5 | ||
|
|
2e16baaa96 | ||
|
|
c4b8303799 | ||
|
|
35b3075d06 | ||
|
|
c7307f997d | ||
|
|
ce8db62c7b | ||
|
|
c9170b1435 | ||
|
|
f61a60f54b | ||
|
|
7621bd81b1 | ||
|
|
32e5641d57 | ||
|
|
8e6a4a89cc | ||
|
|
ba97691498 | ||
|
|
9282416f04 | ||
|
|
5d7c632d09 | ||
|
|
46e36d9cf9 | ||
|
|
e3a857e995 | ||
|
|
e763dc131a | ||
|
|
30a453daa1 | ||
|
|
4257f271b9 | ||
|
|
2cb798867c | ||
|
|
a3b88d9acc | ||
|
|
b97bb8c00e | ||
|
|
a38d360c14 | ||
|
|
7a5cbfe63f | ||
|
|
3cadd8a08b | ||
|
|
8975349a60 | ||
|
|
466d6357be | ||
|
|
581c0a8303 | ||
|
|
5e8d55a6c2 | ||
|
|
2180350661 | ||
|
|
a3148e44d0 | ||
|
|
095381648b | ||
|
|
68d614e804 | ||
|
|
4d63bb168c | ||
|
|
7a59b2e420 | ||
|
|
9091aea5d3 | ||
|
|
bd013f70e0 | ||
|
|
13d48d3aa3 | ||
|
|
e9ba21cd12 | ||
|
|
028d42a074 | ||
|
|
d39c09f9df | ||
|
|
10fb1a962d | ||
|
|
7ca022d2a7 | ||
|
|
1c7ac3ba1a | ||
|
|
f3aa6fb1ae | ||
|
|
221ba4c40b | ||
|
|
986a6365b0 | ||
|
|
7573fc4152 | ||
|
|
40f4fb910f | ||
|
|
fa8f24152b | ||
|
|
a1b8d25f79 | ||
|
|
321f8f4226 | ||
|
|
ce420e947c | ||
|
|
a54099302f | ||
|
|
66241d9fd3 | ||
|
|
62d242b74e | ||
|
|
5abb9a8632 | ||
|
|
a7391bcf88 | ||
|
|
3fec301401 | ||
|
|
cd2a40fe02 | ||
|
|
694f58457e | ||
|
|
ee24e8a5cb | ||
|
|
402ea5c942 | ||
|
|
56d00c9a52 | ||
|
|
b011fb67be | ||
|
|
c7bf62875b | ||
|
|
643abb3873 | ||
|
|
44da28e3f1 | ||
|
|
1dd04a4014 | ||
|
|
8a8d329862 | ||
|
|
6916c872e2 | ||
|
|
db6e10e9df | ||
|
|
cc1742b52b | ||
|
|
62193aeab6 | ||
|
|
e199e4f723 | ||
|
|
0e89fdd5bb | ||
|
|
6e92c4f96e | ||
|
|
ec8b4dcada | ||
|
|
4c78ce50fc | ||
|
|
a53321a823 | ||
|
|
0a0e41a085 | ||
|
|
53508d4a84 | ||
|
|
8e14f42b3a | ||
|
|
09cad05ab7 | ||
|
|
65e7953827 | ||
|
|
f051013f4e | ||
|
|
97a74d9e17 | ||
|
|
fc2d84152d | ||
|
|
aab97696db | ||
|
|
f7749c0e9a | ||
|
|
e639f57530 | ||
|
|
15e50cf3a0 | ||
|
|
16b5104b7c | ||
|
|
74910cf4cd | ||
|
|
294ab18aab | ||
|
|
4e3c323b6b | ||
|
|
d5ee8add4d | ||
|
|
077bf870cb | ||
|
|
2595d4372b | ||
|
|
54f9d30528 | ||
|
|
7e3b068df2 | ||
|
|
46b7f9e178 | ||
|
|
d20d7a834b | ||
|
|
e3f074d56b | ||
|
|
b20245e270 | ||
|
|
121f02ab5c | ||
|
|
8561d54197 | ||
|
|
e87144f39f | ||
|
|
915560a798 | ||
|
|
e40215a396 | ||
|
|
6ce136619f | ||
|
|
9d7e32979d | ||
|
|
32390fb7ee | ||
|
|
9cad6743f7 | ||
|
|
26724ae652 | ||
|
|
30838c8bc3 | ||
|
|
3950c4b15b | ||
|
|
265754c5eb | ||
|
|
4537ee95a6 | ||
|
|
d7ce7fd2d9 | ||
|
|
725d162e30 | ||
|
|
4f332e26e2 | ||
|
|
ccb75927b5 | ||
|
|
9c24dcc045 | ||
|
|
a8aefb1386 | ||
|
|
2a88694fd3 | ||
|
|
a7867bd1c1 | ||
|
|
117db76599 | ||
|
|
391a10d83b | ||
|
|
ab3d70ae21 | ||
|
|
34734d46af | ||
|
|
2f6c87fe62 | ||
|
|
777de57319 | ||
|
|
e118342401 | ||
|
|
db912c8722 | ||
|
|
312471f3e5 | ||
|
|
7f6d1721ba | ||
|
|
a259af31b1 | ||
|
|
700231ae69 | ||
|
|
5d6262a5e1 | ||
|
|
d79822db37 | ||
|
|
b9f332b9a7 | ||
|
|
da124f95c1 | ||
|
|
4d75af6311 | ||
|
|
38db7f80c0 | ||
|
|
29097df7ed | ||
|
|
8c1926a422 | ||
|
|
00ff74cc96 | ||
|
|
811307c46b | ||
|
|
7a25060fa6 | ||
|
|
5b5d067df0 | ||
|
|
1247fba905 | ||
|
|
df4dab6846 | ||
|
|
858d5e4381 | ||
|
|
278681f173 | ||
|
|
c7380fe642 | ||
|
|
a919c7561b | ||
|
|
e23f74f1c7 | ||
|
|
41f3657c45 | ||
|
|
a37d107c58 | ||
|
|
4115a67a42 | ||
|
|
25c9b9d58e | ||
|
|
0c1d03e21a | ||
|
|
403cef5b4c | ||
|
|
f8f30409e0 | ||
|
|
d76b8f6ca8 | ||
|
|
033f3b9428 | ||
|
|
eb8515406b | ||
|
|
ab8925f269 | ||
|
|
347ddcaa52 | ||
|
|
709e298cac | ||
|
|
37ee9e22b5 | ||
|
|
41b48033e7 | ||
|
|
aaac1a71a3 | ||
|
|
137fe58888 | ||
|
|
dab84e082d | ||
|
|
56c374ce11 | ||
|
|
7d8b677a49 | ||
|
|
990794250f | ||
|
|
5bac99ea1e | ||
|
|
a29d3d1669 | ||
|
|
15e926509b | ||
|
|
b6cfc2839c | ||
|
|
88ae7edcc9 | ||
|
|
f818808690 | ||
|
|
c16e4f1e86 | ||
|
|
6d288f1d14 | ||
|
|
317fe580c1 | ||
|
|
d0d24ab6dc | ||
|
|
8fe38f7d7c | ||
|
|
b9e53539ca | ||
|
|
2e093b32bd | ||
|
|
497ebb5c5c | ||
|
|
b8f8280220 | ||
|
|
3d224addeb | ||
|
|
28ce23e337 | ||
|
|
3b37be93e9 | ||
|
|
59476ab8f8 | ||
|
|
3e0bf2fea6 | ||
|
|
64ace35959 | ||
|
|
95c28eb046 | ||
|
|
51f69cbba9 | ||
|
|
abf09e2f7f | ||
|
|
59e28f82a1 |
@@ -3157,9 +3157,7 @@ exports[`better eslint`] = {
|
||||
],
|
||||
"public/app/features/dashboard/components/GenAI/GenAIHistory.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"]
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"]
|
||||
],
|
||||
"public/app/features/dashboard/components/GenAI/MinimalisticPagination.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
|
||||
|
||||
661
.drone.yml
661
.drone.yml
File diff suppressed because it is too large
Load Diff
9
.github/CODEOWNERS
vendored
9
.github/CODEOWNERS
vendored
@@ -43,12 +43,12 @@
|
||||
/docs/sources/dashboards/ @imatwawana
|
||||
/docs/sources/datasources/ @jdbaldry
|
||||
/docs/sources/explore/ @grafana/explore-squad @lwandz13
|
||||
/docs/sources/fundamentals @chri2547
|
||||
/docs/sources/getting-started/ @chri2547
|
||||
/docs/sources/introduction/ @chri2547
|
||||
/docs/sources/fundamentals @irenerl24
|
||||
/docs/sources/getting-started/ @irenerl24
|
||||
/docs/sources/introduction/ @irenerl24
|
||||
/docs/sources/panels-visualizations/ @imatwawana
|
||||
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/setup-grafana/ @chri2547
|
||||
/docs/sources/setup-grafana/ @irenerl24
|
||||
/docs/sources/upgrade-guide/ @imatwawana
|
||||
/docs/sources/whatsnew/ @imatwawana
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
/.golangci.toml @grafana/grafana-backend-group
|
||||
/build.go @grafana/grafana-backend-services-squad
|
||||
/scripts/modowners/ @grafana/grafana-backend-services-squad
|
||||
/scripts/go-workspace @grafana/grafana-app-platform-squad
|
||||
/hack/ @grafana/grafana-app-platform-squad
|
||||
|
||||
/apps/alerting/ @grafana/alerting-backend
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -47,4 +47,4 @@ Fixes #
|
||||
Please check that:
|
||||
- [ ] It works as expected from a user's perspective.
|
||||
- [ ] If this is a pre-GA feature, it is behind a feature toggle.
|
||||
- [ ] The docs are updated, and if this is a [notable improvement](https://grafana.com/docs/writers-toolkit/writing-guide/contribute-release-notes/#how-to-determine-if-content-belongs-in-a-whats-new-document), it's added to our [What's New](https://grafana.com/docs/writers-toolkit/writing-guide/contribute-release-notes/) doc.
|
||||
- [ ] The docs are updated, and if this is a [notable improvement](https://grafana.com/docs/writers-toolkit/contribute/release-notes/#how-to-determine-if-content-belongs-in-whats-new), it's added to our [What's New](https://grafana.com/docs/writers-toolkit/contribute/release-notes/) doc.
|
||||
|
||||
13
.github/workflows/changelog.yml
vendored
13
.github/workflows/changelog.yml
vendored
@@ -66,8 +66,15 @@ jobs:
|
||||
sparse-checkout: |
|
||||
.github/workflows
|
||||
CHANGELOG.md
|
||||
.nvmrc
|
||||
.prettierignore
|
||||
.prettierrc.js
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
- name: Setup nodejs environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: "Configure git user"
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
@@ -111,9 +118,11 @@ jobs:
|
||||
fi
|
||||
|
||||
git diff CHANGELOG.md
|
||||
git add CHANGELOG.md
|
||||
|
||||
- name: "Prettify CHANGELOG.md"
|
||||
run: npx prettier --write CHANGELOG.md
|
||||
- name: "Commit changelog changes"
|
||||
run: git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
- name: "git push"
|
||||
if: ${{ inputs.dry_run }} != true
|
||||
run: git push
|
||||
|
||||
2
.github/workflows/go_lint.yml
vendored
2
.github/workflows/go_lint.yml
vendored
@@ -27,6 +27,6 @@ jobs:
|
||||
with:
|
||||
version: v1.59.1
|
||||
args: |
|
||||
--config .golangci.toml --max-same-issues=0 --max-issues-per-linter=0 --verbose ./pkg/... ./pkg/apiserver/... ./pkg/apimachinery/... ./pkg/promlib/... ./pkg/semconv/... ./pkg/storage/unified/resource/...
|
||||
--config .golangci.toml --max-same-issues=0 --max-issues-per-linter=0 --verbose $(./scripts/go-workspace/golangci-lint-includes.sh)
|
||||
skip-cache: true
|
||||
install-mode: binary
|
||||
|
||||
@@ -1,38 +1,21 @@
|
||||
name: "publish-technical-documentation-next"
|
||||
name: publish-technical-documentation-next
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- main
|
||||
paths:
|
||||
- "docs/sources/**"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
if: github.repository == 'grafana/grafana'
|
||||
runs-on: "ubuntu-latest"
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Publish to website repository (next)"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-next"
|
||||
- uses: actions/checkout@v4
|
||||
- uses: grafana/writers-toolkit/publish-technical-documentation@publish-technical-documentation/v1
|
||||
with:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/next"
|
||||
website_directory: content/docs/grafana/next
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: "publish-technical-documentation-release"
|
||||
name: publish-technical-documentation-release
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -12,63 +12,18 @@ on:
|
||||
jobs:
|
||||
sync:
|
||||
if: github.repository == 'grafana/grafana'
|
||||
runs-on: "ubuntu-latest"
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Checkout Actions library"
|
||||
uses: "actions/checkout@v4"
|
||||
- uses: grafana/writers-toolkit/publish-technical-documentation-release@publish-technical-documentation-release/v1
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: "./actions"
|
||||
|
||||
- name: "Install Actions from library"
|
||||
run: "npm install --production --prefix ./actions"
|
||||
|
||||
- name: "Determine if there is a matching release tag"
|
||||
id: "has-matching-release-tag"
|
||||
uses: "./actions/has-matching-release-tag"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
|
||||
release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$"
|
||||
|
||||
- name: "Determine technical documentation version"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./actions/docs-target"
|
||||
id: "target"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Switch to HEAD of version branch for tags"
|
||||
# Tags aren't necessarily made to the HEAD of the version branch.
|
||||
# The documentation to be published is always on the HEAD of the version branch.
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true' && github.ref_type == 'tag'"
|
||||
run: "git switch --detach origin/${{ steps.target.outputs.target }}.x"
|
||||
|
||||
- name: "Publish to website repository (release)"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-release"
|
||||
with:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"
|
||||
release_branch_with_patch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
|
||||
website_directory: content/docs/grafana
|
||||
version_suffix: ""
|
||||
|
||||
8
.github/workflows/release-pr.yml
vendored
8
.github/workflows/release-pr.yml
vendored
@@ -69,6 +69,10 @@ jobs:
|
||||
fetch-depth: '0'
|
||||
fetch-tags: 'false'
|
||||
path: .grafana-main
|
||||
- name: Setup nodejs environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: Configure git user
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
@@ -115,7 +119,9 @@ jobs:
|
||||
rm -f CHANGELOG.part changelog_items.md
|
||||
|
||||
git diff CHANGELOG.md
|
||||
|
||||
|
||||
- name: "Prettify CHANGELOG.md"
|
||||
run: npx prettier --write CHANGELOG.md
|
||||
- name: Commit CHANGELOG.md changes
|
||||
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
|
||||
|
||||
270
CHANGELOG.md
270
CHANGELOG.md
@@ -1,3 +1,273 @@
|
||||
<!-- 11.2.2+security-01 START -->
|
||||
|
||||
# 11.2.2+security-01 (2024-10-17)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **SQL Expressions**: Fixes CVE-2024-9264
|
||||
|
||||
<!-- 11.2.2+security-01 END -->
|
||||
<!-- 11.2.2 START -->
|
||||
|
||||
# 11.2.2 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93353](https://github.com/grafana/grafana/pull/93353), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
- **Data sources:** Hide the datasource redirection banner for users who can't interact with data sources [#93103](https://github.com/grafana/grafana/pull/93103), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix preview of silences when label name contains spaces [#93051](https://github.com/grafana/grafana/pull/93051), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Make query wrapper match up datasource UIDs if necessary [#93114](https://github.com/grafana/grafana/pull/93114), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93705](https://github.com/grafana/grafana/pull/93705), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Improve resource picker efficiency [#93440](https://github.com/grafana/grafana/pull/93440), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Remove Basic Logs retention warning [#93123](https://github.com/grafana/grafana/pull/93123), [@aangelisc](https://github.com/aangelisc)
|
||||
- **CloudWatch:** Fix segfault when migrating legacy queries [#93544](https://github.com/grafana/grafana/pull/93544), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93676](https://github.com/grafana/grafana/pull/93676), [@ifrost](https://github.com/ifrost)
|
||||
- **DashboardScene:** Fix broken error handling and error rendering [#93690](https://github.com/grafana/grafana/pull/93690), [@torkelo](https://github.com/torkelo)
|
||||
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93488](https://github.com/grafana/grafana/pull/93488), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 11.2.2 END -->
|
||||
<!-- 11.2.1+security-01 START -->
|
||||
|
||||
# 11.2.1+security-01 (2024-10-17)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **SQL Expressions**: Fixes CVE-2024-9264
|
||||
|
||||
<!-- 11.2.1+security-01 END -->
|
||||
<!-- 11.2.1 START -->
|
||||
|
||||
# 11.2.1 (2024-09-26)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Support for optimistic concurrency in priovisioning Tempate API [#92251](https://github.com/grafana/grafana/pull/92251), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Logs panel:** Enable displayedFields in dashboards and apps [#92675](https://github.com/grafana/grafana/pull/92675), [@matyax](https://github.com/matyax)
|
||||
- **State timeline:** Add pagination support [#92257](https://github.com/grafana/grafana/pull/92257), [@kevinputera](https://github.com/kevinputera)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Authn:** No longer hash service account token twice during authentication [#92639](https://github.com/grafana/grafana/pull/92639), [@kalleep](https://github.com/kalleep)
|
||||
- **CloudMigrations:** Fix snapshot creation on Windows systems [#92981](https://github.com/grafana/grafana/pull/92981), [@macabu](https://github.com/macabu)
|
||||
- **DashGPT:** Fixes issue with generation on Safari [#92952](https://github.com/grafana/grafana/pull/92952), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Dashboard:** Fix Annotation runtime error when a data source does not support annotations [#92830](https://github.com/grafana/grafana/pull/92830), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Grafana SQL:** Fix broken import in NumberInput component [#92808](https://github.com/grafana/grafana/pull/92808), [@chessman](https://github.com/chessman)
|
||||
- **Logs:** Show older logs button when infinite scroll is enabled and sort order is descending [#92867](https://github.com/grafana/grafana/pull/92867), [@matyax](https://github.com/matyax)
|
||||
- **RBAC:** Fix an issue with server admins not being able to manage users in orgs that they don't belong to [#92274](https://github.com/grafana/grafana/pull/92274), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **RBAC:** Fix an issue with server admins not being able to manage users in orgs that they don't belong to (Enterprise)
|
||||
- **Reporting:** Disable dashboardSceneSolo when rendering PDFs the old way (Enterprise)
|
||||
- **Templating:** Fix searching non-latin template variables [#92893](https://github.com/grafana/grafana/pull/92893), [@leeoniya](https://github.com/leeoniya)
|
||||
- **TutorialCard:** Fix link to tutorial not opening [#92647](https://github.com/grafana/grafana/pull/92647), [@eledobleefe](https://github.com/eledobleefe)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **AutoSizeInput:** Allow to be controlled by value [#92999](https://github.com/grafana/grafana/pull/92999), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
|
||||
<!-- 11.2.1 END -->
|
||||
<!-- 11.2.0 START -->
|
||||
|
||||
# 11.2.0 (2024-08-27)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **@grafana/data:** Introduce new getTagKeys/getTagValues response interface [#88369](https://github.com/grafana/grafana/pull/88369), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **AWS:** Update deprecated aws-sdk functions from env variable versions [#89643](https://github.com/grafana/grafana/pull/89643), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Alerting:** Add ha_reconnect_timeout configuration option [#88823](https://github.com/grafana/grafana/pull/88823), [@JacobValdemar](https://github.com/JacobValdemar)
|
||||
- **Alerting:** Add setting for maximum allowed rule evaluation results [#89468](https://github.com/grafana/grafana/pull/89468), [@alexander-akhmetov](https://github.com/alexander-akhmetov)
|
||||
- **Alerting:** Add warning in telegram contact point [#89397](https://github.com/grafana/grafana/pull/89397), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Central alert history part4 [#90088](https://github.com/grafana/grafana/pull/90088), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Don't crash the page when trying to filter rules by regex [#89466](https://github.com/grafana/grafana/pull/89466), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Enable remote primary mode using feature toggles [#88976](https://github.com/grafana/grafana/pull/88976), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Alerting:** Hide edit/view rule buttons according to deleting/creating state [#90375](https://github.com/grafana/grafana/pull/90375), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Implement UI for grafana-managed recording rules [#90360](https://github.com/grafana/grafana/pull/90360), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Improve performance of /api/prometheus for large numbers of alerts. [#89268](https://github.com/grafana/grafana/pull/89268), [@stevesg](https://github.com/stevesg)
|
||||
- **Alerting:** Include a list of ref_Id and aggregated datasource UIDs to alerts when state reason is NoData [#88819](https://github.com/grafana/grafana/pull/88819), [@wasim-nihal](https://github.com/wasim-nihal)
|
||||
- **Alerting:** Instrument outbound requests for Loki Historian and Remote Alertmanager with tracing [#89185](https://github.com/grafana/grafana/pull/89185), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Limit instances on alert detail view unless in instances tab [#89368](https://github.com/grafana/grafana/pull/89368), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Make alert group editing safer [#88627](https://github.com/grafana/grafana/pull/88627), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Make whitespace more visible on labels [#90223](https://github.com/grafana/grafana/pull/90223), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Remove option to return settings from api/v1/receivers and restrict provisioning action access [#90861](https://github.com/grafana/grafana/pull/90861), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Resend resolved notifications for ResolvedRetention duration [#88938](https://github.com/grafana/grafana/pull/88938), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Show Insights page only on cloud (when required ds's are available) [#89679](https://github.com/grafana/grafana/pull/89679), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Show repeat interval in timing options meta [#89414](https://github.com/grafana/grafana/pull/89414), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Support median in reduce expressions [#91119](https://github.com/grafana/grafana/pull/91119), [@alexander-akhmetov](https://github.com/alexander-akhmetov)
|
||||
- **Alerting:** Track central ash interactions [#90330](https://github.com/grafana/grafana/pull/90330), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Update alerting state history API to authorize access using RBAC [#89579](https://github.com/grafana/grafana/pull/89579), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Update warning message for Telegram parse_mode and default to empty value [#89630](https://github.com/grafana/grafana/pull/89630), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Use Runbook URL label everywhere and add validation in the alert rule… [#90523](https://github.com/grafana/grafana/pull/90523), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Use cloud notifier types for metadata on Cloud AMs [#91054](https://github.com/grafana/grafana/pull/91054), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Use stable identifier of a group when export to HCL [#90196](https://github.com/grafana/grafana/pull/90196), [@KyriosGN0](https://github.com/KyriosGN0)
|
||||
- **Alerting:** Use stable identifier of a group,contact point,mute timing when export to HCL [#90917](https://github.com/grafana/grafana/pull/90917), [@KyriosGN0](https://github.com/KyriosGN0)
|
||||
- **Alertmanager:** Support limits for silences [#90826](https://github.com/grafana/grafana/pull/90826), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Angular deprecation:** Disable dynamic angular inspector if CheckForPluginUpdates is false [#91194](https://github.com/grafana/grafana/pull/91194), [@xnyo](https://github.com/xnyo)
|
||||
- **App events:** Add "info" variant [#89903](https://github.com/grafana/grafana/pull/89903), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Auth:** Add org to role mappings support to AzureAD/Entra integration [#88861](https://github.com/grafana/grafana/pull/88861), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Auth:** Add organization mapping configuration to the UI [#90003](https://github.com/grafana/grafana/pull/90003), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Auth:** Add support for escaping colon characters in org_mapping [#89951](https://github.com/grafana/grafana/pull/89951), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Azure:** Add new Azure infrastructure dashboards [#88869](https://github.com/grafana/grafana/pull/88869), [@yves-chan](https://github.com/yves-chan)
|
||||
- **BrowseDashboards:** Update results when starred param changes [#89944](https://github.com/grafana/grafana/pull/89944), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Caching:** Handle memcached reconnects [#91498](https://github.com/grafana/grafana/pull/91498), [@mmandrus](https://github.com/mmandrus)
|
||||
- **Calendar:** Add labels for next/previous month [#89019](https://github.com/grafana/grafana/pull/89019), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Canvas:** Element level data links [#89079](https://github.com/grafana/grafana/pull/89079), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Canvas:** Improved tooltip [#90162](https://github.com/grafana/grafana/pull/90162), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Canvas:** Support template variables in base URL of actions [#91227](https://github.com/grafana/grafana/pull/91227), [@nmarrs](https://github.com/nmarrs)
|
||||
- **Chore:** Add missing build elements to Dockerfile [#89714](https://github.com/grafana/grafana/pull/89714), [@azilly-de](https://github.com/azilly-de)
|
||||
- **Chore:** Add unit test for cloudmigration package [#88868](https://github.com/grafana/grafana/pull/88868), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **Chore:** Commit results of bingo get [#90256](https://github.com/grafana/grafana/pull/90256), [@mmandrus](https://github.com/mmandrus)
|
||||
- **CloudMigrations:** Change onPremToCloudMigrations feature toggle to public preview [#90757](https://github.com/grafana/grafana/pull/90757), [@mmandrus](https://github.com/mmandrus)
|
||||
- **CloudWatch:** Add errorsource for QueryData [#91085](https://github.com/grafana/grafana/pull/91085), [@iwysiu](https://github.com/iwysiu)
|
||||
- **CloudWatch:** Update grafana-aws-sdk for updated metrics [#91364](https://github.com/grafana/grafana/pull/91364), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Cloudwatch:** Clear cached PDC transport when PDC is disabled [#91357](https://github.com/grafana/grafana/pull/91357), [@njvrzm](https://github.com/njvrzm)
|
||||
- **Cloudwatch:** Metrics Query Builder should clear old query [#88950](https://github.com/grafana/grafana/pull/88950), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Cloudwatch:** Remove awsDatasourcesNewFormStyling feature toggle [#90128](https://github.com/grafana/grafana/pull/90128), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Cloudwatch:** Rename Metric Query to Metric Insights [#89955](https://github.com/grafana/grafana/pull/89955), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Cloudwatch:** Round up endTime in GetMetricData to next minute [#89341](https://github.com/grafana/grafana/pull/89341), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Dashboard:** Use preferred timezone on create [#89833](https://github.com/grafana/grafana/pull/89833), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Datalinks:** UX improvements [#91352](https://github.com/grafana/grafana/pull/91352), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **DateTimePicker:** Add "timeZone" prop [#90031](https://github.com/grafana/grafana/pull/90031), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Dynatrace:** Add to list of DS with custom label logic [#90258](https://github.com/grafana/grafana/pull/90258), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **Elasticsearch:** Decouple backend from infra/http [#90408](https://github.com/grafana/grafana/pull/90408), [@njvrzm](https://github.com/njvrzm)
|
||||
- **Elasticsearch:** Decouple backend from infra/log [#90527](https://github.com/grafana/grafana/pull/90527), [@njvrzm](https://github.com/njvrzm)
|
||||
- **Elasticsearch:** Decouple backend from infra/tracing [#90528](https://github.com/grafana/grafana/pull/90528), [@njvrzm](https://github.com/njvrzm)
|
||||
- **Explore:** Add setting for default time offset [#90401](https://github.com/grafana/grafana/pull/90401), [@gelicia](https://github.com/gelicia)
|
||||
- **Feat:** Extending report interaction with static context that can be appended to all interaction events [#88927](https://github.com/grafana/grafana/pull/88927), [@tolzhabayev](https://github.com/tolzhabayev)
|
||||
- **Feature management:** Add openSearchBackendFlowEnabled feature toggle [#89208](https://github.com/grafana/grafana/pull/89208), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Features:** Add cloudwatchMetricInsightsCrossAccount feature toggle [#89848](https://github.com/grafana/grafana/pull/89848), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Features:** Release Cloudwatch Metric Insights cross-account querying to public preview [#91066](https://github.com/grafana/grafana/pull/91066), [@idastambuk](https://github.com/idastambuk)
|
||||
- **FlameGraph:** Remove flameGraphItemCollapsing feature toggle [#90190](https://github.com/grafana/grafana/pull/90190), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **GCP:** Update GKE monitoring dashboard [#90091](https://github.com/grafana/grafana/pull/90091), [@aangelisc](https://github.com/aangelisc)
|
||||
- **GOps:** Add Grafana SLO steps to IRM configuration tracker [#88098](https://github.com/grafana/grafana/pull/88098), [@obetomuniz](https://github.com/obetomuniz)
|
||||
- **Grafana:** Enables use of encrypted certificates with password for https [#91418](https://github.com/grafana/grafana/pull/91418), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **IDToken:** Add current user's DisplayName to the ID token [#90992](https://github.com/grafana/grafana/pull/90992), [@colin-stuart](https://github.com/colin-stuart)
|
||||
- **IDToken:** Add current user's Username and UID to the ID token [#90240](https://github.com/grafana/grafana/pull/90240), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Keybinds:** Allow move time range shortcuts (t left / t right) to be chained [#88904](https://github.com/grafana/grafana/pull/88904), [@joshhunt](https://github.com/joshhunt)
|
||||
- **LibraryPanels:** Use new folder picker when creating a library panel [#89228](https://github.com/grafana/grafana/pull/89228), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Log:** Added panel support for filtering callbacks [#88980](https://github.com/grafana/grafana/pull/88980), [@matyax](https://github.com/matyax)
|
||||
- **Logs:** Add log line to content outline when clicking on datalinks [#90207](https://github.com/grafana/grafana/pull/90207), [@gtk-grafana](https://github.com/gtk-grafana)
|
||||
- **Loki:** Add option to issue forward queries [#91181](https://github.com/grafana/grafana/pull/91181), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Added support for negative numbers in LogQL [#88719](https://github.com/grafana/grafana/pull/88719), [@matyax](https://github.com/matyax)
|
||||
- **Loki:** Also replace `step` with vars [#91031](https://github.com/grafana/grafana/pull/91031), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Remove `instant` query type from Log queries [#90137](https://github.com/grafana/grafana/pull/90137), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Respect pre-selected filters in adhoc filter queries [#89022](https://github.com/grafana/grafana/pull/89022), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **MSSQL:** Password auth for Azure AD [#89746](https://github.com/grafana/grafana/pull/89746), [@bossinc](https://github.com/bossinc)
|
||||
- **Metrics:** Add ability to disable classic histogram for HTTP metric [#88315](https://github.com/grafana/grafana/pull/88315), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Nav:** Add items to saved [#89908](https://github.com/grafana/grafana/pull/89908), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **OpenAPI:** Document the `/api/health` endpoint [#88203](https://github.com/grafana/grafana/pull/88203), [@julienduchesne](https://github.com/julienduchesne)
|
||||
- **PanelChrome:** Use labelledby for accessible title [#88781](https://github.com/grafana/grafana/pull/88781), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Plugins:** Add filters by update available [#91526](https://github.com/grafana/grafana/pull/91526), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Plugins:** Add logs to for plugin management actions [#90587](https://github.com/grafana/grafana/pull/90587), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Plugins:** Disable install controls for provisioned plugin in cloud [#90479](https://github.com/grafana/grafana/pull/90479), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Plugins:** Expose functions to plugins for checking RBAC permissions [#89047](https://github.com/grafana/grafana/pull/89047), [@jackw](https://github.com/jackw)
|
||||
- **Plugins:** Improve levitate / breaking changes report in grafana/grafana [#89822](https://github.com/grafana/grafana/pull/89822), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Plugins:** Support > 1 levels of plugin dependencies [#90174](https://github.com/grafana/grafana/pull/90174), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Plugins:** Update CLI check if plugin is already installed [#91213](https://github.com/grafana/grafana/pull/91213), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Prometheus:** Deprecation message for SigV4 in core Prom [#90250](https://github.com/grafana/grafana/pull/90250), [@bohandley](https://github.com/bohandley)
|
||||
- **Prometheus:** Reintroduce Azure audience override feature flag [#90339](https://github.com/grafana/grafana/pull/90339), [@aangelisc](https://github.com/aangelisc)
|
||||
- **RBAC:** Allow plugins to use scoped actions [#90946](https://github.com/grafana/grafana/pull/90946), [@gamab](https://github.com/gamab)
|
||||
- **RBAC:** Default to plugins.app:access for plugin includes [#90969](https://github.com/grafana/grafana/pull/90969), [@gamab](https://github.com/gamab)
|
||||
- **Restore dashboards:** Add RBAC [#90270](https://github.com/grafana/grafana/pull/90270), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Revert:** Calcs: Update diff percent to be a percent [#91563](https://github.com/grafana/grafana/pull/91563), [@Develer](https://github.com/Develer)
|
||||
- **SAML:** Add button to generate a certificate and private key (Enterprise)
|
||||
- **SSO:** Make SAML certificate/private key optional (Enterprise)
|
||||
- **SearchV2:** Support soft deletion [#90217](https://github.com/grafana/grafana/pull/90217), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Select:** Add orange indicator to selected item [#88695](https://github.com/grafana/grafana/pull/88695), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Snapshots:** Remove deprecated option snapshot_remove_expired [#91231](https://github.com/grafana/grafana/pull/91231), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Table panel:** Add alt and title text options to image cell type [#89930](https://github.com/grafana/grafana/pull/89930), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Tempo:** Add toggle for streaming [#88685](https://github.com/grafana/grafana/pull/88685), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **Tempo:** Remove kind=server from metrics summary [#89419](https://github.com/grafana/grafana/pull/89419), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Tempo:** Run `go get` [#89335](https://github.com/grafana/grafana/pull/89335), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **Tempo:** TraceQL metrics step option [#89434](https://github.com/grafana/grafana/pull/89434), [@adrapereira](https://github.com/adrapereira)
|
||||
- **Tempo:** Virtualize tags select to improve performance [#90269](https://github.com/grafana/grafana/pull/90269), [@adrapereira](https://github.com/adrapereira)
|
||||
- **Tempo:** Virtualized search dropdowns for attribute values [#88569](https://github.com/grafana/grafana/pull/88569), [@RonanQuigley](https://github.com/RonanQuigley)
|
||||
- **TimePicker:** Improve screen reader support [#89409](https://github.com/grafana/grafana/pull/89409), [@tskarhed](https://github.com/tskarhed)
|
||||
- **TimeRangePicker:** Add weekStart prop [#89650](https://github.com/grafana/grafana/pull/89650), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **TimeRangePicker:** Use week start [#89765](https://github.com/grafana/grafana/pull/89765), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Tooltip:** Add tooltip support to Histogram [#89196](https://github.com/grafana/grafana/pull/89196), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Trace View:** Add Session for this span button [#89656](https://github.com/grafana/grafana/pull/89656), [@javiruiz01](https://github.com/javiruiz01)
|
||||
- **Tracing:** Add regex support for span filters [#89885](https://github.com/grafana/grafana/pull/89885), [@ektasorathia](https://github.com/ektasorathia)
|
||||
- **Transformations:** Add variable support to select groupingToMatrix [#88551](https://github.com/grafana/grafana/pull/88551), [@kazeborja](https://github.com/kazeborja)
|
||||
- **Transformations:** Move transformation variables to general availability [#89111](https://github.com/grafana/grafana/pull/89111), [@samjewell](https://github.com/samjewell)
|
||||
- **Transformations:** Promote add field from calc stat function cumulative and window calcs as generally available [#91160](https://github.com/grafana/grafana/pull/91160), [@nmarrs](https://github.com/nmarrs)
|
||||
- **Transformations:** Promote format string as generally available [#91161](https://github.com/grafana/grafana/pull/91161), [@nmarrs](https://github.com/nmarrs)
|
||||
- **Transformations:** Promote group to nested table as generally available [#90253](https://github.com/grafana/grafana/pull/90253), [@nmarrs](https://github.com/nmarrs)
|
||||
- **Users:** Add config option to control how often last_seen is updated [#88721](https://github.com/grafana/grafana/pull/88721), [@parambath92](https://github.com/parambath92)
|
||||
- **XYChart:** Promote to generally available [#91417](https://github.com/grafana/grafana/pull/91417), [@nmarrs](https://github.com/nmarrs)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Admin:** Fixes logic for enabled a user [#88117](https://github.com/grafana/grafana/pull/88117), [@gonvee](https://github.com/gonvee)
|
||||
- **Alerting:** Add validation for path separators in the rule group edit modal [#90887](https://github.com/grafana/grafana/pull/90887), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Allow future relative time [#89405](https://github.com/grafana/grafana/pull/89405), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Disable simplified routing when internal alert manager is disabled [#90648](https://github.com/grafana/grafana/pull/90648), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Do not check evaluation interval for external rulers [#89354](https://github.com/grafana/grafana/pull/89354), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Do not count rule health for totals [#89349](https://github.com/grafana/grafana/pull/89349), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Fix Recording Rules creation issues [#90362](https://github.com/grafana/grafana/pull/90362), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix contact point export 500 error and notifications/receivers missing settings [#90342](https://github.com/grafana/grafana/pull/90342), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Fix permissions for prometheus rule endpoints [#91409](https://github.com/grafana/grafana/pull/91409), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix persisting result fingerprint that is used by recovery threshold [#91224](https://github.com/grafana/grafana/pull/91224), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix rule storage to filter by group names using case-sensitive comparison [#88992](https://github.com/grafana/grafana/pull/88992), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix saving telegram contact point to Cloud AM config [#89182](https://github.com/grafana/grafana/pull/89182), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix setting of existing Telegram Chat ID value [#89287](https://github.com/grafana/grafana/pull/89287), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix silencing from policy instances [#90417](https://github.com/grafana/grafana/pull/90417), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Fix some status codes returned from provisioning API. [#90117](https://github.com/grafana/grafana/pull/90117), [@stevesg](https://github.com/stevesg)
|
||||
- **Alerting:** Fix stale values associated with states that have gone to NoData, unify values calculation [#89807](https://github.com/grafana/grafana/pull/89807), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Refactor PromQL-style matcher parsing [#90129](https://github.com/grafana/grafana/pull/90129), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Skip fetching alerts for unsaved dashboards [#90061](https://github.com/grafana/grafana/pull/90061), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Skip loading alert rules for dashboards when disabled [#89361](https://github.com/grafana/grafana/pull/89361), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Support `utf8_strict_mode: false` in Mimir [#90092](https://github.com/grafana/grafana/pull/90092), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Time interval Delete API to check for usages in alert rules [#90500](https://github.com/grafana/grafana/pull/90500), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Analytics:** Fix ApplicationInsights integration [#89299](https://github.com/grafana/grafana/pull/89299), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Azure Monitor:** Add validation for namespace field in AdvancedResourcePicker when entering a forward slash [#89288](https://github.com/grafana/grafana/pull/89288), [@adamyeats](https://github.com/adamyeats)
|
||||
- **AzureMonitor:** Fix out of bounds error when accessing `metricNamespaceArray` and `resourceNameArray` in `buildResourceURI` [#89222](https://github.com/grafana/grafana/pull/89222), [@adamyeats](https://github.com/adamyeats)
|
||||
- **BrowseDashboards:** Prepend subpath to New Browse Dashboard actions [#89109](https://github.com/grafana/grafana/pull/89109), [@joshhunt](https://github.com/joshhunt)
|
||||
- **CloudWatch:** Fix labels for raw metric search queries [#88943](https://github.com/grafana/grafana/pull/88943), [@iwysiu](https://github.com/iwysiu)
|
||||
- **CloudWatch:** Fix raw queries with dimensions set [#90348](https://github.com/grafana/grafana/pull/90348), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Correlations:** Fix wrong target data source name in the form [#90340](https://github.com/grafana/grafana/pull/90340), [@aocenas](https://github.com/aocenas)
|
||||
- **DashboardScene:** Fixes issue removing override rule [#89124](https://github.com/grafana/grafana/pull/89124), [@torkelo](https://github.com/torkelo)
|
||||
- **DashboardScene:** Fixes lack of re-render when updating field override properties [#88796](https://github.com/grafana/grafana/pull/88796), [@torkelo](https://github.com/torkelo)
|
||||
- **DataSourcePicker:** Create new data source does not work for subpath [#90536](https://github.com/grafana/grafana/pull/90536), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **Docs:** Add fixed role UUIDs to docs for terraform provisioning [#89457](https://github.com/grafana/grafana/pull/89457), [@Jguer](https://github.com/Jguer)
|
||||
- **Echo:** Suppress errors from frontend-metrics API call failing [#89379](https://github.com/grafana/grafana/pull/89379), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Explore Metrics:** Implement grouping with metric prefixes [#89481](https://github.com/grafana/grafana/pull/89481), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Fix:** Portuguese Brazilian wasn't loading translations [#89302](https://github.com/grafana/grafana/pull/89302), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **Folders:** Fix folder pagination for cloud instances with many folders [#90008](https://github.com/grafana/grafana/pull/90008), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Folders:** Improve folder move permission checks [#90588](https://github.com/grafana/grafana/pull/90588), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **InfluxDB:** Fix query builder produces invalid SQL query when using wildcard column name [#89032](https://github.com/grafana/grafana/pull/89032), [@wasim-nihal](https://github.com/wasim-nihal)
|
||||
- **Inspect:** Include only BOM char for excel files [#88994](https://github.com/grafana/grafana/pull/88994), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **Jaeger:** Fix calling of search query with the correct time range [#90320](https://github.com/grafana/grafana/pull/90320), [@EgorKluch](https://github.com/EgorKluch)
|
||||
- **Metrics:** Fix internal metrics endpoint not accessible from browser if basic auth is enabled [#86904](https://github.com/grafana/grafana/pull/86904), [@wasim-nihal](https://github.com/wasim-nihal)
|
||||
- **Notifications:** Redact URL from errors [#85687](https://github.com/grafana/grafana/pull/85687), [@alexweav](https://github.com/alexweav)
|
||||
- **PDF:** Fix layout for page-size panel after row (Enterprise)
|
||||
- **Panel:** Fix text aliasing bug when panel is loading [#89538](https://github.com/grafana/grafana/pull/89538), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Plugin extensions:** Return react components from `usePluginComponents()` [#89237](https://github.com/grafana/grafana/pull/89237), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Plugins:** Ensure grafana cli can install multiple plugin dependencies [#91230](https://github.com/grafana/grafana/pull/91230), [@yincongcyincong](https://github.com/yincongcyincong)
|
||||
- **Prometheus:** Fix interpolating adhoc filters with template variables [#88626](https://github.com/grafana/grafana/pull/88626), [@cazeaux](https://github.com/cazeaux)
|
||||
- **Prometheus:** Fix query builder visualization when a query has by() clause for quantile [#88480](https://github.com/grafana/grafana/pull/88480), [@yuri-rs](https://github.com/yuri-rs)
|
||||
- **QueryEditor:** Break with Scenes because the default query is not empty string [#90583](https://github.com/grafana/grafana/pull/90583), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **RBAC:** Fix seeder failures when inserting duplicated permissions (Enterprise)
|
||||
- **RBAC:** List only the folders that the user has access to [#88599](https://github.com/grafana/grafana/pull/88599), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Scenes/Dashboards:** Fix issue where changes in panel height weren't saved [#91125](https://github.com/grafana/grafana/pull/91125), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Scenes:** Fixes issue with panel repeat height calculation [#90221](https://github.com/grafana/grafana/pull/90221), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Scenes:** Implement 't a' shortcut [#89619](https://github.com/grafana/grafana/pull/89619), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Table Panel:** Fix Image hover without datalinks [#89751](https://github.com/grafana/grafana/pull/89751), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Table component:** Fix sub-table rows not displaying correctly [#89082](https://github.com/grafana/grafana/pull/89082), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Tempo:** Fix grpc streaming support over pdc-agent [#89883](https://github.com/grafana/grafana/pull/89883), [@taylor-s-dean](https://github.com/taylor-s-dean)
|
||||
- **Tempo:** Fix query history [#89991](https://github.com/grafana/grafana/pull/89991), [@joey-grafana](https://github.com/joey-grafana)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- **Folders:** Allow folder editors and admins to create subfolders without any additional permissions [#91215](https://github.com/grafana/grafana/pull/91215), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Runtime:** Add provider and access hook for location service [#90759](https://github.com/grafana/grafana/pull/90759), [@aocenas](https://github.com/aocenas)
|
||||
|
||||
<!-- 11.2.0 END -->
|
||||
<!-- 11.1.3 START -->
|
||||
|
||||
# 11.1.3 (2024-07-26)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
ARG BASE_IMAGE=alpine:3.19.1
|
||||
ARG JS_IMAGE=node:20-alpine
|
||||
ARG JS_PLATFORM=linux/amd64
|
||||
ARG GO_IMAGE=golang:1.22.4-alpine
|
||||
ARG GO_IMAGE=golang:1.22.7-alpine
|
||||
|
||||
ARG GO_SRC=go-builder
|
||||
ARG JS_SRC=js-builder
|
||||
|
||||
17
Makefile
17
Makefile
@@ -7,10 +7,10 @@ WIRE_TAGS = "oss"
|
||||
-include local/Makefile
|
||||
include .bingo/Variables.mk
|
||||
|
||||
|
||||
GO = go
|
||||
GO_VERSION = 1.22.4
|
||||
GO_FILES ?= ./pkg/... ./pkg/apiserver/... ./pkg/apimachinery/... ./pkg/promlib/... ./pkg/semconv/... ./pkg/storage/unified/resource/...
|
||||
GO_VERSION = 1.22.7
|
||||
GO_LINT_FILES ?= $(shell ./scripts/go-workspace/golangci-lint-includes.sh)
|
||||
GO_TEST_FILES ?= $(shell ./scripts/go-workspace/test-includes.sh)
|
||||
SH_FILES ?= $(shell find ./scripts -name *.sh)
|
||||
GO_RACE := $(shell [ -n "$(GO_RACE)" -o -e ".go-race-enabled-locally" ] && echo 1 )
|
||||
GO_RACE_FLAG := $(if $(GO_RACE),-race)
|
||||
@@ -172,11 +172,10 @@ gen-jsonnet:
|
||||
.PHONY: update-workspace
|
||||
update-workspace:
|
||||
@echo "updating workspace"
|
||||
$(GO) mod download
|
||||
$(GO) work sync
|
||||
bash scripts/go-workspace/update-workspace.sh
|
||||
|
||||
.PHONY: build-go
|
||||
build-go: update-workspace gen-go ## Build all Go binaries.
|
||||
build-go: gen-go update-workspace ## Build all Go binaries.
|
||||
@echo "build go files"
|
||||
$(GO) run build.go $(GO_BUILD_FLAGS) build
|
||||
|
||||
@@ -237,7 +236,7 @@ test-go: test-go-unit test-go-integration
|
||||
.PHONY: test-go-unit
|
||||
test-go-unit: ## Run unit tests for backend with flags.
|
||||
@echo "test backend unit tests"
|
||||
go list -f '{{.Dir}}/...' -m | xargs \
|
||||
printf '$(GO_TEST_FILES)' | xargs \
|
||||
$(GO) test $(GO_RACE_FLAG) -short -covermode=atomic -timeout=30m
|
||||
|
||||
.PHONY: test-go-integration
|
||||
@@ -291,10 +290,10 @@ golangci-lint: $(GOLANGCI_LINT)
|
||||
@echo "lint via golangci-lint"
|
||||
$(GOLANGCI_LINT) run \
|
||||
--config .golangci.toml \
|
||||
$(GO_FILES)
|
||||
$(GO_LINT_FILES)
|
||||
|
||||
.PHONY: lint-go
|
||||
lint-go: golangci-lint ## Run all code checks for backend. You can use GO_FILES to specify exact files to check
|
||||
lint-go: golangci-lint ## Run all code checks for backend. You can use GO_LINT_FILES to specify exact files to check
|
||||
|
||||
# with disabled SC1071 we are ignored some TCL,Expect `/usr/bin/env expect` scripts
|
||||
.PHONY: shellcheck
|
||||
|
||||
@@ -406,6 +406,9 @@ csrf_always_check = false
|
||||
# Comma-separated list of plugins ids that won't be loaded inside the frontend sandbox
|
||||
disable_frontend_sandbox_for_plugins = grafana-incident-app
|
||||
|
||||
# Comma-separated list of paths for POST/PUT URL in actions. Empty will allow anything that is not on the same origin
|
||||
actions_allow_post_url =
|
||||
|
||||
[security.encryption]
|
||||
# Defines the time-to-live (TTL) for decrypted data encryption keys stored in memory (cache).
|
||||
# Please note that small values may cause performance issues due to a high frequency decryption operations.
|
||||
@@ -1745,6 +1748,9 @@ ha_engine_address = "127.0.0.1:6379"
|
||||
# ha_engine_password allows setting an optional password to authenticate with the engine
|
||||
ha_engine_password = ""
|
||||
|
||||
# ha_prefix is a prefix for keys in the HA engine. It's used to separate keys for different Grafana instances.
|
||||
ha_prefix =
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
|
||||
|
||||
@@ -411,6 +411,9 @@
|
||||
# Comma-separated list of plugins ids that won't be loaded inside the frontend sandbox
|
||||
;disable_frontend_sandbox_for_plugins =
|
||||
|
||||
# Comma-separated list of paths for POST/PUT URL in actions. Empty will allow anything that is not on the same origin
|
||||
;actions_allow_post_url =
|
||||
|
||||
[security.encryption]
|
||||
# Defines the time-to-live (TTL) for decrypted data encryption keys stored in memory (cache).
|
||||
# Please note that small values may cause performance issues due to a high frequency decryption operations.
|
||||
@@ -1705,6 +1708,9 @@ timeout = 30s
|
||||
# ha_engine_password allows setting an optional password to authenticate with the engine
|
||||
;ha_engine_password = ""
|
||||
|
||||
# ha_prefix is a prefix for keys in the HA engine. It's used to separate keys for different Grafana instances.
|
||||
;ha_prefix =
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 508,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
@@ -88,6 +87,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -102,7 +102,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
@@ -174,6 +174,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -188,7 +189,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
@@ -260,6 +261,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -274,7 +276,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
@@ -346,6 +348,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -360,7 +363,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
@@ -431,6 +434,7 @@
|
||||
"graphMode": "line",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -445,7 +449,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -560,6 +564,7 @@
|
||||
"graphMode": "line",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -574,7 +579,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -691,6 +696,7 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -705,7 +711,7 @@
|
||||
"textMode": "name",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
@@ -781,6 +787,7 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -795,7 +802,7 @@
|
||||
"textMode": "value",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
@@ -871,6 +878,7 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -885,7 +893,7 @@
|
||||
"textMode": "none",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
@@ -972,6 +980,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -986,7 +995,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
@@ -1058,6 +1067,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -1072,7 +1082,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
@@ -1144,6 +1154,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -1158,7 +1169,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
@@ -1230,6 +1241,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -1244,7 +1256,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
@@ -1315,6 +1327,7 @@
|
||||
"graphMode": "line",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -1329,7 +1342,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -1444,6 +1457,7 @@
|
||||
"graphMode": "line",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -1458,7 +1472,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
@@ -1575,6 +1589,7 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -1589,7 +1604,7 @@
|
||||
"textMode": "name",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
@@ -1665,6 +1680,7 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -1679,7 +1695,7 @@
|
||||
"textMode": "value",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
@@ -1755,6 +1771,7 @@
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"mean"
|
||||
@@ -1769,7 +1786,7 @@
|
||||
"textMode": "none",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
@@ -1819,7 +1836,7 @@
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
"w": 4,
|
||||
"x": 0,
|
||||
"y": 78
|
||||
},
|
||||
@@ -1829,6 +1846,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
@@ -1840,7 +1858,7 @@
|
||||
"textMode": "value",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "time, value\n2023-12-13T00:00:00Z, 0\n2023-12-13T00:00:00Z, 100",
|
||||
@@ -1855,6 +1873,73 @@
|
||||
"title": "Infinity Percent Change",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"default": true,
|
||||
"type": "grafana-testdata-datasource",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 4,
|
||||
"x": 4,
|
||||
"y": 78
|
||||
},
|
||||
"id": 32,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showPercentChange": true,
|
||||
"textMode": "value",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "time, value\n2023-12-13T00:00:00Z, 50\n2023-12-13T00:00:00Z, 100\n2023-12-13T00:00:00Z, 50",
|
||||
"datasource": {
|
||||
"type": "grafana-testdata-datasource",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Zero Percent Change",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "grafana-testdata-datasource",
|
||||
@@ -1894,6 +1979,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
@@ -1905,7 +1991,7 @@
|
||||
"textMode": "value",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "time, value\n2023-12-13T00:00:00Z, 0\n2023-12-13T00:00:00Z, 0",
|
||||
@@ -1959,6 +2045,7 @@
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"percentChangeColorMode": "standard",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
@@ -1970,7 +2057,7 @@
|
||||
"textMode": "auto",
|
||||
"wideLayout": true
|
||||
},
|
||||
"pluginVersion": "10.3.0-pre",
|
||||
"pluginVersion": "11.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "Name, value\nName1, 10\nName2, 20",
|
||||
@@ -2017,6 +2104,6 @@
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Stat",
|
||||
"uid": "EJ8_d9jZk",
|
||||
"version": 11,
|
||||
"version": 15,
|
||||
"weekStart": ""
|
||||
}
|
||||
@@ -6,6 +6,15 @@
|
||||
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
|
||||
# Changes are relevant to this script and the support docs.mk GNU Make interface.
|
||||
#
|
||||
# ## 8.1.0 (2024-08-22)
|
||||
#
|
||||
# ### Added
|
||||
#
|
||||
# - Additional website mounts for projects that use the website repository.
|
||||
#
|
||||
# Mounts are required for `make docs` to work in the website repository or with the website project.
|
||||
# The Makefile is also mounted for convenient development of the procedure that repository.
|
||||
#
|
||||
# ## 8.0.1 (2024-07-01)
|
||||
#
|
||||
# ### Fixed
|
||||
@@ -727,6 +736,9 @@ POSIX_HERESTRING
|
||||
|
||||
_repo="$(repo_path website)"
|
||||
volumes="--volume=${_repo}/config:/hugo/config:z"
|
||||
volumes="${volumes} --volume=${_repo}/content/guides:/hugo/content/guides:z"
|
||||
volumes="${volumes} --volume=${_repo}/content/whats-new:/hugo/content/whats-new:z"
|
||||
volumes="${volumes} --volume=${_repo}/Makefile:/hugo/Makefile:z"
|
||||
volumes="${volumes} --volume=${_repo}/layouts:/hugo/layouts:z"
|
||||
volumes="${volumes} --volume=${_repo}/scripts:/hugo/scripts:z"
|
||||
fi
|
||||
|
||||
@@ -19,7 +19,11 @@ Team Label Based Access Control (LBAC) simplifies and streamlines data source ac
|
||||
{{< admonition type="note" >}}
|
||||
Creating Team LBAC rules is available for preview for logs with Loki in Grafana Cloud.
|
||||
Report any unexpected behavior to the Grafana Support team.
|
||||
{{< /admonition >}}
|
||||
|
||||
To use Team LBAC rules you must enable the `teamHttpHeaders` feature toggle because the feature uses HTTP headers for the LBAC rules requests.
|
||||
|
||||
- Be sure that you are running Grafana Enterprise.
|
||||
{{< /admonition >}}
|
||||
|
||||
You can configure user access based upon team memberships using LogQL.
|
||||
Team LBAC controls access to logs depending on the rules set for each team.
|
||||
|
||||
@@ -19,6 +19,7 @@ Team LBAC is available in private preview on Grafana Cloud for Loki created with
|
||||
|
||||
To be able to use Team LBAC rules, you need to enable the feature toggle `teamHttpHeaders` on your Grafana instance. Contact support to enable the feature toggle for you.
|
||||
|
||||
- Be sure that you are running Grafana Enterprise.
|
||||
- Be sure that you have the permission setup to create a loki tenant in Grafana Cloud
|
||||
- Be sure that you have admin data source permissions for Grafana.
|
||||
|
||||
|
||||
@@ -18,6 +18,9 @@ Team LBAC is available on Cloud for data sources created with basic authenticati
|
||||
|
||||
## Before you begin
|
||||
|
||||
To be able to use Team LBAC rules, you need to enable the feature toggle `teamHttpHeaders` on your Grafana instance. Contact support to enable the feature toggle for you.
|
||||
|
||||
- Be sure that you are running Grafana Enterprise.
|
||||
- Be sure that you have admin data source permissions for Grafana.
|
||||
- Be sure that you have a team setup in Grafana.
|
||||
|
||||
|
||||
@@ -149,6 +149,19 @@ Grafana Cloud handles the plugin installation automatically.
|
||||
|
||||
If you're logged in to Grafana Cloud when you add a plugin, log out and then log back in again to use the new plugin.
|
||||
|
||||
### Install plugins using the Grafana Helm chart
|
||||
|
||||
With the Grafana Helm chart, add the plugins you want to install as a list using the `plugins` field in the your values file. For more information about the configuration, refer to [the Helm chart configuration reference](https://github.com/grafana/helm-charts/tree/main/charts/grafana#configuration).
|
||||
|
||||
The following YAML snippet installs v1.9.0 of the Grafana OnCall App plugin and the Redis data source plugin.
|
||||
You must incorporate this snippet within your Helm values file.
|
||||
|
||||
```yaml
|
||||
plugins:
|
||||
- https://grafana.com/api/plugins/grafana-oncall-app/versions/v1.9.0/download;grafana-oncall-app
|
||||
- redis-datasource
|
||||
```
|
||||
|
||||
### Install plugin on local Grafana
|
||||
|
||||
Follow the instructions on the **Install** tab. You can either install the plugin with a Grafana CLI command or by downloading and uncompressing a zip file into the Grafana plugins directory. We recommend using Grafana CLI in most instances. The zip option is available if your Grafana server doesn't have access to the internet.
|
||||
|
||||
@@ -15,31 +15,34 @@ weight: 600
|
||||
|
||||
# Provision Grafana
|
||||
|
||||
In previous versions of Grafana, you could only use the API for provisioning data sources and dashboards. But that required the service to be running before you started creating dashboards and you also needed to set up credentials for the HTTP API. In v5.0 we decided to improve this experience by adding a new active provisioning system that uses config files. This will make GitOps more natural as data sources and dashboards can be defined via files that can be version controlled. We hope to extend this system to later add support for users and orgs as well.
|
||||
Grafana has an active provisioning system that uses configuration files.
|
||||
This makes GitOps more natural since data sources and dashboards can be defined using files that can be version controlled.
|
||||
|
||||
## Config File
|
||||
## Configuration file
|
||||
|
||||
See [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) for more information on what you can configure in `grafana.ini`.
|
||||
Refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) for more information on what you can configure in `grafana.ini`.
|
||||
|
||||
### Config File Locations
|
||||
### Configuration file locations
|
||||
|
||||
- Default configuration from `$WORKING_DIR/conf/defaults.ini`
|
||||
- Custom configuration from `$WORKING_DIR/conf/custom.ini`
|
||||
- The custom configuration file path can be overridden using the `--config` parameter
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
{{< admonition type="note" >}}
|
||||
If you have installed Grafana using the `deb` or `rpm`
|
||||
packages, then your configuration file is located at
|
||||
`/etc/grafana/grafana.ini`. This path is specified in the Grafana
|
||||
init.d script using `--config` file parameter.
|
||||
{{% /admonition %}}
|
||||
`init.d` script using the `--config` file parameter.
|
||||
{{< /admonition >}}
|
||||
|
||||
### Using Environment Variables
|
||||
### Environment variables
|
||||
|
||||
It is possible to use environment variable interpolation in all 3 provisioning configuration types. Allowed syntax
|
||||
is either `$ENV_VAR_NAME` or `${ENV_VAR_NAME}` and can be used only for values not for keys or bigger parts
|
||||
of the configurations. It is not available in the dashboard's definition files just the dashboard provisioning
|
||||
You can use environment variable interpolation in all three provisioning configuration types.
|
||||
The allowed syntax is either `$ENV_VAR_NAME` or `${ENV_VAR_NAME}`, and it can be used only for values, not for keys or larger parts
|
||||
of the configurations.
|
||||
It's not available in the dashboard's definition files, just the dashboard provisioning
|
||||
configuration.
|
||||
|
||||
Example:
|
||||
|
||||
```yaml
|
||||
@@ -51,13 +54,13 @@ datasources:
|
||||
password: $PASSWORD
|
||||
```
|
||||
|
||||
If you have a literal `$` in your value and want to avoid interpolation, `$$` can be used.
|
||||
You can use `$$` if you have a literal `$` in your value and want to avoid interpolation.
|
||||
|
||||
<hr />
|
||||
## Configuration management tools
|
||||
|
||||
## Configuration Management Tools
|
||||
|
||||
Currently we do not provide any scripts/manifests for configuring Grafana. Rather than spending time learning and creating scripts/manifests for each tool, we think our time is better spent making Grafana easier to provision. Therefore, we heavily rely on the expertise of the community.
|
||||
Currently, we don't provide any scripts or manifests for configuring Grafana.
|
||||
Rather than spending time learning and creating scripts or manifests for each tool, we think our time is better spent making Grafana easier to provision.
|
||||
Therefore, we heavily rely on the expertise of the community.
|
||||
|
||||
| Tool | Project |
|
||||
| --------- | ------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@@ -70,12 +73,8 @@ Currently we do not provide any scripts/manifests for configuring Grafana. Rathe
|
||||
|
||||
## Data sources
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in Grafana v5.0 and higher.
|
||||
{{% /admonition %}}
|
||||
|
||||
You can manage data sources in Grafana by adding YAML configuration files in the [`provisioning/datasources`]({{< relref "../../setup-grafana/configure-grafana#provisioning" >}}) directory.
|
||||
Each config file can contain a list of `datasources` to add or update during startup.
|
||||
You can manage data sources in Grafana by adding YAML configuration files in the [`provisioning/data sources`]({{< relref "../../setup-grafana/configure-grafana#provisioning" >}}) directory.
|
||||
Each configuration file can contain a list of `datasources` to add or update during startup.
|
||||
If the data source already exists, Grafana reconfigures it to match the provisioned configuration file.
|
||||
|
||||
The configuration file can also list data sources to automatically delete, called `deleteDatasources`.
|
||||
@@ -85,17 +84,17 @@ You can configure Grafana to automatically delete provisioned data sources when
|
||||
To do so, add `prune: true` to the root of your provisioning file.
|
||||
With this configuration, Grafana also removes the provisioned data sources if you remove the provisioning file entirely.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
{{< admonition type="note" >}}
|
||||
The `prune` parameter is available in Grafana v11.1 and higher.
|
||||
{{% /admonition %}}
|
||||
{{< /admonition >}}
|
||||
|
||||
### Running multiple Grafana instances
|
||||
|
||||
If you run multiple instances of Grafana, add a version number to each data source in the configuration and increase it when you update the configuration.
|
||||
Grafana updates only data sources with the same or lower version number than specified in the config.
|
||||
Grafana updates only data sources with the same or lower version number than specified in the configuration.
|
||||
This prevents old configurations from overwriting newer ones if you have different versions of the `datasource.yaml` file that don't define version numbers, and then restart instances at the same time.
|
||||
|
||||
### Example data source config file
|
||||
### Example data source configuration file
|
||||
|
||||
This example provisions a [Graphite data source]({{< relref "../../datasources/graphite" >}}):
|
||||
|
||||
@@ -179,16 +178,16 @@ datasources:
|
||||
|
||||
For provisioning examples of specific data sources, refer to that [data source's documentation]({{< relref "../../datasources" >}}).
|
||||
|
||||
#### JSON Data
|
||||
#### JSON data
|
||||
|
||||
Since not all data sources have the same configuration settings, we include only the most common ones as fields.
|
||||
Not all data sources have the same configuration settings. Only the most common fields are included in examples.
|
||||
To provision the rest of a data source's settings, include them as a JSON blob in the `jsonData` field.
|
||||
|
||||
Common settings in the [built-in core data sources]({{< relref "../../datasources#built-in-core-data-sources" >}}) include:
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
{{< admonition type="note" >}}
|
||||
Data sources tagged with _HTTP\*_ communicate using the HTTP protocol, which includes all core data source plugins except MySQL, PostgreSQL, and MSSQL.
|
||||
{{% /admonition %}}
|
||||
{{< /admonition >}}
|
||||
|
||||
| Name | Type | Data source | Description |
|
||||
| ----------------------------- | ------- | ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@@ -249,11 +248,14 @@ For examples of specific data sources' JSON data, refer to that [data source's d
|
||||
|
||||
#### Secure JSON Data
|
||||
|
||||
Secure JSON data is a map of settings that will be encrypted with [secret key]({{< relref "../../setup-grafana/configure-grafana#secret_key" >}}) from the Grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to the request on the server side. All of these settings are optional.
|
||||
Secure JSON data is a map of settings that are encrypted with a [secret key]({{< relref "../../setup-grafana/configure-grafana#secret_key" >}}) from the Grafana configuration.
|
||||
The encryption hides content from the users of the application.
|
||||
This should be used for storing the TLS Cert and password that Grafana appends to the request on the server side.
|
||||
All of these settings are optional.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
The _HTTP\*_ tag denotes data sources that communicate using the HTTP protocol, including all core data source plugins except MySQL, PostgreSQL, and MSSQL.
|
||||
{{% /admonition %}}
|
||||
{{< admonition type="note" >}}
|
||||
The _HTTP\*_ tag denotes data sources that communicate using the HTTP protocol, including all core data source plugins except MySQL, PostgreSQL, and MS SQL.
|
||||
{{< /admonition >}}
|
||||
|
||||
| Name | Type | Data source | Description |
|
||||
| ----------------- | ------ | ---------------------------------- | -------------------------------------------------------- |
|
||||
@@ -270,7 +272,7 @@ The _HTTP\*_ tag denotes data sources that communicate using the HTTP protocol,
|
||||
#### Custom HTTP headers for data sources
|
||||
|
||||
Data sources managed with provisioning can be configured to add HTTP headers to all requests.
|
||||
The header name is configured in the `jsonData` field and the header value is configured in `secureJsonData`.
|
||||
Configure the header name in the `jsonData` field and the header value in `secureJsonData`.
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
@@ -287,16 +289,14 @@ datasources:
|
||||
|
||||
## Plugins
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in Grafana v7.1 and higher.
|
||||
{{% /admonition %}}
|
||||
You can manage plugin applications in Grafana by adding one or more YAML configuration files in the [`provisioning/plugins`]({{< relref "../../setup-grafana/configure-grafana#provisioning" >}}) directory.
|
||||
Each configuration file can contain a list of `apps` that update during start up.
|
||||
Grafana updates each app to match the configuration file.
|
||||
|
||||
You can manage plugin applications in Grafana by adding one or more YAML config files in the [`provisioning/plugins`]({{< relref "../../setup-grafana/configure-grafana#provisioning" >}}) directory. Each config file can contain a list of `apps` that will be updated during start up. Grafana updates each app to match the configuration file.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
{{< admonition type="note" >}}
|
||||
This feature enables you to provision plugin configurations, not the plugins themselves.
|
||||
The plugins must already be installed on the Grafana instance.
|
||||
{{% /admonition %}}
|
||||
{{< /admonition >}}
|
||||
|
||||
### Example plugin configuration file
|
||||
|
||||
@@ -324,9 +324,10 @@ apps:
|
||||
|
||||
## Dashboards
|
||||
|
||||
You can manage dashboards in Grafana by adding one or more YAML config files in the [`provisioning/dashboards`]({{< relref "../../setup-grafana/configure-grafana#dashboards" >}}) directory. Each config file can contain a list of `dashboards providers` that load dashboards into Grafana from the local filesystem.
|
||||
You can manage dashboards in Grafana by adding one or more YAML configuration files in the [`provisioning/dashboards`]({{< relref "../../setup-grafana/configure-grafana#dashboards" >}}) directory.
|
||||
Each configuration file can contain a list of `dashboards providers` that load dashboards into Grafana from the local filesystem.
|
||||
|
||||
The dashboard provider config file looks somewhat like this:
|
||||
The dashboard provider configuration file looks somewhat like this:
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
@@ -355,40 +356,47 @@ providers:
|
||||
foldersFromFilesStructure: true
|
||||
```
|
||||
|
||||
When Grafana starts, it will update/insert all dashboards available in the configured path. Then later on poll that path every **updateIntervalSeconds** and look for updated json files and update/insert those into the database.
|
||||
When Grafana starts, it updates and inserts all dashboards available in the configured path.
|
||||
Then later on, Grafana polls that path every **updateIntervalSeconds**, looks for updated JSON files, and updates and inserts those into the database.
|
||||
|
||||
> **Note:** Dashboards are provisioned to the root level if the `folder` option is missing or empty.
|
||||
|
||||
#### Making changes to a provisioned dashboard
|
||||
|
||||
It's possible to make changes to a provisioned dashboard in the Grafana UI. However, it is not possible to automatically save the changes back to the provisioning source.
|
||||
If `allowUiUpdates` is set to `true` and you make changes to a provisioned dashboard, you can `Save` the dashboard then changes will be persisted to the Grafana database.
|
||||
While you can change a provisioned dashboard in the Grafana UI, those changes can't be saved back to the provisioning source.
|
||||
If `allowUiUpdates` is set to `true` and you make changes to a provisioned dashboard, you can `Save` the dashboard, then changes persist to the Grafana database.
|
||||
|
||||
> **Note:**
|
||||
> If a provisioned dashboard is saved from the UI and then later updated from the source, the dashboard stored in the database will always be overwritten. The `version` property in the JSON file will not affect this, even if it is lower than the existing dashboard.
|
||||
>
|
||||
> If a provisioned dashboard is saved from the UI and the source is removed, the dashboard stored in the database will be deleted unless the configuration option `disableDeletion` is set to true.
|
||||
{{< admonition type="note" >}}
|
||||
If a provisioned dashboard is saved from the UI and then later updated from the source, the dashboard stored in the database will always be overwritten. The `version` property in the JSON file won't affect this, even if it's lower than the version of the existing dashboard.
|
||||
|
||||
If a provisioned dashboard is saved from the UI and the source is removed, the dashboard stored in the database is deleted unless the configuration option `disableDeletion` is set to `true`.
|
||||
{{< /admonition >}}
|
||||
|
||||
If `allowUiUpdates` is configured to `false`, you are not able to make changes to a provisioned dashboard. When you click `Save`, Grafana brings up a _Cannot save provisioned dashboard_ dialog. The screenshot below illustrates this behavior.
|
||||
|
||||
Grafana offers options to export the JSON definition of a dashboard. Either `Copy JSON to Clipboard` or `Save JSON to file` can help you synchronize your dashboard changes back to the provisioning source.
|
||||
|
||||
Note: The JSON definition in the input field when using `Copy JSON to Clipboard` or `Save JSON to file` will have the `id` field automatically removed to aid the provisioning workflow.
|
||||
{{< admonition type="note" >}}
|
||||
The JSON definition in the input field when using `Copy JSON to Clipboard` or `Save JSON to file` has the `id` field automatically removed to aid the provisioning workflow.
|
||||
{{< /admonition >}}
|
||||
|
||||
{{< figure src="/static/img/docs/v51/provisioning_cannot_save_dashboard.png" max-width="500px" class="docs-image--no-shadow" >}}
|
||||
|
||||
### Reusable Dashboard URLs
|
||||
### Reusable dashboard URLs
|
||||
|
||||
If the dashboard in the JSON file contains an [UID]({{< relref "../../dashboards/build-dashboards/view-dashboard-json-model" >}}), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
|
||||
When Grafana starts, it updates/inserts all dashboards available in the configured folders. If you modify the file, then the dashboard is also updated.
|
||||
By default, Grafana deletes dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
|
||||
If the dashboard in the JSON file contains an [UID]({{< relref "../../dashboards/build-dashboards/view-dashboard-json-model" >}}), Grafana forces insert/update on that UID.
|
||||
This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
|
||||
When Grafana starts, it updates and inserts all dashboards available in the configured folders.
|
||||
If you modify the file, then the dashboard is also updated.
|
||||
By default, Grafana deletes dashboards in the database if the file is removed.
|
||||
You can disable this behavior using the `disableDeletion` setting.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
{{< admonition type="note" >}}
|
||||
Provisioning allows you to overwrite existing dashboards
|
||||
which leads to problems if you reuse settings that are supposed to be unique.
|
||||
Be careful not to reuse the same `title` multiple times within a folder
|
||||
or `uid` within the same installation as this will cause weird behaviors.
|
||||
{{% /admonition %}}
|
||||
or `uid` within the same installation as this causes weird behaviors.
|
||||
{{< /admonition >}}
|
||||
|
||||
### Provision folders structure from filesystem to Grafana
|
||||
|
||||
@@ -406,7 +414,7 @@ For example, to replicate these dashboards structure from the filesystem to Graf
|
||||
└── /resources_dashboard.json
|
||||
```
|
||||
|
||||
you need to specify just this short provision configuration file.
|
||||
You need to specify just this short provision configuration file.
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
@@ -420,32 +428,24 @@ providers:
|
||||
foldersFromFilesStructure: true
|
||||
```
|
||||
|
||||
`server` and `application` will become new folders in Grafana menu.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
`folder` and `folderUid` options should be empty or missing to make `foldersFromFilesStructure` work.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
To provision dashboards to the root level, store them in the root of your `path`.
|
||||
{{% /admonition %}}
|
||||
In this example, `server` and `application` become new folders in the Grafana menu.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
This feature doesn't currently allow you to create nested folder structures, that is, where you have folders within folders.
|
||||
The `folder` and `folderUid` options should be empty or missing to make `foldersFromFilesStructure` work.
|
||||
|
||||
To provision dashboards to the root level, store them in the root of your `path`.
|
||||
|
||||
You can't create nested folders structures, where you have folders within folders.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Alerting
|
||||
|
||||
For information on provisioning Grafana Alerting, refer to [Provision Grafana Alerting resources]({{< relref "../../alerting/set-up/provision-alerting-resources/" >}}).
|
||||
|
||||
### Supported Settings
|
||||
### Supported settings
|
||||
|
||||
The following sections detail the supported settings and secure settings for each alert notification type. Secure settings are stored encrypted in the database and you add them to `secure_settings` in the YAML file instead of `settings`.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Secure settings is supported since Grafana v7.2.
|
||||
{{% /admonition %}}
|
||||
|
||||
#### Alert notification `pushover`
|
||||
|
||||
| Name | Secure setting |
|
||||
|
||||
@@ -13,12 +13,97 @@ labels:
|
||||
menuTitle: Role-based access control (RBAC)
|
||||
title: Grafana Role-based access control (RBAC)
|
||||
weight: 120
|
||||
refs:
|
||||
api-rbac:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/access_control/
|
||||
rbac-role-definitions:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-fixed-basic-role-definitions/
|
||||
rbac-role-definitions-basic-role-assignments:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/#basic-role-assignments
|
||||
- pattern: /docs/grafana-cloud/
|
||||
rbac-manage-rbac-roles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/manage-rbac-roles/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/manage-rbac-roles/
|
||||
rbac-assign-rbac-roles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/assign-rbac-roles/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/assign-rbac-roles/
|
||||
rbac-basic-role-uid-mapping:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/manage-rbac-roles/#list-permissions-associated-with-roles
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/manage-rbac-roles/#list-permissions-associated-with-roles
|
||||
service-accounts:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/
|
||||
alerting:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/
|
||||
data-sources:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/
|
||||
roles-and-permissions:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/cloud-roles/
|
||||
dashboards:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/
|
||||
dashboards-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/
|
||||
dashboards-create-reports:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/create-reports/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/create-reports/
|
||||
dashboards-manage-library-panels:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/manage-library-panels/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/manage-library-panels/
|
||||
dashboards-create-a-dashboard-folder:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/manage-dashboards/#create-a-dashboard-folder
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/manage-dashboards/#create-a-dashboard-folder
|
||||
folder-permissions:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/manage-dashboards/#folder-permissions
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/manage-dashboards/#folder-permissions
|
||||
migrate-api-keys:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/migrate-api-keys/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/migrate-api-keys/
|
||||
---
|
||||
|
||||
# Role-based access control (RBAC)
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /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.
|
||||
@@ -43,7 +128,7 @@ RBAC roles contain multiple permissions, each of which has an action and a scope
|
||||
- **Action:** `datasources:read`
|
||||
- **Scope:** `datasources:*`
|
||||
|
||||
For information on the RBAC API refer to [RBAC API](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/#rbac-api).
|
||||
For information on the RBAC API refer to [RBAC API](ref:api-rbac).
|
||||
|
||||
### Basic roles
|
||||
|
||||
@@ -77,8 +162,8 @@ You can use RBAC to modify the permissions associated with any basic role, which
|
||||
Note that any modification to any of these basic role is not propagated to the other basic roles.
|
||||
For example, if you modify Viewer basic role and grant additional permission, Editors or Admins won't have that additional grant.
|
||||
|
||||
For more information about the permissions associated with each basic role, refer to [Basic role definitions]({{< relref "./rbac-fixed-basic-role-definitions/#basic-role-assignments" >}}).
|
||||
To interact with the API and view or modify basic roles permissions, refer to [the table]({{< relref "./manage-rbac-roles/#basic-role-uid-mapping" >}}) that maps basic role names to the associated UID.
|
||||
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" %}}
|
||||
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.
|
||||
@@ -86,31 +171,31 @@ You cannot use a service account to modify basic roles via the RBAC API. To upda
|
||||
|
||||
### Fixed roles
|
||||
|
||||
Grafana Enterprise includes the ability for you to assign discrete fixed roles to users, teams, and service accounts. This gives you fine-grained control over user permissions than you would have with basic roles alone. These roles are called "fixed" because you cannot change or delete fixed roles. You can also create _custom_ roles of your own; see more information in the [custom roles section]({{< relref "#custom-roles" >}}) below.
|
||||
Grafana Enterprise includes the ability for you to assign discrete fixed roles to users, teams, and service accounts. This gives you fine-grained control over user permissions than you would have with basic roles alone. These roles are called "fixed" because you cannot change or delete fixed roles. You can also create _custom_ roles of your own; see more information in the [custom roles section](#custom-roles) below.
|
||||
|
||||
Assign fixed roles when the basic roles do not meet your permission requirements. For example, you might want a user with the basic viewer role to also edit dashboards. Or, you might want anyone with the editor role to also add and manage users. Fixed roles provide users more granular access to create, view, and update the following Grafana resources:
|
||||
|
||||
- [Alerting]({{< relref "../../../alerting/" >}})
|
||||
- [Annotations]({{< relref "../../../dashboards/build-dashboards/annotate-visualizations" >}})
|
||||
- [API keys]({{< relref "../../api-keys/" >}})
|
||||
- [Dashboards and folders]({{< relref "../../../dashboards/" >}})
|
||||
- [Data sources]({{< relref "../../../datasources/" >}})
|
||||
- [Explore]({{< relref "../../../explore/" >}})
|
||||
- [Feature Toggles]({{< relref "../../feature-toggles/" >}})
|
||||
- [Folders]({{< relref "../../../dashboards/manage-dashboards/#create-a-dashboard-folder" >}})
|
||||
- [LDAP]({{< relref "../../../setup-grafana/configure-security/configure-authentication/ldap/" >}})
|
||||
- [Library panels]({{< relref "../../../dashboards/build-dashboards/manage-library-panels" >}})
|
||||
- [Licenses]({{< relref "../../stats-and-license/" >}})
|
||||
- [Organizations]({{< relref "../../organization-management/" >}})
|
||||
- [Provisioning]({{< relref "../../provisioning/" >}})
|
||||
- [Reports]({{< relref "../../../dashboards/create-reports/" >}})
|
||||
- [Roles]({{< relref "../../" >}})
|
||||
- [Settings]({{< relref "../../../setup-grafana/configure-grafana/settings-updates-at-runtime" >}})
|
||||
- [Service accounts]({{< relref "../../service-accounts/" >}})
|
||||
- [Teams]({{< relref "../../team-management/" >}})
|
||||
- [Users]({{< relref "../../user-management/" >}})
|
||||
- [Alerting](ref:alerting)
|
||||
- [Annotations](ref:dashboards-annotate-visualizations)
|
||||
- [API keys](ref:migrate-api-keys)
|
||||
- [Dashboards and folders](ref:dashboards)
|
||||
- [Data sources](ref:data-sources)
|
||||
- [Explore](/docs/grafana/<GRAFANA_VERSION>/explore/)
|
||||
- [Feature Toggles](/docs/grafana/<GRAFANA_VERSION>/administration/feature-toggles/)
|
||||
- [Folders](ref:dashboards-create-a-dashboard-folder)
|
||||
- [LDAP](/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-security/configure-authentication/ldap/)
|
||||
- [Library panels](ref:dashboards-manage-library-panels)
|
||||
- [Licenses](/docs/grafana/<GRAFANA_VERSION>/administration/stats-and-license/)
|
||||
- [Organizations](/docs/grafana/<GRAFANA_VERSION>/administration/organization-management/)
|
||||
- [Provisioning](/docs/grafana/<GRAFANA_VERSION>/administration/provisioning/)
|
||||
- [Reports](ref:dashboards-create-reports)
|
||||
- [Roles](ref:roles-and-permissions)
|
||||
- [Settings](/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/settings-updates-at-runtime/)
|
||||
- [Service accounts](ref:service-accounts)
|
||||
- [Teams](/docs/grafana/<GRAFANA_VERSION>/administration/team-management/)
|
||||
- [Users](/docs/grafana/<GRAFANA_VERSION>/administration/user-management/)
|
||||
|
||||
To learn more about the permissions you can grant for each resource, refer to [RBAC role definitions]({{< relref "./rbac-fixed-basic-role-definitions/" >}}).
|
||||
To learn more about the permissions you can grant for each resource, refer to [RBAC role definitions](ref:rbac-role-definitions).
|
||||
|
||||
### Custom roles
|
||||
|
||||
@@ -126,11 +211,11 @@ Consider creating a custom role when fixed roles do not meet your permissions re
|
||||
|
||||
You can use either of the following methods to create, assign, and manage custom roles:
|
||||
|
||||
- Grafana provisioning: You can use a YAML file to configure roles. For more information about using provisioning to create custom roles, refer to [Manage RBAC roles]({{< relref "./manage-rbac-roles/" >}}). For more information about using provisioning to assign RBAC roles to users or teams, refer to [Assign RBAC roles]({{< relref "./assign-rbac-roles/" >}}).
|
||||
- RBAC API: As an alternative, you can use the Grafana HTTP API to create and manage roles. For more information about the HTTP API, refer to [RBAC API]({{< relref "../../../developers/http_api/access_control/" >}}).
|
||||
- Grafana provisioning: You can use a YAML file to configure roles. For more information about using provisioning to create custom roles, refer to [Manage RBAC roles](ref:rbac-manage-rbac-roles). For more information about using provisioning to assign RBAC roles to users or teams, refer to [Assign RBAC roles](ref:rbac-assign-rbac-roles).
|
||||
- RBAC API: As an alternative, you can use the Grafana HTTP API to create and manage roles. For more information about the HTTP API, refer to [RBAC API](ref:api-rbac).
|
||||
|
||||
### Limitation
|
||||
|
||||
If you have created a folder with the name `General` or `general`, you cannot manage its permissions with RBAC.
|
||||
|
||||
If you set [folder permissions]({{< relref "../../user-management/manage-dashboard-permissions/#grant-dashboard-folder-permissions" >}}) for a folder named `General` or `general`, the system disregards the folder when RBAC is enabled.
|
||||
If you set [folder permissions](ref:folder-permissions) for a folder named `General` or `general`, the system disregards the folder when RBAC is enabled.
|
||||
|
||||
@@ -11,12 +11,38 @@ labels:
|
||||
menuTitle: Assign RBAC roles
|
||||
title: Assign Grafana RBAC roles
|
||||
weight: 40
|
||||
refs:
|
||||
custom-role-actions-scopes:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/custom-role-actions-scopes/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/custom-role-actions-scopes/
|
||||
rbac-grafana-provisioning:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-grafana-provisioning/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-grafana-provisioning/
|
||||
manage-rbac-roles-create-custom-roles-using-provisioning:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/manage-rbac-roles/#create-custom-roles-using-provisioning
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/manage-rbac-roles/#create-custom-roles-using-provisioning
|
||||
plan-rbac-rollout-strategy:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/plan-rbac-rollout-strategy/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/plan-rbac-rollout-strategy/
|
||||
rbac-role-definitions:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-fixed-basic-role-definitions/
|
||||
---
|
||||
|
||||
# Assign RBAC roles
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /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.
|
||||
@@ -34,10 +60,10 @@ In both cases, the assignment applies only to the user, team or service account
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- [Plan your RBAC rollout strategy]({{< relref "./plan-rbac-rollout-strategy/" >}}).
|
||||
- [Plan your RBAC rollout strategy](ref:plan-rbac-rollout-strategy).
|
||||
- Identify the fixed roles that you want to assign to the user, team or service account.
|
||||
|
||||
For more information about available fixed roles, refer to [RBAC role definitions]({{< relref "./rbac-fixed-basic-role-definitions/" >}}).
|
||||
For more information about available fixed roles, refer to [RBAC role definitions](ref:rbac-role-definitions).
|
||||
|
||||
- Ensure that your own user account has the correct permissions:
|
||||
- If you are assigning permissions to a user, team or service account within an organization, you must have organization administrator or server administrator permissions.
|
||||
@@ -52,7 +78,7 @@ In both cases, the assignment applies only to the user, team or service account
|
||||
1. Sign in to Grafana.
|
||||
2. Switch to the organization that contains the user, team or service account.
|
||||
|
||||
For more information about switching organizations, refer to [Switch organizations]({{< relref "../../../user-management/user-preferences/_index.md#switch-organizations" >}}).
|
||||
For more information about switching organizations, refer to [Switch organizations](/docs/grafana/<GRAFANA_VERSION>/administration/user-management/user-preferences/#switch-organizations).
|
||||
|
||||
3. In the left-side menu, click **Administration**, **Users and access**, and then **Users**, **Teams**, or **Service accounts**.
|
||||
4. In the **Role** column, select the fixed role that you want to assign to the user, team, or service account.
|
||||
@@ -73,8 +99,8 @@ Instead of using the Grafana role picker, you can use file-based provisioning to
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Refer to [Role provisioning]({{< relref "./rbac-grafana-provisioning/" >}})
|
||||
- Ensure that the team to which you are adding the fixed role exists. For more information about creating teams, refer to [Manage teams]({{< relref "../../../team-management/" >}})
|
||||
- Refer to [Role provisioning](ref:rbac-grafana-provisioning)
|
||||
- Ensure that the team to which you are adding the fixed role exists. For more information about creating teams, refer to [Manage teams](/docs/grafana/<GRAFANA_VERSION>/administration/team-management/)
|
||||
|
||||
**To assign a role to a team:**
|
||||
|
||||
@@ -82,25 +108,25 @@ Instead of using the Grafana role picker, you can use file-based provisioning to
|
||||
|
||||
1. Refer to the following table to add attributes and values.
|
||||
|
||||
| Attribute | Description |
|
||||
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `roles` | Enter the custom role or custom roles you want to create/update. |
|
||||
| `roles > name` | Enter the name of the custom role. |
|
||||
| `roles > version` | Enter the custom role version number. Role assignments are independent of the role version number. |
|
||||
| `roles > global` | Enter `true`. You can specify the `orgId` otherwise. |
|
||||
| `roles > permissions` | Enter the permissions `action` and `scope` values. For more information about permissions actions and scopes, refer to [RBAC permissions, actions, and scopes]({{< relref "./custom-role-actions-scopes/" >}}) |
|
||||
| `teams` | Enter the team or teams to which you are adding the custom role. |
|
||||
| `teams > orgId` | Because teams belong to organizations, you must add the `orgId` value. |
|
||||
| `teams > name` | Enter the name of the team. |
|
||||
| `teams > roles` | Enter the custom or fixed role or roles that you want to grant to the team. |
|
||||
| `teams > roles > name` | Enter the name of the role. |
|
||||
| `teams > roles > global` | Enter `true`, or specify `orgId` of the role you want to assign to the team. Fixed roles are global. |
|
||||
| Attribute | Description |
|
||||
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `roles` | Enter the custom role or custom roles you want to create/update. |
|
||||
| `roles > name` | Enter the name of the custom role. |
|
||||
| `roles > version` | Enter the custom role version number. Role assignments are independent of the role version number. |
|
||||
| `roles > global` | Enter `true`. You can specify the `orgId` otherwise. |
|
||||
| `roles > permissions` | Enter the permissions `action` and `scope` values. For more information about permissions actions and scopes, refer to [RBAC permissions, actions, and scopes](ref:custom-role-actions-scopes) |
|
||||
| `teams` | Enter the team or teams to which you are adding the custom role. |
|
||||
| `teams > orgId` | Because teams belong to organizations, you must add the `orgId` value. |
|
||||
| `teams > name` | Enter the name of the team. |
|
||||
| `teams > roles` | Enter the custom or fixed role or roles that you want to grant to the team. |
|
||||
| `teams > roles > name` | Enter the name of the role. |
|
||||
| `teams > roles > global` | Enter `true`, or specify `orgId` of the role you want to assign to the team. Fixed roles are global. |
|
||||
|
||||
For more information about managing custom roles, refer to [Create custom roles using provisioning]({{< relref "./manage-rbac-roles/#create-custom-roles-using-provisioning" >}}).
|
||||
For more information about managing custom roles, refer to [Create custom roles using provisioning](ref:manage-rbac-roles-create-custom-roles-using-provisioning).
|
||||
|
||||
1. Reload the provisioning configuration file.
|
||||
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations](/docs/grafana/<GRAFANA_VERSION>/developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
The following example creates the `custom:users:writer` role and assigns it to the `user writers` and `user admins` teams along with the `fixed:users:writer` role:
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ weight: 30
|
||||
# Configure RBAC in Grafana
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
The table below describes all RBAC configuration options. Like any other Grafana configuration, you can apply these options as [environment variables]({{< relref "../../../../setup-grafana/configure-grafana/#configure-with-environment-variables" >}}).
|
||||
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).
|
||||
|
||||
| Setting | Required | Description | Default |
|
||||
| ------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
|
||||
@@ -10,6 +10,17 @@ labels:
|
||||
menuTitle: RBAC permissions, actions, and scopes
|
||||
title: Grafana RBAC permissions, actions, and scopes
|
||||
weight: 80
|
||||
refs:
|
||||
rbac-grafana-provisioning:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-grafana-provisioning/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-grafana-provisioning/
|
||||
rbac-fixed-roles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/#fixed-roles
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/#fixed-roles
|
||||
---
|
||||
|
||||
# RBAC permissions, actions, and scopes
|
||||
@@ -20,7 +31,7 @@ Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-e
|
||||
|
||||
A permission is comprised of an action and a scope. When creating a custom role, consider the actions the user can perform and the resource(s) on which they can perform those actions.
|
||||
|
||||
To learn more about the Grafana resources to which you can apply RBAC, refer to [Resources with RBAC permissions]({{< relref "../#fixed-roles" >}}).
|
||||
To learn more about the Grafana resources to which you can apply RBAC, refer to [Resources with RBAC permissions](ref:rbac-fixed-roles).
|
||||
|
||||
- **Action:** An action describes what tasks a user can perform on a resource.
|
||||
- **Scope:** A scope describes where an action can be performed, such as reading a specific user profile. In this example, a permission is associated with the scope `users:<userId>` to the relevant role.
|
||||
@@ -226,25 +237,28 @@ The following list contains role-based access control actions used by Grafana Ad
|
||||
|
||||
The following list contains role-based access control scopes.
|
||||
|
||||
| Scopes | Descriptions |
|
||||
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `annotations:*`<br>`annotations:type:*` | Restrict an action to a set of annotations. For example, `annotations:*` matches any annotation, `annotations:type:dashboard` matches annotations associated with dashboards and `annotations:type:organization` matches organization annotations. |
|
||||
| `apikeys:*`<br>`apikeys:id:*` | Restrict an action to a set of API keys. For example, `apikeys:*` matches any API key, `apikey:id:1` matches the API key whose id is `1`. |
|
||||
| `dashboards:*`<br>`dashboards:uid:*` | Restrict an action to a set of dashboards. For example, `dashboards:*` matches any dashboard, and `dashboards:uid:1` matches the dashboard whose UID is `1`. |
|
||||
| `datasources:*`<br>`datasources:uid:*` | Restrict an action to a set of data sources. For example, `datasources:*` matches any data source, and `datasources:uid:1` matches the data source whose UID is `1`. |
|
||||
| `folders:*`<br>`folders:uid:*` | Restrict an action to a set of folders. For example, `folders:*` matches any folder, and `folders:uid:1` matches the folder whose UID is `1`. Note that permissions granted to a folder cascade down to subfolders located under it |
|
||||
| `global.users:*` <br> `global.users:id:*` | Restrict an action to a set of global users. For example, `global.users:*` matches any user and `global.users:id:1` matches the user whose ID is `1`. |
|
||||
| `library.panels:*` <br> `library.panels:uid:*` | Restrict an action to a set of library panels. For example, `library.panels:*` matches any library panel, and `library.panel:uid:1` matches the library panel whose UID is `1`. |
|
||||
| `orgs:*` <br> `orgs:id:*` | Restrict an action to a set of organizations. For example, `orgs:*` matches any organization and `orgs:id:1` matches the organization whose ID is `1`. |
|
||||
| `permissions:type:delegate` | The scope is only applicable for roles associated with the Access Control itself and indicates that you can delegate your permissions only, or a subset of it, by creating a new role or making an assignment. |
|
||||
| `permissions:type:escalate` | The scope is required to trigger the reset of basic roles permissions. It indicates that users might acquire additional permissions they did not previously have. |
|
||||
| `plugins:*` <br> `plugins:id:*` | Restrict an action to a set of plugins. For example, `plugins:id:grafana-oncall-app` matches Grafana OnCall plugin, and `plugins:*` matches all plugins. |
|
||||
| `provisioners:*` | Restrict an action to a set of provisioners. For example, `provisioners:*` matches any provisioner, and `provisioners:accesscontrol` matches the role-based access control [provisioner]({{< relref "./rbac-grafana-provisioning/" >}}). |
|
||||
| `reports:*` <br> `reports:id:*` | Restrict an action to a set of reports. For example, `reports:*` matches any report and `reports:id:1` matches the report whose ID is `1`. |
|
||||
| `roles:*` <br> `roles:uid:*` | Restrict an action to a set of roles. For example, `roles:*` matches any role and `roles:uid:randomuid` matches only the role whose UID is `randomuid`. |
|
||||
| `services:accesscontrol` | Restrict an action to target only the role-based access control service. You can use this in conjunction with the `status:accesscontrol` actions. |
|
||||
| `serviceaccounts:*` <br> `serviceaccounts:id:*` | Restrict an action to a set of service account from an organization. For example, `serviceaccounts:*` matches any service account and `serviceaccount:id:1` matches the service account whose ID is `1`. |
|
||||
| `settings:*` | Restrict an action to a subset of settings. For example, `settings:*` matches all settings, `settings:auth.saml:*` matches all SAML settings, and `settings:auth.saml:enabled` matches the enable property on the SAML settings. |
|
||||
| `teams:*` <br> `teams:id:*` | Restrict an action to a set of teams from an organization. For example, `teams:*` matches any team and `teams:id:1` matches the team whose ID is `1`. |
|
||||
| `users:*` <br> `users:id:*` | Restrict an action to a set of users from an organization. For example, `users:*` matches any user and `users:id:1` matches the user whose ID is `1`. |
|
||||
| `n/a` | `n/a` means not applicable. If an action has `n/a` specified for the scope, then the action does not require a scope. For example, the `teams:create` action does not require a scope and allows users to create teams. |
|
||||
<!-- prettier-ignore-start -->
|
||||
| Scopes | Descriptions |
|
||||
| -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| <ul><li>`annotations:*`</li><li>`annotations:type:*`</li></ul> | Restrict an action to a set of annotations. For example, `annotations:*` matches any annotation, `annotations:type:dashboard` matches annotations associated with dashboards and `annotations:type:organization` matches organization annotations. |
|
||||
| <ul><li>`apikeys:*`</li><li>`apikeys:id:*`</li></ul> | Restrict an action to a set of API keys. For example, `apikeys:*` matches any API key, `apikey:id:1` matches the API key whose id is `1`. |
|
||||
| <ul><li>`dashboards:*`</li><li>`dashboards:uid:*`</li></ul> | Restrict an action to a set of dashboards. For example, `dashboards:*` matches any dashboard, and `dashboards:uid:1` matches the dashboard whose UID is `1`. |
|
||||
| <ul><li>`datasources:*`</li><li>`datasources:uid:*`</li></ul> | Restrict an action to a set of data sources. For example, `datasources:*` matches any data source, and `datasources:uid:1` matches the data source whose UID is `1`. |
|
||||
| <ul><li>`folders:*`</li><li>`folders:uid:*`</li></ul> | Restrict an action to a set of folders. For example, `folders:*` matches any folder, and `folders:uid:1` matches the folder whose UID is `1`. Note that permissions granted to a folder cascade down to subfolders located under it. |
|
||||
| <ul><li>`global.users:*`</li><li>`global.users:id:*`</li></ul> | Restrict an action to a set of global users. For example, `global.users:*` matches any user and `global.users:id:1` matches the user whose ID is `1`. |
|
||||
| <ul><li>`library.panels:*`</li><li>`library.panels:uid:*`</li></ul> | Restrict an action to a set of library panels. For example, `library.panels:*` matches any library panel, and `library.panel:uid:1` matches the library panel whose UID is `1`. |
|
||||
| <ul><li>`orgs:*`</li><li>`orgs:id:*`</li></ul> | Restrict an action to a set of organizations. For example, `orgs:*` matches any organization and `orgs:id:1` matches the organization whose ID is `1`. |
|
||||
| <ul><li>`permissions:type:delegate`</li><ul> | The scope is only applicable for roles associated with the Access Control itself and indicates that you can delegate your permissions only, or a subset of it, by creating a new role or making an assignment. |
|
||||
| <ul><li>`permissions:type:escalate`</li><ul> | The scope is required to trigger the reset of basic roles permissions. It indicates that users might acquire additional permissions they did not previously have. |
|
||||
| <ul><li>`plugins:*`</li><li>`plugins:id:*`</li></ul> | Restrict an action to a set of plugins. For example, `plugins:id:grafana-oncall-app` matches Grafana OnCall plugin, and `plugins:*` matches all plugins. |
|
||||
| <ul><li>`provisioners:*`</li><ul> | Restrict an action to a set of provisioners. For example, `provisioners:*` matches any provisioner, and `provisioners:accesscontrol` matches the role-based access control [provisioner](ref:rbac-grafana-provisioning). |
|
||||
| <ul><li>`reports:*`</li><li>`reports:id:*`</li></ul> | Restrict an action to a set of reports. For example, `reports:*` matches any report and `reports:id:1` matches the report whose ID is `1`. |
|
||||
| <ul><li>`roles:*`</li><li>`roles:uid:*`</li></ul> | Restrict an action to a set of roles. For example, `roles:*` matches any role and `roles:uid:randomuid` matches only the role whose UID is `randomuid`. |
|
||||
| <ul><li>`services:accesscontrol`</li><ul> | Restrict an action to target only the role-based access control service. You can use this in conjunction with the `status:accesscontrol` actions. |
|
||||
| <ul><li>`serviceaccounts:*`</li><li>`serviceaccounts:id:*`</li></ul> | Restrict an action to a set of service account from an organization. For example, `serviceaccounts:*` matches any service account and `serviceaccount:id:1` matches the service account whose ID is `1`. |
|
||||
| <ul><li>`settings:*`</li><ul> | Restrict an action to a subset of settings. For example, `settings:*` matches all settings, `settings:auth.saml:*` matches all SAML settings, and `settings:auth.saml:enabled` matches the enable property on the SAML settings. |
|
||||
| <ul><li>`teams:*`</li><li>`teams:id:*`</li></ul> | Restrict an action to a set of teams from an organization. For example, `teams:*` matches any team and `teams:id:1` matches the team whose ID is `1`. |
|
||||
| <ul><li>`users:*`</li><li>`users:id:*`</li></ul> | Restrict an action to a set of users from an organization. For example, `users:*` matches any user and `users:id:1` matches the user whose ID is `1`. |
|
||||
| <ul><li>None</li><ul> | If an action has "None" specified for the scope, then the action doesn't require a scope. For example, the `teams:create` action doesn't require a scope and allows users to create teams. |
|
||||
{ .no-spacing-list }
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
@@ -12,12 +12,66 @@ labels:
|
||||
menuTitle: Manage RBAC roles
|
||||
title: Manage Grafana RBAC roles
|
||||
weight: 50
|
||||
refs:
|
||||
configure-rbac-configure-rbac-in-grafana:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/configure-rbac/#configure-rbac-in-grafana
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/configure-rbac/#configure-rbac-in-grafana
|
||||
api-rbac-reset-basic-roles-to-their-default:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/#reset-basic-roles-to-their-default
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/access_control/#reset-basic-roles-to-their-default
|
||||
api-rbac-delete-a-custom-role:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/#delete-a-custom-role
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/access_control/#delete-a-custom-role
|
||||
api-rbac-update-a-role:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/#update-a-role
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/access_control/#update-a-role
|
||||
api-rbac-get-a-role:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/#get-a-role
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/access_control/#get-a-role
|
||||
api-rbac-create-a-new-custom-role:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/#create-a-new-custom-role
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/access_control/#create-a-new-custom-role
|
||||
plan-rbac-rollout-strategy:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/plan-rbac-rollout-strategy/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/plan-rbac-rollout-strategy/
|
||||
custom-role-actions-scopes:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/custom-role-actions-scopes/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/custom-role-actions-scopes/
|
||||
rbac-grafana-provisioning:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-grafana-provisioning/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-grafana-provisioning/
|
||||
rbac-role-definitions:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-fixed-basic-role-definitions/
|
||||
rbac-fixed-basic-role-definitions-basic-role-assignments:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/#basic-role-assignments
|
||||
---
|
||||
|
||||
# Manage RBAC roles
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< table-of-contents >}}
|
||||
@@ -28,7 +82,7 @@ The following example includes the base64 username:password Basic Authorization.
|
||||
|
||||
## List permissions associated with roles
|
||||
|
||||
Use a `GET` command to see the actions and scopes associated with a role. For more information about seeing a list of permissions for each role, refer to [Get a role]({{< relref "../../../../developers/http_api/access_control/#get-a-role" >}}).
|
||||
Use a `GET` command to see the actions and scopes associated with a role. For more information about seeing a list of permissions for each role, refer to [Get a role](ref:api-rbac-get-a-role).
|
||||
|
||||
To see the permissions associated with basic roles, refer to the following basic role UIDs:
|
||||
|
||||
@@ -87,7 +141,7 @@ curl --location --request GET '<grafana_url>/api/access-control/roles/qQui_LCMk'
|
||||
}
|
||||
```
|
||||
|
||||
Refer to the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#get-a-role" >}}) for more details.
|
||||
Refer to the [RBAC HTTP API](ref:api-rbac-get-a-role) for more details.
|
||||
|
||||
## Create custom roles
|
||||
|
||||
@@ -97,40 +151,40 @@ Create a custom role when basic roles and fixed roles do not meet your permissio
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- [Plan your RBAC rollout strategy]({{< relref "./plan-rbac-rollout-strategy/" >}}).
|
||||
- Determine which permissions you want to add to the custom role. To see a list of actions and scope, refer to [RBAC permissions, actions, and scopes]({{< relref "./custom-role-actions-scopes/" >}}).
|
||||
- [Enable role provisioning]({{< relref "./rbac-grafana-provisioning/" >}}).
|
||||
- [Plan your RBAC rollout strategy](ref:plan-rbac-rollout-strategy).
|
||||
- Determine which permissions you want to add to the custom role. To see a list of actions and scope, refer to [RBAC permissions, actions, and scopes](ref:custom-role-actions-scopes).
|
||||
- [Enable role provisioning](ref:rbac-grafana-provisioning).
|
||||
- Ensure that you have permissions to create a custom role.
|
||||
- By default, the Grafana Admin role has permission to create custom roles.
|
||||
- A Grafana Admin can delegate the custom role privilege to another user by creating a custom role with the relevant permissions and adding the `permissions:type:delegate` scope.
|
||||
|
||||
### Create custom roles using provisioning
|
||||
|
||||
[File-based provisioning]({{< relref "./rbac-grafana-provisioning" >}}) is one method you can use to create custom roles.
|
||||
[File-based provisioning](ref:rbac-grafana-provisioning) is one method you can use to create custom roles.
|
||||
|
||||
1. Open the YAML configuration file and locate the `roles` section.
|
||||
|
||||
1. Refer to the following table to add attributes and values.
|
||||
|
||||
| Attribute | Description |
|
||||
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `name` | A human-friendly identifier for the role that helps administrators understand the purpose of a role. `name` is required and cannot be longer than 190 characters. We recommend that you use ASCII characters. Role names must be unique within an organization. |
|
||||
| `uid` | A unique identifier associated with the role. The UID enables you to change or delete the role. You can either generate a UID yourself, or let Grafana generate one for you. You cannot use the same UID within the same Grafana instance. |
|
||||
| `orgId` | Identifies the organization to which the role belongs. The [default org ID]({{< relref "../../../../setup-grafana/configure-grafana/#auto_assign_org_id" >}}) is used if you do not specify `orgId`. |
|
||||
| `global` | Global roles are not associated with any specific organization, which means that you can reuse them across all organizations. This setting overrides `orgId`. |
|
||||
| `displayName` | Human-friendly text that is displayed in the UI. Role display name cannot be longer than 190 ASCII-based characters. For fixed roles, the display name is shown as specified. If you do not set a display name the display name replaces `':'` (a colon) with `' '` (a space). |
|
||||
| `description` | Human-friendly text that describes the permissions a role provides. |
|
||||
| `group` | Organizes roles in the role picker. |
|
||||
| `version` | A positive integer that defines the current version of the role, which prevents overwriting newer changes. |
|
||||
| `hidden` | Hidden roles do not appear in the role picker. |
|
||||
| `state` | State of the role. Defaults to `present`, but if set to `absent` the role will be removed. |
|
||||
| `force` | Can be used in addition to state `absent`, to force the removal of a role and all its assignments. |
|
||||
| `from` | An optional list of roles from which you want to copy permissions. |
|
||||
| `permissions` | Provides users access to Grafana resources. For a list of permissions, refer to [RBAC permissions actions and scopes]({{< relref "./rbac-fixed-basic-role-definitions/" >}}). If you do not know which permissions to assign, you can create and assign roles without any permissions as a placeholder. Using the `from` attribute, you can specify additional permissions or permissions to remove by adding a `state` to your permission list. |
|
||||
| Attribute | Description |
|
||||
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | A human-friendly identifier for the role that helps administrators understand the purpose of a role. `name` is required and cannot be longer than 190 characters. We recommend that you use ASCII characters. Role names must be unique within an organization. |
|
||||
| `uid` | A unique identifier associated with the role. The UID enables you to change or delete the role. You can either generate a UID yourself, or let Grafana generate one for you. You cannot use the same UID within the same Grafana instance. |
|
||||
| `orgId` | Identifies the organization to which the role belongs. The [default org ID](/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/#auto_assign_org_id) is used if you do not specify `orgId`. |
|
||||
| `global` | Global roles are not associated with any specific organization, which means that you can reuse them across all organizations. This setting overrides `orgId`. |
|
||||
| `displayName` | Human-friendly text that is displayed in the UI. Role display name cannot be longer than 190 ASCII-based characters. For fixed roles, the display name is shown as specified. If you do not set a display name the display name replaces `':'` (a colon) with `' '` (a space). |
|
||||
| `description` | Human-friendly text that describes the permissions a role provides. |
|
||||
| `group` | Organizes roles in the role picker. |
|
||||
| `version` | A positive integer that defines the current version of the role, which prevents overwriting newer changes. |
|
||||
| `hidden` | Hidden roles do not appear in the role picker. |
|
||||
| `state` | State of the role. Defaults to `present`, but if set to `absent` the role will be removed. |
|
||||
| `force` | Can be used in addition to state `absent`, to force the removal of a role and all its assignments. |
|
||||
| `from` | An optional list of roles from which you want to copy permissions. |
|
||||
| `permissions` | Provides users access to Grafana resources. For a list of permissions, refer to [RBAC permissions actions and scopes](ref:rbac-role-definitions). If you do not know which permissions to assign, you can create and assign roles without any permissions as a placeholder. Using the `from` attribute, you can specify additional permissions or permissions to remove by adding a `state` to your permission list. |
|
||||
|
||||
1. Reload the provisioning configuration file.
|
||||
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations](/docs/grafana/<GRAFANA_VERSION>/developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
The following example creates a local role:
|
||||
|
||||
@@ -199,7 +253,7 @@ roles:
|
||||
|
||||
### Create custom roles using the HTTP API
|
||||
|
||||
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]({{< relref "../../../../developers/http_api/access_control/#create-a-new-custom-role" >}}).
|
||||
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" %}}
|
||||
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.
|
||||
@@ -250,7 +304,7 @@ curl --location --request POST '<grafana_url>/api/access-control/roles/' \
|
||||
}
|
||||
```
|
||||
|
||||
Refer to the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#create-a-new-custom-role" >}}) for more details.
|
||||
Refer to the [RBAC HTTP API](ref:api-rbac-create-a-new-custom-role) for more details.
|
||||
|
||||
## Update basic role permissions
|
||||
|
||||
@@ -258,7 +312,7 @@ If the default basic role definitions do not meet your requirements, you can cha
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- 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]({{< relref "./rbac-fixed-basic-role-definitions/#basic-role-assignments" >}}).
|
||||
- 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" %}}
|
||||
You cannot modify the `No Basic Role` permissions.
|
||||
@@ -281,7 +335,7 @@ You cannot modify the `No Basic Role` permissions.
|
||||
|
||||
1. Reload the provisioning configuration file.
|
||||
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations](/docs/grafana/<GRAFANA_VERSION>/developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
The following example modifies the `Grafana Admin` basic role permissions.
|
||||
|
||||
@@ -322,7 +376,7 @@ You can add multiple `fixed`, `basic` or `custom` roles to the `from` section. T
|
||||
Make sure to **increment** the role version for the changes to be accounted for.
|
||||
{{% /admonition %}}
|
||||
|
||||
You can also change basic roles' permissions using the API. Refer to the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#update-a-role" >}}) for more details.
|
||||
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.
|
||||
|
||||
## Reset basic roles to their default
|
||||
|
||||
@@ -336,7 +390,7 @@ You have two options to reset the basic roles permissions to their default.
|
||||
|
||||
> Warning: If this option is left to true, permissions will be reset on every boot.
|
||||
|
||||
Use the [reset_basic_roles]({{< relref "../configure-rbac/#configure-rbac-in-grafana" >}}) option to reset
|
||||
Use the [reset_basic_roles](ref:configure-rbac-configure-rbac-in-grafana) option to reset
|
||||
basic roles permissions to their default on Grafana instance boot up.
|
||||
|
||||
1. Open you configuration file and update the rbac section as follow:
|
||||
@@ -369,7 +423,7 @@ An alternative to the configuration option is to use the HTTP endpoint.
|
||||
scope: 'permissions:type:escalate'
|
||||
```
|
||||
|
||||
1. As a `Grafana Admin`, call the API endpoint to reset the basic roles to their default. Refer to the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#reset-basic-roles-to-their-default" >}}) for more details.
|
||||
1. As a `Grafana Admin`, call the API endpoint to reset the basic roles to their default. Refer to the [RBAC HTTP API](ref:api-rbac-reset-basic-roles-to-their-default) for more details.
|
||||
|
||||
## Delete a custom role using Grafana provisioning
|
||||
|
||||
@@ -395,7 +449,7 @@ Delete a custom role when you no longer need it. When you delete a custom role,
|
||||
|
||||
1. Reload the provisioning configuration file.
|
||||
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations](/docs/grafana/<GRAFANA_VERSION>/developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
The following example deletes a custom role:
|
||||
|
||||
@@ -410,4 +464,4 @@ roles:
|
||||
force: true
|
||||
```
|
||||
|
||||
You can also delete a custom role using the API. Refer to the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#delete-a-custom-role" >}}) for more details.
|
||||
You can also delete a custom role using the API. Refer to the [RBAC HTTP API](ref:api-rbac-delete-a-custom-role) for more details.
|
||||
|
||||
@@ -11,12 +11,38 @@ labels:
|
||||
menuTitle: Plan your RBAC rollout strategy
|
||||
title: Plan your Grafana RBAC rollout strategy
|
||||
weight: 20
|
||||
refs:
|
||||
api-rbac-update-a-role:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/#update-a-role
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/access_control/#update-a-role
|
||||
rbac-fixed-basic-role-definitions-basic-role-assignments:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/#basic-role-assignments
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-fixed-basic-role-definitions/#basic-role-assignments
|
||||
rbac-fixed-basic-role-definitions-fixed-role-definitions:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/#fixed-role-definitions
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-fixed-basic-role-definitions/#fixed-role-definitions
|
||||
manage-rbac-roles-update-basic-role-permissions:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/manage-rbac-roles/#update-basic-role-permissions
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/manage-rbac-roles/#update-basic-role-permissions
|
||||
service-accounts:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/
|
||||
---
|
||||
|
||||
# Plan your RBAC rollout strategy
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
An RBAC rollout strategy helps you determine _how_ you want to implement RBAC prior to assigning RBAC roles to users and teams.
|
||||
@@ -35,8 +61,8 @@ As a first step in determining your permissions rollout strategy, we recommend t
|
||||
|
||||
To learn more about basic roles and fixed roles, refer to the following documentation:
|
||||
|
||||
- [Basic role definitions]({{< relref "./rbac-fixed-basic-role-definitions/#basic-role-assignments" >}})
|
||||
- [Fixed role definitions]({{< relref "./rbac-fixed-basic-role-definitions/#fixed-role-definitions" >}})
|
||||
- [Basic role definitions](ref:rbac-fixed-basic-role-definitions-basic-role-assignments)
|
||||
- [Fixed role definitions](ref:rbac-fixed-basic-role-definitions-fixed-role-definitions)
|
||||
|
||||
## User and team considerations
|
||||
|
||||
@@ -56,7 +82,7 @@ For example:
|
||||
|
||||
1. Map SAML, LDAP, or Oauth roles to Grafana basic roles (viewer, editor, or admin).
|
||||
|
||||
2. Use the Grafana Enterprise team sync feature to synchronize teams from your SAML, LDAP, or Oauth provider to Grafana. For more information about team sync, refer to [Team sync]({{< relref "../../../../setup-grafana/configure-security/configure-team-sync/" >}}).
|
||||
2. Use the Grafana Enterprise team sync feature to synchronize teams from your SAML, LDAP, or Oauth provider to Grafana. For more information about team sync, refer to [Team sync](/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-security/configure-team-sync/).
|
||||
|
||||
3. Within Grafana, assign RBAC permissions to users and teams.
|
||||
|
||||
@@ -67,7 +93,7 @@ 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" %}}
|
||||
Changes that you make to basic roles impact the role definition for all [organizations]({{< relref "../../../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.
|
||||
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 type="note" %}}
|
||||
@@ -97,13 +123,13 @@ If you have a use case that you'd like to share, feel free to contribute to this
|
||||
|
||||
1. In Grafana, create a team with the name `Internal employees`.
|
||||
1. Assign the `fixed:datasources:explorer` role to the `Internal employees` team.
|
||||
1. Add internal employees to the `Internal employees` team, or map them from a SAML, LDAP, or Oauth team using [Team Sync]({{< relref "../../../../setup-grafana/configure-security/configure-team-sync/" >}}).
|
||||
1. Add internal employees to the `Internal employees` team, or map them from a SAML, LDAP, or Oauth team using [Team Sync](/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-security/configure-team-sync/).
|
||||
1. Assign the viewer role to both internal employees and contractors.
|
||||
|
||||
### Limit viewer, editor, or admin permissions
|
||||
|
||||
1. Review the list of permissions associated with the basic role.
|
||||
1. [Change the permissions of the basic role]({{< relref "./manage-rbac-roles/#update-basic-role-permissions" >}}).
|
||||
1. [Change the permissions of the basic role](ref:manage-rbac-roles-update-basic-role-permissions).
|
||||
|
||||
### Allow only members of one team to manage Alerts
|
||||
|
||||
@@ -168,9 +194,9 @@ curl --location --request POST '<grafana_url>/api/access-control/roles/' \
|
||||
|
||||
### Enable an editor to create custom roles
|
||||
|
||||
By default, only a Grafana Server Admin can create and manage custom roles. If you want your `Editors` to do the same, [update the `Editor` basic role permissions]({{< ref "./manage-rbac-roles.md#update-basic-role-permissions" >}}). There are two ways to achieve this:
|
||||
By default, only a Grafana Server Admin can create and manage custom roles. If you want your `Editors` to do the same, [update the `Editor` basic role permissions](ref:manage-rbac-roles-update-basic-role-permissions). There are two ways to achieve this:
|
||||
|
||||
- Add the following permissions to the `basic:editor` role, using provisioning or the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#update-a-role" >}}):
|
||||
- Add the following permissions to the `basic:editor` role, using provisioning or the [RBAC HTTP API](ref:api-rbac-update-a-role):
|
||||
|
||||
| action | scope |
|
||||
| -------------- | --------------------------- |
|
||||
@@ -212,9 +238,9 @@ By default, only a Grafana Server Admin can create and manage custom roles. If y
|
||||
|
||||
### Enable viewers to create reports
|
||||
|
||||
If you want your `Viewers` to create reports, [update the `Viewer` basic role permissions]({{< ref "./manage-rbac-roles.md#update-basic-role-permissions" >}}). There are two ways to achieve this:
|
||||
If you want your `Viewers` to create reports, [update the `Viewer` basic role permissions](ref:manage-rbac-roles-update-basic-role-permissions). There are two ways to achieve this:
|
||||
|
||||
- Add the following permissions to the `basic:viewer` role, using provisioning or the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#update-a-role" >}}):
|
||||
- Add the following permissions to the `basic:viewer` role, using provisioning or the [RBAC HTTP API](ref:api-rbac-update-a-role):
|
||||
|
||||
| Action | Scope |
|
||||
| ---------------- | ------------------------------- |
|
||||
@@ -253,11 +279,11 @@ If you want your `Viewers` to create reports, [update the `Viewer` basic role pe
|
||||
global: true
|
||||
```
|
||||
|
||||
> **Note:** The `fixed:reports:writer` role assigns more permissions than just creating reports. For more information about fixed role permission assignments, refer to [Fixed role definitions]({{< relref "./rbac-fixed-basic-role-definitions/#fixed-role-definitions" >}}).
|
||||
> **Note:** The `fixed:reports:writer` role assigns more permissions than just creating reports. For more information about fixed role permission assignments, refer to [Fixed role definitions](ref:rbac-fixed-basic-role-definitions-fixed-role-definitions).
|
||||
|
||||
### Prevent a Grafana Admin from creating and inviting users
|
||||
|
||||
To prevent a Grafana Admin from creating users and inviting them to join an organization, you must [update a basic role permission]({{< relref "./manage-rbac-roles/#update-basic-role-permissions" >}}).
|
||||
To prevent a Grafana Admin from creating users and inviting them to join an organization, you must [update a basic role permission](ref:manage-rbac-roles-update-basic-role-permissions).
|
||||
The permissions to remove are:
|
||||
|
||||
| Action | Scope |
|
||||
@@ -267,7 +293,7 @@ The permissions to remove are:
|
||||
|
||||
There are two ways to achieve this:
|
||||
|
||||
- Use [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#update-a-role" >}}).
|
||||
- Use [RBAC HTTP API](ref:api-rbac-update-a-role).
|
||||
|
||||
As an example, here is a small bash script that fetches the role, modifies it using `jq` and updates it:
|
||||
|
||||
@@ -306,7 +332,7 @@ There are two ways to achieve this:
|
||||
### Prevent Viewers from accessing an App Plugin
|
||||
|
||||
By default, Viewers, Editors and Admins have access to all App Plugins that their organization role allows them to access.
|
||||
To change this default behavior and prevent Viewers from accessing an App plugin, you must [update a basic role's permissions]({{< relref "./manage-rbac-roles/#update-basic-role-permissions" >}}).
|
||||
To change this default behavior and prevent Viewers from accessing an App plugin, you must [update a basic role's permissions](ref:manage-rbac-roles-update-basic-role-permissions).
|
||||
|
||||
In this example, three App plugins have been installed and enabled:
|
||||
| Name | ID | Required Org role |
|
||||
@@ -329,7 +355,7 @@ If you want to revoke their access to the On Call App plugin, you need to:
|
||||
|
||||
Here are two ways to achieve this:
|
||||
|
||||
- Use [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#update-a-role" >}}).
|
||||
- Use [RBAC HTTP API](ref:api-rbac-update-a-role).
|
||||
|
||||
As an example, here is a small bash script that fetches the role, modifies it using `jq` and updates it:
|
||||
|
||||
@@ -397,7 +423,7 @@ A user will be added to the default organization automatically but won't have an
|
||||
|
||||
Using Service Accounts is an efficient way to facilitate M2M communications. However, they can pose a security threat if not scoped appropriately. To limit the scope of a service account, you can begin by creating a Service Account with `No Basic Role` and then assign the necessary permissions for the account.
|
||||
|
||||
1. Refer to [Service Accounts](https://grafana.com/docs/grafana/latest/administration/service-accounts/) and add a new Service Account.
|
||||
1. Refer to [Service Accounts](ref:service-accounts) and add a new Service Account.
|
||||
1. Set the basic role to `No Basic Role`.
|
||||
1. Set the fixed roles needed for the Service Account.
|
||||
|
||||
|
||||
@@ -11,35 +11,66 @@ labels:
|
||||
menuTitle: RBAC role definitions
|
||||
title: Grafana RBAC role definitions
|
||||
weight: 70
|
||||
refs:
|
||||
rbac-basic-roles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/#basic-roles
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/#basic-roles
|
||||
rbac-terraform-provisioning:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-terraform-provisioning/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-terraform-provisioning/
|
||||
rbac-manage-rbac-roles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/manage-rbac-roles/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/manage-rbac-roles/
|
||||
plan-rbac-rollout-strategy-create-a-custom-role-to-access-alerts-in-a-folder:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/plan-rbac-rollout-strategy/#create-a-custom-role-to-access-alerts-in-a-folder
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/plan-rbac-rollout-strategy/#create-a-custom-role-to-access-alerts-in-a-folder
|
||||
oncall:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/oncall/<GRAFANA_VERSION>/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/oncall/
|
||||
available-grafana-oncall-rbac-roles--granted-actions:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/oncall/<GRAFANA_VERSION>/user-and-team-management/#available-grafana-oncall-rbac-roles--granted-actions
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/oncall/user-and-team-management/#available-grafana-oncall-rbac-roles--granted-actions
|
||||
---
|
||||
|
||||
# RBAC role definitions
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
The following tables list permissions associated with basic and fixed roles.
|
||||
|
||||
## Basic role assignments
|
||||
|
||||
| Basic role | UID | Associated fixed roles | Description |
|
||||
| ------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| Grafana Admin | `basic_grafana_admin` | `fixed:roles:reader`<br>`fixed:roles:writer`<br>`fixed:users:reader`<br>`fixed:users:writer`<br>`fixed:org.users:reader`<br>`fixed:org.users:writer`<br>`fixed:ldap:reader`<br>`fixed:ldap:writer`<br>`fixed:stats:reader`<br>`fixed:settings:reader`<br>`fixed:settings:writer`<br>`fixed:provisioning:writer`<br>`fixed:organization:reader`<br>`fixed:organization:maintainer`<br>`fixed:licensing:reader`<br>`fixed:licensing:writer`<br>`fixed:datasources.caching:reader`<br>`fixed:datasources.caching:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:plugins:maintainer`<br>`fixed:authentication.config:writer`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:writer`<br>`fixed:library.panels:general.writer` | Default [Grafana server administrator]({{< relref "../../#grafana-server-administrators" >}}) assignments. |
|
||||
| Admin | `basic_admin` | `fixed:reports:reader`<br>`fixed:reports:writer`<br>`fixed:datasources:reader`<br>`fixed:datasources:writer`<br>`fixed:organization:writer`<br>`fixed:datasources.permissions:reader`<br>`fixed:datasources.permissions:writer`<br>`fixed:teams:writer`<br>`fixed:dashboards:reader`<br>`fixed:dashboards:writer`<br>`fixed:dashboards.permissions:reader`<br>`fixed:dashboards.permissions:writer`<br>`fixed:dashboards.public:writer`<br>`fixed:folders:reader`<br>`fixed:folders:writer`<br>`fixed:folders.permissions:reader`<br>`fixed:folders.permissions:writer`<br>`fixed:alerting:writer`<br>`fixed:apikeys:reader`<br>`fixed:apikeys:writer`<br>`fixed:alerting.provisioning.secrets:reader`<br>`fixed:alerting.provisioning:writer`<br>`fixed:datasources.caching:reader`<br>`fixed:datasources.caching:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:plugins:writer`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:writer`<br>`fixed:library.panels:general.writer`<br>`fixed:alerting.provisioning.status:writer` | Default [Grafana organization administrator]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| Editor | `basic_editor` | `fixed:datasources:explorer`<br>`fixed:dashboards:creator`<br>`fixed:folders:creator`<br>`fixed:annotations:writer`<br>`fixed:teams:creator` if the `editors_can_admin` configuration flag is enabled<br>`fixed:alerting:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:general.writer`<br>`fixed:alerting.provisioning.status:writer` | Default [Editor]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| Viewer | `basic_viewer` | `fixed:datasources.id:reader`<br>`fixed:organization:reader`<br>`fixed:annotations:reader`<br>`fixed:annotations.dashboard:writer`<br>`fixed:alerting:reader`<br>`fixed:plugins.app:reader`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:datasources:explorer` if the `viewers_can_edit` configuration flag is enabled | Default [Viewer]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| No Basic Role | n/a | | Default [No Basic Role]({{< relref "../#basic-roles" >}}) |
|
||||
| Basic role | UID | Associated fixed roles | Description |
|
||||
| ------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Grafana Admin | `basic_grafana_admin` | `fixed:roles:reader`<br>`fixed:roles:writer`<br>`fixed:users:reader`<br>`fixed:users:writer`<br>`fixed:org.users:reader`<br>`fixed:org.users:writer`<br>`fixed:ldap:reader`<br>`fixed:ldap:writer`<br>`fixed:stats:reader`<br>`fixed:settings:reader`<br>`fixed:settings:writer`<br>`fixed:provisioning:writer`<br>`fixed:organization:reader`<br>`fixed:organization:maintainer`<br>`fixed:licensing:reader`<br>`fixed:licensing:writer`<br>`fixed:datasources.caching:reader`<br>`fixed:datasources.caching:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:plugins:maintainer`<br>`fixed:authentication.config:writer`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:writer`<br>`fixed:library.panels:general.writer` | Default [Grafana server administrator](/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/#grafana-server-administrators) assignments. |
|
||||
| Admin | `basic_admin` | `fixed:reports:reader`<br>`fixed:reports:writer`<br>`fixed:datasources:reader`<br>`fixed:datasources:writer`<br>`fixed:organization:writer`<br>`fixed:datasources.permissions:reader`<br>`fixed:datasources.permissions:writer`<br>`fixed:teams:writer`<br>`fixed:dashboards:reader`<br>`fixed:dashboards:writer`<br>`fixed:dashboards.permissions:reader`<br>`fixed:dashboards.permissions:writer`<br>`fixed:dashboards.public:writer`<br>`fixed:folders:reader`<br>`fixed:folders:writer`<br>`fixed:folders.permissions:reader`<br>`fixed:folders.permissions:writer`<br>`fixed:alerting:writer`<br>`fixed:apikeys:reader`<br>`fixed:apikeys:writer`<br>`fixed:alerting.provisioning.secrets:reader`<br>`fixed:alerting.provisioning:writer`<br>`fixed:datasources.caching:reader`<br>`fixed:datasources.caching:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:plugins:writer`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:writer`<br>`fixed:library.panels:general.writer`<br>`fixed:alerting.provisioning.status:writer` | Default [Grafana organization administrator](ref:rbac-basic-roles) assignments. |
|
||||
| Editor | `basic_editor` | `fixed:datasources:explorer`<br>`fixed:dashboards:creator`<br>`fixed:folders:creator`<br>`fixed:annotations:writer`<br>`fixed:teams:creator` if the `editors_can_admin` configuration flag is enabled<br>`fixed:alerting:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:general.writer`<br>`fixed:alerting.provisioning.status:writer` | Default [Editor](ref:rbac-basic-roles) assignments. |
|
||||
| Viewer | `basic_viewer` | `fixed:datasources.id:reader`<br>`fixed:organization:reader`<br>`fixed:annotations:reader`<br>`fixed:annotations.dashboard:writer`<br>`fixed:alerting:reader`<br>`fixed:plugins.app:reader`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:datasources:explorer` if the `viewers_can_edit` configuration flag is enabled | Default [Viewer](ref:rbac-basic-roles) assignments. |
|
||||
| No Basic Role | n/a | | Default [No Basic Role](ref:rbac-basic-roles) |
|
||||
|
||||
## Fixed role definitions
|
||||
|
||||
The following table has the existing built-in fixed role definitions. Other fixed roles might be added by plugins installed in Grafana.
|
||||
The UUID presented here can be used as an identifier for [Terraform provisioning](../rbac-terraform-provisioning).
|
||||
The UUID presented here can be used as an identifier for [Terraform provisioning](ref:rbac-terraform-provisioning).
|
||||
|
||||
{{< admonition type="caution" >}}
|
||||
These UUIDs won't be available if your instance was created before Grafana v10.2.0.
|
||||
|
||||
To learn how to use the roles API to determine the role UUIDs, refer to [Manage RBAC roles](/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/manage-rbac-roles/).
|
||||
To learn how to use the roles API to determine the role UUIDs, refer to [Manage RBAC roles](ref:rbac-manage-rbac-roles).
|
||||
{{< /admonition >}}
|
||||
|
||||
| Fixed role | UUID | Permissions | Description |
|
||||
@@ -129,7 +160,7 @@ Access to Grafana alert rules is an intersection of many permissions:
|
||||
|
||||
There is only one exclusion at this moment. Role `fixed:alerting.provisioning:writer` does not require user to have any additional permissions and provides access to all aspects of the alerting configuration via special provisioning API.
|
||||
|
||||
For more information about the permissions required to access alert rules, refer to [Create a custom role to access alerts in a folder]({{< relref "./plan-rbac-rollout-strategy/#create-a-custom-role-to-access-alerts-in-a-folder" >}}).
|
||||
For more information about the permissions required to access alert rules, refer to [Create a custom role to access alerts in a folder](ref:plan-rbac-rollout-strategy-create-a-custom-role-to-access-alerts-in-a-folder).
|
||||
|
||||
### Grafana OnCall roles (beta)
|
||||
|
||||
@@ -139,17 +170,17 @@ Available from Grafana 9.4 in early access.
|
||||
|
||||
{{% 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]({{< relref "../../../../setup-grafana/configure-grafana/#feature_toggles" >}}) for details.
|
||||
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 %}}
|
||||
|
||||
If you are using [Grafana OnCall](https://grafana.com/docs/oncall/latest/get-started/), 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](https://grafana.com/docs/oncall/latest/user-and-team-management/#available-grafana-oncall-rbac-roles--granted-actions).
|
||||
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).
|
||||
|
||||
The following table lists the default RBAC OnCall role assignments to the basic roles:
|
||||
|
||||
| Basic role | Associated fixed roles | Description |
|
||||
| ------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| Grafana Admin | `plugins:grafana-oncall-app:admin` | Default [Grafana server administrator]({{< relref "../#grafana-server-administrators" >}}) assignments. |
|
||||
| Admin | `plugins:grafana-oncall-app:admin` | Default [Grafana organization administrator]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| Editor | `plugins:grafana-oncall-app:editor` | Default [Editor]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| Viewer | `plugins:grafana-oncall-app:reader` | Default [Viewer]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| Basic role | Associated fixed roles | Description |
|
||||
| ------------- | ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Grafana Admin | `plugins:grafana-oncall-app:admin` | Default [Grafana server administrator](/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/#grafana-server-administrators) assignments. |
|
||||
| Admin | `plugins:grafana-oncall-app:admin` | Default [Grafana organization administrator](ref:rbac-basic-roles) assignments. |
|
||||
| Editor | `plugins:grafana-oncall-app:editor` | Default [Editor](ref:rbac-basic-roles) assignments. |
|
||||
| Viewer | `plugins:grafana-oncall-app:reader` | Default [Viewer](ref:rbac-basic-roles) assignments. |
|
||||
|
||||
@@ -11,15 +11,51 @@ labels:
|
||||
menuTitle: Provisioning RBAC with Grafana
|
||||
title: Provisioning RBAC with Grafana
|
||||
weight: 60
|
||||
refs:
|
||||
api-rbac-create-and-manage-custom-roles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/#create-and-manage-custom-roles
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/access_control/#create-and-manage-custom-roles
|
||||
rbac-terraform-provisioning:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-terraform-provisioning/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-terraform-provisioning/
|
||||
rbac-manage-rbac-roles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/manage-rbac-roles/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/manage-rbac-roles/
|
||||
rbac-assign-rbac-roles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/assign-rbac-roles/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/assign-rbac-roles/
|
||||
service-accounts:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/
|
||||
manage-rbac-roles-create-custom-roles-using-provisioning:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/manage-rbac-roles/#create-custom-roles-using-provisioning
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/manage-rbac-roles/#create-custom-roles-using-provisioning
|
||||
assign-rbac-roles-assign-a-fixed-role-to-a-basic-role-using-provisioning:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/assign-rbac-roles/#assign-a-fixed-role-to-a-basic-role-using-provisioning
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/assign-rbac-roles/##assign-a-fixed-role-to-a-basic-role-using-provisioning
|
||||
---
|
||||
|
||||
# Provisioning RBAC with Grafana
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
You can create, change or remove [Custom roles]({{< relref "./manage-rbac-roles/#create-custom-roles-using-provisioning" >}}) and create or remove [basic role assignments]({{< relref "./assign-rbac-roles/#assign-a-fixed-role-to-a-basic-role-using-provisioning" >}}), by adding one or more YAML configuration files in the `provisioning/access-control/` directory.
|
||||
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.
|
||||
|
||||
Grafana performs provisioning during startup. After you make a change to the configuration file, you can reload it during runtime. You do not need to restart the Grafana server for your changes to take effect.
|
||||
|
||||
@@ -37,13 +73,13 @@ Grafana performs provisioning during startup. After you make a change to the con
|
||||
|
||||
1. Add RBAC provisioning details to the configuration file.
|
||||
|
||||
Refer to [Manage RBAC roles]({{< relref "./manage-rbac-roles/" >}}) and [Assign RBAC roles]({{< relref "./assign-rbac-roles/" >}}) for instructions.
|
||||
Refer to [Manage RBAC roles](ref:rbac-manage-rbac-roles) and [Assign RBAC roles](ref:rbac-assign-rbac-roles) for instructions.
|
||||
|
||||
Refer to [example role provisioning file]({{< relref "#example-role-configuration-file-using-grafana-provisioning" >}}) for a complete example of a provisioning file.
|
||||
Refer to [example role provisioning file](#example-role-configuration-file-using-grafana-provisioning) for a complete example of a provisioning file.
|
||||
|
||||
1. Reload the provisioning configuration file.
|
||||
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations](/docs/grafana/<GRAFANA_VERSION>/developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
## Example role configuration file using Grafana provisioning
|
||||
|
||||
@@ -131,6 +167,6 @@ teams:
|
||||
|
||||
## Useful Links
|
||||
|
||||
[Provisioning RBAC setup with Terraform]({{< relref "./rbac-terraform-provisioning">}})
|
||||
[Provisioning RBAC setup with Terraform](ref:rbac-terraform-provisioning)
|
||||
|
||||
[Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/)
|
||||
|
||||
@@ -10,12 +10,43 @@ labels:
|
||||
menuTitle: Provisioning RBAC with Terraform
|
||||
title: Provisioning RBAC with Terraform
|
||||
weight: 60
|
||||
refs:
|
||||
api-rbac-create-and-manage-custom-roles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/access_control/#create-and-manage-custom-roles
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/access_control/#create-and-manage-custom-roles
|
||||
rbac-grafana-provisioning:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-grafana-provisioning/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/rbac-grafana-provisioning/
|
||||
service-accounts:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/
|
||||
service-accounts-create-a-service-account-in-grafana:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/#create-a-service-account-in-grafana
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/#create-a-service-account-in-grafana
|
||||
service-accounts-assign-roles-to-a-service-account-in-grafana:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/#assign-roles-to-a-service-account-in-grafana
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/#assign-roles-to-a-service-account-in-grafana
|
||||
service-accounts-to-add-a-token-to-a-service-account:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/#to-add-a-token-to-a-service-account
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/#to-add-a-token-to-a-service-account
|
||||
---
|
||||
|
||||
# Provisioning RBAC with Terraform
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /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).
|
||||
@@ -28,15 +59,15 @@ You can create, change or remove [Custom roles](https://registry.terraform.io/pr
|
||||
|
||||
## Create a Service Account Token for provisioning
|
||||
|
||||
We recommend using service account tokens for provisioning. [Service accounts]({{< relref "../../../service-accounts/" >}}) support fine grained permissions, which allows you to easily authenticate and use the minimum set of permissions needed to provision your RBAC infrastructure.
|
||||
We recommend using service account tokens for provisioning. [Service accounts](ref:service-accounts) support fine grained permissions, which allows you to easily authenticate and use the minimum set of permissions needed to provision your RBAC infrastructure.
|
||||
|
||||
To create a service account token for provisioning, complete the following steps.
|
||||
|
||||
1. [Create a new service account]({{< relref "../../../service-accounts/#create-a-service-account-in-grafana" >}}) for your CI pipeline.
|
||||
1. [Assign permissions to service account]({{< relref "../../../service-accounts/#assign-roles-to-a-service-account-in-grafana" >}}):
|
||||
1. [Create a new service account](ref:service-accounts-create-a-service-account-in-grafana) for your CI pipeline.
|
||||
1. [Assign permissions to service account](ref:service-accounts-assign-roles-to-a-service-account-in-grafana):
|
||||
- You will need roles “Role reader”, "Role writer" and roles including any permissions that will be provisioned. For example, to create or assign a role that allows creating users, a service account needs permissions to create users.
|
||||
- Alternatively, you can assign "Admin" basic role to the service account.
|
||||
1. [Create a new service account token]({{< relref "../../../service-accounts/#to-add-a-token-to-a-service-account" >}}) for use in Terraform.
|
||||
1. [Create a new service account token](ref:service-accounts-to-add-a-token-to-a-service-account) for use in Terraform.
|
||||
|
||||
Alternatively, you can use basic authentication. To view all the supported authentication formats, see [here](https://registry.terraform.io/providers/grafana/grafana/latest/docs#authentication).
|
||||
|
||||
@@ -147,11 +178,11 @@ resource "grafana_role_assignment" "my_new_role_assignment" {
|
||||

|
||||
|
||||
Note that instead of using a provisioned role, you can also look up the `uid` of an already existing fixed or custom role and use that instead.
|
||||
You can use the [API endpoint for listing roles](https://grafana.com/docs/grafana/latest/developers/http_api/access_control/#create-and-manage-custom-roles) to look up role `uid`s.
|
||||
You can use the [API endpoint for listing roles](ref:api-rbac-create-and-manage-custom-roles) to look up role `uid`s.
|
||||
Similarly, you can look up and use `id`s of users, teams and service accounts that have not been provisioned to assign roles to them.
|
||||
|
||||
## Useful Links
|
||||
|
||||
[RBAC setup with Grafana provisioning]({{< relref "./rbac-grafana-provisioning">}})
|
||||
[RBAC setup with Grafana provisioning](ref:rbac-grafana-provisioning)
|
||||
|
||||
[Grafana Cloud Terraform provisioning](/docs/grafana-cloud/infrastructure-as-code/terraform/)
|
||||
[Grafana Cloud Terraform provisioning](/docs/grafana-cloud/developer-resources/infrastructure-as-code/terraform/)
|
||||
|
||||
@@ -27,7 +27,7 @@ filters = accesscontrol:debug accesscontrol.evaluator:debug dashboard.permission
|
||||
## Enable audit logging
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) version 7.3 and later, and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](/docs/grafana/<GRAFANA_VERSION>/introduction/grafana-enterprise/) version 7.3 and later, and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
You can enable auditing in the Grafana configuration file.
|
||||
@@ -38,11 +38,11 @@ enabled = true
|
||||
```
|
||||
|
||||
All permission and role updates, and role assignments are added to audit logs.
|
||||
Learn more about [access control audit logs]({{< relref "../../../../setup-grafana/configure-security/audit-grafana/#access-control" >}}).
|
||||
Learn more about [access control audit logs](/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-security/audit-grafana/#access-control).
|
||||
|
||||
## Missing dashboard, folder or data source permissions
|
||||
|
||||
[Dashboard and folder permissions]({{< relref "../../#dashboard-permissions" >}}) and [data source permissions]({{< relref "../../#data-source-permissions" >}}) can go out of sync if a Grafana instance version is upgraded, downgraded and then upgraded again.
|
||||
[Dashboard and folder permissions](/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/#dashboard-permissions) and [data source permissions](/docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/#data-source-permissions) can go out of sync if a Grafana instance version is upgraded, downgraded and then upgraded again.
|
||||
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.
|
||||
|
||||
|
||||
@@ -15,15 +15,56 @@ labels:
|
||||
menuTitle: Service accounts
|
||||
title: Service accounts
|
||||
weight: 800
|
||||
refs:
|
||||
service-accounts:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/
|
||||
migrate-api-keys:
|
||||
- pattern: /docs/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/migrate-api-keys/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/migrate-api-keys/
|
||||
roles-and-permissions:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/cloud-roles/
|
||||
rbac:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/
|
||||
rbac-assign-rbac-roles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/assign-rbac-roles/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/access-control/assign-rbac-roles/
|
||||
api-create-service-account:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/serviceaccount/#create-service-account
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/serviceaccount/#create-service-account
|
||||
api-create-service-account-tokens:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/serviceaccount/#create-service-account-tokens
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/serviceaccount/#create-service-account-tokens
|
||||
api-update-service-account:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/serviceaccount/#update-service-account
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/serviceaccount/#update-service-account
|
||||
---
|
||||
|
||||
# Service accounts
|
||||
|
||||
You can use a service account to run automated workloads in Grafana, such as dashboard provisioning, configuration, or report generation. Create service accounts and tokens to authenticate applications, such as Terraform, with the Grafana API.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Service accounts replace [API keys]({{< relref "../api-keys/" >}}) as the primary way to authenticate applications that interact with Grafana.
|
||||
{{% /admonition %}}
|
||||
{{< admonition type="note" >}}
|
||||
Service accounts replace [API keys](ref:migrate-api-keys) as the primary way to authenticate applications that interact with Grafana.
|
||||
{{< /admonition >}}
|
||||
|
||||
A common use case for creating a service account is to perform operations on automated or triggered tasks. You can use service accounts to:
|
||||
|
||||
@@ -32,15 +73,17 @@ A common use case for creating a service account is to perform operations on aut
|
||||
- Set up an external SAML authentication provider
|
||||
- Interact with Grafana without signing in as a user
|
||||
|
||||
In [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}), you can also use service accounts in combination with [role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}) to grant very specific permissions to applications that interact with Grafana.
|
||||
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" %}}
|
||||
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 %}}
|
||||
|
||||
{{< vimeo 742056367 >}}
|
||||
|
||||
_Video shows service accounts in Grafana v9.1. Refer to [Create a service account in Grafana]({{< relref "#create-a-service-account-in-grafana" >}}) for current instructions._
|
||||
_Video shows service accounts in Grafana v9.1. Refer to [Create a service account in Grafana](#create-a-service-account-in-grafana) for current instructions._
|
||||
|
||||
## Service account tokens
|
||||
|
||||
@@ -62,19 +105,19 @@ The added benefits of service accounts to API keys include:
|
||||
- Service accounts resemble Grafana users and can be enabled/disabled, granted specific permissions, and remain active until they are deleted or disabled. API keys are only valid until their expiry date.
|
||||
- Service accounts can be associated with multiple tokens.
|
||||
- Unlike API keys, service account tokens are not associated with a specific user, which means that applications can be authenticated even if a Grafana user is deleted.
|
||||
- You can grant granular permissions to service accounts by leveraging [role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}). For more information about permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/" >}}).
|
||||
- You can grant granular permissions to service accounts by leveraging [role-based access control](ref:rbac). For more information about permissions, refer to [About users and permissions](ref:roles-and-permissions).
|
||||
|
||||
## Create a service account in Grafana
|
||||
|
||||
A service account can be used to run automated workloads in Grafana, like dashboard provisioning, configuration, or report generation. For more information about how you can use service accounts, refer to [About service accounts]({{< ref "#about-service-accounts" >}}).
|
||||
A service account can be used to run automated workloads in Grafana, like dashboard provisioning, configuration, or report generation. For more information about how you can use service accounts, refer to [About service accounts](ref:service-accounts).
|
||||
|
||||
For more information about creating service accounts via the API, refer to [Create a service account in the HTTP API]({{< relref "../../developers/http_api/serviceaccount/#create-service-account" >}}).
|
||||
For more information about creating service accounts via the API, refer to [Create a service account in the HTTP API](ref:api-create-service-account).
|
||||
|
||||
Note that the user who created a service account will also be able to read, update and delete the service account that they created, as well as permissions associated with that service account.
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions](ref:roles-and-permissions).
|
||||
|
||||
### To create a service account
|
||||
|
||||
@@ -90,13 +133,13 @@ Note that the user who created a service account will also be able to read, upda
|
||||
|
||||
## Add a token to a service account in Grafana
|
||||
|
||||
A service account token is a generated random string that acts as an alternative to a password when authenticating with Grafana’s HTTP API. For more information about service accounts, refer to [About service accounts in Grafana]({{< ref "#about-service-accounts" >}}).
|
||||
A service account token is a generated random string that acts as an alternative to a password when authenticating with Grafana’s HTTP API. For more information about service accounts, refer to [About service accounts in Grafana](ref:service-accounts).
|
||||
|
||||
You can create a service account token using the Grafana UI or via the API. For more information about creating a service account token via the API, refer to [Create service account tokens using the HTTP API]({{< relref "../../developers/http_api/serviceaccount/#create-service-account-tokens" >}}).
|
||||
You can create a service account token using the Grafana UI or via the API. For more information about creating a service account token via the API, refer to [Create service account tokens using the HTTP API](ref:api-create-service-account-tokens).
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions](ref:roles-and-permissions).
|
||||
|
||||
### Service account token expiration dates
|
||||
|
||||
@@ -118,9 +161,9 @@ By default, service account tokens don't have an expiration date, meaning they w
|
||||
## Assign roles to a service account in Grafana
|
||||
|
||||
You can assign roles to a Grafana service account to control access for the associated service account tokens.
|
||||
You can assign roles to a service account using the Grafana UI or via the API. For more information about assigning a role to a service account via the API, refer to [Update service account using the HTTP API]({{< relref "../../developers/http_api/serviceaccount/#update-service-account" >}}).
|
||||
You can assign roles to a service account using the Grafana UI or via the API. For more information about assigning a role to a service account via the API, refer to [Update service account using the HTTP API](ref:api-update-service-account).
|
||||
|
||||
In [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}), you can also [assign RBAC roles]({{< relref "../roles-and-permissions/access-control/assign-rbac-roles" >}}) to grant very specific permissions to applications that interact with Grafana.
|
||||
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" %}}
|
||||
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.
|
||||
@@ -128,7 +171,7 @@ Since Grafana 10.2.0, the `No Basic Role` is available for organization users or
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have permission to update service accounts roles. By default, the organization administrator role is required to update service accounts permissions. For more information about user permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
- Ensure you have permission to update service accounts roles. By default, the organization administrator role is required to update service accounts permissions. For more information about user permissions, refer to [About users and permissions](ref:roles-and-permissions).
|
||||
|
||||
### To assign a role to a service account
|
||||
|
||||
@@ -144,7 +187,7 @@ To control what and who can do with the service account you can assign permissio
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have permission to update user and team permissions of a service accounts. By default, the organization administrator role is required to update user and teams permissions for a service account. For more information about user permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
- Ensure you have permission to update user and team permissions of a service accounts. By default, the organization administrator role is required to update user and teams permissions for a service account. For more information about user permissions, refer to [About users and permissions](ref:roles-and-permissions).
|
||||
- Ensure you have permission to read teams.
|
||||
|
||||
### User and team permissions for a service account
|
||||
@@ -183,7 +226,7 @@ This can help you diagnose permissions-related issues with token authorization.
|
||||
|
||||
These endpoints provide details on a service account's token.
|
||||
If you haven't added a token to a service account, do so before proceeding.
|
||||
For details, refer to [Add a token to a service account]({{< relref "#add-a-token-to-a-service-account-in-grafana" >}}).
|
||||
For details, refer to [Add a token to a service account](#add-a-token-to-a-service-account-in-grafana).
|
||||
|
||||
### List a service account token's permissions
|
||||
|
||||
@@ -1,93 +1,58 @@
|
||||
---
|
||||
aliases:
|
||||
- about-api-keys/
|
||||
- create-api-key/
|
||||
description: This section contains information about API keys in Grafana
|
||||
- ../api-keys/ # /docs/grafana/<GRAFANA_VERSION>/administration/api-keys/
|
||||
- ../about-api-keys/ # /docs/grafana/<GRAFANA_VERSION>/administration/about-api-keys/
|
||||
- ../create-api-key/ # /docs/grafana/<GRAFANA_VERSION>/administration/create-api-key/
|
||||
description: Learn how to migrate legacy API keys to service account tokens.
|
||||
keywords:
|
||||
- API keys
|
||||
- Service accounts
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- cloud
|
||||
- oss
|
||||
menuTitle: API keys
|
||||
title: API keys
|
||||
menuTitle: Migrate API keys
|
||||
title: Migrate API keys to service account tokens
|
||||
weight: 700
|
||||
refs:
|
||||
service-accounts:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/
|
||||
service-accounts-benefits:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/#service-account-benefits
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/#service-account-benefits
|
||||
roles-and-permissions:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/cloud-roles/
|
||||
api-service-account:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/serviceaccount/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/serviceaccount/
|
||||
---
|
||||
|
||||
# API keys
|
||||
# Migrate API keys to service account tokens
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Deprecated: [Service accounts]({{< relref "../service-accounts/" >}}) have replaced API keys as the primary way to authenticate applications that interact with Grafana.
|
||||
API keys are deprecated. [Service accounts](ref:service-accounts) now replace API keys for authenticating with the **HTTP APIs** and interacting with Grafana.
|
||||
{{% /admonition %}}
|
||||
|
||||
An API key is a randomly generated string that external systems use to interact with Grafana HTTP APIs.
|
||||
API keys specify a role—either **Admin**, **Editor**, or **Viewer**—that determine the permissions associated with interacting with Grafana.
|
||||
|
||||
When you create an API key, you specify a **Role** that determines the permissions associated with the API key. Role permissions control that actions the API key can perform on Grafana resources.
|
||||
Compared to API keys, service accounts have limited scopes that provide more security. For more information on the benefits of service accounts, refer to [service account benefits](ref:service-accounts-benefits).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you use Grafana v9.1 or newer, use service accounts instead of API keys. For more information, refer to [Grafana service accounts]({{< relref "../service-accounts/" >}}).
|
||||
{{% /admonition %}}
|
||||
When you migrate an API key to a service account, a service account is created with a service account token. Your existing API key—now migrated to a service account token—will continue working as before.
|
||||
|
||||
{{< section >}}
|
||||
To find the migrated API keys, click **Administration** in the left-side menu, then **Users and access -> Service Accounts**, select the service account, and locate the **Token**.
|
||||
|
||||
## Create an API key
|
||||
|
||||
Create an API key when you want to manage your computed workload with a user.
|
||||
|
||||
This topic shows you how to create an API key using the Grafana UI. You can also create an API key using the Grafana HTTP API. For more information about creating API keys via the API, refer to [Create API key via API]({{< relref "../../developers/http_api/create-api-tokens-for-org/#how-to-create-a-new-organization-and-an-api-token" >}}).
|
||||
|
||||
### Before you begin
|
||||
|
||||
To follow these instructions, you need at least one of the following:
|
||||
|
||||
- Administrator permissions
|
||||
- Editor permissions
|
||||
- Service account writer
|
||||
|
||||
- To ensure you have permission to create and edit API keys, follow the instructions in [Roles and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
|
||||
### Steps
|
||||
|
||||
To create an API key, complete the following steps:
|
||||
|
||||
1. Sign in to Grafana.
|
||||
1. Click **Administration** in the left-side menu, **Users and access**, and select **API Keys**.
|
||||
1. Click **Add API key**.
|
||||
1. Enter a unique name for the key.
|
||||
1. In the **Role** field, select one of the following access levels you want to assign to the key.
|
||||
- **Admin**: Enables a user to use APIs at the broadest, most powerful administrative level.
|
||||
- **Editor** or **Viewer** to limit the key's users to those levels of power.
|
||||
1. In the **Time to live** field, specify how long you want the key to be valid.
|
||||
- The maximum length of time is 30 days (one month). You enter a number and a letter. Valid letters include `s` for seconds,`m` for minutes, `h` for hours, `d `for days, `w` for weeks, and `M `for month. For example, `12h` is 12 hours and `1M` is 1 month (30 days).
|
||||
- If you are unsure about how long an API key should be valid, we recommend that you choose a short duration, such as a few hours. This approach limits the risk of having API keys that are valid for a long time.
|
||||
1. Click **Add**.
|
||||
|
||||
## Migrate API keys to Grafana service accounts
|
||||
|
||||
As an alternative to using API keys for authentication, you can use a service account-based authentication system. When compared to API keys, service accounts have limited scopes that provide more security than using API keys.
|
||||
|
||||
For more information about the benefits of service accounts, refer to [Grafana service account benefits]({{< relref "../service-accounts/#service-account-benefits" >}}).
|
||||
|
||||
The service account endpoints generate a machine user for authentication instead of using API keys. When you migrate an API key to a service account, a service account will be created with a service account token.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you're currently using API keys for authentication, we strongly recommend to use Grafana Service Accounts instead. Rest assured, when migrating to Service Accounts, your existing API keys will continue working as before. To find the migrated API keys, navigate to the Service Accounts section and select the Service Account Tokens tab. For more information, please refer to the [Grafana service account tokens]({{< relref "../service-accounts/#service-account-tokens" >}}) details.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Ways of migrating API keys to service accounts
|
||||
|
||||
If you are currently using API keys in your environment, you need to reconfigure your setup to use service accounts.
|
||||
|
||||
Depending on your current setup, you may need to use one or all of the following methods to migrate your environment to service accounts:
|
||||
|
||||
- The Grafana user interface: Use this method if you have been using the UI to manage your API keys and want to switch to using service accounts.
|
||||
- The Grafana API: Use this method if you have been using API calls to manage your API keys and want to switch to using service accounts programmatically.
|
||||
- Terraform: If you have a Terraform configuration that sets up API keys, you need to reconfigure your Terraform to use service accounts instead.
|
||||
|
||||
By following these steps, you can successfully migrate your integration from API keys to service accounts and continue using Grafana seamlessly.
|
||||
|
||||
### Migrate API keys to Grafana service accounts using the Grafana user interface
|
||||
## Migrate API keys using the Grafana user interface
|
||||
|
||||
This section shows you how to migrate API keys to Grafana service accounts using the Grafana user interface. You can choose to migrate a single API key or all API keys. When you migrate all API keys, you can no longer create API keys and must use service accounts instead.
|
||||
|
||||
@@ -99,7 +64,7 @@ To follow these instructions, you need at least one of the following:
|
||||
- Editor permissions
|
||||
- Service account writer
|
||||
|
||||
For more information about permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
For more information about permissions, refer to [Roles and permissions](ref:roles-and-permissions).
|
||||
|
||||
#### Steps
|
||||
|
||||
@@ -118,9 +83,9 @@ To migrate a single API key to a service account, complete the following steps:
|
||||
1. Find the API Key you want to migrate.
|
||||
1. Click **Migrate to service account**.
|
||||
|
||||
### Migrate API keys to Grafana service accounts for API calls
|
||||
## Migrate API keys using the HTTP API
|
||||
|
||||
This section shows you how to migrate API keys to Grafana service accounts for Grafana API workflows. For references see: [Grafana Service Accounts for the Grafana API]({{< relref "../../developers/http_api/serviceaccount/#create-service-account" >}}).
|
||||
This section shows you how to programmatically migrate API keys to Grafana service accounts using the HTTP API. For API additional information, refer to [Service account HTTP APIs](ref:api-service-account).
|
||||
|
||||
#### Before you begin
|
||||
|
||||
@@ -180,7 +145,7 @@ curl --request GET --url http://localhost:3000/api/folders --header 'Authorizati
|
||||
[{"id":1,"uid":"a5261a84-eebc-4733-83a9-61f4713561d1","title":"gdev dashboards"}]%
|
||||
```
|
||||
|
||||
### Migrate API keys to Grafana service accounts in Terraform
|
||||
## Migrate API keys using Terraform
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
The terraform resource `api_key` is removed from the Grafana Terraform Provider in v3.0.0.
|
||||
@@ -201,9 +166,7 @@ terraform {
|
||||
}
|
||||
```
|
||||
|
||||
This section shows you how to migrate your Terraform configuration for API keys to Grafana service accounts. For resources, see [Grafana Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/service_account_token).
|
||||
|
||||
For migration your cloud stack api keys, use the `grafana_cloud_stack_service_account` and `gafana_cloud_stack_service_account_token` resources see [Grafana Cloud Stack Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/cloud_stack_service_account).
|
||||
This section shows you how to migrate your Terraform configuration for API keys to Grafana service accounts. For additional information, refer to [Grafana Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/service_account_token).
|
||||
|
||||
#### Steps
|
||||
|
||||
@@ -283,9 +246,11 @@ resource "grafana_service_account_token" "sat-foo" {
|
||||
}
|
||||
```
|
||||
|
||||
### Migrate Cloud **Stack** API keys to Grafana cloud stack service accounts in Terraform
|
||||
## Migrate Cloud Stack API keys using Terraform
|
||||
|
||||
This section shows you how to migrate your Terraform configuration for Grafana cloud stack API keys to Grafana cloud stack service accounts. For migration your cloud stack api keys, use the `grafana_cloud_stack_service_account` and `gafana_cloud_stack_service_account_token` resources see [Grafana Cloud Stack Service Accounts in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/cloud_stack_service_account).
|
||||
This section shows you how to migrate your Terraform configuration for Grafana cloud stack API keys to Grafana cloud stack service accounts.
|
||||
|
||||
For migration your cloud stack api keys, use the `grafana_cloud_stack_service_account` and `gafana_cloud_stack_service_account_token` resources. 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" %}}
|
||||
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.
|
||||
@@ -83,11 +83,8 @@ Grafana-managed rules are the most flexible alert rule type. They allow you to c
|
||||
Multiple alert instances can be created as a result of one alert rule (also known as a multi-dimensional alerting).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
For Grafana Cloud, there are limits on how many Grafana-managed alert rules you can create. These are as follows:
|
||||
|
||||
- Free: 100 alert rules
|
||||
- Paid: 2000 alert rules
|
||||
{{% /admonition %}}
|
||||
For Grafana Cloud, you can create 100 free Grafana-managed alert rules.
|
||||
{{% /admonition %}}
|
||||
|
||||
Grafana managed alert rules can only be edited or deleted by users with Edit permissions for the folder storing the rules.
|
||||
|
||||
@@ -256,7 +253,7 @@ You can configure the alert instance state when its evaluation returns no data:
|
||||
| No Data configuration | Description |
|
||||
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| No Data | The default option. Sets alert instance state to `No data`. <br/> The alert rule also creates a new alert instance `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||
| Alerting | Sets alert instance state to `Alerting`. It waits until the [pending period](ref:pending-period) has finished. |
|
||||
| Alerting | Sets the alert instance state to `Pending` and then transitions to `Alerting` once the [pending period](ref:pending-period) ends. If you sent the pending period to 0, the alert instance state is immediately set to `Alerting`. |
|
||||
| Normal | Sets alert instance state to `Normal`. |
|
||||
| Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). |
|
||||
|
||||
@@ -265,7 +262,7 @@ You can also configure the alert instance state when its evaluation returns an e
|
||||
| Error configuration | Description |
|
||||
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Error | The default option. Sets alert instance state to `Error`. <br/> The alert rule also creates a new alert instance `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||
| Alerting | Sets alert instance state to `Alerting`. It waits until the [pending period](ref:pending-period) has finished. |
|
||||
| Alerting | Sets alert instance state to `Alerting`. It transitions from `Pending` to `Alerting` after the [pending period](ref:pending-period) has finished. |
|
||||
| Normal | Sets alert instance state to `Normal`. |
|
||||
| Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). |
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ labels:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Create recording rules
|
||||
title: Configure recording rules
|
||||
weight: 300
|
||||
refs:
|
||||
configure-grafana:
|
||||
@@ -29,22 +29,31 @@ refs:
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/
|
||||
---
|
||||
|
||||
# Create recording rules
|
||||
# Configure recording rules
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
In Grafana Cloud, you can only create data source-managed recording rules.
|
||||
|
||||
In Grafana OSS and Enterprise, you can create both Grafana-managed and data source-managed recording rules if you enable the `grafanaManagedRecordingRules` feature flag.
|
||||
|
||||
For more information on enabling feature toggles, refer to [Configure feature toggles](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/feature-toggles).
|
||||
{{< /admonition >}}
|
||||
|
||||
You can create and manage recording rules for an external Grafana Mimir or Loki instance.
|
||||
Recording rules calculate frequently needed expressions or computationally expensive expressions in advance and save the result as a new set of time series. Querying this new time series is faster, especially for dashboards since they query the same expression every time the dashboards refresh.
|
||||
|
||||
For more information on recording rules in Prometheus, refer to [Defining recording rules in Prometheus](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/).
|
||||
|
||||
**Note:**
|
||||
|
||||
Recording rules are run as instant rules, which means that they run every 10s. To overwrite this configuration, update the min_interval in your custom configuration file.
|
||||
|
||||
[min_interval](ref:configure-grafana) sets the minimum interval to enforce between rule evaluations. The default value is 10s which equals the scheduler interval. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as fewer evaluations are scheduled over time.
|
||||
|
||||
This setting has precedence over each individual rule frequency. If a rule frequency is lower than this value, then this value is enforced.
|
||||
|
||||
## Before you begin
|
||||
## Configure data source-managed recording rules
|
||||
|
||||
Configure data source-managed recording rules.
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Verify that you have write permission to the Prometheus or Loki data source. Otherwise, you will not be able to create or update Grafana Mimir managed alerting rules.
|
||||
|
||||
@@ -54,25 +63,122 @@ This setting has precedence over each individual rule frequency. If a rule frequ
|
||||
|
||||
- **Grafana Mimir** - use the `/prometheus` prefix. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](/docs/mimir/latest/operators-guide/reference-http-api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
|
||||
|
||||
## Create recording rules
|
||||
|
||||
To create recording rules, follow these steps.
|
||||
To configure data-source managed recording rules, complete the following steps.
|
||||
|
||||
1. Click **Alerts & IRM** -> **Alerting** ->
|
||||
**Alert rules**.
|
||||
1. Select **Rule type** -> **Recording**.
|
||||
1. Click **+New recording rule**.
|
||||
1. Scroll to the **Data source-managed section** and click **+New recording rule**.
|
||||
|
||||
1. Enter recording rule name.
|
||||
#### Enter recording rule name
|
||||
|
||||
The recording rule name must be a Prometheus metric name and contain no whitespace.
|
||||
The recording rule name must be a Prometheus metric name and contain no whitespace.
|
||||
|
||||
#### Define recording rule
|
||||
|
||||
Select your data source and enter a query.
|
||||
|
||||
#### Add namespace and group
|
||||
|
||||
1. From the **Namespace** dropdown, select an existing rule namespace or add a new one.
|
||||
|
||||
Namespaces can contain one or more rule groups and only have an organizational purpose.
|
||||
|
||||
1. From the **Group** dropdown, select an existing group within the selected namespace or add a new one.
|
||||
|
||||
Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
|
||||
|
||||
#### Add labels
|
||||
|
||||
1. Add custom labels selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value.
|
||||
|
||||
1. Define recording rule.
|
||||
- Select your Loki or Prometheus data source.
|
||||
- Enter a query.
|
||||
1. Add namespace and group.
|
||||
- From the **Namespace** dropdown, select an existing rule namespace or add a new one. Namespaces can contain one or more rule groups and only have an organizational purpose.
|
||||
- From the **Group** dropdown, select an existing group within the selected namespace or add a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
|
||||
1. Add labels.
|
||||
- Add custom labels selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value .
|
||||
1. Click **Save rule** to save the rule or **Save rule and exit** to save the rule and go back to the Alerting page.
|
||||
|
||||
## Configure Grafana-managed recording rules
|
||||
|
||||
Configure Grafana-managed recording rules.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
This feature is only available for Grafana OSS and Enterprise users. It is not available in Grafana Cloud.
|
||||
{{< /admonition >}}
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Enable the `grafanaManagedRecordingRules` [feature flag](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/feature-toggles/).
|
||||
|
||||
To configure Grafana-managed recording rules, complete the following steps.
|
||||
|
||||
1. Click **Alerts & IRM** -> **Alerting** ->
|
||||
**Alert rules**.
|
||||
1. Scroll to the **Grafana-managed section** and click **+New recording rule**.
|
||||
|
||||
#### Enter a recording rule and metric name
|
||||
|
||||
Enter a names to identify your recording rule and metric. The metric name must be a Prometheus metric name and contain no whitespace.
|
||||
|
||||
For more information, refer to [Metrics and labels](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
|
||||
|
||||
#### Define recording rule
|
||||
|
||||
Define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires.
|
||||
|
||||
1. Select a data source.
|
||||
1. From the **Options** dropdown, specify a time range.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Grafana Alerting only supports fixed relative time ranges, for example, `now-24hr: now`.
|
||||
|
||||
It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:59:592` or semi-relative time ranges: `now/d to: now`.
|
||||
{{< /admonition >}}
|
||||
|
||||
1. Add a query.
|
||||
|
||||
To add multiple queries, click **Add query**.
|
||||
|
||||
All alert rules are managed by Grafana by default. If you want to switch to a data source-managed alert rule, click **Switch to data source-managed alert rule**.
|
||||
|
||||
2. Add one or more [expressions].
|
||||
|
||||
a. For each expression, select either **Classic condition** to create a single alert rule, or choose from the **Math**, **Reduce**, and **Resample** options to generate separate alert for each series.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
When using Prometheus, you can use an instant vector and built-in functions, so you don't need to add additional expressions.
|
||||
{{% /admonition %}}
|
||||
|
||||
b. Click **Preview** to verify that the expression is successful.
|
||||
|
||||
3. To add a recovery threshold, turn the **Custom recovery threshold** toggle on and fill in a value for when your alert rule should stop firing.
|
||||
|
||||
You can only add one recovery threshold in a query and it must be the alert condition.
|
||||
|
||||
4. Click **Set as alert condition** on the query or expression you want to set as your alert condition.
|
||||
|
||||
#### Set evaluation behavior
|
||||
|
||||
Use alert rule evaluation to determine how frequently an alert rule should be evaluated and how quickly it should change its state.
|
||||
|
||||
To do this, you need to make sure that your alert rule is in the right evaluation group and set a pending period time that works best for your use case.
|
||||
|
||||
1. Select a folder or click **+ New folder**.
|
||||
1. Select an evaluation group or click **+ New evaluation group**.
|
||||
|
||||
If you are creating a new evaluation group, specify the interval for the group.
|
||||
|
||||
All rules within the same group are evaluated concurrently over the same time interval.
|
||||
|
||||
1. Enter a pending period.
|
||||
|
||||
The pending period is the period in which an alert rule can be in breach of the condition until it fires.
|
||||
|
||||
Once a condition is met, the alert goes into the **Pending** state. If the condition remains active for the duration specified, the alert transitions to the **Firing** state, else it reverts to the **Normal** state.
|
||||
|
||||
1. Turn on pause alert notifications, if required.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
You can pause alert rule evaluation to prevent noisy alerting while tuning your alerts.
|
||||
Pausing stops alert rule evaluation and doesn't create any alert instances.
|
||||
This is different to mute timings, which stop notifications from being delivered, but still allows for alert rule evaluation and the creation of alert instances.
|
||||
{{< /admonition >}}
|
||||
|
||||
#### Add labels
|
||||
|
||||
Add labels to your rule for searching, silencing, or routing to a notification policy.
|
||||
|
||||
@@ -43,33 +43,35 @@ refs:
|
||||
|
||||
# Configure data source-managed alert rules
|
||||
|
||||
Create alert rules for an external Grafana Mimir or Loki instance that has ruler API enabled; these are called data source-managed alert rules.
|
||||
Create data source-managed alert rules for Grafana Mimir or Grafana Loki data sources, which have been configured to support rule creation.
|
||||
|
||||
To configure your Grafana Mimir or Loki data source for alert rule creation, enable either the Loki Ruler API or the Mimir Ruler API.
|
||||
|
||||
For more information, refer to [Loki Ruler API](/docs/loki/<GRAFANA_VERSION>/api/#ruler) or [Mimir Ruler API](/docs/mimir/<GRAFANA_VERSION>/references/http-api/#ruler).
|
||||
|
||||
**Note**:
|
||||
|
||||
Alert rules for an external Grafana Mimir or Loki instance can be edited or deleted by users with Editor or Admin roles.
|
||||
Alert rules for a Grafana Mimir or Loki instance can be edited or deleted by users with Editor or Admin roles.
|
||||
|
||||
If you delete an alerting resource created in the UI, you can no longer retrieve it.
|
||||
To make a backup of your configuration and to be able to restore deleted alerting resources, create your alerting resources using file provisioning, Terraform, or the Alerting API.
|
||||
|
||||
## Before you begin
|
||||
|
||||
- Verify that you have write permission to the Prometheus or Loki data source. Otherwise, you will not be able to create or update Grafana Mimir managed alert rules.
|
||||
- Verify that you have write permission to the Mimir or Loki data source. Otherwise, you cannot create or update Grafana Mimir or Loki-managed alert rules.
|
||||
|
||||
- For Grafana Mimir and Loki data sources, enable the Ruler API by configuring their respective services.
|
||||
- Enable the Mimir or Loki Ruler API.
|
||||
|
||||
- **Loki** - The `local` rule storage type, default for the Loki data source, supports only viewing of rules. To edit rules, configure one of the other rule storage types.
|
||||
|
||||
- **Grafana Mimir** - use the `/prometheus` prefix. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](/docs/mimir/latest/operators-guide/reference-http-api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
|
||||
|
||||
Watch this video to learn more about how to create a Mimir managed alert rule: {{< vimeo 720001865 >}}
|
||||
Watch this video to learn more about how to create a Mimir-managed alert rule: {{< vimeo 720001865 >}}
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you do not want to manage alert rules for a particular Loki or Prometheus data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
|
||||
If you do not want to manage alert rules for a particular Loki or Mimir data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
|
||||
{{% /admonition %}}
|
||||
|
||||
In the following sections, we’ll guide you through the process of creating your data source-managed alert rules.
|
||||
|
||||
To create a data source-managed alert rule, use the in-product alert creation flow and follow these steps to help you.
|
||||
|
||||
## Set alert rule name
|
||||
|
||||
@@ -36,6 +36,64 @@ Each template is evaluated whenever the alert rule is evaluated, and is evaluate
|
||||
Extra whitespace in label templates can break matches with notification policies.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Variables
|
||||
|
||||
In Grafana templating, the `$` and `.` symbols are used to reference variables and their properties. You can reference variables directly in your alert rule definitions using the `$` symbol followed by the variable name. Similarly, you can access properties of variables using the dot (`.`) notation within alert rule definitions.
|
||||
|
||||
The following variables are available to you when templating labels and annotations:
|
||||
|
||||
### The labels variable
|
||||
|
||||
The `$labels` variable contains all labels from the query. For example, suppose you have a query that returns CPU usage for all of your servers, and you have an alert rule that fires when any of your servers have exceeded 80% CPU usage for the last 5 minutes. You want to add a summary annotation to the alert that tells you which server is experiencing high CPU usage. With the `$labels` variable you can write a template that prints a human-readable sentence such as:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
|
||||
```
|
||||
|
||||
> If you are using a classic condition then `$labels` will not contain any labels from the query. Classic conditions discard these labels in order to enforce uni-dimensional behavior (at most one alert per alert rule). If you want to use labels from the query in your template then use the example [here](#print-all-labels-from-a-classic-condition).
|
||||
|
||||
### The value variable
|
||||
|
||||
The `$value` variable is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule. It does not contain the results of range queries, as these can return anywhere from 10s to 10,000s of rows or metrics. If it did, for especially large queries a single alert could use 10s of MBs of memory and Grafana would run out of memory very quickly.
|
||||
|
||||
To print the `$value` variable in the summary you would write something like this:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
|
||||
```
|
||||
|
||||
And would look something like this:
|
||||
|
||||
```
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
|
||||
```
|
||||
|
||||
Here `var='A'` refers to the instant query with Ref ID A, `labels={instance=instance1}` refers to the labels, and `value=81.234` refers to the average CPU usage over the last 5 minutes.
|
||||
|
||||
If you want to print just some of the string instead of the full string then use the `$values` variable. It contains the same information as `$value`, but in a structured table, and is much easier to use then writing a regular expression to match just the text you want.
|
||||
|
||||
### The values variable
|
||||
|
||||
The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs.
|
||||
|
||||
To print the value of the instant query with Ref ID A:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
|
||||
```
|
||||
|
||||
For example, given an alert with the labels `instance=server1` and an instant query with the value `81.2345`, this would print:
|
||||
|
||||
```
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
|
||||
```
|
||||
|
||||
If the query in Ref ID A is a range query rather than an instant query then add a reduce expression with Ref ID B and replace `(index $values "A")` with `(index $values "B")`:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "B" }}
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
The following examples attempt to show the most common use-cases we have seen for templates. You can use these examples verbatim, or adapt them as necessary for your use case. For more information on how to write text/template refer see [the beginner's guide to alert notification templates in Grafana](https://grafana.com/blog/2023/04/05/grafana-alerting-a-beginners-guide-to-templating-alert-notifications/).
|
||||
@@ -216,62 +274,6 @@ B2: 84.5678
|
||||
B3: 95.6789
|
||||
```
|
||||
|
||||
## Variables
|
||||
|
||||
The following variables are available to you when templating labels and annotations:
|
||||
|
||||
### The labels variable
|
||||
|
||||
The `$labels` variable contains all labels from the query. For example, suppose you have a query that returns CPU usage for all of your servers, and you have an alert rule that fires when any of your servers have exceeded 80% CPU usage for the last 5 minutes. You want to add a summary annotation to the alert that tells you which server is experiencing high CPU usage. With the `$labels` variable you can write a template that prints a human-readable sentence such as:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
|
||||
```
|
||||
|
||||
> If you are using a classic condition then `$labels` will not contain any labels from the query. Classic conditions discard these labels in order to enforce uni-dimensional behavior (at most one alert per alert rule). If you want to use labels from the query in your template then use the example [here](#print-all-labels-from-a-classic-condition).
|
||||
|
||||
### The value variable
|
||||
|
||||
The `$value` variable is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule. It does not contain the results of range queries, as these can return anywhere from 10s to 10,000s of rows or metrics. If it did, for especially large queries a single alert could use 10s of MBs of memory and Grafana would run out of memory very quickly.
|
||||
|
||||
To print the `$value` variable in the summary you would write something like this:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
|
||||
```
|
||||
|
||||
And would look something like this:
|
||||
|
||||
```
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
|
||||
```
|
||||
|
||||
Here `var='A'` refers to the instant query with Ref ID A, `labels={instance=instance1}` refers to the labels, and `value=81.234` refers to the average CPU usage over the last 5 minutes.
|
||||
|
||||
If you want to print just some of the string instead of the full string then use the `$values` variable. It contains the same information as `$value`, but in a structured table, and is much easier to use then writing a regular expression to match just the text you want.
|
||||
|
||||
### The values variable
|
||||
|
||||
The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs.
|
||||
|
||||
To print the value of the instant query with Ref ID A:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
|
||||
```
|
||||
|
||||
For example, given an alert with the labels `instance=server1` and an instant query with the value `81.2345`, this would print:
|
||||
|
||||
```
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
|
||||
```
|
||||
|
||||
If the query in Ref ID A is a range query rather than an instant query then add a reduce expression with Ref ID B and replace `(index $values "A")` with `(index $values "B")`:
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "B" }}
|
||||
```
|
||||
|
||||
## Functions
|
||||
|
||||
The following functions are available to you when templating labels and annotations:
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-amazon-sns/
|
||||
description: Configure the Grafana Alerting - Amazon SNS integration to receive alert notifications when your alerts are firing.
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Amazon SNS
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Amazon SNS
|
||||
title: Configure Amazon SNS for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Amazon SNS for Alerting
|
||||
|
||||
Use the Grafana Alerting - Amazon SNS integration to send notifications to Amazon SNS when your alerts are firing.
|
||||
|
||||
## Before you begin
|
||||
|
||||
To configure Amazon SNS to receive alert notifications, complete the following steps.
|
||||
|
||||
1. Create a new topic in https://console.aws.amazon.com/sns.
|
||||
1. Open the topic and create a new subscription.
|
||||
1. Choose the protocol HTTPS.
|
||||
1. Copy the URL.
|
||||
|
||||
For more information, refer to [Amazon SNS documentation](https://docs.aws.amazon.com/sns/latest/dg/welcome.html).
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your Amazon SNS integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **AWS SNS**.
|
||||
1. Copy in the URL from above into the **The Amazon SNS API URL** field.
|
||||
1. Click **Test** to check that your integration works.
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Amazon SNS contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Discord
|
||||
title: Configure Discord for Alerting
|
||||
weight: 10
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Discord for Alerting
|
||||
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Email
|
||||
title: Configure email for Alerting
|
||||
weight: 20
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure email for Alerting
|
||||
@@ -75,6 +75,9 @@ To set up email integration, complete the following steps.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **Email**.
|
||||
1. Enter the email addresses you want to send notifications to.
|
||||
|
||||
E-mail addresses are case sensitive. Ensure that the e-mail address entered is correct.
|
||||
|
||||
1. Click **Test** to check that your integration works.
|
||||
1. Click **Save contact point**.
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Google Chat
|
||||
title: Configure Google Chat for Alerting
|
||||
weight: 30
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Google Chat for Alerting
|
||||
|
||||
@@ -18,7 +18,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Grafana OnCall
|
||||
title: Configure Grafana OnCall for Alerting
|
||||
weight: 40
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Grafana OnCall for Alerting
|
||||
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Opsgenie
|
||||
title: Configure Opsgenie for Alerting
|
||||
weight: 60
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Opsgenie for Alerting
|
||||
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Slack
|
||||
title: Configure Slack for Alerting
|
||||
weight: 80
|
||||
weight: 0
|
||||
refs:
|
||||
nested-policy:
|
||||
- pattern: /docs/grafana/
|
||||
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Microsoft Teams
|
||||
title: Configure Microsoft Teams for Alerting
|
||||
weight: 50
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Microsoft Teams for Alerting
|
||||
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Telegram
|
||||
title: Configure Telegram for Alerting
|
||||
weight: 90
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Telegram for Alerting
|
||||
|
||||
@@ -14,7 +14,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: PagerDuty
|
||||
title: Configure PagerDuty for Alerting
|
||||
weight: 70
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure PagerDuty for Alerting
|
||||
|
||||
@@ -21,7 +21,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Webhook notifier
|
||||
title: Configure the webhook notifier for Alerting
|
||||
weight: 100
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure the webhook notifier for Alerting
|
||||
|
||||
@@ -53,7 +53,7 @@ To create a notification template that contains more than one template:
|
||||
|
||||
## Preview notification templates
|
||||
|
||||
Preview how your notification templates will 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.
|
||||
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.
|
||||
|
||||
**Note:** This feature is only for Grafana Alertmanager.
|
||||
|
||||
@@ -81,7 +81,7 @@ To preview your notification templates:
|
||||
|
||||
c. Click **Add alert data**.
|
||||
|
||||
d. Click **Refresh preview** to see what your template content will look like and the corresponding payload data.
|
||||
d. Click **Refresh preview** to see what your template content should look like and the corresponding payload data.
|
||||
|
||||
If there are any errors in your template, they are displayed in the Preview and you can correct them before saving.
|
||||
|
||||
@@ -162,6 +162,86 @@ Resolved alerts:
|
||||
{{ template "email.message" . }}
|
||||
```
|
||||
|
||||
## Group multiple alert instances into one email notification
|
||||
|
||||
To make alerts more concise, you can group multiple instances of a firing alert into a single email notification in a table format. This way, you avoid long, repetitive emails and make alerts easier to digest.
|
||||
|
||||
Follow these steps to create a custom notification template that consolidates alert instances into a table.
|
||||
|
||||
1. Modify the alert rule to include an annotation that is referenced in the notification template later on.
|
||||
1. Enter a name for the **custom annotation**: In this example, _ServerInfo_.
|
||||
1. Enter the following code as the value for the annotation. It retrieves the server's instance name and a corresponding metric value, formatted as a table row:
|
||||
|
||||
```
|
||||
{{ index $labels "instance" }}{{- "\t" -}}{{ index $values "A"}}{{- "\n" -}}
|
||||
```
|
||||
|
||||
This line of code returns the labels and their values in the form of a table. Assuming $labels has `{"instance": "node1"}` and $values has `{"A": "123"}`, the output would be:
|
||||
|
||||
```
|
||||
node1 123
|
||||
```
|
||||
|
||||
1. Create a notification template that references the _ServerInfo_ annotation.
|
||||
|
||||
```go
|
||||
{{ define "Table" }}
|
||||
{{- "\nHost\t\tValue\n" -}}
|
||||
{{ range .Alerts -}}
|
||||
{{ range .Annotations.SortedPairs -}}
|
||||
{{ if (eq .Name "ServerInfo") -}}
|
||||
{{ .Value -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
The notification template outputs a list of server information from the "ServerInfo" annotation for each alert instance.
|
||||
|
||||
1. Navigate to your contact point in Grafana
|
||||
1. In the **Message** field, reference the template by name (see **Optional Email settings** section):
|
||||
|
||||
```
|
||||
{{ template "Table" . }}
|
||||
```
|
||||
|
||||
This generates a neatly formatted table in the email, grouping information for all affected servers into a single notification.
|
||||
|
||||
## Conditional notification template
|
||||
|
||||
Template alert notifications based on a label. In this example the label represents a namespace.
|
||||
|
||||
1. Use the following code in your notification template to display different messages based on the namespace:
|
||||
|
||||
```go
|
||||
{{ define "my_conditional_notification" }}
|
||||
{{ if eq .CommonLabels.namespace "namespace-a" }}
|
||||
Alert: CPU limits have reached 80% in namespace-a.
|
||||
{{ else if eq .CommonLabels.namespace "namespace-b" }}
|
||||
Alert: CPU limits have reached 80% in namespace-b.
|
||||
{{ else if eq .CommonLabels.namespace "namespace-c" }}
|
||||
Alert: CPU limits have reached 80% in namespace-c.
|
||||
{{ else }}
|
||||
Alert: CPU limits have reached 80% for {{ .CommonLabels.namespace }} namespace.
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
`.CommonLabels` is a map containing the labels that are common to all the alerts firing.
|
||||
|
||||
Make sure to replace the `.namespace` label with a label that exists in your alert rule.
|
||||
|
||||
1. Replace `namespace-a`, `namespace-b`, and `namespace-c` with your specific namespace values.
|
||||
1. Navigate to your contact point in Grafana
|
||||
1. In the **Message** field, reference the template by name (see **Optional settings** section):
|
||||
|
||||
```
|
||||
{{ template "my_conditional_notification" . }}
|
||||
```
|
||||
|
||||
This template alters the content of alert notifications depending on the namespace value.
|
||||
|
||||
## Template the title of a Slack message
|
||||
|
||||
Template the title of a Slack message to contain the number of firing and resolved alerts:
|
||||
|
||||
@@ -57,7 +57,11 @@ refs:
|
||||
|
||||
# Introduction to Alerting
|
||||
|
||||
Whether you’re just starting out or you're a more experienced user of Grafana Alerting, learn more about the fundamentals and available features that help you create, manage, and respond to alerts; and improve your team’s ability to resolve issues quickly. For a hands-on introduction, refer to our [tutorial to get started with Grafana Alerting](http://grafana.com/tutorials/alerting-get-started/).
|
||||
Whether you’re just starting out or you're a more experienced user of Grafana Alerting, learn more about the fundamentals and available features that help you create, manage, and respond to alerts; and improve your team’s ability to resolve issues quickly.
|
||||
|
||||
{{< admonition type="tip" >}}
|
||||
For a hands-on introduction, refer to our [tutorial to get started with Grafana Alerting](http://grafana.com/tutorials/alerting-get-started/).
|
||||
{{< /admonition >}}
|
||||
|
||||
The following diagram gives you an overview of Grafana Alerting and introduces you to some of the fundamental features that are the principles of how Grafana Alerting works.
|
||||
|
||||
|
||||
@@ -44,13 +44,13 @@ There are three key components that help you understand how your alerts behave d
|
||||
|
||||
An alert instance can be in either of the following states:
|
||||
|
||||
| State | Description |
|
||||
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Normal** | The state of an alert when the condition (threshold) is not met. |
|
||||
| **Pending** | The state of an alert that has breached the threshold but for less than the [pending period](ref:pending-period). |
|
||||
| **Alerting** | The state of an alert that has breached the threshold for longer than the [pending period](ref:pending-period). |
|
||||
| **NoData** | The state of an alert whose query returns no data or all values are null. You can [change the default behavior](/docs/grafana/latest/alerting/alerting-rules/create-grafana-managed-rule/#configure-no-data-and-error-handling). |
|
||||
| **Error** | The state of an alert when an error or timeout occurred evaluating the alert rule. You can [change the default behavior](/docs/grafana/latest/alerting/alerting-rules/create-grafana-managed-rule/#configure-no-data-and-error-handling). |
|
||||
| State | Description |
|
||||
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Normal** | The state of an alert when the condition (threshold) is not met. |
|
||||
| **Pending** | The state of an alert that has breached the threshold but for less than the [pending period](ref:pending-period). |
|
||||
| **Alerting** | The state of an alert that has breached the threshold for longer than the [pending period](ref:pending-period). |
|
||||
| **NoData** | The state of an alert whose query returns no data or all values are null. You can [change the default behavior of the no data state](#modify-the-no-data-and-error-state). |
|
||||
| **Error** | The state of an alert when an error or timeout occurred evaluating the alert rule. You can [change the default behavior of the error state](#modify-the-no-data-and-error-state). |
|
||||
|
||||
{{< figure src="/media/docs/alerting/alert-instance-states-v3.png" caption="Alert instance state diagram" alt="A diagram of the distinct alert instance states and transitions." max-width="750px" >}}
|
||||
|
||||
@@ -64,18 +64,46 @@ Alert instances will be routed for [notifications](ref:notifications) when they
|
||||
|
||||
An alert instance is considered stale if its dimension or series has disappeared from the query results entirely for two evaluation intervals.
|
||||
|
||||
Stale alert instances that are in the **Alerting**, **NoData**, or **Error** states transition to the **Normal** state as **Resolved**, and include the `grafana_state_reason` annotation with the value **MissingSeries**. They are routed for notifications like other resolved alert instances.
|
||||
Stale alert instances that are in the **Alerting**, **NoData**, or **Error** states transition to the **Normal** state as **Resolved**. Once transitioned, these resolved alert instances are routed for notifications like other resolved alerts.
|
||||
|
||||
### Keep last state
|
||||
### Modify the no data and error state
|
||||
|
||||
The "Keep Last State" option helps mitigate temporary data source issues, preventing alerts from unintentionally firing, resolving, and re-firing.
|
||||
|
||||
In [Configure no data and error handling,](ref:no-data-and-error-handling) you can decide to keep the last state of the alert instance when a `NoData` and/or `Error` state is encountered. Just like normal evaluation, the alert instance transitions from `Pending` to `Alerting` after the pending period has elapsed.
|
||||
In [Configure no data and error handling](ref:no-data-and-error-handling), you can change the default behaviour when the evaluation returns no data or an error. You can set the alert instance state to `Alerting`, `Normal`, or keep the last state.
|
||||
|
||||
{{< figure src="/media/docs/alerting/alert-rule-configure-no-data-and-error.png" alt="A screenshot of the `Configure no data and error handling` option in Grafana Alerting." max-width="500px" >}}
|
||||
|
||||
To reduce the number of **No Data** or **Error** state alerts received, try the following.
|
||||
|
||||
1. Use the **Keep last state** option. For more information, refer to the section below. This option allows the alert to retain its last known state when there is no data available, rather than switching to a **No Data** state.
|
||||
1. For **No Data** alerts, you can optimize your alert rule by expanding the time range of the query. However, if the time range is too big, it affects the performance of the query and can lead to errors due to timeout.
|
||||
|
||||
To minimize timeouts resulting in the **Error** state, reduce the time range to request less data every evaluation cycle.
|
||||
|
||||
1. Change the default [evaluation time out](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#evaluation_timeout). The default is set at 30 seconds. To increase the default evaluation timeout, open a support ticket from the [Cloud Portal](https://grafana.com/docs/grafana-cloud/account-management/support/#grafana-cloud-support-options). Note that this should be a last resort, because it may affect the performance of all alert rules and cause missed evaluations if the timeout is too long.
|
||||
|
||||
#### Keep last state
|
||||
|
||||
The "Keep Last State" option helps mitigate temporary data source issues, preventing alerts from unintentionally firing, resolving, and re-firing.
|
||||
|
||||
However, in situations where strict monitoring is critical, relying solely on the "Keep Last State" option may not be appropriate. Instead, consider using an alternative or implementing additional alert rules to ensure that issues with prolonged data source disruptions are detected.
|
||||
|
||||
### `grafana_state_reason` annotation
|
||||
|
||||
Occasionally, an alert instance may be in a state that isn't immediately clear to everyone. For example:
|
||||
|
||||
- Stale alert instances in the `Alerting` state transition to the `Normal` state when the series disappear.
|
||||
- If "no data" handling is configured to transition to a state other than `NoData`.
|
||||
- If "error" handling is configured to transition to a state other than `Error`.
|
||||
- If the alert rule is deleted, paused, or updated in some cases, the alert instance also transitions to the `Normal` state.
|
||||
|
||||
In these situations, the evaluation state may differ from the alert state, and it might be necessary to understand the reason for being in that state when receiving the notification.
|
||||
|
||||
The `grafana_state_reason` annotation is included in these situations, providing the reason in the notifications that explain why the alert instance transitioned to its current state. For example:
|
||||
|
||||
- Stale alert instances in the `Normal` state include the `grafana_state_reason` annotation with the value **MissingSeries**.
|
||||
- If "no data" or "error" handling transitions to the `Normal` state, the `grafana_state_reason` annotation is included with the value **NoData** or **Error**, respectively.
|
||||
- If the alert rule is deleted or paused, the `grafana_state_reason` is set to **Paused** or **RuleDeleted**. For some updates, it is set to **Updated**.
|
||||
|
||||
### Special alerts for `NoData` and `Error`
|
||||
|
||||
When evaluation of an alert rule produces state `NoData` or `Error`, Grafana Alerting generates a new alert instance that have the following additional labels:
|
||||
|
||||
@@ -69,7 +69,7 @@ Grafana supports two different alert rule types: Grafana-managed alert rules and
|
||||
|
||||
## Grafana-managed alert rules
|
||||
|
||||
Grafana-managed alert rules are the most flexible alert rule type. They allow you to create alerts that can act on data from any of the [supported data sources](#supported-data-sources), and use multiple data sources in a single alert rule.
|
||||
Grafana-managed alert rules are the most flexible alert rule type. They allow you to create alert rules that can act on data from any of the [supported data sources](#supported-data-sources), and use multiple data sources in a single alert rule. You can also add expressions to transform your data and set alert conditions. Using images in alert notifications is also supported.
|
||||
|
||||
Additionally, you can also add [expressions to transform your data](ref:expression-queries), set custom alert conditions, and include [images in alert notifications](ref:notification-images).
|
||||
|
||||
@@ -87,9 +87,11 @@ Find the public data sources supporting Alerting in the [Grafana Plugins directo
|
||||
|
||||
## Data source-managed alert rules
|
||||
|
||||
Data source-managed alert rules can improve query performance via [recording rules](#recording-rules) and ensure high-availability and fault tolerance when implementing a distributed architecture.
|
||||
Data source-managed alert rules can be used for Grafana Mimir or Grafana Loki data sources which have been configured to support rule creation.
|
||||
|
||||
They are only supported for Prometheus-based or Loki data sources with the Ruler API enabled. For more information, refer to the [Loki Ruler API](/docs/loki/<GRAFANA_VERSION>/api/#ruler) or [Mimir Ruler API](/docs/mimir/<GRAFANA_VERSION>/references/http-api/#ruler).
|
||||
They can improve query performance via [recording rules](#recording-rules) and ensure high-availability and fault tolerance when implementing a distributed architecture.
|
||||
|
||||
They are only supported for Grafana Mimir or Grafana Loki data sources with the Ruler API enabled. For more information, refer to the [Loki Ruler API](/docs/loki/<GRAFANA_VERSION>/api/#ruler) or [Mimir Ruler API](/docs/mimir/<GRAFANA_VERSION>/references/http-api/#ruler).
|
||||
|
||||
{{< figure src="/media/docs/alerting/mimir-managed-alerting-architecture-v2.png" max-width="750px" caption="Mimir-managed alerting architecture" >}}
|
||||
|
||||
@@ -98,7 +100,7 @@ They are only supported for Prometheus-based or Loki data sources with the Ruler
|
||||
1. Alert rules are evaluated by the Alert Rule Evaluation Engine.
|
||||
1. Firing and resolved alert instances are forwarded to [handle their notifications](ref:notifications).
|
||||
|
||||
### Recording rules
|
||||
## Recording rules
|
||||
|
||||
A recording rule allows you to pre-compute frequently needed or computationally expensive expressions and save their result as a new set of time series. This is useful if you want to run alerts on aggregated data or if you have dashboards that query computationally expensive expressions repeatedly.
|
||||
|
||||
@@ -114,7 +116,7 @@ When choosing which alert rule type to use, consider the following comparison be
|
||||
| ------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Create alert rules<wbr /> based on data from any of the supported data sources | Yes | No. You can only create alert rules that are based on Prometheus-based data. |
|
||||
| Mix and match data sources | Yes | No |
|
||||
| Includes support for recording rules | No | Yes |
|
||||
| Includes support for recording rules | Yes. Only for Grafana OSS users with the `grafanaManagedRecordingRules` feature flag enabled. | Yes |
|
||||
| Add expressions to transform<wbr /> your data and set alert conditions | Yes | No |
|
||||
| Use images in alert notifications | Yes | No |
|
||||
| Organization | Organize and manage access with folders | Use namespaces |
|
||||
|
||||
@@ -1,164 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- ../../contact-points/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/contact-points/message-templating/
|
||||
- ../../alert-rules/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alert-rules/message-templating/
|
||||
- ../../unified-alerting/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/message-templating/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/fundamentals/notifications/templates/
|
||||
description: Learn about templates
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Templates
|
||||
weight: 115
|
||||
refs:
|
||||
variables-label-annotation:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templating-labels-annotations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templating-labels-annotations/
|
||||
---
|
||||
|
||||
# Templates
|
||||
|
||||
Use templating to customize, format, and reuse alert notification messages. Create more flexible and informative alert notification messages by incorporating dynamic content, such as metric values, labels, and other contextual information.
|
||||
|
||||
In Grafana, there are two ways to template your alert notification messages:
|
||||
|
||||
1. Labels and annotations
|
||||
|
||||
- Template labels and annotations in alert rules.
|
||||
- Labels and annotations contain information about an alert.
|
||||
- Labels are used to differentiate an alert from all other alerts, while annotations are used to add additional information to an existing alert.
|
||||
|
||||
2. Notification templates
|
||||
|
||||
- Template notifications in contact points.
|
||||
- Add notification templates to contact points for reuse and consistent messaging in your notifications.
|
||||
- Use notification templates to change the title, message, and format of the message in your notifications.
|
||||
|
||||
This diagram illustrates the entire process of templating, from the creation of labels and annotations in alert rules or notification templates in contact points, to what they look like when exported and applied in your alert notification messages.
|
||||
|
||||
{{< figure src="/media/docs/alerting/grafana-templating-diagram-2.jpg" max-width="1200px" caption="How Templating works" >}}
|
||||
|
||||
In this diagram:
|
||||
|
||||
- **Monitored Application**: A web server, database, or any other service generating metrics. For example, it could be an NGINX server providing metrics about request rates, response times, and so on.
|
||||
- **Prometheus**: Prometheus collects metrics from the monitored application. For example, it might scrape metrics from the NGINX server, including labels like instance (the server hostname) and job (the service name).
|
||||
- **Grafana**: Grafana queries Prometheus to retrieve metrics data. For example, you might create an alert rule to monitor NGINX request rates over time, and template labels or annotations based on the instance label.
|
||||
- **Alertmanager**: Part of the Prometheus ecosystem, Alertmanager handles alert notifications. For example, if the request rate exceeds a certain threshold on a particular NGINX server, Alertmanager can send an alert notification to, for example, Slack or email, including the server name and the exceeded threshold (the instance label will be interpolated, and the actual server name will appear in the alert notification).
|
||||
- **Alert notification**: When an alert rule condition is met, Alertmanager sends a notification to various channels such as Slack, Grafana OnCall, etc. These notifications can include information from the labels associated with the alerting rule. For example, if an alert triggers due to high CPU usage on a specific server, the notification message can include details like server name (instance label), disk usage percentage, and the threshold that was exceeded.
|
||||
|
||||
## Labels and annotations
|
||||
|
||||
Labels and annotations contain information about an alert. Labels are used to differentiate an alert from all other alerts, while annotations are used to add additional information to an existing alert.
|
||||
|
||||
### Template labels
|
||||
|
||||
Label templates are applied in the alert rule itself (i.e. in the Configure labels and notifications section of an alert).
|
||||
|
||||
{{<admonition type="note">}}
|
||||
Think about templating labels when you need to improve or change how alerts are uniquely identified. This is especially helpful if the labels you get from your query aren't detailed enough. Keep in mind that it's better to keep long sentences for summaries and descriptions. Also, avoid using the query's value in labels because it may result in the creation of many alerts when you actually only need one.
|
||||
{{</admonition>}}
|
||||
|
||||
Templating can be applied by using variables and functions. These variables can represent dynamic values retrieved from your data queries.
|
||||
|
||||
{{<admonition type="note">}}
|
||||
In Grafana templating, the $ and . symbols are used to reference variables and their properties. You can reference variables directly in your alert rule definitions using the $ symbol followed by the variable name. Similarly, you can access properties of variables using the dot (.) notation within alert rule definitions.
|
||||
{{</admonition>}}
|
||||
|
||||
Here are some commonly used built-in [variables](ref:variables-label-annotation) to interact with the name and value of labels in Grafana alerting:
|
||||
|
||||
- The `$labels` variable, which contains all labels from the query.
|
||||
|
||||
For example, let's say you have an alert rule that triggers when the CPU usage exceeds a certain threshold. You want to create annotations that provide additional context when this alert is triggered, such as including the specific server that experienced the high CPU usage.
|
||||
|
||||
The host {{ index $labels "instance" }} has exceeded 80% CPU usage for the last 5 minutes
|
||||
|
||||
The outcome of this template would print:
|
||||
|
||||
The host instance 1 has exceeded 80% CPU usage for the last 5 minutes
|
||||
|
||||
- The `$value` variable, which is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule.
|
||||
|
||||
In the context of the previous example, $value variable would write something like this:
|
||||
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
|
||||
|
||||
The outcome of this template would print:
|
||||
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
|
||||
|
||||
- The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs (i.e. the id that identifies the query or expression. By default the Red ID of the query is “A”).
|
||||
|
||||
Given an alert with the labels instance=server1 and an instant query with the value 81.2345, would write like this:
|
||||
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
|
||||
|
||||
And it would print:
|
||||
|
||||
CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
Extra whitespace in label templates can break matches with notification policies.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Template annotations
|
||||
|
||||
Both labels and annotations have the same structure: a set of named values; however their intended uses are different. The purpose of annotations is to add additional information to existing alerts.
|
||||
|
||||
There are a number of suggested annotations in Grafana such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`. Like labels, annotations must have a name, and their value can contain a combination of text and template code that is evaluated when an alert is fired.
|
||||
|
||||
Here is an example of templating an annotation in the context of an alert rule. The text/template is added into the Add annotations section.
|
||||
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
|
||||
|
||||
The outcome of this template would print
|
||||
|
||||
CPU usage for Instance 1 has exceeded 80% for the last 5 minutes
|
||||
|
||||
### Template notifications
|
||||
|
||||
Notification templates represent the alternative approach to templating designed for reusing templates. Notifications are messages to inform users about events or conditions triggered by alerts. You can create reusable notification templates to customize the content and format of alert notifications. Variables, labels, or other context-specific details can be added to the templates to dynamically insert information like metric values.
|
||||
|
||||
Here is an example of a notification template:
|
||||
|
||||
```go
|
||||
{{ define "alerts.message" -}}
|
||||
{{ if .Alerts.Firing -}}
|
||||
{{ len .Alerts.Firing }} firing alert(s)
|
||||
{{ template "alerts.summarize" .Alerts.Firing }}
|
||||
{{- end }}
|
||||
{{- if .Alerts.Resolved -}}
|
||||
{{ len .Alerts.Resolved }} resolved alert(s)
|
||||
{{ template "alerts.summarize" .Alerts.Resolved }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ define "alerts.summarize" -}}
|
||||
{{ range . -}}
|
||||
- {{ index .Annotations "summary" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
This is the message you would receive in your contact point:
|
||||
|
||||
1 firing alert(s)
|
||||
- The database server db1 has exceeded 75% of available disk space. Disk space used is 76%, please resize the disk size within the next 24 hours
|
||||
|
||||
1 resolved alert(s)
|
||||
- The web server web1 has been responding to 5% of HTTP requests with 5xx errors for the last 5 minutes
|
||||
|
||||
Once the template is created, you need to make reference to it in your **Contact point** (in the Optional `[contact point]` settings) .
|
||||
|
||||
{{<admonition type="note">}}
|
||||
It's not recommended to include individual alert information within notification templates. Instead, it's more effective to incorporate such details within the rule using labels and annotations.
|
||||
{{</admonition>}}
|
||||
187
docs/sources/alerting/fundamentals/templates.md
Normal file
187
docs/sources/alerting/fundamentals/templates.md
Normal file
@@ -0,0 +1,187 @@
|
||||
---
|
||||
aliases:
|
||||
- ../fundamentals/notifications/templates/ # /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/notifications/templates/
|
||||
- ../contact-points/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/contact-points/message-templating/
|
||||
- ../alert-rules/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alert-rules/message-templating/
|
||||
- ../unified-alerting/message-templating/ # /docs/grafana/<GRAFANA_VERSION>/alerting/unified-alerting/message-templating/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/fundamentals/notifications/templates/
|
||||
description: Use templating to customize, format, and reuse alert notification messages. Create more flexible and informative alert notification messages by incorporating dynamic content, such as metric values, labels, and other contextual information.
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- guide
|
||||
- contact point
|
||||
- templating
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Templates
|
||||
meta_image: /media/docs/alerting/how-notification-templates-works.png
|
||||
weight: 115
|
||||
refs:
|
||||
labels:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#labels
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#labels
|
||||
annotations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/fundamentals/alert-rules/annotation-label/#annotations
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#annotations
|
||||
templating-labels-annotations:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/templating-labels-annotations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templating-labels-annotations/
|
||||
notification-message-reference:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/reference/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/
|
||||
notification-messages:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/
|
||||
create-notification-templates:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/template-notifications/create-notification-templates/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/create-notification-templates/
|
||||
---
|
||||
|
||||
# Templates
|
||||
|
||||
Use templating to customize, format, and reuse alert notification messages. Create more flexible and informative alert notification messages by incorporating dynamic content, such as metric values, labels, and other contextual information.
|
||||
|
||||
In Grafana, you have various options to template your alert notification messages:
|
||||
|
||||
1. [Alert rule annotations](#template-annotations)
|
||||
|
||||
- Annotations add extra information, like `summary` and `description`, to alert instances for notification messages.
|
||||
- Template annotations to display query values that are meaningful to the alert, for example, the server name or the threshold query value.
|
||||
|
||||
1. [Alert rule labels](#template-labels)
|
||||
|
||||
- Labels are used to differentiate an alert instance from all other alert instances.
|
||||
- Template labels to add an additional label based on a query value, or when the labels from the query are incomplete or not descriptive enough.
|
||||
|
||||
1. [Notification templates](#template-notifications)
|
||||
- Notification templates are used by contact points for consistent messaging in notification titles and descriptions.
|
||||
- Template notifications when you want to customize the appearance and information of your notifications.
|
||||
- Avoid using notification templates to add extra information to alert instances—use annotations instead.
|
||||
|
||||
This diagram illustrates the entire templating process, from querying labels and templating the alert summary and notification to the final alert notification message.
|
||||
|
||||
{{< figure src="/media/docs/alerting/how-notification-templates-works.png" max-width="1200px" caption="How templating works" >}}
|
||||
|
||||
In this diagram:
|
||||
|
||||
1. The alert rule query returns `12345`, along with the values of the `instance` and `job` labels.
|
||||
1. This query result breaches the alert rule condition, firing the alert instance.
|
||||
1. The alert instance generates an annotation summary, defined by the template used in the alert rule summary. In this case, it displays the value of the `instance` label: `server1`.
|
||||
1. The Alertmanager receives the firing alert instance, including the final annotation summary, and determines the contact point that will process the alert.
|
||||
1. The Alertmanager uses the contact point's notification template to format the message, then sends the notification to the configured destination(s)—an email address.
|
||||
|
||||
## Template annotations
|
||||
|
||||
[Annotations](ref:annotations) can be defined in the alert rule to add extra information to alert instances.
|
||||
|
||||
When creating an alert rule, Grafana suggests several optional annotations, such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`, which help identify and respond to alerts. You can also create custom annotations.
|
||||
|
||||
Annotations are key-value pairs, and their values can contain a combination of text and template code that is evaluated when the alert fires.
|
||||
|
||||
Annotations can contain plain text, but you should template annotations if you need to display query values that are relevant to the alert, for example:
|
||||
|
||||
- Show the query value that triggers the alert.
|
||||
- Include labels returned by the query that identify the alert.
|
||||
- Format the annotation message depending on a query value.
|
||||
|
||||
Here’s an example of templating an annotation, which explains where and why the alert was triggered. In this case, the alert triggers when CPU usage exceeds a threshold, and the `summary` annotation provides the relevant details.
|
||||
|
||||
```
|
||||
CPU usage for {{ index $labels "instance" }} has exceeded 80% ({{ index $values "A" }}) for the last 5 minutes.
|
||||
```
|
||||
|
||||
The outcome of this template would be:
|
||||
|
||||
```
|
||||
CPU usage for Instance 1 has exceeded 80% (81.2345) for the last 5 minutes.
|
||||
```
|
||||
|
||||
Implement annotations that provide meaningful information to respond to your alerts. Annotations are displayed in the Grafana alert detail view and are included by default in notifications.
|
||||
|
||||
For more details on how to template annotations, refer to [Template annotations and labels](ref:templating-labels-annotations).
|
||||
|
||||
## Template labels
|
||||
|
||||
[Labels](ref:labels) are used to differentiate one alert instance from all other alert instances, as the set of labels uniquely identifies an alert instance. Notification policies and silences use labels to handle alert instances.
|
||||
|
||||
Template labels when you need to improve or change how alerts are uniquely identified. This is helpful if the labels you get from your query aren't detailed enough.
|
||||
|
||||
Here’s an example of templating a `severity` label based on the query value:
|
||||
|
||||
```
|
||||
{{ if (gt $values.A.Value 90.0) -}}
|
||||
critical
|
||||
{{ else if (gt $values.A.Value 80.0) -}}
|
||||
high
|
||||
{{ else if (gt $values.A.Value 60.0) -}}
|
||||
medium
|
||||
{{ else -}}
|
||||
low
|
||||
{{- end }}
|
||||
```
|
||||
|
||||
Avoid using query values in labels, as this may result in the creation of numerous alerts when only one is needed. Use annotation to inform about the query value instead.
|
||||
|
||||
For more details on how to template labels, refer to [Template annotations and labels](ref:templating-labels-annotations).
|
||||
|
||||
## Template notifications
|
||||
|
||||
[Notification templates](ref:notification-messages) allow you to customize the content of your notifications, such as the subject of an email or the body of a Slack message.
|
||||
|
||||
Notification templates differ from templating annotations and labels in the following ways:
|
||||
|
||||
- Notification templates are assigned to the **Contact point**, rather than the alert rule.
|
||||
- If not specified, the contact point uses a default template that includes relevant alert information.
|
||||
- You can create reusable notification templates and reference them in other templates.
|
||||
- The same template can be shared across multiple contact points, making it easier to maintain and ensuring consistency.
|
||||
- While both annotation/label templates and notification templates use the same templating language, the available variables and functions differ. For more details, refer to the [notification template reference](ref:notification-message-reference) and [annotation/label template reference](ref:templating-labels-annotations).
|
||||
- Notification templates should not be used to add additional information to individual alerts—use annotations for that purpose.
|
||||
|
||||
Here is an example of a notification template that summarizes all firing and resolved alerts in a notification group:
|
||||
|
||||
```
|
||||
{{ define "alerts.message" -}}
|
||||
{{ if .Alerts.Firing -}}
|
||||
{{ len .Alerts.Firing }} firing alert(s)
|
||||
{{ template "alerts.summarize" .Alerts.Firing }}
|
||||
{{- end }}
|
||||
{{- if .Alerts.Resolved -}}
|
||||
{{ len .Alerts.Resolved }} resolved alert(s)
|
||||
{{ template "alerts.summarize" .Alerts.Resolved }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{ define "alerts.summarize" -}}
|
||||
{{ range . -}}
|
||||
- {{ index .Annotations "summary" }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
The notification message to the contact point would look like this:
|
||||
|
||||
```
|
||||
1 firing alert(s)
|
||||
- The database server db1 has exceeded 75% of available disk space. Disk space used is 76%, please resize the disk size within the next 24 hours.
|
||||
|
||||
1 resolved alert(s)
|
||||
- The web server web1 has been responding to 5% of HTTP requests with 5xx errors for the last 5 minutes.
|
||||
```
|
||||
|
||||
For instructions on creating and using notification templates, refer to [Create notification templates.](ref:create-notification-templates)
|
||||
@@ -34,35 +34,46 @@ Grafana Alerting is based on the architecture of the Prometheus alerting system.
|
||||
|
||||
{{< figure src="/media/docs/alerting/alerting-alertmanager-architecture.png" max-width="750px" alt="A diagram with the alert generator and alert manager architecture" >}}
|
||||
|
||||
Grafana has its own pre-configured Alertmanager, referred to as "Grafana" in the user interface:
|
||||
This architecture decouples alert rule evaluation from notification handling, allowing alerts to be forwarded to other Alertmanagers.
|
||||
|
||||
- **Grafana Alertmanager** is the default internal Alertmanager if you run Grafana on-premises or as open source. It can receive alerts from Grafana but cannot receive alerts from external alert generators such as Mimir or Loki.
|
||||
Grafana can use different Alertmanagers. It’s important to note that each Alertmanager manages its own independent alerting resources, such as:
|
||||
|
||||
- **Cloud Alertmanager** runs in Grafana Cloud and can receive Grafana-managed alerts and Data sources-managed alerts like Mimir, Loki, and Prometheus.
|
||||
- Contact points and notification templates
|
||||
- Notification policies and mute timings
|
||||
- Silences
|
||||
- Active notifications
|
||||
|
||||
Grafana Alerting also supports sending alerts to **External Alertmanagers**, such as the [Prometheus Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/), which can receive alerts from Grafana, Loki, Mimir, and Prometheus.
|
||||
Use the `Choose Alertmanager` on these pages to switch between Alertmanagers.
|
||||
|
||||
You can use both internal and external Alertmanagers. The decision often depends on your alerting setup and where your alerts are being generated. Here are two examples of when you may want to [add an external Alertmanager](#add-an-external-alertmanager) and send your alerts there instead of the default Grafana Alertmanager:
|
||||
{{< figure src="/media/docs/alerting/alerting-choose-alertmanager.png" max-width="750px" alt="A screenshot choosing an Alertmanager in the notification policies UI" >}}
|
||||
|
||||
## Types of Alertmanagers in Grafana
|
||||
|
||||
Grafana can be configured to manage both Grafana-managed and data source-managed alerts using various Alertmanagers, depending on your infrastructure and alerting requirements.
|
||||
|
||||
- **Grafana Alertmanager**: Grafana has its own built-in Alertmanager, referred to as "Grafana" in the user interface. It is the default Alertmanager and can only handle Grafana-managed alerts.
|
||||
|
||||
- **Cloud Alertmanager**: Each Grafana Cloud instance comes preconfigured with an additional Alertmanager (`grafanacloud-STACK_NAME-ngalertmanager`) from the Mimir (Prometheus) instance running in the Grafana Cloud Stack.
|
||||
|
||||
The Cloud Alertmanager is available exclusively in Grafana Cloud and can handle both Grafana-managed and data source-managed alerts.
|
||||
|
||||
Some Grafana Cloud services, such as **Kubernetes Monitoring** and **Synthetic Monitoring** use the Cloud Alertmanager to create and manage alerts.
|
||||
|
||||
- **Other Alertmanagers**: Grafana Alerting also supports sending alerts to other Alertmanagers, such as the [Prometheus Alertmanager](https://prometheus.io/docs/alerting/latest/alertmanager/), which can handle Grafana-managed alerts and data sources-managed alerts such as alerts from Loki, Mimir, and Prometheus.
|
||||
|
||||
You can use a combination of Alertmanagers. The decision often depends on your alerting setup and where your alerts are being generated. Here are two examples of when you may want to add an Alertmanager and send your alerts there instead of using the built-in Grafana Alertmanager.
|
||||
|
||||
1. You may already have Alertmanagers on-premises in your own Cloud infrastructure that you still want to use because you have other alert generators, such as Prometheus.
|
||||
|
||||
2. You want to use both Prometheus on-premises and hosted Grafana to send alerts to the same Alertmanager that runs in your Cloud infrastructure.
|
||||
|
||||
## Add an external Alertmanager
|
||||
## Add an Alertmanager
|
||||
|
||||
From Grafana, you can configure and administer your own external Alertmanager to receive Grafana alerts.
|
||||
From Grafana, you can configure and administer your own Alertmanager to receive Grafana alerts.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Grafana Alerting does not support sending alerts to the AWS Managed Service for Prometheus due to the lack of sigv4 support in Prometheus.
|
||||
{{% /admonition %}}
|
||||
After adding an Alertmanager, you can use the Grafana Alerting UI to manage notification policies, contact points, and other alerting resources from within Grafana, with support for HTTP basic authentication credentials.
|
||||
|
||||
After you have added the Alertmanager, you can use the Grafana Alerting UI to manage silences, contact points, and notification policies. A drop-down option in these pages allows you to switch between alertmanagers.
|
||||
|
||||
{{< figure src="/media/docs/alerting/alerting-choose-alertmanager.png" max-width="750px" alt="A screenshot choosing an Alertmanager in the notification policies UI" >}}
|
||||
|
||||
External alertmanagers should now be configured as data sources using Grafana Configuration from the main Grafana navigation menu. This enables you to manage the contact points and notification policies of external alertmanagers from within Grafana and also encrypts HTTP basic authentication credentials.
|
||||
|
||||
To add an external Alertmanager, complete the following steps.
|
||||
Alertmanagers should be configured as data sources using Grafana Configuration from the main Grafana navigation menu. To add an Alertmanager, complete the following steps.
|
||||
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. On the Connections page, search for `Alertmanager`.
|
||||
@@ -78,10 +89,14 @@ To add an external Alertmanager, complete the following steps.
|
||||
|
||||
1. Click **Save & test**.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
Grafana Alerting does not support sending alerts to the AWS Managed Service for Prometheus due to the lack of sigv4 support in Prometheus.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Manage Alertmanager configurations
|
||||
|
||||
On the Settings page, you can manage your Alertmanager configurations and configure where Grafana-managed alert instances are forwarded.
|
||||
|
||||
- Manage which Alertmanagers receive alert instances from Grafana-managed rules without navigating and editing data sources.
|
||||
- Manage version snapshots for the built-in Alertmanager, which allows administrators to roll back unintentional changes or mistakes in the Alertmanager configuration.
|
||||
- Compare the historical snapshot with the latest configuration to see which changes were made.
|
||||
{{< /admonition >}}
|
||||
|
||||
@@ -18,6 +18,17 @@ labels:
|
||||
- oss
|
||||
title: Configure high availability
|
||||
weight: 600
|
||||
refs:
|
||||
state-history:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/manage-notifications/view-state-health/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/manage-notifications/view-state-health/
|
||||
meta-monitoring:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/monitor/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/monitor/
|
||||
---
|
||||
|
||||
# Configure high availability
|
||||
@@ -28,18 +39,13 @@ Grafana Alerting uses the Prometheus model of separating the evaluation of alert
|
||||
|
||||
When running multiple instances of Grafana, all alert rules are evaluated on all instances. You can think of the evaluation of alert rules as being duplicated by the number of running Grafana instances. This is how Grafana Alerting makes sure that as long as at least one Grafana instance is working, alert rules are still be evaluated and notifications for alerts are still sent.
|
||||
|
||||
You can find this duplication in state history and it is a good way to confirm if you are using high availability.
|
||||
You can find this duplication in state history and it is a good way to [verify your high availability setup](#verify-your-high-availability-setup).
|
||||
|
||||
While the alert generator evaluates all alert rules on all instances, the alert receiver makes a best-effort attempt to avoid sending duplicate notifications. Alertmanager chooses availability over consistency, which may result in occasional duplicated or out-of-order notifications. It takes the opinion that duplicate or out-of-order notifications are better than no notifications.
|
||||
While the alert generator evaluates all alert rules on all instances, the alert receiver makes a best-effort attempt to avoid duplicate notifications. The alertmanagers use a gossip protocol to share information between them to prevent sending duplicated notifications.
|
||||
|
||||
The Alertmanager uses a gossip protocol to share information about notifications between Grafana instances. It also gossips silences, which means a silence created on one Grafana instance is replicated to all other Grafana instances. Both notifications and silences are persisted to the database periodically, and during graceful shut down.
|
||||
Alertmanager chooses availability over consistency, which may result in occasional duplicated or out-of-order notifications. It takes the opinion that duplicate or out-of-order notifications are better than no notifications.
|
||||
|
||||
{{% 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.
|
||||
This is because the HA settings (`ha_peers`, etc) only apply to the alert notification delivery (i.e. de-duplication of alert notifications, and silences, as mentioned above).
|
||||
|
||||
{{% /admonition %}}
|
||||
Alertmanagers also gossip silences, which means a silence created on one Grafana instance is replicated to all other Grafana instances. Both notifications and silences are persisted to the database periodically, and during graceful shut down.
|
||||
|
||||
## Enable alerting high availability using Memberlist
|
||||
|
||||
@@ -54,8 +60,11 @@ Since gossiping of notifications and silences uses both TCP and UDP port `9094`,
|
||||
You must have at least one (1) Grafana instance added to the `ha_peers` section.
|
||||
1. Set `[ha_listen_address]` to the instance IP address using a format of `host:port` (or the [Pod's](https://kubernetes.io/docs/concepts/workloads/pods/) IP in the case of using Kubernetes).
|
||||
By default, it is set to listen to all interfaces (`0.0.0.0`).
|
||||
1. Set `[ha_advertise_address]` to the instance's hostname or IP address in the format "host:port". Use this setting when the instance is behind NAT (Network Address Translation), such as in Docker Swarm or Kubernetes service, where external and internal addresses differ. This address helps other cluster instances communicate with it. The setting is optional.
|
||||
1. Set `[ha_peer_timeout]` in the `[unified_alerting]` section of the custom.ini to specify the time to wait for an instance to send a notification via the Alertmanager. The default value is 15s, but it may increase if Grafana servers are located in different geographic regions or if the network latency between them is high.
|
||||
|
||||
For a demo, see this [example using Docker Compose](https://github.com/grafana/alerting-ha-docker-examples/tree/main/memberlist).
|
||||
|
||||
## Enable alerting high availability using Redis
|
||||
|
||||
As an alternative to Memberlist, you can use Redis for high availability. This is useful if you want to have a central
|
||||
@@ -67,20 +76,9 @@ database for HA and cannot support the meshing of all Grafana servers.
|
||||
1. Optional: Set the username and password if authentication is enabled on the Redis server using `ha_redis_username` and `ha_redis_password`.
|
||||
1. Optional: Set `ha_redis_prefix` to something unique if you plan to share the Redis server with multiple Grafana instances.
|
||||
1. Optional: Set `ha_redis_tls_enabled` to `true` and configure the corresponding `ha_redis_tls_*` fields to secure communications between Grafana and Redis with Transport Layer Security (TLS).
|
||||
1. Set `[ha_advertise_address]` to `ha_advertise_address = "${POD_IP}:9094"` This is required if the instance doesn't have an IP address that is part of RFC 6890 with a default route.
|
||||
|
||||
The following metrics can be used for meta monitoring, exposed by the `/metrics` endpoint in Grafana:
|
||||
|
||||
| Metric | Description |
|
||||
| ---------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| alertmanager_cluster_messages_received_total | Total number of cluster messages received. |
|
||||
| alertmanager_cluster_messages_received_size_total | Total size of cluster messages received. |
|
||||
| alertmanager_cluster_messages_sent_total | Total number of cluster messages sent. |
|
||||
| alertmanager_cluster_messages_sent_size_total | Total number of cluster messages received. |
|
||||
| alertmanager_cluster_messages_publish_failures_total | Total number of messages that failed to be published. |
|
||||
| alertmanager_cluster_members | Number indicating current number of members in cluster. |
|
||||
| alertmanager_peer_position | Position the Alertmanager instance believes it's in. The position determines a peer's behavior in the cluster. |
|
||||
| alertmanager_cluster_pings_seconds | Histogram of latencies for ping messages. |
|
||||
| alertmanager_cluster_pings_failures_total | Total number of failed pings. |
|
||||
For a demo, see this [example using Docker Compose](https://github.com/grafana/alerting-ha-docker-examples/tree/main/redis).
|
||||
|
||||
## Enable alerting high availability using Kubernetes
|
||||
|
||||
@@ -149,3 +147,58 @@ The following metrics can be used for meta monitoring, exposed by the `/metrics`
|
||||
ha_peer_timeout = 15s
|
||||
ha_reconnect_timeout = 2m
|
||||
```
|
||||
|
||||
## Verify your high availability setup
|
||||
|
||||
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" %}}
|
||||
|
||||
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 %}}
|
||||
|
||||
You can also confirm your high availability setup by monitoring Alertmanager metrics exposed by Grafana.
|
||||
|
||||
| Metric | Description |
|
||||
| ---------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| alertmanager_cluster_members | Number indicating current number of members in cluster. |
|
||||
| alertmanager_cluster_messages_received_total | Total number of cluster messages received. |
|
||||
| alertmanager_cluster_messages_received_size_total | Total size of cluster messages received. |
|
||||
| alertmanager_cluster_messages_sent_total | Total number of cluster messages sent. |
|
||||
| alertmanager_cluster_messages_sent_size_total | Total number of cluster messages received. |
|
||||
| alertmanager_cluster_messages_publish_failures_total | Total number of messages that failed to be published. |
|
||||
| alertmanager_cluster_pings_seconds | Histogram of latencies for ping messages. |
|
||||
| alertmanager_cluster_pings_failures_total | Total number of failed pings. |
|
||||
| alertmanager_peer_position | The position an Alertmanager instance believes it holds, which defines its role in the cluster. Peers should be numbered sequentially, starting from zero. |
|
||||
|
||||
You can confirm the number of Grafana instances in your alerting high availability setup by querying the `alertmanager_cluster_members` and `alertmanager_peer_position` metrics.
|
||||
|
||||
Note that these alerting high availability metrics are exposed via the `/metrics` endpoint in Grafana, and are not automatically collected or displayed. If you have a Prometheus instance connected to Grafana, add a `scrape_config` to scrape Grafana metrics and then query these metrics in Explore.
|
||||
|
||||
```yaml
|
||||
- job_name: grafana
|
||||
honor_timestamps: true
|
||||
scrape_interval: 15s
|
||||
scrape_timeout: 10s
|
||||
metrics_path: /metrics
|
||||
scheme: http
|
||||
follow_redirects: true
|
||||
static_configs:
|
||||
- targets:
|
||||
- grafana:3000
|
||||
```
|
||||
|
||||
For more information on monitoring alerting metrics, refer to [Alerting meta-monitoring](ref:meta-monitoring). For a demo, see [alerting high availability examples using Docker Compose](https://github.com/grafana/alerting-ha-docker-examples/).
|
||||
|
||||
## Prevent duplicate notifications
|
||||
|
||||
In high-availability mode, each Grafana instance runs its own pre-configured alertmanager to handle alert notifications.
|
||||
|
||||
When multiple Grafana instances are running, all alert rules are evaluated on each instance. By default, each instance sends firing alerts to its respective alertmanager. This results in notification handling being duplicated across all running Grafana instances.
|
||||
|
||||
Alertmanagers in HA mode communicate with each other to coordinate notification delivery. However, this setup can sometimes lead to duplicated or out-of-order notifications. By design, HA prioritizes sending duplicate notifications over the risk of missing notifications.
|
||||
|
||||
To avoid duplicate notifications, you can configure a shared alertmanager to manage notifications for all Grafana instances. For more information, refer to [add an external alertmanager](/docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alertmanager/).
|
||||
|
||||
@@ -43,19 +43,19 @@ Fixed roles provide users more granular access to create, view, and update Alert
|
||||
|
||||
Details of the fixed roles and the access they provide for Grafana Alerting are below.
|
||||
|
||||
| Fixed role | Permissions | Description |
|
||||
| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `fixed:alerting.instances:writer` | All permissions from `fixed:alerting.instances:reader` and<br> `alert.instances:create`<br>`alert.instances:write` for organization scope <br> `alert.instances.external:write` for scope `datasources:*` | Create, update and expire all silences. |
|
||||
| `fixed:alerting.instances:reader` | `alert.instances:read` for organization scope <br> `alert.instances.external:read` for scope `datasources:*` | Read all alerts and silences. |
|
||||
| `fixed:alerting.notifications:writer` | All permissions from `fixed:alerting.notifications:reader` and<br>`alert.notifications:write`for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Create, update, and delete contact points, templates, mute timings and notification policies for Grafana and external Alertmanager. |
|
||||
| `fixed:alerting.notifications:reader` | `alert.notifications:read` for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Read all Grafana and Alertmanager contact points, templates, and notification policies. |
|
||||
| `fixed:alerting.rules:writer` | All permissions from `fixed:alerting.rules:reader` and <br> `alert.rule:create` <br> `alert.rule:write` <br> `alert.rule:delete` <br> `alert.silences:create` <br> `alert.silences:write` for scope `folders:*` <br> `alert.rules.external:write` for scope `datasources:*` | Create, update, and delete all alert rules and manage rule-specific silences. |
|
||||
| `fixed:alerting.rules:reader` | `alert.rule:read`, `alert.silences:read` for scope `folders:*` <br> `alert.rules.external:read` for scope `datasources:*` <br> `alert.notifications.time-intervals:read` <br> `alert.notifications.receivers:list` | Read all alert rules and read rule-specific silences. |
|
||||
| `fixed:alerting:writer` | All permissions from `fixed:alerting.rules:writer` <br>`fixed:alerting.instances:writer`<br>`fixed:alerting.notifications:writer` | Create, update, and delete all alert rules, silences, contact points, templates, mute timings, and notification policies. |
|
||||
| `fixed:alerting:reader` | All permissions from `fixed:alerting.rules:reader` <br>`fixed:alerting.instances:reader`<br>`fixed:alerting.notifications:reader` | Read-only permissions for all alert rules, alerts, contact points, and notification policies. |
|
||||
| `fixed:alerting.provisioning.secrets:reader` | `alert.provisioning:read` and `alert.provisioning.secrets:read` | Read-only permissions for Provisioning API and let export resources with decrypted secrets. |
|
||||
| `fixed:alerting.provisioning:writer` | `alert.provisioning:read` and `alert.provisioning:write` | Create, update and delete Grafana alert rules, notification policies, contact points, templates, etc via provisioning API. |
|
||||
| `fixed:alerting.provisioning.status:writer` | `alert.provisioning.provenance:write` | Set provenance status to alert rules, notification policies, contact points, etc. Should be used together with regular writer roles. |
|
||||
| Display name in UI / Fixed role | Permissions | Description |
|
||||
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Silences Writer: `fixed:alerting.instances:writer` | All permissions from `fixed:alerting.instances:reader` and<br> `alert.instances:create`<br>`alert.instances:write` for organization scope <br> `alert.instances.external:write` for scope `datasources:*` | Add and update silences in Grafana and external providers. |
|
||||
| Instances and Silences Reader: `fixed:alerting.instances:reader` | `alert.instances:read` for organization scope <br> `alert.instances.external:read` for scope `datasources:*` | Read alert instances and silences in Grafana and external providers. |
|
||||
| Notifications Writer: `fixed:alerting.notifications:writer` | All permissions from `fixed:alerting.notifications:reader` and<br>`alert.notifications:write`for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Add, update, and delete notification policies and contact points in Grafana and external providers. |
|
||||
| Notifications Reader: `fixed:alerting.notifications:reader` | `alert.notifications:read` for organization scope<br>`alert.notifications.external:read` for scope `datasources:*` | Read notification policies and contact points in Grafana and external providers. |
|
||||
| Rules Writer: `fixed:alerting.rules:writer` | All permissions from `fixed:alerting.rules:reader` and <br> `alert.rule:create` <br> `alert.rule:write` <br> `alert.rule:delete` <br> `alert.silences:create` <br> `alert.silences:write` for scope `folders:*` <br> `alert.rules.external:write` for scope `datasources:*` | Create, update, and delete all alert rules and manage rule-specific silences. |
|
||||
| Rules Reader: `fixed:alerting.rules:reader` | `alert.rule:read`, `alert.silences:read` for scope `folders:*` <br> `alert.rules.external:read` for scope `datasources:*` <br> `alert.notifications.time-intervals:read` <br> `alert.notifications.receivers:list` | Read all alert rules and rule-specific silences in Grafana and external providers. |
|
||||
| Full access: `fixed:alerting:writer` | All permissions from `fixed:alerting.rules:writer` <br>`fixed:alerting.instances:writer`<br>`fixed:alerting.notifications:writer` | Add, update, and delete alert rules, silences, contact points, and notification policies in Grafana and external providers. |
|
||||
| Full read-only access: `fixed:alerting:reader` | All permissions from `fixed:alerting.rules:reader` <br>`fixed:alerting.instances:reader`<br>`fixed:alerting.notifications:reader` | Read alert rules, alert instances, silences, contact points, and notification policies in Grafana and external providers. |
|
||||
| Read via Provisioning API + Export Secrets: `fixed:alerting.provisioning.secrets:reader` | `alert.provisioning:read` and `alert.provisioning.secrets:read` | Read alert rules, alert instances, silences, contact points, and notification policies using the provisioning API and use export with decrypted secrets. |
|
||||
| Access to alert rules provisioning API: `fixed:alerting.provisioning:writer` | `alert.provisioning:read` and `alert.provisioning:write` | Manage all alert rules, notification policies, contact points, templates, in the organization using the provisioning API. |
|
||||
| Set provisioning status: `fixed:alerting.provisioning.status:writer` | `alert.provisioning.provenance:write` | Set provisioning rules for Alerting resources. Should be used together with other regular roles (Notifications Writer and/or Rules Writer.) |
|
||||
|
||||
## Create custom roles
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ refs:
|
||||
service-accounts:
|
||||
- pattern: /docs/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/account-management/authentication-and-permissions/service-accounts/
|
||||
rbac-role-definitions:
|
||||
- pattern: /docs/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/
|
||||
|
||||
@@ -99,11 +99,11 @@ Grafana's [HTTP API endpoints for generating and managing API Keys]({{< relref "
|
||||
|
||||
#### Migration path
|
||||
|
||||
While upgrading to Grafana v10, you don't need to take any action; your API keys will be automatically migrated. To test or perform the migration from API keys to service accounts before upgrading to Grafana v10, follow our [migration documentation]({{< relref "../administration/api-keys/#migrate-api-keys-to-grafana-service-account" >}}").
|
||||
While upgrading to Grafana v10, you don't need to take any action; your API keys will be automatically migrated. To test or perform the migration from API keys to service accounts before upgrading to Grafana v10, follow our [migration documentation](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/migrate-api-keys/).
|
||||
|
||||
#### Learn more
|
||||
|
||||
- [Documentation on migrating from API keys to service accounts]({{< relref "../administration/api-keys/" >}})
|
||||
- [Documentation on migrating from API keys to service accounts](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/migrate-api-keys/)
|
||||
|
||||
- [Blog post announcement with a video demo including how to migrate](https://grafana.com/blog/2022/08/24/new-in-grafana-9.1-service-accounts-are-now-ga/)
|
||||
|
||||
|
||||
@@ -50,11 +50,9 @@ refs:
|
||||
|
||||
Usage insights enables you to have a better understanding of how your Grafana instance is used.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](https://grafana.com/docs/grafana-cloud/).
|
||||
Grafana Cloud insights logs include additional fields with their own dashboards.
|
||||
Read more in the [Grafana Cloud documentation](https://grafana.com/docs/grafana-cloud/account-management/usage-insights/).
|
||||
{{< /admonition >}}
|
||||
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
|
||||
> Grafana Cloud insights logs include additional fields with their own dashboards.
|
||||
> Read more in the [Grafana Cloud documentation](/docs/grafana-cloud/usage-insights/).
|
||||
|
||||
The usage insights feature collects a number of aggregated data and stores them in the database:
|
||||
|
||||
@@ -79,7 +77,7 @@ For every dashboard and data source, you can access usage information.
|
||||
|
||||
To see dashboard usage information, click the dashboard insights icon in the header.
|
||||
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-insights-11.2.png" alt="Dashboard insights icon" >}}
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-insights.png" max-width="400px" class="docs-image--no-shadow" alt="Dashboard insights icon" >}}
|
||||
|
||||
Dashboard insights show the following information:
|
||||
|
||||
|
||||
@@ -21,12 +21,12 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
annotations-api:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/annotations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/developer-resources/api-reference/http-api/annotations/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/developers/http_api/annotations/
|
||||
---
|
||||
|
||||
# Annotate visualizations
|
||||
@@ -70,44 +70,34 @@ Watch the following video for a quick tutorial on creating annotations:
|
||||
|
||||
To add an annotation, complete the following steps:
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Click the panel to which you're adding the annotation.
|
||||
|
||||
A context menu will appear.
|
||||
|
||||
1. In the dashboard click the panel to which you're adding the annotation. A context menu will appear.
|
||||
1. In the context menu, click **Add annotation**.
|
||||

|
||||
1. Add an annotation description and tags (optional).
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Exit edit**.
|
||||
1. Click **Save**.
|
||||
|
||||
Alternatively, to add an annotation, press Ctrl/Cmd and click the panel, and the **Add annotation** context menu will appear.
|
||||
Alternatively, to add an annotation, press Ctrl/Cmd and click the panel, and the **Add annotation** popover will appear.
|
||||
|
||||
### Add a region annotation
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Press Ctrl/Cmd and click and drag on the panel.
|
||||
1. In the dashboard press Ctrl/Cmd and click and drag on the panel.
|
||||

|
||||
1. Add an annotation description and tags (optional).
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Exit edit**.
|
||||
1. Click **Save**.
|
||||
|
||||
### Edit an annotation
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Hover over the annotation indicator on the panel.
|
||||
1. Click the pencil icon in the annotation tooltip.
|
||||
1. Modify the description and tags.
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Exit edit**.
|
||||
1. In the dashboard, hover over an annotation indicator on the Time series panel.
|
||||
<!---->
|
||||
1. Click on the pencil icon in the annotation tooltip.
|
||||
1. Modify the description and/or tags.
|
||||
1. Click save.
|
||||
|
||||
### Delete an annotation
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Hover over the annotation indicator on the panel.
|
||||
1. Click the trash icon in the annotation tooltip.
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Exit edit**.
|
||||
1. In the dashboard hover over an annotation indicator on a panel.
|
||||
<!---->
|
||||
1. Click on the trash icon in the annotation tooltip.
|
||||
|
||||
## Fetch annotations through dashboard settings
|
||||
|
||||
@@ -119,11 +109,10 @@ Check out the video below for a quick tutorial.
|
||||
|
||||
### Add new annotation queries
|
||||
|
||||
To add a new annotation query to a dashboard, follow these steps:
|
||||
To add a new annotation query to a dashboard, take the following steps:
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Click **Settings**.
|
||||
1. On the **Settings** page, go to the **Annotations** tab.
|
||||
1. Click the dashboard settings (gear) icon in the dashboard header to open the settings menu.
|
||||
1. Select **Annotations**.
|
||||
1. Click **Add annotation query**.
|
||||
|
||||
If you've added a query before, the **+ New query** button is displayed.
|
||||
@@ -151,9 +140,6 @@ To add a new annotation query to a dashboard, follow these steps:
|
||||
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source](ref:data-source) topic.
|
||||
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Back to dashboard** and **Exit edit**.
|
||||
|
||||
## Built-in query
|
||||
|
||||
After you add an annotation, they will still be visible. This is due to the built-in annotation query that exists on all dashboards. This annotation query will fetch all annotation events that originate from the current dashboard, which are stored in Grafana, and show them on the panel where they were created. This includes alert state history annotations.
|
||||
@@ -164,9 +150,8 @@ To add annotations directly to the dashboard, this query must be enabled.
|
||||
|
||||
To confirm if the built-in query is enabled, take the following steps:
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Click **Settings**.
|
||||
1. On the **Settings** page, go to the **Annotations** tab.
|
||||
1. Click the dashboard settings (gear) icon in the dashboard header to open the dashboard settings menu.
|
||||
1. Click **Annotations**.
|
||||
1. Find the **Annotations & Alerts (Built-in)** query.
|
||||
|
||||
If it says **Disabled** before the name of the query, then you'll need to click the query name to open it and update the setting.
|
||||
@@ -177,8 +162,6 @@ You can stop annotations from being fetched and drawn by taking the following st
|
||||
1. Click **Annotations**.
|
||||
1. Find and click the **Annotations & Alerts (Built-in)** query to open it.
|
||||
1. Click the **Enabled** toggle to turn it off.
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Back to dashboard** and **Exit edit**.
|
||||
|
||||
When you copy a dashboard using the **Save As** feature it will get a new dashboard id, so annotations created on the source dashboard will no longer be visible on the copy. You can still show them if you add a new **Annotation Query** and filter by tags. However, this only works if the annotations on the source dashboard had tags to filter by.
|
||||
|
||||
|
||||
@@ -21,22 +21,28 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/add-template-variables/#add-ad-hoc-filters
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/add-template-variables/#add-ad-hoc-filters
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/add-template-variables/#add-ad-hoc-filters
|
||||
manage-dashboard-links:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/manage-dashboard-links/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/manage-dashboard-links/
|
||||
variables:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/manage-dashboard-links/
|
||||
linking-overview:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/
|
||||
template-and-variables:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
---
|
||||
|
||||
# Dashboard URL variables
|
||||
|
||||
Dashboard URL [variables](ref:variables) allow you to provide more context when you share a dashboard URL.
|
||||
Grafana can apply variable values passed as query parameters in dashboard URLs.
|
||||
For more information, refer to [Manage dashboard links](ref:manage-dashboard-links) and [Templates and variables][].
|
||||
|
||||
For example, you could share a basic URL to your dashboard that looks like this:
|
||||
|
||||
|
||||
@@ -19,22 +19,22 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/#special-data-sources
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/#special-data-sources
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/#special-data-sources
|
||||
visualization-specific-options:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/visualizations/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/
|
||||
configure-standard-options:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-standard-options/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/configure-standard-options/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-standard-options/
|
||||
configure-value-mappings:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-value-mappings/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/configure-value-mappings/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-value-mappings/
|
||||
generative-ai-features:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/manage-dashboards/#set-up-generative-ai-features-for-dashboards
|
||||
@@ -44,12 +44,12 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-thresholds/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/configure-thresholds/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-thresholds/
|
||||
data-sources:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
add-a-data-source:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/#add-a-data-source
|
||||
@@ -69,12 +69,17 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-panel-options/#configure-repeating-panels
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/configure-panel-options/#configure-repeating-panels
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-panel-options/#configure-repeating-panels
|
||||
override-field-values:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-overrides/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/configure-overrides/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-overrides/
|
||||
dashboard:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/#special-data-sources
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/#special-data-sources
|
||||
---
|
||||
|
||||
## Create a dashboard
|
||||
@@ -90,7 +95,7 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
|
||||
**To create a dashboard**:
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **New** and select **New Dashboard**.
|
||||
1. On the empty dashboard, click **+ Add visualization**.
|
||||
|
||||
@@ -99,7 +104,7 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
1. In the dialog box that opens, do one of the following:
|
||||
|
||||
- Select one of your existing data sources.
|
||||
- Select one of the Grafana [built-in special data sources](ref:built-in-special-data-sources).
|
||||
- Select one of the Grafana's [built-in special data sources](ref:built-in-special-data-sources).
|
||||
- Click **Configure a new data source** to set up a new one (Admins only).
|
||||
|
||||
{{< figure class="float-right" src="/media/docs/grafana/dashboards/screenshot-data-source-selector-10.0.png" max-width="800px" alt="Select data source modal" >}}
|
||||
@@ -110,10 +115,14 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
For more information about data sources, refer to [Data sources](ref:data-sources) for specific guidelines.
|
||||
|
||||
1. Write or construct a query in the query language of your data source.
|
||||
1. Click **Refresh** to query the data source.
|
||||
|
||||
1. Click the Refresh dashboard icon to query the data source.
|
||||
|
||||

|
||||
|
||||
1. In the visualization list, select a visualization type.
|
||||
|
||||

|
||||

|
||||
|
||||
Grafana displays a preview of your query results with the visualization applied.
|
||||
|
||||
@@ -130,35 +139,30 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
- [Configure thresholds](ref:configure-thresholds)
|
||||
- [Configure standard options](ref:configure-standard-options)
|
||||
|
||||
1. When you've finished editing your panel, click **Save dashboard**.
|
||||
1. When you've finished editing your panel, click **Save** to save the dashboard.
|
||||
|
||||
Alternatively, click **Back to dashboard** if you want to see your changes applied to the dashboard first. Then click **Save dashboard** when you're ready.
|
||||
Alternatively, click **Apply** if you want to see your changes applied to the dashboard first. Then click the save icon in the dashboard header.
|
||||
|
||||
1. Enter a title and description for your dashboard or have Grafana create them using [generative AI features](ref:generative-ai-features).
|
||||
1. Select a folder, if applicable.
|
||||
1. Click **Save**.
|
||||
1. To add more panels to the dashboard, click **Back to dashboard**.
|
||||
Then click **Add** in the dashboard header and select **Visualization** in the drop-down.
|
||||
1. To add more panels to the dashboard, click **Add** in the dashboard header and select **Visualization** in the drop-down.
|
||||
|
||||

|
||||

|
||||
|
||||
When you add additional panels to the dashboard, you're taken straight to the **Edit panel** view.
|
||||
|
||||
1. When you've saved all the changes you want to make to the dashboard, click **Exit edit**.
|
||||
## Copy an existing dashboard
|
||||
|
||||
Now, when you want to make more changes to the saved dashboard, click **Edit** in the top-right corner.
|
||||
To copy an existing dashboard, follow these steps:
|
||||
|
||||
## Copy a dashboard
|
||||
|
||||
To copy a dashboard, follow these steps:
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Open the dashboard you want to copy.
|
||||
1. Click **Edit** in top-right corner.
|
||||
1. Click the **Save dashboard** drop-down and select **Save as copy**.
|
||||
1. Click **Dashboards** in the primary menu.
|
||||
1. Open the dashboard to be copied.
|
||||
1. Click **Settings** (gear icon) in the top right of the dashboard.
|
||||
1. Click **Save as** in the top-right corner of the dashboard.
|
||||
1. (Optional) Specify the name, folder, description, and whether or not to copy the original dashboard tags for the copied dashboard.
|
||||
|
||||
By default, the copied dashboard has the same name as the original dashboard with the word "Copy" appended and is in the same folder.
|
||||
By default, the copied dashboard has the same name as the original dashboard with the word "Copy" appended and is located in the same folder.
|
||||
|
||||
1. Click **Save**.
|
||||
|
||||
@@ -174,7 +178,7 @@ To see an example of repeating rows, refer to [Dashboard with repeating rows](ht
|
||||
|
||||
**To configure repeating rows:**
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Navigate to the dashboard you want to work on.
|
||||
1. At the top of the dashboard, click **Add** and select **Row** in the drop-down.
|
||||
|
||||
@@ -188,7 +192,7 @@ To provide context to dashboard users, add the variable to the row title.
|
||||
|
||||
### Repeating rows and the Dashboard special data source
|
||||
|
||||
If a row includes panels using the special [Dashboard data source](ref:built-in-special-data-sources)—the data source that uses a result set from another panel in the same dashboard—then corresponding panels in repeated rows will reference the panel in the original row, not the ones in the repeated rows.
|
||||
If a row includes panels using the special [Dashboard](ref:dashboard) data source—the data source that uses a result set from another panel in the same dashboard—then corresponding panels in repeated rows will reference the panel in the original row, not the ones in the repeated rows.
|
||||
|
||||
For example, in a dashboard:
|
||||
|
||||
@@ -201,24 +205,14 @@ For example, in a dashboard:
|
||||
|
||||
You can place a panel on a dashboard in any location.
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Navigate to the dashboard you want to work on.
|
||||
1. Click **Edit** in the top-right corner.
|
||||
1. Click the panel title and drag the panel to the new location.
|
||||
1. Click **Save dashboard**.
|
||||
1. (Optional) Enter a description of the changes you've made.
|
||||
1. Click **Save**.
|
||||
1. Click **Exit edit**.
|
||||
|
||||
## Resize a panel
|
||||
|
||||
You can size a dashboard panel to suits your needs.
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Navigate to the dashboard you want to work on.
|
||||
1. Click **Edit** in the top-right corner.
|
||||
1. To adjust the size of the panel, click and drag the lower-right corner of the panel.
|
||||
1. Click **Save dashboard**.
|
||||
1. (Optional) Enter a description of the changes you've made.
|
||||
1. Click **Save**.
|
||||
1. Click **Exit edit**.
|
||||
|
||||
@@ -48,6 +48,7 @@ To import a dashboard, follow these steps:
|
||||
1. (Optional) Change the dashboard name, folder, or UID, and specify metric prefixes, if the dashboard uses any.
|
||||
1. Select a data source, if required.
|
||||
1. Click **Import**.
|
||||
1. Save the dashboard.
|
||||
|
||||
## Discover dashboards on grafana.com
|
||||
|
||||
|
||||
@@ -26,19 +26,19 @@ weight: 500
|
||||
refs:
|
||||
data-links:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-data-links/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-data-links/#data-links
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/configure-data-links/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-data-links/#data-links
|
||||
data-link-variables:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-data-links/#data-link-variables
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/configure-data-links/#data-link-variables
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/configure-data-links/#data-link-variables
|
||||
dashboard-url-variables:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/create-dashboard-url-variables/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/create-dashboard-url-variables/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/create-dashboard-url-variables/
|
||||
---
|
||||
|
||||
# Manage dashboard links
|
||||
@@ -83,64 +83,51 @@ Once you've added a dashboard link, it appears in the upper right corner of your
|
||||
|
||||
Add links to other dashboards at the top of your current dashboard.
|
||||
|
||||
1. In the dashboard you want to link, click **Edit**.
|
||||
1. Click **Settings**.
|
||||
1. Go to the **Links** tab and then click **Add dashboard link**.
|
||||
|
||||
The default link type is **Dashboards**.
|
||||
|
||||
1. In the **With tags** drop-down, enter tags to limit the linked dashboards to only the ones with the tags you enter.
|
||||
|
||||
If you don't add any tags, Grafana includes links to all other dashboards.
|
||||
|
||||
1. Set link options:
|
||||
|
||||
- **Show as dropdown** – If you are linking to lots of dashboards, then you probably want to select this option and add an optional title to the dropdown. Otherwise, Grafana displays the dashboard links side by side across the top of your dashboard.
|
||||
- **Include current time range** – Select this option to include the dashboard time range in the link. When the user clicks the link, the linked dashboard opens with the indicated time range already set. **Example:** https://play.grafana.org/d/000000010/annotations?orgId=1&from=now-3h&to=now
|
||||
- **Include current template variable values** – Select this option to include template variables currently used as query parameters in the link. When the user clicks the link, any matching templates in the linked dashboard are set to the values from the link. For more information, see [Dashboard URL variables](ref:dashboard-url-variables).
|
||||
- **Open link in new tab** – Select this option if you want the dashboard link to open in a new tab or window.
|
||||
|
||||
1. Click **Save dashboard** in the top-right corner.
|
||||
1. Click **Back to dashboard** and then **Exit edit**.
|
||||
1. While viewing the dashboard you want to link, click the gear at the top of the screen to open **Dashboard settings**.
|
||||
1. Click **Links** and then click **Add Dashboard Link** or **New**.
|
||||
1. In **Type**, select **dashboards**.
|
||||
1. Select link options:
|
||||
- **With tags** – Enter tags to limit the linked dashboards to only the ones with the tags you enter. Otherwise, Grafana includes links to all other dashboards.
|
||||
- **As dropdown** – If you are linking to lots of dashboards, then you probably want to select this option and add an optional title to the dropdown. Otherwise, Grafana displays the dashboard links side by side across the top of your dashboard.
|
||||
- **Time range** – Select this option to include the dashboard time range in the link. When the user clicks the link, the linked dashboard opens with the indicated time range already set. **Example:** https://play.grafana.org/d/000000010/annotations?orgId=1&from=now-3h&to=now
|
||||
- **Variable values** – Select this option to include template variables currently used as query parameters in the link. When the user clicks the link, any matching templates in the linked dashboard are set to the values from the link. For more information, see [Dashboard URL variables](ref:dashboard-url-variables).
|
||||
- **Open in new tab** – Select this option if you want the dashboard link to open in a new tab or window.
|
||||
1. Click **Add**.
|
||||
|
||||
### Add a URL link to a dashboard
|
||||
|
||||
Add a link to a URL at the top of your current dashboard. You can link to any available URL, including dashboards, panels, or external sites. You can even control the time range to ensure the user is zoomed in on the right data in Grafana.
|
||||
|
||||
1. In the dashboard you want to link, click **Edit**.
|
||||
1. Click **Settings**.
|
||||
1. Go to the **Links** tab and then click **Add dashboard link**.
|
||||
1. In the **Type** drop-down, select **Link**.
|
||||
1. In the **URL** field, enter the URL to which you want to link.
|
||||
|
||||
Depending on the target, you might want to include field values. **Example:** https://github.com/grafana/grafana/issues/new?title=Dashboard%3A%20HTTP%20Requests
|
||||
|
||||
1. In the **Tooltip** field, enter the tooltip you want the link to display when the user hovers their mouse over it.
|
||||
1. In the **Icon** drop-down, choose the icon you want displayed with the link.
|
||||
1. Set link options; by default, these options are enabled for URL links:
|
||||
|
||||
- **Include current time range** – Select this option to include the dashboard time range in the link. When the user clicks the link, the linked dashboard opens with the indicated time range already set. **Example:** https://play.grafana.org/d/000000010/annotations?orgId=1&from=now-3h&to=now
|
||||
- **Include current template variable values** – Select this option to include template variables currently used as query parameters in the link. When the user clicks the link, any matching templates in the linked dashboard are set to the values from the link.
|
||||
- **Open link in new tab** – Select this option if you want the dashboard link to open in a new tab or window.
|
||||
|
||||
1. Click **Save dashboard** in the top-right corner.
|
||||
1. Click **Back to dashboard** and then **Exit edit**.
|
||||
1. While viewing the dashboard you want to link, click the gear at the top of the screen to open **Dashboard settings**.
|
||||
1. Click **Links** and then click **Add Dashboard Link** or **New**.
|
||||
1. In **Type**, select **link**.
|
||||
1. Select link options:
|
||||
- **Url** – Enter the URL you want to link to. Depending on the target, you might want to include field values. **Example:** https://github.com/grafana/grafana/issues/new?title=Dashboard%3A%20HTTP%20Requests
|
||||
- **Title** – Enter the title you want the link to display.
|
||||
- **Tooltip** – Enter the tooltip you want the link to display when the user hovers their mouse over it.
|
||||
- **Icon** – Choose the icon you want displayed with the link.
|
||||
- **Time range** – Select this option to include the dashboard time range in the link. When the user clicks the link, the linked dashboard opens with the indicated time range already set. **Example:** https://play.grafana.org/d/000000010/annotations?orgId=1&from=now-3h&to=now
|
||||
- `from` - Defines the lower limit of the time range, specified in ms epoch.
|
||||
- `to` - Defines the upper limit of the time range, specified in ms epoch.
|
||||
- `time` and `time.window` - Define a time range from `time-time.window/2` to `time+time.window/2`. Both params should be specified in ms. For example `?time=1500000000000&time.window=10000` will result in 10s time range from 1499999995000 to 1500000005000.
|
||||
- **Variable values** – Select this option to include template variables currently used as query parameters in the link. When the user clicks the link, any matching templates in the linked dashboard are set to the values from the link. Here is the variable format: `https://${you-domain}/path/to/your/dashboard?var-${template-variable1}=value1&var-{template-variable2}=value2` **Example:** https://play.grafana.org/d/000000074/alerting?var-app=backend&var-server=backend_01&var-server=backend_03&var-interval=1h
|
||||
- **Open in new tab** – Select this option if you want the dashboard link to open in a new tab or window.
|
||||
1. Click **Add**.
|
||||
|
||||
### Update a dashboard link
|
||||
|
||||
To edit, duplicate, or delete dashboard link, follow these steps:
|
||||
To change or update an existing dashboard link, follow this procedure.
|
||||
|
||||
1. In the dashboard you want to link, click **Edit**.
|
||||
1. Click **Settings**.
|
||||
1. Go to the **Links** tab.
|
||||
1. Do one of the following:
|
||||
1. In Dashboard Settings, on the Links tab, click the existing link that you want to edit.
|
||||
1. Change the settings and then click **Update**.
|
||||
|
||||
- **Edit** - Click the name of the link and update the link settings.
|
||||
- **Duplicate** - Click the copy link icon next to the link that you want to duplicate.
|
||||
- **Delete** - Click the red **X** next to the link that you want to delete, and then **Delete**.
|
||||
## Duplicate a dashboard link
|
||||
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Back to dashboard** and then **Exit edit**.
|
||||
To duplicate an existing dashboard link, click the duplicate icon next to the existing link that you want to duplicate.
|
||||
|
||||
### Delete a dashboard link
|
||||
|
||||
To delete an existing dashboard link, click the trash icon next to the duplicate icon that you want to delete.
|
||||
|
||||
## Panel links
|
||||
|
||||
@@ -157,7 +144,7 @@ Click the icon next to the panel title to see available panel links.
|
||||
|
||||
To use a keyboard shortcut to open the panel, hover over the panel and press `e`.
|
||||
|
||||
1. Expand the **Panel options** section, scroll down to **Panel links**.
|
||||
1. Expand the **Panel options** section, scroll down to Panel links.
|
||||
1. Click **Add link**.
|
||||
1. Enter a **Title**. **Title** is a human-readable label for the link that will be displayed in the UI.
|
||||
1. Enter the **URL** you want to link to.
|
||||
@@ -165,10 +152,9 @@ Click the icon next to the panel title to see available panel links.
|
||||
- `from` - Defines the lower limit of the time range, specified in ms epoch.
|
||||
- `to` - Defines the upper limit of the time range, specified in ms epoch.
|
||||
- `time` and `time.window` - Define a time range from `time-time.window/2` to `time+time.window/2`. Both params should be specified in ms. For example `?time=1500000000000&time.window=10000` will result in 10s time range from 1499999995000 to 1500000005000.
|
||||
1. If you want the link to open in a new tab, then select **Open in new tab**.
|
||||
1. Click **Save** to save changes and close the dialog box.
|
||||
1. Click **Save dashboard** in the top-right corner.
|
||||
1. Click **Back to dashboard** and then **Exit edit**.
|
||||
1. If you want the link to open in a new tab, then select **Open in a new tab**.
|
||||
1. Click **Save** to save changes and close the window.
|
||||
1. Click **Save** in the upper right to save your changes to the dashboard.
|
||||
|
||||
### Update a panel link
|
||||
|
||||
@@ -181,9 +167,8 @@ Click the icon next to the panel title to see available panel links.
|
||||
1. Find the link that you want to make changes to.
|
||||
1. Click the Edit (pencil) icon to open the Edit link window.
|
||||
1. Make any necessary changes.
|
||||
1. Click **Save** to save changes and close the dialog box.
|
||||
1. Click **Save dashboard** in the top-right corner.
|
||||
1. Click **Back to dashboard** and then **Exit edit**.
|
||||
1. Click **Save** to save changes and close the window.
|
||||
1. Click **Save** in the upper right to save your changes to the dashboard.
|
||||
|
||||
### Delete a panel link
|
||||
|
||||
@@ -195,5 +180,4 @@ Click the icon next to the panel title to see available panel links.
|
||||
1. Expand the **Panel options** section, scroll down to Panel links.
|
||||
1. Find the link that you want to delete.
|
||||
1. Click the **X** icon next to the link you want to delete.
|
||||
1. Click **Save dashboard** in the top-right corner.
|
||||
1. Click **Back to dashboard** and then **Exit edit**.
|
||||
1. Click **Save** in the upper right to save your changes to the dashboard.
|
||||
|
||||
@@ -39,75 +39,52 @@ You can control permissions for library panels using [role-based access control
|
||||
|
||||
When you create a library panel, the panel on the source dashboard is converted to a library panel as well. You need to save the original dashboard once a panel is converted.
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. On the panel you want to update, hover over any part of the panel to display the menu icon on the top-right corner.
|
||||
1. Click the menu icon and select **More > Create library panel**.
|
||||
1. Open a panel in edit mode.
|
||||
1. In the panel display options, click the down arrow option to bring changes to the visualization.
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-create-lib-panel-from-edit-9-5.png" class="docs-image--no-shadow" max-width= "800px" alt="Library panels tab of the panel editor pane" >}}
|
||||
1. Click **Library panels**, and then click **+ Create library panel** to open the create dialog.
|
||||
1. In **Library panel name**, enter the name.
|
||||
1. In **Save in folder**, select the folder to save the library panel.
|
||||
1. Click **Create library panel**.
|
||||
1. Click **Save dashboard** and **Exit edit**.
|
||||
1. Click **Create library panel** to save your changes.
|
||||
1. Save the dashboard.
|
||||
|
||||
Once created, you can modify the library panel using any dashboard on which it appears. After you save the changes, all instances of the library panel reflect these modifications.
|
||||
|
||||
You can also create a library panel directly from the edit menu of any panel.
|
||||
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-create-from-more-9-5.png" class="docs-image--no-shadow" max-width= "900px" alt="Create library panel option in the panel menu" >}}
|
||||
|
||||
## Add a library panel to a dashboard
|
||||
|
||||
Add a Grafana library panel to a dashboard when you want to provide visualizations to other dashboard users.
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **New** and select **New Dashboard** in the dropdown.
|
||||
1. On the empty dashboard, click **+ Add library panel**.
|
||||
1. On the empty dashboard, click **+ Import library panel**.
|
||||
|
||||
You'll see a list of your library panels.
|
||||
You will see a list of your library panels.
|
||||
|
||||
1. Filter the list or search to find the panel you want to add.
|
||||
1. Click a panel to add it to the dashboard.
|
||||
1. Click **Save dashboard**.
|
||||
1. (Optional) Enter a description of the changes you've made.
|
||||
1. Click **Save**.
|
||||
|
||||
## Unlink a library panel
|
||||
|
||||
Unlink a library panel when you want to make a change to the panel and not affect other instances of the library panel.
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Library panels**.
|
||||
1. Select a library panel that is being used in dashboards.
|
||||
1. Click the panel you want to unlink.
|
||||
1. In the dialog box, select the dashboard from which you want to unlink the panel.
|
||||
1. Click **View panel in \<dashboard name\>**.
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Hover over any part of the panel you want to unlink to display the menu icon on the top-right corner.
|
||||
1. Click the menu icon and select **More > Unlink library panel**.
|
||||
1. Click **Yes, unlink**.
|
||||
1. Click **Save dashboard** and **Exit edit**.
|
||||
|
||||
Alternatively, if you know where the library panel is being used, you can go directly to that dashboard and start at step 7.
|
||||
|
||||
## Replace a library panel
|
||||
|
||||
To replace a library panel with a different one, follow these steps:
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Library panels**.
|
||||
1. Select a library panel that is being used in different dashboards.
|
||||
1. Click the panel you want to unlink.
|
||||
1. In the dialog box, select the dashboard from which you want to unlink the panel.
|
||||
1. Click **View panel in \<dashboard name\>**.
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Hover over any part of the panel you want to unlink to display the menu icon on the top-right corner.
|
||||
1. Click the menu icon and select **More > Replace library panel**.
|
||||
1. Select the replacement library panel.
|
||||
1. Click **Save dashboard**.
|
||||
1. (Optional) Enter a description of the changes you've made.
|
||||
1. Click **Save** and **Exit edit**.
|
||||
|
||||
Alternatively, if you know where the library panel that you want to replace is being used, you can go directly to that dashboard and start at step 7.
|
||||
1. Select the panel you want to unlink.
|
||||
1. Hover over any part of the panel to display the actions menu on the top right corner.
|
||||
1. Click the menu and select **Edit**.
|
||||
1. Click **Unlink** on the top right corner of the page.
|
||||
1. Click **Yes, unlink**.
|
||||
|
||||
## View a list of library panels
|
||||
|
||||
You can view a list of available library panels and see where those panels are being used.
|
||||
You can view a list of available library panels and search for a library panel.
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Library panels**.
|
||||
|
||||
You can see a list of previously defined library panels.
|
||||
@@ -117,14 +94,10 @@ You can view a list of available library panels and see where those panels are b
|
||||
|
||||
You can also filter the panels by folder or type.
|
||||
|
||||
1. Click the panel to see if it's being used in any dashboards.
|
||||
1. (Optional) If the library panel is in use, select one of the dashboards using it.
|
||||
1. (Optional) Click **View panel in \<dashboard name\>** to see the panel in context.
|
||||
|
||||
## Delete a library panel
|
||||
|
||||
Delete a library panel when you no longer need it.
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Library panels**.
|
||||
1. Click the delete icon next to the library panel name.
|
||||
|
||||
@@ -21,38 +21,28 @@ weight: 400
|
||||
|
||||
# Manage dashboard version history
|
||||
|
||||
Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are never lost. You can see a list of dashboard versions in the **Versions** tab of the dashboard settings:
|
||||
Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are never lost. A list of these versions is available by entering the dashboard settings and then selecting "Versions" in the left side menu.
|
||||
|
||||

|
||||

|
||||
|
||||
The dashboard version history feature lets you compare and restore to previously saved dashboard versions.
|
||||
|
||||
## Compare two dashboard versions
|
||||
## Comparing two dashboard versions
|
||||
|
||||
To compare two dashboard versions, follow these steps:
|
||||
To compare two dashboard versions, select the two versions from the list that you wish to compare. Once selected, the "Compare versions" button will become clickable. Click the button to view the diff between the two versions.
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Click **Settings**.
|
||||
1. Go to the **Versions** tab.
|
||||
1. Select the two dashboard versions that you want to compare.
|
||||
1. Click **Compare versions** to view the diff between the two versions.
|
||||
1. Review the text descriptions of the differences between the versions.
|
||||
1. (Optional) Expand the **View JSON Diff** section of the page to see the diff of the raw JSON that represents your dashboard.
|
||||
1. When you've finished comparing versions, click **Back to dashboard** and **Exit edit**.
|
||||

|
||||
|
||||
When you're comparing versions, if one of the versions you've selected is the latest version, a button to restore the previous version is also displayed, so you can restore a version from the compare view:
|
||||
Upon clicking the button, you'll be brought to the diff view. By default, you'll see a textual summary of the changes, like in the image below.
|
||||
|
||||

|
||||

|
||||
|
||||
## Restore a previously dashboard version
|
||||
If you want to view the diff of the raw JSON that represents your dashboard, you can do that as well by clicking the expand icon for the View JSON Diff section at the bottom.
|
||||
|
||||
To restore to a previously saved dashboard version, follow these steps:
|
||||
## Restoring to a previously saved dashboard version
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Click **Settings**.
|
||||
1. Go to the **Versions** tab.
|
||||
1. Click the **Restore** button next to the version.
|
||||
If you need to restore to a previously saved dashboard version, you can do so by either clicking the "Restore" button on the right of a row in the dashboard version list, or by clicking the **Restore to version \<x\>** button appearing in the diff view. Clicking the button will bring up the following popup prompting you to confirm the restoration.
|
||||
|
||||
When you restore a version, the dashboard is immediately saved and you're no longer in edit mode.
|
||||

|
||||
|
||||
After you restore a previous version, a new version of the dashboard is created containing the same exact data as the previous version, but with a different version number. This is indicated in the **Notes column** in the **Versions** tab of the dashboard settings. This is done simply to ensure your previous dashboard versions are not affected by the change.
|
||||
After restoring to a previous version, a new version will be created containing the same exact data as the previous version, only with a different version number. This is indicated in the "Notes column" for the row in the new dashboard version. This is done simply to ensure your previous dashboard versions are not affected by the change.
|
||||
|
||||
@@ -19,22 +19,17 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
json-fields:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/view-dashboard-json-model/#json-fields
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/view-dashboard-json-model/#json-fields
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/view-dashboard-json-model/#json-fields
|
||||
data-source:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/
|
||||
dashboard-links:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/manage-dashboard-links/#dashboard-links
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/manage-dashboard-links/#dashboard-links
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
---
|
||||
|
||||
# Modify dashboard settings
|
||||
@@ -49,29 +44,25 @@ The dashboard settings page allows you to:
|
||||
|
||||
To access the dashboard setting page:
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Click **Settings**.
|
||||
1. Open a dashboard in edit mode.
|
||||
1. Click **Dashboard settings** (gear icon) located at the top of the page.
|
||||
|
||||
## Modify dashboard time settings
|
||||
|
||||
Adjust dashboard time settings when you want to change the dashboard timezone, the local browser time, and specify auto-refresh time intervals.
|
||||
|
||||
1. On the **Settings** page, scroll down to the **Time Options** section of the **General** tab.
|
||||
1. On the **Dashboard settings** page, click **General**.
|
||||
1. Navigate to the **Time Options** section.
|
||||
1. Specify time settings as follows.
|
||||
|
||||
- **Time zone:** Specify the local time zone of the service or system that you are monitoring. This can be helpful when monitoring a system or service that operates across several time zones.
|
||||
- **Timezone:** Specify the local time zone of the service or system that you are monitoring. This can be helpful when monitoring a system or service that operates across several time zones.
|
||||
- **Default:** Grafana uses the default selected time zone for the user profile, team, or organization. If no time zone is specified for the user profile, a team the user is a member of, or the organization, then Grafana uses the local browser time.
|
||||
- **Browser time:** The time zone configured for the viewing user browser is used. This is usually the same time zone as set on the computer.
|
||||
- **Local browser time:** The time zone configured for the viewing user browser is used. This is usually the same time zone as set on the computer.
|
||||
- Standard [ISO 8601 time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), including UTC.
|
||||
- **Auto refresh:** Customize the options displayed for relative time and the auto-refresh options Entries are comma separated and accept any valid time unit.
|
||||
- **Auto-refresh:** Customize the options displayed for relative time and the auto-refresh options Entries are comma separated and accept any valid time unit.
|
||||
- **Now delay:** Override the `now` time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values.
|
||||
- **Hide time picker:** Select this option if you do not want Grafana to display the time picker.
|
||||
|
||||
1. Click **Save dashboard**.
|
||||
1. (Optional) Enter a description of the changes you've made.
|
||||
1. Click **Save**.
|
||||
1. Click **Exit edit**.
|
||||
|
||||
## Add tags
|
||||
|
||||
You can add metadata to your dashboards using tags. Tags also give you the ability to filter the list of dashboards.
|
||||
@@ -80,16 +71,13 @@ Tags can be up to 50 characters long, including spaces.
|
||||
|
||||
To add tags to a dashboard, follow these steps:
|
||||
|
||||
1. On the **Settings** page, scroll down to the **Tags** section of the **General** tab.
|
||||
1. On the **Dashboard settings** page, scroll down to the **Tags** section.
|
||||
1. In the field, enter a new or existing tag.
|
||||
|
||||
If you're entering an existing tag, make sure that you spell it the same way or a new tag is created.
|
||||
|
||||
1. Click **Add** or press the Enter key.
|
||||
1. Click **Save dashboard**.
|
||||
1. (Optional) Enter a description of the changes you've made.
|
||||
1. Click **Save**.
|
||||
1. Click **Exit edit**.
|
||||
1. Save the dashboard.
|
||||
|
||||
When you're on the **Dashboards** page, any tags you've entered show up under the **Tags** column.
|
||||
|
||||
@@ -98,14 +86,10 @@ When you're on the **Dashboards** page, any tags you've entered show up under th
|
||||
An annotation query is a query that queries for events. These events can be visualized in graphs across the dashboard as vertical lines along with a small
|
||||
icon you can hover over to see the event information.
|
||||
|
||||
1. On the **Settings** page, go to the **Annotations** tab.
|
||||
1. On the **Dashboard settings** page, click **Annotations**.
|
||||
1. Click **Add annotation query**.
|
||||
1. Enter a name and select a data source.
|
||||
1. Complete the rest of the form to build a query and annotation.
|
||||
1. Click **Save dashboard**.
|
||||
1. (Optional) Enter a description of the changes you've made.
|
||||
1. Click **Save**.
|
||||
1. Click **Exit edit**.
|
||||
|
||||
The query editor UI changes based on the data source you select. Refer to the [Data source](ref:data-source) documentation for details on how to construct a query.
|
||||
|
||||
@@ -117,43 +101,33 @@ the dashboard. These dropdowns make it easy to change the data being displayed i
|
||||
|
||||
For more information about variables, refer to [Variables](ref:variables).
|
||||
|
||||
1. On the **Settings** page, go to the **Variables** tab.
|
||||
1. Click **+ New variable**.
|
||||
1. In the **Select variable type** drop-down, choose an option.
|
||||
1. On the **Dashboard settings** page, click **Variable** in the left side section menu and then the **Add variable** button.
|
||||
1. In the **General** section, the name of the variable. This is the name that you will later use in queries.
|
||||
1. Select a variable **Type**.
|
||||
|
||||
The variable type you select impacts which fields you populate on the page.
|
||||
> **Note:** The variable type you select impacts which fields you populate on the page.
|
||||
|
||||
1. In the **General** section, enter the name of the variable.
|
||||
|
||||
This is the name that you'll use later in queries.
|
||||
|
||||
1. Set the rest of the variable options.
|
||||
1. Click **Save dashboard**.
|
||||
1. (Optional) Enter a description of the changes you've made.
|
||||
1. Click **Save**.
|
||||
1. Click **Exit edit**.
|
||||
1. Define the variable and click **Update**.
|
||||
|
||||
## Add a link
|
||||
|
||||
Dashboard links enable you to place links to other dashboards and web sites directly below the dashboard header. Links provide for easy navigation to other, related dashboards and content.
|
||||
|
||||
1. On the **Settings** page, click the **Links** tab.
|
||||
1. Click **+ New link**.
|
||||
1. Enter title for the link.
|
||||
1. In the **Type** drop-down, select **Dashboards** or **Link**.
|
||||
1. Set the rest of the link options.
|
||||
|
||||
For more detailed directions on creating links, refer to [Dashboard links](ref:dashboard-links)
|
||||
|
||||
1. Click **Save dashboard**.
|
||||
1. (Optional) Enter a description of the changes you've made.
|
||||
1. Click **Save**.
|
||||
1. Click **Exit edit**.
|
||||
1. On the **Dashboard settings** page, click **Links** in the left side section menu and then the **Add link** button.
|
||||
1. Enter title and in the **Type** field, select **Dashboard** or **Link**.
|
||||
1. To add a dashboard link:
|
||||
a. Add an optional tag. Tags are useful creating a dynamic dropdown of dashboards that all have a specific tag.
|
||||
b. Select any of the dashboard link **Options**.
|
||||
c. Click **Apply**.
|
||||
1. To add a link:
|
||||
a. Add a URL and tooltip text that appears when the user hovers over the link.
|
||||
b. Select an icon that appears next to the link.
|
||||
c. Select any of the dashboard link **Options**.
|
||||
|
||||
## View dashboard JSON model
|
||||
|
||||
A dashboard in Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from panels, template variables, panel queries, and so on.
|
||||
|
||||
To view a dashboard JSON model, on the **Settings** page, click the **JSON Model** tab.
|
||||
To view a dashboard JSON model, on the **Dashboard settings** page, click **JSON**.
|
||||
|
||||
For more information about the JSON fields, refer to [JSON fields](ref:json-fields).
|
||||
|
||||
@@ -21,7 +21,7 @@ refs:
|
||||
- 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/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/annotate-visualizations/
|
||||
---
|
||||
|
||||
# Dashboard JSON model
|
||||
@@ -30,10 +30,9 @@ A dashboard in Grafana is represented by a JSON object, which stores metadata of
|
||||
|
||||
To view the JSON of a dashboard:
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Click **Settings**.
|
||||
1. Go to the **JSON Model** tab.
|
||||
1. When you've finished viewing the JSON, click **Back to dashboard** and **Exit edit**.
|
||||
1. Navigate to a dashboard.
|
||||
1. In the top navigation menu, click the **Dashboard settings** (gear) icon.
|
||||
1. Click **JSON Model**.
|
||||
|
||||
## JSON fields
|
||||
|
||||
@@ -58,7 +57,6 @@ In the following JSON, id is shown as null which is the default value assigned t
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"time_options": [],
|
||||
"refresh_intervals": []
|
||||
},
|
||||
"templating": {
|
||||
@@ -137,17 +135,6 @@ The grid has a negative gravity that moves panels up if there is empty space abo
|
||||
"now": true,
|
||||
"hidden": false,
|
||||
"nowDelay": "",
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
],
|
||||
"refresh_intervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
@@ -175,7 +162,6 @@ Usage of the fields is explained below:
|
||||
| **now** | |
|
||||
| **hidden** | whether timepicker is hidden or not |
|
||||
| **nowDelay** | override the now time by entering a time delay. Use this option to accommodate known delays in data aggregation to avoid null values. |
|
||||
| **time_options** | options available in the time picker dropdown |
|
||||
| **refresh_intervals** | interval options available in the refresh picker dropdown |
|
||||
| **status** | |
|
||||
| **type** | |
|
||||
|
||||
@@ -26,43 +26,40 @@ Grafana automatically scales dashboards to any resolution, which makes them perf
|
||||
|
||||
You can access the Playlist feature from Grafana's side menu, in the Dashboards submenu.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
You must have at least Editor role permissions to create and manage playlists.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Access, share, and control a playlist
|
||||
|
||||
Use the information in this section to access playlists. Start and control the display of a playlist using one of the six available modes.
|
||||
Use the information in this section to access existing playlists. Start and control the display of a playlist using one of the five available modes.
|
||||
|
||||
### Access a playlist
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Playlists** to see a list of playlists.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
|
||||
### Start a playlist
|
||||
|
||||
You can start a playlist in six different view modes. View modes determine how the menus and navigation bar appear on the dashboards as well as how panels are sized.
|
||||
You can start a playlist in five different view modes. View modes determine how the menus and navigation bar appear on the dashboards.
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Playlists**.
|
||||
1. Find the desired playlist and click **Start playlist**.
|
||||
1. In the dialog box that opens, select one of the [six playlist modes](#playlist-modes) available.
|
||||
1. Disable any dashboard controls that you don't want displayed while the list plays; these controls are enabled and visible by default. Select from:
|
||||
|
||||
- **Time and refresh**
|
||||
- **Variables**
|
||||
- **Dashboard links**
|
||||
By default, each dashboard is displayed for the amount of time entered in the Interval field, which you set when you create or edit a playlist. After you start a playlist, you can control it with the navbar at the top of the page.
|
||||
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Find the playlist you want to start, then click **Start playlist**.
|
||||
1. In the modal that opens, select one of the five playlist modes available, based on the information in the table below.
|
||||
1. Click **Start \<playlist name\>**.
|
||||
|
||||
The playlist displays each dashboard for the time specified in the **Interval** field, set when creating or editing a playlist. After a playlist starts, you can [control](#control-a-playlist) it using the navbar at the top of your screen.
|
||||
The playlist displays each dashboard for the time specified in the **Interval** field, set when creating or editing a playlist. Once a playlist starts, you can [control](#control-a-playlist) it using the navbar at the top of your screen.
|
||||
|
||||
### Playlist modes
|
||||
|
||||
| Mode | Description |
|
||||
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Normal mode | <ul><li>The side menu remains visible.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul> |
|
||||
| Normal mode (with auto fit panels) | <ul><li>The side menu remains visible.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul> |
|
||||
| TV mode | <ul><li>The side menu is hidden or removed.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul><ul><li>Enabled automatically after one minute of user inactivity.</li></ul><ul><li>Enable it manually using the `d v` sequence shortcut, or by appending the parameter `?inactive` to the dashboard URL.</li></ul><ul><li>Disable it with any mouse movement or keyboard action.</li></ul> |
|
||||
| TV mode (with auto fit panels) | <ul><li>The side menu is hidden or removed.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul><ul> |
|
||||
| Kiosk mode | <ul><li>The side menu is hidden or removed.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul><ul><li>You can disable or enable it manually using the `d v` sequence shortcut after the playlist has started.</li></ul> |
|
||||
| Kiosk mode (with auto fit panels) | <ul><li>The side menu is hidden or removed.</li></ul><ul><li>The navbar and dashboard controls appear at the top of the screen.</li></ul><ul><li>You can disable or enable it manually using the `d v` sequence shortcut after the playlist has started.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul> |
|
||||
| Mode | Description |
|
||||
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Normal mode | <ul><li>The side menu remains visible.</li></ul><ul><li>The navbar, row, and panel controls appear at the top of the screen.</li></ul> |
|
||||
| TV mode | <ul><li>The side menu and dashboard submenu (including variable drop-downs and dashboard links) are hidden or removed.</li></ul><ul><li>The navbar, row, and panel controls appear at the top of the screen.</li></ul><ul><li>Enabled automatically after one minute of user inactivity.</li></ul><ul><li>Enable it manually using the `d v` sequence shortcut, or by appending the parameter `?inactive` to the dashboard URL.</li></ul><ul><li>Disable it with any mouse movement or keyboard action.</li></ul> |
|
||||
| TV mode (with auto fit panels) | <ul><li>The side menu and dashboard submenu (including variable drop-downs and dashboard links) are hidden or removed.</li></ul><ul><li>The navbar, row and panel controls appear at the top of the screen.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul><ul> |
|
||||
| Kiosk mode | <ul><li>The side menu, navbar, ro and panel controls are completely hidden/removed from view.</li></ul><ul><li>You can enable it manually using the `d v` sequence shortcut after the playlist has started.</li></ul><ul><li>You can disable it manually with the same shortcut.</li></ul> |
|
||||
| Kiosk mode (with auto fit panels) | <ul><li>The side menu, navbar, row, and panel controls are completely hidden/removed from view.</li></ul><ul><li>Dashboard panels automatically adjust to optimize space on screen.</li></ul> |
|
||||
|
||||
### Control a playlist
|
||||
|
||||
@@ -79,50 +76,79 @@ You can control a playlist in **Normal** or **TV** mode after it's started, usin
|
||||
|
||||
## Create a playlist
|
||||
|
||||
You can create a playlist to present dashboards in a sequence, with a set order and time interval between dashboards. Be sure that all the dashboards you want to appear in your playlist are added before you create the playlist.
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Playlists**.
|
||||
1. Click **New playlist**.
|
||||
1. In the **Name** field, enter a descriptive name.
|
||||
1. In the **Interval** field, enter the time interval each dashboard is displayed before moving on to the next dashboard.
|
||||
1. In the **Add dashboards** section, add dashboards to the playlist using the **Add by title** and **Add by tag** drop-down options.
|
||||
|
||||
Added dashboards are displayed in a list in the **Dashboards** section of the page, in the order you added them. This is also the play order of the dashboards.
|
||||
You can create a playlist to present dashboards in a sequence, with a set order and time interval between dashboards.
|
||||
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Click **New playlist**. The New playlist page opens.
|
||||
1. In the **Name** text box, enter a descriptive name.
|
||||
1. In the **Interval** text box, enter a time interval. Grafana displays a particular dashboard for the interval of time specified here before moving on to the next dashboard.
|
||||
1. In Dashboards, add existing dashboards to the playlist using **Add by title** and **Add by tag** drop-down options. The dashboards you add are listed in a sequential order.
|
||||
1. If needed:
|
||||
- Search for a dashboard by its name, a regular expression, or a tag.
|
||||
- Filter your results by starred status or tags.
|
||||
1. If needed, rearrange the order of the dashboard you have added using the up and down arrow icon.
|
||||
1. Optionally, remove a dashboard from the playlist by clicking the x icon beside dashboard.
|
||||
1. Click **Save**.
|
||||
|
||||
## Edit a playlist
|
||||
## Save a playlist
|
||||
|
||||
You can edit a playlist including adding, removing, and rearranging the order of dashboards.
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Playlists**.
|
||||
1. Find the playlist you want to update and click **Edit playlist**. Do one or more of the following:
|
||||
|
||||
- Edit - Update the name and time interval.
|
||||
- Add dashboards - Search for dashboards by title or tag to add them to the playlist.
|
||||
- Rearrange dashboards - Click and drag the dashboards into your desired order.
|
||||
- Remove dashboards - Click the **X** next to the name of the dashboard you want to remove from the playlist.
|
||||
You can save a playlist and add it to your **Playlists** page, where you can start it. Be sure that all the dashboards you want to appear in your playlist are added when creating or editing the playlist before saving it.
|
||||
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Click on the playlist.
|
||||
1. Edit the playlist.
|
||||
1. Ensure that your playlist has a **Name**, **Interval**, and at least one **Dashboard** added to it.
|
||||
1. Click **Save**.
|
||||
|
||||
## Edit or delete a playlist
|
||||
|
||||
You can edit a playlist by updating its name, interval time, and by adding, removing, and rearranging the order of dashboards. On the rare occasion when you no longer need a playlist, you can delete it.
|
||||
|
||||
### Edit a playlist
|
||||
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Find the playlist you want to update and click **Edit playlist**.
|
||||
1. Update the name and time interval, then add or remove dashboards from the playlist using instructions in [Create a playlist](#create-a-playlist).
|
||||
1. Click **Save** to save your changes.
|
||||
|
||||
### Delete a playlist
|
||||
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Find the playlist you want to remove.
|
||||
1. Click **Delete playlist**.
|
||||
|
||||
### Rearrange dashboard order
|
||||
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Find the playlist you want to update and click **Edit playlist**.
|
||||
1. Click and drag the dashboards into your desired order.
|
||||
1. Click **Save** to save your changes.
|
||||
|
||||
### Remove a dashboard
|
||||
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Find the playlist you want to update and click **Edit playlist**.
|
||||
1. Click **\[x\]** on the name of the dashboard you want to remove from the playlist.
|
||||
1. Click **Save** to save your changes.
|
||||
|
||||
## Share a playlist in a view mode
|
||||
|
||||
You can share a playlist by copying the link address on the view mode you prefer, and pasting the URL to your destination.
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Playlists**.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Click the share icon of the playlist you want to share.
|
||||
1. Select the view mode you prefer.
|
||||
1. Click **Copy** next to the **Link URL** to copy it to your clipboard.
|
||||
1. Click **Copy** next to the Link URL to copy it to your clipboard.
|
||||
|
||||
For example, the URL for the first playlist on the Grafana Play site in Kiosk mode will look like this:
|
||||
|
||||
[https://play.grafana.org/playlists/play/1?kiosk](https://play.grafana.org/playlists/play/1?kiosk).
|
||||
|
||||
1. Paste the URL to your destination.
|
||||
|
||||
## Delete a playlist
|
||||
|
||||
When you no longer need a playlist, follow these steps to delete it:
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Playlists**.
|
||||
1. Find the playlist you want to remove.
|
||||
1. Click **Delete playlist**.
|
||||
|
||||
@@ -39,6 +39,11 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/
|
||||
permission:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/
|
||||
role-based-access-control:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/
|
||||
@@ -109,7 +114,7 @@ For information about recent improvements to the reporting UI, refer to [Grafana
|
||||
|
||||
## Access control
|
||||
|
||||
When [RBAC](ref:rbac) is enabled, you need to have the relevant [Permissions][] to create and manage reports.
|
||||
When [RBAC](ref:rbac) is enabled, you need to have the relevant [Permissions](ref:permission) to create and manage reports.
|
||||
|
||||
## Create or update a report
|
||||
|
||||
@@ -129,6 +134,7 @@ Only organization administrators can create reports by default. You can customiz
|
||||
- If you selected the PDF format option:
|
||||
- Select an orientation for the report: **Portrait** or **Landscape**.
|
||||
- Select a layout for the generated report: **Simple** or **Grid**. The simple layout renders each panel as full-width across the PDF. The grid layout renders the PDF with the same panel arrangement and width as the source dashboard.
|
||||
- Select a zoom level for the report. Zoom in to enlarge text in your PDF, or zoom out to see more data (like table columns) per panel.
|
||||
- Click **Preview PDF** to view a rendered PDF with the options you selected.
|
||||
1. Schedule report.
|
||||
- Enter scheduling information. Options vary depending on the frequency selected.
|
||||
@@ -334,11 +340,11 @@ You can customize the branding options.
|
||||
|
||||
Report branding:
|
||||
|
||||
- **Company logo:** Company logo displayed in the report PDF. It can be configured by specifying a URL, or by uploading a file. Defaults to the Grafana logo.
|
||||
- **Company logo:** Company logo displayed in the report PDF. It can be configured by specifying a URL, or by uploading a file. The maximum file size is 16 MB. Defaults to the Grafana logo.
|
||||
|
||||
Email branding:
|
||||
|
||||
- **Company logo:** Company logo displayed in the report email. It can be configured by specifying a URL, or by uploading a file. Defaults to the Grafana logo.
|
||||
- **Company logo:** Company logo displayed in the report email. It can be configured by specifying a URL, or by uploading a file. The maximum file size is 16 MB. Defaults to the Grafana logo.
|
||||
- **Email footer:** Toggle to enable the report email footer. Select **Sent by** or **None**.
|
||||
- **Footer link text:** Text of the link in the report email footer. Defaults to `Grafana`.
|
||||
- **Footer link URL:** Link of the report email footer.
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
---
|
||||
aliases:
|
||||
- ../features/dashboard/dashboards/
|
||||
- dashboard-manage/
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
@@ -15,7 +12,7 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/share-dashboards-panels/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/share-dashboards-panels/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/share-dashboards-panels/
|
||||
custom-branding:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/setup-grafana/configure-grafana/configure-custom-branding/
|
||||
@@ -25,7 +22,7 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/assess-dashboard-usage/#dashboard-insights
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/assess-dashboard-usage/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/assess-dashboard-usage/#dashboard-insights
|
||||
caching:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/#query-and-resource-caching
|
||||
@@ -56,7 +53,7 @@ You can see a list of all your public dashboards in one place by navigating to *
|
||||
|
||||
## Make a dashboard public
|
||||
|
||||
1. Click **Share** in the top-right corner of the dashboard.
|
||||
1. Click the sharing icon in the dashboard header.
|
||||
1. Click the **Public dashboard** tab.
|
||||
1. Acknowledge the implications of making the dashboard public by selecting all the checkboxes.
|
||||
1. Click **Generate public URL** to make the dashboard public and make your link live.
|
||||
@@ -66,7 +63,7 @@ Once you've made the dashboard public, a **Public** tag is displayed in the head
|
||||
|
||||
## Pause access
|
||||
|
||||
1. Click **Share** in the top-right corner of the dashboard.
|
||||
1. Click the sharing icon in the dashboard header.
|
||||
1. Click the **Public dashboard** tab.
|
||||
1. Enable the **Pause sharing dashboard** toggle.
|
||||
|
||||
@@ -74,7 +71,7 @@ The dashboard is no longer accessible, even with the link, until you make it sha
|
||||
|
||||
## Revoke access
|
||||
|
||||
1. Click **Share** in the top-right corner of the dashboard.
|
||||
1. Click the sharing icon in the dashboard header.
|
||||
1. Click the **Public dashboard** tab.
|
||||
1. Click **Revoke public URL** to delete the public dashboard.
|
||||
|
||||
@@ -94,7 +91,7 @@ Email sharing allows you to share your public dashboard with only specific peopl
|
||||
|
||||
### Invite a viewer
|
||||
|
||||
1. Click **Share** in the top-right corner of the dashboard.
|
||||
1. Click the sharing icon in the dashboard header.
|
||||
1. Click the **Public dashboard** tab.
|
||||
1. Acknowledge the implications of making the dashboard public by selecting all the checkboxes.
|
||||
1. Click **Generate public URL** to make the dashboard public and make your link live.
|
||||
@@ -111,7 +108,7 @@ If the viewer doesn't have an invitation or it's been revoked, you won't be noti
|
||||
|
||||
### Revoke access for a viewer
|
||||
|
||||
1. Click **Share** in the top-right corner of the dashboard.
|
||||
1. Click the sharing icon in the dashboard header.
|
||||
1. Click the **Public dashboard** tab.
|
||||
1. Click **Revoke** on the viewer you'd like to revoke access for.
|
||||
|
||||
@@ -119,7 +116,7 @@ Immediately, the viewer no longer has access to the public dashboard, nor can th
|
||||
|
||||
### Reinvite a viewer
|
||||
|
||||
1. Click **Share** in the top-right corner of the dashboard.
|
||||
1. Click the sharing icon in the dashboard header.
|
||||
1. Click the **Public dashboard** tab.
|
||||
1. Click **Resend** on the viewer you'd like to re-share the public dashboard with.
|
||||
|
||||
@@ -149,7 +146,7 @@ If a Grafana user has read access to the parent dashboard, they can view the pub
|
||||
|
||||
You can check usage analytics about your public dashboard by clicking the insights icon in the dashboard header:
|
||||
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-insights-11.2.png" max-width="400px" class="docs-image--no-shadow" alt="Dashboard insights icon" >}}
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-insights.png" max-width="400px" class="docs-image--no-shadow" alt="Dashboard insights icon" >}}
|
||||
|
||||
Learn more about the kind of information provided in the [dashboard insights documentation](ref:dashboard-insights-documentation).
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
aliases:
|
||||
- ../features/dashboard/dashboards/
|
||||
- ../panels/working-with-panels/organize-dashboard/
|
||||
- ../reference/dashboard_folders/
|
||||
- dashboard-folders/
|
||||
|
||||
@@ -59,9 +59,9 @@ You must have an authorized viewer permission to see an image rendered by a dire
|
||||
|
||||
The same permission is also required to view embedded links unless you have anonymous access permission enabled for your Grafana instance.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
As of Grafana 8.0, anonymous access permission is not available in Grafana Cloud.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
When you share a panel or dashboard as a snapshot, a snapshot (which is a panel or dashboard at the moment you take the snapshot) is publicly available on the web. Anyone with a link to it can access it. Because snapshots do not require any authorization to view, Grafana removes information related to the account it came from, as well as any sensitive data from the snapshot.
|
||||
|
||||
@@ -69,13 +69,13 @@ When you share a panel or dashboard as a snapshot, a snapshot (which is a panel
|
||||
|
||||
You can share a dashboard as a direct link or as a snapshot. You can also export a dashboard.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
{{% admonition type="note" %}}
|
||||
If you change a dashboard, ensure that you save the changes before sharing.
|
||||
{{< /admonition >}}
|
||||
{{% /admonition %}}
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click the dashboard you want to share.
|
||||
1. Click **Share** in the top-right corner.
|
||||
1. Click the **Share** button at the top right of the screen.
|
||||
|
||||
The share dialog opens and shows the Link tab.
|
||||
|
||||
@@ -108,7 +108,7 @@ If you created a snapshot by mistake, click **Delete snapshot** in the dialog bo
|
||||
|
||||
To delete existing snapshots, follow these steps:
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. In the primary menu, click **Dashboards**.
|
||||
1. Click **Snapshots** to go to the snapshots management page.
|
||||
1. Click the red **x** next to the snapshot URL that you want to delete.
|
||||
|
||||
@@ -120,7 +120,7 @@ The dashboard export action creates a Grafana JSON file that contains everything
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Open the dashboard you want to export.
|
||||
1. Click **Share** in the top-right corner.
|
||||
1. Click the **Share** icon in the top navigation bar.
|
||||
1. Click **Export**.
|
||||
|
||||
If you're exporting the dashboard to use in another instance, with different data source UIDs, enable the **Export for sharing externally** switch.
|
||||
@@ -139,14 +139,12 @@ A template variable of the type `Constant` is automatically hidden in the dashbo
|
||||
|
||||
You can generate and save PDF files of any dashboard.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
|
||||
{{< /admonition >}}
|
||||
> **Note:** Available in [Grafana Enterprise](ref:grafana-enterprise) and [Grafana Cloud](/docs/grafana-cloud/).
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click the dashboard you want to share.
|
||||
1. Click **Share** in the top-right corner.
|
||||
1. On the **PDF** tab, select a layout option for the exported dashboard: **Portrait** or **Landscape**.
|
||||
1. Click the **Share** button at the top right of the screen.
|
||||
1. On the PDF tab, select a layout option for the exported dashboard: **Portrait** or **Landscape**.
|
||||
1. Click **Save as PDF** to render the dashboard as a PDF file.
|
||||
|
||||
Grafana opens the PDF file in a new window or browser tab.
|
||||
@@ -212,7 +210,7 @@ If you created a snapshot by mistake, click **Delete snapshot** in the dialog bo
|
||||
|
||||
To delete existing snapshots, follow these steps:
|
||||
|
||||
1. Click **Dashboards** in the main menu.
|
||||
1. In the primary menu, click **Dashboards**.
|
||||
1. Click **Snapshots** to go to the snapshots management page.
|
||||
1. Click the red **x** next to the snapshot URL that you want to delete.
|
||||
|
||||
@@ -222,9 +220,7 @@ The snapshot is immediately deleted. You may need to clear your browser cache or
|
||||
|
||||
You can embed a panel using an iframe on another web site. A viewer must be signed into Grafana to view the graph.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
As of Grafana 8.0, anonymous access permission is no longer available for Grafana Cloud.
|
||||
{{< /admonition >}}
|
||||
**> Note:** As of Grafana 8.0, anonymous access permission is no longer available for Grafana Cloud.
|
||||
|
||||
Here is an example of the HTML code:
|
||||
|
||||
@@ -247,4 +243,4 @@ To create a library panel from the **Share Panel** dialog:
|
||||
1. In **Library panel name**, enter the name.
|
||||
1. In **Save in folder**, select the folder in which to save the library panel. By default, the root level is selected.
|
||||
1. Click **Create library panel** to save your changes.
|
||||
1. Click **Save dashboard**.
|
||||
1. Save the dashboard.
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
aliases:
|
||||
- ../features/dashboard/dashboards/
|
||||
- ../reference/search/
|
||||
- dashboard-ui/
|
||||
- dashboard-ui/dashboard-header/
|
||||
@@ -26,7 +25,7 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/assess-dashboard-usage/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/assess-dashboard-usage/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/assess-dashboard-usage/
|
||||
generative-ai-features:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/manage-dashboards/#set-up-generative-ai-features-for-dashboards
|
||||
@@ -36,37 +35,12 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/modify-dashboard-settings/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/modify-dashboard-settings/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/modify-dashboard-settings/
|
||||
repeating-rows:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/create-dashboard/#configure-repeating-rows
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/create-dashboard/#configure-repeating-rows
|
||||
variables:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/
|
||||
dashboard-folders:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/manage-dashboards/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/manage-dashboards/
|
||||
sharing:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/share-dashboards-panels/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/share-dashboards-panels/
|
||||
dashboard-links:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/manage-dashboard-links/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/build-dashboards/manage-dashboard-links/
|
||||
panel-overview:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/panel-overview/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/panel-overview/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/build-dashboards/create-dashboard/#configure-repeating-rows
|
||||
---
|
||||
|
||||
# Use dashboards
|
||||
@@ -81,30 +55,32 @@ The dashboard user interface provides a number of features that you can use to c
|
||||
|
||||
The following image and descriptions highlight all dashboard features.
|
||||
|
||||

|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-annotated-9-5-0.png" width="700px" alt="An annotated image of a dashboard" >}}
|
||||
|
||||
1. **Grafana home** - Click **Home** in the breadcrumb to go to the home page configured in the Grafana instance.
|
||||
1. **Dashboard folder** - When you click the dashboard folder name, you can search for other dashboards contained in the folder and perform other [folder management tasks](ref:dashboard-folders).
|
||||
1. **Dashboard title** - You can create your own dashboard titles or have Grafana create them for you using [generative AI features](ref:generative-ai-features).
|
||||
1. **Mark as favorite** - Mark the dashboard as one of your favorites so it's included in your list of **Starred** dashboards in the main menu.
|
||||
1. **Dashboard insights** - Click to view analytics about your dashboard including information about users, activity, query counts. Learn more about [dashboard analytics](ref:dashboard-analytics).
|
||||
1. **Share dashboard** - Access several [dashboard sharing](ref:sharing) options.
|
||||
1. **Edit** - Click to leave view-only mode and enter edit mode, where you can make changes directly to the dashboard and access dashboard settings, as well as several panel editing functions.
|
||||
1. **Kiosk mode** - Click to display the dashboard on a large screen such as a TV or a kiosk. Kiosk mode hides elements such as navigation menus. Learn more about kiosk mode in our [How to Create Kiosks to Display Dashboards on a TV blog post](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/). Press `Enter` to leave kiosk mode.
|
||||
1. **Variables** - Use [variables](ref:variables) to create more interactive and dynamic dashboards.
|
||||
1. **Dashboard links** - Link to other dashboards, panels, and external websites. Learn more about [dashboard links](ref:dashboard-links).
|
||||
1. **Current dashboard time range and time picker** - Click to select [relative time range](#relative-time-range) options and set custom [absolute time ranges](#absolute-time-range).
|
||||
- You can change the **Timezone** and **Fiscal year** settings from the time range controls by clicking the **Change time settings** button.
|
||||
- Time settings are saved on a per-dashboard basis.
|
||||
1. **Time range zoom out** - Click to zoom out the time range. Learn more about how to use [common time range controls](#common-time-range-controls).
|
||||
1. **Refresh dashboard** - Click to immediately trigger queries and refresh dashboard data.
|
||||
1. **Auto refresh control** - Click to select a dashboard auto refresh time interval.
|
||||
1. **Dashboard row** - A dashboard row is a logical divider within a dashboard that groups panels together.
|
||||
- Rows can be collapsed or expanded allowing you to hide parts of the dashboard.
|
||||
- Panels inside a collapsed row do not issue queries.
|
||||
- Use [repeating rows](ref:repeating-rows) to dynamically create rows based on a template variable.
|
||||
1. **Dashboard panel** - The [panel](ref:panel-overview) is the primary building block of a dashboard.
|
||||
1. **Panel legend** - Change series colors as well as y-axis and series visibility directly from the legend.
|
||||
- (1) **Grafana home**: Click **Home** in the breadcrumb to be redirected to the home page configured in the Grafana instance.
|
||||
- (2) **Dashboard title**: When you click the dashboard title, you can search for dashboards contained in the current folder. You can create your own dashboard titles or have Grafana create them for you using [generative AI features](ref:generative-ai-features).
|
||||
- (3) **Share dashboard or panel**: Use this option to share the current dashboard or panel using a link or snapshot. You can also export the dashboard definition from the share modal.
|
||||
- (4) **Add**: Use this option to add a panel, dashboard row, or library panel to the current dashboard.
|
||||
- (5) **Save dashboard**: Click to save changes to your dashboard.
|
||||
- (6) **Dashboard insights**: Click to view analytics about your dashboard including information about users, activity, query counts. Learn more about [dashboard analytics](ref:dashboard-analytics).
|
||||
- (7) **Dashboard settings**: Use this option to change dashboard name, folder, and tags and manage variables and annotation queries. Learn more about [dashboard settings](ref:dashboard-settings).
|
||||
- (8) **Time picker dropdown**: Click to select relative time range options and set custom absolute time ranges.
|
||||
- You can change the **Timezone** and **fiscal year** settings from the time range controls by clicking the **Change time settings** button.
|
||||
- Time settings are saved on a per-dashboard basis.
|
||||
- (9) **Zoom out time range**: Click to zoom out the time range. Learn more about how to use [common time range controls](#common-time-range-controls).
|
||||
- (10) **Refresh dashboard**: Click to immediately trigger queries and refresh dashboard data.
|
||||
- (11) **Refresh dashboard time interval**: Click to select a dashboard auto refresh time interval.
|
||||
- (12) **View mode**: Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. Learn more about view mode in our [How to Create Kiosks to Display Dashboards on a TV blog post](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
|
||||
- (13) **Dashboard panel**: The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
|
||||
- Library panels can be shared among many dashboards.
|
||||
- To move a panel, drag the panel header to another location.
|
||||
- To resize a panel, click and drag the lower right corner of the panel.
|
||||
- Use [generative AI features](ref:generative-ai-features) to create panel titles and descriptions.
|
||||
- (14) **Graph legend**: Change series colors, y-axis and series visibility directly from the legend.
|
||||
- (15) **Dashboard row**: A dashboard row is a logical divider within a dashboard that groups panels together.
|
||||
- Rows can be collapsed or expanded allowing you to hide parts of the dashboard.
|
||||
- Panels inside a collapsed row do not issue queries.
|
||||
- Use [repeating rows](ref:repeating-rows) to dynamically create rows based on a template variable.
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
@@ -171,7 +147,7 @@ Grafana Alerting does not support the following syntaxes at this time:
|
||||
|
||||
The dashboard and panel time controls have a common UI.
|
||||
|
||||

|
||||
<img class="no-shadow" src="/static/img/docs/time-range-controls/common-time-controls-7-0.png" max-width="700px">
|
||||
|
||||
The following sections define common time range controls.
|
||||
|
||||
@@ -181,11 +157,11 @@ The current time range, also called the _time picker_, shows the time range curr
|
||||
|
||||
Hover your cursor over the field to see the exact time stamps in the range and their source (such as the local browser).
|
||||
|
||||

|
||||
<img class="no-shadow" src="/static/img/docs/time-range-controls/time-picker-7-0.png" max-width="300px">
|
||||
|
||||
Click the current time range to change it. You can change the current time using a _relative time range_, such as the last 15 minutes, or an _absolute time range_, such as `2020-05-14 00:00:00 to 2020-05-15 23:59:59`.
|
||||
|
||||

|
||||
<img class="no-shadow" src="/media/docs/grafana/dashboards/screenshot-change-current-time-range-10.3.png" max-width="900px">
|
||||
|
||||
#### Relative time range
|
||||
|
||||
|
||||
@@ -49,32 +49,32 @@ refs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/add-template-variables/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/add-template-variables/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/add-template-variables/
|
||||
inspect:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/inspect-variable/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/inspect-variable/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/inspect-variable/
|
||||
prometheus-query-variables:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/prometheus/template-variables/#use-**rate_interval
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/prometheus/template-variables/#use-**rate_interval
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/prometheus/template-variables/#use-**rate_interval
|
||||
raw-variable-format:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/variable-syntax/#raw
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/variable-syntax/#raw
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/variable-syntax/#raw
|
||||
data-source:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/
|
||||
raw-format:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/variable-syntax/#raw
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/dashboards/variables/variable-syntax/#raw
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/dashboards/variables/variable-syntax/#raw
|
||||
add-a-data-source:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/#add-a-data-source
|
||||
@@ -102,20 +102,18 @@ The following table lists the types of variables shipped with Grafana.
|
||||
|
||||
You must enter general options for any type of variable that you create.
|
||||
|
||||
1. Click **Edit** in the top-right corner of the dashboard.
|
||||
1. Click **Settings**.
|
||||
1. Go to the **Variables** tab.
|
||||
1. Click **Add variable**.
|
||||
1. Navigate to the dashboard you want to make a variable for and click the **Dashboard settings** (gear) icon at the top of the page.
|
||||
1. On the **Variables** tab, click **New variable**.
|
||||
1. Enter a **Name** for the variable.
|
||||
1. In the **Select variable type** drop-down, choose **Query**.
|
||||
1. In the **Type** list, select **Query**.
|
||||
1. (Optional) In **Label**, enter the display name of the variable dropdown.
|
||||
|
||||
If you don't enter a display name, then the dropdown label is the variable name.
|
||||
|
||||
1. Choose a **Show on dashboard** option:
|
||||
- **Label and value** - The variable drop-down displays the variable **Name** or **Label** value. This is the default.
|
||||
- **Value:** The variable drop-down only displays the selected variable value and a down arrow.
|
||||
- **Nothing:** No variable drop-down is displayed on the dashboard.
|
||||
1. Choose a **Hide** option:
|
||||
- **No selection (blank):** The variable dropdown displays the variable **Name** or **Label** value. This is the default.
|
||||
- **Label:** The variable dropdown only displays the selected variable value and a down arrow.
|
||||
- **Variable:** No variable dropdown is displayed on the dashboard.
|
||||
|
||||
## Add a query variable
|
||||
|
||||
@@ -125,9 +123,7 @@ Query variables are generally only supported for strings. If your query returns
|
||||
|
||||
Query expressions can contain references to other variables and in effect create linked variables. Grafana detects this and automatically refreshes a variable when one of its linked variables change.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Query expressions are different for each data source. For more information, refer to the documentation for your [data source](ref:data-source).
|
||||
{{< /admonition >}}
|
||||
> **Note:** Query expressions are different for each data source. For more information, refer to the documentation for your [data source](ref:data-source).
|
||||
|
||||
1. [Enter general options](#enter-general-options).
|
||||
1. In the **Data source** list, select the target data source for the query. For more information about data sources, refer to [Add a data source](ref:add-a-data-source).
|
||||
@@ -145,8 +141,7 @@ Query expressions are different for each data source. For more information, refe
|
||||
1. In the **Sort** list, select the sort order for values to be displayed in the dropdown list. The default option, **Disabled**, means that the order of options returned by your data source query will be used.
|
||||
1. (Optional) Enter [Selection Options](#configure-variable-selection-options).
|
||||
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Back to dashboard** and **Exit edit**.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
## Add a custom variable
|
||||
|
||||
@@ -158,8 +153,7 @@ For example, if you have server names or region names that never change, then yo
|
||||
1. In the **Values separated by comma** list, enter the values for this variable in a comma-separated list. You can include numbers, strings, or key/value pairs separated by a space and a colon. For example, `key1 : value1,key2 : value2`.
|
||||
1. (Optional) Enter [Selection Options](#configure-variable-selection-options).
|
||||
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Back to dashboard** and **Exit edit**.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
## Add a text box variable
|
||||
|
||||
@@ -170,8 +164,7 @@ For more information about cardinality, refer to [What are cardinality spikes an
|
||||
1. [Enter general options](#enter-general-options).
|
||||
1. (Optional) In the **Default value** field, select the default value for the variable. If you do not enter anything in this field, then Grafana displays an empty text box for users to type text into.
|
||||
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Back to dashboard** and **Exit edit**.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
## Add a constant variable
|
||||
|
||||
@@ -184,8 +177,7 @@ Constant variables are useful when you have complex values that you need to incl
|
||||
1. [Enter general options](#enter-general-options).
|
||||
1. In the **Value** field, enter the variable value. You can enter letters, numbers, and symbols. You can even use wildcards if you use [raw format](ref:raw-format).
|
||||
1. In **Preview of values**, Grafana displays the current variable value. Review it to ensure it matches what you expect.
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Back to dashboard** and **Exit edit**.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
## Add a data source variable
|
||||
|
||||
@@ -199,8 +191,7 @@ _Data source_ variables enable you to quickly change the data source for an enti
|
||||
1. (Optional) In **Instance name filter**, enter a regex filter for which data source instances to choose from in the variable value drop-down list. Leave this field empty to display all instances.
|
||||
1. (Optional) Enter [Selection Options](#configure-variable-selection-options).
|
||||
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Back to dashboard** and **Exit edit**.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
## Add an interval variable
|
||||
|
||||
@@ -214,8 +205,7 @@ You can use an interval variable as a parameter to group by time (for InfluxDB),
|
||||
- **Step count -** Select the number of times the current time range will be divided to calculate the value, similar to the **Max data points** query option. For example, if the current visible time range is 30 minutes, then the `auto` interval groups the data into 30 one-minute increments. The default value is 30 steps.
|
||||
- **Min Interval -** The minimum threshold below which the step count intervals will not divide the time. To continue the 30 minute example, if the minimum interval is set to 2m, then Grafana would group the data into 15 two-minute increments.
|
||||
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Back to dashboard** and **Exit edit**.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
### Interval variable examples
|
||||
|
||||
@@ -236,7 +226,7 @@ groupByNode(summarize(movingAverage(apps.$app.$server.counters.requests.count, 5
|
||||
_Ad hoc filters_ enable you to add key/value filters that are automatically added to all metric queries that use the specified data source. Unlike other variables, you do not use ad hoc filters in queries. Instead, you use ad hoc filters to write filters for existing queries.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Ad hoc filter variables only work with Prometheus, Loki, InfluxDB, and Elasticsearch data sources.
|
||||
Not all data sources support ad hoc filters. Examples of those that do include Prometheus, Loki, InfluxDB, and Elasticsearch.
|
||||
{{% /admonition %}}
|
||||
|
||||
1. [Enter general options](#enter-general-options).
|
||||
@@ -244,8 +234,7 @@ Ad hoc filter variables only work with Prometheus, Loki, InfluxDB, and Elasticse
|
||||
|
||||
You can also click **Open advanced data source picker** to see more options, including adding a data source (Admins only). For more information about data sources, refer to [Add a data source](ref:add-a-data-source).
|
||||
|
||||
1. Click **Save dashboard**.
|
||||
1. Click **Back to dashboard** and **Exit edit**.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
### Create ad hoc filters
|
||||
|
||||
@@ -406,8 +395,7 @@ Extremely complex linked templated dashboards are possible, 5 or 10 levels deep.
|
||||
|
||||
### Grafana Play dashboard examples
|
||||
|
||||
The following Grafana Play dashboards contain fairly simple chained variables, only two layers deep. To view the variables and their settings, click **Edit**
|
||||
and then **Settings**; then go to the **Variables** tab. Both examples are expanded in the following section.
|
||||
The following Grafana Play dashboards contain fairly simple chained variables, only two layers deep. To view the variables and their settings, click **Dashboard settings** (gear icon) and then click **Variables**. Both examples are expanded in the following section.
|
||||
|
||||
- [Graphite Templated Nested](https://play.grafana.org/d/000000056/graphite-templated-nested?orgId=1&var-app=country&var-server=All&var-interval=1h)
|
||||
- [InfluxDB Templated](https://play.grafana.org/d/e7bad3ef-db0c-4bbd-8245-b85c0b2ca2b9/influx-2-73a-hourly-electric-grid-monitor-for-us?orgId=1&refresh=1m)
|
||||
@@ -673,6 +661,4 @@ enp216s0f0np2 0000:d7:00_0_0000:d8:00_2
|
||||
enp216s0f0np3 0000:d7:00_0_0000:d8:00_3
|
||||
```
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Only `text` and `value` capture group names are supported.
|
||||
{{< /admonition >}}
|
||||
**Note:** Only `text` and `value` capture group names are supported.
|
||||
|
||||
@@ -28,22 +28,20 @@ weight: 200
|
||||
|
||||
# Manage and inspect variables
|
||||
|
||||
In the **Variables** tab, you can [add](ref:add) variables and [manage](#manage-variables) existing variables. You can also [inspect](#inspect-variables) variables to identify any dependencies between them. <!--whether a variable is being referenced (or used) in other variables or dashboard.-->
|
||||
The variables page lets you [add](ref:add) variables and [manage](#manage-variables) existing variables. It also allows you to [inspect](#inspect-variables) variables and identify whether a variable is being referenced (or used) in other variables or dashboard.
|
||||
|
||||
## Manage variables
|
||||
|
||||
You can take the following actions in the **Variables** tab:
|
||||
You can take the following actions on the variables page:
|
||||
|
||||
- **Move** - Move a variable up or down the list using drag and drop.
|
||||
- **Clone** - Clone a variable by clicking the clone icon in the set of icons on the right. This creates a copy of the variable with the name of the original variable prefixed with `copy_of_`.
|
||||
- **Delete** - Delete a variable by clicking the trash icon in the set of icons on the right.
|
||||
**Move:** You can move a variable up or down the list using drag and drop.
|
||||
|
||||
**Clone:** To clone a variable, click the clone icon from the set of icons on the right. This creates a copy of the variable with the name of the original variable prefixed with `copy_of_`.
|
||||
|
||||
**Delete:** To delete a variable, click the trash icon from the set of icons on the right.
|
||||
|
||||
## Inspect variables
|
||||
|
||||
In addition to [managing variables](#manage-variables), the **Variables** tab lets you easily identify whether variables have any dependencies. To check, click **Show dependencies** at the bottom of the list, which opens the dependencies diagram:
|
||||
|
||||
<!-- Update and comment this back in when the reference functionality is working again
|
||||
|
||||
The variables page lets you easily identify whether a variable is being referenced (or used) in other variables or dashboard. In addition, you can also [add](ref:add) and [manage variables](#manage-variables) on this page.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
@@ -56,10 +54,6 @@ Any variable that is referenced or used has a green check mark next to it, while
|
||||
|
||||

|
||||
|
||||
In addition, all referenced variables have a dependency icon next to the green check mark. You can click on the icon to view the dependency map. The dependency map can be moved. You can zoom in out with mouse wheel or track pad equivalent.-->
|
||||
In addition, all referenced variables have a dependency icon next to the green check mark. You can click on the icon to view the dependency map. The dependency map can be moved. You can zoom in out with mouse wheel or track pad equivalent.
|
||||
|
||||

|
||||
|
||||
{{% admonition type="note" %}}
|
||||
This feature is available in Grafana 7.4 and later versions.
|
||||
{{% /admonition %}}
|
||||
|
||||
@@ -19,18 +19,16 @@ refs:
|
||||
query-transform-data:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/query-transform-data/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/query-transform-data/
|
||||
panel-inspector:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/panel-inspector/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/panels-visualizations/panel-inspector/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/panel-inspector/
|
||||
logs:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/logs/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: grafana-cloud/visualizations/panels-visualizations/visualizations/logs/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/panels-visualizations/visualizations/logs/
|
||||
---
|
||||
|
||||
# InfluxDB query editor
|
||||
|
||||
@@ -171,6 +171,8 @@ The following options are the same for both **Builder** and **Code** mode:
|
||||
|
||||
- **Line limit** -Defines the upper limit for the number of log lines returned by a query. The default is `1000`
|
||||
|
||||
- **Direction** - Determines the search order. **Backward** is a backward search starting at the end of the time range. **Forward** is a forward search starting at the beginning of the time range. The default is **Backward**
|
||||
|
||||
- **Step** Sets the step parameter of Loki metrics queries. The default value equals to the value of `$__interval` variable, which is calculated using the time range and the width of the graph (the number of pixels).
|
||||
|
||||
- **Resolution** Deprecated. Sets the step parameter of Loki metrics range queries. With a resolution of `1/1`, each pixel corresponds to one data point. `1/2` retrieves one data point for every other pixel, `1/10` retrieves one data point per 10 pixels, and so on. Lower resolutions perform better.
|
||||
|
||||
@@ -247,6 +247,10 @@ The resulting table panel:
|
||||
|
||||
## Use time series queries
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Store timestamps in UTC to avoid issues with time shifts in Grafana when using non-UTC timezones.
|
||||
{{< /admonition >}}
|
||||
|
||||
If you set the **Format** setting in the query editor to **Time series**, then the query must have a column named `time` that returns either a SQL datetime or any numeric datatype representing Unix epoch in seconds.
|
||||
Result sets of time series queries must also be sorted by time for panels to properly visualize the result.
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ For instructions on how to add a data source to Grafana, refer to the [administr
|
||||
Only users with the organization administrator role can add data sources.
|
||||
Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system.
|
||||
|
||||
{{< docs/play title="MySQL: Cities of the World Sample Data Set" url="https://play.grafana.org/d/8JOvPQr7k/" >}}
|
||||
{{< docs/play title="MySQL Overview" url="https://play.grafana.org/d/edyh1ib7db6rkb/mysql-overview" >}}
|
||||
|
||||
## Configure the data source
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ For instructions on how to add a data source to Grafana, refer to the [administr
|
||||
Only users with the organization administrator role can add data sources.
|
||||
Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system.
|
||||
|
||||
{{< docs/play title="PostgreSQL Overview" url="https://play.grafana.org/d/ddvpgdhiwjvuod/postgresql-overview" >}}
|
||||
|
||||
## PostgreSQL settings
|
||||
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
@@ -155,7 +155,7 @@ We also bundle a dashboard within Grafana so you can start viewing your metrics
|
||||
1. Navigate to the data source's [configuration page](ref:configure-prometheus-data-source).
|
||||
1. Select the **Dashboards** tab.
|
||||
|
||||
This displays dashboards for Grafana and Prometheus.
|
||||
This displays dashboards for Grafana and Prometheus.
|
||||
|
||||
1. Select **Import** for the dashboard to import.
|
||||
|
||||
|
||||
@@ -63,15 +63,19 @@ The first option to configure is the name of your connection:
|
||||
|
||||
- **Default** - Toggle to select as the default name in dashboard panels. When you go to a dashboard panel this will be the default selected data source.
|
||||
|
||||
### HTTP section
|
||||
### Connection section
|
||||
|
||||
- **URL** - The URL of your Prometheus server. If your Prometheus server is local, use `<http://localhost:9090>`. If it is on a server within a network, this is the URL with port where you are running Prometheus. Example: `<http://prometheus.example.orgname:9090>`.
|
||||
- **Prometheus server URL** - The URL of your Prometheus server. If your Prometheus server is local, use `http://localhost:9090`. If it is on a server within a network, this is the URL with port where you are running Prometheus. Example: `http://prometheus.example.orgname:9090`.
|
||||
|
||||
- **Allowed cookies** - Specify cookies by name that should be forwarded to the data source. The Grafana proxy deletes all forwarded cookies by default.
|
||||
{{< admonition type="note" >}}
|
||||
|
||||
- **Timeout** - The HTTP request timeout. This must be in seconds. There is no default, so this setting is up to you.
|
||||
If you're running Grafana and Prometheus together in different container environments, each localhost refers to its own container - if the server URL is localhost:9090, that means port 9090 inside the Grafana container, not port 9090 on the host machine.
|
||||
|
||||
### Auth section
|
||||
You should use the IP address of the Prometheus container, or the hostname if you are using Docker Compose. Alternatively, you can consider `http://host.docker.internal:9090`.
|
||||
|
||||
{{< /admonition >}}
|
||||
|
||||
### Authentication section
|
||||
|
||||
There are several authentication methods you can choose in the Authentication section.
|
||||
|
||||
@@ -99,10 +103,16 @@ Use TLS (Transport Layer Security) for an additional layer of security when work
|
||||
|
||||
- **Value** - The value of the header.
|
||||
|
||||
## Additional settings
|
||||
## Advanced settings
|
||||
|
||||
Following are additional configuration options.
|
||||
|
||||
### Advanced HTTP settings
|
||||
|
||||
- **Allowed cookies** - Specify cookies by name that should be forwarded to the data source. The Grafana proxy deletes all forwarded cookies by default.
|
||||
|
||||
- **Timeout** - The HTTP request timeout. This must be in seconds. The default is 30 seconds.
|
||||
|
||||
### Alerting
|
||||
|
||||
- **Manage alerts via Alerting UI** - Toggle to enable `Alertmanager` integration for this data source.
|
||||
@@ -121,12 +131,14 @@ Following are additional configuration options.
|
||||
|
||||
### Performance
|
||||
|
||||
- **Prometheus type** - The type of your Prometheus server. There are four options: `Prometheus`, `Cortex`, `Thanos`, `Mimir`.
|
||||
- **Prometheus type** - The type of your Prometheus server. There are four options: `Prometheus`, `Cortex`, `Mimir`, and `Thanos`.
|
||||
|
||||
- **Version** Select the version you are using. Once the Prometheus type has been selected, a list of versions auto-populates using the Prometheus [buildinfo](https://semver.org/) API. The `Cortex` Prometheus type does not support this API so you will need to manually add the version.
|
||||
- **Cache level** - The browser caching level for editor queries. There are four options: `Low`, `Medium`, `High`, or `None`.
|
||||
|
||||
- **Incremental querying (beta)** - Changes the default behavior of relative queries to always request fresh data from the Prometheus instance. Enable this option to decrease database and network load.
|
||||
|
||||
- **Disable recording rules (beta)** - Toggle on to disable the recording rules. Enable this option to improve dashboard performance.
|
||||
|
||||
### Other
|
||||
|
||||
- **Custom query parameters** - Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&'.
|
||||
|
||||
@@ -16,8 +16,8 @@ labels:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Grafana Pyroscope
|
||||
weight: 1150
|
||||
title: Pyroscope
|
||||
weight: 1350
|
||||
refs:
|
||||
flame-graph:
|
||||
- pattern: /docs/grafana/
|
||||
@@ -51,7 +51,7 @@ To use profiling data, you should:
|
||||
|
||||
- [Configure your application to send profiles](/docs/pyroscope/<PYROSCOPE_VERSION>/configure-client/)
|
||||
- [Configure the Grafana Pyroscope data source](./configure-pyroscope-data-source/).
|
||||
- [View and query profiling data in Explore](./query-profile-data/)
|
||||
- [View and query profiling data using Explore Profiles or the query editor ](./query-profile-data/)
|
||||
|
||||
## Integrate profiles into dashboards
|
||||
|
||||
|
||||
@@ -33,98 +33,93 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/tempo/configure-tempo-data-source/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/configure-tempo-data-source/
|
||||
provisioning-data-sources:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
|
||||
- pattern: /docs/grafana-cloud/provision
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
|
||||
---
|
||||
|
||||
# Configure the Grafana Pyroscope data source
|
||||
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
The Pyroscope data source sets how Grafana connects to your Pyroscope database.
|
||||
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Enter `Grafana Pyroscope` in the search bar.
|
||||
1. Select **Add new data source**.
|
||||
1. Click **Grafana Pyroscope** to display the **Settings** tab of the data source.
|
||||
1. Set the data source's basic configuration options.
|
||||
1. Select **Save & test**.
|
||||
|
||||
## Configuration options
|
||||
|
||||
You can configure several options for the Pyroscope data source, including the name, HTTP, authentication, querying, and private data source connect.
|
||||
You can configure the data source using either the data source interface in Grafana or using a configuration file.
|
||||
This page explains how to set up and enable the data source capabilities using Grafana.
|
||||
|
||||
If you make any changes, select **Save & test** to preserve those changes.
|
||||
|
||||

|
||||
If you're using your own installation of Grafana, you can provision the Pyroscope data source using a YAML configuration file.
|
||||
For more information about provisioning and available configuration options, refer to [Provisioning Grafana](ref:provisioning-data-sources).
|
||||
|
||||
### Name and default
|
||||
## Before you begin
|
||||
|
||||
**Name**
|
||||
: Enter a name to specify the data source in panels, queries, and Explore.
|
||||
To configure a Pyroscope data source, you need administrator rights to your Grafana instance and a Pyroscope instance configured to send data to Grafana.
|
||||
|
||||
**Default**
|
||||
: The default data source is pre-selected for new panels.
|
||||
If you're provisioning a Pyroscope data source, then you also need administrative rights on the server hosting your Grafana instance.
|
||||
|
||||
### HTTP
|
||||
## Add or modify a data source
|
||||
|
||||
The HTTP section is shown in number 1 in the screenshot.
|
||||
You can use these procedures to configure a new Pyroscope data source or to edit an existing one.
|
||||
|
||||
**URL**
|
||||
: The URL of the Grafana Pyroscope instance, for example, `https://localhost:4100`.
|
||||
### Create a new data source
|
||||
|
||||
**Allowed cookies**
|
||||
: The Grafana Proxy deletes forwarded cookies. Use this field to specify cookies by name that should be forwarded to the data source.
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
**Timeout**
|
||||
: HTTP request timeout in seconds.
|
||||
1. Select **Connections** in the main menu.
|
||||
1. Enter `Grafana Pyroscope` in the search bar.
|
||||
1. Select **Grafana Pyroscope**.
|
||||
1. Select **Add new data source** in the top-right corner of the page.
|
||||
1. On the **Settings** tab, complete the **Name**, **Connection**, and **Authentication** sections.
|
||||
|
||||
### Auth
|
||||
- Use the **Name** field to specify the name used for the data source in panels, queries, and Explore. Toggle the **Default** switch for the data source to be pre-selected for new panels.
|
||||
- Under **Connection**, enter the **URL** of the Pyroscope instance. For example, `https://example.com:4100`.
|
||||
- Complete the [**Authentication** section](#authentication).
|
||||
|
||||
The Auth section is shown in number 2 in the screenshot.
|
||||
1. Optional: Use **Additional settings** to configure other options.
|
||||
1. Select **Save & test**.
|
||||
|
||||
**Basic auth**
|
||||
: Enable basic authentication to the data source. When activated, it provides **User** and **Password** fields.
|
||||
### Update an existing data source
|
||||
|
||||
**With Credentials**
|
||||
: Whether credentials, such as cookies or auth headers, should be sent with cross-site requests.
|
||||
To modify an existing Pyroscope data source:
|
||||
|
||||
**TLS Client Auth**
|
||||
: Toggle on to use client authentication. When enabled, it adds the **Server name**, **Client cert**, and **Client key** fields. The client provides a certificate that is validated by the server to establish the client's trusted identity. The client key encrypts the data between client and server. These details are encrypted and stored in the Grafana database.
|
||||
1. Select **Connections** in the main menu.
|
||||
1. Select **Data sources** to view a list of configured data sources.
|
||||
1. Select the Pyroscope data source you wish to modify.
|
||||
1. Optional: Use **Additional settings** to configure or modify other options.
|
||||
1. After completing your updates, select **Save & test**.
|
||||
|
||||
**With CA Cert**
|
||||
: Activate this option to verify self-signed TLS certificates.
|
||||
## Authentication
|
||||
|
||||
**Skip TLS Verify**
|
||||
: When activated, it bypasses TLS certificate verification.
|
||||
Use this section to select an authentication method to access the data source.
|
||||
|
||||
**Forward OAuth Identity**
|
||||
: When activated, the user’s upstream OAuth 2.0 identity is forwarded to the data source along with their access token.
|
||||
{{< admonition type="note" >}}
|
||||
Use Transport Layer Security (TLS) for an additional layer of security when working with Pyroscope.
|
||||
For additional information on setting up TLS encryption with Pyroscope, refer to [Pyroscope configuration](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/configure-server/reference-configuration-parameters/).
|
||||
{{< /admonition >}}
|
||||
|
||||
**Custom HTTP Headers**
|
||||
: Select Add header to add Header and Value fields.
|
||||
[//]: # 'Shared content for authentication section procedure in data sources'
|
||||
|
||||
**Header**
|
||||
: Add a custom header. This allows custom headers to be passed based on the needs of your Pyroscope instance.
|
||||
{{< docs/shared source="grafana" lookup="datasources/datasouce-authentication.md" leveloffset="+2" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
**Value**
|
||||
: The value of the header.
|
||||
## Additional settings
|
||||
|
||||
Use the down arrow to expand the **Additional settings** section to view these options.
|
||||
|
||||
### Advanced HTTP settings
|
||||
|
||||
The Grafana Proxy deletes forwarded cookies. Use the **Allowed cookies** field to specify cookies that should be forwarded to the data source by name.
|
||||
|
||||
The **Timeout** field sets the HTTP request timeout in seconds.
|
||||
|
||||
### Querying
|
||||
|
||||
The **Querying** section is shown in number 3 in the screenshot.
|
||||
|
||||
**Minimum step** is used for queries returning time-series data. The default value is 15 seconds.
|
||||
|
||||
Adjusting this option can help prevent gaps when you zoom in to profiling data.
|
||||
|
||||
### Private data source connect
|
||||
|
||||
The **Private data source connect** section is shown in number 4 in the screenshot.
|
||||
[//]: # 'Shared content for authentication section procedure in data sources'
|
||||
|
||||
This feature is only available in Grafana Cloud.
|
||||
|
||||
This option lets you query data that lives within a secured network without opening the network to inbound traffic from Grafana Cloud.
|
||||
|
||||
Use the drop-down box to select a configured private data sources.
|
||||
|
||||
Select **Manage private data source connect** to configure and manage any private data sources you have configured.
|
||||
|
||||
For more information, refer to [Private data source connect](https://grafana.com/docs/grafana-cloud/connect-externally-hosted/private-data-source-connect/).
|
||||
{{< docs/shared source="grafana" lookup="datasources/datasouce-private-ds-connect.md" leveloffset="+2" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
description: Use the query editor to explore your Pyroscope data.
|
||||
description: Explore your profiling data using Explore Profiles or the Pyroscope query editor.
|
||||
keywords:
|
||||
- query
|
||||
- profiling
|
||||
@@ -28,6 +28,16 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
explore-profiles:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/simplified-exploration/profiles/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/simplified-exploration/profiles/
|
||||
explore-profile-install:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/simplified-exploration/profiles/access/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/simplified-exploration/profiles/access/
|
||||
provisioning-data-sources:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#datasources
|
||||
@@ -37,8 +47,64 @@ refs:
|
||||
|
||||
# Query profile data
|
||||
|
||||
You can query your profile data using the built-in data source query editor or you can use the open source Grafana Explore Profiles app.
|
||||
|
||||
## Explore Profiles
|
||||
|
||||
[Explore Profiles](ref:explore-profiles) is a native Grafana application designed to integrate seamlessly with Pyroscope, the open source continuous profiling platform, providing a smooth, queryless experience for browsing and analyzing profiling data.
|
||||
|
||||
You can use Explore Profiles in Grafana Cloud or in your own Grafana instance.
|
||||
For more information, refer to [Access or install Explore Profiles](ref:explore-profiles-install).
|
||||
|
||||
### Use cases
|
||||
|
||||
There are several different modes for viewing, analyzing, and comparing profiling data.
|
||||
|
||||
The main use cases are the following:
|
||||
|
||||
- Proactive: Cutting costs, addressing latency issues, or optimizing memory usage for applications
|
||||
- Reactive: Resolving incidents with line-level accuracy or debugging active latency/memory issues
|
||||
|
||||
Explore Profiles provides an intuitive interface to specifically support these use cases.
|
||||
You get a holistic view of all of your services and how they're functioning, but also the ability to drill down for more targeted root cause analysis.
|
||||
|
||||
Explore Profiles offers a convenient platform to analyze profiles and get insights that are impossible to get from using other traditional signals like logs, metrics, or tracing.
|
||||
|
||||
{{< youtube id="x9aPw_CbIQc" >}}
|
||||
|
||||
{{< docs/play title="the Grafana Play site" url="https://play.grafana.org/a/grafana-pyroscope-app/profiles-explorer" >}}
|
||||
|
||||
### Continuous profiling
|
||||
|
||||
While code profiling has been a long-standing practice, continuous profiling represents a modern and more advanced approach to performance monitoring.
|
||||
|
||||
This technique adds two critical dimensions to traditional profiles:
|
||||
|
||||
Time
|
||||
: Profiling data is collected _continuously_, providing a time-centric view that allows querying performance data from any point in the past.
|
||||
|
||||
Metadata
|
||||
: Profiles are enriched with metadata, adding contextual depth to the performance data.
|
||||
|
||||
These dimensions, coupled with the detailed nature of performance profiles, make continuous profiling a uniquely valuable tool.
|
||||
|
||||
### Flame graphs
|
||||
|
||||
<!-- vale Grafana.We = NO -->
|
||||
|
||||
Flame graphs help you visualize resource allocation and performance bottlenecks, and you even get suggested recommendations and performance fixes via AI-driven flame graph analysis, as well as line-level insights from our GitHub integration.
|
||||
|
||||
<!-- vale Grafana.We = YES -->
|
||||
|
||||
On views with a flame graph, you can use **Explain flame graph** to provide an AI flame graph analysis that explains the performance bottleneck, root cause, and recommended fix.
|
||||
For more information, refer to [Flame graph AI](https://grafana.com/docs/grafana-cloud/monitor-applications/profiles/flamegraph-ai/).
|
||||
|
||||
## Pyroscope query editor
|
||||
|
||||
The Pyroscope data source query editor gives you access to a profile type selector, a label selector, and collapsible options.
|
||||
|
||||
Like Explore Profiles, the query editor also provides a flame graph to visualize data.
|
||||
|
||||

|
||||
|
||||
To access the query editor:
|
||||
@@ -52,9 +118,9 @@ To access the query editor:
|
||||
{{< figure src="/media/docs/pyroscope/query-editor/select-profile.png" class="docs-image--no-shadow" max-width="450px" caption="Profile selector" >}}
|
||||
|
||||
1. Use the labels selector input to filter by labels. Pyroscope uses similar syntax to Prometheus to filter labels.
|
||||
Refer to [Pyroscope documentation](https://grafana.com/docs/pyroscope/latest/) for available operators and syntax.
|
||||
Refer to [Pyroscope documentation](https://grafana.com/docs/pyroscope/<PYROSCOPE_VERSION>/) for available operators and syntax.
|
||||
|
||||
While the label selector can be left empty to query all profiles without filtering by labels, the profile type or app must be selected for the query to be valid.
|
||||
While the label selector can be left empty to query all profiles without filtering by labels, you must select a profile type or app for the query to be valid.
|
||||
|
||||
Grafana doesn't show any data if the profile type or app isn’t selected when a query runs.
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ refs:
|
||||
provisioning-data-sources:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
|
||||
- pattern: /docs/grafana-cloud/
|
||||
- pattern: /docs/grafana-cloud/provision
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/provisioning/#data-sources
|
||||
explore:
|
||||
- pattern: /docs/grafana/
|
||||
@@ -56,66 +56,108 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
---
|
||||
|
||||
# Configure the Tempo data source
|
||||
# Configure a Tempo data source
|
||||
|
||||
The Tempo data source sets how Grafana connects to your Tempo database and lets you configure features and integrations with other telemetry signals.
|
||||
|
||||
To configure basic settings for the Tempo data source, complete the following steps:
|
||||
You can configure the data source using either the data source interface in Grafana or using a configuration file.
|
||||
This page explains how to set up and enable the data source capabilities using Grafana.
|
||||
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Enter `Tempo` in the search bar.
|
||||
1. Select **Tempo**.
|
||||
If you're using your own installation of Grafana, you can provision the Tempo data source using a YAML configuration file.
|
||||
|
||||
1. On the **Settings** tab, set the data source's basic configuration options:
|
||||
Depending upon your tracing environment, you may have more than one Tempo instance.
|
||||
Grafana supports multiple Tempo data sources.
|
||||
|
||||
| Name | Description |
|
||||
| -------------- | ------------------------------------------------------------------------ |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Sets the data source that's pre-selected for new panels. |
|
||||
| **URL** | Sets the URL of the Tempo instance, such as `http://tempo`. |
|
||||
| **Basic Auth** | Enables authentication to the Tempo data source. |
|
||||
| **User** | Sets the user name for basic authentication. |
|
||||
| **Password** | Sets the password for basic authentication. |
|
||||
## Before you begin
|
||||
|
||||
You can also configure settings specific to the Tempo data source.
|
||||
To configure a Tempo data source, you need administrator rights to your Grafana instance and a Tempo instance configured to send tracing data to Grafana.
|
||||
|
||||
This video explains how to add data sources, including Loki, Tempo, and Mimir, to Grafana and Grafana Cloud. Tempo data source set up starts at 4:58 in the video.
|
||||
If you're provisioning a Tempo data source, then you also need administrative rights on the server hosting your Grafana instance.
|
||||
Refer to [Provision the data source](#provision-the-data-source) for next steps.
|
||||
|
||||
{{< youtube id="cqHO0oYW6Ic" start="298" >}}
|
||||

|
||||
|
||||
## Add or modify a data source
|
||||
|
||||
You can use these procedures to configure a new Tempo data source or to edit an existing one.
|
||||
|
||||
### Add a new data source
|
||||
|
||||
Follow these steps to set up a new Tempo data source:
|
||||
|
||||
1. Select **Connections** in the main menu.
|
||||
1. Enter `Tempo` in the search bar.
|
||||
1. Select **Tempo**.
|
||||
1. Select **Add new data source** in the top-right corner of the page.
|
||||
1. On the **Settings** tab, complete the **Name**, **Connection**, and **Authentication** sections.
|
||||
|
||||
- Use the **Name** field to specify the name used for the data source in panels, queries, and Explore. Toggle the **Default** switch for the data source to be pre-selected for new panels.
|
||||
- Under **Connection**, enter the **URL** of the Tempo instance, for example, `https://example.com:4100`.
|
||||
- Complete the [**Authentication** section](#authentication).
|
||||
|
||||
1. Optional: Configure other sections to add capabilities to your tracing data. Refer to the additional procedures for instructions.
|
||||
1. Select **Save & test**.
|
||||
|
||||
### Update an existing data source
|
||||
|
||||
To modify an existing Tempo data source:
|
||||
|
||||
1. Select **Connections** in the main menu.
|
||||
1. Select **Data sources** to view a list of configured data sources.
|
||||
1. Select the Tempo data source you wish to modify.
|
||||
1. Configure or update additional sections to add capabilities to your tracing data. Refer to the additional procedures for instructions.
|
||||
1. After completing your updates, select **Save & test**.
|
||||
|
||||
## Authentication
|
||||
|
||||
Use this section to select an authentication method to access the data source.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
Use Transport Layer Security (TLS) for an additional layer of security when working with Tempo.
|
||||
For additional information on setting up TLS encryption with Tempo, refer to [Configure TLS communication](https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/network/tls/) and [Tempo configuration](https://grafana.com/docs/tempo/<TEMPO_VERSION>/configuration/).
|
||||
{{< /admonition >}}
|
||||
|
||||
[//]: # 'Shared content for authentication section procedure in data sources'
|
||||
|
||||
{{< docs/shared source="grafana" lookup="datasources/datasouce-authentication.md" leveloffset="+2" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
## Streaming
|
||||
|
||||
<!-- The traceQLStreaming toggle will be deprecated in Grafana 11.2 and removed in 11.3. -->
|
||||
|
||||
Streaming enables TraceQL query results to be displayed as they become available. Without streaming, no results are displayed until all results have returned.
|
||||
Streaming enables TraceQL query results to be displayed as they become available.
|
||||
Without streaming, no results are displayed until all results have returned.
|
||||
|
||||
{{< docs/public-preview product="TraceQL streaming results" >}}
|
||||
|
||||
### Requirements
|
||||
|
||||
To use streaming, you need to:
|
||||
|
||||
- Be running Tempo version 2.2 or newer, or Grafana Enterprise Traces (GET) version 2.2 or newer, or be using Grafana Cloud Traces.
|
||||
- Run Tempo version 2.2 or newer, or Grafana Enterprise Traces (GET) version 2.2 or newer, or use Grafana Cloud Traces.
|
||||
- For self-managed Tempo or GET instances: If your Tempo or GET instance is behind a load balancer or proxy that doesn't supporting gRPC or HTTP2, streaming may not work and should be disabled.
|
||||
|
||||
### Activate streaming
|
||||
|
||||
For streaming to work for a particular Tempo data source, set your Grafana's `traceQLStreaming` [feature toggle](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/feature-toggles/) to true and set **Streaming** to enabled in your Tempo data source configuration.
|
||||
You can activate streaming by either setting the `traceQLStreaming` [feature toggle](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/feature-toggles/) to true or by activating the **Streaming** toggle in the Tempo data source.
|
||||
|
||||

|
||||
|
||||
If you are using Grafana Cloud, the `traceQLStreaming` feature toggle is already set to `true` by default.
|
||||
|
||||
If the Tempo data source is set to allow streaming but the `traceQLStreaming` feature toggle is set to `false` in Grafana, no streaming will occur.
|
||||
If the Tempo data source is set to allow streaming but the `traceQLStreaming` feature toggle is set to `false` in Grafana, streaming occurs.
|
||||
|
||||
If the data source has streaming disabled and `traceQLStreaming` is set to `true`, no streaming will happen for that data source.
|
||||
If the data source has streaming disabled and `traceQLStreaming` is set to `true`, streaming happens for that data source.
|
||||
|
||||
When streaming is active, it's shows as **Enabled** in **Explore**.
|
||||
To check the status, select Explore in the menu, select your Tempo data source, and expand the **Options** section.
|
||||
|
||||

|
||||
|
||||
## Trace to logs
|
||||
|
||||
The **Trace to logs** setting configures [trace to logs](ref:explore-trace-integration) that's available when you integrate Grafana with Tempo.
|
||||
Trace to logs can also be used with other tracing data sources, such as Jaeger and Zipkin.
|
||||
|
||||

|
||||

|
||||
|
||||
There are two ways to configure the trace to logs feature:
|
||||
|
||||
@@ -171,7 +213,9 @@ There are two ways to configure the trace to metrics feature:
|
||||
- Use a basic configuration with a default query, or
|
||||
- Configure one or more custom queries where you can use a [template language](ref:variable-syntax) to interpolate variables from the trace or span.
|
||||
|
||||
Refer to the Trace to metrics configuration options section to learn about the available options.
|
||||
Refer to the [Trace to metrics configuration options](#trace-tometrics-configuration-options) section to learn about the available options.
|
||||
|
||||

|
||||
|
||||
### Set up a simple configuration
|
||||
|
||||
@@ -233,7 +277,7 @@ To use custom queries with the configuration, follow these steps:
|
||||
|
||||
[//]: # 'Shared content for Trace to profiles in the Tempo data source'
|
||||
|
||||
{{< docs/shared source="grafana" lookup="datasources/tempo-traces-to-profiles.md" leveloffset="+1" version="<GRAFANA_VERSION>" >}}
|
||||
{{< docs/shared source="grafana" lookup="datasources/tempo-traces-to-profiles.md" leveloffset="+2" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
## Custom query variables
|
||||
|
||||
@@ -252,27 +296,37 @@ For example, `${__span.name}`.
|
||||
| **\_\_trace.duration** | The duration of the trace. |
|
||||
| **\_\_trace.name** | The name of the trace. |
|
||||
|
||||
## Service Graph
|
||||
## Additional settings
|
||||
|
||||
The **Service Graph** setting configures the [Service Graph](/docs/tempo/latest/metrics-generator/service_graphs/enable-service-graphs/) feature.
|
||||
Use the down arrow to expand the **Additional settings** section to view these options.
|
||||
|
||||
### Advanced HTTP settings
|
||||
|
||||
The Grafana Proxy deletes forwarded cookies. Use the **Allowed cookies** field to specify cookies by name that should be forwarded to the data source.
|
||||
|
||||
The **Timeout** field sets the HTTP request timeout in seconds.
|
||||
|
||||
### Service graph
|
||||
|
||||
The **Service graph** setting configures the [Service Graph](/docs/tempo/latest/metrics-generator/service_graphs/enable-service-graphs/) data.
|
||||
|
||||
Configure the **Data source** setting to define in which Prometheus instance the Service Graph data is stored.
|
||||
|
||||
To use the Service Graph, refer to the [Service Graph documentation](#use-the-service-graph).
|
||||
|
||||
## Node Graph
|
||||
### Node graph
|
||||
|
||||
The **Node Graph** setting enables the [node graph visualization](ref:node-graph), which is disabled by default.
|
||||
The **Node graph** setting enables the [node graph visualization](ref:node-graph), which isn't activated by default.
|
||||
|
||||
Once enabled, Grafana displays the node graph above the trace view.
|
||||
Once activated, Grafana displays the node graph above the trace view.
|
||||
|
||||
## Tempo search
|
||||
### Tempo search
|
||||
|
||||
The **Search** setting configures [Tempo search](/docs/tempo/latest/configuration/#search).
|
||||
|
||||
You can configure the **Hide search** setting to hide the search query option in **Explore** if search is not configured in the Tempo instance.
|
||||
|
||||
## TraceID query
|
||||
### TraceID query
|
||||
|
||||
The **TraceID query** setting modifies how TraceID queries are run. The time range can be used when there are performance issues or timeouts since it will narrow down the search to the defined range. This setting is disabled by default.
|
||||
|
||||
@@ -284,7 +338,7 @@ You can configure this setting as follows:
|
||||
| **Time shift start** | Time shift for start of search. Default: `30m`. |
|
||||
| **Time shift end** | Time shift for end of search. Default: `30m`. |
|
||||
|
||||
## Span bar
|
||||
### Span bar
|
||||
|
||||
The **Span bar** setting helps you display additional information in the span bar row.
|
||||
|
||||
@@ -296,12 +350,30 @@ You can choose one of three options:
|
||||
| **Duration** | _(Default)_ Displays the span duration on the span bar row. |
|
||||
| **Tag** | Displays the span tag on the span bar row. You must also specify which tag key to use to get the tag value, such as `component`. |
|
||||
|
||||
### Private data source connect
|
||||
|
||||
[//]: # 'Shared content for authentication section procedure in data sources'
|
||||
|
||||
{{< docs/shared source="grafana" lookup="datasources/datasouce-private-ds-connect.md" leveloffset="+2" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
## Provision the data source
|
||||
|
||||
You can define and configure the Tempo data source in YAML files as part of Grafana's provisioning system.
|
||||
You can define and configure the Tempo data source in YAML files as part of the Grafana provisioning system.
|
||||
Provisioning is primarily used Grafana instances that don't use Grafana Cloud.
|
||||
|
||||
You can use version control, like git, to track and manage file changes.
|
||||
Changes can be updated or rolled back as needed.
|
||||
|
||||
For more information about provisioning and available configuration options, refer to [Provisioning Grafana](ref:provisioning-data-sources).
|
||||
|
||||
Example provision YAML file:
|
||||
{{< admonition type="note" >}}
|
||||
You can't modify a provisioned data source using the Tempo data source settings in Grafana.
|
||||
Grafana displays a message for provisioned data sources.
|
||||
{{< /admonition >}}
|
||||
|
||||
### Example file
|
||||
|
||||
This example provision YAML file sets up the equivalents of the options available in the Tempo data source user interface.
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
@@ -26,86 +26,203 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
service-graph:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/tempo/service-graph/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/service-graph/
|
||||
recorded-queries:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/recorded-queries/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/recorded-queries/
|
||||
query-history-management:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/query-management/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/query-management/
|
||||
query-inspector:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/explore-inspector/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/explore-inspector/
|
||||
explore-traces-app:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/simplified-exploration/traces/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/visualizations/simplified-exploration/traces/
|
||||
---
|
||||
|
||||
# Query tracing data
|
||||
|
||||
The Tempo data source's query editor helps you query and display traces from Tempo in [Explore](ref:explore).
|
||||
The queries use [TraceQL](/docs/tempo/latest/traceql), the query language designed specifically for tracing.
|
||||
|
||||
This topic explains configuration and queries specific to the Tempo data source.
|
||||
For general documentation on querying data sources in Grafana, see [Query and transform data](ref:query-transform-data).
|
||||
For general documentation on querying data sources in Grafana, refer to [Query and transform data](ref:query-transform-data).
|
||||
|
||||
{{< admonition type="tip" >}}
|
||||
Don't know TraceQL? Try [Explore Traces](ref:explore-traces-app), an intuitive, queryless app that lets you explore your tracing data using RED metrics.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Before you begin
|
||||
|
||||
You can compose TraceQL queries in Grafana and Grafana Cloud using **Explore** and a Tempo data source.
|
||||
|
||||
### TraceQL knowledge helpful, but not required
|
||||
|
||||
You don't have to know TraceQL to create a query.
|
||||
You can use the **Search** query builder's user interface to select options to search your data.
|
||||
These selections generate a TraceQL query.
|
||||
Any query generated using **Search** query builder can be transferred to the **TraceQL** query editor, where you can edit the query directly.
|
||||
|
||||
To learn more about how to query by TraceQL, refer to the [TraceQL documentation](/docs/tempo/latest/traceql).
|
||||
|
||||
## Choose a query editing mode
|
||||
|
||||
The query editor has three **Query types** that you can use to explore your tracing data.
|
||||
You can use these modes by themselves or in combination to create building blocks to generate custom queries.
|
||||
Adding another query adds a new query block.
|
||||
Refer to [Use query types together](#use-query-types-together) for more information.
|
||||
|
||||

|
||||
|
||||
The three query types are:
|
||||
|
||||
- **Search** query builder - Provides a user interface for building a TraceQL query.
|
||||
- **TraceQL** query editor - Lets you write your own TraceQL query with assistance from autocomplete.
|
||||
- **Service Graph** view - Displays a visual relationship between services. Refer to the [Service graph](ref:service-graph) documentation for more information.
|
||||
|
||||
### Search query builder
|
||||
|
||||
The **Search** query builder provides drop-down lists and text fields to help you write a query.
|
||||
The query builder is ideal for people who aren't familiar with or want to learn TraceQL.
|
||||
|
||||
Refer to the [Search using the TraceQL query builder documentation]({{< relref "./traceql-search" >}}) to learn more about creating queries using convenient drop-down menus.
|
||||
|
||||

|
||||
|
||||
### TraceQL query editor
|
||||
|
||||
The **TraceQL** query editor lets you search by trace ID and write TraceQL queries using autocomplete.
|
||||
|
||||
Refer to the [TraceQL query editor documentation]({{< relref "./traceql-editor" >}}) to learn more about constructing queries using a code-editor-like experience.
|
||||
|
||||

|
||||
|
||||
You can also search for a trace ID by entering it into the query field.
|
||||
|
||||
### Service graph view
|
||||
|
||||
Grafana’s **Service Graph** view uses metrics to display span request rates, error rates, and durations, as well as service graphs.
|
||||
Once the requirements are set up, this preconfigured view is immediately available.
|
||||
|
||||
Using the service graph view, you can:
|
||||
|
||||
- Discover spans which are consistently erroring and the rates at which they occur.
|
||||
- Get an overview of the overall rate of span calls throughout your services.
|
||||
- Determine how long the slowest queries in your service take to complete.
|
||||
- Examine all traces that contain spans of particular interest based on rate, error, and duration values (RED signals).
|
||||
|
||||
For more information about the service graph, refer to [Service graph](../service-graph/).
|
||||
|
||||

|
||||
|
||||
## Use TraceQL panels in dashboards
|
||||
|
||||
To add TraceQL panels to your dashboard, refer to the [Traces panel documentation](/docs/grafana/latest/panels-visualizations/visualizations/traces/).
|
||||
|
||||
To learn more about Grafana dashboards, refer to the [Use dashboards documentation](/docs/grafana/latest/dashboards/use-dashboards/).
|
||||
|
||||
## Write TraceQL queries in Grafana
|
||||
## Set options for query builder and editor
|
||||
|
||||
You can compose TraceQL queries in Grafana and Grafana Cloud using **Explore** and a Tempo data source. You can use either the **Query type** > **Search** (the TraceQL query builder) or the **TraceQL** tab (the TraceQL query editor).
|
||||
Both of these methods let you build queries and drill-down into result sets.
|
||||
The following options are available for the **Search** and **TraceQL** query types.
|
||||
You can modify these settings in the **Options** section.
|
||||
|
||||
To learn more about how to query by TraceQL, refer to the [TraceQL documentation](/docs/tempo/latest/traceql).
|
||||

|
||||
|
||||
### TraceQL query builder
|
||||
After changing any option, re-run the query to apply the updates.
|
||||
|
||||
The TraceQL query builder, located on the **Explore** > **Query type** > **Search** in Grafana, provides drop-downs and text fields to help you write a query.
|
||||
Limit
|
||||
: Determines the maximum number of traces to return. Default value is `20`.
|
||||
|
||||
Refer to the [Search using the TraceQL query builder documentation]({{< relref "./traceql-search" >}}) to learn more about creating queries using convenient drop-down menus.
|
||||
Span Limit
|
||||
: Sets the maximum number of spans to return for each spanset. Default value is `3`.
|
||||
|
||||

|
||||
Table Format
|
||||
: Determines whether the query results table is displayed focused on **Traces** or **Spans**. **Traces** is the default selection. When **Traces** is selected, the results table starts with the trace ID. When **Spans** is selected, the table starts with the trace service.
|
||||
|
||||
### TraceQL query editor
|
||||
Step
|
||||
: Defines the step for metrics queries. Use duration notation, for example, `30ms` or `1m`.
|
||||
|
||||
The TraceQL query editor, located on the **Explore** > **TraceQL** tab in Grafana, lets you search by trace ID and write TraceQL queries using autocomplete.
|
||||
Streaming
|
||||
: Indicates if streaming is active. Streaming lets you view partial query results before the entire query completes. Activating streaming adds the **Table - Streaming Progress** section to the query results.
|
||||
|
||||
Refer to the [TraceQL query editor documentation]({{< relref "./traceql-editor" >}}) to learn more about constructing queries using a code-editor-like experience.
|
||||
## Use query types together
|
||||
|
||||

|
||||
You can use **+ Add query** to create customized queries that use one or more of the query types together.
|
||||
Each time you add a new query, it adds a new section, or query block, that contains **Search**, **TraceQL**, or **Service Graph** user interface.
|
||||
|
||||
## Query by search (deprecated)
|
||||
The added query and results table appear in the navigation under **Queries** and **Tables** respectively.
|
||||
You can use the navigation to view query, results table, and service graph blocks.
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
Starting with Grafana v10.2, this query type has been deprecated. It will be removed in Grafana v10.3.
|
||||
{{% /admonition %}}
|
||||
{{< video-embed src="/media/docs/grafana/data-sources/tempo/query-editor/tempo-ds-editor.mp4" max-width="800px" class="my-cool-video" caption="Navigating through the query blocks" align="center" >}}
|
||||
|
||||
Use this to search for traces by service name, span name, duration range, or process-level attributes that are included in your application's instrumentation, such as HTTP status code and customer ID.
|
||||
To add a query block:
|
||||
|
||||
To configure Tempo and the Tempo data source for search, refer to [Configure the data source]({{< relref "../#configure-the-data-source" >}}).
|
||||
1. Select **+ Add query**.
|
||||
1. Choose a query type: **Search**, **TraceQL**, or **Service Graph**.
|
||||
|
||||
To search for traces:
|
||||
To remove a query block, select the **Remove query** trash can icon.
|
||||
|
||||
1. Select **Search** from the **Query** type selector.
|
||||
1. Fill out the search form:
|
||||
To rename a block, select the **Rename** edit icon next to the query block name.
|
||||
The name changes in the queries and table list.
|
||||
|
||||
| Name | Description |
|
||||
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Service Name** | Returns a list of services. |
|
||||
| **Span Name** | Returns a list of span names. |
|
||||
| **Tags** | Sets tags with values in the [logfmt](https://brandur.org/logfmt) format, such as `error=true db.statement="select * from User"`. |
|
||||
| **Min Duration** | Filters all traces with a duration higher than the set value. Possible values are `1.2s`, `100ms`, `500us`. |
|
||||
| **Max Duration** | Filters all traces with a duration lower than the set value. Possible values are `1.2s`, `100ms`, `500us`. |
|
||||
| **Limit** | Limits the number of traces returned. |
|
||||
### Additional query block options
|
||||
|
||||
{{< figure src="/static/img/docs/explore/tempo-search.png" class="docs-image--no-shadow" max-width="750px" caption="Screenshot of the Tempo search feature with a trace rendered in the right panel" >}}
|
||||
Each query block has a set of icons in the right top corner.
|
||||
|
||||
### Search recent traces
|
||||

|
||||
|
||||
You can search recent traces held in Tempo's ingesters.
|
||||
By default, ingesters store the last 15 minutes of tracing data.
|
||||
These icons include:
|
||||
|
||||
To configure your Tempo data source to use this feature, refer to the [Tempo documentation](/docs/tempo/latest/getting-started/tempo-in-grafana/#search-of-recent-traces).
|
||||
Show data source help
|
||||
: Displays the **Tempo Cheat Sheet** with links to documentation.
|
||||
|
||||
### Search the backend datastore
|
||||
Create recorded query
|
||||
: Lets you save the current query block as a recorded query. This option is available in Grafana Cloud and Grafana Enterprise. For more information, refer to [Recorded queries](ref:recorded-queries).
|
||||
|
||||
Tempo includes the ability to search the entire backend datastore.
|
||||
Duplicate query
|
||||
: Copies the current block and adds a new identical block.
|
||||
|
||||
To configure your Tempo data source to use this feature, refer to the [Tempo documentation](/docs/tempo/latest/getting-started/tempo-in-grafana/#search-of-the-backend-datastore).
|
||||
Remove query
|
||||
: Deletes the query block.
|
||||
|
||||
## Query by TraceID
|
||||
### Use query history and query inspector
|
||||
|
||||
To query a particular trace:
|
||||
**Explore** provides a history of all queries you've used within a data source and an inspector that lets you view stats, inspect queries, view JSON, and general information for your data source queries.
|
||||
|
||||
1. Select the **TraceQL** query type.
|
||||
1. Enter the trace's ID into the query field.
|
||||
For more information, refer to the [Query inspector in Explore](ref:query-inspector) and [Query management in Explore](ref:query-history-management) documentation.
|
||||
|
||||
{{< figure src="/static/img/docs/tempo/query-editor-traceid.png" class="docs-image--no-shadow" max-width="750px" caption="Screenshot of the Tempo TraceID query type" >}}
|
||||
## Cross-tenant TraceQL queries
|
||||
|
||||
If you've configured a multi-stack Tempo data source, you can perform TraceQL queries across those stacks and tenants.
|
||||
|
||||
Queries performed using the cross-tenant configured data source, in either **Explore** or inside of dashboards,
|
||||
are performed across all the tenants that you specified in the **X-Scope-OrgID** header.
|
||||
|
||||
<!-- vale Grafana.Spelling = NO -->
|
||||
|
||||
TraceQL queries that compare multiple spansets may not correctly return all traces in a cross-tenant query. For instance,
|
||||
|
||||
<!-- vale Grafana.Quotes = YES -->
|
||||
|
||||
```
|
||||
{ span.attr1 = "bar" } && { span.attr2 = "foo" }
|
||||
```
|
||||
|
||||
TraceQL evaluates a contiguously stored trace.
|
||||
If these two conditions are satisfied in separate tenants, then Tempo doesn't return the trace.
|
||||
|
||||
Refer to [Set up a multi-stack Tempo data source in Grafana](https://grafana.com/docs/grafana-cloud/connect-externally-hosted/multi-stack-data-sources/#set-up-a-multi-stack-tempo-data-source-in-grafana) for information about configuring the Tempo data source.
|
||||
|
||||
For information about Tempo configuration requirements, refer to the [Cross-tenant query](https://grafana.com/docs/tempo/<TEMPO_VERSION>/operations/cross_tenant_query/) and [Enable multitenancy](https://grafana.com/docs/tempo/<TEMPO_VERSION>/operations/multitenancy/) documentation.
|
||||
|
||||
@@ -13,6 +13,27 @@ labels:
|
||||
menuTitle: Write TraceQL queries
|
||||
title: Write TraceQL queries with the editor
|
||||
weight: 300
|
||||
refs:
|
||||
explore:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
service-graph:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/tempo/service-graph/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/service-graph/
|
||||
recorded-queries:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/recorded-queries/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/recorded-queries/
|
||||
tempo-query-editor:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/tempo/query-editor/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/query-editor/
|
||||
---
|
||||
|
||||
# Write TraceQL queries with the editor
|
||||
|
||||
@@ -11,11 +11,32 @@ labels:
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Search traces
|
||||
title: Search traces using TraceQL query builder
|
||||
title: Investigate traces using Search query builder
|
||||
weight: 300
|
||||
refs:
|
||||
explore:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/explore/
|
||||
service-graph:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/tempo/service-graph/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/service-graph/
|
||||
recorded-queries:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/recorded-queries/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/administration/recorded-queries/
|
||||
tempo-query-editor:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/datasources/tempo/query-editor/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/connect-externally-hosted/data-sources/tempo/query-editor/
|
||||
---
|
||||
|
||||
# Search traces using TraceQL query builder
|
||||
# Investigate traces using Search query builder
|
||||
|
||||
Inspired by PromQL and LogQL, TraceQL is a query language designed for selecting traces.
|
||||
TraceQL provides a method for formulating precise queries so you can zoom in to the data you need.
|
||||
@@ -23,9 +44,9 @@ Query results are returned faster because the queries limit what is searched.
|
||||
|
||||
To learn more about how to query by TraceQL, refer to the [TraceQL documentation](/docs/tempo/latest/traceql).
|
||||
|
||||
The TraceQL query builder, located on the **Explore** > **Query type** > **Search** in Grafana, provides drop-downs and text fields to help you write a query.
|
||||
The **Search** query builder, located on the **Explore** > **Query type** > **Search** in Grafana, provides drop-down lists and text fields to help you write a query.
|
||||
|
||||

|
||||

|
||||
|
||||
## Enable Search with the query builder
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ Each node on the graph represents a service such as an API or database.
|
||||
|
||||
You use the Service Graph to detect performance issues; track increases in error, fault, or throttle rates in services; and investigate root causes by viewing corresponding traces.
|
||||
|
||||
{{< figure src="/static/img/docs/node-graph/node-graph-8-0.png" class="docs-image--no-shadow" max-width="500px" caption="Screenshot of a Node Graph" >}}
|
||||
{{< figure src="/media/docs/grafana/data-sources/tempo/query-editor/tempo-ds-query-node-graph.png" class="docs-image--no-shadow" max-width="500px" alt="Screenshot of a Node Graph" >}}
|
||||
|
||||
## Display the Service Graph
|
||||
|
||||
@@ -100,9 +100,9 @@ Each circle's color represents the percentage of requests in each state:
|
||||
|
||||
Service graph view displays a table of request rate, error rate, and duration metrics (RED) calculated from your incoming spans. It also includes a node graph view built from your spans.
|
||||
|
||||
{{< figure src="/static/img/docs/tempo/apm-table.png" class="docs-image--no-shadow" max-width="500px" caption="Screenshot of the Service Graph view" >}}
|
||||
{{< figure src="/media/docs/grafana/data-sources/tempo/query-editor/tempo-ds-query-service-graph.png" class="docs-image--no-shadow" max-width="500px" alt="Screenshot of the Service Graph view" >}}
|
||||
|
||||
For details, refer to the [Service Graph view documentation](/docs/tempo/latest/metrics-generator/service-graph-view/).
|
||||
For details, refer to the [Service Graph view documentation](/docs/tempo/<TEMPO_VERSION>/metrics-generator/service-graph-view/).
|
||||
|
||||
To open the Service Graph view:
|
||||
|
||||
@@ -120,4 +120,6 @@ These metrics must exist in your Prometheus data source.
|
||||
|
||||
To open a query in Prometheus with the span name of that row automatically set in the query, click a row in the **rate**, **error rate**, or **duration** columns.
|
||||
|
||||

|
||||
|
||||
To open a query in Tempo with the span name of that row automatically set in the query, click a row in the **links** column.
|
||||
|
||||
@@ -27,40 +27,11 @@ Since version 8.4, HTTP API details are [specified](https://editor.swagger.io/?u
|
||||
|
||||
Starting from version 9.1, there is also a [OpenAPI v3 specification](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/public/openapi3.json) (generated by the v2 one).
|
||||
|
||||
Users can browser and try out both via the Swagger UI editor (served by the grafana server) by navigating to `/swagger-ui`.
|
||||
Users can browser and try out both via the Swagger UI editor (served by the Grafana server) by navigating to `/swagger-ui`.
|
||||
|
||||
## Authenticating API requests
|
||||
## Authenticate API requests
|
||||
|
||||
You can authenticate requests using basic auth, a service account token or a session cookie (acquired using regular login or OAuth).
|
||||
|
||||
### Basic Auth
|
||||
|
||||
If basic auth is enabled (it is enabled by default), then you can authenticate your HTTP request via
|
||||
standard basic auth. Basic auth will also authenticate LDAP users.
|
||||
|
||||
curl example:
|
||||
|
||||
```bash
|
||||
curl http://admin:admin@localhost:3000/api/org
|
||||
{"id":1,"name":"Main Org."}
|
||||
```
|
||||
|
||||
### Service Account Token
|
||||
|
||||
To create a service account token, click on **Administration** in the left-side menu, click **Users and access**, then **Service Accounts**.
|
||||
For more information on how to use service account tokens, refer to the [Service Accounts]({{< relref "../../administration/service-accounts/" >}}) documentation.
|
||||
|
||||
You use the token in all requests in the `Authorization` header, like this:
|
||||
|
||||
**Example**:
|
||||
|
||||
```http
|
||||
GET http://your.grafana.com/api/dashboards/db/mydash HTTP/1.1
|
||||
Accept: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
The `Authorization` header value should be `Bearer <your service account token>`.
|
||||
{{< docs/shared lookup="developers/authentication.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
|
||||
## X-Grafana-Org-Id Header
|
||||
|
||||
@@ -80,40 +51,41 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
- [Admin API]({{< relref "admin/" >}})
|
||||
- [Alerting API (unstable)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json)
|
||||
- [Alerting Provisioning API]({{< relref "alerting_provisioning/" >}})
|
||||
- [Alerting provisioning API]({{< relref "alerting_provisioning/" >}})
|
||||
- [Annotations API]({{< relref "annotations/" >}})
|
||||
- [Correlations API]({{< relref "correlations/" >}})
|
||||
- [Dashboard API]({{< relref "dashboard/" >}})
|
||||
- [Dashboard Permissions API]({{< relref "dashboard_permissions/" >}})
|
||||
- [Dashboard Versions API]({{< relref "dashboard_versions/" >}})
|
||||
- [Dashboard permissions API]({{< relref "dashboard_permissions/" >}})
|
||||
- [Dashboard versions API]({{< relref "dashboard_versions/" >}})
|
||||
- [Data source API]({{< relref "data_source/" >}})
|
||||
- [Folder API]({{< relref "folder/" >}})
|
||||
- [Folder Permissions API]({{< relref "folder_permissions/" >}})
|
||||
- [Folder/Dashboard Search API]({{< relref "folder_dashboard_search/" >}})
|
||||
- [Library Element API]({{< relref "library_element/" >}})
|
||||
- [Folder permissions API]({{< relref "folder_permissions/" >}})
|
||||
- [Folder/Dashboard search API]({{< relref "folder_dashboard_search/" >}})
|
||||
- [Library element API]({{< relref "library_element/" >}})
|
||||
- [Organization API]({{< relref "org/" >}})
|
||||
- [Other API]({{< relref "other/" >}})
|
||||
- [Playlists API]({{< relref "playlist/" >}})
|
||||
- [Preferences API]({{< relref "preferences/" >}})
|
||||
- [Short URL API]({{< relref "short_url/" >}})
|
||||
- [Public dashboard API]({{< relref "dashboard_public/" >}})
|
||||
- [Query history API]({{< relref "query_history/" >}})
|
||||
- [Service account API]({{< relref "serviceaccount/" >}})
|
||||
- [Short URL API]({{< relref "short_url/" >}})
|
||||
- [Snapshot API]({{< relref "snapshot/" >}})
|
||||
- [SSO settings API]({{< relref "sso-settings/" >}})
|
||||
- [Team API]({{< relref "team/" >}})
|
||||
- [User API]({{< relref "user/" >}})
|
||||
|
||||
## Deprecated HTTP APIs
|
||||
|
||||
- [Alerting Notification Channels API]({{< relref "alerting_notification_channels/" >}})
|
||||
- [Alerting API]({{< relref "alerting/" >}})
|
||||
- [Authentication API]({{< relref "auth/" >}})
|
||||
|
||||
## Grafana Enterprise HTTP APIs
|
||||
|
||||
Grafana Enterprise includes all of the Grafana OSS APIs as well as those that follow:
|
||||
Grafana Enterprise includes all of the Grafana OSS APIs as well as the following APIs:
|
||||
|
||||
- [Role-based access control API]({{< relref "access_control/" >}})
|
||||
- [Data source permissions API]({{< relref "datasource_permissions/" >}})
|
||||
- [Team sync API]({{< relref "team_sync/" >}})
|
||||
- [License API]({{< relref "licensing/" >}})
|
||||
- [Reporting API]({{< relref "reporting/" >}})
|
||||
- [Query and resource caching API]({{< relref "query_and_resource_caching/" >}})
|
||||
- [Reporting API]({{< relref "reporting/" >}})
|
||||
- [Role-based access control API]({{< relref "access_control/" >}})
|
||||
- [Team sync API]({{< relref "team_sync/" >}})
|
||||
|
||||
23
docs/sources/developers/http_api/authentication.md
Normal file
23
docs/sources/developers/http_api/authentication.md
Normal file
@@ -0,0 +1,23 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/developers/http_api/authentication/
|
||||
description: 'You can authenticate HTTP API requests using basic authentication, a service account token, or a session cookie.'
|
||||
keywords:
|
||||
- grafana
|
||||
- http
|
||||
- documentation
|
||||
- api
|
||||
- role-based-access-control
|
||||
- acl
|
||||
- enterprise
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Authentication options for the HTTP API
|
||||
menuTitle: Authentication
|
||||
weight: 01
|
||||
---
|
||||
|
||||
# Authentication options for the HTTP API
|
||||
|
||||
{{< docs/shared lookup="developers/authentication.md" source="grafana" version="<GRAFANA_VERSION>" >}}
|
||||
@@ -217,31 +217,7 @@ Content-Length: 1300
|
||||
Content-Length: 46
|
||||
|
||||
```
|
||||
|
||||
JSON response body schema:
|
||||
|
||||
- **message** - Message explaining the reason for the request failure.
|
||||
|
||||
## Restore dashboard by dashboard UID
|
||||
|
||||
`POST /api/dashboards/uid/:uid/restore`
|
||||
|
||||
Restores a dashboard to a given dashboard version using `uid`.
|
||||
|
||||
**Example request for restoring a dashboard version**:
|
||||
|
||||
```http
|
||||
POST /api/dashboards/uid/QA7wKklGz/restore
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
{
|
||||
"version": 1
|
||||
}
|
||||
```
|
||||
|
||||
JSON body schema:
|
||||
|
||||
JSON response body schema:
|
||||
|
||||
- **message** - Message explaining the reason for the request failure.
|
||||
@@ -328,31 +304,7 @@ Content-Length: 1300
|
||||
|
||||
**Example response (JSON diff)**:
|
||||
|
||||
|
||||
Status Codes:
|
||||
|
||||
- **200** - OK
|
||||
- **400** - Bad request (invalid JSON sent)
|
||||
- **401** - Unauthorized
|
||||
- **404** - Not found
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
]
|
||||
},
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: text/html; charset=UTF-8
|
||||
|
||||
|
||||
18
docs/sources/developers/http_api/examples/_index.md
Normal file
18
docs/sources/developers/http_api/examples/_index.md
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/developers/http_api/examples/
|
||||
keywords:
|
||||
- grafana
|
||||
- tutorials
|
||||
- API
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: 'HTTP API examples'
|
||||
menuTitle: 'Examples'
|
||||
weight: 02
|
||||
---
|
||||
|
||||
# HTTP API examples
|
||||
|
||||
{{< section >}}
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
aliases:
|
||||
- ../../http_api/create-api-tokens-for-org/
|
||||
- ../../tutorials/api_org_token_howto/
|
||||
canonical: /docs/grafana/latest/developers/http_api/create-api-tokens-for-org/
|
||||
- ../../../http_api/create-api-tokens-for-org/ # /docs/grafana/<GRAFANA_VERSION>/http_api/create-api-tokens-for-org/
|
||||
- ../../../tutorials/api_org_token_howto/ # /docs/grafana/<GRAFANA_VERSION>/tutorials/api_org_token_howto/
|
||||
canonical: /docs/grafana/latest/developers/http_api/examples/create-api-tokens-for-org/
|
||||
keywords:
|
||||
- grafana
|
||||
- tutorials
|
||||
@@ -15,7 +15,6 @@ labels:
|
||||
- enterprise
|
||||
- oss
|
||||
title: 'API Tutorial: Create Service Account tokens and dashboards for an organization'
|
||||
weight: 150
|
||||
---
|
||||
|
||||
# Create Service Account tokens and dashboards for an organization
|
||||
@@ -1,7 +1,8 @@
|
||||
---
|
||||
aliases:
|
||||
- ../../http_api/curl-examples/
|
||||
canonical: /docs/grafana/latest/developers/http_api/curl-examples/
|
||||
- ../../../http_api/curl-examples/ # /docs/grafana/<GRAFANA_VERSION>/http_api/curl-examples/
|
||||
- ../../http_api/curl-examples/ # /docs/grafana/<GRAFANA_VERSION>/developers/http_api/curl-examples/
|
||||
canonical: /docs/grafana/latest/developers/http_api/examples/curl-examples/
|
||||
description: cURL examples
|
||||
keywords:
|
||||
- grafana
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: 'HTTP Preferences API '
|
||||
title: 'Preferences API'
|
||||
---
|
||||
|
||||
# User and Org Preferences API
|
||||
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: 'HTTP Snapshot API '
|
||||
title: 'Snapshot API'
|
||||
---
|
||||
|
||||
# Snapshot API
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user