mirror of
https://github.com/grafana/grafana.git
synced 2025-12-20 19:44:55 +08:00
Compare commits
250 Commits
docs/add-t
...
v9.2.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78a3e64e4f | ||
|
|
68c8987152 | ||
|
|
7832a7579f | ||
|
|
92fa1aba00 | ||
|
|
8ea7a8cff3 | ||
|
|
13e306bbfb | ||
|
|
e69568fec8 | ||
|
|
509cb77bca | ||
|
|
1573285f21 | ||
|
|
06780e2c41 | ||
|
|
201c7e123d | ||
|
|
c4233171f2 | ||
|
|
a318b15cab | ||
|
|
559ef42767 | ||
|
|
aff8e62b8c | ||
|
|
263e3142a1 | ||
|
|
e67669b250 | ||
|
|
9b2d3e3cac | ||
|
|
72d97eb375 | ||
|
|
868e560006 | ||
|
|
b6a91429c9 | ||
|
|
d2fe4b4813 | ||
|
|
46f2243f02 | ||
|
|
fcfbb2415f | ||
|
|
a3bccbbdeb | ||
|
|
188792428d | ||
|
|
15557bf4af | ||
|
|
7582c92f0d | ||
|
|
d8c11cdd7a | ||
|
|
3752197643 | ||
|
|
0d93b268f2 | ||
|
|
09eb30b9a3 | ||
|
|
1547e41ce0 | ||
|
|
1559344944 | ||
|
|
0cc1c86015 | ||
|
|
fc99833cfb | ||
|
|
963a71ba34 | ||
|
|
613d3b5e17 | ||
|
|
a991be81da | ||
|
|
85e2b028de | ||
|
|
a8a1bcc58c | ||
|
|
7cda7094c5 | ||
|
|
880452931b | ||
|
|
29a03139dd | ||
|
|
f03d0facc5 | ||
|
|
00b1a285ad | ||
|
|
c4fdc3d7c6 | ||
|
|
9f8bee7187 | ||
|
|
ba1942febb | ||
|
|
7593d5880f | ||
|
|
cce767fee4 | ||
|
|
29baf812cf | ||
|
|
484df7d682 | ||
|
|
b9cce07b10 | ||
|
|
9c6d358d7f | ||
|
|
0905058657 | ||
|
|
02b1030662 | ||
|
|
a395671237 | ||
|
|
9617d2a14f | ||
|
|
f2fa4eb197 | ||
|
|
38458c40d2 | ||
|
|
04678bc1aa | ||
|
|
ef74b7a486 | ||
|
|
cbdc5e59cf | ||
|
|
7b12482512 | ||
|
|
7a91afc504 | ||
|
|
56fa39ede0 | ||
|
|
1980c169b9 | ||
|
|
9c9480dd0c | ||
|
|
c639251ace | ||
|
|
0965e3ac12 | ||
|
|
1755c72670 | ||
|
|
98dfb42cbf | ||
|
|
3a93203a57 | ||
|
|
b33b3ea0b6 | ||
|
|
9795dbb401 | ||
|
|
11bfb4a387 | ||
|
|
bca3356661 | ||
|
|
95f23777f0 | ||
|
|
8ba2187115 | ||
|
|
c2ce0e82ff | ||
|
|
a3f69498f6 | ||
|
|
27f57b144d | ||
|
|
bcc5a441bf | ||
|
|
4604062f80 | ||
|
|
88194154cd | ||
|
|
c0f54f8f58 | ||
|
|
5b7920fe32 | ||
|
|
51d5a6031e | ||
|
|
6f1af5c007 | ||
|
|
ba9293b09d | ||
|
|
96ae3b7e45 | ||
|
|
5a17ef9d6c | ||
|
|
d78f259ee8 | ||
|
|
c9341d5314 | ||
|
|
0bdc74ba39 | ||
|
|
7d21e021ea | ||
|
|
b3b72165f1 | ||
|
|
53c71b486a | ||
|
|
61f0183275 | ||
|
|
928a9ebc57 | ||
|
|
c74db84073 | ||
|
|
b00bb90926 | ||
|
|
22ae442f56 | ||
|
|
17e197634e | ||
|
|
da5186b07a | ||
|
|
e238b9f9c1 | ||
|
|
1d2037a766 | ||
|
|
e20953e4f8 | ||
|
|
f01526e35b | ||
|
|
7033623093 | ||
|
|
ffa67c888b | ||
|
|
794f9dbb05 | ||
|
|
91c78ce784 | ||
|
|
0cf8f9fab6 | ||
|
|
d02b7fc0ba | ||
|
|
bd81793292 | ||
|
|
0383c57a2f | ||
|
|
e926018407 | ||
|
|
18e3d9d209 | ||
|
|
85f83c44b8 | ||
|
|
abe3dbc53b | ||
|
|
34a054642f | ||
|
|
bf184205dc | ||
|
|
4585d70f22 | ||
|
|
d06eb2fa8b | ||
|
|
e0d8bb2719 | ||
|
|
32111ee203 | ||
|
|
4468aac4ee | ||
|
|
7d182b4890 | ||
|
|
2483c64d26 | ||
|
|
412f05e16f | ||
|
|
a57455e5cd | ||
|
|
f4b37ab8a9 | ||
|
|
b23fd7aad0 | ||
|
|
7593ab4a4e | ||
|
|
1bbbe41a6c | ||
|
|
25e89ba295 | ||
|
|
b8aa31433b | ||
|
|
c258cfb553 | ||
|
|
752f886637 | ||
|
|
27a4dd8765 | ||
|
|
fd7358a6ef | ||
|
|
1024334d7b | ||
|
|
77046b3fba | ||
|
|
1964ddce83 | ||
|
|
d5bb8aba85 | ||
|
|
94341ed95c | ||
|
|
77c1546511 | ||
|
|
9854ac88e9 | ||
|
|
90c8e52a17 | ||
|
|
34e7d48ca6 | ||
|
|
1d02c2cd08 | ||
|
|
77ec6609df | ||
|
|
cacc00aeb8 | ||
|
|
4ac54040a9 | ||
|
|
17655071b7 | ||
|
|
ba5ee60944 | ||
|
|
84a6820fd8 | ||
|
|
dc04e2589c | ||
|
|
5e0b29ed4b | ||
|
|
debd9927c6 | ||
|
|
f6d7f7dec6 | ||
|
|
ece17f30ab | ||
|
|
e6736c4308 | ||
|
|
c00946994a | ||
|
|
2c781d472a | ||
|
|
8f7deb3741 | ||
|
|
9b87e7de11 | ||
|
|
23788d0f70 | ||
|
|
0362260b30 | ||
|
|
0f136e2b26 | ||
|
|
55186418b9 | ||
|
|
4d3408f4f0 | ||
|
|
90168e6c80 | ||
|
|
83fb311b3c | ||
|
|
2b7ec364ad | ||
|
|
b70f14d971 | ||
|
|
7cb8143633 | ||
|
|
536eeaf9ca | ||
|
|
a425170bff | ||
|
|
8741f7dedb | ||
|
|
19427f9797 | ||
|
|
a851432bfb | ||
|
|
536d0d4277 | ||
|
|
64867b09cf | ||
|
|
d0e42cdbc8 | ||
|
|
88d4cc9334 | ||
|
|
a8facce55e | ||
|
|
50c6c5e550 | ||
|
|
04c5b2b9cc | ||
|
|
f7d85ba844 | ||
|
|
6e680cac8f | ||
|
|
6c38c502a9 | ||
|
|
a16104d123 | ||
|
|
483d30730f | ||
|
|
14d98f02da | ||
|
|
7a76da4e15 | ||
|
|
5c5590ec5f | ||
|
|
8560b492c5 | ||
|
|
29bb039c94 | ||
|
|
fcf605e07f | ||
|
|
f2f49abe03 | ||
|
|
c0943153be | ||
|
|
403a834bfa | ||
|
|
33e5cde266 | ||
|
|
211e9896bc | ||
|
|
fa99d31acf | ||
|
|
4decec3c8e | ||
|
|
aae3a73381 | ||
|
|
27e76f5c7a | ||
|
|
d10d842024 | ||
|
|
8c306dfe53 | ||
|
|
08d12df9f3 | ||
|
|
29826e0eb8 | ||
|
|
bde8a1b2e1 | ||
|
|
020494f87a | ||
|
|
50a59305b5 | ||
|
|
32da26ec52 | ||
|
|
db9b11c650 | ||
|
|
9b0d2034dc | ||
|
|
4eb27f194e | ||
|
|
7429b3f894 | ||
|
|
6dce936b65 | ||
|
|
9fd622e549 | ||
|
|
e4e421a8e6 | ||
|
|
6f32c12628 | ||
|
|
1c19fa164a | ||
|
|
c4f955de84 | ||
|
|
48a49eaa9a | ||
|
|
ce6aaa1a37 | ||
|
|
d5d2654dc5 | ||
|
|
3a864b7b27 | ||
|
|
fed02859fd | ||
|
|
731d506c72 | ||
|
|
d86fc082fb | ||
|
|
39c4ba5e67 | ||
|
|
77991d976f | ||
|
|
d132d8a555 | ||
|
|
47f8bf1b11 | ||
|
|
4a653c7d31 | ||
|
|
5242194721 | ||
|
|
db52b3b03b | ||
|
|
6af96f9cd1 | ||
|
|
3931787027 | ||
|
|
5f50e98d12 | ||
|
|
9ab3fa611f | ||
|
|
cddf4eea49 | ||
|
|
d097fb2e28 | ||
|
|
ff550df32f |
@@ -1639,7 +1639,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "8"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "9"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "10"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "11"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "11"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "12"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "13"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Table/TableCell.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
@@ -1692,7 +1694,10 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Tags/Tag.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
@@ -4225,8 +4230,7 @@ exports[`better eslint`] = {
|
||||
],
|
||||
"public/app/features/dimensions/editors/ResourceDimensionEditor.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/features/dimensions/editors/ResourcePicker.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
@@ -6001,11 +6005,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "15"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "17"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "14"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"]
|
||||
],
|
||||
"public/app/plugins/datasource/elasticsearch/components/AddRemove.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
@@ -7848,8 +7850,7 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
|
||||
],
|
||||
"public/app/plugins/panel/canvas/utils.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/dashlist/module.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
@@ -8957,6 +8958,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "10"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"]
|
||||
],
|
||||
"public/app/plugins/panel/xychart/TooltipView.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/xychart/XYChartPanel2.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
load('scripts/drone/events/pr.star', 'pr_pipelines')
|
||||
load('scripts/drone/events/main.star', 'main_pipelines')
|
||||
load('scripts/drone/pipelines/docs.star', 'docs_pipelines')
|
||||
load('scripts/drone/events/release.star', 'release_pipelines', 'publish_image_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline', 'artifacts_page_pipeline')
|
||||
load('scripts/drone/events/release.star', 'release_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline', 'artifacts_page_pipeline')
|
||||
load('scripts/drone/pipelines/publish_images.star', 'publish_image_pipelines_public', 'publish_image_pipelines_security')
|
||||
load('scripts/drone/version.star', 'version_branch_pipelines')
|
||||
load('scripts/drone/events/cron.star', 'cronjobs')
|
||||
load('scripts/drone/vault.star', 'secrets')
|
||||
@@ -15,7 +16,7 @@ load('scripts/drone/vault.star', 'secrets')
|
||||
def main(ctx):
|
||||
edition = 'oss'
|
||||
return pr_pipelines(edition=edition) + main_pipelines(edition=edition) + release_pipelines() + \
|
||||
publish_image_pipelines('public') + publish_image_pipelines('security') + \
|
||||
publish_image_pipelines_public() + publish_image_pipelines_security() + \
|
||||
publish_artifacts_pipelines('security') + publish_artifacts_pipelines('public') + \
|
||||
publish_npm_pipelines('public') + publish_packages_pipeline() + artifacts_page_pipeline() + \
|
||||
version_branch_pipelines() + cronjobs(edition=edition) + secrets()
|
||||
|
||||
1553
.drone.yml
1553
.drone.yml
File diff suppressed because it is too large
Load Diff
4
.github/workflows/bump-version.yml
vendored
4
.github/workflows/bump-version.yml
vendored
@@ -3,12 +3,12 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
|
||||
required: true
|
||||
default: '7.x.x'
|
||||
workflow_call:
|
||||
inputs:
|
||||
version_call:
|
||||
description: Needs to match, exactly, the name of a version
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
|
||||
23
.github/workflows/prepare-release.yml
vendored
23
.github/workflows/prepare-release.yml
vendored
@@ -1,23 +0,0 @@
|
||||
name: Prepare release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version_input:
|
||||
description: 'The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
|
||||
required: true
|
||||
jobs:
|
||||
call-bump-version:
|
||||
uses: grafana/grafana/.github/workflows/bump-version.yml@main
|
||||
with:
|
||||
version_call: ${{ github.event.inputs.version_input }}
|
||||
secrets:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
call-update-changelog:
|
||||
uses: grafana/grafana/.github/workflows/update-changelog.yml@main
|
||||
with:
|
||||
version_call: ${{ github.event.inputs.version_input }}
|
||||
secrets:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
needs: call-bump-version
|
||||
6
.github/workflows/publish.yml
vendored
6
.github/workflows/publish.yml
vendored
@@ -3,7 +3,7 @@ name: publish_docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- v9.2.x
|
||||
paths:
|
||||
- 'docs/sources/**'
|
||||
- 'packages/grafana-*/**'
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
key: yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
yarn-
|
||||
- run: yarn install --immutable
|
||||
- run: yarn install --immutable
|
||||
- name: publish-to-git
|
||||
uses: ./.github/actions/website-sync
|
||||
id: publish
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
host: github.com
|
||||
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
|
||||
source_folder: docs/sources
|
||||
target_folder: content/docs/grafana/next
|
||||
target_folder: content/docs/grafana/latest
|
||||
allow_no_changes: 'true'
|
||||
- shell: bash
|
||||
run: |
|
||||
|
||||
20
.github/workflows/sbom-report.yml
vendored
Normal file
20
.github/workflows/sbom-report.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: syft-sbom-ci
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
syft-sbom:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Anchore SBOM Action
|
||||
uses: anchore/sbom-action@v0.12.0
|
||||
with:
|
||||
artifact-name: ${{ github.event.repository.name }}-spdx.json
|
||||
|
||||
8
.github/workflows/update-changelog.yml
vendored
8
.github/workflows/update-changelog.yml
vendored
@@ -4,11 +4,11 @@ on:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
description: Needs to match, exactly, the name of a milestone
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
|
||||
workflow_call:
|
||||
inputs:
|
||||
version_call:
|
||||
description: Needs to match, exactly, the name of a milestone
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch or major.minor.patch-beta<number> format. example: 7.4.3 or 7.4.3-beta1'
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
@@ -35,9 +35,9 @@ jobs:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
- name: Run update changelog (workflow invoked)
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
if: ${{ inputs.version != '' }}
|
||||
uses: ./actions/update-changelog
|
||||
with:
|
||||
version_call: ${{ inputs.version_call }}
|
||||
version_call: ${{ inputs.version }}
|
||||
token: ${{ secrets.token }}
|
||||
metricsWriteAPIKey: ${{ secrets.metricsWriteAPIKey }}
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -61,6 +61,7 @@ public/css/*.min.css
|
||||
*.sublime-workspace
|
||||
*.swp
|
||||
.idea/
|
||||
.fleet/
|
||||
*.iml
|
||||
*.tmp
|
||||
.DS_Store
|
||||
@@ -130,6 +131,7 @@ pkg/cmd/grafana-server/__debug_bin
|
||||
/packages/**/.rpt2_cache
|
||||
/packages/**/tsdoc-metadata.json
|
||||
/packages/**/package.tgz
|
||||
/packages/grafana-toolkit/sass
|
||||
## CI places the packages in a different location
|
||||
/npm-artifacts/*.tgz
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ var config = {
|
||||
rootElement: '.main-view',
|
||||
// the unified alerting promotion alert's content contrast is too low
|
||||
// see https://github.com/grafana/grafana/pull/41829
|
||||
threshold: 4,
|
||||
threshold: 5,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/datasources',
|
||||
|
||||
303
CHANGELOG.md
303
CHANGELOG.md
@@ -1,3 +1,306 @@
|
||||
<!-- 9.2.1 START -->
|
||||
|
||||
# 9.2.1 (2022-10-18)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Improve notification policies created during migration. [#52071](https://github.com/grafana/grafana/pull/52071), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **AzureAD:** Add option to force fetch the groups from the Graph API. [#56916](https://github.com/grafana/grafana/pull/56916), [@gamab](https://github.com/gamab)
|
||||
- **AzureAD:** Add option to force fetch the groups from the Graph API (#56916). [#56947](https://github.com/grafana/grafana/pull/56947), [@gamab](https://github.com/gamab)
|
||||
- **Docs:** Note end of release notes publication. [#57013](https://github.com/grafana/grafana/pull/57013), [@gguillotte-grafana](https://github.com/gguillotte-grafana)
|
||||
- **Inspect:** Handle JSON tab crash when the provided object is too big to stringify. [#55939](https://github.com/grafana/grafana/pull/55939), [@TsotosA](https://github.com/TsotosA)
|
||||
- **TablePanel:** Footer now updates values on column filtering. [#56354](https://github.com/grafana/grafana/pull/56354), [@mdvictor](https://github.com/mdvictor)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix email image embedding on Windows. [#56766](https://github.com/grafana/grafana/pull/56766), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Alerting:** Fix mathexp.NoData for ConditionsCmd. [#56816](https://github.com/grafana/grafana/pull/56816), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Legacy Alerting:** Fix duration calculation when testing a rule. [#56616](https://github.com/grafana/grafana/pull/56616), [@jorgelbg](https://github.com/jorgelbg)
|
||||
- **Loki:** Propagate additional headers from Grafana to Loki when querying data. [#56896](https://github.com/grafana/grafana/pull/56896), [@alexweav](https://github.com/alexweav)
|
||||
- **Search:** Sort alphabetically in the folder view, increase the limit of the folder search from 50 to 1000. [#57141](https://github.com/grafana/grafana/pull/57141), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
|
||||
- **TablePanel:** Fix last table column to be centered. [#56047](https://github.com/grafana/grafana/pull/56047), [@gitstart](https://github.com/gitstart)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Grafana UI:** Export prop types for queryfield, modal and field components. [#57097](https://github.com/grafana/grafana/pull/57097), [@jackw](https://github.com/jackw)
|
||||
- **Toolkit:** Fix `Cannot use import statement outside...` error in tests. [#57071](https://github.com/grafana/grafana/pull/57071), [@jackw](https://github.com/jackw)
|
||||
|
||||
<!-- 9.2.1 END -->
|
||||
<!-- 9.2.0 START -->
|
||||
|
||||
# 9.2.0 (2022-10-11)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Add Notification error feedback on contact points view. [#56225](https://github.com/grafana/grafana/pull/56225), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Allow created by to be manually set when there's no creator for silences. [#55952](https://github.com/grafana/grafana/pull/55952), [@gotjosh](https://github.com/gotjosh)
|
||||
- **Alerting:** Expose info about notification delivery errors in a new /receivers endpoint. [#55429](https://github.com/grafana/grafana/pull/55429), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Alerting:** Update imported prometheus alertmanager version. [#56228](https://github.com/grafana/grafana/pull/56228), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Alerting:** Update imported prometheus alertmanager version. Backport (#56228). [#56430](https://github.com/grafana/grafana/pull/56430), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Alerting:** Write and Delete multiple alert instances. [#55350](https://github.com/grafana/grafana/pull/55350), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Core:** Implement aria attributes for query rows, improve a11y. [#55563](https://github.com/grafana/grafana/pull/55563), [@L-M-K-B](https://github.com/L-M-K-B)
|
||||
- **Custom Branding:** Remove custom branding service. (Enterprise)
|
||||
- **Custom branding:** Remove UI. (Enterprise)
|
||||
- **DevEnv:** Adds docker block for clickhouse. [#55702](https://github.com/grafana/grafana/pull/55702), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **Docker:** removes unneccesary use of edge repo. [#54567](https://github.com/grafana/grafana/pull/54567), [@xlson](https://github.com/xlson)
|
||||
- **Explore:** Revert split pane resize feature. [#56310](https://github.com/grafana/grafana/pull/56310), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Frontend:** Make local storage items propagate to different tabs immediately. [#55810](https://github.com/grafana/grafana/pull/55810), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
- **PublicDashboards:** Allow disabling an existent public dashboard if it …. [#55778](https://github.com/grafana/grafana/pull/55778), [@evictorero](https://github.com/evictorero)
|
||||
- **QueryEditorRow:** Only pass error to query editor if panel is not in a loading state. [#56350](https://github.com/grafana/grafana/pull/56350), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
- **Reports:** Refresh query variables on time range change. (Enterprise)
|
||||
- **XYChart:** Beta release. [#55973](https://github.com/grafana/grafana/pull/55973), [@mdvictor](https://github.com/mdvictor)
|
||||
- **[9.2.x] Alerting:** Start ticker only when scheduler starts (#56339). [#56418](https://github.com/grafana/grafana/pull/56418), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix pq: missing FROM-clause for table "a". [#56453](https://github.com/grafana/grafana/pull/56453), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **AzureMonitor:** Correctly update subscriptions value in ARG editor. [#55860](https://github.com/grafana/grafana/pull/55860), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Chore:** Fix swagger validation failures. (Enterprise)
|
||||
- **Chore:** Regenerate swagger specification and fix validation failures. [#55750](https://github.com/grafana/grafana/pull/55750), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Correlations:** Only return correlation for which both source and target datasources exist. [#55454](https://github.com/grafana/grafana/pull/55454), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Explore:** Prevent panes from disappearing when resizing window in split view. [#55696](https://github.com/grafana/grafana/pull/55696), [@gelicia](https://github.com/gelicia)
|
||||
- **Links:** Fix opening links from different orgs on the same tab. [#55837](https://github.com/grafana/grafana/pull/55837), [@guicaulada](https://github.com/guicaulada)
|
||||
- **LogContext:** Fix scroll position in upper context group. [#56370](https://github.com/grafana/grafana/pull/56370), [@svennergr](https://github.com/svennergr)
|
||||
- **Logs:** Show copy button independently from context. [#55934](https://github.com/grafana/grafana/pull/55934), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki/Prometheus:** Fix adding of ad hoc filters when jumping from dashboard to explore. [#55915](https://github.com/grafana/grafana/pull/55915), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki:** Add support for range aggregations with by grouping. [#56184](https://github.com/grafana/grafana/pull/56184), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki:** Fix label-value escaping in context query. [#56614](https://github.com/grafana/grafana/pull/56614), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Fix redundant escaping in adhoc filter with regex match. [#56447](https://github.com/grafana/grafana/pull/56447), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **PanelEdit:** Fixes resize pane border and spacing issues. [#56190](https://github.com/grafana/grafana/pull/56190), [@torkelo](https://github.com/torkelo)
|
||||
- **PublicDashboards:** Fix dashboard insights query when Public Dashboard feature is enabled. (Enterprise)
|
||||
- **PublicDashboards:** Fix dashboard insights query when Public Dashboard feature is enabled. (Enterprise)
|
||||
- **RBAC:** Redirect to /login when forceLogin is set. [#56469](https://github.com/grafana/grafana/pull/56469), [@sakjur](https://github.com/sakjur)
|
||||
- **SAML:** Fix RelayState generation function. (Enterprise)
|
||||
- **Security:** Fix CVE-2022-27664. [#55361](https://github.com/grafana/grafana/pull/55361), [@yong-jie-gong](https://github.com/yong-jie-gong)
|
||||
- **StateTimeline:** Fix tooltip showing erroneously in shared crosshair dashboards. [#55809](https://github.com/grafana/grafana/pull/55809), [@mdvictor](https://github.com/mdvictor)
|
||||
- **Tempo:** Fix unexpected trimming of leading zeroes in traceID. [#55167](https://github.com/grafana/grafana/pull/55167), [@hanjm](https://github.com/hanjm)
|
||||
- **Tracing:** Fix bug where errors are not reported to OpenTelemetry. [#55925](https://github.com/grafana/grafana/pull/55925), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
<!-- 9.2.0 END -->
|
||||
<!-- 9.2.0-beta1 START -->
|
||||
|
||||
# 9.2.0-beta1 (2022-09-26)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **AccessControl:** Move GetCacheKey to SignedInUser. [#53591](https://github.com/grafana/grafana/pull/53591), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **AccessControl:** Move GetCacheKey to SignedInUser. (Enterprise)
|
||||
- **Admin:** Add support to configure default admin email. [#54363](https://github.com/grafana/grafana/pull/54363), [@mhuangwm](https://github.com/mhuangwm)
|
||||
- **Admin:** Create/Edit Team/ServiceAccount UI changes. [#53889](https://github.com/grafana/grafana/pull/53889), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Alert list panel:** Add view mode "Stat". [#53281](https://github.com/grafana/grafana/pull/53281), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **Alerting:** Add alert preview to cloud rules editor. [#54950](https://github.com/grafana/grafana/pull/54950), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Add new API endpoint GET /api/v1/ngalert. [#55134](https://github.com/grafana/grafana/pull/55134), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Add templates autocomplete. [#53655](https://github.com/grafana/grafana/pull/53655), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Adds support for editing group details for Grafana managed rules. [#53120](https://github.com/grafana/grafana/pull/53120), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Change default alert state to Error on execution error or timeout. [#55345](https://github.com/grafana/grafana/pull/55345), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Display alert's 'Created' time in local time instead of UTC. [#54414](https://github.com/grafana/grafana/pull/54414), [@mmusenbr](https://github.com/mmusenbr)
|
||||
- **Alerting:** Improve Mimir AM interoperability with Grafana. [#53396](https://github.com/grafana/grafana/pull/53396), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Improve validation of query and expressions on rule submit. [#53258](https://github.com/grafana/grafana/pull/53258), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Read group details before saving. [#53586](https://github.com/grafana/grafana/pull/53586), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Resolve stale state. [#49352](https://github.com/grafana/grafana/pull/49352), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Support for re-ordering alert rules in a group. [#53318](https://github.com/grafana/grafana/pull/53318), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Update embedded Alertmanager v0.24. [#53555](https://github.com/grafana/grafana/pull/53555), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Update forking request handlers to use the same errors. [#52965](https://github.com/grafana/grafana/pull/52965), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Write and Delete multiple alert instances. [#52305](https://github.com/grafana/grafana/pull/52305), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Annotation:** Optionally allow storing longer annotation tags. [#54754](https://github.com/grafana/grafana/pull/54754), [@papagian](https://github.com/papagian)
|
||||
- **Auth:** Add SAML common resolutions to cookie issues. [#55395](https://github.com/grafana/grafana/pull/55395), [@Jguer](https://github.com/Jguer)
|
||||
- **Auth:** Add cli command users-manager for conflict resolution. [#52344](https://github.com/grafana/grafana/pull/52344), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Auth:** Add documentation on group overage claims in AzureAD. [#55389](https://github.com/grafana/grafana/pull/55389), [@Jguer](https://github.com/Jguer)
|
||||
- **Auth:** Extend auth token errors with user ID. [#54633](https://github.com/grafana/grafana/pull/54633), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Auth:** Reduce allocs in permission map. [#55410](https://github.com/grafana/grafana/pull/55410), [@Jguer](https://github.com/Jguer)
|
||||
- **Auth:** Restore legacy behavior and add deprecation notice for empty org role in oauth. [#55118](https://github.com/grafana/grafana/pull/55118), [@Jguer](https://github.com/Jguer)
|
||||
- **AzureMonitor:** Automate retrieval of supported Metrics namespaces. [#53203](https://github.com/grafana/grafana/pull/53203), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Build:** Replace the file-loader loader with asset module in webpack config. [#53088](https://github.com/grafana/grafana/pull/53088), [@academo](https://github.com/academo)
|
||||
- **Chore:** Group auth docker blocks. [#54274](https://github.com/grafana/grafana/pull/54274), [@linoman](https://github.com/linoman)
|
||||
- **Chore:** Upgrade Go to 1.19.1. [#54902](https://github.com/grafana/grafana/pull/54902), [@sakjur](https://github.com/sakjur)
|
||||
- **Cleanup:** Add traces to cleanup jobs. [#55465](https://github.com/grafana/grafana/pull/55465), [@sakjur](https://github.com/sakjur)
|
||||
- **CloudMonitor:** Remove cloudMonitoringExperimentalUI feature flag. [#55054](https://github.com/grafana/grafana/pull/55054), [@asimpson](https://github.com/asimpson)
|
||||
- **CloudWatch:** Add AWS/States metrics. [#55427](https://github.com/grafana/grafana/pull/55427), [@jangaraj](https://github.com/jangaraj)
|
||||
- **CloudWatch:** Add missing AWS/ApiGateway metrics. [#53839](https://github.com/grafana/grafana/pull/53839), [@jangaraj](https://github.com/jangaraj)
|
||||
- **CloudWatch:** Add missing AWS/Events metrics. [#53831](https://github.com/grafana/grafana/pull/53831), [@jangaraj](https://github.com/jangaraj)
|
||||
- **CloudWatch:** Enable feature adoption tracking in the plugin. [#54299](https://github.com/grafana/grafana/pull/54299), [@sunker](https://github.com/sunker)
|
||||
- **CloudWatch:** Log group variable should get all log groups. [#54062](https://github.com/grafana/grafana/pull/54062), [@iwysiu](https://github.com/iwysiu)
|
||||
- **CloudWatch:** Refactoring - decouple logs and metrics in datasource file. [#55079](https://github.com/grafana/grafana/pull/55079), [@sunker](https://github.com/sunker)
|
||||
- **Correlations:** Add GetCorrelation(s) HTTP APIs. [#52517](https://github.com/grafana/grafana/pull/52517), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Custom branding:** Add RBAC (early access). (Enterprise)
|
||||
- **Custom branding:** Add preview for the settings (early access). (Enterprise)
|
||||
- **Dashboard:** Support Variables in "Filter by Name" Transformation. [#51804](https://github.com/grafana/grafana/pull/51804), [@Kirchen99](https://github.com/Kirchen99)
|
||||
- **DashboardQuery:** Expand query options. [#53998](https://github.com/grafana/grafana/pull/53998), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Docs:** Deprecating packages_api and removing it from our pipelines. [#54473](https://github.com/grafana/grafana/pull/54473), [@tolzhabayev](https://github.com/tolzhabayev)
|
||||
- **Docs:** Update annotations API docs to include required field. [#52644](https://github.com/grafana/grafana/pull/52644), [@HarryTennent](https://github.com/HarryTennent)
|
||||
- **Echo:** Add support for Google Analytics 4. [#55446](https://github.com/grafana/grafana/pull/55446), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Elasticsearch:** Respect time range in ad hoc filters. [#53874](https://github.com/grafana/grafana/pull/53874), [@gabor](https://github.com/gabor)
|
||||
- **Explore:** Add Mixed Datasource. [#53429](https://github.com/grafana/grafana/pull/53429), [@gelicia](https://github.com/gelicia)
|
||||
- **Explore:** Add resize to split view, with Min/Max button. [#54420](https://github.com/grafana/grafana/pull/54420), [@gelicia](https://github.com/gelicia)
|
||||
- **Footer:** Add release notes url to version label. [#52909](https://github.com/grafana/grafana/pull/52909), [@kianelbo](https://github.com/kianelbo)
|
||||
- **Geomap:** Add Africa, Australia, Oceania, South Asia, and East Asia as initial view options. [#55142](https://github.com/grafana/grafana/pull/55142), [@zuchka](https://github.com/zuchka)
|
||||
- **Geomap:** Add dynamic initial view options. [#54419](https://github.com/grafana/grafana/pull/54419), [@drew08t](https://github.com/drew08t)
|
||||
- **Grafana Backend:** Establish a database version support policy. [#54374](https://github.com/grafana/grafana/pull/54374), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Grafana UI:** Add implicit submit to TimeRangeForm for A11y. [#52647](https://github.com/grafana/grafana/pull/52647), [@matejkubinec](https://github.com/matejkubinec)
|
||||
- **Grafana/ui:** Adds all unicons to IconName and script to generate types. [#53820](https://github.com/grafana/grafana/pull/53820), [@academo](https://github.com/academo)
|
||||
- **GrafanaUI:** Add icon to links on Plugin configuration page. [#55581](https://github.com/grafana/grafana/pull/55581), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **GrafanaUI:** Deprecate logs components. [#55364](https://github.com/grafana/grafana/pull/55364), [@gabor](https://github.com/gabor)
|
||||
- **GraphPanel:** Panel Description box does not expand to fit markdown table. [#54238](https://github.com/grafana/grafana/pull/54238), [@gitstart](https://github.com/gitstart)
|
||||
- **Icons:** Move unicons icons to the repository and generate the iconsBundle.js with nodejs. [#53766](https://github.com/grafana/grafana/pull/53766), [@academo](https://github.com/academo)
|
||||
- **InfluxDB:** Remove browser ('direct' access) mode. [#53529](https://github.com/grafana/grafana/pull/53529), [@obetomuniz](https://github.com/obetomuniz)
|
||||
- **JWT:** Add support for assigning org roles. [#54277](https://github.com/grafana/grafana/pull/54277), [@nrwiersma](https://github.com/nrwiersma)
|
||||
- **JWT:** Allow conventional bearer token in Authorization header. [#54821](https://github.com/grafana/grafana/pull/54821), [@nrwiersma](https://github.com/nrwiersma)
|
||||
- **Live:** Migrate to centrifuge-js v3 (new API and client protocol). [#51977](https://github.com/grafana/grafana/pull/51977), [@FZambia](https://github.com/FZambia)
|
||||
- Load icons using webpack context instead of react-inlinesvg library. [#53675](https://github.com/grafana/grafana/pull/53675), [@academo](https://github.com/academo)
|
||||
- **Login:** Allow basic users to reset password when LDAP or Auth Proxy is enabled. [#52331](https://github.com/grafana/grafana/pull/52331), [@krzysdabro](https://github.com/krzysdabro)
|
||||
- **Login:** Remove single admin team restriction. [#54534](https://github.com/grafana/grafana/pull/54534), [@linoman](https://github.com/linoman)
|
||||
- **Logs:** Relocate "show context" button, add copy line log button. [#50977](https://github.com/grafana/grafana/pull/50977), [@Seyaji](https://github.com/Seyaji)
|
||||
- **Loki Query Variables:** Add support to select from existing labels. [#54625](https://github.com/grafana/grafana/pull/54625), [@matyax](https://github.com/matyax)
|
||||
- **Loki/Prometheus:** Make sections in log/metrics browser resizable. [#54704](https://github.com/grafana/grafana/pull/54704), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki/Prometheus:** Remove beta tag from query builder. [#55150](https://github.com/grafana/grafana/pull/55150), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki:** Add validation to derived fields url field setting. [#53599](https://github.com/grafana/grafana/pull/53599), [@matyax](https://github.com/matyax)
|
||||
- **Loki:** Create Variable Query Editor for Loki. [#54102](https://github.com/grafana/grafana/pull/54102), [@matyax](https://github.com/matyax)
|
||||
- **MSSQL:** Migrate to React. [#51765](https://github.com/grafana/grafana/pull/51765), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Metrics:** Instrument requests not matching any handler as `notfound`. [#53949](https://github.com/grafana/grafana/pull/53949), [@bergquist](https://github.com/bergquist)
|
||||
- **Navigation Bar:** Remove plugins link under Server Admin. [#54386](https://github.com/grafana/grafana/pull/54386), [@academo](https://github.com/academo)
|
||||
- **Navigation:** Don't round app plugin icon images. [#54543](https://github.com/grafana/grafana/pull/54543), [@joshhunt](https://github.com/joshhunt)
|
||||
- **OAuth:** Allow assigning Server Admin. [#54780](https://github.com/grafana/grafana/pull/54780), [@Jguer](https://github.com/Jguer)
|
||||
- **Panel edit:** Run queries when time range changes in table view. [#53111](https://github.com/grafana/grafana/pull/53111), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Panels:** Add panel debug support helper. [#54678](https://github.com/grafana/grafana/pull/54678), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Playlists:** Migrate to UIDs and load dashboards in the frontend. [#54125](https://github.com/grafana/grafana/pull/54125), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Plugins:** Add feature toggles for long running queries. [#54349](https://github.com/grafana/grafana/pull/54349), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
- **Plugins:** Add secure JSON fields to plugin setting DTO. [#55313](https://github.com/grafana/grafana/pull/55313), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Plugins:** Handle app plugin proxy routes per request. [#51835](https://github.com/grafana/grafana/pull/51835), [@marefr](https://github.com/marefr)
|
||||
- **Plugins:** Use error plane for api/ds/query. [#54750](https://github.com/grafana/grafana/pull/54750), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Preferences:** Support setting any dashboard as home, not just the starred ones. [#54258](https://github.com/grafana/grafana/pull/54258), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Prometheus:** Add dashboard uid when tracing header in browsermode. [#53232](https://github.com/grafana/grafana/pull/53232), [@lpskdl](https://github.com/lpskdl)
|
||||
- **Prometheus:** Throw error on direct access. [#50162](https://github.com/grafana/grafana/pull/50162), [@aocenas](https://github.com/aocenas)
|
||||
- **Prometheus:** Upgrades http client to 1.30. [#53901](https://github.com/grafana/grafana/pull/53901), [@bergquist](https://github.com/bergquist)
|
||||
- **Prometheus:** Upgrades the prometheus http client to 1.13. [#47707](https://github.com/grafana/grafana/pull/47707), [@yesoreyeram](https://github.com/yesoreyeram)
|
||||
- **PublicDashboard:** Add RTK Query with loading and error state. Add MSW dependency for testing. [#55518](https://github.com/grafana/grafana/pull/55518), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Add RBAC to secured endpoints. [#54544](https://github.com/grafana/grafana/pull/54544), [@evictorero](https://github.com/evictorero)
|
||||
- **PublicDashboards:** Add link to public dashboards docs to sharing modal. [#55186](https://github.com/grafana/grafana/pull/55186), [@guicaulada](https://github.com/guicaulada)
|
||||
- **PublicDashboards:** Disable form when user does not has permissions. [#54853](https://github.com/grafana/grafana/pull/54853), [@evictorero](https://github.com/evictorero)
|
||||
- **PublicDashboards:** Dont support exemplars. [#54933](https://github.com/grafana/grafana/pull/54933), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **PublicDashboards:** Ignore time range input and changes on public dashboard. [#55412](https://github.com/grafana/grafana/pull/55412), [@guicaulada](https://github.com/guicaulada)
|
||||
- **PublicDashboards:** Log api layer errors and which datasources fail/succeed. [#55056](https://github.com/grafana/grafana/pull/55056), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **PublicDashboards:** Render tag when dashboard meta changes in state. [#55414](https://github.com/grafana/grafana/pull/55414), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **PublicDashboards:** Resolve interval for public dashboard data source. [#55489](https://github.com/grafana/grafana/pull/55489), [@guicaulada](https://github.com/guicaulada)
|
||||
- **PublicDashboards:** Sanitize metadata from public dashboard queries. [#55269](https://github.com/grafana/grafana/pull/55269), [@guicaulada](https://github.com/guicaulada)
|
||||
- **PublicDashboards:** UI improvements. [#55130](https://github.com/grafana/grafana/pull/55130), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **Query editor:** Allow query editors to create new query. [#55028](https://github.com/grafana/grafana/pull/55028), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **RBAC:** Add cache for oss rbac permissions. [#55098](https://github.com/grafana/grafana/pull/55098), [@kalleep](https://github.com/kalleep)
|
||||
- **RBAC:** Add endpoints for reading and updating role assignments. (Enterprise)
|
||||
- **RBAC:** Add permissions to install and configure plugins. [#51829](https://github.com/grafana/grafana/pull/51829), [@gamab](https://github.com/gamab)
|
||||
- **RBAC:** Display indicator if a permission is inherited. [#54080](https://github.com/grafana/grafana/pull/54080), [@kalleep](https://github.com/kalleep)
|
||||
- **RBAC:** Only display unique permissions in list. [#54074](https://github.com/grafana/grafana/pull/54074), [@kalleep](https://github.com/kalleep)
|
||||
- **RBAC:** Refactor delegation check to reduce db queries. (Enterprise)
|
||||
- **RBAC:** Validate scopes during role creation. (Enterprise)
|
||||
- **Report:** Keep report data on edit page refresh. (Enterprise)
|
||||
- **Reports:** Allow CSV only option. (Enterprise)
|
||||
- **Reports:** Render steps inside ReportPage. (Enterprise)
|
||||
- **SAML:** Account for all orgs in org_mapping. (Enterprise)
|
||||
- **SAML:** Add option to skip org role sync. [#55230](https://github.com/grafana/grafana/pull/55230), [@gamab](https://github.com/gamab)
|
||||
- **SAML:** Add option to skip org role sync. (Enterprise)
|
||||
- **SAML:** Allow wildcard mapping to add user to all existing orgs. [#55628](https://github.com/grafana/grafana/pull/55628), [@gamab](https://github.com/gamab)
|
||||
- **SAML:** Do not SAML SLO if user is not SAML authenticated. [#53418](https://github.com/grafana/grafana/pull/53418), [@Jguer](https://github.com/Jguer)
|
||||
- **SAML:** Improve SAML login flow. (Enterprise)
|
||||
- **SQL:** Migrate (MS/My/Postgres)SQL configuration pages from Angular to React. [#51891](https://github.com/grafana/grafana/pull/51891), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
- **Search:** Migrated impressions to use dashboardUID. [#53090](https://github.com/grafana/grafana/pull/53090), [@lpskdl](https://github.com/lpskdl)
|
||||
- **Secrets:** Add fallback to secrets kvstore plugin. [#54056](https://github.com/grafana/grafana/pull/54056), [@guicaulada](https://github.com/guicaulada)
|
||||
- **Secrets:** Convert secret migration to a background service. [#54676](https://github.com/grafana/grafana/pull/54676), [@guicaulada](https://github.com/guicaulada)
|
||||
- **Secrets:** Implement secrets manager plugin fallback store. [#54496](https://github.com/grafana/grafana/pull/54496), [@guicaulada](https://github.com/guicaulada)
|
||||
- **Secrets:** Improve error handling for secrets manager plugin. [#54811](https://github.com/grafana/grafana/pull/54811), [@guicaulada](https://github.com/guicaulada)
|
||||
- **SegmentInput:** Omit allowCustomValue and allowEmptyValue props. [#55352](https://github.com/grafana/grafana/pull/55352), [@timagixe](https://github.com/timagixe)
|
||||
- **Status History Panel:** Show X-Axis Value in Tooltip. [#54563](https://github.com/grafana/grafana/pull/54563), [@gitstart](https://github.com/gitstart)
|
||||
- **TeamSync:** Add description to group mapping. (Enterprise)
|
||||
- **TeamSync:** Prevent team syncing out of orgs mapped by auth method. (Enterprise)
|
||||
- **Teams:** Add TeamRolePicker to the Create and Edit Team pages. [#53775](https://github.com/grafana/grafana/pull/53775), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Tempo:** Set the default query type even if queryType was set to 'clear'. [#53887](https://github.com/grafana/grafana/pull/53887), [@CrypticSignal](https://github.com/CrypticSignal)
|
||||
- **Tempo:** Wrap the autocomplete value for a tag in double quotes. [#55610](https://github.com/grafana/grafana/pull/55610), [@CrypticSignal](https://github.com/CrypticSignal)
|
||||
- **TextPanel:** Support code formats. [#53850](https://github.com/grafana/grafana/pull/53850), [@ryantxu](https://github.com/ryantxu)
|
||||
- **TimeRangePicker:** Absolute timeranges with timezone. [#53763](https://github.com/grafana/grafana/pull/53763), [@mdvictor](https://github.com/mdvictor)
|
||||
- **TimeSeries:** Support for log scale and negative numbers. [#54812](https://github.com/grafana/grafana/pull/54812), [@leeoniya](https://github.com/leeoniya)
|
||||
- **TopNav:** Panel edit changes. [#54746](https://github.com/grafana/grafana/pull/54746), [@torkelo](https://github.com/torkelo)
|
||||
- **Tracing:** Add new [tracing.opentelemetry] custom_attributes config setting. [#54110](https://github.com/grafana/grafana/pull/54110), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Transformations:** Add support for an inner join transformation. [#53865](https://github.com/grafana/grafana/pull/53865), [@AlexKaracaoglu](https://github.com/AlexKaracaoglu)
|
||||
- **Transformers:** Support inner vs outer join. [#53913](https://github.com/grafana/grafana/pull/53913), [@ryantxu](https://github.com/ryantxu)
|
||||
- **User management:** Use HMAC-SHA256 to generate time limit codes (password reset tokens). [#42334](https://github.com/grafana/grafana/pull/42334), [@andreasgerstmayr](https://github.com/andreasgerstmayr)
|
||||
- **UsersTable:** Display Disabled flag in Organizations' Users table. [#53656](https://github.com/grafana/grafana/pull/53656), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Various Panels:** Add ability to toggle legend with keyboard shortcut. (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** AlertingProxy to elevate permissions for request forwarded to data proxy when RBAC enabled. [#53620](https://github.com/grafana/grafana/pull/53620), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Auth:** Allow admins to manually change external user's role if `oauth_skip_org_role_update_sync` or saml `skip_org_role_sync` is enabled. [#55182](https://github.com/grafana/grafana/pull/55182), [@Jguer](https://github.com/Jguer)
|
||||
- **AuthNZ:** Security fixes for CVE-2022-35957 and CVE-2022-36062. [#55503](https://github.com/grafana/grafana/pull/55503), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **ContextHandler:** Use standard library style middleware. [#54219](https://github.com/grafana/grafana/pull/54219), [@sakjur](https://github.com/sakjur)
|
||||
- **ElasticSearch:** Fix lucene formatted variables being wrongly escaped. [#54981](https://github.com/grafana/grafana/pull/54981), [@svennergr](https://github.com/svennergr)
|
||||
- **FIX:** RBAC prevents deleting empty snapshots. [#54385](https://github.com/grafana/grafana/pull/54385), [@gamab](https://github.com/gamab)
|
||||
- **Fix:** Adjusting plugin.json schema regex. [#54515](https://github.com/grafana/grafana/pull/54515), [@tolzhabayev](https://github.com/tolzhabayev)
|
||||
- **Fix:** Wrong swagger meta preventing spec generation. [#54181](https://github.com/grafana/grafana/pull/54181), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **Histogram:** Fix panel hide when clicking on legend. [#53651](https://github.com/grafana/grafana/pull/53651), [@mdvictor](https://github.com/mdvictor)
|
||||
- **Loki:** Hide loki sample queries from query inspector. [#55158](https://github.com/grafana/grafana/pull/55158), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Query Builder:** Fix spelling of "lose" in user visible message. [#53435](https://github.com/grafana/grafana/pull/53435), [@spazm](https://github.com/spazm)
|
||||
- **RBAC:** Fix resolver issue on wildcard resulting in wrong status code for endpoints. [#54208](https://github.com/grafana/grafana/pull/54208), [@kalleep](https://github.com/kalleep)
|
||||
- **Reports:** Fix starting value. (Enterprise)
|
||||
- **StatPanel:** Add padding between horizontal name and value. [#55299](https://github.com/grafana/grafana/pull/55299), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **TablePanel:** Fix FooterRow styling for Safari and Firefox. [#55543](https://github.com/grafana/grafana/pull/55543), [@mdvictor](https://github.com/mdvictor)
|
||||
- **TablePanel:** Fix vertical scrollbar. [#53457](https://github.com/grafana/grafana/pull/53457), [@mdvictor](https://github.com/mdvictor)
|
||||
- **Tempo:** Fix typo in the tooltip for "Limit". [#53750](https://github.com/grafana/grafana/pull/53750), [@CrypticSignal](https://github.com/CrypticSignal)
|
||||
- **Transformations:** Fix clearing of transformation select fields. [#53916](https://github.com/grafana/grafana/pull/53916), [@AlexKaracaoglu](https://github.com/AlexKaracaoglu)
|
||||
- **Various Panels:** Fix Single right-aligned y-axis hiding gridlines. [#54206](https://github.com/grafana/grafana/pull/54206), [@gitstart](https://github.com/gitstart)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
Dashboards: Remove the ability to open dashboard settings while panel edit is still open. Issue [#54746](https://github.com/grafana/grafana/issues/54746)
|
||||
|
||||
In InfluxDB, browser access mode was deprecated in Grafana 8.0.0 and removed in 9.2.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue [#53529](https://github.com/grafana/grafana/issues/53529)
|
||||
|
||||
In Prometheus, browser access mode was deprecated in Grafana 7.4.0 and removed in 9.2.0. If you used this mode, please switch to server access mode on the datasource configuration page. Issue [#50162](https://github.com/grafana/grafana/issues/50162)
|
||||
|
||||
Password reset links sent before the upgrade will no longer work and have to be resent. Since the duration of those links are only two hours we decided to not support both token formats. Issue [#42334](https://github.com/grafana/grafana/issues/42334)
|
||||
|
||||
### Deprecations
|
||||
|
||||
Google Analytics 'Universal Analytics' is deprecated by Google in favor of Google Analytics 4. See [Google's deprecation notice](https://support.google.com/analytics/answer/10089681?hl=en) for more details. After July 2023, Grafana's Google Analytics 'Universal Analytics' integration will be removed, along with the `analytics.google_analytics_ua_id` server config property. Configure Google Analytics 4 using the `analytics.google_analytics_4_id` server config property.
|
||||
Issue [#55446](https://github.com/grafana/grafana/issues/55446)
|
||||
|
||||
The following components and functions related to logs are deprecated in the `grafana-ui` package: `LogLabels`, `LogMessageAnsi`, `LogRows`, `getLogRowStyles`.
|
||||
Issue [#55364](https://github.com/grafana/grafana/issues/55364)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **GrafanaUI:** Add required behavior to Inline Field. [#54867](https://github.com/grafana/grafana/pull/54867), [@gefgu](https://github.com/gefgu)
|
||||
- **CustomScrollbar:** Add optional scroll indicators to `CustomScrollbar`. [#54705](https://github.com/grafana/grafana/pull/54705), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Build:** Introduce ESM and Treeshaking to NPM package builds. [#51517](https://github.com/grafana/grafana/pull/51517), [@jackw](https://github.com/jackw)
|
||||
|
||||
<!-- 9.1.7 START -->
|
||||
|
||||
# 9.1.7 (2022-10-04)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Upgrade Go version to 1.19.1 (backport). [#55733](https://github.com/grafana/grafana/pull/55733), [@sakjur](https://github.com/sakjur)
|
||||
- **CloudWatch:** Add missing AWS/Prometheus metrics. [#54990](https://github.com/grafana/grafana/pull/54990), [@jangaraj](https://github.com/jangaraj)
|
||||
- **Explore:** Add feature tracking events. [#54514](https://github.com/grafana/grafana/pull/54514), [@L-M-K-B](https://github.com/L-M-K-B)
|
||||
- **Graphite:** Add error information to graphite queries tracing. [#55249](https://github.com/grafana/grafana/pull/55249), [@jesusvazquez](https://github.com/jesusvazquez)
|
||||
- **Prometheus:** Restore FromAlert header. [#55255](https://github.com/grafana/grafana/pull/55255), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **SAML:** Account for all orgs in org_mapping (#3855). (Enterprise)
|
||||
- **Search:** Add search index configuration options. [#55525](https://github.com/grafana/grafana/pull/55525), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
|
||||
- **Thresholds:** Add option for dashed line style. [#55875](https://github.com/grafana/grafana/pull/55875), [@leeoniya](https://github.com/leeoniya)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix default query's data source when no default datasource specified. [#55435](https://github.com/grafana/grafana/pull/55435), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Fix mathexp.NoData cannot be reduced. [#55347](https://github.com/grafana/grafana/pull/55347), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Skip unsupported file types on provisioning. [#55573](https://github.com/grafana/grafana/pull/55573), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||
- **AzureMonitor:** Ensure resourceURI template variable is migrated. [#56095](https://github.com/grafana/grafana/pull/56095), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Dashboard:** Fix plugin dashboard save as button. [#55197](https://github.com/grafana/grafana/pull/55197), [@lpskdl](https://github.com/lpskdl)
|
||||
- **Docs:** Fix decimals: auto docs for panel edit. [#55477](https://github.com/grafana/grafana/pull/55477), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Fix:** RBAC handle `error no resolver` found. [#55676](https://github.com/grafana/grafana/pull/55676), [@gamab](https://github.com/gamab)
|
||||
- **Fix:** RBAC handle `error no resolver` found. (Enterprise)
|
||||
- **LibraryPanelSearch:** Refactor and fix hyphen issue. [#55314](https://github.com/grafana/grafana/pull/55314), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Live:** Fix live streaming with `live-service-web-worker` feature flag enabled. [#55528](https://github.com/grafana/grafana/pull/55528), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
|
||||
- **QueryField:** Fix wrong cursor position on autocomplete. [#55576](https://github.com/grafana/grafana/pull/55576), [@svennergr](https://github.com/svennergr)
|
||||
|
||||
<!-- 9.1.7 END -->
|
||||
<!-- 9.2.0-beta1 END -->
|
||||
<!-- 9.1.6 START -->
|
||||
|
||||
# 9.1.6 (2022-09-20)
|
||||
|
||||
@@ -20,7 +20,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.19.1-alpine3.15 as go-builder
|
||||
FROM golang:1.19.2-alpine3.15 as go-builder
|
||||
|
||||
RUN apk add --no-cache gcc g++ make
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.19.1 AS go-builder
|
||||
FROM golang:1.19.2 AS go-builder
|
||||
|
||||
WORKDIR /src/grafana
|
||||
|
||||
|
||||
@@ -541,6 +541,7 @@ allowed_domains =
|
||||
allowed_groups =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
force_use_graph_api = false
|
||||
|
||||
#################################### Okta OAuth #######################
|
||||
[auth.okta]
|
||||
@@ -632,6 +633,7 @@ allow_assign_grafana_admin = false
|
||||
enabled = false
|
||||
config_file = /etc/grafana/ldap.toml
|
||||
allow_sign_up = true
|
||||
skip_org_role_sync = false
|
||||
|
||||
# LDAP background sync (Enterprise only)
|
||||
# At 1 am every day
|
||||
|
||||
@@ -56,6 +56,7 @@ apiVersion: 1
|
||||
# # <string> state of the alert rule when the query execution
|
||||
# # fails - possible values: "Error", "Alerting", "OK"
|
||||
# # default = Alerting
|
||||
# executionErrorState: Alerting
|
||||
# # <duration, required> how long the alert condition should be breached before Firing. Before this time has elapsed, the alert is considered to be Pending
|
||||
# for: 60s
|
||||
# # <map<string, string>> map of strings to attach arbitrary custom data
|
||||
|
||||
@@ -623,6 +623,8 @@
|
||||
;enabled = false
|
||||
;config_file = /etc/grafana/ldap.toml
|
||||
;allow_sign_up = true
|
||||
# prevent synchronizing ldap users organization roles
|
||||
;skip_org_role_sync = false
|
||||
|
||||
# LDAP background sync (Enterprise only)
|
||||
# At 1 am every day
|
||||
|
||||
3872
devenv/dev-dashboards/panel-canvas/canvas-examples.json
Normal file
3872
devenv/dev-dashboards/panel-canvas/canvas-examples.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -125,8 +125,8 @@ async function main() {
|
||||
await sleep(getNextSineWaveSleepDuration());
|
||||
const timestampMs = new Date().getTime();
|
||||
const item = getRandomLogItem(step + 1)
|
||||
lokiSendLogLine(timestampMs, JSON.stringify(item), {place:'moon', source: 'data'});
|
||||
lokiSendLogLine(timestampMs, logFmtLine(item), {place:'luna', source: 'data'});
|
||||
lokiSendLogLine(timestampMs, JSON.stringify(item), {place:'moon', source: 'data', instance: 'server\\1', job: '"grafana/data"'});
|
||||
lokiSendLogLine(timestampMs, logFmtLine(item), {place:'luna', source: 'data', instance: 'server\\2', job: '"grafana/data"'});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,15 +55,15 @@ title: Grafana documentation
|
||||
<h4>Getting started</h4>
|
||||
<p>Learn the basics of using Grafana.</p>
|
||||
</a>
|
||||
<a href="{{< relref "basics/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Grafana basics</h4>
|
||||
<a href="{{< relref "fundamentals/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Grafana fundamentals</h4>
|
||||
<p>Learn basic observability.</p>
|
||||
</a>
|
||||
<a href="{{< relref "setup-grafana/configure-grafana/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Configure Grafana</h4>
|
||||
<p>Review the configuration and setup options.</p>
|
||||
</a>
|
||||
<a href="{{< relref "basics/timeseries/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<a href="{{< relref "fundamentals/timeseries/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Intro to time series</h4>
|
||||
<p>Learn about time series data.</p>
|
||||
</a>
|
||||
@@ -71,8 +71,8 @@ title: Grafana documentation
|
||||
<h4>Provisioning</h4>
|
||||
<p>Learn how to automate your Grafana configuration.</p>
|
||||
</a>
|
||||
<a href="{{< relref "whatsnew/whats-new-in-v9-1/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v9.1</h4>
|
||||
<a href="{{< relref "whatsnew/whats-new-in-v9-2/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v9.2</h4>
|
||||
<p>Explore the features and enhancements in the latest release.</p>
|
||||
</a>
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ aliases:
|
||||
- /docs/grafana/latest/enterprise/license-restrictions/
|
||||
- /docs/grafana/latest/enterprise/license/license-restrictions/
|
||||
- /docs/grafana/latest/administration/enterprise-licensing/
|
||||
- /docs/grafana/latest/administration/enterprise-licensing/license-restrictions/
|
||||
description: Activate and manage a Grafana Enterprise license
|
||||
keywords:
|
||||
- grafana
|
||||
|
||||
@@ -111,4 +111,4 @@ In this task you configure Grafana Enterprise to validate the license with AWS i
|
||||
1. To restart Grafana and activate your license, update the service running Grafana to use the latest revision of the task definition that you created.
|
||||
1. After you update the service, navigate to your Grafana instance, sign in with Grafana Admin credentials, and navigate to the **Statistics and Licensing** page to validate that your license is active.
|
||||
|
||||
For more information about validating that your license is active, refer to [Determine the number of active users for each licensed role](../../license-restrictions/#determine-the-number-of-active-users-for-each-licensed-role).
|
||||
For more information about validating that your license is active, refer to [Grafana Enterprise license restrictions]({{< relref "../../#grafana-enterprise-license-restrictions" >}}).
|
||||
|
||||
@@ -319,7 +319,7 @@ Note: The JSON definition in the input field when using `Copy JSON to Clipboard`
|
||||
|
||||
### Reusable Dashboard URLs
|
||||
|
||||
If the dashboard in the JSON file contains an [UID]({{< relref "../../dashboards/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.
|
||||
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.
|
||||
|
||||
@@ -852,7 +852,7 @@ policies:
|
||||
# <duration> How long to wait before sending a notification about new alerts that
|
||||
# are added to a group of alerts for which an initial notification has
|
||||
# already been sent. (Usually ~5m or more), default = 5m
|
||||
group_internval: 5m
|
||||
group_interval: 5m
|
||||
# <duration> How long to wait before sending a notification again if it has already
|
||||
# been sent successfully for an alert. (Usually ~3h or more), default = 4h
|
||||
repeat_interval: 4h
|
||||
|
||||
@@ -78,7 +78,7 @@ Grafana Enterprise includes the ability for you to assign discrete fixed roles t
|
||||
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/annotations/" >}})
|
||||
- [Annotations]({{< relref "../../../dashboards/build-dashboards/annotate-visualizations" >}})
|
||||
- [API keys]({{< relref "../../api-keys/" >}})
|
||||
- [Dashboards and folders]({{< relref "../../../dashboards/" >}})
|
||||
- [Data sources]({{< relref "../../../datasources/" >}})
|
||||
|
||||
@@ -17,6 +17,8 @@ A user can be a Member or an Administrator for a given team. Members of a team i
|
||||
|
||||
For more information about teams, refer to [Teams and permissions]({{< relref "../roles-and-permissions/#teams-and-permissions" >}}).
|
||||
|
||||
For information about how to optimize your teams, refer to [How to best organize your teams and resources in Grafana](https://grafana.com/blog/2022/03/14/how-to-best-organize-your-teams-and-resources-in-grafana/).
|
||||
|
||||
## Create a team
|
||||
|
||||
A team is a group of users within an organization that have common dashboard and data source permission needs. Use teams to help make user-permission management more efficient.
|
||||
|
||||
@@ -9,16 +9,16 @@ keywords:
|
||||
- alerting
|
||||
- alerts
|
||||
- groups
|
||||
title: View alert groupings
|
||||
title: View alert groups
|
||||
weight: 445
|
||||
---
|
||||
|
||||
# View alert groupings
|
||||
# View alert groups
|
||||
|
||||
To view alert groupings:
|
||||
To view alert groups:
|
||||
|
||||
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
|
||||
1. Click **Alert grouping** to open the page listing existing groups.
|
||||
1. Click **Alert groups** to open the page listing existing groups.
|
||||
1. From the **Alertmanager** drop-down, select an external Alertmanager as your data source. By default, the `Grafana` Alertmanager is selected.
|
||||
1. From **custom group by** drop-down, select a combination of labels to view a grouping other than the default. This is useful for debugging and verifying your grouping of notification policies.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Watch this video to learn more about creating alerts: {{< vimeo 720001934 >}}
|
||||
1. Click **New alert rule**. The new alerting rule page opens where the Grafana managed alerts option is selected by default.
|
||||
1. In Step 1, add queries and expressions to evaluate, and then select the alert condition.
|
||||
- For queries, select a data source from the drop-down.
|
||||
- Add one or more [queries]({{< relref "../../panels/query-a-data-source/add-a-query/" >}}) or [expressions]({{< relref "../../panels/query-a-data-source/use-expressions-to-manipulate-data/about-expressions/" >}}).
|
||||
- Add one or more [queries]({{< relref "../../panels-visualizations/query-transform-data/#add-a-query/" >}}) or [expressions]({{< relref "../../panels-visualizations/query-transform-data/expression-queries/" >}}).
|
||||
- For each expression, select either **Classic condition** to create a single alert rule, or choose from **Math**, **Reduce**, **Resample** options to generate separate alert for each series. For details on these options, see [Single and multi dimensional rule](#single-and-multi-dimensional-rule).
|
||||
- Click **Run queries** to verify that the query is successful.
|
||||
- Next, select the query or expression for your alert condition.
|
||||
@@ -67,7 +67,7 @@ To generate a separate alert for each series, create a multi-dimensional rule. U
|
||||
|
||||
#### Rule with classic condition
|
||||
|
||||
For more information, see [expressions documentation]({{< relref "../../panels/query-a-data-source/use-expressions-to-manipulate-data/about-expressions/" >}}).
|
||||
For more information, see [expressions documentation]({{< relref "../../panels-visualizations/query-transform-data/expression-queries/" >}}).
|
||||
|
||||
### No data and error handling
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ Grafana allows you to create alerting rules for an external Grafana Mimir or Lok
|
||||
|
||||
- **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 [legacy `/api/prom` prefix](https://grafana.com/docs/mimir/latest/operators-guide/reference-http-api/#path-prefixes), not `/prometheus`. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](https://grafana.com/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](https://grafana.com/docs/mimir/latest/operators-guide/reference-http-api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
|
||||
- **Grafana Mimir** - use the `/prometheus` prefix. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](https://grafana.com/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](https://grafana.com/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 >}}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Grafana supports several alert rule types, the following sections will explain t
|
||||
|
||||
Grafana-managed rules are the most flexible alert rule type. They allow you to create alerts that can act on data from any of your existing data sources.
|
||||
|
||||
In additional to supporting any datasource you can also add additional [expressions]({{< relref "../../../panels/query-a-data-source/use-expressions-to-manipulate-data/" >}}) to transform your data and express alert conditions.
|
||||
In additional to supporting any datasource you can also add additional [expressions]({{< relref "../../../panels-visualizations/query-transform-data/expression-queries/" >}}) to transform your data and express alert conditions.
|
||||
|
||||
## Mimir, Loki and Cortex rules
|
||||
|
||||
|
||||
@@ -9,34 +9,34 @@ weight: 116
|
||||
|
||||
# Alertmanager
|
||||
|
||||
The Alertmanager helps both group and manage alert rules, adding a layer of orchestration on top of the alerting engines. To learn more, see [Prometheus Alertmanager documentation](https://prometheus.io/docs/alerting/latest/alertmanager/).
|
||||
Alertmanager enables you to quickly and efficiently manage and respond to alerts. It receives alerts, handles silencing, inhibition, grouping, and routing by sending notifications out via your channel of choice, for example, email or Slack.
|
||||
|
||||
Grafana includes built-in support for Prometheus Alertmanager. By default, notifications for Grafana managed alerts are handled by the embedded Alertmanager that is part of core Grafana. You can configure the Alertmanager's contact points, notification policies, silences, and templates from the alerting UI by selecting the `Grafana` option from the Alertmanager drop-down.
|
||||
In Grafana, you can use the Cloud Alertmanager, Grafana Alertmanager, or an external Alertmanager. You can also run multiple alertmanagers; your decision depends on your set up and where your alerts are being generated.
|
||||
|
||||
> **Note:** Before v8.2, the configuration of the embedded Alertmanager was shared across organizations. If you are on an older Grafana version, we recommend that you use Grafana alerts only if you have one organization. Otherwise, your contact points are visible to all organizations.
|
||||
**Cloud Alertmanager**
|
||||
|
||||
Grafana Alerting added support for external Alertmanager configuration. When you add an [Alertmanager data source]({{< relref "../../datasources/alertmanager/" >}}), the Alertmanager drop-down shows a list of available external Alertmanager data sources. Select a data source to create and manage alerting for standalone Grafana Mimir or Loki data sources.
|
||||
Cloud Alertmanager runs in Grafana Cloud and it can receive alerts from Grafana, Mimir, and Loki.
|
||||
|
||||
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" max-width="250px" caption="Select Alertmanager" >}}
|
||||
**Grafana Alertmanager**
|
||||
|
||||
You can configure one or several external Alertmanagers to receive alerts from Grafana. Once configured, both the embedded Alertmanager **and** any configured external Alertmanagers will receive _all_ alerts.
|
||||
Grafana Alertmanager is an internal Alertmanager that is pre-configured and available for selection by default if you run Grafana on-premise or open-source.
|
||||
|
||||
You can do the setup in the "Admin" tab within the Grafana v8 Alerts UI.
|
||||
The Grafana Alertmanager can receive alerts from Grafana, but it cannot receive alerts from outside Grafana, for example, from Mimir or Loki.
|
||||
|
||||
### Add a new external Alertmanager
|
||||
**External Alertmanager**
|
||||
|
||||
1. In the Grafana menu, click the Alerting (bell) icon to open the Alerting page listing existing alerts.
|
||||
2. Click **Admin** and then scroll down to the External Alertmanager section.
|
||||
3. Click **Add Alertmanager** and a modal opens.
|
||||
4. Add the URL and the port for the external Alertmanager. You do not need to specify the path suffix, for example, `/api/v(1|2)/alerts`. Grafana automatically adds this.
|
||||
If you want to use a single alertmanager to receive all your Grafana, Loki, Mimir, and Prometheus alerts, you can set up Grafana to use an external Alertmanager. This external Alertmanager can be configured and administered from within Grafana itself.
|
||||
|
||||
The external URL is listed in the table with a pending status. Once Grafana verifies that the Alertmanager is discovered, the status changes to active. No requests are made to the external Alertmanager at this point; the verification signals that alerts are ready to be sent.
|
||||
Here are two examples of when you may want to configure your own external alertmanager and send your alerts there instead of the Grafana Alertmanager:
|
||||
|
||||
### Edit an external Alertmanager
|
||||
1. You may already have alertmanagers on-premise in your own Cloud infrastructure that you have set up and still want to use, because you have other alert generators, such as Prometheus.
|
||||
|
||||
1. Click the pen symbol to the right of the Alertmanager row in the table.
|
||||
2. When the edit modal opens, you can view all the URLs that were added.
|
||||
2. You want to use both Prometheus on-premise and hosted Grafana to send alerts to the same alertmanager that runs in your Cloud infrastructure.
|
||||
|
||||
The edited URL will be pending until Grafana verifies it again.
|
||||
Alertmanagers are visible from the drop-down menu on the Alerting Contact Points, Notification Policies, and Silences pages.
|
||||
|
||||
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/ext-alertmanager-active.png" max-width="650px" caption="External Alertmanagers" >}}
|
||||
**Useful links**
|
||||
|
||||
[Prometheus Alertmanager documentation](https://prometheus.io/docs/alerting/latest/alertmanager/)
|
||||
|
||||
[Add an external Alertmanager](https://grafana.com/docs/grafana/latest/alerting/set-up/configure-alertmanager/)
|
||||
|
||||
@@ -16,7 +16,7 @@ weight: 401
|
||||
|
||||
# Annotations and labels for alerting rules
|
||||
|
||||
Annotations and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in [templates]({{< relref "../../contact-points/message-templating/" >}}) and [template functions]({{< relref "../../contact-points/fundamentals/annotation-label/template-functions/" >}}) to create notification contact dynamically.
|
||||
Annotations and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in [templates]({{< relref "../../contact-points/message-templating/" >}}) and [template functions]({{< relref "../../contact-points/fundamentals/annotation-label/template-functions/" >}}) to create notification content dynamically.
|
||||
|
||||
## Annotations
|
||||
|
||||
|
||||
@@ -30,15 +30,18 @@ A label matchers consists of 3 distinct parts, the **label**, the **value** and
|
||||
| `=~` | Select labels that regex-match the value. |
|
||||
| `!~` | Select labels that do not regex-match the value. |
|
||||
|
||||
## Example of a label matcher
|
||||
If you are using multiple label matchers, they are combined using the AND logical operator. This means that all matchers must match in order to link a rule to a policy.
|
||||
|
||||
Imagine we've defined the following set of labels for our alert.
|
||||
## Example scenario
|
||||
|
||||
If you define the following set of labels for your alert:
|
||||
|
||||
`{ foo=bar, baz=qux, id=12 }`
|
||||
|
||||
In this situation,
|
||||
then:
|
||||
|
||||
- A label matcher defined as `foo=bar` will match this alert rule.
|
||||
- A label matcher defined as `foo!=bar` will _not_ match this alert rule.
|
||||
- A label matcher defined as `id=~[0-9]+` will match this alert rule.
|
||||
- A label matcher defined as `baz!~[0-9]+` will match this alert rule.
|
||||
- A label matcher defined as `foo=bar` matches this alert rule.
|
||||
- A label matcher defined as `foo!=bar` does _not_ match this alert rule.
|
||||
- A label matcher defined as `id=~[0-9]+` matches this alert rule.
|
||||
- A label matcher defined as `baz!~[0-9]+` matches this alert rule.
|
||||
- Two label matchers defined as `foo=bar` and `id=~[0-9]+` match this alert rule.
|
||||
|
||||
@@ -58,7 +58,7 @@ You can configure grouping to be `group_by: [alertname]` (take note that the `en
|
||||
1. To add a top level specific policy, go to the **Specific routing** section and click **New specific policy**.
|
||||
1. In **Matching labels** section, add one or more rules for matching alert labels. For more information, see ["Labels and label matchers"]({{< relref "../fundamentals/annotation-label/labels-and-label-matchers/" >}}).
|
||||
1. In **Contact point**, add the [contact point]({{< relref "../contact-points/" >}}) to send notification to if alert matches only this specific policy and not any of the nested policies.
|
||||
1. Optionally, enable **Continue matching subsequent sibling nodes** to continue matching nested policies even after the alert matched the parent policy. When this option is enabled, you can get more than one notification. Use it to send notification to a catch-all contact point as well as to one of more specific contact points handled by nested policies.
|
||||
1. Optionally, enable **Continue matching subsequent sibling nodes** to continue matching sibling policies even after the alert matched the current policy. When this option is enabled, you can get more than one notification for one alert.
|
||||
1. Optionally, enable **Override grouping** to specify the same grouping as the root policy. If this option is not enabled, the root policy grouping is used.
|
||||
1. Optionally, enable **Override general timings** to override the timing options configured in the group notification policy.
|
||||
1. Click **Save policy** to save your changes.
|
||||
|
||||
@@ -8,29 +8,29 @@ keywords:
|
||||
- alerting
|
||||
- set up
|
||||
- configure
|
||||
- Alertmanager
|
||||
title: Configure Alertmanager
|
||||
- external Alertmanager
|
||||
title: Add an external Alertmanager
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Configure Alertmanager
|
||||
# Add an external Alertmanager
|
||||
|
||||
Configure Alertmanager from Grafana Alerting to group and manage alert rules, adding a layer of orchestration on top of your external alerting engine.
|
||||
Set up Grafana to use an external Alertmanager as a single Alertmanager to receive all of your alerts. This external Alertmanager can then be configured and administered from within Grafana itself.
|
||||
|
||||
## Add a new external Alertmanager
|
||||
Once 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.
|
||||
|
||||
1. In the Grafana menu, click the Alerting (bell) icon to open the Alerting page listing existing alerts.
|
||||
2. Click **Admin** and then scroll down to the External Alertmanager section.
|
||||
3. Click **Add Alertmanager** and a modal opens.
|
||||
4. Add the URL and the port for the external Alertmanager. You do not need to specify the path suffix, for example, `/api/v(1|2)/alerts`. Grafana automatically adds this.
|
||||
**Note:**
|
||||
Starting with Grafana 9.2, the URL configuration of external alertmanagers from the Admin tab on the Alerting page is deprecated. It will be removed in a future release.
|
||||
|
||||
The external URL is listed in the table with a pending status. Once Grafana verifies that the Alertmanager is discovered, the status changes to active. No requests are made to the external Alertmanager at this point; the verification signals that alerts are ready to be sent.
|
||||
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 that were previously visible when configuring external alertmanagers by URL.
|
||||
|
||||
### Edit an external Alertmanager
|
||||
To add an external Alertmanager, complete the following steps.
|
||||
|
||||
1. Click the pen symbol to the right of the Alertmanager row in the table.
|
||||
2. When the edit modal opens, you can view all the URLs that were added.
|
||||
1. Click Configuration and then Data sources.
|
||||
2. Search for Alertmanager.
|
||||
3. Choose your Implementation and fill out the fields on the page, as required.
|
||||
|
||||
The edited URL will be pending until Grafana verifies it again.
|
||||
**Note:**
|
||||
Prometheus, Grafana Mimir, and Cortex implementations of Alertmanager are supported. For Prometheus, contact points and notification policies are read-only in the Grafana Alerting UI.
|
||||
|
||||
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/ext-alertmanager-active.png" max-width="650px" caption="External Alertmanagers" >}}
|
||||
4. Click Save & test.
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources
|
||||
description: Provision alerting resources
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- set up
|
||||
- configure
|
||||
- provisioning
|
||||
title: Provision Grafana Alerting resources
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Provision Grafana Alerting resources
|
||||
|
||||
Alerting infrastructure is often complex, with many pieces of the pipeline that often live in different places. Scaling this across multiple teams and organizations is an especially challenging task. Grafana Alerting provisioning makes this process easier by enabling you to create, manage, and maintain your alerting data in a way that best suits your organization.
|
||||
|
||||
There are three options to choose from:
|
||||
|
||||
1. Use file provisioning to provision your Grafana Alerting resources, such as alert rules and contact points, through files on disk.
|
||||
|
||||
1. Provision your alerting resources using the Grafana HTTP API.
|
||||
|
||||
For more information on the Grafana Alerting provisioning API, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/).
|
||||
|
||||
1. Provision your alerting resources using Terraform.
|
||||
|
||||
**Note:**
|
||||
|
||||
Currently, provisioning for Grafana Alerting supports alert rules, contact points, mute timings, and templates. Provisioned alerting resources can only be edited in the source that created them and not from within Grafana or any other source. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
|
||||
|
||||
**Useful Links:**
|
||||
|
||||
[Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/)
|
||||
|
||||
[Grafana Cloud provisioning](https://grafana.com/docs/grafana-cloud/infrastructure-as-code/terraform/)
|
||||
|
||||
[Grafana Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning)
|
||||
@@ -1,44 +1,18 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources
|
||||
description: Provision alerting resources
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/file-provisioning
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/file-provisioning
|
||||
description: Create and manage resources using file provisioning
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- set up
|
||||
- configure
|
||||
- alerting resources
|
||||
- file provisioning
|
||||
- provisioning
|
||||
title: Provision Grafana Alerting resources
|
||||
weight: 200
|
||||
title: Create and manage alerting resources using file provisioning
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Provision Grafana Alerting resources
|
||||
|
||||
Alerting infrastructure is often complex, with many pieces of the pipeline that often live in different places. Scaling this across multiple teams and organizations is an especially challenging task. Grafana Alerting provisioning makes this process easier by enabling you to create, manage, and maintain your alerting data in a way that best suits your organization.
|
||||
|
||||
There are three options to choose from:
|
||||
|
||||
1. Use file provisioning to provision your Grafana Alerting resources, such as alert rules and contact points, through files on disk.
|
||||
|
||||
1. Provision your alerting resources using the Grafana HTTP API.
|
||||
|
||||
For more information on the Grafana Alerting provisioning API, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/).
|
||||
|
||||
1. Provision your alerting resources using Terraform.
|
||||
|
||||
**Note:**
|
||||
|
||||
Currently, provisioning for Grafana Alerting supports alert rules, contact points, mute timings, and templates. Provisioned alerting resources can only be edited in the source that created them and not from within Grafana or any other source. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
|
||||
|
||||
**Useful Links:**
|
||||
|
||||
[Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/)
|
||||
|
||||
[Grafana Cloud provisioning](https://grafana.com/docs/grafana-cloud/infrastructure-as-code/terraform/)
|
||||
|
||||
[Grafana Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning)
|
||||
|
||||
## Create and manage alerting resources using file provisioning
|
||||
|
||||
Provision your alerting resources using files from disk. When you start Grafana, the data from these files is created in your Grafana system. Grafana adds any new resources you created, updates any that you changed, and deletes old ones.
|
||||
@@ -57,11 +31,11 @@ Create or delete alert rules in your Grafana instance(s).
|
||||
|
||||
1. Create an alert rule in Grafana.
|
||||
1. Use the [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/admin/#reload-provisioning-configurations) to extract the alert rule.
|
||||
1. Copy the contents into a YAML or JSON configuration file.
|
||||
1. Copy the contents into a YAML or JSON configuration file in the default provisioning directory or in your configured directory.
|
||||
|
||||
Example configuration files can be found below.
|
||||
|
||||
1. Add the file(s) to your GitOps workflow, so that they deploy alongside your Grafana instance(s).
|
||||
1. Ensure that your files are in the right directory on the node running the Grafana server, so that they deploy alongside your Grafana instance(s).
|
||||
1. Delete the alert rule in Grafana.
|
||||
|
||||
**Note:**
|
||||
@@ -0,0 +1,316 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/terraform-provisioning
|
||||
description: Create and manage alerting resources using Terraform
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- alerting resources
|
||||
- provisioning
|
||||
- Terraform
|
||||
title: Create and manage alerting resources using Terraform
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Create and manage alerting resources using Terraform
|
||||
|
||||
Use Terraform’s Grafana Provider to manage your alerting resources and provision them into your Grafana system. Terraform provider support for Grafana Alerting makes it easy to create, manage, and maintain your entire Grafana Alerting stack as code.
|
||||
|
||||
For more information on managing your alerting resources using Terraform, refer to the [Grafana Provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs) documentation.
|
||||
|
||||
Complete the following tasks to create and manage your alerting resources using Terraform.
|
||||
|
||||
1. Create an API key for provisioning.
|
||||
1. Configure the Terraform provider.
|
||||
1. Provision your alerting resources.
|
||||
|
||||
## Before you begin
|
||||
|
||||
- Ensure you have the grafana/grafana [Terraform provider](https://registry.terraform.io/providers/grafana/grafana/1.28.0) 1.27.0 or higher.
|
||||
|
||||
- Ensure you are using Grafana 9.1 or higher.
|
||||
|
||||
## Create an API key for provisioning
|
||||
|
||||
You can [create a normal Grafana API key](https://grafana.com/docs/grafana/latest/administration/api-keys/) to authenticate Terraform with Grafana. Most existing tooling using API keys should automatically work with the new Grafana Alerting support.
|
||||
|
||||
There are also dedicated RBAC roles for alerting provisioning. This lets you easily authenticate as a [service account](https://grafana.com/docs/grafana/latest/administration/service-accounts/) with the minimum permissions needed to provision your Alerting infrastructure.
|
||||
|
||||
To create an API key for provisioning, complete the following steps.
|
||||
|
||||
1. Create a new service account for your CI pipeline.
|
||||
1. Assign the role “Access the alert rules Provisioning API.”
|
||||
1. Create a new service account token.
|
||||
1. Name and save the token for use in Terraform.
|
||||
|
||||
Alternatively, you can use Terraform authentication: [basic auth](https://registry.terraform.io/providers/grafana/grafana/latest/docs#authentication).
|
||||
|
||||
## Configure the Terraform provider
|
||||
|
||||
Grafana Alerting support is included as part of the [Grafana Terraform provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs).
|
||||
|
||||
The following is an example you can use to configure the Terraform provider.
|
||||
|
||||
```terraform
|
||||
terraform {
|
||||
required_providers {
|
||||
grafana = {
|
||||
source = "grafana/grafana"
|
||||
version = ">= 1.28.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "grafana" {
|
||||
url = <YOUR_GRAFANA_URL>
|
||||
auth = <YOUR_GRAFANA_API_KEY>
|
||||
}
|
||||
```
|
||||
|
||||
## Provision contact points and templates
|
||||
|
||||
Contact points connect an alerting stack to the outside world. They tell Grafana how to connect to your external systems and where to deliver notifications. There are over fifteen different integrations to choose from.
|
||||
|
||||
To provision contact points and templates, complete the following steps.
|
||||
|
||||
1. Copy this code block into a .tf file on your local machine.
|
||||
|
||||
This example uses a contact point that sends alert notifications to Slack.
|
||||
|
||||
```terraform
|
||||
resource "grafana_contact_point" "my_slack_contact_point" {
|
||||
name = "Send to My Slack Channel"
|
||||
|
||||
slack {
|
||||
url = <YOUR_SLACK_WEBHOOK_URL>
|
||||
text = <<EOT
|
||||
{{ len .Alerts.Firing }} alerts are firing!
|
||||
|
||||
Alert summaries:
|
||||
{{ range .Alerts.Firing }}
|
||||
{{ template "Alert Instance Template" . }}
|
||||
{{ end }}
|
||||
EOT
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
1. Enter text for your notification in the text field.
|
||||
|
||||
The `text` field supports [Go-style templating](https://pkg.go.dev/text/template). This enables you to manage your Grafana Alerting message templates directly in Terraform.
|
||||
|
||||
1. Run the command ‘terraform apply’.
|
||||
|
||||
1. Go to the Grafana UI and check the details of your contact point.
|
||||
|
||||
**Note:**
|
||||
|
||||
You cannot edit resources provisioned from Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
|
||||
|
||||
1. Click **Test** to verify that the contact point works correctly.
|
||||
|
||||
**Note:**
|
||||
|
||||
You can re-use the same templates across many contact points. In the example above, a shared template ie embedded using the statement `{{ template “Alert Instance Template” . }}`
|
||||
|
||||
This fragment can then be managed separately in Terraform:
|
||||
|
||||
```terraform
|
||||
resource "grafana_message_template" "my_alert_template" {
|
||||
name = "Alert Instance Template"
|
||||
|
||||
template = <<EOT
|
||||
{{ define "Alert Instance Template" }}
|
||||
Firing: {{ .Labels.alertname }}
|
||||
Silence: {{ .SilenceURL }}
|
||||
{{ end }}
|
||||
EOT
|
||||
}
|
||||
```
|
||||
|
||||
## Provision notification policies and routing
|
||||
|
||||
Notification policies tell Grafana how to route alert instances, as opposed to where. They connect firing alerts to your previously defined contact points using a system of labels and matchers.
|
||||
|
||||
To provision notification policies and routing, complete the following steps.
|
||||
|
||||
1. Copy this code block into a .tf file on your local machine.
|
||||
|
||||
In this example, the alerts are grouped by `alertname`, which means that any notifications coming from alerts which share the same name, are grouped into the same Slack message.
|
||||
|
||||
resource "grafana_notification_policy" "my_policy" {
|
||||
group_by = ["alertname"]
|
||||
contact_point = grafana_contact_point.my_slack_contact_point.name
|
||||
|
||||
group_wait = "45s"
|
||||
group_interval = "6m"
|
||||
repeat_interval = "3h"
|
||||
|
||||
policy {
|
||||
matcher {
|
||||
label = "a"
|
||||
match = "="
|
||||
value = "b"
|
||||
}
|
||||
group_by = ["..."]
|
||||
contact_point = grafana_contact_point.a_different_contact_point.name
|
||||
mute_timings = [grafana_mute_timing.my_mute_timing.name]
|
||||
|
||||
policy {
|
||||
matcher {
|
||||
label = "sublabel"
|
||||
match = "="
|
||||
value = "subvalue"
|
||||
}
|
||||
contact_point = grafana_contact_point.a_third_contact_point.name
|
||||
group_by = ["..."]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
1. In the mute_timings field, link a mute timing to your notification policy.
|
||||
|
||||
1. Run the command ‘terraform apply’.
|
||||
|
||||
1. Go to the Grafana UI and check the details of your notification policy.
|
||||
|
||||
**Note:**
|
||||
|
||||
You cannot edit resources provisioned from Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
|
||||
|
||||
1. Click **Test** to verify that the notification point is working correctly.
|
||||
|
||||
## Provision mute timings
|
||||
|
||||
Mute timings provide the ability to mute alert notifications for defined time periods.
|
||||
|
||||
To provision mute timings, complete the following steps.
|
||||
|
||||
1. Copy this code block into a .tf file on your local machine.
|
||||
|
||||
In this example, alert notifications are muted on weekends.
|
||||
|
||||
resource "grafana_mute_timing" "my_mute_timing" {
|
||||
name = "My Mute Timing"
|
||||
|
||||
intervals {
|
||||
times {
|
||||
start = "04:56"
|
||||
end = "14:17"
|
||||
}
|
||||
weekdays = ["saturday", "sunday", "tuesday:thursday"]
|
||||
months = ["january:march", "12"]
|
||||
years = ["2025:2027"]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
1. Run the command ‘terraform apply’.
|
||||
1. Go to the Grafana UI and check the details of your mute timing.
|
||||
|
||||
**Note:**
|
||||
|
||||
You cannot edit resources provisioned from Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
|
||||
|
||||
1. Click **Test** to verify that the mute timing is working correctly.
|
||||
|
||||
## Provision alert rules
|
||||
|
||||
[Alert rules](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/) enable you to alert against any Grafana data source. This can be a data source that you already have configured, or you can [define your data sources in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source) alongside your alert rules.
|
||||
|
||||
To provision alert rules, complete the following steps.
|
||||
|
||||
1. Create a data source to query and a folder to store your rules in.
|
||||
|
||||
In this example, the [TestData](https://grafana.com/docs/grafana/latest/datasources/testdata/) data source is used.
|
||||
|
||||
```terraform
|
||||
resource "grafana_data_source" "testdata_datasource" {
|
||||
name = "TestData"
|
||||
type = "testdata"
|
||||
}
|
||||
|
||||
resource "grafana_folder" "rule_folder" {
|
||||
title = "My Rule Folder"
|
||||
}
|
||||
```
|
||||
|
||||
1. Define an alert rule.
|
||||
|
||||
For more information on alert rules, refer to [how to create Grafana-managed alerts](https://grafana.com/blog/2022/08/01/grafana-alerting-video-how-to-create-alerts-in-grafana-9/).
|
||||
|
||||
1. Group your alert rules.
|
||||
|
||||
In this example, the `grafana_rule_group` resource group is used.
|
||||
|
||||
```terraform
|
||||
resource "grafana_rule_group" "my_rule_group" {
|
||||
name = "My Alert Rules"
|
||||
folder_uid = grafana_folder.rule_folder.uid
|
||||
interval_seconds = 60
|
||||
org_id = 1
|
||||
|
||||
rule {
|
||||
name = "My Random Walk Alert"
|
||||
condition = "C"
|
||||
for = "0s"
|
||||
|
||||
// Query the datasource.
|
||||
data {
|
||||
ref_id = "A"
|
||||
relative_time_range {
|
||||
from = 600
|
||||
to = 0
|
||||
}
|
||||
datasource_uid = grafana_data_source.testdata_datasource.uid
|
||||
// `model` is a JSON blob that sends datasource-specific data.
|
||||
// It's different for every datasource. The alert's query is defined here.
|
||||
model = jsonencode({
|
||||
intervalMs = 1000
|
||||
maxDataPoints = 43200
|
||||
refId = "A"
|
||||
})
|
||||
}
|
||||
|
||||
// The query was configured to obtain data from the last 60 seconds. Let's alert on the average value of that series using a Reduce stage.
|
||||
data {
|
||||
datasource_uid = "-100"
|
||||
// You can also create a rule in the UI, then GET that rule to obtain the JSON.
|
||||
// This can be helpful when using more complex reduce expressions.
|
||||
model = <<EOT
|
||||
{"conditions":[{"evaluator":{"params":[0,0],"type":"gt"},"operator":{"type":"and"},"query":{"params":["A"]},"reducer":{"params":[],"type":"last"},"type":"avg"}],"datasource":{"name":"Expression","type":"__expr__","uid":"__expr__"},"expression":"A","hide":false,"intervalMs":1000,"maxDataPoints":43200,"reducer":"last","refId":"B","type":"reduce"}
|
||||
EOT
|
||||
ref_id = "B"
|
||||
relative_time_range {
|
||||
from = 0
|
||||
to = 0
|
||||
}
|
||||
}
|
||||
|
||||
// Now, let's use a math expression as our threshold.
|
||||
// We want to alert when the value of stage "B" above exceeds 70.
|
||||
data {
|
||||
datasource_uid = "-100"
|
||||
ref_id = "C"
|
||||
relative_time_range {
|
||||
from = 0
|
||||
to = 0
|
||||
}
|
||||
model = jsonencode({
|
||||
expression = "$B > 70"
|
||||
type = "math"
|
||||
refId = "C"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
1. Go to the Grafana UI and check your alert rule.
|
||||
|
||||
You can see whether or not the alert rule is firing. You can also see a visualization of each of the alert rule’s query stages
|
||||
|
||||
When the alert fires, Grafana routes a notification through the policy you defined.
|
||||
|
||||
For example, if you chose Slack as a contact point, Grafana’s embedded [Alertmanager](https://github.com/prometheus/alertmanager) automatically posts a message to Slack.
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/view-provisioned-resources
|
||||
description: View provisioned resources in Grafana
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- alerting resources
|
||||
- provisioning
|
||||
title: View provisioned resources in Grafana
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# View provisioned alerting resources in Grafana
|
||||
|
||||
Verify that your alerting resources were created in Grafana.
|
||||
|
||||
To view your provisioned resources in Grafana, complete the following steps.
|
||||
|
||||
1. Open your Grafana instance.
|
||||
1. Navigate to Alerting.
|
||||
1. Click an alerting resource folder, for example, Alert rules.
|
||||
|
||||
Provisioned resources are labeled **Provisioned**, so that it is clear that they were not created manually.
|
||||
|
||||
**Note:**
|
||||
|
||||
You cannot edit provisioned resources from Grafana. You can only change the resource properties by changing the provisioning file and restarting Grafana or carrying out a hot reload. This prevents changes being made to the resource that would be overwritten if a file is provisioned again or a hot reload is carried out.
|
||||
@@ -16,8 +16,6 @@ weight: 450
|
||||
|
||||
Use silences to stop notifications from one or more alerting rules. Silences do not prevent alert rules from being evaluated. Nor do they not stop alerting instances from being shown in the user interface. Silences only stop notifications from getting created. A silence lasts for only a specified window of time.
|
||||
|
||||
Silences do not prevent alert rules from being evaluated. They also do not stop alert instances from being shown in the user interface. Silences only prevent notifications from being created.
|
||||
|
||||
You can configure Grafana managed silences as well as silences for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager/" >}}). For more information, see [Alertmanager]({{< relref "../fundamentals/alertmanager/" >}}).
|
||||
|
||||
See also:
|
||||
|
||||
@@ -19,7 +19,7 @@ Silences stop notifications from getting created and last for only a specified w
|
||||
To add a silence:
|
||||
|
||||
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
|
||||
2. On the Alerting page, click **Silences** to open the page listing existing contact points.
|
||||
2. On the Alerting page, click **Silences** to open the page listing existing silences.
|
||||
3. From Alertmanager drop-down, select an external Alertmanager to create and manage silences for the external data source. Otherwise, keep the default option of Grafana.
|
||||
4. Click **New Silence** to open the Create silence page.
|
||||
5. In **Silence start and end**, select the start and end date to indicate when the silence should go into effect and expire.
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/basics/exemplars/
|
||||
description: Exemplars
|
||||
keywords:
|
||||
- grafana
|
||||
- concepts
|
||||
- exemplars
|
||||
- prometheus
|
||||
title: Exemplars
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Introduction to exemplars
|
||||
|
||||
An exemplar is a specific trace representative of measurement taken in a given time interval. While metrics excel at giving you an aggregated view of your system, traces give you a fine grained view of a single request; exemplars are a way to link the two.
|
||||
|
||||
Suppose your company website is experiencing a surge in traffic volumes. While more than eighty percent of the users are able to access the website in under two seconds, some users are experiencing a higher than normal response time resulting in bad user experience.
|
||||
|
||||
To identify the factors that are contributing to the latency, you must compare a trace for a fast response against a trace for a slow response. Given the vast amount of data in a typical production environment, it will be extremely laborious and time-consuming effort.
|
||||
|
||||
Use exemplars to help isolate problems within your data distribution by pinpointing query traces exhibiting high latency within a time interval. Once you localize the latency problem to a few exemplar traces, you can combine it with additional system based information or location properties to perform a root cause analysis faster, leading to quick resolutions to performance issues.
|
||||
|
||||
Support for exemplars is available for the Prometheus data source only. Once you enable the functionality, exemplars data is available by default. For more information on exemplar configuration and how to enable exemplars, refer to [configuring exemplars in Prometheus data source]({{< relref "../../datasources/prometheus/#configuring-exemplars" >}}).
|
||||
|
||||
Grafana shows exemplars alongside a metric in the Explore view and in dashboards. Each exemplar displays as a highlighted star. You can hover your cursor over an exemplar to view the unique traceID, which is a combination of a key value pair. To investigate further, click the blue button next to the `traceID` property.
|
||||
|
||||
{{< figure src="/static/img/docs/v74/exemplars.png" class="docs-image--no-shadow" max-width= "750px" caption="Screenshot showing the detail window of an Exemplar" >}}
|
||||
|
||||
Refer to [View exemplar data]({{< relref "view-exemplars/" >}}) for instructions on how to drill down and view exemplar trace details from metrics and logs. To know more about exemplars, refer to the blogpost [Intro to exemplars, which enable Grafana Tempo’s distributed tracing at massive scale](https://grafana.com/blog/2021/03/31/intro-to-exemplars-which-enable-grafana-tempos-distributed-tracing-at-massive-scale/).
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/
|
||||
description: Best practices for working with Grafana
|
||||
title: Best practices
|
||||
weight: 20
|
||||
---
|
||||
|
||||
# Best practices
|
||||
|
||||
This section provides information about best practices for intermediate Grafana administrators and users. Click on each of the links before for more information.
|
||||
|
||||
- [Best practices for creating dashboards]({{< relref "best-practices-for-creating-dashboards/" >}})
|
||||
- [Best practices for managing dashboards]({{< relref "best-practices-for-managing-dashboards/" >}})
|
||||
- [Common observability strategies]({{< relref "common-observability-strategies/" >}})
|
||||
- [Dashboard management maturity model]({{< relref "dashboard-management-maturity-levels/" >}})
|
||||
@@ -1,56 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-creating-dashboards/
|
||||
description: Best practices for creating dashboards in Grafana
|
||||
title: Best practices for creating dashboards
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Best practices for creating dashboards
|
||||
|
||||
This page outlines some best practices to follow when creating Grafana dashboards.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Here are some principles to consider before you create a dashboard.
|
||||
|
||||
### A dashboard should tell a story or answer a question
|
||||
|
||||
What story are you trying to tell with your dashboard? Try to create a logical progression of data, such as large to small or general to specific. What is the goal for this dashboard? (Hint: If the dashboard doesn't have a goal, then ask yourself if you really need the dashboard.)
|
||||
|
||||
Keep your graphs simple and focused on answering the question that you are asking. For example, if your question is "which servers are in trouble?", then maybe you don't need to show all the server data. Just show data for the ones in trouble.
|
||||
|
||||
### Dashboards should reduce cognitive load, not add to it
|
||||
|
||||
_Cognitive load_ is basically how hard you need to think about something in order to figure it out. Make your dashboard easy to interpret. Other users and future you (when you're trying to figure out what broke at 2AM) will appreciate it.
|
||||
|
||||
Ask yourself:
|
||||
|
||||
- Can I tell what exactly each graph represents? Is it obvious, or do I have to think about it?
|
||||
- If I show this to someone else, how long will it take them to figure it out? Will they get lost?
|
||||
|
||||
### Have a monitoring strategy
|
||||
|
||||
It's easy to make new dashboards. It's harder to optimize dashboard creation and adhere to a plan, but it's worth it. This strategy should govern both your overall dashboard scheme and enforce consistency in individual dashboard design.
|
||||
|
||||
Refer to [Common observability strategies]({{< relref "common-observability-strategies/" >}}) and [Dashboard management maturity levels]({{< relref "dashboard-management-maturity-levels/" >}}) for more information.
|
||||
|
||||
### Write it down
|
||||
|
||||
Once you have a strategy or design guidelines, write them down to help maintain consistency over time. Check out this [Wikimedia runbook example](https://wikitech.wikimedia.org/wiki/Performance/Runbook/Grafana_best_practices).
|
||||
|
||||
## Best practices to follow
|
||||
|
||||
- When creating a new dashboard, make sure it has a meaningful name.
|
||||
- If you are creating a dashboard to play or experiment, then put the word `TEST` or `TMP` in the name.
|
||||
- Consider including your name or initials in the dashboard name or as a tag so that people know who owns the dashboard.
|
||||
- Remove temporary experiment dashboards when you are done with them.
|
||||
- If you create many related dashboards, think about how to cross-reference them for easy navigation. Refer to [Best practices for managing dashboards]({{< relref "best-practices-for-managing-dashboards/" >}}) for more information.
|
||||
- Grafana retrieves data from a data source. A basic understanding of [data sources]({{< relref "../datasources/" >}}) in general and your specific is important.
|
||||
- Avoid unnecessary dashboard refreshing to reduce the load on the network or backend. For example, if your data changes every hour, then you don't need to set the dashboard refresh rate to 30 seconds.
|
||||
- Use the left and right Y-axes when displaying time series with different units or ranges.
|
||||
- Add documentation to dashboards and panels.
|
||||
- To add documentation to a dashboard, add a [Text panel visualization]({{< relref "../visualizations/text-panel/" >}}) to the dashboard. Record things like the purpose of the dashboard, useful resource links, and any instructions users might need to interact with the dashboard. Check out this [Wikimedia example](https://grafana.wikimedia.org/d/000000066/resourceloader?orgId=1).
|
||||
- To add documentation to a panel, edit the panel settings and add a description. Any text you add will appear if you hover your cursor over the small `i` in the top left corner of the panel.
|
||||
- Reuse your dashboards and enforce consistency by using [templates and variables]({{< relref "../dashboards/variables" >}}).
|
||||
- Be careful with stacking graph data. The visualizations can be misleading, and hide important data. We recommend turning it off in most cases.
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-managing-dashboards/
|
||||
description: Best practices for managing dashboards in Grafana
|
||||
title: Best practices for managing dashboards
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Best practices for managing dashboards
|
||||
|
||||
This page outlines some best practices to follow when managing Grafana dashboards.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Here are some principles to consider before you start managing dashboards.
|
||||
|
||||
### Strategic observability
|
||||
|
||||
There are several [common observability strategies]({{< relref "common-observability-strategies/" >}}). You should research them and decide whether one of them works for you or if you want to come up with your own. Either way, have a plan, write it down, and stick to it.
|
||||
|
||||
Adapt your strategy to changing needs as necessary.
|
||||
|
||||
### Maturity level
|
||||
|
||||
What is your dashboard maturity level? Analyze your current dashboard setup and compare it to the [Dashboard management maturity model]({{< relref "dashboard-management-maturity-levels/" >}}). Understanding where you are can help you decide how to get to where you want to be.
|
||||
|
||||
## Best practices to follow
|
||||
|
||||
- Avoid dashboard sprawl, meaning the uncontrolled growth of dashboards. Dashboard sprawl negatively affects time to find the right dashboard. Duplicating dashboards and changing “one thing” (worse: keeping original tags) is the easiest kind of sprawl.
|
||||
- Periodically review the dashboards and remove unnecessary ones.
|
||||
- If you create a temporary dashboard, perhaps to test something, prefix the name with `TEST: `. Delete the dashboard when you are finished.
|
||||
- Copying dashboards with no significant changes is not a good idea.
|
||||
- You miss out on updates to the original dashboard, such as documentation changes, bug fixes, or additions to metrics.
|
||||
- In many cases copies are being made to simply customize the view by setting template parameters. This should instead be done by maintaining a link to the master dashboard and customizing the view with [URL parameters]({{< relref "../panels/configure-data-links/#data-link-variables" >}}).
|
||||
- When you must copy a dashboard, clearly rename it and _do not_ copy the dashboard tags. Tags are important metadata for dashboards that are used during search. Copying tags can result in false matches.
|
||||
- Maintain a dashboard of dashboards or cross-reference dashboards. This can be done in several ways:
|
||||
- Create dashboard links, panel, or data links. Links can go to other dashboards or to external systems. For more information, refer to [Manage dashboard links]({{< relref "../dashboards/manage-dashboard-links/" >}}).
|
||||
- Add a [Dashboard list panel]({{< relref "../visualizations/dashboard-list-panel/" >}}). You can then customize what you see by doing tag or folder searches.
|
||||
- Add a [Text panel]({{< relref "../visualizations/text-panel/" >}}) and use markdown to customize the display.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/common-observability-strategies/
|
||||
- /docs/grafana/latest/getting-started/strategies/
|
||||
description: Common observability strategies
|
||||
keywords:
|
||||
- grafana
|
||||
- intro
|
||||
- guide
|
||||
- concepts
|
||||
- methods
|
||||
title: Common observability strategies
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# Common observability strategies
|
||||
|
||||
When you have a lot to monitor, like a server farm, you need a strategy to decide what is important enough to monitor. This page describes several common methods for choosing what to monitor.
|
||||
|
||||
A logical strategy allows you to make uniform dashboards and scale your observability platform more easily.
|
||||
|
||||
## Guidelines for usage
|
||||
|
||||
- The USE method tells you how happy your machines are, the RED method tells you how happy your users are.
|
||||
- USE reports on causes of issues.
|
||||
- RED reports on user experience and is more likely to report symptoms of problems.
|
||||
- The best practice of alerting is to alert on symptoms rather than causes, so alerting should be done on RED dashboards.
|
||||
|
||||
## USE method
|
||||
|
||||
USE stands for:
|
||||
|
||||
- **Utilization -** Percent time the resource is busy, such as node CPU usage
|
||||
- **Saturation -** Amount of work a resource has to do, often queue length or node load
|
||||
- **Errors -** Count of error events
|
||||
|
||||
This method is best for hardware resources in infrastructure, such as CPU, memory, and network devices. For more information, refer to [The USE Method](http://www.brendangregg.com/usemethod.html).
|
||||
|
||||
## RED method
|
||||
|
||||
RED stands for:
|
||||
|
||||
- **Rate -** Requests per second
|
||||
- **Errors -** Number of requests that are failing
|
||||
- **Duration -** Amount of time these requests take, distribution of latency measurements
|
||||
|
||||
This method is most applicable to services, especially a microservices environment. For each of your services, instrument the code to expose these metrics for each component. RED dashboards are good for alerting and SLAs. A well-designed RED dashboard is a proxy for user experience.
|
||||
|
||||
For more information, refer to Tom Wilkie's blog post [The RED method: How to instrument your services](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services).
|
||||
|
||||
## The Four Golden Signals
|
||||
|
||||
According to the [Google SRE handbook](https://landing.google.com/sre/sre-book/chapters/monitoring-distributed-systems/#xref_monitoring_golden-signals), if you can only measure four metrics of your user-facing system, focus on these four.
|
||||
|
||||
This method is similar to the RED method, but it includes saturation.
|
||||
|
||||
- **Latency -** Time taken to serve a request
|
||||
- **Traffic -** How much demand is placed on your system
|
||||
- **Errors -** Rate of requests that are failing
|
||||
- **Saturation -** How "full" your system is
|
||||
|
||||
[Here's an example from Grafana Play](https://play.grafana.org/d/000000109/the-four-golden-signals?orgId=1).
|
||||
@@ -1,73 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/dashboard-management-maturity-levels/
|
||||
description: Explanation of dashboard management maturity model
|
||||
title: Dashboard management maturity model
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Dashboard management maturity model
|
||||
|
||||
_Dashboard management maturity_ refers to how well-designed and efficient your dashboard ecosystem is. We recommend periodically reviewing your dashboard setup to gauge where you are and how you can improve.
|
||||
|
||||
Broadly speaking, dashboard maturity can be defined as low, medium, or high.
|
||||
|
||||
Much of the content for this topic was taken from the KubeCon 2019 talk [Fool-Proof Kubernetes Dashboards for Sleep-Deprived Oncalls](https://www.youtube.com/watch?v=YE2aQFiMGfY).
|
||||
|
||||
## Low - default state
|
||||
|
||||
At this stage, you have no coherent dashboard management strategy. Almost everyone starts here.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Everyone can modify your dashboards.
|
||||
- Lots of copied dashboards, little to no dashboard reuse.
|
||||
- One-off dashboards that hang around forever.
|
||||
- No version control (dashboard JSON in version control).
|
||||
- Lots of browsing for dashboards, searching for the right dashboard. This means lots of wasted time trying to find the dashboard you need.
|
||||
- Not having any alerts to direct you to the right dashboard.
|
||||
|
||||
## Medium - methodical dashboards
|
||||
|
||||
At this stage, you are starting to manage your dashboard use with methodical dashboards. You might have laid out a strategy, but there are some things you could improve.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Prevent sprawl by using template variables. For example, you don't need a separate dashboard for each node, you can use query variables. Even better, you can make the data source a template variable too, so you can reuse the same dashboard across different clusters and monitoring backends.
|
||||
|
||||
Refer to the list of [Variable examples]({{< relref "../dashboards/variables/#examples-of-templates-and-variables" >}}) if you want some ideas.
|
||||
|
||||
- Methodical dashboards according to an [observability strategy]({{< relref "common-observability-strategies/" >}}).
|
||||
- Hierarchical dashboards with drill-downs to the next level.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/drill-down-example.png" caption="Example of using drill-down" >}}
|
||||
|
||||
- Dashboard design reflects service hierarchies. The example shown below uses the RED method (request and error rate on the left, latency duration on the right) with one row per service. The row order reflects the data flow.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/service-hierarchy-example.png" caption="Example of a service hierarchy" >}}
|
||||
|
||||
- Compare like to like: split service dashboards when the magnitude differs. Make sure aggregated metrics don't drown out important information.
|
||||
- Expressive charts with meaningful use of color and normalizing axes where you can.
|
||||
- Example of meaningful color: Blue means it's good, red means it's bad. [Thresholds]({{< relref "../panels/configure-thresholds/" >}}) can help with that.
|
||||
- Example of normalizing axes: When comparing CPU usage, measure by percentage rather than raw number, because machines can have a different number of cores. Normalizing CPU usage by the number of cores reduces cognitive load because the viewer can trust that at 100% all cores are being used, without having to know the number of CPUs.
|
||||
- Directed browsing cuts down on "guessing."
|
||||
- Template variables make it harder to “just browse” randomly or aimlessly.
|
||||
- Most dashboards should be linked to by alerts.
|
||||
- Browsing is directed with links. For more information, refer to [Manage dashboard links]({{< relref "../dashboards/manage-dashboard-links/" >}}).
|
||||
- Version-controlled dashboard JSON.
|
||||
|
||||
## High - optimized use
|
||||
|
||||
At this stage, you have optimized your dashboard management use with a consistent and thoughtful strategy. It requires maintenance, but the results are worth it.
|
||||
|
||||
- Actively reducing sprawl.
|
||||
- Regularly review existing dashboards to make sure they are still relevant.
|
||||
- Only approved dashboards added to master dashboard list.
|
||||
- Tracking dashboard use. If you're an Enterprise user, you can take advantage of [Usage insights]({{< relref "../dashboards/assess-dashboard-usage/" >}}).
|
||||
- Consistency by design.
|
||||
- Use scripting libraries to generate dashboards, ensure consistency in pattern and style.
|
||||
- grafonnet (Jsonnet)
|
||||
- grafanalib (Python)
|
||||
- No editing in the browser. Dashboard viewers change views with variables.
|
||||
- Browsing for dashboards is the exception, not the rule.
|
||||
- Perform experimentation and testing in a separate Grafana instance dedicated to that purpose, not your production instance. When a dashboard in the test environment is proven useful, then add that dashboard to your main Grafana instance.
|
||||
@@ -3,26 +3,26 @@ aliases:
|
||||
- /docs/grafana/latest/dashboards/
|
||||
- /docs/grafana/latest/features/dashboard/dashboards/
|
||||
title: Dashboards
|
||||
weight: 80
|
||||
weight: 70
|
||||
---
|
||||
|
||||
# About Grafana dashboards
|
||||
# Dashboards
|
||||
|
||||
A dashboard is a set of one or more [panels]({{< relref "../panels/" >}}) organized and arranged into one or more rows. Grafana ships with a variety of panels making it easy to construct the right queries, and customize the visualization so that you can create the perfect dashboard for your need. Each panel can interact with data from any configured Grafana [data source]({{< relref "../administration/data-source-management/" >}}).
|
||||
A dashboard is a set of one or more [panels]({{< relref "../panels-visualizations/" >}}) organized and arranged into one or more rows. Grafana ships with a variety of panels making it easy to construct the right queries, and customize the visualization so that you can create the perfect dashboard for your need. Each panel can interact with data from any configured Grafana [data source]({{< relref "../administration/data-source-management/" >}}).
|
||||
|
||||
Dashboard snapshots are static. Queries and expressions cannot be re-executed from snapshots. As a result, if you update any variables in your query or expression, it will not change your dashboard data.
|
||||
|
||||
Before you begin, ensure that you have configured a data source. See also:
|
||||
|
||||
- [Use dashboards]({{< relref "use-dashboards/" >}})
|
||||
- [Build dashboards]({{< relref "./build-dashboards" >}})
|
||||
- [Create dashboard folders]({{< relref "./manage-dashboards/#create-a-dashboard-folder" >}})
|
||||
- [Add and organize panels]({{< relref "add-organize-panels/" >}})
|
||||
- [Manage dashboards]({{< relref "./manage-dashboards" >}})
|
||||
- [Public dashboards]({{< relref "dashboard-public/" >}})
|
||||
- [Annotations]({{< relref "annotations/" >}})
|
||||
- [Annotations]({{< relref "./build-dashboards/annotate-visualizations" >}})
|
||||
- [Playlist]({{< relref "./create-manage-playlists/" >}})
|
||||
- [Reporting]({{< relref "./create-reports" >}})
|
||||
- [Time range controls]({{< relref "./manage-dashboards/#common-time-range-controls" >}})
|
||||
- [Dashboard version history]({{< relref "dashboard-history/" >}})
|
||||
- [Dashboard export and import]({{< relref "./manage-dashboards/#export-and-import-dashboards" >}})
|
||||
- [Dashboard JSON model]({{< relref "json-model/" >}})
|
||||
- [Version history]({{< relref "./build-dashboards/manage-version-history" >}})
|
||||
- [Export and import]({{< relref "./manage-dashboards/#export-and-import-dashboards" >}})
|
||||
- [JSON model]({{< relref "./build-dashboards/view-dashboard-json-model/" >}})
|
||||
|
||||
24
docs/sources/dashboards/build-dashboards/_index.md
Normal file
24
docs/sources/dashboards/build-dashboards/_index.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/next/dashboards/build-dashboards/
|
||||
title: Build dashboards
|
||||
menuTitle: Build dashboards
|
||||
weight: 2
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
- dashboard folders
|
||||
- create
|
||||
- build
|
||||
- design
|
||||
---
|
||||
|
||||
# Build dashboards
|
||||
|
||||
This section includes the following topics:
|
||||
|
||||
{{< section >}}
|
||||
|
||||
## Dynamic dashboards
|
||||
|
||||
You can create more interactive and dynamic dashboards by adding and using [variables]({{< relref "../variables" >}}). Instead of hard-coding things like server, application, and sensor names in your metric queries, you can use variables in their place. Read more about variables [here]({{< relref "../variables" >}}).
|
||||
@@ -9,9 +9,10 @@ aliases:
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/about-repeating-panels-rows/
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-rows/
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-panels/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/add-organize-panels/
|
||||
title: Add and organize panels
|
||||
menuTitle: Add and organize panels
|
||||
weight: 2
|
||||
weight: 200
|
||||
keywords:
|
||||
- panel
|
||||
- dashboard
|
||||
@@ -36,13 +37,13 @@ This section describes the areas of the Grafana panel editor.
|
||||
- **Table view:** Convert any visualization to a table so that you can see the data. Table views are useful for troubleshooting.
|
||||
- **Fill:** The visualization preview fills the available space. If you change the width of the side pane or height of the bottom pane the visualization changes to fill the available space.
|
||||
- **Actual:** The visualization preview will have the exact size as the size on the dashboard. If not enough space is available, the visualization will scale down preserving the aspect ratio.
|
||||
- **Time range controls:** For more information, refer to [Time range controls]({{< relref "../manage-dashboards/#configure-dashboard-time-range-controls" >}}).
|
||||
- **Time range controls:** For more information, refer to [Time range controls]({{< relref "../../manage-dashboards/#configure-dashboard-time-range-controls" >}}).
|
||||
|
||||
1. Data section: The data section contains tabs where you enter queries, transform your data, and create alert rules (if applicable).
|
||||
|
||||
- **Query tab:** Select your data source and enter queries here. For more information, refer to [Add a query]({{< relref "../../panels/query-a-data-source/add-a-query/" >}}).
|
||||
- **Transform tab:** Apply data transformations. For more information, refer to [Transform data]({{< relref "../../panels/transform-data/" >}}).
|
||||
- **Alert tab:** Write alert rules. For more information, refer to [Overview of Grafana 8 alerting]({{< relref "../../alerting/" >}}).
|
||||
- **Query tab:** Select your data source and enter queries here. For more information, refer to [Add a query]({{< relref "../../../panels/query-a-data-source/add-a-query/" >}}).
|
||||
- **Transform tab:** Apply data transformations. For more information, refer to [Transform data]({{< relref "../../../panels/transform-data/" >}}).
|
||||
- **Alert tab:** Write alert rules. For more information, refer to [Overview of Grafana 8 alerting]({{< relref "../../../alerting/" >}}).
|
||||
|
||||
1. Panel display options: The display options section contains tabs where you configure almost every aspect of your data visualization.
|
||||
|
||||
@@ -76,10 +77,10 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you have the proper permissions. For more information about permissions, refer to [About users and permissions]({{< relref "../../administration/roles-and-permissions/" >}}).
|
||||
- Ensure that you have the proper permissions. For more information about permissions, refer to [About users and permissions]({{< relref "../../../administration/roles-and-permissions/" >}}).
|
||||
- Identify the dashboard to which you want to add the panel.
|
||||
- Understand the query language of the target data source.
|
||||
- Ensure that data source for which you are writing a query has been added. For more information about adding a data source, refer to [Add a data source]({{< relref "../../datasources/add-a-data-source/" >}}) if you need instructions.
|
||||
- Ensure that data source for which you are writing a query has been added. For more information about adding a data source, refer to [Add a data source]({{< relref "../../../datasources/add-a-data-source/" >}}) if you need instructions.
|
||||
|
||||
**To create a dashboard and add a panel**:
|
||||
|
||||
@@ -88,7 +89,7 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
1. In the first line of the **Query** tab, click the drop-down list and select a data source.
|
||||
1. Write or construct a query in the query language of your data source.
|
||||
|
||||
For more information about data sources, refer to [Data sources]({{< relref "../../datasources/" >}}) for specific guidelines.
|
||||
For more information about data sources, refer to [Data sources]({{< relref "../../../datasources/" >}}) for specific guidelines.
|
||||
|
||||
1. In the Visualization list, select a visualization type.
|
||||
|
||||
@@ -96,17 +97,17 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
|
||||

|
||||
|
||||
For more information about individual visualizations, refer to [Visualizations options]({{< relref "../../visualizations/" >}}).
|
||||
For more information about individual visualizations, refer to [Visualizations options]({{< relref "../../../visualizations/" >}}).
|
||||
|
||||
1. Refer to the following documentation for ways you can adjust panel settings.
|
||||
|
||||
While not required, most visualizations need some adjustment before they properly display the information that you need.
|
||||
|
||||
- [Configure value mappings]({{< relref "../../panels/configure-value-mappings" >}})
|
||||
- [Visualization-specific options]({{< relref "../../visualizations/" >}})
|
||||
- [Override field values]({{< relref "../../panels/configure-overrides/" >}})
|
||||
- [Configure thresholds]({{< relref "../../panels/configure-thresholds/" >}})
|
||||
- [Configure standard options]({{< relref "../../panels/configure-standard-options/" >}})
|
||||
- [Configure value mappings]({{< relref "../../../panels/configure-value-mappings" >}})
|
||||
- [Visualization-specific options]({{< relref "../../../visualizations/" >}})
|
||||
- [Override field values]({{< relref "../../../panels/configure-overrides/" >}})
|
||||
- [Configure thresholds]({{< relref "../../../panels/configure-thresholds/" >}})
|
||||
- [Configure standard options]({{< relref "../../../panels/configure-standard-options/" >}})
|
||||
|
||||
1. Add a note to describe the visualization (or describe your changes) and then click **Save** in the upper-right corner of the page.
|
||||
|
||||
@@ -2,16 +2,18 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/annotations/
|
||||
- /docs/grafana/latest/reference/annotations/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/annotate-visualizations/
|
||||
keywords:
|
||||
- grafana
|
||||
- annotations
|
||||
- documentation
|
||||
- guide
|
||||
title: Annotations
|
||||
weight: 9
|
||||
title: Annotate visualizations
|
||||
menuTitle: Annotate visualizations
|
||||
weight: 600
|
||||
---
|
||||
|
||||
# Annotations
|
||||
# Annotate visualizations
|
||||
|
||||
Annotations provide a way to mark points on the graph with rich events. When you hover over an annotation
|
||||
you can get event description and event tags. The text field can include links to other systems with more detail.
|
||||
@@ -20,7 +22,7 @@ you can get event description and event tags. The text field can include links t
|
||||
|
||||
## Native annotations
|
||||
|
||||
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../developers/http_api/annotations/" >}}).
|
||||
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../../../developers/http_api/annotations/" >}}).
|
||||
|
||||
### Add annotation
|
||||
|
||||
@@ -94,4 +96,4 @@ to show.
|
||||
|
||||
### Annotation query details
|
||||
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../datasources/" >}}) topic.
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../../../datasources/" >}}) topic.
|
||||
215
docs/sources/dashboards/build-dashboards/best-practices/index.md
Normal file
215
docs/sources/dashboards/build-dashboards/best-practices/index.md
Normal file
@@ -0,0 +1,215 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/
|
||||
- /docs/grafana/latest/best-practices/common-observability-strategies/
|
||||
- /docs/grafana/latest/getting-started/strategies/
|
||||
- /docs/grafana/latest/best-practices/dashboard-management-maturity-levels/
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-creating-dashboards/
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-managing-dashboards/
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/best-practices/
|
||||
description: Best practices for working with Grafana
|
||||
title: Grafana dashboard best practices
|
||||
menuTitle: Best practices
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Grafana dashboard best practices
|
||||
|
||||
This section provides information about best practices for intermediate Grafana administrators and users about how to build and maintain Grafana dashboards.
|
||||
|
||||
For more information about the different kinds of dashboards you can create, refer to [Grafana dashboards: A complete guide to all the different types you can build](https://grafana.com/blog/2022/06/06/grafana-dashboards-a-complete-guide-to-all-the-different-types-you-can-build/?pg=webinar-getting-started-with-grafana-dashboard-design-amer&plcmt=related-content-1).
|
||||
|
||||
## Common observability strategies
|
||||
|
||||
When you have a lot to monitor, like a server farm, you need a strategy to decide what is important enough to monitor. This page describes several common methods for choosing what to monitor.
|
||||
|
||||
A logical strategy allows you to make uniform dashboards and scale your observability platform more easily.
|
||||
|
||||
### Guidelines for usage
|
||||
|
||||
- The USE method tells you how happy your machines are, the RED method tells you how happy your users are.
|
||||
- USE reports on causes of issues.
|
||||
- RED reports on user experience and is more likely to report symptoms of problems.
|
||||
- The best practice of alerting is to alert on symptoms rather than causes, so alerting should be done on RED dashboards.
|
||||
|
||||
### USE method
|
||||
|
||||
USE stands for:
|
||||
|
||||
- **Utilization -** Percent time the resource is busy, such as node CPU usage
|
||||
- **Saturation -** Amount of work a resource has to do, often queue length or node load
|
||||
- **Errors -** Count of error events
|
||||
|
||||
This method is best for hardware resources in infrastructure, such as CPU, memory, and network devices. For more information, refer to [The USE Method](http://www.brendangregg.com/usemethod.html).
|
||||
|
||||
### RED method
|
||||
|
||||
RED stands for:
|
||||
|
||||
- **Rate -** Requests per second
|
||||
- **Errors -** Number of requests that are failing
|
||||
- **Duration -** Amount of time these requests take, distribution of latency measurements
|
||||
|
||||
This method is most applicable to services, especially a microservices environment. For each of your services, instrument the code to expose these metrics for each component. RED dashboards are good for alerting and SLAs. A well-designed RED dashboard is a proxy for user experience.
|
||||
|
||||
For more information, refer to Tom Wilkie's blog post [The RED method: How to instrument your services](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services).
|
||||
|
||||
### The Four Golden Signals
|
||||
|
||||
According to the [Google SRE handbook](https://landing.google.com/sre/sre-book/chapters/monitoring-distributed-systems/#xref_monitoring_golden-signals), if you can only measure four metrics of your user-facing system, focus on these four.
|
||||
|
||||
This method is similar to the RED method, but it includes saturation.
|
||||
|
||||
- **Latency -** Time taken to serve a request
|
||||
- **Traffic -** How much demand is placed on your system
|
||||
- **Errors -** Rate of requests that are failing
|
||||
- **Saturation -** How "full" your system is
|
||||
|
||||
[Here's an example from Grafana Play](https://play.grafana.org/d/000000109/the-four-golden-signals?orgId=1).
|
||||
|
||||
## Dashboard management maturity model
|
||||
|
||||
_Dashboard management maturity_ refers to how well-designed and efficient your dashboard ecosystem is. We recommend periodically reviewing your dashboard setup to gauge where you are and how you can improve.
|
||||
|
||||
Broadly speaking, dashboard maturity can be defined as low, medium, or high.
|
||||
|
||||
Much of the content for this topic was taken from the KubeCon 2019 talk [Fool-Proof Kubernetes Dashboards for Sleep-Deprived Oncalls](https://www.youtube.com/watch?v=YE2aQFiMGfY).
|
||||
|
||||
### Low - default state
|
||||
|
||||
At this stage, you have no coherent dashboard management strategy. Almost everyone starts here.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Everyone can modify your dashboards.
|
||||
- Lots of copied dashboards, little to no dashboard reuse.
|
||||
- One-off dashboards that hang around forever.
|
||||
- No version control (dashboard JSON in version control).
|
||||
- Lots of browsing for dashboards, searching for the right dashboard. This means lots of wasted time trying to find the dashboard you need.
|
||||
- Not having any alerts to direct you to the right dashboard.
|
||||
|
||||
### Medium - methodical dashboards
|
||||
|
||||
At this stage, you are starting to manage your dashboard use with methodical dashboards. You might have laid out a strategy, but there are some things you could improve.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Prevent sprawl by using template variables. For example, you don't need a separate dashboard for each node, you can use query variables. Even better, you can make the data source a template variable too, so you can reuse the same dashboard across different clusters and monitoring backends.
|
||||
|
||||
Refer to the list of [Variable examples]({{< relref "../../variables/#examples-of-templates-and-variables" >}}) if you want some ideas.
|
||||
|
||||
- Methodical dashboards according to an [observability strategy]({{< relref "#common-observability-strategies" >}}).
|
||||
- Hierarchical dashboards with drill-downs to the next level.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/drill-down-example.png" caption="Example of using drill-down" >}}
|
||||
|
||||
- Dashboard design reflects service hierarchies. The example shown below uses the RED method (request and error rate on the left, latency duration on the right) with one row per service. The row order reflects the data flow.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/service-hierarchy-example.png" caption="Example of a service hierarchy" >}}
|
||||
|
||||
- Compare like to like: split service dashboards when the magnitude differs. Make sure aggregated metrics don't drown out important information.
|
||||
- Expressive charts with meaningful use of color and normalizing axes where you can.
|
||||
- Example of meaningful color: Blue means it's good, red means it's bad. [Thresholds]({{< relref "../../../panels-visualizations/configure-thresholds/" >}}) can help with that.
|
||||
- Example of normalizing axes: When comparing CPU usage, measure by percentage rather than raw number, because machines can have a different number of cores. Normalizing CPU usage by the number of cores reduces cognitive load because the viewer can trust that at 100% all cores are being used, without having to know the number of CPUs.
|
||||
- Directed browsing cuts down on "guessing."
|
||||
- Template variables make it harder to “just browse” randomly or aimlessly.
|
||||
- Most dashboards should be linked to by alerts.
|
||||
- Browsing is directed with links. For more information, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links" >}}).
|
||||
- Version-controlled dashboard JSON.
|
||||
|
||||
### High - optimized use
|
||||
|
||||
At this stage, you have optimized your dashboard management use with a consistent and thoughtful strategy. It requires maintenance, but the results are worth it.
|
||||
|
||||
- Actively reducing sprawl.
|
||||
- Regularly review existing dashboards to make sure they are still relevant.
|
||||
- Only approved dashboards added to master dashboard list.
|
||||
- Tracking dashboard use. If you're an Enterprise user, you can take advantage of [Usage insights]({{< relref "../../assess-dashboard-usage/" >}}).
|
||||
- Consistency by design.
|
||||
- Use scripting libraries to generate dashboards, ensure consistency in pattern and style.
|
||||
- grafonnet (Jsonnet)
|
||||
- grafanalib (Python)
|
||||
- No editing in the browser. Dashboard viewers change views with variables.
|
||||
- Browsing for dashboards is the exception, not the rule.
|
||||
- Perform experimentation and testing in a separate Grafana instance dedicated to that purpose, not your production instance. When a dashboard in the test environment is proven useful, then add that dashboard to your main Grafana instance.
|
||||
|
||||
## Best practices for creating dashboards
|
||||
|
||||
This page outlines some best practices to follow when creating Grafana dashboards.
|
||||
|
||||
### Before you begin
|
||||
|
||||
Here are some principles to consider before you create a dashboard.
|
||||
|
||||
#### A dashboard should tell a story or answer a question
|
||||
|
||||
What story are you trying to tell with your dashboard? Try to create a logical progression of data, such as large to small or general to specific. What is the goal for this dashboard? (Hint: If the dashboard doesn't have a goal, then ask yourself if you really need the dashboard.)
|
||||
|
||||
Keep your graphs simple and focused on answering the question that you are asking. For example, if your question is "which servers are in trouble?", then maybe you don't need to show all the server data. Just show data for the ones in trouble.
|
||||
|
||||
#### Dashboards should reduce cognitive load, not add to it
|
||||
|
||||
_Cognitive load_ is basically how hard you need to think about something in order to figure it out. Make your dashboard easy to interpret. Other users and future you (when you're trying to figure out what broke at 2AM) will appreciate it.
|
||||
|
||||
Ask yourself:
|
||||
|
||||
- Can I tell what exactly each graph represents? Is it obvious, or do I have to think about it?
|
||||
- If I show this to someone else, how long will it take them to figure it out? Will they get lost?
|
||||
|
||||
#### Have a monitoring strategy
|
||||
|
||||
It's easy to make new dashboards. It's harder to optimize dashboard creation and adhere to a plan, but it's worth it. This strategy should govern both your overall dashboard scheme and enforce consistency in individual dashboard design.
|
||||
|
||||
Refer to [Common observability strategies]({{< relref "#common-observability-strategies" >}}) and [Dashboard management maturity levels]({{< relref "#dashboard-management-maturity-model" >}}) for more information.
|
||||
|
||||
#### Write it down
|
||||
|
||||
Once you have a strategy or design guidelines, write them down to help maintain consistency over time. Check out this [Wikimedia runbook example](https://wikitech.wikimedia.org/wiki/Performance/Runbook/Grafana_best_practices).
|
||||
|
||||
### Best practices to follow
|
||||
|
||||
- When creating a new dashboard, make sure it has a meaningful name.
|
||||
- If you are creating a dashboard to play or experiment, then put the word `TEST` or `TMP` in the name.
|
||||
- Consider including your name or initials in the dashboard name or as a tag so that people know who owns the dashboard.
|
||||
- Remove temporary experiment dashboards when you are done with them.
|
||||
- If you create many related dashboards, think about how to cross-reference them for easy navigation. Refer to [Best practices for managing dashboards]({{< relref "#best-practices-for-managing-dashboards" >}}) for more information.
|
||||
- Grafana retrieves data from a data source. A basic understanding of [data sources]({{< relref "../../../datasources/" >}}) in general and your specific is important.
|
||||
- Avoid unnecessary dashboard refreshing to reduce the load on the network or backend. For example, if your data changes every hour, then you don't need to set the dashboard refresh rate to 30 seconds.
|
||||
- Use the left and right Y-axes when displaying time series with different units or ranges.
|
||||
- Add documentation to dashboards and panels.
|
||||
- To add documentation to a dashboard, add a [Text panel visualization]({{< relref "../../../panels-visualizations/visualizations/text/" >}}) to the dashboard. Record things like the purpose of the dashboard, useful resource links, and any instructions users might need to interact with the dashboard. Check out this [Wikimedia example](https://grafana.wikimedia.org/d/000000066/resourceloader?orgId=1).
|
||||
- To add documentation to a panel, edit the panel settings and add a description. Any text you add will appear if you hover your cursor over the small `i` in the top left corner of the panel.
|
||||
- Reuse your dashboards and enforce consistency by using [templates and variables]({{< relref "../../variables" >}}).
|
||||
- Be careful with stacking graph data. The visualizations can be misleading, and hide important data. We recommend turning it off in most cases.
|
||||
|
||||
## Best practices for managing dashboards
|
||||
|
||||
This page outlines some best practices to follow when managing Grafana dashboards.
|
||||
|
||||
### Before you begin
|
||||
|
||||
Here are some principles to consider before you start managing dashboards.
|
||||
|
||||
#### Strategic observability
|
||||
|
||||
There are several [common observability strategies]({{< relref "#common-observability-strategies" >}}). You should research them and decide whether one of them works for you or if you want to come up with your own. Either way, have a plan, write it down, and stick to it.
|
||||
|
||||
Adapt your strategy to changing needs as necessary.
|
||||
|
||||
#### Maturity level
|
||||
|
||||
What is your dashboard maturity level? Analyze your current dashboard setup and compare it to the [Dashboard management maturity model]({{< relref "#dashboard-management-maturity-model" >}}). Understanding where you are can help you decide how to get to where you want to be.
|
||||
|
||||
### Best practices to follow
|
||||
|
||||
- Avoid dashboard sprawl, meaning the uncontrolled growth of dashboards. Dashboard sprawl negatively affects time to find the right dashboard. Duplicating dashboards and changing “one thing” (worse: keeping original tags) is the easiest kind of sprawl.
|
||||
- Periodically review the dashboards and remove unnecessary ones.
|
||||
- If you create a temporary dashboard, perhaps to test something, prefix the name with `TEST: `. Delete the dashboard when you are finished.
|
||||
- Copying dashboards with no significant changes is not a good idea.
|
||||
- You miss out on updates to the original dashboard, such as documentation changes, bug fixes, or additions to metrics.
|
||||
- In many cases copies are being made to simply customize the view by setting template parameters. This should instead be done by maintaining a link to the master dashboard and customizing the view with [URL parameters]({{< relref "../../../panels-visualizations/configure-data-links/#data-link-variables" >}}).
|
||||
- When you must copy a dashboard, clearly rename it and _do not_ copy the dashboard tags. Tags are important metadata for dashboards that are used during search. Copying tags can result in false matches.
|
||||
- Maintain a dashboard of dashboards or cross-reference dashboards. This can be done in several ways:
|
||||
- Create dashboard links, panel, or data links. Links can go to other dashboards or to external systems. For more information, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links/" >}}).
|
||||
- Add a [Dashboard list panel]({{< relref "../../../panels-visualizations/visualizations/dashboard-list/" >}}). You can then customize what you see by doing tag or folder searches.
|
||||
- Add a [Text panel]({{< relref "../../../panels-visualizations/visualizations/text/" >}}) and use markdown to customize the display.
|
||||
@@ -0,0 +1,73 @@
|
||||
---
|
||||
title: Dashboard URL variables
|
||||
keywords:
|
||||
- grafana
|
||||
- url variables
|
||||
- documentation
|
||||
- variables
|
||||
- dashboards
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/create-dashboard-url-variables/
|
||||
- /docs/grafana/latest/variables/url-variables/
|
||||
- /docs/grafana/latest/variables/variable-types/url-variables/
|
||||
weight: 250
|
||||
---
|
||||
|
||||
# Dashboard URL variables
|
||||
|
||||
Grafana can apply variable values passed as query parameters in dashboard URLs.
|
||||
For more information, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links/" >}}) and [Templates and variables]({{< relref "../../variables/" >}}).
|
||||
|
||||
## Passing variables as query parameters
|
||||
|
||||
Grafana interprets query string parameters prefixed with `var-` as variables in the given dashboard.
|
||||
|
||||
For example, in this URL:
|
||||
|
||||
```
|
||||
https://${your-domain}/path/to/your/dashboard?var-example=value
|
||||
```
|
||||
|
||||
The query parameter `var-example=value` represents the dashboard variable `example` with a value of `value`.
|
||||
|
||||
### Passing multiple values for a variable
|
||||
|
||||
To pass multiple values, repeat the variable parameter once for each value:
|
||||
|
||||
```
|
||||
https://${your-domain}/path/to/your/dashboard?var-example=value1&var-example=value2
|
||||
```
|
||||
|
||||
Grafana interprets `var-example=value1&var-example=value2` as the dashboard variable `example` with two values: `value1` and `value2`.
|
||||
|
||||
### Example
|
||||
|
||||
See [https://play.grafana.org/d/000000074/alerting?var-app=backend&var-server=backend_01&var-server=backend_03&var-interval=1]h - this passes the variable `server` with multiple values, and the variables `app` and `interval` with a single value each.
|
||||
|
||||
## Adding variables to dashboard links
|
||||
|
||||
Grafana can add variables to dashboard links when you generate them from a dashboard's settings. For more information and steps to add variables, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links/" >}}).
|
||||
|
||||
## Passing ad hoc filters
|
||||
|
||||
Ad hoc filters apply key/value filters to all metric queries that use a specified data source. For more information, refer to [Add ad hoc filters]({{< relref "../../variables/add-template-variables/#add-ad-hoc-filters" >}}).
|
||||
|
||||
To pass an ad hoc filter as a query parameter, use the variable syntax to pass the ad hoc filter variable, and also provide the key, the operator as the value, and the value as a pipe-separated list.
|
||||
|
||||
For example, in this URL:
|
||||
|
||||
```
|
||||
https://${your-domain}/path/to/your/dashboard?var-adhoc=example_key|=|example_value
|
||||
```
|
||||
|
||||
The query parameter `var-adhoc=key|=|value` applies the ad hoc filter configured as the `adhoc` dashboard variable using the `example_key` key, the `=` operator, and the `example_value` value.
|
||||
|
||||
> **Note:** When sharing URLs with ad hoc filters, remember to encode the URL. In the above example, replace the pipes (`|`) with `%7C` and the equality operator (`=`) with `%3D`.
|
||||
|
||||
### Example
|
||||
|
||||
See [https://play.grafana.org/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica] - this passes the ad hoc filter variable `adhoc` with the filter value `datacenter = America`.
|
||||
|
||||
## Controlling time range using the URL
|
||||
|
||||
To set a dashboard's time range, use the `from`, `to`, `time`, and `time.window` query parameters. Because these are not variables, they do not require the `var-` prefix. For more information, see the [Linking overview]({{< relref "../" >}}).
|
||||
@@ -0,0 +1,92 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/create-dashboard/
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/add-organize-panels/
|
||||
title: Create a dashboard
|
||||
menuTitle: Create a dashboard
|
||||
weight: 1
|
||||
keywords:
|
||||
- panel
|
||||
- dashboard
|
||||
- create
|
||||
---
|
||||
|
||||
## Create a dashboard
|
||||
|
||||
Dashboards and panels allow you to show your data in visual form. Each panel needs at least one query to display a visualization.
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you have the proper permissions. For more information about permissions, refer to [About users and permissions]({{< relref "../../../administration/roles-and-permissions/" >}}).
|
||||
- Identify the dashboard to which you want to add the panel.
|
||||
- Understand the query language of the target data source.
|
||||
- Ensure that data source for which you are writing a query has been added. For more information about adding a data source, refer to [Add a data source]({{< relref "../../../datasources/add-a-data-source/" >}}) if you need instructions.
|
||||
|
||||
**To create a dashboard**:
|
||||
|
||||
1. Sign in to Grafana, hover your cursor over **Dashboard**, and click **+ New Dashboard**.
|
||||
1. Click **Add a new panel**.
|
||||
1. In the first line of the **Query** tab, click the drop-down list and select a data source.
|
||||
1. Write or construct a query in the query language of your data source.
|
||||
|
||||
For more information about data sources, refer to [Data sources]({{< relref "../../../datasources/" >}}) for specific guidelines.
|
||||
|
||||
1. In the Visualization list, select a visualization type.
|
||||
|
||||
Grafana displays a preview of your query results with the visualization applied.
|
||||
|
||||

|
||||
|
||||
For more information about individual visualizations, refer to [Visualizations options]({{< relref "../../../panels-visualizations/visualizations/" >}}).
|
||||
|
||||
1. Refer to the following documentation for ways you can adjust panel settings.
|
||||
|
||||
While not required, most visualizations need some adjustment before they properly display the information that you need.
|
||||
|
||||
- [Configure value mappings]({{< relref "../../../panels-visualizations/configure-value-mappings" >}})
|
||||
- [Visualization-specific options]({{< relref "../../../panels-visualizations/visualizations/" >}})
|
||||
- [Override field values]({{< relref "../../../panels-visualizations/configure-overrides/" >}})
|
||||
- [Configure thresholds]({{< relref "../../../panels-visualizations/configure-thresholds/" >}})
|
||||
- [Configure standard options]({{< relref "../../../panels-visualizations/configure-standard-options/" >}})
|
||||
|
||||
1. Add a note to describe the visualization (or describe your changes) and then click **Save** in the upper-right corner of the page.
|
||||
|
||||
Notes can be helpful if you need to revert the dashboard to a previous version.
|
||||
|
||||
## Configure repeating rows
|
||||
|
||||
You can configure Grafana to dynamically add panels or rows to a dashboard based on the value of a variable. Variables dynamically change your queries across all rows in a dashboard. For more information about repeating panels, refer to [Configure repeating panels](../../panels/configure-panel-options/#configure-repeating-panels).
|
||||
|
||||
To see an example of repeating rows, refer to [Dashboard with repeating rows](https://play.grafana.org/d/000000153/repeat-rows). The example shows that you can also repeat rows if you have variables set with `Multi-value` or `Include all values` selected.
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that the query includes a multi-value variable.
|
||||
|
||||
**To configure repeating rows:**
|
||||
|
||||
1. On the dashboard home page, click **Add panel**.
|
||||
|
||||
1. On the **Add a panel** dialog box, click **Add a new row**.
|
||||
|
||||
1. Hover over the row title and click the cog icon.
|
||||
|
||||
1. On the **Row Options** dialog box, add a title and select the variable for which you want to add repeating rows.
|
||||
|
||||
> **Note:** To provide context to dashboard users, add the variable to the row title.
|
||||
|
||||
## Move a panel
|
||||
|
||||
You can place a panel on a dashboard in any location.
|
||||
|
||||
1. Open the dashboard.
|
||||
|
||||
1. Click the panel title and drag the panel to the new location.
|
||||
|
||||
## Resize a panel
|
||||
|
||||
You can size a dashboard panel to suits your needs.
|
||||
|
||||
1. Open the dashboard.
|
||||
|
||||
1. To adjust the size of the panel, click and drag the lower-right corner of the panel.
|
||||
@@ -6,6 +6,7 @@ aliases:
|
||||
- /docs/grafana/latest/linking/dashboard-links/
|
||||
- /docs/grafana/latest/dashboards/manage-dashboard-links/
|
||||
- /docs/grafana/latest/panels/working-with-panels/add-link-to-panel/
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/manage-dashboard-links/
|
||||
description: How to link Grafana dashboards.
|
||||
keywords:
|
||||
- link
|
||||
@@ -17,7 +18,7 @@ keywords:
|
||||
- navigate
|
||||
title: Manage dashboard links
|
||||
menuTitle: Manage dashboard links
|
||||
weight: 400
|
||||
weight: 500
|
||||
---
|
||||
|
||||
# Manage dashboard links
|
||||
@@ -35,11 +36,11 @@ The next step is to figure out which link type is right for your workflow. Even
|
||||
- If the link relates to most if not all of the panels in the dashboard, use [dashboard links]({{< relref "#dashboard-links" >}}).
|
||||
- If you want to drill down into specific panels, use [panel links]({{< relref "#panel-links" >}}).
|
||||
- If you want to link to an external site, you can use either a dashboard link or a panel link.
|
||||
- If you want to drill down into a specific series, or even a single measurement, use [data links]({{< relref "../../panels/configure-data-links/#data-links" >}}).
|
||||
- If you want to drill down into a specific series, or even a single measurement, use [data links]({{< relref "../../../panels-visualizations/configure-data-links/#data-links" >}}).
|
||||
|
||||
## Controlling time range using the URL
|
||||
|
||||
You can control the time range of a panel or dashboard by providing following query parameters in dashboard URL:
|
||||
To control the time range of a panel or dashboard, you can provide query parameters in the dashboard URL:
|
||||
|
||||
- `from` - defines lower limit of the time range, specified in ms epoch
|
||||
- `to` - defines upper limit of the time range, specified in ms epoch
|
||||
@@ -47,7 +48,7 @@ You can control the time range of a panel or dashboard by providing following qu
|
||||
|
||||
## Dashboard links
|
||||
|
||||
When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you don’t have to worry whether the person you send the link to is looking at the right data. For other types of links, refer to [Data link variables]({{< relref "../../panels/configure-data-links/#data-link-variables/" >}}).
|
||||
When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you don’t have to worry whether the person you send the link to is looking at the right data. For other types of links, refer to [Data link variables]({{< relref "../../../panels-visualizations/configure-data-links/#data-link-variables/" >}}).
|
||||
|
||||
Dashboard links can also be used as shortcuts to external systems, such as submitting [a GitHub issue with the current dashboard name](https://github.com/grafana/grafana/issues/new?title=Dashboard%3A%20HTTP%20Requests).
|
||||
|
||||
@@ -69,7 +70,7 @@ Add links to other dashboards at the top of your current dashboard.
|
||||
- **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. 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
|
||||
- **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]({{< relref "../create-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**.
|
||||
|
||||
@@ -8,12 +8,13 @@ aliases:
|
||||
- /docs/grafana/latest/panels/library-panels/manage-library-panel/
|
||||
- /docs/grafana/latest/panels/library-panels/delete-library-panel/
|
||||
- /docs/grafana/latest/dashboards/manage-library-panels/
|
||||
title: Manage Grafana library panels
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/manage-library-panels/
|
||||
title: Manage library panels
|
||||
menuTitle: Manage library panels
|
||||
weight: 3
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# Manage Grafana library panels
|
||||
# Manage library panels
|
||||
|
||||
A library panel is a reusable panel that you can use in any dashboard. When you make a change to a library panel, that change propagates to all instances of where the panel is used. Library panels streamline reuse of panels across multiple dashboards.
|
||||
|
||||
@@ -2,17 +2,19 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/dashboard-history/
|
||||
- /docs/grafana/latest/reference/dashboard_history/
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/manage-version-history/
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
- documentation
|
||||
- version
|
||||
- history
|
||||
title: Dashboard version history
|
||||
weight: 14
|
||||
title: Manage dashboard version history
|
||||
menutitle: Manage version history
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Dashboard version history
|
||||
# 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. A list of these versions is available by entering the dashboard settings and then selecting "Versions" in the left side menu.
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/modify-dashboard-settings/
|
||||
title: Modify dashboard settings
|
||||
menuTitle: Dashboard settings
|
||||
weight: 8
|
||||
keywords:
|
||||
- time settings
|
||||
- variables
|
||||
- links
|
||||
- dashboard
|
||||
- settings
|
||||
---
|
||||
|
||||
# Modify dashboard settings
|
||||
|
||||
The dashboard settings page enables you to:
|
||||
|
||||
- Edit general dashboard properties, including time settings
|
||||
- Add annotation queries
|
||||
- Add dashboard variables
|
||||
- Add links
|
||||
- View the dashboard JSON model
|
||||
|
||||
To access the dashboard setting page:
|
||||
|
||||
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 **Dashboard settings** page, click **General**.
|
||||
1. Navigate to the **Time Options** section.
|
||||
1. Specify time settings according to the following descriptions.
|
||||
|
||||
- **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.
|
||||
- **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.
|
||||
- **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.
|
||||
|
||||
## Add an annotation query
|
||||
|
||||
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 **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.
|
||||
|
||||
The query editor UI changes based on the data source you select. Refer to the [Data source]({{< relref "../../../datasources/" >}}) documentation for details on how to construct a query.
|
||||
|
||||
## Add a variable
|
||||
|
||||
Variables enable you to create more interactive and dynamic dashboards. Instead of hard-coding things like server, application,
|
||||
and sensor names in your metric queries, you can use variables in their place. Variables are displayed as dropdown lists at the top of
|
||||
the dashboard. These dropdowns make it easy to change the data being displayed in your dashboard.
|
||||
|
||||
For more information about variables, refer to [Variables]({{< relref "../../variables/" >}}).
|
||||
|
||||
1. On the **Dashboard settings** page, click **Variable** in the left side section menu and then the **Add variable** button.
|
||||
1. In the **General** section, the the name of the variable. This is the name that you will later use in queries.
|
||||
1. Select a variable **Type**.
|
||||
|
||||
> **Note:** The variable type you select impacts which fields you populate on the page.
|
||||
|
||||
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 **Dashboard settings** page, click **Links** in the left side section menu and then the **Add link** button.
|
||||
1. Enter title and and in the **Type** field, select **Dashboard** or **Link**.
|
||||
1. 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 **Dashboard settings** page, click **JSON**.
|
||||
|
||||
For more information about the JSON fields, refer to [JSON fields]({{< relref "../view-dashboard-json-model/#json-fields" >}}).
|
||||
@@ -2,6 +2,7 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/json-model/
|
||||
- /docs/grafana/latest/reference/dashboard/
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/view-dashboard-json-model/
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
@@ -9,7 +10,7 @@ keywords:
|
||||
- json
|
||||
- model
|
||||
title: JSON model
|
||||
weight: 1200
|
||||
weight: 700
|
||||
---
|
||||
|
||||
# Dashboard JSON model
|
||||
@@ -28,6 +28,8 @@ Reporting enables you to automatically generate PDFs from any of your dashboards
|
||||
|
||||
Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report also changes.
|
||||
|
||||
For information about recent improvements to the reporting UI, refer to [Grafana reporting: How we improved the UX in Grafana](https://grafana.com/blog/2022/06/29/grafana-reporting-how-we-improved-the-ux-in-grafana/).
|
||||
|
||||
## Requirements
|
||||
|
||||
- SMTP must be configured for reports to be sent. Refer to [SMTP]({{< relref "../../setup-grafana/configure-grafana/#smtp" >}}) in [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) for more information.
|
||||
@@ -84,7 +86,7 @@ You can configure report-specific template variables for the dashboard on the re
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../enterprise/" >}}) version 8.0 and later, and [Grafana Cloud Pro and Advanced]({{< ref "/grafana-cloud" >}}).
|
||||
|
||||
You can include dynamic dashboards with panels or rows, set to repeat by a variable, into reports. For detailed information about setting up repeating panels or rows in dashboards, refer to [Repeat panels or rows]({{< relref "../../panels/configure-panel-options/#configure-repeating-rows-or-panels" >}}).
|
||||
You can include dynamic dashboards with panels or rows, set to repeat by a variable, into reports. For detailed information about setting up repeating panels or rows in dashboards, refer to [Repeat panels or rows]({{< relref "../../panels-visualizations/configure-panel-options/#configure-repeating-rows-or-panels" >}}).
|
||||
|
||||
#### Caveats
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/dashboard-manage/
|
||||
- /docs/grafana/latest/features/dashboard/dashboards/
|
||||
- /docs/grafana/latest/dashboards/dashboard-public/
|
||||
title: Public dashboards
|
||||
weight: 8
|
||||
---
|
||||
@@ -59,5 +60,7 @@ publicDashboards = true
|
||||
- Exemplars will be omitted from the panel.
|
||||
- Annotations will not be displayed in public dashboards.
|
||||
- Grafana Live and real-time event streams are not supported.
|
||||
- Library panels are currently not supported, but are planned to be in the future.
|
||||
- Datasources using Reverse Proxy functionality are not supported.
|
||||
|
||||
We are excited to share this enhancement with you and we’d love your feedback! Please check out the [Github](https://github.com/grafana/grafana/discussions/49253) discussion and join the conversation.
|
||||
@@ -14,7 +14,7 @@ aliases:
|
||||
title: Manage dashboards
|
||||
menuTitle: Manage dashboards
|
||||
weight: 8
|
||||
eywords:
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
- dashboard folders
|
||||
@@ -29,7 +29,7 @@ eywords:
|
||||
|
||||
# Manage dashboards
|
||||
|
||||
A dashboard is a set of one or more [panels]({{< relref "../../panels/" >}}) that visually presents your data in one or more rows.
|
||||
A dashboard is a set of one or more [panels]({{< relref "../../panels-visualizations/" >}}) that visually presents your data in one or more rows.
|
||||
|
||||
For more information about creating dashboards, refer to [Add and organize panels](../add-organize-panels).
|
||||
|
||||
@@ -129,155 +129,6 @@ Find dashboards for common server applications at [Grafana.com/dashboards](https
|
||||
|
||||
{{< figure src="/static/img/docs/v50/gcom_dashboard_list.png" max-width="700px" >}}
|
||||
|
||||
## Configure dashboard time range controls
|
||||
|
||||
Grafana provides several ways to manage the time ranges of the data being visualized, for dashboard, panels and also for alerting.
|
||||
|
||||
This section describes supported time units and relative ranges, the common time controls, dashboard-wide time settings, and panel-specific time settings.
|
||||
|
||||
### Time units and relative ranges
|
||||
|
||||
Grafana supports the following time units: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `Q (quarters)` and `y (years)`.
|
||||
|
||||
The minus operator enables you to step back in time, relative to now. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
|
||||
|
||||
The plus operator enables you to step forward in time, relative to now. For example, you can use this feature to look at predicted data in the future.
|
||||
|
||||
The following table provides example relative ranges:
|
||||
|
||||
| Example relative range | From: | To: |
|
||||
| ---------------------- | ----------- | ----------- |
|
||||
| Last 5 minutes | `now-5m` | `now` |
|
||||
| The day so far | `now/d` | `now` |
|
||||
| This week | `now/w` | `now/w` |
|
||||
| This week so far | `now/w` | `now` |
|
||||
| This month | `now/M` | `now/M` |
|
||||
| This month so far | `now/M` | `now` |
|
||||
| Previous Month | `now-1M/M` | `now-1M/M` |
|
||||
| This year so far | `now/Y` | `now` |
|
||||
| This Year | `now/Y` | `now/Y` |
|
||||
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
|
||||
|
||||
#### Note about Grafana Alerting
|
||||
|
||||
For Grafana Alerting, we do not support the following syntaxes at this time.
|
||||
|
||||
- now+n for future timestamps.
|
||||
- now-1n/n for "start of n until end of n" because this is an absolute timestamp.
|
||||
|
||||
### Common time range controls
|
||||
|
||||
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.
|
||||
|
||||
#### Current time range
|
||||
|
||||
The current time range, also called the _time picker_, shows the time range currently displayed in the dashboard or panel you are viewing.
|
||||
|
||||
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="/static/img/docs/time-range-controls/change-current-time-range-7-0.png" max-width="900px">
|
||||
|
||||
#### Relative time range
|
||||
|
||||
Select the relative time range from the **Relative time ranges** list. You can filter the list using the input field at the top. Some examples of time ranges include:
|
||||
|
||||
- Last 30 minutes
|
||||
- Last 12 hours
|
||||
- Last 7 days
|
||||
- Last 2 years
|
||||
- Yesterday
|
||||
- Day before yesterday
|
||||
- This day last week
|
||||
- Today so far
|
||||
- This week so far
|
||||
- This month so far
|
||||
|
||||
#### Absolute time range
|
||||
|
||||
You can set an absolute time range in the following ways:
|
||||
|
||||
- Type values into the **From** and **To** fields. You can type exact time values or relative values, such as `now-24h`, and then click **Apply time range**.
|
||||
- Click in the **From** or **To** field. Grafana displays a calendar. Click the day or days you want to use as the current time range and then click **Apply time range**.
|
||||
|
||||
This section also displays recently used absolute ranges.
|
||||
|
||||
#### Zoom out (Cmd+Z or Ctrl+Z)
|
||||
|
||||
Click the **Zoom out** icon to view a larger time range in the dashboard or panel visualization.
|
||||
|
||||
#### Zoom in (only applicable to graph visualizations)
|
||||
|
||||
Click and drag to select the time range in the visualization that you want to view.
|
||||
|
||||
#### Refresh dashboard
|
||||
|
||||
Click the **Refresh dashboard** icon to immediately run every query on the dashboard and refresh the visualizations. Grafana cancels any pending requests when you trigger a refresh.
|
||||
|
||||
By default, Grafana does not automatically refresh the dashboard. Queries run on their own schedule according to the panel settings. However, if you want to regularly refresh the dashboard, then click the down arrow next to the **Refresh dashboard** icon and then select a refresh interval.
|
||||
|
||||
### Dashboard time settings
|
||||
|
||||
Time settings are saved on a per-dashboard basis.
|
||||
|
||||
You can change the **Timezone** and **fiscal year** settings from the time range controls by clicking the **Change time settings** button.
|
||||
|
||||
For more advanced time settings, click the **Dashboard settings** (gear) icon at the top of the page. Then navigate to the **Time Options** section of the **General** tab.
|
||||
|
||||
- **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:** The default selected time zone for the user profile, team, or organization is used. If no time zone is specified for the user profile, a team the user is a member of, or the organization, then Grafana uses local browser time.
|
||||
- **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.
|
||||
- **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.
|
||||
|
||||
### Panel time overrides and timeshift
|
||||
|
||||
In [Query options]({{< relref "../../panels/query-options/" >}}), you can override the relative time range for individual panels, which causes them to be different than what is selected in the dashboard time picker located in the upper right. This enables you to show metrics from different time periods or days at the same time.
|
||||
|
||||
> **Note:** Panel time overrides have no effect when the time range for the dashboard is absolute.
|
||||
|
||||
### Control the time range using a URL
|
||||
|
||||
You can control the time range of a dashboard by providing the following query parameters in the dashboard URL:
|
||||
|
||||
- `from`: Defines the lower limit of the time range, specified in `ms`, `epoch`, or [relative time]({{< relref "#relative-time-range" >}})
|
||||
- `to`: Defines the upper limit of the time range, specified in `ms`, `epoch`, or [relative time]({{< relref "#relative-time-range" >}})
|
||||
- `time` and `time.window`: Defines a time range from `time-time.window/2` to `time+time.window/2`. Both parameters should be specified in `ms`. For example `?time=1500000000000&time.window=10000` results in 10s time range from 1499999995000 to 1500000005000
|
||||
|
||||
## Organize a dashboard
|
||||
|
||||
You can place any panel in any location you want and controls its size. The changes you make impact other users of the dashboard.
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you sign in to Grafana with Editor permissions
|
||||
|
||||
**To organize a dashboard**:
|
||||
|
||||
1. Hover your cursor over the panel, and click-and-drag the panel to its new location.
|
||||
|
||||
1. To resize a panel, click the zoom in (+) and zoom out (-) icons.
|
||||
|
||||

|
||||
|
||||
### Tips and shortcuts
|
||||
|
||||
- Click the graph title and in the dropdown menu quickly duplicate the panel.
|
||||
- Click the colored icon in the legend to change a series color or the y-axis.
|
||||
- Click series name in the legend to hide series.
|
||||
- Ctrl/Shift/Meta + click legend name to hide other series.
|
||||
- Hover your cursor over a panel and press `e` to open the panel editor.
|
||||
- Hover your cursor over a panel and press `v` to open the panel in full screen view.
|
||||
|
||||
## Troubleshoot dashboards
|
||||
|
||||
This section provides information to help you solve common dashboard problems.
|
||||
|
||||
@@ -16,7 +16,7 @@ aliases:
|
||||
- docs/grafana/latest/dashboards/share-dashboards-panels/
|
||||
- /docs/grafana/latest/share-dashboards-panels/
|
||||
title: Share dashboards and panels
|
||||
menuTitle: Share dashboards and panels
|
||||
menuTitle: Sharing
|
||||
weight: 85
|
||||
keywords:
|
||||
- grafana
|
||||
|
||||
@@ -1,148 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/dashboard-ui/
|
||||
- /docs/grafana/latest/dashboards/dashboard-ui/dashboard-header/
|
||||
- /docs/grafana/latest/features/dashboard/dashboards/
|
||||
- /docs/grafana/latest/dashboards/dashboard-ui/dashboard-row/
|
||||
- /docs/grafana/latest/features/dashboard/dashboards/
|
||||
- /docs/grafana/latest/dashboards/shortcuts/
|
||||
- /docs/grafana/latest/dashboards/search/
|
||||
- /docs/grafana/latest/reference/search/
|
||||
title: 'Use dashboards'
|
||||
menuTitle: Use dashboards
|
||||
weight: 1
|
||||
keywords:
|
||||
- dashboard
|
||||
- search
|
||||
- shortcuts
|
||||
---
|
||||
|
||||
# Use dashboards
|
||||
|
||||
This topic provides an overview of dashboard features and shortcuts, and describes how to use dashboard search.
|
||||
|
||||
## Dashboard feature overview
|
||||
|
||||
The dashboard user interface provides a number of features that you can use to customize the presentation of your data.
|
||||
|
||||
The following image and descriptions highlights all dashboards features.
|
||||
|
||||
{{< figure src="/static/img/docs/v91/dashboard-features/dashboard-features.png" width="700px" >}}
|
||||
|
||||
- **Grafana home** (1): Click the Grafana home icon to be redirected to the home page configured in the Grafana instance.
|
||||
- **Dashboard title** (2): When you click the dashboard title you can search for dashboard contained in the current folder.
|
||||
- **Share dashboard** (3): Use this option to share the current dashboard by link or snapshot. You can also export the dashboard definition from the share modal.
|
||||
- **Add panel** (4): Use this option to add a panel, dashboard row, or library panel to the current dashboard.
|
||||
- **Dashboard settings** (5): Use this option to change dashboard name, folder, and tags and manage variables and annotation queries.
|
||||
- **Time picker dropdown** (6): Click to select relative time range options and set custom absolute time ranges.
|
||||
- **Zoom out time range** (7): Click to zoom out the time range. For more information about how to use time range controls, refer to [Common time range controls](../time-range-controls/#common-time-range-controls).
|
||||
- **Refresh dashboard** (8): Click to immediately trigger queries and refresh dashboard data.
|
||||
- **Refresh dashboard time interval** (9): Click to select a dashboard auto refresh time interval.
|
||||
- **View mode** (10): Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. For more information about view mode, refer to [How to Create Kiosks to Display Dashboards on a TV](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
|
||||
- **Dashboard panel** (11): The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
|
||||
- Library panels can be shared among many dashboards.
|
||||
- To move a panel, drag the panel header to another location.
|
||||
- To resize a panel, click and drag the lower right corner of the panel.
|
||||
- **Graph legend** (12): Change series colors, y-axis and series visibility directly from the legend.
|
||||
- **Search** (13): Click **Search** to search for dashboards by name or panel title.
|
||||
- **Dashboard row** (14): A dashboard row is a logical divider within a dashboard that groups panels together.
|
||||
- Rows can be collapsed or expanded allowing you to hide parts of the dashboard.
|
||||
- Panels inside a collapsed row do not issue queries.
|
||||
- Use the [repeating rows]({{< relref "../panels/configure-panel-options/#configure-repeating-rows" >}}) to dynamically create rows based on a template variable.
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
Grafana has a number of keyboard shortcuts available. Press `?` or `h` on your keyboard to display all keyboard shortcuts available in your version of Grafana.
|
||||
|
||||
- `Ctrl+S`: Saves the current dashboard.
|
||||
- `f`: Opens the dashboard finder / search.
|
||||
- `d+k`: Toggle kiosk mode (hides the menu).
|
||||
- `d+e`: Expand all rows.
|
||||
- `d+s`: Dashboard settings.
|
||||
- `Ctrl+K`: Opens the command palette.
|
||||
- `Esc`: Exits panel when in fullscreen view or edit mode. Also returns you to the dashboard from dashboard settings.
|
||||
|
||||
**Focused panel**
|
||||
|
||||
By hovering over a panel with the mouse you can use some shortcuts that will target that panel.
|
||||
|
||||
- `e`: Toggle panel edit view
|
||||
- `v`: Toggle panel fullscreen view
|
||||
- `ps`: Open Panel Share Modal
|
||||
- `pd`: Duplicate Panel
|
||||
- `pr`: Remove Panel
|
||||
- `pl`: Toggle panel legend
|
||||
|
||||
## Dashboard search
|
||||
|
||||
You can search for dashboards by dashboard name and by panel title. When you search for dashboards, the system returns all dashboards available within the Grafana instance, even if you do not have permission to view the contents of the dashboard.
|
||||
|
||||
### Search dashboards using dashboard name
|
||||
|
||||
Begin typing any part of the dashboard name in the search bar. The search returns results for any partial string match in real-time, as you type.
|
||||
|
||||
Dashboard search is:
|
||||
|
||||
- Real-time
|
||||
- _Not_ case sensitive
|
||||
- Functional across stored _and_ file based dashboards.
|
||||
|
||||
> \*\*Note: You can use your keyboard arrow keys to navigate the results and press `Enter` to open the selected dashboard.
|
||||
|
||||
The following image shows the search results when you search using dashboard name.
|
||||
|
||||
{{< figure src="/static/img/docs/v91/dashboard-features/search-by-dashboard-name.png" width="700px" >}}
|
||||
|
||||
### Search dashboards using panel title
|
||||
|
||||
You can search for a dashboard by the title of a panel that appears in a dashboard.
|
||||
If a panel's title matches your search query, the dashboard appears in the search results.
|
||||
|
||||
This feature is available by default in Grafana Cloud and in Grafana OSS v9.1 and higher, you access this feature by enabling the `panelTitleSearch` feature toggle.
|
||||
For more information about enabling panel title search, refer to [Enable the panelTitleSearch feature toggle.](#enable-panelTitleSearch-feature-toggle)
|
||||
|
||||
The following image shows the search results when you search using panel title.
|
||||
|
||||
{{< figure src="/static/img/docs/v91/dashboard-features/search-by-panel-title.png" width="700px" >}}
|
||||
|
||||
#### Enable the panelTitleSearch feature toggle
|
||||
|
||||
Complete the following steps to enable the `panelTitleSearch` feature toggle.
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- If you are running Grafana Enterprise with RBAC, enable [service accounts]({{< relref "../administration/service-accounts/" >}}).
|
||||
|
||||
**To enable the panelTitleSearch feature toggle:**
|
||||
|
||||
1. Open the Grafana [configuration file]({{< relref "../setup-grafana/configure-grafana/#configuration-file-location" >}}).
|
||||
|
||||
1. Locate the [feature_toggles]({{< relref "../setup-grafana/configure-grafana/#feature_toggles" >}}) section.
|
||||
|
||||
1. Add the following parameter to the `feature_toggles` section:
|
||||
|
||||
```
|
||||
[feature_toggles]
|
||||
# enable features, separated by spaces
|
||||
enable = dashboardPreviews
|
||||
```
|
||||
|
||||
1. Save your changes and restart the Grafana server.
|
||||
|
||||
### Filter dashboard search results by tag(s)
|
||||
|
||||
Tags are a great way to organize your dashboards, especially as the number of dashboards grow. You can add and manage tags in dashboard `Settings`.
|
||||
|
||||
When you select multiple tags, Grafana shows dashboards that include all selected tags.
|
||||
|
||||
To filter dashboard search result by a tag, complete one of the following steps:
|
||||
|
||||
- To filter dashboard search results by tag, click a tag that appears in the right column of the search results.
|
||||
|
||||
You can continue filtering by clicking additional tags.
|
||||
|
||||
- To see a list of all available tags, click the **Filter by tags** dropdown menu and select a tag.
|
||||
|
||||
All tags will be shown, and when you select a tag, the dashboard search will be instantly filtered.
|
||||
|
||||
> **Note:** When using only a keyboard, press the `tab` key and navigate to the **Filter by tag** drop-down menu, press the down arrow key `▼` to activate the menu and locate a tag, and press `Enter` to select the tag.
|
||||
179
docs/sources/dashboards/use-dashboards/index.md
Normal file
179
docs/sources/dashboards/use-dashboards/index.md
Normal file
@@ -0,0 +1,179 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/dashboard-ui/
|
||||
- /docs/grafana/latest/dashboards/dashboard-ui/dashboard-header/
|
||||
- /docs/grafana/latest/features/dashboard/dashboards/
|
||||
- /docs/grafana/latest/dashboards/dashboard-ui/dashboard-row/
|
||||
- /docs/grafana/latest/features/dashboard/dashboards/
|
||||
- /docs/grafana/latest/dashboards/shortcuts/
|
||||
- /docs/grafana/latest/dashboards/search/
|
||||
- /docs/grafana/latest/reference/search/
|
||||
- /docs/grafana/latest/dashboards/use-dashboards/
|
||||
title: Use dashboards
|
||||
menuTitle: Use dashboards
|
||||
weight: 1
|
||||
keywords:
|
||||
- dashboard
|
||||
- search
|
||||
- shortcuts
|
||||
---
|
||||
|
||||
# Use dashboards
|
||||
|
||||
This topic provides an overview of dashboard features and shortcuts, and describes how to use dashboard search.
|
||||
|
||||
## Dashboard feature overview
|
||||
|
||||
The dashboard user interface provides a number of features that you can use to customize the presentation of your data.
|
||||
|
||||
The following image and descriptions highlights all dashboards features.
|
||||
|
||||
{{< figure src="/static/img/docs/v91/dashboard-features/dashboard-features.png" width="700px" >}}
|
||||
|
||||
- **Grafana home** (1): Click the Grafana home icon to be redirected to the home page configured in the Grafana instance.
|
||||
- **Dashboard title** (2): When you click the dashboard title you can search for dashboard contained in the current folder.
|
||||
- **Share dashboard** (3): Use this option to share the current dashboard by link or snapshot. You can also export the dashboard definition from the share modal.
|
||||
- **Add panel** (4): Use this option to add a panel, dashboard row, or library panel to the current dashboard.
|
||||
- **Dashboard settings** (5): Use this option to change dashboard name, folder, and tags and manage variables and annotation queries. For more information about dashboard settings, refer to [Modify dashboard settings]({{< relref "../build-dashboards/modify-dashboard-settings/" >}})
|
||||
- **Time picker dropdown** (6): Click to select relative time range options and set custom absolute time ranges.
|
||||
- You can change the **Timezone** and **fiscal year** settings from the time range controls by clicking the **Change time settings** button.
|
||||
- Time settings are saved on a per-dashboard basis.
|
||||
- **Zoom out time range** (7): Click to zoom out the time range. For more information about how to use time range controls, refer to [Common time range controls](../time-range-controls/#common-time-range-controls).
|
||||
- **Refresh dashboard** (8): Click to immediately trigger queries and refresh dashboard data.
|
||||
- **Refresh dashboard time interval** (9): Click to select a dashboard auto refresh time interval.
|
||||
- **View mode** (10): Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. For more information about view mode, refer to [How to Create Kiosks to Display Dashboards on a TV](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
|
||||
- **Dashboard panel** (11): The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
|
||||
- Library panels can be shared among many dashboards.
|
||||
- To move a panel, drag the panel header to another location.
|
||||
- To resize a panel, click and drag the lower right corner of the panel.
|
||||
- **Graph legend** (12): Change series colors, y-axis and series visibility directly from the legend.
|
||||
- **Search** (13): Click **Search** to search for dashboards by name or panel title.
|
||||
- **Dashboard row** (14): A dashboard row is a logical divider within a dashboard that groups panels together.
|
||||
- Rows can be collapsed or expanded allowing you to hide parts of the dashboard.
|
||||
- Panels inside a collapsed row do not issue queries.
|
||||
- Use [repeating rows]({{< relref "../build-dashboards/create-dashboard/#configure-repeating-rows" >}}) to dynamically create rows based on a template variable.
|
||||
|
||||
## Keyboard shortcuts
|
||||
|
||||
Grafana has a number of keyboard shortcuts available. Press `?` or `h` on your keyboard to display all keyboard shortcuts available in your version of Grafana.
|
||||
|
||||
- `Ctrl+S`: Saves the current dashboard.
|
||||
- `f`: Opens the dashboard finder / search.
|
||||
- `d+k`: Toggle kiosk mode (hides the menu).
|
||||
- `d+e`: Expand all rows.
|
||||
- `d+s`: Dashboard settings.
|
||||
- `Ctrl+K`: Opens the command palette.
|
||||
- `Esc`: Exits panel when in fullscreen view or edit mode. Also returns you to the dashboard from dashboard settings.
|
||||
|
||||
**Focused panel**
|
||||
|
||||
By hovering over a panel with the mouse you can use some shortcuts that will target that panel.
|
||||
|
||||
- `e`: Toggle panel edit view
|
||||
- `v`: Toggle panel fullscreen view
|
||||
- `ps`: Open Panel Share Modal
|
||||
- `pd`: Duplicate Panel
|
||||
- `pr`: Remove Panel
|
||||
- `pl`: Toggle panel legend
|
||||
|
||||
## Set dashboard time range
|
||||
|
||||
Grafana provides several ways to manage the time ranges of the data being visualized, for dashboard, panels and also for alerting.
|
||||
|
||||
This section describes supported time units and relative ranges, the common time controls, dashboard-wide time settings, and panel-specific time settings.
|
||||
|
||||
### Time units and relative ranges
|
||||
|
||||
Grafana supports the following time units: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `Q (quarters)` and `y (years)`.
|
||||
|
||||
The minus operator enables you to step back in time, relative to now. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
|
||||
|
||||
The plus operator enables you to step forward in time, relative to now. For example, you can use this feature to look at predicted data in the future.
|
||||
|
||||
The following table provides example relative ranges:
|
||||
|
||||
| Example relative range | From: | To: |
|
||||
| ---------------------- | ----------- | ----------- |
|
||||
| Last 5 minutes | `now-5m` | `now` |
|
||||
| The day so far | `now/d` | `now` |
|
||||
| This week | `now/w` | `now/w` |
|
||||
| This week so far | `now/w` | `now` |
|
||||
| This month | `now/M` | `now/M` |
|
||||
| This month so far | `now/M` | `now` |
|
||||
| Previous Month | `now-1M/M` | `now-1M/M` |
|
||||
| This year so far | `now/Y` | `now` |
|
||||
| This Year | `now/Y` | `now/Y` |
|
||||
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
|
||||
|
||||
#### Note about Grafana Alerting
|
||||
|
||||
For Grafana Alerting, we do not support the following syntaxes at this time.
|
||||
|
||||
- now+n for future timestamps.
|
||||
- now-1n/n for "start of n until end of n" because this is an absolute timestamp.
|
||||
|
||||
### Common time range controls
|
||||
|
||||
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.
|
||||
|
||||
#### Current time range
|
||||
|
||||
The current time range, also called the _time picker_, shows the time range currently displayed in the dashboard or panel you are viewing.
|
||||
|
||||
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="/static/img/docs/time-range-controls/change-current-time-range-7-0.png" max-width="900px">
|
||||
|
||||
#### Relative time range
|
||||
|
||||
Select the relative time range from the **Relative time ranges** list. You can filter the list using the input field at the top. Some examples of time ranges include:
|
||||
|
||||
- Last 30 minutes
|
||||
- Last 12 hours
|
||||
- Last 7 days
|
||||
- Last 2 years
|
||||
- Yesterday
|
||||
- Day before yesterday
|
||||
- This day last week
|
||||
- Today so far
|
||||
- This week so far
|
||||
- This month so far
|
||||
|
||||
#### Absolute time range
|
||||
|
||||
You can set an absolute time range in the following ways:
|
||||
|
||||
- Type values into the **From** and **To** fields. You can type exact time values or relative values, such as `now-24h`, and then click **Apply time range**.
|
||||
- Click in the **From** or **To** field. Grafana displays a calendar. Click the day or days you want to use as the current time range and then click **Apply time range**.
|
||||
|
||||
This section also displays recently used absolute ranges.
|
||||
|
||||
#### Zoom out (Cmd+Z or Ctrl+Z)
|
||||
|
||||
Click the **Zoom out** icon to view a larger time range in the dashboard or panel visualization.
|
||||
|
||||
#### Zoom in (only applicable to graph visualizations)
|
||||
|
||||
Click and drag to select the time range in the visualization that you want to view.
|
||||
|
||||
#### Refresh dashboard
|
||||
|
||||
Click the **Refresh dashboard** icon to immediately run every query on the dashboard and refresh the visualizations. Grafana cancels any pending requests when you trigger a refresh.
|
||||
|
||||
By default, Grafana does not automatically refresh the dashboard. Queries run on their own schedule according to the panel settings. However, if you want to regularly refresh the dashboard, then click the down arrow next to the **Refresh dashboard** icon and then select a refresh interval.
|
||||
|
||||
### Control the time range using a URL
|
||||
|
||||
You can control the time range of a dashboard by providing the following query parameters in the dashboard URL:
|
||||
|
||||
- `from`: Defines the lower limit of the time range, specified in `ms`, `epoch`, or [relative time]({{< relref "#relative-time-range" >}})
|
||||
- `to`: Defines the upper limit of the time range, specified in `ms`, `epoch`, or [relative time]({{< relref "#relative-time-range" >}})
|
||||
- `time` and `time.window`: Defines a time range from `time-time.window/2` to `time+time.window/2`. Both parameters should be specified in `ms`. For example `?time=1500000000000&time.window=10000` results in 10s time range from 1499999995000 to 1500000005000
|
||||
@@ -2,6 +2,7 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/variables/
|
||||
- /docs/grafana/latest/variables/variable-examples/
|
||||
- docs/grafana/latest/dashboards/variables/
|
||||
title: Variables
|
||||
weight: 130
|
||||
---
|
||||
|
||||
@@ -25,6 +25,7 @@ aliases:
|
||||
- /docs/grafana/latest/variables/formatting-multi-value-variables/
|
||||
- /docs/grafana/latest/reference/templating/
|
||||
- /docs/grafana/latest/variables/manage-variable/
|
||||
- /docs/grafana/latest/dashboards/variables/add-template-variables/
|
||||
title: Add and manage variables
|
||||
menuTitle: Manage variables
|
||||
weight: 100
|
||||
@@ -113,6 +114,8 @@ For example, if you have server names or region names that never change, then yo
|
||||
|
||||
_Text box_ variables display a free text input field with an optional default value. This is the most flexible variable, because you can enter any value. Use this type of variable if you have metrics with high cardinality or if you want to update multiple panels in a dashboard at the same time.
|
||||
|
||||
For more information about cardinality, refer to [What are cardinality spikes and why do they matter?](https://grafana.com/blog/2022/02/15/what-are-cardinality-spikes-and-why-do-they-matter/)
|
||||
|
||||
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.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/reference/templating/
|
||||
- /docs/grafana/latest/variables/inspect-variable/
|
||||
- /docs/grafana/latest/dashboards/variables/inspect-variable/
|
||||
keywords:
|
||||
- grafana
|
||||
- templating
|
||||
|
||||
@@ -3,6 +3,7 @@ aliases:
|
||||
- /docs/grafana/latest/variables/advanced-variable-format-options/
|
||||
- /docs/grafana/latest/reference/templating/
|
||||
- /docs/grafana/latest/variables/syntax/
|
||||
- /docs/grafana/latest/dashboards/variables/variable-syntax/
|
||||
keywords:
|
||||
- grafana
|
||||
- templating
|
||||
|
||||
@@ -165,7 +165,7 @@ Link an X-Ray data source in the "X-Ray trace link" section of the configuration
|
||||
|
||||
The data source select will contain only existing data source instances of type X-Ray so in order to use this feature you need to have existing X-Ray data source already configured, see [X-Ray docs](https://grafana.com/grafana/plugins/grafana-x-ray-datasource/) for details.
|
||||
|
||||
The X-Ray link will then appear in the log details section which is accessible by clicking on the log row either in Explore or in dashboard [Logs panel]({{< relref "../../visualizations/logs-panel/" >}}). To log the `@xrayTraceId` in your logs see the [AWS X-Ray documentation](https://docs.amazonaws.cn/en_us/xray/latest/devguide/xray-services.html). To provide the field to Grafana your log queries also have to contain the `@xrayTraceId` field, for example using query `fields @message, @xrayTraceId`.
|
||||
The X-Ray link will then appear in the log details section which is accessible by clicking on the log row either in Explore or in dashboard [Logs panel]({{< relref "../../panels-visualizations/visualizations/logs/" >}}). To log the `@xrayTraceId` in your logs see the [AWS X-Ray documentation](https://docs.amazonaws.cn/en_us/xray/latest/devguide/xray-services.html). To provide the field to Grafana your log queries also have to contain the `@xrayTraceId` field, for example using query `fields @message, @xrayTraceId`.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ Example dashboard:
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view. Grafana can query any Elasticsearch index
|
||||
for annotation events.
|
||||
|
||||
@@ -194,7 +194,7 @@ for annotation events.
|
||||
|
||||
## Querying Logs
|
||||
|
||||
Querying and displaying log data from Elasticsearch is available in [Explore]({{< relref "../explore/" >}}), and in the [logs panel]({{< relref "../visualizations/logs-panel/" >}}) in dashboards.
|
||||
Querying and displaying log data from Elasticsearch is available in [Explore]({{< relref "../explore/" >}}), and in the [logs panel]({{< relref "../panels-visualizations/visualizations/logs/" >}}) in dashboards.
|
||||
Select the Elasticsearch data source, and then optionally enter a lucene query to display your logs.
|
||||
|
||||
When switching from a Prometheus or Loki data source in Explore, your query is translated to an Elasticsearch log query with a correct Lucene filter.
|
||||
|
||||
@@ -280,7 +280,7 @@ Refer to the [variable syntax documentation]({{< relref "../../dashboards/variab
|
||||
|
||||
{{< figure src="/static/img/docs/google-cloud-monitoring/annotations-8-0.png" max-width= "400px" class="docs-image--right" >}}
|
||||
|
||||
[Annotations]({{< relref "../../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view. Annotation rendering is expensive so it is important to limit the number of rows returned. There is no support for showing Google Cloud Monitoring annotations and events yet but it works well with [custom metrics](https://cloud.google.com/monitoring/custom-metrics/) in Google Cloud Monitoring.
|
||||
|
||||
With the query editor for annotations, you can select a metric and filters. The `Title` and `Text` fields support templating and can use data returned from the query. For example, the Title field could have the following text:
|
||||
|
||||
@@ -216,7 +216,7 @@ For more information, refer to [Advanced variable format options]({{< relref "..
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view.
|
||||
|
||||
Graphite supports two ways to query annotations. A regular metric query, for this you use the `Graphite query` textbox. A Graphite events query, use the `Graphite event tags` textbox,
|
||||
|
||||
@@ -131,7 +131,7 @@ You can switch to raw query mode by clicking hamburger icon and then `Switch edi
|
||||
|
||||
## Querying logs
|
||||
|
||||
Querying and displaying log data from InfluxDB is available in [Explore]({{< relref "../../explore/" >}}), and in the [logs panel]({{< relref "../../visualizations/logs-panel/" >}}) in dashboards.
|
||||
Querying and displaying log data from InfluxDB is available in [Explore]({{< relref "../../explore/" >}}), and in the [logs panel]({{< relref "../../panels-visualizations/visualizations/logs/" >}}) in dashboards.
|
||||
Select the InfluxDB data source, and then enter a query to display your logs.
|
||||
|
||||
### Log queries
|
||||
@@ -146,7 +146,7 @@ To add a filter, click the plus icon to the right of the `Measurements/Fields` b
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../../dashboards/annotations/" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
|
||||
[Annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
|
||||
|
||||
An example query:
|
||||
|
||||
|
||||
@@ -76,4 +76,4 @@ from(bucket: "grafana")
|
||||
|> yield(name: "mean")
|
||||
```
|
||||
|
||||
You can view the interpolated version of a query with the query inspector. For more information, refer to [Navigate the Query Inspector]({{< relref "../../panels/working-with-panels/navigate-inspector-panel/" >}}).
|
||||
You can view the interpolated version of a query with the query inspector. For more information, refer to [Panel Inspector]({{< relref "../../panels-visualizations/panel-inspector/" >}}).
|
||||
|
||||
@@ -147,7 +147,7 @@ There are two types of LogQL queries:
|
||||
|
||||
### Log queries
|
||||
|
||||
Loki log queries return the contents of the log lines. Querying and displaying log data from Loki is available via [Explore]({{< relref "../explore/" >}}), and with the [logs panel]({{< relref "../visualizations/logs-panel/" >}}) in dashboards. Select the Loki data source, and then enter a LogQL query to display your logs.F or more information about log queries and LogQL, refer to the [Loki log queries documentation](https://grafana.com/docs/loki/latest/logql/log_queries/)
|
||||
Loki log queries return the contents of the log lines. Querying and displaying log data from Loki is available via [Explore]({{< relref "../explore/" >}}), and with the [logs panel]({{< relref "../panels-visualizations/visualizations/logs/" >}}) in dashboards. Select the Loki data source, and then enter a LogQL query to display your logs.F or more information about log queries and LogQL, refer to the [Loki log queries documentation](https://grafana.com/docs/loki/latest/logql/log_queries/).
|
||||
|
||||
#### Log context
|
||||
|
||||
@@ -232,7 +232,7 @@ You can use some global built-in variables in query variables; `$__interval`, `$
|
||||
|
||||
## Annotations
|
||||
|
||||
You can use any non-metric Loki query as a source for [annotations]({{< relref "../dashboards/annotations/" >}}). Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
|
||||
You can use any non-metric Loki query as a source for [annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}). Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
|
||||
@@ -75,18 +75,51 @@ Make sure the user does not get any unwanted privileges from the public role.
|
||||
If you're using an older version of Microsoft SQL Server like 2008 and 2008R2 you may need to disable encryption to be able to connect.
|
||||
If possible, we recommend you to use the latest service pack available for optimal compatibility.
|
||||
|
||||
## Query Editor
|
||||
## Query builder
|
||||
|
||||
{{< figure src="/static/img/docs/v51/mssql_query_editor.png" class="docs-image--no-shadow" >}}
|
||||
{{< figure src="/static/img/docs/v92/mssql_query_builder.png" class="docs-image--no-shadow" >}}
|
||||
|
||||
You will find the MSSQL query editor in the metrics tab in Graph, Singlestat or Table panel's edit mode. You enter edit mode by clicking the
|
||||
panel title, then edit. The editor allows you to define a SQL query to select data to be visualized.
|
||||
The MS SQL query builder is available when editing a panel using a MS SQL data source. The built query can be run by pressing the `Run query` button in the top right corner of the editor.
|
||||
|
||||
1. Select _Format as_ `Time series` (for use in Graph or Singlestat panel's among others) or `Table` (for use in Table panel among others).
|
||||
1. This is the actual editor where you write your SQL queries.
|
||||
1. Show help section for MSSQL below the query editor.
|
||||
1. Show actual executed SQL query. Will be available first after a successful query has been executed.
|
||||
1. Add an additional query where an additional query editor will be displayed.
|
||||
### Format
|
||||
|
||||
The response from MS SQL can be formatted as either a table or as a time series. To use the time series format one of the columns must be named `time`.
|
||||
|
||||
### Dataset and Table selection
|
||||
|
||||
In the dataset dropdown, choose the MS SQL database to query. The dropdown is be populated with the databases that the user has access to.
|
||||
When the dataset is selected, the table dropdown is populated with the tables that are available.
|
||||
|
||||
### Columns and Aggregation functions (SELECT)
|
||||
|
||||
Using the dropdown, select a column to include in the data. You can also specify an optional aggregation function.
|
||||
|
||||
Add further value columns by clicking the plus button and another column dropdown appears.
|
||||
|
||||
### Filter data (WHERE)
|
||||
|
||||
To add a filter, flip the switch at the top of the editor.
|
||||
Using the first dropdown, select if all the filters need to match (AND) or if only one of the filters needs to match (OR).
|
||||
|
||||
To add more columns to filter on use the plus button.
|
||||
|
||||
### Group By
|
||||
|
||||
To group the results by column, flip the group switch at the top of the editor. You can then choose which column to group the results by. The group by clause can be removed by pressing the X button.
|
||||
|
||||
### Preview
|
||||
|
||||
By flipping the preview switch at the top of the editor, you can get a preview of the SQL query generated by the query builder.
|
||||
|
||||
## Code editor
|
||||
|
||||
{{< figure src="/static/img/docs/v92/sql_code_editor.png" class="docs-image--no-shadow" >}}
|
||||
|
||||
To make advanced queries, switch to the code editor by clicking `code` in the top right corner of the editor. The code editor support autocompletion of tables, columns, SQL keywords, standard sql functions, Grafana template variables and Grafana macros. Columns cannot be completed before a table has been specified.
|
||||
|
||||
You can expand the code editor by pressing the `chevron` pointing downwards in the lower right corner of the code editor.
|
||||
|
||||
`CTRL/CMD + Return` works as a keyboard shortcut to run the query.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
@@ -182,7 +215,7 @@ A time series query result is returned in a [wide data frame format]({{< relref
|
||||
|
||||
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
|
||||
|
||||
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}).
|
||||
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}).
|
||||
|
||||
**Example with `metric` column:**
|
||||
|
||||
@@ -226,7 +259,7 @@ GROUP BY
|
||||
ORDER BY 1
|
||||
```
|
||||
|
||||
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}) display name value of `${__field.labels.hostname}`.
|
||||
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}) display name value of `${__field.labels.hostname}`.
|
||||
|
||||
Data frame result:
|
||||
|
||||
@@ -345,7 +378,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../da
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Columns:**
|
||||
|
||||
|
||||
@@ -73,60 +73,51 @@ Example:
|
||||
|
||||
You can use wildcards (`*`) in place of database or table if you want to grant access to more databases and tables.
|
||||
|
||||
## Query Editor
|
||||
## Query builder
|
||||
|
||||
> Only available in Grafana v5.4+.
|
||||
{{< figure src="/static/img/docs/v92/mysql_query_builder.png" class="docs-image--no-shadow" >}}
|
||||
|
||||
{{< figure src="/static/img/docs/v54/mysql_query_still.png" class="docs-image--no-shadow" animated-gif="/static/img/docs/v54/mysql_query.gif" >}}
|
||||
The MySQL query builder is available when editing a panel using a MySQL data source. The built query can be run by pressing the `Run query` button in the top right corner of the editor.
|
||||
|
||||
You find the MySQL query editor in the metrics tab in a panel's edit mode. You enter edit mode by clicking the
|
||||
panel title, then edit.
|
||||
### Format
|
||||
|
||||
The query editor has a link named `Generated SQL` that shows up after a query has been executed, while in panel edit mode. Click on it and it will expand and show the raw interpolated SQL string that was executed.
|
||||
The response from MySQL can be formatted as either a table or as a time series. To use the time series format one of the columns must be named `time`.
|
||||
|
||||
### Select table, time column and metric column (FROM)
|
||||
### Dataset and Table selection
|
||||
|
||||
When you enter edit mode for the first time or add a new query Grafana will try to prefill the query builder with the first table that has a timestamp column and a numeric column.
|
||||
|
||||
In the FROM field, Grafana will suggest tables that are in the configured database. To select a table or view in another database that your database user has access to you can manually enter a fully qualified name (database.table) like `otherDb.metrics`.
|
||||
|
||||
The Time column field refers to the name of the column holding your time values. Selecting a value for the Metric column field is optional. If a value is selected, the Metric column field will be used as the series name.
|
||||
|
||||
The metric column suggestions will only contain columns with a text datatype (text, tinytext, mediumtext, longtext, varchar, char).
|
||||
If you want to use a column with a different datatype as metric column you may enter the column name with a cast: `CAST(numericColumn as CHAR)`.
|
||||
You may also enter arbitrary SQL expressions in the metric column field that evaluate to a text datatype like
|
||||
`CONCAT(column1, " ", CAST(numericColumn as CHAR))`.
|
||||
In the dataset dropdown, choose the MySQL database to query. The dropdown is be populated with the databases that the user has access to.
|
||||
When the dataset is selected, the table dropdown is populated with the tables that are available.
|
||||
|
||||
### Columns and Aggregation functions (SELECT)
|
||||
|
||||
In the `SELECT` row you can specify what columns and functions you want to use.
|
||||
In the column field you may write arbitrary expressions instead of a column name like `column1 * column2 / column3`.
|
||||
Using the dropdown, select a column to include in the data. You can also specify an optional aggregation function.
|
||||
|
||||
If you use aggregate functions you need to group your resultset. The editor will automatically add a `GROUP BY time` if you add an aggregate function.
|
||||
|
||||
You may add further value columns by clicking the plus button and selecting `Column` from the menu. Multiple value columns will be plotted as separate series in the graph panel.
|
||||
Add further value columns by clicking the plus button and another column dropdown appears.
|
||||
|
||||
### Filter data (WHERE)
|
||||
|
||||
To add a filter click the plus icon to the right of the `WHERE` condition. You can remove filters by clicking on
|
||||
the filter and selecting `Remove`. A filter for the current selected timerange is automatically added to new queries.
|
||||
To add a filter, flip the switch at the top of the editor.
|
||||
Using the first dropdown, select if all the filters need to match (AND) or if only one of the filters needs to match (OR).
|
||||
|
||||
To add more columns to filter on use the plus button.
|
||||
|
||||
### Group By
|
||||
|
||||
To group by time or any other columns click the plus icon at the end of the GROUP BY row. The suggestion dropdown will only show text columns of your currently selected table but you may manually enter any column.
|
||||
You can remove the group by clicking on the item and then selecting `Remove`.
|
||||
To group the results by column, flip the group switch at the top of the editor. You can then choose which column to group the results by. The group by clause can be removed by pressing the X button.
|
||||
|
||||
If you add any grouping, all selected columns need to have an aggregate function applied. The query builder will automatically add aggregate functions to all columns without aggregate functions when you add groupings.
|
||||
### Preview
|
||||
|
||||
#### Gap Filling
|
||||
By flipping the preview switch at the top of the editor, you can get a preview of the SQL query generated by the query builder.
|
||||
|
||||
Grafana can fill in missing values when you group by time. The time function accepts two arguments. The first argument is the time window that you would like to group by, and the second argument is the value you want Grafana to fill missing items with.
|
||||
## Code editor
|
||||
|
||||
### Text Editor Mode (RAW)
|
||||
{{< figure src="/static/img/docs/v92/sql_code_editor.png" class="docs-image--no-shadow" >}}
|
||||
|
||||
You can switch to the raw query editor mode by clicking the hamburger icon and selecting `Switch editor mode` or by clicking `Edit SQL` below the query.
|
||||
To make advanced queries, switch to the code editor by clicking `code` in the top right corner of the editor. The code editor support autocompletion of tables, columns, SQL keywords, standard sql functions, Grafana template variables and Grafana macros. Columns cannot be completed before a table has been specified.
|
||||
|
||||
> If you use the raw query editor, be sure your query at minimum has `ORDER BY time` and a filter on the returned time range.
|
||||
You can expand the code editor by pressing the `chevron` pointing downwards in the lower right corner of the code editor.
|
||||
|
||||
`CTRL/CMD + Return` works as a keyboard shortcut to run the query.
|
||||
|
||||
## Macros
|
||||
|
||||
@@ -191,7 +182,7 @@ A time series query result is returned in a [wide data frame format]({{< relref
|
||||
|
||||
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
|
||||
|
||||
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}).
|
||||
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}).
|
||||
|
||||
**Example with `metric` column:**
|
||||
|
||||
@@ -233,7 +224,7 @@ GROUP BY time, hostname
|
||||
ORDER BY time
|
||||
```
|
||||
|
||||
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [[Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}) display value of `${__field.labels.hostname}`.
|
||||
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [[Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}) display value of `${__field.labels.hostname}`.
|
||||
|
||||
Data frame result:
|
||||
|
||||
@@ -382,7 +373,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../da
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Example query using time column with epoch values:**
|
||||
|
||||
|
||||
@@ -19,22 +19,22 @@ Grafana ships with a built-in PostgreSQL data source plugin that allows you to q
|
||||
|
||||
To access PostgreSQL settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the PostgreSQL data source.
|
||||
|
||||
| Name | Description |
|
||||
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
||||
| `Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and it may cause errors. |
|
||||
| `Database` | Name of your PostgreSQL database. |
|
||||
| `User` | Database user's login/username |
|
||||
| `Password` | Database user's password |
|
||||
| `SSL Mode` | Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. When SSL Mode is disabled, SSL Method and Auth Details would not be visible. |
|
||||
| `SSL Auth Details Method` | Determines whether the SSL Auth details will be configured as a file path or file content. Grafana v7.5+ |
|
||||
| `SSL Auth Details Value` | File path or file content of SSL root certificate, client certificate and client key |
|
||||
| `Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). |
|
||||
| `Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). |
|
||||
| `Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). |
|
||||
| `Version` | Determines which functions are available in the query builder (only available in Grafana 5.3+). |
|
||||
| `TimescaleDB` | A time-series database built as a PostgreSQL extension. When enabled, Grafana uses `time_bucket` in the `$__timeGroup` macro to display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). |
|
||||
| Name | Description |
|
||||
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
||||
| `Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and it may cause errors. |
|
||||
| `Database` | Name of your PostgreSQL database. |
|
||||
| `User` | Database user's login/username |
|
||||
| `Password` | Database user's password |
|
||||
| `SSL Mode` | Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. When SSL Mode is disabled, SSL Method and Auth Details would not be visible. |
|
||||
| `SSL Auth Details Method` | Determines whether the SSL Auth details will be configured as a file path or file content. Grafana v7.5+ |
|
||||
| `SSL Auth Details Value` | File path or file content of SSL root certificate, client certificate and client key |
|
||||
| `Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). |
|
||||
| `Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). |
|
||||
| `Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). |
|
||||
| `Version` | Determines which functions are available in the query builder (only available in Grafana 5.3+). |
|
||||
| `TimescaleDB` | A time-series database built as a PostgreSQL extension. When enabled, Grafana uses `time_bucket` in the `$__timeGroup` macro to display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). For more information, see [TimescaleDB documentation](https://docs.timescale.com/timescaledb/latest/tutorials/grafana/grafana-timescalecloud/#connect-timescaledb-and-grafana). |
|
||||
|
||||
### Min time interval
|
||||
|
||||
@@ -71,69 +71,51 @@ Example:
|
||||
|
||||
Make sure the user does not get any unwanted privileges from the public role.
|
||||
|
||||
## Query editor
|
||||
## Query builder
|
||||
|
||||
{{< figure src="/static/img/docs/v53/postgres_query_still.png" class="docs-image--no-shadow" animated-gif="/static/img/docs/v53/postgres_query.gif" >}}
|
||||
{{< figure src="/static/img/docs/v92/postgresql_query_builder.png" class="docs-image--no-shadow" >}}
|
||||
|
||||
You find the PostgreSQL query editor in the metrics tab in Graph or Singlestat panel's edit mode. You enter edit mode by clicking the
|
||||
panel title, then edit.
|
||||
The PostgreSQL query builder is available when editing a panel using a PostgreSQL data source. The built query can be run by pressing the `Run query` button in the top right corner of the editor.
|
||||
|
||||
The query editor has a link named `Generated SQL` that shows up after a query has been executed, while in panel edit mode. Click on it and it will expand and show the raw interpolated SQL string that was executed.
|
||||
### Format
|
||||
|
||||
### Select table, time column and metric column (FROM)
|
||||
The response from PostgreSQL can be formatted as either a table or as a time series. To use the time series format one of the columns must be named `time`.
|
||||
|
||||
When you enter edit mode for the first time or add a new query Grafana will try to prefill the query builder with the first table that has a timestamp column and a numeric column.
|
||||
### Dataset and Table selection
|
||||
|
||||
In the FROM field, Grafana will suggest tables that are in the `search_path` of the database user. To select a table or view not in your `search_path`
|
||||
you can manually enter a fully qualified name (schema.table) like `public.metrics`.
|
||||
In the dataset dropdown, choose the PostgreSQL database to query. The dropdown is be populated with the databases that the user has access to.
|
||||
When the dataset is selected, the table dropdown is populated with the tables that are available.
|
||||
|
||||
The Time column field refers to the name of the column holding your time values. Selecting a value for the Metric column field is optional. If a value is selected, the Metric column field will be used as the series name.
|
||||
### Columns and Aggregation functions (SELECT)
|
||||
|
||||
The metric column suggestions will only contain columns with a text datatype (char,varchar,text).
|
||||
If you want to use a column with a different datatype as metric column you may enter the column name with a cast: `ip::text`.
|
||||
You may also enter arbitrary SQL expressions in the metric column field that evaluate to a text datatype like
|
||||
`hostname || ' ' || container_name`.
|
||||
Using the dropdown, select a column to include in the data. You can also specify an optional aggregation function.
|
||||
|
||||
### Columns, window, and aggregation functions (SELECT)
|
||||
|
||||
In the `SELECT` row you can specify what columns and functions you want to use.
|
||||
In the column field you may write arbitrary expressions instead of a column name like `column1 * column2 / column3`.
|
||||
|
||||
The available functions in the query editor depend on the PostgreSQL version you selected when configuring the data source.
|
||||
If you use aggregate functions you need to group your resultset. The editor will automatically add a `GROUP BY time` if you add an aggregate function.
|
||||
|
||||
The editor tries to simplify and unify this part of the query. For example:<br>
|
||||
<br>
|
||||
|
||||
The above will generate the following PostgreSQL `SELECT` clause:
|
||||
|
||||
```sql
|
||||
avg(tx_bytes) OVER (ORDER BY "time" ROWS 5 PRECEDING) AS "tx_bytes"
|
||||
```
|
||||
|
||||
You may add further value columns by clicking the plus button and selecting `Column` from the menu. Multiple value columns will be plotted as separate series in the graph panel.
|
||||
Add further value columns by clicking the plus button and another column dropdown appears.
|
||||
|
||||
### Filter data (WHERE)
|
||||
|
||||
To add a filter click the plus icon to the right of the `WHERE` condition. You can remove filters by clicking on
|
||||
the filter and selecting `Remove`. A filter for the current selected timerange is automatically added to new queries.
|
||||
To add a filter, flip the switch at the top of the editor.
|
||||
Using the first dropdown, select if all the filters need to match (AND) or if only one of the filters needs to match (OR).
|
||||
|
||||
### Group by
|
||||
To add more columns to filter on use the plus button.
|
||||
|
||||
To group by time or any other columns click the plus icon at the end of the GROUP BY row. The suggestion dropdown will only show text columns of your currently selected table but you may manually enter any column.
|
||||
You can remove the group by clicking on the item and then selecting `Remove`.
|
||||
### Group By
|
||||
|
||||
If you add any grouping, all selected columns need to have an aggregate function applied. The query builder will automatically add aggregate functions to all columns without aggregate functions when you add groupings.
|
||||
To group the results by column, flip the group switch at the top of the editor. You can then choose which column to group the results by. The group by clause can be removed by pressing the X button.
|
||||
|
||||
#### Gap filling
|
||||
### Preview
|
||||
|
||||
Grafana can fill in missing values when you group by time. The time function accepts two arguments. The first argument is the time window that you would like to group by, and the second argument is the value you want Grafana to fill missing items with.
|
||||
By flipping the preview switch at the top of the editor, you can get a preview of the SQL query generated by the query builder.
|
||||
|
||||
### Text editor mode (RAW)
|
||||
## Code editor
|
||||
|
||||
You can switch to the raw query editor mode by clicking the hamburger icon and selecting `Switch editor mode` or by clicking `Edit SQL` below the query.
|
||||
{{< figure src="/static/img/docs/v92/sql_code_editor.png" class="docs-image--no-shadow" >}}
|
||||
|
||||
> If you use the raw query editor, be sure your query at minimum has `ORDER BY time` and a filter on the returned time range.
|
||||
To make advanced queries, switch to the code editor by clicking `code` in the top right corner of the editor. The code editor support autocompletion of tables, columns, SQL keywords, standard sql functions, Grafana template variables and Grafana macros. Columns cannot be completed before a table has been specified.
|
||||
|
||||
You can expand the code editor by pressing the `chevron` pointing downwards in the lower right corner of the code editor.
|
||||
|
||||
`CTRL/CMD + Return` works as a keyboard shortcut to run the query.
|
||||
|
||||
## Macros
|
||||
|
||||
@@ -196,7 +178,7 @@ A time series query result is returned in a [wide data frame format]({{< relref
|
||||
|
||||
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
|
||||
|
||||
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}).
|
||||
To optionally customize the default series name formatting, refer to [Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}).
|
||||
|
||||
**Example with `metric` column:**
|
||||
|
||||
@@ -238,7 +220,7 @@ GROUP BY time, hostname
|
||||
ORDER BY time
|
||||
```
|
||||
|
||||
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions]({{< relref "../panels/configure-standard-options/#display-name" >}}) display value of `${__field.labels.hostname}`.
|
||||
Given the data frame result in the following example and using the graph panel, you will get two series named _value 10.0.1.1_ and _value 10.0.1.2_. To render the series with a name of _10.0.1.1_ and _10.0.1.2_ , use a [Standard options definitions]({{< relref "../panels-visualizations/configure-standard-options/#display-name" >}}) display value of `${__field.labels.hostname}`.
|
||||
|
||||
Data frame result:
|
||||
|
||||
@@ -380,7 +362,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../da
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Example query using time column with epoch values:**
|
||||
|
||||
|
||||
@@ -90,15 +90,15 @@ The "Validate selector" button will check with Prometheus how many time series a
|
||||
|
||||
#### Options
|
||||
|
||||

|
||||

|
||||
|
||||
| Name | Description |
|
||||
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Legend` | Controls the name of the time series. Use predefined format or use custom format.<br/>`Auto` - if there is a single label, it shows just the value of that label for each series. If there are multiple labels, it works the same as `Verbose`<br/>`Verbose` - includes all labels.<br/>`Custom` - select will change to text input. Use templating to select which labels will be included. For example, `{{hostname}}` is replaced by the label value for the label `hostname`. Clear the input and click outside the input to go back to select mode. |
|
||||
| `Min step` | Set the lower bounds on the interval between data points. For example, set "1h" to hint that measurements are not frequent (taken hourly). `$__interval` and `$__rate_interval` are supported. |
|
||||
| `Format` | You can switch between `Table` `Time series` or `Heatmap` options. The `Table` option works only in the Table panel. `Heatmap` displays metrics of the Histogram type on a Heatmap panel. Under the hood, it converts cumulative histograms to regular ones and sorts series by the bucket bound. |
|
||||
| `Type` | `Range` - Query returning a Range vector, a set of time series containing a range of data points over time for each time series.<br/>`Instant` - Perform an "instant" query to return only the latest value that Prometheus has scraped for the requested time series. Instant queries can return results much faster than normal range queries. Use them to look up label sets. Instant query results are made up only of one data point per series but can be shown in the graph panel in a dashboard with the help of [series overrides]({{< relref "../visualizations/graph-panel/#series-overrides" >}}). To show them in the graph as a latest value point, add a series override and select `Points > true`. To show a horizontal line across the whole graph, add a series override and select `Transform > constant`. <br/>`Both` - Available only in Explore. Runs both range and instant query |
|
||||
| `Exemplars` | If on, run exemplars query with the regular query and show exemplars in the graph. |
|
||||
| Name | Description |
|
||||
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Legend` | Controls the name of the time series. Use predefined format or use custom format.<br/>`Auto` - if there is a single label, it shows just the value of that label for each series. If there are multiple labels, it works the same as `Verbose`<br/>`Verbose` - includes all labels.<br/>`Custom` - select will change to text input. Use templating to select which labels will be included. For example, `{{hostname}}` is replaced by the label value for the label `hostname`. Clear the input and click outside the input to go back to select mode. |
|
||||
| `Min step` | Set the lower bounds on the interval between data points. For example, set "1h" to hint that measurements are not frequent (taken hourly). `$__interval` and `$__rate_interval` are supported. |
|
||||
| `Format` | You can switch between `Table` `Time series` or `Heatmap` options. The `Table` option works only in the Table panel. `Heatmap` displays metrics of the Histogram type on a Heatmap panel. Under the hood, it converts cumulative histograms to regular ones and sorts series by the bucket bound. |
|
||||
| `Type` | `Range` - Query returning a Range vector, a set of time series containing a range of data points over time for each time series.<br/>`Instant` - Perform an "instant" query to return only the latest value that Prometheus has scraped for the requested time series. Instant queries can return results much faster than normal range queries. Use them to look up label sets. Instant query results are made up only of one data point per series and can be shown in the time series panel by adding a field override, adding a property to the override named `Transform`, and selecting `Constant` from the **Transform** dropdown. For more information, refer to [Transform]({{< relref "../panels-visualizations/visualizations/time-series/#transform" >}}). |
|
||||
| `Exemplars` | If on, run exemplars query with the regular query and show exemplars in the graph. |
|
||||
|
||||
> **Note:** Grafana modifies the request dates for queries to align them with the dynamically calculated step. This ensures consistent display of metrics data, but it can result in a small gap of data at the right edge of a graph.
|
||||
|
||||
@@ -148,7 +148,7 @@ In same cases the query editor can detect which operations would be most appropr
|
||||
|
||||
### Explain
|
||||
|
||||

|
||||

|
||||
|
||||
Explain mode helps with understanding the query. It shows a step by step explanation of all query parts and the operations.
|
||||
|
||||
@@ -240,7 +240,7 @@ applied to all your Prometheus queries.
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view.
|
||||
|
||||
Prometheus supports two ways to query annotations.
|
||||
|
||||
@@ -15,7 +15,11 @@ title: 'Alerting HTTP API '
|
||||
|
||||
# Alerting API
|
||||
|
||||
> **Note:** This topic is relevant for the [legacy dashboard alerts](https://grafana.com/docs/grafana/v8.5/alerting/old-alerting/) only.
|
||||
> **Note:** Starting with v9.0, the Alerting HTTP API is deprecated. It will be removed in a future release.
|
||||
|
||||
This topic is relevant for the [legacy dashboard alerts](https://grafana.com/docs/grafana/v8.5/alerting/old-alerting/) only.
|
||||
|
||||
If you are using Grafana Alerting, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/)
|
||||
|
||||
You can find Grafana Alerting API specification details [here](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json). Also, refer to [Grafana Alerting alerts documentation]({{< relref "../../alerting/" >}}) for details on how to create and manage new alerts.
|
||||
|
||||
|
||||
@@ -22,8 +22,19 @@ The most basic example for a dashboard for which there is no authentication. You
|
||||
curl http://localhost:3000/api/search
|
||||
```
|
||||
|
||||
Here’s a cURL command that works for getting the home dashboard when you are running Grafana locally with [basic authentication]({{< relref "../../setup-grafana/configure-security/configure-authentication/#basic-auth" >}}) enabled using the default admin credentials:
|
||||
Here's a cURL command that works for getting the home dashboard when you are running Grafana locally with [basic authentication]({{< relref "../../setup-grafana/configure-security/configure-authentication/#basic-auth" >}}) enabled using the default admin credentials:
|
||||
|
||||
```
|
||||
curl http://admin:admin@localhost:3000/api/search
|
||||
```
|
||||
|
||||
To pass a username and password with [HTTP basic authorization]({{< relref "/administration/roles-and-permissions/access-control/manage-rbac-roles/" >}}), encode them as base64.
|
||||
You can't use authorization tokens in the request.
|
||||
|
||||
For example, to [list permissions associated with roles]({{< relref "/administration/roles-and-permissions/access-control/manage-rbac-roles/" >}}) given a username of `user` and password of `password`, use:
|
||||
|
||||
```
|
||||
curl --location --request GET '<grafana_url>/api/access-control/builtin-roles' --header 'Authorization: Basic dXNlcjpwYXNzd29yZAo='
|
||||
```
|
||||
|
||||
where `dXNlcjpwYXNzd29yZAo=` is the base64 encoding of `user:password`.
|
||||
|
||||
@@ -15,16 +15,416 @@ title: Reporting API
|
||||
|
||||
This API allows you to interact programmatically with the [Reporting]({{< relref "../../dashboards/create-reports/" >}}) feature.
|
||||
|
||||
> The Reporting API is not stabilized yet, it is still in active development and may change without prior notice.
|
||||
|
||||
> Reporting is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../../enterprise/" >}}).
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "../../administration/roles-and-permissions/access-control/custom-role-actions-scopes/" >}}) for more information.
|
||||
|
||||
## List all reports
|
||||
|
||||
`GET /api/reports`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ------------ | --------------------------- |
|
||||
| reports:read | reports:\*<br>reports:id:\* |
|
||||
|
||||
### Example request
|
||||
|
||||
```http
|
||||
GET /api/reports HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 1840
|
||||
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **500** – Unexpected error or server misconfiguration. Refer to server logs for more details.
|
||||
|
||||
## Get a report
|
||||
|
||||
`GET /api/reports/:id`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ------------ | ---------------------------------------------------------- |
|
||||
| reports:read | reports:\*<br>reports:id:\*<br>reports:id:1(single report) |
|
||||
|
||||
### Example request
|
||||
|
||||
```http
|
||||
GET /api/reports/2 HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 940
|
||||
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid report ID).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **403** – Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **404** – Not found (such report does not exist).
|
||||
- **500** – Unexpected error or server misconfiguration. Refer to server logs for more details.
|
||||
|
||||
## Create a report
|
||||
|
||||
`POST /api/reports`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| -------------- | ----- |
|
||||
| reports:create | n/a |
|
||||
|
||||
### Example request
|
||||
|
||||
```http
|
||||
POST /api/reports HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```
|
||||
|
||||
#### Config JSON Body Schema
|
||||
|
||||
| Field name | Data type | Description |
|
||||
| ------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| name | string | Name of the report that is used as an email subject. |
|
||||
| recipients | string | Comma-separated list of emails to which to send the report to. |
|
||||
| replyTo | string | Comma-separated list of emails used in a reply-to field of the report email. |
|
||||
| message | string | Text message used for the body of the report email. |
|
||||
| startDate | string | Report distribution starts from this date. |
|
||||
| endDate | string | Report distribution ends on this date. |
|
||||
| frequency | string | Specifies how often the report should be sent. Can be `once`, `hourly`, `daily`, `weekly`, `monthly`, `last` or `custom`.<br/><br/>`last` - schedules the report for the last day of month.<br/><br/>`custom` - schedules the report to be sent on a custom interval.<br/>It requires `intervalFrequency` and `intervalAmount` to be specified: for example, every 2 weeks, where 2 is an `intervalAmount` and `weeks` is an `intervalFrequency`. |
|
||||
| intervalFrequency | string | The type of the `custom` interval: `hours`, `days`, `weeks`, `months`. |
|
||||
| intervalAmount | number | `custom` interval amount. |
|
||||
| workdaysOnly | string | Send the report only on Monday-Friday. Applicable to `hourly` and `daily` types of schedule. |
|
||||
| timeZone | string | Time zone used to schedule report execution. |
|
||||
| orientation | string | Can be `portrait` or `landscape`. |
|
||||
| layout | string | Can be `grid` or `simple`. |
|
||||
| enableDashboardUrl | bool | Adds a dashboard url to the bottom of the report email. |
|
||||
| formats | []string | Specified what kind of attachment to generate for the report - `csv`, `pdf`, `image`.<br/>`pdf` is the default one.<br/>`csv` attaches a CSV file for each table panel.<br/>`image` embeds an image of a dashboard into the email's body. |
|
||||
| dashboards | []object | Dashboards to generate a report for.<br/> See "Report Dashboard Schema" section below. |
|
||||
|
||||
#### Report Dashboard Schema
|
||||
|
||||
| Field name | Data type | Description |
|
||||
| ------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| dashboard.uid | string | Dashboard [UID](../dashboard#identifier-id-vs-unique-identifier-uid). |
|
||||
| timeRange.from | string | Dashboard time range from. |
|
||||
| timeRange.to | string | Dashboard time range to. |
|
||||
| reportVariables.<variableName> | string | Key-value pairs containing the template variables for this report, in JSON format. If empty, the template variables from the report's dashboard will be used. |
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 35
|
||||
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid json, missing or invalid fields values, etc.).
|
||||
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details
|
||||
|
||||
## Update a report
|
||||
|
||||
`PUT /api/reports/:id`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ------------- | --------------------------------------------------------- |
|
||||
| reports:write | reports:\*</br>reports:id:\*</br>reports:1(single report) |
|
||||
|
||||
### Example request
|
||||
|
||||
See [JSON body schema]({{< ref "#config-json-body-schema" >}}) for fields description.
|
||||
|
||||
```http
|
||||
GET /api/reports HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 28
|
||||
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid json, missing or invalid fields values, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **403** – Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **404** – Not found (such report does not exist).
|
||||
- **500** – Unexpected error or server misconfiguration. Refer to server logs for more details.
|
||||
|
||||
## Delete a report
|
||||
|
||||
`DELETE /api/reports/:id`
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| -------------- | --------------------------------------------------------- |
|
||||
| reports:delete | reports:\*</br>reports:id:\*</br>reports:1(single report) |
|
||||
|
||||
### Example request
|
||||
|
||||
```http
|
||||
GET /api/reports/6 HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 39
|
||||
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid report ID).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **404** - Not found (report with this ID does not exist).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details
|
||||
|
||||
## Send a report
|
||||
|
||||
`POST /api/reports/email`
|
||||
|
||||
Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client's timeout to at least 60 seconds.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ------------ | ----- |
|
||||
| reports:send | n/a |
|
||||
|
||||
### Example request
|
||||
|
||||
```http
|
||||
POST /api/reports/email HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```
|
||||
|
||||
#### JSON Body Schema
|
||||
|
||||
| Field name | Data type | Description |
|
||||
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| id | string | ID of the report to send. It is the same as in the URL when editing a report, not to be confused with the ID of the dashboard. Required. |
|
||||
| emails | string | Comma-separated list of emails to which to send the report to. Overrides the emails from the report. Required if `useEmailsFromReport` is not present. |
|
||||
| useEmailsFromReport | boolean | Send the report to the emails specified in the report. Required if `emails` is not present. |
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 29
|
||||
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – Report was sent.
|
||||
- **400** – Bad request (invalid json, missing content-type, missing or invalid fields, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **404** - Report not found.
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details.
|
||||
|
||||
## Get reports branding settings
|
||||
|
||||
`GET /api/reports/settings`
|
||||
|
||||
Returns reports branding settings that are global and used across all the reports.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| --------------------- | ----- |
|
||||
| reports.settings:read | n/a |
|
||||
|
||||
### Example request
|
||||
|
||||
```http
|
||||
GET /api/reports/settings HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 181
|
||||
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more detail
|
||||
|
||||
## Save reports branding settings
|
||||
|
||||
`POST /api/reports/settings`
|
||||
|
||||
Creates settings if they don't exist, otherwise updates them. These settings are global and used across all the reports.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ---------------------- | ----- |
|
||||
| reports.settings:write | n/a |
|
||||
|
||||
### Example request
|
||||
|
||||
```http
|
||||
POST /api/reports/settings HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```
|
||||
|
||||
#### JSON Body Schema
|
||||
|
||||
| Field name | Data type | Description |
|
||||
| ------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| branding.reportLogoUrl | string | URL of an image used as a logo on every page of the report. |
|
||||
| branding.emailLogoUrl | string | URL of an image used as a logo in the email. |
|
||||
| branding.emailFooterMode | string | Can be `sent-by` or `none`.<br/>`sent-by` adds a "Sent by `branding.emailFooterText`" footer link to the email. Requires specifying values in the `branding.emailFooterText` and `branding.emailFooterLink` fields.<br/>`none` suppresses adding a "Sent by" footer link to the email. |
|
||||
| branding.emailFooterText | string | Text of a URL added to the email "Sent by" footer. |
|
||||
| branding.emailFooterLink | string | URL address value added to the email "Sent by" footer. |
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 35
|
||||
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid json, missing or invalid fields values, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more detail
|
||||
|
||||
## Send a test email
|
||||
|
||||
`POST /api/reports/test-email`
|
||||
|
||||
Sends a test email with a report without persisting it in the database.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ------------ | ----- |
|
||||
| reports:send | n/a |
|
||||
|
||||
### Example request
|
||||
|
||||
See [JSON body schema]({{< ref "#config-json-body-schema" >}}) for fields description.
|
||||
|
||||
```http
|
||||
POST /api/reports/test-email HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 29
|
||||
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid json, missing or invalid fields values, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details
|
||||
|
||||
> Only available in Grafana Enterprise v7.0+.
|
||||
|
||||
> This API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.
|
||||
|
||||
`POST /api/reports/email`
|
||||
|
||||
Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client's timeout to at least 60 seconds.
|
||||
@@ -51,13 +451,13 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
}
|
||||
```
|
||||
|
||||
| id | string | ID of the report to send. It is the same as in the URL when editing a report, not to be confused with the ID of the dashboard. Required. |
|
||||
#### JSON Body Schema
|
||||
|
||||
| useEmailsFromReport | boolean | Send the report to the emails specified in the report. Required if **emails** is not present. |
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
| Field name | Data type | Description |
|
||||
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| id | string | ID of the report to send. It is the same as in the URL when editing a report, not to be confused with the ID of the dashboard. Required. |
|
||||
| emails | string | Comma-separated list of emails to which to send the report to. Overrides the emails from the report. Required if `useEmailsFromReport` is not present. |
|
||||
| useEmailsFromReport | boolean | Send the report to the emails specified in the report. Required if `emails` is not present. |
|
||||
|
||||
### Example response
|
||||
|
||||
@@ -71,11 +471,205 @@ Content-Length: 29
|
||||
|
||||
### Status Codes
|
||||
|
||||
| 403 | User is authenticated but is not authorized to generate the report. |
|
||||
| 404 | Report not found. |
|
||||
| 500 | Unexpected error or server misconfiguration. Refer to server logs for more details. |
|
||||
| 400 | Bad request (invalid json, missing content-type, missing or invalid fields, etc.). |
|
||||
| 401 | Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}). |
|
||||
| 403 | User is authenticated but is not authorized to generate the report. |
|
||||
| 404 | Report not found. |
|
||||
| 500 | Unexpected error or server misconfiguration. Refer to server logs for more details. |
|
||||
- **200** – Report was sent.
|
||||
- **400** – Bad request (invalid json, missing content-type, missing or invalid fields, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **404** - Report not found.
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details.
|
||||
|
||||
## Get reports branding settings
|
||||
|
||||
`GET /api/reports/settings`
|
||||
|
||||
Returns reports branding settings that are global and used across all the reports.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| --------------------- | ----- |
|
||||
| reports.settings:read | n/a |
|
||||
|
||||
### Example request
|
||||
|
||||
```http
|
||||
GET /api/reports/settings HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 181
|
||||
|
||||
{
|
||||
"id": 1,
|
||||
"userId": 1,
|
||||
"orgId": 1,
|
||||
"branding": {
|
||||
"reportLogoUrl": "",
|
||||
"emailLogoUrl": "",
|
||||
"emailFooterMode": "sent-by",
|
||||
"emailFooterText": "Grafana Labs",
|
||||
"emailFooterLink": "https://grafana.com/"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more detail
|
||||
|
||||
## Save reports branding settings
|
||||
|
||||
`POST /api/reports/settings`
|
||||
|
||||
Creates settings if they don't exist, otherwise updates them. These settings are global and used across all the reports.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ---------------------- | ----- |
|
||||
| reports.settings:write | n/a |
|
||||
|
||||
### Example request
|
||||
|
||||
```http
|
||||
POST /api/reports/settings HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
{
|
||||
"branding": {
|
||||
"reportLogoUrl": "https://grafana.com/reportLogo.jpg",
|
||||
"emailLogoUrl": "https://grafana.com/emailLogo.jpg",
|
||||
"emailFooterMode": "sent-by",
|
||||
"emailFooterText": "Grafana Labs",
|
||||
"emailFooterLink": "https://grafana.com/"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### JSON Body Schema
|
||||
|
||||
| Field name | Data type | Description |
|
||||
| ------------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| branding.reportLogoUrl | string | URL of an image used as a logo on every page of the report. |
|
||||
| branding.emailLogoUrl | string | URL of an image used as a logo in the email. |
|
||||
| branding.emailFooterMode | string | Can be `sent-by` or `none`.<br/>`sent-by` adds a "Sent by `branding.emailFooterText`" footer link to the email. Requires specifying values in the `branding.emailFooterText` and `branding.emailFooterLink` fields.<br/>`none` suppresses adding a "Sent by" footer link to the email. |
|
||||
| branding.emailFooterText | string | Text of a URL added to the email "Sent by" footer. |
|
||||
| branding.emailFooterLink | string | URL address value added to the email "Sent by" footer. |
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 35
|
||||
|
||||
{
|
||||
"message": "Report settings saved"
|
||||
}
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid json, missing or invalid fields values, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more detail
|
||||
|
||||
## Send a test email
|
||||
|
||||
`POST /api/reports/test-email`
|
||||
|
||||
Sends a test email with a report without persisting it in the database.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< ref "#reporting-api" >}}) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ------------ | ----- |
|
||||
| reports:send | n/a |
|
||||
|
||||
### Example request
|
||||
|
||||
See [JSON body schema]({{< ref "#config-json-body-schema" >}}) for fields description.
|
||||
|
||||
```http
|
||||
POST /api/reports/test-email HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
{{
|
||||
"name": "Report 4",
|
||||
"recipients": "example-report@grafana.com",
|
||||
"replyTo": "",
|
||||
"message": "Hello, please, find the report attached",
|
||||
"schedule": {
|
||||
"startDate": "2022-10-02T10:00:00+02:00",
|
||||
"endDate": "2022-11-02T20:00:00+02:00",
|
||||
"frequency": "daily",
|
||||
"intervalFrequency": "",
|
||||
"intervalAmount": 0,
|
||||
"workdaysOnly": true,
|
||||
"timeZone": "Europe/Warsaw"
|
||||
},
|
||||
"options": {
|
||||
"orientation": "landscape",
|
||||
"layout": "grid"
|
||||
},
|
||||
"enableDashboardUrl": true,
|
||||
"dashboards": [
|
||||
{
|
||||
"dashboard": {
|
||||
"uid": "7MeksYbmk",
|
||||
},
|
||||
"timeRange": {
|
||||
"from": "2022-08-08T15:00:00+02:00",
|
||||
"to": "2022-09-02T17:00:00+02:00"
|
||||
},
|
||||
"reportVariables": {
|
||||
"varibale1": "Value1"
|
||||
}
|
||||
}
|
||||
],
|
||||
"formats": [
|
||||
"pdf",
|
||||
"csv"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
### Example response
|
||||
|
||||
```http
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
Content-Length: 29
|
||||
|
||||
{
|
||||
"message": "Test email sent"
|
||||
}
|
||||
```
|
||||
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid json, missing or invalid fields values, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "auth/" >}}).
|
||||
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details
|
||||
|
||||
@@ -6,7 +6,7 @@ title: Add support for annotations
|
||||
|
||||
# Add support for annotations
|
||||
|
||||
This guide explains how to add support for [annotations]({{< relref "../../dashboards/annotations/" >}}) to an existing data source plugin.
|
||||
This guide explains how to add support for [annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) to an existing data source plugin.
|
||||
|
||||
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< ref "build-a-data-source-plugin.md" >}}).
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ frame.add({ time: 1589189388597, content: 'user registered' });
|
||||
frame.add({ time: 1589189406480, content: 'user logged in' });
|
||||
```
|
||||
|
||||
That's all you need to start returning log data from your data source. Go ahead and try it out in [Explore]({{< relref "../../explore/" >}}) or by adding a [Logs panel]({{< relref "../../visualizations/logs-panel/" >}}).
|
||||
That's all you need to start returning log data from your data source. Go ahead and try it out in [Explore]({{< relref "../../explore/" >}}) or by adding a [Logs panel]({{< relref "../../panels-visualizations/visualizations/logs/" >}}).
|
||||
|
||||
Congratulations, you just wrote your first logs data source plugin! Next, let's look at a couple of features that can further improve the experience for the user.
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@ A data transformation is any function that accepts a data frame as input, and re
|
||||
|
||||
A data frame with at least one time field is considered a _time series_.
|
||||
|
||||
For more information on time series, refer to our [Introduction to time series]({{< relref "../../basics/timeseries/" >}}).
|
||||
For more information on time series, refer to our [Introduction to time series]({{< relref "../../fundamentals/timeseries/" >}}).
|
||||
|
||||
### Wide format
|
||||
|
||||
@@ -165,7 +165,7 @@ Dimensions: 5 fields by 2 rows
|
||||
+---------------------+------------------+------------------+------------------+------------------+
|
||||
```
|
||||
|
||||
> **Note:** Not all panels support the wide time series data frame format. To keep full backward compatibility we have introduced a transformation that can be used to convert from the wide to the long format. For usage information, refer to the [Prepare time series-transformation]({{< relref "../../panels/transform-data/#prepare-time-series" >}}).
|
||||
> **Note:** Not all panels support the wide time series data frame format. To keep full backward compatibility we have introduced a transformation that can be used to convert from the wide to the long format. For usage information, refer to the [Prepare time series-transformation]({{< relref "../../panels-visualizations/query-transform-data/transform-data/#prepare-time-series" >}}).
|
||||
|
||||
## Technical references
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ title: Legacy snapshot mode
|
||||
|
||||
{{< figure class="float-right" src="/static/img/docs/Grafana-snapshot-example.png" caption="A dashboard using snapshot data and not live data." >}}
|
||||
|
||||
Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../dashboards/json-model/" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](https://snapshots.raintank.io) if you want to send the snapshot to someone who does not have access to your Grafana server.
|
||||
Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../dashboards/build-dashboards/view-dashboard-json-model" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](https://snapshots.raintank.io) if you want to send the snapshot to someone who does not have access to your Grafana server.
|
||||
|
||||
{{< figure class="float-right" src="/static/img/docs/animated_gifs/snapshots.gif" caption="Selecting a snapshot" >}}
|
||||
|
||||
|
||||
@@ -17,6 +17,10 @@ This guide helps you identify the steps required to update a plugin from the Gra
|
||||
- [Plugin migration guide](#plugin-migration-guide)
|
||||
- [Introduction](#introduction)
|
||||
- [Table of contents](#table-of-contents)
|
||||
- [From version 9.1.x to 9.2.x](#from-version-91x-to-92x)
|
||||
- [React and React-dom as peer dependencies](#react-and-react-dom-as-peer-dependencies)
|
||||
- [NavModelItem requires a valid icon name](#navmodelitem-requires-a-valid-icon-name)
|
||||
- [Additional type availability](#additional-type-availability)
|
||||
- [From version 8.x to 9.x](#from-version-8x-to-9x)
|
||||
- [9.0 breaking changes](#90-breaking-changes)
|
||||
- [theme.visualization.getColorByName replaces getColorForTheme](#themevisualizationgetcolorbyname-replaces-getcolorfortheme)
|
||||
@@ -60,6 +64,65 @@ This guide helps you identify the steps required to update a plugin from the Gra
|
||||
- [Migrate to data frames](#migrate-to-data-frames)
|
||||
- [Troubleshoot plugin migration](#troubleshoot-plugin-migration)
|
||||
|
||||
## From version 9.1.x to 9.2.x
|
||||
|
||||
### React and React-dom as peer dependencies
|
||||
|
||||
In earlier versions of Grafana packages `react` and `react-dom` were installed during a `yarn install` regardless of a plugins dependencies. In 9.2.0 the `@grafana` packages declare these react packages as peerDependencies and will need adding to a plugins `package.json` file for test commands to continue to run successfully.
|
||||
|
||||
Example:
|
||||
|
||||
```json
|
||||
// before
|
||||
"dependencies": {
|
||||
"@grafana/data": "9.1.0",
|
||||
"@grafana/ui": "9.1.0",
|
||||
},
|
||||
|
||||
// after
|
||||
"dependencies": {
|
||||
"@grafana/data": "9.2.0",
|
||||
"@grafana/ui": "9.2.0",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2"
|
||||
},
|
||||
|
||||
```
|
||||
|
||||
### NavModelItem requires a valid icon name
|
||||
|
||||
The typings of the `NavModelItem` have improved to only allow a valid `IconName` for the icon property. You can find the complete list of valid icons [here](https://github.com/grafana/grafana/blob/v9.2.0-beta1/packages/grafana-data/src/types/icon.ts). The icons specified in the list will work for older versions of Grafana 9.
|
||||
|
||||
Example:
|
||||
|
||||
```ts
|
||||
// before
|
||||
const model: NavModelItem = {
|
||||
id: 'settings',
|
||||
text: 'Settings',
|
||||
icon: 'fa fa-cog',
|
||||
url: `${baseUrl}/settings`,
|
||||
};
|
||||
|
||||
// after
|
||||
const model: NavModelItem = {
|
||||
id: 'settings',
|
||||
text: 'Settings',
|
||||
icon: 'cog',
|
||||
url: `${baseUrl}/settings`,
|
||||
};
|
||||
```
|
||||
|
||||
### Additional type availability
|
||||
|
||||
FieldProps, ModalProps, and QueryFieldProps are now exposed from `@grafana/ui`. They can be imported in the same way as other types.
|
||||
|
||||
Example:
|
||||
|
||||
```ts
|
||||
import { FieldProps, ModalProps, QueryFieldProps } from '@grafana/ui';
|
||||
```
|
||||
|
||||
## From version 8.x to 9.x
|
||||
|
||||
### 9.0 breaking changes
|
||||
|
||||
@@ -54,21 +54,26 @@ With [enhanced LDAP integration]({{< relref "../setup-grafana/configure-security
|
||||
|
||||
[SAML authentication]({{< relref "../setup-grafana/configure-security/configure-authentication/saml/" >}}) enables users to authenticate with single sign-on services that use Security Assertion Markup Language (SAML).
|
||||
|
||||
### Protected roles
|
||||
|
||||
With [protected roles]({{< relref "../setup-grafana/configure-security/configure-authentication/#protected-roles" >}}), you can define user roles that are exempt from being converted from one authentication type to another when changing auth providers.
|
||||
|
||||
## Enterprise features
|
||||
|
||||
Grafana Enterprise adds the following features:
|
||||
|
||||
- [Role-based access control]({{< relref "../administration/roles-and-permissions/access-control/" >}}) to control access with role-based permissions.
|
||||
- [Data source permissions]({{< relref "../administration/data-source-management/" >}}) to restrict query access to specific teams and users.
|
||||
- [Data source query caching]({{< relref "query-caching/" >}}) to temporarily store query results in Grafana to reduce data source load and rate limiting.
|
||||
- [Data source query caching]({{< relref "query-caching" >}}) to temporarily store query results in Grafana to reduce data source load and rate limiting.
|
||||
- [Reporting]({{< relref "../dashboards/create-reports/" >}}) to generate a PDF report from any dashboard and set up a schedule to have it emailed to whoever you choose.
|
||||
- [Export dashboard as PDF]({{< relref "../dashboards/share-dashboards-panels/#export-dashboard-as-pdf" >}})
|
||||
- [Custom branding]({{< relref "../setup-grafana/configure-grafana/configure-custom-branding/" >}}) to customize Grafana from the brand and logo to the footer links.
|
||||
- [Usage insights]({{< relref "../dashboards/assess-dashboard-usage/" >}}) to understand how your Grafana instance is used.
|
||||
- [Recorded queries]({{< relref "recorded-queries" >}}) to see trends over time for your data sources.
|
||||
- [Vault integration]({{< relref "../setup-grafana/configure-security/configure-database-encryption/integrate-with-hashicorp-vault/" >}}) to manage your configuration or provisioning secrets with Vault.
|
||||
- [Auditing]({{< relref "../setup-grafana/configure-security/audit-grafana/" >}}) tracks important changes to your Grafana instance to help you manage and mitigate suspicious activity and meet compliance requirements.
|
||||
- [Request security]({{< relref "../setup-grafana/configure-security/configure-request-security/" >}}) makes it possible to restrict outgoing requests from the Grafana server.
|
||||
- [Settings updates at runtime]({{< relref "settings-updates/" >}}) allows you to update Grafana settings at runtime without requiring a restart.
|
||||
- [Settings updates at runtime]({{< relref "settings-updates" >}}) allows you to update Grafana settings at runtime without requiring a restart.
|
||||
|
||||
## Enterprise data sources
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ The following cache backends are available: in-memory, Redis, and Memcached.
|
||||
|
||||
When a panel queries a cached data source, the time until this query fetches fresh data is determined by the panel's **interval.** This means that wider panels and dashboards with shorter time ranges fetch new data more frequently than narrower panels and dashboards with longer time ranges.
|
||||
|
||||
Interval is visible in a panel's [query options]({{< relref "../panels/query-options/" >}}). It is calculated like this: `(max data points) / time range`. Max data points are calculated based on the width of the panel. For example, a full-width panel on a dashboard with a time range of `last 7 days` will retrieve fresh data every 10 minutes. In this example, cached data for this panel will be served for up to 10 minutes before Grafana queries the data source again and returns new data.
|
||||
Interval is visible in a panel's [query options]({{< relref "../panels-visualizations/query-transform-data/" >}}). It is calculated like this: `(max data points) / time range`. Max data points are calculated based on the width of the panel. For example, a full-width panel on a dashboard with a time range of `last 7 days` will retrieve fresh data every 10 minutes. In this example, cached data for this panel will be served for up to 10 minutes before Grafana queries the data source again and returns new data.
|
||||
|
||||
You can make a panel retrieve fresh data more frequently by increasing the **Max data points** setting in the panel's [query options]({{< relref "../panels/query-options/" >}}).
|
||||
You can make a panel retrieve fresh data more frequently by increasing the **Max data points** setting in the panel's [query options]({{< relref "../panels-visualizations/query-transform-data/" >}}).
|
||||
|
||||
## Query caching benefits
|
||||
|
||||
|
||||
@@ -12,8 +12,8 @@ weight: 10
|
||||
# Query management in Explore
|
||||
|
||||
To help with debugging queries, Explore allows you to investigate query requests and responses, as well as query statistics, via the Query inspector.
|
||||
This functionality is similar to the panel inspector tasks [Inspect query performance]({{< relref "../panels/query-a-data-source/inspect-query-performance/" >}}) and
|
||||
[Inspect query request and response data]({{< relref "../panels/query-a-data-source/inspect-request-and-response-data/" >}}).
|
||||
This functionality is similar to the panel inspector tasks [Inspect query performance]({{< relref "../panels-visualizations/panel-inspector/#inspect-query-performance" >}}) and
|
||||
[Inspect query request and response data]({{< relref "../panels-visualizations/panel-inspector/#inspect-query-request-and-response-data" >}}).
|
||||
|
||||
{{< figure src="/static/img/docs/v71/query_inspector_explore.png" class="docs-image--no-shadow" max-width= "550px" caption="Screenshot of the query inspector button in Explore" >}}
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/basics/
|
||||
title: Grafana basics
|
||||
weight: 15
|
||||
- /docs/grafana/latest/fundamentals/
|
||||
title: Fundamentals
|
||||
weight: 8
|
||||
---
|
||||
|
||||
# Grafana basics
|
||||
# Fundamentals
|
||||
|
||||
This section provides basic information about observability topics in general and Grafana in particular. These topics will help people who are just starting out with observability and monitoring.
|
||||
|
||||
@@ -1,21 +1,41 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/basics/exemplars/
|
||||
- /docs/grafana/latest/basics/exemplars/view-exemplars/
|
||||
- /docs/grafana/latest/fundamentals/exemplars/
|
||||
description: Exemplars
|
||||
keywords:
|
||||
- grafana
|
||||
- concepts
|
||||
- exemplars
|
||||
- prometheus
|
||||
title: View exemplar data
|
||||
title: Exemplars
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# View exemplar data
|
||||
# Introduction to exemplars
|
||||
|
||||
An exemplar is a specific trace representative of measurement taken in a given time interval. While metrics excel at giving you an aggregated view of your system, traces give you a fine grained view of a single request; exemplars are a way to link the two.
|
||||
|
||||
Suppose your company website is experiencing a surge in traffic volumes. While more than eighty percent of the users are able to access the website in under two seconds, some users are experiencing a higher than normal response time resulting in bad user experience.
|
||||
|
||||
To identify the factors that are contributing to the latency, you must compare a trace for a fast response against a trace for a slow response. Given the vast amount of data in a typical production environment, it will be extremely laborious and time-consuming effort.
|
||||
|
||||
Use exemplars to help isolate problems within your data distribution by pinpointing query traces exhibiting high latency within a time interval. Once you localize the latency problem to a few exemplar traces, you can combine it with additional system based information or location properties to perform a root cause analysis faster, leading to quick resolutions to performance issues.
|
||||
|
||||
Support for exemplars is available for the Prometheus data source only. Once you enable the functionality, exemplars data is available by default. For more information on exemplar configuration and how to enable exemplars, refer to [configuring exemplars in Prometheus data source]({{< relref "../../datasources/prometheus/#configuring-exemplars" >}}).
|
||||
|
||||
Grafana shows exemplars alongside a metric in the Explore view and in dashboards. Each exemplar displays as a highlighted star. You can hover your cursor over an exemplar to view the unique traceID, which is a combination of a key value pair. To investigate further, click the blue button next to the `traceID` property.
|
||||
|
||||
{{< figure src="/static/img/docs/v74/exemplars.png" class="docs-image--no-shadow" max-width= "750px" caption="Screenshot showing the detail window of an Exemplar" >}}
|
||||
|
||||
Refer to [View exemplar data]({{< relref "#view-exemplar-data" >}}) for instructions on how to drill down and view exemplar trace details from metrics and logs. To know more about exemplars, refer to the blogpost [Intro to exemplars, which enable Grafana Tempo’s distributed tracing at massive scale](https://grafana.com/blog/2021/03/31/intro-to-exemplars-which-enable-grafana-tempos-distributed-tracing-at-massive-scale/).
|
||||
|
||||
## View exemplar data
|
||||
|
||||
When support for exemplar support is enabled for a Prometheus data source, you can view exemplar data either in the Explore view or from the Loki log details.
|
||||
|
||||
## In Explore
|
||||
### In Explore
|
||||
|
||||
Explore visualizes exemplar traces as highlighted stars alongside metrics data. For more information on how Explore visualizes trace data, refer to [Tracing in Explore]({{< relref "../../explore/trace-integration/" >}}).
|
||||
|
||||
@@ -31,7 +51,7 @@ To examine the details of an exemplar trace:
|
||||
|
||||
For more information on how to drill down and analyze the trace and span details, refer to the [Analyze trace and span details](#analyze-trace-and-spans) section.
|
||||
|
||||
## In logs
|
||||
### In logs
|
||||
|
||||
You can also view exemplar trace details from the Loki logs in Explore. Use regex within the Derived fields links for Loki to extract the `traceID` information. Now when you expand Loki logs, you can see a `traceID` property under the **Detected fields** section. To learn more about how to extract a part of a log message into an internal or external link, refer to [using derived fields in Loki]({{< relref "../../explore/logs-integration/" >}}).
|
||||
|
||||
@@ -45,7 +65,7 @@ To view the details of an exemplar trace:
|
||||
|
||||
For more information on how to drill down and analyze the trace and span details, refer to the [Analyze trace and span details](#analyze-trace-and-spans) section.
|
||||
|
||||
## Analyze trace and spans
|
||||
### Analyze trace and spans
|
||||
|
||||
This panel shows the details of the trace in different segments.
|
||||
|
||||
@@ -3,6 +3,7 @@ aliases:
|
||||
- /docs/grafana/latest/basics/glossary/
|
||||
- /docs/grafana/latest/getting-started/glossary/
|
||||
- /docs/grafana/latest/guides/glossary/
|
||||
- /docs/grafana/latest/fundamentals/glossary/
|
||||
description: Grafana glossary
|
||||
keywords:
|
||||
- grafana
|
||||
@@ -2,6 +2,7 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/basics/intro-histograms/
|
||||
- /docs/grafana/latest/getting-started/intro-histograms/
|
||||
- /docs/grafana/latest/fundamentals/intro-histograms/
|
||||
description: An introduction to histograms and heatmaps
|
||||
keywords:
|
||||
- grafana
|
||||
@@ -32,7 +33,7 @@ Here is an example showing height distribution of people.
|
||||
|
||||
{{< figure src="/static/img/docs/histogram-panel/histogram-example-v8-0.png" max-width="625px" caption="Bar chart example" >}}
|
||||
|
||||
For more information about histogram visualization options, refer to [Histogram]({{< relref "../visualizations/histogram/" >}}).
|
||||
For more information about histogram visualization options, refer to [Histogram]({{< relref "../../panels-visualizations/visualizations/histogram/" >}}).
|
||||
|
||||
Histograms only look at _value distributions_ over a specific time range. The problem with histograms is that you cannot see any trends or changes in the distribution over time. This is where heatmaps become useful.
|
||||
|
||||
@@ -44,7 +45,7 @@ In this example, you can clearly see what values are more common and how they tr
|
||||
|
||||

|
||||
|
||||
For more information about heatmap visualization options, refer to [Heatmap]({{< relref "../visualizations/heatmap/" >}}).
|
||||
For more information about heatmap visualization options, refer to [Heatmap]({{< relref "../../panels-visualizations/visualizations/heatmap/" >}}).
|
||||
|
||||
## Pre-bucketed data
|
||||
|
||||
@@ -3,6 +3,7 @@ aliases:
|
||||
- /docs/grafana/latest/basics/timeseries-dimensions/
|
||||
- /docs/grafana/latest/getting-started/timeseries-dimensions/
|
||||
- /docs/grafana/latest/guides/timeseries-dimensions/
|
||||
- /docs/rafana/latest/fundamentals/timeseries-dimensions/
|
||||
description: time series dimensions
|
||||
keywords:
|
||||
- grafana
|
||||
@@ -91,4 +92,4 @@ In this case the labels that represent the dimensions will have two keys based o
|
||||
|
||||
In the case of SQL-like data sources, more than one numeric column can be selected, with or without additional string columns to be used as dimensions. For example, `AVG(Temperature) AS AvgTemp, MAX(Temperature) AS MaxTemp`. This, if combined with multiple dimensions, can result in a lot of series. Selecting multiple values is currently only designed to be used with visualization.
|
||||
|
||||
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series]({{< relref "../developers/plugins/data-frames/#data-frames-as-time-series" >}}).
|
||||
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series]({{< relref "../../developers/plugins/data-frames/#data-frames-as-time-series" >}}).
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/basics/timeseries/
|
||||
- /docs/grafana/latest/fundamentals/timeseries/
|
||||
description: Introduction to time series
|
||||
keywords:
|
||||
- grafana
|
||||
@@ -3,7 +3,7 @@ aliases:
|
||||
- /docs/grafana/latest/getting-started/
|
||||
- /docs/grafana/latest/guides/what-is-grafana/
|
||||
title: Get started
|
||||
weight: 15
|
||||
weight: 9
|
||||
---
|
||||
|
||||
# Get started
|
||||
|
||||
@@ -43,7 +43,7 @@ To create your first dashboard:
|
||||
1. Click the **New dashboard** item under the **Dashboards** icon in the side menu.
|
||||
1. On the dashboard, click **Add an empty panel**.
|
||||
1. In the New dashboard/Edit panel view, go to the **Query** tab.
|
||||
1. Configure your [query]({{< relref "../panels/query-a-data-source/add-a-query/" >}}) by selecting `-- Grafana --` from the data source selector.
|
||||
1. Configure your [query]({{< relref "../panels-visualizations/query-transform-data/#add-a-query" >}}) by selecting `-- Grafana --` from the data source selector.
|
||||
|
||||
This generates the Random Walk dashboard.
|
||||
|
||||
@@ -56,7 +56,7 @@ Congratulations, you have created your first dashboard and it is displaying resu
|
||||
|
||||
Continue to experiment with what you have built, try the [explore workflow]({{< relref "../explore/" >}}) or another visualization feature. Refer to [Data sources]({{< relref "../datasources/" >}}) for a list of supported data sources and instructions on how to [add a data source]({{< relref "../datasources/add-a-data-source/" >}}). The following topics will be of interest to you:
|
||||
|
||||
- [Panels]({{< relref "../panels/" >}})
|
||||
- [Panels and visualizations]({{< relref "../panels-visualizations/" >}})
|
||||
- [Dashboards]({{< relref "../dashboards/" >}})
|
||||
- [Keyboard shortcuts]({{< relref "../dashboards/use-dashboards/#keyboard-shortcuts" >}})
|
||||
- [Plugins](https://grafana.com/grafana/plugins?orderBy=weight&direction=asc)
|
||||
|
||||
@@ -75,8 +75,8 @@ Grafana displays a list of possible series. Click one to select it, and Grafana
|
||||
|
||||
Create a simple Flux query.
|
||||
|
||||
1. [Add a panel](../panels/add-a-panel.md).
|
||||
1. In the query editor, select your InfluxDB-Flux data source. For more information, refer to [Queries](../panels/queries.md).
|
||||
1. [Add a panel]({{< relref "../dashboards/build-dashboards/add-organize-panels/" >}}).
|
||||
1. In the query editor, select your InfluxDB-Flux data source. For more information, refer to [Queries]({{< relref "../panels-visualizations/query-transform-data/" >}}).
|
||||
1. Select the **Table** visualization.
|
||||
1. In the query editor text field, enter `buckets()` and then click outside of the query editor.
|
||||
|
||||
@@ -96,7 +96,7 @@ You can also create Flux queries in the InfluxDB Explore view.
|
||||
|
||||

|
||||
|
||||
1. In Grafana, [add a panel](../panels/add-a-panel.md) and then paste your Flux code into the query editor.
|
||||
1. In Grafana, [add a panel]({{< relref "../dashboards/build-dashboards/add-organize-panels/" >}}) and then paste your Flux code into the query editor.
|
||||
1. Click **Apply**. Your new panel should be visible with data from your Flux query.
|
||||
|
||||
#### Check InfluxDB metrics in Grafana Explore
|
||||
|
||||
@@ -29,7 +29,7 @@ Alert hooks allow you to create different notifiers with a bit of code if you pr
|
||||
|
||||
Annotate graphs with rich events from different data sources. Hover over events to see the full event metadata and tags.
|
||||
|
||||
This feature, which shows up as a graph marker in Grafana, is useful for correlating data in case something goes wrong. You can create the annotations manually—just control-click on a graph and input some text—or you can fetch data from any data source. Refer to [Annotations]({{< relref "../dashboards/annotations.md" >}}) for more information.
|
||||
This feature, which shows up as a graph marker in Grafana, is useful for correlating data in case something goes wrong. You can create the annotations manually—just control-click on a graph and input some text—or you can fetch data from any data source. Refer to [Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) for more information.
|
||||
|
||||
## Dashboard variables
|
||||
|
||||
|
||||
@@ -45,6 +45,10 @@ With [enhanced LDAP integration]({{< relref "../setup-grafana/configure-security
|
||||
|
||||
[SAML authentication]({{< relref "../setup-grafana/configure-security/configure-authentication/saml/" >}}) enables users to authenticate with single sign-on services that use Security Assertion Markup Language (SAML).
|
||||
|
||||
### Protected roles
|
||||
|
||||
With [protected roles]({{< relref "../setup-grafana/configure-security/configure-authentication/#protected-roles" >}}), you can define user roles that are exempt from being converted from one authentication type to another when changing auth providers.
|
||||
|
||||
## Enterprise features
|
||||
|
||||
Grafana Enterprise adds the following features:
|
||||
@@ -56,6 +60,7 @@ Grafana Enterprise adds the following features:
|
||||
- [Export dashboard as PDF]({{< relref "../dashboards/share-dashboards-panels/#export-dashboard-as-pdf" >}})
|
||||
- [Custom branding]({{< relref "../setup-grafana/configure-grafana/configure-custom-branding/" >}}) to customize Grafana from the brand and logo to the footer links.
|
||||
- [Usage insights]({{< relref "../dashboards/assess-dashboard-usage/" >}}) to understand how your Grafana instance is used.
|
||||
- [Recorded queries]({{< relref "../enterprise/recorded-queries" >}}) to see trends over time for your data sources.
|
||||
- [Vault integration]({{< relref "../setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault/" >}}) to manage your configuration or provisioning secrets with Vault.
|
||||
- [Auditing]({{< relref "../setup-grafana/configure-security/audit-grafana/" >}}) tracks important changes to your Grafana instance to help you manage and mitigate suspicious activity and meet compliance requirements.
|
||||
- [Request security]({{< relref "../setup-grafana/configure-security/configure-request-security/" >}}) makes it possible to restrict outgoing requests from the Grafana server.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user