mirror of
https://github.com/grafana/grafana.git
synced 2026-01-14 13:21:26 +00:00
Compare commits
389 Commits
undef1nd/t
...
release-11
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7473669ded | ||
|
|
ae440ce1bc | ||
|
|
735ad9fc9a | ||
|
|
3f7a8e7966 | ||
|
|
eb8d71aa68 | ||
|
|
f00f2708a9 | ||
|
|
fcc09dba3a | ||
|
|
05813fc6ec | ||
|
|
2c28ed45b7 | ||
|
|
d5f8a515eb | ||
|
|
b54d8c6044 | ||
|
|
f0b684cacc | ||
|
|
56f4801dd1 | ||
|
|
61769ff588 | ||
|
|
431514b5a5 | ||
|
|
beed74efb8 | ||
|
|
e8551c5f43 | ||
|
|
b69dfc01a6 | ||
|
|
34c4aea861 | ||
|
|
621bd18c41 | ||
|
|
351aeb020c | ||
|
|
180375254b | ||
|
|
ce9d6b3d66 | ||
|
|
8980faf989 | ||
|
|
d4703cc677 | ||
|
|
83d37ef32a | ||
|
|
46d01327f9 | ||
|
|
38d0f714da | ||
|
|
2ee2a29193 | ||
|
|
8bb8853175 | ||
|
|
f9924f41b2 | ||
|
|
841fe10d86 | ||
|
|
42a1dfcd08 | ||
|
|
612b2504fe | ||
|
|
2c05df398c | ||
|
|
ef244f893a | ||
|
|
cd684cb54b | ||
|
|
3a4a310f38 | ||
|
|
9a13fbafca | ||
|
|
77c311fba4 | ||
|
|
0f5f55b91f | ||
|
|
9e95b771f0 | ||
|
|
7eb5949aa6 | ||
|
|
217f41b195 | ||
|
|
5be13fe0e3 | ||
|
|
7c28a37b2b | ||
|
|
9fba0d31ee | ||
|
|
72ce0a22ae | ||
|
|
509d21a831 | ||
|
|
a580c0f2b2 | ||
|
|
f2449194d0 | ||
|
|
9c5de640fc | ||
|
|
e8a6d0ae9c | ||
|
|
b3ce967d0d | ||
|
|
9dba7c2dd3 | ||
|
|
fe95150587 | ||
|
|
abafa8dc8a | ||
|
|
6739e6aea7 | ||
|
|
4f4cf86863 | ||
|
|
9531bc1400 | ||
|
|
853db458dd | ||
|
|
5e50f44002 | ||
|
|
74fb95281f | ||
|
|
4ccd1e7da7 | ||
|
|
bb381da5dd | ||
|
|
51adc6e5a6 | ||
|
|
0cef6dc290 | ||
|
|
276c3cb87b | ||
|
|
2c49282f80 | ||
|
|
c5376b6e65 | ||
|
|
a6f44c6648 | ||
|
|
29808a11a2 | ||
|
|
0504946874 | ||
|
|
6fd7c4b45e | ||
|
|
f88533b24e | ||
|
|
6f8891b03f | ||
|
|
0b4c8ac0db | ||
|
|
b6b0ade64a | ||
|
|
4675cd82a0 | ||
|
|
525acc68dc | ||
|
|
4e62540f8b | ||
|
|
2e125c8e1f | ||
|
|
5f300ba141 | ||
|
|
62f29305bd | ||
|
|
08818c6658 | ||
|
|
038c2a06f5 | ||
|
|
5108d52261 | ||
|
|
f78bd2baab | ||
|
|
ec5a3ceafc | ||
|
|
d59a4af7dd | ||
|
|
d1732255ff | ||
|
|
5ec91a51c1 | ||
|
|
bd4a52face | ||
|
|
e3ce008cff | ||
|
|
c7982e11cb | ||
|
|
681415a535 | ||
|
|
51658cef59 | ||
|
|
c2d8711b14 | ||
|
|
8cf8e42533 | ||
|
|
4a133f2117 | ||
|
|
2967beba63 | ||
|
|
7a49938042 | ||
|
|
89f1eb3da7 | ||
|
|
4cecf312fc | ||
|
|
bf06bb3b92 | ||
|
|
f788e93e3e | ||
|
|
e708848e88 | ||
|
|
3580c42b17 | ||
|
|
310f21dc76 | ||
|
|
7da679ab37 | ||
|
|
bf5f202fdf | ||
|
|
f894cf0ecf | ||
|
|
0d3e7a7982 | ||
|
|
aed418aebe | ||
|
|
d0822ebb55 | ||
|
|
12b0b3adfc | ||
|
|
901418e263 | ||
|
|
bdcafd7b94 | ||
|
|
6be6e48f4c | ||
|
|
1760373261 | ||
|
|
e5ba2c88a5 | ||
|
|
6435fd23ff | ||
|
|
cf195e8d41 | ||
|
|
446c8e9cc2 | ||
|
|
c7e6c1dc32 | ||
|
|
d652d2d139 | ||
|
|
7ece6b35f0 | ||
|
|
df4c5f46f8 | ||
|
|
46d0ac7e5c | ||
|
|
fc02db9805 | ||
|
|
a0ff48f602 | ||
|
|
1502c7163a | ||
|
|
e4285198aa | ||
|
|
2331c4b6a9 | ||
|
|
7ecfc9e2e4 | ||
|
|
15937ea865 | ||
|
|
064665daea | ||
|
|
251ec844a7 | ||
|
|
c5685dc75b | ||
|
|
b9c564d349 | ||
|
|
409e5d1ce2 | ||
|
|
015666cf0d | ||
|
|
aea8a5d0e3 | ||
|
|
3084f4bcba | ||
|
|
5599981422 | ||
|
|
aac8b983c2 | ||
|
|
9f1fab9134 | ||
|
|
af039556a3 | ||
|
|
f044b14b0e | ||
|
|
81831fec55 | ||
|
|
d5dd4a0c3a | ||
|
|
c8ca8e0f4a | ||
|
|
6076d9b0e0 | ||
|
|
fd76baa5cb | ||
|
|
6e84f62fa2 | ||
|
|
cb5982875b | ||
|
|
1a79ce375f | ||
|
|
668fd0904a | ||
|
|
37f189314a | ||
|
|
9f17756d05 | ||
|
|
4ebddb4f23 | ||
|
|
5e71df3736 | ||
|
|
bca31b7b00 | ||
|
|
4ff3ab2f22 | ||
|
|
dbc7496a00 | ||
|
|
56383725f3 | ||
|
|
f16f14e759 | ||
|
|
b9b601b05a | ||
|
|
f3edb622bd | ||
|
|
bca08a06fc | ||
|
|
74da8c09e3 | ||
|
|
d0adcfa51b | ||
|
|
04c8255493 | ||
|
|
fccf08107b | ||
|
|
4fdbca747c | ||
|
|
249218b089 | ||
|
|
ed487355a9 | ||
|
|
17f973b8e6 | ||
|
|
dbbb357681 | ||
|
|
5fcb301765 | ||
|
|
18aeac0c5b | ||
|
|
9ca175cbfb | ||
|
|
d564bec2c4 | ||
|
|
4dce0b3ce7 | ||
|
|
4c76044f05 | ||
|
|
4d58cbd301 | ||
|
|
c2535206ce | ||
|
|
96f879808b | ||
|
|
7d6566959b | ||
|
|
eb1b89b26d | ||
|
|
32e24d1d7d | ||
|
|
13fb4acc31 | ||
|
|
aec2368800 | ||
|
|
ec687036e5 | ||
|
|
8d41b98037 | ||
|
|
639ed2366d | ||
|
|
c9e5cc32fd | ||
|
|
9fe605265d | ||
|
|
46651214d8 | ||
|
|
13dbd81407 | ||
|
|
2e2ef4e402 | ||
|
|
b0faef336b | ||
|
|
249f8fe115 | ||
|
|
4be9eebb8e | ||
|
|
44f2b5d9c5 | ||
|
|
ed5b6179ac | ||
|
|
dcdf148140 | ||
|
|
1256172df5 | ||
|
|
9731d7c0f7 | ||
|
|
09ed2369ce | ||
|
|
33eaec336e | ||
|
|
312b99f68e | ||
|
|
da500a56b3 | ||
|
|
783216e4b9 | ||
|
|
cc2941b1b8 | ||
|
|
1c6687ac61 | ||
|
|
53d92abf74 | ||
|
|
bacab3498c | ||
|
|
90646fa1e6 | ||
|
|
ca5554e88d | ||
|
|
d6dd16fdf9 | ||
|
|
fc43fecb81 | ||
|
|
b549030921 | ||
|
|
e998da3163 | ||
|
|
374e83718e | ||
|
|
b6d5da870d | ||
|
|
90cd1d9ca2 | ||
|
|
0eef9d22d2 | ||
|
|
34d6127e3d | ||
|
|
07005383db | ||
|
|
d5a6f8eed0 | ||
|
|
0d08409945 | ||
|
|
ee41006ac2 | ||
|
|
4d59d59425 | ||
|
|
567fbab84a | ||
|
|
7045ce16dd | ||
|
|
49b6f2847d | ||
|
|
a07b6c7c95 | ||
|
|
f19611aa9f | ||
|
|
a3e7b4bbba | ||
|
|
59c9ddba40 | ||
|
|
6941bd5fc8 | ||
|
|
ae03217b9c | ||
|
|
68665e4ce9 | ||
|
|
738cc49ec5 | ||
|
|
bb5d2c83ef | ||
|
|
b7d434faaf | ||
|
|
f4e7402e3f | ||
|
|
4c70fd6a3e | ||
|
|
78d19bfa11 | ||
|
|
4aa2bb630e | ||
|
|
8c9d4696e1 | ||
|
|
39df6fb2fa | ||
|
|
3d38f30ff4 | ||
|
|
fe032f10c7 | ||
|
|
61d9102d98 | ||
|
|
99bd39539b | ||
|
|
a1751ab900 | ||
|
|
2c084e6113 | ||
|
|
93d25da8c1 | ||
|
|
78680389b3 | ||
|
|
a8ed6c49e3 | ||
|
|
9f22e97ab6 | ||
|
|
8a8679fc4e | ||
|
|
8a219d5d18 | ||
|
|
c17f395374 | ||
|
|
8007be0b57 | ||
|
|
ec81c967b6 | ||
|
|
beac3bdbcb | ||
|
|
00614f2813 | ||
|
|
16bca1736d | ||
|
|
907916dc39 | ||
|
|
417edf5c43 | ||
|
|
a034ed6f1b | ||
|
|
bf264b2df3 | ||
|
|
bd59be01e8 | ||
|
|
8ecf1dff7e | ||
|
|
12a3a261a2 | ||
|
|
b4f4b3e9b4 | ||
|
|
c2e78f5cd6 | ||
|
|
f5cebcca1b | ||
|
|
009a75f796 | ||
|
|
7e742cdaa2 | ||
|
|
17fce96f7f | ||
|
|
220f0a5b42 | ||
|
|
61662f3574 | ||
|
|
2c8c2199a1 | ||
|
|
6a9fc2ac93 | ||
|
|
af6b53420b | ||
|
|
ed0cd7ee06 | ||
|
|
104daa45db | ||
|
|
7e9f8a8779 | ||
|
|
1d30eb36d9 | ||
|
|
27cd35a97b | ||
|
|
41bd47700a | ||
|
|
6f27663318 | ||
|
|
be8ff40d58 | ||
|
|
e0dbd8f3f2 | ||
|
|
af1aaab3a6 | ||
|
|
b1a552bd07 | ||
|
|
26822fae62 | ||
|
|
abd9e86fe6 | ||
|
|
eab471a17c | ||
|
|
c5ea48aec9 | ||
|
|
5c39ab885d | ||
|
|
2efd32d5e4 | ||
|
|
1af63c69f8 | ||
|
|
3124df86a9 | ||
|
|
e5bbc6f17a | ||
|
|
64b649e407 | ||
|
|
b8c48273db | ||
|
|
06a25efb55 | ||
|
|
d4241ea163 | ||
|
|
0d3206db83 | ||
|
|
6920f9118c | ||
|
|
cbf4bd59fa | ||
|
|
c20fd6e7f5 | ||
|
|
37b9d659a7 | ||
|
|
6452e9665e | ||
|
|
2d0723ffc8 | ||
|
|
a56e351bc8 | ||
|
|
cae1635c8f | ||
|
|
b1751659c7 | ||
|
|
2835a1c9c7 | ||
|
|
460dfdd63d | ||
|
|
69139f20a5 | ||
|
|
8c8a2d77bf | ||
|
|
e60254c952 | ||
|
|
8caf0df5a4 | ||
|
|
11b8626b36 | ||
|
|
c032def097 | ||
|
|
5510541ae7 | ||
|
|
81c03daac3 | ||
|
|
244d0cf46a | ||
|
|
fbcdaccb6d | ||
|
|
bd64166681 | ||
|
|
60ea823a60 | ||
|
|
b908b86d22 | ||
|
|
9cafc1abe4 | ||
|
|
e0c2a0a219 | ||
|
|
801dd891b8 | ||
|
|
bf610cb029 | ||
|
|
36102bbaef | ||
|
|
66034f5eb7 | ||
|
|
6f5e8414b3 | ||
|
|
4cf941e19f | ||
|
|
64e4b0ec6a | ||
|
|
80b3b5d292 | ||
|
|
82eccf0672 | ||
|
|
6a89d906cc | ||
|
|
795025156e | ||
|
|
b5eeb5fd92 | ||
|
|
7910226cdf | ||
|
|
446501ffd1 | ||
|
|
fe6cc7bcb5 | ||
|
|
0b55fd04bc | ||
|
|
b1a42dd55a | ||
|
|
b97bf4c632 | ||
|
|
bbefb6a4eb | ||
|
|
9b283e650d | ||
|
|
e4a82fedbd | ||
|
|
d19a851353 | ||
|
|
3531b585e3 | ||
|
|
e62f0388da | ||
|
|
6257deeae6 | ||
|
|
5ec9cd017b | ||
|
|
10e913ac79 | ||
|
|
f96fb799a9 | ||
|
|
212fe5d179 | ||
|
|
36dbcbc78a | ||
|
|
3418e01da5 | ||
|
|
c4f072e4a9 | ||
|
|
ba5cc1b089 | ||
|
|
34289b84fd | ||
|
|
cdc07eb126 | ||
|
|
1d165ba391 | ||
|
|
4690d88c52 | ||
|
|
7535629551 | ||
|
|
badcca2bb2 | ||
|
|
96ba44c802 | ||
|
|
37b9dc0a37 | ||
|
|
9bfa4a6ce6 | ||
|
|
5c6f18a18b | ||
|
|
cad1d4541b | ||
|
|
36dd8f50de | ||
|
|
1d6d252e1d | ||
|
|
92ba78cd95 | ||
|
|
db381f3afd | ||
|
|
e20392c206 |
@@ -1320,10 +1320,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/core/services/echo/backends/analytics/ApplicationInsightsBackend.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/core/services/echo/backends/analytics/RudderstackBackend.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
@@ -2800,7 +2796,8 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "10"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/inspect/HelpWizard/utils.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/inspect/InspectDataTab.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
|
||||
@@ -2860,6 +2857,10 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "2"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "3"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/saving/DashboardSceneChangeTracker.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/saving/SaveDashboardAsForm.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
|
||||
@@ -2893,6 +2894,9 @@ exports[`better eslint`] = {
|
||||
"public/app/features/dashboard-scene/saving/shared.tsx:5381": [
|
||||
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/scene/DashboardControls.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/scene/NavToolbarActions.test.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
@@ -2948,7 +2952,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "11"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"]
|
||||
],
|
||||
"public/app/features/dashboard-scene/serialization/transformSceneToSaveModel.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
@@ -6232,6 +6238,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"public/app/plugins/datasource/dashboard/datasource.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/datasource/dashboard/index.ts:5381": [
|
||||
[0, 0, 0, "Do not re-export imported variable (\`./runSharedRequest\`)", "0"],
|
||||
[0, 0, 0, "Do not re-export imported variable (\`./DashboardQueryEditor\`)", "1"],
|
||||
|
||||
@@ -35,11 +35,11 @@ $(DRONE): $(BINGO_DIR)/drone.mod
|
||||
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
|
||||
@cd $(BINGO_DIR) && GOWORK=off CGO_ENABLED=0 $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
|
||||
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.59.0
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.62.0
|
||||
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
|
||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.59.0"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.59.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.62.0"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.62.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
|
||||
JB := $(GOBIN)/jb-v0.5.1
|
||||
$(JB): $(BINGO_DIR)/jb.mod
|
||||
@@ -53,11 +53,9 @@ $(LEFTHOOK): $(BINGO_DIR)/lefthook.mod
|
||||
@echo "(re)installing $(GOBIN)/lefthook-v1.4.8"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=lefthook.mod -o=$(GOBIN)/lefthook-v1.4.8 "github.com/evilmartians/lefthook"
|
||||
|
||||
# swagger 0.30.5 isn't compatibile with go 1.22 yet so pinning to a specific commit until there's a new release
|
||||
# https://github.com/go-swagger/go-swagger/issues/3070
|
||||
SWAGGER := $(GOBIN)/swagger-db51e79a0e37c572d8b59ae0c58bf2bbbbe53285
|
||||
SWAGGER := $(GOBIN)/swagger-v0.30.6-0.20240310114303-db51e79a0e37
|
||||
$(SWAGGER): $(BINGO_DIR)/swagger.mod
|
||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||
@echo "(re)installing $(GOBIN)/swagger-db51e79a0e37c572d8b59ae0c58bf2bbbbe53285"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-db51e79a0e37c572d8b59ae0c58bf2bbbbe53285 "github.com/go-swagger/go-swagger/cmd/swagger"
|
||||
@echo "(re)installing $(GOBIN)/swagger-v0.30.6-0.20240310114303-db51e79a0e37"
|
||||
@cd $(BINGO_DIR) && GOWORK=off $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.6-0.20240310114303-db51e79a0e37 "github.com/go-swagger/go-swagger/cmd/swagger"
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.22
|
||||
go 1.23
|
||||
|
||||
toolchain go1.22.4
|
||||
|
||||
require github.com/golangci/golangci-lint v1.59.0 // cmd/golangci-lint
|
||||
require github.com/golangci/golangci-lint v1.62.0 // cmd/golangci-lint
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ CUE="${GOBIN}/cue-v0.5.0"
|
||||
|
||||
DRONE="${GOBIN}/drone-v1.5.0"
|
||||
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.59.0"
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.62.0"
|
||||
|
||||
JB="${GOBIN}/jb-v0.5.1"
|
||||
|
||||
|
||||
13
.drone.star
13
.drone.star
@@ -17,18 +17,10 @@ load(
|
||||
"publish_npm_pipelines",
|
||||
"publish_packages_pipeline",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/ci_images.star",
|
||||
"publish_ci_windows_test_image_pipeline",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/publish_images.star",
|
||||
"publish_image_pipelines_public",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/pipelines/windows.star",
|
||||
"windows_test_backend",
|
||||
)
|
||||
load(
|
||||
"scripts/drone/rgm.star",
|
||||
"rgm",
|
||||
@@ -44,12 +36,7 @@ def main(_ctx):
|
||||
publish_npm_pipelines() +
|
||||
publish_packages_pipeline() +
|
||||
rgm() +
|
||||
[windows_test_backend({
|
||||
"event": ["promote"],
|
||||
"target": ["test-windows"],
|
||||
}, "oss", "testing")] +
|
||||
integration_test_pipelines() +
|
||||
publish_ci_windows_test_image_pipeline() +
|
||||
cronjobs() +
|
||||
secrets()
|
||||
)
|
||||
|
||||
1401
.drone.yml
1401
.drone.yml
File diff suppressed because it is too large
Load Diff
24
.github/CODEOWNERS
vendored
24
.github/CODEOWNERS
vendored
@@ -43,12 +43,12 @@
|
||||
/docs/sources/dashboards/ @imatwawana
|
||||
/docs/sources/datasources/ @jdbaldry
|
||||
/docs/sources/explore/ @grafana/explore-squad @lwandz13
|
||||
/docs/sources/fundamentals @chri2547
|
||||
/docs/sources/getting-started/ @chri2547
|
||||
/docs/sources/introduction/ @chri2547
|
||||
/docs/sources/fundamentals @irenerl24
|
||||
/docs/sources/getting-started/ @irenerl24
|
||||
/docs/sources/introduction/ @irenerl24
|
||||
/docs/sources/panels-visualizations/ @imatwawana
|
||||
/docs/sources/release-notes/ @Eve832 @GrafanaWriter
|
||||
/docs/sources/setup-grafana/ @chri2547
|
||||
/docs/sources/setup-grafana/ @irenerl24
|
||||
/docs/sources/upgrade-guide/ @imatwawana
|
||||
/docs/sources/whatsnew/ @imatwawana
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
/pkg/README.md @grafana/grafana-backend-group
|
||||
/pkg/ruleguard.rules.go @grafana/grafana-backend-group
|
||||
/.bra.toml @grafana/grafana-backend-group
|
||||
/.golangci.toml @grafana/grafana-backend-group
|
||||
/.golangci.yml @grafana/grafana-backend-group
|
||||
/build.go @grafana/grafana-backend-services-squad
|
||||
/scripts/modowners/ @grafana/grafana-backend-services-squad
|
||||
/hack/ @grafana/grafana-app-platform-squad
|
||||
@@ -654,10 +654,14 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/renovate.json5 @grafana/frontend-ops
|
||||
/.github/teams.yml @armandgrillet
|
||||
/.github/workflows/alerting-swagger-gen.yml @grafana/alerting-backend
|
||||
/.github/workflows/auto-milestone.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/backport.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/bump-version.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/close-milestone.yml @grafana/grafana-release-guild
|
||||
/.github/workflows/auto-milestone.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/backport.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/bump-version.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/close-milestone.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/release-pr.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/release-comms.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/migrate-prs.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/create-next-release-branch.yml @grafana/grafana-developer-enablement-squad
|
||||
/.github/workflows/codeowners-validator.yml @tolzhabayev
|
||||
/.github/workflows/codeql-analysis.yml @DanCech
|
||||
/.github/workflows/commands.yml @torkelo
|
||||
@@ -700,7 +704,7 @@ embed.go @grafana/grafana-as-code
|
||||
/.github/workflows/i18n-crowdin-download.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/pr-go-workspace-check.yml @grafana/grafana-app-platform-squad
|
||||
/.github/workflows/run-scenes-e2e.yml @grafana/dashboards-squad
|
||||
/.github/workflows/go_lint.yml @grafana/grafana-backend-services-squad
|
||||
/.github/workflows/go-lint.yml @grafana/grafana-backend-services-squad
|
||||
|
||||
# Generated files not requiring owner approval
|
||||
/packages/grafana-data/src/types/featureToggles.gen.ts @grafanabot
|
||||
|
||||
22
.github/workflows/actions/changelog/action.yml
vendored
Normal file
22
.github/workflows/actions/changelog/action.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Changelog generator
|
||||
description: Generates and publishes a changelog for the given release version
|
||||
inputs:
|
||||
target:
|
||||
description: Target tag, branch or commit hash for the changelog
|
||||
required: true
|
||||
previous:
|
||||
description: Previous tag, branch or commit hash to start changelog from
|
||||
required: false
|
||||
github_token:
|
||||
description: GitHub token with read/write access to all necessary repositories
|
||||
required: true
|
||||
output_file:
|
||||
description: A file to store resulting changelog markdown
|
||||
required: false
|
||||
outputs:
|
||||
changelog:
|
||||
description: Changelog contents between the two given versions in Markdown format
|
||||
runs:
|
||||
using: 'node20'
|
||||
main: 'index.js'
|
||||
|
||||
319
.github/workflows/actions/changelog/index.js
vendored
Normal file
319
.github/workflows/actions/changelog/index.js
vendored
Normal file
@@ -0,0 +1,319 @@
|
||||
import { appendFileSync, writeFileSync } from 'fs';
|
||||
import { exec as execCallback } from 'node:child_process';
|
||||
import { promisify } from 'node:util';
|
||||
|
||||
//
|
||||
// Github Action core utils: logging (notice + debug log levels), must escape
|
||||
// newlines and percent signs
|
||||
//
|
||||
const escapeData = (s) => s.replace(/%/g, '%25').replace(/\r/g, '%0D').replace(/\n/g, '%0A');
|
||||
const LOG = (msg) => console.log(`::notice::${escapeData(msg)}`);
|
||||
|
||||
//
|
||||
// Semver utils: parse, compare, sort etc (using official regexp)
|
||||
// https://regex101.com/r/Ly7O1x/3/
|
||||
//
|
||||
const semverRegExp =
|
||||
/^v?(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
||||
|
||||
const semverParse = (tag) => {
|
||||
const m = tag.match(semverRegExp);
|
||||
if (!m) {
|
||||
return;
|
||||
}
|
||||
const [_, major, minor, patch, prerelease] = m;
|
||||
return [+major, +minor, +patch, prerelease, tag];
|
||||
};
|
||||
|
||||
// semverCompare takes two parsed semver tags and comparest them more or less
|
||||
// according to the semver specs
|
||||
const semverCompare = (a, b) => {
|
||||
for (let i = 0; i < 3; i++) {
|
||||
if (a[i] !== b[i]) {
|
||||
return a[i] < b[i] ? 1 : -1;
|
||||
}
|
||||
}
|
||||
if (a[3] !== b[3]) {
|
||||
return a[3] < b[3] ? 1 : -1;
|
||||
}
|
||||
return 0;
|
||||
};
|
||||
|
||||
// Using `git tag -l` output find the tag (version) that goes semantically
|
||||
// right before the given version. This might not work correctly with some
|
||||
// pre-release versions, which is why it's possible to pass previous version
|
||||
// into this action explicitly to avoid this step.
|
||||
const getPreviousVersion = async (version) => {
|
||||
const exec = promisify(execCallback);
|
||||
const { stdout } = await exec('git tag -l');
|
||||
const prev = stdout
|
||||
.split('\n')
|
||||
.map(semverParse)
|
||||
.filter((tag) => tag)
|
||||
.sort(semverCompare)
|
||||
.find((tag) => semverCompare(tag, semverParse(version)) > 0);
|
||||
if (!prev) {
|
||||
throw `Could not find previous git tag for ${version}`;
|
||||
}
|
||||
return prev[4];
|
||||
};
|
||||
|
||||
// A helper for Github GraphQL API endpoint
|
||||
const graphql = async (ghtoken, query, variables) => {
|
||||
const { env } = process;
|
||||
const results = await fetch('https://api.github.com/graphql', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${ghtoken}`,
|
||||
},
|
||||
body: JSON.stringify({ query, variables }),
|
||||
});
|
||||
const { data } = await results.json();
|
||||
return data;
|
||||
};
|
||||
|
||||
// Using Github GraphQL API find the timestamp for the given tag/commit hash.
|
||||
// This is required for PR listing, because Github API only takes date/time as
|
||||
// a "since" parameter while listing. Currently there is no way to provide two
|
||||
// "commitish" items and get a list of PRs in between them.
|
||||
const getCommitishDate = async (name, owner, target) => {
|
||||
const result = await graphql(
|
||||
ghtoken,
|
||||
`
|
||||
query getCommitDate($owner: String!, $name: String!, $target: String!) {
|
||||
repository(owner: $owner, name: $name) {
|
||||
object(expression: $target) {
|
||||
... on Commit {
|
||||
committedDate
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
{ name, owner, target }
|
||||
);
|
||||
return result.repository.object.committedDate;
|
||||
};
|
||||
|
||||
// Using Github GraphQL API get a list of PRs between the two "commitish" items.
|
||||
// This resoves the "since" item's timestamp first and iterates over all PRs
|
||||
// till "target" using naïve pagination.
|
||||
const getHistory = async (name, owner, target, sinceDate) => {
|
||||
LOG(`Fetching ${owner}/${name} PRs since ${sinceDate} till ${target}`);
|
||||
const query = `
|
||||
query findCommitsWithAssociatedPullRequests(
|
||||
$name: String!
|
||||
$owner: String!
|
||||
$target: String!
|
||||
$sinceDate: GitTimestamp
|
||||
$cursor: String
|
||||
) {
|
||||
repository(name: $name, owner: $owner) {
|
||||
object(expression: $target) {
|
||||
... on Commit {
|
||||
history(first: 50, since: $sinceDate, after: $cursor) {
|
||||
totalCount
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
endCursor
|
||||
}
|
||||
nodes {
|
||||
id
|
||||
associatedPullRequests(first: 1) {
|
||||
nodes {
|
||||
title
|
||||
number
|
||||
labels(first: 10) {
|
||||
nodes {
|
||||
name
|
||||
}
|
||||
}
|
||||
commits(first: 1) {
|
||||
nodes {
|
||||
commit {
|
||||
author {
|
||||
user {
|
||||
login
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`;
|
||||
|
||||
let cursor;
|
||||
let nodes = [];
|
||||
for (;;) {
|
||||
const result = await graphql(ghtoken, query, {
|
||||
name,
|
||||
owner,
|
||||
target,
|
||||
sinceDate,
|
||||
cursor,
|
||||
});
|
||||
LOG(`GraphQL: ${JSON.stringify(result)}`);
|
||||
nodes = [...nodes, ...result.repository.object.history.nodes];
|
||||
const { hasNextPage, endCursor } = result.repository.object.history.pageInfo;
|
||||
if (!hasNextPage) {
|
||||
break;
|
||||
}
|
||||
cursor = endCursor;
|
||||
}
|
||||
return nodes;
|
||||
};
|
||||
|
||||
// The main function for this action: given two "commitish" items it gets a
|
||||
// list of PRs between them and filters/groups the PRs by category (bugfix,
|
||||
// feature, deprecation, breaking change and plugin fixes/enhancements).
|
||||
//
|
||||
// PR grouping relies on Github labels only, not on the PR contents.
|
||||
const getChangeLogItems = async (name, owner, sinceDate, to) => {
|
||||
// check if a node contains a certain label
|
||||
const hasLabel = ({ labels }, label) => labels.nodes.some(({ name }) => name === label);
|
||||
// get all the PRs between the two "commitish" items
|
||||
const history = await getHistory(name, owner, to, sinceDate);
|
||||
|
||||
const items = history.flatMap((node) => {
|
||||
// discard PRs without a "changelog" label
|
||||
const changes = node.associatedPullRequests.nodes.filter((PR) => hasLabel(PR, 'add to changelog'));
|
||||
if (changes.length === 0) {
|
||||
return [];
|
||||
}
|
||||
const item = changes[0];
|
||||
const { number, url, labels } = item;
|
||||
const title = item.title.replace(/^\[[^\]]+\]:?\s*/, '');
|
||||
// for changelog PRs try to find a suitable category.
|
||||
// Note that we can not detect "deprecation notices" like that
|
||||
// as there is no suitable label yet.
|
||||
const isBug = /fix/i.test(title) || hasLabel({ labels }, 'type/bug');
|
||||
const isBreaking = hasLabel({ labels }, 'breaking change');
|
||||
const isPlugin =
|
||||
hasLabel({ labels }, 'area/grafana/ui') ||
|
||||
hasLabel({ labels }, 'area/grafana/toolkit') ||
|
||||
hasLabel({ labels }, 'area/grafana/runtime');
|
||||
const author = item.commits.nodes[0].commit.author.user.login;
|
||||
return {
|
||||
repo: name,
|
||||
number,
|
||||
title,
|
||||
author,
|
||||
isBug,
|
||||
isPlugin,
|
||||
isBreaking,
|
||||
};
|
||||
});
|
||||
return items;
|
||||
};
|
||||
|
||||
// ======================================================
|
||||
// GENERATE CHANGELOG
|
||||
// ======================================================
|
||||
|
||||
LOG(`Changelog action started`);
|
||||
|
||||
const ghtoken = process.env.GITHUB_TOKEN || process.env.INPUT_GITHUB_TOKEN;
|
||||
if (!ghtoken) {
|
||||
throw 'GITHUB_TOKEN is not set and "github_token" input is empty';
|
||||
}
|
||||
|
||||
const target = process.argv[2] || process.env.INPUT_TARGET;
|
||||
LOG(`Target tag/branch/commit: ${target}`);
|
||||
|
||||
const previous = process.argv[3] || process.env.INPUT_PREVIOUS || (await getPreviousVersion(target));
|
||||
|
||||
LOG(`Previous tag/commit: ${previous}`);
|
||||
|
||||
const sinceDate = await getCommitishDate('grafana', 'grafana', previous);
|
||||
LOG(`Previous tag/commit timestamp: ${sinceDate}`);
|
||||
|
||||
// Get all changelog items from Grafana OSS
|
||||
const oss = await getChangeLogItems('grafana', 'grafana', sinceDate, target);
|
||||
// Get all changelog items from Grafana Enterprise
|
||||
const entr = await getChangeLogItems('grafana-enterprise', 'grafana', sinceDate, target);
|
||||
|
||||
LOG(`Found OSS PRs: ${oss.length}`);
|
||||
LOG(`Found Enterprise PRs: ${entr.length}`);
|
||||
|
||||
// Sort PRs and categorise them into sections
|
||||
const changelog = [...oss, ...entr]
|
||||
.sort((a, b) => (a.title < b.title ? -1 : 1))
|
||||
.reduce(
|
||||
(changelog, item) => {
|
||||
if (item.isPlugin) {
|
||||
changelog.plugins.push(item);
|
||||
} else if (item.isBug) {
|
||||
changelog.bugfixes.push(item);
|
||||
} else if (item.isBreaking) {
|
||||
changelog.breaking.push(item);
|
||||
} else {
|
||||
changelog.features.push(item);
|
||||
}
|
||||
return changelog;
|
||||
},
|
||||
{
|
||||
breaking: [],
|
||||
plugins: [],
|
||||
bugfixes: [],
|
||||
features: [],
|
||||
}
|
||||
);
|
||||
|
||||
// Convert PR numbers to Github links
|
||||
const pullRequestLink = (n) => `[#${n}](https://github.com/grafana/grafana/pull/${n})`;
|
||||
// Convert Github user IDs to Github links
|
||||
const userLink = (u) => `[@${u}](https://github.com/${u})`;
|
||||
|
||||
// Now that we have a changelog - we can render some markdown as an output
|
||||
const markdown = (changelog) => {
|
||||
// This convers a list of changelog items into a markdown section with a list of titles/links
|
||||
const section = (title, items) =>
|
||||
items.length === 0
|
||||
? ''
|
||||
: `### ${title}
|
||||
|
||||
${items
|
||||
.map(
|
||||
(item) =>
|
||||
`- ${item.title.replace(/^([^:]*:)/gm, '**$1**')} ${
|
||||
item.repo === 'grafana-enterprise'
|
||||
? '(Enterprise)'
|
||||
: `${pullRequestLink(item.number)}, ${userLink(item.author)}`
|
||||
}`
|
||||
)
|
||||
.join('\n')}
|
||||
`;
|
||||
|
||||
// Render all present sections for the given changelog
|
||||
return `${section('Features and enhancements', changelog.features)}
|
||||
${section('Bug fixes', changelog.bugfixes)}
|
||||
${section('Breaking changes', changelog.breaking)}
|
||||
${section('Plugin development fixes & changes', changelog.plugins)}
|
||||
`;
|
||||
};
|
||||
|
||||
const md = markdown(changelog);
|
||||
|
||||
// Print changelog, mostly for debugging
|
||||
LOG(`Resulting markdown: ${md}`);
|
||||
|
||||
// Save changelog as an output for this action
|
||||
if (process.env.GITHUB_OUTPUT) {
|
||||
LOG(`Output to ${process.env.GITHUB_OUTPUT}`);
|
||||
appendFileSync(process.env.GITHUB_OUTPUT, `changelog<<EOF\n${escapeData(md)}\nEOF`);
|
||||
} else {
|
||||
LOG('GITHUB_OUTPUT is not set');
|
||||
}
|
||||
|
||||
// Save changelog as an output file (if requested)
|
||||
if (process.env.INPUT_OUTPUT_FILE) {
|
||||
LOG(`Output to ${process.env.INPUT_OUTPUT_FILE}`);
|
||||
writeFileSync(process.env.INPUT_OUTPUT_FILE, md);
|
||||
}
|
||||
16
.github/workflows/backport.yml
vendored
16
.github/workflows/backport.yml
vendored
@@ -10,24 +10,18 @@ jobs:
|
||||
if: github.repository == 'grafana/grafana'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
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 }}
|
||||
- run: git config --global user.email '132647405+grafana-delivery-bot[bot]@users.noreply.github.com'
|
||||
- run: git config --global user.name 'grafana-delivery-bot[bot]'
|
||||
- run: git remote set-url origin "https://grafana-delivery-bot:${{ steps.generate_token.outputs.token }}@github.com/grafana/grafana.git"
|
||||
- name: Run backport
|
||||
uses: ./actions/backport
|
||||
uses: grafana/grafana-github-actions-go/backport@main
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
labelsToAdd: "backport"
|
||||
title: "[{{base}}] {{originalTitle}}"
|
||||
|
||||
85
.github/workflows/bump-version.yml
vendored
85
.github/workflows/bump-version.yml
vendored
@@ -5,74 +5,39 @@ on:
|
||||
version:
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example: 7.4.3, 7.4.3-preview or 7.4.3-preview1'
|
||||
required: true
|
||||
env:
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
push:
|
||||
default: true
|
||||
required: false
|
||||
dry_run:
|
||||
default: false
|
||||
required: false
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# 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
|
||||
with:
|
||||
text: ${{ github.event.inputs.version }}
|
||||
regex: '^(\d+.\d+).\d+(?:-(?:(preview\d?)|(pre)))?$'
|
||||
- uses: actions-ecosystem/action-regex-match@v2.0.2
|
||||
if: ${{ inputs.version_call != '' }}
|
||||
id: regex-match-version-call
|
||||
with:
|
||||
text: ${{ inputs.version_call }}
|
||||
regex: '^(\d+.\d+).\d+(?:-(?:(preview\d?)|(pre)))?$'
|
||||
- name: Validate input version
|
||||
if: ${{ steps.regex-match.outputs.match == '' && github.event.inputs.version != '' }}
|
||||
run: |
|
||||
echo "The input version format is not correct, please respect:\
|
||||
major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. \
|
||||
example: 7.4.3, 7.4.3-preview or 7.4.3-preview1"
|
||||
exit 1
|
||||
- name: Validate input version call
|
||||
if: ${{ inputs.version_call != '' && steps.regex-match-version-call.outputs.match == '' }}
|
||||
run: |
|
||||
echo "The input version format is not correct, please respect:\
|
||||
major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. \
|
||||
example: 7.4.3, 7.4.3-preview or 7.4.3-preview1"
|
||||
exit 1
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set intermedia variables
|
||||
id: intermedia
|
||||
run: |
|
||||
echo "short_ref=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
|
||||
echo "check_passed=false" >> $GITHUB_OUTPUT
|
||||
echo "branch_name=v${{steps.regex-match.outputs.group1}}" >> $GITHUB_OUTPUT
|
||||
echo "branch_exist=$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Checkout Actions
|
||||
- name: Checkout Grafana
|
||||
uses: actions/checkout@v4
|
||||
- name: Update package.json versions
|
||||
uses: ./pkg/build/actions/bump-version
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
# Go is required for also updating the schema versions as part of the precommit hook:
|
||||
- uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version-file: go.mod
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '18'
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: "Generate token"
|
||||
version: ${{ inputs.version }}
|
||||
- if: ${{ inputs.push }}
|
||||
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: ${{ steps.generate_token.outputs.token }}
|
||||
metricsWriteAPIKey: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
precommit_make_target: gen-cue
|
||||
- if: ${{ inputs.push }}
|
||||
name: Push & Create PR
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local --add --bool push.autoSetupRemote true
|
||||
git checkout -b "bump-version/${{ github.run_id }}/${{ inputs.version }}"
|
||||
git add .
|
||||
git commit -m "bump version ${{ inputs.version }}"
|
||||
git push
|
||||
gh pr create --dry-run=${{ inputs.dry_run }} -l "type/ci" -l "no-changelog" -B "${{ github.ref_name }}" --title "Release: Bump version to ${{ inputs.version }}" --body "Updated version to ${{ inputs.version }}"
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
|
||||
139
.github/workflows/changelog.yml
vendored
Normal file
139
.github/workflows/changelog.yml
vendored
Normal file
@@ -0,0 +1,139 @@
|
||||
name: Generate changelog
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
description: 'Target release version (semver, git tag, branch or commit)'
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
description: 'The base branch that these changes are being merged into'
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
latest:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID:
|
||||
required: true
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM:
|
||||
required: true
|
||||
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
description: 'Target release version (semver, git tag, branch or commit)'
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
description: 'The base branch that these changes are being merged into'
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
latest:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
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: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
with:
|
||||
ref: main
|
||||
sparse-checkout: |
|
||||
.github/workflows
|
||||
CHANGELOG.md
|
||||
.nvmrc
|
||||
.prettierignore
|
||||
.prettierrc.js
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
- name: Setup nodejs environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: "Configure git user"
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local --add --bool push.autoSetupRemote true
|
||||
- name: "Create branch"
|
||||
run: git checkout -b "changelog/${{ github.run_id }}/${{ inputs.version }}"
|
||||
- name: "Generate changelog"
|
||||
id: changelog
|
||||
uses: ./.github/workflows/actions/changelog
|
||||
with:
|
||||
github_token: ${{ steps.generate_token.outputs.token }}
|
||||
target: v${{ inputs.version }}
|
||||
output_file: changelog_items.md
|
||||
- name: "Patch CHANGELOG.md"
|
||||
run: |
|
||||
# Prepare CHANGELOG.md content with version delimiters
|
||||
(
|
||||
echo
|
||||
echo "# ${{ inputs.version}} ($(date '+%F'))"
|
||||
echo
|
||||
cat changelog_items.md
|
||||
) > CHANGELOG.part
|
||||
|
||||
# Check if a version exists in the changelog
|
||||
if grep -q "<!-- ${{ inputs.version}} START" CHANGELOG.md ; then
|
||||
# Replace the content between START and END delimiters
|
||||
echo "Version ${{ inputs.version }} is found in the CHANGELOG.md, patching contents..."
|
||||
sed -i -e '/${{ inputs.version }} START/,/${{ inputs.version }} END/{//!d;}' \
|
||||
-e '/${{ inputs.version }} START/r CHANGELOG.part' CHANGELOG.md
|
||||
else
|
||||
# Prepend changelog part to the main changelog file
|
||||
echo "Version ${{ inputs.version }} not found in the CHANGELOG.md"
|
||||
(
|
||||
echo "<!-- ${{ inputs.version }} START -->"
|
||||
cat CHANGELOG.part
|
||||
echo "<!-- ${{ inputs.version }} END -->"
|
||||
cat CHANGELOG.md
|
||||
) > CHANGELOG.tmp
|
||||
mv CHANGELOG.tmp CHANGELOG.md
|
||||
fi
|
||||
|
||||
git diff CHANGELOG.md
|
||||
|
||||
- name: "Prettify CHANGELOG.md"
|
||||
run: npx prettier --write CHANGELOG.md
|
||||
- name: "Commit changelog changes"
|
||||
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
- name: "git push"
|
||||
if: ${{ inputs.dry_run }} != true
|
||||
run: git push
|
||||
- name: "Create changelog PR"
|
||||
run: >
|
||||
gh pr create \
|
||||
--dry-run=${{ inputs.dry_run }} \
|
||||
--label "no-backport" \
|
||||
--label "no-changelog" \
|
||||
-B "${{ inputs.target }}" \
|
||||
--title "Release: update changelog for ${{ inputs.version }}" \
|
||||
--body "Changelog changes for release ${{ inputs.version }}"
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
35
.github/workflows/community-release.yml
vendored
35
.github/workflows/community-release.yml
vendored
@@ -1,25 +1,46 @@
|
||||
name: Create community release post
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example: 7.4.3, 7.4.3-preview or 7.4.3-preview1'
|
||||
dry_run:
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
description: When enabled, this workflow will print a preview instead of creating an actual post.
|
||||
secrets:
|
||||
GRAFANA_MISC_STATS_API_KEY:
|
||||
required: true
|
||||
GRAFANABOT_FORUM_KEY:
|
||||
required: true
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
type: string
|
||||
required: true
|
||||
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example: 7.4.3, 7.4.3-preview or 7.4.3-preview1'
|
||||
dry_run:
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
description: When enabled, this workflow will print a preview instead of creating an actual post.
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
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 community-release (manually invoked)
|
||||
uses: grafana/grafana-github-actions-go/community-release@main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: ${{ inputs.version }}
|
||||
metrics_api_key: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
community_api_key: ${{ secrets.GRAFANABOT_FORUM_KEY }}
|
||||
community_api_username: grafanabot
|
||||
dry_run: ${{ inputs.dry_run }}
|
||||
|
||||
53
.github/workflows/create-next-release-branch.yml
vendored
Normal file
53
.github/workflows/create-next-release-branch.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Create next release branch
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
ownerRepo:
|
||||
type: string
|
||||
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
|
||||
required: true
|
||||
source:
|
||||
description: The release branch to increment (eg providing `release-11.2.3` will result in `release-11.2.4` being created)
|
||||
type: string
|
||||
required: true
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID:
|
||||
required: true
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM:
|
||||
required: true
|
||||
outputs:
|
||||
branch:
|
||||
description: The new branch that was created
|
||||
value: ${{ jobs.main.outputs.branch }}
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
ownerRepo:
|
||||
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
|
||||
source:
|
||||
description: The release branch to increment (eg providing `release-11.2.3` will result in `release-11.2.4` being created)
|
||||
type: string
|
||||
required: true
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID:
|
||||
required: true
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM:
|
||||
required: true
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
branch: ${{ steps.branch.outputs.branch }}
|
||||
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: Create release branch
|
||||
id: branch
|
||||
uses: grafana/grafana-github-actions-go/bump-release@main
|
||||
with:
|
||||
ownerRepo: ${{ inputs.ownerRepo }}
|
||||
source: ${{ inputs.source }}
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
@@ -11,6 +11,7 @@ on:
|
||||
branches:
|
||||
- "main"
|
||||
- "v*.*.*"
|
||||
- "release-*.*.*"
|
||||
|
||||
# This is run before the pull request has been merged, so we'll run against the src branch
|
||||
jobs:
|
||||
|
||||
21
.github/workflows/doc-validator.yml
vendored
21
.github/workflows/doc-validator.yml
vendored
@@ -1,13 +1,18 @@
|
||||
name: "doc-validator"
|
||||
on:
|
||||
pull_request:
|
||||
paths: ["docs/sources/**"]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
include:
|
||||
description: |
|
||||
Regular expression that matches paths to include in linting.
|
||||
|
||||
For example: docs/sources/(?:alerting|fundamentals)/.+\.md
|
||||
required: true
|
||||
jobs:
|
||||
doc-validator:
|
||||
runs-on: "ubuntu-latest"
|
||||
container:
|
||||
image: "grafana/doc-validator:v5.0.0"
|
||||
image: "grafana/doc-validator:v5.2.0"
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: "actions/checkout@v4"
|
||||
@@ -15,15 +20,7 @@ jobs:
|
||||
# Only run doc-validator on specific directories.
|
||||
run: >
|
||||
doc-validator
|
||||
'--include=^docs/sources/(?:alerting|fundamentals|getting-started|introduction|setup-grafana|upgrade-guide|whatsnew/whats-new-in-v(?:9|10))/.+\.md$'
|
||||
'--include=${{ inputs.include }}'
|
||||
'--skip-checks=^(?:image.+|canonical-does-not-match-pretty-URL)$'
|
||||
./docs/sources
|
||||
/docs/grafana/latest
|
||||
| reviewdog
|
||||
-f=rdjsonl
|
||||
--fail-on-error
|
||||
--filter-mode=nofilter
|
||||
--name=doc-validator
|
||||
--reporter=github-pr-review
|
||||
env:
|
||||
REVIEWDOG_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
36
.github/workflows/github-release.yml
vendored
36
.github/workflows/github-release.yml
vendored
@@ -1,27 +1,49 @@
|
||||
name: Create or update GitHub release
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
description: Needs to match, exactly, the name of a milestone (NO v prefix)
|
||||
type: string
|
||||
latest:
|
||||
required: false
|
||||
default: "0"
|
||||
description: Mark this release as latest (`1`) or not (`0`, default)
|
||||
type: string
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
description: Needs to match, exactly, the name of a milestone (NO v prefix)
|
||||
type: string
|
||||
latest:
|
||||
required: false
|
||||
default: "0"
|
||||
description: Mark this release as latest (`1`) or not (`0`, default)
|
||||
type: string
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
# contents: write allows the action(s) to create github releases
|
||||
contents: write
|
||||
|
||||
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: Create GitHub release (manually invoked)
|
||||
uses: grafana/grafana-github-actions-go/github-release@main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: ${{ inputs.version }}
|
||||
metrics_api_key: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
latest: ${{ inputs.latest }}
|
||||
dry_run: ${{ inputs.dry_run }}
|
||||
|
||||
@@ -3,7 +3,7 @@ on:
|
||||
push:
|
||||
paths:
|
||||
- pkg/**
|
||||
- .github/workflows/go_lint.yml
|
||||
- .github/workflows/go-lint.yml
|
||||
- go.*
|
||||
branches:
|
||||
- main
|
||||
@@ -20,14 +20,11 @@ jobs:
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: ./go.mod
|
||||
- run: CODEGEN_VERIFY=1 make gen-cue
|
||||
- run: make gen-go
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v5
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
with:
|
||||
version: v1.59.0
|
||||
version: v1.62.0
|
||||
args: |
|
||||
--config .golangci.toml --max-same-issues=0 --max-issues-per-linter=0 --verbose ./pkg/... ./pkg/apimachinery/... ./pkg/apiserver/... ./pkg/build/wire/... ./pkg/promlib/... ./pkg/util/xorm/...
|
||||
only-new-issues: true
|
||||
skip-cache: true
|
||||
--verbose $(go list -m -f '{{.Dir}}' | xargs -I{} sh -c 'test ! -f {}/.nolint && echo {}/...')
|
||||
install-mode: binary
|
||||
60
.github/workflows/migrate-prs.yml
vendored
Normal file
60
.github/workflows/migrate-prs.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
name: Migrate open PRs
|
||||
# Migrate open PRs from a superseded release branch to the current release branch and notify authors
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
from:
|
||||
description: 'The base branch to check for open PRs'
|
||||
required: true
|
||||
type: string
|
||||
to:
|
||||
description: 'The base branch to migrate open PRs to'
|
||||
required: true
|
||||
type: string
|
||||
ownerRepo:
|
||||
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID:
|
||||
required: true
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM:
|
||||
required: true
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
from:
|
||||
description: 'The base branch to check for open PRs'
|
||||
required: true
|
||||
type: string
|
||||
to:
|
||||
description: 'The base branch to migrate open PRs to'
|
||||
required: true
|
||||
type: string
|
||||
ownerRepo:
|
||||
description: Owner/repo of the repository where the branch is created (e.g. 'grafana/grafana')
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID:
|
||||
required: true
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM:
|
||||
required: true
|
||||
|
||||
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: Migrate PRs
|
||||
uses: grafana/grafana-github-actions-go/migrate-open-prs@main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
ownerRepo: ${{ inputs.ownerRepo }}
|
||||
from: ${{ inputs.from }}
|
||||
to: ${{ inputs.to }}
|
||||
binary_release_tag: 'dev'
|
||||
58
.github/workflows/pr-patch-check-event.yml
vendored
Normal file
58
.github/workflows/pr-patch-check-event.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
# Owned by grafana-delivery-squad
|
||||
# Intended to be dropped into the base repo Ex: grafana/grafana
|
||||
name: Dispatch check for patch conflicts
|
||||
run-name: dispatch-check-patch-conflicts-${{ github.base_ref }}-${{ github.head_ref }}
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
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:
|
||||
dispatch-job:
|
||||
env:
|
||||
HEAD_REF: ${{ github.head_ref }}
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
REPO: ${{ github.repository }}
|
||||
SENDER: ${{ github.event.sender.login }}
|
||||
SHA: ${{ github.sha }}
|
||||
PR_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
|
||||
with:
|
||||
# App needs Actions: Read/Write for the grafana/security-patch-actions repo
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
|
||||
- name: "Dispatch job"
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ steps.generate_token.outputs.token }}
|
||||
script: |
|
||||
const {HEAD_REF, BASE_REF, REPO, SENDER, SHA, PR_COMMIT_SHA} = process.env;
|
||||
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'grafana',
|
||||
repo: 'security-patch-actions',
|
||||
workflow_id: 'test-patches-event.yml',
|
||||
ref: 'main',
|
||||
inputs: {
|
||||
src_repo: REPO,
|
||||
src_ref: HEAD_REF,
|
||||
src_merge_sha: SHA,
|
||||
src_pr_commit_sha: PR_COMMIT_SHA,
|
||||
patch_repo: REPO + '-security-patches',
|
||||
patch_ref: BASE_REF,
|
||||
triggering_github_handle: SENDER
|
||||
}
|
||||
})
|
||||
27
.github/workflows/pr-patch-check.yml
vendored
27
.github/workflows/pr-patch-check.yml
vendored
@@ -1,27 +0,0 @@
|
||||
# Owned by grafana-release-guild
|
||||
# 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:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
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
|
||||
if: github.repository == 'grafana/grafana'
|
||||
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
|
||||
@@ -1,38 +1,21 @@
|
||||
name: "publish-technical-documentation-next"
|
||||
name: publish-technical-documentation-next
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
- main
|
||||
paths:
|
||||
- "docs/sources/**"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
if: github.repository == 'grafana/grafana'
|
||||
runs-on: "ubuntu-latest"
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Publish to website repository (next)"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-next"
|
||||
- uses: actions/checkout@v4
|
||||
- uses: grafana/writers-toolkit/publish-technical-documentation@publish-technical-documentation/v1
|
||||
with:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/next"
|
||||
website_directory: content/docs/grafana/next
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
name: "publish-technical-documentation-release"
|
||||
name: publish-technical-documentation-release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v[0-9]+.[0-9]+.x
|
||||
- release-[0-9]+.[0-9]+.[0-9]+
|
||||
tags:
|
||||
- v[0-9]+.[0-9]+.[0-9]+
|
||||
paths:
|
||||
@@ -12,63 +12,18 @@ on:
|
||||
jobs:
|
||||
sync:
|
||||
if: github.repository == 'grafana/grafana'
|
||||
runs-on: "ubuntu-latest"
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v4"
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Checkout Actions library"
|
||||
uses: "actions/checkout@v4"
|
||||
- uses: grafana/writers-toolkit/publish-technical-documentation-release@publish-technical-documentation-release/v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: "./actions"
|
||||
|
||||
- name: "Install Actions from library"
|
||||
run: "npm install --production --prefix ./actions"
|
||||
|
||||
- name: "Determine if there is a matching release tag"
|
||||
id: "has-matching-release-tag"
|
||||
uses: "./actions/has-matching-release-tag"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
|
||||
release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$"
|
||||
|
||||
- name: "Determine technical documentation version"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./actions/docs-target"
|
||||
id: "target"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
# WEBSITE_SYNC_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.WEBSITE_SYNC_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Switch to HEAD of version branch for tags"
|
||||
# Tags aren't necessarily made to the HEAD of the version branch.
|
||||
# The documentation to be published is always on the HEAD of the version branch.
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true' && github.ref_type == 'tag'"
|
||||
run: "git switch --detach origin/${{ steps.target.outputs.target }}.x"
|
||||
|
||||
- name: "Publish to website repository (release)"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-release"
|
||||
with:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
# PUBLISH_TO_WEBSITE_TOKEN is a fine-grained GitHub Personal Access Token that expires.
|
||||
# It must be regenerated in the grafanabot GitHub account and requires a Grafana organization
|
||||
# GitHub administrator to update the organization secret.
|
||||
# The IT helpdesk can update the organization secret.
|
||||
github_pat: "grafanabot:${{ secrets.PUBLISH_TO_WEBSITE_TOKEN }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"
|
||||
release_tag_regexp: "^v(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
|
||||
release_branch_regexp: "^release-(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
|
||||
release_branch_with_patch_regexp: "^release-(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)$"
|
||||
website_directory: content/docs/grafana
|
||||
version_suffix: ""
|
||||
|
||||
126
.github/workflows/release-comms.yml
vendored
Normal file
126
.github/workflows/release-comms.yml
vendored
Normal file
@@ -0,0 +1,126 @@
|
||||
# This workflow runs whenever the release PR is merged. It includes post-release communication processes like
|
||||
# posting to slack, the website, community forums, etc.
|
||||
# Only things that happen after a release is completed and all of the necessary code changes (like the changelog) are made.
|
||||
name: Post-release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dry_run:
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
version:
|
||||
required: true
|
||||
latest:
|
||||
type: boolean
|
||||
default: false
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- 'main'
|
||||
- 'release-*.*.*'
|
||||
|
||||
jobs:
|
||||
setup:
|
||||
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')) }}
|
||||
name: Setup and establish latest
|
||||
outputs:
|
||||
version: ${{ steps.output.outputs.version }}
|
||||
release_branch: ${{ steps.output.outputs.release_branch }}
|
||||
dry_run: ${{ steps.output.outputs.dry_run }}
|
||||
latest: ${{ steps.output.outputs.latest }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# The github-release action expects a `LATEST` value of a string of either '1' or '0'
|
||||
- if: ${{ github.event_name == 'workflow_dispatch' }}
|
||||
run: |
|
||||
echo setting up GITHUB_ENV for ${{ github.event_name }}
|
||||
echo "VERSION=${{ inputs.version }}" >> $GITHUB_ENV
|
||||
echo "DRY_RUN=${{ inputs.dry_run }}" >> $GITHUB_ENV
|
||||
echo "LATEST=${{ inputs.latest && '1' || '0' }}" >> $GITHUB_ENV
|
||||
- if: ${{ github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') }}
|
||||
run: |
|
||||
echo "VERSION=$(echo ${{ github.head_ref }} | sed -e 's/release\/.*\///g')" >> $GITHUB_ENV
|
||||
echo "DRY_RUN=${{ contains(github.event.pull_request.labels.*.name, 'release/dry-run') }}" >> $GITHUB_ENV
|
||||
echo "LATEST=${{ contains(github.event.pull_request.labels.*.name, 'release/latest') && '1' || '0' }}" >> $GITHUB_ENV
|
||||
- id: output
|
||||
run: |
|
||||
echo "dry_run: $DRY_RUN"
|
||||
echo "latest: $LATEST"
|
||||
echo "version: $VERSION"
|
||||
|
||||
echo "release_branch=$(echo $VERSION | sed -s 's/^v/release-/g')" >> "$GITHUB_OUTPUT"
|
||||
echo "dry_run=$DRY_RUN" >> "$GITHUB_OUTPUT"
|
||||
echo "latest=$LATEST" >> "$GITHUB_OUTPUT"
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
create_next_release_branch_grafana:
|
||||
name: Create next release branch (Grafana)
|
||||
needs: setup
|
||||
uses: ./.github/workflows/create-next-release-branch.yml
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
with:
|
||||
ownerRepo: 'grafana/grafana'
|
||||
source: ${{ needs.setup.outputs.release_branch }}
|
||||
create_next_release_branch_enterprise:
|
||||
name: Create next release branch (Grafana Enterprise)
|
||||
needs: setup
|
||||
uses: ./.github/workflows/create-next-release-branch.yml
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
with:
|
||||
ownerRepo: 'grafana/grafana-enterprise'
|
||||
source: ${{ needs.setup.outputs.release_branch }}
|
||||
migrate_prs_grafana:
|
||||
needs:
|
||||
- setup
|
||||
- create_next_release_branch_grafana
|
||||
uses: ./.github/workflows/migrate-prs.yml
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
with:
|
||||
ownerRepo: 'grafana/grafana'
|
||||
from: ${{ needs.setup.outputs.release_branch }}
|
||||
to: ${{ needs.create_next_release_branch_grafana.outputs.branch }}
|
||||
migrate_prs_enterprise:
|
||||
needs:
|
||||
- setup
|
||||
- create_next_release_branch_enterprise
|
||||
uses: ./.github/workflows/migrate-prs.yml
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
with:
|
||||
ownerRepo: 'grafana/grafana-enterprise'
|
||||
from: ${{ needs.setup.outputs.release_branch }}
|
||||
to: ${{ needs.create_next_release_branch_enterprise.outputs.branch }}
|
||||
post_changelog_on_forum:
|
||||
needs: setup
|
||||
uses: ./.github/workflows/community-release.yml
|
||||
secrets:
|
||||
GRAFANA_MISC_STATS_API_KEY: ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
|
||||
GRAFANABOT_FORUM_KEY: ${{ secrets.GRAFANABOT_FORUM_KEY }}
|
||||
with:
|
||||
version: ${{ needs.setup.outputs.version }}
|
||||
dry_run: ${{ needs.setup.outputs.dry_run == 'true' }}
|
||||
create_github_release:
|
||||
# a github release requires a git tag
|
||||
# The github-release action retrieves the changelog using the /repos/grafana/grafana/contents/CHANGELOG.md API
|
||||
# endpoint.
|
||||
needs: setup
|
||||
uses: ./.github/workflows/github-release.yml
|
||||
with:
|
||||
version: ${{ needs.setup.outputs.version }}
|
||||
dry_run: ${{ needs.setup.outputs.dry_run == 'true' }}
|
||||
latest: ${{ needs.setup.outputs.latest }}
|
||||
post_on_slack:
|
||||
needs: setup
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- run: |
|
||||
echo announce on slack that ${{ needs.setup.outputs.version }} has been released
|
||||
echo dry run: ${{ needs.setup.outputs.dry_run }}
|
||||
173
.github/workflows/release-pr.yml
vendored
Normal file
173
.github/workflows/release-pr.yml
vendored
Normal file
@@ -0,0 +1,173 @@
|
||||
# This workflow creates a new PR in Grafana which is triggered after a release is completed.
|
||||
# It should include all code changes that are needed after a release is done. This includes the changelog update and
|
||||
# version bumps, but could include more in the future.
|
||||
# Please refrain from including any processes that do not result in code changes in this workflow. Instead, they should
|
||||
# either be triggered in the release promotion process or in the release comms process (that is triggered by merging
|
||||
# this PR).
|
||||
name: Grafana Release PR
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
type: string
|
||||
description: The version of Grafana that is being released
|
||||
target:
|
||||
required: true
|
||||
type: string
|
||||
description: The release branch pattern (eg v9.5.x) that these changes are being merged into
|
||||
backport:
|
||||
required: false
|
||||
type: string
|
||||
description: Branch to backport these changes to
|
||||
dry_run:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
latest:
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
push-changelog-to-main:
|
||||
name: Create PR to main to update the changelog
|
||||
uses: ./.github/workflows/changelog.yml
|
||||
with:
|
||||
version: ${{ inputs.version }}
|
||||
latest: ${{ inputs.latest }}
|
||||
dry_run: ${{ inputs.dry_run }}
|
||||
target: main
|
||||
secrets:
|
||||
GRAFANA_DELIVERY_BOT_APP_ID: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
GRAFANA_DELIVERY_BOT_APP_PEM: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
create-prs:
|
||||
name: Create Release PR
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'grafana/grafana'
|
||||
steps:
|
||||
- name: Generate bot 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: Get release branch
|
||||
id: branch
|
||||
uses: grafana/grafana-github-actions-go/latest-release-branch@main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
ownerRepo: 'grafana/grafana'
|
||||
pattern: ${{ inputs.target }}
|
||||
- name: Checkout Grafana
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ steps.branch.outputs.branch }}
|
||||
fetch-depth: 0
|
||||
fetch-tags: true
|
||||
- name: Checkout Grafana (main)
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: main
|
||||
fetch-depth: '0'
|
||||
fetch-tags: 'false'
|
||||
path: .grafana-main
|
||||
- name: Setup nodejs environment
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
- name: Configure git user
|
||||
run: |
|
||||
git config --local user.name "github-actions[bot]"
|
||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --local --add --bool push.autoSetupRemote true
|
||||
|
||||
- name: Create branch
|
||||
run: git checkout -b "release/${{ github.run_id }}/${{ inputs.version }}"
|
||||
- name: Generate changelog
|
||||
id: changelog
|
||||
uses: ./.grafana-main/.github/workflows/actions/changelog
|
||||
with:
|
||||
github_token: ${{ steps.generate_token.outputs.token }}
|
||||
target: v${{ inputs.version }}
|
||||
output_file: changelog_items.md
|
||||
- name: Patch CHANGELOG.md
|
||||
run: |
|
||||
# Prepare CHANGELOG.md content with version delimiters
|
||||
(
|
||||
echo
|
||||
echo "# ${{ inputs.version}} ($(date '+%F'))"
|
||||
echo
|
||||
cat changelog_items.md
|
||||
) > CHANGELOG.part
|
||||
|
||||
# Check if a version exists in the changelog
|
||||
if grep -q "<!-- ${{ inputs.version}} START" CHANGELOG.md ; then
|
||||
# Replace the content between START and END delimiters
|
||||
echo "Version ${{ inputs.version }} is found in the CHANGELOG.md, patching contents..."
|
||||
sed -i -e '/${{ inputs.version }} START/,/${{ inputs.version }} END/{//!d;}' \
|
||||
-e '/${{ inputs.version }} START/r CHANGELOG.part' CHANGELOG.md
|
||||
else
|
||||
# Prepend changelog part to the main changelog file
|
||||
echo "Version ${{ inputs.version }} not found in the CHANGELOG.md"
|
||||
(
|
||||
echo "<!-- ${{ inputs.version }} START -->"
|
||||
cat CHANGELOG.part
|
||||
echo "<!-- ${{ inputs.version }} END -->"
|
||||
cat CHANGELOG.md
|
||||
) > CHANGELOG.tmp
|
||||
mv CHANGELOG.tmp CHANGELOG.md
|
||||
fi
|
||||
|
||||
rm -f CHANGELOG.part changelog_items.md
|
||||
|
||||
git diff CHANGELOG.md
|
||||
- name: "Prettify CHANGELOG.md"
|
||||
run: npx prettier --write CHANGELOG.md
|
||||
- name: Commit CHANGELOG.md changes
|
||||
run: git add CHANGELOG.md && git commit --allow-empty -m "Update changelog" CHANGELOG.md
|
||||
|
||||
- name: Update package.json versions
|
||||
uses: ./.grafana-main/pkg/build/actions/bump-version
|
||||
with:
|
||||
version: 'patch'
|
||||
|
||||
- name: Add package.json changes
|
||||
run: |
|
||||
git add package.json lerna.json yarn.lock packages public
|
||||
git commit -m "Update version to ${{ inputs.version }}"
|
||||
|
||||
- name: Git push
|
||||
if: ${{ inputs.dry_run }} != true
|
||||
run: git push --set-upstream origin release/${{ github.run_id }}/${{ inputs.version }}
|
||||
|
||||
- name: Create PR without backports
|
||||
if: "${{ inputs.backport == '' }}"
|
||||
run: >
|
||||
gh pr create \
|
||||
$( [ "x${{ inputs.latest }}" == "xtrue" ] && printf %s '-l "release/latest"') \
|
||||
-l "no-changelog" \
|
||||
--dry-run=${{ inputs.dry_run }} \
|
||||
-B "${{ steps.branch.outputs.branch }}" \
|
||||
--title "Release: ${{ inputs.version }}" \
|
||||
--body "These code changes must be merged after a release is complete"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create PR with backports
|
||||
if: "${{ inputs.backport != '' }}"
|
||||
run: >
|
||||
gh pr create \
|
||||
$( [ "x${{ inputs.latest }}" == "xtrue" ] && printf %s '-l "release/latest"') \
|
||||
-l "product-approved" \
|
||||
-l "no-changelog" \
|
||||
--dry-run=${{ inputs.dry_run }} \
|
||||
-B "${{ steps.branch.outputs.branch }}" \
|
||||
--title "Release: ${{ inputs.version }}" \
|
||||
--body "These code changes must be merged after a release is complete"
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
43
.github/workflows/sync-mirror-event.yml
vendored
Normal file
43
.github/workflows/sync-mirror-event.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
# Owned by grafana-delivery-squad
|
||||
# Intended to be dropped into the base repo, Ex: grafana/grafana
|
||||
name: Dispatch sync to mirror
|
||||
run-name: dispatch-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:
|
||||
dispatch-job:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
|
||||
with:
|
||||
# App needs Actions: Read/Write for the grafana/security-patch-actions repo
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
|
||||
- uses: actions/github-script@v7
|
||||
if: github.repository == 'grafana/grafana'
|
||||
with:
|
||||
github-token: ${{ steps.generate_token.outputs.token }}
|
||||
script: |
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'grafana',
|
||||
repo: 'security-patch-actions',
|
||||
workflow_id: 'mirror-branch-and-apply-patches-event.yml',
|
||||
ref: 'main',
|
||||
inputs: {
|
||||
src_ref: "${{ github.ref_name }}",
|
||||
src_repo: "${{ github.repository }}",
|
||||
src_sha: "${{ github.sha }}",
|
||||
dest_repo: "${{ github.repository }}-security-mirror",
|
||||
patch_repo: "${{ github.repository }}-security-patches"
|
||||
}
|
||||
})
|
||||
25
.github/workflows/sync-mirror.yml
vendored
25
.github/workflows/sync-mirror.yml
vendored
@@ -1,25 +0,0 @@
|
||||
# Owned by grafana-release-guild
|
||||
# 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
|
||||
|
||||
266
.golangci.toml
266
.golangci.toml
@@ -1,266 +0,0 @@
|
||||
[run]
|
||||
timeout = "10m"
|
||||
concurrency = 10
|
||||
|
||||
[linters-settings.exhaustive]
|
||||
default-signifies-exhaustive = true
|
||||
|
||||
[linters-settings.revive]
|
||||
ignore-generated-header = false
|
||||
severity = "warning"
|
||||
confidence = 3
|
||||
|
||||
[linters-settings.depguard.rules.main]
|
||||
allow = [] # allow all
|
||||
deny = [
|
||||
{ pkg = "io/ioutil", desc = "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific function documentation for details." },
|
||||
{ pkg = "gopkg.in/yaml.v2", desc = "Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as gopkg.in/yaml.v3 is now available" },
|
||||
{ pkg = "github.com/pkg/errors", desc = "Deprecated: Go 1.13 supports the functionality provided by pkg/errors in the standard library." },
|
||||
{ pkg = "github.com/xorcare/pointer", desc = "Use pkg/util.Pointer instead, which is a generic one-liner alternative" },
|
||||
{ pkg = "github.com/gofrs/uuid", desc = "Use github.com/google/uuid instead, which we already depend on." },
|
||||
{ pkg = "github.com/bmizerany/assert", desc = "Use github.com/stretchr/testify/assert instead, which we already depend on." },
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.coreplugins]
|
||||
deny = [
|
||||
{ pkg = "github.com/grafana/grafana/pkg/api", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/cmd", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/cuectx", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/extensions", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/kinds", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/middleware", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/modules", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/registry", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/services", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/build", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/codegen", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/events", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/ifaces", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/kindsysreport", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/mocks", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/plugins", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/setting", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/util", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/bus", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/components", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/expr", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/infra", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/login", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/models", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/server", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/tests", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/web", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
{ pkg = "github.com/grafana/grafana/pkg/tsdb/intervalv2", desc = "Core plugins are not allowed to depend on Grafana core packages" },
|
||||
]
|
||||
files = [
|
||||
"**/pkg/tsdb/grafana-pyroscope-datasource/*",
|
||||
"**/pkg/tsdb/grafana-pyroscope-datasource/**/*",
|
||||
"**/pkg/tsdb/grafana-testdata-datasource/*",
|
||||
"**/pkg/tsdb/grafana-testdata-datasource/**/*",
|
||||
"**/pkg/tsdb/azuremonitor/*",
|
||||
"**/pkg/tsdb/azuremonitor/**/*",
|
||||
"**/pkg/tsdb/cloud-monitoring/*",
|
||||
"**/pkg/tsdb/cloud-monitoring/**/*",
|
||||
"**/pkg/tsdb/mysql/*",
|
||||
"**/pkg/tsdb/mysql/**/*",
|
||||
"**/pkg/tsdb/parca/*",
|
||||
"**/pkg/tsdb/parca/**/*",
|
||||
"**/pkg/tsdb/tempo/*",
|
||||
"**/pkg/tsdb/tempo/**/*",
|
||||
"**/pkg/tsdb/cloudwatch/*",
|
||||
"**/pkg/tsdb/cloudwatch/**/*",
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.apiserver]
|
||||
list-mode = "lax"
|
||||
allow = [
|
||||
"github.com/grafana/grafana/pkg/apimachinery",
|
||||
"github.com/grafana/grafana/pkg/apiserver",
|
||||
"github.com/grafana/grafana/pkg/services/apiserver/utils",
|
||||
"github.com/grafana/grafana/pkg/services/featuremgmt",
|
||||
"github.com/grafana/grafana/pkg/infra/kvstore",
|
||||
"github.com/grafana/grafana/pkg/services/apiserver/options",
|
||||
"github.com/grafana/grafana/pkg/apis/playlist/v0alpha1",
|
||||
]
|
||||
deny = [
|
||||
{ pkg = "github.com/grafana/grafana/pkg", desc = "apiserver is not allowed to import grafana core" }
|
||||
]
|
||||
files = [
|
||||
"**/pkg/apiserver/*",
|
||||
"**/pkg/apiserver/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.apimachinery]
|
||||
list-mode = "lax"
|
||||
allow = [
|
||||
"github.com/grafana/grafana/pkg/apimachinery",
|
||||
]
|
||||
deny = [
|
||||
{ pkg = "github.com/grafana/grafana/pkg", desc = "apimachinery is not allowed to import grafana core" }
|
||||
]
|
||||
files = [
|
||||
"**/pkg/apimachinery/*",
|
||||
"**/pkg/apimachinery/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.depguard.rules.promlib]
|
||||
list-mode = "lax" # allow unless explicitely denied
|
||||
deny = [
|
||||
{ pkg = "github.com/grafana/grafana/pkg", desc = "promlib is not allowed to import grafana core" }
|
||||
]
|
||||
allow = [
|
||||
"github.com/grafana/grafana/pkg/promlib"
|
||||
]
|
||||
files = [
|
||||
"**/pkg/promlib/*",
|
||||
"**/pkg/promlib/**/*"
|
||||
]
|
||||
|
||||
[linters-settings.gocritic]
|
||||
enabled-checks = ["ruleguard"]
|
||||
[linters-settings.gocritic.settings.ruleguard]
|
||||
rules = "pkg/ruleguard.rules.go"
|
||||
|
||||
[linters-settings.misspell]
|
||||
ignore-words = ["Unknwon", "Creater"]
|
||||
|
||||
[linters-settings.nakedret]
|
||||
max-func-lines = 60
|
||||
|
||||
[linters]
|
||||
disable-all = true
|
||||
enable = [
|
||||
"bodyclose",
|
||||
"depguard",
|
||||
"dogsled",
|
||||
"errcheck",
|
||||
# "gochecknoinits",
|
||||
# "goconst",
|
||||
# "gocritic", # Temporarily disabled on 2022-09-09, running into weird bug "ruleguard: execution error: used Run() with an empty rule set; forgot to call Load() first?"
|
||||
"goimports",
|
||||
"goprintffuncname",
|
||||
"gosec",
|
||||
"gosimple",
|
||||
"govet",
|
||||
"ineffassign",
|
||||
"misspell",
|
||||
"nakedret",
|
||||
"exportloopref",
|
||||
"staticcheck",
|
||||
"stylecheck",
|
||||
"typecheck",
|
||||
"unconvert",
|
||||
"unused",
|
||||
"whitespace",
|
||||
"gocyclo",
|
||||
"exhaustive",
|
||||
"typecheck",
|
||||
"asciicheck",
|
||||
"errorlint",
|
||||
"revive",
|
||||
]
|
||||
|
||||
# Disabled linters (might want them later)
|
||||
# "unparam"
|
||||
# "rowserrcheck" # The linter doesn't detect that both Scan and Close also returns the error message returned by Err.
|
||||
|
||||
[issues]
|
||||
exclude-use-default = false
|
||||
max-same-issues = 0
|
||||
|
||||
# Enable when appropriate
|
||||
# Poorly chosen identifier
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1003"
|
||||
|
||||
# Enable when appropriate
|
||||
# Dot imports that aren't in external test packages are discouraged.
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1001"
|
||||
|
||||
# Enable when appropriate
|
||||
# http.CloseNotifier has been deprecated since Go 1.11 and an alternative has been available since Go 1.7: We currently need it in pkg/web/response_writer.go.
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "SA1019: http.CloseNotifier"
|
||||
|
||||
# strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly.
|
||||
# Use golang.org/x/text/cases instead.
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "SA1019: strings.Title"
|
||||
|
||||
# go.opentelemetry.io/otel/exporters/jaeger" is deprecated: This module is no longer supported. OpenTelemetry dropped support for Jaeger exporter in July 2023.
|
||||
# Jaeger officially accepts and recommends using OTLP.
|
||||
# Use [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp] or [go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc] instead.
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "SA1019: \"go.opentelemetry.io/otel/exporters/jaeger\""
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "use fake service and real access control evaluator instead"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G108"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G110"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G201"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G202"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G306"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "401"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "402"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "501"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "404"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["errorlint"]
|
||||
text = "non-wrapping format verb for fmt.Errorf"
|
||||
|
||||
# TODO: Enable
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1000"
|
||||
|
||||
# TODO: Enable
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1020"
|
||||
|
||||
# TODO: Enable
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1021"
|
||||
|
||||
# Remove this when we have go v1.22 in place
|
||||
# https://stackoverflow.com/a/68247837/767660
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
path = '(.+)_test\.go'
|
||||
text = "G601"
|
||||
243
.golangci.yml
Normal file
243
.golangci.yml
Normal file
@@ -0,0 +1,243 @@
|
||||
run:
|
||||
timeout: "10m"
|
||||
concurrency: 10
|
||||
|
||||
linters-settings:
|
||||
exhaustive:
|
||||
default-signifies-exhaustive: true
|
||||
|
||||
revive:
|
||||
ignore-generated-header: false
|
||||
severity: "warning"
|
||||
confidence: 3
|
||||
|
||||
depguard:
|
||||
rules:
|
||||
main:
|
||||
allow: [] # allow all
|
||||
deny:
|
||||
- pkg: "io/ioutil"
|
||||
desc: "Deprecated: As of Go 1.16, the same functionality is now provided by package io or package os, and those implementations should be preferred in new code. See the specific details in the Go documentation."
|
||||
- pkg: "gopkg.in/yaml.v2"
|
||||
desc: "Grafana packages are not allowed to depend on gopkg.in/yaml.v2 as gopkg.in/yaml.v3 is now available"
|
||||
- pkg: "github.com/pkg/errors"
|
||||
desc: "Deprecated: Go 1.13 supports the functionality provided by pkg/errors in the standard library."
|
||||
- pkg: "github.com/xorcare/pointer"
|
||||
desc: "Use pkg/util.Pointer instead, which is a generic one-liner alternative"
|
||||
- pkg: "github.com/gofrs/uuid"
|
||||
desc: "Use github.com/google/uuid instead, which we already depend on."
|
||||
- pkg: "github.com/bmizerany/assert"
|
||||
desc: "Use github.com/stretchr/testify/assert instead, which we already depend on."
|
||||
|
||||
coreplugins:
|
||||
deny:
|
||||
- pkg: "github.com/grafana/grafana/pkg/api"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/cmd"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/cuectx"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/extensions"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/kinds"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/middleware"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/modules"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/registry"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/services"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/build"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/codegen"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/events"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/ifaces"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/kindsysreport"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/mocks"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/plugins"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/setting"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/util"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/bus"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/components"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/expr"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/infra"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/login"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/models"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/server"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/tests"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/web"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
- pkg: "github.com/grafana/grafana/pkg/tsdb/intervalv2"
|
||||
desc: "Core plugins are not allowed to depend on Grafana core packages"
|
||||
files:
|
||||
- "**/pkg/tsdb/grafana-pyroscope-datasource/*"
|
||||
- "**/pkg/tsdb/grafana-pyroscope-datasource/**/*"
|
||||
- "**/pkg/tsdb/grafana-testdata-datasource/*"
|
||||
- "**/pkg/tsdb/grafana-testdata-datasource/**/*"
|
||||
- "**/pkg/tsdb/azuremonitor/*"
|
||||
- "**/pkg/tsdb/azuremonitor/**/*"
|
||||
- "**/pkg/tsdb/cloud-monitoring/*"
|
||||
- "**/pkg/tsdb/cloud-monitoring/**/*"
|
||||
- "**/pkg/tsdb/mysql/*"
|
||||
- "**/pkg/tsdb/mysql/**/*"
|
||||
- "**/pkg/tsdb/parca/*"
|
||||
- "**/pkg/tsdb/parca/**/*"
|
||||
- "**/pkg/tsdb/tempo/*"
|
||||
- "**/pkg/tsdb/tempo/**/*"
|
||||
- "**/pkg/tsdb/cloudwatch/*"
|
||||
- "**/pkg/tsdb/cloudwatch/**/*"
|
||||
|
||||
apiserver:
|
||||
list-mode: "lax"
|
||||
allow:
|
||||
- "github.com/grafana/grafana/pkg/apimachinery"
|
||||
- "github.com/grafana/grafana/pkg/apiserver"
|
||||
- "github.com/grafana/grafana/pkg/services/apiserver/utils"
|
||||
- "github.com/grafana/grafana/pkg/services/featuremgmt"
|
||||
- "github.com/grafana/grafana/pkg/infra/kvstore"
|
||||
- "github.com/grafana/grafana/pkg/services/apiserver/options"
|
||||
- "github.com/grafana/grafana/pkg/apis/playlist/v0alpha1"
|
||||
deny:
|
||||
- pkg: "github.com/grafana/grafana/pkg"
|
||||
desc: "apiserver is not allowed to import grafana core"
|
||||
files:
|
||||
- "**/pkg/apiserver/*"
|
||||
- "**/pkg/apiserver/**/*"
|
||||
|
||||
apimachinery:
|
||||
list-mode: "lax"
|
||||
allow:
|
||||
- "github.com/grafana/grafana/pkg/apimachinery"
|
||||
deny:
|
||||
- pkg: "github.com/grafana/grafana/pkg"
|
||||
desc: "apimachinery is not allowed to import grafana core"
|
||||
files:
|
||||
- "**/pkg/apimachinery/*"
|
||||
- "**/pkg/apimachinery/**/*"
|
||||
|
||||
promlib:
|
||||
list-mode: "lax" # allow unless explicitly denied
|
||||
allow:
|
||||
- "github.com/grafana/grafana/pkg/promlib"
|
||||
deny:
|
||||
- pkg: "github.com/grafana/grafana/pkg"
|
||||
desc: "promlib is not allowed to import grafana core"
|
||||
files:
|
||||
- "**/pkg/promlib/*"
|
||||
- "**/pkg/promlib/**/*"
|
||||
|
||||
gocritic:
|
||||
enabled-checks: ["ruleguard"]
|
||||
settings:
|
||||
ruleguard:
|
||||
rules: "pkg/ruleguard.rules.go"
|
||||
|
||||
misspell:
|
||||
ignore-words: ["Unknwon", "Creater"]
|
||||
|
||||
nakedret:
|
||||
max-func-lines: 60
|
||||
|
||||
linters:
|
||||
disable-all: true
|
||||
enable:
|
||||
- "bodyclose"
|
||||
- "depguard"
|
||||
- "dogsled"
|
||||
- "errcheck"
|
||||
# "gochecknoinits",
|
||||
# "goconst",
|
||||
# "gocritic" # Temporarily disabled on 2022-09-09, running into weird bug "ruleguard: execution error: used Run() with an empty rule set; forgot to call Load() first?"
|
||||
- "goimports"
|
||||
- "goprintffuncname"
|
||||
- "gosec"
|
||||
- "gosimple"
|
||||
- "govet"
|
||||
- "ineffassign"
|
||||
- "misspell"
|
||||
- "nakedret"
|
||||
- "exportloopref"
|
||||
- "staticcheck"
|
||||
- "stylecheck"
|
||||
- "typecheck"
|
||||
- "unconvert"
|
||||
- "unused"
|
||||
- "whitespace"
|
||||
- "gocyclo"
|
||||
- "exhaustive"
|
||||
- "typecheck"
|
||||
- "asciicheck"
|
||||
- "errorlint"
|
||||
- "revive"
|
||||
|
||||
issues:
|
||||
exclude-use-default: false
|
||||
max-same-issues: 0
|
||||
exclude-dirs:
|
||||
- devenv
|
||||
- scripts
|
||||
exclude-rules:
|
||||
- linters: ["stylecheck"]
|
||||
text: "ST1003"
|
||||
- linters: ["stylecheck"]
|
||||
text: "ST1001"
|
||||
- linters: ["staticcheck"]
|
||||
text: "SA1019: http.CloseNotifier"
|
||||
- linters: ["staticcheck"]
|
||||
text: "SA1019: strings.Title"
|
||||
- linters: ["staticcheck"]
|
||||
text: "SA1019: \"go.opentelemetry.io/otel/exporters/jaeger\""
|
||||
- linters: ["staticcheck"]
|
||||
text: "use fake service and real access control evaluator instead"
|
||||
- linters: ["gosec"]
|
||||
text: "G108"
|
||||
- linters: ["gosec"]
|
||||
text: "G110"
|
||||
- linters: ["gosec"]
|
||||
text: "G201"
|
||||
- linters: ["gosec"]
|
||||
text: "G202"
|
||||
- linters: ["gosec"]
|
||||
text: "G306"
|
||||
- linters: ["gosec"]
|
||||
text: "401"
|
||||
- linters: ["gosec"]
|
||||
text: "402"
|
||||
- linters: ["gosec"]
|
||||
text: "501"
|
||||
- linters: ["gosec"]
|
||||
text: "404"
|
||||
- linters: ["errorlint"]
|
||||
text: "non-wrapping format verb for fmt.Errorf"
|
||||
# TODO: Enable
|
||||
- linters: ["stylecheck"]
|
||||
text: "ST1000"
|
||||
# TODO: Enable
|
||||
- linters: ["stylecheck"]
|
||||
text: "ST1020"
|
||||
# TODO: Enable
|
||||
- linters: ["stylecheck"]
|
||||
text: "ST1021"
|
||||
- linters: ["gosec"]
|
||||
path: "(.+)_test\\.go"
|
||||
text: "G601"
|
||||
- linters: ["gosec"]
|
||||
text: G115
|
||||
450
CHANGELOG.md
450
CHANGELOG.md
@@ -1,3 +1,453 @@
|
||||
<!-- 11.1.13 START -->
|
||||
|
||||
# 11.1.13 (2025-03-25)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go version to 1.23.7 [#101562](https://github.com/grafana/grafana/pull/101562), [@macabu](https://github.com/macabu)
|
||||
- **Chore:** Bump Go version to 1.23.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Update slack image upload to use new API [#101485](https://github.com/grafana/grafana/pull/101485), [@moustafab](https://github.com/moustafab)
|
||||
- **Service Accounts:** Do not show error pop-ups for Service Account and Renderer UI flows [#101796](https://github.com/grafana/grafana/pull/101796), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
|
||||
<!-- 11.1.13 END -->
|
||||
<!-- 11.1.12 START -->
|
||||
|
||||
# 11.1.12 (2025-02-18)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Docker:** Use our own glibc 2.40 binaries [#99917](https://github.com/grafana/grafana/pull/99917), [@DanCech](https://github.com/DanCech)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Azure:** Correctly set application insights resource values [#99595](https://github.com/grafana/grafana/pull/99595), [@aangelisc](https://github.com/aangelisc)
|
||||
|
||||
<!-- 11.1.12 END -->
|
||||
<!-- 11.1.11 START -->
|
||||
|
||||
# 11.1.11 (2025-01-28)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Security:** Update to Go 1.22.11 - Backport to v11.1.x [#99126](https://github.com/grafana/grafana/pull/99126), [@Proximyst](https://github.com/Proximyst)
|
||||
- **Security:** Update to Go 1.22.11 - Backport to v11.1.x (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Azure/GCM:** Improve error display [#97595](https://github.com/grafana/grafana/pull/97595), [@aangelisc](https://github.com/aangelisc)
|
||||
|
||||
<!-- 11.1.11 END -->
|
||||
<!-- 11.1.10 START -->
|
||||
|
||||
# 11.1.10 (2024-12-04)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Fix:** Do not fetch Orgs if the user is authenticated by apikey/sa or render key [#97261](https://github.com/grafana/grafana/pull/97261), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
|
||||
<!-- 11.1.10 END -->
|
||||
<!-- 11.1.9 START -->
|
||||
|
||||
# 11.1.9 (2024-11-19)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Make context deadline on AlertNG service startup configurable [#96132](https://github.com/grafana/grafana/pull/96132), [@fayzal-g](https://github.com/fayzal-g)
|
||||
- **User:** Check SignedInUser OrgID in RevokeInvite [#95488](https://github.com/grafana/grafana/pull/95488), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Force refetch prom rules when refreshing panel [#96123](https://github.com/grafana/grafana/pull/96123), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Anonymous User:** Adds validator service for anonymous users [#94992](https://github.com/grafana/grafana/pull/94992), [@leandro-deveikis](https://github.com/leandro-deveikis)
|
||||
- **Anonymous User:** Adds validator service for anonymous users (Enterprise)
|
||||
- **Azure Monitor:** Support metric namespaces fallback [#95153](https://github.com/grafana/grafana/pull/95153), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Azure:** Fix duplicated traces in multi-resource trace query [#95245](https://github.com/grafana/grafana/pull/95245), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Azure:** Handle namespace request rejection [#95907](https://github.com/grafana/grafana/pull/95907), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Migration:** Remove table aliasing in delete statement to make it work for mariadb [#95230](https://github.com/grafana/grafana/pull/95230), [@kalleep](https://github.com/kalleep)
|
||||
- **Prometheus:** Fix interpolating adhoc filters with template variables [#95977](https://github.com/grafana/grafana/pull/95977), [@cazeaux](https://github.com/cazeaux)
|
||||
- **ServerLock:** Fix pg concurrency/locking issue [#95933](https://github.com/grafana/grafana/pull/95933), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **ServerSideExpressions:** Disable SQL Expressions to prevent RCE and LFI vulnerability [#94969](https://github.com/grafana/grafana/pull/94969), [@scottlepp](https://github.com/scottlepp)
|
||||
|
||||
<!-- 11.1.9 END -->
|
||||
<!-- 11.1.8 START -->
|
||||
|
||||
# 11.1.8 (2024-10-22)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix incorrect permission on POST external rule groups endpoint [CVE-2024-8118] [#93948](https://github.com/grafana/grafana/pull/93948), [@alexweav](https://github.com/alexweav)
|
||||
- **AzureMonitor:** Fix App Insights portal URL for multi-resource trace queries [#94474](https://github.com/grafana/grafana/pull/94474), [@aangelisc](https://github.com/aangelisc)
|
||||
- **OrgSync:** Do not set default Organization for a user to a non-existent Organization [#94551](https://github.com/grafana/grafana/pull/94551), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **ServerSideExpressions:** Disable SQL Expressions to prevent RCE and LFI vulnerability [#94969](https://github.com/grafana/grafana/pull/94969), [@scottlepp](https://github.com/scottlepp)
|
||||
|
||||
<!-- 11.1.8 END -->
|
||||
<!-- 11.1.7+security-01 START -->
|
||||
|
||||
# 11.1.7+security-01 (2024-10-17)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **SQL Expressions**: Fixes CVE-2024-9264
|
||||
|
||||
<!-- 11.1.7+security-01 END -->
|
||||
<!-- 11.1.7 START -->
|
||||
|
||||
# 11.1.7 (2024-10-01)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.22.7 [#93355](https://github.com/grafana/grafana/pull/93355), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **Chore:** Bump Go to 1.22.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix preview of silences when label name contains spaces [#93050](https://github.com/grafana/grafana/pull/93050), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Make query wrapper match up datasource UIDs if necessary [#93115](https://github.com/grafana/grafana/pull/93115), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **AzureMonitor:** Deduplicate resource picker rows [#93704](https://github.com/grafana/grafana/pull/93704), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Improve resource picker efficiency [#93439](https://github.com/grafana/grafana/pull/93439), [@aangelisc](https://github.com/aangelisc)
|
||||
- **AzureMonitor:** Remove Basic Logs retention warning [#93122](https://github.com/grafana/grafana/pull/93122), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Correlations:** Limit access to correlations page to users who can access Explore [#93675](https://github.com/grafana/grafana/pull/93675), [@ifrost](https://github.com/ifrost)
|
||||
- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93487](https://github.com/grafana/grafana/pull/93487), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 11.1.7 END -->
|
||||
<!-- 11.1.6+security-01 START -->
|
||||
|
||||
# 11.1.6+security-01 (2024-10-17)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **SQL Expressions**: Fixes CVE-2024-9264
|
||||
|
||||
<!-- 11.1.6+security-01 END -->
|
||||
<!-- 11.1.6 START -->
|
||||
|
||||
# 11.1.6 (2024-09-26)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Update swagger ui (4.3.0 to 5.17.14) [#92341](https://github.com/grafana/grafana/pull/92341), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Templating:** Fix searching non-latin template variables [#92892](https://github.com/grafana/grafana/pull/92892), [@leeoniya](https://github.com/leeoniya)
|
||||
- **TutorialCard:** Fix link to tutorial not opening [#92646](https://github.com/grafana/grafana/pull/92646), [@eledobleefe](https://github.com/eledobleefe)
|
||||
- **Alerting:** Fixed CVE-2024-8118.
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Bugfix:** QueryField typeahead missing background color [#92316](https://github.com/grafana/grafana/pull/92316), [@mckn](https://github.com/mckn)
|
||||
|
||||
<!-- 11.1.6 END -->
|
||||
<!-- 11.1.5 START -->
|
||||
|
||||
# 11.1.5 (2024-08-27)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix permissions for prometheus rule endpoints [#91414](https://github.com/grafana/grafana/pull/91414), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix persisting result fingerprint that is used by recovery threshold [#91290](https://github.com/grafana/grafana/pull/91290), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Auditing:** Fix a possible crash when audit logger parses responses for failed requests (Enterprise)
|
||||
- **RBAC:** Fix an issue with server admins not being able to manage users in orgs that they don't belong to [#92273](https://github.com/grafana/grafana/pull/92273), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **RBAC:** Fix an issue with server admins not being able to manage users in orgs that they dont belong to (Enterprise)
|
||||
- **RBAC:** Fix seeder failures when inserting duplicated permissions (Enterprise)
|
||||
- **Snapshots:** Fix panic when snapshot_remove_expired is true [#91232](https://github.com/grafana/grafana/pull/91232), [@ryantxu](https://github.com/ryantxu)
|
||||
- **VizTooltip:** Fix positioning at bottom and right edges on mobile [#92137](https://github.com/grafana/grafana/pull/92137), [@leeoniya](https://github.com/leeoniya)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Bugfix:** QueryField typeahead missing background color [#92316](https://github.com/grafana/grafana/pull/92316), [@mckn](https://github.com/mckn)
|
||||
|
||||
<!-- 11.1.5 END -->
|
||||
<!-- 11.1.4 START -->
|
||||
|
||||
# 11.1.4 (2024-08-14)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Swagger:** Fixed CVE-2024-6837.
|
||||
|
||||
<!-- 11.1.4 END -->
|
||||
<!-- 11.1.3 START -->
|
||||
|
||||
# 11.1.3 (2024-07-26)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **RBAC**: Allow plugins to use scoped actions [#90946](https://github.com/grafana/grafana/pull/90946), [@gamab](https://github.com/gamab)
|
||||
|
||||
<!-- 11.1.3 END -->
|
||||
<!-- 11.1.2 START -->
|
||||
|
||||
# 11.1.2 (2024-07-26)
|
||||
|
||||
<!-- 11.1.2 END -->
|
||||
<!-- 11.1.1 START -->
|
||||
|
||||
# 11.1.1 (2024-07-25)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Skip fetching alerts for unsaved dashboards [#90074](https://github.com/grafana/grafana/pull/90074), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Skip loading alert rules for dashboards when disabled [#89905](https://github.com/grafana/grafana/pull/89905), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Support `utf8_strict_mode: false` in Mimir [#90148](https://github.com/grafana/grafana/pull/90148), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Scenes:** Fixes issue with panel repeat height calculation [#90232](https://github.com/grafana/grafana/pull/90232), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Table Panel:** Fix Image hover without datalinks [#89922](https://github.com/grafana/grafana/pull/89922), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Tempo:** Fix grpc streaming support over pdc-agent [#90055](https://github.com/grafana/grafana/pull/90055), [@taylor-s-dean](https://github.com/taylor-s-dean)
|
||||
- **RBAC**: Allow plugins to use scoped actions [#90946](https://github.com/grafana/grafana/pull/90946), [@gamab](https://github.com/gamab)
|
||||
|
||||
<!-- 11.1.1 END -->
|
||||
<!-- 11.1.0 START -->
|
||||
|
||||
# 11.1.0 (2024-06-21)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Tracing:** Enable traces to profiles. [#88896](https://github.com/grafana/grafana/issues/88896), [@marefr](https://github.com/marefr)
|
||||
- **Auth:** Add org to role mappings support to Google integration. [#88891](https://github.com/grafana/grafana/issues/88891), [@kalleep](https://github.com/kalleep)
|
||||
- **Alerting:** Support AWS SNS integration in Grafana. [#88867](https://github.com/grafana/grafana/issues/88867), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Auth:** Add org to role mappings support to Okta integration. [#88770](https://github.com/grafana/grafana/issues/88770), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Auth:** Add org to role mappings support to Gitlab integration. [#88751](https://github.com/grafana/grafana/issues/88751), [@kalleep](https://github.com/kalleep)
|
||||
- **Cloudwatch:** Use the metric map from grafana-aws-sdk. [#88733](https://github.com/grafana/grafana/issues/88733), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Alerting:** Add option to use Redis in cluster mode for Alerting HA. [#88696](https://github.com/grafana/grafana/issues/88696), [@fayzal-g](https://github.com/fayzal-g)
|
||||
- **VizTooltip:** Allow setting the `maxWidth` option. [#88652](https://github.com/grafana/grafana/issues/88652), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Auth:** Add org to role mappings support to GitHub integration . [#88537](https://github.com/grafana/grafana/issues/88537), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **CloudWatch:** Handle permissions error and update docs. [#88524](https://github.com/grafana/grafana/issues/88524), [@iwysiu](https://github.com/iwysiu)
|
||||
- ** Alerting:** Correctly handle duplicating notification templates. [#88487](https://github.com/grafana/grafana/issues/88487), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Mute Timing service to prevent changing provenance status to none. [#88462](https://github.com/grafana/grafana/issues/88462), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Ensure we fetch AM config before saving new configuration. [#88458](https://github.com/grafana/grafana/issues/88458), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Remove regex reference in silences filter tooltip. [#88455](https://github.com/grafana/grafana/issues/88455), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Cloudwatch:** Update AWS DynamoDB Metrics. [#88418](https://github.com/grafana/grafana/issues/88418), [@LeonardoBoleli](https://github.com/LeonardoBoleli)
|
||||
- **Alerting:** Make regex notification routing preview consistent with notification policies implementation. [#88413](https://github.com/grafana/grafana/issues/88413), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **DateTimePicker:** Return cleared value in onChange. [#88377](https://github.com/grafana/grafana/issues/88377), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **NodeGraph:** Add msagl and the layered layout code. [#88375](https://github.com/grafana/grafana/issues/88375), [@aocenas](https://github.com/aocenas)
|
||||
- **API:** Add in theme support to /render/\* endpoint. [#88304](https://github.com/grafana/grafana/issues/88304), [@timlevett](https://github.com/timlevett)
|
||||
- **Alerting:** Add filters for RouteGetRuleStatuses. [#88295](https://github.com/grafana/grafana/issues/88295), [@fayzal-g](https://github.com/fayzal-g)
|
||||
- **Plugins:** Update the `plugin.json` schema with UI extensions meta-data. [#88288](https://github.com/grafana/grafana/issues/88288), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Auth:** Update SAML lib to improve HTTP-Post binding. [#88287](https://github.com/grafana/grafana/issues/88287), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Tempo:** Send current filters when retrieving tags for AdHocFilters. [#88270](https://github.com/grafana/grafana/issues/88270), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Tempo:** Support standard span convention. [#88268](https://github.com/grafana/grafana/issues/88268), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **ValueFormats:** Add Uruguay peso currency. [#88260](https://github.com/grafana/grafana/issues/88260), [@lfdominguez](https://github.com/lfdominguez)
|
||||
- **DateTimePicker:** Add clearable prop. [#88215](https://github.com/grafana/grafana/issues/88215), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Correlations:** Enable feature toggle by default (on-prem). [#88208](https://github.com/grafana/grafana/issues/88208), [@ifrost](https://github.com/ifrost)
|
||||
- **Stat:** Add percent change color modes. [#88205](https://github.com/grafana/grafana/issues/88205), [@drew08t](https://github.com/drew08t)
|
||||
- **Logs:** Added multi-line display control to the "wrap lines" option. [#88144](https://github.com/grafana/grafana/issues/88144), [@matyax](https://github.com/matyax)
|
||||
- **Tempo:** Update lezer autocomplete (histogram, quantile) and add missing functions. [#88131](https://github.com/grafana/grafana/issues/88131), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **AnnotationsPlugin2:** Implement support for rectangular annotations in Heatmap. [#88107](https://github.com/grafana/grafana/issues/88107), [@adrapereira](https://github.com/adrapereira)
|
||||
- **CodeEditor:** Improved styles when the code editor is loading. [#88102](https://github.com/grafana/grafana/issues/88102), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **CloudWatch:** Add additional AWS/KinesisAnalytics metrics . [#88101](https://github.com/grafana/grafana/issues/88101), [@tristanburgess](https://github.com/tristanburgess)
|
||||
- **Cloudwatch:** Add AWS/Events Metrics. [#88097](https://github.com/grafana/grafana/issues/88097), [@LeonardoBoleli](https://github.com/LeonardoBoleli)
|
||||
- **Azure:** Basic Logs support. [#88025](https://github.com/grafana/grafana/issues/88025), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Dashboard:** Make dashboard search faster. [#88019](https://github.com/grafana/grafana/issues/88019), [@knuzhdin](https://github.com/knuzhdin)
|
||||
- **Alerting:** Support custom API URL for PagerDuty integration. [#88007](https://github.com/grafana/grafana/issues/88007), [@gaurav1999](https://github.com/gaurav1999)
|
||||
- **Alerting:** Add optional metadata via query param to silence GET requests. [#88000](https://github.com/grafana/grafana/issues/88000), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Store:** Enable adding extra middleware. [#87984](https://github.com/grafana/grafana/issues/87984), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Tempo:** Don't modify the passed time range when using timeShiftEnabled. [#87980](https://github.com/grafana/grafana/issues/87980), [@aocenas](https://github.com/aocenas)
|
||||
- **InfluxDB:** Introduce maxDataPoints setting for flux variable query editor. [#87935](https://github.com/grafana/grafana/issues/87935), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Alerting:** New list view UI – Part 1. [#87907](https://github.com/grafana/grafana/issues/87907), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **NodeGraph:** Remove msagl lib and layered layout option. [#87905](https://github.com/grafana/grafana/issues/87905), [@aocenas](https://github.com/aocenas)
|
||||
- **InfluxDB:** Introduce custom variable support. [#87903](https://github.com/grafana/grafana/issues/87903), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Gops:** Add tracking for data source check. [#87886](https://github.com/grafana/grafana/issues/87886), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **AzureMonitor:** Prometheus exemplars support . [#87742](https://github.com/grafana/grafana/issues/87742), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Feature Management:** Move awsDatasourcesNewFormStyling to GA. [#87696](https://github.com/grafana/grafana/issues/87696), [@idastambuk](https://github.com/idastambuk)
|
||||
- **TimeRangePicker:** Announce to screen reader when time range is updated. [#87692](https://github.com/grafana/grafana/issues/87692), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Alerting:** Template selector in contact points form. [#87689](https://github.com/grafana/grafana/issues/87689), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Azure:** Load custom clouds from ini file. [#87667](https://github.com/grafana/grafana/issues/87667), [@JonCole](https://github.com/JonCole)
|
||||
- **Loki:** Kick start your query now applies templates to the current query. [#87658](https://github.com/grafana/grafana/issues/87658), [@matyax](https://github.com/matyax)
|
||||
- **Elasticsearch:** Queries no longer executed while typing. [#87652](https://github.com/grafana/grafana/issues/87652), [@matyax](https://github.com/matyax)
|
||||
- **Alerting:** Add options to configure TLS for HA using Redis. [#87567](https://github.com/grafana/grafana/issues/87567), [@fayzal-g](https://github.com/fayzal-g)
|
||||
- **VizLegend:** Represent line style in series legend and tooltip. [#87558](https://github.com/grafana/grafana/issues/87558), [@domasx2](https://github.com/domasx2)
|
||||
- **FeatureBadge:** Update FeatureBadge to support current release stages. [#87555](https://github.com/grafana/grafana/issues/87555), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Logs:** Infinite scrolling in Explore enabled by default. [#87493](https://github.com/grafana/grafana/issues/87493), [@matyax](https://github.com/matyax)
|
||||
- **Plugins:** Improve frontend loader cache. [#87488](https://github.com/grafana/grafana/issues/87488), [@jackw](https://github.com/jackw)
|
||||
- **Chore:** Upgrade go from 1.21.0 to 1.21.10. [#87479](https://github.com/grafana/grafana/issues/87479), [@stephaniehingtgen](https://github.com/stephaniehingtgen)
|
||||
- **Chore:** Upgrade go to 1.22.3. [#87463](https://github.com/grafana/grafana/issues/87463), [@stephaniehingtgen](https://github.com/stephaniehingtgen)
|
||||
- **Team:** Add an endpoint for bulk team membership updates. [#87441](https://github.com/grafana/grafana/issues/87441), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Flamegraph:** Add collapse and expand group buttons to toolbar. [#87395](https://github.com/grafana/grafana/issues/87395), [@aocenas](https://github.com/aocenas)
|
||||
- **OIDC:** Support Generic OAuth org to role mappings. [#87394](https://github.com/grafana/grafana/issues/87394), [@sathieu](https://github.com/sathieu)
|
||||
- **Search:** Announce to screen reader when query returns no result. [#87382](https://github.com/grafana/grafana/issues/87382), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Logs:** Added support for numeric log levels. [#87366](https://github.com/grafana/grafana/issues/87366), [@nailgun](https://github.com/nailgun)
|
||||
- **Prometheus:** Place custom inputs first when using regex filter values in the query builder. [#87360](https://github.com/grafana/grafana/issues/87360), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **Alerting:** Remove requirement for datasource query on rule read. [#87349](https://github.com/grafana/grafana/issues/87349), [@rwwiv](https://github.com/rwwiv)
|
||||
- **Alerting:** Add RBAC logic for silences creation. [#87322](https://github.com/grafana/grafana/issues/87322), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Update silences creation to support `__alert_rule_uid__` and move into drawer. [#87320](https://github.com/grafana/grafana/issues/87320), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Flamegraph:** Add diff mode color legend. [#87319](https://github.com/grafana/grafana/issues/87319), [@aocenas](https://github.com/aocenas)
|
||||
- **Dashboard:** Keyboard and mouse panel shortcuts improvement. [#87317](https://github.com/grafana/grafana/issues/87317), [@tskarhed](https://github.com/tskarhed)
|
||||
- **PanelHeaderCorner:** Remove font-awesome icons. [#87303](https://github.com/grafana/grafana/issues/87303), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Alerting:** Add OAuth2 to HTTP settings for vanilla Alertmanager / Mimir. [#87272](https://github.com/grafana/grafana/issues/87272), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Plugins:** Allow apps to expose components. Update the extensions API. [#87236](https://github.com/grafana/grafana/issues/87236), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Plugins:** Catalog to show all plugins by default. [#87168](https://github.com/grafana/grafana/issues/87168), [@sympatheticmoose](https://github.com/sympatheticmoose)
|
||||
- **Prometheus:** Ensure values in metric selector are visible. [#87150](https://github.com/grafana/grafana/issues/87150), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **Select:** Add data-testid to Input. [#87105](https://github.com/grafana/grafana/issues/87105), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Prometheus:** Add native histogram types metric explorer to allow filter by type. [#87090](https://github.com/grafana/grafana/issues/87090), [@bohandley](https://github.com/bohandley)
|
||||
- **Prometheus:** Add hints for native histograms. [#87017](https://github.com/grafana/grafana/issues/87017), [@bohandley](https://github.com/bohandley)
|
||||
- **Alerting:** Reduce number of request fetching rules in the dashboard view using rtkq. [#86991](https://github.com/grafana/grafana/issues/86991), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Plugins:** Make grafana-com API URL usage consistent. [#86920](https://github.com/grafana/grafana/issues/86920), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Stack:** Add size props. [#86900](https://github.com/grafana/grafana/issues/86900), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Table Panel:** Enable Text Wrapping. [#86895](https://github.com/grafana/grafana/issues/86895), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Alerting:** Get grafana-managed alert rule by UID. [#86845](https://github.com/grafana/grafana/issues/86845), [@fayzal-g](https://github.com/fayzal-g)
|
||||
- **Cloudwatch:** Add Kendra metrics. [#86809](https://github.com/grafana/grafana/issues/86809), [@scottschreckengaust](https://github.com/scottschreckengaust)
|
||||
- **Auth:** Added support to filter for parent teams in GitHub connector's team membership filter. [#86754](https://github.com/grafana/grafana/issues/86754), [@wasim-nihal](https://github.com/wasim-nihal)
|
||||
- **Alerting:** Hook up GMA silence APIs to new authentication handler. [#86625](https://github.com/grafana/grafana/issues/86625), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **GeoMap:** Pan and zoom keyboard support. [#86573](https://github.com/grafana/grafana/issues/86573), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Alerting:** Optimize rule status gathering APIs when a limit is applied. [#86568](https://github.com/grafana/grafana/issues/86568), [@stevesg](https://github.com/stevesg)
|
||||
- **Plugins:** Add an auto-generated part to the `plugin.json` schema. [#86520](https://github.com/grafana/grafana/issues/86520), [@leventebalogh](https://github.com/leventebalogh)
|
||||
- **Loki/Prometheus Query Editor:** Disabled cmd/ctrl+f keybinding within the editor. [#86418](https://github.com/grafana/grafana/issues/86418), [@matyax](https://github.com/matyax)
|
||||
- **Grafana packages:** Remove E2E workspace. [#86416](https://github.com/grafana/grafana/issues/86416), [@sunker](https://github.com/sunker)
|
||||
- **RefreshPicker:** Change running state to be less distracting . [#86405](https://github.com/grafana/grafana/issues/86405), [@torkelo](https://github.com/torkelo)
|
||||
- **Prometheus:** Cancellable label values requests. [#86403](https://github.com/grafana/grafana/issues/86403), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **SQLStore:** Improve recursive CTE support detection. [#86397](https://github.com/grafana/grafana/issues/86397), [@mildwonkey](https://github.com/mildwonkey)
|
||||
- **CloudMonitoring:** Ensure variables can be used in all variable queries. [#86377](https://github.com/grafana/grafana/issues/86377), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Common labels/displayed fields:** Show label names with values. [#86345](https://github.com/grafana/grafana/issues/86345), [@matyax](https://github.com/matyax)
|
||||
- **AuthZ:** Further protect admin endpoints. [#86285](https://github.com/grafana/grafana/issues/86285), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Explore:** Deprecate local storage singular datasource key. [#86250](https://github.com/grafana/grafana/issues/86250), [@gelicia](https://github.com/gelicia)
|
||||
- **Loki:** Add label filters after label_format if present. [#86124](https://github.com/grafana/grafana/issues/86124), [@matyax](https://github.com/matyax)
|
||||
- **Alerting:** Immutable plugin rules and alerting plugins extensions. [#86042](https://github.com/grafana/grafana/issues/86042), [@konrad147](https://github.com/konrad147)
|
||||
- **Tempo:** Group by template vars. [#86022](https://github.com/grafana/grafana/issues/86022), [@joey-grafana](https://github.com/joey-grafana)
|
||||
- **Short Links:** Add setting for changing expiration time. [#86003](https://github.com/grafana/grafana/issues/86003), [@gelicia](https://github.com/gelicia)
|
||||
- **Prometheus:** Add native histogram functions. [#86002](https://github.com/grafana/grafana/issues/86002), [@bohandley](https://github.com/bohandley)
|
||||
- **Plugins:** Removed feature toggle pluginsDynamicAngularDetectionPatterns. [#85956](https://github.com/grafana/grafana/issues/85956), [@xnyo](https://github.com/xnyo)
|
||||
- **Plugins:** Removed feature toggle enablePluginsTracingByDefault. [#85953](https://github.com/grafana/grafana/issues/85953), [@xnyo](https://github.com/xnyo)
|
||||
- **Tracing:** Allow otel service name and attributes to be overridden from env. [#85937](https://github.com/grafana/grafana/issues/85937), [@marefr](https://github.com/marefr)
|
||||
- **PanelChrome:** Improve accessibility landmark markup. [#85863](https://github.com/grafana/grafana/issues/85863), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Gops:** Add configuration tracker on the existing IRM page. [#85838](https://github.com/grafana/grafana/issues/85838), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **CloudWatch:** Add additional Glue metrics. [#85798](https://github.com/grafana/grafana/issues/85798), [@tristanburgess](https://github.com/tristanburgess)
|
||||
- **CloudWatch:** Add labels for Metric Query type queries. [#85766](https://github.com/grafana/grafana/issues/85766), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
- **Util:** Support parsing and splitting strings enclosed in quotes in util.SplitString. [#85735](https://github.com/grafana/grafana/issues/85735), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Loki:** Handle `X-Scope-OrgID` and tenant IDs. [#85726](https://github.com/grafana/grafana/issues/85726), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **CloudWatch:** Add a Performance Insights and other missing metrics to aws/rds. [#85680](https://github.com/grafana/grafana/issues/85680), [@kgeckhart](https://github.com/kgeckhart)
|
||||
- **Prometheus:** Respect dashboard queries when querying ad hoc filter labels. [#85674](https://github.com/grafana/grafana/issues/85674), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Pyroscope:** Add adhoc filters support. [#85601](https://github.com/grafana/grafana/issues/85601), [@aocenas](https://github.com/aocenas)
|
||||
- **Table Panel:** Update background colors to respect transparency. [#85565](https://github.com/grafana/grafana/issues/85565), [@codeincarnate](https://github.com/codeincarnate)
|
||||
- **Canvas:** Add support for line animation. [#85556](https://github.com/grafana/grafana/issues/85556), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Reducers:** Add in basic Percentile Support. [#85554](https://github.com/grafana/grafana/issues/85554), [@timlevett](https://github.com/timlevett)
|
||||
- **Storage:** Watch tests. [#85496](https://github.com/grafana/grafana/issues/85496), [@DanCech](https://github.com/DanCech)
|
||||
- **Plugins:** Show update buttons when instance version is different. [#85486](https://github.com/grafana/grafana/issues/85486), [@oshirohugo](https://github.com/oshirohugo)
|
||||
- **Tempo:** Always use time range even if timeShiftEnabled is false. [#85477](https://github.com/grafana/grafana/issues/85477), [@ogxd](https://github.com/ogxd)
|
||||
- **Alerting:** Gops labels integration. [#85467](https://github.com/grafana/grafana/issues/85467), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Explore:** Set X-Cache-Skip to true for query requests. [#85460](https://github.com/grafana/grafana/issues/85460), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Explore:** Make Explore breadcrumb clickable. [#85437](https://github.com/grafana/grafana/issues/85437), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Prometheus:** Fuzzy search for metric names in Code Mode. [#85396](https://github.com/grafana/grafana/issues/85396), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **Storage Api:** Adds traces. [#85391](https://github.com/grafana/grafana/issues/85391), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **Storage Api:** Add metrics. [#85316](https://github.com/grafana/grafana/issues/85316), [@owensmallwood](https://github.com/owensmallwood)
|
||||
- **Alerting:** Improve paused alert visibility and allow pausing/resuming from alert list view. [#85116](https://github.com/grafana/grafana/issues/85116), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **CloudWatch:** Clarify match exact tooltip and docs. [#85095](https://github.com/grafana/grafana/issues/85095), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Alerting:** Evaluation quick buttons. [#85010](https://github.com/grafana/grafana/issues/85010), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Alerting:** Add state history polling interval. [#84837](https://github.com/grafana/grafana/issues/84837), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **CloudWatch:** Improve metric label parsing. [#84835](https://github.com/grafana/grafana/issues/84835), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Alerting:** Improve template preview. [#84798](https://github.com/grafana/grafana/issues/84798), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** New settings page. [#84501](https://github.com/grafana/grafana/issues/84501), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Explore:** Move Query History to be screen wide. [#84321](https://github.com/grafana/grafana/issues/84321), [@gelicia](https://github.com/gelicia)
|
||||
- **MixedDataSource:** Support multi value data source variable that issues a query to each data source. [#83356](https://github.com/grafana/grafana/issues/83356), [@torkelo](https://github.com/torkelo)
|
||||
- **PluginExtensions:** Make the extensions registry reactive. [#83085](https://github.com/grafana/grafana/issues/83085), [@mckn](https://github.com/mckn)
|
||||
- **Loki:** Use label/<name>/values API instead of series API for label values discovery. [#83044](https://github.com/grafana/grafana/issues/83044), [@yuri-rs](https://github.com/yuri-rs)
|
||||
- **Tempo:** Escape backslash in span name for promsql query. [#83024](https://github.com/grafana/grafana/issues/83024), [@ttshivers](https://github.com/ttshivers)
|
||||
- **Alerting:** Export and provisioning rules into subfolders. [#77450](https://github.com/grafana/grafana/issues/77450), [@papagian](https://github.com/papagian)
|
||||
- **Notification banner:** Integrate with RBAC. (Enterprise)
|
||||
- **Auth:** Assign users using SAML to AutoAssignOrgRole if no role matches. (Enterprise)
|
||||
- **Notification banner:** Display preview. (Enterprise)
|
||||
- **Auth:** Add None and Viewer roles as options to SAML UI config. (Enterprise)
|
||||
- **SAML:** Add nonce to the generated script tag. (Enterprise)
|
||||
- **Notification banner:** Add settings page. (Enterprise)
|
||||
- **Notification banner:** Add API client. (Enterprise)
|
||||
- **Chore:** Upgrade go version to 1.22.3. (Enterprise)
|
||||
- **Auditing:** Correctly parse the URL for auditing through Loki. (Enterprise)
|
||||
- **Auditlog:** Refactor action to post-action in default auditlogging. (Enterprise)
|
||||
- **Plugins:** Make grafana-com API URL usage consistent. (Enterprise)
|
||||
- **Plugins:** Make grafana-com API URL usage consistent. (Enterprise)
|
||||
- **Caching:** Implement mtls-enabled memcached integration. (Enterprise)
|
||||
- **OpenAPI:** Document the datasource caching API. (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix go-swagger extraction and several embedded types from Alertmanager in Swagger docs. [#88879](https://github.com/grafana/grafana/issues/88879), [@alexweav](https://github.com/alexweav)
|
||||
- **DashboardScene:** Fixes inspect with transforms issue. [#88843](https://github.com/grafana/grafana/issues/88843), [@torkelo](https://github.com/torkelo)
|
||||
- **Elasticsearch:** Fix stripping of trailing slashes in datasource URLs. [#88779](https://github.com/grafana/grafana/issues/88779), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki:** Fix editor history in wrong order. [#88666](https://github.com/grafana/grafana/issues/88666), [@svennergr](https://github.com/svennergr)
|
||||
- **Cli:** Fix bug where password is hashed twice. [#88589](https://github.com/grafana/grafana/issues/88589), [@kalleep](https://github.com/kalleep)
|
||||
- **AzureMonitor:** Fix bug detecting app insights queries. [#88572](https://github.com/grafana/grafana/issues/88572), [@aangelisc](https://github.com/aangelisc)
|
||||
- **SSE:** Fix threshold unmarshal to avoid panic. [#88521](https://github.com/grafana/grafana/issues/88521), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Dashboard:** Fix Variables query hides fields with non-supported datasources. [#88516](https://github.com/grafana/grafana/issues/88516), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Explore:** Align time filters properly to day boundaries in query history. [#88498](https://github.com/grafana/grafana/issues/88498), [@aocenas](https://github.com/aocenas)
|
||||
- **Access Control:** Clean up permissions for deprovisioned data sources. [#88483](https://github.com/grafana/grafana/issues/88483), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Dashboards:** Correctly display Admin access to dashboards in the UI. [#88439](https://github.com/grafana/grafana/issues/88439), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **LibraryPanels/RBAC:** Ignore old folder permission check when deleting/patching lib panel. [#88422](https://github.com/grafana/grafana/issues/88422), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **LogsTable:** Fix default sort by time. [#88398](https://github.com/grafana/grafana/issues/88398), [@svennergr](https://github.com/svennergr)
|
||||
- **Dashboards:** Fix regression when deleting folder. [#88311](https://github.com/grafana/grafana/issues/88311), [@papagian](https://github.com/papagian)
|
||||
- **Docker:** Fix renderer plugin in custom Dockerfile. [#88223](https://github.com/grafana/grafana/issues/88223), [@AgnesToulet](https://github.com/AgnesToulet)
|
||||
- **Alerting:** Fix rules deleting when reordering whilst filtered. [#88221](https://github.com/grafana/grafana/issues/88221), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix "copy link" not including full URL. [#88210](https://github.com/grafana/grafana/issues/88210), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix typo in JSON response for rule export. [#88028](https://github.com/grafana/grafana/issues/88028), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **Alerting:** Fix scheduler to sort rules before evaluation. [#88006](https://github.com/grafana/grafana/issues/88006), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
- **CloudMonitoring:** Fix query type selection issue. [#87990](https://github.com/grafana/grafana/issues/87990), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Alerting:** Assume built-in AM is receiving alerts in case of not having admin config. [#87893](https://github.com/grafana/grafana/issues/87893), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **DashboardScene:** Skip panel repeats when values are the same. [#87788](https://github.com/grafana/grafana/issues/87788), [@torkelo](https://github.com/torkelo)
|
||||
- **Alerting:** Fix deleting rules when silencing/resuming rule from a panel alert tab. [#87710](https://github.com/grafana/grafana/issues/87710), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Dashboards:** Don't set dashboard creator/updater if the action is done by an API key. [#87704](https://github.com/grafana/grafana/issues/87704), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Elasticsearch:** Fix setting of default maxConcurrentShardRequests. [#87703](https://github.com/grafana/grafana/issues/87703), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Graphite:** Fix alignment of elements in the query editor. [#87662](https://github.com/grafana/grafana/issues/87662), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **DashboardScene:** Fixing major row repeat issues. [#87539](https://github.com/grafana/grafana/issues/87539), [@torkelo](https://github.com/torkelo)
|
||||
- **Alerting:** Do not store series values from past evaluations in state manager for no reason. [#87525](https://github.com/grafana/grafana/issues/87525), [@alexweav](https://github.com/alexweav)
|
||||
- **RBAC:** Update role picker in team page, fix a bug with roles being removed upon team setting update. [#87519](https://github.com/grafana/grafana/issues/87519), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Transformations:** Fix true inner join in `joinByField` transformation. [#87409](https://github.com/grafana/grafana/issues/87409), [@baldm0mma](https://github.com/baldm0mma)
|
||||
- **Alerting:** Do not retry rule evaluations with "input data must be a wide series but got type long" style errors. [#87343](https://github.com/grafana/grafana/issues/87343), [@alexweav](https://github.com/alexweav)
|
||||
- **Tempo:** Fix sorting for nested tables. [#87214](https://github.com/grafana/grafana/issues/87214), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **Cloudwatch Logs:** Fix bug where we did not return errors to user. [#87190](https://github.com/grafana/grafana/issues/87190), [@sarahzinger](https://github.com/sarahzinger)
|
||||
- **CloudWatch:** Fix apostrophes in dimension values not being escaped. [#87182](https://github.com/grafana/grafana/issues/87182), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
- **AnnotationList:** Fix link for annotation with no panel or dashboard. [#87048](https://github.com/grafana/grafana/issues/87048), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Graphite:** Fix splitting expressions in tag_value with template variables. [#86958](https://github.com/grafana/grafana/issues/86958), [@EduardZaydler](https://github.com/EduardZaydler)
|
||||
- **SQL Query Editor:** Fix label-for IDs, associate "Table" label. [#86944](https://github.com/grafana/grafana/issues/86944), [@timo](https://github.com/timo)
|
||||
- **SSO:** Add SSO settings to secrets migrator. [#86913](https://github.com/grafana/grafana/issues/86913), [@dmihai](https://github.com/dmihai)
|
||||
- **Plugins:** Preserve trailing slash in plugin proxy. [#86859](https://github.com/grafana/grafana/issues/86859), [@marefr](https://github.com/marefr)
|
||||
- **TimeSeries:** Improve keyboard focus and fix spacebar override. [#86848](https://github.com/grafana/grafana/issues/86848), [@tskarhed](https://github.com/tskarhed)
|
||||
- **NodeGraph:** Use values from fixedX/fixedY column for layout. [#86643](https://github.com/grafana/grafana/issues/86643), [@timo](https://github.com/timo)
|
||||
- **Alerting:** Prevent simplified routing zero duration GroupInterval and RepeatInterval. [#86561](https://github.com/grafana/grafana/issues/86561), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Loki:** Fix setting of tenant ID. [#86433](https://github.com/grafana/grafana/issues/86433), [@fabrizio-grafana](https://github.com/fabrizio-grafana)
|
||||
- **DashboardScene:** Fixes checkbox orienation in save forms. [#86408](https://github.com/grafana/grafana/issues/86408), [@torkelo](https://github.com/torkelo)
|
||||
- **CloudMonitoring:** Correctly interpolate multi-valued template variables in PromQL queries. [#86391](https://github.com/grafana/grafana/issues/86391), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Expressions:** Fix erroneous sorting of metrics and expressions. [#86372](https://github.com/grafana/grafana/issues/86372), [@NWRichmond](https://github.com/NWRichmond)
|
||||
- **CloudMonitoring:** Allow a custom group by value. [#86288](https://github.com/grafana/grafana/issues/86288), [@aangelisc](https://github.com/aangelisc)
|
||||
- **DataLinks:** Fixes datalinks with onClick and variables in url not being interpolated . [#86253](https://github.com/grafana/grafana/issues/86253), [@gng0](https://github.com/gng0)
|
||||
- **I18N:** Fix untranslated descriptions in data source picker. [#86216](https://github.com/grafana/grafana/issues/86216), [@joshhunt](https://github.com/joshhunt)
|
||||
- **RBAC:** Fix global role deletion in hosted Grafana. [#85980](https://github.com/grafana/grafana/issues/85980), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Expression:** Fix a bug of the display name of the threshold expression result. [#85912](https://github.com/grafana/grafana/issues/85912), [@lingyufei](https://github.com/lingyufei)
|
||||
- **Alerting:** Fix incorrect display of pending period in alert rule form. [#85893](https://github.com/grafana/grafana/issues/85893), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Fix redirect after saving a notification template. [#85667](https://github.com/grafana/grafana/issues/85667), [@tomratcliffe](https://github.com/tomratcliffe)
|
||||
- **Alerting:** Get oncall metada only when we have alert manager configuration data. [#85622](https://github.com/grafana/grafana/issues/85622), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Return better error for invalid time range on alert queries. [#85611](https://github.com/grafana/grafana/issues/85611), [@alexweav](https://github.com/alexweav)
|
||||
- **CloudWatch:** Fix SageMaker MBP namespace typo. [#85557](https://github.com/grafana/grafana/issues/85557), [@tristanburgess](https://github.com/tristanburgess)
|
||||
- **Alerting:** Only append `/alertmanager` when sending alerts to mimir targets if not already present. [#85543](https://github.com/grafana/grafana/issues/85543), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Set mimir implementation in jsonData by default when creating a new a…. [#85513](https://github.com/grafana/grafana/issues/85513), [@soniaAguilarPeiron](https://github.com/soniaAguilarPeiron)
|
||||
- **Alerting:** Persist silence state immediately on Create/Delete . [#84705](https://github.com/grafana/grafana/issues/84705), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **NodeGraph:** Fix configuring arc colors with mixed case field names. [#84609](https://github.com/grafana/grafana/issues/84609), [@timo](https://github.com/timo)
|
||||
- **Auditing:** Fix Loki URL parsing. (Enterprise)
|
||||
- **Provisioning:** Add override option to role provisioning. (Enterprise)
|
||||
- **Alerting:** Check pointers before use to prevent segfault. (Enterprise)
|
||||
- **Reporting:** Fix UI errors when using linked variables. (Enterprise)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
Users that provision alert rules into folders whose titles contain slashes from now on they should escape them:
|
||||
eg. if an alert group contains:
|
||||
`folder: folder_with_/_in_title`
|
||||
it should become:
|
||||
`folder: folder_with_\/_in_title` Issue [#77450](https://github.com/grafana/grafana/issues/77450)
|
||||
|
||||
### Deprecations
|
||||
|
||||
The `grafana.explore.richHistory.activeDatasourceOnly` local storage key is deprecated, and will be removed in Grafana 12. You may experience loss of your Explore query history or autocomplete data if you upgrade to Grafana 12 under 2 weeks of Grafana 11.1. Actual risk of data loss depends on your query history retention policy. Issue [#86250](https://github.com/grafana/grafana/issues/86250)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Select:** Change `Select` group headers to always be visible. [#88178](https://github.com/grafana/grafana/issues/88178), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Select:** Ensure virtualised menu scrolls active option into view when using arrow keys. [#87743](https://github.com/grafana/grafana/issues/87743), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Switch:** Improve disabled active state. [#87694](https://github.com/grafana/grafana/issues/87694), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Button:** Allow disabled button to still be focused. [#87516](https://github.com/grafana/grafana/issues/87516), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **GrafanaUI:** Add `tabular` prop to Text component for tabular numbers. [#87440](https://github.com/grafana/grafana/issues/87440), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
|
||||
<!-- 11.1.0 END -->
|
||||
<!-- 11.0.0 START -->
|
||||
|
||||
# 11.0.0 (2024-05-14)
|
||||
|
||||
46
Dockerfile
46
Dockerfile
@@ -1,14 +1,19 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
ARG BASE_IMAGE=alpine:3.19.1
|
||||
# to maintain formatting of multiline commands in vscode, add the following to settings.json:
|
||||
# "docker.languageserver.formatter.ignoreMultilineInstructions": true
|
||||
|
||||
ARG BASE_IMAGE=alpine:3.21
|
||||
ARG JS_IMAGE=node:20-alpine
|
||||
ARG JS_PLATFORM=linux/amd64
|
||||
ARG GO_IMAGE=golang:1.22.4-alpine
|
||||
ARG GO_IMAGE=golang:1.23.7-alpine
|
||||
|
||||
# Default to building locally
|
||||
ARG GO_SRC=go-builder
|
||||
ARG JS_SRC=js-builder
|
||||
|
||||
FROM --platform=${JS_PLATFORM} ${JS_IMAGE} as js-builder
|
||||
# Javascript build stage
|
||||
FROM --platform=${JS_PLATFORM} ${JS_IMAGE} AS js-builder
|
||||
|
||||
ENV NODE_OPTIONS=--max_old_space_size=8000
|
||||
|
||||
@@ -32,7 +37,8 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM ${GO_IMAGE} as go-builder
|
||||
# Golang build stage
|
||||
FROM ${GO_IMAGE} AS go-builder
|
||||
|
||||
ARG COMMIT_SHA=""
|
||||
ARG BUILD_BRANCH=""
|
||||
@@ -83,7 +89,8 @@ ENV BUILD_BRANCH=${BUILD_BRANCH}
|
||||
|
||||
RUN make build-go GO_BUILD_TAGS=${GO_BUILD_TAGS} WIRE_TAGS=${WIRE_TAGS}
|
||||
|
||||
FROM ${BASE_IMAGE} as tgz-builder
|
||||
# From-tarball build stage
|
||||
FROM ${BASE_IMAGE} AS tgz-builder
|
||||
|
||||
WORKDIR /tmp/grafana
|
||||
|
||||
@@ -95,8 +102,8 @@ COPY ${GRAFANA_TGZ} /tmp/grafana.tar.gz
|
||||
RUN tar x -z -f /tmp/grafana.tar.gz --strip-components=1
|
||||
|
||||
# helpers for COPY --from
|
||||
FROM ${GO_SRC} as go-src
|
||||
FROM ${JS_SRC} as js-src
|
||||
FROM ${GO_SRC} AS go-src
|
||||
FROM ${JS_SRC} AS js-src
|
||||
|
||||
# Final stage
|
||||
FROM ${BASE_IMAGE}
|
||||
@@ -131,19 +138,20 @@ RUN if grep -i -q alpine /etc/issue; then \
|
||||
fi
|
||||
|
||||
# glibc support for alpine x86_64 only
|
||||
# docker run --rm --env STDOUT=1 sgerrand/glibc-builder 2.40 /usr/glibc-compat > glibc-bin-2.40.tar.gz
|
||||
ARG GLIBC_VERSION=2.40
|
||||
|
||||
RUN if grep -i -q alpine /etc/issue && [ `arch` = "x86_64" ]; then \
|
||||
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
|
||||
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk \
|
||||
-O /tmp/glibc-2.35-r0.apk && \
|
||||
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-bin-2.35-r0.apk \
|
||||
-O /tmp/glibc-bin-2.35-r0.apk && \
|
||||
apk add --force-overwrite --no-cache /tmp/glibc-2.35-r0.apk /tmp/glibc-bin-2.35-r0.apk && \
|
||||
rm -f /lib64/ld-linux-x86-64.so.2 && \
|
||||
ln -s /usr/glibc-compat/lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 && \
|
||||
rm -f /tmp/glibc-2.35-r0.apk && \
|
||||
rm -f /tmp/glibc-bin-2.35-r0.apk && \
|
||||
rm -f /lib/ld-linux-x86-64.so.2 && \
|
||||
rm -f /etc/ld.so.cache; \
|
||||
wget -qO- "https://dl.grafana.com/glibc/glibc-bin-$GLIBC_VERSION.tar.gz" | tar zxf - -C / \
|
||||
usr/glibc-compat/lib/ld-linux-x86-64.so.2 \
|
||||
usr/glibc-compat/lib/libc.so.6 \
|
||||
usr/glibc-compat/lib/libdl.so.2 \
|
||||
usr/glibc-compat/lib/libm.so.6 \
|
||||
usr/glibc-compat/lib/libpthread.so.0 \
|
||||
usr/glibc-compat/lib/librt.so.1 \
|
||||
usr/glibc-compat/lib/libresolv.so.2 && \
|
||||
mkdir /lib64 && \
|
||||
ln -s /usr/glibc-compat/lib/ld-linux-x86-64.so.2 /lib64; \
|
||||
fi
|
||||
|
||||
COPY --from=go-src /tmp/grafana/conf ./conf
|
||||
|
||||
4
Makefile
4
Makefile
@@ -9,7 +9,7 @@ include .bingo/Variables.mk
|
||||
|
||||
|
||||
GO = go
|
||||
GO_VERSION = 1.22.4
|
||||
GO_VERSION = 1.23.7
|
||||
GO_FILES ?= ./pkg/... ./pkg/apiserver/... ./pkg/apimachinery/... ./pkg/promlib/...
|
||||
SH_FILES ?= $(shell find ./scripts -name *.sh)
|
||||
GO_RACE := $(shell [ -n "$(GO_RACE)" -o -e ".go-race-enabled-locally" ] && echo 1 )
|
||||
@@ -282,7 +282,7 @@ test: test-go test-js ## Run all tests.
|
||||
golangci-lint: $(GOLANGCI_LINT)
|
||||
@echo "lint via golangci-lint"
|
||||
$(GOLANGCI_LINT) run \
|
||||
--config .golangci.toml \
|
||||
--config .golangci.yml \
|
||||
$(GO_FILES)
|
||||
|
||||
.PHONY: lint-go
|
||||
|
||||
1
apps/.gitkeep
Normal file
1
apps/.gitkeep
Normal file
@@ -0,0 +1 @@
|
||||
# workaround for grafana-build quirk
|
||||
@@ -1175,6 +1175,9 @@ enabled =
|
||||
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
|
||||
disabled_orgs =
|
||||
|
||||
# Specify how long to wait for the alerting service to initialize
|
||||
initialization_timeout = 30s
|
||||
|
||||
# Specify the frequency of polling for admin config changes.
|
||||
# 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.
|
||||
admin_config_poll_interval = 60s
|
||||
@@ -1689,6 +1692,9 @@ ha_engine_address = "127.0.0.1:6379"
|
||||
# ha_engine_password allows setting an optional password to authenticate with the engine
|
||||
ha_engine_password = ""
|
||||
|
||||
# ha_prefix is a prefix for keys in the HA engine. It's used to separate keys for different Grafana instances.
|
||||
ha_prefix =
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
|
||||
|
||||
@@ -1101,6 +1101,9 @@
|
||||
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
|
||||
;disabled_orgs =
|
||||
|
||||
# Specify how long to wait for the alerting service to initialize
|
||||
;initialization_timeout = 30s
|
||||
|
||||
# Specify the frequency of polling for admin config changes.
|
||||
# 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.
|
||||
;admin_config_poll_interval = 60s
|
||||
@@ -1546,6 +1549,9 @@ max_annotations_to_keep =
|
||||
# ha_engine_password allows setting an optional password to authenticate with the engine
|
||||
;ha_engine_password = ""
|
||||
|
||||
# ha_prefix is a prefix for keys in the HA engine. It's used to separate keys for different Grafana instances.
|
||||
;ha_prefix =
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
mimir_backend:
|
||||
image: us.gcr.io/kubernetes-dev/mimir:santihernandezc-validate_grafana_am_config-1e903e462-WIP
|
||||
image: grafana/mimir-alpine:r295-a23e559
|
||||
container_name: mimir_backend
|
||||
command:
|
||||
- -target=backend
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
aks
|
||||
eror
|
||||
iam
|
||||
wan
|
||||
[Operato Windrose](https://grafana.com/grafana/plugins/operato-windrose-panel/)
|
||||
sergent
|
||||
@@ -6,6 +6,24 @@
|
||||
# [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes.
|
||||
# Changes are relevant to this script and the support docs.mk GNU Make interface.
|
||||
#
|
||||
# ## 8.1.0 (2024-08-22)
|
||||
#
|
||||
# ### Added
|
||||
#
|
||||
# - Additional website mounts for projects that use the website repository.
|
||||
#
|
||||
# Mounts are required for `make docs` to work in the website repository or with the website project.
|
||||
# The Makefile is also mounted for convenient development of the procedure that repository.
|
||||
#
|
||||
# ## 8.0.1 (2024-07-01)
|
||||
#
|
||||
# ### Fixed
|
||||
#
|
||||
# - Update log suppression to catch new format of website /docs/ homepage REF_NOT_FOUND warnings.
|
||||
#
|
||||
# These warnings are related to missing some pages during the build that are required for the /docs/ homepage.
|
||||
# They were previously suppressed but the log format changed and without this change they reappear in the latest builds.
|
||||
#
|
||||
# ## 8.0.0 (2024-05-28)
|
||||
#
|
||||
# ### Changed
|
||||
@@ -718,6 +736,9 @@ POSIX_HERESTRING
|
||||
|
||||
_repo="$(repo_path website)"
|
||||
volumes="--volume=${_repo}/config:/hugo/config:z"
|
||||
volumes="${volumes} --volume=${_repo}/content/guides:/hugo/content/guides:z"
|
||||
volumes="${volumes} --volume=${_repo}/content/whats-new:/hugo/content/whats-new:z"
|
||||
volumes="${volumes} --volume=${_repo}/Makefile:/hugo/Makefile:z"
|
||||
volumes="${volumes} --volume=${_repo}/layouts:/hugo/layouts:z"
|
||||
volumes="${volumes} --volume=${_repo}/scripts:/hugo/scripts:z"
|
||||
fi
|
||||
@@ -905,7 +926,7 @@ EOF
|
||||
-e '/Press Ctrl+C to stop/ d' \
|
||||
-e '/make/ d' \
|
||||
-e '/WARNING: The manual_mount source directory/ d' \
|
||||
-e '/docs\/_index.md .* not found/ d'
|
||||
-e '/"docs\/_index.md" not found/d'
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -23,26 +23,26 @@ title: Grafana documentation
|
||||
## Installing Grafana
|
||||
|
||||
<div class="nav-cards">
|
||||
<a href="{{< relref "setup-grafana/installation/debian/" >}}" class="nav-cards__item nav-cards__item--install">
|
||||
<a href="setup-grafana/installation/debian/" class="nav-cards__item nav-cards__item--install">
|
||||
<div class="nav-cards__icon fa fa-linux">
|
||||
</div>
|
||||
<h5>Install on Linux</h5>
|
||||
</a>
|
||||
<a href="{{< relref "setup-grafana/installation/mac/" >}}" class="nav-cards__item nav-cards__item--install">
|
||||
<a href="setup-grafana/installation/mac/" class="nav-cards__item nav-cards__item--install">
|
||||
<div class="nav-cards__icon fa fa-apple">
|
||||
</div>
|
||||
<h5>Install on macOS</h5>
|
||||
</a>
|
||||
<a href="{{< relref "setup-grafana/installation/windows/" >}}" class="nav-cards__item nav-cards__item--install">
|
||||
<a href="setup-grafana/installation/windows/" class="nav-cards__item nav-cards__item--install">
|
||||
<div class="nav-cards__icon fa fa-windows">
|
||||
</div>
|
||||
<h5>Install on Windows</h5>
|
||||
</a>
|
||||
<a href="{{< relref "setup-grafana/installation/docker/" >}}" class="nav-cards__item nav-cards__item--install">
|
||||
<a href="setup-grafana/installation/docker/" class="nav-cards__item nav-cards__item--install">
|
||||
<img src="/static/img/logos/logo-docker.svg">
|
||||
<h5>Run Docker image</h5>
|
||||
</a>
|
||||
<a href="{{< relref "setup-grafana/installation/kubernetes/" >}}" class="nav-cards__item nav-cards__item--install">
|
||||
<a href="setup-grafana/installation/kubernetes/" class="nav-cards__item nav-cards__item--install">
|
||||
<img src="/static/img/logos/logo-kubernetes.svg">
|
||||
<h5>Run on Kubernetes</h5>
|
||||
</a>
|
||||
@@ -61,28 +61,28 @@ title: Grafana documentation
|
||||
## Guides
|
||||
|
||||
<div class="nav-cards">
|
||||
<a href="{{< relref "getting-started/build-first-dashboard/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<a href="getting-started/build-first-dashboard/" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Getting started</h4>
|
||||
<p>Learn the basics of using Grafana.</p>
|
||||
</a>
|
||||
<a href="{{< relref "fundamentals/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<a href="fundamentals/" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Grafana fundamentals</h4>
|
||||
<p>Learn basic observability.</p>
|
||||
</a>
|
||||
<a href="{{< relref "setup-grafana/configure-grafana/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<a href="setup-grafana/configure-grafana/" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Configure Grafana</h4>
|
||||
<p>Review the configuration and setup options.</p>
|
||||
</a>
|
||||
<a href="{{< relref "fundamentals/timeseries/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<a href="fundamentals/timeseries/" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Intro to time series</h4>
|
||||
<p>Learn about time series data.</p>
|
||||
</a>
|
||||
<a href="{{< relref "administration/provisioning/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<a href="administration/provisioning/" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Provisioning</h4>
|
||||
<p>Learn how to automate your Grafana configuration.</p>
|
||||
</a>
|
||||
<a href="{{< relref "whatsnew/whats-new-in-v11-0/" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v11.0</h4>
|
||||
<a href="whatsnew/whats-new-in-v11-1/" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v11.1</h4>
|
||||
<p>Explore the features and enhancements in the latest release.</p>
|
||||
</a>
|
||||
|
||||
@@ -91,51 +91,51 @@ title: Grafana documentation
|
||||
## Data source guides
|
||||
|
||||
<div class="nav-cards">
|
||||
<a href="{{< relref "datasources/graphite/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/graphite/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_graphite.svg" >
|
||||
<h5>Graphite</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/elasticsearch/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/elasticsearch/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_elasticsearch.svg" >
|
||||
<h5>Elasticsearch</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/influxdb/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/influxdb/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_influxdb.svg" >
|
||||
<h5>InfluxDB</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/prometheus/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/prometheus/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_prometheus.svg" >
|
||||
<h5>Prometheus</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/google-cloud-monitoring/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/google-cloud-monitoring/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_cloudmonitoring.svg">
|
||||
<h5>Google Cloud Monitoring</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/aws-cloudwatch/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/aws-cloudwatch/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_cloudwatch.svg">
|
||||
<h5>AWS CloudWatch</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/azure-monitor/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/azure-monitor/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_azure_monitor.jpg">
|
||||
<h5>Azure Monitor</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/loki/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/loki/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_loki.svg">
|
||||
<h5>Loki</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/mysql/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/mysql/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_mysql.png" >
|
||||
<h5>MySQL</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/postgres/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/postgres/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_postgres.svg" >
|
||||
<h5>Postgres</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/mssql/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/mssql/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/sql_server_logo.svg">
|
||||
<h5>Microsoft SQL Server</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/opentsdb/" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="datasources/opentsdb/" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/static/img/docs/logos/icon_opentsdb.png" >
|
||||
<h5>OpenTSDB</h5>
|
||||
</a>
|
||||
|
||||
@@ -18,7 +18,7 @@ weight: 700
|
||||
# API keys
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Deprecated: [Service accounts]({{< relref "../service-accounts/" >}}) have replaced API keys as the primary way to authenticate applications that interact with Grafana.
|
||||
Deprecated: [Service accounts](../service-accounts/) have replaced API keys as the primary way to authenticate applications that interact with Grafana.
|
||||
{{% /admonition %}}
|
||||
|
||||
An API key is a randomly generated string that external systems use to interact with Grafana HTTP APIs.
|
||||
@@ -26,7 +26,7 @@ An API key is a randomly generated string that external systems use to interact
|
||||
When you create an API key, you specify a **Role** that determines the permissions associated with the API key. Role permissions control that actions the API key can perform on Grafana resources.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you use Grafana v9.1 or newer, use service accounts instead of API keys. For more information, refer to [Grafana service accounts]({{< relref "../service-accounts/" >}}).
|
||||
If you use Grafana v9.1 or newer, use service accounts instead of API keys. For more information, refer to [Grafana service accounts](../service-accounts/).
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< section >}}
|
||||
@@ -35,7 +35,7 @@ If you use Grafana v9.1 or newer, use service accounts instead of API keys. For
|
||||
|
||||
Create an API key when you want to manage your computed workload with a user.
|
||||
|
||||
This topic shows you how to create an API key using the Grafana UI. You can also create an API key using the Grafana HTTP API. For more information about creating API keys via the API, refer to [Create API key via API]({{< relref "../../developers/http_api/create-api-tokens-for-org/#how-to-create-a-new-organization-and-an-api-token" >}}).
|
||||
This topic shows you how to create an API key using the Grafana UI. You can also create an API key using the Grafana HTTP API. For more information about creating API keys via the API, refer to [Create API key via API](../../developers/http_api/create-api-tokens-for-org/#how-to-create-a-new-organization-and-an-api-token).
|
||||
|
||||
### Before you begin
|
||||
|
||||
@@ -45,11 +45,11 @@ To follow these instructions, you need at least one of the following:
|
||||
- Editor permissions
|
||||
- Service account writer
|
||||
|
||||
- To ensure you have permission to create and edit API keys, follow the instructions in [Roles and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
- To ensure you have permission to create and edit API keys, follow the instructions in [Roles and permissions](../roles-and-permissions/#).
|
||||
|
||||
### Steps
|
||||
|
||||
To create an API, complete the following steps:
|
||||
To create an API key, complete the following steps:
|
||||
|
||||
1. Sign in to Grafana.
|
||||
1. Click **Administration** in the left-side menu, **Users and access**, and select **API Keys**.
|
||||
@@ -67,12 +67,12 @@ To create an API, complete the following steps:
|
||||
|
||||
As an alternative to using API keys for authentication, you can use a service account-based authentication system. When compared to API keys, service accounts have limited scopes that provide more security than using API keys.
|
||||
|
||||
For more information about the benefits of service accounts, refer to [Grafana service account benefits]({{< relref "../service-accounts/#service-account-benefits" >}}).
|
||||
For more information about the benefits of service accounts, refer to [Grafana service account benefits](../service-accounts/#service-account-benefits).
|
||||
|
||||
The service account endpoints generate a machine user for authentication instead of using API keys. When you migrate an API key to a service account, a service account will be created with a service account token.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you're currently using API keys for authentication, we strongly recommend to use Grafana Service Accounts instead. Rest assured, when migrating to Service Accounts, your existing API keys will continue working as before. To find the migrated API keys, navigate to the Service Accounts section and select the Service Account Tokens tab. For more information, please refer to the [Grafana service account tokens]({{< relref "../service-accounts/#service-account-tokens" >}}) details.
|
||||
If you're currently using API keys for authentication, we strongly recommend to use Grafana Service Accounts instead. Rest assured, when migrating to Service Accounts, your existing API keys will continue working as before. To find the migrated API keys, navigate to the Service Accounts section and select the Service Account Tokens tab. For more information, please refer to the [Grafana service account tokens](../service-accounts/#service-account-tokens) details.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Ways of migrating API keys to service accounts
|
||||
@@ -99,7 +99,7 @@ To follow these instructions, you need at least one of the following:
|
||||
- Editor permissions
|
||||
- Service account writer
|
||||
|
||||
For more information about permissions, refer to [Roles and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
For more information about permissions, refer to [Roles and permissions](../roles-and-permissions/#).
|
||||
|
||||
#### Steps
|
||||
|
||||
@@ -120,7 +120,7 @@ To migrate a single API key to a service account, complete the following steps:
|
||||
|
||||
### Migrate API keys to Grafana service accounts for API calls
|
||||
|
||||
This section shows you how to migrate API keys to Grafana service accounts for Grafana API workflows. For references see: [Grafana Service Accounts for the Grafana API]({{< relref "../../developers/http_api/serviceaccount/#create-service-account" >}}).
|
||||
This section shows you how to migrate API keys to Grafana service accounts for Grafana API workflows. For references see: [Grafana Service Accounts for the Grafana API](../../developers/http_api/serviceaccount/#create-service-account).
|
||||
|
||||
#### Before you begin
|
||||
|
||||
|
||||
@@ -14,21 +14,21 @@ weight: 900
|
||||
|
||||
You can create interactive links for Explore visualizations to run queries related to presented data by setting up Correlations.
|
||||
|
||||
A correlation defines how data in one [data source]({{< relref "../../datasources" >}}) is used to query data in another data source.
|
||||
A correlation defines how data in one [data source](../../datasources/) is used to query data in another data source.
|
||||
Some examples:
|
||||
|
||||
- an application name returned in a logs data source can be used to query metrics related to that application in a metrics data source, or
|
||||
- a user name returned by an SQL data source can be used to query logs related to that particular user in a logs data source
|
||||
|
||||
[Explore]({{< relref "../../explore" >}}) takes user-defined correlations to display links inside the visualizations.
|
||||
You can click on a link to run the related query and see results in [Explore Split View]({{< relref "../../explore#split-and-compare" >}}).
|
||||
[Explore](../../explore/) takes user-defined correlations to display links inside the visualizations.
|
||||
You can click on a link to run the related query and see results in [Explore Split View](../../explore/#split-and-compare).
|
||||
|
||||
Explore visualizations that currently support showing links based on correlations:
|
||||
|
||||
- [Logs Panel]({{< relref "./use-correlations-in-visualizations#correlations-in-logs-panel">}})
|
||||
- [Table]({{< relref "./use-correlations-in-visualizations#correlations-in-table">}})
|
||||
- [Logs Panel](use-correlations-in-visualizations/#correlations-in-logs-panel)
|
||||
- [Table](use-correlations-in-visualizations/#correlations-in-table)
|
||||
|
||||
You can configure correlations using [provisioning]({{< relref "../provisioning" >}}), the **Administration > Plugins and data > Correlations** page in Grafana or directly in [Explore]({{< relref "../../explore/correlations-editor-in-explore" >}}).
|
||||
You can configure correlations using [provisioning](../provisioning/), the **Administration > Plugins and data > Correlations** page in Grafana or directly in [Explore](../../explore/correlations-editor-in-explore/).
|
||||
|
||||
## Example of how links work in Explore once set up
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ weight: 30
|
||||
|
||||
## Before you begin
|
||||
|
||||
Adding access to create correlations for [Viewers and Editors]({{< relref "../../../administration/roles-and-permissions" >}}) is available with [Role-based access control]({{< relref "../../../administration/roles-and-permissions/access-control" >}}).
|
||||
Adding access to create correlations for [Viewers and Editors](../../roles-and-permissions/) is available with [Role-based access control](../../roles-and-permissions/access-control/).
|
||||
|
||||
## Add permissions to create correlations
|
||||
|
||||
|
||||
@@ -29,13 +29,13 @@ Each correlation is configured with the following options:
|
||||
**Transformations**
|
||||
: Optional manipulations to the source data included passed to the target query
|
||||
|
||||
Learn how to create correlations using the [Administration page]({{< relref "./create-a-new-correlation#create-a-correlation-in-administration-page" >}}) or with [provisioning]({{< relref "./create-a-new-correlation#create-a-correlation-with-provisioning" >}}).
|
||||
Learn how to create correlations using the [Administration page](../create-a-new-correlation/#create-a-correlation-in-administration-page) or with [provisioning](../create-a-new-correlation/#create-a-correlation-with-provisioning).
|
||||
|
||||
## Source data source and result field
|
||||
|
||||
Links are shown in Explore visualizations for the results from the correlation’s source data source.
|
||||
A link is assigned to one of the fields from the result provided in the correlation configuration (the results field).
|
||||
Each visualization displays fields with links in a different way ([Correlations in Logs Panel]({{< relref "./use-correlations-in-visualizations#correlations-in-logs-panel">}}) and see [Correlations in Table]({{< relref "./use-correlations-in-visualizations#correlations-in-table">}})).
|
||||
Each visualization displays fields with links in a different way ([Correlations in Logs Panel](../use-correlations-in-visualizations/#correlations-in-logs-panel) and see [Correlations in Table](../use-correlations-in-visualizations/#correlations-in-table)).
|
||||
|
||||
## Target query
|
||||
|
||||
@@ -44,10 +44,10 @@ The target query is run when a link is clicked in the visualization. You can use
|
||||
### Correlation Variables
|
||||
|
||||
You can use variables inside the target query to access the source data related to the query.
|
||||
Correlations use [Grafana variable syntax]({{< relref "../../../dashboards/variables/variable-syntax" >}}).
|
||||
Correlations use [Grafana variable syntax](../../../dashboards/variables/variable-syntax/).
|
||||
Variables are filled with values from the source results when the link is clicked. There are two types of variables you can use:
|
||||
|
||||
- [field variables]({{< relref "../../../panels-visualizations/configure-data-links#field-variables" >}}) (allows to access field values and labels)
|
||||
- [field variables](../../../panels-visualizations/configure-data-links/#field-variables) (allows to access field values and labels)
|
||||
- correlation variables (allows to access field values and transformations)
|
||||
|
||||
Example: If source results contain a field called “employee”, the value of the field can be accessed with:
|
||||
@@ -57,9 +57,9 @@ Example: If source results contain a field called “employee”, the value of t
|
||||
|
||||
In addition to mapping field values to shorter variable names, more correlation variables can be created by applying transformations to existing fields
|
||||
|
||||
For more details, please see the example in [Use variables and transformations in a correlation]({{< relref "./use-variables-and-transformations" >}}).
|
||||
For more details, please see the example in [Use variables and transformations in a correlation](../use-variables-and-transformations/).
|
||||
|
||||
Correlation creates a data link only if all variables have values in the selected data row. [Global variables]({{< relref "/docs/grafana/latest/dashboards/variables/add-template-variables#global-variables" >}}) are exception to this rule and are not required to be filled in from the returned data. These variables are interpolated automatically by data sources.
|
||||
Correlation creates a data link only if all variables have values in the selected data row. [Global variables](/docs/grafana/latest/dashboards/variables/add-template-variables/#global-variables) are exception to this rule and are not required to be filled in from the returned data. These variables are interpolated automatically by data sources.
|
||||
|
||||
### Correlation Transformations
|
||||
|
||||
@@ -69,7 +69,7 @@ There are two types of transformations: logfmt and regular expression.
|
||||
|
||||
Each transformation uses a selected field value as the input. The output of a transformation is a set of new variables based on the type and options of the transformation.
|
||||
|
||||
For more details, please see the example in [Use variables and transformations in a correlation]({{< relref "./use-variables-and-transformations" >}}) for more details.
|
||||
For more details, please see the example in [Use variables and transformations in a correlation](../use-variables-and-transformations/) for more details.
|
||||
|
||||
### Logfmt transformation
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@ weight: 20
|
||||
|
||||
# Permissions
|
||||
|
||||
Users with [Viewer base role]({{< relref "../../../administration/roles-and-permissions" >}}) or with [datasources:query RBAC role]({{< relref "../../../administration/roles-and-permissions/access-control" >}}) can:
|
||||
Users with [Viewer base role](../../roles-and-permissions/) or with [datasources:query RBAC role](../../roles-and-permissions/access-control/) can:
|
||||
|
||||
- Use correlations in Explore’s visualizations.
|
||||
- List all available correlations in read-only mode.
|
||||
|
||||
Users with [Admin base role]({{< relref "../../../administration/roles-and-permissions" >}}) or with [datasources:write RBAC role]({{< relref "../../../administration/roles-and-permissions/access-control" >}}) can:
|
||||
Users with [Admin base role](../../roles-and-permissions/) or with [datasources:write RBAC role](../../roles-and-permissions/access-control/) can:
|
||||
|
||||
- Add, edit and delete correlations.
|
||||
|
||||
@@ -15,7 +15,7 @@ Make sure you have permission to add new correlations. Only users with write per
|
||||
|
||||
## Create a correlation in Explore's correlations editor
|
||||
|
||||
To learn more, refer to Explore's [documentation]({{< relref "../../../explore/correlations-editor-in-explore" >}}) about building correlations in Explore.
|
||||
To learn more, refer to Explore's [documentation](../../../explore/correlations-editor-in-explore/) about building correlations in Explore.
|
||||
|
||||
## Create a correlation in Administration page
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ weight: 70
|
||||
1. Open Explore.
|
||||
1. Select a data source that you chose as the source data source of the correlation.
|
||||
1. Run a query that results in data containing fields required to build variables in the target query.
|
||||
1. Links are added to cell rows in the column representing the field with the assigned link ([the results field]({{< relref "../correlation-configuration#source-data-source-and-result-field" >}}).
|
||||
1. Links are added to cell rows in the column representing the field with the assigned link ([the results field](../correlation-configuration/#source-data-source-and-result-field).
|
||||
1. Cells containing multiple links accessible with a context menu.
|
||||
|
||||
{{< figure src="/static/img/docs/correlations/correlations-in-table-10-0.png" max-width="600px" caption="Correlations links in table" >}}
|
||||
|
||||
@@ -73,7 +73,7 @@ Instructions below show how to set up a link that can run metrics query for the
|
||||
- Required correlation type (query)
|
||||
- Target query matching test data source model
|
||||
- “App metrics” correlation contains the following configuration:
|
||||
- Alias is set to ${application} variable (note that in provisioning files $ is used to access environment variables so it has to be [escaped]({{< relref "../../../administration/provisioning#using-environment-variables" >}})).
|
||||
- Alias is set to ${application} variable (note that in provisioning files $ is used to access environment variables so it has to be [escaped](../../provisioning/#using-environment-variables)).
|
||||
- Regular expression transformation is created to extract values from “msg” field
|
||||
- Regular expression transformation is used to capture the application name from the full name of the service stored in the log line.
|
||||
- The output of the transformation is mapped to a variable called “application”.
|
||||
|
||||
@@ -18,10 +18,10 @@ weight: 100
|
||||
# Data source management
|
||||
|
||||
Grafana supports many different storage backends for your time series data (data source).
|
||||
Refer to [data sources]({{< relref "../../datasources" >}}) for more information about using data sources in Grafana.
|
||||
Refer to [data sources](../../datasources/) for more information about using data sources in Grafana.
|
||||
Only users with the organization admin role can add data sources.
|
||||
|
||||
For links to data source-specific documentation, see [Data sources]({{< relref "../../datasources" >}}).
|
||||
For links to data source-specific documentation, see [Data sources](../../datasources/).
|
||||
|
||||
## Data source permissions
|
||||
|
||||
@@ -32,7 +32,7 @@ You can configure data source permissions to allow or deny certain users the abi
|
||||
- The `admin` permission allows users to query and edit the data source, change permissions on the data source and enable or disable query caching for the data source.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
By default, data sources in an organization can be queried by any user in that organization. For example, a user with the `Viewer` role can issue any possible query to a data source, not just queries that exist on dashboards to which they have access. Additionally, by default, data sources can be edited by the user who created the data source, as well as users with the `Admin` role.
|
||||
@@ -80,10 +80,10 @@ When you enable query and resource caching, Grafana temporarily stores the resul
|
||||
|
||||
When using Grafana, a query pertains to a request for data frames to be modified or displayed. A resource relates to any HTTP requests made by a plugin, such as the Amazon Timestream plugin requesting a list of available databases from AWS. For more information on data source queries and resources, please see the developers page on [backend plugins](/developers/plugin-tools/introduction/backend-plugins).
|
||||
|
||||
The caching feature works for **all** backend data sources. You can enable the cache globally in Grafana's [configuration]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}), and configure a cache duration (also called Time to Live, or TTL) for each data source individually.
|
||||
The caching feature works for **all** backend data sources. You can enable the cache globally in Grafana's [configuration](../../setup-grafana/configure-grafana/enterprise-configuration/#caching), and configure a cache duration (also called Time to Live, or TTL) for each data source individually.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud/).
|
||||
Available in [Grafana Enterprise](../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud/).
|
||||
{{% /admonition %}}
|
||||
|
||||
The following cache backend options are available: in-memory, Redis, and Memcached.
|
||||
@@ -94,9 +94,9 @@ Storing cached queries in-memory can increase Grafana's memory footprint. In pro
|
||||
|
||||
When a panel queries a data source with cached data, it will either fetch fresh data or use cached data depending on the panel's **interval.** The interval is used to round the query time range to a nearby cached time range, increasing the likelihood of cache hits. Therefore, wider panels and dashboards with shorter time ranges fetch new data more often than narrower panels and dashboards with longer time ranges.
|
||||
|
||||
A panel's interval is visible in the [query options]({{< relref "../../panels-visualizations/query-transform-data/" >}}). It is calculated as follows: `time range / max data points`. Max data points are calculated based on the width of the panel. For example, a wide panel with `1000 data points` on a dashboard with a time range of `last 7 days` will retrieve fresh data every 10 minutes: `7d / 1000 = 10m`. In this example, cached data for this panel will be served for up to 10 minutes before Grafana needs to query the data source again for new data.
|
||||
A panel's interval is visible in the [query options](../../panels-visualizations/query-transform-data/). It is calculated as follows: `time range / max data points`. Max data points are calculated based on the width of the panel. For example, a wide panel with `1000 data points` on a dashboard with a time range of `last 7 days` will retrieve fresh data every 10 minutes: `7d / 1000 = 10m`. In this example, cached data for this panel will be served for up to 10 minutes before Grafana needs to query the data source again for new data.
|
||||
|
||||
You can configure a panel to retrieve data more often by increasing the **Max data points** setting in the panel's [query options]({{< relref "../../panels-visualizations/query-transform-data/" >}}).
|
||||
You can configure a panel to retrieve data more often by increasing the **Max data points** setting in the panel's [query options](../../panels-visualizations/query-transform-data/).
|
||||
|
||||
### Caching benefits
|
||||
|
||||
@@ -108,7 +108,7 @@ By reducing the number of queries and requests sent to data sources, caching can
|
||||
|
||||
### Data sources that work with query caching
|
||||
|
||||
Query caching works for Grafana's [built-in data sources]({{< relref "../../datasources/#built-in-core-data-sources" >}}), and [backend data source plugins](https://grafana.com/grafana/plugins/?type=datasource) that extend the `DataSourceWithBackend` class in the plugins SDK.
|
||||
Query caching works for Grafana's [built-in data sources](../../datasources/#built-in-core-data-sources), and [backend data source plugins](https://grafana.com/grafana/plugins/?type=datasource) that extend the `DataSourceWithBackend` class in the plugins SDK.
|
||||
|
||||
To verify that a data source works with query caching, follow the [instructions below](#enable-and-configure-query-caching) to **Enable and Configure query caching**. If caching is enabled in Grafana but the Caching tab is not visible for the given data source, then query caching is not available for that data source.
|
||||
|
||||
@@ -118,7 +118,7 @@ Some data sources, such as Elasticsearch, Prometheus, and Loki, cache queries th
|
||||
|
||||
### Enable and configure query caching
|
||||
|
||||
You must be an Org admin or Grafana admin to enable query caching for a data source. For more information on Grafana roles and permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/" >}}).
|
||||
You must be an Org admin or Grafana admin to enable query caching for a data source. For more information on Grafana roles and permissions, refer to [About users and permissions](../roles-and-permissions/).
|
||||
|
||||
By default, data source queries are not cached. To enable query caching for a single data source:
|
||||
|
||||
@@ -137,7 +137,7 @@ You can optionally override a data source's configured TTL for individual dashbo
|
||||
If query caching is enabled and the Cache tab is not visible in a data source's settings, then query caching is not available for that data source.
|
||||
{{% /admonition %}}
|
||||
|
||||
To configure global settings for query caching, refer to the `caching` section of [Configure Grafana Enterprise]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#caching" >}}).
|
||||
To configure global settings for query caching, refer to the `caching` section of [Configure Grafana Enterprise](../../setup-grafana/configure-grafana/enterprise-configuration/#caching).
|
||||
|
||||
### Disable query caching
|
||||
|
||||
@@ -148,7 +148,7 @@ To disable query caching for a single data source:
|
||||
1. In the data source list, click the data source that you want to turn off caching for.
|
||||
1. On the Cache tab, click **Disable**.
|
||||
|
||||
To disable query caching for an entire Grafana instance, set the `enabled` flag to `false` in the `caching` section of [Configure Grafana Enterprise]({{< 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.
|
||||
To disable query caching for an entire Grafana instance, set the `enabled` flag to `false` in the `caching` section of [Configure Grafana Enterprise](../../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.
|
||||
|
||||
### Clear cache
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ weight: 250
|
||||
|
||||
Team LBAC is available in private preview on Grafana Cloud for Loki created with basic authentication. Loki datasources for Team LBAC can only be created, provisioning is currently not available.
|
||||
|
||||
You cannot configure LBAC rules for Grafana-provisioned data sources from the UI. Alternatively, you can replicate the setting of the provisioned data source in a new data source as described in [LBAC Configuration for New Loki Data Source](https://grafana.com/docs/grafana/latest/administration/data-source-management/teamlbac/configure-teamlbac-for-loki/#task-1-lbac-configuration-for-new-loki-data-source) and then add the LBAC configuration to the new data source.
|
||||
|
||||
## Before you begin
|
||||
|
||||
To be able to use Team LBAC rules, you need to enable the feature toggle `teamHttpHeaders` on your Grafana instance. Contact support to enable the feature toggle for you.
|
||||
@@ -42,4 +44,4 @@ We recommend that you remove all permissions for roles and teams that are not re
|
||||
1. Navigate to Data Source Permissions
|
||||
- Go to the permissions tab of the newly created Loki data source. Here, you'll find the Team LBAC rules section.
|
||||
|
||||
For more information on how to setup Team LBAC rules for a Loki data source, [Add Team LBAC rules]({{< relref "./../create-teamlbac-rules/" >}}).
|
||||
For more information on how to setup Team LBAC rules for a Loki data source, refer to [Create Team LBAC rules for the Loki data source](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/administration/data-source-management/teamlbac/create-teamlbac-rules/).
|
||||
|
||||
@@ -23,11 +23,11 @@ weight: 500
|
||||
|
||||
# Grafana Enterprise license
|
||||
|
||||
When you become a Grafana Enterprise customer, you gain access to Grafana's premium observability features, including enterprise data source plugins, reporting, and role-based access control. In order to use these [enhanced features of Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise" >}}), you must purchase and activate a Grafana Enterprise license.
|
||||
When you become a Grafana Enterprise customer, you gain access to Grafana's premium observability features, including enterprise data source plugins, reporting, and role-based access control. In order to use these [enhanced features of Grafana Enterprise](../../introduction/grafana-enterprise/), you must purchase and activate a Grafana Enterprise license.
|
||||
|
||||
To purchase a license directly from Grafana Labs, [Contact a Grafana Labs representative](/contact?about=grafana-enterprise). To activate an Enterprise license purchased from Grafana Labs, refer to [Activate an Enterprise license]({{< relref "#activate-an-enterprise-license" >}}).
|
||||
To purchase a license directly from Grafana Labs, [Contact a Grafana Labs representative](/contact?about=grafana-enterprise). To activate an Enterprise license purchased from Grafana Labs, refer to [Activate an Enterprise license](#activate-an-enterprise-license).
|
||||
|
||||
You can also purchase a Grafana Enterprise license through the AWS Marketplace. To learn more about activating a license purchased through AWS, refer to [Activate a Grafana Enterprise license purchased through AWS Marketplace]({{< relref "./activate-aws-marketplace-license/" >}}).
|
||||
You can also purchase a Grafana Enterprise license through the AWS Marketplace. To learn more about activating a license purchased through AWS, refer to [Activate a Grafana Enterprise license purchased through AWS Marketplace](activate-aws-marketplace-license/).
|
||||
|
||||
{{< section >}}
|
||||
|
||||
@@ -94,9 +94,9 @@ environment variable.
|
||||
|
||||
### Step 3. Ensure that the license file's root URL matches the root_url configuration option
|
||||
|
||||
Update the [`root_url`]({{< relref "../../setup-grafana/configure-grafana/#root_url" >}}) in your configuration. It should be the URL that users type in their browsers to access the frontend, not the node hostname(s).
|
||||
Update the [`root_url`](../../setup-grafana/configure-grafana/#root_url) in your configuration. It should be the URL that users type in their browsers to access the frontend, not the node hostname(s).
|
||||
|
||||
This is important, because as part of the validation checks at startup, Grafana compares the license URL to the [`root_url`]({{< relref "../../setup-grafana/configure-grafana/#root_url" >}}) in your configuration.
|
||||
This is important, because as part of the validation checks at startup, Grafana compares the license URL to the [`root_url`](../../setup-grafana/configure-grafana/#root_url) in your configuration.
|
||||
|
||||
In your configuration file:
|
||||
|
||||
@@ -113,7 +113,7 @@ GF_SERVER_ROOT_URL=https://grafana.example.com/
|
||||
|
||||
### Step 4. Restart Grafana
|
||||
|
||||
To finalize the installation of Grafana Enterprise, restart Grafana to enable all Grafana Enterprise features. Refer to [restart Grafana]({{< relref "../../setup-grafana/start-restart-grafana/" >}}) for more information.
|
||||
To finalize the installation of Grafana Enterprise, restart Grafana to enable all Grafana Enterprise features. Refer to [restart Grafana](../../setup-grafana/start-restart-grafana/) for more information.
|
||||
|
||||
## License expiration
|
||||
|
||||
@@ -123,7 +123,7 @@ If your license has expired, most of Grafana keeps working as normal. Some enter
|
||||
|
||||
### Update your license
|
||||
|
||||
1. Locate your current `license.jwt` file. In a standard installation it is stored inside the Grafana data directory, which on a typical Linux installation is in `/var/lib/grafana/data`. This location might be overridden in the ini file [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}).
|
||||
1. Locate your current `license.jwt` file. In a standard installation it is stored inside the Grafana data directory, which on a typical Linux installation is in `/var/lib/grafana/data`. This location might be overridden in the ini file [Configuration](../../setup-grafana/configure-grafana/).
|
||||
|
||||
```ini
|
||||
[enterprise]
|
||||
@@ -135,7 +135,7 @@ If your license has expired, most of Grafana keeps working as normal. Some enter
|
||||
2. Log in to your [Grafana Cloud Account](/login) and make sure you're in the correct organization in the dropdown at the top of the page.
|
||||
3. Under the **Grafana Enterprise** section in the menu bar to the left, choose licenses and download the currently valid license with which you want to run Grafana. If you cannot see a valid license on Grafana.com, please contact your account manager at Grafana Labs to renew your subscription.
|
||||
4. Replace the current `license.jwt`-file with the one you've just downloaded.
|
||||
5. [Restart Grafana]({{< relref "../../setup-grafana/start-restart-grafana/" >}}).
|
||||
5. [Restart Grafana](../../setup-grafana/start-restart-grafana/).
|
||||
|
||||
### If your license expires
|
||||
|
||||
@@ -244,11 +244,11 @@ Your license is controlled by the following rules:
|
||||
|
||||
**License expiration date:** The license includes an expiration date, which is the date when a license becomes inactive.
|
||||
|
||||
As the license expiration date approaches, you will see a banner in Grafana that encourages you to renew. To learn about how to renew your license and what happens in Grafana when a license expires, refer to [License expiration]({{< relref "#license-expiration" >}}).
|
||||
As the license expiration date approaches, you will see a banner in Grafana that encourages you to renew. To learn about how to renew your license and what happens in Grafana when a license expires, refer to [License expiration](#license-expiration).
|
||||
|
||||
**Grafana License URL:** Your license does not work with an instance of Grafana with a different root URL.
|
||||
|
||||
The License URL is the complete URL of your Grafana instance, for example `https://grafana.your-company.com/`. It is defined in the [root_url]({{< relref "../../setup-grafana/configure-grafana/#root_url" >}}) configuration setting.
|
||||
The License URL is the complete URL of your Grafana instance, for example `https://grafana.your-company.com/`. It is defined in the [root_url](../../setup-grafana/configure-grafana/#root_url) configuration setting.
|
||||
|
||||
**Concurrent sessions limit**: As of Grafana Enterprise 7.5, users can initiate up to three concurrent sessions of Grafana.
|
||||
|
||||
@@ -260,10 +260,10 @@ When a user reaches the session limit, the fourth connection succeeds and the lo
|
||||
|
||||
You can request Grafana Labs to activate usage billing which allows an unlimited number of active users. When usage billing is enabled, Grafana does not enforce active user limits or display warning banners. Instead, you are charged for active users that exceed the limit, according to your customer contract.
|
||||
|
||||
Usage billing involves a contractual agreement between you and Grafana Labs, and it is only available if Grafana Enterprise is configured to [automatically refresh its license token]({{< relref "../../setup-grafana/configure-grafana/enterprise-configuration/#auto_refresh_license" >}}).
|
||||
Usage billing involves a contractual agreement between you and Grafana Labs, and it is only available if Grafana Enterprise is configured to [automatically refresh its license token](../../setup-grafana/configure-grafana/enterprise-configuration/#auto_refresh_license).
|
||||
|
||||
### Request a change to your license
|
||||
|
||||
To increase the number of licensed users within Grafana, extend a license, or change your licensed URL, contact [Grafana support](/profile/org#support) or your Grafana Labs account team. They will update your license, which you can activate from within Grafana.
|
||||
|
||||
For instructions about how to activate your license after it is updated, refer to [Activate an Enterprise license]({{< relref "#activate-an-enterprise-license" >}}).
|
||||
For instructions about how to activate your license after it is updated, refer to [Activate an Enterprise license](#activate-an-enterprise-license).
|
||||
|
||||
@@ -30,7 +30,7 @@ You can deploy Grafana Enterprise in the following ways:
|
||||
- Using AWS services like ECS, EKS or EC2.
|
||||
- In an instance outside AWS.
|
||||
|
||||
In each case, you must activate the Grafana Enterprise license purchased in AWS Marketplace to take advantage of Grafana Enterprise observability features. Grafana Enterprise licenses purchased through AWS Marketplace are subject to the same [restrictions]({{< relref "../#license-restrictions" >}}) as Grafana Enterprise licensed purchased directly from Grafana Labs.
|
||||
In each case, you must activate the Grafana Enterprise license purchased in AWS Marketplace to take advantage of Grafana Enterprise observability features. Grafana Enterprise licenses purchased through AWS Marketplace are subject to the same [restrictions](../#license-restrictions) as Grafana Enterprise licensed purchased directly from Grafana Labs.
|
||||
|
||||
> To purchase a license directly from Grafana Labs or learn more about other Grafana offerings, [Contact a Grafana Labs representative](/contact?about=grafana-enterprise).
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ Grafana requires that you configure a database to hold dashboards, users, and ot
|
||||
### Before you begin
|
||||
|
||||
- Ensure that you have a supported Grafana database available.
|
||||
- For a list of supported databases, refer to [Supported databases]({{< relref "../../../../setup-grafana/installation/#supported-databases" >}}).
|
||||
- For a list of supported databases, refer to [Supported databases](../../../../setup-grafana/installation/#supported-databases).
|
||||
- For information about creating a database, refer to [Creating an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateDBInstance.html).
|
||||
- Review the information required to connect to the RDS DB instance. For more information, refer to [Connecting to an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_CommonTasks.Connect.html).
|
||||
|
||||
@@ -56,7 +56,7 @@ To configure Grafana for high availability:
|
||||
|
||||
1. In AWS ECS, use environment variables to update the `database` parameters.
|
||||
|
||||
For a list of database parameters, refer to [Configuration]({{< relref "../../../../setup-grafana/configure-grafana/#database" >}}).
|
||||
For a list of database parameters, refer to [Configuration](../../../../setup-grafana/configure-grafana/#database).
|
||||
|
||||
1. Create a revision of the task definition for the ECS Task that runs Grafana Enterprise.
|
||||
|
||||
@@ -114,4 +114,4 @@ In this task you configure Grafana Enterprise to validate the license with AWS i
|
||||
1. To restart Grafana and activate your license, update the service running Grafana to use the latest revision of the task definition that you created.
|
||||
1. After you update the service, navigate to your Grafana instance, sign in with Grafana Admin credentials, and navigate to **Administration > General > Stats and license** to validate that your license is active.
|
||||
|
||||
For more information about validating that your license is active, refer to [Grafana Enterprise license restrictions]({{< relref "../../#grafana-enterprise-license-restrictions" >}}).
|
||||
For more information about validating that your license is active, refer to [Grafana Enterprise license restrictions](../../#grafana-enterprise-license-restrictions).
|
||||
|
||||
@@ -50,7 +50,7 @@ Grafana requires that you configure a database to hold dashboards, users, and ot
|
||||
### Before you begin
|
||||
|
||||
- Ensure that you have a supported Grafana database available.
|
||||
- For a list of supported databases, refer to [Supported databases]({{< relref "../../../../setup-grafana/installation/#supported-databases" >}}).
|
||||
- For a list of supported databases, refer to [Supported databases](../../../../setup-grafana/installation/#supported-databases).
|
||||
- For information about creating a database, refer to [Creating an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateDBInstance.html).
|
||||
- Review the information required to connect to the RDS DB instance. For more information, refer to [Connecting to an Amazon RDS DB instance](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_CommonTasks.Connect.html).
|
||||
|
||||
@@ -82,7 +82,7 @@ To configure Grafana for high availability, choose **one** of the following opti
|
||||
value: [database password]
|
||||
```
|
||||
|
||||
For more information on Grafana High Availability setup, refer to [Set up Grafana for high availability]({{< relref "../../../../setup-grafana/set-up-for-high-availability/" >}}).
|
||||
For more information on Grafana High Availability setup, refer to [Set up Grafana for high availability](../../../../setup-grafana/set-up-for-high-availability/).
|
||||
|
||||
## Task 3: Configure Grafana Enterprise to validate its license with AWS
|
||||
|
||||
@@ -99,7 +99,7 @@ In this task, you configure Grafana Enterprise to validate the license with AWS
|
||||
|
||||
For more information about AWS license permissions, refer to [Actions, resources, and condition keys for AWS License Manager](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awslicensemanager.html).
|
||||
|
||||
1. Choose **one** of the following options to update the [license_validation_type]({{< relref "../../../../setup-grafana/configure-grafana/enterprise-configuration/#license_validation_type" >}}) configuration to `aws`:
|
||||
1. Choose **one** of the following options to update the [license_validation_type](../../../../setup-grafana/configure-grafana/enterprise-configuration/#license_validation_type) configuration to `aws`:
|
||||
|
||||
- **Option 1:** Use `kubectl edit configmap grafana` to edit `grafana.ini` add the following section to the configuration:
|
||||
|
||||
@@ -125,6 +125,6 @@ To restart Grafana on a Kubernetes cluster,
|
||||
|
||||
1. After you update the service, navigate to your Grafana instance, sign in with Grafana Admin credentials, and navigate to **Administration > General > Stats and license** to validate that your license is active.
|
||||
|
||||
For more information about restarting Grafana, refer to [Restart Grafana]({{< relref "../../../../setup-grafana/start-restart-grafana/" >}}).
|
||||
For more information about restarting Grafana, refer to [Restart Grafana](../../../../setup-grafana/start-restart-grafana/).
|
||||
|
||||
> If you experience issues when you update the EKS cluster, refer to [Amazon EKS troubleshooting](https://docs.aws.amazon.com/eks/latest/userguide/troubleshooting.html).
|
||||
|
||||
@@ -35,9 +35,9 @@ To activate a Grafana Enterprise license from AWS on a Grafana Enterprise instan
|
||||
|
||||
To install Grafana, refer to the documentation specific to your implementation.
|
||||
|
||||
- [Install Grafana]({{< relref "../../../../setup-grafana/installation/" >}}).
|
||||
- [Run Grafana Docker image]({{< relref "../../../../setup-grafana/installation/docker/" >}}).
|
||||
- [Deploy Grafana on Kubernetes]({{< relref "../../../../setup-grafana/installation/kubernetes/#deploy-grafana-enterprise-on-kubernetes" >}}).
|
||||
- [Install Grafana](../../../../setup-grafana/installation/).
|
||||
- [Run Grafana Docker image](../../../../setup-grafana/installation/docker/).
|
||||
- [Deploy Grafana on Kubernetes](../../../../setup-grafana/installation/kubernetes/#deploy-grafana-enterprise-on-kubernetes).
|
||||
|
||||
## Task 2: Create an AWS IAM user with access to your Grafana Enterprise license
|
||||
|
||||
@@ -110,7 +110,7 @@ To retrieve your license, Grafana Enterprise requires access to your AWS account
|
||||
|
||||
In this task you configure Grafana Enterprise to validate the license with AWS instead of Grafana Labs.
|
||||
|
||||
Choose one of the following options to update the [license_validation_type]({{< relref "../../../../setup-grafana/configure-grafana/enterprise-configuration/#license_validation_type" >}}) configuration to `aws`:
|
||||
Choose one of the following options to update the [license_validation_type](../../../../setup-grafana/configure-grafana/enterprise-configuration/#license_validation_type) configuration to `aws`:
|
||||
|
||||
- **Option 1:** In the `[enterprise]` section of the grafana.ini configuration file, add `license_validation_type=aws`.
|
||||
|
||||
@@ -131,4 +131,4 @@ Choose one of the following options to update the [license_validation_type]({{<
|
||||
|
||||
To activate Grafana Enterprise features, start (or restart) Grafana.
|
||||
|
||||
For information about restarting Grafana, refer to [Restart Grafana]({{< relref "../../../../setup-grafana/start-restart-grafana/" >}}).
|
||||
For information about restarting Grafana, refer to [Restart Grafana](../../../../setup-grafana/start-restart-grafana/).
|
||||
|
||||
@@ -42,4 +42,4 @@ You can use AWS Marketplace to make the following modifications to your Grafana
|
||||
|
||||
This action retrieves updated license information from AWS.
|
||||
|
||||
> To learn more about licensing and active users, refer to [Activate a Grafana Enterprise license purchased through AWS Marketplace]({{< relref "../" >}}).
|
||||
> To learn more about licensing and active users, refer to [Activate a Grafana Enterprise license purchased through AWS Marketplace](../).
|
||||
|
||||
@@ -19,7 +19,7 @@ For detailed information about particular features and how they operate, refer t
|
||||
## Manage feature toggles
|
||||
|
||||
In the **Administration** page, the **Feature Management** section enables authorized users to view and edit the various features that are active in their Grafana environment.
|
||||
Authorized users include administrators, and users with the [fixed roles]({{< relref "../roles-and-permissions/access-control#fixed-roles" >}}) `featuremgmt.read` and `featuremgmt.write`.
|
||||
Authorized users include administrators, and users with the [fixed roles](../roles-and-permissions/access-control/#fixed-roles) `featuremgmt.read` and `featuremgmt.write`.
|
||||
|
||||
There are different options for visibility and customization depending on the development stage of the feature.
|
||||
|
||||
@@ -50,6 +50,8 @@ To edit a feature toggle, follow these steps:
|
||||
1. Navigate to the list of feature toggles and select your feature state overrides.
|
||||
1. Click **Save changes** and wait for your Grafana instance to restart with the updated feature toggles.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
{{< admonition type="note" >}}
|
||||
If you don't have the feature toggle management page, enable the `featureToggleAdminPage` feature toggle.
|
||||
|
||||
Editing feature toggles with the feature toggle management page is available now in all tiers of [Grafana Cloud](/docs/grafana-cloud/).
|
||||
{{% /admonition %}}
|
||||
{{< /admonition >}}
|
||||
|
||||
@@ -46,7 +46,7 @@ The following table summarizes the resources you can share and/or isolate using
|
||||
|
||||
The member of one organization cannot view dashboards assigned to another organization. However, a user can belong to multiple organizations.
|
||||
|
||||
Grafana Server Administrators are responsible for creating organizations. For more information about the Grafana Server Administrator role, refer to [Grafana server administrators]({{< relref "../roles-and-permissions/#grafana-server-administrators" >}}).
|
||||
Grafana Server Administrators are responsible for creating organizations. For more information about the Grafana Server Administrator role, refer to [Grafana server administrators](../roles-and-permissions/#grafana-server-administrators).
|
||||
|
||||
## View a list of organizations
|
||||
|
||||
@@ -80,9 +80,9 @@ Create an organization when you want to isolate dashboards and other resources f
|
||||
|
||||
1. In the Preferences section, select a home dashboard, time zone, and week start.
|
||||
|
||||
For more information about preferences, refer to [Preferences]({{< relref "../organization-preferences/" >}}).
|
||||
For more information about preferences, refer to [Preferences](../organization-preferences/).
|
||||
|
||||
For more information about adding users to an organization, refer to [Add a user to an organization]({{< relref "../user-management/server-user-management/add-remove-user-to-org/" >}}).
|
||||
For more information about adding users to an organization, refer to [Add a user to an organization](../user-management/server-user-management/add-remove-user-to-org/).
|
||||
|
||||
## Delete an organization
|
||||
|
||||
|
||||
@@ -20,9 +20,9 @@ Grafana preferences are basic settings. They control the Grafana UI theme, home
|
||||
|
||||
Preferences are sometimes confusing because they can be set at four different levels, listed from highest level to lowest:
|
||||
|
||||
- **Server -** Affects all users on the Grafana server. Set by a [Grafana server admin]({{< relref "../roles-and-permissions/#grafana-server-administrators" >}}).
|
||||
- **Organization -** Affects all users in an organization. Set by an [Organization admin]({{< relref "../roles-and-permissions/#organization-roles" >}}).
|
||||
- **Team -** Affects all users assigned to a team. Set by an Organization Admin or Team Admin. To learn more about these roles, refer to [Teams and permissions]({{< relref "../roles-and-permissions/#teams-and-permissions" >}}).
|
||||
- **Server -** Affects all users on the Grafana server. Set by a [Grafana server admin](../roles-and-permissions/#grafana-server-administrators).
|
||||
- **Organization -** Affects all users in an organization. Set by an [Organization admin](../roles-and-permissions/#organization-roles).
|
||||
- **Team -** Affects all users assigned to a team. Set by an Organization Admin or Team Admin. To learn more about these roles, refer to [Teams and permissions](../roles-and-permissions/#teams-and-permissions).
|
||||
- **User account -** Affects the individual user. Set by the user on their own account.
|
||||
|
||||
The lowest level always takes precedence. For example, if a user sets their theme to **Light**, then their visualization of Grafana displays the light theme. Nothing at any higher level can override that.
|
||||
@@ -33,7 +33,7 @@ If the user is aware of the change and intended it, then that's great! But if th
|
||||
|
||||
In Grafana, you can change your names and emails associated with groups or accounts in the Settings or Preferences. This topic provides instructions for each task.
|
||||
|
||||
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions]({{< relref "../roles-and-permissions/" >}}).
|
||||
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions](../roles-and-permissions/).
|
||||
|
||||
### Change organization name
|
||||
|
||||
@@ -75,13 +75,13 @@ To change the team name or email, follow these steps:
|
||||
|
||||
### Change user name or email
|
||||
|
||||
To learn how to edit your user information, refer to [Edit your profile]({{< relref "../user-management/user-preferences/#edit-your-profile" >}}).
|
||||
To learn how to edit your user information, refer to [Edit your profile](../user-management/user-preferences/#edit-your-profile).
|
||||
|
||||
## Change Grafana UI theme
|
||||
|
||||
In Grafana, you can modify the UI theme configured in the Settings or Preferences. Set the UI theme for the server, an organization, a team, or your personal user account using the instructions in this topic.
|
||||
|
||||
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions]({{< relref "../roles-and-permissions/" >}}).
|
||||
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions](../roles-and-permissions/).
|
||||
|
||||
### Theme options
|
||||
|
||||
@@ -105,9 +105,9 @@ Here is an example of the light theme.
|
||||
|
||||
### Change server UI theme
|
||||
|
||||
As a Grafana server administrator, you can change the default Grafana UI theme for all users who are on the server by setting the [default_theme]({{< relref "../../setup-grafana/configure-grafana/#default_theme" >}}) option in the Grafana configuration file.
|
||||
As a Grafana server administrator, you can change the default Grafana UI theme for all users who are on the server by setting the [default_theme](../../setup-grafana/configure-grafana/#default_theme) option in the Grafana configuration file.
|
||||
|
||||
To see what the current settings are, refer to [View server settings]({{< relref "../stats-and-license#view-server-settings" >}}).
|
||||
To see what the current settings are, refer to [View server settings](../stats-and-license/#view-server-settings).
|
||||
|
||||
### Change organization UI theme
|
||||
|
||||
@@ -141,11 +141,11 @@ You can change the UI theme for your user account. This setting overrides UI the
|
||||
|
||||
By default, Grafana uses the timezone in your web browser. However, you can override this setting at the server, organization, team, or individual user level. This topic provides instructions for each task.
|
||||
|
||||
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions]({{< relref "../roles-and-permissions/" >}}).
|
||||
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions](../roles-and-permissions/).
|
||||
|
||||
### Set server timezone
|
||||
|
||||
Grafana server administrators can choose a default timezone for all users on the server by setting the [default_timezone]({{< relref "../../setup-grafana/configure-grafana/#default_timezone" >}}) option in the Grafana configuration file.
|
||||
Grafana server administrators can choose a default timezone for all users on the server by setting the [default_timezone](../../setup-grafana/configure-grafana/#default_timezone) option in the Grafana configuration file.
|
||||
|
||||
### Set organization timezone
|
||||
|
||||
@@ -179,7 +179,7 @@ You can change the timezone for your user account. This setting overrides timezo
|
||||
|
||||
The home dashboard you set is the one all users will see by default when they log in. Click the Grafana icon or **Home** in the breadcrumb to return to it. You can set the home dashboard for the server, an organization, a team, or your personal user account. This topic provides instructions for each task.
|
||||
|
||||
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions]({{< relref "../roles-and-permissions/" >}}).
|
||||
Some tasks require certain permissions. For more information about roles, refer to [Roles and permissions](../roles-and-permissions/).
|
||||
|
||||
### Set the home dashboard for the server
|
||||
|
||||
@@ -194,7 +194,7 @@ Users with the Grafana Server Admin flag on their account or access to the confi
|
||||
#### Use a JSON file as the home dashboard
|
||||
|
||||
1. Save your JSON file somewhere that Grafana can access it. For example, in the Grafana `data` folder of Grafana.
|
||||
1. Update your configuration file to set the path to the JSON file. Refer to [default_home_dashboard_path]({{< relref "../../setup-grafana/configure-grafana/#default_home_dashboard_path" >}}) for more information about modifying the Grafana configuration files.
|
||||
1. Update your configuration file to set the path to the JSON file. Refer to [default_home_dashboard_path](../../setup-grafana/configure-grafana/#default_home_dashboard_path) for more information about modifying the Grafana configuration files.
|
||||
|
||||
```ini
|
||||
[dashboards]
|
||||
@@ -244,7 +244,7 @@ You can choose your own personal home dashboard. This setting overrides all home
|
||||
|
||||
### Change server language
|
||||
|
||||
Grafana server administrators can change the default Grafana UI language for all users on the server by setting the [default_language]({{< relref "../../setup-grafana/configure-grafana/#default_language" >}}) option in the Grafana configuration file.
|
||||
Grafana server administrators can change the default Grafana UI language for all users on the server by setting the [default_language](../../setup-grafana/configure-grafana/#default_language) option in the Grafana configuration file.
|
||||
|
||||
### Change organization language
|
||||
|
||||
|
||||
@@ -56,17 +56,17 @@ Use app plugins when you want an out-of-the-box monitoring experience.
|
||||
|
||||
### Managing access for app plugins
|
||||
|
||||
Customize access to app plugins with [RBAC]({{< relref "../roles-and-permissions/access-control/#about-rbac" >}}).
|
||||
Customize access to app plugins with [RBAC](../roles-and-permissions/access-control/#about-rbac).
|
||||
|
||||
By default, the Viewer, Editor and Admin roles have access to all app plugins that their Organization role allows them to access. Access is granted by the `fixed:plugins.app:reader` role.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
To prevent users from seeing an app plugin, refer to [these permissions scenarios]({{< relref "../roles-and-permissions/access-control/plan-rbac-rollout-strategy#prevent-viewers-from-accessing-an-app-plugin" >}}).
|
||||
To prevent users from seeing an app plugin, refer to [these permissions scenarios](../roles-and-permissions/access-control/plan-rbac-rollout-strategy/#prevent-viewers-from-accessing-an-app-plugin).
|
||||
{{% /admonition %}}
|
||||
|
||||
## Plugin catalog
|
||||
|
||||
The Grafana plugin catalog allows you to browse and manage plugins from within Grafana. Only Grafana server administrators and Organization administrators can access and use the plugin catalog. For more information about Grafana roles and permissions, refer to [Roles and permissions]({{< relref "../administration/roles-and-permissions" >}}).
|
||||
The Grafana plugin catalog allows you to browse and manage plugins from within Grafana. Only Grafana server administrators and Organization administrators can access and use the plugin catalog. For more information about Grafana roles and permissions, refer to [Roles and permissions](../roles-and-permissions/).
|
||||
|
||||
The following access rules apply depending on the user role:
|
||||
|
||||
@@ -88,7 +88,7 @@ The Grafana plugin catalog is designed to work with a single Grafana server inst
|
||||
_Video shows the Plugin catalog in a previous version of Grafana._
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If required, the Grafana plugin catalog can be disabled using the `plugin_admin_enabled` flag in the [configuration]({{< relref "../../setup-grafana/configure-grafana/#plugin_admin_enabled" >}}) file.
|
||||
If required, the Grafana plugin catalog can be disabled using the `plugin_admin_enabled` flag in the [configuration](../../setup-grafana/configure-grafana/#plugin_admin_enabled) file.
|
||||
{{% /admonition %}}
|
||||
|
||||
<a id="#plugin-catalog-entry"></a>
|
||||
@@ -153,7 +153,7 @@ If you're logged in to Grafana Cloud when you add a plugin, log out and then log
|
||||
|
||||
Follow the instructions on the **Install** tab. You can either install the plugin with a Grafana CLI command or by downloading and uncompressing a zip file into the Grafana plugins directory. We recommend using Grafana CLI in most instances. The zip option is available if your Grafana server doesn't have access to the internet.
|
||||
|
||||
For more information about Grafana CLI plugin commands, refer to [Plugin commands]({{< relref "../../cli/#plugins-commands" >}}).
|
||||
For more information about Grafana CLI plugin commands, refer to [Plugin commands](../../cli/#plugins-commands).
|
||||
|
||||
#### Install a packaged plugin
|
||||
|
||||
@@ -163,7 +163,7 @@ After the user has downloaded the archive containing the plugin assets, they can
|
||||
unzip my-plugin-0.2.0.zip -d YOUR_PLUGIN_DIR/my-plugin
|
||||
```
|
||||
|
||||
The path to the plugin directory is defined in the configuration file. For more information, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/#plugins" >}}).
|
||||
The path to the plugin directory is defined in the configuration file. For more information, refer to [Configuration](../../setup-grafana/configure-grafana/#plugins).
|
||||
|
||||
## Plugin signatures
|
||||
|
||||
@@ -203,7 +203,7 @@ All plugins are signed under a _signature level_. The signature level determines
|
||||
Unsigned plugins are not supported in Grafana Cloud.
|
||||
{{% /admonition %}}
|
||||
|
||||
We strongly recommend that you don't run unsigned plugins in your Grafana instance. However, if you're aware of the risks and you still want to load an unsigned plugin, refer to [Configuration]({{< relref "../../setup-grafana/configure-grafana/#allow_loading_unsigned_plugins" >}}).
|
||||
We strongly recommend that you don't run unsigned plugins in your Grafana instance. However, if you're aware of the risks and you still want to load an unsigned plugin, refer to [Configuration](../../setup-grafana/configure-grafana/#allow_loading_unsigned_plugins).
|
||||
|
||||
If you've allowed loading of an unsigned plugin, then Grafana writes a warning message to the server log:
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ In previous versions of Grafana, you could only use the API for provisioning dat
|
||||
|
||||
## Config File
|
||||
|
||||
See [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) for more information on what you can configure in `grafana.ini`.
|
||||
See [Configuration](../../setup-grafana/configure-grafana/) for more information on what you can configure in `grafana.ini`.
|
||||
|
||||
### Config File Locations
|
||||
|
||||
@@ -74,7 +74,7 @@ Currently we do not provide any scripts/manifests for configuring Grafana. Rathe
|
||||
Available in Grafana v5.0 and higher.
|
||||
{{% /admonition %}}
|
||||
|
||||
You can manage data sources in Grafana by adding YAML configuration files in the [`provisioning/datasources`]({{< relref "../../setup-grafana/configure-grafana#provisioning" >}}) directory.
|
||||
You can manage data sources in Grafana by adding YAML configuration files in the [`provisioning/datasources`](../../setup-grafana/configure-grafana/#provisioning) directory.
|
||||
Each config file can contain a list of `datasources` to add or update during startup.
|
||||
If the data source already exists, Grafana reconfigures it to match the provisioned configuration file.
|
||||
|
||||
@@ -97,7 +97,7 @@ This prevents old configurations from overwriting newer ones if you have differe
|
||||
|
||||
### Example data source config file
|
||||
|
||||
This example provisions a [Graphite data source]({{< relref "../../datasources/graphite" >}}):
|
||||
This example provisions a [Graphite data source](../../datasources/graphite/):
|
||||
|
||||
```yaml
|
||||
# Configuration file version
|
||||
@@ -177,14 +177,14 @@ datasources:
|
||||
editable: false
|
||||
```
|
||||
|
||||
For provisioning examples of specific data sources, refer to that [data source's documentation]({{< relref "../../datasources" >}}).
|
||||
For provisioning examples of specific data sources, refer to that [data source's documentation](../../datasources/).
|
||||
|
||||
#### JSON Data
|
||||
|
||||
Since not all data sources have the same configuration settings, we include only the most common ones as fields.
|
||||
To provision the rest of a data source's settings, include them as a JSON blob in the `jsonData` field.
|
||||
|
||||
Common settings in the [built-in core data sources]({{< relref "../../datasources#built-in-core-data-sources" >}}) include:
|
||||
Common settings in the [built-in core data sources](../../datasources/#built-in-core-data-sources) include:
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Data sources tagged with _HTTP\*_ communicate using the HTTP protocol, which includes all core data source plugins except MySQL, PostgreSQL, and MSSQL.
|
||||
@@ -245,11 +245,11 @@ Data sources tagged with _HTTP\*_ communicate using the HTTP protocol, which inc
|
||||
| implementation | string | AlertManager | The implementation of the AlertManager data source, such as `prometheus`, `cortex` or `mimir` |
|
||||
| handleGrafanaManagedAlerts | boolean | AlertManager | When enabled, Grafana-managed alerts are sent to this Alertmanager |
|
||||
|
||||
For examples of specific data sources' JSON data, refer to that [data source's documentation]({{< relref "../../datasources" >}}).
|
||||
For examples of specific data sources' JSON data, refer to that [data source's documentation](../../datasources/).
|
||||
|
||||
#### Secure JSON Data
|
||||
|
||||
Secure JSON data is a map of settings that will be encrypted with [secret key]({{< relref "../../setup-grafana/configure-grafana#secret_key" >}}) from the Grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to the request on the server side. All of these settings are optional.
|
||||
Secure JSON data is a map of settings that will be encrypted with [secret key](../../setup-grafana/configure-grafana/#secret_key) from the Grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to the request on the server side. All of these settings are optional.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
The _HTTP\*_ tag denotes data sources that communicate using the HTTP protocol, including all core data source plugins except MySQL, PostgreSQL, and MSSQL.
|
||||
@@ -269,9 +269,8 @@ The _HTTP\*_ tag denotes data sources that communicate using the HTTP protocol,
|
||||
|
||||
#### Custom HTTP headers for data sources
|
||||
|
||||
Data sources managed by Grafanas provisioning can be configured to add HTTP headers to all requests
|
||||
going to that data source. The header name is configured in the `jsonData` field and the header value should be
|
||||
configured in `secureJsonData`.
|
||||
Data sources managed with provisioning can be configured to add HTTP headers to all requests.
|
||||
The header name is configured in the `jsonData` field and the header value is configured in `secureJsonData`.
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
@@ -292,7 +291,7 @@ datasources:
|
||||
Available in Grafana v7.1 and higher.
|
||||
{{% /admonition %}}
|
||||
|
||||
You can manage plugin applications in Grafana by adding one or more YAML config files in the [`provisioning/plugins`]({{< relref "../../setup-grafana/configure-grafana#provisioning" >}}) directory. Each config file can contain a list of `apps` that will be updated during start up. Grafana updates each app to match the configuration file.
|
||||
You can manage plugin applications in Grafana by adding one or more YAML config files in the [`provisioning/plugins`](../../setup-grafana/configure-grafana/#provisioning) directory. Each config file can contain a list of `apps` that will be updated during start up. Grafana updates each app to match the configuration file.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
This feature enables you to provision plugin configurations, not the plugins themselves.
|
||||
@@ -325,7 +324,7 @@ apps:
|
||||
|
||||
## Dashboards
|
||||
|
||||
You can manage dashboards in Grafana by adding one or more YAML config files in the [`provisioning/dashboards`]({{< relref "../../setup-grafana/configure-grafana#dashboards" >}}) directory. Each config file can contain a list of `dashboards providers` that load dashboards into Grafana from the local filesystem.
|
||||
You can manage dashboards in Grafana by adding one or more YAML config files in the [`provisioning/dashboards`](../../setup-grafana/configure-grafana/#dashboards) directory. Each config file can contain a list of `dashboards providers` that load dashboards into Grafana from the local filesystem.
|
||||
|
||||
The dashboard provider config file looks somewhat like this:
|
||||
|
||||
@@ -380,7 +379,7 @@ Note: The JSON definition in the input field when using `Copy JSON to Clipboard`
|
||||
|
||||
### Reusable Dashboard URLs
|
||||
|
||||
If the dashboard in the JSON file contains an [UID]({{< relref "../../dashboards/build-dashboards/view-dashboard-json-model" >}}), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
|
||||
If the dashboard in the JSON file contains an [UID](../../dashboards/build-dashboards/view-dashboard-json-model/), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
|
||||
When Grafana starts, it updates/inserts all dashboards available in the configured folders. If you modify the file, then the dashboard is also updated.
|
||||
By default, Grafana deletes dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
|
||||
|
||||
@@ -437,7 +436,7 @@ This feature doesn't currently allow you to create nested folder structures, tha
|
||||
|
||||
## Alerting
|
||||
|
||||
For information on provisioning Grafana Alerting, refer to [Provision Grafana Alerting resources]({{< relref "../../alerting/set-up/provision-alerting-resources/" >}}).
|
||||
For information on provisioning Grafana Alerting, refer to [Provision Grafana Alerting resources](../../alerting/set-up/provision-alerting-resources/).
|
||||
|
||||
### Supported Settings
|
||||
|
||||
@@ -622,5 +621,5 @@ Secure settings is supported since Grafana v7.2.
|
||||
|
||||
Grafana Enterprise supports:
|
||||
|
||||
- [Provisioning role-based access control with Grafana]({{< relref "../roles-and-permissions/access-control/rbac-grafana-provisioning/" >}})
|
||||
- [Provisioning role-based access control with Terraform]({{< relref "../roles-and-permissions/access-control/rbac-terraform-provisioning/" >}})
|
||||
- [Provisioning role-based access control with Grafana](../roles-and-permissions/access-control/rbac-grafana-provisioning/)
|
||||
- [Provisioning role-based access control with Terraform](../roles-and-permissions/access-control/rbac-terraform-provisioning/)
|
||||
|
||||
@@ -35,7 +35,7 @@ Recorded queries only work with backend data source plugins. Refer to [Backend d
|
||||
|
||||
- single row and column - A query that returns a single row and column.
|
||||
- row count - A query that returns meaningful rows to be counted.
|
||||
- expression - Any expression. To learn more about creating and using expressions, see [Write expression queries]({{< relref "../../panels-visualizations/query-transform-data/expression-queries" >}}).
|
||||
- expression - Any expression. To learn more about creating and using expressions, see [Write expression queries](../../panels-visualizations/query-transform-data/expression-queries/).
|
||||
- dataplane numeric - A query that returns [dataplane numeric kind](/developers/dataplane/numeric) data.
|
||||
|
||||
After a recorded query is created or enabled, it immediately creates a snapshot and continues to create snapshots at the set interval. The recorded query stops taking snapshots when it is disabled, deleted, or when Grafana is not running. Data points are gathered in the backend by running the recorded query and forwarding each result to a remote-write enabled Prometheus instance.
|
||||
@@ -48,7 +48,7 @@ To use a recorded query, create one and add it to a dashboard. After that, it ca
|
||||
|
||||
1. Find/create a query you want to record on a dashboard in an edit panel. The query must only return one row and column. If it returns more, you can still record the number of results returned using the “count” option.
|
||||
- The query's data source must be a backend data source.
|
||||
- Expressions can be used to aggregate data from a time series query. Refer to [Write expression queries]({{< relref "../../panels-visualizations/query-transform-data/expression-queries" >}}) to learn more about creating and using expressions.
|
||||
- Expressions can be used to aggregate data from a time series query. Refer to [Write expression queries](../../panels-visualizations/query-transform-data/expression-queries/) to learn more about creating and using expressions.
|
||||
1. Click the record query button located in the top right of the query editor.
|
||||
1. Enter recorded query information. All fields are required unless otherwise indicated.
|
||||
- Name - Name of the recorded query.
|
||||
@@ -68,7 +68,7 @@ You can add existing recorded queries to panels in a dashboard. For each recorde
|
||||
1. If you want to filter recorded queries by data source, select a data source from the filter by data source drop down menu.
|
||||
1. Click the `Add` button on your recorded query to add it to the panel.
|
||||
|
||||
After adding your recorded query to the panel, the panel data source will become `-- Mixed --`. Your recorded query is represented by a `Prometheus` query with a name label matching your recorded query name. Refer to [Prometheus]({{< relref "../../datasources/prometheus/" >}}) to learn more about the `Prometheus` data source.
|
||||
After adding your recorded query to the panel, the panel data source will become `-- Mixed --`. Your recorded query is represented by a `Prometheus` query with a name label matching your recorded query name. Refer to [Prometheus](../../datasources/prometheus/) to learn more about the `Prometheus` data source.
|
||||
|
||||
If after adding a recorded query, a query with a `-- Mixed --` data source instead of `Prometheus` data source appears, this could mean that a Prometheus remote write target was not set up for recorded queries. Refer to [Remote write target](#remote-write-target) to set up a remote write point.
|
||||
|
||||
|
||||
@@ -33,14 +33,14 @@ If you are running Grafana Enterprise, you can also control access to data sourc
|
||||
A Grafana server administrator manages server-wide settings and access to resources such as organizations, users, and licenses. Grafana includes a default server administrator that you can use to manage all of Grafana, or you can divide that responsibility among other server administrators that you create.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
The server administrator role does not mean that the user is also a Grafana [organization administrator]({{< relref "#organization-roles" >}}).
|
||||
The server administrator role does not mean that the user is also a Grafana [organization administrator](#organization-roles).
|
||||
{{% /admonition %}}
|
||||
|
||||
A server administrator can perform the following tasks:
|
||||
|
||||
- Manage users and permissions
|
||||
- Create, edit, and delete organizations
|
||||
- View server-wide settings defined in the [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) file
|
||||
- View server-wide settings defined in the [Configuration](../../setup-grafana/configure-grafana/) file
|
||||
- View Grafana server statistics, including total users and active sessions
|
||||
- Upgrade the server to Grafana Enterprise.
|
||||
|
||||
@@ -48,7 +48,7 @@ A server administrator can perform the following tasks:
|
||||
The server administrator role does not exist in Grafana Cloud.
|
||||
{{% /admonition %}}
|
||||
|
||||
To assign or remove server administrator privileges, see [Server user management]({{< relref "../user-management/server-user-management/assign-remove-server-admin-privileges/" >}}).
|
||||
To assign or remove server administrator privileges, see [Server user management](../user-management/server-user-management/assign-remove-server-admin-privileges/).
|
||||
|
||||
## Organization users and permissions
|
||||
|
||||
@@ -68,11 +68,11 @@ Permissions assigned to a user within an organization control the extent to whic
|
||||
- library panels
|
||||
- API keys
|
||||
|
||||
For more information about managing organization users, see [User management]({{< relref "../user-management/manage-org-users/" >}}).
|
||||
For more information about managing organization users, see [User management](../user-management/manage-org-users/).
|
||||
|
||||
### Organization roles
|
||||
|
||||
Organization role-based permissions are global, which means that each permission level applies to all Grafana resources within an given organization. For example, an editor can see and update _all_ dashboards in an organization, unless those dashboards have been specifically restricted using [dashboard permissions]({{< relref "../user-management/manage-dashboard-permissions/" >}}).
|
||||
Organization role-based permissions are global, which means that each permission level applies to all Grafana resources within an given organization. For example, an editor can see and update _all_ dashboards in an organization, unless those dashboards have been specifically restricted using [dashboard permissions](../user-management/manage-dashboard-permissions/).
|
||||
|
||||
Grafana uses the following roles to control user access:
|
||||
|
||||
@@ -116,9 +116,9 @@ You can specify the following permissions to dashboards and folders.
|
||||
|
||||
> Important: When a user creates a dashboard or a folder they are automatically granted **Admin** permissions for it.
|
||||
|
||||
For more information about assigning dashboard folder permissions, refer to [Grant dashboard folder permissions]({{< relref "../user-management/manage-dashboard-permissions/#grant-dashboard-folder-permissions" >}}).
|
||||
For more information about assigning dashboard folder permissions, refer to [Grant dashboard folder permissions](../user-management/manage-dashboard-permissions/#grant-dashboard-folder-permissions).
|
||||
|
||||
For more information about assigning dashboard permissions, refer to [Grant dashboard permissions]({{< relref "../user-management/manage-dashboard-permissions/#grant-dashboard-permissions" >}}).
|
||||
For more information about assigning dashboard permissions, refer to [Grant dashboard permissions](../user-management/manage-dashboard-permissions/#grant-dashboard-permissions).
|
||||
|
||||
## Editors with administrator permissions
|
||||
|
||||
@@ -130,18 +130,18 @@ This permission does not allow editors to manage folders, dashboards, and teams
|
||||
|
||||
This setting can be used to enable self-organizing teams to administer their own dashboards.
|
||||
|
||||
For more information about assigning administrator permissions to editors, refer to [Grant editors administrator permissions]({{< relref "../user-management/server-user-management/grant-editor-admin-permissions/" >}}).
|
||||
For more information about assigning administrator permissions to editors, refer to [Grant editors administrator permissions](../user-management/server-user-management/grant-editor-admin-permissions/).
|
||||
|
||||
## Viewers with dashboard preview and Explore permissions
|
||||
|
||||
If you have access to the Grafana server, you can modify the default viewer role so that viewers can:
|
||||
|
||||
- Edit and preview dashboards, but cannot save their changes or create new dashboards.
|
||||
- Access and use [Explore]({{< relref "../../explore" >}}).
|
||||
- Access and use [Explore](../../explore/).
|
||||
|
||||
Extending the viewer role is useful for public Grafana installations where you want anonymous users to be able to edit panels and queries, but not be able to save or create new dashboards.
|
||||
|
||||
For more information about assigning dashboard preview permissions to viewers, refer to [Enable viewers to preview dashboards and use Explore]({{< relref "../user-management/manage-dashboard-permissions/#enable-viewers-to-edit-but-not-save-dashboards-and-use-explore" >}}).
|
||||
For more information about assigning dashboard preview permissions to viewers, refer to [Enable viewers to preview dashboards and use Explore](../user-management/manage-dashboard-permissions/#enable-viewers-to-edit-but-not-save-dashboards-and-use-explore).
|
||||
|
||||
## Teams and permissions
|
||||
|
||||
@@ -152,15 +152,15 @@ You can assign a team member one of the following permissions:
|
||||
- **Member**: Includes the user as a member of the team. Members do not have team administrator privileges.
|
||||
- **Admin**: Administrators have permission to manage various aspects of the team, including team membership, permissions, and settings.
|
||||
|
||||
Because teams exist inside an organization, the organization administrator can manage all teams. When the `editors_can_admin` setting is enabled, editors can create teams and manage teams that they create. For more information about the `editors_can_admin` setting, refer to [Grant editors administrator permissions]({{< relref "../user-management/server-user-management/grant-editor-admin-permissions/" >}}).
|
||||
Because teams exist inside an organization, the organization administrator can manage all teams. When the `editors_can_admin` setting is enabled, editors can create teams and manage teams that they create. For more information about the `editors_can_admin` setting, refer to [Grant editors administrator permissions](../user-management/server-user-management/grant-editor-admin-permissions/).
|
||||
|
||||
For details on managing teams, see [Team management]({{< relref "../team-management/" >}}).
|
||||
For details on managing teams, see [Team management](../team-management/).
|
||||
|
||||
## Grafana Enterprise user permissions features
|
||||
|
||||
While Grafana OSS includes a robust set of permissions and settings that you can use to manage user access to server and organization resources, you might find that you require additional capabilities.
|
||||
|
||||
[Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise">}}) provides the following permissions-related features:
|
||||
[Grafana Enterprise](../../introduction/grafana-enterprise/) provides the following permissions-related features:
|
||||
|
||||
- Data source permissions
|
||||
- Role-based access control (RBAC)
|
||||
@@ -169,13 +169,13 @@ While Grafana OSS includes a robust set of permissions and settings that you can
|
||||
|
||||
By default, a user can query any data source in an organization, even if the data source is not linked to the user's dashboards.
|
||||
|
||||
Data source permissions enable you to restrict data source query permissions to specific **Users**, **Service Accounts**, and **Teams**. For more information about assigning data source permissions, refer to [Data source permissions]({{< relref "../data-source-management/#data-source-permissions/" >}}).
|
||||
Data source permissions enable you to restrict data source query permissions to specific **Users**, **Service Accounts**, and **Teams**. For more information about assigning data source permissions, refer to [Data source permissions](../data-source-management/#data-source-permissions/).
|
||||
|
||||
### Role-based access control
|
||||
|
||||
RBAC provides you a way of granting, changing, and revoking user read and write access to Grafana resources, such as users, reports, and authentication.
|
||||
|
||||
For more information about RBAC, refer to [Role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}).
|
||||
For more information about RBAC, refer to [Role-based access control](access-control/).
|
||||
|
||||
### Learn more
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ weight: 120
|
||||
# Role-based access control (RBAC)
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
RBAC provides a standardized way of granting, changing, and revoking access when it comes to viewing and modifying Grafana resources, such as dashboards, reports, and administrative settings.
|
||||
@@ -77,8 +77,8 @@ You can use RBAC to modify the permissions associated with any basic role, which
|
||||
Note that any modification to any of these basic role is not propagated to the other basic roles.
|
||||
For example, if you modify Viewer basic role and grant additional permission, Editors or Admins won't have that additional grant.
|
||||
|
||||
For more information about the permissions associated with each basic role, refer to [Basic role definitions]({{< relref "./rbac-fixed-basic-role-definitions/#basic-role-assignments" >}}).
|
||||
To interact with the API and view or modify basic roles permissions, refer to [the table]({{< relref "./manage-rbac-roles/#basic-role-uid-mapping" >}}) that maps basic role names to the associated UID.
|
||||
For more information about the permissions associated with each basic role, refer to [Basic role definitions](rbac-fixed-basic-role-definitions/#basic-role-assignments).
|
||||
To interact with the API and view or modify basic roles permissions, refer to [the table](manage-rbac-roles/#basic-role-uid-mapping) that maps basic role names to the associated UID.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
You cannot use a service account to modify basic roles via the RBAC API. To update basic roles, you must be a Grafana administrator and use basic authentication with the request.
|
||||
@@ -86,31 +86,31 @@ You cannot use a service account to modify basic roles via the RBAC API. To upda
|
||||
|
||||
### Fixed roles
|
||||
|
||||
Grafana Enterprise includes the ability for you to assign discrete fixed roles to users, teams, and service accounts. This gives you fine-grained control over user permissions than you would have with basic roles alone. These roles are called "fixed" because you cannot change or delete fixed roles. You can also create _custom_ roles of your own; see more information in the [custom roles section]({{< relref "#custom-roles" >}}) below.
|
||||
Grafana Enterprise includes the ability for you to assign discrete fixed roles to users, teams, and service accounts. This gives you fine-grained control over user permissions than you would have with basic roles alone. These roles are called "fixed" because you cannot change or delete fixed roles. You can also create _custom_ roles of your own; see more information in the [custom roles section](#custom-roles) below.
|
||||
|
||||
Assign fixed roles when the basic roles do not meet your permission requirements. For example, you might want a user with the basic viewer role to also edit dashboards. Or, you might want anyone with the editor role to also add and manage users. Fixed roles provide users more granular access to create, view, and update the following Grafana resources:
|
||||
|
||||
- [Alerting]({{< relref "../../../alerting/" >}})
|
||||
- [Annotations]({{< relref "../../../dashboards/build-dashboards/annotate-visualizations" >}})
|
||||
- [API keys]({{< relref "../../api-keys/" >}})
|
||||
- [Dashboards and folders]({{< relref "../../../dashboards/" >}})
|
||||
- [Data sources]({{< relref "../../../datasources/" >}})
|
||||
- [Explore]({{< relref "../../../explore/" >}})
|
||||
- [Feature Toggles]({{< relref "../../feature-toggles/" >}})
|
||||
- [Folders]({{< relref "../../../dashboards/manage-dashboards/#create-a-dashboard-folder" >}})
|
||||
- [LDAP]({{< relref "../../../setup-grafana/configure-security/configure-authentication/ldap/" >}})
|
||||
- [Library panels]({{< relref "../../../dashboards/build-dashboards/manage-library-panels" >}})
|
||||
- [Licenses]({{< relref "../../stats-and-license/" >}})
|
||||
- [Organizations]({{< relref "../../organization-management/" >}})
|
||||
- [Provisioning]({{< relref "../../provisioning/" >}})
|
||||
- [Reports]({{< relref "../../../dashboards/create-reports/" >}})
|
||||
- [Roles]({{< relref "../../" >}})
|
||||
- [Settings]({{< relref "../../../setup-grafana/configure-grafana/settings-updates-at-runtime" >}})
|
||||
- [Service accounts]({{< relref "../../service-accounts/" >}})
|
||||
- [Teams]({{< relref "../../team-management/" >}})
|
||||
- [Users]({{< relref "../../user-management/" >}})
|
||||
- [Alerting](../../../alerting/)
|
||||
- [Annotations](../../../dashboards/build-dashboards/annotate-visualizations/)
|
||||
- [API keys](../../api-keys/)
|
||||
- [Dashboards and folders](../../../dashboards/)
|
||||
- [Data sources](../../../datasources/)
|
||||
- [Explore](../../../explore/)
|
||||
- [Feature Toggles](../../feature-toggles/)
|
||||
- [Folders](../../../dashboards/manage-dashboards/#create-a-dashboard-folder)
|
||||
- [LDAP](../../../setup-grafana/configure-security/configure-authentication/ldap/)
|
||||
- [Library panels](../../../dashboards/build-dashboards/manage-library-panels/)
|
||||
- [Licenses](../../stats-and-license/)
|
||||
- [Organizations](../../organization-management/)
|
||||
- [Provisioning](../../provisioning/)
|
||||
- [Reports](../../../dashboards/create-reports/)
|
||||
- [Roles](../../)
|
||||
- [Settings](../../../setup-grafana/configure-grafana/settings-updates-at-runtime/)
|
||||
- [Service accounts](../../service-accounts/)
|
||||
- [Teams](../../team-management/)
|
||||
- [Users](../../user-management/)
|
||||
|
||||
To learn more about the permissions you can grant for each resource, refer to [RBAC role definitions]({{< relref "./rbac-fixed-basic-role-definitions/" >}}).
|
||||
To learn more about the permissions you can grant for each resource, refer to [RBAC role definitions](rbac-fixed-basic-role-definitions/).
|
||||
|
||||
### Custom roles
|
||||
|
||||
@@ -126,11 +126,11 @@ Consider creating a custom role when fixed roles do not meet your permissions re
|
||||
|
||||
You can use either of the following methods to create, assign, and manage custom roles:
|
||||
|
||||
- Grafana provisioning: You can use a YAML file to configure roles. For more information about using provisioning to create custom roles, refer to [Manage RBAC roles]({{< relref "./manage-rbac-roles/" >}}). For more information about using provisioning to assign RBAC roles to users or teams, refer to [Assign RBAC roles]({{< relref "./assign-rbac-roles/" >}}).
|
||||
- RBAC API: As an alternative, you can use the Grafana HTTP API to create and manage roles. For more information about the HTTP API, refer to [RBAC API]({{< relref "../../../developers/http_api/access_control/" >}}).
|
||||
- Grafana provisioning: You can use a YAML file to configure roles. For more information about using provisioning to create custom roles, refer to [Manage RBAC roles](manage-rbac-roles/). For more information about using provisioning to assign RBAC roles to users or teams, refer to [Assign RBAC roles](assign-rbac-roles/).
|
||||
- RBAC API: As an alternative, you can use the Grafana HTTP API to create and manage roles. For more information about the HTTP API, refer to [RBAC API](../../../developers/http_api/access_control/).
|
||||
|
||||
### Limitation
|
||||
|
||||
If you have created a folder with the name `General` or `general`, you cannot manage its permissions with RBAC.
|
||||
|
||||
If you set [folder permissions]({{< relref "../../user-management/manage-dashboard-permissions/#grant-dashboard-folder-permissions" >}}) for a folder named `General` or `general`, the system disregards the folder when RBAC is enabled.
|
||||
If you set [folder permissions](../../user-management/manage-dashboard-permissions/#grant-dashboard-folder-permissions) for a folder named `General` or `general`, the system disregards the folder when RBAC is enabled.
|
||||
|
||||
@@ -16,7 +16,7 @@ weight: 40
|
||||
# Assign RBAC roles
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
In this topic you'll learn how to use the role picker, provisioning, and the HTTP API to assign fixed and custom roles to users and teams.
|
||||
@@ -34,10 +34,10 @@ In both cases, the assignment applies only to the user, team or service account
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- [Plan your RBAC rollout strategy]({{< relref "./plan-rbac-rollout-strategy/" >}}).
|
||||
- [Plan your RBAC rollout strategy](../plan-rbac-rollout-strategy/).
|
||||
- Identify the fixed roles that you want to assign to the user, team or service account.
|
||||
|
||||
For more information about available fixed roles, refer to [RBAC role definitions]({{< relref "./rbac-fixed-basic-role-definitions/" >}}).
|
||||
For more information about available fixed roles, refer to [RBAC role definitions](../rbac-fixed-basic-role-definitions/).
|
||||
|
||||
- Ensure that your own user account has the correct permissions:
|
||||
- If you are assigning permissions to a user, team or service account within an organization, you must have organization administrator or server administrator permissions.
|
||||
@@ -52,7 +52,7 @@ In both cases, the assignment applies only to the user, team or service account
|
||||
1. Sign in to Grafana.
|
||||
2. Switch to the organization that contains the user, team or service account.
|
||||
|
||||
For more information about switching organizations, refer to [Switch organizations]({{< relref "../../../user-management/user-preferences/_index.md#switch-organizations" >}}).
|
||||
For more information about switching organizations, refer to [Switch organizations](../../../user-management/user-preferences/#switch-organizations).
|
||||
|
||||
3. In the left-side menu, click **Administration**, **Users and access**, and then **Users**, **Teams**, or **Service accounts**.
|
||||
4. In the **Role** column, select the fixed role that you want to assign to the user, team, or service account.
|
||||
@@ -73,8 +73,8 @@ Instead of using the Grafana role picker, you can use file-based provisioning to
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Refer to [Role provisioning]({{< relref "./rbac-grafana-provisioning/" >}})
|
||||
- Ensure that the team to which you are adding the fixed role exists. For more information about creating teams, refer to [Manage teams]({{< relref "../../../team-management/" >}})
|
||||
- Refer to [Role provisioning](../rbac-grafana-provisioning/)
|
||||
- Ensure that the team to which you are adding the fixed role exists. For more information about creating teams, refer to [Manage teams](../../../team-management/)
|
||||
|
||||
**To assign a role to a team:**
|
||||
|
||||
@@ -82,25 +82,25 @@ Instead of using the Grafana role picker, you can use file-based provisioning to
|
||||
|
||||
1. Refer to the following table to add attributes and values.
|
||||
|
||||
| Attribute | Description |
|
||||
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `roles` | Enter the custom role or custom roles you want to create/update. |
|
||||
| `roles > name` | Enter the name of the custom role. |
|
||||
| `roles > version` | Enter the custom role version number. Role assignments are independent of the role version number. |
|
||||
| `roles > global` | Enter `true`. You can specify the `orgId` otherwise. |
|
||||
| `roles > permissions` | Enter the permissions `action` and `scope` values. For more information about permissions actions and scopes, refer to [RBAC permissions, actions, and scopes]({{< relref "./custom-role-actions-scopes/" >}}) |
|
||||
| `teams` | Enter the team or teams to which you are adding the custom role. |
|
||||
| `teams > orgId` | Because teams belong to organizations, you must add the `orgId` value. |
|
||||
| `teams > name` | Enter the name of the team. |
|
||||
| `teams > roles` | Enter the custom or fixed role or roles that you want to grant to the team. |
|
||||
| `teams > roles > name` | Enter the name of the role. |
|
||||
| `teams > roles > global` | Enter `true`, or specify `orgId` of the role you want to assign to the team. Fixed roles are global. |
|
||||
| Attribute | Description |
|
||||
| ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `roles` | Enter the custom role or custom roles you want to create/update. |
|
||||
| `roles > name` | Enter the name of the custom role. |
|
||||
| `roles > version` | Enter the custom role version number. Role assignments are independent of the role version number. |
|
||||
| `roles > global` | Enter `true`. You can specify the `orgId` otherwise. |
|
||||
| `roles > permissions` | Enter the permissions `action` and `scope` values. For more information about permissions actions and scopes, refer to [RBAC permissions, actions, and scopes](../custom-role-actions-scopes/) |
|
||||
| `teams` | Enter the team or teams to which you are adding the custom role. |
|
||||
| `teams > orgId` | Because teams belong to organizations, you must add the `orgId` value. |
|
||||
| `teams > name` | Enter the name of the team. |
|
||||
| `teams > roles` | Enter the custom or fixed role or roles that you want to grant to the team. |
|
||||
| `teams > roles > name` | Enter the name of the role. |
|
||||
| `teams > roles > global` | Enter `true`, or specify `orgId` of the role you want to assign to the team. Fixed roles are global. |
|
||||
|
||||
For more information about managing custom roles, refer to [Create custom roles using provisioning]({{< relref "./manage-rbac-roles/#create-custom-roles-using-provisioning" >}}).
|
||||
For more information about managing custom roles, refer to [Create custom roles using provisioning](../manage-rbac-roles/#create-custom-roles-using-provisioning).
|
||||
|
||||
1. Reload the provisioning configuration file.
|
||||
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations](../../../../developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
The following example creates the `custom:users:writer` role and assigns it to the `user writers` and `user admins` teams along with the `fixed:users:writer` role:
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@ weight: 30
|
||||
# Configure RBAC in Grafana
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
The table below describes all RBAC configuration options. Like any other Grafana configuration, you can apply these options as [environment variables]({{< relref "../../../../setup-grafana/configure-grafana/#configure-with-environment-variables" >}}).
|
||||
The table below describes all RBAC configuration options. Like any other Grafana configuration, you can apply these options as [environment variables](../../../../setup-grafana/configure-grafana/#configure-with-environment-variables).
|
||||
|
||||
| Setting | Required | Description | Default |
|
||||
| ------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
||||
|
||||
@@ -15,12 +15,12 @@ weight: 80
|
||||
# RBAC permissions, actions, and scopes
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../../../introduction/grafana-enterprise/) and [Grafana Cloud](/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.
|
||||
|
||||
To learn more about the Grafana resources to which you can apply RBAC, refer to [Resources with RBAC permissions]({{< relref "../#fixed-roles" >}}).
|
||||
To learn more about the Grafana resources to which you can apply RBAC, refer to [Resources with RBAC permissions](../#fixed-roles).
|
||||
|
||||
- **Action:** An action describes what tasks a user can perform on a resource.
|
||||
- **Scope:** A scope describes where an action can be performed, such as reading a specific user profile. In this example, a permission is associated with the scope `users:<userId>` to the relevant role.
|
||||
@@ -47,7 +47,7 @@ The following list contains role-based access control actions.
|
||||
| `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.silences:create` | `folders:*`<br>`folders:uid:*` | Create rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.silences:read` | `folders:*`<br>`folders:uid:*` | Read general and rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.silences:read` | `folders:*`<br>`folders:uid:*` | Read all general silences and rule-specific silences in a folder and its subfolders. |
|
||||
| `alert.silences:write` | `folders:*`<br>`folders:uid:*` | Update and expire rule-specific silences in a folder and its subfolders. |
|
||||
| `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.secrets:read` | n/a | Same as `alert.provisioning:read` plus ability to export resources with decrypted secrets. |
|
||||
@@ -115,7 +115,7 @@ The following list contains role-based access control actions.
|
||||
| `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" >}}). |
|
||||
| `provisioning:reload` | `provisioners:*` | Reload provisioning files. To find the exact scope for specific provisioner, see [Scope definitions](#scope-definitions). |
|
||||
| `reports:create` | n/a | Create reports. |
|
||||
| `reports:write` | `reports:*` <br> `reports:id:*` | Update reports. |
|
||||
| `reports.settings:read` | n/a | Read report settings. |
|
||||
@@ -135,8 +135,8 @@ The following list contains role-based access control actions.
|
||||
| `serviceaccounts:read` | `serviceaccounts:*` <br> `serviceaccounts:id:*` | Read Grafana service accounts. |
|
||||
| `serviceaccounts.permissions:write` | `serviceaccounts:*` <br> `serviceaccounts:id:*` | Update Grafana service account permissions to control who can do what with the service account. |
|
||||
| `serviceaccounts.permissions:read` | `serviceaccounts:*` <br> `serviceaccounts:id:*` | 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" >}}). |
|
||||
| `settings:read` | `settings:*`<br>`settings:auth.saml:*`<br>`settings:auth.saml:enabled` (property level) | Read the [Grafana configuration settings](../../../../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](../../../../setup-grafana/configure-grafana/settings-updates-at-runtime/). |
|
||||
| `support.bundles:create` | n/a | Create support bundles. |
|
||||
| `support.bundles:delete` | n/a | Delete support bundles. |
|
||||
| `support.bundles:read` | n/a | List and download support bundles. |
|
||||
@@ -173,7 +173,7 @@ The following list contains role-based access control actions.
|
||||
> **Note:** Available from Grafana 9.4 in early access.
|
||||
|
||||
> **Note:** This feature is behind the `accessControlOnCall` feature toggle.
|
||||
> You can enable feature toggles through configuration file or environment variables. See configuration [docs]({{< relref "../../../../setup-grafana/configure-grafana/#feature_toggles" >}}) for details.
|
||||
> You can enable feature toggles through configuration file or environment variables. See configuration [docs](../../../../setup-grafana/configure-grafana/#feature_toggles) for details.
|
||||
|
||||
The following list contains role-based access control actions used by Grafana OnCall application plugin.
|
||||
|
||||
@@ -222,7 +222,7 @@ The following list contains role-based access control scopes.
|
||||
| `permissions:type:delegate` | The scope is only applicable for roles associated with the Access Control itself and indicates that you can delegate your permissions only, or a subset of it, by creating a new role or making an assignment. |
|
||||
| `permissions:type:escalate` | The scope is required to trigger the reset of basic roles permissions. It indicates that users might acquire additional permissions they did not previously have. |
|
||||
| `plugins:*` <br> `plugins:id:*` | Restrict an action to a set of plugins. For example, `plugins:id:grafana-oncall-app` matches Grafana OnCall plugin, and `plugins:*` matches all plugins. |
|
||||
| `provisioners:*` | Restrict an action to a set of provisioners. For example, `provisioners:*` matches any provisioner, and `provisioners:accesscontrol` matches the role-based access control [provisioner]({{< relref "./rbac-grafana-provisioning/" >}}). |
|
||||
| `provisioners:*` | Restrict an action to a set of provisioners. For example, `provisioners:*` matches any provisioner, and `provisioners:accesscontrol` matches the role-based access control [provisioner](../rbac-grafana-provisioning/). |
|
||||
| `reports:*` <br> `reports:id:*` | Restrict an action to a set of reports. For example, `reports:*` matches any report and `reports:id:1` matches the report whose ID is `1`. |
|
||||
| `roles:*` <br> `roles:uid:*` | Restrict an action to a set of roles. For example, `roles:*` matches any role and `roles:uid:randomuid` matches only the role whose UID is `randomuid`. |
|
||||
| `services:accesscontrol` | Restrict an action to target only the role-based access control service. You can use this in conjunction with the `status:accesscontrol` actions. |
|
||||
|
||||
@@ -17,7 +17,7 @@ weight: 50
|
||||
# Manage RBAC roles
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
{{< table-of-contents >}}
|
||||
@@ -28,7 +28,7 @@ The following example includes the base64 username:password Basic Authorization.
|
||||
|
||||
## List permissions associated with roles
|
||||
|
||||
Use a `GET` command to see the actions and scopes associated with a role. For more information about seeing a list of permissions for each role, refer to [Get a role]({{< relref "../../../../developers/http_api/access_control/#get-a-role" >}}).
|
||||
Use a `GET` command to see the actions and scopes associated with a role. For more information about seeing a list of permissions for each role, refer to [Get a role](../../../../developers/http_api/access_control/#get-a-role).
|
||||
|
||||
To see the permissions associated with basic roles, refer to the following basic role UIDs:
|
||||
|
||||
@@ -87,7 +87,7 @@ curl --location --request GET '<grafana_url>/api/access-control/roles/qQui_LCMk'
|
||||
}
|
||||
```
|
||||
|
||||
Refer to the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#get-a-role" >}}) for more details.
|
||||
Refer to the [RBAC HTTP API](../../../../developers/http_api/access_control/#get-a-role) for more details.
|
||||
|
||||
## Create custom roles
|
||||
|
||||
@@ -97,40 +97,40 @@ Create a custom role when basic roles and fixed roles do not meet your permissio
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- [Plan your RBAC rollout strategy]({{< relref "./plan-rbac-rollout-strategy/" >}}).
|
||||
- Determine which permissions you want to add to the custom role. To see a list of actions and scope, refer to [RBAC permissions, actions, and scopes]({{< relref "./custom-role-actions-scopes/" >}}).
|
||||
- [Enable role provisioning]({{< relref "./rbac-grafana-provisioning/" >}}).
|
||||
- [Plan your RBAC rollout strategy](../plan-rbac-rollout-strategy/).
|
||||
- Determine which permissions you want to add to the custom role. To see a list of actions and scope, refer to [RBAC permissions, actions, and scopes](../custom-role-actions-scopes/).
|
||||
- [Enable role provisioning](../rbac-grafana-provisioning/).
|
||||
- Ensure that you have permissions to create a custom role.
|
||||
- By default, the Grafana Admin role has permission to create custom roles.
|
||||
- A Grafana Admin can delegate the custom role privilege to another user by creating a custom role with the relevant permissions and adding the `permissions:type:delegate` scope.
|
||||
|
||||
### Create custom roles using provisioning
|
||||
|
||||
[File-based provisioning]({{< relref "./rbac-grafana-provisioning" >}}) is one method you can use to create custom roles.
|
||||
[File-based provisioning](../rbac-grafana-provisioning/) is one method you can use to create custom roles.
|
||||
|
||||
1. Open the YAML configuration file and locate the `roles` section.
|
||||
|
||||
1. Refer to the following table to add attributes and values.
|
||||
|
||||
| Attribute | Description |
|
||||
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `name` | A human-friendly identifier for the role that helps administrators understand the purpose of a role. `name` is required and cannot be longer than 190 characters. We recommend that you use ASCII characters. Role names must be unique within an organization. |
|
||||
| `uid` | A unique identifier associated with the role. The UID enables you to change or delete the role. You can either generate a UID yourself, or let Grafana generate one for you. You cannot use the same UID within the same Grafana instance. |
|
||||
| `orgId` | Identifies the organization to which the role belongs. The [default org ID]({{< relref "../../../../setup-grafana/configure-grafana/#auto_assign_org_id" >}}) is used if you do not specify `orgId`. |
|
||||
| `global` | Global roles are not associated with any specific organization, which means that you can reuse them across all organizations. This setting overrides `orgId`. |
|
||||
| `displayName` | Human-friendly text that is displayed in the UI. Role display name cannot be longer than 190 ASCII-based characters. For fixed roles, the display name is shown as specified. If you do not set a display name the display name replaces `':'` (a colon) with `' '` (a space). |
|
||||
| `description` | Human-friendly text that describes the permissions a role provides. |
|
||||
| `group` | Organizes roles in the role picker. |
|
||||
| `version` | A positive integer that defines the current version of the role, which prevents overwriting newer changes. |
|
||||
| `hidden` | Hidden roles do not appear in the role picker. |
|
||||
| `state` | State of the role. Defaults to `present`, but if set to `absent` the role will be removed. |
|
||||
| `force` | Can be used in addition to state `absent`, to force the removal of a role and all its assignments. |
|
||||
| `from` | An optional list of roles from which you want to copy permissions. |
|
||||
| `permissions` | Provides users access to Grafana resources. For a list of permissions, refer to [RBAC permissions actions and scopes]({{< relref "./rbac-fixed-basic-role-definitions/" >}}). If you do not know which permissions to assign, you can create and assign roles without any permissions as a placeholder. Using the `from` attribute, you can specify additional permissions or permissions to remove by adding a `state` to your permission list. |
|
||||
| Attribute | Description |
|
||||
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | A human-friendly identifier for the role that helps administrators understand the purpose of a role. `name` is required and cannot be longer than 190 characters. We recommend that you use ASCII characters. Role names must be unique within an organization. |
|
||||
| `uid` | A unique identifier associated with the role. The UID enables you to change or delete the role. You can either generate a UID yourself, or let Grafana generate one for you. You cannot use the same UID within the same Grafana instance. |
|
||||
| `orgId` | Identifies the organization to which the role belongs. The [default org ID](../../../../setup-grafana/configure-grafana/#auto_assign_org_id) is used if you do not specify `orgId`. |
|
||||
| `global` | Global roles are not associated with any specific organization, which means that you can reuse them across all organizations. This setting overrides `orgId`. |
|
||||
| `displayName` | Human-friendly text that is displayed in the UI. Role display name cannot be longer than 190 ASCII-based characters. For fixed roles, the display name is shown as specified. If you do not set a display name the display name replaces `':'` (a colon) with `' '` (a space). |
|
||||
| `description` | Human-friendly text that describes the permissions a role provides. |
|
||||
| `group` | Organizes roles in the role picker. |
|
||||
| `version` | A positive integer that defines the current version of the role, which prevents overwriting newer changes. |
|
||||
| `hidden` | Hidden roles do not appear in the role picker. |
|
||||
| `state` | State of the role. Defaults to `present`, but if set to `absent` the role will be removed. |
|
||||
| `force` | Can be used in addition to state `absent`, to force the removal of a role and all its assignments. |
|
||||
| `from` | An optional list of roles from which you want to copy permissions. |
|
||||
| `permissions` | Provides users access to Grafana resources. For a list of permissions, refer to [RBAC permissions actions and scopes](../rbac-fixed-basic-role-definitions/). If you do not know which permissions to assign, you can create and assign roles without any permissions as a placeholder. Using the `from` attribute, you can specify additional permissions or permissions to remove by adding a `state` to your permission list. |
|
||||
|
||||
1. Reload the provisioning configuration file.
|
||||
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations](../../../../developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
The following example creates a local role:
|
||||
|
||||
@@ -199,7 +199,7 @@ roles:
|
||||
|
||||
### Create custom roles using the HTTP API
|
||||
|
||||
The following examples show you how to create a custom role using the Grafana HTTP API. For more information about the HTTP API, refer to [Create a new custom role]({{< relref "../../../../developers/http_api/access_control/#create-a-new-custom-role" >}}).
|
||||
The following examples show you how to create a custom role using the Grafana HTTP API. For more information about the HTTP API, refer to [Create a new custom role](../../../../developers/http_api/access_control/#create-a-new-custom-role).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
You cannot create a custom role with permissions that you do not have. For example, if you only have `users:create` permissions, then you cannot create a role that includes other permissions.
|
||||
@@ -250,7 +250,7 @@ curl --location --request POST '<grafana_url>/api/access-control/roles/' \
|
||||
}
|
||||
```
|
||||
|
||||
Refer to the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#create-a-new-custom-role" >}}) for more details.
|
||||
Refer to the [RBAC HTTP API](../../../../developers/http_api/access_control/#create-a-new-custom-role) for more details.
|
||||
|
||||
## Update basic role permissions
|
||||
|
||||
@@ -258,7 +258,7 @@ If the default basic role definitions do not meet your requirements, you can cha
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Determine the permissions you want to add or remove from a basic role. For more information about the permissions associated with basic roles, refer to [RBAC role definitions]({{< relref "./rbac-fixed-basic-role-definitions/#basic-role-assignments" >}}).
|
||||
- Determine the permissions you want to add or remove from a basic role. For more information about the permissions associated with basic roles, refer to [RBAC role definitions](../rbac-fixed-basic-role-definitions/#basic-role-assignments).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
You cannot modify the `No Basic Role` permissions.
|
||||
@@ -280,7 +280,7 @@ You cannot modify the `No Basic Role` permissions.
|
||||
|
||||
1. Reload the provisioning configuration file.
|
||||
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations](../../../../developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
The following example modifies the `Grafana Admin` basic role permissions.
|
||||
|
||||
@@ -321,7 +321,7 @@ You can add multiple `fixed`, `basic` or `custom` roles to the `from` section. T
|
||||
Make sure to **increment** the role version for the changes to be accounted for.
|
||||
{{% /admonition %}}
|
||||
|
||||
You can also change basic roles' permissions using the API. Refer to the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#update-a-role" >}}) for more details.
|
||||
You can also change basic roles' permissions using the API. Refer to the [RBAC HTTP API](../../../../developers/http_api/access_control/#update-a-role) for more details.
|
||||
|
||||
## Reset basic roles to their default
|
||||
|
||||
@@ -335,7 +335,7 @@ You have two options to reset the basic roles permissions to their default.
|
||||
|
||||
> Warning: If this option is left to true, permissions will be reset on every boot.
|
||||
|
||||
Use the [reset_basic_roles]({{< relref "../configure-rbac/#configure-rbac-in-grafana" >}}) option to reset
|
||||
Use the [reset_basic_roles](../configure-rbac/#configure-rbac-in-grafana) option to reset
|
||||
basic roles permissions to their default on Grafana instance boot up.
|
||||
|
||||
1. Open you configuration file and update the rbac section as follow:
|
||||
@@ -368,7 +368,7 @@ An alternative to the configuration option is to use the HTTP endpoint.
|
||||
scope: 'permissions:type:escalate'
|
||||
```
|
||||
|
||||
1. As a `Grafana Admin`, call the API endpoint to reset the basic roles to their default. Refer to the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#reset-basic-roles-to-their-default" >}}) for more details.
|
||||
1. As a `Grafana Admin`, call the API endpoint to reset the basic roles to their default. Refer to the [RBAC HTTP API](../../../../developers/http_api/access_control/#reset-basic-roles-to-their-default) for more details.
|
||||
|
||||
## Delete a custom role using Grafana provisioning
|
||||
|
||||
@@ -394,7 +394,7 @@ Delete a custom role when you no longer need it. When you delete a custom role,
|
||||
|
||||
1. Reload the provisioning configuration file.
|
||||
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations](../../../../developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
The following example deletes a custom role:
|
||||
|
||||
@@ -409,4 +409,4 @@ roles:
|
||||
force: true
|
||||
```
|
||||
|
||||
You can also delete a custom role using the API. Refer to the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#delete-a-custom-role" >}}) for more details.
|
||||
You can also delete a custom role using the API. Refer to the [RBAC HTTP API](../../../../developers/http_api/access_control/#delete-a-custom-role) for more details.
|
||||
|
||||
@@ -16,7 +16,7 @@ weight: 20
|
||||
# Plan your RBAC rollout strategy
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
An RBAC rollout strategy helps you determine _how_ you want to implement RBAC prior to assigning RBAC roles to users and teams.
|
||||
@@ -35,8 +35,8 @@ As a first step in determining your permissions rollout strategy, we recommend t
|
||||
|
||||
To learn more about basic roles and fixed roles, refer to the following documentation:
|
||||
|
||||
- [Basic role definitions]({{< relref "./rbac-fixed-basic-role-definitions/#basic-role-assignments" >}})
|
||||
- [Fixed role definitions]({{< relref "./rbac-fixed-basic-role-definitions/#fixed-role-definitions" >}})
|
||||
- [Basic role definitions](../rbac-fixed-basic-role-definitions/#basic-role-assignments)
|
||||
- [Fixed role definitions](../rbac-fixed-basic-role-definitions/#fixed-role-definitions)
|
||||
|
||||
## User and team considerations
|
||||
|
||||
@@ -56,7 +56,7 @@ For example:
|
||||
|
||||
1. Map SAML, LDAP, or Oauth roles to Grafana basic roles (viewer, editor, or admin).
|
||||
|
||||
2. Use the Grafana Enterprise team sync feature to synchronize teams from your SAML, LDAP, or Oauth provider to Grafana. For more information about team sync, refer to [Team sync]({{< relref "../../../../setup-grafana/configure-security/configure-team-sync/" >}}).
|
||||
2. Use the Grafana Enterprise team sync feature to synchronize teams from your SAML, LDAP, or Oauth provider to Grafana. For more information about team sync, refer to [Team sync](../../../../setup-grafana/configure-security/configure-team-sync/).
|
||||
|
||||
3. Within Grafana, assign RBAC permissions to users and teams.
|
||||
|
||||
@@ -67,7 +67,7 @@ Consider the following guidelines when you determine if you should modify basic
|
||||
- **Modify basic roles** when Grafana's definitions of what viewers, editors, and admins can do does not match your definition of these roles. You can add or remove permissions from any basic role.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Changes that you make to basic roles impact the role definition for all [organizations]({{< relref "../../../organization-management/" >}}) in the Grafana instance. For example, when you add the `fixed:users:writer` role's permissions to the viewer basic role, all viewers in any org in the Grafana instance can create users within that org.
|
||||
Changes that you make to basic roles impact the role definition for all [organizations](../../../organization-management/) in the Grafana instance. For example, when you add the `fixed:users:writer` role's permissions to the viewer basic role, all viewers in any org in the Grafana instance can create users within that org.
|
||||
{{% /admonition %}}
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
@@ -97,13 +97,13 @@ If you have a use case that you'd like to share, feel free to contribute to this
|
||||
|
||||
1. In Grafana, create a team with the name `Internal employees`.
|
||||
1. Assign the `fixed:datasources:explorer` role to the `Internal employees` team.
|
||||
1. Add internal employees to the `Internal employees` team, or map them from a SAML, LDAP, or Oauth team using [Team Sync]({{< relref "../../../../setup-grafana/configure-security/configure-team-sync/" >}}).
|
||||
1. Add internal employees to the `Internal employees` team, or map them from a SAML, LDAP, or Oauth team using [Team Sync](../../../../setup-grafana/configure-security/configure-team-sync/).
|
||||
1. Assign the viewer role to both internal employees and contractors.
|
||||
|
||||
### Limit viewer, editor, or admin permissions
|
||||
|
||||
1. Review the list of permissions associated with the basic role.
|
||||
1. [Change the permissions of the basic role]({{< relref "./manage-rbac-roles/#update-basic-role-permissions" >}}).
|
||||
1. [Change the permissions of the basic role](../manage-rbac-roles/#update-basic-role-permissions).
|
||||
|
||||
### Allow only members of one team to manage Alerts
|
||||
|
||||
@@ -186,7 +186,7 @@ roles:
|
||||
global: true
|
||||
```
|
||||
|
||||
- Or add the following permissions to the `basic:editor` role, using provisioning or the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#update-a-role" >}}):
|
||||
- Or add the following permissions to the `basic:editor` role, using provisioning or the [RBAC HTTP API](../../../../developers/http_api/access_control/#update-a-role):
|
||||
|
||||
| action | scope |
|
||||
| -------------- | --------------------------- |
|
||||
@@ -216,9 +216,9 @@ roles:
|
||||
global: true
|
||||
```
|
||||
|
||||
> **Note:** The `fixed:reports:writer` role assigns more permissions than just creating reports. For more information about fixed role permission assignments, refer to [Fixed role definitions]({{< relref "./rbac-fixed-basic-role-definitions/#fixed-role-definitions" >}}).
|
||||
> **Note:** The `fixed:reports:writer` role assigns more permissions than just creating reports. For more information about fixed role permission assignments, refer to [Fixed role definitions](../rbac-fixed-basic-role-definitions/#fixed-role-definitions).
|
||||
|
||||
- Add the following permissions to the `basic:viewer` role, using provisioning or the [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#update-a-role" >}}):
|
||||
- Add the following permissions to the `basic:viewer` role, using provisioning or the [RBAC HTTP API](../../../../developers/http_api/access_control/#update-a-role):
|
||||
|
||||
| Action | Scope |
|
||||
| ---------------- | ------------------------------- |
|
||||
@@ -229,7 +229,7 @@ roles:
|
||||
|
||||
### Prevent a Grafana Admin from creating and inviting users
|
||||
|
||||
To prevent a Grafana Admin from creating users and inviting them to join an organization, you must [update a basic role permission]({{< relref "./manage-rbac-roles/#update-basic-role-permissions" >}}).
|
||||
To prevent a Grafana Admin from creating users and inviting them to join an organization, you must [update a basic role permission](../manage-rbac-roles/#update-basic-role-permissions).
|
||||
The permissions to remove are:
|
||||
|
||||
| Action | Scope |
|
||||
@@ -259,12 +259,12 @@ roles:
|
||||
state: 'absent'
|
||||
```
|
||||
|
||||
- Or use [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#update-a-role" >}}).
|
||||
- Or use [RBAC HTTP API](../../../../developers/http_api/access_control/#update-a-role).
|
||||
|
||||
### Prevent Viewers from accessing an App Plugin
|
||||
|
||||
By default, Viewers, Editors and Admins have access to all App Plugins that their organization role allows them to access.
|
||||
To change this default behavior and prevent Viewers from accessing an App plugin, you must [update a basic role's permissions]({{< relref "./manage-rbac-roles/#update-basic-role-permissions" >}}).
|
||||
To change this default behavior and prevent Viewers from accessing an App plugin, you must [update a basic role's permissions](../manage-rbac-roles/#update-basic-role-permissions).
|
||||
|
||||
In this example, three App plugins have been installed and enabled:
|
||||
| Name | ID | Required Org role |
|
||||
@@ -309,7 +309,7 @@ roles:
|
||||
state: 'present'
|
||||
```
|
||||
|
||||
- Or use [RBAC HTTP API]({{< relref "../../../../developers/http_api/access_control/#update-a-role" >}}).
|
||||
- Or use [RBAC HTTP API](../../../../developers/http_api/access_control/#update-a-role).
|
||||
|
||||
### Manage user permissions through teams
|
||||
|
||||
|
||||
@@ -16,20 +16,20 @@ weight: 70
|
||||
# RBAC role definitions
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
The following tables list permissions associated with basic and fixed roles.
|
||||
|
||||
## Basic role assignments
|
||||
|
||||
| Basic role | UID | Associated fixed roles | Description |
|
||||
| ------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
||||
| Grafana Admin | `basic_grafana_admin` | `fixed:roles:reader`<br>`fixed:roles:writer`<br>`fixed:users:reader`<br>`fixed:users:writer`<br>`fixed:org.users:reader`<br>`fixed:org.users:writer`<br>`fixed:ldap:reader`<br>`fixed:ldap:writer`<br>`fixed:stats:reader`<br>`fixed:settings:reader`<br>`fixed:settings:writer`<br>`fixed:provisioning:writer`<br>`fixed:organization:reader`<br>`fixed:organization:maintainer`<br>`fixed:licensing:reader`<br>`fixed:licensing:writer`<br>`fixed:datasources.caching:reader`<br>`fixed:datasources.caching:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:plugins:maintainer`<br>`fixed:authentication.config:writer`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:writer`<br>`fixed:library.panels:general.writer` | Default [Grafana server administrator]({{< relref "../../#grafana-server-administrators" >}}) assignments. |
|
||||
| Admin | `basic_admin` | `fixed:reports:reader`<br>`fixed:reports:writer`<br>`fixed:datasources:reader`<br>`fixed:datasources:writer`<br>`fixed:organization:writer`<br>`fixed:datasources.permissions:reader`<br>`fixed:datasources.permissions:writer`<br>`fixed:teams:writer`<br>`fixed:dashboards:reader`<br>`fixed:dashboards:writer`<br>`fixed:dashboards.permissions:reader`<br>`fixed:dashboards.permissions:writer`<br>`fixed:dashboards.public:writer`<br>`fixed:folders:reader`<br>`fixed:folders:writer`<br>`fixed:folders.permissions:reader`<br>`fixed:folders.permissions:writer`<br>`fixed:alerting:writer`<br>`fixed:apikeys:reader`<br>`fixed:apikeys:writer`<br>`fixed:alerting.provisioning.secrets:reader`<br>`fixed:alerting.provisioning:writer`<br>`fixed:datasources.caching:reader`<br>`fixed:datasources.caching:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:plugins:writer`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:writer`<br>`fixed:library.panels:general.writer`<br>`fixed:alerting.provisioning.status:writer` | Default [Grafana organization administrator]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| Editor | `basic_editor` | `fixed:datasources:explorer`<br>`fixed:dashboards:creator`<br>`fixed:folders:creator`<br>`fixed:annotations:writer`<br>`fixed:teams:creator` if the `editors_can_admin` configuration flag is enabled<br>`fixed:alerting:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:general.writer`<br>`fixed:alerting.provisioning.status:writer` | Default [Editor]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| Viewer | `basic_viewer` | `fixed:datasources.id:reader`<br>`fixed:organization:reader`<br>`fixed:annotations:reader`<br>`fixed:annotations.dashboard:writer`<br>`fixed:alerting:reader`<br>`fixed:plugins.app:reader`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:datasources:explorer` if the `viewers_can_edit` configuration flag is enabled | Default [Viewer]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| No Basic Role | n/a | | Default [No Basic Role]({{< relref "../#basic-roles" >}}) |
|
||||
| Basic role | UID | Associated fixed roles | Description |
|
||||
| ------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
||||
| Grafana Admin | `basic_grafana_admin` | `fixed:roles:reader`<br>`fixed:roles:writer`<br>`fixed:users:reader`<br>`fixed:users:writer`<br>`fixed:org.users:reader`<br>`fixed:org.users:writer`<br>`fixed:ldap:reader`<br>`fixed:ldap:writer`<br>`fixed:stats:reader`<br>`fixed:settings:reader`<br>`fixed:settings:writer`<br>`fixed:provisioning:writer`<br>`fixed:organization:reader`<br>`fixed:organization:maintainer`<br>`fixed:licensing:reader`<br>`fixed:licensing:writer`<br>`fixed:datasources.caching:reader`<br>`fixed:datasources.caching:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:plugins:maintainer`<br>`fixed:authentication.config:writer`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:writer`<br>`fixed:library.panels:general.writer` | Default [Grafana server administrator](../../#grafana-server-administrators) assignments. |
|
||||
| Admin | `basic_admin` | `fixed:reports:reader`<br>`fixed:reports:writer`<br>`fixed:datasources:reader`<br>`fixed:datasources:writer`<br>`fixed:organization:writer`<br>`fixed:datasources.permissions:reader`<br>`fixed:datasources.permissions:writer`<br>`fixed:teams:writer`<br>`fixed:dashboards:reader`<br>`fixed:dashboards:writer`<br>`fixed:dashboards.permissions:reader`<br>`fixed:dashboards.permissions:writer`<br>`fixed:dashboards.public:writer`<br>`fixed:folders:reader`<br>`fixed:folders:writer`<br>`fixed:folders.permissions:reader`<br>`fixed:folders.permissions:writer`<br>`fixed:alerting:writer`<br>`fixed:apikeys:reader`<br>`fixed:apikeys:writer`<br>`fixed:alerting.provisioning.secrets:reader`<br>`fixed:alerting.provisioning:writer`<br>`fixed:datasources.caching:reader`<br>`fixed:datasources.caching:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:plugins:writer`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:writer`<br>`fixed:library.panels:general.writer`<br>`fixed:alerting.provisioning.status:writer` | Default [Grafana organization administrator](../#basic-roles) assignments. |
|
||||
| Editor | `basic_editor` | `fixed:datasources:explorer`<br>`fixed:dashboards:creator`<br>`fixed:folders:creator`<br>`fixed:annotations:writer`<br>`fixed:teams:creator` if the `editors_can_admin` configuration flag is enabled<br>`fixed:alerting:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:creator`<br>`fixed:library.panels:general.reader`<br>`fixed:library.panels:general.writer`<br>`fixed:alerting.provisioning.status:writer` | Default [Editor](../#basic-roles) assignments. |
|
||||
| Viewer | `basic_viewer` | `fixed:datasources.id:reader`<br>`fixed:organization:reader`<br>`fixed:annotations:reader`<br>`fixed:annotations.dashboard:writer`<br>`fixed:alerting:reader`<br>`fixed:plugins.app:reader`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader`<br>`fixed:library.panels:general.reader`<br>`fixed:datasources:explorer` if the `viewers_can_edit` configuration flag is enabled | Default [Viewer](../#basic-roles) assignments. |
|
||||
| No Basic Role | n/a | | Default [No Basic Role](../#basic-roles) |
|
||||
|
||||
## Fixed role definitions
|
||||
|
||||
@@ -120,7 +120,7 @@ Access to Grafana alert rules is an intersection of many permissions:
|
||||
|
||||
There is only one exclusion at this moment. Role `fixed:alerting.provisioning:writer` does not require user to have any additional permissions and provides access to all aspects of the alerting configuration via special provisioning API.
|
||||
|
||||
For more information about the permissions required to access alert rules, refer to [Create a custom role to access alerts in a folder]({{< relref "./plan-rbac-rollout-strategy/#create-a-custom-role-to-access-alerts-in-a-folder" >}}).
|
||||
For more information about the permissions required to access alert rules, refer to [Create a custom role to access alerts in a folder](../plan-rbac-rollout-strategy/#create-a-custom-role-to-access-alerts-in-a-folder).
|
||||
|
||||
### Grafana OnCall roles (beta)
|
||||
|
||||
@@ -130,7 +130,7 @@ Available from Grafana 9.4 in early access.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
This feature is behind the `accessControlOnCall` feature toggle.
|
||||
You can enable feature toggles through configuration file or environment variables. See configuration [docs]({{< relref "../../../../setup-grafana/configure-grafana/#feature_toggles" >}}) for details.
|
||||
You can enable feature toggles through configuration file or environment variables. See configuration [docs](../../../../setup-grafana/configure-grafana/#feature_toggles) for details.
|
||||
{{% /admonition %}}
|
||||
|
||||
If you are using [Grafana OnCall](https://grafana.com/docs/oncall/latest/get-started/), you can try out the integration between Grafana OnCall and RBAC.
|
||||
@@ -138,9 +138,9 @@ For a detailed list of the available OnCall RBAC roles, refer to the table in [A
|
||||
|
||||
The following table lists the default RBAC OnCall role assignments to the basic roles:
|
||||
|
||||
| Basic role | Associated fixed roles | Description |
|
||||
| ------------- | ----------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| Grafana Admin | `plugins:grafana-oncall-app:admin` | Default [Grafana server administrator]({{< relref "../#grafana-server-administrators" >}}) assignments. |
|
||||
| Admin | `plugins:grafana-oncall-app:admin` | Default [Grafana organization administrator]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| Editor | `plugins:grafana-oncall-app:editor` | Default [Editor]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| Viewer | `plugins:grafana-oncall-app:reader` | Default [Viewer]({{< relref "../#basic-roles" >}}) assignments. |
|
||||
| Basic role | Associated fixed roles | Description |
|
||||
| ------------- | ----------------------------------- | -------------------------------------------------------------------------------------- |
|
||||
| Grafana Admin | `plugins:grafana-oncall-app:admin` | Default [Grafana server administrator](../#grafana-server-administrators) assignments. |
|
||||
| Admin | `plugins:grafana-oncall-app:admin` | Default [Grafana organization administrator](../#basic-roles) assignments. |
|
||||
| Editor | `plugins:grafana-oncall-app:editor` | Default [Editor](../#basic-roles) assignments. |
|
||||
| Viewer | `plugins:grafana-oncall-app:reader` | Default [Viewer](../#basic-roles) assignments. |
|
||||
|
||||
@@ -16,10 +16,10 @@ weight: 60
|
||||
# Provisioning RBAC with Grafana
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
You can create, change or remove [Custom roles]({{< relref "./manage-rbac-roles/#create-custom-roles-using-provisioning" >}}) and create or remove [basic role assignments]({{< relref "./assign-rbac-roles/#assign-a-fixed-role-to-a-basic-role-using-provisioning" >}}), by adding one or more YAML configuration files in the `provisioning/access-control/` directory.
|
||||
You can create, change or remove [Custom roles](../manage-rbac-roles/#create-custom-roles-using-provisioning) and create or remove [basic role assignments](../assign-rbac-roles/#assign-a-fixed-role-to-a-basic-role-using-provisioning), by adding one or more YAML configuration files in the `provisioning/access-control/` directory.
|
||||
|
||||
Grafana performs provisioning during startup. After you make a change to the configuration file, you can reload it during runtime. You do not need to restart the Grafana server for your changes to take effect.
|
||||
|
||||
@@ -37,13 +37,13 @@ Grafana performs provisioning during startup. After you make a change to the con
|
||||
|
||||
1. Add RBAC provisioning details to the configuration file.
|
||||
|
||||
Refer to [Manage RBAC roles]({{< relref "./manage-rbac-roles/" >}}) and [Assign RBAC roles]({{< relref "./assign-rbac-roles/" >}}) for instructions.
|
||||
Refer to [Manage RBAC roles](../manage-rbac-roles/) and [Assign RBAC roles](../assign-rbac-roles/) for instructions.
|
||||
|
||||
Refer to [example role provisioning file]({{< relref "#example-role-configuration-file-using-grafana-provisioning" >}}) for a complete example of a provisioning file.
|
||||
Refer to [example role provisioning file](#example-role-configuration-file-using-grafana-provisioning) for a complete example of a provisioning file.
|
||||
|
||||
1. Reload the provisioning configuration file.
|
||||
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations]({{< relref "../../../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
For more information about reloading the provisioning configuration at runtime, refer to [Reload provisioning configurations](../../../../developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
## Example role configuration file using Grafana provisioning
|
||||
|
||||
@@ -130,6 +130,6 @@ teams:
|
||||
|
||||
## Useful Links
|
||||
|
||||
[Provisioning RBAC setup with Terraform]({{< relref "./rbac-terraform-provisioning">}})
|
||||
[Provisioning RBAC setup with Terraform](../rbac-terraform-provisioning/)
|
||||
|
||||
[Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/)
|
||||
|
||||
@@ -15,7 +15,7 @@ weight: 60
|
||||
# Provisioning RBAC with Terraform
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../../../introduction/grafana-enterprise/) and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
You can create, change or remove [Custom roles](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/role) and create or remove [basic and custom role assignments](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/role_assignment), by using [Terraform's Grafana provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs).
|
||||
@@ -28,15 +28,15 @@ You can create, change or remove [Custom roles](https://registry.terraform.io/pr
|
||||
|
||||
## Create a Service Account Token for provisioning
|
||||
|
||||
We recommend using service account tokens for provisioning. [Service accounts]({{< relref "../../../service-accounts/" >}}) support fine grained permissions, which allows you to easily authenticate and use the minimum set of permissions needed to provision your RBAC infrastructure.
|
||||
We recommend using service account tokens for provisioning. [Service accounts](../../../service-accounts/) support fine grained permissions, which allows you to easily authenticate and use the minimum set of permissions needed to provision your RBAC infrastructure.
|
||||
|
||||
To create a service account token for provisioning, complete the following steps.
|
||||
|
||||
1. [Create a new service account]({{< relref "../../../service-accounts/#create-a-service-account-in-grafana" >}}) for your CI pipeline.
|
||||
1. [Assign permissions to service account]({{< relref "../../../service-accounts/#assign-roles-to-a-service-account-in-grafana" >}}):
|
||||
1. [Create a new service account](../../../service-accounts/#create-a-service-account-in-grafana) for your CI pipeline.
|
||||
1. [Assign permissions to service account](../../../service-accounts/#assign-roles-to-a-service-account-in-grafana):
|
||||
- You will need roles “Role reader”, "Role writer" and roles including any permissions that will be provisioned. For example, to create or assign a role that allows creating users, a service account needs permissions to create users.
|
||||
- Alternatively, you can assign "Admin" basic role to the service account.
|
||||
1. [Create a new service account token]({{< relref "../../../service-accounts/#to-add-a-token-to-a-service-account" >}}) for use in Terraform.
|
||||
1. [Create a new service account token](../../../service-accounts/#to-add-a-token-to-a-service-account) for use in Terraform.
|
||||
|
||||
Alternatively, you can use basic authentication. To view all the supported authentication formats, see [here](https://registry.terraform.io/providers/grafana/grafana/latest/docs#authentication).
|
||||
|
||||
@@ -152,6 +152,6 @@ Similarly, you can look up and use `id`s of users, teams and service accounts th
|
||||
|
||||
## Useful Links
|
||||
|
||||
[RBAC setup with Grafana provisioning]({{< relref "./rbac-grafana-provisioning">}})
|
||||
[RBAC setup with Grafana provisioning](../rbac-grafana-provisioning/)
|
||||
|
||||
[Grafana Cloud Terraform provisioning](/docs/grafana-cloud/infrastructure-as-code/terraform/)
|
||||
|
||||
@@ -27,7 +27,7 @@ filters = accesscontrol:debug accesscontrol.evaluator:debug dashboard.permission
|
||||
## Enable audit logging
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available in [Grafana Enterprise]({{< relref "../../../../introduction/grafana-enterprise/" >}}) version 7.3 and later, and [Grafana Cloud](/docs/grafana-cloud).
|
||||
Available in [Grafana Enterprise](../../../../introduction/grafana-enterprise/) version 7.3 and later, and [Grafana Cloud](/docs/grafana-cloud).
|
||||
{{% /admonition %}}
|
||||
|
||||
You can enable auditing in the Grafana configuration file.
|
||||
@@ -38,11 +38,11 @@ enabled = true
|
||||
```
|
||||
|
||||
All permission and role updates, and role assignments are added to audit logs.
|
||||
Learn more about [access control audit logs]({{< relref "../../../../setup-grafana/configure-security/audit-grafana/#access-control" >}}).
|
||||
Learn more about [access control audit logs](../../../../setup-grafana/configure-security/audit-grafana/#access-control).
|
||||
|
||||
## Missing dashboard, folder or data source permissions
|
||||
|
||||
[Dashboard and folder permissions]({{< relref "../../#dashboard-permissions" >}}) and [data source permissions]({{< relref "../../#data-source-permissions" >}}) can go out of sync if a Grafana instance version is upgraded, downgraded and then upgraded again.
|
||||
[Dashboard and folder permissions](../../#dashboard-permissions) and [data source permissions](../../#data-source-permissions) can go out of sync if a Grafana instance version is upgraded, downgraded and then upgraded again.
|
||||
This happens when an instance is downgraded from a version that uses RBAC to a version that uses the legacy access control, and dashboard, folder or data source permissions are updated.
|
||||
These permission updates will not be applied to RBAC, so permissions will be out of sync when the instance is next upgraded to a version with RBAC.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ weight: 800
|
||||
You can use a service account to run automated workloads in Grafana, such as dashboard provisioning, configuration, or report generation. Create service accounts and tokens to authenticate applications, such as Terraform, with the Grafana API.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Service accounts replace [API keys]({{< relref "../api-keys/" >}}) as the primary way to authenticate applications that interact with Grafana.
|
||||
Service accounts replace [API keys](../api-keys/) as the primary way to authenticate applications that interact with Grafana.
|
||||
{{% /admonition %}}
|
||||
|
||||
A common use case for creating a service account is to perform operations on automated or triggered tasks. You can use service accounts to:
|
||||
@@ -32,7 +32,7 @@ A common use case for creating a service account is to perform operations on aut
|
||||
- Set up an external SAML authentication provider
|
||||
- Interact with Grafana without signing in as a user
|
||||
|
||||
In [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}), you can also use service accounts in combination with [role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}) to grant very specific permissions to applications that interact with Grafana.
|
||||
In [Grafana Enterprise](../../introduction/grafana-enterprise/), you can also use service accounts in combination with [role-based access control](../roles-and-permissions/access-control/) to grant very specific permissions to applications that interact with Grafana.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Service accounts can only act in the organization they are created for. If you have the same task that is needed for multiple organizations, we recommend creating service accounts in each organization.
|
||||
@@ -40,7 +40,7 @@ Service accounts can only act in the organization they are created for. If you h
|
||||
|
||||
{{< vimeo 742056367 >}}
|
||||
|
||||
_Video shows service accounts in Grafana v9.1. Refer to [Create a service account in Grafana]({{< relref "#create-a-service-account-in-grafana" >}}) for current instructions._
|
||||
_Video shows service accounts in Grafana v9.1. Refer to [Create a service account in Grafana](#create-a-service-account-in-grafana) for current instructions._
|
||||
|
||||
## Service account tokens
|
||||
|
||||
@@ -62,19 +62,19 @@ The added benefits of service accounts to API keys include:
|
||||
- Service accounts resemble Grafana users and can be enabled/disabled, granted specific permissions, and remain active until they are deleted or disabled. API keys are only valid until their expiry date.
|
||||
- Service accounts can be associated with multiple tokens.
|
||||
- Unlike API keys, service account tokens are not associated with a specific user, which means that applications can be authenticated even if a Grafana user is deleted.
|
||||
- You can grant granular permissions to service accounts by leveraging [role-based access control]({{< relref "../roles-and-permissions/access-control/" >}}). For more information about permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/" >}}).
|
||||
- You can grant granular permissions to service accounts by leveraging [role-based access control](../roles-and-permissions/access-control/). For more information about permissions, refer to [About users and permissions](../roles-and-permissions/).
|
||||
|
||||
## Create a service account in Grafana
|
||||
|
||||
A service account can be used to run automated workloads in Grafana, like dashboard provisioning, configuration, or report generation. For more information about how you can use service accounts, refer to [About service accounts]({{< ref "#about-service-accounts" >}}).
|
||||
|
||||
For more information about creating service accounts via the API, refer to [Create a service account in the HTTP API]({{< relref "../../developers/http_api/serviceaccount/#create-service-account" >}}).
|
||||
For more information about creating service accounts via the API, refer to [Create a service account in the HTTP API](../../developers/http_api/serviceaccount/#create-service-account).
|
||||
|
||||
Note that the user who created a service account will also be able to read, update and delete the service account that they created, as well as permissions associated with that service account.
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions](../roles-and-permissions/#).
|
||||
|
||||
### To create a service account
|
||||
|
||||
@@ -92,11 +92,11 @@ Note that the user who created a service account will also be able to read, upda
|
||||
|
||||
A service account token is a generated random string that acts as an alternative to a password when authenticating with Grafana’s HTTP API. For more information about service accounts, refer to [About service accounts in Grafana]({{< ref "#about-service-accounts" >}}).
|
||||
|
||||
You can create a service account token using the Grafana UI or via the API. For more information about creating a service account token via the API, refer to [Create service account tokens using the HTTP API]({{< relref "../../developers/http_api/serviceaccount/#create-service-account-tokens" >}}).
|
||||
You can create a service account token using the Grafana UI or via the API. For more information about creating a service account token via the API, refer to [Create service account tokens using the HTTP API](../../developers/http_api/serviceaccount/#create-service-account-tokens).
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
- Ensure you have permission to create and edit service accounts. By default, the organization administrator role is required to create and edit service accounts. For more information about user permissions, refer to [About users and permissions](../roles-and-permissions/#).
|
||||
|
||||
### Service account token expiration dates
|
||||
|
||||
@@ -118,9 +118,9 @@ By default, service account tokens don't have an expiration date, meaning they w
|
||||
## Assign roles to a service account in Grafana
|
||||
|
||||
You can assign roles to a Grafana service account to control access for the associated service account tokens.
|
||||
You can assign roles to a service account using the Grafana UI or via the API. For more information about assigning a role to a service account via the API, refer to [Update service account using the HTTP API]({{< relref "../../developers/http_api/serviceaccount/#update-service-account" >}}).
|
||||
You can assign roles to a service account using the Grafana UI or via the API. For more information about assigning a role to a service account via the API, refer to [Update service account using the HTTP API](../../developers/http_api/serviceaccount/#update-service-account).
|
||||
|
||||
In [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}), you can also [assign RBAC roles]({{< relref "../roles-and-permissions/access-control/assign-rbac-roles" >}}) to grant very specific permissions to applications that interact with Grafana.
|
||||
In [Grafana Enterprise](../../introduction/grafana-enterprise/), you can also [assign RBAC roles](../roles-and-permissions/access-control/assign-rbac-roles/) to grant very specific permissions to applications that interact with Grafana.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Since Grafana 10.2.0, the `No Basic Role` is available for organization users or service accounts. This role has no permissions. Permissions can be granted with RBAC.
|
||||
@@ -128,7 +128,7 @@ Since Grafana 10.2.0, the `No Basic Role` is available for organization users or
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have permission to update service accounts roles. By default, the organization administrator role is required to update service accounts permissions. For more information about user permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
- Ensure you have permission to update service accounts roles. By default, the organization administrator role is required to update service accounts permissions. For more information about user permissions, refer to [About users and permissions](../roles-and-permissions/#).
|
||||
|
||||
### To assign a role to a service account
|
||||
|
||||
@@ -144,7 +144,7 @@ To control what and who can do with the service account you can assign permissio
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have permission to update user and team permissions of a service accounts. By default, the organization administrator role is required to update user and teams permissions for a service account. For more information about user permissions, refer to [About users and permissions]({{< relref "../roles-and-permissions/#" >}}).
|
||||
- Ensure you have permission to update user and team permissions of a service accounts. By default, the organization administrator role is required to update user and teams permissions for a service account. For more information about user permissions, refer to [About users and permissions](../roles-and-permissions/#).
|
||||
- Ensure you have permission to read teams.
|
||||
|
||||
### User and team permissions for a service account
|
||||
@@ -183,7 +183,7 @@ This can help you diagnose permissions-related issues with token authorization.
|
||||
|
||||
These endpoints provide details on a service account's token.
|
||||
If you haven't added a token to a service account, do so before proceeding.
|
||||
For details, refer to [Add a token to a service account]({{< relref "#add-a-token-to-a-service-account-in-grafana" >}}).
|
||||
For details, refer to [Add a token to a service account](#add-a-token-to-a-service-account-in-grafana).
|
||||
|
||||
### List a service account token's permissions
|
||||
|
||||
|
||||
@@ -25,11 +25,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](../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#configuration-file-location" >}}) 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](../../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](../roles-and-permissions/#grafana-server-administrators).
|
||||
|
||||
### View server settings
|
||||
|
||||
@@ -38,15 +38,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#server" >}}).
|
||||
For a full list of server settings, refer to [Configuration](../../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](../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](../roles-and-permissions/#grafana-server-administrators).
|
||||
|
||||
### View server stats
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ weight: 500
|
||||
|
||||
Dashboard and folder permissions enable you to grant a viewer the ability to edit and save dashboard changes, or limit an editor's permission to modify a dashboard.
|
||||
|
||||
For more information about dashboard permissions, refer to [Dashboard permissions]({{< relref "../../roles-and-permissions/#dashboard-permissions" >}}).
|
||||
For more information about dashboard permissions, refer to [Dashboard permissions](../../roles-and-permissions/#dashboard-permissions).
|
||||
|
||||
## Grant folder permissions
|
||||
|
||||
@@ -23,7 +23,7 @@ When you grant user permissions for folders, that setting applies to all dashboa
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have organization administrator privileges
|
||||
- Identify the dashboard folder permissions you want to modify and the users, service accounts or teams to which you want to grant access. For more information about dashboard permissions, refer to [Dashboard permissions]({{< relref "../../roles-and-permissions/#dashboard-permissions" >}}).
|
||||
- Identify the dashboard folder permissions you want to modify and the users, service accounts or teams to which you want to grant access. For more information about dashboard permissions, refer to [Dashboard permissions](../../roles-and-permissions/#dashboard-permissions).
|
||||
|
||||
**To grant dashboard folder permissions**:
|
||||
|
||||
@@ -77,7 +77,7 @@ This modification is useful for public Grafana installations where you want anon
|
||||
|
||||
1. Open the Grafana configuration file.
|
||||
|
||||
For more information about the Grafana configuration file and its location, refer to [Configuration]({{< relref "../../../setup-grafana/configure-grafana/" >}}).
|
||||
For more information about the Grafana configuration file and its location, refer to [Configuration](../../../setup-grafana/configure-grafana/).
|
||||
|
||||
1. Locate the `viewers_can_edit` parameter.
|
||||
1. Set the `viewers_can_edit` value to `true`.
|
||||
@@ -85,7 +85,7 @@ This modification is useful for public Grafana installations where you want anon
|
||||
|
||||
## Edit dashboard permissions
|
||||
|
||||
Edit dashboard permissions when you are want to enhance or restrict a user's access to a dashboard. For more information about dashboard permissions, refer to [Dashboard permissions]({{< relref "../../roles-and-permissions/#dashboard-permissions" >}}).
|
||||
Edit dashboard permissions when you are want to enhance or restrict a user's access to a dashboard. For more information about dashboard permissions, refer to [Dashboard permissions](../../roles-and-permissions/#dashboard-permissions).
|
||||
|
||||
### Before you begin
|
||||
|
||||
@@ -155,4 +155,4 @@ Folder permissions settings:
|
||||
|
||||
Result: User1 has editor permissions for the folder because user1 has permissions on a folder that contains this folder.
|
||||
|
||||
> Refer to [Role-based access Control]({{< relref "../../roles-and-permissions/access-control/" >}}) in Grafana Enterprise to understand how to use RBAC permissions to restrict access to dashboards, folders, administrative functions, and other resources.
|
||||
> Refer to [Role-based access Control](../../roles-and-permissions/access-control/) in Grafana Enterprise to understand how to use RBAC permissions to restrict access to dashboards, folders, administrative functions, and other resources.
|
||||
|
||||
@@ -19,7 +19,7 @@ weight: 400
|
||||
|
||||
Organization administrators can invite users to join their organization. Organization users have access to organization resources based on their role, which is **Admin**, **Editor**, or **Viewer**. Permissions associated with each role determine the tasks a user can perform in the system.
|
||||
|
||||
For more information about organization user permissions, refer to [Organization users and permissions]({{< relref "../../roles-and-permissions/#organization-users-and-permissions" >}}).
|
||||
For more information about organization user permissions, refer to [Organization users and permissions](../../roles-and-permissions/#organization-users-and-permissions).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Users added at the organization level will have access to all stacks and services by default, without the ability to be filtered by stack unless Single Sign-On (SSO) or Role-Based Access Control (RBAC) is implemented.
|
||||
@@ -41,15 +41,15 @@ You can see a list of users with accounts in your Grafana organization. If neces
|
||||
1. Navigate to **Administration > Users and access > Users**.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can also [view a global list of users]({{< relref "../server-user-management#view-a-list-of-users" >}}) in the Server Admin section of Grafana.
|
||||
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also [view a global list of users](../server-user-management/#view-a-list-of-users) in the Server Admin section of Grafana.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Change a user's organization permissions
|
||||
|
||||
Update user permissions when you want to enhance or restrict a user's access to organization resources. For more information about organization permissions, refer to [Organization roles]({{< relref "../../roles-and-permissions/#organization-roles" >}}).
|
||||
Update user permissions when you want to enhance or restrict a user's access to organization resources. For more information about organization permissions, refer to [Organization roles](../../roles-and-permissions/#organization-roles).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Organization roles sync from the authentication provider on user sign-in. To prevent synchronization of organization roles from the authentication provider regardless of their role in the authentication provider, then refer to the `skip_org_role_sync` setting in your Grafana configuration. Refer to [skip org role sync]({{< relref "../../../setup-grafana/configure-grafana/#authgrafana_com-skip_org_role_sync" >}}) for more information.
|
||||
Organization roles sync from the authentication provider on user sign-in. To prevent synchronization of organization roles from the authentication provider regardless of their role in the authentication provider, then refer to the `skip_org_role_sync` setting in your Grafana configuration. Refer to [skip org role sync](../../../setup-grafana/configure-grafana/#authgrafana_com-skip_org_role_sync) for more information.
|
||||
{{% /admonition %}}
|
||||
|
||||
### Before you begin
|
||||
@@ -69,7 +69,7 @@ Organization roles sync from the authentication provider on user sign-in. To pre
|
||||
1. Click **Update**.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can also [change a user's organization permissions]({{< relref "../server-user-management/change-user-org-permissions/" >}}) in the Server Admin section.
|
||||
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also [change a user's organization permissions](../server-user-management/change-user-org-permissions/) in the Server Admin section.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Invite a user to join an organization
|
||||
@@ -80,14 +80,14 @@ When you invite users to join an organization, you assign the **Admin**, **Edito
|
||||
- If the user is new to Grafana, then use their email address to issue an invitation. The system automatically creates the user account on first sign in.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can also manually [add a user to an organization]({{< relref "../server-user-management/add-remove-user-to-org/" >}}).
|
||||
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also manually [add a user to an organization](../server-user-management/add-remove-user-to-org/).
|
||||
{{% /admonition %}}
|
||||
|
||||
### Before you begin
|
||||
|
||||
- Ensure you have organization administrator privileges.
|
||||
- If the user already has access to Grafana, obtain their user name.
|
||||
- Determine the permissions you want to assign to the user. For more information about organization permissions, refer to [Organization roles]({{< relref "../../roles-and-permissions/#organization-roles" >}}).
|
||||
- Determine the permissions you want to assign to the user. For more information about organization permissions, refer to [Organization roles](../../roles-and-permissions/#organization-roles).
|
||||
|
||||
**To invite or add an existing user account to your organization**:
|
||||
|
||||
@@ -105,7 +105,7 @@ If you have [server administrator]({{< relref "../../roles-and-permissions/#graf
|
||||
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Email or username | Either the email or username that the user will use to sign in to Grafana. |
|
||||
| Name | The user's name. |
|
||||
| Role | Click the organization role to assign this user. For more information about organization roles, refer to [Organization roles]({{< relref "../../roles-and-permissions/#organization-roles" >}}).. |
|
||||
| Role | Click the organization role to assign this user. For more information about organization roles, refer to [Organization roles](../../roles-and-permissions/#organization-roles).. |
|
||||
| Send invite email | Switch to on if your organization has configured. The system sends an email to the user inviting them to sign in to Grafana and join the organization. Switch to off if you are not using email. The user can sign in to Grafana with the email or username you entered. |
|
||||
|
||||
1. Click **Submit**.
|
||||
@@ -156,4 +156,4 @@ This action does not remove the user account from the Grafana server.
|
||||
|
||||
1. Click the red **X** to remove the user from the organization.
|
||||
|
||||
> **Note:** If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can also [remove a user from an organization]({{< relref "../server-user-management/add-remove-user-to-org/#remove-a-user-from-an-organization" >}}) on the Users page of the Server Admin section.
|
||||
> **Note:** If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can also [remove a user from an organization](../server-user-management/add-remove-user-to-org/#remove-a-user-from-an-organization) on the Users page of the Server Admin section.
|
||||
|
||||
@@ -20,13 +20,13 @@ weight: 100
|
||||
|
||||
A _user_ is defined as any individual who can log in to Grafana. Each user is associated with a _role_ that includes _permissions_. Permissions determine the tasks a user can perform in the system.
|
||||
|
||||
If you have [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions in Grafana, you can manage all users for a Grafana instance in the Server Admin section:
|
||||
If you have [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions in Grafana, you can manage all users for a Grafana instance in the Server Admin section:
|
||||
|
||||
{{< section >}}
|
||||
|
||||
If you have [organization administrator]({{< relref "../../roles-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, refer to [Manage users in a organization]({{< relref "../manage-org-users/" >}}).
|
||||
If you have [organization administrator](../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, refer to [Manage users in a organization](../manage-org-users/).
|
||||
|
||||
For more information about user roles and permissions, refer to [Roles and permissions]({{< relref "../../roles-and-permissions/" >}}). For more information about managing users in general, see [User management]({{< relref "../" >}}).
|
||||
For more information about user roles and permissions, refer to [Roles and permissions](../../roles-and-permissions/). For more information about managing users in general, see [User management](../).
|
||||
|
||||
## View a list of users
|
||||
|
||||
@@ -42,7 +42,7 @@ You can see a list of users with accounts on your Grafana server. This action mi
|
||||
1. Click **Administration** in the left-side menu, **Users and access**, and then **Users**.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you have [organization administrator]({{< relref "../../roles-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can still [view of list of users in a given organization]({{< relref "../manage-org-users/#view-a-list-of-organization-users" >}}).
|
||||
If you have [organization administrator](../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can still [view of list of users in a given organization](../manage-org-users/#view-a-list-of-organization-users).
|
||||
{{% /admonition %}}
|
||||
|
||||
## View user details
|
||||
@@ -104,7 +104,7 @@ Edit a user account when you want to modify user login credentials, or delete, d
|
||||
|
||||
Add users when you want to manually provide individuals with access to Grafana.
|
||||
|
||||
When you create a user using this method, you must create their password. The user does not receive a notification by email. To invite a user to Grafana and allow them to create their own password, [invite a user to join an organization]({{< relref "../manage-org-users#invite-a-user-to-join-an-organization" >}}).
|
||||
When you create a user using this method, you must create their password. The user does not receive a notification by email. To invite a user to Grafana and allow them to create their own password, [invite a user to join an organization](../manage-org-users/#invite-a-user-to-join-an-organization).
|
||||
|
||||
When you configure advanced authentication using Oauth, SAML, LDAP, or the Auth proxy, users are created automatically.
|
||||
|
||||
@@ -119,10 +119,10 @@ When you configure advanced authentication using Oauth, SAML, LDAP, or the Auth
|
||||
1. Click **New user**.
|
||||
1. Complete the fields and click **Create user**.
|
||||
|
||||
When you create a user, the system assigns the user viewer permissions in a default organization, which you can change. You can now [add a user to a second organization]({{< relref "add-remove-user-to-org/" >}}).
|
||||
When you create a user, the system assigns the user viewer permissions in a default organization, which you can change. You can now [add a user to a second organization](add-remove-user-to-org/).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you have [organization administrator]({{< relref "../../roles-and-permissions/#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../roles-and-permissions/#grafana-server-administrators" >}}) permissions, you can still add users by [inviting a user to join an organization]({{< relref "../manage-org-users#invite-a-user-to-join-an-organization" >}}).
|
||||
If you have [organization administrator](../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../roles-and-permissions/#grafana-server-administrators) permissions, you can still add users by [inviting a user to join an organization](../manage-org-users/#invite-a-user-to-join-an-organization).
|
||||
{{% /admonition %}}
|
||||
|
||||
## Force a user to log out of Grafana
|
||||
|
||||
@@ -14,7 +14,7 @@ weight: 30
|
||||
|
||||
# Add or remove a user in an organization
|
||||
|
||||
Server administrators can add and remove users in organizations. To do this as an organization administrator, see [Manage users in an organization]({{< relref "../../manage-org-users/" >}}).
|
||||
Server administrators can add and remove users in organizations. To do this as an organization administrator, see [Manage users in an organization](../../manage-org-users/).
|
||||
|
||||
## Add a user to an organization
|
||||
|
||||
@@ -24,9 +24,9 @@ You are required to specify an Admin role for each organization. The first user
|
||||
|
||||
### Before you begin
|
||||
|
||||
- [Create an organization]({{< relref "../../../organization-management/#create-an-organization" >}})
|
||||
- [Add a user]({{< relref "./#add-a-user" >}}) to Grafana
|
||||
- Ensure you have [Grafana server administrator privileges]({{< relref "./assign-remove-server-admin-privileges" >}})
|
||||
- [Create an organization](../../../organization-management/#create-an-organization)
|
||||
- [Add a user](./#add-a-user) to Grafana
|
||||
- Ensure you have [Grafana server administrator privileges](../assign-remove-server-admin-privileges/)
|
||||
|
||||
**To add a user to an organization**:
|
||||
|
||||
@@ -36,14 +36,14 @@ You are required to specify an Admin role for each organization. The first user
|
||||
1. In the Organizations section, click **Add user to organization**.
|
||||
1. Select an organization and a role.
|
||||
|
||||
For more information about user permissions, refer to [Organization roles]({{< relref "../../../roles-and-permissions#organization-roles" >}}).
|
||||
For more information about user permissions, refer to [Organization roles](../../../roles-and-permissions/#organization-roles).
|
||||
|
||||
1. Click **Add to organization**.
|
||||
|
||||
The next time the user signs in, they will be able to navigate to their new organization using the Switch Organizations option in the user profile menu.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you have [organization administrator]({{< relref "../../../roles-and-permissions#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../../roles-and-permissions#grafana-server-administrators" >}}) permissions, you can still [invite a user to join an organization]({{< relref "../../manage-org-users#invite-a-user-to-join-an-organization" >}}).
|
||||
If you have [organization administrator](../../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../../roles-and-permissions/#grafana-server-administrators) permissions, you can still [invite a user to join an organization](../../manage-org-users/#invite-a-user-to-join-an-organization).
|
||||
{{% /admonition %}}
|
||||
|
||||
## Remove a user from an organization
|
||||
@@ -62,4 +62,4 @@ Remove a user from an organization when they no longer require access to the das
|
||||
1. In the Organization section, click **Remove from organization** next to the organization from which you want to remove the user.
|
||||
1. Click **Confirm removal**.
|
||||
|
||||
> **Note:** If you have [organization administrator]({{< relref "../../../roles-and-permissions#organization-roles" >}}) permissions and _not_ [server administrator]({{< relref "../../../roles-and-permissions#grafana-server-administrators" >}}) permissions, you can still [remove a user from an organization]({{< relref "../../manage-org-users#remove-a-user-from-an-organization" >}}) in the Users section of organization configuration.
|
||||
> **Note:** If you have [organization administrator](../../../roles-and-permissions/#organization-roles) permissions and _not_ [server administrator](../../../roles-and-permissions/#grafana-server-administrators) permissions, you can still [remove a user from an organization](../../manage-org-users/#remove-a-user-from-an-organization) in the Users section of organization configuration.
|
||||
|
||||
@@ -13,7 +13,7 @@ weight: 20
|
||||
|
||||
# Assign or remove Grafana server administrator privileges
|
||||
|
||||
Grafana server administrators are responsible for creating users, organizations, and managing permissions. For more information about the server administration role, refer to [Grafana server administrators]({{< relref "../../../roles-and-permissions#grafana-server-administrators" >}}).
|
||||
Grafana server administrators are responsible for creating users, organizations, and managing permissions. For more information about the server administration role, refer to [Grafana server administrators](../../../roles-and-permissions/#grafana-server-administrators).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Server administrators are "super-admins" with full permissions to create, read, update, and delete all resources and users in all organizations, as well as update global settings such as licenses. Only grant this permission to trusted users.
|
||||
@@ -21,7 +21,7 @@ Server administrators are "super-admins" with full permissions to create, read,
|
||||
|
||||
## Before you begin
|
||||
|
||||
- [Add a user]({{< relref "../#add-a-user" >}})
|
||||
- [Add a user](../#add-a-user)
|
||||
- Ensure you have Grafana server administrator privileges
|
||||
|
||||
**To assign or remove Grafana administrator privileges**:
|
||||
|
||||
@@ -11,11 +11,11 @@ weight: 50
|
||||
|
||||
# Change a user's organization permissions
|
||||
|
||||
Update organization permissions when you want to enhance or restrict a user's access to organization resources. For more information about organization permissions, refer to [Organization roles]({{< relref "../../../roles-and-permissions/#organization-roles" >}}).
|
||||
Update organization permissions when you want to enhance or restrict a user's access to organization resources. For more information about organization permissions, refer to [Organization roles](../../../roles-and-permissions/#organization-roles).
|
||||
|
||||
## Before you begin
|
||||
|
||||
- [Add a user to an organization]({{< relref "./add-remove-user-to-org/" >}})
|
||||
- [Add a user to an organization](../add-remove-user-to-org/)
|
||||
- Ensure you have Grafana server administrator privileges
|
||||
|
||||
**To change a user's organization permissions**:
|
||||
|
||||
@@ -13,7 +13,7 @@ weight: 60
|
||||
|
||||
By default, the editor organization role does not allow editors to creator and manage teams. You can allow them to do so using the `editors_can_admin` configuration option.
|
||||
|
||||
When `editors_can_admin` is enabled, users with the Editor role in an organization can create teams, and they are Administrators of the teams they create. To learn more about team permissions, refer to [Team management]({{< relref "../../../team-management/" >}}).
|
||||
When `editors_can_admin` is enabled, users with the Editor role in an organization can create teams, and they are Administrators of the teams they create. To learn more about team permissions, refer to [Team management](../../../team-management/).
|
||||
|
||||
## Before you begin
|
||||
|
||||
@@ -23,7 +23,7 @@ When `editors_can_admin` is enabled, users with the Editor role in an organizati
|
||||
|
||||
1. Log in to the Grafana server and open the Grafana configuration file.
|
||||
|
||||
For more information about the Grafana configuration file and its location, refer to [Configuration]({{< relref "../../../../setup-grafana/configure-grafana/" >}}).
|
||||
For more information about the Grafana configuration file and its location, refer to [Configuration](../../../../setup-grafana/configure-grafana/).
|
||||
|
||||
1. Locate the `editors_can_admin` parameter.
|
||||
1. Set the `editors_can_admin` value to `true`.
|
||||
|
||||
@@ -50,7 +50,7 @@ Your profile includes your name, user name, and email address, which you can upd
|
||||
|
||||
## Edit your preferences
|
||||
|
||||
You can choose the way you would like data to appear in Grafana, including the UI theme, home dashboard, timezone, and first day of the week. You can set these preferences for your own account, for a team, for an organization, or Grafana-wide using configuration settings. Your user preferences take precedence over team, organization, and Grafana default preferences. For more information, see [Grafana preferences]({{< relref "../../organization-preferences/" >}}).
|
||||
You can choose the way you would like data to appear in Grafana, including the UI theme, home dashboard, timezone, and first day of the week. You can set these preferences for your own account, for a team, for an organization, or Grafana-wide using configuration settings. Your user preferences take precedence over team, organization, and Grafana default preferences. For more information, see [Grafana preferences](../../organization-preferences/).
|
||||
|
||||
- **UI theme** determines whether Grafana appears in light mode or dark mode. By default, UI theme is set to dark mode.
|
||||
- **Home dashboard** refers to the dashboard you see when you sign in to Grafana. By default, this is set to the Home dashboard.
|
||||
@@ -85,7 +85,7 @@ Every user is a member of at least one organization. You can have different role
|
||||
1. Click the user icon in the top right corner of the page and select **Profile**.
|
||||
1. Scroll down to the Organizations section and review the following information:
|
||||
- **Name**: The name of the organizations of which you are a member.
|
||||
- **Role**: The role to which you are assigned in the organization. For more information about roles and permissions, refer to [Organization users and permissions]({{< relref "../../roles-and-permissions/#organization-users-and-permissions" >}}).
|
||||
- **Role**: The role to which you are assigned in the organization. For more information about roles and permissions, refer to [Organization users and permissions](../../roles-and-permissions/#organization-users-and-permissions).
|
||||
- **Current**: Grafana indicates the organization that you are currently signed into as _Current_. If you are a member of multiple organizations, you can click **Select** to switch to that organization.
|
||||
|
||||
## View your Grafana sessions
|
||||
|
||||
@@ -16,7 +16,7 @@ weight: 114
|
||||
hero:
|
||||
title: Grafana Alerting
|
||||
level: 1
|
||||
image: /media/docs/alerting/alerting-bell-icon.png
|
||||
image: /media/docs/grafana-cloud/alerting-and-irm/grafana-icon-alerting.svg
|
||||
width: 100
|
||||
height: 100
|
||||
description: Grafana Alerting allows you to learn about problems in your systems moments after they occur.
|
||||
|
||||
@@ -83,11 +83,8 @@ Grafana-managed rules are the most flexible alert rule type. They allow you to c
|
||||
Multiple alert instances can be created as a result of one alert rule (also known as a multi-dimensional alerting).
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
For Grafana Cloud, there are limits on how many Grafana-managed alert rules you can create. These are as follows:
|
||||
|
||||
- Free: 100 alert rules
|
||||
- Paid: 2000 alert rules
|
||||
{{% /admonition %}}
|
||||
For Grafana Cloud, you can create 100 free Grafana-managed alert rules.
|
||||
{{% /admonition %}}
|
||||
|
||||
Grafana managed alert rules can only be edited or deleted by users with Edit permissions for the folder storing the rules.
|
||||
|
||||
@@ -256,7 +253,7 @@ You can configure the alert instance state when its evaluation returns no data:
|
||||
| No Data configuration | Description |
|
||||
| --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| No Data | The default option. Sets alert instance state to `No data`. <br/> The alert rule also creates a new alert instance `DatasourceNoData` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||
| Alerting | Sets alert instance state to `Alerting`. It waits until the [pending period](ref:pending-period) has finished. |
|
||||
| Alerting | Sets the alert instance state to `Pending` and then transitions to `Alerting` once the [pending period](ref:pending-period) ends. If you sent the pending period to 0, the alert instance state is immediately set to `Alerting`. |
|
||||
| Normal | Sets alert instance state to `Normal`. |
|
||||
| Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). |
|
||||
|
||||
@@ -265,7 +262,7 @@ You can also configure the alert instance state when its evaluation returns an e
|
||||
| Error configuration | Description |
|
||||
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Error | The default option. Sets alert instance state to `Error`. <br/> The alert rule also creates a new alert instance `DatasourceError` with the name and UID of the alert rule, and UID of the datasource that returned no data as labels. |
|
||||
| Alerting | Sets alert instance state to `Alerting`. It waits until the [pending period](ref:pending-period) has finished. |
|
||||
| Alerting | Sets alert instance state to `Alerting`. It transitions from `Pending` to `Alerting` after the [pending period](ref:pending-period) has finished. |
|
||||
| Normal | Sets alert instance state to `Normal`. |
|
||||
| Keep Last State | Maintains the alert instance in its last state. Useful for mitigating temporary issues, refer to [Keep last state](ref:keep-last-state). |
|
||||
|
||||
|
||||
@@ -43,33 +43,35 @@ refs:
|
||||
|
||||
# Configure data source-managed alert rules
|
||||
|
||||
Create alert rules for an external Grafana Mimir or Loki instance that has ruler API enabled; these are called data source-managed alert rules.
|
||||
Create data source-managed alert rules for Grafana Mimir or Grafana Loki data sources, which have been configured to support rule creation.
|
||||
|
||||
To configure your Grafana Mimir or Loki data source for alert rule creation, enable either the Loki Ruler API or the Mimir Ruler API.
|
||||
|
||||
For more information, refer to [Loki Ruler API](/docs/loki/<GRAFANA_VERSION>/api/#ruler) or [Mimir Ruler API](/docs/mimir/<GRAFANA_VERSION>/references/http-api/#ruler).
|
||||
|
||||
**Note**:
|
||||
|
||||
Alert rules for an external Grafana Mimir or Loki instance can be edited or deleted by users with Editor or Admin roles.
|
||||
Alert rules for a Grafana Mimir or Loki instance can be edited or deleted by users with Editor or Admin roles.
|
||||
|
||||
If you delete an alerting resource created in the UI, you can no longer retrieve it.
|
||||
To make a backup of your configuration and to be able to restore deleted alerting resources, create your alerting resources using file provisioning, Terraform, or the Alerting API.
|
||||
|
||||
## Before you begin
|
||||
|
||||
- Verify that you have write permission to the Prometheus or Loki data source. Otherwise, you will not be able to create or update Grafana Mimir managed alert rules.
|
||||
- Verify that you have write permission to the Mimir or Loki data source. Otherwise, you cannot create or update Grafana Mimir or Loki-managed alert rules.
|
||||
|
||||
- For Grafana Mimir and Loki data sources, enable the Ruler API by configuring their respective services.
|
||||
- Enable the Mimir or Loki Ruler API.
|
||||
|
||||
- **Loki** - The `local` rule storage type, default for the Loki data source, supports only viewing of rules. To edit rules, configure one of the other rule storage types.
|
||||
|
||||
- **Grafana Mimir** - use the `/prometheus` prefix. The Prometheus data source supports both Grafana Mimir and Prometheus, and Grafana expects that both the [Query API](/docs/mimir/latest/operators-guide/reference-http-api/#querier--query-frontend) and [Ruler API](/docs/mimir/latest/operators-guide/reference-http-api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
|
||||
|
||||
Watch this video to learn more about how to create a Mimir managed alert rule: {{< vimeo 720001865 >}}
|
||||
Watch this video to learn more about how to create a Mimir-managed alert rule: {{< vimeo 720001865 >}}
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you do not want to manage alert rules for a particular Loki or Prometheus data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
|
||||
If you do not want to manage alert rules for a particular Loki or Mimir data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
|
||||
{{% /admonition %}}
|
||||
|
||||
In the following sections, we’ll guide you through the process of creating your data source-managed alert rules.
|
||||
|
||||
To create a data source-managed alert rule, use the in-product alert creation flow and follow these steps to help you.
|
||||
|
||||
## Set alert rule name
|
||||
|
||||
@@ -32,6 +32,10 @@ All templates should be written in [text/template](https://pkg.go.dev/text/templ
|
||||
|
||||
Each template is evaluated whenever the alert rule is evaluated, and is evaluated for every alert separately. For example, if your alert rule has a templated summary annotation, and the alert rule has 10 firing alerts, then the template will be executed 10 times, once for each alert. You should try to avoid doing expensive computations in your templates as much as possible.
|
||||
|
||||
{{% admonition type="caution" %}}
|
||||
Extra whitespace in label templates can break matches with notification policies.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Examples
|
||||
|
||||
The following examples attempt to show the most common use-cases we have seen for templates. You can use these examples verbatim, or adapt them as necessary for your use case. For more information on how to write text/template refer see [the beginner's guide to alert notification templates in Grafana](https://grafana.com/blog/2023/04/05/grafana-alerting-a-beginners-guide-to-templating-alert-notifications/).
|
||||
|
||||
@@ -93,6 +93,15 @@ To remove a silence, complete the following steps.
|
||||
|
||||
> **Note:** You cannot remove a silence manually. Silences that have ended are retained and listed for five days.
|
||||
|
||||
## Rule-specific silences
|
||||
|
||||
Rule-specific silences are silences that apply only to a specific alert rule.
|
||||
They're created when you silence an alert rule directly using the **Silence notifications** action in the UI.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
As opposed to general silences, rule-specific silence access is tied directly to the alert rule they act on. They can be created manually by including the specific label matcher: `__alert_rule_uid__=<alert rule UID>`.
|
||||
{{< /admonition >}}
|
||||
|
||||
## Useful links
|
||||
|
||||
[Aggregation operators](https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators)
|
||||
|
||||
@@ -31,6 +31,11 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-email/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-email/
|
||||
discord:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-discord/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-discord/
|
||||
telegram:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram/
|
||||
@@ -41,6 +46,11 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier/
|
||||
opsgenie:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-opsgenie/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-opsgenie/
|
||||
pagerduty:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/pager-duty/
|
||||
@@ -56,6 +66,11 @@ refs:
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-slack/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-slack/
|
||||
teams:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/manage-contact-points/integrations/configure-teams/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/manage-contact-points/integrations/configure-teams/
|
||||
external-alertmanager:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/set-up/configure-alertmanager/
|
||||
@@ -144,14 +159,14 @@ The following table lists the contact point integrations supported by Grafana.
|
||||
| Alertmanager | `prometheus-alertmanager` |
|
||||
| Cisco Webex Teams | `webex` |
|
||||
| DingDing | `dingding` |
|
||||
| Discord | `discord` |
|
||||
| [Discord](ref:discord) | `discord` |
|
||||
| [Email](ref:email) | `email` |
|
||||
| Google Chat | `googlechat` |
|
||||
| [Grafana Oncall](ref:oncall) | `oncall` |
|
||||
| Kafka REST Proxy | `kafka` |
|
||||
| Line | `line` |
|
||||
| Microsoft Teams | `teams` |
|
||||
| Opsgenie | `opsgenie` |
|
||||
| [Microsoft Teams](ref:teams) | `teams` |
|
||||
| [Opsgenie](ref:opsgenie) | `opsgenie` |
|
||||
| [Pagerduty](ref:pagerduty) | `pagerduty` |
|
||||
| Pushover | `pushover` |
|
||||
| Sensu Go | `sensugo` |
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-amazon-sns/
|
||||
description: Configure the Grafana Alerting - Amazon SNS integration to receive alert notifications when your alerts are firing.
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Amazon SNS
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Amazon SNS
|
||||
title: Configure Amazon SNS for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Amazon SNS for Alerting
|
||||
|
||||
Use the Grafana Alerting - Amazon SNS integration to send notifications to Amazon SNS when your alerts are firing.
|
||||
|
||||
## Before you begin
|
||||
|
||||
To configure Amazon SNS to receive alert notifications, complete the following steps.
|
||||
|
||||
1. Create a new topic in https://console.aws.amazon.com/sns.
|
||||
1. Open the topic and create a new subscription.
|
||||
1. Choose the protocol HTTPS.
|
||||
1. Copy the URL.
|
||||
|
||||
For more information, refer to [Amazon SNS documentation](https://docs.aws.amazon.com/sns/latest/dg/welcome.html).
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your Amazon SNS integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **AWS SNS**.
|
||||
1. Copy in the URL from above into the **The Amazon SNS API URL** field.
|
||||
1. Click **Test** to check that your integration works.
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Amazon SNS contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
@@ -0,0 +1,58 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-discord/
|
||||
description: Configure the Discord integration to receive notifications when your alerts are firing
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Discord
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Discord
|
||||
title: Configure Discord for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Discord for Alerting
|
||||
|
||||
Use the Grafana Alerting - Discord integration to receive alert notifications in your Discord channels when your Grafana alert rules are triggered and resolved.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Create a Webhook to enable Grafana to send alert notifications to Discord channels.
|
||||
|
||||
To create a Webhook in Discord, complete the following steps.
|
||||
|
||||
1. Follow the steps in the [Intro to Webhooks guide](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks).
|
||||
1. Copy the Webhook URL.
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your Discord integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **Discord**.
|
||||
1. In the **Webhook URL** field, paste in your Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
A test alert notification should be sent to the Discord channel that you associated with the Webhook.
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Discord contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under **Notifications** click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. Click **Save rule and exit**.
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Email
|
||||
title: Configure email for Alerting
|
||||
weight: 300
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure email for Alerting
|
||||
@@ -75,18 +75,21 @@ To set up email integration, complete the following steps.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **Email**.
|
||||
1. Enter the email addresses you want to send notifications to.
|
||||
|
||||
E-mail addresses are case sensitive. Ensure that the e-mail address entered is correct.
|
||||
|
||||
1. Click **Test** to check that your integration works.
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
To add the contact point and integration you created to your default notification policy, complete the following steps.
|
||||
The email contact point is ready to receive alert notifications.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Notification policies**.
|
||||
1. In the **Default policy**, click the ellipsis icon (…) and then **Edit**.
|
||||
1. Change the default policy to the contact point you created.
|
||||
1. Click **Update default policy**.
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you have more than one contact point, add a new child notification policy rather than edit the default one, so you can route specific alerts to one or multiple email addresses.
|
||||
{{% /admonition %}}
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-google-chat/
|
||||
description: Configure the Google Chat integration to receive notifications when your alerts are firing
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Google Chat
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Google Chat
|
||||
title: Configure Google Chat for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Google Chat for Alerting
|
||||
|
||||
Use the Grafana Alerting - Google Chat integration to receive alert notifications in your Google Chat space when your Grafana alert rules are triggered and resolved.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Create a Webhook to enable Grafana to send alert notifications to a Google Chat space.
|
||||
To create a Webhook in Google Chat space, complete the following steps.
|
||||
|
||||
1. Follow the steps in [Google's Chat app guide](https://developers.google.com/workspace/chat/quickstart/webhooks#create_a_webhook).
|
||||
1. Copy the Webhook URL.
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your Google Chat integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **Google Chat**.
|
||||
1. In the **URL** field, paste in your Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
A test alert notification should be sent to the Google Chat space that you associated with the Webhook.
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Google Chat contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under **Notifications** click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. Click **Save rule and exit**.
|
||||
@@ -2,6 +2,7 @@
|
||||
aliases:
|
||||
- ../../../alerting-rules/manage-contact-points/configure-oncall/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/manage-contact-points/configure-oncall/
|
||||
- ../../../alerting-rules/manage-contact-points/integrations/configure-oncall/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/manage-contact-points/integrations/configure-oncall/
|
||||
- ../configure-oncall/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/manage-contact-points/configure-oncall/
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-oncall/
|
||||
description: Configure the Alerting - Grafana OnCall integration to connect alerts generated by Grafana Alerting with Grafana OnCall
|
||||
keywords:
|
||||
@@ -9,8 +10,6 @@ keywords:
|
||||
- alerting
|
||||
- oncall
|
||||
- integration
|
||||
aliases:
|
||||
- ../configure-oncall/ # /docs/grafana/<GRAFANA_VERSION>/alerting/alerting-rules/manage-contact-points/configure-oncall/
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
@@ -18,65 +17,57 @@ labels:
|
||||
- oss
|
||||
menuTitle: Grafana OnCall
|
||||
title: Configure Grafana OnCall for Alerting
|
||||
weight: 300
|
||||
refs:
|
||||
oncall-integration:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/oncall/latest/integrations/grafana-alerting/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/oncall/integrations/grafana-alerting/
|
||||
create-notification-policy:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/grafana/<GRAFANA_VERSION>/alerting/configure-notifications/create-notification-policy/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/create-notification-policy/
|
||||
escalation-chain:
|
||||
- pattern: /docs/grafana/
|
||||
destination: /docs/oncall/latest/configure/escalation-chains-and-routes/
|
||||
- pattern: /docs/grafana-cloud/
|
||||
destination: /docs/grafana-cloud/alerting-and-irm/oncall/configure/escalation-chains-and-routes/
|
||||
weight: 0
|
||||
---
|
||||
|
||||
## Configure Grafana OnCall for Alerting
|
||||
# Configure Grafana OnCall for Alerting
|
||||
|
||||
Use the Grafana Alerting - Grafana OnCall integration to effortlessly connect alerts generated by Grafana Alerting with Grafana OnCall, where you can then route them according to defined escalation chains and schedules.
|
||||
|
||||
You can set up the integration using the Grafana Alerting application or the Grafana OnCall application. For more information on setting it up from the Grafana OnCall application, see [Grafana OnCall documentation](ref:oncall-integration).
|
||||
{{< admonition type="note" >}}
|
||||
You can also configure the integration from Grafana OnCall. For more information, refer to [Grafana OnCall documentation](http://grafana.com/docs/oncall/latest/integrations/grafana-alerting/).
|
||||
{{< /admonition >}}
|
||||
|
||||
### Before you begin
|
||||
## Before you begin
|
||||
|
||||
- Ensure you have Installed and enabled the Grafana OnCall plugin
|
||||
- Ensure your version of Grafana is up-to-date and supports the new features
|
||||
Grafana OnCall is available in Grafana Cloud by default.
|
||||
|
||||
### Procedure
|
||||
If you are using Grafana OSS, [install and enable the Grafana OnCall plugin](http://grafana.com/docs/oncall/latest/set-up/open-source/#install-grafana-oncall-oss). Also, ensure your version of Grafana is up-to-date and supports the new features.
|
||||
|
||||
## Procedure
|
||||
|
||||
To set up the Grafana OnCall integration using the Grafana Alerting application, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts&IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select Grafana OnCall.
|
||||
|
||||
**Note:**
|
||||
1. From the **Integration** list, select **Grafana OnCall**.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
The Grafana OnCall integration is only available for Grafana Alertmanager.
|
||||
{{< /admonition >}}
|
||||
|
||||
1. Choose whether to add a new OnCall integration or add an existing one.
|
||||
|
||||
- If you add a new one, enter an Integration name.
|
||||
- If you add an existing one, choose from the list of available integrations
|
||||
|
||||
- If you add an existing one, choose from the list of available integrations.
|
||||
1. Click **Save contact point**.
|
||||
1. On the contact points list view page, you should see a link to Grafana OnCall.
|
||||
|
||||
1. On the Contact points list view page, you can see the contact point with the Grafana OnCall icon.
|
||||
If the integration is not being used anywhere in the notification policies tree, it has **Unused** as its status in the **Health** column. It won’t receive any notifications, because there are no notifications using that integration.
|
||||
|
||||
If the integration is not yet being used anywhere in the notification policies tree, it will have **Unused** as its status in the **Health** column. It won’t receive any notifications, because there are no notifications using that integration.
|
||||
1. To see the integration details and test the integration, click the link to Grafana OnCall on the contact points list view page.
|
||||
1. Click **Send demo alert** > **Send alert**.
|
||||
1. Go to Grafana OnCall **Alert Groups**. You should see the demo alert.
|
||||
|
||||
1. Connect your contact point to a notification policy.
|
||||
## Next steps
|
||||
|
||||
For more information on connecting your contact point to a notification policy, see
|
||||
[Create notification policy](ref:create-notification-policy).
|
||||
The OnCall contact point is ready to receive alert notifications.
|
||||
|
||||
1. To view your integration in the Grafana OnCall application and set up routes and escalation chains, click the Link next to the integration on the Contact points list view page in the **Type** column.
|
||||
To add the contact point to your alert rule, complete the following next steps:
|
||||
|
||||
This redirects you to the Grafana OnCall integration page in the Grafana OnCall application. From there, you can add [routes and escalation chains](ref:escalation-chain).
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under **Notifications**, click **Select contact point**.
|
||||
1. From the drop-down menu, select the contact point you created.
|
||||
1. Click **Save rule and exit**.
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-opsgenie/
|
||||
description: Configure the Opsgenie integration to receive notifications when your alerts are firing
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Opsgenie
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Opsgenie
|
||||
title: Configure Opsgenie for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Opsgenie for Alerting
|
||||
|
||||
Use the Grafana Alerting - Opsgenie integration to receive alert notifications in your Opsgenie alert dashboard when your Grafana alert rules are triggered and resolved.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Create an API key to enable Grafana to send alert notifications to Opsgenie alert dashboard.
|
||||
|
||||
To create an API key in Opsgenie, complete the following steps.
|
||||
|
||||
1. Follow the steps in the [API integration guide](https://support.atlassian.com/opsgenie/docs/create-a-default-api-integration/).
|
||||
|
||||
Make sure you turn on the integration.
|
||||
|
||||
1. Copy the API key.
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your Opsgenie integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the **Integration** list, select **Opsgenie**.
|
||||
1. In the **API key** field, paste in your API key.
|
||||
1. In the **Alert API URL**, enter `https://api.opsgenie.com/v2/alerts`.
|
||||
1. Click **Test** to check that your integration works.
|
||||
|
||||
A test alert notification is sent to the Alerts page in Opsgenie.
|
||||
|
||||
1. Click **Save contact point**.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Opsgenie contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert rule, complete the following steps:
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under **Notifications**, click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. Click **Save rule and exit**.
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Slack
|
||||
title: Configure Slack for Alerting
|
||||
weight: 300
|
||||
weight: 0
|
||||
refs:
|
||||
nested-policy:
|
||||
- pattern: /docs/grafana/
|
||||
@@ -82,12 +82,13 @@ To create your Slack integration in Grafana Alerting, complete the following ste
|
||||
|
||||
## Next steps
|
||||
|
||||
To add the contact point and integration you created to your default notification policy, complete the following steps.
|
||||
The Slack contact point is ready to receive alert notifications.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Notification policies**.
|
||||
1. In the **Default policy**, click the ellipsis icon (…) and then **Edit**.
|
||||
1. Change the default policy to the contact point you created.
|
||||
1. Click **Update default policy**.
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
**Note:**
|
||||
If you have more than one contact point, add a new notification policy rather than edit the default one, so you can route specific alerts to Slack. For more information, refer to [Notification policies](ref:nested-policy).
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
---
|
||||
canonical: https://grafana.com/docs/grafana/latest/alerting/configure-notifications/manage-contact-points/integrations/configure-teams/
|
||||
description: Configure Microsoft Teams integration to receive notifications when your alerts are firing
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- Microsoft Teams
|
||||
- integration
|
||||
labels:
|
||||
products:
|
||||
- cloud
|
||||
- enterprise
|
||||
- oss
|
||||
menuTitle: Microsoft Teams
|
||||
title: Configure Microsoft Teams for Alerting
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Microsoft Teams for Alerting
|
||||
|
||||
Use the Grafana Alerting - Microsoft Teams integration to receive notifications in your team’s channel when your alerts are firing.
|
||||
|
||||
## Before you begin
|
||||
|
||||
To set up Microsoft Teams for integration with Grafana Alerting, create a new workflow that accepts Webhook requests. This allows Grafana to send alert notifications to Microsoft Teams channels.
|
||||
|
||||
### Create a workflow in Microsoft Teams
|
||||
|
||||
1. To create a new workflow, follow the steps in [Create flows in Microsoft Teams](https://learn.microsoft.com/en-us/power-automate/teams/teams-app-create).
|
||||
1. Microsoft provides a template library. You can use the template **Post to a channel when a webhook request is received**.
|
||||
1. At the end of workflow creation wizard, copy the URL that is provided.
|
||||
|
||||
**Note**
|
||||
If you chose a private channel for the target of the workflow, you need to edit workflow before using it. Expand the step "Send each adaptive card", and then expand action "Post your own adaptive card as the Flow bot to a channel". Change "Post as" to User, and save the workflow.
|
||||
|
||||
## Procedure
|
||||
|
||||
To create your MS Teams integration in Grafana Alerting, complete the following steps.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
|
||||
1. Click **+ Add contact point**.
|
||||
1. Enter a contact point name.
|
||||
1. From the Integration list, select **Microsoft Teams**.
|
||||
1. In the **URL** field, copy in your Webhook URL.
|
||||
1. Click **Test** to check that your integration works.
|
||||
A test alert notification should be sent to the MS Team channel.
|
||||
1. Click **Save** contact point.
|
||||
|
||||
## Next steps
|
||||
|
||||
The Microsoft Teams contact point is ready to receive alert notifications.
|
||||
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
- If Grafana reports that notification was sent successfully but it was not delivered to the channel, check the workflow's run history. You can find it in the workflow details page.
|
||||
@@ -13,7 +13,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Telegram
|
||||
title: Configure Telegram for Alerting
|
||||
weight: 300
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure Telegram for Alerting
|
||||
@@ -24,7 +24,7 @@ Use the Grafana Alerting - Telegram integration to send [Telegram](https://teleg
|
||||
|
||||
### Telegram bot API token and chat ID
|
||||
|
||||
To integrate Grafana with Telegram, you need to obtain a Telegram **bot API token** and a **chat ID** (i.e., the ID of the Telegram chat where you want to receive the alert notifications).
|
||||
To integrate Grafana with Telegram, you need to get a Telegram **bot API token** and a **chat ID** (the ID of the Telegram chat where you want to receive the alert notifications). To complete the integration, use the browser version of Telegram.
|
||||
|
||||
### Set up your Telegram bot
|
||||
|
||||
@@ -44,29 +44,9 @@ Add the bot to a group chat by following the steps below. Once the bot is added
|
||||
|
||||
1. In the Telegram app, **open a group or start a new one**.
|
||||
1. Search and **add the bot to the group**.
|
||||
1. **Interact with the bot** by sending a dummy message that starts with "`/`". E.g. `/hola @bot_name`.
|
||||
1. Copy the **chat ID** from the URL in your browser's address bar. It should look like this: `https://web.telegram.org/a/#-4266674385`.
|
||||
|
||||
{{< figure src="/media/blog/telegram-grafana-alerting/telegram-screenshot.png" alt="A screenshot that shows a message to a Telegram bot." >}}
|
||||
|
||||
1. To obtain the **chat ID**, send an [HTTP request](https://core.telegram.org/bots/api#getupdates) to the bot. Copy the below URL and replace `{your_bot_api_token}` with your bot API token.
|
||||
|
||||
```
|
||||
https://api.telegram.org/bot{your_bot_api_token}/getUpdates
|
||||
```
|
||||
|
||||
1. **Paste the URL in your browser**.
|
||||
1. If the request is successful, it will return a response in JSON format.
|
||||
|
||||
```
|
||||
...
|
||||
"chat": {
|
||||
"id": -4065678900,
|
||||
"title": "Tony and Hello world bot",
|
||||
"type": "group",
|
||||
...
|
||||
```
|
||||
|
||||
1. Copy the value of the `“id”` that appears under `“chat”`.
|
||||
The chat ID is the sequence of numbers that follows the `#` symbol. For example: `-4266674385`.
|
||||
|
||||
## Procedure
|
||||
|
||||
@@ -83,13 +63,13 @@ To create your Telegram integration in Grafana Alerting, complete the following
|
||||
|
||||
## Next steps
|
||||
|
||||
To add the contact point and integration you created to your default notification policy, complete the following steps.
|
||||
The Telegram contact point is ready to receive alert notifications.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Notification policies**.
|
||||
1. In the **Default policy**, click the ellipsis icon (…) and then **Edit**.
|
||||
1. Change the default policy to the contact point you created.
|
||||
1. Click **Update default policy**.
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
{{<admonition type="note">}}
|
||||
If you have more than one contact point, add a new child notification policy rather than edit the default one, so you can route specific alerts to Telegram.
|
||||
{{</admonition>}}
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
@@ -14,7 +14,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: PagerDuty
|
||||
title: Configure PagerDuty for Alerting
|
||||
weight: 400
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure PagerDuty for Alerting
|
||||
@@ -63,11 +63,13 @@ To create your PagerDuty integration in Grafana Alerting, complete the following
|
||||
|
||||
## Next steps
|
||||
|
||||
To add the contact point and integration you created to your default notification policy, complete the following steps.
|
||||
The PagerDuty contact point is ready to receive alert notifications.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Notification policies**.
|
||||
1. In the Default policy, click the ellipsis icon (…) and then **Edit**.
|
||||
1. Change the default policy to the contact point you created.
|
||||
1. Click **Update default policy**.
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
{{< admonition type="note" >}} If you have more than one contact point, add a new notification policy rather than edit the default one, so you can route specific alerts to PagerDuty. {{< /admonition >}}
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
@@ -21,7 +21,7 @@ labels:
|
||||
- oss
|
||||
menuTitle: Webhook notifier
|
||||
title: Configure the webhook notifier for Alerting
|
||||
weight: 200
|
||||
weight: 0
|
||||
---
|
||||
|
||||
# Configure the webhook notifier for Alerting
|
||||
@@ -156,13 +156,13 @@ To create your webhook integration in Grafana Alerting, complete the following s
|
||||
|
||||
## Next steps
|
||||
|
||||
To add the contact point and integration you created to your default notification policy, complete the following steps.
|
||||
The Webhook contact point is ready to receive alert notifications.
|
||||
|
||||
1. Navigate to **Alerts & IRM** -> **Alerting** -> **Notification policies**.
|
||||
1. In the **Default policy**, click the ellipsis icon (…) and then **Edit**.
|
||||
1. Change the default policy to the contact point you created.
|
||||
1. Click **Update default policy**.
|
||||
To add this contact point to your alert, complete the following steps.
|
||||
|
||||
{{< admonition type="note" >}}
|
||||
If you have more than one contact point, add a new notification policy rather than edit the default one, so you can route specific alerts to your webhook.
|
||||
{{< /admonition >}}
|
||||
1. In Grafana, navigate to **Alerting** > **Alert rules**.
|
||||
1. Edit or create a new alert rule.
|
||||
1. Scroll down to the **Configure labels and notifications** section.
|
||||
1. Under Notifications, click **Select contact point**.
|
||||
1. From the drop-down menu, select the previously created contact point.
|
||||
1. **Click Save rule and exit**.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user