mirror of
https://github.com/grafana/grafana.git
synced 2026-01-14 13:21:26 +00:00
Compare commits
435 Commits
gabor/no-p
...
v9.5.10
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ea60dda9ce | ||
|
|
80bda7bc58 | ||
|
|
593e73d7b8 | ||
|
|
fdac0ec154 | ||
|
|
0a8cc46e18 | ||
|
|
801fa79c32 | ||
|
|
7ae72da72a | ||
|
|
7e416a731d | ||
|
|
3aff7440ee | ||
|
|
6d864e705e | ||
|
|
a45d292bf6 | ||
|
|
4d666018c0 | ||
|
|
084a3e2b34 | ||
|
|
b612804b16 | ||
|
|
e256a4229e | ||
|
|
a33296ff7e | ||
|
|
29154b2c4f | ||
|
|
5ae435971f | ||
|
|
3578c80b2c | ||
|
|
25cd2e59bb | ||
|
|
c811eb747d | ||
|
|
f29ce9b29d | ||
|
|
8154f070c8 | ||
|
|
fb4796e1e2 | ||
|
|
9a6be573ec | ||
|
|
c452a2bf00 | ||
|
|
eb18822140 | ||
|
|
15d0b852da | ||
|
|
dbcd05b9b3 | ||
|
|
d61e4f49c8 | ||
|
|
da3daa76b9 | ||
|
|
47b1e21580 | ||
|
|
f23fb5ef43 | ||
|
|
8fdb609c86 | ||
|
|
0c612ae868 | ||
|
|
e7e175b0a8 | ||
|
|
759dd42abf | ||
|
|
c1ef527b0b | ||
|
|
f645bff316 | ||
|
|
aa80c1ceda | ||
|
|
b33d4c3289 | ||
|
|
2b95fdc7e7 | ||
|
|
82e675e20a | ||
|
|
f6139ceab4 | ||
|
|
b1916959ba | ||
|
|
6c0cf98659 | ||
|
|
3cdd6c540e | ||
|
|
358f917633 | ||
|
|
464590f622 | ||
|
|
c81056922d | ||
|
|
817613f52e | ||
|
|
bd5728df22 | ||
|
|
de3b289831 | ||
|
|
558956f3d8 | ||
|
|
d38393f32d | ||
|
|
1ad544b293 | ||
|
|
751d35c396 | ||
|
|
b8ac666ea5 | ||
|
|
5df1da3a16 | ||
|
|
68b4bb4a2b | ||
|
|
be375d3946 | ||
|
|
abe1c6825c | ||
|
|
d5ba847d92 | ||
|
|
a7302e7cc4 | ||
|
|
36f1080ba6 | ||
|
|
4b0cec9803 | ||
|
|
e9df423b20 | ||
|
|
852ef5a946 | ||
|
|
2ccd7acb9b | ||
|
|
ba60a8bb1d | ||
|
|
905a79b17c | ||
|
|
841cd57d4e | ||
|
|
9dc78e3db1 | ||
|
|
8a85daf982 | ||
|
|
994d78334a | ||
|
|
443c6a796d | ||
|
|
c47c8ddf14 | ||
|
|
b93e956c7a | ||
|
|
10b7bd76f5 | ||
|
|
6b12749b57 | ||
|
|
907445beef | ||
|
|
1dd68f2d2b | ||
|
|
479b5c0fad | ||
|
|
de52d2b2c5 | ||
|
|
d1eaa139e1 | ||
|
|
2a6b7d1065 | ||
|
|
b669afdfda | ||
|
|
3ee1f7ac83 | ||
|
|
4f944c691a | ||
|
|
fbfd77d322 | ||
|
|
6721e7be68 | ||
|
|
c91314f701 | ||
|
|
b51a8063c1 | ||
|
|
b9dce4329e | ||
|
|
84a4b8be6f | ||
|
|
a77d02177a | ||
|
|
f984e20f0c | ||
|
|
4bcfe82aac | ||
|
|
02fe2856da | ||
|
|
2755a139e9 | ||
|
|
471f34a079 | ||
|
|
3b30a16586 | ||
|
|
2dc4a76e90 | ||
|
|
2e827123b8 | ||
|
|
41af852171 | ||
|
|
eb8d9f5a34 | ||
|
|
a279c804db | ||
|
|
4b0b2eede2 | ||
|
|
fd80720221 | ||
|
|
2745d3b5a1 | ||
|
|
b585067281 | ||
|
|
7f6a309614 | ||
|
|
a3031e5280 | ||
|
|
16eeaeb5ff | ||
|
|
3a3fa60e78 | ||
|
|
54c462c050 | ||
|
|
604304b3d2 | ||
|
|
debeb6212e | ||
|
|
cd663704c6 | ||
|
|
51ae8e5857 | ||
|
|
f2cee74902 | ||
|
|
8e32be59e0 | ||
|
|
7e31fff512 | ||
|
|
119a88665e | ||
|
|
614079fcd9 | ||
|
|
bef41a5cc9 | ||
|
|
dd7d0e8883 | ||
|
|
c833a174bd | ||
|
|
d9382b0a9b | ||
|
|
7dd3df7986 | ||
|
|
2f713952ba | ||
|
|
d502a8522d | ||
|
|
4ec3087f5a | ||
|
|
def2a16ef6 | ||
|
|
2e350d13bb | ||
|
|
824a38bcc6 | ||
|
|
973e8dc7c4 | ||
|
|
7d6d704e88 | ||
|
|
47a125529b | ||
|
|
ac79a0660e | ||
|
|
9c86893349 | ||
|
|
ab715a035f | ||
|
|
afd6dc96c9 | ||
|
|
9206c8d5f8 | ||
|
|
b0f4eac505 | ||
|
|
cc088dd6a4 | ||
|
|
9a3d3a7f8a | ||
|
|
0882b84c27 | ||
|
|
6db244abb8 | ||
|
|
2fdbcba8fc | ||
|
|
ff3cceb724 | ||
|
|
fc3c608ccd | ||
|
|
423872780b | ||
|
|
e85a6913ab | ||
|
|
92ebb4bac3 | ||
|
|
ec3364fd2f | ||
|
|
4694182dbb | ||
|
|
c62289f2d4 | ||
|
|
b5aaebf4fc | ||
|
|
9f059499e9 | ||
|
|
fb2ae9abca | ||
|
|
e7f27f1706 | ||
|
|
687d976461 | ||
|
|
4784c9a99a | ||
|
|
9db334ad95 | ||
|
|
342ad7fd1d | ||
|
|
87c29d94f5 | ||
|
|
e381b00859 | ||
|
|
72e0696780 | ||
|
|
d27e48cfe7 | ||
|
|
eb8b96ec87 | ||
|
|
cf3a2b56c2 | ||
|
|
93938867ad | ||
|
|
d1f79e7096 | ||
|
|
2b84887e50 | ||
|
|
a1d66bf368 | ||
|
|
e4fb61b854 | ||
|
|
a3c8fd3e9b | ||
|
|
0f9f72d46b | ||
|
|
82a1ef9e79 | ||
|
|
4e6fd701f7 | ||
|
|
8f9c2e6198 | ||
|
|
df7cf9cafd | ||
|
|
d6dd707e29 | ||
|
|
59e33994cf | ||
|
|
5bddebc140 | ||
|
|
394d139ef9 | ||
|
|
25562a0cc1 | ||
|
|
9d132493d2 | ||
|
|
184ad79c68 | ||
|
|
d2244b18ee | ||
|
|
0bd8fb3dca | ||
|
|
f3ee778e1a | ||
|
|
b1d90da73d | ||
|
|
e43c174f13 | ||
|
|
1d54585a63 | ||
|
|
adbcf7dee0 | ||
|
|
b153b4ede0 | ||
|
|
16f3df46f2 | ||
|
|
ce8732208e | ||
|
|
401577687c | ||
|
|
54cc55cb6d | ||
|
|
99359710ab | ||
|
|
676da1c7e9 | ||
|
|
3bae8c5cf1 | ||
|
|
dde555df3a | ||
|
|
9bc710d5e6 | ||
|
|
aeea508b42 | ||
|
|
08ea5c94c6 | ||
|
|
f74b514e1a | ||
|
|
86e6d9d377 | ||
|
|
99c1a4c171 | ||
|
|
180f0dac6b | ||
|
|
8a8d1e6ff2 | ||
|
|
7d33529218 | ||
|
|
d16b23ca86 | ||
|
|
de0d8c7012 | ||
|
|
5ce8bc3821 | ||
|
|
deb33e5f39 | ||
|
|
896ddabb60 | ||
|
|
c04c5ddcf1 | ||
|
|
785800fe3a | ||
|
|
38fdb3f1ee | ||
|
|
f811cbc5a7 | ||
|
|
2a566dddfd | ||
|
|
100d66cf36 | ||
|
|
f2059d7abb | ||
|
|
9c797800f0 | ||
|
|
aa06e63149 | ||
|
|
17f349b33d | ||
|
|
dd20653087 | ||
|
|
0a1e56ed86 | ||
|
|
5e2559597a | ||
|
|
70641c7718 | ||
|
|
9533da75de | ||
|
|
7f3371e4d2 | ||
|
|
335c71c92f | ||
|
|
405886acb4 | ||
|
|
5477297d10 | ||
|
|
45a60cf9d1 | ||
|
|
749d77e8bc | ||
|
|
2a41843a5c | ||
|
|
cf49bbe560 | ||
|
|
dd33560f5e | ||
|
|
167b268b81 | ||
|
|
a0f253c62b | ||
|
|
c95eda4b35 | ||
|
|
8ef9345b1a | ||
|
|
b4f3d14cc5 | ||
|
|
7d0af2f141 | ||
|
|
87c72dff9f | ||
|
|
ffc15bb42d | ||
|
|
f1d95b2157 | ||
|
|
3504573574 | ||
|
|
cdf6cd7323 | ||
|
|
b28ec49d2a | ||
|
|
7ca4b317c5 | ||
|
|
a07a0ef3b5 | ||
|
|
3c6625fe9e | ||
|
|
bc945cd1b0 | ||
|
|
2c899b3f68 | ||
|
|
f1691b0049 | ||
|
|
b498ebfa2d | ||
|
|
7045de2aa3 | ||
|
|
6b77a9ae80 | ||
|
|
aca84878a2 | ||
|
|
c7aad654e2 | ||
|
|
5bfb970009 | ||
|
|
ac5bcf32ae | ||
|
|
0c0a5ed602 | ||
|
|
4b6ce21884 | ||
|
|
8fc8a5e208 | ||
|
|
aebf6e7fc1 | ||
|
|
afa03930ec | ||
|
|
4aa8877ef1 | ||
|
|
8fad8a35c2 | ||
|
|
253ce61128 | ||
|
|
52ef99fcc7 | ||
|
|
c9d8a5c6b5 | ||
|
|
58c9a64e88 | ||
|
|
9262308c7f | ||
|
|
d1731c2abc | ||
|
|
38f6989e66 | ||
|
|
d0cd9f78e4 | ||
|
|
baf887a3c8 | ||
|
|
8cac9b28a0 | ||
|
|
fc10666f03 | ||
|
|
508d3d665f | ||
|
|
44e3189bf2 | ||
|
|
ed38abd70b | ||
|
|
090ef70f95 | ||
|
|
bc6f19f130 | ||
|
|
0998fd708c | ||
|
|
dccb25eae0 | ||
|
|
535ae47e2f | ||
|
|
a0587aa6cd | ||
|
|
5bc27fde9d | ||
|
|
792e80b65d | ||
|
|
ff79e2df57 | ||
|
|
8e7f6c231a | ||
|
|
ba86c60a1e | ||
|
|
9061f5ba0d | ||
|
|
c5493602df | ||
|
|
5866d71d65 | ||
|
|
de1ccc792d | ||
|
|
83034c711a | ||
|
|
864ab4dac0 | ||
|
|
1bea5dfeec | ||
|
|
147b0a21d6 | ||
|
|
435a7a7708 | ||
|
|
0009506829 | ||
|
|
2c52304ee6 | ||
|
|
ed10eebb48 | ||
|
|
fab6a375ca | ||
|
|
503a654dc5 | ||
|
|
5bfb520830 | ||
|
|
2cce94c70d | ||
|
|
33475a38f5 | ||
|
|
1c7f9e136e | ||
|
|
38bbb1e891 | ||
|
|
b0146a6d6b | ||
|
|
92fa914302 | ||
|
|
b8c5828b86 | ||
|
|
963cd42fcc | ||
|
|
f373eca377 | ||
|
|
c3d1930d05 | ||
|
|
02e1181c3b | ||
|
|
827cc6f1c8 | ||
|
|
fa1bd24b47 | ||
|
|
8357ceae7b | ||
|
|
dda934678d | ||
|
|
8bc2a7144a | ||
|
|
6c0aeb452d | ||
|
|
38fdfd6bfc | ||
|
|
900c18ef5b | ||
|
|
ae716112dc | ||
|
|
d153c50454 | ||
|
|
7694ea28e5 | ||
|
|
32869c96df | ||
|
|
2ed30e9831 | ||
|
|
5bb4a9c89f | ||
|
|
dcc5190620 | ||
|
|
006cea2192 | ||
|
|
384a21d03c | ||
|
|
71ebf83dd0 | ||
|
|
581cbe4295 | ||
|
|
3133aa135d | ||
|
|
e9b2eb1607 | ||
|
|
e6eb1df488 | ||
|
|
f0ae1b41b5 | ||
|
|
ad9dd6a1dd | ||
|
|
0315b911ef | ||
|
|
33ff08215c | ||
|
|
6a1a71f8bd | ||
|
|
826e500bf2 | ||
|
|
3fb37e26b5 | ||
|
|
81b78f3af4 | ||
|
|
9afddd77bd | ||
|
|
760146aeab | ||
|
|
bd63388bc5 | ||
|
|
c035abf529 | ||
|
|
68d2179aa2 | ||
|
|
08f57ef45c | ||
|
|
7f1a840f36 | ||
|
|
5e07346da9 | ||
|
|
c5352a10fe | ||
|
|
1433fcb9b2 | ||
|
|
4cd346e66c | ||
|
|
84850f4553 | ||
|
|
5bcc35298f | ||
|
|
ac7eecdb47 | ||
|
|
2fda756320 | ||
|
|
12c2bbfc56 | ||
|
|
6b68549bb4 | ||
|
|
0b9ef6d3f4 | ||
|
|
014b77bb79 | ||
|
|
61fe7dccb8 | ||
|
|
abd9543c14 | ||
|
|
3369033d74 | ||
|
|
b5cb0e5cc6 | ||
|
|
d40a837d5c | ||
|
|
0f4a76c9de | ||
|
|
0f10b98202 | ||
|
|
fde8d81de3 | ||
|
|
12d121a1fc | ||
|
|
c956cd2a32 | ||
|
|
c52f932025 | ||
|
|
522598d650 | ||
|
|
f26e56bc43 | ||
|
|
348ced74b4 | ||
|
|
1ad3ee4255 | ||
|
|
a38b4cf3b0 | ||
|
|
f09b60467e | ||
|
|
122a38543c | ||
|
|
8f9edf19a3 | ||
|
|
fe530beebd | ||
|
|
2e866faac4 | ||
|
|
f5063b3805 | ||
|
|
97164ed37e | ||
|
|
1ef8c02d19 | ||
|
|
345909d74b | ||
|
|
ba3f3ec59d | ||
|
|
37883ed9ef | ||
|
|
c1136a48b2 | ||
|
|
acf9030e26 | ||
|
|
cf31c0b7bd | ||
|
|
7159c79069 | ||
|
|
7dab288d64 | ||
|
|
2f550d1f03 | ||
|
|
5aecd7cf1f | ||
|
|
1bb827d634 | ||
|
|
3b67cebd40 | ||
|
|
8dac8ab37b | ||
|
|
c92d8591cb | ||
|
|
ab8994183d | ||
|
|
e47e901618 | ||
|
|
c9eff57efe | ||
|
|
5f73666f54 | ||
|
|
a63d1714b5 | ||
|
|
9c7b4e0f3f | ||
|
|
a013ee7be4 | ||
|
|
734fb8a3e5 | ||
|
|
ec109a913b | ||
|
|
7104dc3fef | ||
|
|
a6a9e4e0ed | ||
|
|
62e0b45067 | ||
|
|
0f0e2664cc | ||
|
|
1dc26665f3 | ||
|
|
b68716e9eb | ||
|
|
638a277364 | ||
|
|
c7cc68649d | ||
|
|
119fb76938 | ||
|
|
fbb66e6b9f | ||
|
|
ea8d17009f | ||
|
|
f34d0df862 |
@@ -2523,8 +2523,7 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"]
|
||||
],
|
||||
"public/app/features/dashboard/state/DashboardModel.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
@@ -3139,27 +3138,20 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "5"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "8"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "9"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "11"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "10"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "12"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "13"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
||||
[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"],
|
||||
[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.", "19"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "20"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "21"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "22"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "23"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "24"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "17"]
|
||||
],
|
||||
"public/app/features/plugins/importPanelPlugin.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
|
||||
4
.codespellignore
Normal file
4
.codespellignore
Normal file
@@ -0,0 +1,4 @@
|
||||
aks
|
||||
eror
|
||||
iam
|
||||
wan
|
||||
40
.drone.star
40
.drone.star
@@ -11,22 +11,28 @@ load("scripts/drone/events/pr.star", "pr_pipelines")
|
||||
load("scripts/drone/events/main.star", "main_pipelines")
|
||||
load(
|
||||
"scripts/drone/events/release.star",
|
||||
"artifacts_page_pipeline",
|
||||
"enterprise2_pipelines",
|
||||
"enterprise_pipelines",
|
||||
"integration_test_pipelines",
|
||||
"oss_pipelines",
|
||||
"publish_artifacts_pipelines",
|
||||
"publish_npm_pipelines",
|
||||
"publish_packages_pipeline",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/rgm.star",
|
||||
"rgm",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/publish_images.star",
|
||||
"publish_image_pipelines_public",
|
||||
"publish_image_pipelines_security",
|
||||
)
|
||||
load("scripts/drone/pipelines/github.star", "publish_github_pipeline")
|
||||
load("scripts/drone/pipelines/aws_marketplace.star", "publish_aws_marketplace_pipeline")
|
||||
load(
|
||||
"scripts/drone/pipelines/ci_images.star",
|
||||
"publish_ci_build_container_image_pipeline",
|
||||
"publish_ci_windows_test_image_pipeline",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/windows.star",
|
||||
"windows_test_backend",
|
||||
)
|
||||
load("scripts/drone/version.star", "version_branch_pipelines")
|
||||
load("scripts/drone/events/cron.star", "cronjobs")
|
||||
load("scripts/drone/vault.star", "secrets")
|
||||
@@ -35,25 +41,19 @@ def main(_ctx):
|
||||
return (
|
||||
pr_pipelines() +
|
||||
main_pipelines() +
|
||||
oss_pipelines() +
|
||||
enterprise_pipelines() +
|
||||
enterprise2_pipelines() +
|
||||
enterprise2_pipelines(
|
||||
prefix = "custom-",
|
||||
trigger = {"event": ["custom"]},
|
||||
) +
|
||||
publish_image_pipelines_public() +
|
||||
publish_image_pipelines_security() +
|
||||
publish_github_pipeline("public") +
|
||||
publish_github_pipeline("security") +
|
||||
publish_aws_marketplace_pipeline("public") +
|
||||
publish_artifacts_pipelines("security") +
|
||||
publish_artifacts_pipelines("public") +
|
||||
publish_npm_pipelines() +
|
||||
publish_packages_pipeline() +
|
||||
artifacts_page_pipeline() +
|
||||
rgm() +
|
||||
[windows_test_backend({
|
||||
"event": ["promote"],
|
||||
"target": ["test-windows"],
|
||||
}, "oss", "testing")] +
|
||||
version_branch_pipelines() +
|
||||
integration_test_pipelines() +
|
||||
publish_ci_windows_test_image_pipeline() +
|
||||
publish_ci_build_container_image_pipeline() +
|
||||
cronjobs() +
|
||||
secrets()
|
||||
)
|
||||
|
||||
4694
.drone.yml
4694
.drone.yml
File diff suppressed because it is too large
Load Diff
5
.github/CODEOWNERS
vendored
5
.github/CODEOWNERS
vendored
@@ -228,6 +228,7 @@
|
||||
/Dockerfile @grafana/grafana-delivery
|
||||
/Makefile @grafana/grafana-delivery
|
||||
/scripts/build/ @grafana/grafana-delivery
|
||||
/scripts/list-release-artifacts.sh @grafana/grafana-delivery
|
||||
|
||||
# OSS Plugin Partnerships backend code
|
||||
/pkg/tsdb/cloudwatch/ @grafana/aws-datasources
|
||||
@@ -428,6 +429,7 @@ lerna.json @grafana/frontend-ops
|
||||
/public/gazetteer/ @ryantxu
|
||||
/public/img/ @grafana/grafana-frontend-platform
|
||||
/public/lib/ @grafana/grafana-frontend-platform
|
||||
/public/lib/monaco-languages/kusto.ts @grafana/partner-datasources
|
||||
/public/maps/ @ryantxu
|
||||
/public/robots.txt @grafana/frontend-ops
|
||||
/public/sass/ @grafana/grafana-frontend-platform
|
||||
@@ -569,6 +571,7 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/pr-commands.json @marefr
|
||||
/.github/renovate.json5 @grafana/frontend-ops
|
||||
/.github/teams.yml @armandgrillet
|
||||
/.github/workflows/auto-milestone.yml @grafana/grafana-delivery
|
||||
/.github/workflows/backport.yml @grafana/grafana-delivery
|
||||
/.github/workflows/bump-version.yml @grafana/grafana-delivery
|
||||
/.github/workflows/close-milestone.yml @grafana/grafana-delivery
|
||||
@@ -591,6 +594,8 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/workflows/pr-codeql-analysis-python.yml @DanCech
|
||||
/.github/workflows/pr-commands-closed.yml @tolzhabayev
|
||||
/.github/workflows/pr-commands.yml @marefr
|
||||
/.github/workflows/pr-patch-check.yml @grafana/grafana-delivery
|
||||
/.github/workflows/sync-mirror.yml @grafana/grafana-delivery
|
||||
/.github/workflows/publish-technical-documentation-next.yml @grafana/docs-grafana
|
||||
/.github/workflows/publish-technical-documentation-release.yml @grafana/docs-grafana
|
||||
/.github/workflows/remove-milestone.yml @grafana/grafana-frontend-platform
|
||||
|
||||
2
.github/pr-checks.json
vendored
2
.github/pr-checks.json
vendored
@@ -46,4 +46,4 @@
|
||||
},
|
||||
"targetUrl": "https://github.com/grafana/grafana/blob/main/contribute/merge-pull-request.md#include-in-changelog-and-release-notes"
|
||||
}
|
||||
]
|
||||
]
|
||||
|
||||
22
.github/workflows/auto-milestone.yml
vendored
Normal file
22
.github/workflows/auto-milestone.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Auto-milestone
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
|
||||
- name: Run auto-milestone
|
||||
uses: grafana/grafana-github-actions-go/auto-milestone@main
|
||||
with:
|
||||
pr: ${{ github.event.pull_request.number }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
8
.github/workflows/backport.yml
vendored
8
.github/workflows/backport.yml
vendored
@@ -17,10 +17,16 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run backport
|
||||
uses: ./actions/backport
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
labelsToAdd: "backport,no-changelog"
|
||||
title: "[{{base}}] {{originalTitle}}"
|
||||
|
||||
14
.github/workflows/bump-version.yml
vendored
14
.github/workflows/bump-version.yml
vendored
@@ -6,12 +6,12 @@ on:
|
||||
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
|
||||
env:
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
- uses: actions-ecosystem/action-regex-match@v2.0.2
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
id: regex-match
|
||||
@@ -68,8 +68,14 @@ jobs:
|
||||
node-version: '16'
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Run bump version (manually invoked)
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run bump version (manually invoked)
|
||||
uses: ./actions/bump-version
|
||||
with:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
|
||||
14
.github/workflows/close-milestone.yml
vendored
14
.github/workflows/close-milestone.yml
vendored
@@ -11,9 +11,7 @@ on:
|
||||
description: Needs to match, exactly, the name of a milestone
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
token:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -26,14 +24,20 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Close milestone (manually invoked)
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
uses: ./actions/close-milestone
|
||||
with:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
- name: Close milestone (workflow invoked)
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
uses: ./actions/close-milestone
|
||||
with:
|
||||
version_call: ${{ inputs.version_call }}
|
||||
token: ${{ secrets.token }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
2
.github/workflows/codeql-analysis.yml
vendored
2
.github/workflows/codeql-analysis.yml
vendored
@@ -44,7 +44,7 @@ jobs:
|
||||
name: Set go version
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.19.2'
|
||||
go-version: '1.20.8'
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
12
.github/workflows/github-release.yml
vendored
12
.github/workflows/github-release.yml
vendored
@@ -3,7 +3,7 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
required: true
|
||||
description: Needs to match, exactly, the name of a milestone (NO v prefix)
|
||||
jobs:
|
||||
main:
|
||||
@@ -14,11 +14,17 @@ jobs:
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run github release action
|
||||
uses: ./actions/github-release
|
||||
with:
|
||||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
|
||||
8
.github/workflows/milestone.yml
vendored
8
.github/workflows/milestone.yml
vendored
@@ -10,12 +10,10 @@ jobs:
|
||||
uses: grafana/grafana/.github/workflows/remove-milestone.yml@main
|
||||
with:
|
||||
version_call: ${{ github.event.inputs.version_input }}
|
||||
secrets:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
secrets: inherit
|
||||
call-close-milestone:
|
||||
uses: grafana/grafana/.github/workflows/close-milestone.yml@main
|
||||
with:
|
||||
version_call: ${{ github.event.inputs.version_input }}
|
||||
secrets:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
needs: call-remove-milestone
|
||||
secrets: inherit
|
||||
needs: call-remove-milestone
|
||||
|
||||
2
.github/workflows/pr-codeql-analysis-go.yml
vendored
2
.github/workflows/pr-codeql-analysis-go.yml
vendored
@@ -23,7 +23,7 @@ jobs:
|
||||
- name: Set go version
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.19.2'
|
||||
go-version: '1.20.8'
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
|
||||
24
.github/workflows/pr-patch-check.yml
vendored
Normal file
24
.github/workflows/pr-patch-check.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
# Owned by grafana-delivery-squad
|
||||
# Intended to be dropped into the base repo Ex: grafana/grafana
|
||||
name: Check for patch conflicts
|
||||
run-name: check-patch-conflicts-${{ github.base_ref }}-${{ github.head_ref }}
|
||||
on:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*"
|
||||
|
||||
# Since this is run on a pull request, we want to apply the patches intended for the
|
||||
# target branch onto the source branch, to verify compatibility before merging.
|
||||
jobs:
|
||||
trigger_downstream_patch_check:
|
||||
uses: grafana/security-patch-actions/.github/workflows/test-patches.yml@main
|
||||
with:
|
||||
src_repo: "${{ github.repository }}"
|
||||
src_ref: "${{ github.head_ref }}" # this is the source branch name, Ex: "feature/newthing"
|
||||
patch_repo: "${{ github.repository }}-security-patches"
|
||||
patch_ref: "${{ github.base_ref }}" # this is the target branch name, Ex: "main"
|
||||
secrets: inherit
|
||||
14
.github/workflows/remove-milestone.yml
vendored
14
.github/workflows/remove-milestone.yml
vendored
@@ -11,9 +11,7 @@ on:
|
||||
description: Needs to match, exactly, the name of a milestone
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
token:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -26,14 +24,20 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Remove milestone from open issues (manually invoked)
|
||||
if: ${{ github.event.inputs.version != '' }}
|
||||
uses: ./actions/remove-milestone
|
||||
with:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
- name: Remove milestone from open issues (workflow invoked)
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
uses: ./actions/remove-milestone
|
||||
with:
|
||||
version_call: ${{ inputs.version_call }}
|
||||
token: ${{ secrets.token }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
25
.github/workflows/sync-mirror.yml
vendored
Normal file
25
.github/workflows/sync-mirror.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# Owned by grafana-delivery-squad
|
||||
# Intended to be dropped into the base repo, Ex: grafana/grafana
|
||||
name: Sync to mirror
|
||||
run-name: sync-to-mirror-${{ github.ref_name }}
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*"
|
||||
|
||||
# This is run after the pull request has been merged, so we'll run against the target branch
|
||||
jobs:
|
||||
trigger_downstream_patch_mirror:
|
||||
concurrency: patch-mirror-${{ github.ref_name }}
|
||||
uses: grafana/security-patch-actions/.github/workflows/mirror-branch-and-apply-patches.yml@main
|
||||
if: github.repository == 'grafana/grafana'
|
||||
with:
|
||||
ref: "${{ github.ref_name }}" # this is the target branch name, Ex: "main"
|
||||
src_repo: "${{ github.repository }}"
|
||||
dest_repo: "${{ github.repository }}-security-mirror"
|
||||
patch_repo: "${{ github.repository }}-security-patches"
|
||||
secrets: inherit
|
||||
|
||||
12
.github/workflows/update-changelog.yml
vendored
12
.github/workflows/update-changelog.yml
vendored
@@ -17,9 +17,15 @@ jobs:
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Run update changelog (manually invoked)
|
||||
uses: ./actions/update-changelog
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
with:
|
||||
token: ${{ secrets.GH_BOT_ACCESS_TOKEN }}
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- name: Run update changelog (manually invoked)
|
||||
uses: grafana/grafana-github-actions-go/update-changelog@main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
grafanabotForumKey: ${{ secrets.GRAFANABOT_FORUM_KEY }}
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -191,3 +191,6 @@ public/api-spec.json
|
||||
deployment_tools_config.json
|
||||
|
||||
.betterer.cache
|
||||
|
||||
# Temporary file for backporting PRs
|
||||
.pr-body.txt
|
||||
|
||||
@@ -80,7 +80,7 @@ var config = {
|
||||
{
|
||||
url: '${HOST}/?orgId=1',
|
||||
wait: 500,
|
||||
threshold: 0,
|
||||
threshold: 3,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge',
|
||||
@@ -93,7 +93,7 @@ var config = {
|
||||
url: '${HOST}/?orgId=1&search=open',
|
||||
wait: 500,
|
||||
rootElement: '.main-view',
|
||||
threshold: 0,
|
||||
threshold: 3,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/alerting/list',
|
||||
|
||||
385
CHANGELOG.md
385
CHANGELOG.md
@@ -1,3 +1,388 @@
|
||||
<!-- 9.5.8 START -->
|
||||
|
||||
# 9.5.8 (2023-08-16)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **GenericOAuth:** Set sub as auth id. [#73223](https://github.com/grafana/grafana/issues/73223), [@kalleep](https://github.com/kalleep)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **DataSourceProxy:** Fix url validation error handling. [#73320](https://github.com/grafana/grafana/issues/73320), [@ricci2511](https://github.com/ricci2511)
|
||||
|
||||
<!-- 9.5.8 END -->
|
||||
<!-- 9.5.7 START -->
|
||||
|
||||
# 9.5.7 (2023-07-20)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Sort NumberCaptureValues in EvaluationString. [#71930](https://github.com/grafana/grafana/issues/71930), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** No longer silence paused alerts during legacy migration. [#71765](https://github.com/grafana/grafana/issues/71765), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Chore:** Upgrade Go to 1.20.6. [#71446](https://github.com/grafana/grafana/issues/71446), [@sakjur](https://github.com/sakjur)
|
||||
- **Alerting:** Remove and revert flag alertingBigTransactions. [#70910](https://github.com/grafana/grafana/issues/70910), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Alerting:** Migrate unknown NoData\Error settings to the default. [#70905](https://github.com/grafana/grafana/issues/70905), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Tempo:** Escape regex-sensitive characters in span name before building promql query. [#68318](https://github.com/grafana/grafana/issues/68318), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Alerting:** Update grafana/alerting to ce9fba9. [#67685](https://github.com/grafana/grafana/issues/67685), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Chore:** Upgrade Go to 1.20.6. (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Plugins:** Only configure plugin proxy transport once. [#71741](https://github.com/grafana/grafana/issues/71741), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Alerting:** Fix unique violation when updating rule group with title chains/cycles. [#71330](https://github.com/grafana/grafana/issues/71330), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Fix:** Change getExistingDashboardByTitleAndFolder to get dashboard by title, not slug. [#70961](https://github.com/grafana/grafana/issues/70961), [@yangkb09](https://github.com/yangkb09)
|
||||
- **Alerting:** Convert 'Both' type Prometheus queries to 'Range' in migration. [#70907](https://github.com/grafana/grafana/issues/70907), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Support newer http_config struct. [#69718](https://github.com/grafana/grafana/issues/69718), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **InfluxDB:** Interpolate retention policies. [#69299](https://github.com/grafana/grafana/issues/69299), [@itsmylife](https://github.com/itsmylife)
|
||||
- **StatusHistory:** Fix rendering of value-mapped null. [#69107](https://github.com/grafana/grafana/issues/69107), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Alerting:** Fix provenance guard checks for Alertmanager configuration to not cause panic when compared nested objects. [#69092](https://github.com/grafana/grafana/issues/69092), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **AnonymousAuth:** Fix concurrent read-write crash. [#68802](https://github.com/grafana/grafana/issues/68802), [@Jguer](https://github.com/Jguer)
|
||||
- **AzureMonitor:** Ensure legacy properties containing template variables are correctly migrated. [#68790](https://github.com/grafana/grafana/issues/68790), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Explore:** Remove data source onboarding page. [#68643](https://github.com/grafana/grafana/issues/68643), [@harisrozajac](https://github.com/harisrozajac)
|
||||
- **Dashboard:** Re-align Save form. [#68625](https://github.com/grafana/grafana/issues/68625), [@polibb](https://github.com/polibb)
|
||||
- **Azure Monitor:** Fix bug that did not show alert rule preview. [#68582](https://github.com/grafana/grafana/issues/68582), [@alyssabull](https://github.com/alyssabull)
|
||||
- **Histogram:** Respect min/max panel settings for x-axis. [#68244](https://github.com/grafana/grafana/issues/68244), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Heatmap:** Fix color rendering for value ranges < 1. [#68163](https://github.com/grafana/grafana/issues/68163), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Heatmap:** Handle unsorted timestamps in calculate mode. [#68150](https://github.com/grafana/grafana/issues/68150), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Google Cloud Monitor:** Fix mem usage for dropdown. [#67949](https://github.com/grafana/grafana/issues/67949), [@asimpson](https://github.com/asimpson)
|
||||
- **AzureMonitor:** Fix logs query multi-resource and timespan values. [#67932](https://github.com/grafana/grafana/issues/67932), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Utils:** Reimplement util.GetRandomString to avoid modulo bias. [#66970](https://github.com/grafana/grafana/issues/66970), [@DanCech](https://github.com/DanCech)
|
||||
- **License:** Enable FeatureUserLimit for all products. (Enterprise)
|
||||
- **Auth:** Remove ldap init sync. (Enterprise)
|
||||
|
||||
<!-- 9.5.7 END -->
|
||||
<!-- 9.5.6 START -->
|
||||
|
||||
# 9.5.6 (2023-07-11)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Dashboard:** Fix library panels in collapsed rows not getting updated. [#66640](https://github.com/grafana/grafana/issues/66640), [@VictorColomb](https://github.com/VictorColomb)
|
||||
- **Auth:** Add and document option for enabling email lookup. [@vtorosyan](https://github.com/vtorosyan)
|
||||
|
||||
<!-- 9.5.6 END -->
|
||||
<!-- 9.5.5 START -->
|
||||
|
||||
# 9.5.5 (2023-06-22)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Auth:** Fixed CVE-2023-3128. [#70580](https://github.com/grafana/grafana/issues/70580), [@zerok](https://github.com/zerok)
|
||||
- **Auth:** Show invite button if disable login form is set to false. [#70154](https://github.com/grafana/grafana/issues/70154), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Azure:** Fix Kusto auto-completion for Azure datasources (#69685). [#69694](https://github.com/grafana/grafana/issues/69694), [@aangelisc](https://github.com/aangelisc)
|
||||
- **RBAC:** Remove legacy AC editor and admin role on new dashboard route. [#68776](https://github.com/grafana/grafana/issues/68776), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Revert:** Allow editors to access GET /datasources. [#68654](https://github.com/grafana/grafana/issues/68654), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Settings:** Add ability to override `skip_org_role_sync` with Env variables. [#68375](https://github.com/grafana/grafana/issues/68375), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
|
||||
<!-- 9.5.5 END -->
|
||||
<!-- 9.5.3 START -->
|
||||
|
||||
# 9.5.3 (2023-06-06)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Query:** Prevent crash while executing concurrent mixed queries
|
||||
- **Alerting:** Require alert.notifications:write permissions to test receivers and templates
|
||||
|
||||
<!-- 9.5.3 END -->
|
||||
<!-- 9.5.2 START -->
|
||||
|
||||
# 9.5.2 (2023-05-03)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Upgrade Go to 1.20.4. [#67757](https://github.com/grafana/grafana/issues/67757), [@papagian](https://github.com/papagian)
|
||||
- **Alerting:** Scheduler use rule fingerprint instead of version. [#67516](https://github.com/grafana/grafana/issues/67516), [@grafanabot](https://github.com/grafanabot)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **TimeSeries:** Fix leading null-fill for missing intervals. [#67571](https://github.com/grafana/grafana/issues/67571), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Dashboard:** Revert fixed header shown on mobile devices in the new panel header. [#67514](https://github.com/grafana/grafana/issues/67514), [@grafanabot](https://github.com/grafanabot)
|
||||
- **PostgreSQL:** Fix tls certificate issue by downgrading lib/pq. [#67393](https://github.com/grafana/grafana/issues/67393), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Provisioning:** Fix provisioning issues with legacy alerting and data source permissions. [#67377](https://github.com/grafana/grafana/issues/67377), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Alerting:** Fix misleading status code in provisioning API. [#67358](https://github.com/grafana/grafana/issues/67358), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Explore:** Update table min height (#67321). [#67332](https://github.com/grafana/grafana/issues/67332), [@adrapereira](https://github.com/adrapereira)
|
||||
- **DataLinks:** Encoded URL fixed. [#67291](https://github.com/grafana/grafana/issues/67291), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **Loki:** Fix log samples using `instant` queries (#67271). [#67275](https://github.com/grafana/grafana/issues/67275), [@svennergr](https://github.com/svennergr)
|
||||
- **Panel Header Fix:** Implement new Panel Header on Angular Panels . [#67228](https://github.com/grafana/grafana/issues/67228), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Azure Monitor:** Fix bug that was not showing resources for certain locations. [#67216](https://github.com/grafana/grafana/issues/67216), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Alerting:** Fix panic when reparenting receivers to groups following an attempted rename via Provisioning. [#67175](https://github.com/grafana/grafana/issues/67175), [@grafanabot](https://github.com/grafanabot)
|
||||
- **Cloudwatch Logs:** Clarify Cloudwatch Logs Limits. [#67101](https://github.com/grafana/grafana/issues/67101), [@grafanabot](https://github.com/grafanabot)
|
||||
- **SAML:** Fix IdP metadata caching so that invalid metadata doesn't get cached. (Enterprise)
|
||||
|
||||
<!-- 9.5.2 END -->
|
||||
<!-- 9.5.1 START -->
|
||||
|
||||
# 9.5.1 (2023-04-26)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Upgrade Go to 1.20.3. [#66831](https://github.com/grafana/grafana/issues/66831), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
<!-- 9.5.1 END -->
|
||||
<!-- 9.5.0 START -->
|
||||
|
||||
# 9.5.0 (2023-04-04)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **API keys:** Add deprecation to api keys. [#65948](https://github.com/grafana/grafana/pull/65948), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **API:** Enable serving Swagger UI by default and add docs and guidelines. [#63489](https://github.com/grafana/grafana/pull/63489), [@papagian](https://github.com/papagian)
|
||||
- **API:** Permit Cache-Control (browser caching) for datasource resources. [#62033](https://github.com/grafana/grafana/pull/62033), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Accessibility:** Make row actions keyboard accessible. [#63367](https://github.com/grafana/grafana/pull/63367), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Admin/Plugins:** Set category filter in connections link. [#64393](https://github.com/grafana/grafana/pull/64393), [@mikkancso](https://github.com/mikkancso)
|
||||
- **Alerting:** Add CustomDetails field in PagerDuty contact point. [#64860](https://github.com/grafana/grafana/pull/64860), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Alerting:** Add dashboard and panel links to rule and instance annotations. [#63243](https://github.com/grafana/grafana/pull/63243), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Add filter and remove funcs for custom labels and annotations. [#63437](https://github.com/grafana/grafana/pull/63437), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Add fuzzy search to alert list view. [#63931](https://github.com/grafana/grafana/pull/63931), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Add metrics for active receiver and integrations. [#64050](https://github.com/grafana/grafana/pull/64050), [@gotjosh](https://github.com/gotjosh)
|
||||
- **Alerting:** Better printing of labels. [#63348](https://github.com/grafana/grafana/pull/63348), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Create new state history "fanout" backend that dispatches to multiple other backends at once. [#64774](https://github.com/grafana/grafana/pull/64774), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Enable preview for recording rules. [#63260](https://github.com/grafana/grafana/pull/63260), [@VikaCep](https://github.com/VikaCep)
|
||||
- **Alerting:** Fetch all applied alerting configurations. [#65728](https://github.com/grafana/grafana/pull/65728), [@santihernandezc](https://github.com/santihernandezc)
|
||||
- **Alerting:** Introduce proper feature toggles for common state history backend combinations. [#65497](https://github.com/grafana/grafana/pull/65497), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Make time range query parameters not required when querying Loki. [#62985](https://github.com/grafana/grafana/pull/62985), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** New notification policies view. [#61952](https://github.com/grafana/grafana/pull/61952), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** No longer index state history log streams by instance labels. [#65474](https://github.com/grafana/grafana/pull/65474), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Respect "For" Duration for NoData alerts. [#65574](https://github.com/grafana/grafana/pull/65574), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Support filtering rules by multiple datasources. [#64355](https://github.com/grafana/grafana/pull/64355), [@VikaCep](https://github.com/VikaCep)
|
||||
- **Alerting:** Switch to snappy-compressed-protobuf for outgoing push requests to Loki. [#65077](https://github.com/grafana/grafana/pull/65077), [@alexweav](https://github.com/alexweav)
|
||||
- **Angular:** Prevent angular from loading when disabled. [#65755](https://github.com/grafana/grafana/pull/65755), [@torkelo](https://github.com/torkelo)
|
||||
- **Auth:** Add Generic oauth skip org role sync setting. [#62418](https://github.com/grafana/grafana/pull/62418), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **Auth:** Add feature flag to move token rotation to client. [#65060](https://github.com/grafana/grafana/pull/65060), [@kalleep](https://github.com/kalleep)
|
||||
- **Auth:** Show user sync external Authentication status. [#62721](https://github.com/grafana/grafana/pull/62721), [@lokeswaran-aj](https://github.com/lokeswaran-aj)
|
||||
- **Backend:** Use sdk version 0.148.0. [#62822](https://github.com/grafana/grafana/pull/62822), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Chore:** Add stat for remote cache config. [#64276](https://github.com/grafana/grafana/pull/64276), [@DanCech](https://github.com/DanCech)
|
||||
- **Chore:** Replace short UID generation with more standard UUIDs. [#62731](https://github.com/grafana/grafana/pull/62731), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Chore:** Use DOMPurify to sanitize strings rather than js-xss. [#62787](https://github.com/grafana/grafana/pull/62787), [@KristianGrafana](https://github.com/KristianGrafana)
|
||||
- **CloudMonitoring:** Add possibility to use path for private key. [#65252](https://github.com/grafana/grafana/pull/65252), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **CloudWatch Logs:** Update default timeout to 30m. [#63155](https://github.com/grafana/grafana/pull/63155), [@ashnove](https://github.com/ashnove)
|
||||
- **CloudWatch:** Add AWS/IotSiteWise namespace and metrics. [#63534](https://github.com/grafana/grafana/pull/63534), [@iwysiu](https://github.com/iwysiu)
|
||||
- **CloudWatch:** Add account support to variable queries. [#63822](https://github.com/grafana/grafana/pull/63822), [@iwysiu](https://github.com/iwysiu)
|
||||
- **CloudWatch:** Make deeplinks work for us-gov and china regions. [#64080](https://github.com/grafana/grafana/pull/64080), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Cloudwatch:** Add MeteredIOBytes metric for EFS. [#64793](https://github.com/grafana/grafana/pull/64793), [@xlagg5](https://github.com/xlagg5)
|
||||
- **Command Palette:** Display dashboard location. [#63807](https://github.com/grafana/grafana/pull/63807), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Command palette:** Enable folder searching. [#62663](https://github.com/grafana/grafana/pull/62663), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Connections:** Turn on feature toggle by default. [#64885](https://github.com/grafana/grafana/pull/64885), [@mikkancso](https://github.com/mikkancso)
|
||||
- **Cookies:** Provide a mechanism for per user control over cookies. [#61566](https://github.com/grafana/grafana/pull/61566), [@sakjur](https://github.com/sakjur)
|
||||
- **Dashboard Datasource:** Update Query List & Improve UX. [#64429](https://github.com/grafana/grafana/pull/64429), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Dashboard:** Add a feature that creates a table panel when a spreadsheet file is dropped on the dashboard. [#62688](https://github.com/grafana/grafana/pull/62688), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
- **Dashboard:** Add new visualization/row/library panel/pasted panel is now a dropdown menu. [#65361](https://github.com/grafana/grafana/pull/65361), [@polibb](https://github.com/polibb)
|
||||
- **Dashboard:** Add value format for requests per minute. [#62258](https://github.com/grafana/grafana/pull/62258), [@dwradcliffe](https://github.com/dwradcliffe)
|
||||
- **Dashboard:** Empty/No Panels dashboard with a new design. [#65161](https://github.com/grafana/grafana/pull/65161), [@polibb](https://github.com/polibb)
|
||||
- **Dashboard:** When dashboard is not found show message instead of empty page. [#65508](https://github.com/grafana/grafana/pull/65508), [@polibb](https://github.com/polibb)
|
||||
- **Dashboards:** Enable feature flag `newPanelChromeUI` by default. [#65593](https://github.com/grafana/grafana/pull/65593), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Dataplane:** Support timeSeriesLong without transform. [#62732](https://github.com/grafana/grafana/pull/62732), [@bohandley](https://github.com/bohandley)
|
||||
- **Datasources:** Add user_agent header customization for outgoing HTTP requests. [#63769](https://github.com/grafana/grafana/pull/63769), [@zhichli](https://github.com/zhichli)
|
||||
- **Datasources:** Use getDefaultQuery in annotations editors. [#61870](https://github.com/grafana/grafana/pull/61870), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Docs:** Add documentation on how to debug backend plugins. [#64814](https://github.com/grafana/grafana/pull/64814), [@xnyo](https://github.com/xnyo)
|
||||
- **Docs:** Deprecate dashboard previews. [#65698](https://github.com/grafana/grafana/pull/65698), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
|
||||
- **Elasticsearch:** Detect Elasticsearch version. [#63341](https://github.com/grafana/grafana/pull/63341), [@gabor](https://github.com/gabor)
|
||||
- **Elasticsearch:** Run Explore queries trough data source backend. [#65339](https://github.com/grafana/grafana/pull/65339), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore:** Add range option to internal data links. [#64063](https://github.com/grafana/grafana/pull/64063), [@connorlindsey](https://github.com/connorlindsey)
|
||||
- **Explore:** Add transformations to correlation data links. [#61799](https://github.com/grafana/grafana/pull/61799), [@gelicia](https://github.com/gelicia)
|
||||
- **Explore:** Support mixed data sources for supplementary query. [#63036](https://github.com/grafana/grafana/pull/63036), [@ifrost](https://github.com/ifrost)
|
||||
- **Extensions:** Expose an enum for available placements. [#64586](https://github.com/grafana/grafana/pull/64586), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Feat:** Changing link destination for get more plugins. [#63517](https://github.com/grafana/grafana/pull/63517), [@tolzhabayev](https://github.com/tolzhabayev)
|
||||
- **Feat:** Linking to plugin details page rather than externally for new datasources. [#63499](https://github.com/grafana/grafana/pull/63499), [@tolzhabayev](https://github.com/tolzhabayev)
|
||||
- **FieldMatchers:** Add match by value (reducer). [#64477](https://github.com/grafana/grafana/pull/64477), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Flame graph:** Add context menu. [#62705](https://github.com/grafana/grafana/pull/62705), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Flame graph:** Add metadata above flame graph. [#61921](https://github.com/grafana/grafana/pull/61921), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Geomap:** Improve tooltip url for photos layer. [#63487](https://github.com/grafana/grafana/pull/63487), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Geomap:** Release night / day layer. [#63435](https://github.com/grafana/grafana/pull/63435), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **InfluxDB:** Move database information into jsondata. [#62308](https://github.com/grafana/grafana/pull/62308), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Jaeger and Zipkin:** Config & docs upgrade. [#64250](https://github.com/grafana/grafana/pull/64250), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **LDAP:** Allow setting minimum TLS version and accepted ciphers. [#63646](https://github.com/grafana/grafana/pull/63646), [@Jguer](https://github.com/Jguer)
|
||||
- **Licensing:** Allow server admin user to log in even if the active user limit is reached. (Enterprise)
|
||||
- **Live:** Remove (alpha) ability to configure live pipelines. [#65138](https://github.com/grafana/grafana/pull/65138), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Logger:** Add feature toggle for errors in HTTP request logs. [#64425](https://github.com/grafana/grafana/pull/64425), [@sakjur](https://github.com/sakjur)
|
||||
- **Login:** Allow custom name and icon for social providers. [#63297](https://github.com/grafana/grafana/pull/63297), [@jkroepke](https://github.com/jkroepke)
|
||||
- **Logs Panel:** Refactor style generation to improve rendering performance. [#62599](https://github.com/grafana/grafana/pull/62599), [@matyax](https://github.com/matyax)
|
||||
- **Logs:** Add millisecond to timestamp in log line. [#64372](https://github.com/grafana/grafana/pull/64372), [@svennergr](https://github.com/svennergr)
|
||||
- **Logs:** Rename dedup to deduplicate. [#62944](https://github.com/grafana/grafana/pull/62944), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki Query Editor:** Make Monaco the default editor. [#62247](https://github.com/grafana/grafana/pull/62247), [@matyax](https://github.com/matyax)
|
||||
- **Loki:** Add `unpack` query builder hint. [#65608](https://github.com/grafana/grafana/pull/65608), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Add descriptions to query builder operations. [#64046](https://github.com/grafana/grafana/pull/64046), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Add placeholder to the loki query editor. [#62773](https://github.com/grafana/grafana/pull/62773), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Always fetch for new label keys in the QueryBuilder. [#64597](https://github.com/grafana/grafana/pull/64597), [@svennergr](https://github.com/svennergr)
|
||||
- **Loki:** Display error with label filter conflicts. [#63109](https://github.com/grafana/grafana/pull/63109), [@gwdawson](https://github.com/gwdawson)
|
||||
- **Loki:** Improve the display of loki query stats. [#63623](https://github.com/grafana/grafana/pull/63623), [@gwdawson](https://github.com/gwdawson)
|
||||
- **MSSQL/Postgres:** List views in table dropdown as well. [#62867](https://github.com/grafana/grafana/pull/62867), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **MSSQL:** Update forked go-mssqldb dependency. [#65658](https://github.com/grafana/grafana/pull/65658), [@stephaniehingtgen](https://github.com/stephaniehingtgen)
|
||||
- **Metrics:** Update comment to mention folders instead of dashboards. [#63312](https://github.com/grafana/grafana/pull/63312), [@monteiro-renato](https://github.com/monteiro-renato)
|
||||
- **Navigation:** Enable new navigation by default. [#65335](https://github.com/grafana/grafana/pull/65335), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **NodeGraph:** Support icons for nodes. [#60989](https://github.com/grafana/grafana/pull/60989), [@aocenas](https://github.com/aocenas)
|
||||
- **Notifications:** Enable display of trace ID by default. [#64884](https://github.com/grafana/grafana/pull/64884), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Packaging:** Start Grafana service after InfluxDB. [#64090](https://github.com/grafana/grafana/pull/64090), [@MichaIng](https://github.com/MichaIng)
|
||||
- **Panel Header:** Add CancelQuery option to panel header. [#64796](https://github.com/grafana/grafana/pull/64796), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Panel:** Show multiple errors info in the inspector. [#64340](https://github.com/grafana/grafana/pull/64340), [@andresmgot](https://github.com/andresmgot)
|
||||
- **PanelChrome:** Add option to show actions on the right side (actions = leftItems). [#65762](https://github.com/grafana/grafana/pull/65762), [@torkelo](https://github.com/torkelo)
|
||||
- **Phlare:** Allow variables in labelSelector (in query). [#64324](https://github.com/grafana/grafana/pull/64324), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Plugin:** Skip preloading disabled app plugins. [#63083](https://github.com/grafana/grafana/pull/63083), [@mckn](https://github.com/mckn)
|
||||
- **Plugins:** Add optional logger for plugin requests sent to backend plugins. [#62981](https://github.com/grafana/grafana/pull/62981), [@bergquist](https://github.com/bergquist)
|
||||
- **Plugins:** Extend panel menu with commands from plugins. [#63802](https://github.com/grafana/grafana/pull/63802), [@mckn](https://github.com/mckn)
|
||||
- **Plugins:** Extend panel menu with links from plugins. [#63089](https://github.com/grafana/grafana/pull/63089), [@jackw](https://github.com/jackw)
|
||||
- **Plugins:** Improve instrumentation by adding metrics and tracing. [#61035](https://github.com/grafana/grafana/pull/61035), [@xnyo](https://github.com/xnyo)
|
||||
- **Plugins:** Support for distributed tracing in backend plugins SDK. [#63714](https://github.com/grafana/grafana/pull/63714), [@xnyo](https://github.com/xnyo)
|
||||
- **Plugins:** Support for link extensions. [#61663](https://github.com/grafana/grafana/pull/61663), [@mckn](https://github.com/mckn)
|
||||
- **Profiling:** Enable flame graph & Phlare/Parca data sources for all users. [#63488](https://github.com/grafana/grafana/pull/63488), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Prometheus Datasource:** Improve Prom query variable editor. [#58292](https://github.com/grafana/grafana/pull/58292), [@bohandley](https://github.com/bohandley)
|
||||
- **Prometheus Metrics:** Add missing stat_total_teams metric. [#65133](https://github.com/grafana/grafana/pull/65133), [@gamab](https://github.com/gamab)
|
||||
- **Prometheus/Loki:** Run query explicitly instead of onblur in panel edit. [#64815](https://github.com/grafana/grafana/pull/64815), [@torkelo](https://github.com/torkelo)
|
||||
- **Prometheus:** Browser resource caching. [#60711](https://github.com/grafana/grafana/pull/60711), [@gtk-grafana](https://github.com/gtk-grafana)
|
||||
- **Prometheus:** Improve prometheus query variable editor. [#63529](https://github.com/grafana/grafana/pull/63529), [@bohandley](https://github.com/bohandley)
|
||||
- **Prometheus:** Use $\_\_rate_interval for rate queries generated by metric browser. [#65386](https://github.com/grafana/grafana/pull/65386), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Pubdash:** Email sharing handle dashboard deleted. [#64247](https://github.com/grafana/grafana/pull/64247), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **Pubdash:** Email sharing handle dashboard deleted. (Enterprise)
|
||||
- **PublicDashboards:** Backfills share column with default value. [#63407](https://github.com/grafana/grafana/pull/63407), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **PublicDashboards:** Configuration modal redesign. [#63211](https://github.com/grafana/grafana/pull/63211), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Email sharing. [#63762](https://github.com/grafana/grafana/pull/63762), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Email sharing. (Enterprise)
|
||||
- **PublicDashboards:** Enable creation when dashboard has template variables. [#64560](https://github.com/grafana/grafana/pull/64560), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Paused or deleted public dashboard screen. [#63970](https://github.com/grafana/grafana/pull/63970), [@juanicabanas](https://github.com/juanicabanas)
|
||||
- **PublicDashboards:** Viewer can request and claim magic link. (Enterprise)
|
||||
- **QueryHistory:** Improve handling of mixed datasource entries. [#62214](https://github.com/grafana/grafana/pull/62214), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Rendering:** Experimental support to use JWTs as auth method. [#60841](https://github.com/grafana/grafana/pull/60841), [@joanlopez](https://github.com/joanlopez)
|
||||
- **Reports:** Improve the UI for the new navigation. (Enterprise)
|
||||
- **SQL Datasources:** Add back help content. [#65383](https://github.com/grafana/grafana/pull/65383), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Schema:** Remove exclusion for timeseries and update imports. [#65242](https://github.com/grafana/grafana/pull/65242), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Search:** Improvements for starred dashboard search. [#64758](https://github.com/grafana/grafana/pull/64758), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Select:** Show icon in the grafana/ui Select component. [#63827](https://github.com/grafana/grafana/pull/63827), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Service accounts:** Creation logic simplification. [#63884](https://github.com/grafana/grafana/pull/63884), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Service accounts:** Remove Add API keys buttons and remove one state of migrating for API keys tab. [#63411](https://github.com/grafana/grafana/pull/63411), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **SplitOpen:** Update API to accept multiple queries. [#62245](https://github.com/grafana/grafana/pull/62245), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Stat Panel:** Add an option for a non-gradient/solid background. [#65052](https://github.com/grafana/grafana/pull/65052), [@baldm0mma](https://github.com/baldm0mma)
|
||||
- **Stat:** Add ability to remove default single-color background gradient. [#64353](https://github.com/grafana/grafana/pull/64353), [@baldm0mma](https://github.com/baldm0mma)
|
||||
- **SupportBundles:** Add OAuth bundle collectors. [#64810](https://github.com/grafana/grafana/pull/64810), [@Jguer](https://github.com/Jguer)
|
||||
- **Table Panel:** Add ability to use text color for value or hide value in gauge cell. [#61477](https://github.com/grafana/grafana/pull/61477), [@torkelo](https://github.com/torkelo)
|
||||
- **Table:** Introduce sparkline cell type. [#63182](https://github.com/grafana/grafana/pull/63182), [@domasx2](https://github.com/domasx2)
|
||||
- **Tempo:** Config and doc updates. [#64017](https://github.com/grafana/grafana/pull/64017), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Tempo:** Update service graph view and docs. [#64875](https://github.com/grafana/grafana/pull/64875), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **TraceView:** Add key and url escaping of json tag values. [#64331](https://github.com/grafana/grafana/pull/64331), [@aocenas](https://github.com/aocenas)
|
||||
- **TraceView:** Reworked header. [#63105](https://github.com/grafana/grafana/pull/63105), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Tracing:** Add more detail to HTTP Outgoing Request. [#64757](https://github.com/grafana/grafana/pull/64757), [@bboreham](https://github.com/bboreham)
|
||||
- **Tracing:** Docs and config improvements for Tempo/Jaeger/Zipkin. [#65255](https://github.com/grafana/grafana/pull/65255), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Tracing:** Support multiple OTel propagators. [#61199](https://github.com/grafana/grafana/pull/61199), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Transformations:** Support time format when converting time to strings. [#63826](https://github.com/grafana/grafana/pull/63826), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Transformers:** Support adding the row index using calculate field transformer. [#65148](https://github.com/grafana/grafana/pull/65148), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Units:** Format currency with negative before the symbol. [#65152](https://github.com/grafana/grafana/pull/65152), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **API:** Fix "Updated by" Column in dashboard versions table. [#65351](https://github.com/grafana/grafana/pull/65351), [@papagian](https://github.com/papagian)
|
||||
- **AccessControl:** Allow editors to access GET /api/datasources. [#66343](https://github.com/grafana/grafana/pull/66343), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Alerting:** Add "backend" label to state history writes metrics. [#65395](https://github.com/grafana/grafana/pull/65395), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Add alert instance labels to Loki log lines in addition to stream labels. [#65403](https://github.com/grafana/grafana/pull/65403), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Elide requests to Loki if nothing should be recorded. [#65011](https://github.com/grafana/grafana/pull/65011), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Fix DatasourceUID and RefID missing for DatasourceNoData alerts. [#66733](https://github.com/grafana/grafana/pull/66733), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Fix ambiguous handling of equals in labels when bucketing Loki state history streams. [#65013](https://github.com/grafana/grafana/pull/65013), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Fix attachment of external labels to Loki state history log streams. [#65140](https://github.com/grafana/grafana/pull/65140), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Fix creating a recording rule when having multiple datasources. [#66415](https://github.com/grafana/grafana/pull/66415), [@VikaCep](https://github.com/VikaCep)
|
||||
- **Alerting:** Fix explore link in alert detail view. [#66106](https://github.com/grafana/grafana/pull/66106), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Fix share URL for Prometheus rules on subpath. [#66752](https://github.com/grafana/grafana/pull/66752), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Fix stats that display alert count when using unified alerting. [#64852](https://github.com/grafana/grafana/pull/64852), [@gotjosh](https://github.com/gotjosh)
|
||||
- **Alerting:** Hide mute timing actions when dealing with vanilla prometheus. [#66457](https://github.com/grafana/grafana/pull/66457), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Paginate result previews. [#65257](https://github.com/grafana/grafana/pull/65257), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Prometheus-compatible Alertmanager timings editor. [#64526](https://github.com/grafana/grafana/pull/64526), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Update scheduler to get updates only from database. [#64635](https://github.com/grafana/grafana/pull/64635), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Use a completely isolated context for state history writes. [#64989](https://github.com/grafana/grafana/pull/64989), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Use displayNameFromDS if available in preview. [#65342](https://github.com/grafana/grafana/pull/65342), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Annotation List:** Fix panel not updating when variable is changed. [#65899](https://github.com/grafana/grafana/pull/65899), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **Annotations:** Ignore unique constraint violations for tags. [#65935](https://github.com/grafana/grafana/pull/65935), [@sakjur](https://github.com/sakjur)
|
||||
- **Auth:** Fix orgrole picker disabled if isSynced user. [#64033](https://github.com/grafana/grafana/pull/64033), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
- **AzureMonitor:** Fix Log Analytics portal links. [#65482](https://github.com/grafana/grafana/pull/65482), [@aangelisc](https://github.com/aangelisc)
|
||||
- **BrowseDashboards:** Fix move to General folder not working. [#65653](https://github.com/grafana/grafana/pull/65653), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Catalog:** Show install error with incompatible version. [#65059](https://github.com/grafana/grafana/pull/65059), [@andresmgot](https://github.com/andresmgot)
|
||||
- **Chore:** Update Grafana to use Alertmanager v0.25.1-0.20230308154952-78fedf89728b. [#64778](https://github.com/grafana/grafana/pull/64778), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **CloudMonitoring:** Add project selector for MQL editor[fix]. [#65567](https://github.com/grafana/grafana/pull/65567), [@alyssabull](https://github.com/alyssabull)
|
||||
- **CloudWatch Logs:** Fix running logs queries with expressions. [#65306](https://github.com/grafana/grafana/pull/65306), [@iwysiu](https://github.com/iwysiu)
|
||||
- **CloudWatch Logs:** Fix to make log queries use a relative time if available. [#65236](https://github.com/grafana/grafana/pull/65236), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
- **CloudWatch Logs:** Revert "Queries in an expression should run synchronously (#64443)". [#65036](https://github.com/grafana/grafana/pull/65036), [@fridgepoet](https://github.com/fridgepoet)
|
||||
- **CloudWatch:** Fix cachedQueries insights not being updated for metric queries. [#65495](https://github.com/grafana/grafana/pull/65495), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
- **Cloudwatch:** Pass refId from query for expression queries. [#66147](https://github.com/grafana/grafana/pull/66147), [@idastambuk](https://github.com/idastambuk)
|
||||
- **Dashboards:** Evaluate provisioned dashboard titles in a backwards compatible way. [#65184](https://github.com/grafana/grafana/pull/65184), [@sakjur](https://github.com/sakjur)
|
||||
- **Dashboards:** Fix Mobile support dashboard issues on new iOS 16.3. [#65542](https://github.com/grafana/grafana/pull/65542), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Dashboards:** Fix broken internal data links. [#66567](https://github.com/grafana/grafana/pull/66567), [@ifrost](https://github.com/ifrost)
|
||||
- **Database:** Don't sleep 10ms before every request. [#64832](https://github.com/grafana/grafana/pull/64832), [@bboreham](https://github.com/bboreham)
|
||||
- **Elasticsearch:** Fix processing of response with multiple group by for alerting. [#65165](https://github.com/grafana/grafana/pull/65165), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Elasticsearch:** Handle multiple annotation structures. [#66762](https://github.com/grafana/grafana/pull/66762), [@gabor](https://github.com/gabor)
|
||||
- **Email:** Mark HTML comments as "safe" in email templates. [#64546](https://github.com/grafana/grafana/pull/64546), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Emails:** Preserve HTML comments. (Enterprise)
|
||||
- **ErrorHandling:** Fixes issues with bad error messages. [#63775](https://github.com/grafana/grafana/pull/63775), [@torkelo](https://github.com/torkelo)
|
||||
- **ErrorView:** Better detection of no-data responses. [#65477](https://github.com/grafana/grafana/pull/65477), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Explore:** Make `DataSourcePicker` visible on small screens. [#65149](https://github.com/grafana/grafana/pull/65149), [@abdulhdr1](https://github.com/abdulhdr1)
|
||||
- **Fix:** DataLinks from data sources override user defined data link. [#65996](https://github.com/grafana/grafana/pull/65996), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Fix:** Top table rendering and update docs. [#64497](https://github.com/grafana/grafana/pull/64497), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Frontend:** Fix broken links in /plugins when pathname has a trailing slash. [#64348](https://github.com/grafana/grafana/pull/64348), [@gassiss](https://github.com/gassiss)
|
||||
- **Geomap:** Fix route layer zoom behavior. [#63409](https://github.com/grafana/grafana/pull/63409), [@drew08t](https://github.com/drew08t)
|
||||
- **Google Cloud Monitoring:** Fix project variable. [#66524](https://github.com/grafana/grafana/pull/66524), [@asimpson](https://github.com/asimpson)
|
||||
- **HeatMap:** Sort y buckets when all bucket names are numeric. [#65322](https://github.com/grafana/grafana/pull/65322), [@leeoniya](https://github.com/leeoniya)
|
||||
- **InfluxDB:** Fix querying with hardcoded retention policy. [#66466](https://github.com/grafana/grafana/pull/66466), [@itsmylife](https://github.com/itsmylife)
|
||||
- **InfluxDB:** Fix sending retention policy with InfluxQL queries. [#63820](https://github.com/grafana/grafana/pull/63820), [@itsmylife](https://github.com/itsmylife)
|
||||
- **KVStore:** Include database field in migration. [#62790](https://github.com/grafana/grafana/pull/62790), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **LDAP:** Always synchronize Server Admin role through role sync if role sync is enabled. [#58820](https://github.com/grafana/grafana/pull/58820), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Library panels:** Ensure pagination controls are always correctly displayed. [#65283](https://github.com/grafana/grafana/pull/65283), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Loki:** Fix autocomplete situations with multiple escaped quotes. [#65520](https://github.com/grafana/grafana/pull/65520), [@svennergr](https://github.com/svennergr)
|
||||
- **MegaMenu:** Fixes mega menu showing scroll indicator when it shouldn't. [#65452](https://github.com/grafana/grafana/pull/65452), [@torkelo](https://github.com/torkelo)
|
||||
- **Navigation:** Redirect to root page when switching organization. [#66655](https://github.com/grafana/grafana/pull/66655), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Navigation:** Scrolled hamburger menu links now navigate correctly in Safari. [#66261](https://github.com/grafana/grafana/pull/66261), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **NestedFolders:** Fix nested folder deletion. [#63572](https://github.com/grafana/grafana/pull/63572), [@ying-jeanne](https://github.com/ying-jeanne)
|
||||
- **New Panel Header:** Fix when clicking submenu item the parent menu item onClick get's triggered. [#65691](https://github.com/grafana/grafana/pull/65691), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Phlare:** Fix error when there are no profileTypes to send from backend. [#65455](https://github.com/grafana/grafana/pull/65455), [@aocenas](https://github.com/aocenas)
|
||||
- **PieChart:** Show long labels properly. [#65699](https://github.com/grafana/grafana/pull/65699), [@mdvictor](https://github.com/mdvictor)
|
||||
- **PluginExtensions:** Fixed issue with incorrect type being exposed when configuring an extension. [#65910](https://github.com/grafana/grafana/pull/65910), [@mckn](https://github.com/mckn)
|
||||
- **Plugins:** Ensure proxy route bodies are valid JSON. [#61771](https://github.com/grafana/grafana/pull/61771), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Plugins:** Fix width for README pages with tables. [#66872](https://github.com/grafana/grafana/pull/66872), [@andresmgot](https://github.com/andresmgot)
|
||||
- **Plugins:** Markdown fetch retry with lowercase. [#65384](https://github.com/grafana/grafana/pull/65384), [@wbrowne](https://github.com/wbrowne)
|
||||
- **Plugins:** Skip instrumenting plugin build info for core and bundled plugins. [#66105](https://github.com/grafana/grafana/pull/66105), [@wbrowne](https://github.com/wbrowne)
|
||||
- **PublicDashboards:** Query collapsed panels inside rows. [#64779](https://github.com/grafana/grafana/pull/64779), [@evictorero](https://github.com/evictorero)
|
||||
- **Query Splitting:** Fix for handling queries with no requestId. [#66161](https://github.com/grafana/grafana/pull/66161), [@domasx2](https://github.com/domasx2)
|
||||
- **SQL Datasources:** Fix variable throwing error if query returns no data. [#65937](https://github.com/grafana/grafana/pull/65937), [@mdvictor](https://github.com/mdvictor)
|
||||
- **SQL Datasources:** Prevent Call Stack Overflows with Large Numbers of Values for Variable. [#64937](https://github.com/grafana/grafana/pull/64937), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **SQLStore:** Fix SQLite error propagation if query retries are disabled. [#64904](https://github.com/grafana/grafana/pull/64904), [@papagian](https://github.com/papagian)
|
||||
- **Stat Panel:** Fix issue with clipping text values. [#64300](https://github.com/grafana/grafana/pull/64300), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **Table Panel:** Fix panel migration for options cell type. [#66305](https://github.com/grafana/grafana/pull/66305), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Table:** Fix migrations from old angular table for cell color modes. [#65760](https://github.com/grafana/grafana/pull/65760), [@torkelo](https://github.com/torkelo)
|
||||
- **Table:** Fixes issue with pagination summary causing scrollbar. [#65189](https://github.com/grafana/grafana/pull/65189), [@torkelo](https://github.com/torkelo)
|
||||
- **Table:** Fixes table panel gauge alignment. [#64994](https://github.com/grafana/grafana/pull/64994), [@torkelo](https://github.com/torkelo)
|
||||
- **TablePanel:** Fix table cells overflowing when there are multiple data links. [#65711](https://github.com/grafana/grafana/pull/65711), [@oscarkilhed](https://github.com/oscarkilhed)
|
||||
- **TablePanel:** fix footer bug; no footer calculated values after "hidden" column override. [#64269](https://github.com/grafana/grafana/pull/64269), [@baldm0mma](https://github.com/baldm0mma)
|
||||
- **Team sync:** Fix apply query string instead of param. (Enterprise)
|
||||
- **Templating:** Allow percent encoding of variable with custom all. [#65266](https://github.com/grafana/grafana/pull/65266), [@dprokop](https://github.com/dprokop)
|
||||
- **Tempo:** Set default limit if none is provided for traceql queries. [#65039](https://github.com/grafana/grafana/pull/65039), [@domasx2](https://github.com/domasx2)
|
||||
- **TimeSeries:** Don't extend stepped interpolation to graph edges. [#65657](https://github.com/grafana/grafana/pull/65657), [@leeoniya](https://github.com/leeoniya)
|
||||
- **TimeSeries:** Improve stacking direction heuristic. [#65499](https://github.com/grafana/grafana/pull/65499), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Trace View:** Update the queryType to traceql for checking if same trace when clicking span link. [#66645](https://github.com/grafana/grafana/pull/66645), [@ericmustin](https://github.com/ericmustin)
|
||||
- **TraceView:** Don't require preferredVisualisationType to render. [#64920](https://github.com/grafana/grafana/pull/64920), [@aocenas](https://github.com/aocenas)
|
||||
- **Utils:** Reimplement util.GetRandomString to avoid modulo bias. [#64481](https://github.com/grafana/grafana/pull/64481), [@DanCech](https://github.com/DanCech)
|
||||
- **XYChart:** Add all dataset columns in tooltip. [#65027](https://github.com/grafana/grafana/pull/65027), [@mdvictor](https://github.com/mdvictor)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
`default` named retention policies won't be used to query. Users who have a `default` named retention policy in their `influxdb` database, have to rename it to something else. Having `default` named retention policy is not breaking anything. We will make sure to use the actual default retention policy under the hood. To change the hardcoded retention policy in the `dashboard.json`, users must they select the right retention policy from dropdown and save the panel/dashboard. Issue [#66466](https://github.com/grafana/grafana/issues/66466)
|
||||
|
||||
Grafana Alerting rules with `NoDataState` configuration set to `Alerting` will now respect "For" duration. Issue [#65574](https://github.com/grafana/grafana/issues/65574)
|
||||
|
||||
Users who use LDAP role sync to only sync Viewer, Editor and Admin roles, but grant Grafana Server Admin role manually will not be able to do that anymore. After this change, LDAP role sync will override any manual changes to Grafana Server Admin role assignments. If `grafana_admin` is left unset in [LDAP role mapping configuration](https://grafana.com/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/ldap/#group-mappings), it will default to false. Issue [#58820](https://github.com/grafana/grafana/issues/58820)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **DateTimePicker:** Can now select time correctly. [#65428](https://github.com/grafana/grafana/pull/65428), [@eledobleefe](https://github.com/eledobleefe)
|
||||
- **Grafana UI:** Fix tooltip prop of button component. [#64765](https://github.com/grafana/grafana/pull/64765), [@suleymanbariseser](https://github.com/suleymanbariseser)
|
||||
- **DateTimePicker:** Add min date support to calendar. [#64632](https://github.com/grafana/grafana/pull/64632), [@nevermind89x](https://github.com/nevermind89x)
|
||||
- **GrafanaUI:** Implement new component Toggletip. [#64459](https://github.com/grafana/grafana/pull/64459), [@yduartep](https://github.com/yduartep)
|
||||
- **ContextMenu:** Fix padding and show border based on items. [#63948](https://github.com/grafana/grafana/pull/63948), [@aocenas](https://github.com/aocenas)
|
||||
|
||||
<!-- 9.5.0 END -->
|
||||
<!-- 9.4.9 START -->
|
||||
|
||||
# 9.4.9 (2023-04-24)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Upgrade Go to 1.20.3. [#66264](https://github.com/grafana/grafana/pull/66264), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
<!-- 9.4.9 END -->
|
||||
<!-- 9.4.7 START -->
|
||||
|
||||
# 9.4.7 (2023-03-16)
|
||||
|
||||
16
Dockerfile
16
Dockerfile
@@ -1,9 +1,9 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG BASE_IMAGE=alpine:3.17
|
||||
ARG JS_IMAGE=node:18-alpine3.17
|
||||
ARG BASE_IMAGE=alpine:3.18.3
|
||||
ARG JS_IMAGE=node:18-alpine3.18
|
||||
ARG JS_PLATFORM=linux/amd64
|
||||
ARG GO_IMAGE=golang:1.20.1-alpine3.17
|
||||
ARG GO_IMAGE=golang:1.20.8-alpine3.18
|
||||
|
||||
ARG GO_SRC=go-builder
|
||||
ARG JS_SRC=js-builder
|
||||
@@ -31,6 +31,8 @@ RUN yarn build
|
||||
|
||||
FROM ${GO_IMAGE} as go-builder
|
||||
|
||||
ARG COMMIT_SHA=""
|
||||
ARG BUILD_BRANCH=""
|
||||
ARG GO_BUILD_TAGS="oss"
|
||||
ARG WIRE_TAGS="oss"
|
||||
ARG BINGO="true"
|
||||
@@ -62,7 +64,10 @@ COPY pkg pkg
|
||||
COPY scripts scripts
|
||||
COPY conf conf
|
||||
COPY .github .github
|
||||
COPY .git .git
|
||||
COPY LICENSE ./
|
||||
|
||||
ENV COMMIT_SHA=${COMMIT_SHA}
|
||||
ENV BUILD_BRANCH=${BUILD_BRANCH}
|
||||
|
||||
RUN make build-go GO_BUILD_TAGS=${GO_BUILD_TAGS} WIRE_TAGS=${WIRE_TAGS}
|
||||
|
||||
@@ -106,7 +111,7 @@ RUN if grep -i -q alpine /etc/issue; then \
|
||||
elif grep -i -q ubuntu /etc/issue; then \
|
||||
DEBIAN_FRONTEND=noninteractive && \
|
||||
apt-get update && \
|
||||
apt-get install -y ca-certificates curl tzdata && \
|
||||
apt-get install -y ca-certificates curl tzdata musl && \
|
||||
apt-get autoremove -y && \
|
||||
rm -rf /var/lib/apt/lists/*; \
|
||||
else \
|
||||
@@ -161,6 +166,7 @@ RUN if [ ! $(getent group "$GF_GID") ]; then \
|
||||
|
||||
COPY --from=go-src /tmp/grafana/bin/grafana* /tmp/grafana/bin/*/grafana* ./bin/
|
||||
COPY --from=js-src /tmp/grafana/public ./public
|
||||
COPY --from=go-src /tmp/grafana/LICENSE ./
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
|
||||
6
Makefile
6
Makefile
@@ -176,6 +176,8 @@ build-docker-full: ## Build Docker image for development.
|
||||
--build-arg BINGO=false \
|
||||
--build-arg GO_BUILD_TAGS=$(GO_BUILD_TAGS) \
|
||||
--build-arg WIRE_TAGS=$(WIRE_TAGS) \
|
||||
--build-arg COMMIT_SHA=$$(git rev-parse --short HEAD) \
|
||||
--build-arg BUILD_BRANCH=$$(git rev-parse --abbrev-ref HEAD) \
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
|
||||
@@ -187,8 +189,10 @@ build-docker-full-ubuntu: ## Build Docker image based on Ubuntu for development.
|
||||
--build-arg BINGO=false \
|
||||
--build-arg GO_BUILD_TAGS=$(GO_BUILD_TAGS) \
|
||||
--build-arg WIRE_TAGS=$(WIRE_TAGS) \
|
||||
--build-arg COMMIT_SHA=$$(git rev-parse --short HEAD) \
|
||||
--build-arg BUILD_BRANCH=$$(git rev-parse --abbrev-ref HEAD) \
|
||||
--build-arg BASE_IMAGE=ubuntu:20.04 \
|
||||
--build-arg GO_IMAGE=golang:1.20.1 \
|
||||
--build-arg GO_IMAGE=golang:1.20.8 \
|
||||
--tag grafana/grafana$(TAG_SUFFIX):dev-ubuntu \
|
||||
$(DOCKER_BUILD_ARGS)
|
||||
|
||||
|
||||
@@ -90,6 +90,14 @@ read_timeout = 0
|
||||
#exampleHeader1 = exampleValue1
|
||||
#exampleHeader2 = exampleValue2
|
||||
|
||||
#################################### GRPC Server #########################
|
||||
[grpc_server]
|
||||
network = "tcp"
|
||||
address = "127.0.0.1:10000"
|
||||
use_tls = false
|
||||
cert_file =
|
||||
key_file =
|
||||
|
||||
#################################### Database ############################
|
||||
[database]
|
||||
# You can configure the database connection by specifying type, host, name, user and password
|
||||
@@ -405,6 +413,21 @@ default_home_dashboard_path =
|
||||
# Upper limit of data sources that Grafana will return. This limit is a temporary configuration and it will be deprecated when pagination will be introduced on the list data sources API.
|
||||
datasource_limit = 5000
|
||||
|
||||
|
||||
################################### SQL Data Sources #####################
|
||||
[sql_datasources]
|
||||
# Default maximum number of open connections maintained in the connection pool
|
||||
# when connecting to SQL based data sources
|
||||
max_open_conns_default = 100
|
||||
|
||||
# Default maximum number of idle connections maintained in the connection pool
|
||||
# when connecting to SQL based data sources
|
||||
max_idle_conns_default = 100
|
||||
|
||||
# Default maximum connection lifetime used when connecting
|
||||
# to SQL based data sources.
|
||||
max_conn_lifetime_default = 14400
|
||||
|
||||
#################################### Users ###############################
|
||||
[users]
|
||||
# disable user signup / registration
|
||||
@@ -508,6 +531,9 @@ sigv4_verbose_logging = false
|
||||
# Set to true to enable Azure authentication option for HTTP-based datasources
|
||||
azure_auth_enabled = false
|
||||
|
||||
# Use email lookup in addition to the unique ID provided by the IdP
|
||||
oauth_allow_insecure_email_lookup = false
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
@@ -541,6 +567,7 @@ allowed_organizations =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
skip_org_role_sync = false
|
||||
tls_skip_verify_insecure = false
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
@@ -978,6 +1005,11 @@ max_attempts = 3
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
min_interval = 10s
|
||||
|
||||
# This is an experimental option to add parallelization to saving alert states in the database.
|
||||
# It configures the maximum number of concurrent queries per rule evaluated. The default value is 1
|
||||
# (concurrent queries per rule disabled).
|
||||
max_state_save_concurrency = 1
|
||||
|
||||
[unified_alerting.screenshots]
|
||||
# Enable screenshots in notifications. You must have either installed the Grafana image rendering
|
||||
# plugin, or set up Grafana to use a remote rendering service.
|
||||
|
||||
@@ -91,6 +91,14 @@
|
||||
#exampleHeader1 = exampleValue1
|
||||
#exampleHeader2 = exampleValue2
|
||||
|
||||
#################################### GRPC Server #########################
|
||||
;[grpc_server]
|
||||
;network = "tcp"
|
||||
;address = "127.0.0.1:10000"
|
||||
;use_tls = false
|
||||
;cert_file =
|
||||
;key_file =
|
||||
|
||||
#################################### Database ####################################
|
||||
[database]
|
||||
# You can configure the database connection by specifying type, host, name, user and password
|
||||
@@ -512,6 +520,9 @@
|
||||
# Set to skip the organization role from JWT login and use system's role assignment instead.
|
||||
; skip_org_role_sync = false
|
||||
|
||||
# Use email lookup in addition to the unique ID provided by the IdP
|
||||
;oauth_allow_insecure_email_lookup = false
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
@@ -545,6 +556,7 @@
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;allow_assign_grafana_admin = false
|
||||
;skip_org_role_sync = false
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
[auth.gitlab]
|
||||
|
||||
@@ -13,7 +13,6 @@ The following checklist/summary should give you a quick overview of what to ask/
|
||||
- Reviewed and approved?
|
||||
- All checks passed?
|
||||
- Proper pull request title?
|
||||
- Milestone assigned?
|
||||
- Add to changelog/release notes?
|
||||
- Needs backporting?
|
||||
|
||||
@@ -40,10 +39,18 @@ See [formatting guidelines](create-pull-request.md#formatting-guidelines) for mo
|
||||
|
||||
### Assign a milestone
|
||||
|
||||
A milestone **should** be added to every pull request. Several things in the Grafana release process requires at least pull requests to be in a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
|
||||
Several things in the Grafana release process requires at least pull requests to be in a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
|
||||
|
||||
This makes it easier to track what changes go into a certain release. Without this information, release managers have to go through git commits which is not an efficient process.
|
||||
|
||||
That being said, _you don't have to assign a milestone manually_ to a pull request.
|
||||
Instead, when it is merged & closed then a bot will look for the most appropriate miletone and assign it to the pull request.
|
||||
|
||||
That milestone should always reflect the branch that the pull request is merged into.
|
||||
For every major and minor release there is a milestone ending with `.x` (e.g. `10.0.x` for the 10.0.x releases).
|
||||
Pull requests targetting `main` should use the `.x` milestone of the next minor (or major) version (you can find that version number inside the `package.json` file).
|
||||
Backport pull requestss should use the version of the target branch (e.g. `9.4.x` for the `v9.4.x` branch).
|
||||
|
||||
### Include in changelog and release notes?
|
||||
|
||||
At Grafana we generate the [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) and [release notes](https://grafana.com/docs/grafana/latest/release-notes/) based on merged pull requests. Including changes in the changelog/release notes is very important to provide a somewhat complete picture of what changes a Grafana release actually includes.
|
||||
@@ -78,15 +85,15 @@ The changelog/release notes are divided into sections and here's a description o
|
||||
|
||||
**Features and enhancements:**
|
||||
|
||||
Milestone assigned and labeled with `add to changelog` and any of the other section rules don't apply.
|
||||
Labeled with `add to changelog` and any of the other section rules don't apply.
|
||||
|
||||
**Bug fixes:**
|
||||
|
||||
Milestone assigned and labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
|
||||
Labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
|
||||
|
||||
**Plugin development fixes & changes:**
|
||||
|
||||
Milestone assigned and labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
|
||||
Labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
|
||||
|
||||
**Deprecations:**
|
||||
|
||||
|
||||
@@ -1,33 +1,8 @@
|
||||
.PHONY: pull docs docs-quick docs-no-pull docs-test docs-local-static
|
||||
.ONESHELL:
|
||||
.DELETE_ON_ERROR:
|
||||
export SHELL := bash
|
||||
export SHELLOPTS := pipefail:errexit
|
||||
MAKEFLAGS += --warn-undefined-variables
|
||||
MAKEFLAGS += --no-builtin-rule
|
||||
|
||||
PODMAN = $(shell if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi)
|
||||
IMAGE = grafana/docs-base:latest
|
||||
CONTENT_PATH = /hugo/content/docs/grafana/latest
|
||||
LOCAL_STATIC_PATH = ../../website/static
|
||||
PORT = 3002:3002
|
||||
|
||||
pull:
|
||||
$(PODMAN) pull $(IMAGE)
|
||||
|
||||
docs: pull
|
||||
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) make server
|
||||
|
||||
docs-preview: pull
|
||||
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) make server BUILD_DRAFTS=true
|
||||
|
||||
docs-no-pull:
|
||||
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z -p $(PORT) --rm -it $(IMAGE) make server
|
||||
|
||||
docs-test: pull
|
||||
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z --rm -it $(IMAGE) make prod
|
||||
|
||||
# expects that you have grafana/website checked out in same path as the grafana repo.
|
||||
docs-local-static: pull
|
||||
if [ ! -d "$(LOCAL_STATIC_PATH)" ]; then echo "local path (website project) $(LOCAL_STATIC_PATH) not found"]; exit 1; fi
|
||||
$(PODMAN) run --init -v $(shell pwd)/sources:$(CONTENT_PATH):Z \
|
||||
-v $(shell pwd)/$(LOCAL_STATIC_PATH):/hugo/static:Z -p $(PORT) --rm -it $(IMAGE)
|
||||
|
||||
.PHONY: doc-validator/%
|
||||
doc-validator/%: ## Run doc-validator on a specific path. To lint the path /docs/sources/administration, run 'make doc-validator/administration'.
|
||||
doc-validator/%:
|
||||
$(PODMAN) run --init -v "$(shell pwd)/sources:/sources" grafana/doc-validator:latest --skip-image-validation --include=$(subst doc-validator/,,$@) ./sources /docs/grafana/latest
|
||||
include docs.mk
|
||||
|
||||
@@ -1,14 +1,19 @@
|
||||
# Building the docs locally
|
||||
|
||||
When you contribute to documentation, it is a good practice to build the docs on your local machine to make sure your changes appear as you expect. This README explains the process for doing that.
|
||||
When you contribute to documentation, it's a good practice to build the docs on your local machine to make sure your changes appear as you expect. This README explains the process for doing that.
|
||||
|
||||
To build a local version, you need to run a process in a Docker container.
|
||||
Grafana periodically updates the Docker image, [`docs-base`](https://hub.docker.com/r/grafana/docs-base), to update the styling of the Docs.
|
||||
|
||||
## Requirements
|
||||
|
||||
Docker >= 2.1.0.3
|
||||
Yarn >= 1.22.4
|
||||
- Docker >= 2.1.0.3
|
||||
- Yarn >= 1.22.4
|
||||
|
||||
## Build the doc site
|
||||
|
||||
First, make sure the Docker daemon is running on your machine. Then, follow these steps:
|
||||
|
||||
1. On the command line, first change to the docs folder: `cd docs`.
|
||||
1. Run `make docs`. This launches a preview of the website with the current grafana docs at `http://localhost:3002/docs/grafana/latest/` which will refresh automatically when changes are made to content in the `sources` directory.
|
||||
|
||||
|
||||
117
docs/docs.mk
Normal file
117
docs/docs.mk
Normal file
@@ -0,0 +1,117 @@
|
||||
# The source of this file is https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/docs.mk.
|
||||
# 4.0.0 (2023-06-06)
|
||||
include variables.mk
|
||||
-include variables.mk.local
|
||||
|
||||
.ONESHELL:
|
||||
.DELETE_ON_ERROR:
|
||||
export SHELL := bash
|
||||
export SHELLOPTS := pipefail:errexit
|
||||
MAKEFLAGS += --warn-undefined-variables
|
||||
MAKEFLAGS += --no-builtin-rule
|
||||
|
||||
.DEFAULT_GOAL: help
|
||||
|
||||
# Adapted from https://www.thapaliya.com/en/writings/well-documented-makefiles/
|
||||
.PHONY: help
|
||||
help: ## Display this help.
|
||||
help:
|
||||
@awk 'BEGIN { \
|
||||
FS = ": ##"; \
|
||||
printf "Usage:\n make <target>\n\nTargets:\n" \
|
||||
} \
|
||||
/^[a-zA-Z0-9_\.\-\/%]+: ##/ { printf " %-15s %s\n", $$1, $$2 }' \
|
||||
$(MAKEFILE_LIST)
|
||||
|
||||
GIT_ROOT := $(shell git rev-parse --show-toplevel)
|
||||
|
||||
PODMAN := $(shell if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi)
|
||||
|
||||
ifeq ($(PROJECTS),)
|
||||
$(error "PROJECTS variable must be defined in variables.mk")
|
||||
endif
|
||||
|
||||
# First project is considered the primary one used for doc-validator.
|
||||
PRIMARY_PROJECT := $(subst /,-,$(firstword $(subst :, ,$(firstword $(PROJECTS)))))
|
||||
|
||||
# Name for the container.
|
||||
ifeq ($(origin DOCS_CONTAINER), undefined)
|
||||
export DOCS_CONTAINER := $(PRIMARY_PROJECT)-docs
|
||||
endif
|
||||
|
||||
# Host port to publish container port to.
|
||||
ifeq ($(origin DOCS_HOST_PORT), undefined)
|
||||
export DOCS_HOST_PORT := 3002
|
||||
endif
|
||||
|
||||
# Container image used to perform Hugo build.
|
||||
ifeq ($(origin DOCS_IMAGE), undefined)
|
||||
export DOCS_IMAGE := grafana/docs-base:latest
|
||||
endif
|
||||
|
||||
# Container image used for doc-validator linting.
|
||||
ifeq ($(origin DOC_VALIDATOR_IMAGE), undefined)
|
||||
export DOC_VALIDATOR_IMAGE := grafana/doc-validator:latest
|
||||
endif
|
||||
|
||||
# Container image used for vale linting.
|
||||
ifeq ($(origin VALE_IMAGE), undefined)
|
||||
export VALE_IMAGE := grafana/vale:latest
|
||||
endif
|
||||
|
||||
# PATH-like list of directories within which to find projects.
|
||||
# If all projects are checked out into the same directory, ~/repos/ for example, then the default should work.
|
||||
ifeq ($(origin REPOS_PATH), undefined)
|
||||
export REPOS_PATH := $(realpath $(GIT_ROOT)/..)
|
||||
endif
|
||||
|
||||
# How to treat Hugo relref errors.
|
||||
ifeq ($(origin HUGO_REFLINKSERRORLEVEL), undefined)
|
||||
export HUGO_REFLINKSERRORLEVEL := WARNING
|
||||
endif
|
||||
|
||||
.PHONY: docs-rm
|
||||
docs-rm: ## Remove the docs container.
|
||||
$(PODMAN) rm -f $(DOCS_CONTAINER)
|
||||
|
||||
.PHONY: docs-pull
|
||||
docs-pull: ## Pull documentation base image.
|
||||
$(PODMAN) pull -q $(DOCS_IMAGE)
|
||||
|
||||
make-docs: ## Fetch the latest make-docs script.
|
||||
make-docs:
|
||||
if [[ ! -f "$(PWD)/make-docs" ]]; then
|
||||
echo 'WARN: No make-docs script found in the working directory. Run `make update` to download it.' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
.PHONY: docs
|
||||
docs: ## Serve documentation locally, which includes pulling the latest `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image. See also `docs-no-pull`.
|
||||
docs: docs-pull make-docs
|
||||
$(PWD)/make-docs $(PROJECTS)
|
||||
|
||||
.PHONY: docs-no-pull
|
||||
docs-no-pull: ## Serve documentation locally without pulling the `DOCS_IMAGE` (default: `grafana/docs-base:latest`) container image.
|
||||
docs-no-pull: make-docs
|
||||
$(PWD)/make-docs $(PROJECTS)
|
||||
|
||||
.PHONY: docs-debug
|
||||
docs-debug: ## Run Hugo web server with debugging enabled. TODO: support all SERVER_FLAGS defined in website Makefile.
|
||||
docs-debug: make-docs
|
||||
WEBSITE_EXEC='hugo server --bind 0.0.0.0 --port 3002 --debug' $(PWD)/make-docs $(PROJECTS)
|
||||
|
||||
.PHONY: doc-validator
|
||||
doc-validator: ## Run doc-validator on the entire docs folder.
|
||||
doc-validator: make-docs
|
||||
DOCS_IMAGE=$(DOC_VALIDATOR_IMAGE) $(PWD)/make-docs $(PROJECTS)
|
||||
|
||||
.PHONY: vale
|
||||
vale: ## Run vale on the entire docs folder.
|
||||
vale: make-docs
|
||||
DOCS_IMAGE=$(VALE_IMAGE) $(PWD)/make-docs $(PROJECTS)
|
||||
|
||||
.PHONY: update
|
||||
update: ## Fetch the latest version of this Makefile and the `make-docs` script from Writers' Toolkit.
|
||||
curl -s -LO https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/docs.mk
|
||||
curl -s -LO https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs
|
||||
chmod +x make-docs
|
||||
515
docs/make-docs
Executable file
515
docs/make-docs
Executable file
@@ -0,0 +1,515 @@
|
||||
#!/bin/sh
|
||||
# The source of this file is https://raw.githubusercontent.com/grafana/writers-toolkit/main/docs/make-docs.
|
||||
# 4.1.0 (2023-06-16)
|
||||
|
||||
set -ef
|
||||
|
||||
readonly DOCS_CONTAINER="${DOCS_CONTAINER:-make-docs}"
|
||||
readonly DOCS_HOST_PORT="${DOCS_HOST_PORT:-3002}"
|
||||
readonly DOCS_IMAGE="${DOCS_IMAGE:-grafana/docs-base:latest}"
|
||||
|
||||
readonly DOC_VALIDATOR_INCLUDE="${DOC_VALIDATOR_INCLUDE:-.+\.md$}"
|
||||
readonly DOC_VALIDATOR_SKIP_CHECKS="${DOC_VALIDATOR_SKIP_CHECKS:-^image-}"
|
||||
|
||||
readonly HUGO_REFLINKSERRORLEVEL="${HUGO_REFLINKSERRORLEVEL:-WARNING}"
|
||||
readonly VALE_MINALERTLEVEL="${VALE_MINALERTLEVEL:-error}"
|
||||
readonly WEBSITE_EXEC="${WEBSITE_EXEC:-make server-docs}"
|
||||
# If set, the docs-base image will run a prebuild script that sets up Hugo mounts.
|
||||
readonly WEBSITE_MOUNTS="${WEBSITE_MOUNTS:-}"
|
||||
|
||||
PODMAN="$(if command -v podman >/dev/null 2>&1; then echo podman; else echo docker; fi)"
|
||||
|
||||
if ! command -v curl >/dev/null 2>&1; then
|
||||
if ! command -v wget >/dev/null 2>&1; then
|
||||
errr 'either `curl` or `wget` must be installed for this script to work.'
|
||||
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! command -v "${PODMAN}" >/dev/null 2>&1; then
|
||||
errr 'either `podman` or `docker` must be installed for this script to work.'
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
about() {
|
||||
cat <<EOF
|
||||
Test documentation locally with multiple source repositories.
|
||||
|
||||
The REPOS_PATH environment variable is a colon (:) separated list of paths in which to look for project repositories.
|
||||
EOF
|
||||
}
|
||||
|
||||
usage() {
|
||||
cat <<EOF
|
||||
Usage:
|
||||
REPOS_PATH=<PATH[:<PATH>...]> $0 [<PROJECT>[:<VERSION>[:<REPO>[:<DIR>]]]...]
|
||||
|
||||
Examples:
|
||||
REPOS_PATH=~/ext/grafana/ $0 writers-toolkit tempo:latest helm-charts/mimir-distributed:latest:mimir:docs/sources/mimir-distributed
|
||||
EOF
|
||||
}
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
cat <<EOF >&2
|
||||
ERRR: arguments required but not supplied.
|
||||
|
||||
$(about)
|
||||
|
||||
$(usage)
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
readonly REPOS_PATH="${REPOS_PATH:-$(realpath "$(git rev-parse --show-toplevel)/..")}"
|
||||
|
||||
if [ -z "${REPOS_PATH}" ]; then
|
||||
cat <<EOF >&2
|
||||
ERRR: REPOS_PATH environment variable is required but has not been provided.
|
||||
|
||||
$(usage)
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SOURCES_as_code='as-code-docs'
|
||||
SOURCES_enterprise_metrics='backend-enterprise'
|
||||
SOURCES_enterprise_metrics_='backend-enterprise'
|
||||
SOURCES_grafana_cloud='website'
|
||||
SOURCES_grafana_cloud_k6='k6-docs'
|
||||
SOURCES_grafana_cloud_data_configuration_integrations='cloud-onboarding'
|
||||
SOURCES_grafana_cloud_frontend_observability_faro_web_sdk='faro-web-sdk'
|
||||
SOURCES_grafana_cloud_machine_learning='machine-learning'
|
||||
SOURCES_helm_charts_mimir_distributed='mimir'
|
||||
SOURCES_helm_charts_tempo_distributed='tempo'
|
||||
SOURCES_opentelemetry='opentelemetry-docs'
|
||||
|
||||
VERSIONS_as_code='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud_k6='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud_data_configuration_integrations='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud_frontend_observability_faro_web_sdk='UNVERSIONED'
|
||||
VERSIONS_grafana_cloud_machine_learning='UNVERSIONED'
|
||||
VERSIONS_opentelemetry='UNVERSIONED'
|
||||
VERSIONS_technical_documentation='UNVERSIONED'
|
||||
VERSIONS_website='UNVERSIONED'
|
||||
VERSIONS_writers_toolkit='UNVERSIONED'
|
||||
|
||||
PATHS_grafana_cloud='content/docs/grafana-cloud'
|
||||
PATHS_helm_charts_mimir_distributed='docs/sources/helm-charts/mimir-distributed'
|
||||
PATHS_helm_charts_tempo_distributed='docs/sources/helm-charts/tempo-distributed'
|
||||
PATHS_mimir='docs/sources/mimir'
|
||||
PATHS_tempo='docs/sources/tempo'
|
||||
PATHS_website='content/docs'
|
||||
|
||||
# identifier STR
|
||||
# Replace characters that are not valid in an identifier with underscores.
|
||||
identifier() {
|
||||
echo "$1" | tr -C '[:alnum:]_\n' '_'
|
||||
}
|
||||
|
||||
# aget ARRAY KEY
|
||||
# Get the value of KEY from associative array ARRAY.
|
||||
# Characters that are not valid in an identifier are replaced with underscores.
|
||||
aget() {
|
||||
eval echo '$'"$(identifier "$1")_$(identifier "$2")"
|
||||
}
|
||||
|
||||
# new_proj populates a new project structure.
|
||||
new_proj() {
|
||||
_project="$1"
|
||||
_version="$2"
|
||||
_repo="$3"
|
||||
_path="$4"
|
||||
|
||||
# If version is not set, use the script mapping of project to default versions if it exists.
|
||||
# Fallback to 'latest'.
|
||||
if [ -z "${_version}" ]; then
|
||||
if [ -z "$(aget VERSIONS "${_project}")" ]; then
|
||||
_version=latest
|
||||
else
|
||||
_version="$(aget VERSIONS "${_project}")"
|
||||
fi
|
||||
fi
|
||||
|
||||
# If repo is not set, use the script mapping of project to repo name if it exists.
|
||||
# Fallback to using the project name.
|
||||
if [ -z "${_repo}" ]; then
|
||||
if [ -z "$(aget SOURCES "${_project}")" ]; then
|
||||
_repo="${_project}"
|
||||
else
|
||||
_repo="$(aget SOURCES "${_project}")"
|
||||
fi
|
||||
fi
|
||||
|
||||
# If path is not set, use the script mapping of project to docs sources path if it exists.
|
||||
# Fallback to using 'docs/sources'.
|
||||
if [ -z "${_path}" ]; then
|
||||
if [ -z "$(aget PATHS "${_project}")" ]; then
|
||||
_path="docs/sources"
|
||||
else
|
||||
_path="$(aget PATHS "${_project}")"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "${_project}:${_version}:${_repo}:${_path}"
|
||||
unset _project _version _repo _path
|
||||
}
|
||||
|
||||
# proj_url returns the webserver URL for a project.
|
||||
# It expects a complete project structure as input.
|
||||
proj_url() {
|
||||
IFS=: read -r _project _version _ _ <<POSIX_HERESTRING
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_project}" = 'website' ]; then
|
||||
echo "http://localhost:${DOCS_HOST_PORT}/docs/"
|
||||
|
||||
unset _project _version
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${_version}" ] || [ "${_version}" = 'UNVERSIONED' ]; then
|
||||
echo "http://localhost:${DOCS_HOST_PORT}/docs/${_project}/"
|
||||
else
|
||||
echo "http://localhost:${DOCS_HOST_PORT}/docs/${_project}/${_version}/"
|
||||
fi
|
||||
|
||||
unset _project _version
|
||||
}
|
||||
|
||||
# proj_ver returns the version for a project.
|
||||
# It expects a complete project structure as input.
|
||||
proj_ver() {
|
||||
IFS=: read -r _ _ver _ _ <<POSIX_HERESTRING
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
echo "${_ver}"
|
||||
unset _ver
|
||||
}
|
||||
|
||||
# proj_dst returns the container path to content source for a project.
|
||||
# It expects a complete project structure as input.
|
||||
proj_dst() {
|
||||
IFS=: read -r _project _version _ _ <<POSIX_HERESTRING
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_project}" = 'website' ]; then
|
||||
echo '/hugo/content/docs'
|
||||
|
||||
unset _project _version
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${_version}" ] || [ "${_version}" = 'UNVERSIONED' ]; then
|
||||
echo "/hugo/content/docs/${_project}"
|
||||
else
|
||||
echo "/hugo/content/docs/${_project}/${_version}"
|
||||
fi
|
||||
|
||||
unset _project _version
|
||||
}
|
||||
|
||||
# repo_path returns the host path to the project repository.
|
||||
# It looks for the provided repository name in each of the paths specified in the REPOS_PATH environment variable.
|
||||
repo_path() {
|
||||
_repo="$1"
|
||||
IFS=:
|
||||
for lookup in ${REPOS_PATH}; do
|
||||
if [ -d "${lookup}/${_repo}" ]; then
|
||||
echo "${lookup}/${_repo}"
|
||||
unset _path _repo
|
||||
return
|
||||
fi
|
||||
done
|
||||
unset IFS
|
||||
|
||||
errr "could not find project '${_repo}' in any of the paths in REPOS_PATH '${REPOS_PATH}'."
|
||||
note "you must have a checkout of the project '${_repo}' at '${REPOS_PATH##:*}/${_repo}'."
|
||||
note "if you have cloned the repository into a directory with a different name, consider changing it to ${_repo}."
|
||||
|
||||
unset _repo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# proj_src returns the host path to content source for a project.
|
||||
# It expects a complete project structure as input.
|
||||
# It looks for the provided repository name in each of the paths specified in the REPOS_PATH environment variable.
|
||||
proj_src() {
|
||||
IFS=: read -r _ _ _repo _path <<POSIX_HERESTRING
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
_repo="$(repo_path "${_repo}")"
|
||||
echo "${_repo}/${_path}"
|
||||
|
||||
unset _path _repo
|
||||
}
|
||||
|
||||
# proj_canonical returns the canonical absolute path partial URI for a project.
|
||||
# It expects a complete project structure as input.
|
||||
proj_canonical() {
|
||||
IFS=: read -r _project _version _ _ <<POSIX_HERESTRING
|
||||
$1
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_project}" = 'website' ]; then
|
||||
echo '/docs'
|
||||
|
||||
unset _project _version
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -z "${_version}" ] || [ "${_version}" = 'UNVERSIONED' ]; then
|
||||
echo "/docs/${_project}"
|
||||
else
|
||||
echo "/docs/${_project}/${_version}"
|
||||
fi
|
||||
|
||||
unset _project _version
|
||||
}
|
||||
|
||||
proj_to_url_src_dst_ver() {
|
||||
_url="$(proj_url "$1")"
|
||||
_src="$(proj_src "$1")"
|
||||
_dst="$(proj_dst "$1")"
|
||||
_ver="$(proj_ver "$1")"
|
||||
|
||||
echo "${_url}^${_src}^${_dst}^${_ver}"
|
||||
unset _url _src _dst _ver
|
||||
}
|
||||
|
||||
url_src_dst_vers() {
|
||||
for arg in "$@"; do
|
||||
IFS=: read -r _project _version _repo _path <<POSIX_HERESTRING
|
||||
$arg
|
||||
POSIX_HERESTRING
|
||||
|
||||
case "${_project}" in
|
||||
# Workaround for arbitrary mounts where the version field is expected to be the local directory
|
||||
# and the repo field is expected to be the container directory.
|
||||
arbitrary)
|
||||
echo "${_project}^${_version}^${_repo}^" # TODO
|
||||
;;
|
||||
logs)
|
||||
proj_to_url_src_dst_ver "$(new_proj loki "${_version}")"
|
||||
proj_to_url_src_dst_ver "$(new_proj enterprise-logs "${_version}")"
|
||||
;;
|
||||
metrics)
|
||||
proj_to_url_src_dst_ver "$(new_proj mimir "${_version}")"
|
||||
proj_to_url_src_dst_ver "$(new_proj helm-charts/mimir-distributed "${_version}")"
|
||||
proj_to_url_src_dst_ver "$(new_proj enterprise-metrics "${_version}")"
|
||||
;;
|
||||
traces)
|
||||
proj_to_url_src_dst_ver "$(new_proj tempo "${_version}")"
|
||||
proj_to_url_src_dst_ver "$(new_proj enterprise-traces "${_version}")"
|
||||
;;
|
||||
*)
|
||||
proj_to_url_src_dst_ver "$(new_proj "${_project}" "${_version}" "${_repo}" "${_path}")"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
unset _project _version _repo _path
|
||||
}
|
||||
|
||||
await_build() {
|
||||
url="$1"
|
||||
req="$(if command -v curl >/dev/null 2>&1; then echo 'curl -s -o /dev/null'; else echo 'wget -q'; fi)"
|
||||
|
||||
sleep 2
|
||||
|
||||
if ${req} "${url}"; then
|
||||
echo
|
||||
echo "View documentation locally:"
|
||||
for x in ${url_src_dst_vers}; do
|
||||
IFS='^' read -r url _ _ <<POSIX_HERESTRING
|
||||
$x
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ -n "${url}" ]; then
|
||||
if [ "${_url}" != "arbitrary" ]; then
|
||||
echo " ${url}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo
|
||||
echo 'Press Ctrl+C to stop the server'
|
||||
else
|
||||
echo
|
||||
errr 'The build was interrupted or a build error occurred, check the previous logs for possible causes.'
|
||||
fi
|
||||
|
||||
unset url req
|
||||
}
|
||||
|
||||
debg() {
|
||||
if [ -n "${DEBUG}" ]; then
|
||||
echo "DEBG: $1" >&2
|
||||
fi
|
||||
}
|
||||
|
||||
errr() {
|
||||
echo "ERRR: $1" >&2
|
||||
}
|
||||
|
||||
note() {
|
||||
echo "NOTE: $1" >&2
|
||||
}
|
||||
|
||||
url_src_dst_vers="$(url_src_dst_vers "$@")"
|
||||
|
||||
volumes=""
|
||||
redirects=""
|
||||
|
||||
for arg in "$@"; do
|
||||
IFS=: read -r _project _ _repo _ <<POSIX_HERESTRING
|
||||
${arg}
|
||||
POSIX_HERESTRING
|
||||
if [ "${_project}" = website ]; then
|
||||
_repo="$(repo_path website)"
|
||||
volumes="--volume=${_repo}/config:/hugo/config"
|
||||
volumes="${volumes} --volume=${_repo}/layouts/partials:/hugo/layouts/partials"
|
||||
volumes="${volumes} --volume=${_repo}/layouts/shortcodes:/hugo/layouts/shortcodes"
|
||||
fi
|
||||
unset _project _repo
|
||||
done
|
||||
|
||||
for x in ${url_src_dst_vers}; do
|
||||
IFS='^' read -r _url _src _dst _ver <<POSIX_HERESTRING
|
||||
$x
|
||||
POSIX_HERESTRING
|
||||
|
||||
if [ "${_url}" != "arbitrary" ]; then
|
||||
if [ ! -f "${_src}/_index.md" ]; then
|
||||
errr "Index file '${_src}/_index.md' does not exist."
|
||||
note "Is '${_src}' the correct source directory?"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
debg "DEBG: Mounting '${_src}' at container path '${_dst}'"
|
||||
|
||||
if [ -z "${volumes}" ]; then
|
||||
volumes="--volume=${_src}:${_dst}"
|
||||
else
|
||||
volumes="${volumes} --volume=${_src}:${_dst}"
|
||||
fi
|
||||
|
||||
if [ -n "${_ver}" ] && [ "${_ver}" != 'UNVERSIONED' ]; then
|
||||
if [ -z "${redirects}" ]; then
|
||||
redirects="${_dst}^${_ver}"
|
||||
else
|
||||
redirects="${redirects} ${_dst}^${_ver}"
|
||||
fi
|
||||
fi
|
||||
unset _url _src _dst _ver
|
||||
done
|
||||
|
||||
IFS=':' read -r image _ <<POSIX_HERESTRING
|
||||
${DOCS_IMAGE}
|
||||
POSIX_HERESTRING
|
||||
|
||||
case "${image}" in
|
||||
'grafana/doc-validator')
|
||||
proj="$(new_proj "$1")"
|
||||
echo
|
||||
"${PODMAN}" run \
|
||||
--init \
|
||||
--interactive \
|
||||
--name "${DOCS_CONTAINER}" \
|
||||
--platform linux/amd64 \
|
||||
--rm \
|
||||
--tty \
|
||||
${volumes} \
|
||||
"${DOCS_IMAGE}" \
|
||||
"--include=${DOC_VALIDATOR_INCLUDE}" \
|
||||
"--skip-checks=${DOC_VALIDATOR_SKIP_CHECKS}" \
|
||||
/hugo/content/docs \
|
||||
"$(proj_canonical "${proj}")" | sed "s#$(proj_dst "${proj}")#sources#"
|
||||
;;
|
||||
'grafana/vale')
|
||||
proj="$(new_proj "$1")"
|
||||
echo
|
||||
"${PODMAN}" run \
|
||||
--init \
|
||||
--interactive \
|
||||
--name "${DOCS_CONTAINER}" \
|
||||
--platform linux/amd64 \
|
||||
--rm \
|
||||
--tty \
|
||||
${volumes} \
|
||||
"${DOCS_IMAGE}" \
|
||||
"--minAlertLevel=${VALE_MINALERTLEVEL}" \
|
||||
--config=/etc/vale/.vale.ini \
|
||||
--output=line \
|
||||
/hugo/content/docs | sed "s#$(proj_dst "${proj}")#sources#"
|
||||
;;
|
||||
*)
|
||||
tempfile="$(mktemp -t make-docs.XXX)"
|
||||
cat <<EOF >"${tempfile}"
|
||||
#!/usr/bin/env bash
|
||||
for redirect in ${redirects}; do
|
||||
IFS='^' read -r path ver <<<"\${redirect}"
|
||||
echo -e "---\\nredirectURL: \"\${path/\/hugo\/content/}\"\\ntype: redirect\\nversioned: true\\n---\\n" > "\${path/\${ver}/_index.md}"
|
||||
done
|
||||
|
||||
for x in "${url_src_dst_vers}"; do
|
||||
IFS='^' read -r _ _ dst _ <<<"\${x}"
|
||||
|
||||
while [[ -n "\${dst}" ]]; do
|
||||
touch "\${dst}/_index.md"
|
||||
dst="\${dst%/*}"
|
||||
done
|
||||
done
|
||||
|
||||
if [[ -n "${WEBSITE_MOUNTS}" ]]; then
|
||||
unset WEBSITE_SKIP_MOUNTS
|
||||
fi
|
||||
|
||||
${WEBSITE_EXEC}
|
||||
EOF
|
||||
chmod +x "${tempfile}"
|
||||
volumes="${volumes} --volume=$(realpath "${tempfile}"):/entrypoint"
|
||||
readonly volumes
|
||||
|
||||
IFS='' read -r cmd <<EOF
|
||||
${PODMAN} run \
|
||||
--env=HUGO_REFLINKSERRORLEVEL=${HUGO_REFLINKSERRORLEVEL} \
|
||||
--init \
|
||||
--interactive \
|
||||
--name=${DOCS_CONTAINER} \
|
||||
--platform=linux/amd64 \
|
||||
--publish=${DOCS_HOST_PORT}:3002 \
|
||||
--publish=3003:3003 \
|
||||
--rm \
|
||||
--tty \
|
||||
${volumes} \
|
||||
${DOCS_IMAGE} \
|
||||
/entrypoint
|
||||
EOF
|
||||
await_build http://localhost:3002 &
|
||||
|
||||
if [ -n "${DEBUG}" ]; then
|
||||
${cmd}
|
||||
else
|
||||
${cmd} 2>&1| sed \
|
||||
-e '/Web Server is available at http:\/\/localhost:3003\/ (bind address 0.0.0.0)/ d' \
|
||||
-e '/^hugo server/ d' \
|
||||
-e '/fatal: not a git repository (or any parent up to mount point \/)/ d' \
|
||||
-e '/Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set)./ d' \
|
||||
-e "/Makefile:[0-9]*: warning: overriding recipe for target 'docs'/ d" \
|
||||
-e "/docs.mk:[0-9]*: warning: ignoring old recipe for target 'docs'/ d" \
|
||||
-e '/\/usr\/bin\/make -j 2 proxy hserver-docs HUGO_PORT=3003/ d' \
|
||||
-e '/website-proxy/ d' \
|
||||
-e '/rm -rf dist*/ d' \
|
||||
-e '/Press Ctrl+C to stop/ d' \
|
||||
-e '/make/ d' || echo
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
@@ -3,6 +3,192 @@ aliases:
|
||||
- /docs/grafana/v1.1/
|
||||
- /docs/grafana/v3.1/
|
||||
- guides/reference/admin/
|
||||
cascade:
|
||||
# Until a better mechanism for arrangement is thought of, the following sequence should be ordered alphabetically by the `_target.path` value.
|
||||
- _target: { path: /docs/grafana/** } # Default to every page having "Enterprise" and "Open source" labels.
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/enterprise-licensing/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/organization-management/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/provisioning/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/recorded-queries/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/roles-and-permissions/access-control/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/administration/stats-and-license/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/alerting/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/dashboards/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/datasources/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/explore/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/fundamentals/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/introduction/grafana-cloud/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
|
||||
- _target: { path: /docs/grafana/*/introduction/grafana-enterprise/** }
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/panels-visualizations/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/release-notes/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/search/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/audit-grafana/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/configure-authentication/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/configure-authentication/enhanced-ldap/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/configure-authentication/saml/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target:
|
||||
path: /docs/grafana/*/setup-grafana/configure-security/configure-database-encryption/encrypt-secrets-using-hashicorp-key-vault/**
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/configure-request-security/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/configure-team-sync/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
|
||||
- _target: { path: /docs/grafana/*/setup-grafana/configure-security/export-logs/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/troubleshooting/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
|
||||
- _target: { path: /docs/grafana/*/whatsnew/** }
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
description: Guides, installation, and feature documentation
|
||||
keywords:
|
||||
- grafana
|
||||
@@ -70,8 +256,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-4/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v9.4</h4>
|
||||
<a href="{{< relref "whatsnew/whats-new-in-v9-5/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v9.5</h4>
|
||||
<p>Explore the features and enhancements in the latest release.</p>
|
||||
</a>
|
||||
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
---
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
description: Administration
|
||||
title: Administration
|
||||
weight: 40
|
||||
|
||||
@@ -46,7 +46,8 @@ By default, data sources in an organization can be queried by any user in that o
|
||||
|
||||
You can assign data source permissions to users, teams, and roles which will allow access to query or edit the data source.
|
||||
|
||||
1. Navigate to **Administration > Data sources**.
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Select the data source to which you want to assign permissions.
|
||||
1. On the Permissions tab, click **Add a permission**.
|
||||
1. Select **User**, **Team**, or **Role**.
|
||||
@@ -58,7 +59,8 @@ You can assign data source permissions to users, teams, and roles which will all
|
||||
|
||||
### Edit data source permissions for users, teams, or roles
|
||||
|
||||
1. Navigate to **Administration > Data sources**.
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Select the data source for which you want to edit permissions.
|
||||
1. On the Permissions tab, find the user, team, or role permission you want to update.
|
||||
1. Select a different option in the **Permission** dropdown.
|
||||
@@ -67,7 +69,8 @@ You can assign data source permissions to users, teams, and roles which will all
|
||||
|
||||
### Remove data source permissions for users, teams, or roles
|
||||
|
||||
1. Navigate to **Administration > Data sources**.
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Select the data source from which you want to remove permissions.
|
||||
1. On the Permissions tab, find the user, team, or role permission you want to remove.
|
||||
1. Click the **X** next to the permission.
|
||||
@@ -122,9 +125,10 @@ You must be an Org admin or Grafana admin to enable query caching for a data sou
|
||||
|
||||
By default, data source queries are not cached. To enable query caching for a single data source:
|
||||
|
||||
1. On the left-side menu, click **Administration > Data sources**.
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your Connections, click **Data sources**.
|
||||
1. In the data source list, click the data source that you want to turn on caching for.
|
||||
1. Open the Cache tab.
|
||||
1. Go to the Cache tab.
|
||||
1. Click **Enable**.
|
||||
1. (Optional) Choose custom TTLs for the data source's queries and resources caching. If you skip this step, then Grafana uses the default TTL.
|
||||
|
||||
@@ -140,9 +144,10 @@ To configure global settings for query caching, refer to the [Query caching sect
|
||||
|
||||
To disable query caching for a single data source:
|
||||
|
||||
1. On the left-side menu, click **Administration > Data sources**.
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your Connections, click **Data sources**.
|
||||
1. In the data source list, click the data source that you want to turn off caching for.
|
||||
1. In the Cache tab, click **Disable**.
|
||||
1. On the Cache tab, click **Disable**.
|
||||
|
||||
To disable query caching for an entire Grafana instance, set the `enabled` flag to `false` in the [Query caching section of Enterprise Configuration]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}). You will no longer see the Cache tab on any data sources, and no data source queries will be cached.
|
||||
|
||||
@@ -152,7 +157,8 @@ If you experience performance issues or repeated queries become slower to execut
|
||||
|
||||
> **Note:** This action impacts all cache-enabled data sources. If you are using Memcached, the system clears all data from the Memcached instance.
|
||||
|
||||
1. On the left-side menu, click **Administration > Data sources**.
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your Connections, click **Data sources**.
|
||||
1. In the data source list, click the data source that you want to clear the cache for.
|
||||
1. In the Cache tab, click **Clear cache**.
|
||||
|
||||
|
||||
@@ -8,10 +8,6 @@ aliases:
|
||||
- ../enterprise/license/license-expiration/
|
||||
- ../enterprise/license/license-restrictions/
|
||||
- license-restrictions/
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
description: Activate and manage a Grafana Enterprise license
|
||||
keywords:
|
||||
- grafana
|
||||
@@ -52,8 +48,8 @@ There is more than one way to add the license to a Grafana instance:
|
||||
This is the preferred option for single instance installations of Grafana Enterprise.
|
||||
|
||||
1. Sign in as a Grafana server administrator.
|
||||
1. Navigate to **Server Admin > Upgrade** within Grafana.
|
||||
1. Click **Upload license token file**.
|
||||
1. Click **Administration > Stats and license** in the side navigation menu.
|
||||
1. Click **Upload a new token**.
|
||||
1. Select your license file, and upload it.
|
||||
|
||||
#### Put the `license.jwt` file into the data directory of Grafana
|
||||
@@ -205,7 +201,7 @@ To determine the number of active users:
|
||||
|
||||
1. Sign in to Grafana Enterprise as a System Administrator.
|
||||
|
||||
1. Click **Administration** in the left-side menu.
|
||||
1. Click **Administration** in the side navigation menu.
|
||||
|
||||
1. Click **Stats and license**.
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ You can use AWS Marketplace to make the following modifications to your Grafana
|
||||
|
||||
1. Sign in to Grafana as a Server Administrator.
|
||||
|
||||
1. Click **Administration** in the left-side menu, and then **Stats and license**.
|
||||
1. Click **Administration** in the side navigation menu, and then **Stats and license**.
|
||||
|
||||
1. In the **Token** section under **Enterprise License**, click **Renew License**.
|
||||
1. In the **Token** section under **Enterprise License**, click **Renew token**.
|
||||
|
||||
This action retrieves updated license information from AWS.
|
||||
|
||||
|
||||
@@ -8,10 +8,6 @@ description: Describes how to use organizations to isolate dashboard to users an
|
||||
keywords:
|
||||
- organizations
|
||||
- dashboards
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Manage organizations
|
||||
title: Manage organizations
|
||||
weight: 200
|
||||
|
||||
@@ -72,18 +72,20 @@ The Plugin catalog allows you to browse and manage plugins from within Grafana.
|
||||
</video>
|
||||
</div>
|
||||
|
||||
_Video shows the Plugin catalog in a previous version of Grafana._
|
||||
|
||||
In order to be able to install / uninstall / update plugins using plugin catalog, you must enable it via the `plugin_admin_enabled` flag in the [configuration]({{< relref "../../setup-grafana/configure-grafana/#plugin_admin_enabled" >}}) file.
|
||||
Before following the steps below, make sure you are logged in as a Grafana administrator.
|
||||
|
||||
<a id="#plugin-catalog-entry"></a>
|
||||
|
||||
- Administrators can find the Plugin catalog at **Configuration > Plugins**.
|
||||
Administrators can find the Plugin catalog at **Administration > Plugins**.
|
||||
|
||||
### Browse plugins
|
||||
|
||||
To browse for available plugins:
|
||||
|
||||
1. In Grafana, [navigate to the Plugin catalog](#plugin-catalog-entry) to view installed plugins.
|
||||
1. In Grafana, click **Administration > Plugins** in the side navigation menu to view installed plugins.
|
||||
1. Click the **All** filter to browse all available plugins.
|
||||
1. Click the **Data sources**, **Panels**, or **Applications** buttons to filter by plugin type.
|
||||
|
||||
@@ -91,7 +93,7 @@ To browse for available plugins:
|
||||
|
||||
To install a plugin:
|
||||
|
||||
1. In Grafana, [navigate to the Plugin catalog](#plugin-catalog-entry) to view installed plugins.
|
||||
1. In Grafana, click **Administration > Plugins** in the side navigation menu to view installed plugins.
|
||||
1. Browse and find a plugin.
|
||||
1. Click on the plugin logo.
|
||||
1. Click **Install**.
|
||||
@@ -102,7 +104,7 @@ When the update is complete, you see a confirmation message that the installatio
|
||||
|
||||
To update a plugin:
|
||||
|
||||
1. In Grafana, [navigate to the Plugin catalog](#plugin-catalog-entry) to view installed plugins.
|
||||
1. In Grafana, click **Administration > Plugins** in the side navigation menu to view installed plugins.
|
||||
1. Click on the plugin logo.
|
||||
1. Click **Update**.
|
||||
|
||||
@@ -112,7 +114,7 @@ When the update is complete, you see a confirmation message that the update was
|
||||
|
||||
To uninstall a plugin:
|
||||
|
||||
1. In Grafana, [navigate to the Plugin catalog](#plugin-catalog-entry) to view installed plugins.
|
||||
1. In Grafana, click **Administration > Plugins** in the side navigation menu to view installed plugins.
|
||||
1. Click on the plugin logo.
|
||||
1. Click **Uninstall**.
|
||||
|
||||
|
||||
@@ -5,10 +5,6 @@ description: Describes provisioning settings for Grafana using configuration fil
|
||||
keywords:
|
||||
- grafana
|
||||
- provisioning
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Provision Grafana
|
||||
weight: 600
|
||||
---
|
||||
@@ -61,7 +57,7 @@ Currently we do not provide any scripts/manifests for configuring Grafana. Rathe
|
||||
| --------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| Puppet | [https://forge.puppet.com/puppet/grafana](https://forge.puppet.com/puppet/grafana) |
|
||||
| Ansible | [https://github.com/cloudalchemy/ansible-grafana](https://github.com/cloudalchemy/ansible-grafana) |
|
||||
| Chef | [https://github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana) |
|
||||
| Chef | [https://github.com/sous-chefs/chef-grafana](https://github.com/sous-chefs/chef-grafana) |
|
||||
| Saltstack | [https://github.com/salt-formulas/salt-formula-grafana](https://github.com/salt-formulas/salt-formula-grafana) |
|
||||
| Jsonnet | [https://github.com/grafana/grafonnet-lib/](https://github.com/grafana/grafonnet-lib/) |
|
||||
|
||||
|
||||
@@ -10,7 +10,9 @@ weight: 80
|
||||
|
||||
# RBAC permissions, actions, and scopes
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Advanced](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
A permission is comprised of an action and a scope. When creating a custom role, consider the actions the user can perform and the resource(s) on which they can perform those actions.
|
||||
|
||||
@@ -23,128 +25,129 @@ To learn more about the Grafana resources to which you can apply RBAC, refer to
|
||||
|
||||
The following list contains role-based access control actions.
|
||||
|
||||
| Action | Applicable scope | Description |
|
||||
| ------------------------------------ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `alert.instances.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alerts and silences in data sources that support alerting. |
|
||||
| `alert.instances.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage alerts and silences in data sources that support alerting. |
|
||||
| `alert.instances:create` | n/a | Create silences in the current organization. |
|
||||
| `alert.instances:read` | n/a | Read alerts and silences in the current organization. |
|
||||
| `alert.instances:write` | n/a | Update and expire silences in the current organization. |
|
||||
| `alert.notifications.external:read` | `datasources:*`<br>`datasources:uid:*` | Read templates, contact points, notification policies, and mute timings in data sources that support alerting. |
|
||||
| `alert.notifications.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage templates, contact points, notification policies, and mute timings in data sources that support alerting. |
|
||||
| `alert.notifications:write` | n/a | Manage templates, contact points, notification policies, and mute timings in the current organization. |
|
||||
| `alert.notifications:read` | n/a | Read all templates, contact points, notification policies, and mute timings in the current organization. |
|
||||
| `alert.rules.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alert rules in data sources that support alerting (Prometheus, Mimir, and Loki) |
|
||||
| `alert.rules.external:write` | `datasources:*`<br>`datasources:uid:*` | Create, update, and delete alert rules in data sources that support alerting (Mimir and Loki). |
|
||||
| `alert.rules:create` | `folders:*`<br>`folders:uid:*` | Create Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:delete` | `folders:*`<br>`folders:uid:*` | Delete Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:read` | `folders:*`<br>`folders:uid:*` | Read Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:write` | `folders:*`<br>`folders:uid:*` | Update Grafana alert rules in a folder. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.provisioning:read` | n/a | Read all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
|
||||
| `alert.provisioning:write` | n/a | Update all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
|
||||
| `annotations:create` | `annotations:*`<br>`annotations:type:*` | Create annotations. |
|
||||
| `annotations:delete` | `annotations:*`<br>`annotations:type:*` | Delete annotations. |
|
||||
| `annotations:read` | `annotations:*`<br>`annotations:type:*` | Read annotations and annotation tags. |
|
||||
| `annotations:write` | `annotations:*`<br>`annotations:type:*` | Update annotations. |
|
||||
| `apikeys:create` | n/a | Create API keys. |
|
||||
| `apikeys:read` | `apikeys:*`<br>`apikeys:id:*` | Read API keys. |
|
||||
| `apikeys:delete` | `apikeys:*`<br>`apikeys:id:*` | Delete API keys. |
|
||||
| `dashboards:create` | `folders:*`<br>`folders:uid:*` | Create dashboards in one or more folders. |
|
||||
| `dashboards:delete` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Delete one or more dashboards. |
|
||||
| `dashboards.insights:read` | n/a | Read dashboard insights data and see presence indicators. |
|
||||
| `dashboards.permissions:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read permissions for one or more dashboards. |
|
||||
| `dashboards.permissions:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update permissions for one or more dashboards. |
|
||||
| `dashboards:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read one or more dashboards. |
|
||||
| `dashboards:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update one or more dashboards. |
|
||||
| `datasources.caching:read` | `datasources:*`<br>`datasources:uid:*` | Read data source query caching settings. |
|
||||
| `datasources.caching:write` | `datasources:*`<br>`datasources:uid:*` | Update data source query caching settings. |
|
||||
| `datasources:create` | n/a | Create data sources. |
|
||||
| `datasources:delete` | `datasources:*`<br>`datasources:uid:*` | Delete data sources. |
|
||||
| `datasources:explore` | n/a | Enable access to the **Explore** tab. |
|
||||
| `datasources.id:read` | `datasources:*`<br>`datasources:uid:*` | Read data source IDs. |
|
||||
| `datasources.insights:read` | n/a | Read data sources insights data. |
|
||||
| `datasources.permissions:read` | `datasources:*`<br>`datasources:uid:*` | List data source permissions. |
|
||||
| `datasources.permissions:write` | `datasources:*`<br>`datasources:uid:*` | Update data source permissions. |
|
||||
| `datasources:query` | `datasources:*`<br>`datasources:uid:*` | Query data sources. |
|
||||
| `datasources:read` | `datasources:*`<br>`datasources:uid:*` | List data sources. |
|
||||
| `datasources:write` | `datasources:*`<br>`datasources:uid:*` | Update data sources. |
|
||||
| `folders.permissions:read` | `folders:*`<br>`folders:uid:*` | Read permissions for one or more folders. |
|
||||
| `folders.permissions:write` | `folders:*`<br>`folders:uid:*` | Update permissions for one or more folders. |
|
||||
| `folders:create` | n/a | Create folders. |
|
||||
| `folders:delete` | `folders:*`<br>`folders:uid:*` | Delete one or more folders. |
|
||||
| `folders:read` | `folders:*`<br>`folders:uid:*` | Read one or more folders. |
|
||||
| `folders:write` | `folders:*`<br>`folders:uid:*` | Update one or more folders. |
|
||||
| `ldap.config:reload` | n/a | Reload the LDAP configuration. |
|
||||
| `ldap.status:read` | n/a | Verify the availability of the LDAP server or servers. |
|
||||
| `ldap.user:read` | n/a | Read users via LDAP. |
|
||||
| `ldap.user:sync` | n/a | Sync users via LDAP. |
|
||||
| `licensing.reports:read` | n/a | Get custom permission reports. |
|
||||
| `licensing:delete` | n/a | Delete the license token. |
|
||||
| `licensing:read` | n/a | Read licensing information. |
|
||||
| `licensing:write` | n/a | Update the license token. |
|
||||
| `org.users:write` | `users:*` <br> `users:id:*` | Update the organization role (`Viewer`, `Editor`, or `Admin`) of a user. |
|
||||
| `org.users:add` | `users:*` | Add a user to an organization or invite a new user to an organization. |
|
||||
| `org.users:read` | `users:*` <br> `users:id:*` | Get user profiles within an organization. |
|
||||
| `org.users:remove` | `users:*` <br> `users:id:*` | Remove a user from an organization. |
|
||||
| `org:create` | n/a | Create an organization. |
|
||||
| `orgs.preferences:read` | `orgs:*` <br> `orgs:id:*` | Read organization preferences. |
|
||||
| `orgs.preferences:write` | `orgs:*` <br> `orgs:id:*` | Update organization preferences. |
|
||||
| `orgs.quotas:read` | `orgs:*` <br> `orgs:id:*` | Read organization quotas. |
|
||||
| `orgs.quotas:write` | `orgs:*` <br> `orgs:id:*` | Update organization quotas. |
|
||||
| `orgs:delete` | `orgs:*` <br> `orgs:id:*` | Delete one or more organizations. |
|
||||
| `orgs:read` | `orgs:*` <br> `orgs:id:*` | Read one or more organizations. |
|
||||
| `orgs:write` | `orgs:*` <br> `orgs:id:*` | Update one or more organizations. |
|
||||
| `plugins.app:access` | `plugins:*` <br> `plugins:id:*` | Access one or more application plugins (still enforcing the organization role) |
|
||||
| `plugins:install` | n/a | Install and uninstall plugins. |
|
||||
| `plugins:write` | `plugins:*` <br> `plugins:id:*` | Edit settings for one or more plugins. |
|
||||
| `provisioning:reload` | `provisioners:*` | Reload provisioning files. To find the exact scope for specific provisioner, see [Scope definitions]({{< relref "#scope-definitions" >}}). |
|
||||
| `reports:create` | n/a | Create reports. |
|
||||
| `reports:write` | `reports:*` <br> `reports:id:*` | Update reports. |
|
||||
| `reports.settings:read` | n/a | Read report settings. |
|
||||
| `reports.settings:write` | n/a | Update report settings. |
|
||||
| `reports:delete` | `reports:*` <br> `reports:id:*` | Delete reports. |
|
||||
| `reports:read` | `reports:*` | List all available reports or get a specific report. |
|
||||
| `reports:send` | `reports:*` | Send a report email. |
|
||||
| `roles:delete` | `permissions:type:delegate` | Delete a custom role. |
|
||||
| `roles:read` | `roles:*` <br> `roles:uid:*` | List roles and read a specific with its permissions. |
|
||||
| `roles:write` | `permissions:type:delegate` | Create or update a custom role. |
|
||||
| `roles:write` | `permissions:type:escalate` | Reset basic roles to their default permissions. |
|
||||
| `server.stats:read` | n/a | Read Grafana instance statistics. |
|
||||
| `serviceaccounts:write` | `serviceaccounts:*` | Create Grafana service accounts. |
|
||||
| `serviceaccounts:create` | n/a | Update Grafana service accounts. |
|
||||
| `serviceaccounts:delete` | `serviceaccounts:*` | Delete Grafana service accounts. |
|
||||
| `serviceaccounts:read` | `serviceaccounts:*` | Read Grafana service accounts. |
|
||||
| `serviceaccounts.permissions:write` | `serviceaccounts:*` | Update Grafana service account permissions to control who can do what with the service account. |
|
||||
| `serviceaccounts.permissions:read` | `serviceaccounts:*` | Read Grafana service account permissions to see who can do what with the service account. |
|
||||
| `settings:read` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Read the [Grafana configuration settings]({{< relref "../../../../setup-grafana/configure-grafana/" >}}) |
|
||||
| `settings:write` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Update any Grafana configuration settings that can be [updated at runtime]({{< relref "../../../../setup-grafana/configure-grafana/settings-updates-at-runtime" >}}). |
|
||||
| `status:accesscontrol` | `services:accesscontrol` | Get access-control enabled status. |
|
||||
| `teams.permissions:read` | `teams:*`<br>`teams:id:*` | Read members and External Group Synchronization setup for teams. |
|
||||
| `teams.permissions:write` | `teams:*`<br>`teams:id:*` | Add, remove and update members and manage External Group Synchronization setup for teams. |
|
||||
| `teams.roles:add` | `permissions:type:delegate` | Assign a role to a team. |
|
||||
| `teams.roles:read` | `teams:*` | List roles assigned directly to a team. |
|
||||
| `teams.roles:remove` | `permissions:type:delegate` | Unassign a role from a team. |
|
||||
| `teams:create` | n/a | Create teams. |
|
||||
| `teams:delete` | `teams:*`<br>`teams:id:*` | Delete one or more teams. |
|
||||
| `teams:read` | `teams:*`<br>`teams:id:*` | Read one or more teams and team preferences. |
|
||||
| `teams:write` | `teams:*`<br>`teams:id:*` | Update one or more teams and team preferences. |
|
||||
| `users.authtoken:read` | `global.users:*` <br> `global.users:id:*` | List authentication tokens that are assigned to a user. |
|
||||
| `users.authtoken:write` | `global.users:*` <br> `global.users:id:*` | Update authentication tokens that are assigned to a user. |
|
||||
| `users.password:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s password. |
|
||||
| `users.permissions:read` | `users:*` | List permissions of a user. |
|
||||
| `users.permissions:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s organization-level permissions. |
|
||||
| `users.quotas:read` | `global.users:*` <br> `global.users:id:*` | List a user’s quotas. |
|
||||
| `users.quotas:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s quotas. |
|
||||
| `users.roles:add` | `permissions:type:delegate` | Assign a role to a user or a service account. |
|
||||
| `users.roles:read` | `users:*` | List roles assigned directly to a user or a service account. |
|
||||
| `users.roles:remove` | `permissions:type:delegate` | Unassign a role from a user or a service account. |
|
||||
| `users:create` | n/a | Create a user. |
|
||||
| `users:delete` | `global.users:*` <br> `global.users:id:*` | Delete a user. |
|
||||
| `users:disable` | `global.users:*` <br> `global.users:id:*` | Disable a user. |
|
||||
| `users:enable` | `global.users:*` <br> `global.users:id:*` | Enable a user. |
|
||||
| `users:logout` | `global.users:*` <br> `global.users:id:*` | Sign out a user. |
|
||||
| `users:read` | `global.users:*` | Read or search user profiles. |
|
||||
| `users:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s profile. |
|
||||
| Action | Applicable scope | Description |
|
||||
| ------------------------------------ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `alert.instances.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alerts and silences in data sources that support alerting. |
|
||||
| `alert.instances.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage alerts and silences in data sources that support alerting. |
|
||||
| `alert.instances:create` | n/a | Create silences in the current organization. |
|
||||
| `alert.instances:read` | n/a | Read alerts and silences in the current organization. |
|
||||
| `alert.instances:write` | n/a | Update and expire silences in the current organization. |
|
||||
| `alert.notifications.external:read` | `datasources:*`<br>`datasources:uid:*` | Read templates, contact points, notification policies, and mute timings in data sources that support alerting. |
|
||||
| `alert.notifications.external:write` | `datasources:*`<br>`datasources:uid:*` | Manage templates, contact points, notification policies, and mute timings in data sources that support alerting. |
|
||||
| `alert.notifications:write` | n/a | Manage templates, contact points, notification policies, and mute timings in the current organization. |
|
||||
| `alert.notifications:read` | n/a | Read all templates, contact points, notification policies, and mute timings in the current organization. |
|
||||
| `alert.rules.external:read` | `datasources:*`<br>`datasources:uid:*` | Read alert rules in data sources that support alerting (Prometheus, Mimir, and Loki) |
|
||||
| `alert.rules.external:write` | `datasources:*`<br>`datasources:uid:*` | Create, update, and delete alert rules in data sources that support alerting (Mimir and Loki). |
|
||||
| `alert.rules:create` | `folders:*`<br>`folders:uid:*` | Create Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:delete` | `folders:*`<br>`folders:uid:*` | Delete Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:read` | `folders:*`<br>`folders:uid:*` | Read Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.rules:write` | `folders:*`<br>`folders:uid:*` | Update Grafana alert rules in a folder and its subfolders. Combine this permission with `folders:read` in a scope that includes the folder and `datasources:query` in the scope of data sources the user can query. |
|
||||
| `alert.provisioning:read` | n/a | Read all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
|
||||
| `alert.provisioning:write` | n/a | Update all Grafana alert rules, notification policies, etc via provisioning API. Permissions to folders and datasource are not required. |
|
||||
| `annotations:create` | `annotations:*`<br>`annotations:type:*` | Create annotations. |
|
||||
| `annotations:delete` | `annotations:*`<br>`annotations:type:*` | Delete annotations. |
|
||||
| `annotations:read` | `annotations:*`<br>`annotations:type:*` | Read annotations and annotation tags. |
|
||||
| `annotations:write` | `annotations:*`<br>`annotations:type:*` | Update annotations. |
|
||||
| `apikeys:create` | n/a | Create API keys. |
|
||||
| `apikeys:read` | `apikeys:*`<br>`apikeys:id:*` | Read API keys. |
|
||||
| `apikeys:delete` | `apikeys:*`<br>`apikeys:id:*` | Delete API keys. |
|
||||
| `dashboards:create` | `folders:*`<br>`folders:uid:*` | Create dashboards in one or more folders and their subfolders. |
|
||||
| `dashboards:delete` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Delete one or more dashboards. |
|
||||
| `dashboards.insights:read` | n/a | Read dashboard insights data and see presence indicators. |
|
||||
| `dashboards.permissions:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read permissions for one or more dashboards. |
|
||||
| `dashboards.permissions:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update permissions for one or more dashboards. |
|
||||
| `dashboards:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read one or more dashboards. |
|
||||
| `dashboards:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update one or more dashboards. |
|
||||
| `dashboards.public:write` | `dashboards:*`<br>`dashboards:uid:*` | Write public dashboard configuration. |
|
||||
| `datasources.caching:read` | `datasources:*`<br>`datasources:uid:*` | Read data source query caching settings. |
|
||||
| `datasources.caching:write` | `datasources:*`<br>`datasources:uid:*` | Update data source query caching settings. |
|
||||
| `datasources:create` | n/a | Create data sources. |
|
||||
| `datasources:delete` | `datasources:*`<br>`datasources:uid:*` | Delete data sources. |
|
||||
| `datasources:explore` | n/a | Enable access to the **Explore** tab. |
|
||||
| `datasources.id:read` | `datasources:*`<br>`datasources:uid:*` | Read data source IDs. |
|
||||
| `datasources.insights:read` | n/a | Read data sources insights data. |
|
||||
| `datasources.permissions:read` | `datasources:*`<br>`datasources:uid:*` | List data source permissions. |
|
||||
| `datasources.permissions:write` | `datasources:*`<br>`datasources:uid:*` | Update data source permissions. |
|
||||
| `datasources:query` | `datasources:*`<br>`datasources:uid:*` | Query data sources. |
|
||||
| `datasources:read` | `datasources:*`<br>`datasources:uid:*` | List data sources. |
|
||||
| `datasources:write` | `datasources:*`<br>`datasources:uid:*` | Update data sources. |
|
||||
| `folders.permissions:read` | `folders:*`<br>`folders:uid:*` | Read permissions for one or more folders and their subfolders. |
|
||||
| `folders.permissions:write` | `folders:*`<br>`folders:uid:*` | Update permissions for one or more folders and their subfolders. |
|
||||
| `folders:create` | n/a | Create folders in the root level. If granted together with `folders:write`, also allows creating subfolders under all folders that the user can update. |
|
||||
| `folders:delete` | `folders:*`<br>`folders:uid:*` | Delete one or more folders and their subfolders. |
|
||||
| `folders:read` | `folders:*`<br>`folders:uid:*` | Read one or more folders and their subfolders. |
|
||||
| `folders:write` | `folders:*`<br>`folders:uid:*` | Update one or more folders and their subfolders. If granted together with `folders:create` permission, also allows creating subfolders under these folders. |
|
||||
| `ldap.config:reload` | n/a | Reload the LDAP configuration. |
|
||||
| `ldap.status:read` | n/a | Verify the availability of the LDAP server or servers. |
|
||||
| `ldap.user:read` | n/a | Read users via LDAP. |
|
||||
| `ldap.user:sync` | n/a | Sync users via LDAP. |
|
||||
| `licensing.reports:read` | n/a | Get custom permission reports. |
|
||||
| `licensing:delete` | n/a | Delete the license token. |
|
||||
| `licensing:read` | n/a | Read licensing information. |
|
||||
| `licensing:write` | n/a | Update the license token. |
|
||||
| `org.users:write` | `users:*` <br> `users:id:*` | Update the organization role (`Viewer`, `Editor`, or `Admin`) of a user. |
|
||||
| `org.users:add` | `users:*` | Add a user to an organization or invite a new user to an organization. |
|
||||
| `org.users:read` | `users:*` <br> `users:id:*` | Get user profiles within an organization. |
|
||||
| `org.users:remove` | `users:*` <br> `users:id:*` | Remove a user from an organization. |
|
||||
| `org:create` | n/a | Create an organization. |
|
||||
| `orgs.preferences:read` | `orgs:*` <br> `orgs:id:*` | Read organization preferences. |
|
||||
| `orgs.preferences:write` | `orgs:*` <br> `orgs:id:*` | Update organization preferences. |
|
||||
| `orgs.quotas:read` | `orgs:*` <br> `orgs:id:*` | Read organization quotas. |
|
||||
| `orgs.quotas:write` | `orgs:*` <br> `orgs:id:*` | Update organization quotas. |
|
||||
| `orgs:delete` | `orgs:*` <br> `orgs:id:*` | Delete one or more organizations. |
|
||||
| `orgs:read` | `orgs:*` <br> `orgs:id:*` | Read one or more organizations. |
|
||||
| `orgs:write` | `orgs:*` <br> `orgs:id:*` | Update one or more organizations. |
|
||||
| `plugins.app:access` | `plugins:*` <br> `plugins:id:*` | Access one or more application plugins (still enforcing the organization role) |
|
||||
| `plugins:install` | n/a | Install and uninstall plugins. |
|
||||
| `plugins:write` | `plugins:*` <br> `plugins:id:*` | Edit settings for one or more plugins. |
|
||||
| `provisioning:reload` | `provisioners:*` | Reload provisioning files. To find the exact scope for specific provisioner, see [Scope definitions]({{< relref "#scope-definitions" >}}). |
|
||||
| `reports:create` | n/a | Create reports. |
|
||||
| `reports:write` | `reports:*` <br> `reports:id:*` | Update reports. |
|
||||
| `reports.settings:read` | n/a | Read report settings. |
|
||||
| `reports.settings:write` | n/a | Update report settings. |
|
||||
| `reports:delete` | `reports:*` <br> `reports:id:*` | Delete reports. |
|
||||
| `reports:read` | `reports:*` | List all available reports or get a specific report. |
|
||||
| `reports:send` | `reports:*` | Send a report email. |
|
||||
| `roles:delete` | `permissions:type:delegate` | Delete a custom role. |
|
||||
| `roles:read` | `roles:*` <br> `roles:uid:*` | List roles and read a specific with its permissions. |
|
||||
| `roles:write` | `permissions:type:delegate` | Create or update a custom role. |
|
||||
| `roles:write` | `permissions:type:escalate` | Reset basic roles to their default permissions. |
|
||||
| `server.stats:read` | n/a | Read Grafana instance statistics. |
|
||||
| `serviceaccounts:write` | `serviceaccounts:*` | Create Grafana service accounts. |
|
||||
| `serviceaccounts:create` | n/a | Update Grafana service accounts. |
|
||||
| `serviceaccounts:delete` | `serviceaccounts:*` | Delete Grafana service accounts. |
|
||||
| `serviceaccounts:read` | `serviceaccounts:*` | Read Grafana service accounts. |
|
||||
| `serviceaccounts.permissions:write` | `serviceaccounts:*` | Update Grafana service account permissions to control who can do what with the service account. |
|
||||
| `serviceaccounts.permissions:read` | `serviceaccounts:*` | Read Grafana service account permissions to see who can do what with the service account. |
|
||||
| `settings:read` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Read the [Grafana configuration settings]({{< relref "../../../../setup-grafana/configure-grafana/" >}}) |
|
||||
| `settings:write` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Update any Grafana configuration settings that can be [updated at runtime]({{< relref "../../../../setup-grafana/configure-grafana/settings-updates-at-runtime" >}}). |
|
||||
| `status:accesscontrol` | `services:accesscontrol` | Get access-control enabled status. |
|
||||
| `teams.permissions:read` | `teams:*`<br>`teams:id:*` | Read members and Team Sync setup for teams. |
|
||||
| `teams.permissions:write` | `teams:*`<br>`teams:id:*` | Add, remove and update members and manage Team Sync setup for teams. |
|
||||
| `teams.roles:add` | `permissions:type:delegate` | Assign a role to a team. |
|
||||
| `teams.roles:read` | `teams:*` | List roles assigned directly to a team. |
|
||||
| `teams.roles:remove` | `permissions:type:delegate` | Unassign a role from a team. |
|
||||
| `teams:create` | n/a | Create teams. |
|
||||
| `teams:delete` | `teams:*`<br>`teams:id:*` | Delete one or more teams. |
|
||||
| `teams:read` | `teams:*`<br>`teams:id:*` | Read one or more teams and team preferences. |
|
||||
| `teams:write` | `teams:*`<br>`teams:id:*` | Update one or more teams and team preferences. |
|
||||
| `users.authtoken:read` | `global.users:*` <br> `global.users:id:*` | List authentication tokens that are assigned to a user. |
|
||||
| `users.authtoken:write` | `global.users:*` <br> `global.users:id:*` | Update authentication tokens that are assigned to a user. |
|
||||
| `users.password:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s password. |
|
||||
| `users.permissions:read` | `users:*` | List permissions of a user. |
|
||||
| `users.permissions:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s organization-level permissions. |
|
||||
| `users.quotas:read` | `global.users:*` <br> `global.users:id:*` | List a user’s quotas. |
|
||||
| `users.quotas:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s quotas. |
|
||||
| `users.roles:add` | `permissions:type:delegate` | Assign a role to a user or a service account. |
|
||||
| `users.roles:read` | `users:*` | List roles assigned directly to a user or a service account. |
|
||||
| `users.roles:remove` | `permissions:type:delegate` | Unassign a role from a user or a service account. |
|
||||
| `users:create` | n/a | Create a user. |
|
||||
| `users:delete` | `global.users:*` <br> `global.users:id:*` | Delete a user. |
|
||||
| `users:disable` | `global.users:*` <br> `global.users:id:*` | Disable a user. |
|
||||
| `users:enable` | `global.users:*` <br> `global.users:id:*` | Enable a user. |
|
||||
| `users:logout` | `global.users:*` <br> `global.users:id:*` | Sign out a user. |
|
||||
| `users:read` | `global.users:*` | Read or search user profiles. |
|
||||
| `users:write` | `global.users:*` <br> `global.users:id:*` | Update a user’s profile. |
|
||||
|
||||
### Grafana OnCall action definitions (beta)
|
||||
|
||||
@@ -193,7 +196,7 @@ The following list contains role-based access control scopes.
|
||||
| `apikeys:*`<br>`apikeys:id:*` | Restrict an action to a set of API keys. For example, `apikeys:*` matches any API key, `apikey:id:1` matches the API key whose id is `1`. |
|
||||
| `dashboards:*`<br>`dashboards:uid:*` | Restrict an action to a set of dashboards. For example, `dashboards:*` matches any dashboard, and `dashboards:uid:1` matches the dashboard whose UID is `1`. |
|
||||
| `datasources:*`<br>`datasources:uid:*` | Restrict an action to a set of data sources. For example, `datasources:*` matches any data source, and `datasources:uid:1` matches the data source whose UID is `1`. |
|
||||
| `folders:*`<br>`folders:uid:*` | Restrict an action to a set of folders. For example, `folders:*` matches any folder, and `folders:uid:1` matches the folder whose UID is `1`. |
|
||||
| `folders:*`<br>`folders:uid:*` | Restrict an action to a set of folders. For example, `folders:*` matches any folder, and `folders:uid:1` matches the folder whose UID is `1`. Note that permissions granted to a folder cascade down to subfolders located under it |
|
||||
| `global.users:*` <br> `global.users:id:*` | Restrict an action to a set of global users. For example, `global.users:*` matches any user and `global.users:id:1` matches the user whose ID is `1`. |
|
||||
| `orgs:*` <br> `orgs:id:*` | Restrict an action to a set of organizations. For example, `orgs:*` matches any organization and `orgs:id:1` matches the organization whose ID is `1`. |
|
||||
| `permissions:type:delegate` | The scope is only applicable for roles associated with the Access Control itself and indicates that you can delegate your permissions only, or a subset of it, by creating a new role or making an assignment. |
|
||||
@@ -207,3 +210,4 @@ The following list contains role-based access control scopes.
|
||||
| `settings:*` | Restrict an action to a subset of settings. For example, `settings:*` matches all settings, `settings:auth.saml:*` matches all SAML settings, and `settings:auth.saml:enabled` matches the enable property on the SAML settings. |
|
||||
| `teams:*` <br> `teams:id:*` | Restrict an action to a set of teams from an organization. For example, `teams:*` matches any team and `teams:id:1` matches the team whose ID is `1`. |
|
||||
| `users:*` <br> `users:id:*` | Restrict an action to a set of users from an organization. For example, `users:*` matches any user and `users:id:1` matches the user whose ID is `1`. |
|
||||
| `n/a` | `n/a` means not applicable. If an action has `n/a` specified for the scope, then the action does not require a scope. For example, the `teams:create` action does not require a scope and allows users to create teams. |
|
||||
|
||||
@@ -31,7 +31,8 @@ In [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}})
|
||||
> **Note:** Service accounts can only act in the organization they are created for. If you have the same task that is needed for multiple organizations, we recommend creating service accounts in each organization.
|
||||
|
||||
{{< vimeo 742056367 >}}
|
||||
<br>
|
||||
|
||||
_Video shows service accounts in Grafana v9.1. Refer to [Create a service account in Grafana]({{< relref "#create-a-service-account-in-grafana" >}}) for current instructions._
|
||||
|
||||
## Service account tokens
|
||||
|
||||
|
||||
@@ -11,11 +11,7 @@ keywords:
|
||||
- configuration
|
||||
- server
|
||||
- settings
|
||||
labels:
|
||||
products:
|
||||
- enterprise
|
||||
- oss
|
||||
title: Stats and license
|
||||
title: View server statistics and license
|
||||
weight: 400
|
||||
---
|
||||
|
||||
@@ -25,11 +21,11 @@ This setting contains information about tools that Grafana Server Admins can use
|
||||
|
||||
## View Grafana server settings
|
||||
|
||||
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
|
||||
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
|
||||
|
||||
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration]({{< relref "../../setup-grafana/configure-grafana/#config-file-locations" >}}) file and any environmental variables.
|
||||
If you are a Grafana server administrator, use the Settings tab to view the settings that are applied to your Grafana server via the [Configuration]({{< relref "../../setup-grafana/configure-grafana#configuration-file-location" >}}) file and any environmental variables.
|
||||
|
||||
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions/#grafana-server-administrators" >}}).
|
||||
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions#grafana-server-administrators" >}}).
|
||||
|
||||
### View server settings
|
||||
|
||||
@@ -38,15 +34,15 @@ If you are a Grafana server administrator, use the Settings tab to view the sett
|
||||
|
||||
### Available settings
|
||||
|
||||
For a full list of server settings, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}).
|
||||
For a full list of server settings, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana#server" >}}).
|
||||
|
||||
## View Grafana server stats
|
||||
|
||||
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
|
||||
> Refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control" >}}) in Grafana Enterprise to understand how you can control access with RBAC permissions.
|
||||
|
||||
If you are a Grafana server admin, then you can view useful statistics about your Grafana server in the Stats & Licensing tab.
|
||||
|
||||
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions/#grafana-server-administrators" >}}).
|
||||
> **Note:** Only Grafana server administrators can access the **Server Admin** menu. For more information about about administrative permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions#grafana-server-administrators" >}}).
|
||||
|
||||
### View server stats
|
||||
|
||||
|
||||
@@ -81,6 +81,7 @@ When you invite users to join an organization, you assign the **Admin**, **Edito
|
||||
> **Note**: It might be that you are currently in the proper organization and don't need to switch organizations.
|
||||
|
||||
1. Navigate to **Administration > Users**.
|
||||
1. Click **Organization users**.
|
||||
1. Click **Invite**.
|
||||
1. Enter the following information:
|
||||
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
aliases:
|
||||
- about-alerting/
|
||||
- unified-alerting/alerting/
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- oss
|
||||
title: Alerting
|
||||
weight: 114
|
||||
---
|
||||
@@ -19,6 +14,8 @@ Grafana Alerting is available for Grafana OSS, Grafana Enterprise, or Grafana Cl
|
||||
|
||||
Watch this video to learn more about Grafana Alerting: {{< vimeo 720001629 >}}
|
||||
|
||||
_Video shows Alerting in Grafana v9.0. Refer to [Manage your alert rules]({{< relref "../alerting/alerting-rules/" >}}) for current instructions._
|
||||
|
||||
## Overview
|
||||
|
||||
The following diagram gives you an overview of how Grafana Alerting works and introduces you to some of the key concepts that work together and form the core of our flexible and powerful alerting engine.
|
||||
|
||||
@@ -8,53 +8,68 @@ keywords:
|
||||
- guide
|
||||
- rules
|
||||
- create
|
||||
title: Create Grafana managed alert rules
|
||||
title: Create Grafana-managed alert rules
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Create a Grafana managed alerting rule
|
||||
# Create Grafana-managed alert rules
|
||||
|
||||
Grafana allows you to create alerting rules that query one or more data sources, reduce or transform the results and compare them to each other or to fixed thresholds. When these are executed, Grafana sends notifications to the contact point. For information on Grafana Alerting, see [About Grafana Alerting]({{< relref "../" >}}) which explains the various components of Grafana Alerting. We also recommend that you familiarize yourself with some of the [fundamental concepts]({{< relref "../fundamentals/" >}}) of Grafana Alerting.
|
||||
Grafana-managed rules are the most flexible alert rule type. They allow you to create alerts that can act on data from any of our supported data sources. In addition to supporting multiple data sources, you can also add expressions to transform your data and set alert conditions. Using images in alert notifications is also supported. This is the only type of rule that allows alerting from multiple data sources in a single rule definition.
|
||||
|
||||
Multiple alert instances can be created as a result of one alert rule (also known as a multi-dimensional alerting).
|
||||
|
||||
For information on Grafana Alerting, see [Introduction to Grafana Alerting](/docs/grafana/next/alerting/fundamentals/), which explains the key concepts and features of Grafana Alerting.
|
||||
|
||||
Watch this video to learn more about creating alerts: {{< vimeo 720001934 >}}
|
||||
|
||||
## Add Grafana managed rule
|
||||
_Video shows Alerting in Grafana v9.0. Refer to [Add Grafana managed rule]({{< relref "#add-grafana-managed-rule" >}}) (following) for current instructions._
|
||||
|
||||
To create a Grafana-managed alert rule, complete the following steps.
|
||||
|
||||
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
|
||||
1. Click **Alert rules**.
|
||||
1. Click **+ Create alert rule**. The new alerting rule page opens where the **Grafana managed alerts** option is selected by default.
|
||||
1. In Step 1, add the rule name.
|
||||
2. Click **Alert rules**.
|
||||
3. Click **+ Create alert rule**. The new alert rule page opens where the **Grafana managed alerts** option is selected by default.
|
||||
4. In Step 1, add the rule name.
|
||||
- In **Rule name**, add a descriptive name. This name is displayed in the alert rule list. It is also the `alertname` label for every alert instance that is created from this rule.
|
||||
1. In Step 2, add queries and expressions to evaluate, and then select the alert condition.
|
||||
5. In Step 2, add queries and expressions to evaluate, and then select the alert condition.
|
||||
|
||||
- For queries, select a data source from the dropdown.
|
||||
- Specify a [time range](/docs/grafana/latest/dashboards/use-dashboards/?pg=blog&plcmt=body-txt#time-units-and-relative-ranges).
|
||||
|
||||
**Note:**
|
||||
Grafana Alerting only supports fixed relative time ranges, for example, `now-24hr: now`.
|
||||
|
||||
It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:59:592` or semi-relative time ranges: `now/d to: now`.
|
||||
|
||||
- Add one or more [queries]({{< relref "/docs/grafana/latest/panels-visualizations/query-transform-data#add-a-query" >}}) or [expressions]({{< relref "/docs/grafana/latest/panels-visualizations/query-transform-data/expression-queries" >}}).
|
||||
- For each expression, select either **Classic condition** to create a single alert rule, or choose from the **Math**, **Reduce**, and **Resample** options to generate separate alert for each series. For details on these options, see [Single and multi dimensional rule](#single-and-multi-dimensional-rule).
|
||||
- Click **Run queries** to verify that the query is successful.
|
||||
- Next, select the query or expression for your alert condition.
|
||||
1. In Step 3, specify the alert evaluation interval.
|
||||
|
||||
6. In Step 3, specify the alert evaluation interval.
|
||||
|
||||
- From the **Condition** dropdown, select the query or expression to trigger the alert rule.
|
||||
- For **Evaluate every**, specify the frequency of evaluation. Must be a multiple of 10 seconds. For examples, `1m`, `30s`.
|
||||
- For **Evaluate for**, specify the duration for which the condition must be true before an alert fires.
|
||||
> **Note:** Once a condition is breached, the alert goes into the Pending state. If the condition remains breached for the duration specified, the alert transitions to the `Firing` state, otherwise it reverts back to the `Normal` state.
|
||||
- In **Configure no data and error handling**, configure alerting behavior in the absence of data. Use the guidelines in [No data and error handling](#no-data-and-error-handling).
|
||||
- In **Configure no data and error handling**, configure alerting behavior in the absence of data. Use the guidelines in [No data and error handling](#configure-no-data-and-error-handling).
|
||||
- Click **Preview** to check the result of running the query at this moment. Preview excludes no data and error handling.
|
||||
|
||||
**Note:**
|
||||
|
||||
You can pause alert rule evaluation to prevent noisy alerting while tuning your alerts. Pausing stops alert rule evaluation and does not create any alert instances. This is different to mute timings, which stop notifications from being delivered, but still allow for alert rule evaluation and the creation of alert instances.
|
||||
|
||||
1. In Step 4, add the storage location, rule group, as well as additional metadata associated with the rule.
|
||||
7. In Step 4, add the storage location, rule group, as well as additional metadata associated with the rule.
|
||||
- From the **Folder** dropdown, select the folder where you want to store the rule.
|
||||
- For **Group**, specify a pre-defined group. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
|
||||
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "../fundamentals/annotation-label/" >}}).
|
||||
- Add Runbook URL, panel, dashboard, and alert IDs.
|
||||
1. In Step 5, add custom labels.
|
||||
8. In Step 5, add custom labels.
|
||||
- Add custom labels selecting existing key-value pairs from the drop down, or add new labels by entering the new key or value .
|
||||
1. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.
|
||||
1. Next, create a for the rule.
|
||||
9. Click **Save** to save the rule or **Save and exit** to save the rule and go back to the Alerting page.
|
||||
10. Next, create a for the rule.
|
||||
|
||||
### Single and multi dimensional rule
|
||||
### Single and multi-dimensional rule
|
||||
|
||||
For Grafana managed alerts, you can create a rule with a classic condition or you can create a multi-dimensional rule.
|
||||
|
||||
@@ -62,7 +77,9 @@ For Grafana managed alerts, you can create a rule with a classic condition or yo
|
||||
|
||||
Use the classic condition expression to create a rule that triggers a single alert when its condition is met. For a query that returns multiple series, Grafana does not track the alert state of each series. As a result, Grafana sends only a single alert even when alert conditions are met for multiple series.
|
||||
|
||||
**Multi dimensional rule**
|
||||
For more information, see [expressions documentation]({{< relref "/docs/grafana/latest/panels-visualizations/query-transform-data/expression-queries" >}}).
|
||||
|
||||
**Multi-dimensional rule**
|
||||
|
||||
To generate a separate alert for each series, create a multi-dimensional rule. Use `Math`, `Reduce`, or `Resample` expressions to create a multi-dimensional rule. For example:
|
||||
|
||||
@@ -73,22 +90,24 @@ To generate a separate alert for each series, create a multi-dimensional rule. U
|
||||
|
||||
> **Note:** Grafana does not support alert queries with template variables. More information is available at <https://community.grafana.com/t/template-variables-are-not-supported-in-alert-queries-while-setting-up-alert/2514>.
|
||||
|
||||
#### Rule with classic condition
|
||||
### Configure no data and error handling
|
||||
|
||||
For more information, see [expressions documentation]({{< relref "/docs/grafana/latest/panels-visualizations/query-transform-data/expression-queries" >}}).
|
||||
Configure alerting behavior when your alert rule evaluation returns no data or an error.
|
||||
|
||||
### No data and error handling
|
||||
**Note:** Alert rules that are configured to fire when an evaluation returns no data or error only fire when the entire duration of the evaluation period has finished. This means that rather than immediately firing when the alert rule condition is breached, the alert rule waits until the time set as the **For** field has finished and then fires, reducing alert noise and allowing for temporary data availability issues.
|
||||
|
||||
Configure alerting behavior in the absence of data using information in the following tables.
|
||||
If your alert rule evaluation returns no data, you can set the state on your alert rule to appear as follows:
|
||||
|
||||
| No Data Option | Description |
|
||||
| -------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| No Data | Create a new alert `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||
| Alerting | Set alert rule state to `Alerting`. This option will respect the configured **Evaluate for** pending period. |
|
||||
| Ok | Set alert rule state to `Normal`. |
|
||||
| No Data | Description |
|
||||
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| No Data | Creates a new alert `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||
| Alerting | Sets alert rule state to `Alerting`. The alert rule waits until the time set in the **For** field has finished before firing. |
|
||||
| Ok | Sets alert rule state to `Normal`. |
|
||||
|
||||
| Error or timeout option | Description |
|
||||
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Error | Create a new alert `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||
| Alerting | Set alert rule state to `Alerting`. This option will respect the configured **Evaluate for** pending period. |
|
||||
| OK | Set alert rule state to `Normal` |
|
||||
If your evaluation returns an error, you can set the state on your alert rule to appear as follows:
|
||||
|
||||
| Error | Description |
|
||||
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Error | Creates an alert instance `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||
| Alerting | Sets alert rule state to `Alerting`. The alert rule waits until the time set in the **For** field has finished before firing. |
|
||||
| Ok | Sets alert rule state to `Normal`. |
|
||||
|
||||
@@ -30,6 +30,8 @@ Grafana allows you to create alerting rules for an external Grafana Mimir or Lok
|
||||
|
||||
Watch this video to learn more about how to create a Mimir managed alert rule: {{< vimeo 720001865 >}}
|
||||
|
||||
_Video shows Alerting in Grafana v8.5. Refer to [Add a Grafana Mimir or Loki managed alerting rule]({{< relref "#add-a-grafana-mimir-or-loki-managed-alerting-rule" >}}) (following) for current instructions._
|
||||
|
||||
> **Note:** If you do not want to manage alerting rules for a particular Loki or Prometheus data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
|
||||
|
||||
## Add a Grafana Mimir or Loki managed alerting rule
|
||||
|
||||
@@ -54,6 +54,6 @@ The following table lists the contact point integrations supported by Grafana.
|
||||
|
||||
## Useful links
|
||||
|
||||
[Manage contact points](/docs/grafana/next/alerting/manage-notifications/create-contact-point/)
|
||||
[Manage contact points](/docs/grafana/latest/alerting/manage-notifications/create-contact-point/)
|
||||
|
||||
[Create and edit notification templates](/docs/grafana/next/alerting/manage-notifications/create-message-template/)
|
||||
[Create and edit notification templates](/docs/grafana/latest/alerting/manage-notifications/template-notifications/create-notification-templates/)
|
||||
|
||||
46
docs/sources/alerting/legacy-alerting-deprecation.md
Normal file
46
docs/sources/alerting/legacy-alerting-deprecation.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: Legacy alerting deprecation
|
||||
description: Legacy alerting deprecation notice
|
||||
weight: 999
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
---
|
||||
|
||||
# Legacy alerting deprecation
|
||||
|
||||
Starting with Grafana v9.0.0, legacy alerting is deprecated, meaning that it is no longer actively maintained or supported by Grafana. As of Grafana v10.0.0, we do not contribute or accept external contributions to the codebase apart from CVE fixes.
|
||||
|
||||
Legacy alerting refers to the old alerting system that was used prior to the introduction of Grafana Alerting; the new alerting system in Grafana.
|
||||
|
||||
The decision to deprecate legacy alerting was made to encourage users to migrate to the new alerting system, which offers a more powerful and flexible alerting experience based on Prometheus Alertmanager.
|
||||
|
||||
Users who are still using legacy alerting are encouraged to migrate their alerts to the new system as soon as possible to ensure that they continue to receive new features, bug fixes, and support.
|
||||
|
||||
However, we will still patch CVEs until legacy alerting is completely removed in Grafana 11; honoring our commitment to building and distributing secure software.
|
||||
|
||||
We have provided [instructions](https://grafana.com/docs/grafana/latest/alerting/migrating-alerts/) on how to migrate to the new alerting system, making the process as easy as possible for users.
|
||||
|
||||
## Why are we deprecating legacy alerting?
|
||||
|
||||
The new Grafana alerting system is more powerful and flexible than the legacy alerting feature.
|
||||
|
||||
The new system is based on Prometheus Alertmanager, which offers a more comprehensive set of features for defining and managing alerts. With the new alerting system, users can create alerts based on complex queries, configure alert notifications via various integrations, and set up sophisticated alerting rules with support for conditional expressions, aggregation, and grouping.
|
||||
|
||||
Overall, the new alerting system in Grafana is a major improvement over the legacy alerting feature, providing users with a more powerful and flexible alerting experience.
|
||||
|
||||
Additionally, legacy alerting still requires Angular to function and we are [planning to remove support for it](https://grafana.com/docs/grafana/latest/developers/angular_deprecation/) in Grafana 11.
|
||||
|
||||
## When will we remove legacy alerting completely?
|
||||
|
||||
Legacy alerting will be removed from the code-base in Grafana 11, following the same timeline as the [Angular deprecation](https://grafana.com/docs/grafana/latest/developers/angular_deprecation/).
|
||||
|
||||
## How do I migrate to the new Grafana alerting?
|
||||
|
||||
Refer to our [migration instructions](https://grafana.com/docs/grafana/latest/alerting/migrating-alerts/opt-in/).
|
||||
|
||||
### Links
|
||||
|
||||
- [Upgrade Alerting](https://grafana.com/docs/grafana/latest/alerting/migrating-alerts/)
|
||||
- [Legacy alerting differences and limitations](https://grafana.com/docs/grafana/latest/alerting/migrating-alerts/migrating-legacy-alerts/)
|
||||
- [Angular support deprecation](https://grafana.com/docs/grafana/latest/developers/angular_deprecation/)
|
||||
@@ -1,6 +1,5 @@
|
||||
---
|
||||
description: Configure integrations
|
||||
draft: true
|
||||
keywords:
|
||||
- Grafana
|
||||
- alerting
|
||||
@@ -14,7 +13,7 @@ weight: 100
|
||||
|
||||
# Configure integrations
|
||||
|
||||
Configure integrations in Grafana to select your preferred communication channel for receiving notifications when your alert rules are fire. Each integration has its own configuration options and setup process. In most cases, this involves providing an API key or a Webhook URL.
|
||||
Configure integrations in Grafana to select your preferred communication channel for receiving notifications when your alert rules are firing. Each integration has its own configuration options and setup process. In most cases, this involves providing an API key or a Webhook URL.
|
||||
|
||||
Once configured, you can use integrations as part of your contact points to receive notifications whenever your alert changes its state. In this section, we'll cover the basic steps to configure your integrations, so you can start receiving real-time alerts and stay on top of your monitoring data.
|
||||
|
||||
|
||||
@@ -71,6 +71,16 @@ The name of the annotation is {{ .Name }}, and the value is {{ .Value }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
## The index function
|
||||
|
||||
To print a specific annotation or label use the `index` function.
|
||||
|
||||
```
|
||||
{{ range .Alerts }}
|
||||
The name of the alert is {{ index .Labels "alertname" }}
|
||||
{{ end }}
|
||||
```
|
||||
|
||||
## If statements
|
||||
|
||||
You can use if statements in templates. For example, to print `There are no alerts` if there are no alerts in `.Alerts` you would write the following:
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/
|
||||
- /docs/grafana-cloud/how-do-i/alerts/
|
||||
- /docs/grafana-cloud/legacy-alerting/
|
||||
description: Legacy alerting
|
||||
title: Legacy alerting
|
||||
weight: 110
|
||||
---
|
||||
|
||||
# Legacy alerting
|
||||
|
||||
**Note:**
|
||||
|
||||
Starting with Grafana v9.0.0, legacy alerting is deprecated. It is no longer actively maintained or supported by Grafana and will be removed in Grafana v11.0.0.
|
||||
|
||||
You have two options to configure alerts within the Grafana Cloud GUI and a third option that enables you to set Grafana Cloud Alerts using the command line.
|
||||
|
||||
- **Grafana alerts** are the same as in an on-prem instance of Grafana.
|
||||
These alerts are created from a graph panel within a Grafana dashboard.
|
||||
This is useful when you want to create a simple alert based on one metric from within a panel.
|
||||
It also has a much simpler learning curve when you are getting started.
|
||||
- **Grafana Cloud alerts - GUI** are an implementation of Prometheus-style rules that enable you to query your Grafana Cloud Metrics and then set up Prometheus Alertmanager-style alerts based on those rules.
|
||||
This is useful when you want to create precise, PromQL-based rules or create alerts from across many metrics and logs being collected into your Grafana Cloud Metrics.
|
||||
This form of alerting is much more powerful and configurable, but that comes with some complexity.
|
||||
- **Grafana Cloud alerts - CLI** use mimirtool to create and upload the same types of Prometheus-style recording and alerting rules definitions to your Grafana Cloud Metrics instance.
|
||||
Once created, you will also be able to view these rules from within the Grafana Cloud Alerting page in the GUI.
|
||||
- **Synthetic Monitoring alerts** are built on Prometheus alerts, just like in Grafana Cloud alerting.
|
||||
You can configure synthetic monitoring alerts separately using the UI in synthetic monitoring.
|
||||
Another option to create alerts for synthetic monitoring checks is to simply use Grafana Cloud alerting.
|
||||
|
||||
## Using Grafana alerts in Grafana Cloud
|
||||
|
||||
Grafana alerts are dashboard panel-driven and can only be created using the Graph panel.
|
||||
This style of alerting builds on top of the query defined for the graph visualization, so alerts and notifications are sent based on breaking some threshold in the associated panel.
|
||||
|
||||
This also means that there is a one-to-one relationship between a Grafana alert and a graph panel.
|
||||
So although Grafana alerts can be viewed centrally, they can only be managed directly from the panel that they’re tied to.
|
||||
As a result, Grafana alerting is best suited for smaller setups, where there are only a few individuals or teams responsible for a small set of dashboards and where there are few dependencies between the dashboards.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Most curated dashboards, such as those provided with an integration or with Synthetic Monitoring do not allow you to alert from panels.
|
||||
This is to preserve the ability to upgrade these dashboards automatically when the integration or Synthetic Monitoring abilities are updated.
|
||||
To create an editable copy that you can edit and alert from, click settings (the gear logo) within any dashboard and then click **Make Editable**.
|
||||
The copy will not be upgraded when/if the curated dashboard receives an update.
|
||||
This is one reason why Grafana Cloud Alerts may be considered a better option.
|
||||
{{% /admonition %}}
|
||||
|
||||
### What makes Grafana alerts unique?
|
||||
|
||||
With Grafana alerts, alerts are limited to only graph panels within dashboards.
|
||||
In addition:
|
||||
|
||||
- Alerts can be edited by both Editor and Admin roles
|
||||
- Alerts are visual, with an associated alerting threshold line
|
||||
- Alerts work with many non-Prometheus data sources, including Graphite
|
||||
- Alert notifications can be routed to many external notifier systems, directly from Grafana
|
||||
- Alerts are directly associated with a dashboard
|
||||
- Alerts can be tested
|
||||
|
||||
## Using Grafana Cloud Alerts
|
||||
|
||||
Because the metrics you collect and send to Grafana Cloud are centrally stored in one large time-series database, Grafana Cloud Metrics, you can query across these metrics using [PromQL](https://prometheus.io/docs/prometheus/latest/querying/basics/) and build alerts directly around those metrics rather than around a panel.
|
||||
You can also query across any logs you have sent using Loki.
|
||||
|
||||
Grafana Cloud Alerts are directly tied to metrics and log data.
|
||||
They can be configured either through the UI or by uploading files containing Prometheus and Loki alert rules with mimirtool.
|
||||
|
||||
Grafana Cloud Alerting's Prometheus-style alerts are built by querying directly from the data source itself.
|
||||
Because these alerts are based on the data, they are not tied to a single panel.
|
||||
This makes it possible to evaluate and centrally manage alerts across several different Prometheus and Loki data source instances.
|
||||
|
||||
### What makes Grafana Cloud Alerts unique?
|
||||
|
||||
With Grafana Cloud Alerts, alerts are not limited to coming from a graph panel.
|
||||
In addition, you can:
|
||||
|
||||
- Prevent alerts from being edited, except by users with accounts that are assigned Admin roles.
|
||||
- Centrally manage and create alerts across many systems, teams, and dashboards.
|
||||
Alerts are not bound to just one system, team, or dashboard.
|
||||
- Create alerts for both metric _and_ log data, based on Prometheus and Loki, respectively.
|
||||
- Silence and mute alerts in bulk, even using a schedule, using the Alertmanager.
|
||||
- Route alert notifications to [many external notifier systems](https://prometheus.io/docs/operating/integrations/#alertmanager-webhook-receiver) using Alertmanager configurations
|
||||
- Dedupe alert notifications automatically.
|
||||
|
||||
### Grafana Cloud Alert configuration methods
|
||||
|
||||
In a traditional on-prem environment, Prometheus-style alert configuration is done through the combination of defining a [Prometheus configuration file](https://prometheus.io/docs/prometheus/latest/configuration/configuration/) and an [Alertmanager configuration file](https://prometheus.io/docs/alerting/latest/configuration/), which live close to the Prometheus server.
|
||||
With Grafana Cloud, you can still use this setup as well as more flexible architectures.
|
||||
|
||||
- You can use `mimirtool` to upload your configuration files to be hosted and evaluated entirely in Grafana Cloud.
|
||||
- You can manage both alerting rules and Alertmanager configurations directly through the UI.
|
||||
Configuration files are unnecessary with this setup.
|
||||
- You can use both methods concurrently to manage the alerts.
|
||||
For example, updates made using the `mimirtool` are automatically updated and visible within the Grafana Cloud Alerting interface in minutes.
|
||||
@@ -0,0 +1,200 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/alerts-rules/
|
||||
- /docs/grafana-cloud/how-do-i/alerts/alerts-rules/
|
||||
- /docs/grafana-cloud/legacy-alerting/alerts-rules/
|
||||
- /docs/grafana-cloud/metrics/prometheus/alerts_rules/
|
||||
- /docs/hosted-metrics/prometheus/alerts_rules/
|
||||
description: Prometheus rules with mimirtool
|
||||
title: Prometheus rules with mimirtool
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Prometheus rules with mimirtool
|
||||
|
||||
This page outlines the steps to use mimirtool and Prometheus-style rules with Grafana Cloud Alerting. You can load Prometheus alerting and recording rules that are evaluated entirely in Grafana Cloud. This allows for global rule evaluation over all of the metrics and logs stored in your Grafana Cloud stack.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
`mimirtool` does _not_ support Loki.
|
||||
{{% /admonition %}}
|
||||
|
||||
Prometheus-style alerting is driven by your Grafana Cloud Metrics, Grafana Cloud Logs, and Grafana Cloud Alerts instances. The Metrics and Logs instance holds the rules definition, while the Alerts instance is in charge of routing and managing the alerts that fire from the Metrics and Logs instance. These are separate systems that must be individually configured in order for alerting to work correctly.
|
||||
|
||||
The following sections cover all of these concepts:
|
||||
|
||||
- How to upload alerting and recording rules definition to your Grafana Cloud Metrics instance
|
||||
- How to upload alerting rules definition to your Grafana Cloud Logs instance
|
||||
- How to configure an Alertmanager for your Grafana Cloud Alerts instance, giving you access to the Alertmanager UI.
|
||||
|
||||
**Note:** You need an API key with proper permissions. You can use the same API key for your Metric, Log, and Alerting instances.
|
||||
|
||||
## Download and install mimirtool
|
||||
|
||||
mimirtool is a powerful command-line tool for interacting with Mimir, which powers Grafana Cloud Metrics and Alerts. You'll use mimirtool to upload your metric and log rules definition and the Alertmanager configuration using YAML files.
|
||||
|
||||
For more information, including installation instructions, see [Grafana Mimirtool](/docs/mimir/latest/operators-guide/tools/mimirtool).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
For mimirtool to interact with Grafana Cloud, you must set the correct configuration variables. Set them using either environment variables or a command line flags.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Upload rules definition to your Grafana Cloud Metrics and Logs instance
|
||||
|
||||
First, you'll need to upload your alerting and recording rules to your Metrics and Logs instance. You'll need the instance ID and the URL. These should be part of /orgs/`<yourOrgName>`/.
|
||||
|
||||
### Metrics instance
|
||||
|
||||
Your Metrics instance is likely to be in the `us-central1` region. Its address would be in the form of [https://prometheus-us-central1.grafana.net](https://prometheus-us-central1.grafana.net).
|
||||
|
||||
### Logs instance
|
||||
|
||||
Your Logs instance is likely to be in the `us-central1` region. Its address would be in the form of [https://logs-prod-us-central1.grafana.net](https://logs-prod-us-central1.grafana.net).
|
||||
|
||||
### Using mimirtool
|
||||
|
||||
With your instance ID, URL, and API key you're now ready to upload your rules to your metrics instance. Use the following commands and files as a reference.
|
||||
|
||||
Below is an example alert and rule definition YAML file. Take note of the namespace key which replaces the concept of "files" in this context given each instance only supports 1 configuration file.
|
||||
|
||||
```yaml
|
||||
# first_rules.yml
|
||||
namespace: 'first_rules'
|
||||
groups:
|
||||
- name: 'shopping_service_rules_and_alerts'
|
||||
rules:
|
||||
- alert: 'PromScrapeFailed'
|
||||
annotations:
|
||||
message: 'Prometheus failed to scrape a target {{ $labels.job }} / {{ $labels.instance }}'
|
||||
expr: 'up != 1'
|
||||
for: '1m'
|
||||
labels:
|
||||
'severity': 'critical'
|
||||
- record: 'job:up:sum'
|
||||
expr: 'sum by(job) (up)'
|
||||
```
|
||||
|
||||
Although both recording and alerting rules are defined under the key `rules` the difference between a rule and and alert is _generally_ (as there are others) whenever the key `record` or `alert` is defined.
|
||||
|
||||
With this file, you can run the following commands to upload your rules file in your Metrics or Logs instance. Keep in mind that these are example commands for your Metrics instance, and they use placeholders and command line flags. Follow a similar pattern for your Logs instances by switching the address to the correct one. The examples also assume that files are located in the same directory.
|
||||
|
||||
```bash
|
||||
$ mimirtool rules load first_rules.yml \
|
||||
--address=https://prometheus-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
Next, confirm that the rules were uploaded correctly by running:
|
||||
|
||||
```bash
|
||||
$ mimirtool rules list \
|
||||
--address=https://prometheus-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
Output is a list that shows you all the namespaces and rule groups for your instance ID:
|
||||
|
||||
```bash
|
||||
Namespace | Rule Group
|
||||
first_rules | shopping_service_rules_and_alerts
|
||||
```
|
||||
|
||||
You can also print the rules:
|
||||
|
||||
```bash
|
||||
$ mimirtool rules print \
|
||||
--address=https://prometheus-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
Output from the print command should look like this:
|
||||
|
||||
```yaml
|
||||
first_rules:
|
||||
- name: shopping_service_rules_and_alerts
|
||||
interval: 0s
|
||||
rules:
|
||||
- alert: PromScrapeFailed
|
||||
expr: up != 1
|
||||
for: 1m
|
||||
labels:
|
||||
severity: critical
|
||||
annotations:
|
||||
message: Prometheus failed to scrape a target {{ $labels.job }} / {{ $labels.instance }}
|
||||
- record: job:up:sum
|
||||
expr: sum by(job) (up)
|
||||
```
|
||||
|
||||
## Upload Alertmanager configuration to your Grafana Cloud Alerts instance
|
||||
|
||||
To receive alerts you'll need to upload your Alertmanager configuration to your Grafana Cloud Alerts instance. Similar to the previous step, you'll need the corresponding instance ID, URL and API key. These should be part of /orgs/`<yourOrgName>`/.
|
||||
|
||||
Your Alerts instance is likely to be in the `us-central1` region. Its address would be in the form of [https://alertmanager-us-central1.grafana.net](https://alertmanager-us-central1.grafana.net).
|
||||
|
||||
### Using mimirtool
|
||||
|
||||
With your instance ID, URL, and API key you're now ready to upload your Alertmanager configuration to your Alerts instance. Use the following commands and files as a reference.
|
||||
|
||||
Ultimately, you'll need to [write your own](https://prometheus.io/docs/alerting/latest/configuration/) or adapt an [example config file](https://github.com/prometheus/alertmanager/blob/master/doc/examples/simple.yml) for alerts to be delivered.
|
||||
|
||||
Below is an example Alertmanager configuration. Please take that this not a working configuration, your alerts won't be delivered with the following configuration but your Alertmanager UI will be accessible.
|
||||
|
||||
```yaml
|
||||
# alertmanager.yml
|
||||
global:
|
||||
smtp_smarthost: 'localhost:25'
|
||||
smtp_from: 'youraddress@example.org'
|
||||
route:
|
||||
receiver: example-email
|
||||
receivers:
|
||||
- name: example-email
|
||||
email_configs:
|
||||
- to: 'youraddress@example.org'
|
||||
```
|
||||
|
||||
With this file, you can run the following commands to upload your Alertmanager configuration in your Alerts instance.
|
||||
|
||||
```bash
|
||||
$ mimirtool alertmanager load alertmanager.yml \
|
||||
--address=https://alertmanager-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
Then, confirm that the rules were uploaded correctly by running:
|
||||
|
||||
```bash
|
||||
$ mimirtool alertmanager get \
|
||||
--address=https://alertmanager-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
You should see output similar to the following:
|
||||
|
||||
```bash
|
||||
global:
|
||||
smtp_smarthost: 'localhost:25'
|
||||
smtp_from: 'youraddress@example.org'
|
||||
route:
|
||||
receiver: example-email
|
||||
receivers:
|
||||
- name: example-email
|
||||
email_configs:
|
||||
- to: 'youraddress@example.org'
|
||||
```
|
||||
|
||||
Finally, you can delete the configuration with:
|
||||
|
||||
```bash
|
||||
$ mimirtool alertmanager delete \
|
||||
--address=https://alertmanager-us-central1.grafana.net \
|
||||
--id=<yourID> \
|
||||
--key=<yourKey>
|
||||
```
|
||||
|
||||
### UI access
|
||||
|
||||
After you upload a working Alertmanager configuration file, you can access the Alertmanager UI at: https://alertmanager-us-central1.grafana.net/alertmanager.
|
||||
@@ -0,0 +1,76 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/
|
||||
description: Grafana Cloud Alerting
|
||||
title: Grafana Cloud Alerting
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Grafana Cloud Alerting
|
||||
|
||||
Grafana Cloud Alerting allows you to create and manage all of your Prometheus-style alerting rules, for both Prometheus metrics and Loki log data. With this feature, you don't need to leave Grafana, upload or edit configuration files, or install additional tools.
|
||||
|
||||

|
||||
|
||||
## Permissions
|
||||
|
||||
All members of an organization that have alerts set up can view alerts in Grafana Cloud Alerting. This includes everyone with a Viewer, Editor, or Admin role.
|
||||
|
||||
Users with the organization Admin role can also create, edit, or delete alerts.
|
||||
|
||||
## Data sources
|
||||
|
||||
Grafana Cloud Alerting supports rule management across multiple data sources, for both metrics and logs, across all of the stacks in your org. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to configure rules.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Pay attention to which data source you select. Cloud alerts are tied to a specific data source. For example, if you have a Loki data source selected you will not be able to create an alert based on a Prometheus data source.
|
||||

|
||||
{{% /admonition %}}
|
||||
|
||||
## Alerts and recording rules
|
||||
|
||||
Prometheus supports two types of rules:
|
||||
|
||||
- [Recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/) - Recording rules allow you to execute expressions or queries, by saving them off as a stored rule instead.
|
||||
- [Alerting rules](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) - Alerting rules allow you to define alert conditions and to route those notifications to an external service. An alert fires if metrics meet criteria defined in the alerting rule.
|
||||
|
||||
Both of these rules are configurable from the Grafana Cloud Alerting interface and configured in the same way.
|
||||
|
||||
## Alert states
|
||||
|
||||
Alert states are identical to the standard format found in Prometheus rule configurations. In Grafana Cloud Alerting, each individual alert is highlighted by its state to more clearly distinguish between alerts.
|
||||
|
||||
- **Firing -** Alerts that have been active for longer than the configured threshold. Alerts are highlighted in red and tagged with a red `firing` label.
|
||||
- **Pending -** Alerts that have been active for less than the configured threshold. Alerts are highlighted in orange.
|
||||
- **Inactive -** Alerts that are neither firing nor pending. Alerts are highlighted in green.
|
||||
|
||||
## Notifications
|
||||
|
||||
The **Notifications** tab is where you can view all current notifications and sort them by various states, receivers, and labels.
|
||||
|
||||

|
||||
|
||||
## Limits
|
||||
|
||||
There is a limit on how many rules can be created in a rule group. There is also a limit on how many rule groups can be created.
|
||||
|
||||
You can create:
|
||||
|
||||
- 20 rules per rule group
|
||||
- 35 rule groups
|
||||
|
||||
> It is possible to increase these limits. Please contact customer support for further information.
|
||||
|
||||
If you exceed the limits, you will encounter an error similar to this:
|
||||
|
||||
```bash
|
||||
ERROR[0000] requests failed fields.msg="request failed with response body
|
||||
per-user rules per rule group limit (limit: 20 actual: 22) exceeded\n"
|
||||
status="400 Bad Request"
|
||||
ERROR[0000] unable to load rule group error="failed request to the cortex api"
|
||||
group=limit_rules_per_group namespace=test
|
||||
```
|
||||
|
||||
To increase the number of rules or rule groups you can configure, contact support to upgrade your account.
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/alertmanager/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/alertmanager/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/alertmanager/
|
||||
description: Alertmanager
|
||||
title: Alertmanager
|
||||
weight: 500
|
||||
---
|
||||
|
||||
# Alertmanager
|
||||
|
||||
Grafana Cloud Alerting allows you to edit and view configuration for your Alertmanager directly inside of Grafana. See the official [Alertmanager documentation](https://prometheus.io/docs/alerting/latest/configuration/) to learn how to configure.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Only organization Admins can view or update Alertmanger configurations.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Edit a config for Grafana Cloud Alerting
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alertmanager**.
|
||||
1. If you have more than one Alertmanager source, there will be a dropdown at the top for you to select the data source to edit configurations.
|
||||
1. Currently active configuration for the Alertmanager will be displayed. Click the **Edit** button to enter edit mode and start making changes. Click "Save and finish editing" once done to persist your changes.
|
||||
1. Alternatively, updates to the Alertmanager configurations made using the mimirtool will also sync and appear here.
|
||||
|
||||
## Use the Grafana Labs-supplied SMTP option to configure email notifications
|
||||
|
||||
Grafana Cloud users who do not have an SMTP server available for sending alert emails may use Grafana-Labs supplied SMTP relay (available at `smtprelay:2525`).
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alertmanager**.
|
||||
1. If you have more than one Alertmanager source, there will be a dropdown at the top for you to select the data source to edit configurations.
|
||||
1. Find info box with heading **Send alert email notifications from Grafana Cloud** at the top
|
||||
1. Enter desired email address into the **email address** field
|
||||
1. Click **Update configuration** button. Alertmanager config will be updated with grafana SMTP relay settings and an "email" receiver that will send to the specified email address.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Following these steps will overwrite any custom global SMTP settings that you might have. Default route configuration will send all notifications to the "email" receiver. If you have already customized routes, they will not be updated and you will have to configure "email" receiver on the appropriate route.
|
||||
{{% /admonition %}}
|
||||
|
||||
Use these settings in your Grafana Cloud Alerting YAML, if you do not find them already set. Most important is the `smtp_require_tls: false` line. If this is not set properly, alert emails will not be received. If you use mimirtool to configure alertmanager, by default this will be set to `true`, which will cause problems.
|
||||
|
||||
```yaml
|
||||
global:
|
||||
smtp_from: noreply@grafana.net
|
||||
smtp_smarthost: smtprelay:2525
|
||||
smtp_require_tls: false
|
||||
```
|
||||
|
||||
## Troubleshooting Alertmanager failures
|
||||
|
||||
Configuration errors can cause Alertmanager notification failures, e.g. a typo in an email address recipient or an expired token for a webhook. Grafana Cloud provisions a Loki datasource `grafanacloud-<stack_slug>-usage-insights` which can be used to display select notification errors with a query similar to the example below. The `instance_type` label of `alerts` is what selects the Grafana Cloud Alertmanager logs.
|
||||
|
||||
```sql
|
||||
{instance_type="alerts"} | logfmt | level="warn"
|
||||
```
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/create-edit-rules/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/create-edit-rules/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/create-edit-rules/
|
||||
description: Create and edit alert rules
|
||||
title: Create and edit alert rules
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Create and edit alert rules
|
||||
|
||||
Creating alerts in Grafana Cloud differs from creating alerts directly with Prometheus or Loki. While the rule format is the same, everything is done in the Grafana Cloud Alerting interface, rather than with configuration files.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Only organization Admins can create or edit alert rules.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Create an alert rule
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
|
||||
1. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
|
||||
1. Click **Edit rules**.
|
||||
1. Click **Add rule**.
|
||||
|
||||
Grafana creates a new rule with placeholders.
|
||||
|
||||
```
|
||||
alert: ""
|
||||
expr: ""
|
||||
```
|
||||
|
||||
Enter text according to regular Prometheus rule configuration guidelines:
|
||||
|
||||
- [Recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/)
|
||||
- [Alerting rules](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Grafana Cloud Alerting does not support comments.
|
||||
{{% /admonition %}}
|
||||
|
||||
When you are finished, click **Save**. You can then repeat the process to create more rules or click **Finish editing** to return to the rules list.
|
||||
|
||||
## Edit an alert rule
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
|
||||
1. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
|
||||
1. Click **Edit rules**.
|
||||
1. Scroll down to the rule that you want to edit and then click **Edit**.
|
||||
1. Make any necessary changes to the rule text and then click **Save**.
|
||||
1. Click **Finish editing** to return to the rules list.
|
||||
|
||||
## Delete an alert rule
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
|
||||
1. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
|
||||
1. Click **Edit rules**.
|
||||
1. Scroll down to the rule that you want to edit and then click **Delete**.
|
||||
1. Click **Finish editing** to return to the rules list.
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/namespaces-and-groups/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/namespaces-and-groups/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/namespaces-and-groups/
|
||||
description: Namespaces and rule groups
|
||||
title: Namespaces and rule groups
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Namespaces and rule groups
|
||||
|
||||
By default, all alerting and recording rules created in Grafana Cloud Alerting will default to a single namespace and a single rule group.
|
||||
|
||||
## Managing namespaces
|
||||
|
||||
While Grafana Cloud Alerting does support viewing multiple namespaces that have been added through the mimirtool, it is currently not possible to add new namespaces or to rename the existing ones.
|
||||
|
||||
## Managing rule groups
|
||||
|
||||
Rule groups can be managed directly within the Grafana Cloud Alerting interface or through the mimirtool, similar to managing namespaces.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
By default, Grafana Cloud limits the number of rule groups to 20, with a limit of up to 15 rules per group. If you wish to increase the default limits, please [open a support ticket](/profile/org#support) or reach out to your account manager.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Create a new rule group:
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Alerts and rules**.
|
||||
2. If you have more than one Prometheus or Loki data source, there will be a dropdown at the top for you to select the data source to create or edit rules.
|
||||
3. Click **Create new rule group**.
|
||||
4. Enter text to name your new rule group.
|
||||
5. Enter text for the new rule in your new rule group, according to regular Prometheus rule configuration guidelines:
|
||||
|
||||
- [Recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/)
|
||||
- [Alerting rules](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/)
|
||||
|
||||
6. When you are finished naming your new rule group and adding new rule details, click **Save**.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
In order to create a new rule group, you must also create a new rule for it.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Update a rule group
|
||||
|
||||
Existing rule groups can be renamed by selecting the **pencil** icon next to the rule group name.
|
||||
|
||||
### Delete a rule group
|
||||
|
||||
Rule groups will be automatically deleted once the all rules within a group are deleted.
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/silences/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/silences/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/silences/
|
||||
description: Silences
|
||||
title: Silences
|
||||
weight: 600
|
||||
---
|
||||
|
||||
# Silences
|
||||
|
||||
Grafana Cloud Alerting allows you to manage silences for your alertmanager notifications directly inside of Grafana. This applies to alerting rules created for both Prometheus metrics and Loki logs.
|
||||
|
||||
## Create a silence
|
||||
|
||||
1. In Grafana, hover your cursor over the **Grafana Cloud Alerting** icon and then click **Silences**.
|
||||
2. Click **New silence**.
|
||||
3. Enter a date in **Start of silence** to indicate when the silence should go into effect.
|
||||
4. Enter a date in **End of silence** to indicate when the silence should expire.
|
||||
5. Enter one or more matchers by filling out the **Name** and **Value** fields. Matchers determine which rules the silence will apply to.
|
||||
6. Enter the name of the owner in **Creator**.
|
||||
7. Enter a **Comment**.
|
||||
8. To view which rules will be affected by your silence, click **Preview alerts**.
|
||||
9. Otherwise, when you are finished, click **Create**
|
||||
|
||||
## Update an existing silence
|
||||
|
||||
You can always update an existing silence by clicking the **Edit silence** button under the silence.
|
||||
|
||||
It is also possible to expire a silence, on-demand, by clicking the **Expire silence** button under the silence. This will override the original scheduled expiration date of the silence.
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana-cloud/alerts/grafana-cloud-alerting/view-filter-rules/
|
||||
- /docs/grafana-cloud/how-do-i/grafana-cloud-alerting/view-filter-alerts/
|
||||
- /docs/grafana-cloud/legacy-alerting/grafana-cloud-alerting/view-filter-rules/
|
||||
description: View and filter alert rules
|
||||
title: View and filter alert rules
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# View and filter alert rules
|
||||
|
||||
Grafana Cloud Alerting displays a list of all recording and alerting rules assigned to a selected data source in the Alerts and rules tab.
|
||||
|
||||
All members of an organization that have access to a particular data source can view the list of rules and filter or reorder their view.
|
||||
|
||||
## View alert rules
|
||||
|
||||
1. Hover your cursor over the **Grafana Cloud Alerting** icon (alarm bell with Prometheus logo) and then click **Alerts and rules**.
|
||||
1. In the list at the top of the tab, select the data source for which you want to view rules.
|
||||
|
||||
Grafana displays rules according to rule groups. If your instance has added namespaces and alert groups, then they will be ordered alphabetically. Otherwise, you will have one namespace called `default` and an alert group called `rules`.
|
||||
|
||||
If an alert is firing, then click the down carrot arrow to see additional information. The Label and annotations section appears.
|
||||
|
||||
## Filter your alert rule view
|
||||
|
||||
You can control which alerts you see and in what order they appear several ways. Combine different filters to personalize your view so that you can quickly find the information that you need.
|
||||
|
||||
- **Filter by alert state -** Click the toggles to show or hide alerts in different states. Turn off the toggle to hide alerts matching the state.
|
||||
- **Filter by rule type -** Click the toggles to show or hide alerting rules or recording rules.
|
||||
- **View options -** Click the toggle to show or hide the Prometheus annotations shown in the Labels and annotations section.
|
||||
- **Rule sorting -** Click an option to sort alert rules within each rule group.
|
||||
- **None -** No special sort is applied and sorts as if in a file, ordered according to the editing list order.
|
||||
- **A-Z -** Sorts rules alphabetically according to the rule name.
|
||||
- **Alert state -** Sorts rules according to the alert state (Firing, Pending, or Inactive).
|
||||
|
||||
## View alert in Explore
|
||||
|
||||
Click **View in Explore** or click the `expr` link to open the `expr` in [Explore](/docs/grafana/latest/explore/).
|
||||
|
||||
> **Note:** Only users with Admin or Editor roles in an organization can use the Explore feature unless the viewers can edit.
|
||||
@@ -20,18 +20,24 @@ longer supported. We refer to these as [Differences]({{< relref "#differences" >
|
||||
|
||||
2. Read and write access to legacy dashboard alerts and Grafana alerts are governed by the permissions of the folders storing them. During migration, legacy dashboard alert permissions are matched to the new rules permissions as follows:
|
||||
|
||||
- If alert's dashboard has permissions, it will create a folder named like `Migrated {"dashboardUid": "UID", "panelId": 1, "alertId": 1}` to match permissions of the dashboard (including the inherited permissions from the folder).
|
||||
- If there are no dashboard permissions and the dashboard is under a folder, then the rule is linked to this folder and inherits its permissions.
|
||||
- If there are no dashboard permissions and the dashboard is under the General folder, then the rule is linked to the `General Alerting` folder, and the rule inherits the default permissions.
|
||||
- If there are dashboard permissions, a folder named `Migrated {"dashboardUid": "UID", "panelId": 1, "alertId": 1}` is created to match the permissions of the dashboard (including the inherited permissions from the folder).
|
||||
- If there are no dashboard permissions and the dashboard is in a folder, then the rule is linked to this folder and inherits its permissions.
|
||||
- If there are no dashboard permissions and the dashboard is in the General folder, then the rule is linked to the `General Alerting` folder and the rule inherits the default permissions.
|
||||
|
||||
3. Since there is no `Keep Last State` option for [`No Data`]({{< relref "../alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) in Grafana Alerting, this option becomes `NoData` during the legacy rules migration. Option "Keep Last State" for [`Error handling`]({{< relref "../alerting-rules/create-grafana-managed-rule/#no-data--error-handling" >}}) is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a silence for each alert rule with a duration of 1 year.
|
||||
3. `NoData` and `Error` settings are migrated as is to the corresponding settings in Grafana Alerting, except in two situations:
|
||||
|
||||
3.1. As there is no `Keep Last State` option for `No Data` in Grafana Alerting, this option becomes `NoData`. The `Keep Last State` option for `Error` is migrated to a new option `Error`. To match the behavior of the `Keep Last State`, in both cases, during the migration Grafana automatically creates a silence for each alert rule with a duration of 1 year.
|
||||
|
||||
3.2. Due to lack of validation, legacy alert rules imported via JSON or provisioned along with dashboards can contain arbitrary values for `NoData` and [`Error`](/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md#configure-no-data-and-error-handling). In this situation, Grafana will use the default setting: `NoData` for No data, and `Error` for Error.
|
||||
|
||||
4. Notification channels are migrated to an Alertmanager configuration with the appropriate routes and receivers. Default notification channels are added as contact points to the default route. Notification channels not associated with any Dashboard alert go to the `autogen-unlinked-channel-recv` route.
|
||||
|
||||
5. Unlike legacy dashboard alerts where images in notifications are enabled per contact point, images in notifications for Grafana Alerting must be enabled in the Grafana configuration, either in the configuration file or environment variables, and are enabled for either all or no contact points. Refer to [images in notifications](https://grafana.com/docs/grafana/latest/alerting/manage-notifications/images-in-notifications/).
|
||||
6. Grafana Alerting does not support pausing the evaluation of alert rules. After migration, all paused alert rules will become active, which may cause unexpected notifications to be sent.
|
||||
5. Unlike legacy dashboard alerts where images in notifications are enabled per contact point, images in notifications for Grafana Alerting must be enabled in the Grafana configuration, either in the configuration file or environment variables, and are enabled for either all or no contact points. Refer to [images in notifications]({{< relref "../manage-notifications/images-in-notifications" >}}).
|
||||
|
||||
6. The JSON format for webhook notifications has changed in Grafana Alerting and uses the format from [Prometheus Alertmanager](https://prometheus.io/docs/alerting/latest/configuration/#webhook_config).
|
||||
|
||||
7. Alerting on Prometheus `Both` type queries is not supported in Grafana Alerting. Existing legacy alerts with `Both` type queries are migrated to Grafana Alerting as alerts with `Range` type queries.
|
||||
|
||||
## Limitations
|
||||
|
||||
1. Since `Hipchat` and `Sensu` notification channels are no longer supported, legacy alerts associated with these channels are not automatically migrated to Grafana Alerting. Assign the legacy alerts to a supported notification channel so that you continue to receive notifications for those alerts.
|
||||
Silences (expiring after one year) are created for all paused dashboard alerts.
|
||||
|
||||
@@ -24,22 +24,21 @@ There are three options to choose from:
|
||||
|
||||
For more information on the Alerting Provisioning HTTP API, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/).
|
||||
|
||||
**Note:**
|
||||
|
||||
Typically, you cannot edit API-provisioned alert rules from the Grafana UI.
|
||||
|
||||
In order to enable editing, add the x-disable-provenance header to the following requests when creating or editing your alert rules in the API:
|
||||
|
||||
POST /api/v1/provisioning/alert-rules
|
||||
|
||||
PUT /api/v1/provisioning/alert-rules/{UID}
|
||||
|
||||
1. Provision your alerting resources using Terraform.
|
||||
|
||||
**Note:**
|
||||
|
||||
Currently, provisioning for Grafana Alerting supports alert rules, contact points, mute timings, and templates. Provisioned alerting resources using file provisioning or Terraform can only be edited in the source that created them and not from within Grafana or any other source. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
|
||||
|
||||
To allow editing of provisioned resources in the Grafana UI, add the `X-Disable-Provenance` header to the following requests in the API:
|
||||
|
||||
- `POST /api/v1/provisioning/alert-rules`
|
||||
- `PUT /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}` (calling this endpoint will change provenance for all alert rules within the alert group)
|
||||
- `POST /api/v1/provisioning/contact-points`
|
||||
- `POST /api/v1/provisioning/mute-timings`
|
||||
- `PUT /api/v1/provisioning/policies`
|
||||
- `PUT /api/v1/provisioning/templates/{name}`
|
||||
|
||||
**Useful Links:**
|
||||
|
||||
[Grafana provisioning](/docs/grafana/latest/administration/provisioning/)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
title: Copyright notice
|
||||
---
|
||||
|
||||
# Copyright notice
|
||||
|
||||
Copyright © 2021 Raintank, Inc. dba Grafana Labs. All Rights Reserved.
|
||||
@@ -1,12 +1,6 @@
|
||||
---
|
||||
aliases:
|
||||
- features/dashboard/dashboards/
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
title: Dashboards
|
||||
weight: 70
|
||||
---
|
||||
|
||||
@@ -43,11 +43,9 @@ For every dashboard and data source, you can access usage information.
|
||||
|
||||
### Dashboard insights
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
To see dashboard usage information, click the dashboard insights icon in the header.
|
||||
|
||||
To see dashboard usage information, click **Dashboard insights** in the top bar.
|
||||
|
||||
{{< figure src="/static/img/docs/enterprise/dashboard_insights_button.png" max-width="400px" class="docs-image--no-shadow" >}}
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-insights.png" max-width="400px" class="docs-image--no-shadow" >}}
|
||||
|
||||
Dashboard insights show the following information:
|
||||
|
||||
@@ -58,8 +56,6 @@ Dashboard insights show the following information:
|
||||
|
||||
### Data source insights
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.3 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
|
||||
Data source insights provides information about how a data source has been used in the past 30 days, such as:
|
||||
|
||||
- Queries per day
|
||||
@@ -68,17 +64,16 @@ Data source insights provides information about how a data source has been used
|
||||
|
||||
To find data source insights:
|
||||
|
||||
1. Go to the Data source list view.
|
||||
1. Click on a data source.
|
||||
1. Click **Connections** in the main navigation.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Click a data source.
|
||||
1. Click the **Insights** tab.
|
||||
|
||||
{{< figure src="/static/img/docs/enterprise/datasource_insights.png" max-width="650px" class="docs-image--no-shadow" >}}
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-data-source-insights-9.5.png" max-width="650px" class="docs-image--no-shadow" >}}
|
||||
|
||||
## Presence indicator
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
|
||||
When you are signed in and looking at a dashboard, you can know who is looking at the same dashboard as you are via a presence indicator, which displays avatars of users who have recently interacted with the dashboard. The default timeframe is 10 minutes. To see the user's name, hover over the user's avatar. The avatars come from [Gravatar](https://gravatar.com) based on the user's email.
|
||||
When you are signed in and looking at a dashboard, you can know who is looking at the same dashboard as you are via a presence indicator, which displays avatars of users who have recently interacted with the dashboard. The default time frame is 10 minutes. To see the user's name, hover over the user's avatar. The avatars come from [Gravatar](https://gravatar.com) based on the user's email.
|
||||
|
||||
When there are more active users on a dashboard than can fit within the presence indicator, click the **+X** icon. Doing so opens [dashboard insights]({{< relref "#dashboard-and-data-source-insights" >}}), which contains more details about recent user activity.
|
||||
|
||||
@@ -94,23 +89,19 @@ recent_users_age = 10m
|
||||
|
||||
## Sort dashboards by using insights data
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
|
||||
In the search view, you can use insights data to help you find most-used, broken, and unused dashbaords.
|
||||
In the search view, you can use insights data to help you find most-used, broken, and unused dashboards.
|
||||
|
||||
You can sort the dashboards by:
|
||||
|
||||
- Errors total
|
||||
- Errors 30 days
|
||||
- Errors 30 days (most and least)
|
||||
- Views total
|
||||
- Views 30 days
|
||||
- Views 30 days (most and least)
|
||||
|
||||
{{< figure src="/static/img/docs/enterprise/improved-search-7-5.png" max-width="650px" class="docs-image--no-shadow" >}}
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-sort-9.5.png" max-width="650px" class="docs-image--no-shadow" >}}
|
||||
|
||||
## Visualize usage insights data
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
|
||||
If you set up your installation to [export logs of usage insights]({{< relref "../../setup-grafana/configure-security/export-logs/" >}}), we've created two dashboards to help you take advantage of this data.
|
||||
|
||||
1. [Usage Insights overview](/grafana/dashboards/13785) provides a top-level perspective of user activity.
|
||||
|
||||
@@ -14,85 +14,124 @@ weight: 600
|
||||
|
||||
# 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.
|
||||
Annotations provide a way to mark points on a visualization with rich events. They are visualized as vertical lines and icons on all graph panels. When you hover over an annotation, you can get event description and event tags. The text field can include links to other systems with more detail.
|
||||
|
||||
{{< figure src="/static/img/docs/v46/annotations.png" max-width="800px" >}}
|
||||
|
||||
## Native annotations
|
||||
You can annotate visualizations in three ways:
|
||||
|
||||
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../../../developers/http_api/annotations/" >}}).
|
||||
- Directly in the panel, using the [built-in annotations query](#built-in-query)
|
||||
- Using the HTTP API
|
||||
- Configuring annotation queries in the dashboard settings
|
||||
|
||||
### Add annotation
|
||||
In the first two cases, you're creating new annotations, while in the last you're querying existing annotations from data sources. The built-in annotation query also supports this.
|
||||
|
||||
1. In the dashboard click on the Time series panel. A context menu will appear.
|
||||
1. In the context menu click on **Add annotation**.
|
||||
This page explains the first and third options; for information about using the HTTP API, refer to [Annotations API]({{< relref "../../../developers/http_api/annotations/" >}}).
|
||||
|
||||
Annotations are supported for the following visualization types:
|
||||
|
||||
- Time series
|
||||
- State timeline
|
||||
- Candlestick
|
||||
|
||||
## Create annotations in panels
|
||||
|
||||
Grafana comes with the ability to add annotation events directly from a panel using the [built-in annotation query](#built-in-query) that exists on all dashboards. Annotations that you create this way are stored in Grafana.
|
||||
|
||||
To add annotations directly in the panel, the built-in query must be enabled. Learn more in [Built-in query](#built-in-query)
|
||||
|
||||
### Add an annotation
|
||||
|
||||
To add an annotation, complete the following steps:
|
||||
|
||||
1. In the dashboard click the panel to which you're adding the annotation. A context menu will appear.
|
||||
1. In the context menu, click **Add annotation**.
|
||||

|
||||
1. Add an annotation description and tags(optional).
|
||||

|
||||
1. Click save.
|
||||
1. Add an annotation description and tags (optional).
|
||||
1. Click **Save**.
|
||||
|
||||
Alternatively, to add an annotation, Ctrl/Cmd+Click on the Time series panel and the Add annotation popover will appear
|
||||
Alternatively, to add an annotation, press Ctrl/Cmd and click the panel, and the **Add annotation** popover will appear.
|
||||
|
||||
### Add region annotation
|
||||
### Add a region annotation
|
||||
|
||||
1. In the dashboard Ctrl/Cmd+click and drag on the Time series panel.
|
||||
1. In the dashboard press Ctrl/Cmd and click and drag on the panel.
|
||||

|
||||
1. Add an annotation description and tags(optional).
|
||||
1. Click save.
|
||||
1. Add an annotation description and tags (optional).
|
||||
1. Click **Save**.
|
||||
|
||||
### Edit annotation
|
||||
### Edit an annotation
|
||||
|
||||
1. In the dashboard hover over an annotation indicator on the Time series panel.
|
||||
1. In the dashboard, hover over an annotation indicator on the Time series panel.
|
||||
<!---->
|
||||
1. Click on the pencil icon in the annotation tooltip.
|
||||
1. Modify the description and/or tags.
|
||||
1. Click save.
|
||||
|
||||
### Delete annotation
|
||||
### Delete an annotation
|
||||
|
||||
1. In the dashboard hover over an annotation indicator on the Time series panel.
|
||||
1. In the dashboard hover over an annotation indicator on a panel.
|
||||
<!---->
|
||||
1. Click on the trash icon in the annotation tooltip.
|
||||
|
||||
### Built-in query
|
||||
## Fetch annotations through dashboard settings
|
||||
|
||||
After you added an annotation they will still be visible. This is due to the built in annotation query that exists on all dashboards. This annotation query will
|
||||
fetch all annotation events that originate from the current dashboard and show them on the panel where they were created. This includes alert state history annotations. You can
|
||||
stop annotations from being fetched and drawn by opening the **Annotations** settings (via Dashboard cogs menu) and modifying the query named `Annotations & Alerts (Built-in)`.
|
||||
In the dashboard settings, under **Annotations**, you can add new queries to fetch annotations using any data source, including the built-in data annotation data source. Annotation queries return events that can be visualized as event markers in graphs across the dashboard.
|
||||
|
||||
When you copy a dashboard using the **Save As** feature it will get a new dashboard id so annotations created on source dashboard will no longer be visible on the copy. You
|
||||
can still show them if you add a new **Annotation Query** and filter by tags. But this only works if the annotations on the source dashboard had tags to filter by.
|
||||
### Add new annotation queries
|
||||
|
||||
### Query by tag
|
||||
To add a new annotation query to a dashboard, take the following steps:
|
||||
|
||||
You can create new queries to fetch annotations from the native annotation store via the `-- Grafana --` data source by setting _Filter by_ to `Tags`.
|
||||
1. Click the dashboard settings (gear) icon in the dashboard header to open the settings menu.
|
||||
1. Select **Annotations**.
|
||||
1. Click **Add annotation query**.
|
||||
|
||||
If you've added a query before, the **+ New query** button is displayed.
|
||||
|
||||
1. Enter a name for the annotation query.
|
||||
|
||||
This name is given to the toggle (checkbox) that will allow you to enable/disable showing annotation events from this query.
|
||||
|
||||
1. Select the data source for the annotations.
|
||||
1. If you don't want to use the annotation query right away, clear the **Enabled** checkbox.
|
||||
1. If you don't want the annotation query toggle to be displayed in the dashboard, select the **Hidden** checkbox.
|
||||
1. Select a color for the event markers.
|
||||
1. Configure the query.
|
||||
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../../../datasources/" >}}) topic.
|
||||
|
||||
## Built-in query
|
||||
|
||||
After you add an annotation, they will still be visible. This is due to the built-in annotation query that exists on all dashboards. This annotation query will fetch all annotation events that originate from the current dashboard, which are stored in Grafana, and show them on the panel where they were created. This includes alert state history annotations.
|
||||
|
||||
To add annotations directly to the dashboard, this query must be enabled.
|
||||
|
||||
To confirm if the built-in query is enabled, take the following steps:
|
||||
|
||||
1. Click the dashboard settings (gear) icon in the dashboard header to open the dashboard settings menu.
|
||||
1. Click **Annotations**.
|
||||
1. Find the **Annotations & Alerts (Built-in)** query.
|
||||
|
||||
If it says **Disabled** before the name of the query, then you'll need to click the query name to open it and update the setting.
|
||||
|
||||
You can stop annotations from being fetched and drawn by taking the following steps:
|
||||
|
||||
1. Click the dashboard settings (gear) icon in the dashboard header to open the settings menu.
|
||||
1. Click **Annotations**.
|
||||
1. Find and click the **Annotations & Alerts (Built-in)** query to open it.
|
||||
1. Click the **Enabled** toggle to turn it off.
|
||||
|
||||
When you copy a dashboard using the **Save As** feature it will get a new dashboard id, so annotations created on source dashboard will no longer be visible on the copy. You can still show them if you add a new **Annotation Query** and filter by tags. However, this only works if the annotations on the source dashboard had tags to filter by.
|
||||
|
||||
### Filter queries by tag
|
||||
|
||||
You can create new queries to fetch annotations from the built-in annotation query using the `-- Grafana --` data source by setting _Filter by_ to `Tags`.
|
||||
|
||||
Grafana v8.1 and later versions also support typeahead of existing tags, provide at least one tag.
|
||||
|
||||
For example, create an annotation query name `outages` and specify a tag `outage`. This query will show all annotations (from any dashboard or via API) with the `outage` tag. If multiple tags are defined in an annotation query, then Grafana will only show annotations matching all the tags. To modify the behavior, enable `Match any`, and Grafana will show annotations that contain any one of the tags you provided.
|
||||
|
||||
{{< figure src="/static/img/docs/annotations/annotations_typeahead_support-8-1-0.png" max-width="600px" >}}
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-annotations-typeahead-support-10.0.png" max-width="600px" >}}
|
||||
|
||||
In Grafana v5.3+ it's possible to use template variables in the tag query. So if you have a dashboard showing stats for different services and a template variable that dictates which services to show, you can now use the same template variable in your annotation query to only show annotations for those services.
|
||||
You can also use template variables in the tag query. This means if you have a dashboard showing stats for different services and a template variable that dictates which services to show, you can use the same template variable in your annotation query to only show annotations for those services.
|
||||
|
||||
{{< figure src="/static/img/docs/annotations/annotation_tag_filter_variable-8-1-0.png" max-width="600px" >}}
|
||||
|
||||
## Querying other data sources
|
||||
|
||||
Annotation events are fetched via annotation queries. To add a new annotation query to a dashboard
|
||||
open the dashboard settings menu, then select `Annotations`. This will open the dashboard annotations
|
||||
settings view. To create a new annotation query hit the `New` button.
|
||||
|
||||
<!---->
|
||||
|
||||
{{< figure src="/static/img/docs/v50/annotation_new_query.png" max-width="600px" >}}
|
||||
|
||||
Specify a name for the annotation query. This name is given to the toggle (checkbox) that will allow
|
||||
you to enable/disable showing annotation events from this query. For example you might have two
|
||||
annotation queries named `Deploys` and `Outages`. The toggle will allow you to decide what annotations
|
||||
to show.
|
||||
|
||||
### Annotation query details
|
||||
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../../../datasources/" >}}) topic.
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-annotation-tag-filter-variable-10.0.png" max-width="600px" >}}
|
||||
|
||||
@@ -65,7 +65,7 @@ The query parameter `var-adhoc=key|=|value` applies the ad hoc filter configured
|
||||
|
||||
### Example
|
||||
|
||||
See [https://play.grafana.org/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica] - this passes the ad hoc filter variable `adhoc` with the filter value `datacenter = America`.
|
||||
[This example in Grafana Play](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1&var-datacenter=America&var-host=All&var-summarize=1m&var-adhoc=datacenter%7C%3D%7CAmerica) passes the ad hoc filter variable `adhoc` with the filter value `datacenter = America`.
|
||||
|
||||
## Controlling time range using the URL
|
||||
|
||||
|
||||
@@ -26,11 +26,18 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **New** and select **New Dashboard**.
|
||||
1. On the empty dashboard, click **+ Add visualization**.
|
||||
|
||||

|
||||
|
||||
1. In the first line of the **Query** tab, click the dropdown 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. Click the Refresh dashboard icon to query the data source.
|
||||
|
||||

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

|
||||
@@ -49,9 +56,15 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
- [Configure thresholds]({{< relref "../../../panels-visualizations/configure-thresholds/" >}})
|
||||
- [Configure standard options]({{< relref "../../../panels-visualizations/configure-standard-options/" >}})
|
||||
|
||||
1. When you've finished editing your panel, click **Save** in the top right corner.
|
||||
1. When you've finished editing your panel, click **Save** to save the dashboard.
|
||||
|
||||
Alternatively, click **Apply** if you want to see your changes applied to the dashboard first. Then click the save icon in the dashboard header.
|
||||
|
||||
1. Enter a name for your dashboard and select a folder, if applicable.
|
||||
1. Click **Save**.
|
||||
1. To add more panels to the dashboard, click **Add** in the dashboard header and select **Visualization** in the dropdown.
|
||||
|
||||

|
||||
|
||||
## Configure repeating rows
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ When you create a library panel, the panel on the source dashboard is converted
|
||||
|
||||
1. Open a panel in edit mode.
|
||||
1. In the panel display options, click the down arrow option to bring changes to the visualization.
|
||||
{{< figure src="/static/img/docs/library-panels/create-lib-panel-from-edit-8-0.png" class="docs-image--no-shadow" max-width= "800px" caption="Screenshot of the edit panel" >}}
|
||||
1. Click the **Library panels** option, and then click **Create library panel** to open the create dialog.
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-create-lib-panel-from-edit-9-5.png" class="docs-image--no-shadow" max-width= "800px" >}}
|
||||
1. Click **Library panels**, and then click **+ Create library panel** to open the create dialog.
|
||||
1. In **Library panel name**, enter the name.
|
||||
1. In **Save in folder**, select the folder to save the library panel.
|
||||
1. Click **Create library panel** to save your changes.
|
||||
@@ -34,14 +34,16 @@ When you create a library panel, the panel on the source dashboard is converted
|
||||
|
||||
Once created, you can modify the library panel using any dashboard on which it appears. After you save the changes, all instances of the library panel reflect these modifications.
|
||||
|
||||
{{< figure src="/static/img/docs/library-panels/create-from-more-8-0.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the edit panel" >}}
|
||||
You can also create a library panel directly from the edit menu of any panel.
|
||||
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-create-from-more-9-5.png" class="docs-image--no-shadow" max-width= "900px" >}}
|
||||
|
||||
## Add a library panel to a dashboard
|
||||
|
||||
Add a Grafana library panel to a dashboard when you want to provide visualizations to other dashboard users.
|
||||
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **New** and select **New Dashboard**.
|
||||
1. Click **New** and select **New Dashboard** in the dropdown.
|
||||
1. On the empty dashboard, click **+ Import library panel**.
|
||||
|
||||
You will see a list of your library panels.
|
||||
@@ -60,6 +62,7 @@ Unlink a library panel when you want to make a change to the panel and not affec
|
||||
1. Hover over any part of the panel to display the actions menu on the top right corner.
|
||||
1. Click the menu and select **Edit**.
|
||||
1. Click **Unlink** on the top right corner of the page.
|
||||
1. Click **Yes, unlink**.
|
||||
|
||||
## View a list of library panels
|
||||
|
||||
@@ -69,7 +72,7 @@ You can view a list of available library panels and search for a library panel.
|
||||
1. Click **Library panels**.
|
||||
|
||||
You can see a list of previously defined library panels.
|
||||
{{< figure src="/static/img/docs/library-panels/library-panel-list-8-0.png" class="docs-image--no-shadow" max-width= "900px" caption="Screenshot of the edit panel" >}}
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-library-panel-list-9-5.png" class="docs-image--no-shadow" max-width= "900px" >}}
|
||||
|
||||
1. Search for a specific library panel if you know its name.
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ weight: 400
|
||||
|
||||
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.
|
||||
|
||||
<img class="no-shadow" src="/static/img/docs/v50/dashboard_versions_list.png">
|
||||

|
||||
|
||||
The dashboard version history feature lets you compare and restore to previously saved dashboard versions.
|
||||
|
||||
@@ -25,20 +25,18 @@ The dashboard version history feature lets you compare and restore to previously
|
||||
|
||||
To compare two dashboard versions, select the two versions from the list that you wish to compare. Once selected, the "Compare versions" button will become clickable. Click the button to view the diff between the two versions.
|
||||
|
||||
<img class="no-shadow" src="/static/img/docs/v50/dashboard_versions_select.png">
|
||||

|
||||
|
||||
Upon clicking the button, you'll be brought to the diff view. By default, you'll see a textual summary of the changes, like in the image below.
|
||||
|
||||
<img class="no-shadow" src="/static/img/docs/v50/dashboard_versions_diff_basic.png">
|
||||

|
||||
|
||||
If you want to view the diff of the raw JSON that represents your dashboard, you can do that as well by clicking the "View JSON Diff" button at the bottom.
|
||||
|
||||
If you want to restore to the version you are diffing against, you can do so by clicking the "Restore to version \<x\>" button in the top right.
|
||||
If you want to view the diff of the raw JSON that represents your dashboard, you can do that as well by clicking the expand icon for the View JSON Diff section at the bottom.
|
||||
|
||||
## Restoring to a previously saved dashboard version
|
||||
|
||||
If you need to restore to a previously saved dashboard version, you can do so by either clicking the "Restore" button on the right of a row in the dashboard version list, or by clicking the "Restore to version \<x\>" button appearing in the diff view. Clicking the button will bring up the following popup prompting you to confirm the restoration.
|
||||
If you need to restore to a previously saved dashboard version, you can do so by either clicking the "Restore" button on the right of a row in the dashboard version list, or by clicking the **Restore to version \<x\>** button appearing in the diff view. Clicking the button will bring up the following popup prompting you to confirm the restoration.
|
||||
|
||||
<img class="no-shadow" src="/static/img/docs/v50/dashboard_versions_restore.png">
|
||||

|
||||
|
||||
After restoring to a previous version, a new version will be created containing the same exact data as the previous version, only with a different version number. This is indicated in the "Notes column" for the row in the new dashboard version. This is done simply to ensure your previous dashboard versions are not affected by the change.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
title: Modify dashboard settings
|
||||
menuTitle: Dashboard settings
|
||||
menuTitle: Modify dashboard settings
|
||||
weight: 8
|
||||
keywords:
|
||||
- time settings
|
||||
@@ -12,7 +12,7 @@ keywords:
|
||||
|
||||
# Modify dashboard settings
|
||||
|
||||
The dashboard settings page enables you to:
|
||||
The dashboard settings page allows you to:
|
||||
|
||||
- Edit general dashboard properties, including time settings
|
||||
- Add annotation queries
|
||||
@@ -31,7 +31,7 @@ Adjust dashboard time settings when you want to change the dashboard timezone, t
|
||||
|
||||
1. On the **Dashboard settings** page, click **General**.
|
||||
1. Navigate to the **Time Options** section.
|
||||
1. Specify time settings according to the following descriptions.
|
||||
1. Specify time settings as follows.
|
||||
|
||||
- **Timezone:** Specify the local time zone of the service or system that you are monitoring. This can be helpful when monitoring a system or service that operates across several time zones.
|
||||
- **Default:** Grafana uses the default selected time zone for the user profile, team, or organization. If no time zone is specified for the user profile, a team the user is a member of, or the organization, then Grafana uses the local browser time.
|
||||
@@ -62,7 +62,7 @@ the dashboard. These dropdowns make it easy to change the data being displayed i
|
||||
For more information about variables, refer to [Variables]({{< relref "../../variables/" >}}).
|
||||
|
||||
1. On the **Dashboard settings** page, click **Variable** in the left side section menu and then the **Add variable** button.
|
||||
1. In the **General** section, the the name of the variable. This is the name that you will later use in queries.
|
||||
1. In the **General** section, the name of the variable. This is the name that you will later use in queries.
|
||||
1. Select a variable **Type**.
|
||||
|
||||
> **Note:** The variable type you select impacts which fields you populate on the page.
|
||||
@@ -74,7 +74,7 @@ For more information about variables, refer to [Variables]({{< relref "../../var
|
||||
Dashboard links enable you to place links to other dashboards and web sites directly below the dashboard header. Links provide for easy navigation to other, related dashboards and content.
|
||||
|
||||
1. On the **Dashboard settings** page, click **Links** in the left side section menu and then the **Add link** button.
|
||||
1. Enter title and and in the **Type** field, select **Dashboard** or **Link**.
|
||||
1. Enter title and in the **Type** field, select **Dashboard** or **Link**.
|
||||
1. To add a dashboard link:
|
||||
a. Add an optional tag. Tags are useful creating a dynamic dropdown of dashboards that all have a specific tag.
|
||||
b. Select any of the dashboard link **Options**.
|
||||
|
||||
@@ -26,21 +26,22 @@ Use the information in this section to access existing playlists. Start and cont
|
||||
|
||||
### Access a playlist
|
||||
|
||||
1. Hover your cursor over Grafana’s side menu.
|
||||
1. Click **Playlists**. You will see a list of existing playlists.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
|
||||
### Start a playlist
|
||||
|
||||
You can start a playlist in five different view modes. View mode determine how the menus and navigation bar appear on the dashboards.
|
||||
You can start a playlist in five different view modes. View modes determine how the menus and navigation bar appear on the dashboards.
|
||||
|
||||
By default, each dashboard is displayed for the amount of time entered in the Interval field, which you set when you create or edit a playlist. After you start a playlist, you can control it with the navbar at the top of the page.
|
||||
|
||||
1. [Access](#access-playlist) the playlist page to see a list of existing playlists.
|
||||
1. Find the playlist you want to start, then click **Start playlist**. The start playlist dialog opens.
|
||||
1. Select one of the five playlist modes available based on the information in the following table.
|
||||
1. Click **Start <playlist name>**.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Find the playlist you want to start, then click **Start playlist**.
|
||||
1. In the modal that opens, select one of the five playlist modes available, based on the information in the table below.
|
||||
1. Click **Start \<playlist name\>**.
|
||||
|
||||
The playlist displays each dashboard for the time specified in the `Interval` field, set when creating or editing a playlist. Once a playlist starts, you can [control](#control-a-playlist) it using the navbar at the top of your screen.
|
||||
The playlist displays each dashboard for the time specified in the **Interval** field, set when creating or editing a playlist. Once a playlist starts, you can [control](#control-a-playlist) it using the navbar at the top of your screen.
|
||||
|
||||
| Mode | Description |
|
||||
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@@ -67,7 +68,9 @@ You can control a playlist in **Normal** or **TV** mode after it's started, usin
|
||||
|
||||
You can create a playlist to present dashboards in a sequence, with a set order and time interval between dashboards.
|
||||
|
||||
1. In the playlist page, click **New playlist**. The New playlist page opens.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Click **New playlist**. The New playlist page opens.
|
||||
1. In the **Name** text box, enter a descriptive name.
|
||||
1. In the **Interval** text box, enter a time interval. Grafana displays a particular dashboard for the interval of time specified here before moving on to the next dashboard.
|
||||
1. In Dashboards, add existing dashboards to the playlist using **Add by title** and **Add by tag** drop-down options. The dashboards you add are listed in a sequential order.
|
||||
@@ -82,8 +85,8 @@ You can create a playlist to present dashboards in a sequence, with a set order
|
||||
|
||||
You can save a playlist and add it to your **Playlists** page, where you can start it. Be sure that all the dashboards you want to appear in your playlist are added when creating or editing the playlist before saving it.
|
||||
|
||||
1. To access the Playlist feature, hover your cursor over Grafana's side menu.
|
||||
1. Click **Playlists**.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Click on the playlist.
|
||||
1. Edit the playlist.
|
||||
1. Ensure that your playlist has a **Name**, **Interval**, and at least one **Dashboard** added to it.
|
||||
@@ -95,36 +98,47 @@ You can edit a playlist by updating its name, interval time, and by adding, remo
|
||||
|
||||
### Edit a playlist
|
||||
|
||||
1. In the playlist page, click **Edit playlist**. The Edit playlist page opens.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Find the playlist you want to update and click **Edit playlist**.
|
||||
1. Update the name and time interval, then add or remove dashboards from the playlist using instructions in [Create a playlist](#create-a-playlist).
|
||||
1. Click **Save** to save your changes.
|
||||
|
||||
### Delete a playlist
|
||||
|
||||
1. Click **Playlists**.
|
||||
1. Next to the Playlist you want to delete, click **Remove[x]**.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Find the playlist you want to remove.
|
||||
1. Click **Delete playlist**.
|
||||
|
||||
### Rearrange dashboard order
|
||||
|
||||
1. Next to the dashboard you want to move, click the up or down arrow.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Find the playlist you want to update and click **Edit playlist**.
|
||||
1. Click and drag the dashboards into your desired order.
|
||||
1. Click **Save** to save your changes.
|
||||
|
||||
### Remove a dashboard
|
||||
|
||||
1. Click **Remove[x]** to remove a dashboard from the playlist.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Find the playlist you want to update and click **Edit playlist**.
|
||||
1. Click **\[x\]** on the name of the dashboard you want to remove from the playlist.
|
||||
1. Click **Save** to save your changes.
|
||||
|
||||
## Share a playlist in a view mode
|
||||
|
||||
You can share a playlist by copying the link address on the view mode you prefer, and pasting the URL to your destination.
|
||||
|
||||
1. From the Dashboards submenu, click **Playlists**.
|
||||
1. Next to the playlist you want to share, click **Start playlist**.
|
||||
1. In the dropdown, right click the view mode you prefer.
|
||||
1. Click **Copy Link Address** to copy the URL to your clipboard.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **Playlists** to see a list of existing playlists.
|
||||
1. Click the share icon of the playlist you want to share.
|
||||
1. Select the view mode you prefer.
|
||||
1. Click **Copy** next to the Link URL to copy it to your clipboard.
|
||||
|
||||
Example: The URL for the first playlist on the Grafana Play site in Kiosk mode will look like this:
|
||||
For example, the URL for the first playlist on the Grafana Play site in Kiosk mode will look like this:
|
||||
|
||||
[https://play.grafana.org/playlists/play/1?kiosk](https://play.grafana.org/playlists/play/1?kiosk).
|
||||
[https://play.grafana.org/playlists/play/1?kiosk](https://play.grafana.org/playlists/play/1?kiosk).
|
||||
|
||||
1. Paste the URL to your destination.
|
||||
1. Paste the URL to your destination.
|
||||
|
||||
@@ -10,6 +10,10 @@ keywords:
|
||||
- reporting
|
||||
- export
|
||||
- pdf
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
menuTitle: Reporting
|
||||
title: Create and manage reports
|
||||
weight: 85
|
||||
@@ -26,7 +30,7 @@ Reporting enables you to automatically generate PDFs from any of your dashboards
|
||||
{{< figure src="/static/img/docs/enterprise/reports_list_8.1.png" max-width="500px" >}}
|
||||
-->
|
||||
|
||||
Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report also changes.
|
||||
Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report also changes, unless you've configured a custom time range.
|
||||
|
||||
For information about recent improvements to the reporting UI, refer to [Grafana reporting: How we improved the UX in Grafana](https://grafana.com/blog/2022/06/29/grafana-reporting-how-we-improved-the-ux-in-grafana/).
|
||||
|
||||
@@ -43,10 +47,11 @@ When [RBAC]({{< relref "../../administration/roles-and-permissions/access-contro
|
||||
|
||||
Only organization administrators can create reports by default. You can customize who can create reports with [Role-based access control]({{< relref "../../administration/roles-and-permissions/access-control/" >}}).
|
||||
|
||||
1. Click on the Reports icon in the side navigation menu.
|
||||
1. Click **Dashboards > Reports** in the side navigation menu.
|
||||
|
||||
The Reports tab allows you to view, create, and update your reports. The report form has a multi-step layout. The steps do not need to be completed in succession and can be skipped over by clicking a step name.
|
||||
The Reports page allows you to view, create, and update your reports. The report form has a multi-step layout. The steps do not need to be completed in succession and can be skipped over by clicking a step name.
|
||||
|
||||
1. Click **+ Create a new report**.
|
||||
1. Select report dashboard.
|
||||
- **Source dashboard:** Select the dashboard from which you want to generate the report.
|
||||
- **Time range:** (optional) Use custom time range for the report. For more information, refer to [Report time range]({{< relref "#report-time-range" >}}).
|
||||
@@ -68,6 +73,14 @@ Only organization administrators can create reports by default. You can customiz
|
||||
- **Send test email:** To verify that the configuration works as expected. You can choose to send this email to the recipients configured for the report, or to a different set of email addresses only used for testing.
|
||||
1. Preview and save the report.
|
||||
|
||||
### Save as draft
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 9.1.0 and later and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
{{% /admonition %}}
|
||||
|
||||
You can save a report as a draft at any point during the report creation or update process. You can save a report as a draft even if it's missing required fields. Also, the report won't be sent according to its schedule while it's a draft.
|
||||
|
||||
### Choose template variables
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.5 and later behind the `reportVariables` feature flag, Grafana Enterprise version 8.0 and later without a feature flag, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
@@ -183,7 +196,7 @@ You can generate and save PDF files of any dashboard.
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 6.7 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
|
||||
1. In the upper-right corner of the dashboard that you want to export as PDF, click the **Share dashboard** icon.
|
||||
1. In the dashboard that you want to export as PDF, click the **Share dashboard** icon.
|
||||
1. On the PDF tab, select a layout option for the exported dashboard: **Portrait** or **Landscape**.
|
||||
1. Click **Save as PDF** to render the dashboard as a PDF file.
|
||||
|
||||
@@ -230,7 +243,7 @@ font_italic = DejaVuSansCondensed-Oblique.ttf
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) version 7.2 and later, and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud/).
|
||||
|
||||
You can configure organization-wide report settings in the **Settings** tab on the **Reporting** page. Settings are applied to all the reports for current organization.
|
||||
You can configure organization-wide report settings in the **Settings** under **Dashboards > Reporting**. Settings are applied to all the reports for current organization.
|
||||
|
||||
You can customize the branding options.
|
||||
|
||||
|
||||
@@ -8,9 +8,13 @@ weight: 8
|
||||
|
||||
# Public dashboards
|
||||
|
||||
> **Note:** This is an opt-in alpha feature.
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
> **Caution:** Making your dashboard public could result in a large number of queries to the datasources used by your dashboard.
|
||||
This feature is experimental.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
> **Caution:** Making your dashboard public could result in a large number of queries to the data sources used by your dashboard.
|
||||
> This can be mitigated by utilizing the enterprise [caching](https://grafana.com/docs/grafana/latest/enterprise/query-caching/) and/or rate limiting features.
|
||||
|
||||
Public dashboards allow you to share your Grafana dashboard with anyone. This is useful when you want to expose your
|
||||
@@ -20,7 +24,7 @@ dashboard to the world.
|
||||
|
||||
- Anyone with the URL can access the dashboard.
|
||||
- Public dashboards are read-only.
|
||||
- Arbitrary queries **cannot** be run against your datasources through public dashboards. Public dashboards can only execute the
|
||||
- Arbitrary queries **cannot** be run against your data sources through public dashboards. Public dashboards can only execute the
|
||||
queries stored on the original dashboard.
|
||||
|
||||
## Enable the feature
|
||||
@@ -66,21 +70,16 @@ The link no longer works. You must create a new public URL as in [Make a dashboa
|
||||
|
||||
## Email sharing
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud Pro and Advanced](/docs/grafana-cloud).
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
This feature is experimental in [Grafana Cloud Pro and Advanced](/docs/grafana-cloud). The feature will have a cost by active users after being promoted into general availability.
|
||||
|
||||
Please contact support to have the feature enabled.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
Email sharing allows you to share your public dashboard with only specific people via email, instead of having it accessible to anyone with the URL.
|
||||
|
||||
### Enable email sharing
|
||||
|
||||
> **Note:** For Grafana Cloud, contact support to have the feature enabled.
|
||||
|
||||
Add the `publicDashboardsEmailSharing` feature toggle to your `custom.ini` file.
|
||||
|
||||
```
|
||||
[feature_toggles]
|
||||
publicDashboardsEmailSharing = true
|
||||
```
|
||||
|
||||
### Invite a viewer
|
||||
|
||||
1. Click the sharing icon to the right of the dashboard title.
|
||||
@@ -158,7 +157,7 @@ guaranteed because plugin developers can override this functionality. The follow
|
||||
|
||||
### Unconfirmed:
|
||||
|
||||
> **Note:** If you've confirmed one of these datasources work with public dashboards, let us know in our [Github](https://github.com/grafana/grafana/discussions/49253) discussion, and we'll mark it as confirmed!
|
||||
> **Note:** If you've confirmed one of these data sources work with public dashboards, let us know in our [Github](https://github.com/grafana/grafana/discussions/49253) discussion, and we'll mark it as confirmed!
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
@@ -220,14 +219,14 @@ guaranteed because plugin developers can override this functionality. The follow
|
||||
|
||||
## Limitations
|
||||
|
||||
- Panels that use frontend datasources will fail to fetch data.
|
||||
- Panels that use frontend data sources will fail to fetch data.
|
||||
- Template variables are currently not supported, but are planned to be in the future.
|
||||
- Exemplars will be omitted from the panel.
|
||||
- Only annotations that query the `-- Grafana --` datasource are supported.
|
||||
- Only annotations that query the `-- Grafana --` data source are supported.
|
||||
- Organization annotations are not supported.
|
||||
- Grafana Live and real-time event streams are not supported.
|
||||
- Library panels are currently not supported, but are planned to be in the future.
|
||||
- Datasources using Reverse Proxy functionality are not supported.
|
||||
- Data sources using Reverse Proxy functionality are not supported.
|
||||
|
||||
We are excited to share this enhancement with you and we’d love your feedback! Please check out the [Github](https://github.com/grafana/grafana/discussions/49253) discussion and join the conversation.
|
||||
|
||||
|
||||
@@ -48,14 +48,16 @@ Folders help you organize and group dashboards, which is useful when you have ma
|
||||
|
||||
**To create a dashboard folder:**
|
||||
|
||||
1. Sign in to Grafana and on the side menu, click **Dashboards > New folder**.
|
||||
1. Sign in to Grafana.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. On the Dashboards page, click **New** and select **New folder** in the dropdown.
|
||||
1. Enter a unique name and click **Create**.
|
||||
|
||||
When you save a dashboard, you can either select a folder for the dashboard to be saved in or create a new folder.
|
||||
|
||||
## Manage dashboards
|
||||
|
||||
On the **Manage dashboards and folders** page, you can:
|
||||
On the Dashboards page, you can:
|
||||
|
||||
- create a folder
|
||||
- create a dashboard
|
||||
@@ -65,17 +67,17 @@ On the **Manage dashboards and folders** page, you can:
|
||||
|
||||
### Dashboard folder page
|
||||
|
||||
You can complete the following tasks on the **Dashboard Folder** page:
|
||||
You can complete the following tasks on a dashboard folder page:
|
||||
|
||||
- Move or delete dashboards in a folder
|
||||
- Rename a folder (available under the **Settings** tab)
|
||||
- Rename a folder (available on the Settings tab)
|
||||
- Assign permissions to folders (which are inherited by the dashboards in the folder)
|
||||
|
||||
To navigate to the dashboard folder page, click the cog appears when you hover over a folder in the dashboard search result list or the **Manage dashboards and folders** page.
|
||||
To navigate to the dashboard folder page, hover over the name of the folder and click **Go to folder** in the dashboard search result list or on the Dashboards page.
|
||||
|
||||
### Dashboard permissions
|
||||
|
||||
You can assign permissions to a folder. Any permissions you assign are inherited by the dashboards in the folder. An Access Control List (ACL) is used where **Organization Role**, **Team** and a **User** can be assigned permissions.
|
||||
You can assign permissions to a folder. Any permissions you assign are inherited by the dashboards in the folder. An Access Control List (ACL) is used where **Organization Role**, **Team**, and a **User** can be assigned permissions.
|
||||
|
||||
For more information about dashboard permissions, refer to [Dashboard permissions]({{< relref "../../administration/roles-and-permissions/#dashboard-permissions" >}}).
|
||||
|
||||
@@ -87,10 +89,11 @@ You can use the Grafana UI or the [HTTP API]({{< relref "../../developers/http_a
|
||||
|
||||
The dashboard export action creates a Grafana JSON file that contains everything you need, including layout, variables, styles, data sources, queries, and so on, so that you can later import the dashboard.
|
||||
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Open the dashboard you want to export.
|
||||
2. Click the **Share** icon.
|
||||
3. Click **Export**.
|
||||
4. Click **Save to file**.
|
||||
1. Click the **Share** icon.
|
||||
1. Click **Export**.
|
||||
1. Click **Save to file**.
|
||||
|
||||
Grafana downloads a JSON file to your local machine.
|
||||
|
||||
@@ -102,7 +105,8 @@ A template variable of the type `Constant` will automatically be hidden in the d
|
||||
|
||||
### Import a dashboard
|
||||
|
||||
1. Click **Dashboards > Import** in the side menu.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click **New** and select **Import** in the dropdown menu.
|
||||
1. Perform one of the following steps:
|
||||
|
||||
- Upload a dashboard JSON file
|
||||
@@ -118,7 +122,7 @@ The import process enables you to change the name of the dashboard, pick the dat
|
||||
|
||||
Find dashboards for common server applications at [Grafana.com/dashboards](https://grafana.com/dashboards).
|
||||
|
||||
{{< figure src="/static/img/docs/v50/gcom_dashboard_list.png" max-width="700px" >}}
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-gcom-dashboards.png" >}}
|
||||
|
||||
## Troubleshoot dashboards
|
||||
|
||||
|
||||
@@ -52,10 +52,11 @@ You can share a dashboard as a direct link or as a snapshot. You can also export
|
||||
|
||||
> **Note:** If you change a dashboard, ensure that you save the changes before sharing.
|
||||
|
||||
1. Navigate to the home page of your Grafana instance.
|
||||
1. Click on the share icon in the top navigation.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click the dashboard you want to share.
|
||||
1. Click the share icon at the top of the screen.
|
||||
|
||||
The share dialog opens and shows the **Link** tab.
|
||||
The share dialog opens and shows the Link tab.
|
||||
|
||||
### Share a direct link
|
||||
|
||||
@@ -73,7 +74,8 @@ A dashboard snapshot shares an interactive dashboard publicly. Grafana strips se
|
||||
|
||||
You can publish snapshots to your local instance or to [snapshots.raintank.io](http://snapshots.raintank.io). The latter is a free service provided by Grafana Labs that enables you to publish dashboard snapshots to an external Grafana instance. Anyone with the link can view it. You can set an expiration time if you want the snapshot removed after a certain time period.
|
||||
|
||||
1. Click **Local Snapshot** or **Publish to snapshots.raintank.io**.
|
||||
1. Click the **Snapshot** tab.
|
||||
1. Click **Publish to snapshots.raintank.io** or **Local Snapshot**.
|
||||
|
||||
Grafana generates a link of the snapshot.
|
||||
|
||||
@@ -91,7 +93,9 @@ You can generate and save PDF files of any dashboard.
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}).
|
||||
|
||||
1. In the upper-right corner of the dashboard that you want to export as PDF, click the **Share dashboard** icon.
|
||||
1. Click **Dashboards** in the left-side menu.
|
||||
1. Click the dashboard you want to share.
|
||||
1. Click the share icon at the top of the screen.
|
||||
1. On the PDF tab, select a layout option for the exported dashboard: **Portrait** or **Landscape**.
|
||||
1. Click **Save as PDF** to render the dashboard as a PDF file.
|
||||
|
||||
@@ -101,8 +105,8 @@ You can generate and save PDF files of any dashboard.
|
||||
|
||||
You can share a panel as a direct link, as a snapshot, or as an embedded link. You can also create library panels using the **Share** option on any panel.
|
||||
|
||||
1. Click a panel title to open the panel menu.
|
||||
1. Click **Share**.
|
||||
1. Hover over any part of the panel to display the actions menu on the top right corner.
|
||||
1. Click the menu and select **Share**.
|
||||
|
||||
The share dialog opens and shows the **Link** tab.
|
||||
|
||||
@@ -139,8 +143,8 @@ A panel snapshot shares an interactive panel publicly. Grafana strips sensitive
|
||||
|
||||
You can publish snapshots to your local instance or to [snapshots.raintank.io](http://snapshots.raintank.io). The latter is a free service provided by [Grafana Labs](https://grafana.com), that enables you to publish dashboard snapshots to an external Grafana instance. You can optionally set an expiration time if you want the snapshot to be removed after a certain time period.
|
||||
|
||||
1. In the **Share Panel** dialog, click **Snapshot** to open the tab.
|
||||
1. Click **Local Snapshot** or **Publish to snapshots.raintank.io**.
|
||||
1. In the **Share Panel** dialog, click **Snapshot** to go to the tab.
|
||||
1. Click **Publish to snapshots.raintank.io** or **Local Snapshot**.
|
||||
|
||||
Grafana generates the link of the snapshot.
|
||||
|
||||
|
||||
@@ -25,29 +25,30 @@ This topic provides an overview of dashboard features and shortcuts, and describ
|
||||
|
||||
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.
|
||||
The following image and descriptions highlight all dashboard features.
|
||||
|
||||
{{< figure src="/static/img/docs/v91/dashboard-features/dashboard-features.png" width="700px" >}}
|
||||
{{< figure src="/media/docs/grafana/dashboards/screenshot-dashboard-annotated-9-5-0.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 a new panel** (4): Use this option to add a panel, dashboard row, or library panel to the current dashboard.
|
||||
- **Dashboard settings** (5): Use this option to change dashboard name, folder, and tags and manage variables and annotation queries. For more information about dashboard settings, refer to [Modify dashboard settings]({{< relref "../build-dashboards/modify-dashboard-settings/" >}}).
|
||||
- **Time picker dropdown** (6): Click to select relative time range options and set custom absolute time ranges.
|
||||
- (1) **Grafana home**: Click **Home** in the breadcrumb to be redirected to the home page configured in the Grafana instance.
|
||||
- (2) **Dashboard title**: When you click the dashboard title, you can search for dashboards contained in the current folder.
|
||||
- (3) **Share dashboard or panel**: Use this option to share the current dashboard or panel using a link or snapshot. You can also export the dashboard definition from the share modal.
|
||||
- (4) **Add**: Use this option to add a panel, dashboard row, or library panel to the current dashboard.
|
||||
- (5) **Save dashboard**: Click to save changes to your dashboard.
|
||||
- (6) **Dashboard insights**: Click to view analytics about your dashboard including information about users, activity, query counts. Learn more about [dashboard analytics]({{< relref "../assess-dashboard-usage/" >}}).
|
||||
- (7) **Dashboard settings**: Use this option to change dashboard name, folder, and tags and manage variables and annotation queries. Learn more about [dashboard settings]({{< relref "../build-dashboards/modify-dashboard-settings/" >}}).
|
||||
- (8) **Time picker dropdown**: Click to select relative time range options and set custom absolute time ranges.
|
||||
- You can change the **Timezone** and **fiscal year** settings from the time range controls by clicking the **Change time settings** button.
|
||||
- Time settings are saved on a per-dashboard basis.
|
||||
- **Zoom out time range** (7): Click to zoom out the time range. For more information about how to use time range controls, refer to [Common time range controls]({{< relref "#common-time-range-controls" >}}).
|
||||
- **Refresh dashboard** (8): Click to immediately trigger queries and refresh dashboard data.
|
||||
- **Refresh dashboard time interval** (9): Click to select a dashboard auto refresh time interval.
|
||||
- **View mode** (10): Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. For more information about view mode, refer to [How to Create Kiosks to Display Dashboards on a TV](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
|
||||
- **Dashboard panel** (11): The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
|
||||
- (9) **Zoom out time range**: Click to zoom out the time range. Learn more about how to use [common time range controls]({{< relref "#common-time-range-controls" >}}).
|
||||
- (10) **Refresh dashboard**: Click to immediately trigger queries and refresh dashboard data.
|
||||
- (11) **Refresh dashboard time interval**: Click to select a dashboard auto refresh time interval.
|
||||
- (12) **View mode**: Click to display the dashboard on a large screen such as a TV or a kiosk. View mode hides irrelevant information such as navigation menus. Learn more about view mode in our [How to Create Kiosks to Display Dashboards on a TV blog post](https://grafana.com/blog/2019/05/02/grafana-tutorial-how-to-create-kiosks-to-display-dashboards-on-a-tv/).
|
||||
- (13) **Dashboard panel**: The primary building block of a dashboard is the panel. To add a new panel, dashboard row, or library panel, click **Add panel**.
|
||||
- Library panels can be shared among many dashboards.
|
||||
- To move a panel, drag the panel header to another location.
|
||||
- To resize a panel, click and drag the lower right corner of the panel.
|
||||
- **Graph legend** (12): Change series colors, y-axis and series visibility directly from the legend.
|
||||
- **Search** (13): Click **Search** to search for dashboards by name or panel title.
|
||||
- **Dashboard row** (14): A dashboard row is a logical divider within a dashboard that groups panels together.
|
||||
- (14) **Graph legend**: Change series colors, y-axis and series visibility directly from the legend.
|
||||
- (15) **Dashboard row**: A dashboard row is a logical divider within a dashboard that groups panels together.
|
||||
- Rows can be collapsed or expanded allowing you to hide parts of the dashboard.
|
||||
- Panels inside a collapsed row do not issue queries.
|
||||
- Use [repeating rows]({{< relref "../build-dashboards/create-dashboard/#configure-repeating-rows" >}}) to dynamically create rows based on a template variable.
|
||||
@@ -85,7 +86,7 @@ This section describes supported time units and relative ranges, the common time
|
||||
|
||||
Grafana supports the following time units: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `Q (quarters)` and `y (years)`.
|
||||
|
||||
The minus operator enables you to step back in time, relative to now. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
|
||||
The minus operator enables you to step back in time, relative to the current date and time, or `now`. If you want to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end. To view fiscal periods, use `fQ (fiscal quarter)` and `fy (fiscal year)` time units.
|
||||
|
||||
The plus operator enables you to step forward in time, relative to now. For example, you can use this feature to look at predicted data in the future.
|
||||
|
||||
@@ -104,13 +105,15 @@ The following table provides example relative ranges:
|
||||
| This Year | `now/Y` | `now/Y` |
|
||||
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
|
||||
|
||||
#### Note about Grafana Alerting
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
For Grafana Alerting, we do not support the following syntaxes at this time.
|
||||
Grafana Alerting does not support the following syntaxes at this time:
|
||||
|
||||
- now+n for future timestamps.
|
||||
- now-1n/n for "start of n until end of n" because this is an absolute timestamp.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
### Common time range controls
|
||||
|
||||
The dashboard and panel time controls have a common UI.
|
||||
@@ -129,7 +132,7 @@ Hover your cursor over the field to see the exact time stamps in the range and t
|
||||
|
||||
Click the current time range to change it. You can change the current time using a _relative time range_, such as the last 15 minutes, or an _absolute time range_, such as `2020-05-14 00:00:00 to 2020-05-15 23:59:59`.
|
||||
|
||||
<img class="no-shadow" src="/static/img/docs/time-range-controls/change-current-time-range-7-0.png" max-width="900px">
|
||||
<img class="no-shadow" src="/media/docs/grafana/dashboards/screenshot-change-current-time-range.png" max-width="900px">
|
||||
|
||||
#### Relative time range
|
||||
|
||||
@@ -155,6 +158,32 @@ You can set an absolute time range in the following ways:
|
||||
|
||||
This section also displays recently used absolute ranges.
|
||||
|
||||
#### Semi-relative time range
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
|
||||
Grafana Alerting does not support semi-relative time ranges.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
You can also use the absolute time range settings to set a semi-relative time range. Semi-relative time range dashboards are useful when you need to monitor the progress of something over time, but you also want to see the entire history from a starting point.
|
||||
|
||||
Set a semi-relative time range by setting the start time to an absolute timestamp and the end time to a “now” that is relative to the current time. For example:
|
||||
|
||||
**Start time:** `2023-05-01 00:00:00`
|
||||
|
||||
**End time:** `now`
|
||||
|
||||
If you wanted to track the progress of something during business hours, you could set a time range that covers the current day, but starting at 8am, like so:
|
||||
|
||||
**Start time:** `now/d+8h`
|
||||
|
||||
**End time:** `now`
|
||||
|
||||
This is equivalent to the **Today so far** time range preset, but it starts at 8:00am instead of 12:00am by appending +8h to the periodic start time.
|
||||
|
||||
Using a semi-relative time range, as time progresses, your dashboard will automatically and progressively zoom out to show more history and fewer details. At the same rate, as high data resolution decreases, historical trends over the entire time period will become more clear.
|
||||
|
||||
#### Zoom out (Cmd+Z or Ctrl+Z)
|
||||
|
||||
Click the **Zoom out** icon to view a larger time range in the dashboard or panel visualization.
|
||||
|
||||
@@ -45,20 +45,19 @@ To see variable settings, navigate to **Dashboard Settings > Variables**. Click
|
||||
|
||||
Variables can be used in titles, descriptions, text panels, and queries. Queries with text that starts with `$` are templates. Not all panels will have template queries.
|
||||
|
||||
The following dashboards in Grafana Play provide examples of template variables.
|
||||
The following dashboards in Grafana Play provide examples of template variables:
|
||||
|
||||
- [Elasticsearch Metrics](https://play.grafana.org/d/z8OZC66nk/elasticsearch-8-2-0-sample-flight-data?orgId=1) - Uses ad hoc filters, global variables, and a custom variable.
|
||||
- [Graphite Templated Nested](https://play.grafana.org/d/000000056/graphite-templated-nested?orgId=1) - Uses query variables, chained query variables, an interval variable, and a repeated panel.
|
||||
- [Influx DB Group By Variable](https://play.grafana.org/d/000000137/influxdb-group-by-variable?orgId=1) - Query variable, panel uses the variable results to group the metric data.
|
||||
- [InfluxDB Raw Query Template Var](https://play.grafana.org/d/000000083/influxdb-raw-query-template-var?orgId=1) - Uses query variables, chained query variables, and an interval variable.
|
||||
- [InfluxDB Server Monitoring](https://play.grafana.org/d/AAy9r_bmk/influxdb-server-monitoring?orgId=1) - Uses query variables, chained query variables, an interval variable, and an ad hoc filter.
|
||||
- [Prometheus templating](https://play.grafana.org/d/000000063/prometheus-templating?orgId=1) - Uses chained query variables.
|
||||
- [Template Redux](https://play.grafana.org/d/p-k6QtkGz/template-redux?orgId=1) - Uses query variables, chained query variables, ad hoc filters, an interval variable, a text box variable, a custom variable, and a data source variable.
|
||||
- [Graphite Templated Nested](https://play.grafana.org/d/000000056/templated-dynamic-dashboard?orgId=1&var-app=backend&var-server=backend_01&var-server=backend_02&var-server=backend_03&var-server=backend_04&var-interval=1h) - Uses query variables, chained query variables, an interval variable, and a repeated panel.
|
||||
- [Global variables and interpolation](https://play.grafana.org/d/HYaGDGIMk/templating-global-variables-and-interpolation?orgId=1&var-Server=A%27A%22A&var-Server=BB%5CB)
|
||||
- [Elasticsearch Dummy Flight Data](https://play.grafana.org/d/z8OZC66nk/elasticsearch-8-2-0-sample-flight-data?orgId=1&var-Filters=Carrier%7C%3D%7CLogstash%20Airways&var-query0=) - Uses ad hoc filters.
|
||||
- [Templating, repeated panels](https://play.grafana.org/d/000000025/templating-repeated-panels?orgId=1) - Two sets of repeated panels use query variables.
|
||||
- [Templating showcase](https://play.grafana.org/d/000000091/templating-showcase?orgId=1) - Uses custom, query, chained query, and data source variables.
|
||||
- [Templating value groups](https://play.grafana.org/d/000000024/templating-value-groups?orgId=1) - Uses query variable with value groups.
|
||||
- [Template Redux](https://play.grafana.org/d/p-k6QtkGz/template-redux?orgId=1) - Uses query variables, chained query variables, an interval variable, a text box variable, a custom variable, and a data source variable.
|
||||
- [Nested Variables Drilldown](https://play.grafana.org/d/testdata-nested-variables-drilldown/templating-nested-variables-drilldown?orgId=1&var-datacenter=A&var-server=AA&var-server=AC&var-pod=All)
|
||||
|
||||
## Variable best practices
|
||||
|
||||
- Variable drop-down lists are displayed in the order they are listed in the variable list in Dashboard settings.
|
||||
- Put the variables that you will change often at the top, so they will be shown first (far left on the dashboard).
|
||||
- By default, variables don't have a default value. This means that the topmost value in the drop-down is always preselected. If you want to pre-populate a variable with an empty value, you can use the following workaround in the variable settings:
|
||||
1. Select the **Include All Option** checkbox.
|
||||
2. In the **Custom all value** field, enter a value like `+`.
|
||||
|
||||
@@ -44,17 +44,17 @@ weight: 100
|
||||
|
||||
The following table lists the types of variables shipped with Grafana.
|
||||
|
||||
| Variable type | Description |
|
||||
| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Query | Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on. [Add a query variable]({{< relref "#add-a-query-variable" >}}). |
|
||||
| Custom | Define the variable options manually using a comma-separated list. [Add a custom variable]({{< relref "#add-a-custom-variable" >}}). |
|
||||
| Text box | Display a free text input field with an optional default value. [Add a text box variable]({{< relref "#add-a-text-box-variable" >}}). |
|
||||
| Constant | Define a hidden constant. [Add a constant variable]({{< relref "#add-a-constant-variable" >}}). |
|
||||
| Data source | Quickly change the data source for an entire dashboard. [Add a data source variable]({{< relref "#add-a-data-source-variable" >}}). |
|
||||
| Interval | Interval variables represent time spans. [Add an interval variable]({{< relref "#add-an-interval-variable" >}}). |
|
||||
| Ad hoc filters | Key/value filters that are automatically added to all metric queries for a data source (InfluxDB, Prometheus, and Elasticsearch only). [Add ad hoc filters]({{< relref "#add-ad-hoc-filters" >}}). |
|
||||
| Global variables | Built-in variables that can be used in expressions in the query editor. Refer to [Global variables]({{< relref "#global-variables" >}}). |
|
||||
| Chained variables | Variable queries can contain other variables. Refer to [Chained variables]({{< relref "#chained-variables" >}}). |
|
||||
| Variable type | Description |
|
||||
| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Query | Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on. [Add a query variable]({{< relref "#add-a-query-variable" >}}). |
|
||||
| Custom | Define the variable options manually using a comma-separated list. [Add a custom variable]({{< relref "#add-a-custom-variable" >}}). |
|
||||
| Text box | Display a free text input field with an optional default value. [Add a text box variable]({{< relref "#add-a-text-box-variable" >}}). |
|
||||
| Constant | Define a hidden constant. [Add a constant variable]({{< relref "#add-a-constant-variable" >}}). |
|
||||
| Data source | Quickly change the data source for an entire dashboard. [Add a data source variable]({{< relref "#add-a-data-source-variable" >}}). |
|
||||
| Interval | Interval variables represent time spans. [Add an interval variable]({{< relref "#add-an-interval-variable" >}}). |
|
||||
| Ad hoc filters | Key/value filters that are automatically added to all metric queries for a data source (Prometheus, Loki, InfluxDB, and Elasticsearch only). [Add ad hoc filters]({{< relref "#add-ad-hoc-filters" >}}). |
|
||||
| Global variables | Built-in variables that can be used in expressions in the query editor. Refer to [Global variables]({{< relref "#global-variables" >}}). |
|
||||
| Chained variables | Variable queries can contain other variables. Refer to [Chained variables]({{< relref "#chained-variables" >}}). |
|
||||
|
||||
## Enter General options
|
||||
|
||||
@@ -194,7 +194,7 @@ Ad hoc filters are one of the most complex and flexible variable options availab
|
||||
|
||||
Interpolating a variable with multiple values selected is tricky as it is not straight forward how to format the multiple values into a string that is valid in the given context where the variable is used. Grafana tries to solve this by allowing each data source plugin to inform the templating interpolation engine what format to use for multiple values.
|
||||
|
||||
> **Note:** The **Custom all value** option on the variable must be blank for Grafana to format all values into a single string. If leave it blank, then the Grafana concatenates (adds together) all the values in the query. Something like `value1,value2,value3`. If a custom `all` value is used, then instead the value will be something like `*` or `all`.
|
||||
> **Note:** The **Custom all value** option on the variable must be blank for Grafana to format all values into a single string. If it is left blank, then Grafana concatenates (adds together) all the values in the query. Something like `value1,value2,value3`. If a custom `all` value is used, then instead the value will be something like `*` or `all`.
|
||||
|
||||
#### Multi-value variables with a Graphite data source
|
||||
|
||||
@@ -247,13 +247,13 @@ Grafana has two built-in time range variables: `$__from` and `$__to`. They are c
|
||||
|
||||
> **Note:** This special formatting syntax is only available in Grafana 7.1.2+
|
||||
|
||||
| Syntax | Example result | Description |
|
||||
| ------------------------ | ------------------------ | --------------------------------------------------------------------------------------------------------- |
|
||||
| `${__from}` | 1594671549254 | Unix millisecond epoch |
|
||||
| `${__from:date}` | 2020-07-13T20:19:09.254Z | No args, defaults to ISO 8601/RFC 3339 |
|
||||
| `${__from:date:iso}` | 2020-07-13T20:19:09.254Z | ISO 8601/RFC 3339 |
|
||||
| `${__from:date:seconds}` | 1594671549 | Unix seconds epoch |
|
||||
| `${__from:date:YYYY-MM}` | 2020-07 | Any custom [date format](https://momentjs.com/docs/#/displaying/) that does not include the `:` character |
|
||||
| Syntax | Example result | Description |
|
||||
| ------------------------ | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `${__from}` | 1594671549254 | Unix millisecond epoch |
|
||||
| `${__from:date}` | 2020-07-13T20:19:09.254Z | No args, defaults to ISO 8601/RFC 3339 |
|
||||
| `${__from:date:iso}` | 2020-07-13T20:19:09.254Z | ISO 8601/RFC 3339 |
|
||||
| `${__from:date:seconds}` | 1594671549 | Unix seconds epoch |
|
||||
| `${__from:date:YYYY-MM}` | 2020-07 | Any custom [date format](https://momentjs.com/docs/#/displaying/) that does not include the `:` character. Uses browser time. Use `:date` or `:date:iso` for UTC |
|
||||
|
||||
The syntax above also works with `${__to}`.
|
||||
|
||||
@@ -281,6 +281,8 @@ This variable is the `$__interval` variable in milliseconds, not a time interval
|
||||
|
||||
This variable is only available in the Singlestat panel and can be used in the prefix or suffix fields on the Options tab. The variable will be replaced with the series name or alias.
|
||||
|
||||
> **Note:** The Singlestat panel is no longer available from Grafana 8.0.
|
||||
|
||||
### $\_\_org
|
||||
|
||||
This variable is the ID of the current organization.
|
||||
@@ -398,7 +400,7 @@ apps.fakesite.web_server_01.cpu.*
|
||||
|
||||
#### InfluxDB example
|
||||
|
||||
In this example, you have several data centers. Each data center has a different subset of hosts. It is based on the [InfluxDB Templated](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1).
|
||||
In this example, you have several data centers. Each data center has a different subset of hosts. It is based on the [InfluxDB Templated](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1) dashboard.
|
||||
|
||||
In this example, when the user changes the value of the `datacenter` variable, it changes the dropdown options returned by the `host` variable. The `host` variable uses the **Multi-value** option and **Include all option**, allowing users to select some or all options presented at any time. The `datacenter` does not use either option, so you can only select one data center at a time.
|
||||
|
||||
@@ -407,7 +409,7 @@ In this example, when the user changes the value of the `datacenter` variable, i
|
||||
The query for this variable basically says, "Give me all the data centers that exist."
|
||||
|
||||
```
|
||||
SHOW TAG VALUES WITH KEY = "datacenter"
|
||||
SHOW TAG VALUES WITH KEY = "datacenter"
|
||||
```
|
||||
|
||||
The values returned are `America`, `Africa`, `Asia`, and `Europe`.
|
||||
@@ -567,7 +569,7 @@ demo.robustperception.io:9100
|
||||
|
||||
Using named capture groups, you can capture separate 'text' and 'value' parts from the options returned by the variable query. This allows the variable drop-down list to contain a friendly name for each value that can be selected.
|
||||
|
||||
For example, when querying the `node_hwmon_chip_names` Prometheus metric, the `chip_name` is a lot friendlier that the `chip` value. So the following variable query result:
|
||||
For example, when querying the `node_hwmon_chip_names` Prometheus metric, the `chip_name` is a lot friendlier than the `chip` value. So the following variable query result:
|
||||
|
||||
```text
|
||||
node_hwmon_chip_names{chip="0000:d7:00_0_0000:d8:00_0",chip_name="enp216s0f0np0"} 1
|
||||
|
||||
@@ -22,7 +22,7 @@ Panel titles and metric queries can refer to variables using two different synta
|
||||
This syntax is easy to read, but it does not allow you to use a variable in the middle of a word.
|
||||
**Example:** apps.frontend.$server.requests.count
|
||||
- `${var_name}` Use this syntax when you want to interpolate a variable in the middle of an expression.
|
||||
- `${var_name:<format>}` This format gives you more control over how Grafana interpolates values. Refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options/" >}}) for more detail on all the formatting types.
|
||||
- `${var_name:<format>}` This format gives you more control over how Grafana interpolates values. Refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options" >}}) for more detail on all the formatting types.
|
||||
- `[[varname]]` Do not use. Deprecated old syntax, will be removed in a future release.
|
||||
|
||||
Before queries are sent to your data source the query is _interpolated_, meaning the variable is replaced with its current value. During
|
||||
@@ -30,7 +30,7 @@ interpolation, the variable value might be _escaped_ in order to conform to the
|
||||
For example, a variable used in a regex expression in an InfluxDB or Prometheus query will be regex escaped. Read the data source specific
|
||||
documentation topic for details on value escaping during interpolation.
|
||||
|
||||
For advanced syntax to override data source default formatting, refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options/" >}}).
|
||||
For advanced syntax to override data source default formatting, refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options" >}}).
|
||||
|
||||
## Advanced variable format options
|
||||
|
||||
|
||||
@@ -2,12 +2,7 @@
|
||||
aliases:
|
||||
- data-sources/
|
||||
- overview/
|
||||
cascade:
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
- ./features/datasources/
|
||||
title: Data sources
|
||||
weight: 60
|
||||
---
|
||||
|
||||
@@ -28,24 +28,25 @@ When using Prometheus, contact points and notification policies are read-only in
|
||||
|
||||
## Configure the data source
|
||||
|
||||
**To access the data source configuration page:**
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Select the **Data sources** section from the **Administration** menu
|
||||
2. Select the **Alertmanager** data source
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Enter `Alertmanager` in the search bar.
|
||||
1. Click **Alertmanager**.
|
||||
|
||||
Set the data source's basic configuration options carefully:
|
||||
The **Settings** tab of the data source is displayed.
|
||||
|
||||
| Name | Description |
|
||||
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Name** | Sets the name you use to refer to the data source |
|
||||
| **Default** | Sets whether the data source is pre-selected for new panels and queries |
|
||||
| **Alertmanager** | |
|
||||
| **Implementation** | Alertmanager implementation. **Mimir**, **Cortex,** and **Prometheus** are supported |
|
||||
| **Receive Grafana Alerts** | When enabled the Alertmanager receives alert instances from Grafana-managed alert rules. **Important:** It works only if Grafana alerting is configured to send its alert instances to external Alertmanagers |
|
||||
| **HTTP** | |
|
||||
| **URL** | Sets the HTTP protocol, IP, and port of your Alertmanager instance, such as `https://alertmanager.example.org:9093` |
|
||||
| **Access** | Only **Server** access mode is functional |
|
||||
| | |
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Name** | Sets the name you use to refer to the data source |
|
||||
| **Default** | Sets whether the data source is pre-selected for new panels and queries |
|
||||
| **Alertmanager Implementation** | Alertmanager implementation. **Mimir**, **Cortex,** and **Prometheus** are supported |
|
||||
| **Receive Grafana Alerts** | When enabled the Alertmanager receives alert instances from Grafana-managed alert rules. **Important:** It works only if Grafana alerting is configured to send its alert instances to external Alertmanagers |
|
||||
| **HTTP URL** | Sets the HTTP protocol, IP, and port of your Alertmanager instance, such as `https://alertmanager.example.org:9093` |
|
||||
| **Access** | Only **Server** access mode is functional |
|
||||
|
||||
## Provision the Alertmanager data source
|
||||
|
||||
|
||||
@@ -31,11 +31,12 @@ Once you've added the data source, you can [configure it]({{< relref "#configure
|
||||
|
||||
## Configure the data source
|
||||
|
||||
**To access the data source configuration page:**
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Enter `CloudWatch` in the search bar.
|
||||
1. Click **CloudWatch**.
|
||||
|
||||
1. Hover the cursor over the **Configuration** (gear) icon.
|
||||
1. Select **Data Sources**.
|
||||
1. Select the CloudWatch data source.
|
||||
The **Settings** tab of the data source is displayed.
|
||||
|
||||
### Configure AWS authentication
|
||||
|
||||
@@ -375,3 +376,7 @@ For more information, refer to the AWS documentation for [Service Quotas](https:
|
||||
The CloudWatch plugin enables you to monitor and troubleshoot applications across multiple regional accounts. Using cross-account observability, you can seamlessly search, visualize and analyze metrics and logs without worrying about account boundaries.
|
||||
|
||||
To use this feature, configure in the [AWS console under Cloudwatch Settings](https://aws.amazon.com/blogs/aws/new-amazon-cloudwatch-cross-account-observability/), a monitoring and source account, and then add the necessary IAM permissions as described above.
|
||||
|
||||
## CloudWatch Logs data protection
|
||||
|
||||
CloudWatch Logs can safeguard data by using log group data protection policies. If you have data protection enabled for a log group, then any sensitive data that matches the data identifiers you've selected will be masked. In order to view masked data you will need to have the `logs:Unmask` IAM permission enabled. See the AWS documentation on how to [help protect sensitive log data with masking](https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/mask-sensitive-log-data.html) to learn more about this.
|
||||
|
||||
@@ -129,6 +129,11 @@ The Azure documentation includes resources to help you learn KQL:
|
||||
- [Tutorial: Use Kusto queries in Azure Monitor](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/tutorial?pivots=azuremonitor)
|
||||
- [SQL to Kusto cheat sheet](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/sqlcheatsheet)
|
||||
|
||||
> **Implicit dashboard time range usage:** As of Grafana v9.4.12 and v10.0, all Azure Monitor Logs queries
|
||||
> will use the specified dashboard or Explore time range by default.
|
||||
> Any query making use of a time range explicitly specified in the query body will have their query
|
||||
> executed against the intersection of the two time ranges. For more details on this change, refer to the [Azure Monitor Logs API documentation](https://learn.microsoft.com/en-us/rest/api/loganalytics/dataaccess/query/get?tabs=HTTP#uri-parameters).
|
||||
|
||||
This example query returns a virtual machine's CPU performance, averaged over 5ms time grains:
|
||||
|
||||
```kusto
|
||||
|
||||
@@ -24,33 +24,36 @@ Once you've added the Graphite data source, you can [configure it]({{< relref "#
|
||||
|
||||
## Configure the data source
|
||||
|
||||
**To access the data source configuration page:**
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Hover the cursor over the **Configuration** (gear) icon.
|
||||
1. Select **Data Sources**.
|
||||
1. Select the Graphite data source.
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Enter `Graphite` in the search bar.
|
||||
1. Click **Graphite**.
|
||||
|
||||
Set the data source's basic configuration options carefully:
|
||||
The **Settings** tab of the data source is displayed.
|
||||
|
||||
| Name | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Sets whether the data source is pre-selected for new panels. You can set only one default data source per organization. |
|
||||
| **URL** | Sets the HTTP protocol, IP, and port of your graphite-web or graphite-api installation. |
|
||||
| **Auth** | For details, refer to [Configure Authentication]({{< relref "../../setup-grafana/configure-security/configure-authentication/" >}}). |
|
||||
| **Basic Auth** | Enables basic authentication to the data source. |
|
||||
| **User** | Sets the user name for basic authentication. |
|
||||
| **Password** | Sets the password for basic authentication. |
|
||||
| **Custom HTTP Headers** | Click **Add header** to add a custom HTTP header. |
|
||||
| **Header** | Defines the custom header name. |
|
||||
| **Value** | Defines the custom header value. |
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Sets whether the data source is pre-selected for new panels. You can set only one default data source per organization. |
|
||||
| **URL** | Sets the HTTP protocol, IP, and port of your graphite-web or graphite-api installation. |
|
||||
| **Auth** | For details, refer to [Configure Authentication]({{< relref "../../setup-grafana/configure-security/configure-authentication/" >}}). |
|
||||
| **Basic Auth** | Enables basic authentication to the data source. |
|
||||
| **User** | Sets the user name for basic authentication. |
|
||||
| **Password** | Sets the password for basic authentication. |
|
||||
| **Custom HTTP Headers** | Click **Add header** to add a custom HTTP header. |
|
||||
| **Header** | Defines the custom header name. |
|
||||
| **Value** | Defines the custom header value. |
|
||||
|
||||
You can also configure settings specific to the Graphite data source:
|
||||
|
||||
| Name | Description |
|
||||
| ----------- | -------------------------------- |
|
||||
| **Version** | Select your version of Graphite. |
|
||||
| **Type** | Select your type of Graphite. |
|
||||
| Name | Description |
|
||||
| ----------- | -------------------------------------------------------------------------------------------------------- |
|
||||
| **Version** | Select your version of Graphite. If you are using Grafana Cloud Graphite, this should be set to `1.1.x`. |
|
||||
| **Type** | Select your type of Graphite. If you are using Grafana Cloud Graphite, this should be set to `Default`. |
|
||||
|
||||
### Integrate with Loki
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ weight: 700
|
||||
|
||||
# InfluxDB data source
|
||||
|
||||
{{< docs/shared "influxdb/intro.md" >}}
|
||||
{{< docs/shared lookup="influxdb/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
Grafana includes built-in support for InfluxDB.
|
||||
This topic explains options, variables, querying, and other features specific to the InfluxDB data source, which include its [feature-rich code editor for queries and visual query builder]({{< relref "./query-editor/" >}}).
|
||||
@@ -41,14 +41,13 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Set the data source's basic configuration options carefully:
|
||||
|
||||
| Name | Description |
|
||||
|
||||
| Name | Description |
|
||||
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. We recommend something like `InfluxDB-InfluxQL`. |
|
||||
| **Default** | Sets whether the data source is pre-selected for new panels. |
|
||||
| **URL** | The HTTP protocol, IP address, and port of your InfluxDB API. InfluxDB's default API port is 8086. |
|
||||
| **Min time interval** | _(Optional)_ Refer to [Min time interval]({{< relref "#configure-min-time-interval" >}}). |
|
||||
| **Max series** | _(Optional)_ Limits the number of series and tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have many small time series and not all are shown. Defaults to 1,000. |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. We recommend something like `InfluxDB-InfluxQL`. |
|
||||
| **Default** | Sets whether the data source is pre-selected for new panels. |
|
||||
| **URL** | The HTTP protocol, IP address, and port of your InfluxDB API. InfluxDB's default API port is 8086. |
|
||||
| **Min time interval** | _(Optional)_ Refer to [Min time interval]({{< relref "#configure-min-time-interval" >}}). |
|
||||
| **Max series** | _(Optional)_ Limits the number of series and tables that Grafana processes. Lower this number to prevent abuse, and increase it if you have many small time series and not all are shown. Defaults to 1,000. |
|
||||
|
||||
You can also configure settings specific to the InfluxDB data source. These options are described in the sections below.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ weight: 300
|
||||
|
||||
# Loki query editor
|
||||
|
||||
The Loki data source's query editor helps you create [log]({{< relref "#create-a-logs-query" >}}) and [metric]({{< relref "#create-a-metrics-query" >}}) queries that use Loki's query language, [LogQL](/docs/loki/latest/logql/).
|
||||
The Loki data source's query editor helps you create [log]({{< relref "#create-a-log-query" >}}) and [metric]({{< relref "#create-a-metric-query" >}}) queries that use Loki's query language, [LogQL](/docs/loki/latest/logql/).
|
||||
|
||||
This topic explains querying specific to the Loki data source.
|
||||
For general documentation on querying data sources in Grafana, see [Query and transform data]({{< relref "../../../panels-visualizations/query-transform-data" >}}).
|
||||
|
||||
@@ -47,3 +47,29 @@ For more information, refer to [Add ad hoc filters]({{< relref "../../../dashboa
|
||||
You can use some global built-in variables in query variables: `$__interval`, `$__interval_ms`, `$__range`, `$__range_s`, and `$__range_ms`.
|
||||
|
||||
For more information, refer to [Global built-in variables]({{< relref "../../../dashboards/variables/add-template-variables#global-variables" >}}).
|
||||
|
||||
## Label extraction and indexing in Loki
|
||||
|
||||
Labels play a fundamental role in Loki's log aggregation and querying capabilities. When logs are ingested into Loki, they are often accompanied by metadata called labels, which provide contextual information about the log entries. These labels consist of key-value pairs and are essential for organizing, filtering, and searching log data efficiently.
|
||||
|
||||
### 1. Label extraction
|
||||
|
||||
During the ingestion process, Loki performs label extraction from the log lines. Loki's approach to label extraction is based on regular expressions, allowing users to specify custom patterns for parsing log lines and extracting relevant label key-value pairs. This flexibility enables Loki to adapt to various log formats and schemas.
|
||||
|
||||
For example, suppose you have log lines in the following format:
|
||||
|
||||
**2023-07-25 12:34:56 INFO: Request from IP A.B.C.D to endpoint /api/data**
|
||||
|
||||
To extract labels from this log format, you could define a regular expression to extract the log level ("INFO"), IP address ("A.B.C.D"), and endpoint ("/api/data") as labels. These labels can later be used to filter and aggregate log entries.
|
||||
|
||||
### 2. Indexing labels
|
||||
|
||||
Once labels are extracted, Loki efficiently indexes them. The index serves as a lookup mechanism that maps labels to the corresponding log entries. This indexing process enables faster retrieval of logs based on specific label criteria, significantly enhancing query performance.
|
||||
|
||||
For instance, if you have a label "job" that represents different services in your application, Loki will index the logs for each job separately. This indexing allows you to quickly query and analyze logs for individual jobs without the need to scan the entire log dataset.
|
||||
|
||||
By effectively extracting and indexing labels, Loki enables users to perform complex and targeted log queries without compromising on query speed and resource consumption.
|
||||
|
||||
Utilizing Loki's indexed labels in combination with Grafana's template variables provides a powerful way to interactively explore and visualize log data. Template variables allow users to create dynamic queries, selecting and filtering logs based on various labels, such as job names, instance IDs, severity levels, or any other contextual information attached to the log entries.
|
||||
|
||||
In conclusion, Loki's label extraction and indexing mechanisms are key components that contribute to its ability to handle vast amounts of log data efficiently. By making use of labels and template variables, users can easily gain valuable insights from their log data and troubleshoot issues effectively.
|
||||
|
||||
@@ -41,19 +41,20 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Sets the data source that's pre-selected for new panels. |
|
||||
| **Host** | Sets the IP address/hostname and optional port of your MS SQL instance. Default port is 0, the driver default. You can specify multiple connection properties, such as `ApplicationIntent`, by separating each property with a semicolon (`;`). |
|
||||
| **Database** | Sets the name of your MS SQL database. |
|
||||
| **Authentication** | Sets the authentication mode, either using SQL Server Authentication or Windows Authentication (single sign-on for Windows users). |
|
||||
| **User** | Defines the database user's username. |
|
||||
| **Password** | Defines the database user's password. |
|
||||
| **Encrypt** | Determines whether to negotiate a secure SSL TCP/IP connection with the server, or to which extent. Default is `false`. |
|
||||
| **Max open** | Sets the maximum number of open connections to the database. Default is `unlimited`. |
|
||||
| **Max idle** | Sets the maximum number of connections in the idle connection pool. Default is `2`. |
|
||||
| **Max lifetime** | Sets the maximum number of seconds that the data source can reuse a connection. Default is `14400` (4 hours). |
|
||||
| Name | Description |
|
||||
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Sets the data source that's pre-selected for new panels. |
|
||||
| **Host** | Sets the IP address/hostname and optional port of your MS SQL instance. Default port is 0, the driver default. You can specify multiple connection properties, such as `ApplicationIntent`, by separating each property with a semicolon (`;`). |
|
||||
| **Database** | Sets the name of your MS SQL database. |
|
||||
| **Authentication** | Sets the authentication mode, either using SQL Server Authentication or Windows Authentication (single sign-on for Windows users). |
|
||||
| **User** | Defines the database user's username. |
|
||||
| **Password** | Defines the database user's password. |
|
||||
| **Encrypt** | Determines whether to negotiate a secure SSL TCP/IP connection with the server, or to which extent. Default is `false`. |
|
||||
| **Max open** | Sets the maximum number of open connections to the database. Default is `100`. |
|
||||
| **Max idle** | Sets the maximum number of connections in the idle connection pool. Default is `100`. |
|
||||
| **Auto (max idle)** | If set will set the maximum number of idle connections to the number of maximum open connections (Grafana v9.5.1+). Default is `true`. |
|
||||
| **Max lifetime** | Sets the maximum number of seconds that the data source can reuse a connection. Default is `14400` (4 hours). |
|
||||
|
||||
You can also configure settings specific to the Microsoft SQL Server data source. These options are described in the sections below.
|
||||
|
||||
@@ -122,8 +123,9 @@ datasources:
|
||||
user: grafana
|
||||
jsonData:
|
||||
database: grafana
|
||||
maxOpenConns: 0 # Grafana v5.4+
|
||||
maxIdleConns: 2 # Grafana v5.4+
|
||||
maxOpenConns: 100 # Grafana v5.4+
|
||||
maxIdleConns: 100 # Grafana v5.4+
|
||||
maxIdleConnsAuto: true # Grafana v9.5.1+
|
||||
connMaxLifetime: 14400 # Grafana v5.4+
|
||||
connectionTimeout: 0 # Grafana v9.3+
|
||||
secureJsonData:
|
||||
|
||||
@@ -236,12 +236,12 @@ To optionally customize the default series name formatting, refer to [Standard o
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup(time_date_time, '5m') as time,
|
||||
$__timeGroupAlias(time_date_time, '5m'),
|
||||
min("value_double"),
|
||||
'min' as metric
|
||||
FROM test_data
|
||||
WHERE $__timeFilter(time_date_time)
|
||||
GROUP BY $__timeGroup(time_date_time, '5m')
|
||||
GROUP BY time
|
||||
ORDER BY 1
|
||||
```
|
||||
|
||||
@@ -260,18 +260,18 @@ Data frame result:
|
||||
|
||||
### Time series query examples
|
||||
|
||||
**Using the fill parameter in the $\_\_timeGroup macro to convert null values to be zero instead:**
|
||||
**Using the fill parameter in the $\_\_timeGroupAlias macro to convert null values to be zero instead:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup(createdAt, '5m', 0) as time,
|
||||
$__timeGroupAlias(createdAt, '5m', 0),
|
||||
sum(value) as value,
|
||||
hostname
|
||||
FROM test_data
|
||||
WHERE
|
||||
$__timeFilter(createdAt)
|
||||
GROUP BY
|
||||
$__timeGroup(createdAt, '5m', 0),
|
||||
time,
|
||||
hostname
|
||||
ORDER BY 1
|
||||
```
|
||||
@@ -295,12 +295,12 @@ Data frame result:
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup(time_date_time, '5m'),
|
||||
$__timeGroupAlias(time_date_time, '5m'),
|
||||
min(value_double) as min_value,
|
||||
max(value_double) as max_value
|
||||
FROM test_data
|
||||
WHERE $__timeFilter(time_date_time)
|
||||
GROUP BY $__timeGroup(time_date_time, '5m')
|
||||
GROUP BY time
|
||||
ORDER BY 1
|
||||
```
|
||||
|
||||
|
||||
@@ -35,20 +35,19 @@ Administrators can also [configure the data source via YAML]({{< relref "#provis
|
||||
|
||||
1. Set the data source's basic configuration options.
|
||||
|
||||
### Data source options
|
||||
|
||||
| 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 MySQL instance. |
|
||||
| `Database` | Name of your MySQL database. |
|
||||
| `User` | Database user's login/username |
|
||||
| `Password` | Database user's password |
|
||||
| `Session Timezone` | Specify the time zone used in the database session, such as `Europe/Berlin` or `+02:00`. This is necessary, if the timezone of the database (or the host of the database) is set to something other than UTC. Set the value used in the session with `SET time_zone='...'`. If you leave this field empty, then the time zone is not updated. For more information, refer to the [MySQL documentation](https://dev.mysql.com/doc/refman/8.0/en/time-zone-support.html). |
|
||||
| `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. This should always be lower than configured [wait_timeout](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_wait_timeout) in MySQL (Grafana v5.4+). |
|
||||
| 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 MySQL instance. |
|
||||
| **Database** | Name of your MySQL database. |
|
||||
| **User** | Database user's login/username |
|
||||
| **Password** | Database user's password |
|
||||
| **Session Timezone** | Specify the time zone used in the database session, such as `Europe/Berlin` or `+02:00`. This is necessary, if the timezone of the database (or the host of the database) is set to something other than UTC. Set the value used in the session with `SET time_zone='...'`. If you leave this field empty, then the time zone is not updated. For more information, refer to the [MySQL documentation](https://dev.mysql.com/doc/refman/8.0/en/time-zone-support.html). |
|
||||
| **Max open** | The maximum number of open connections to the database, default `100` (Grafana v5.4+). |
|
||||
| **Max idle** | The maximum number of connections in the idle connection pool, default `100` (Grafana v5.4+). |
|
||||
| **Auto (max idle)** | If set will set the maximum number of idle connections to the number of maximum open connections (Grafana v9.5.1+). Default is `true`. |
|
||||
| **Max lifetime** | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours. This should always be lower than configured [wait_timeout](https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_wait_timeout) in MySQL (Grafana v5.4+). |
|
||||
|
||||
### Min time interval
|
||||
|
||||
@@ -107,8 +106,9 @@ datasources:
|
||||
user: grafana
|
||||
jsonData:
|
||||
database: grafana
|
||||
maxOpenConns: 0 # Grafana v5.4+
|
||||
maxIdleConns: 2 # Grafana v5.4+
|
||||
maxOpenConns: 100 # Grafana v5.4+
|
||||
maxIdleConns: 100 # Grafana v5.4+
|
||||
maxIdleConnsAuto: true # Grafana v9.5.1+
|
||||
connMaxLifetime: 14400 # Grafana v5.4+
|
||||
secureJsonData:
|
||||
password: ${GRAFANA_MYSQL_PASSWORD}
|
||||
@@ -127,8 +127,9 @@ datasources:
|
||||
jsonData:
|
||||
tlsAuth: true
|
||||
database: grafana
|
||||
maxOpenConns: 0 # Grafana v5.4+
|
||||
maxIdleConns: 2 # Grafana v5.4+
|
||||
maxOpenConns: 100 # Grafana v5.4+
|
||||
maxIdleConns: 100 # Grafana v5.4+
|
||||
maxIdleConnsAuto: true # Grafana v9.5.1+
|
||||
connMaxLifetime: 14400 # Grafana v5.4+
|
||||
secureJsonData:
|
||||
password: ${GRAFANA_MYSQL_PASSWORD}
|
||||
@@ -150,8 +151,9 @@ datasources:
|
||||
tlsAuth: true
|
||||
skipTLSVerify: true
|
||||
database: grafana
|
||||
maxOpenConns: 0 # Grafana v5.4+
|
||||
maxIdleConns: 2 # Grafana v5.4+
|
||||
maxOpenConns: 100 # Grafana v5.4+
|
||||
maxIdleConns: 100 # Grafana v5.4+
|
||||
maxIdleConnsAuto: true # Grafana v9.5.1+
|
||||
connMaxLifetime: 14400 # Grafana v5.4+
|
||||
secureJsonData:
|
||||
password: ${GRAFANA_MYSQL_PASSWORD}
|
||||
@@ -281,7 +283,7 @@ To optionally customize the default series name formatting, refer to [Standard o
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup(time_date_time,'5m'),
|
||||
$__timeGroupAlias(time_date_time,'5m'),
|
||||
min(value_double),
|
||||
'min' as metric
|
||||
FROM test_data
|
||||
@@ -303,11 +305,11 @@ Data frame result:
|
||||
+---------------------+-----------------+
|
||||
```
|
||||
|
||||
**Example using the fill parameter in the $\_\_timeGroup macro to convert null values to be zero instead:**
|
||||
**Example using the fill parameter in the $\_\_timeGroupAlias macro to convert null values to be zero instead:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup(createdAt,'5m',0),
|
||||
$__timeGroupAlias(createdAt,'5m',0),
|
||||
sum(value_double) as value,
|
||||
hostname
|
||||
FROM test_data
|
||||
@@ -336,7 +338,7 @@ Data frame result:
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup(time_date_time,'5m'),
|
||||
$__timeGroupAlias(time_date_time,'5m'),
|
||||
min(value_double) as min_value,
|
||||
max(value_double) as max_value
|
||||
FROM test_data
|
||||
@@ -458,7 +460,7 @@ ORDER BY atimestamp ASC
|
||||
|
||||
#### Disabling Quoting for Multi-value Variables
|
||||
|
||||
Grafana automatically creates a quoted, comma-separated string for multi-value variables. For example: if `server01` and `server02` are selected then it will be formatted as: `'server01', 'server02'`. Do disable quoting, use the csv formatting option for variables:
|
||||
Grafana automatically creates a quoted, comma-separated string for multi-value variables. For example: if `server01` and `server02` are selected then it will be formatted as: `'server01', 'server02'`. To disable quoting, use the csv formatting option for variables:
|
||||
|
||||
`${servers:csv}`
|
||||
|
||||
|
||||
@@ -35,16 +35,15 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| 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. |
|
||||
| **URL** | The HTTP protocol, IP, and port of your OpenTSDB server (default port is usually 4242) |
|
||||
| **Allowed cookies** | List the names of cookies to forward to the data source. |
|
||||
| **Version** | Version = opentsdb version, either <=2.1 or 2.2 |
|
||||
| **Resolution** | Metrics from opentsdb may have datapoints with either second or millisecond resolution. |
|
||||
| **Lookup limit** | Default is 1000. |
|
||||
| Name | Description |
|
||||
| ------------------- | ---------------------------------------------------------------------------------------- |
|
||||
| **Name** | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| **Default** | Default data source that will be be pre-selected for new panels. |
|
||||
| **URL** | The HTTP protocol, IP, and port of your OpenTSDB server (default port is usually 4242). |
|
||||
| **Allowed cookies** | Listing of cookies to forward to the data source. |
|
||||
| **Version** | The OpenTSDB version. |
|
||||
| **Resolution** | Metrics from OpenTSDB may have data points with either second or millisecond resolution. |
|
||||
| **Lookup limit** | Default is 1000. |
|
||||
|
||||
### Provision the data source
|
||||
|
||||
@@ -57,7 +56,7 @@ For more information about provisioning, and for available configuration options
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: OpenTsdb
|
||||
- name: OpenTSDB
|
||||
type: opentsdb
|
||||
access: proxy
|
||||
url: http://localhost:4242
|
||||
@@ -70,7 +69,7 @@ datasources:
|
||||
|
||||
Open a graph in edit mode by click the title. Query editor will differ if the data source has version <=2.1 or = 2.2.
|
||||
In the former version, only tags can be used to query OpenTSDB. But in the latter version, filters as well as tags
|
||||
can be used to query opentsdb. Fill Policy is also introduced in OpenTSDB 2.2.
|
||||
can be used to query OpenTSDB. Fill Policy is also introduced in OpenTSDB 2.2.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -18,16 +18,25 @@ Grafana ships with built-in support for Parca, a continuous profiling OSS databa
|
||||
|
||||
## Configure the Parca data source
|
||||
|
||||
To access Parca settings, click the **Configuration** (gear) icon, then click **Data Sources** > **Parca**.
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
| Name | Description |
|
||||
| ------------ | ------------------------------------------------------------------ |
|
||||
| `Name` | A name to specify the data source in panels, queries, and Explore. |
|
||||
| `Default` | The default data source will be pre-selected for new panels. |
|
||||
| `URL` | The URL of the Parca instance, e.g., `http://localhost:4100` |
|
||||
| `Basic Auth` | Enable basic authentication to the Parca data source. |
|
||||
| `User` | User name for basic authentication. |
|
||||
| `Password` | Password for basic authentication. |
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Enter `Parca` in the search bar.
|
||||
1. Click **Parca**.
|
||||
|
||||
The **Settings** tab of the data source is displayed.
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
| ------------ | ------------------------------------------------------------------ |
|
||||
| `Name` | A name to specify the data source in panels, queries, and Explore. |
|
||||
| `Default` | The default data source will be pre-selected for new panels. |
|
||||
| `URL` | The URL of the Parca instance, e.g., `http://localhost:4100` |
|
||||
| `Basic Auth` | Enable basic authentication to the Parca data source. |
|
||||
| `User` | User name for basic authentication. |
|
||||
| `Password` | Password for basic authentication. |
|
||||
|
||||
## Querying
|
||||
|
||||
|
||||
@@ -18,17 +18,26 @@ Grafana ships with built-in support for Phlare, a horizontally scalable, highly-
|
||||
|
||||
## Configure the Phlare data source
|
||||
|
||||
To access Phlare settings, click the **Configuration** (gear) icon, then click **Data Sources** > **Phlare**.
|
||||
To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
| Name | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `Name` | A name to specify the data source in panels, queries, and Explore. |
|
||||
| `Default` | The default data source will be pre-selected for new panels. |
|
||||
| `URL` | The URL of the Phlare instance, e.g., `http://localhost:4100` |
|
||||
| `Basic Auth` | Enable basic authentication to the Phlare data source. |
|
||||
| `User` | User name for basic authentication. |
|
||||
| `Password` | Password for basic authentication. |
|
||||
| `Minimal step` | Similar to Prometheus, Phlare scrapes profiles at certain intervals. To prevent querying at smaller interval use Minimal step same or higher than your Phlare scrape interval. |
|
||||
1. Click **Connections** in the left-side menu.
|
||||
1. Under Your connections, click **Data sources**.
|
||||
1. Enter `Phlare` in the search bar.
|
||||
1. Click **Phlare**.
|
||||
|
||||
The **Settings** tab of the data source is displayed.
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `Name` | A name to specify the data source in panels, queries, and Explore. |
|
||||
| `Default` | The default data source will be pre-selected for new panels. |
|
||||
| `URL` | The URL of the Phlare instance, e.g., `http://localhost:4100` |
|
||||
| `Basic Auth` | Enable basic authentication to the Phlare data source. |
|
||||
| `User` | User name for basic authentication. |
|
||||
| `Password` | Password for basic authentication. |
|
||||
| `Minimal step` | Similar to Prometheus, Phlare scrapes profiles at certain intervals. To prevent querying at smaller interval use Minimal step same or higher than your Phlare scrape interval. |
|
||||
|
||||
## Querying
|
||||
|
||||
|
||||
@@ -33,23 +33,23 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| 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). |
|
||||
| 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 `100` (Grafana v5.4+). |
|
||||
| **Max idle** | The maximum number of connections in the idle connection pool, default `100` (Grafana v5.4+). |
|
||||
| **Auto (max idle)** | If set will set the maximum number of idle connections to the number of maximum open connections (Grafana v9.5.1+). Default is `true`. |
|
||||
| **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
|
||||
|
||||
@@ -141,8 +141,9 @@ datasources:
|
||||
jsonData:
|
||||
database: grafana
|
||||
sslmode: 'disable' # disable/require/verify-ca/verify-full
|
||||
maxOpenConns: 0 # Grafana v5.4+
|
||||
maxIdleConns: 2 # Grafana v5.4+
|
||||
maxOpenConns: 100 # Grafana v5.4+
|
||||
maxIdleConns: 100 # Grafana v5.4+
|
||||
maxIdleConnsAuto: true # Grafana v9.5.1+
|
||||
connMaxLifetime: 14400 # Grafana v5.4+
|
||||
postgresVersion: 903 # 903=9.3, 904=9.4, 905=9.5, 906=9.6, 1000=10
|
||||
timescaledb: false
|
||||
@@ -234,7 +235,7 @@ To optionally customize the default series name formatting, refer to [Standard o
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup("time_date_time",'5m'),
|
||||
$__timeGroupAlias("time_date_time",'5m'),
|
||||
min("value_double"),
|
||||
'min' as metric
|
||||
FROM test_data
|
||||
@@ -256,11 +257,11 @@ Data frame result:
|
||||
+---------------------+-----------------+
|
||||
```
|
||||
|
||||
**Example using the fill parameter in the $\_\_timeGroup macro to convert null values to be zero instead:**
|
||||
**Example using the fill parameter in the $\_\_timeGroupAlias macro to convert null values to be zero instead:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup("createdAt",'5m',0),
|
||||
$__timeGroupAlias("createdAt",'5m',0),
|
||||
sum(value) as value,
|
||||
hostname
|
||||
FROM test_data
|
||||
@@ -289,7 +290,7 @@ Data frame result:
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup("time_date_time",'5m'),
|
||||
$__timeGroupAlias("time_date_time",'5m'),
|
||||
min("value_double") as "min_value",
|
||||
max("value_double") as "max_value"
|
||||
FROM test_data
|
||||
|
||||
@@ -45,40 +45,32 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
|
||||
| Name | Description |
|
||||
| ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| `Default` | Default data source that is pre-selected for new panels. |
|
||||
| `URL` | The URL of your Prometheus server, for example, `http://prometheus.example.org:9090`. |
|
||||
| `Access` | Only Server access mode is functional. If Server mode is already selected this option is hidden. Otherwise change to Server mode to prevent errors. |
|
||||
| `Basic Auth` | Enable basic authentication to the Prometheus data source. |
|
||||
| `User` | User name for basic authentication. |
|
||||
| `Password` | Password for basic authentication. |
|
||||
| `Manage alerts via Alerting UI` | Toggle whether to enable Alertmanager integration for this data source. |
|
||||
| `Scrape interval` | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s. |
|
||||
| `HTTP method` | Use either POST or GET HTTP method to query your data source. POST is the recommended and pre-selected method as it allows bigger queries. Change this to GET if you have a Prometheus version older than 2.1 or if POST requests are restricted in your network. |
|
||||
| `Type` | The type of your Prometheus server; `Prometheus`, `Cortex`, `Thanos`, `Mimir`. When selected, the **Version** field attempts to populate automatically using the Prometheus [buildinfo](https://semver.org/) API. Some Prometheus types, such as Cortex, don't support this API and must be manually populated. |
|
||||
| `Version` | The version of your Prometheus server, note that this field is not visible until the Prometheus type is selected. |
|
||||
| `Disable metrics lookup` | Checking this option will disable the metrics chooser and metric/label support in the query field's autocomplete. This helps if you have performance issues with bigger Prometheus instances. |
|
||||
| `Custom query parameters` | Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&'. |
|
||||
| **Exemplars configuration** | |
|
||||
| `Internal link` | Enable this option is you have an internal link. When you enable this option, you will see a data source selector. Select the backend tracing data store for your exemplar data. |
|
||||
| `Data source` | You will see this option only if you enable `Internal link` option. Select the backend tracing data store for your exemplar data. |
|
||||
| `URL` | You will see this option only if the `Internal link` option is disabled. Enter the full URL of the external link. You can interpolate the value from the field with `${__value.raw }` macro. |
|
||||
| `URL Label` | (Optional) add a custom display label to override the value of the `Label name` field. |
|
||||
| `Label name` | Add a name for the exemplar traceID property. |
|
||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| `Default` | Default data source that is pre-selected for new panels. |
|
||||
| `URL` | The URL of your Prometheus server, for example, `http://prometheus.example.org:9090`. |
|
||||
| `Access` | Only Server access mode is functional. If Server mode is already selected this option is hidden. Otherwise change to Server mode to prevent errors. |
|
||||
| `Basic Auth` | Enable basic authentication to the Prometheus data source. |
|
||||
| `User` | User name for basic authentication. |
|
||||
| `Password` | Password for basic authentication. |
|
||||
| `Manage alerts via Alerting UI` | Toggle whether to enable Alertmanager integration for this data source. |
|
||||
| `Scrape interval` | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s. |
|
||||
| `HTTP method` | Use either POST or GET HTTP method to query your data source. POST is the recommended and pre-selected method as it allows bigger queries. Change this to GET if you have a Prometheus version older than 2.1 or if POST requests are restricted in your network. |
|
||||
| `Type` | The type of your Prometheus server; `Prometheus`, `Cortex`, `Thanos`, `Mimir`. When selected, the **Version** field attempts to populate automatically using the Prometheus [buildinfo](https://semver.org/) API. Some Prometheus types, such as Cortex, don't support this API and must be manually populated. |
|
||||
| `Version` | The version of your Prometheus server, note that this field is not visible until the Prometheus type is selected. |
|
||||
| `Disable metrics lookup` | Checking this option will disable the metrics chooser and metric/label support in the query field's autocomplete. This helps if you have performance issues with bigger Prometheus instances. |
|
||||
| `Custom query parameters` | Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup`, or `max_source_resolution`. Multiple parameters should be concatenated together with an '&'. |
|
||||
|
||||
**Exemplars configuration:**
|
||||
|
||||
| Name | Description |
|
||||
**Exemplars configuration:**
|
||||
|
||||
| Name | Description |
|
||||
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Internal link** | Enable this option if you have an internal link. When enabled, this reveals the data source selector. Select the backend tracing data store for your exemplar data. |
|
||||
| **Data source** | _(Visible only if you enable `Internal link`)_ Selects the backend tracing data store for your exemplar data. |
|
||||
| **URL** | _(Visible only if you disable `Internal link`)_ Defines the external link's full URL. You can interpolate the value from the field by using the [`${__value.raw}` macro]({{< relref "../..//panels-visualizations/configure-data-links/#value-variables" >}}). |
|
||||
| **URL label** | _(Optional)_ Adds a custom display label to override the value of the `Label name` field. |
|
||||
| **Label name** | Adds a name for the exemplar traceID property. |
|
||||
| **Internal link** | Enable this option if you have an internal link. When enabled, this reveals the data source selector. Select the backend tracing data store for your exemplar data. |
|
||||
| **Data source** | _(Visible only if you enable `Internal link`)_ Selects the backend tracing data store for your exemplar data. |
|
||||
| **URL** | _(Visible only if you disable `Internal link`)_ Defines the external link's full URL. You can interpolate the value from the field by using the [`${__value.raw}` macro]({{< relref "../..//panels-visualizations/configure-data-links/#value-variables" >}}). |
|
||||
| **URL label** | _(Optional)_ Adds a custom display label to override the value of the `Label name` field. |
|
||||
| **Label name** | Adds a name for the exemplar traceID property. |
|
||||
|
||||
### Provision the data source
|
||||
|
||||
@@ -113,12 +105,6 @@ datasources:
|
||||
url: 'http://localhost:3000/explore?orgId=1&left=%5B%22now-1h%22,%22now%22,%22Jaeger%22,%7B%22query%22:%22$${__value.raw}%22%7D%5D'
|
||||
```
|
||||
|
||||
## Query the data source
|
||||
|
||||
The Prometheus query editor includes a code editor and visual query builder.
|
||||
|
||||
For details, see the [query editor documentation]({{< relref "./query-editor" >}}).
|
||||
|
||||
## View Grafana metrics with Prometheus
|
||||
|
||||
Grafana exposes metrics for Prometheus on the `/metrics` endpoint.
|
||||
|
||||
@@ -14,49 +14,56 @@ weight: 300
|
||||
|
||||
# Prometheus query editor
|
||||
|
||||
This topic explains querying specific to the Prometheus data source.
|
||||
Grafana provides a query editor for the Prometheus data source to create queries in PromQL. For more information about PromQL, see [Querying Prometheus](http://prometheus.io/docs/querying/basics/).
|
||||
|
||||
For general documentation on querying data sources in Grafana, see [Query and transform data]({{< relref "../../../panels-visualizations/query-transform-data" >}}).
|
||||
|
||||
For options and functions common to all query editors, see [Query editors]({{< relref "../../../panels-visualizations/query-transform-data" >}}).
|
||||
|
||||
## Choose a query editing mode
|
||||
|
||||
You can switch the Prometheus query editor between two modes:
|
||||
The Prometheus query editor has two modes:
|
||||
|
||||
- [Code mode](#code-mode), which provides a feature-rich editor for writing queries
|
||||
- [Builder mode](#builder-mode), which provides a visual query designer
|
||||
- [Builder mode](#builder-mode)
|
||||
- [Code mode](#code-mode)
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/header-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Editor toolbar" >}}
|
||||
Each mode is explained in greater detail below.
|
||||
|
||||
To switch between the editor modes, select the corresponding **Builder** and **Code** tabs.
|
||||
{{< figure src="/static/img/docs/prometheus/editing-mode.png" max-width="500px" class="docs-image--no-shadow" caption="Query editor mode" >}}
|
||||
|
||||
To run a query, select **Run queries** located at the top of the editor.
|
||||
Both modes are synchronized, so you can switch between them. However, if there is an issue with the query while switching modes, a warning message will appear.
|
||||
|
||||
> **Note:** To run Prometheus queries in [Explore]({{< relref "../../../explore" >}}), select **Run query**.
|
||||
## Toolbar elements
|
||||
|
||||
Each mode is synchronized with the other modes, so you can switch between them without losing your work, although there are some limitations.
|
||||
The query editor toolbar contains the following elements:
|
||||
|
||||
Builder mode doesn't yet support some complex queries.
|
||||
When you switch from Code mode to Builder mode with such a query, the editor displays a popup that explains how you might lose parts of the query if you continue.
|
||||
You can then decide whether you still want to switch to Builder mode.
|
||||
- **Kick start your query** - Click to see a list of operation patterns that help you quickly get started adding multiple operations to your query. These include:
|
||||
|
||||
You can also use the [Explain feature]({{< relref "#use-explain-mode-to-understand-queries" >}}) to help understand how a query works, and augment queries by using [template variables]({{< relref "./template-variables/" >}}).
|
||||
- Rate query starters
|
||||
- Histogram query starters
|
||||
- Binary query starters
|
||||
|
||||
For options and functions common to all query editors, refer to [Query and transform data]({{< relref "../../../panels-visualizations/query-transform-data" >}}).
|
||||
Click the arrow next to each to see available options to add to your query.
|
||||
|
||||
- **Explain** - Toggle to display a step-by-step explanation of all query components and operations.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/explain-results.png" max-width="500px" class="docs-image--no-shadow" caption="Explain results" >}}
|
||||
|
||||
- **Builder/Code** - Click the corresponding **Builder** or **Code** tab on the toolbar to select a editor mode.
|
||||
|
||||
## Configure common options
|
||||
|
||||
You can configure Prometheus-specific options in the query editor by setting several options regardless of its mode.
|
||||
You can configure Prometheus-specific options in the query editor by setting several options regardless of mode.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/options-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Options" >}}
|
||||
{{< figure src="/static/img/docs/prometheus/options.png" max-width="500px" class="docs-image--no-shadow" caption="Options" >}}
|
||||
|
||||
### Legend
|
||||
|
||||
The **Legend** setting defines the time series's name. You can use a predefined or custom format.
|
||||
|
||||
| Option | Description |
|
||||
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Auto** | Shows the value of a single label for each series with only one label, or displays all labels if a series has multiple labels. |
|
||||
| **Verbose** | Displays all labels. |
|
||||
| **Custom** | Uses templating to select which labels will be included.<br/>For example, `{{hostname}}` is replaced by the label value for the label `hostname`.<br/>Clear the input and click outside of it to select another mode. |
|
||||
- **Auto** - Displays unique labels. Also displays all overlapping labels if a series has multiple labels.
|
||||
- **Verbose** - Displays all label names.
|
||||
- **Custom** - Uses 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 of it to select another mode.
|
||||
|
||||
### Min step
|
||||
|
||||
@@ -66,155 +73,134 @@ This setting supports the `$__interval` and `$__rate_interval` macros.
|
||||
|
||||
### Format
|
||||
|
||||
You can switch between **Table**, **Time series**, and **Heatmap** options by configuring the query's **Format**.
|
||||
Switch between the following format options:
|
||||
|
||||
| Option | Description |
|
||||
| --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| **Table** | This works only in a [Table panel]{{< relref "../../../panels-visualizations/visualizations/table" >}}. |
|
||||
| **Time series** | Uses the default time series format. |
|
||||
| **Heatmap** | Displays metrics of the Histogram type on a [Heatmap panel]{{< relref "../../../panels-visualizations/visualizations/heatmap" >}} by converting cumulative histograms to regular ones and sorting the series by the bucket bound. |
|
||||
- **Time series** - The default time series format. See [Time series kind formats](https://grafana.github.io/dataplane/timeseries/) for information on time series data frames and how time and value fields are structured.
|
||||
- **Table** - This works only in a [Table panel]({{< relref "../../../panels-visualizations/visualizations/table" >}}).
|
||||
- **Heatmap** - Displays metrics of the Histogram type on a [Heatmap panel]({{< relref "../../../panels-visualizations/visualizations/heatmap" >}}) by converting cumulative histograms to regular ones and sorting the series by the bucket bound.
|
||||
|
||||
### Type
|
||||
|
||||
The **Type** setting selects the query type.
|
||||
The **Type** setting sets the query type. These include:
|
||||
|
||||
- A **Range** query returns a Range vector, comprised of a set of time series containing a range of data points over time for each time series.
|
||||
- An **Instant** query returns only the latest value that Prometheus has scraped for the requested time series. Instant queries can return results much faster than normal range queries and are well suited to look up label sets.
|
||||
- **Both** - The default option. Returns results for both a **Range** query and an **Instant** query.
|
||||
- **Range** - Returns a range vector consisting of a set of time series data containing a range of data points over time for each time series. You can choose lines, bars, points, stacked lines or stacked bars
|
||||
- **Instant** - Returns one data point per query and only the most recent point in the time range provided. The results can be shown in table format or as raw data. To depict instant query results in the time series panel, first add a field override, next add a property to the override named `Transform`, and finally select `Constant` from the **Transform** dropdown.
|
||||
|
||||
Instant query results are comprised of only 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 the [Time Series Transform option documentation]({{< relref "../../../panels-visualizations/visualizations/time-series#transform" >}}).
|
||||
|
||||
For more information, refer to the [Time Series Transform option documentation]({{< relref "../../../panels-visualizations/visualizations/time-series#transform" >}}).
|
||||
{{% admonition type="note" %}}
|
||||
Grafana modifies the request dates for queries to align them with the dynamically calculated step.
|
||||
This ensures a consistent display of metrics data, but it can result in a small gap of data at the right edge of a graph.
|
||||
{{% /admonition %}}
|
||||
|
||||
- An **Exemplars** query runs with the regular query and shows exemplars in the graph.
|
||||
### Exemplars
|
||||
|
||||
> **Note:** Grafana modifies the request dates for queries to align them with the dynamically calculated step.
|
||||
> This ensures a consistent display of metrics data, but it can result in a small gap of data at the right edge of a graph.
|
||||
Toggle **Exemplars** to run a query that includes exemplars in the graph. Exemplars are unique to Prometheus. For more information see [Introduction to exemplars](https://grafana.com/docs/grafana/latest/fundamentals/exemplars/).
|
||||
|
||||
## Code mode
|
||||
{{% admonition type="note" %}}
|
||||
There is no option to add exemplars with an **Instant** query type.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/code-mode-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Code mode" >}}
|
||||
### Inspector
|
||||
|
||||
In **Code mode**, you can write complex queries using a text editor with autocompletion features and syntax highlighting.
|
||||
It also contains a [Metrics browser]({{< relref "#metrics-browser" >}}) to further help you write queries.
|
||||
Click **Inspector** to get detailed statistics regarding your query. Inspector functions as a kind of debugging tool that "inspects" your query. It provides query statistics under **Stats**, request response time under **Query**, data frame details under **{} JSON**, and the shape of your data under **Data**.
|
||||
|
||||
For more information about Prometheus's query language, refer to the [Prometheus documentation](http://prometheus.io/docs/querying/basics/).
|
||||
|
||||
### Use autocompletion
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/autocomplete-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Autocomplete" >}}
|
||||
|
||||
Code mode's autocompletion feature works automatically while typing.
|
||||
To manually trigger autocompletion, use the keyboard shortcut <key>Ctrl</key>/<key>Cmd</key> + <key>Space</key>.
|
||||
|
||||
The query editor can autocomplete static functions, aggregations, and keywords, and also dynamic items like metrics and labels.
|
||||
The autocompletion dropdown includes documentation for the suggested items where available.
|
||||
|
||||
To run a query in [Explore]({{< relref "../../../explore/" >}}), use the keyboard shortcut <key>Shift</key> + <key>Enter</key>.
|
||||
|
||||
### Metrics browser
|
||||
|
||||
The metrics browser locates metrics and selects relevant labels to help you build basic queries.
|
||||
When you open the browser, it displays all available metrics and labels.
|
||||
If supported by your Prometheus instance, each metric also displays its HELP and TYPE as a tooltip.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/metric-browser-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Metrics browser" >}}
|
||||
|
||||
When you select a metric, the browser narrows down the available labels to show only the ones applicable to the metric.
|
||||
You can then select one or more labels for which the available label values are shown in lists in the bottom section.
|
||||
Select one or more values for each label to tighten your query scope.
|
||||
|
||||
> **Note:** If you do not remember a metric name to start with, you can also select a few labels to narrow down the list, then find relevant label values.
|
||||
|
||||
All lists in the metrics browser have a search field above them to quickly filter for metrics or labels that match a certain string.
|
||||
The values section has only one search field, and its filtering applies to all labels to help you find values across labels once selected.
|
||||
|
||||
For example, among your labels `app`, `job`, `job_name` only one might with the value you are looking for.
|
||||
|
||||
Once you are satisfied with your query, click "Use query" to run the query. The button "Use as rate query" adds a `rate(...)[$__interval]` around your query to help write queries for counter metrics.
|
||||
The "Validate selector" button will check with Prometheus how many time series are available for that selector.
|
||||
{{< figure src="/static/img/docs/prometheus/insepctor-9-5.png" max-width="500px" class="docs-image--no-shadow" caption="Inspector" >}}
|
||||
|
||||
## Builder mode
|
||||
|
||||
In **Builder mode**, you can build queries using a visual interface.
|
||||
**Builder mode** helps you build queries using a visual interface. This option is best for users who have limited or no previous experience working with Prometheus and PromQL.
|
||||
|
||||
This video demonstrates how to use the visual Prometheus query builder available since Grafana v9.0:
|
||||
This video demonstrates how to use the visual Prometheus query builder available in Grafana v9.0:
|
||||
|
||||
{{< vimeo 720004179 >}}
|
||||
|
||||
</br>
|
||||
|
||||
### Toolbar
|
||||
### Metrics
|
||||
|
||||
In addition to the **Run query** button and mode switcher, Builder mode includes additional elements:
|
||||
{{< figure src="/static/img/docs/prometheus/metrics-and-labels.png" max-width="500px" class="docs-image--no-shadow" caption="Metric and label filters" >}}
|
||||
|
||||
| Name | Description |
|
||||
| ------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| **Kick start your query** | A list of operation patterns that help you quickly add multiple operations to your query. |
|
||||
| **Explain** | Displays a step-by-step explanation of all query parts and its operations. |
|
||||
|
||||
### Metric and labels
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/metric-select-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Metric and labels" >}}
|
||||
|
||||
Select a specific metric name from the dropdown list.
|
||||
When you are ready to create a query, you can choose the specific metric name from the dropdown list under **Metric**.
|
||||
The data source requests the list of available metrics from the Prometheus server based on the selected time rage.
|
||||
You can also enter text into the selector when the dropdown is open to search and filter the list.
|
||||
|
||||
### Label filters
|
||||
|
||||
Select desired labels and their values from the dropdown list.
|
||||
When a metric is selected, the data source requests available labels and their values from the server.
|
||||
Use the `+` button to add a label, and the `x` button to remove a label.
|
||||
|
||||
### Operations
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/operations-9-1.png" max-width="500px" class="docs-image--no-shadow" caption="Operations" >}}
|
||||
{{< figure src="/static/img/docs/prometheus/operations.png" max-width="500px" class="docs-image--no-shadow" caption="Operations" >}}
|
||||
|
||||
Select the `+ Operations` button to add operations to your query.
|
||||
The query editor groups operations into related sections, and you can type while the operations dropdown is open to search and filter the list.
|
||||
Select the **+ Operations** button to add operations to your query.
|
||||
|
||||
The query editor displays a query's operations as boxes in the operations section.
|
||||
Each operation's header displays its name, and additional action buttons appear when you hover your cursor over the header:
|
||||
The query editor groups operations into the following sections:
|
||||
|
||||
| Button | Action |
|
||||
| ------ | ----------------------------------------------------------------- |
|
||||
| `v` | Replaces the operation with different operation of the same type. |
|
||||
| `info` | Opens the operation's description tooltip. |
|
||||
| `x` | Removes the operation. |
|
||||
- Aggregations - for additional information see [Aggregation operators](https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators).
|
||||
- Range functions - for additional information see [Functions](https://prometheus.io/docs/prometheus/latest/querying/functions/#functions).
|
||||
- Functions - for additional information see [Functions](https://prometheus.io/docs/prometheus/latest/querying/functions/#functions).
|
||||
- Binary operations - for additional information see [Binary operators](https://prometheus.io/docs/prometheus/latest/querying/operators/#binary-operators).
|
||||
- Trigonometric - for additional information see [Trigonometric functions](https://prometheus.io/docs/prometheus/latest/querying/functions/#trigonometric-functions).
|
||||
- Time functions - for additional information see [Functions](https://prometheus.io/docs/prometheus/latest/querying/functions/#functions).
|
||||
|
||||
Some operations have additional parameters under the operation header.
|
||||
For details about each operation, use the `info` button to view the operation's description, or refer to the Prometheus documentation on [query functions](https://prometheus.io/docs/prometheus/latest/querying/functions/).
|
||||
All operations have function parameters under the operation header. Click the `operator` to see a full list of supported functions. Some operations allow you to apply specific labels to functions.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/use-function-by-label-9-5.png" max-width="500px" class="docs-image--no-shadow" caption="Functions and labels" >}}
|
||||
|
||||
Some operations make sense only when used in a specific order.
|
||||
If adding an operation would result in nonsensical query, the query editor adds the operation to the correct place.
|
||||
To re-order operations manually, drag the operation box by its name and drop it into the desired place.
|
||||
|
||||
#### Hints
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/hint-8-5.png" max-width="500px" class="docs-image--no-shadow" caption="Hint" >}}
|
||||
{{< figure src="/static/img/docs/prometheus/hint-example.png" max-width="500px" class="docs-image--no-shadow" caption="Hint" >}}
|
||||
|
||||
The query editor can detect which operations are most appropriate for some selected metrics.
|
||||
If it does, it displays a hint next to the `+ Operations` button.
|
||||
If it does, it displays a hint next to the **+ Operations** button.
|
||||
|
||||
To add the operations to your query, click the hint.
|
||||
To add the operation to your query, click the **Hint**.
|
||||
|
||||
## Use Explain mode to understand queries
|
||||
Once you are satisfied with your query, click **Run query**.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/explain-8-5.png" max-width="500px" class="docs-image--no-shadow" caption="Explain mode" >}}
|
||||
## Code mode
|
||||
|
||||
Explain mode helps you understand a query by displaying a step-by-step explanation of all query components and operations.
|
||||
**Code mode** is for the experienced Prometheus user with prior expertise in PromQL, Prometheus' query language. The Code mode editor allows you to create queries just as you would in Prometheus. For more information about PromQL see [Querying Prometheus](http://prometheus.io/docs/querying/basics/).
|
||||
|
||||
### Additional options
|
||||
{{< figure src="/static/img/docs/prometheus/code-mode.png" max-width="500px" class="docs-image--no-shadow" caption="Code mode" >}}
|
||||
|
||||
In addition to these Builder mode-specific options, the query editor also displays the options it shares in common with Code mode.
|
||||
For details, refer to the [common options]({{< relref "#configure-common-options" >}}).
|
||||
The user interface (UI) also lets you select metrics, labels, filters and operations.
|
||||
|
||||
## Apply annotations
|
||||
You can write complex queries using the text editor with autocompletion features and syntax highlighting.
|
||||
It also contains a [Metrics browser]({{< relref "#metrics-browser" >}}) to further help you write queries.
|
||||
|
||||
[Annotations]({{< relref "../../../dashboards/build-dashboards/annotate-visualizations" >}}) overlay rich event information on top of graphs.
|
||||
You can add annotation queries in the Dashboard menu's Annotations view.
|
||||
### Use autocomplete
|
||||
|
||||
Prometheus supports two ways to query annotations.
|
||||
Code mode's autocomplete feature works automatically while typing. The query editor can autocomplete static functions, aggregations, keywords, and also dynamic items like metrics and labels.
|
||||
The autocompletion dropdown includes documentation for the suggested items where available.
|
||||
|
||||
- A regular metric query
|
||||
- A Prometheus query for pending and firing alerts (for details see [Inspecting alerts during runtime](https://prometheus.io/docs/prometheus/latest/configuration/alerting_rules/#inspecting-alerts-during-runtime))
|
||||
### Metrics browser
|
||||
|
||||
The step option is useful to limit the number of events returned from your query.
|
||||
The metrics browser locates metrics and selects relevant labels to help you build basic queries.
|
||||
When you click **Metrics browser**, it displays all available metrics and labels.
|
||||
If supported by your Prometheus instance, each metric also displays its `HELP` and `TYPE` as a tooltip.
|
||||
|
||||
{{< figure src="/static/img/docs/prometheus/metric-browser.png" max-width="500px" class="docs-image--no-shadow" caption="Metrics browser" >}}
|
||||
|
||||
When you select a metric under Step 1, the browser narrows down the available labels to show only the ones applicable to the metric.
|
||||
You can then select one or more labels shown in Step 2.
|
||||
Select one or more values in Step 3 for each label to tighten your query scope.
|
||||
In Step 4, you can select **Use query** to run the query, **Use as rate query** to add the rate operation to your query (`$__rate_interval`), **Validate selector** to verify the selector is valid and show the number of series found, or **Clear** to clear your selections and start over.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you do not remember a metric name, you can also select a few labels to narrow down the list, then find relevant label values.
|
||||
{{% /admonition %}}
|
||||
|
||||
All lists in the metrics browser have a search field above them to quickly filter for metrics or labels that match a certain string.
|
||||
The values section has only one search field, and its filtering applies to all labels to help you find values across labels once selected.
|
||||
|
||||
For example, among your labels `app`, `job`, `job_name` only one might have the value you are looking for.
|
||||
|
||||
Once you are satisfied with your query, click **Run query**.
|
||||
|
||||
@@ -15,15 +15,14 @@ weight: 400
|
||||
|
||||
# Prometheus template variables
|
||||
|
||||
Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables.
|
||||
Instead of hard-coding details such as server, application, and sensor names in metric queries, you can use variables. Grafana refers to such variables as **template** variables.
|
||||
Grafana lists these variables in dropdown select boxes at the top of the dashboard to help you change the data displayed in your dashboard.
|
||||
Grafana refers to such variables as template variables.
|
||||
|
||||
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../../dashboards/variables" >}}) and [Add and manage variables]({{< relref "../../../dashboards/variables/add-template-variables" >}}) documentation.
|
||||
For an introduction to templating and template variables, see [Templating]({{< relref "../../../dashboards/variables" >}}) and [Add and manage variables]({{< relref "../../../dashboards/variables/add-template-variables" >}}).
|
||||
|
||||
## Use query variables
|
||||
|
||||
Use variables of the type _Query_ to query Prometheus for a list of metrics, labels, or label values.
|
||||
You have the option to use several different variable types, but variables of the type `Query` will query Prometheus for a list of metrics, labels, label values, a query result or a series.
|
||||
|
||||
Select a Prometheus data source query type and enter the required inputs:
|
||||
|
||||
@@ -37,6 +36,26 @@ Select a Prometheus data source query type and enter the required inputs:
|
||||
|
||||
For details on _metric names_, _label names_, and _label values_, refer to the [Prometheus documentation](http://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
|
||||
|
||||
### Query options
|
||||
|
||||
Under the query variable type, you can set the following query options:
|
||||
|
||||
| Option | Description |
|
||||
| --------------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| **Data source** | Select your data source from the dropdown list. |
|
||||
| **Select query type** | Options are `default`, `value` and `metric name`. Each query type hits a different Prometheus endpoint. |
|
||||
| **Regex** | Optional, if you want to extract part of a series name or metric node segment. |
|
||||
| **Sort** | Default is `disabled`. Options include `alphabetical`, `numerical` and `alphabetical case-sensitive`. |
|
||||
| **Refresh** | When to update the values for the variable. Options are `On dashboard load` and `On time range change`. |
|
||||
|
||||
### Selection options
|
||||
|
||||
The following selection options are available:
|
||||
|
||||
- **Multi-value** - Check this option to enable multiple values to be selected at the same time.
|
||||
|
||||
- **Include All option** - Check this option to include all variables.
|
||||
|
||||
### Use interval and range variables
|
||||
|
||||
You can use some global built-in variables in query variables, for example, `$__interval`, `$__interval_ms`, `$__range`, `$__range_s` and `$__range_ms`.
|
||||
|
||||
@@ -38,15 +38,14 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
|
||||
| Name | Description |
|
||||
| -------------- | ------------------------------------------------------------------------ |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Sets the data source that's pre-selected for new panels. |
|
||||
| **URL** | Sets the URL of the Tempo instance, such as `http://tempo`. |
|
||||
| **Basic Auth** | Enables basic authentication to the Tempo data source. |
|
||||
| **User** | Sets the user name for basic authentication. |
|
||||
| **Password** | Sets the password for basic authentication. |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Sets the data source that's pre-selected for new panels. |
|
||||
| **URL** | Sets the URL of the Tempo instance, such as `http://tempo`. |
|
||||
| **Basic Auth** | Enables basic authentication to the Tempo data source. |
|
||||
| **User** | Sets the user name for basic authentication. |
|
||||
| **Password** | Sets the password for basic authentication. |
|
||||
|
||||
You can also configure settings specific to the Tempo data source. These options are described in the sections below.
|
||||
|
||||
|
||||
@@ -58,15 +58,25 @@ To configure your Tempo data source to use this feature, refer to the [Tempo doc
|
||||
|
||||
To query a particular trace:
|
||||
|
||||
1. Select the **TraceID** query type.
|
||||
1. Enter the trace's ID into the **Trace ID** field.
|
||||
1. Select the **TraceQL** query type.
|
||||
1. Enter the trace's ID into the query field.
|
||||
|
||||
{{< figure src="/static/img/docs/tempo/query-editor-traceid.png" class="docs-image--no-shadow" max-width="750px" caption="Screenshot of the Tempo TraceID query type" >}}
|
||||
|
||||
## Query by TraceQL
|
||||
|
||||
Inspired by PromQL and LogQL, TraceQL is a query language designed for selecting traces.
|
||||
The default traces search reviews the whole trace.
|
||||
TraceQL provides a method for formulating precise queries so you can zoom in to the data you need. Query results are returned faster because the queries limit what is searched
|
||||
|
||||
To learn more about how to query by TraceQL, refer to the [TraceQL documentation](/docs/tempo/latest/traceql).
|
||||
|
||||
You can create TraceQL queries using the Query editor or using Search query tab (preview feature).
|
||||
|
||||
[//]: # 'Include content for preview of Search tab featuring TraceQL query builder'
|
||||
|
||||
{{< docs/shared source="grafana" lookup="datasources/tempo-search-traceql.md" leveloffset="+1" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Query Loki for traces
|
||||
|
||||
To find traces to visualize, you can use the [Loki query editor]({{< relref "../../loki#loki-query-editor" >}}).
|
||||
|
||||
11
docs/sources/datasources/testdata/_index.md
vendored
11
docs/sources/datasources/testdata/_index.md
vendored
@@ -33,15 +33,14 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
The **Settings** tab of the data source is displayed. The data source doesn't provide any settings beyond the most basic options common to all data sources:
|
||||
|
||||
| Name | Description |
|
||||
|
||||
| Name | Description |
|
||||
| ----------- | ------------------------------------------------------------------------ |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Defines whether this data source is pre-selected for new panels. |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Defines whether this data source is pre-selected for new panels. |
|
||||
|
||||
## Create mock data
|
||||
|
||||
{{< figure src="/static/img/docs/v41/test_data_add.png" class="docs-image--no-shadow" caption="Adding test data" >}}
|
||||
{{< figure src="/media/docs/grafana/data-sources/screenshot-testdata-add-10.0.png" class="docs-image--no-shadow" caption="Adding test data" >}}
|
||||
|
||||
Once you've added the TestData data source, your Grafana instance's users can use it as a data source in any metric panel.
|
||||
|
||||
@@ -51,7 +50,7 @@ Instead of providing a query editor, the TestData data source helps you select a
|
||||
|
||||
You can assign an **Alias** to each scenario, and many have their own options that appear when selected.
|
||||
|
||||
{{< figure src="/static/img/docs/v41/test_data_csv_example.png" class="docs-image--no-shadow" caption="Using CSV Metric Values" >}}
|
||||
{{< figure src="/media/docs/grafana/data-sources/screenshot-testdata-csv-example-10.0.png" class="docs-image--no-shadow" caption="Using CSV Metric Values" >}}
|
||||
|
||||
**Available scenarios:**
|
||||
|
||||
|
||||
@@ -38,15 +38,14 @@ To configure basic settings for the data source, complete the following steps:
|
||||
|
||||
1. Set the data source's basic configuration options:
|
||||
|
||||
| Name | Description |
|
||||
|
||||
| Name | Description |
|
||||
| -------------- | ------------------------------------------------------------------------ |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Defines whether this data source is pre-selected for new panels. |
|
||||
| **URL** | Sets the URL of the Zipkin instance, such as `http://localhost:9411`. |
|
||||
| **Basic Auth** | Enables basic authentication for the Zipkin data source. |
|
||||
| **User** | Defines the user name for basic authentication. |
|
||||
| **Password** | Defines the password for basic authentication. |
|
||||
| **Name** | Sets the name you use to refer to the data source in panels and queries. |
|
||||
| **Default** | Defines whether this data source is pre-selected for new panels. |
|
||||
| **URL** | Sets the URL of the Zipkin instance, such as `http://localhost:9411`. |
|
||||
| **Basic Auth** | Enables basic authentication for the Zipkin data source. |
|
||||
| **User** | Defines the user name for basic authentication. |
|
||||
| **Password** | Defines the password for basic authentication. |
|
||||
|
||||
### Trace to logs
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ AngularJS is an old frontend framework whose active development stopped many yea
|
||||
|
||||
## When will Angular plugins stop working?
|
||||
|
||||
Our goal is to transfer all the remaining Angular code to the core of Grafana before Grafana 10 is released in Summer 2023. Once this is done, the option "[angular_support_enabled](https://github.com/grafana/grafana/blob/d61bcdf4ca5e69489e0067c56fbe7f0bfdf84ee4/conf/defaults.ini#L362)" will be disabled by default, resulting in the deactivation of all Angular plugins. In case you still rely on AngularJS-based plugins developed internally or by the community, you will need to enable this option to continue using them.
|
||||
Our goal is to transfer all the remaining Angular code to the core of Grafana before Grafana 10 is released in Summer 2023. Once this is done, the option "[angular_support_enabled](https://github.com/grafana/grafana/blob/d61bcdf4ca5e69489e0067c56fbe7f0bfdf84ee4/conf/defaults.ini#L362)" will be disabled by default for new Grafana Cloud users, resulting in the inability to use Angular plugins. In case you still rely on AngularJS-based plugins developed internally or by the community, you will need to enable this option to continue using them. Following the release of Grafana 10 we will be migrating Grafana Cloud users where possible and disabling Angular support when appropriate, we will also be introducing new features to help all users identify how they are impacted and to warn of the use of deprecated plugins within the Grafana UI.
|
||||
|
||||
## When will we remove Angular support completely?
|
||||
|
||||
@@ -36,6 +36,7 @@ We encourage you to locate the repository of the corresponding plugin and create
|
||||
|
||||
### Links
|
||||
|
||||
- [Migrate Angular to React](https://grafana.com/docs/grafana/latest/developers/plugins/migration-guide/#migrate-a-plugin-from-angular-to-react)
|
||||
- [Migrate Angular to React]({{< relref "../plugins/migration-guide/angular-react/" >}})
|
||||
- [Build a panel plugin](https://grafana.com/tutorials/build-a-panel-plugin/)
|
||||
- [Build a data source plugin](https://grafana.com/tutorials/build-a-data-source-plugin/)
|
||||
- [List of current Angular plugins]({{< relref "./angular-plugins/" >}})
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user