Compare commits
195 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c0c14de5d | ||
|
|
20dbbe4b3e | ||
|
|
85f581105a | ||
|
|
b571acc1dc | ||
|
|
f80476a7ef | ||
|
|
9da278c044 | ||
|
|
c4e6e05687 | ||
|
|
41a40e1b6c | ||
|
|
fc270ca118 | ||
|
|
b676abe80b | ||
|
|
7e2e76aa90 | ||
|
|
24f22fd4c2 | ||
|
|
173bce8658 | ||
|
|
358e68789b | ||
|
|
54ecf42fdf | ||
|
|
0f6107c885 | ||
|
|
947d9ce8e5 | ||
|
|
593efb698e | ||
|
|
c1cf22beaf | ||
|
|
7c1f70af4f | ||
|
|
6761c1de5f | ||
|
|
609f2f894a | ||
|
|
439abe275d | ||
|
|
702bdb9c5f | ||
|
|
b836412af5 | ||
|
|
42b8c446d7 | ||
|
|
27f1c66cc8 | ||
|
|
42c56c3186 | ||
|
|
d797054848 | ||
|
|
23487da3a4 | ||
|
|
0fb5cae8bf | ||
|
|
f7bddd5315 | ||
|
|
92e263c47f | ||
|
|
aff11d8d11 | ||
|
|
016af7845e | ||
|
|
b8c5495774 | ||
|
|
abaff05adf | ||
|
|
b0ef776ed8 | ||
|
|
af9bde9f08 | ||
|
|
983850eb12 | ||
|
|
db84cf55b3 | ||
|
|
3bc2a28006 | ||
|
|
f3cc439986 | ||
|
|
a3a59c5475 | ||
|
|
206d976b8b | ||
|
|
9f4459bab9 | ||
|
|
b486ffaa7c | ||
|
|
da3f44bf42 | ||
|
|
38b2062ddb | ||
|
|
fda7a54310 | ||
|
|
b859dac451 | ||
|
|
09f3d92f51 | ||
|
|
7a4497ab99 | ||
|
|
2fc60d3133 | ||
|
|
05b4ce4861 | ||
|
|
0d2524589b | ||
|
|
a39652741b | ||
|
|
8d076c38d0 | ||
|
|
b5a2dda7ff | ||
|
|
595344a3d0 | ||
|
|
3ff24b2731 | ||
|
|
f6365646a7 | ||
|
|
e2f3ce1703 | ||
|
|
51144a427f | ||
|
|
6d050f5d8f | ||
|
|
fbf3fe69b5 | ||
|
|
936b3d8327 | ||
|
|
c3275d23ff | ||
|
|
8f5fbb88ac | ||
|
|
b7c66294fa | ||
|
|
68b9af48db | ||
|
|
98eab48d38 | ||
|
|
f7c5f093ab | ||
|
|
b2b87464d7 | ||
|
|
21245470ae | ||
|
|
6d5399f792 | ||
|
|
3472ce7f70 | ||
|
|
b273a96985 | ||
|
|
12e0b2e860 | ||
|
|
97bee8a53a | ||
|
|
b7cc6fdf94 | ||
|
|
06b71c24c6 | ||
|
|
80784cbfab | ||
|
|
ca32cadaf3 | ||
|
|
3303eb7881 | ||
|
|
d9a39c1553 | ||
|
|
c8f4918e48 | ||
|
|
e61cc31378 | ||
|
|
d34b2eb738 | ||
|
|
855dbd6eaa | ||
|
|
d646f49ea0 | ||
|
|
90364a9173 | ||
|
|
89410ffd0c | ||
|
|
04ec76aaf3 | ||
|
|
404abe2be6 | ||
|
|
4c1225219c | ||
|
|
2f1f764364 | ||
|
|
3d55cc9b47 | ||
|
|
5f51a1425b | ||
|
|
93db981c89 | ||
|
|
81626ba88d | ||
|
|
aff26ac8ae | ||
|
|
8fe0c9452e | ||
|
|
b67d62c016 | ||
|
|
d3d45680d4 | ||
|
|
946622f7c6 | ||
|
|
b0124f0648 | ||
|
|
48676a95a1 | ||
|
|
ced6d5591a | ||
|
|
b1d62efb9f | ||
|
|
32fcbd78b5 | ||
|
|
131b857bd2 | ||
|
|
f500459303 | ||
|
|
85dc4fc505 | ||
|
|
1c9091f85d | ||
|
|
99039d8cf6 | ||
|
|
41a300a4f4 | ||
|
|
4d28c496b6 | ||
|
|
e962b2fd5d | ||
|
|
2760c71038 | ||
|
|
4cfc7a94df | ||
|
|
3425aace85 | ||
|
|
887cde9b0d | ||
|
|
714925777a | ||
|
|
58d5bc8f8f | ||
|
|
aa20e2125c | ||
|
|
25e991c523 | ||
|
|
7852384e10 | ||
|
|
ef4749bcb4 | ||
|
|
c80fb0c116 | ||
|
|
28997ed169 | ||
|
|
a41e6ae453 | ||
|
|
f80a9388cf | ||
|
|
1c05c66f33 | ||
|
|
fb0eb5ed60 | ||
|
|
e8e631d336 | ||
|
|
c4afe31c8e | ||
|
|
a78a93130d | ||
|
|
2e3292dbd3 | ||
|
|
e1f5d698e6 | ||
|
|
19a58da54c | ||
|
|
2619aead7f | ||
|
|
c4f57481fd | ||
|
|
ea2ac956cd | ||
|
|
afe763b4a3 | ||
|
|
3cb113d02a | ||
|
|
512a90e3e5 | ||
|
|
3339fc2210 | ||
|
|
ed52d422c1 | ||
|
|
bb398e9aac | ||
|
|
0e7ab2ea01 | ||
|
|
1bf8c8563d | ||
|
|
48ee6e6cb8 | ||
|
|
8f76cf81be | ||
|
|
67baeb765f | ||
|
|
6205d11afc | ||
|
|
9c3e1968da | ||
|
|
e7988dbb5a | ||
|
|
35d51435f4 | ||
|
|
eac9f6dd57 | ||
|
|
456d785f2f | ||
|
|
6267d4a3d5 | ||
|
|
843ca0a355 | ||
|
|
6e300048ed | ||
|
|
6f255cb089 | ||
|
|
d04f3fb2f1 | ||
|
|
05e6b345b6 | ||
|
|
8696aea01f | ||
|
|
9b816ea945 | ||
|
|
25f4599e76 | ||
|
|
8790142aef | ||
|
|
4f924a9b97 | ||
|
|
6da550f736 | ||
|
|
563b445185 | ||
|
|
e42f84f87d | ||
|
|
c64cecda0c | ||
|
|
031580ef3e | ||
|
|
1296582f4b | ||
|
|
b622632291 | ||
|
|
11ba65420d | ||
|
|
019a200107 | ||
|
|
1080729433 | ||
|
|
8526d2cb71 | ||
|
|
4a57bbce32 | ||
|
|
74734db443 | ||
|
|
fc4bab2463 | ||
|
|
ea4d653cce | ||
|
|
2c7c81cb7a | ||
|
|
9ea61eebfd | ||
|
|
83805b8b89 | ||
|
|
54356ac5b3 | ||
|
|
ba4dc6e77b | ||
|
|
af18359063 | ||
|
|
e39608eb3a | ||
|
|
6b805aaac5 |
@@ -1,5 +1,5 @@
|
||||
// BETTERER RESULTS V2.
|
||||
//
|
||||
//
|
||||
// If this file contains merge conflicts, use `betterer merge` to automatically resolve them:
|
||||
// https://phenomnomnominal.github.io/betterer/docs/results-file/#merge
|
||||
//
|
||||
@@ -11,19 +11,19 @@ exports[`no enzyme tests`] = {
|
||||
"packages/grafana-ui/src/components/Logs/LogRowContextProvider.test.tsx:943686035": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/QueryField/QueryField.test.tsx:375894800": [
|
||||
"packages/grafana-ui/src/components/QueryField/QueryField.test.tsx:2976628669": [
|
||||
[0, 26, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/braces.test.tsx:1691463920": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/braces.test.tsx:1440546721": [
|
||||
"packages/grafana-ui/src/slate-plugins/clear.test.tsx:3927593033": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/clear.test.tsx:1085648664": [
|
||||
"packages/grafana-ui/src/slate-plugins/runner.test.tsx:1123710822": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/runner.test.tsx:446043290": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/suggestions.test.tsx:3654981205": [
|
||||
"packages/grafana-ui/src/slate-plugins/suggestions.test.tsx:2682912140": [
|
||||
[0, 18, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/Scrubber.test.js:4256741694": [
|
||||
@@ -1102,11 +1102,9 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
|
||||
],
|
||||
"packages/grafana-runtime/src/config.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
||||
],
|
||||
"packages/grafana-runtime/src/services/AngularLoader.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
@@ -1366,8 +1364,7 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/DataLinks/SelectionReference.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
@@ -1700,11 +1697,7 @@ 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.", "13"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Select/SelectMenu.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
@@ -1826,7 +1819,12 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "6"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "7"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "8"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "9"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "10"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "11"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Table/TableCell.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
@@ -1951,8 +1949,7 @@ exports[`better eslint`] = {
|
||||
],
|
||||
"packages/grafana-ui/src/components/uPlot/Plot.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/uPlot/PlotLegend.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
@@ -2032,42 +2029,16 @@ exports[`better eslint`] = {
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/braces.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/clear.test.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/clear.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/clipboard.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "5"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/indentation.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/newline.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/runner.test.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/runner.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/selection_shortcuts.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/slate-prism/index.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
@@ -2089,8 +2060,7 @@ exports[`better eslint`] = {
|
||||
"packages/grafana-ui/src/slate-plugins/suggestions.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
||||
],
|
||||
"packages/grafana-ui/src/themes/ThemeContext.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
@@ -2822,11 +2792,7 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/app/core/components/Layers/LayerDragDropList.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/app/core/components/Layers/LayerName.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
@@ -3734,9 +3700,6 @@ exports[`better eslint`] = {
|
||||
"public/app/features/alerting/unified/components/rule-editor/AnnotationKeyInput.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/features/alerting/unified/components/rule-editor/AnnotationsField.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/features/alerting/unified/components/rule-editor/ExpressionEditor.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
@@ -4574,13 +4537,12 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "7"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "9"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "11"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "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.", "13"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"]
|
||||
],
|
||||
"public/app/features/dashboard/utils/panelMerge.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
@@ -4996,10 +4958,6 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
],
|
||||
"public/app/features/library-panels/components/LibraryPanelsSearch/reducer.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/library-panels/components/LibraryPanelsView/actions.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
@@ -7005,8 +6963,8 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "49"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "50"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "51"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "52"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "53"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "52"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "53"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "54"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "55"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "56"],
|
||||
@@ -7015,10 +6973,7 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "59"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "60"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "61"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "62"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "63"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "64"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "65"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "62"]
|
||||
],
|
||||
"public/app/plugins/datasource/graphite/datasource_integration.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
@@ -8708,40 +8663,17 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/GeomapPanel.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "7"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "9"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "10"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "11"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "13"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "14"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "15"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "17"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/components/DataHoverRows.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/components/DataHoverView.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/components/MarkersLegend.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "5"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "6"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/components/MeasureVectorLayer.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/editor/FrameSelectionEditor.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
@@ -8749,59 +8681,26 @@ exports[`better eslint`] = {
|
||||
],
|
||||
"public/app/plugins/panel/geomap/editor/GeomapStyleRulesEditor.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/editor/LayersEditor.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/editor/MapViewEditor.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/editor/StyleEditor.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "5"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "6"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "7"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "8"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "8"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "9"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "10"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "10"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "11"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "12"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "13"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "14"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "15"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "16"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "17"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "18"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "19"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "20"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "21"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "22"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "23"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "24"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "25"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "26"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "12"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/editor/StyleRuleEditor.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/editor/layerEditor.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/layers/basemaps/carto.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
@@ -8824,18 +8723,20 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/module.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/style/utils.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/types.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
"public/app/plugins/panel/geomap/utils/layers.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/utils/selection.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/utils/tootltip.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"public/app/plugins/panel/geomap/view.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
|
||||
@@ -29,17 +29,17 @@ $(DRONE): $(BINGO_DIR)/drone.mod
|
||||
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
|
||||
|
||||
SWAGGER := $(GOBIN)/swagger-v0.29.0
|
||||
$(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-v0.29.0"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.29.0 "github.com/go-swagger/go-swagger/cmd/swagger"
|
||||
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.40.1
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.49.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.40.1"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.40.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
@echo "(re)installing $(GOBIN)/golangci-lint-v1.49.0"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.49.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
|
||||
SWAGGER := $(GOBIN)/swagger-v0.30.2
|
||||
$(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-v0.30.2"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
|
||||
|
||||
WIRE := $(GOBIN)/wire-v0.5.0
|
||||
$(WIRE): $(BINGO_DIR)/wire.mod
|
||||
|
||||
@@ -1,5 +1,174 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.17
|
||||
go 1.19
|
||||
|
||||
require github.com/golangci/golangci-lint v1.40.1 // cmd/golangci-lint
|
||||
require github.com/golangci/golangci-lint v1.49.0 // cmd/golangci-lint
|
||||
|
||||
require (
|
||||
4d63.com/gochecknoglobals v0.1.0 // indirect
|
||||
github.com/Antonboom/errname v0.1.7 // indirect
|
||||
github.com/Antonboom/nilnil v0.1.1 // indirect
|
||||
github.com/BurntSushi/toml v1.2.0 // indirect
|
||||
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
|
||||
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
github.com/OpenPeeDeeP/depguard v1.1.0 // indirect
|
||||
github.com/alexkohler/prealloc v1.0.0 // indirect
|
||||
github.com/alingse/asasalint v0.0.11 // indirect
|
||||
github.com/ashanbrown/forbidigo v1.3.0 // indirect
|
||||
github.com/ashanbrown/makezero v1.1.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bkielbasa/cyclop v1.2.0 // indirect
|
||||
github.com/blizzy78/varnamelen v0.8.0 // indirect
|
||||
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
|
||||
github.com/breml/bidichk v0.2.3 // indirect
|
||||
github.com/breml/errchkjson v0.3.0 // indirect
|
||||
github.com/butuzov/ireturn v0.1.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/charithe/durationcheck v0.0.9 // indirect
|
||||
github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect
|
||||
github.com/curioswitch/go-reassign v0.1.2 // indirect
|
||||
github.com/daixiang0/gci v0.6.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/denis-tingaikin/go-header v0.4.3 // indirect
|
||||
github.com/esimonov/ifshort v1.0.4 // indirect
|
||||
github.com/ettle/strcase v0.1.1 // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/fatih/structtag v1.2.0 // indirect
|
||||
github.com/firefart/nonamedreturns v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/fzipp/gocyclo v0.6.0 // indirect
|
||||
github.com/go-critic/go-critic v0.6.4 // indirect
|
||||
github.com/go-toolsmith/astcast v1.0.0 // indirect
|
||||
github.com/go-toolsmith/astcopy v1.0.1 // indirect
|
||||
github.com/go-toolsmith/astequal v1.0.2 // indirect
|
||||
github.com/go-toolsmith/astfmt v1.0.0 // indirect
|
||||
github.com/go-toolsmith/astp v1.0.0 // indirect
|
||||
github.com/go-toolsmith/strparse v1.0.0 // indirect
|
||||
github.com/go-toolsmith/typep v1.0.2 // indirect
|
||||
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/gofrs/flock v0.8.1 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
|
||||
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
|
||||
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
|
||||
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect
|
||||
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect
|
||||
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
|
||||
github.com/golangci/misspell v0.3.5 // indirect
|
||||
github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect
|
||||
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
|
||||
github.com/google/go-cmp v0.5.8 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
|
||||
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
|
||||
github.com/gostaticanalysis/comment v1.4.2 // indirect
|
||||
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
|
||||
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hexops/gotextdiff v1.0.3 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/jgautheron/goconst v1.5.1 // indirect
|
||||
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
|
||||
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
|
||||
github.com/julz/importas v0.1.0 // indirect
|
||||
github.com/kisielk/errcheck v1.6.2 // indirect
|
||||
github.com/kisielk/gotool v1.0.0 // indirect
|
||||
github.com/kulti/thelper v0.6.3 // indirect
|
||||
github.com/kunwardeep/paralleltest v1.0.6 // indirect
|
||||
github.com/kyoh86/exportloopref v0.1.8 // indirect
|
||||
github.com/ldez/gomoddirectives v0.2.3 // indirect
|
||||
github.com/ldez/tagliatelle v0.3.1 // indirect
|
||||
github.com/leonklingele/grouper v1.1.0 // indirect
|
||||
github.com/lufeee/execinquery v1.2.1 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/maratori/testpackage v1.1.0 // indirect
|
||||
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.16 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
|
||||
github.com/mgechev/revive v1.2.3 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/moricho/tparallel v0.2.1 // indirect
|
||||
github.com/nakabonne/nestif v0.3.1 // indirect
|
||||
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
|
||||
github.com/nishanths/exhaustive v0.8.1 // indirect
|
||||
github.com/nishanths/predeclared v0.2.2 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
|
||||
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/polyfloyd/go-errorlint v1.0.2 // indirect
|
||||
github.com/prometheus/client_golang v1.12.1 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/quasilyte/go-ruleguard v0.3.17 // indirect
|
||||
github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect
|
||||
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
|
||||
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
|
||||
github.com/ryancurrah/gomodguard v1.2.4 // indirect
|
||||
github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect
|
||||
github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect
|
||||
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
|
||||
github.com/sashamelentyev/usestdlibvars v1.13.0 // indirect
|
||||
github.com/securego/gosec/v2 v2.13.1 // indirect
|
||||
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
|
||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||
github.com/sivchari/containedctx v1.0.2 // indirect
|
||||
github.com/sivchari/nosnakecase v1.7.0 // indirect
|
||||
github.com/sivchari/tenv v1.7.0 // indirect
|
||||
github.com/sonatard/noctx v0.0.1 // indirect
|
||||
github.com/sourcegraph/go-diff v0.6.1 // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/cobra v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.12.0 // indirect
|
||||
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
|
||||
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
|
||||
github.com/stretchr/objx v0.4.0 // indirect
|
||||
github.com/stretchr/testify v1.8.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.0 // indirect
|
||||
github.com/sylvia7788/contextcheck v1.0.6 // indirect
|
||||
github.com/tdakkota/asciicheck v0.1.1 // indirect
|
||||
github.com/tetafro/godot v1.4.11 // indirect
|
||||
github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect
|
||||
github.com/timonwong/logrlint v0.1.0 // indirect
|
||||
github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect
|
||||
github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect
|
||||
github.com/ultraware/funlen v0.0.3 // indirect
|
||||
github.com/ultraware/whitespace v0.0.5 // indirect
|
||||
github.com/uudashr/gocognit v1.0.6 // indirect
|
||||
github.com/yagipy/maintidx v1.0.0 // indirect
|
||||
github.com/yeya24/promlinter v0.2.0 // indirect
|
||||
gitlab.com/bosi/decorder v0.2.3 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
go.uber.org/zap v1.17.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/tools v0.1.12 // indirect
|
||||
google.golang.org/protobuf v1.28.0 // indirect
|
||||
gopkg.in/ini.v1 v1.66.6 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
honnef.co/go/tools v0.3.3 // indirect
|
||||
mvdan.cc/gofumpt v0.3.1 // indirect
|
||||
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
|
||||
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
|
||||
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.18
|
||||
|
||||
require github.com/go-swagger/go-swagger v0.29.0 // cmd/swagger
|
||||
require github.com/go-swagger/go-swagger v0.30.2 // cmd/swagger
|
||||
|
||||
@@ -1,48 +1,86 @@
|
||||
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
|
||||
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
|
||||
github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8=
|
||||
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ=
|
||||
github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o=
|
||||
github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
|
||||
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU=
|
||||
github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc=
|
||||
github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8=
|
||||
github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc=
|
||||
github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4=
|
||||
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
|
||||
github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
|
||||
github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA=
|
||||
github.com/go-openapi/loads v0.21.0 h1:jYtUO4wwP7psAweisP/MDoOpdzsYEESdoPcsWjHDR68=
|
||||
github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro=
|
||||
github.com/go-openapi/runtime v0.21.1 h1:/KIG00BzA2x2HRStX2tnhbqbQdPcFlkgsYCiNY20FZs=
|
||||
github.com/go-openapi/runtime v0.24.1 h1:Sml5cgQKGYQHF+M7yYSHaH1eOjvTykrddTE/KtQVjqo=
|
||||
github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
|
||||
github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI=
|
||||
github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM=
|
||||
github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o=
|
||||
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
|
||||
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
|
||||
github.com/go-openapi/validate v0.20.3 h1:GZPPhhKSZrE8HjB4eEkoYAZmoWA4+tCemSgINH1/vKw=
|
||||
github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y=
|
||||
github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
|
||||
github.com/go-swagger/go-swagger v0.29.0 h1:z3YoZtLvS1Y8TE/PCat1VypcZxM0IgKLt0NvZxQyNl8=
|
||||
github.com/go-swagger/go-swagger v0.29.0/go.mod h1:Z4GJzI+bHKKkGB2Ji1rawpi3/ldXX8CkzGIa9HAC5EE=
|
||||
github.com/go-swagger/go-swagger v0.30.2 h1:23odPUyQZdkNFZZSBJ3mqYYcdh+LnuReEbdWN18OMRo=
|
||||
github.com/go-swagger/go-swagger v0.30.2/go.mod h1:neDPes8r8PCz2JPvHRDj8BTULLh4VJUt7n6MpQqxhHM=
|
||||
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
|
||||
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw=
|
||||
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
|
||||
github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
||||
github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
|
||||
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
|
||||
github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
|
||||
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
||||
github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
|
||||
github.com/spf13/afero v1.8.0 h1:5MmtuhAgYeU6qpa7w7bP0dv6MBYuup0vekhSpSkoq60=
|
||||
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
|
||||
github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
|
||||
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
|
||||
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk=
|
||||
github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ=
|
||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
||||
github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI=
|
||||
github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9rrstGQ=
|
||||
go.mongodb.org/mongo-driver v1.8.2 h1:8ssUXufb90ujcIvR6MyE1SchaNj0SFxsakiZgxIyrMk=
|
||||
go.mongodb.org/mongo-driver v1.10.1 h1:NujsPveKwHaWuKUer/ceo9DzEe7HIj1SlJ6uvXZG0S4=
|
||||
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM=
|
||||
golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
|
||||
golang.org/x/net v0.0.0-20220121210141-e204ce36a2ba h1:6u6sik+bn/y7vILcYkK3iwTBWN7WtBvB0+SZswQnbf8=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
|
||||
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w=
|
||||
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
gopkg.in/ini.v1 v1.66.3 h1:jRskFVxYaMGAMUbN0UZ7niA9gzL9B49DOqE78vg0k3w=
|
||||
gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
|
||||
@@ -12,9 +12,9 @@ BRA="${GOBIN}/bra-v0.0.0-20200517080246-1e3013ecaff8"
|
||||
|
||||
DRONE="${GOBIN}/drone-v1.5.0"
|
||||
|
||||
SWAGGER="${GOBIN}/swagger-v0.29.0"
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.49.0"
|
||||
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.40.1"
|
||||
SWAGGER="${GOBIN}/swagger-v0.30.2"
|
||||
|
||||
WIRE="${GOBIN}/wire-v0.5.0"
|
||||
|
||||
|
||||
596
.drone.yml
596
.drone.yml
File diff suppressed because it is too large
Load Diff
4
.github/renovate.json5
vendored
4
.github/renovate.json5
vendored
@@ -4,12 +4,10 @@
|
||||
],
|
||||
"enabledManagers": ["npm"],
|
||||
"ignoreDeps": [
|
||||
"@grafana/slate-react", // should be updated when the `slate` package is updated
|
||||
"@types/systemjs",
|
||||
"@types/d3-force", // we should bump this once we move to esm modules
|
||||
"@types/d3-interpolate", // we should bump this once we move to esm modules
|
||||
"@types/d3-scale-chromatic", // we should bump this once we move to esm modules
|
||||
"@types/grafana__slate-react", // should be updated when the `slate` package is updated
|
||||
"@types/react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
|
||||
"commander", // we are planning to remove this, so no need to update it
|
||||
"d3",
|
||||
@@ -25,8 +23,6 @@
|
||||
"react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
|
||||
"react-redux", // react-beautiful-dnd depends on react-redux 7.x, we need to update that one first
|
||||
"react-router-dom", // we should bump this together with history
|
||||
"slate",
|
||||
"slate-plain-serializer",
|
||||
"systemjs",
|
||||
"copy-webpack-plugin", // try to upgrade with newer yarn release. Not working with 3.1.1
|
||||
"ts-loader", // we should remove ts-loader and use babel-loader instead
|
||||
|
||||
20
.github/workflows/sbom-report.yml
vendored
Normal file
20
.github/workflows/sbom-report.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: syft-sbom-ci
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
syft-sbom:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Anchore SBOM Action
|
||||
uses: anchore/sbom-action@v0.12.0
|
||||
with:
|
||||
artifact-name: ${{ github.event.repository.name }}-spdx.json
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -118,6 +118,7 @@ pkg/cmd/grafana-server/__debug_bin
|
||||
|
||||
/scripts/build/release_publisher/release_publisher
|
||||
*.patch
|
||||
!.yarn/patches/*.patch
|
||||
|
||||
# Ignoring frontend packages specifics
|
||||
/packages/**/dist
|
||||
|
||||
@@ -22,13 +22,12 @@ rules = "pkg/ruleguard.rules.go"
|
||||
disable-all = true
|
||||
enable = [
|
||||
"bodyclose",
|
||||
"deadcode",
|
||||
"depguard",
|
||||
"dogsled",
|
||||
"errcheck",
|
||||
# "gochecknoinits",
|
||||
"goconst",
|
||||
"gocritic",
|
||||
# "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",
|
||||
@@ -40,12 +39,10 @@ enable = [
|
||||
"rowserrcheck",
|
||||
"exportloopref",
|
||||
"staticcheck",
|
||||
"structcheck",
|
||||
"stylecheck",
|
||||
"typecheck",
|
||||
"unconvert",
|
||||
"unused",
|
||||
"varcheck",
|
||||
"whitespace",
|
||||
"gocyclo",
|
||||
"exhaustive",
|
||||
@@ -74,6 +71,13 @@ text = "ST1003"
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1001"
|
||||
|
||||
# Enable when appropriate
|
||||
# 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"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G108"
|
||||
File diff suppressed because one or more lines are too long
55
.yarnrc.yml
55
.yarnrc.yml
@@ -3,40 +3,37 @@ enableTelemetry: false
|
||||
nodeLinker: pnp
|
||||
|
||||
packageExtensions:
|
||||
"@grafana/slate-react@0.22.10-grafana":
|
||||
peerDependencies:
|
||||
slate-react: ">=0.22.0"
|
||||
"@mdx-js/loader@1.6.22":
|
||||
'@mdx-js/loader@1.6.22':
|
||||
peerDependencies:
|
||||
react: 17.0.1
|
||||
"@storybook/addon-docs@6.4.21":
|
||||
'@storybook/addon-docs@6.4.21':
|
||||
peerDependencies:
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/addon-essentials@6.4.21":
|
||||
'@storybook/manager-webpack5': 6.4.21
|
||||
'@storybook/addon-essentials@6.4.21':
|
||||
peerDependencies:
|
||||
"@storybook/components": 6.4.21
|
||||
"@storybook/core-events": 6.4.21
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/theming": 6.4.21
|
||||
"@storybook/core-server@6.4.21":
|
||||
'@storybook/components': 6.4.21
|
||||
'@storybook/core-events': 6.4.21
|
||||
'@storybook/manager-webpack5': 6.4.21
|
||||
'@storybook/theming': 6.4.21
|
||||
'@storybook/core-server@6.4.21':
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/core@6.4.21":
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/core@6.4.21':
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/csf-tools@6.4.21":
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/manager-webpack5': 6.4.21
|
||||
'@storybook/csf-tools@6.4.21':
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/react@6.4.21":
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/react@6.4.21':
|
||||
peerDependencies:
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
'@storybook/manager-webpack5': 6.4.21
|
||||
doctrine@3.0.0:
|
||||
dependencies:
|
||||
assert: 2.0.0
|
||||
moveable@0.30.0:
|
||||
dependencies:
|
||||
"@daybrush/utils": 1.7.0
|
||||
'@daybrush/utils': 1.7.0
|
||||
framework-utils: ^1.1.0
|
||||
rc-time-picker@3.7.3:
|
||||
peerDependencies:
|
||||
@@ -51,9 +48,9 @@ packageExtensions:
|
||||
react-simple-compat: 1.2.2
|
||||
react-compat-moveable@0.18.0:
|
||||
dependencies:
|
||||
"@egjs/agent": ^2.2.1
|
||||
"@egjs/children-differ": ^1.0.1
|
||||
"@scena/matrix": 1.1.1
|
||||
'@egjs/agent': ^2.2.1
|
||||
'@egjs/children-differ': ^1.0.1
|
||||
'@scena/matrix': 1.1.1
|
||||
css-to-mat: ^1.0.3
|
||||
gesto: ^1.9.0
|
||||
overlap-area: ^1.0.0
|
||||
@@ -65,20 +62,20 @@ packageExtensions:
|
||||
webpack: 4.41.5
|
||||
react-icons@2.2.7:
|
||||
peerDependencies:
|
||||
prop-types: "*"
|
||||
prop-types: '*'
|
||||
react-resizable@3.0.4:
|
||||
peerDependencies:
|
||||
react-dom: 17.0.1
|
||||
"@npmcli/run-script@4.1.3":
|
||||
'@npmcli/run-script@4.1.3':
|
||||
dependencies:
|
||||
which: ^2.0.2
|
||||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
|
||||
spec: "@yarnpkg/plugin-typescript"
|
||||
spec: '@yarnpkg/plugin-typescript'
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||
spec: "@yarnpkg/plugin-interactive-tools"
|
||||
spec: '@yarnpkg/plugin-interactive-tools'
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
|
||||
spec: "https://mskelton.dev/yarn-outdated/v2"
|
||||
spec: 'https://mskelton.dev/yarn-outdated/v2'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.2.2.cjs
|
||||
|
||||
225
CHANGELOG.md
225
CHANGELOG.md
@@ -1,3 +1,153 @@
|
||||
<!-- 9.1.7 START -->
|
||||
|
||||
# 9.1.7 (2022-10-04)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Upgrade Go version to 1.19.1 (backport). [#55733](https://github.com/grafana/grafana/pull/55733), [@sakjur](https://github.com/sakjur)
|
||||
- **CloudWatch:** Add missing AWS/Prometheus metrics. [#54990](https://github.com/grafana/grafana/pull/54990), [@jangaraj](https://github.com/jangaraj)
|
||||
- **Explore:** Add feature tracking events. [#54514](https://github.com/grafana/grafana/pull/54514), [@L-M-K-B](https://github.com/L-M-K-B)
|
||||
- **Graphite:** Add error information to graphite queries tracing. [#55249](https://github.com/grafana/grafana/pull/55249), [@jesusvazquez](https://github.com/jesusvazquez)
|
||||
- **Prometheus:** Restore FromAlert header. [#55255](https://github.com/grafana/grafana/pull/55255), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **SAML:** Account for all orgs in org_mapping (#3855). (Enterprise)
|
||||
- **Search:** Add search index configuration options. [#55525](https://github.com/grafana/grafana/pull/55525), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
|
||||
- **Thresholds:** Add option for dashed line style. [#55875](https://github.com/grafana/grafana/pull/55875), [@leeoniya](https://github.com/leeoniya)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix default query's data source when no default datasource specified. [#55435](https://github.com/grafana/grafana/pull/55435), [@konrad147](https://github.com/konrad147)
|
||||
- **Alerting:** Fix mathexp.NoData cannot be reduced. [#55347](https://github.com/grafana/grafana/pull/55347), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Alerting:** Skip unsupported file types on provisioning. [#55573](https://github.com/grafana/grafana/pull/55573), [@JohnnyQQQQ](https://github.com/JohnnyQQQQ)
|
||||
- **AzureMonitor:** Ensure resourceURI template variable is migrated. [#56095](https://github.com/grafana/grafana/pull/56095), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Dashboard:** Fix plugin dashboard save as button. [#55197](https://github.com/grafana/grafana/pull/55197), [@lpskdl](https://github.com/lpskdl)
|
||||
- **Docs:** Fix decimals: auto docs for panel edit. [#55477](https://github.com/grafana/grafana/pull/55477), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Fix:** RBAC handle `error no resolver` found. [#55676](https://github.com/grafana/grafana/pull/55676), [@gamab](https://github.com/gamab)
|
||||
- **Fix:** RBAC handle `error no resolver` found. (Enterprise)
|
||||
- **LibraryPanelSearch:** Refactor and fix hyphen issue. [#55314](https://github.com/grafana/grafana/pull/55314), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Live:** Fix live streaming with `live-service-web-worker` feature flag enabled. [#55528](https://github.com/grafana/grafana/pull/55528), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
|
||||
- **QueryField:** Fix wrong cursor position on autocomplete. [#55576](https://github.com/grafana/grafana/pull/55576), [@svennergr](https://github.com/svennergr)
|
||||
|
||||
<!-- 9.1.7 END -->
|
||||
<!-- 9.1.6 START -->
|
||||
|
||||
# 9.1.6 (2022-09-20)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Auth:** Trigger auth token cleanup job. (Enterprise)
|
||||
- **DataSource:** Adding possibility to hide queries from the inspector. [#54892](https://github.com/grafana/grafana/pull/54892), [@mckn](https://github.com/mckn)
|
||||
- **Inspect:** Hide Actions tab when it is empty. [#55272](https://github.com/grafana/grafana/pull/55272), [@ryantxu](https://github.com/ryantxu)
|
||||
- **PanelMenu:** Remove hide legend action as it was showing on all panel types. [#54876](https://github.com/grafana/grafana/pull/54876), [@torkelo](https://github.com/torkelo)
|
||||
- **Provisioning Contact points:** Support disableResolveMessage via YAML. [#54122](https://github.com/grafana/grafana/pull/54122), [@mmusenbr](https://github.com/mmusenbr)
|
||||
- **PublicDashboards:** Support subpaths when generating pubdash url. [#55204](https://github.com/grafana/grafana/pull/55204), [@owensmallwood](https://github.com/owensmallwood)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix legacy migration crash when rule name is too long. [#55053](https://github.com/grafana/grafana/pull/55053), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Fix send resolved notifications. [#54793](https://github.com/grafana/grafana/pull/54793), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Azure Monitor:** Fix migration issue with MetricDefinitionsQuery template variable query types. [#55262](https://github.com/grafana/grafana/pull/55262), [@yaelleC](https://github.com/yaelleC)
|
||||
- **Browse:** Hide dashboard actions if user does not have enough permission. [#55218](https://github.com/grafana/grafana/pull/55218), [@lpskdl](https://github.com/lpskdl)
|
||||
- **ElasticSearch:** Fix dispatching queries at a wrong time. [#55225](https://github.com/grafana/grafana/pull/55225), [@svennergr](https://github.com/svennergr)
|
||||
- **Panel:** Disable legends when showLegend is false prior to schema v37. [#55126](https://github.com/grafana/grafana/pull/55126), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **Prometheus:** Fix metadata requests for browser access mode. [#55403](https://github.com/grafana/grafana/pull/55403), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Search:** Avoid requesting all dashboards when in Folder View. [#55169](https://github.com/grafana/grafana/pull/55169), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **TablePanel/StatPanel:** Fix values not being visible when background transparent. [#55092](https://github.com/grafana/grafana/pull/55092), [@mdvictor](https://github.com/mdvictor)
|
||||
|
||||
<!-- 9.1.6 END -->
|
||||
<!-- 9.1.5 START -->
|
||||
|
||||
# 9.1.5 (2022-09-12)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Sanitize invalid label/annotation names for external alertmanagers. [#54537](https://github.com/grafana/grafana/pull/54537), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Alerting:** Telegram: Truncate long messages to avoid send error. [#54339](https://github.com/grafana/grafana/pull/54339), [@ZloyDyadka](https://github.com/ZloyDyadka)
|
||||
- **DisplayProcessor:** Handle reverse-ordered data when auto-showing millis. [#54923](https://github.com/grafana/grafana/pull/54923), [@leeoniya](https://github.com/leeoniya)
|
||||
- **Heatmap:** Add option to reverse color scheme. [#54365](https://github.com/grafana/grafana/pull/54365), [@leeoniya](https://github.com/leeoniya)
|
||||
- **PluginLoader:** Alias slate-react as @grafana/slate-react. [#55027](https://github.com/grafana/grafana/pull/55027), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Search:** Add substring matcher, to bring back the old dashboard search behavior. [#54813](https://github.com/grafana/grafana/pull/54813), [@ArturWierzbicki](https://github.com/ArturWierzbicki)
|
||||
- **Traces:** More visible span colors. [#54513](https://github.com/grafana/grafana/pull/54513), [@joey-grafana](https://github.com/joey-grafana)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix incorrect propagation of org ID and other fields in rule provisioning endpoints. [#54603](https://github.com/grafana/grafana/pull/54603), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Resetting the notification policy tree to the default policy will also restore default contact points. [#54608](https://github.com/grafana/grafana/pull/54608), [@alexweav](https://github.com/alexweav)
|
||||
- **AzureMonitor:** Fix custom namespaces. [#54937](https://github.com/grafana/grafana/pull/54937), [@asimpson](https://github.com/asimpson)
|
||||
- **AzureMonitor:** Fix issue where custom metric namespaces are not included in the metric namespace list. [#54826](https://github.com/grafana/grafana/pull/54826), [@andresmgot](https://github.com/andresmgot)
|
||||
- **CloudWatch:** Fix display name of metric and namespace. [#54860](https://github.com/grafana/grafana/pull/54860), [@sunker](https://github.com/sunker)
|
||||
- **Cloudwatch:** Fix annotation query serialization issue. [#54884](https://github.com/grafana/grafana/pull/54884), [@sunker](https://github.com/sunker)
|
||||
- **Dashboard:** Fix issue where unsaved changes warning would appear even after save, and not being able to change library panels. [#54706](https://github.com/grafana/grafana/pull/54706), [@torkelo](https://github.com/torkelo)
|
||||
- **Dashboard:** Hide overflow content for single left pane. [#54882](https://github.com/grafana/grafana/pull/54882), [@lpskdl](https://github.com/lpskdl)
|
||||
- **Loki:** Fix a bug where adding adhoc filters was not possible. [#54920](https://github.com/grafana/grafana/pull/54920), [@svennergr](https://github.com/svennergr)
|
||||
- **Reports:** Fix handling expired state. (Enterprise)
|
||||
|
||||
<!-- 9.1.5 END -->
|
||||
<!-- 9.1.4 START -->
|
||||
|
||||
# 9.1.4 (2022-09-09)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **GrafanaUI:** Fixes Chrome issue for various query fields. [#54566](https://github.com/grafana/grafana/pull/54566), [@kaydelaney](https://github.com/kaydelaney)
|
||||
|
||||
<!-- 9.1.4 END -->
|
||||
<!-- 9.1.3 START -->
|
||||
|
||||
# 9.1.3 (2022-09-05)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **API:** Do not expose user input in datasource error responses. [#53483](https://github.com/grafana/grafana/pull/53483), [@papagian](https://github.com/papagian)
|
||||
- **Alerting:** Write and Delete multiple alert instances. [#54072](https://github.com/grafana/grafana/pull/54072), [@joeblubaugh](https://github.com/joeblubaugh)
|
||||
- **Library Panel:** Allow to delete them when deprecated. [#54662](https://github.com/grafana/grafana/pull/54662), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **Plugins Catalog:** Allow to filter plugins using special characters. [#54474](https://github.com/grafana/grafana/pull/54474), [@murtazaqa](https://github.com/murtazaqa)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix UI bug when setting custom notification policy group by. [#54607](https://github.com/grafana/grafana/pull/54607), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **AppRootPage:** Fix issue navigating between two app plugin pages. [#54519](https://github.com/grafana/grafana/pull/54519), [@torkelo](https://github.com/torkelo)
|
||||
- **Correlations:** Use correct fallback handlers. [#54511](https://github.com/grafana/grafana/pull/54511), [@kalleep](https://github.com/kalleep)
|
||||
- **FIX:** RBAC prevents deleting empty snapshots (#54385). [#54510](https://github.com/grafana/grafana/pull/54510), [@gamab](https://github.com/gamab)
|
||||
- **LibraryElements:** Fix inability to delete library panels under MySQL. [#54600](https://github.com/grafana/grafana/pull/54600), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Metrics:** fix `grafana_database_conn_*` metrics, and add new `go_sql_stats_*` metrics as eventual replacement. [#54405](https://github.com/grafana/grafana/pull/54405), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
- **TestData DB:** Fix node graph not showing when the `Data type` field is set to `random`. [#54298](https://github.com/grafana/grafana/pull/54298), [@CrypticSignal](https://github.com/CrypticSignal)
|
||||
|
||||
### Deprecations
|
||||
|
||||
The `grafana_database_conn_*` metrics are deprecated, and will be removed in a future version of Grafana. Use the `go_sql_stats_*` metrics instead. Issue [#54405](https://github.com/grafana/grafana/issues/54405)
|
||||
|
||||
<!-- 9.1.3 END -->
|
||||
<!-- 9.1.2 START -->
|
||||
|
||||
# 9.1.2 (2022-08-30)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **AdHoc variable:** Correctly preselect datasource when provisioning. [#54088](https://github.com/grafana/grafana/pull/54088), [@dprokop](https://github.com/dprokop)
|
||||
- **AzureMonitor:** Added ARG query function for template variables. [#53059](https://github.com/grafana/grafana/pull/53059), [@yaelleC](https://github.com/yaelleC)
|
||||
- **Dashboard save:** Persist details message when navigating through dashboard save drawer's tabs. [#54084](https://github.com/grafana/grafana/pull/54084), [@vbeskrovnov](https://github.com/vbeskrovnov)
|
||||
- **Dashboards:** Correctly migrate mixed data source targets. [#54152](https://github.com/grafana/grafana/pull/54152), [@dprokop](https://github.com/dprokop)
|
||||
- **Elasticsearch:** Use millisecond intervals for alerting. [#54157](https://github.com/grafana/grafana/pull/54157), [@gabor](https://github.com/gabor)
|
||||
- **Elasticsearch:** Use millisecond intervals in frontend. [#54202](https://github.com/grafana/grafana/pull/54202), [@gabor](https://github.com/gabor)
|
||||
- **Geomap:** Local color range. [#54348](https://github.com/grafana/grafana/pull/54348), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **Plugins Catalog:** Use appSubUrl to generate plugins catalog urls. [#54426](https://github.com/grafana/grafana/pull/54426), [@academo](https://github.com/academo)
|
||||
- **Rendering:** Add support for renderer token. [#54425](https://github.com/grafana/grafana/pull/54425), [@joanlopez](https://github.com/joanlopez)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix saving of screenshots uploaded with a signed url. [#53933](https://github.com/grafana/grafana/pull/53933), [@VDVsx](https://github.com/VDVsx)
|
||||
- **AngularPanels:** Fixing changing angular panel options not taking having affect when coming back from panel edit. [#54087](https://github.com/grafana/grafana/pull/54087), [@torkelo](https://github.com/torkelo)
|
||||
- **Explore:** Improve a11y of query row collapse button. [#53827](https://github.com/grafana/grafana/pull/53827), [@L-M-K-B](https://github.com/L-M-K-B)
|
||||
- **Geomap:** Fix tooltip display. [#54245](https://github.com/grafana/grafana/pull/54245), [@adela-almasan](https://github.com/adela-almasan)
|
||||
- **QueryEditorRow:** Filter data on mount. [#54260](https://github.com/grafana/grafana/pull/54260), [@asimpson](https://github.com/asimpson)
|
||||
- **Search:** Show all dashboards in the folder view. [#54163](https://github.com/grafana/grafana/pull/54163), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Tracing:** Fix the event attributes in opentelemetry tracing. [#54117](https://github.com/grafana/grafana/pull/54117), [@ying-jeanne](https://github.com/ying-jeanne)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **GrafanaUI:** Fix styles for invalid selects & DataSourcePicker. [#53476](https://github.com/grafana/grafana/pull/53476), [@Elfo404](https://github.com/Elfo404)
|
||||
|
||||
<!-- 9.1.2 END -->
|
||||
<!-- 9.1.1 START -->
|
||||
|
||||
# 9.1.1 (2022-08-23)
|
||||
@@ -298,6 +448,32 @@ In Prometheus, browser access mode was deprecated in Grafana 7.4.0 and removed i
|
||||
- **Grafana/UI:** Add ColorPickerInput component. [#52222](https://github.com/grafana/grafana/pull/52222), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Plugins:** Validate root URLs when signing private plugins via grafana-toolkit. [#51968](https://github.com/grafana/grafana/pull/51968), [@wbrowne](https://github.com/wbrowne)
|
||||
|
||||
<!-- 9.0.8 START -->
|
||||
|
||||
# 9.0.8 (2022-08-30)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Hide "no rules" message when we are fetching from data sources. [#53778](https://github.com/grafana/grafana/pull/53778), [@gillesdemey](https://github.com/gillesdemey)
|
||||
- **Rendering:** Add support for renderer token (#54425). [#54439](https://github.com/grafana/grafana/pull/54439), [@joanlopez](https://github.com/joanlopez)
|
||||
- **Reports:** Title is showing under panels. (Enterprise)
|
||||
- **Alerting:** AlertingProxy to elevate permissions for request forwarded to data proxy when RBAC enabled. [#53680](https://github.com/grafana/grafana/pull/53680), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
|
||||
<!-- 9.0.8 END -->
|
||||
|
||||
<!-- 9.0.7 START -->
|
||||
|
||||
# 9.0.7 (2022-08-10)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **CloudMonitoring:** Remove link setting for SLO queries. [#53031](https://github.com/grafana/grafana/pull/53031), [@andresmgot](https://github.com/andresmgot)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **GrafanaUI:** Render PageToolbar's leftItems regardless of title's presence. [#53285](https://github.com/grafana/grafana/pull/53285), [@Elfo404](https://github.com/Elfo404)
|
||||
|
||||
<!-- 9.0.7 END -->
|
||||
<!-- 9.1.0-beta1 END -->
|
||||
<!-- 9.0.6 START -->
|
||||
|
||||
@@ -658,7 +834,7 @@ The `get_alert_rules_duration_seconds` metric has been renamed to `schedule_quer
|
||||
- Alternatively or complementarily to all the points above, backing up the Grafana database before updating could be a good idea to prevent disasters (although the risk of getting some secrets corrupted only applies to those updates/created with after updating to Grafana v9.0). Issue [#49301](https://github.com/grafana/grafana/issues/49301)
|
||||
|
||||
- According to the dynamic labels documentation, you can use up to five dynamic values per label. There’s currently no such restriction in the alias pattern system, so if more than 5 patterns are being used the GetMetricData API will return an error.
|
||||
- Dynamic labels only allow ${LABEL} to be used once per query. There’s no such restriction in the alias pattern system, so in case more than 1 is being used the GetMetricData API will return an error.
|
||||
- Dynamic labels only allow \${LABEL} to be used once per query. There’s no such restriction in the alias pattern system, so in case more than 1 is being used the GetMetricData API will return an error.
|
||||
- When no alias is provided by the user, Grafana will no longer fallback with custom rules for naming the legend.
|
||||
- In case a search expression is being used and no data is returned, Grafana will no longer expand dimension values, for instance when using a multi-valued template variable or star wildcard `*` in the dimension value field. Ref https://github.com/grafana/grafana/issues/20729
|
||||
- Time series might be displayed in a different order. Using for example the dynamic label `${PROP('MetricName')}`, might have the consequence that the time series are returned in a different order compared to when the alias pattern `{{metric}}` is used
|
||||
@@ -1004,6 +1180,27 @@ In the Loki data source, for consistency and performance reasons, we changed how
|
||||
|
||||
The dependency to [grafana/aws-sdk](https://github.com/grafana/grafana-aws-sdk-react) is moved from [grafana/ui](https://github.com/grafana/grafana/blob/main/packages/grafana-ui/package.json) to the plugin. This means that any plugin that use SIGV4 auth need to pass a SIGV4 editor component as a prop to the `DataSourceHttpSettings` component. Issue [#43559](https://github.com/grafana/grafana/issues/43559)
|
||||
|
||||
<!-- 8.5.11 START -->
|
||||
|
||||
# 8.5.11 (2022-08-30)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Rendering:** Add support for renderer token (#54425). [#54438](https://github.com/grafana/grafana/pull/54438), [@joanlopez](https://github.com/joanlopez)
|
||||
- **Alerting:** AlertingProxy to elevate permissions for request forwarded to data proxy when RBAC enabled. [#53681](https://github.com/grafana/grafana/pull/53681), [@yuri-tceretian](https://github.com/yuri-tceretian)
|
||||
|
||||
<!-- 8.5.11 END -->
|
||||
|
||||
<!-- 8.5.10 START -->
|
||||
|
||||
# 8.5.10 (2022-08-08)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **RBAC:** Fix Anonymous Editors missing dashboard controls. [#52649](https://github.com/grafana/grafana/pull/52649), [@gamab](https://github.com/gamab)
|
||||
|
||||
<!-- 8.5.10 END -->
|
||||
|
||||
<!-- 8.5.9 START -->
|
||||
|
||||
# 8.5.9 (2022-07-14)
|
||||
@@ -1254,6 +1451,16 @@ When user is using Github OAuth, GitHub login is showed as both Grafana login an
|
||||
|
||||
The meaning of the default data source has now changed from being a persisted property in a panel. Before when you selected the default data source for a panel and later changed the default data source to another data source it would change all panels who were configured to use the default data source. From now on the default data source is just the default for new panels and changing the default will not impact any currently saved dashboards. Issue [#45132](https://github.com/grafana/grafana/issues/45132)
|
||||
|
||||
<!-- 8.4.11 START -->
|
||||
|
||||
# 8.4.11 (2022-08-30)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Rendering:** Add support for renderer token (#54425). [#54437](https://github.com/grafana/grafana/pull/54437), [@joanlopez](https://github.com/joanlopez)
|
||||
|
||||
<!-- 8.4.11 END -->
|
||||
|
||||
<!-- 8.4.10 START -->
|
||||
|
||||
# 8.4.10 (2022-07-14)
|
||||
@@ -1451,6 +1658,16 @@ AngularJS plugin support is now in a deprecated state, meaning it will be remove
|
||||
- **News:** Reload feed when changing the time range or refreshing. [#42217](https://github.com/grafana/grafana/pull/42217), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **UI/Plot:** Implement keyboard controls for plot cursor. [#42244](https://github.com/grafana/grafana/pull/42244), [@kaydelaney](https://github.com/kaydelaney)
|
||||
|
||||
<!-- 8.3.11 START -->
|
||||
|
||||
# 8.3.11 (2022-08-30)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Rendering:** Add support for renderer token (#54425). [#54436](https://github.com/grafana/grafana/pull/54436), [@joanlopez](https://github.com/joanlopez)
|
||||
|
||||
<!-- 8.3.11 END -->
|
||||
|
||||
<!-- 8.3.7 START -->
|
||||
|
||||
# 8.3.7 (2022-03-01)
|
||||
@@ -1524,7 +1741,7 @@ AngularJS plugin support is now in a deprecated state, meaning it will be remove
|
||||
- **Login:** Page no longer overflows on mobile. [#43739](https://github.com/grafana/grafana/pull/43739), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Plugins:** Set backend metadata property for core plugins. [#43349](https://github.com/grafana/grafana/pull/43349), [@marefr](https://github.com/marefr)
|
||||
- **Prometheus:** Fill missing steps with null values. [#43622](https://github.com/grafana/grafana/pull/43622), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus:** Fix interpolation of $\_\_rate_interval variable. [#44035](https://github.com/grafana/grafana/pull/44035), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus:** Fix interpolation of \$\_\_rate_interval variable. [#44035](https://github.com/grafana/grafana/pull/44035), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus:** Interpolate variables with curly brackets syntax. [#42927](https://github.com/grafana/grafana/pull/42927), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus:** Respect the http-method data source setting. [#42753](https://github.com/grafana/grafana/pull/42753), [@gabor](https://github.com/gabor)
|
||||
- **Table:** Fixes issue with field config applied to wrong fields when hiding columns. [#43376](https://github.com/grafana/grafana/pull/43376), [@torkelo](https://github.com/torkelo)
|
||||
@@ -1841,7 +2058,7 @@ If an alert should evaluate to `OK` when one or all conditions return `No Data`
|
||||
- **Graph:** You can now see annotation descriptions on hover. [#40581](https://github.com/grafana/grafana/pull/40581), [@axelavargas](https://github.com/axelavargas)
|
||||
- **Logs:** The system now uses the JSON parser only if the line is parsed to an object. [#40507](https://github.com/grafana/grafana/pull/40507), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus:** We fixed the issue where the system did not reuse TCP connections when querying from Grafana Alerting. [#40349](https://github.com/grafana/grafana/pull/40349), [@kminehart](https://github.com/kminehart)
|
||||
- **Prometheus:** We fixed the problem that resulted in an error when a user created a query with a $\_\_interval min step. [#40525](https://github.com/grafana/grafana/pull/40525), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus:** We fixed the problem that resulted in an error when a user created a query with a \$\_\_interval min step. [#40525](https://github.com/grafana/grafana/pull/40525), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **RowsToFields:** We fixed the issue where the system was not properly interpreting number values. [#40580](https://github.com/grafana/grafana/pull/40580), [@torkelo](https://github.com/torkelo)
|
||||
- **Scale:** We fixed how the system handles NaN percent when data min = data max. [#40622](https://github.com/grafana/grafana/pull/40622), [@torkelo](https://github.com/torkelo)
|
||||
- **Table panel:** You can now create a filter that includes special characters. [#40458](https://github.com/grafana/grafana/pull/40458), [@dprokop](https://github.com/dprokop)
|
||||
@@ -2264,7 +2481,7 @@ Panel queries and/or annotation queries that used more than one statistic will b
|
||||
- **Legacy Alerting:** Replace simplejson with a struct in webhook notification channel. [#34952](https://github.com/grafana/grafana/pull/34952), [@KEVISONG](https://github.com/KEVISONG)
|
||||
- **Legend:** Updates display name for Last (not null) to just Last\*. [#35633](https://github.com/grafana/grafana/pull/35633), [@torkelo](https://github.com/torkelo)
|
||||
- **Logs panel:** Add option to show common labels. [#36166](https://github.com/grafana/grafana/pull/36166), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki:** Add $\_\_range variable. [#36175](https://github.com/grafana/grafana/pull/36175), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki:** Add \$\_\_range variable. [#36175](https://github.com/grafana/grafana/pull/36175), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki:** Add support for "label_values(log stream selector, label)" in templating. [#35488](https://github.com/grafana/grafana/pull/35488), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki:** Add support for ad-hoc filtering in dashboard. [#36393](https://github.com/grafana/grafana/pull/36393), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **MySQL Datasource:** Add timezone parameter. [#27535](https://github.com/grafana/grafana/pull/27535), [@andipabst](https://github.com/andipabst)
|
||||
|
||||
@@ -20,7 +20,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.17.12-alpine3.15 as go-builder
|
||||
FROM golang:1.19.2-alpine3.15 as go-builder
|
||||
|
||||
RUN apk add --no-cache gcc g++ make
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.17.12 AS go-builder
|
||||
FROM golang:1.19.2 AS go-builder
|
||||
|
||||
WORKDIR /src/grafana
|
||||
|
||||
|
||||
2
Makefile
2
Makefile
@@ -129,7 +129,7 @@ test: test-go test-js ## Run all tests.
|
||||
golangci-lint: $(GOLANGCI_LINT)
|
||||
@echo "lint via golangci-lint"
|
||||
$(GOLANGCI_LINT) run \
|
||||
--config ./conf/.golangci.toml \
|
||||
--config .golangci.toml \
|
||||
$(GO_FILES)
|
||||
|
||||
lint-go: golangci-lint ## Run all code checks for backend. You can use GO_FILES to specify exact files to check
|
||||
|
||||
@@ -472,6 +472,7 @@ team_ids =
|
||||
allowed_organizations =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
[auth.gitlab]
|
||||
@@ -487,6 +488,7 @@ allowed_domains =
|
||||
allowed_groups =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
|
||||
#################################### Google Auth #########################
|
||||
[auth.google]
|
||||
@@ -532,6 +534,7 @@ token_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
|
||||
allowed_domains =
|
||||
allowed_groups =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
|
||||
#################################### Okta OAuth #######################
|
||||
[auth.okta]
|
||||
@@ -549,6 +552,7 @@ allowed_domains =
|
||||
allowed_groups =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
allow_assign_grafana_admin = false
|
||||
|
||||
#################################### Generic OAuth #######################
|
||||
[auth.generic_oauth]
|
||||
@@ -582,6 +586,7 @@ tls_client_key =
|
||||
tls_client_ca =
|
||||
use_pkce = false
|
||||
auth_style =
|
||||
allow_assign_grafana_admin = false
|
||||
|
||||
#################################### Basic Auth ##########################
|
||||
[auth.basic]
|
||||
@@ -1277,3 +1282,19 @@ scheduler_interval =
|
||||
[storage]
|
||||
# Allow uploading SVG files without sanitization.
|
||||
allow_unsanitized_svg_upload = false
|
||||
|
||||
|
||||
#################################### Search ################################################
|
||||
|
||||
[search]
|
||||
# Defines the number of dashboards loaded at once in a batch during a full reindex.
|
||||
# This is a temporary settings that might be removed in the future.
|
||||
dashboard_loading_batch_size = 200
|
||||
|
||||
# Defines the frequency of a full search reindex.
|
||||
# This is a temporary settings that might be removed in the future.
|
||||
full_reindex_interval = 5m
|
||||
|
||||
# Defines the frequency of partial index updates based on recent changes such as dashboard updates.
|
||||
# This is a temporary settings that might be removed in the future.
|
||||
index_update_interval = 10s
|
||||
|
||||
@@ -470,6 +470,9 @@
|
||||
;allowed_domains =
|
||||
;team_ids =
|
||||
;allowed_organizations =
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;allow_assign_grafana_admin = false
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
[auth.gitlab]
|
||||
@@ -483,6 +486,9 @@
|
||||
;api_url = https://gitlab.com/api/v4
|
||||
;allowed_domains =
|
||||
;allowed_groups =
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;allow_assign_grafana_admin = false
|
||||
|
||||
#################################### Google Auth ##########################
|
||||
[auth.google]
|
||||
@@ -519,6 +525,7 @@
|
||||
;allowed_domains =
|
||||
;allowed_groups =
|
||||
;role_attribute_strict = false
|
||||
;allow_assign_grafana_admin = false
|
||||
|
||||
#################################### Okta OAuth #######################
|
||||
[auth.okta]
|
||||
@@ -535,6 +542,7 @@
|
||||
;allowed_groups =
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;allow_assign_grafana_admin = false
|
||||
|
||||
#################################### Generic OAuth ##########################
|
||||
[auth.generic_oauth]
|
||||
@@ -567,6 +575,7 @@
|
||||
;tls_client_ca =
|
||||
;use_pkce = false
|
||||
;auth_style =
|
||||
;allow_assign_grafana_admin = false
|
||||
|
||||
#################################### Basic Auth ##########################
|
||||
[auth.basic]
|
||||
@@ -598,6 +607,7 @@
|
||||
;expected_claims = {"aud": ["foo", "bar"]}
|
||||
;key_file = /path/to/key/file
|
||||
;auto_sign_up = false
|
||||
;url_login = false
|
||||
|
||||
#################################### Auth LDAP ##########################
|
||||
[auth.ldap]
|
||||
|
||||
@@ -59,7 +59,7 @@ func themaTestableDashboards() (map[string][]byte, error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close() // nolint: errcheck
|
||||
defer f.Close() //nolint:errcheck
|
||||
|
||||
b, err := io.ReadAll(f)
|
||||
if err != nil {
|
||||
|
||||
363
devenv/dev-dashboards/panel-geomap/geomap-9.1.json
Normal file
363
devenv/dev-dashboards/panel-geomap/geomap-9.1.json
Normal file
@@ -0,0 +1,363 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 17,
|
||||
"w": 9,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"basemap": {
|
||||
"config": {
|
||||
"server": "ocean"
|
||||
},
|
||||
"name": "Layer 0",
|
||||
"type": "esri-xyz"
|
||||
},
|
||||
"controls": {
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showMeasure": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"config": {
|
||||
"server": "usa-topo"
|
||||
},
|
||||
"name": "Topographic map",
|
||||
"opacity": 0.8,
|
||||
"tooltip": true,
|
||||
"type": "esri-xyz"
|
||||
}
|
||||
],
|
||||
"tooltip": {
|
||||
"mode": "details"
|
||||
},
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 26.076593,
|
||||
"lon": 113.075128,
|
||||
"zoom": 3.76
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_file"
|
||||
},
|
||||
{
|
||||
"csvFileName": "population_by_state.csv",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "B",
|
||||
"scenarioId": "csv_file"
|
||||
}
|
||||
],
|
||||
"title": "Multiple map layers",
|
||||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 17,
|
||||
"w": 15,
|
||||
"x": 9,
|
||||
"y": 0
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"basemap": {
|
||||
"config": {
|
||||
"server": "world-imagery"
|
||||
},
|
||||
"name": "Layer 0",
|
||||
"type": "esri-xyz"
|
||||
},
|
||||
"controls": {
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showMeasure": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"config": {
|
||||
"nightColor": "#000000",
|
||||
"show": "to",
|
||||
"sun": true
|
||||
},
|
||||
"location": {
|
||||
"mode": "auto"
|
||||
},
|
||||
"name": "Day / night",
|
||||
"opacity": 0.5,
|
||||
"tooltip": true,
|
||||
"type": "dayNight"
|
||||
}
|
||||
],
|
||||
"tooltip": {
|
||||
"mode": "details"
|
||||
},
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 29.633972,
|
||||
"lon": -17.661858,
|
||||
"zoom": 2.39
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"title": "Day / night layer",
|
||||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 16,
|
||||
"w": 14,
|
||||
"x": 5,
|
||||
"y": 17
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"basemap": {
|
||||
"config": {},
|
||||
"name": "Layer 0",
|
||||
"type": "default"
|
||||
},
|
||||
"controls": {
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showMeasure": true,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"config": {
|
||||
"style": {
|
||||
"color": {
|
||||
"fixed": "dark-green"
|
||||
},
|
||||
"lineWidth": 2,
|
||||
"opacity": 1,
|
||||
"rotation": {
|
||||
"fixed": 0,
|
||||
"max": 360,
|
||||
"min": -360,
|
||||
"mode": "mod"
|
||||
},
|
||||
"size": {
|
||||
"fixed": 5,
|
||||
"max": 15,
|
||||
"min": 2
|
||||
},
|
||||
"symbol": {
|
||||
"fixed": "img/icons/marker/circle.svg",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"textConfig": {
|
||||
"fontSize": 12,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"textAlign": "center",
|
||||
"textBaseline": "middle"
|
||||
}
|
||||
}
|
||||
},
|
||||
"name": "Flight path",
|
||||
"tooltip": true,
|
||||
"type": "route"
|
||||
}
|
||||
],
|
||||
"tooltip": {
|
||||
"mode": "details"
|
||||
},
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 37.829114,
|
||||
"lon": -122.439462,
|
||||
"zoom": 11.92
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "simulation",
|
||||
"sim": {
|
||||
"key": {
|
||||
"tick": 10,
|
||||
"type": "flight"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"title": "Route layer",
|
||||
"type": "geomap"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"panel-tests",
|
||||
"geomap"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-5m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Geomap 9.1",
|
||||
"uid": "KVxZKdmVz",
|
||||
"version": 10,
|
||||
"weekStart": ""
|
||||
}
|
||||
503
devenv/dev-dashboards/panel-geomap/geomap-color-field.json
Normal file
503
devenv/dev-dashboards/panel-geomap/geomap-color-field.json
Normal file
@@ -0,0 +1,503 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-BlYlRd"
|
||||
},
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
"w": 10,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"basemap": {
|
||||
"config": {},
|
||||
"name": "Layer 0",
|
||||
"type": "default"
|
||||
},
|
||||
"controls": {
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showMeasure": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"config": {
|
||||
"showLegend": true,
|
||||
"style": {
|
||||
"color": {
|
||||
"field": "Count",
|
||||
"fixed": "dark-green"
|
||||
},
|
||||
"opacity": 0.4,
|
||||
"rotation": {
|
||||
"fixed": 0,
|
||||
"max": 360,
|
||||
"min": -360,
|
||||
"mode": "mod"
|
||||
},
|
||||
"size": {
|
||||
"fixed": 5,
|
||||
"max": 15,
|
||||
"min": 2
|
||||
},
|
||||
"symbol": {
|
||||
"fixed": "img/icons/marker/circle.svg",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"textConfig": {
|
||||
"fontSize": 12,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"textAlign": "center",
|
||||
"textBaseline": "middle"
|
||||
}
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"mode": "auto"
|
||||
},
|
||||
"name": "Layer 1",
|
||||
"tooltip": true,
|
||||
"type": "markers"
|
||||
}
|
||||
],
|
||||
"tooltip": {
|
||||
"mode": "details"
|
||||
},
|
||||
"view": {
|
||||
"id": "zero",
|
||||
"lat": 0,
|
||||
"lon": 0,
|
||||
"zoom": 1
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_file"
|
||||
}
|
||||
],
|
||||
"title": "Geomap - auto min/max",
|
||||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-BlYlRd"
|
||||
},
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 15,
|
||||
"min": 1,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
"w": 10,
|
||||
"x": 10,
|
||||
"y": 0
|
||||
},
|
||||
"id": 7,
|
||||
"options": {
|
||||
"basemap": {
|
||||
"config": {},
|
||||
"name": "Layer 0",
|
||||
"type": "default"
|
||||
},
|
||||
"controls": {
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showMeasure": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"config": {
|
||||
"showLegend": true,
|
||||
"style": {
|
||||
"color": {
|
||||
"field": "Count",
|
||||
"fixed": "dark-green"
|
||||
},
|
||||
"opacity": 0.4,
|
||||
"rotation": {
|
||||
"fixed": 0,
|
||||
"max": 360,
|
||||
"min": -360,
|
||||
"mode": "mod"
|
||||
},
|
||||
"size": {
|
||||
"fixed": 5,
|
||||
"max": 15,
|
||||
"min": 2
|
||||
},
|
||||
"symbol": {
|
||||
"fixed": "img/icons/marker/circle.svg",
|
||||
"mode": "fixed"
|
||||
},
|
||||
"textConfig": {
|
||||
"fontSize": 12,
|
||||
"offsetX": 0,
|
||||
"offsetY": 0,
|
||||
"textAlign": "center",
|
||||
"textBaseline": "middle"
|
||||
}
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"mode": "auto"
|
||||
},
|
||||
"name": "Layer 1",
|
||||
"tooltip": true,
|
||||
"type": "markers"
|
||||
}
|
||||
],
|
||||
"tooltip": {
|
||||
"mode": "details"
|
||||
},
|
||||
"view": {
|
||||
"id": "zero",
|
||||
"lat": 0,
|
||||
"lon": 0,
|
||||
"zoom": 1
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"panelId": 2,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Geomap - min/max",
|
||||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-BlYlRd"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
"w": 2,
|
||||
"x": 20,
|
||||
"y": 0
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"min"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"panelId": 2,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Min values",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-BlYlRd"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
"w": 2,
|
||||
"x": 22,
|
||||
"y": 0
|
||||
},
|
||||
"id": 5,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"max"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"panelId": 2,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Max values",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-BlYlRd"
|
||||
},
|
||||
"custom": {
|
||||
"align": "auto",
|
||||
"displayMode": "auto",
|
||||
"inspect": false
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Count"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.displayMode",
|
||||
"value": "color-background"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Price"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.displayMode",
|
||||
"value": "color-background"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 15
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"footer": {
|
||||
"fields": "",
|
||||
"reducer": [
|
||||
"max"
|
||||
],
|
||||
"show": true
|
||||
},
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Dashboard --"
|
||||
},
|
||||
"panelId": 2,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"panel-tests",
|
||||
"geomap"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Geomap - color field Copy",
|
||||
"uid": "XMuLlpZ4k",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"options": {
|
||||
"controls": {
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": false,
|
||||
"showDebug": false,
|
||||
"showMeasure": false,
|
||||
"showScale": false,
|
||||
"showZoom": false
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "details"
|
||||
},
|
||||
"view": {
|
||||
"id": "zero",
|
||||
"lat": 0,
|
||||
"lon": 0,
|
||||
"zoom": 1
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_file"
|
||||
}
|
||||
],
|
||||
"title": "Geomap/Geohash",
|
||||
"type": "geomap"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"panel-tests",
|
||||
"geomap"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-5m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Geomap geohash transformer",
|
||||
"uid": "P2jR04WVk",
|
||||
"version": 10,
|
||||
"weekStart": ""
|
||||
}
|
||||
@@ -440,8 +440,8 @@
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"geomap",
|
||||
"panel-tests"
|
||||
"panel-tests",
|
||||
"geomap"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 83,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
@@ -50,7 +49,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -78,6 +78,7 @@
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showMeasure": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
@@ -107,6 +108,9 @@
|
||||
"type": "markers"
|
||||
}
|
||||
],
|
||||
"tooltip": {
|
||||
"mode": "details"
|
||||
},
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 38.297683,
|
||||
@@ -115,7 +119,7 @@
|
||||
"zoom": 3.98
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-pre",
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
@@ -148,7 +152,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -180,6 +185,7 @@
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showMeasure": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
@@ -209,6 +215,9 @@
|
||||
"type": "markers"
|
||||
}
|
||||
],
|
||||
"tooltip": {
|
||||
"mode": "details"
|
||||
},
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 38.297683,
|
||||
@@ -217,7 +226,7 @@
|
||||
"zoom": 3.98
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-pre",
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
@@ -250,7 +259,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -278,6 +288,7 @@
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showMeasure": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
@@ -302,6 +313,9 @@
|
||||
"type": "heatmap"
|
||||
}
|
||||
],
|
||||
"tooltip": {
|
||||
"mode": "details"
|
||||
},
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 38.251497,
|
||||
@@ -310,7 +324,7 @@
|
||||
"zoom": 4.15
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-pre",
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
@@ -344,7 +358,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -374,6 +389,7 @@
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showMeasure": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
@@ -402,6 +418,9 @@
|
||||
"type": "markers"
|
||||
}
|
||||
],
|
||||
"tooltip": {
|
||||
"mode": "details"
|
||||
},
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 40.159084,
|
||||
@@ -410,7 +429,7 @@
|
||||
"zoom": 3.83
|
||||
}
|
||||
},
|
||||
"pluginVersion": "9.0.0-pre",
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
@@ -423,11 +442,12 @@
|
||||
}
|
||||
],
|
||||
"refresh": "",
|
||||
"schemaVersion": 36,
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"panel-tests"
|
||||
"panel-tests",
|
||||
"geomap"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
@@ -452,6 +472,6 @@
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Geomap",
|
||||
"uid": "2xuwrgV7z",
|
||||
"version": 2,
|
||||
"version": 4,
|
||||
"weekStart": ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,846 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 339,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 32,
|
||||
"w": 4,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,2.3"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 0,
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 32,
|
||||
"w": 4,
|
||||
"x": 4,
|
||||
"y": 0
|
||||
},
|
||||
"id": 5,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,2.3"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 17,
|
||||
"w": 4,
|
||||
"x": 8,
|
||||
"y": 0
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,2.3"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 0,
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 17,
|
||||
"w": 4,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"id": 3,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,2.3"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 4,
|
||||
"x": 16,
|
||||
"y": 0
|
||||
},
|
||||
"id": 7,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,2.3"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 0,
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 4,
|
||||
"x": 20,
|
||||
"y": 0
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,2.3"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 22,
|
||||
"w": 4,
|
||||
"x": 16,
|
||||
"y": 10
|
||||
},
|
||||
"id": 8,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,2.3"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 0,
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "s"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 22,
|
||||
"w": 4,
|
||||
"x": 20,
|
||||
"y": 10
|
||||
},
|
||||
"id": 9,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,2.3"
|
||||
}
|
||||
],
|
||||
"title": "Panel Title",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisCenteredZero": false,
|
||||
"axisColorMode": "text",
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"decimals": 0,
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 17
|
||||
},
|
||||
"id": 11,
|
||||
"maxDataPoints": 100,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom",
|
||||
"showLegend": true
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single",
|
||||
"sort": "none"
|
||||
}
|
||||
},
|
||||
"title": "Panel Title",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "panel-tests", "graph-ng"],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Zero Decimals Y Ticks",
|
||||
"uid": "kGvJCmGVz",
|
||||
"version": 7,
|
||||
"weekStart": ""
|
||||
}
|
||||
322
devenv/dev-dashboards/panel-text/text-options.json
Normal file
322
devenv/dev-dashboards/panel-text/text-options.json
Normal file
@@ -0,0 +1,322 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "grafana"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"fiscalYearStartMonth": 0,
|
||||
"graphTooltip": 0,
|
||||
"id": 1348,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"code": {
|
||||
"language": "plaintext",
|
||||
"showLineNumbers": false,
|
||||
"showMiniMap": false
|
||||
},
|
||||
"content": "## Data center = $datacenter\n\n### server = $server\n\n#### pod = $pod\n\n---\ntext = $Text",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"title": "Markdown (with variables)",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"id": 5,
|
||||
"options": {
|
||||
"code": {
|
||||
"language": "json",
|
||||
"showLineNumbers": true,
|
||||
"showMiniMap": false
|
||||
},
|
||||
"content": "{\n \"datacenter\": $datacenter,\n \"server\": $server,\n \"pod\": $pod\n \"text\": $Text\n}\n",
|
||||
"mode": "code"
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"title": "JSON (with variables)",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"code": {
|
||||
"language": "plaintext",
|
||||
"showLineNumbers": false,
|
||||
"showMiniMap": false
|
||||
},
|
||||
"content": "<h3>Data center</h3>\n<p>$datacenter</p>\n\n<h3>server</h3>\n<p>$server</p>\n\n<h3>pod</h3>\n<p>$pod</p>\n\n<h3>Text</h3>\n<p>$Text</p>",
|
||||
"mode": "html"
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"title": "HTML (with variables)",
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 9
|
||||
},
|
||||
"id": 7,
|
||||
"options": {
|
||||
"code": {
|
||||
"language": "markdown",
|
||||
"showLineNumbers": true,
|
||||
"showMiniMap": true
|
||||
},
|
||||
"content": "## Data center\n$datacenter\n\n### server\n$server\n\n#### pod = \n$pod\n",
|
||||
"mode": "code"
|
||||
},
|
||||
"pluginVersion": "9.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"title": "Markdown (code w/ with variables)",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"refresh": false,
|
||||
"schemaVersion": 37,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": [
|
||||
"All"
|
||||
],
|
||||
"value": [
|
||||
"$__all"
|
||||
]
|
||||
},
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"definition": "*",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"multi": true,
|
||||
"name": "datacenter",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "*",
|
||||
"refId": "gdev-testdata-datacenter-Variable-Query"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 0,
|
||||
"tagValuesQuery": "",
|
||||
"tagsQuery": "",
|
||||
"type": "query",
|
||||
"useTags": false
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": [
|
||||
"All"
|
||||
],
|
||||
"value": [
|
||||
"$__all"
|
||||
]
|
||||
},
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"definition": "$datacenter.*",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"multi": true,
|
||||
"name": "server",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "$datacenter.*",
|
||||
"refId": "gdev-testdata-server-Variable-Query"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 0,
|
||||
"tagValuesQuery": "",
|
||||
"tagsQuery": "",
|
||||
"type": "query",
|
||||
"useTags": false
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": [
|
||||
"AAA",
|
||||
"ACB"
|
||||
],
|
||||
"value": [
|
||||
"AAA",
|
||||
"ACB"
|
||||
]
|
||||
},
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"definition": "$datacenter.$server.*",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"multi": true,
|
||||
"name": "pod",
|
||||
"options": [],
|
||||
"query": {
|
||||
"query": "$datacenter.$server.*",
|
||||
"refId": "gdev-testdata-pod-Variable-Query"
|
||||
},
|
||||
"refresh": 1,
|
||||
"regex": "",
|
||||
"skipUrlSync": false,
|
||||
"sort": 0,
|
||||
"tagValuesQuery": "",
|
||||
"tagsQuery": "",
|
||||
"type": "query",
|
||||
"useTags": false
|
||||
},
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "temp",
|
||||
"value": "temp"
|
||||
},
|
||||
"hide": 0,
|
||||
"name": "Text",
|
||||
"options": [
|
||||
{
|
||||
"selected": true,
|
||||
"text": "temp",
|
||||
"value": "temp"
|
||||
}
|
||||
],
|
||||
"query": "temp",
|
||||
"skipUrlSync": false,
|
||||
"type": "textbox"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-1h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": [
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Text options",
|
||||
"uid": "WZ7AhQiVz",
|
||||
"version": 1,
|
||||
"weekStart": ""
|
||||
}
|
||||
@@ -15,7 +15,6 @@ signout_redirect_url = http://127.0.0.1:8088/oauth2/sign_out
|
||||
|
||||
[auth.jwt]
|
||||
enabled = true
|
||||
enable_login_token = true
|
||||
header_name = X-Forwarded-Access-Token
|
||||
username_claim = login
|
||||
email_claim = email
|
||||
|
||||
@@ -1 +1 @@
|
||||
mysql_version=5.6
|
||||
mysql_version=5.7
|
||||
|
||||
@@ -1 +1 @@
|
||||
mysql_version=5.6
|
||||
mysql_version=5.7
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ARG mysql_version=5.6
|
||||
ARG mysql_version=5.7
|
||||
FROM mysql:${mysql_version}
|
||||
ADD setup.sql /docker-entrypoint-initdb.d
|
||||
RUN chown -R mysql:mysql /docker-entrypoint-initdb.d/
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
context: docker/blocks/mysql_tests
|
||||
args:
|
||||
- mysql_version=${mysql_version}
|
||||
platform: linux/amd64
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: grafana_tests
|
||||
|
||||
@@ -2218,6 +2218,7 @@ d4b2c483-1dd3-47f6-86bf-42548009918d \N password 74e29604-ff35-42bb-a26d-4d0b81e
|
||||
b8c9b8b4-5943-43fe-9274-d63fd3e4a139 \N password c685749a-645e-4396-b9ee-6eedbfd89d5e 1656420634344 \N {"value":"IAOFzbDfWwzosZc+Z5nFm/i0B4foqmU4Q0EKG34RU3iwlIYUseEB3BoJqLEfM3Rj9oOSryEbCzblWRDS/5Padw==","salt":"7VR1+KwLVRZ6PenxaQoQTA==","additionalParameters":{}} {"hashIterations":27500,"algorithm":"pbkdf2-sha256","additionalParameters":{}} 10
|
||||
94aeafd3-71a5-4966-b2b6-34a083df6e92 \N password bdce2246-bb51-4f55-bb81-b7b8856225bc 1656425248776 \N {"value":"uD8KlRNocvZwYq1VZUShVp88zEtMUEeQnLYkW8ZvZXDdn1w1EahwnpNWYIc5QewEm3Nnf3DBYlUUrrbMC4XyfQ==","salt":"REwgUSsxRA/sqM5ujSrpcg==","additionalParameters":{}} {"hashIterations":27500,"algorithm":"pbkdf2-sha256","additionalParameters":{}} 10
|
||||
624725ce-9e36-4501-8bc8-ec39ee6b98d5 \N password 56eff2b3-e36a-4e3e-84a1-361ad312667b 1656428741229 \N {"value":"4UBzDNd3oPxP54/z7ez1Bd3xSfKJBpbE3rQppM3Xg+2bLaLNoU90TPEK+8SWbpMAFBKHz53qPWrZ50MbNgcGSA==","salt":"iTNvn3xr0acn9wqQxJ3d/A==","additionalParameters":{}} {"hashIterations":27500,"algorithm":"pbkdf2-sha256","additionalParameters":{}} 10
|
||||
77f9adeb-4bd6-47bd-93d6-49ac90edc731 \N password b8aada79-3fb4-45cd-95d0-c046f3a0113a 1662476251794 \N {"value":"dQJruhADrlLXvwYwd3L2S7ie5FWLGFxJVZm2Eog92xUH2+oahsM52tFvVfsI4wlbAN+XBqMGsfz9rsXeROWvXw==","salt":"64V0IRC+zdOkJ8l4ejfmHA==","additionalParameters":{}} {"hashIterations":27500,"algorithm":"pbkdf2-sha256","additionalParameters":{}} 10
|
||||
\.
|
||||
|
||||
|
||||
@@ -2571,9 +2572,9 @@ b8a4faaf-86d9-43eb-bb18-0eaa654b35a7 ef7f6eac-9fff-44aa-a86c-5125d52acc82 t ${ro
|
||||
c49bddc6-ec92-4caa-bc04-57ba80a92eb9 grafana f ${role_offline-access} offline_access grafana \N grafana
|
||||
0f3d47bb-002a-4cd0-a502-725f224308a7 grafana f ${role_uma_authorization} uma_authorization grafana \N grafana
|
||||
60f1b1ea-9059-41ea-acef-573643b24709 grafana f Grafana Organization Administrator admin grafana \N grafana
|
||||
c029a218-4519-4537-ae12-d8f3c27a0003 grafana f Grafana Server Admin serveradmin grafana \N grafana
|
||||
c9a776f9-2740-435f-a725-4dbcc17a6c91 grafana f Grafana Viewer viewer grafana \N grafana
|
||||
c4c74006-c346-48cf-8cf1-1617e3e1cde1 grafana f Grafana Editor editor grafana \N grafana
|
||||
c90ad7c8-d14b-46ed-b94d-2de3baa50ff7 grafana f Grafana Server Admin grafanaadmin grafana \N grafana
|
||||
\.
|
||||
|
||||
|
||||
@@ -3301,6 +3302,7 @@ COPY public.user_entity (id, email, email_constraint, email_verified, enabled, f
|
||||
c685749a-645e-4396-b9ee-6eedbfd89d5e oauth-admin@example.org oauth-admin@example.org f t \N Admin Oauth grafana oauth-admin 1656418530879 \N 0
|
||||
56eff2b3-e36a-4e3e-84a1-361ad312667b oauth-editor@example.org oauth-editor@example.org f t \N Editor Oauth grafana oauth-editor 1656418563005 \N 0
|
||||
bdce2246-bb51-4f55-bb81-b7b8856225bc oauth-viewer@example.org oauth-viewer@example.org f t \N Viewer Oauth grafana oauth-viewer 1656425237046 \N 0
|
||||
b8aada79-3fb4-45cd-95d0-c046f3a0113a oauth-grafanaadmin@example.org oauth-grafanaadmin@example.org t t \N Grafanaadmin Oauth grafana oauth-grafanaadmin 1662476222024 \N 0
|
||||
\.
|
||||
|
||||
|
||||
@@ -3376,6 +3378,11 @@ c49bddc6-ec92-4caa-bc04-57ba80a92eb9 bdce2246-bb51-4f55-bb81-b7b8856225bc
|
||||
0f3d47bb-002a-4cd0-a502-725f224308a7 bdce2246-bb51-4f55-bb81-b7b8856225bc
|
||||
f1311ecb-6a6a-49d6-bb16-5132daf93a64 bdce2246-bb51-4f55-bb81-b7b8856225bc
|
||||
18a7066b-fe71-410e-9581-69f78347ec29 bdce2246-bb51-4f55-bb81-b7b8856225bc
|
||||
c49bddc6-ec92-4caa-bc04-57ba80a92eb9 b8aada79-3fb4-45cd-95d0-c046f3a0113a
|
||||
0f3d47bb-002a-4cd0-a502-725f224308a7 b8aada79-3fb4-45cd-95d0-c046f3a0113a
|
||||
f1311ecb-6a6a-49d6-bb16-5132daf93a64 b8aada79-3fb4-45cd-95d0-c046f3a0113a
|
||||
18a7066b-fe71-410e-9581-69f78347ec29 b8aada79-3fb4-45cd-95d0-c046f3a0113a
|
||||
c90ad7c8-d14b-46ed-b94d-2de3baa50ff7 b8aada79-3fb4-45cd-95d0-c046f3a0113a
|
||||
\.
|
||||
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ name_attribute_path = name
|
||||
auth_url = http://localhost:8087/auth/realms/grafana/protocol/openid-connect/auth
|
||||
token_url = http://localhost:8087/auth/realms/grafana/protocol/openid-connect/token
|
||||
api_url = http://localhost:8087/auth/realms/grafana/protocol/openid-connect/userinfo
|
||||
role_attribute_path = contains(roles[*], 'admin') && 'Admin' || contains(roles[*], 'editor') && 'Editor' || 'Viewer'
|
||||
role_attribute_path = contains(roles[*], 'grafanaadmin') && 'GrafanaAdmin' || contains(roles[*], 'admin') && 'Admin' || contains(roles[*], 'editor') && 'Editor' || 'Viewer'
|
||||
allow_assign_grafana_admin = true
|
||||
```
|
||||
|
||||
## Devenv setup jwt auth
|
||||
@@ -112,9 +113,10 @@ docker-compose exec -T oauthkeycloakdb bash -c "pg_dump -U keycloak keycloak" >
|
||||
|
||||
- keycloak admin: http://localhost:8087
|
||||
- keycloak admin login: admin:admin
|
||||
- grafana oauth viewer login: oauth-viewer:grafana
|
||||
- grafana oauth editor login: oauth-editor:grafana
|
||||
- grafana oauth admin login: oauth-admin:grafana
|
||||
- grafana oauth viewer login: oauth-viewer:grafana
|
||||
- grafana oauth editor login: oauth-editor:grafana
|
||||
- grafana oauth admin login: oauth-admin:grafana
|
||||
- grafana oauth server admin login: oauth-grafanaadmin:grafana
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
postgres_version=9.3
|
||||
postgres_version=10.15
|
||||
|
||||
@@ -1 +1 @@
|
||||
postgres_version=9.3
|
||||
postgres_version=10.15
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ARG postgres_version=9.3
|
||||
ARG postgres_version=10.15
|
||||
FROM postgres:${postgres_version}
|
||||
ADD setup.sql /docker-entrypoint-initdb.d
|
||||
RUN chown -R postgres:postgres /docker-entrypoint-initdb.d/
|
||||
|
||||
@@ -16,7 +16,7 @@ services:
|
||||
tag: nginx
|
||||
|
||||
db:
|
||||
image: mysql:5.6
|
||||
image: mysql:5.7
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: grafana
|
||||
@@ -41,7 +41,7 @@ services:
|
||||
condition: service_healthy
|
||||
|
||||
# db:
|
||||
# image: postgres:9.3
|
||||
# image: postgres:10.15
|
||||
# environment:
|
||||
# POSTGRES_DATABASE: grafana
|
||||
# POSTGRES_USER: grafana
|
||||
|
||||
@@ -319,7 +319,7 @@ Note: The JSON definition in the input field when using `Copy JSON to Clipboard`
|
||||
|
||||
### Reusable Dashboard URLs
|
||||
|
||||
If the dashboard in the JSON file contains an [UID]({{< relref "../../dashboards/json-model/" >}}), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
|
||||
If the dashboard in the JSON file contains an [UID]({{< relref "../../dashboards/build-dashboards/view-dashboard-json-model" >}}), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
|
||||
When Grafana starts, it updates/inserts all dashboards available in the configured folders. If you modify the file, then the dashboard is also updated.
|
||||
By default, Grafana deletes dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
|
||||
|
||||
@@ -366,587 +366,11 @@ providers:
|
||||
|
||||
## Alerting
|
||||
|
||||
You can manage alert objects in Grafana by adding one or more YAML or JSON
|
||||
configuration files in the [`provisioning/alerting`]({{< relref "../../setup-grafana/configure-grafana/" >}})
|
||||
directory. Those files will be applied when starting Grafana. When Grafana
|
||||
is running, it's possible to do a hot reload using the
|
||||
[Admin API]({{< relref "../../developers/http_api/admin/#reload-provisioning-configurations" >}}).
|
||||
|
||||
### Rules
|
||||
|
||||
Creation
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of rule groups to import or update
|
||||
groups:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> name of the rule group
|
||||
name: my_rule_group
|
||||
# <string, required> name of the folder the rule group will be stored in
|
||||
folder: my_first_folder
|
||||
# <duration, required> interval that the rule group should evaluated at
|
||||
interval: 60s
|
||||
# <list, required> list of rules that are part of the rule group
|
||||
rules:
|
||||
# <string, required> unique identifier for the rule
|
||||
- uid: my_id_1
|
||||
# <string, required> title of the rule that will be displayed in the UI
|
||||
title: my_first_rule
|
||||
# <string, required> which query should be used for the condition
|
||||
condition: A
|
||||
# <list, required> list of query objects that should be executed on each
|
||||
# evaluation - should be obtained trough the API
|
||||
data:
|
||||
- refId: A
|
||||
datasourceUid: '-100'
|
||||
model:
|
||||
conditions:
|
||||
- evaluator:
|
||||
params:
|
||||
- 3
|
||||
type: gt
|
||||
operator:
|
||||
type: and
|
||||
query:
|
||||
params:
|
||||
- A
|
||||
reducer:
|
||||
type: last
|
||||
type: query
|
||||
datasource:
|
||||
type: __expr__
|
||||
uid: '-100'
|
||||
expression: 1==0
|
||||
intervalMs: 1000
|
||||
maxDataPoints: 43200
|
||||
refId: A
|
||||
type: math
|
||||
# <string> UID of a dashboard that the alert rule should be linked to
|
||||
dashboardUid: my_dashboard
|
||||
# <int> ID of the panel that the alert rule should be linked to
|
||||
panelId: 123
|
||||
# <string> the state the alert rule will have when no data is returned
|
||||
# possible values: "NoData", "Alerting", "OK", default = NoData
|
||||
noDataState: Alerting
|
||||
# <string> the state the alert rule will have when the query execution
|
||||
# failed - possible values: "Error", "Alerting", "OK"
|
||||
# default = Alerting
|
||||
# <duration, required> for how long should the alert fire before alerting
|
||||
for: 60s
|
||||
# <map<string, string>> a map of strings to pass around any data
|
||||
annotations:
|
||||
some_key: some_value
|
||||
# <map<string, string> a map of strings that can be used to filter and
|
||||
# route alerts
|
||||
labels:
|
||||
team: sre_team_1
|
||||
```
|
||||
|
||||
Deletion
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of alert rule UIDs that should be deleted
|
||||
deleteRules:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> unique identifier for the rule
|
||||
uid: my_id_1
|
||||
```
|
||||
|
||||
### Contact points
|
||||
|
||||
Creation
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of contact points to import or update
|
||||
contactPoints:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> name of the contact point
|
||||
name: cp_1
|
||||
receivers:
|
||||
# <string, required> unique identifier for the receiver
|
||||
- uid: first_uid
|
||||
# <string, required> type of the receiver
|
||||
type: prometheus-alertmanager
|
||||
# <object, required> settings for the specific receiver type
|
||||
settings:
|
||||
url: http://test:9000
|
||||
```
|
||||
|
||||
Deletion
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of receivers that should be deleted
|
||||
deleteContactPoints:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> unique identifier for the receiver
|
||||
uid: first_uid
|
||||
```
|
||||
|
||||
#### Settings
|
||||
|
||||
Here we showcase what kind of settings you can have for the different
|
||||
contact point types.
|
||||
|
||||
##### Alertmanager
|
||||
|
||||
```yaml
|
||||
type: prometheus-alertmanager
|
||||
settings:
|
||||
# <string, required>
|
||||
url: http://localhost:9093
|
||||
# <string>
|
||||
basicAuthUser: abc
|
||||
# <string>
|
||||
basicAuthPassword: abc123
|
||||
```
|
||||
|
||||
##### DingDing
|
||||
|
||||
```yaml
|
||||
type: dingding
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx
|
||||
# <string> options: link, actionCard
|
||||
msgType: link
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Discord
|
||||
|
||||
```yaml
|
||||
type: discord
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://discord/webhook
|
||||
# <string>
|
||||
avatar_url: https://my_avatar
|
||||
# <string>
|
||||
use_discord_username: Grafana
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### E-Mail
|
||||
|
||||
```yaml
|
||||
type: email
|
||||
settings:
|
||||
# <string, required>
|
||||
addresses: me@example.com;you@example.com
|
||||
# <bool>
|
||||
singleEmail: false
|
||||
# <string>
|
||||
message: my optional message to include
|
||||
# <string>
|
||||
subject: |
|
||||
{{ template "default.title" . }}
|
||||
```
|
||||
|
||||
##### Google Hangouts Chat
|
||||
|
||||
```yaml
|
||||
type: googlechat
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://google/webhook
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Kafka
|
||||
|
||||
```yaml
|
||||
type: kafka
|
||||
settings:
|
||||
# <string, required>
|
||||
kafkaRestProxy: http://localhost:8082
|
||||
# <string, required>
|
||||
kafkaTopic: topic1
|
||||
```
|
||||
|
||||
##### LINE
|
||||
|
||||
```yaml
|
||||
type: line
|
||||
settings:
|
||||
# <string, required>
|
||||
token: xxx
|
||||
```
|
||||
|
||||
##### Microsoft Teams
|
||||
|
||||
```yaml
|
||||
type: teams
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://ms_teams_url
|
||||
# <string>
|
||||
title: |
|
||||
{{ template "default.title" . }}
|
||||
# <string>
|
||||
sectiontitle: ''
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### OpsGenie
|
||||
|
||||
```yaml
|
||||
type: opsgenie
|
||||
settings:
|
||||
# <string, required>
|
||||
apiKey: xxx
|
||||
# <string, required>
|
||||
apiUrl: https://api.opsgenie.com/v2/alerts
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.title" . }}
|
||||
# <string>
|
||||
description: some descriptive description
|
||||
# <bool>
|
||||
autoClose: false
|
||||
# <bool>
|
||||
overridePriority: false
|
||||
# <string> options: tags, details, both
|
||||
sendTagsAs: both
|
||||
```
|
||||
|
||||
##### PagerDuty
|
||||
|
||||
```yaml
|
||||
type: pagerduty
|
||||
settings:
|
||||
# <string, required>
|
||||
integrationKey: XXX
|
||||
# <string> options: critical, error, warning, info
|
||||
severity: critical
|
||||
# <string>
|
||||
class: ping failure
|
||||
# <string>
|
||||
component: Grafana
|
||||
# <string>
|
||||
group: app-stack
|
||||
# <string>
|
||||
summary: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Pushover
|
||||
|
||||
```yaml
|
||||
type: pushover
|
||||
settings:
|
||||
# <string, required>
|
||||
apiToken: XXX
|
||||
# <string, required>
|
||||
userKey: user1,user2
|
||||
# <string>
|
||||
device: device1,device2
|
||||
# <string> options (high to low): 2,1,0,-1,-2
|
||||
priority: '2'
|
||||
# <string>
|
||||
retry: '30'
|
||||
# <string>
|
||||
expire: '120'
|
||||
# <string>
|
||||
sound: siren
|
||||
# <string>
|
||||
okSound: magic
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Slack
|
||||
|
||||
```yaml
|
||||
type: slack
|
||||
settings:
|
||||
# <string, required>
|
||||
recipient: alerting-dev
|
||||
# <string, required>
|
||||
token: xxx
|
||||
# <string>
|
||||
username: grafana_bot
|
||||
# <string>
|
||||
icon_emoji: heart
|
||||
# <string>
|
||||
icon_url: https://icon_url
|
||||
# <string>
|
||||
mentionUsers: user_1,user_2
|
||||
# <string>
|
||||
mentionGroups: group_1,group_2
|
||||
# <string> options: here, channel
|
||||
mentionChannel: here
|
||||
# <string> Optionally provide a Slack incoming webhook URL for sending messages, in this case the token isn't necessary
|
||||
url: https://some_webhook_url
|
||||
# <string>
|
||||
endpointUrl: https://custom_url/api/chat.postMessage
|
||||
# <string>
|
||||
title: |
|
||||
{{ template "slack.default.title" . }}
|
||||
text: |
|
||||
{{ template "slack.default.text" . }}
|
||||
```
|
||||
|
||||
##### Sensu Go
|
||||
|
||||
```yaml
|
||||
type: sensugo
|
||||
settings:
|
||||
# <string, required>
|
||||
url: http://sensu-api.local:8080
|
||||
# <string, required>
|
||||
apikey: xxx
|
||||
# <string>
|
||||
entity: default
|
||||
# <string>
|
||||
check: default
|
||||
# <string>
|
||||
handler: some_handler
|
||||
# <string>
|
||||
namespace: default
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Telegram
|
||||
|
||||
```yaml
|
||||
type: telegram
|
||||
settings:
|
||||
# <string, required>
|
||||
bottoken: xxx
|
||||
# <string, required>
|
||||
chatid: some_chat_id
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Threema Gateway
|
||||
|
||||
```yaml
|
||||
type: threema
|
||||
settings:
|
||||
# <string, required>
|
||||
api_secret: xxx
|
||||
# <string, required>
|
||||
gateway_id: A5K94S9
|
||||
# <string, required>
|
||||
recipient_id: A9R4KL4S
|
||||
```
|
||||
|
||||
##### VictorOps
|
||||
|
||||
```yaml
|
||||
type: victorops
|
||||
settings:
|
||||
# <string, required>
|
||||
url: XXX
|
||||
# <string> options: CRITICAL, WARNING
|
||||
messageType: CRITICAL
|
||||
```
|
||||
|
||||
##### Webhook
|
||||
|
||||
```yaml
|
||||
type: webhook
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://endpoint_url
|
||||
# <string> options: POST, PUT
|
||||
httpMethod: POST
|
||||
# <string>
|
||||
username: abc
|
||||
# <string>
|
||||
password: abc123
|
||||
# <string>
|
||||
authorization_scheme: Bearer
|
||||
# <string>
|
||||
authorization_credentials: abc123
|
||||
# <string>
|
||||
maxAlerts: '10'
|
||||
```
|
||||
|
||||
##### WeCom
|
||||
|
||||
```yaml
|
||||
type: wecom
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
# <string>
|
||||
title: |
|
||||
{{ template "default.title" . }}
|
||||
```
|
||||
|
||||
### Notification policies
|
||||
|
||||
Create
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of notification policies
|
||||
policies:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string> name of the contact point that should be used for this route
|
||||
receiver: grafana-default-email
|
||||
# <list> The labels by which incoming alerts are grouped together. For example,
|
||||
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
|
||||
# be batched into a single group.
|
||||
#
|
||||
# To aggregate by all possible labels use the special value '...' as
|
||||
# the sole label name, for example:
|
||||
# group_by: ['...']
|
||||
# This effectively disables aggregation entirely, passing through all
|
||||
# alerts as-is. This is unlikely to be what you want, unless you have
|
||||
# a very low alert volume or your upstream notification system performs
|
||||
# its own grouping.
|
||||
group_by: ['...']
|
||||
# <list> a list of matchers that an alert has to fulfill to match the node
|
||||
matchers:
|
||||
- alertname = Watchdog
|
||||
- severity =~ "warning|critical"
|
||||
# <list> Times when the route should be muted. These must match the name of a
|
||||
# mute time interval.
|
||||
# Additionally, the root node cannot have any mute times.
|
||||
# When a route is muted it will not send any notifications, but
|
||||
# otherwise acts normally (including ending the route-matching process
|
||||
# if the `continue` option is not set)
|
||||
mute_time_intervals:
|
||||
- abc
|
||||
# <duration> How long to initially wait to send a notification for a group
|
||||
# of alerts. Allows to collect more initial alerts for the same group.
|
||||
# (Usually ~0s to few minutes), default = 30s
|
||||
group_wait: 30s
|
||||
# <duration> How long to wait before sending a notification about new alerts that
|
||||
# are added to a group of alerts for which an initial notification has
|
||||
# already been sent. (Usually ~5m or more), default = 5m
|
||||
group_internval: 5m
|
||||
# <duration> How long to wait before sending a notification again if it has already
|
||||
# been sent successfully for an alert. (Usually ~3h or more), default = 4h
|
||||
repeat_interval: 4h
|
||||
# <list> Zero or more child routes
|
||||
# routes:
|
||||
# ...
|
||||
```
|
||||
|
||||
Reset
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of orgIds that should be reset to the default policy
|
||||
resetPolicies:
|
||||
- 1
|
||||
```
|
||||
|
||||
### Templates
|
||||
|
||||
Creation
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of templates to import or update
|
||||
templates:
|
||||
# <int> organization ID, default = 1
|
||||
- orgID: 1
|
||||
# <string, required> name of the template, must be unique
|
||||
name: my_first_template
|
||||
# <string, required> content of the the template
|
||||
template: Alerting with a custom text template
|
||||
```
|
||||
|
||||
Deletion
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of alert rule UIDs that should be deleted
|
||||
deleteTemplates:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> name of the template, must be unique
|
||||
name: my_first_template
|
||||
```
|
||||
|
||||
### Mute timings
|
||||
|
||||
Creation
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of mute time intervals to import or update
|
||||
muteTimes:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> name of the mute time interval, must be unique
|
||||
name: mti_1
|
||||
# <list> time intervals that should trigger the muting
|
||||
# refer to https://prometheus.io/docs/alerting/latest/configuration/#time_interval-0
|
||||
time_intervals:
|
||||
- times:
|
||||
- start_time: '06:00'
|
||||
end_time: '23:59'
|
||||
weekdays: ['monday:wednesday', 'saturday', 'sunday']
|
||||
months: ['1:3', 'may:august', 'december']
|
||||
years: ['2020:2022', '2030']
|
||||
days_of_month: ['1:5', '-3:-1']
|
||||
```
|
||||
|
||||
Deletion
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of mute time intervals that should be deleted
|
||||
deleteMuteTimes:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> name of the mute time interval, must be unique
|
||||
name: mti_1
|
||||
```
|
||||
For information on provisioning Grafana Alerting, refer to [Provision Grafana Alerting resources](https://grafana.com/docs/grafana/latest/alerting/set-up/provision-alerting-resources/).
|
||||
|
||||
## Alert Notification Channels
|
||||
|
||||
> **Note:** Alert Notification Channels are part of legacy alerting, which is deprecated and will be removed in Grafana 10. Use Contact Points in the alerting section above.
|
||||
> **Note:** Alert Notification Channels are part of legacy alerting, which is deprecated and will be removed in Grafana 10. Use the Provision contact points section in [Create and manage alerting resources using file provisioning](https://grafana.com/docs/grafana/latest/alerting/set-up/provision-alerting-resources/file-provisioning/).
|
||||
|
||||
Alert Notification Channels can be provisioned by adding one or more YAML config files in the [`provisioning/notifiers`](/administration/configuration/#provisioning) directory.
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ Grafana Enterprise includes the ability for you to assign discrete fixed roles t
|
||||
Assign fixed roles when the basic roles do not meet your permission requirements. For example, you might want a user with the basic viewer role to also edit dashboards. Or, you might want anyone with the editor role to also add and manage users. Fixed roles provide users more granular access to create, view, and update the following Grafana resources:
|
||||
|
||||
- [Alerting]({{< relref "../../../alerting/" >}})
|
||||
- [Annotations]({{< relref "../../../dashboards/annotations/" >}})
|
||||
- [Annotations]({{< relref "../../../dashboards/build-dashboards/annotate-visualizations" >}})
|
||||
- [API keys]({{< relref "../../api-keys/" >}})
|
||||
- [Dashboards and folders]({{< relref "../../../dashboards/" >}})
|
||||
- [Data sources]({{< relref "../../../datasources/" >}})
|
||||
@@ -87,7 +87,7 @@ Assign fixed roles when the basic roles do not meet your permission requirements
|
||||
- [Licenses]({{< relref "../../stats-and-license/" >}})
|
||||
- [Organizations]({{< relref "../../organization-management/" >}})
|
||||
- [Provisioning]({{< relref "../../provisioning/" >}})
|
||||
- [Reports]({{< relref "../../../panels/create-reports/" >}})
|
||||
- [Reports]({{< relref "../../../dashboards/create-reports/" >}})
|
||||
- [Roles]({{< relref "../../" >}})
|
||||
- [Settings]({{< relref "../../../enterprise/settings-updates/" >}})
|
||||
- [Service accounts]({{< relref "../../service-accounts/" >}})
|
||||
|
||||
@@ -49,18 +49,22 @@ The following list contains role-based access control actions.
|
||||
| `apikeys:create` | n/a | Create API keys. |
|
||||
| `apikeys:read` | `apikeys:*`<br>`apikeys:id:*` | Read API keys. |
|
||||
| `apikeys:delete` | `apikeys:*`<br>`apikeys:id:*` | Delete API keys. |
|
||||
| `dashboards.permissions:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read permissions for one or more dashboards. |
|
||||
| `dashboards.permissions:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update permissions for one or more dashboards. |
|
||||
| `dashboards:create` | `folders:*`<br>`folders:uid:*` | Create dashboards in one or more folders. |
|
||||
| `dashboards:delete` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Delete one or more dashboards. |
|
||||
| `dashboards.insights:read` | n/a | Read dashboard insights data and see presence indicators. |
|
||||
| `dashboards.permissions:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read permissions for one or more dashboards. |
|
||||
| `dashboards.permissions:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update permissions for one or more dashboards. |
|
||||
| `dashboards:read` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Read one or more dashboards. |
|
||||
| `dashboards:write` | `dashboards:*`<br>`dashboards:uid:*`<br>`folders:*`<br>`folders:uid:*` | Update one or more dashboards. |
|
||||
| `datasources.id:read` | `datasources:*`<br>`datasources:uid:*` | Read data source IDs. |
|
||||
| `datasources.permissions:read` | `datasources:*`<br>`datasources:uid:*` | List data source permissions. |
|
||||
| `datasources.permissions:write` | `datasources:*`<br>`datasources:uid:*` | Update data source permissions. |
|
||||
| `datasources.caching:read` | `datasources:*`<br>`datasources:uid:*` | Read data source query caching settings. |
|
||||
| `datasources.caching:write` | `datasources:*`<br>`datasources:uid:*` | Update data source query caching settings. |
|
||||
| `datasources:create` | n/a | Create data sources. |
|
||||
| `datasources:delete` | `datasources:*`<br>`datasources:uid:*` | Delete data sources. |
|
||||
| `datasources:explore` | n/a | Enable access to the **Explore** tab. |
|
||||
| `datasources.id:read` | `datasources:*`<br>`datasources:uid:*` | Read data source IDs. |
|
||||
| `datasources.insights:read` | n/a | Read data sources insights data. |
|
||||
| `datasources.permissions:read` | `datasources:*`<br>`datasources:uid:*` | List data source permissions. |
|
||||
| `datasources.permissions:write` | `datasources:*`<br>`datasources:uid:*` | Update data source permissions. |
|
||||
| `datasources:query` | `datasources:*`<br>`datasources:uid:*` | Query data sources. |
|
||||
| `datasources:read` | `datasources:*`<br>`datasources:uid:*` | List data sources. |
|
||||
| `datasources:write` | `datasources:*`<br>`datasources:uid:*` | Update data sources. |
|
||||
|
||||
@@ -17,12 +17,12 @@ The following tables list permissions associated with basic and fixed roles.
|
||||
|
||||
## Basic role assignments
|
||||
|
||||
| Basic role | Associated fixed roles | Description |
|
||||
| ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
||||
| 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` | Default [Grafana server administrator]({{< relref "../#grafana-server-administrators" >}}) assignments. |
|
||||
| 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:folders:reader`<br>`fixes: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:writer` | Default [Grafana organization administrator]({{< relref "../#organization-users-and-permissions" >}}) assignments. |
|
||||
| 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` | Default [Editor]({{< relref "../#organization-users-and-permissions" >}}) assignments. |
|
||||
| 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` | Default [Viewer]({{< relref "../#organization-users-and-permissions" >}}) assignments. |
|
||||
| Basic role | Associated fixed roles | Description |
|
||||
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
|
||||
| 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` | Default [Grafana server administrator]({{< relref "../#grafana-server-administrators" >}}) assignments. |
|
||||
| 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:folders:reader`<br>`fixes: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:writer`<br>`fixed:datasources.caching:reader`<br>`fixed:datasources.caching:writer`<br>`fixed:dashboards.insights:reader`<br>`fixed:datasources.insights:reader` | Default [Grafana organization administrator]({{< relref "../#organization-users-and-permissions" >}}) assignments. |
|
||||
| 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` | Default [Editor]({{< relref "../#organization-users-and-permissions" >}}) assignments. |
|
||||
| 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` | Default [Viewer]({{< relref "../#organization-users-and-permissions" >}}) assignments. |
|
||||
|
||||
## Fixed role definitions
|
||||
|
||||
@@ -42,15 +42,19 @@ The following tables list permissions associated with basic and fixed roles.
|
||||
| `fixed:annotations:writer` | All permissions from `fixed:annotations:reader` <br>`annotations:write` <br>`annotations.create`<br> `annotations:delete` for scope `annotations:type:*` | Read, create, update and delete all annotations and annotation tags. |
|
||||
| `fixed:apikeys:reader` | `apikeys:read` for scope `apikeys:*` | Read all api keys. |
|
||||
| `fixed:apikeys:writer` | All permissions from `fixed:apikeys:reader` and <br> `apikeys:create` <br> `apikeys:delete` for scope `apikeys:*` | Read, create, delete all api keys. |
|
||||
| `fixed:dashboards:creator` | `dashboards:create`<br>`folders:read` | Create dashboards. |
|
||||
| `fixed:dashboards.insights:reader` | `dashboards.insights:read` | Read dashboard insights data and see presence indicators. |
|
||||
| `fixed:dashboards.permissions:reader` | `dashboards.permissions:read` | Read all dashboard permissions. |
|
||||
| `fixed:dashboards.permissions:writer` | All permissions from `fixed:dashboards.permissions:reader` and <br>`dashboards.permissions:write` | Read and update all dashboard permissions. |
|
||||
| `fixed:dashboards:creator` | `dashboards:create`<br>`folders:read` | Create dashboards. |
|
||||
| `fixed:dashboards:reader` | `dashboards:read` | Read all dashboards. |
|
||||
| `fixed:dashboards:writer` | All permissions from `fixed:dashboards:reader` and <br>`dashboards:write`<br>`dashboards:edit`<br>`dashboards:delete`<br>`dashboards:create`<br>`dashboards.permissions:read`<br>`dashboards.permissions:write` | Read, create, update, and delete all dashboards. |
|
||||
| `fixed:datasources.permissions:reader` | `datasources.permissions:read` | Read data source permissions. |
|
||||
| `fixed:datasources.permissions:writer` | All permissions from `fixed:datasources.permissions:reader` and <br>`datasources.permissions:write` | Create, read, or delete permissions of a data source. |
|
||||
| `fixed:datasources.caching:reader` | `datasources.caching:read` | Read data source query caching settings. |
|
||||
| `fixed:datasources.caching:writer` | `datasources.caching:read`<br>`datasources.caching:write` | Enable, disable, or update query caching settings. |
|
||||
| `fixed:datasources:explorer` | `datasources:explore` | Enable the Explore feature. Data source permissions still apply, you can only query data sources for which you have query permissions. |
|
||||
| `fixed:datasources:id:reader` | `datasources.id:read` | Read the ID of a data source based on its name. |
|
||||
| `fixed:datasources.insights:reader` | `datasources.insights:read` | Read data source insights data. |
|
||||
| `fixed:datasources.permissions:reader` | `datasources.permissions:read` | Read data source permissions. |
|
||||
| `fixed:datasources.permissions:writer` | All permissions from `fixed:datasources.permissions:reader` and <br>`datasources.permissions:write` | Create, read, or delete permissions of a data source. |
|
||||
| `fixed:datasources:reader` | `datasources:read`<br>`datasources:query` | Read and query data sources. |
|
||||
| `fixed:datasources:writer` | All permissions from `fixed:datasources:reader` and <br>`datasources:create`<br>`datasources:write`<br>`datasources:delete` | Read, query, create, delete, or update a data source. |
|
||||
| `fixed:folders.permissions:reader` | `folders.permissions:read` | Read all folder permissions. |
|
||||
|
||||
@@ -31,6 +31,9 @@ In [Grafana Enterprise]({{< relref "../../enterprise/" >}}), you can also use se
|
||||
|
||||
> **Note:** Service accounts can only act in the organization they are created for. If you have the same task that is needed for multiple organizations, we recommend creating service accounts in each organization.
|
||||
|
||||
{{< vimeo 742056367 >}}
|
||||
<br>
|
||||
|
||||
## Service account tokens
|
||||
|
||||
A service account token is a generated random string that acts as an alternative to a password when authenticating with Grafana's HTTP API.
|
||||
@@ -16,13 +16,15 @@ A user can be a Member or an Administrator for a given team. Members of a team i
|
||||
|
||||
For more information about teams, refer to [Teams and permissions]({{< relref "../roles-and-permissions/#teams-and-permissions" >}}).
|
||||
|
||||
For information about how to optimize your teams, refer to [How to best organize your teams and resources in Grafana](https://grafana.com/blog/2022/03/14/how-to-best-organize-your-teams-and-resources-in-grafana/).
|
||||
|
||||
## Create a team
|
||||
|
||||
A team is a group of users within an organization that have common dashboard and data source permission needs. Use teams to help make user-permission management more efficient.
|
||||
|
||||
A user can belong to multiple teams.
|
||||
|
||||
### Before you begin
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you have either organization administrator permissions or team administrator permissions
|
||||
- Make a plan for which users belong to which teams and the permissions team members receive
|
||||
@@ -41,7 +43,7 @@ A user can belong to multiple teams.
|
||||
|
||||
Add a team member to an existing team whenever you want to provide access to team dashboards and folders to another user.
|
||||
|
||||
### Before you begin
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you have organization administrator permissions
|
||||
- [Create a team](#create-a-team).
|
||||
@@ -61,7 +63,7 @@ Add a team member to an existing team whenever you want to provide access to tea
|
||||
|
||||
Complete this task when you want to add or modify team member permissions.
|
||||
|
||||
### Before you begin
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you have either organization administrator permissions or team administrator permissions
|
||||
|
||||
@@ -79,7 +81,7 @@ Complete this task when you want to add or modify team member permissions.
|
||||
|
||||
You can remove a team member when you no longer want to apply team permissions to the user
|
||||
|
||||
### Before you begin
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you have either organization administrator permissions or team administrator permissions
|
||||
|
||||
@@ -95,7 +97,7 @@ You can remove a team member when you no longer want to apply team permissions t
|
||||
|
||||
Delete a team when you no longer need it. This action permanently deletes the team and removes all team permissions from dashboards and folders.
|
||||
|
||||
### Before you begin
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you have organization administrator permissions
|
||||
|
||||
@@ -110,7 +112,7 @@ Delete a team when you no longer need it. This action permanently deletes the te
|
||||
|
||||
See the complete list of teams in your Grafana organization.
|
||||
|
||||
### Before you begin
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you have either organization administrator permissions or team administrator permissions
|
||||
|
||||
|
||||
@@ -9,16 +9,16 @@ keywords:
|
||||
- alerting
|
||||
- alerts
|
||||
- groups
|
||||
title: View alert groupings
|
||||
title: View alert groups
|
||||
weight: 445
|
||||
---
|
||||
|
||||
# View alert groupings
|
||||
# View alert groups
|
||||
|
||||
To view alert groupings:
|
||||
To view alert groups:
|
||||
|
||||
1. In the Grafana menu, click the **Alerting** (bell) icon to open the Alerting page listing existing alerts.
|
||||
1. Click **Alert grouping** to open the page listing existing groups.
|
||||
1. Click **Alert groups** to open the page listing existing groups.
|
||||
1. From the **Alertmanager** drop-down, select an external Alertmanager as your data source. By default, the `Grafana` Alertmanager is selected.
|
||||
1. From **custom group by** drop-down, select a combination of labels to view a grouping other than the default. This is useful for debugging and verifying your grouping of notification policies.
|
||||
|
||||
|
||||
@@ -3,15 +3,17 @@ aliases:
|
||||
- /docs/grafana/latest/alerting/fundamentals/
|
||||
- /docs/grafana/latest/alerting/metrics/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/fundamentals/
|
||||
title: Alerting fundamentals
|
||||
weight: 110
|
||||
title: Explore Grafana Alerting
|
||||
weight: 105
|
||||
---
|
||||
|
||||
# Alerting fundamentals
|
||||
# Explore Grafana Alerting
|
||||
|
||||
This section includes the following fundamental concepts of Grafana Alerting:
|
||||
Learn about the key concepts and features that help you create, manage, and take action on your alerts and improve your team's ability to resolve issues quickly.
|
||||
|
||||
- [Annotations and labels for alerting rules]({{< relref "annotation-label/" >}})
|
||||
- [Alertmanager]({{< relref "alertmanager/" >}})
|
||||
- [State and health of alerting rules]({{< relref "state-and-health/" >}})
|
||||
- [Evaluating Grafana managed alerts]({{< relref "evaluate-grafana-alerts/" >}})
|
||||
- [Data sources](https://grafana.com/docs/grafana/latest/alerting/fundamentals/data-source-alerting/)
|
||||
- [Alert rules](https://grafana.com/docs/grafana/latest/alerting/fundamentals/alert-rules/)
|
||||
- [Alerting on numeric data](https://grafana.com/docs/grafana/latest/alerting/fundamentals/evaluate-grafana-alerts/)
|
||||
- [Alertmanager](https://grafana.com/docs/grafana/latest/alerting/fundamentals/alertmanager/)
|
||||
- [Annotations and labels for alerting rules](https://grafana.com/docs/grafana/latest/alerting/fundamentals/annotation-label/)
|
||||
- [State and health of alerting rules](https://grafana.com/docs/grafana/latest/alerting/fundamentals/state-and-health/)
|
||||
|
||||
@@ -9,34 +9,30 @@ weight: 116
|
||||
|
||||
# Alertmanager
|
||||
|
||||
The Alertmanager helps both group and manage alert rules, adding a layer of orchestration on top of the alerting engines. To learn more, see [Prometheus Alertmanager documentation](https://prometheus.io/docs/alerting/latest/alertmanager/).
|
||||
Alertmanager enables you to quickly and efficiently manage and respond to alerts. It receives alerts, handles silencing, inhibition, grouping, and routing by sending notifications out via your channel of choice, for example, email or Slack.
|
||||
|
||||
Grafana includes built-in support for Prometheus Alertmanager. By default, notifications for Grafana managed alerts are handled by the embedded Alertmanager that is part of core Grafana. You can configure the Alertmanager's contact points, notification policies, silences, and templates from the alerting UI by selecting the `Grafana` option from the Alertmanager drop-down.
|
||||
In Grafana, you can use the Cloud Alertmanager, Grafana Alertmanager, or an external Alertmanager. You can also run multiple alertmanagers; your decision depends on your set up and where your alerts are being generated.
|
||||
|
||||
> **Note:** Before v8.2, the configuration of the embedded Alertmanager was shared across organizations. If you are on an older Grafana version, we recommend that you use Grafana alerts only if you have one organization. Otherwise, your contact points are visible to all organizations.
|
||||
**Cloud Alertmanager**
|
||||
|
||||
Grafana Alerting added support for external Alertmanager configuration. When you add an [Alertmanager data source]({{< relref "../../datasources/alertmanager/" >}}), the Alertmanager drop-down shows a list of available external Alertmanager data sources. Select a data source to create and manage alerting for standalone Grafana Mimir or Loki data sources.
|
||||
Cloud Alertmanager runs in Grafana Cloud and it can receive alerts from Grafana, Mimir, and Loki.
|
||||
|
||||
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/contact-points-select-am-8-0.gif" max-width="250px" caption="Select Alertmanager" >}}
|
||||
**Grafana Alertmanager**
|
||||
|
||||
You can configure one or several external Alertmanagers to receive alerts from Grafana. Once configured, both the embedded Alertmanager **and** any configured external Alertmanagers will receive _all_ alerts.
|
||||
Grafana Alertmanager is an internal Alertmanager that is pre-configured and available for selection by default if you run Grafana on-premise or open-source.
|
||||
|
||||
You can do the setup in the "Admin" tab within the Grafana v8 Alerts UI.
|
||||
The Grafana Alertmanager can receive alerts from Grafana, but it cannot receive alerts from outside Grafana, for example, from Mimir or Loki.
|
||||
|
||||
### Add a new external Alertmanager
|
||||
**External Alertmanager**
|
||||
|
||||
1. In the Grafana menu, click the Alerting (bell) icon to open the Alerting page listing existing alerts.
|
||||
2. Click **Admin** and then scroll down to the External Alertmanager section.
|
||||
3. Click **Add Alertmanager** and a modal opens.
|
||||
4. Add the URL and the port for the external Alertmanager. You do not need to specify the path suffix, for example, `/api/v(1|2)/alerts`. Grafana automatically adds this.
|
||||
If you want to use a single alertmanager to receive all your Grafana, Loki, Mimir, and Prometheus alerts, you can set up Grafana to use an external Alertmanager. This external Alertmanager can be configured and administered from within Grafana itself.
|
||||
|
||||
The external URL is listed in the table with a pending status. Once Grafana verifies that the Alertmanager is discovered, the status changes to active. No requests are made to the external Alertmanager at this point; the verification signals that alerts are ready to be sent.
|
||||
Here are two examples of when you may want to configure your own external alertmanager and send your alerts there instead of the Grafana Alertmanager:
|
||||
|
||||
### Edit an external Alertmanager
|
||||
1. You may already have alertmanagers on-premise in your own Cloud infrastructure that you have set up and still want to use, because you have other alert generators, such as Prometheus.
|
||||
|
||||
1. Click the pen symbol to the right of the Alertmanager row in the table.
|
||||
2. When the edit modal opens, you can view all the URLs that were added.
|
||||
2. You want to use both Prometheus on-premise and hosted Grafana to send alerts to the same alertmanager that runs in your Cloud infrastructure.
|
||||
|
||||
The edited URL will be pending until Grafana verifies it again.
|
||||
Alertmanagers are visible from the drop-down menu on the Alerting Contact Points, Notification Policies, and Silences pages.
|
||||
|
||||
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/ext-alertmanager-active.png" max-width="650px" caption="External Alertmanagers" >}}
|
||||
For more information on Alertmanager, refer to [Prometheus Alertmanager documentation](https://prometheus.io/docs/alerting/latest/alertmanager/).
|
||||
|
||||
@@ -16,7 +16,7 @@ weight: 401
|
||||
|
||||
# Annotations and labels for alerting rules
|
||||
|
||||
Annotations and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in [templates]({{< relref "../../contact-points/message-templating/" >}}) and [template functions]({{< relref "../../contact-points/fundamentals/annotation-label/template-functions/" >}}) to create notification contact dynamically.
|
||||
Annotations and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in [templates]({{< relref "../../contact-points/message-templating/" >}}) and [template functions]({{< relref "../../contact-points/fundamentals/annotation-label/template-functions/" >}}) to create notification content dynamically.
|
||||
|
||||
## Annotations
|
||||
|
||||
|
||||
@@ -23,6 +23,20 @@ This topic explains why labels are a fundamental component of alerting.
|
||||
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-edit-details-8-0.png" max-width="550px" caption="Alert details" >}}
|
||||
|
||||
# External Alertmanager Compatibility
|
||||
|
||||
Grafana's built-in Alertmanager supports both Unicode label keys and values. If you are using an external Prometheus Alertmanager, label keys must be compatible with their [data model](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
|
||||
This means that label keys must only contain **ASCII letters**, **numbers**, as well as **underscores** and match the regex `[a-zA-Z_][a-zA-Z0-9_]*`.
|
||||
Any invalid characters will be removed or replaced by the Grafana alerting engine before being sent to the external Alertmanager according to the following rules:
|
||||
|
||||
- `Whitespace` will be removed.
|
||||
- `ASCII characters` will be replaced with `_`.
|
||||
- `All other characters` will be replaced with their lower-case hex representation. If this is the first character it will be prefixed with `_`.
|
||||
|
||||
Example: A label key/value pair `Alert! 🔔="🔥"` will become `Alert_0x1f514="🔥"`.
|
||||
|
||||
**Note** If multiple label keys are sanitized to the same value, the duplicates will have a short hash of the original label appended as a suffix.
|
||||
|
||||
# Grafana reserved labels
|
||||
|
||||
> **Note:** Labels prefixed with `grafana_` are reserved by Grafana for special use. If a manually configured label is added beginning with `grafana_` it may be overwritten in case of collision.
|
||||
|
||||
@@ -30,15 +30,18 @@ A label matchers consists of 3 distinct parts, the **label**, the **value** and
|
||||
| `=~` | Select labels that regex-match the value. |
|
||||
| `!~` | Select labels that do not regex-match the value. |
|
||||
|
||||
## Example of a label matcher
|
||||
If you are using multiple label matchers, they are combined using the AND logical operator. This means that all matchers must match in order to link a rule to a policy.
|
||||
|
||||
Imagine we've defined the following set of labels for our alert.
|
||||
## Example scenario
|
||||
|
||||
If you define the following set of labels for your alert:
|
||||
|
||||
`{ foo=bar, baz=qux, id=12 }`
|
||||
|
||||
In this situation,
|
||||
then:
|
||||
|
||||
- A label matcher defined as `foo=bar` will match this alert rule.
|
||||
- A label matcher defined as `foo!=bar` will _not_ match this alert rule.
|
||||
- A label matcher defined as `id=~[0-9]+` will match this alert rule.
|
||||
- A label matcher defined as `baz!~[0-9]+` will match this alert rule.
|
||||
- A label matcher defined as `foo=bar` matches this alert rule.
|
||||
- A label matcher defined as `foo!=bar` does _not_ match this alert rule.
|
||||
- A label matcher defined as `id=~[0-9]+` matches this alert rule.
|
||||
- A label matcher defined as `baz!~[0-9]+` matches this alert rule.
|
||||
- Two label matchers defined as `foo=bar` and `id=~[0-9]+` match this alert rule.
|
||||
|
||||
@@ -6,7 +6,7 @@ aliases:
|
||||
- /docs/grafana/latest/alerting/difference-old-new/
|
||||
description: Upgrade Grafana alerts
|
||||
title: Upgrade to Grafana Alerting
|
||||
weight: 101
|
||||
weight: 110
|
||||
---
|
||||
|
||||
# Upgrade to Grafana Alerting
|
||||
|
||||
16
docs/sources/alerting/set-up/_index.md
Normal file
16
docs/sources/alerting/set-up/_index.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/set-up/
|
||||
- /docs/grafana/latest/alerting/set-up/
|
||||
- /docs/grafana/latest/alerting/unified-alerting/set-up/
|
||||
title: Set up Grafana Alerting
|
||||
weight: 107
|
||||
---
|
||||
|
||||
# Set up Grafana Alerting
|
||||
|
||||
Configure the features and integrations that you need to create and manage your alerts.
|
||||
|
||||
- [Configure Alertmanager](https://grafana.com/docs/grafana/latest/alerting/set-up/configure-alertmanager/)
|
||||
- [Provision Grafana Alerting resources](https://grafana.com/docs/grafana/latest/alerting/set-up/provision-alerting-resources/)
|
||||
- [Connect Grafana Alerting to Grafana OnCall](https://grafana.com/docs/oncall/latest/integrations/available-integrations/add-grafana-alerting/)
|
||||
36
docs/sources/alerting/set-up/configure-alertmanager/index.md
Normal file
36
docs/sources/alerting/set-up/configure-alertmanager/index.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/configure-alertmanager
|
||||
- /docs/grafana/latest/alerting/configure-alertmanager
|
||||
description: Configure Alertmanager
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- set up
|
||||
- configure
|
||||
- Alertmanager
|
||||
title: Configure Alertmanager
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Configure Alertmanager
|
||||
|
||||
Configure Alertmanager from Grafana Alerting to group and manage alert rules, adding a layer of orchestration on top of your external alerting engine.
|
||||
|
||||
## Add a new external Alertmanager
|
||||
|
||||
1. In the Grafana menu, click the Alerting (bell) icon to open the Alerting page listing existing alerts.
|
||||
2. Click **Admin** and then scroll down to the External Alertmanager section.
|
||||
3. Click **Add Alertmanager** and a modal opens.
|
||||
4. Add the URL and the port for the external Alertmanager. You do not need to specify the path suffix, for example, `/api/v(1|2)/alerts`. Grafana automatically adds this.
|
||||
|
||||
The external URL is listed in the table with a pending status. Once Grafana verifies that the Alertmanager is discovered, the status changes to active. No requests are made to the external Alertmanager at this point; the verification signals that alerts are ready to be sent.
|
||||
|
||||
### Edit an external Alertmanager
|
||||
|
||||
1. Click the pen symbol to the right of the Alertmanager row in the table.
|
||||
2. When the edit modal opens, you can view all the URLs that were added.
|
||||
|
||||
The edited URL will be pending until Grafana verifies it again.
|
||||
|
||||
{{< figure max-width="40%" src="/static/img/docs/alerting/unified/ext-alertmanager-active.png" max-width="650px" caption="External Alertmanagers" >}}
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources
|
||||
description: Provision alerting resources
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- set up
|
||||
- configure
|
||||
- provisioning
|
||||
title: Provision Grafana Alerting resources
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Provision Grafana Alerting resources
|
||||
|
||||
Alerting infrastructure is often complex, with many pieces of the pipeline that often live in different places. Scaling this across multiple teams and organizations is an especially challenging task. Grafana Alerting provisioning makes this process easier by enabling you to create, manage, and maintain your alerting data in a way that best suits your organization.
|
||||
|
||||
There are three options to choose from:
|
||||
|
||||
1. Use file provisioning to provision your Grafana Alerting resources, such as alert rules and contact points, through files on disk.
|
||||
|
||||
1. Provision your alerting resources using the Grafana HTTP API.
|
||||
|
||||
For more information on the Grafana Alerting provisioning API, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/).
|
||||
|
||||
1. Provision your alerting resources using Terraform.
|
||||
|
||||
**Note:**
|
||||
|
||||
Currently, provisioning for Grafana Alerting supports alert rules, contact points, mute timings, and templates. Provisioned alerting resources can only be edited in the source that created them and not from within Grafana or any other source. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
|
||||
|
||||
**Useful Links:**
|
||||
|
||||
[Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/)
|
||||
|
||||
[Grafana Cloud provisioning](https://grafana.com/docs/grafana-cloud/infrastructure-as-code/terraform/)
|
||||
|
||||
[Grafana Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning)
|
||||
@@ -0,0 +1,700 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/file-provisioning
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/file-provisioning
|
||||
description: Create and manage resources using file provisioning
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- alerting resources
|
||||
- file provisioning
|
||||
- provisioning
|
||||
title: Create and manage alerting resources using file provisioning
|
||||
weight: 100
|
||||
---
|
||||
|
||||
## Create and manage alerting resources using file provisioning
|
||||
|
||||
Provision your alerting resources using files from disk. When you start Grafana, the data from these files is created in your Grafana system. Grafana adds any new resources you created, updates any that you changed, and deletes old ones.
|
||||
|
||||
Arrange your files in a directory in a way that best suits your use case. For example, you can choose a team-based layout where every team has its own file, you can have one big file for all your teams; or you can have one file per resource type.
|
||||
|
||||
Details on how to set up the files and which fields are required for each object are listed below depending on which resource you are provisioning.
|
||||
|
||||
**Note:**
|
||||
|
||||
Provisioning takes place during the initial set up of your Grafana system, but you can re-run it at any time using the [Grafana Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/admin/#reload-provisioning-configurations).
|
||||
|
||||
### Provision alert rules
|
||||
|
||||
Create or delete alert rules in your Grafana instance(s).
|
||||
|
||||
1. Create an alert rule in Grafana.
|
||||
1. Use the [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting/#get-alerts) to extract the alert rule.
|
||||
1. Copy the contents into a YAML or JSON configuration file in the default provisioning directory or in your configured directory.
|
||||
|
||||
Example configuration files can be found below.
|
||||
|
||||
1. Ensure that your files are in the right directory on the node running the Grafana server, so that they deploy alongside your Grafana instance(s).
|
||||
1. Delete the alert rule in Grafana.
|
||||
|
||||
**Note:**
|
||||
|
||||
If you do not delete the alert rule, it will clash with the provisioned alert rule once uploaded.
|
||||
|
||||
Here is an example of a configuration file for creating alert rules.
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of rule groups to import or update
|
||||
groups:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> name of the rule group
|
||||
name: my_rule_group
|
||||
# <string, required> name of the folder the rule group will be stored in
|
||||
folder: my_first_folder
|
||||
# <duration, required> interval that the rule group should evaluated at
|
||||
interval: 60s
|
||||
# <list, required> list of rules that are part of the rule group
|
||||
rules:
|
||||
# <string, required> unique identifier for the rule
|
||||
- uid: my_id_1
|
||||
# <string, required> title of the rule that will be displayed in the UI
|
||||
title: my_first_rule
|
||||
# <string, required> which query should be used for the condition
|
||||
condition: A
|
||||
# <list, required> list of query objects that should be executed on each
|
||||
# evaluation - should be obtained trough the API
|
||||
data:
|
||||
- refId: A
|
||||
datasourceUid: '-100'
|
||||
model:
|
||||
conditions:
|
||||
- evaluator:
|
||||
params:
|
||||
- 3
|
||||
type: gt
|
||||
operator:
|
||||
type: and
|
||||
query:
|
||||
params:
|
||||
- A
|
||||
reducer:
|
||||
type: last
|
||||
type: query
|
||||
datasource:
|
||||
type: __expr__
|
||||
uid: '-100'
|
||||
expression: 1==0
|
||||
intervalMs: 1000
|
||||
maxDataPoints: 43200
|
||||
refId: A
|
||||
type: math
|
||||
# <string> UID of a dashboard that the alert rule should be linked to
|
||||
dashboardUid: my_dashboard
|
||||
# <int> ID of the panel that the alert rule should be linked to
|
||||
panelId: 123
|
||||
# <string> the state the alert rule will have when no data is returned
|
||||
# possible values: "NoData", "Alerting", "OK", default = NoData
|
||||
noDataState: Alerting
|
||||
# <string> the state the alert rule will have when the query execution
|
||||
# failed - possible values: "Error", "Alerting", "OK"
|
||||
# default = Alerting
|
||||
# <duration, required> for how long should the alert fire before alerting
|
||||
for: 60s
|
||||
# <map<string, string>> a map of strings to pass around any data
|
||||
annotations:
|
||||
some_key: some_value
|
||||
# <map<string, string> a map of strings that can be used to filter and
|
||||
# route alerts
|
||||
labels:
|
||||
team: sre_team_1
|
||||
```
|
||||
|
||||
Here is an example of a configuration file for deleting alert rules.
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of alert rule UIDs that should be deleted
|
||||
deleteRules:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> unique identifier for the rule
|
||||
uid: my_id_1
|
||||
```
|
||||
|
||||
### Provision contact points
|
||||
|
||||
Create or delete contact points in your Grafana instance(s).
|
||||
|
||||
1. Create a YAML or JSON configuration file.
|
||||
|
||||
Example configuration files can be found below.
|
||||
|
||||
1. Add the file(s) to your GitOps workflow, so that they deploy alongside your Grafana instance(s).
|
||||
|
||||
Here is an example of a configuration file for creating contact points.
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of contact points to import or update
|
||||
contactPoints:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> name of the contact point
|
||||
name: cp_1
|
||||
receivers:
|
||||
# <string, required> unique identifier for the receiver
|
||||
- uid: first_uid
|
||||
# <string, required> type of the receiver
|
||||
type: prometheus-alertmanager
|
||||
# <object, required> settings for the specific receiver type
|
||||
settings:
|
||||
url: http://test:9000
|
||||
```
|
||||
|
||||
Here is an example of a configuration file for deleting contact points.
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of receivers that should be deleted
|
||||
deleteContactPoints:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> unique identifier for the receiver
|
||||
uid: first_uid
|
||||
```
|
||||
|
||||
#### Settings
|
||||
|
||||
Here are some examples of settings you can use for the different
|
||||
contact point types.
|
||||
|
||||
##### Alertmanager
|
||||
|
||||
```yaml
|
||||
type: prometheus-alertmanager
|
||||
settings:
|
||||
# <string, required>
|
||||
url: http://localhost:9093
|
||||
# <string>
|
||||
basicAuthUser: abc
|
||||
# <string>
|
||||
basicAuthPassword: abc123
|
||||
```
|
||||
|
||||
##### DingDing
|
||||
|
||||
```yaml
|
||||
type: dingding
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx
|
||||
# <string> options: link, actionCard
|
||||
msgType: link
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Discord
|
||||
|
||||
```yaml
|
||||
type: discord
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://discord/webhook
|
||||
# <string>
|
||||
avatar_url: https://my_avatar
|
||||
# <string>
|
||||
use_discord_username: Grafana
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### E-Mail
|
||||
|
||||
```yaml
|
||||
type: email
|
||||
settings:
|
||||
# <string, required>
|
||||
addresses: me@example.com;you@example.com
|
||||
# <bool>
|
||||
singleEmail: false
|
||||
# <string>
|
||||
message: my optional message to include
|
||||
# <string>
|
||||
subject: |
|
||||
{{ template "default.title" . }}
|
||||
```
|
||||
|
||||
##### Google Hangouts Chat
|
||||
|
||||
```yaml
|
||||
type: googlechat
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://google/webhook
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Kafka
|
||||
|
||||
```yaml
|
||||
type: kafka
|
||||
settings:
|
||||
# <string, required>
|
||||
kafkaRestProxy: http://localhost:8082
|
||||
# <string, required>
|
||||
kafkaTopic: topic1
|
||||
```
|
||||
|
||||
##### LINE
|
||||
|
||||
```yaml
|
||||
type: line
|
||||
settings:
|
||||
# <string, required>
|
||||
token: xxx
|
||||
```
|
||||
|
||||
##### Microsoft Teams
|
||||
|
||||
```yaml
|
||||
type: teams
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://ms_teams_url
|
||||
# <string>
|
||||
title: |
|
||||
{{ template "default.title" . }}
|
||||
# <string>
|
||||
sectiontitle: ''
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### OpsGenie
|
||||
|
||||
```yaml
|
||||
type: opsgenie
|
||||
settings:
|
||||
# <string, required>
|
||||
apiKey: xxx
|
||||
# <string, required>
|
||||
apiUrl: https://api.opsgenie.com/v2/alerts
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.title" . }}
|
||||
# <string>
|
||||
description: some descriptive description
|
||||
# <bool>
|
||||
autoClose: false
|
||||
# <bool>
|
||||
overridePriority: false
|
||||
# <string> options: tags, details, both
|
||||
sendTagsAs: both
|
||||
```
|
||||
|
||||
##### PagerDuty
|
||||
|
||||
```yaml
|
||||
type: pagerduty
|
||||
settings:
|
||||
# <string, required>
|
||||
integrationKey: XXX
|
||||
# <string> options: critical, error, warning, info
|
||||
severity: critical
|
||||
# <string>
|
||||
class: ping failure
|
||||
# <string>
|
||||
component: Grafana
|
||||
# <string>
|
||||
group: app-stack
|
||||
# <string>
|
||||
summary: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Pushover
|
||||
|
||||
```yaml
|
||||
type: pushover
|
||||
settings:
|
||||
# <string, required>
|
||||
apiToken: XXX
|
||||
# <string, required>
|
||||
userKey: user1,user2
|
||||
# <string>
|
||||
device: device1,device2
|
||||
# <string> options (high to low): 2,1,0,-1,-2
|
||||
priority: '2'
|
||||
# <string>
|
||||
retry: '30'
|
||||
# <string>
|
||||
expire: '120'
|
||||
# <string>
|
||||
sound: siren
|
||||
# <string>
|
||||
okSound: magic
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Slack
|
||||
|
||||
```yaml
|
||||
type: slack
|
||||
settings:
|
||||
# <string, required>
|
||||
recipient: alerting-dev
|
||||
# <string, required>
|
||||
token: xxx
|
||||
# <string>
|
||||
username: grafana_bot
|
||||
# <string>
|
||||
icon_emoji: heart
|
||||
# <string>
|
||||
icon_url: https://icon_url
|
||||
# <string>
|
||||
mentionUsers: user_1,user_2
|
||||
# <string>
|
||||
mentionGroups: group_1,group_2
|
||||
# <string> options: here, channel
|
||||
mentionChannel: here
|
||||
# <string> Optionally provide a Slack incoming webhook URL for sending messages, in this case the token isn't necessary
|
||||
url: https://some_webhook_url
|
||||
# <string>
|
||||
endpointUrl: https://custom_url/api/chat.postMessage
|
||||
# <string>
|
||||
title: |
|
||||
{{ template "slack.default.title" . }}
|
||||
text: |
|
||||
{{ template "slack.default.text" . }}
|
||||
```
|
||||
|
||||
##### Sensu Go
|
||||
|
||||
```yaml
|
||||
type: sensugo
|
||||
settings:
|
||||
# <string, required>
|
||||
url: http://sensu-api.local:8080
|
||||
# <string, required>
|
||||
apikey: xxx
|
||||
# <string>
|
||||
entity: default
|
||||
# <string>
|
||||
check: default
|
||||
# <string>
|
||||
handler: some_handler
|
||||
# <string>
|
||||
namespace: default
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Telegram
|
||||
|
||||
```yaml
|
||||
type: telegram
|
||||
settings:
|
||||
# <string, required>
|
||||
bottoken: xxx
|
||||
# <string, required>
|
||||
chatid: some_chat_id
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
```
|
||||
|
||||
##### Threema Gateway
|
||||
|
||||
```yaml
|
||||
type: threema
|
||||
settings:
|
||||
# <string, required>
|
||||
api_secret: xxx
|
||||
# <string, required>
|
||||
gateway_id: A5K94S9
|
||||
# <string, required>
|
||||
recipient_id: A9R4KL4S
|
||||
```
|
||||
|
||||
##### VictorOps
|
||||
|
||||
```yaml
|
||||
type: victorops
|
||||
settings:
|
||||
# <string, required>
|
||||
url: XXX
|
||||
# <string> options: CRITICAL, WARNING
|
||||
messageType: CRITICAL
|
||||
```
|
||||
|
||||
##### Webhook
|
||||
|
||||
```yaml
|
||||
type: webhook
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://endpoint_url
|
||||
# <string> options: POST, PUT
|
||||
httpMethod: POST
|
||||
# <string>
|
||||
username: abc
|
||||
# <string>
|
||||
password: abc123
|
||||
# <string>
|
||||
authorization_scheme: Bearer
|
||||
# <string>
|
||||
authorization_credentials: abc123
|
||||
# <string>
|
||||
maxAlerts: '10'
|
||||
```
|
||||
|
||||
##### WeCom
|
||||
|
||||
```yaml
|
||||
type: wecom
|
||||
settings:
|
||||
# <string, required>
|
||||
url: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx
|
||||
# <string>
|
||||
message: |
|
||||
{{ template "default.message" . }}
|
||||
# <string>
|
||||
title: |
|
||||
{{ template "default.title" . }}
|
||||
```
|
||||
|
||||
### Provision notification policies
|
||||
|
||||
Create or reset notification policies in your Grafana instance(s).
|
||||
|
||||
1. Create a YAML or JSON configuration file.
|
||||
|
||||
Example configuration files can be found below.
|
||||
|
||||
2. Add the file(s) to your GitOps workflow, so that they deploy alongside your Grafana instance(s).
|
||||
|
||||
Here is an example of a configuration file for creating notification policiies.
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of notification policies
|
||||
policies:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string> name of the contact point that should be used for this route
|
||||
receiver: grafana-default-email
|
||||
# <list> The labels by which incoming alerts are grouped together. For example,
|
||||
# multiple alerts coming in for cluster=A and alertname=LatencyHigh would
|
||||
# be batched into a single group.
|
||||
#
|
||||
# To aggregate by all possible labels use the special value '...' as
|
||||
# the sole label name, for example:
|
||||
# group_by: ['...']
|
||||
# This effectively disables aggregation entirely, passing through all
|
||||
# alerts as-is. This is unlikely to be what you want, unless you have
|
||||
# a very low alert volume or your upstream notification system performs
|
||||
# its own grouping.
|
||||
group_by: ['...']
|
||||
# <list> a list of matchers that an alert has to fulfill to match the node
|
||||
matchers:
|
||||
- alertname = Watchdog
|
||||
- severity =~ "warning|critical"
|
||||
# <list> Times when the route should be muted. These must match the name of a
|
||||
# mute time interval.
|
||||
# Additionally, the root node cannot have any mute times.
|
||||
# When a route is muted it will not send any notifications, but
|
||||
# otherwise acts normally (including ending the route-matching process
|
||||
# if the `continue` option is not set)
|
||||
mute_time_intervals:
|
||||
- abc
|
||||
# <duration> How long to initially wait to send a notification for a group
|
||||
# of alerts. Allows to collect more initial alerts for the same group.
|
||||
# (Usually ~0s to few minutes), default = 30s
|
||||
group_wait: 30s
|
||||
# <duration> How long to wait before sending a notification about new alerts that
|
||||
# are added to a group of alerts for which an initial notification has
|
||||
# already been sent. (Usually ~5m or more), default = 5m
|
||||
group_internval: 5m
|
||||
# <duration> How long to wait before sending a notification again if it has already
|
||||
# been sent successfully for an alert. (Usually ~3h or more), default = 4h
|
||||
repeat_interval: 4h
|
||||
# <list> Zero or more child routes
|
||||
# routes:
|
||||
# ...
|
||||
```
|
||||
|
||||
Here is an example of a configuration file for resetting notification policies.
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of orgIds that should be reset to the default policy
|
||||
resetPolicies:
|
||||
- 1
|
||||
```
|
||||
|
||||
### Provision templates
|
||||
|
||||
Create or delete templates in your Grafana instance(s).
|
||||
|
||||
1. Create a YAML or JSON configuration file.
|
||||
|
||||
Example configuration files can be found below.
|
||||
|
||||
2. Add the file(s) to your GitOps workflow, so that they deploy alongside your Grafana instance(s).
|
||||
|
||||
Here is an example of a configuration file for creating templates.
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of templates to import or update
|
||||
templates:
|
||||
# <int> organization ID, default = 1
|
||||
- orgID: 1
|
||||
# <string, required> name of the template, must be unique
|
||||
name: my_first_template
|
||||
# <string, required> content of the the template
|
||||
template: Alerting with a custom text template
|
||||
```
|
||||
|
||||
Here is an example of a configuration file for deleting templates.
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of alert rule UIDs that should be deleted
|
||||
deleteTemplates:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> name of the template, must be unique
|
||||
name: my_first_template
|
||||
```
|
||||
|
||||
### Provision mute timings
|
||||
|
||||
Create or delete mute timings in your Grafana instance(s).
|
||||
|
||||
1. Create a YAML or JSON configuration file.
|
||||
|
||||
Example configuration files can be found below.
|
||||
|
||||
1. Add the file(s) to your GitOps workflow, so that they deploy alongside your Grafana instance(s).
|
||||
|
||||
Here is an example of a configuration file for creating mute timings.
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of mute time intervals to import or update
|
||||
muteTimes:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> name of the mute time interval, must be unique
|
||||
name: mti_1
|
||||
# <list> time intervals that should trigger the muting
|
||||
# refer to https://prometheus.io/docs/alerting/latest/configuration/#time_interval-0
|
||||
time_intervals:
|
||||
- times:
|
||||
- start_time: '06:00'
|
||||
end_time: '23:59'
|
||||
weekdays: ['monday:wednesday', 'saturday', 'sunday']
|
||||
months: ['1:3', 'may:august', 'december']
|
||||
years: ['2020:2022', '2030']
|
||||
days_of_month: ['1:5', '-3:-1']
|
||||
```
|
||||
|
||||
Here is an example of a configuration file for deleting mute timings.
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
apiVersion: 1
|
||||
|
||||
# List of mute time intervals that should be deleted
|
||||
deleteMuteTimes:
|
||||
# <int> organization ID, default = 1
|
||||
- orgId: 1
|
||||
# <string, required> name of the mute time interval, must be unique
|
||||
name: mti_1
|
||||
```
|
||||
|
||||
### File provisioning using Kubernetes
|
||||
|
||||
If you are a Kubernetes user, you can leverage file provisioning using Kubernetes configuration maps.
|
||||
|
||||
1. Create one or more configuration maps as follows.
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: grafana-alerting
|
||||
data:
|
||||
provisioning.yaml: |
|
||||
templates:
|
||||
- name: my_first_template
|
||||
template: the content for my template
|
||||
```
|
||||
|
||||
2. Add the file(s) to your GitOps workflow, so that they deploy alongside your Grafana instance(s).
|
||||
|
||||
```yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: grafana
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: grafana
|
||||
template:
|
||||
metadata:
|
||||
name: grafana
|
||||
labels:
|
||||
app: grafana
|
||||
spec:
|
||||
containers:
|
||||
- name: grafana
|
||||
image: grafana/grafana:latest
|
||||
ports:
|
||||
- name: grafana
|
||||
containerPort: 3000
|
||||
volumeMounts:
|
||||
- mountPath: /etc/grafana/provisioning/alerting
|
||||
name: grafana-alerting
|
||||
readOnly: false
|
||||
volumes:
|
||||
- name: grafana-alerting
|
||||
configMap:
|
||||
defaultMode: 420
|
||||
name: grafana-alerting
|
||||
```
|
||||
|
||||
This eliminates the need for a persistent database to use Grafana Alerting in Kubernetes; all your provisioned resources appear after each restart or re-deployment.
|
||||
@@ -0,0 +1,321 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/terraform-provisioning
|
||||
description: Create and manage alerting resources using Terraform
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- alerting resources
|
||||
- provisioning
|
||||
- Terraform
|
||||
title: Create and manage alerting resources using Terraform
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Create and manage alerting resources using Terraform
|
||||
|
||||
Use Terraform’s Grafana Provider to manage your alerting resources and provision them into your Grafana system. Terraform provider support for Grafana Alerting makes it easy to create, manage, and maintain your entire Grafana Alerting stack as code.
|
||||
|
||||
For more information on managing your alerting resources using Terraform, refer to the [Grafana Provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs) documentation.
|
||||
|
||||
Complete the following tasks to create and manage your alerting resources using Terraform.
|
||||
|
||||
1. Create an API key for provisioning.
|
||||
1. Configure the Terraform provider.
|
||||
1. Define your alerting resources in Terraform.
|
||||
1. Run `terraform apply` to provision your alerting resources.
|
||||
|
||||
## Before you begin
|
||||
|
||||
- Ensure you have the grafana/grafana [Terraform provider](https://registry.terraform.io/providers/grafana/grafana/1.28.0) 1.27.0 or higher.
|
||||
|
||||
- Ensure you are using Grafana 9.1 or higher.
|
||||
|
||||
## Create an API key for provisioning
|
||||
|
||||
You can [create a normal Grafana API key](https://grafana.com/docs/grafana/latest/administration/api-keys/) to authenticate Terraform with Grafana. Most existing tooling using API keys should automatically work with the new Grafana Alerting support.
|
||||
|
||||
There are also dedicated RBAC roles for alerting provisioning. This lets you easily authenticate as a [service account](https://grafana.com/docs/grafana/latest/administration/service-accounts/) with the minimum permissions needed to provision your Alerting infrastructure.
|
||||
|
||||
To create an API key for provisioning, complete the following steps.
|
||||
|
||||
1. Create a new service account for your CI pipeline.
|
||||
1. Assign the role “Access the alert rules Provisioning API.”
|
||||
1. Create a new service account token.
|
||||
1. Name and save the token for use in Terraform.
|
||||
|
||||
Alternatively, you can use basic authentication. To view all the supported authentication formats, see [here](https://registry.terraform.io/providers/grafana/grafana/latest/docs#authentication).
|
||||
|
||||
## Configure the Terraform provider
|
||||
|
||||
Grafana Alerting support is included as part of the [Grafana Terraform provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs).
|
||||
|
||||
The following is an example you can use to configure the Terraform provider.
|
||||
|
||||
```terraform
|
||||
terraform {
|
||||
required_providers {
|
||||
grafana = {
|
||||
source = "grafana/grafana"
|
||||
version = ">= 1.28.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "grafana" {
|
||||
url = <YOUR_GRAFANA_URL>
|
||||
auth = <YOUR_GRAFANA_API_KEY>
|
||||
}
|
||||
```
|
||||
|
||||
## Provision contact points and templates
|
||||
|
||||
Contact points connect an alerting stack to the outside world. They tell Grafana how to connect to your external systems and where to deliver notifications. There are over fifteen different [integrations](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/contact_point#optional) to choose from.
|
||||
|
||||
To provision contact points and templates, complete the following steps.
|
||||
|
||||
1. Copy this code block into a .tf file on your local machine.
|
||||
|
||||
This example creates a contact point that sends alert notifications to Slack.
|
||||
|
||||
```terraform
|
||||
resource "grafana_contact_point" "my_slack_contact_point" {
|
||||
name = "Send to My Slack Channel"
|
||||
|
||||
slack {
|
||||
url = <YOUR_SLACK_WEBHOOK_URL>
|
||||
text = <<EOT
|
||||
{{ len .Alerts.Firing }} alerts are firing!
|
||||
|
||||
Alert summaries:
|
||||
{{ range .Alerts.Firing }}
|
||||
{{ template "Alert Instance Template" . }}
|
||||
{{ end }}
|
||||
EOT
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Enter text for your notification in the text field.
|
||||
|
||||
The `text` field supports [Go-style templating](https://pkg.go.dev/text/template). This enables you to manage your Grafana Alerting message templates directly in Terraform.
|
||||
|
||||
3. Run the command ‘terraform apply’.
|
||||
|
||||
4. Go to the Grafana UI and check the details of your contact point.
|
||||
|
||||
You cannot edit resources provisioned via Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
|
||||
|
||||
5. Click **Test** to verify that the contact point works correctly.
|
||||
|
||||
**Note:**
|
||||
|
||||
You can re-use the same templates across many contact points. In the example above, a shared template ie embedded using the statement `{{ template “Alert Instance Template” . }}`
|
||||
|
||||
This fragment can then be managed separately in Terraform:
|
||||
|
||||
```terraform
|
||||
resource "grafana_message_template" "my_alert_template" {
|
||||
name = "Alert Instance Template"
|
||||
|
||||
template = <<EOT
|
||||
{{ define "Alert Instance Template" }}
|
||||
Firing: {{ .Labels.alertname }}
|
||||
Silence: {{ .SilenceURL }}
|
||||
{{ end }}
|
||||
EOT
|
||||
}
|
||||
```
|
||||
|
||||
## Provision notification policies and routing
|
||||
|
||||
Notification policies tell Grafana how to route alert instances, as opposed to where. They connect firing alerts to your previously defined contact points using a system of labels and matchers.
|
||||
|
||||
To provision notification policies and routing, complete the following steps.
|
||||
|
||||
1. Copy this code block into a .tf file on your local machine.
|
||||
|
||||
In this example, the alerts are grouped by `alertname`, which means that any notifications coming from alerts which share the same name, are grouped into the same Slack message.
|
||||
|
||||
If you want to route specific notifications differently, you can add sub-policies. Sub-policies allow you to apply routing to different alerts based on label matching. In this example, we apply a mute timing to all alerts with the label a=b.
|
||||
|
||||
resource "grafana_notification_policy" "my_policy" {
|
||||
group_by = ["alertname"]
|
||||
contact_point = grafana_contact_point.my_slack_contact_point.name
|
||||
|
||||
group_wait = "45s"
|
||||
group_interval = "6m"
|
||||
repeat_interval = "3h"
|
||||
|
||||
policy {
|
||||
matcher {
|
||||
label = "a"
|
||||
match = "="
|
||||
value = "b"
|
||||
}
|
||||
group_by = ["..."]
|
||||
contact_point = grafana_contact_point.a_different_contact_point.name
|
||||
mute_timings = [grafana_mute_timing.my_mute_timing.name]
|
||||
|
||||
policy {
|
||||
matcher {
|
||||
label = "sublabel"
|
||||
match = "="
|
||||
value = "subvalue"
|
||||
}
|
||||
contact_point = grafana_contact_point.a_third_contact_point.name
|
||||
group_by = ["..."]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
2. In the mute_timings field, link a mute timing to your notification policy.
|
||||
|
||||
3. Run the command ‘terraform apply’.
|
||||
|
||||
4. Go to the Grafana UI and check the details of your notification policy.
|
||||
|
||||
**Note:**
|
||||
|
||||
You cannot edit resources provisioned from Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
|
||||
|
||||
5. Click **Test** to verify that the notification point is working correctly.
|
||||
|
||||
## Provision mute timings
|
||||
|
||||
Mute timings provide the ability to mute alert notifications for defined time periods.
|
||||
|
||||
To provision mute timings, complete the following steps.
|
||||
|
||||
1. Copy this code block into a .tf file on your local machine.
|
||||
|
||||
In this example, alert notifications are muted on weekends.
|
||||
|
||||
resource "grafana_mute_timing" "my_mute_timing" {
|
||||
name = "My Mute Timing"
|
||||
|
||||
intervals {
|
||||
times {
|
||||
start = "04:56"
|
||||
end = "14:17"
|
||||
}
|
||||
weekdays = ["saturday", "sunday", "tuesday:thursday"]
|
||||
months = ["january:march", "12"]
|
||||
years = ["2025:2027"]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
2. Run the command ‘terraform apply’.
|
||||
3. Go to the Grafana UI and check the details of your mute timing.
|
||||
4. Reference your newly created mute timing in a notification policy using the `mute_timings` field.
|
||||
This will apply your mute timing to some or all of your notifications.
|
||||
|
||||
**Note:**
|
||||
|
||||
You cannot edit resources provisioned from Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
|
||||
|
||||
5. Click **Test** to verify that the mute timing is working correctly.
|
||||
|
||||
## Provision alert rules
|
||||
|
||||
[Alert rules](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/) enable you to alert against any Grafana data source. This can be a data source that you already have configured, or you can [define your data sources in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source) alongside your alert rules.
|
||||
|
||||
To provision alert rules, complete the following steps.
|
||||
|
||||
1. Create a data source to query and a folder to store your rules in.
|
||||
|
||||
In this example, the [TestData](https://grafana.com/docs/grafana/latest/datasources/testdata/) data source is used.
|
||||
|
||||
Alerts can be defined against any backend datasource in Grafana.
|
||||
|
||||
```terraform
|
||||
resource "grafana_data_source" "testdata_datasource" {
|
||||
name = "TestData"
|
||||
type = "testdata"
|
||||
}
|
||||
|
||||
resource "grafana_folder" "rule_folder" {
|
||||
title = "My Rule Folder"
|
||||
}
|
||||
```
|
||||
|
||||
2. Define an alert rule.
|
||||
|
||||
For more information on alert rules, refer to [how to create Grafana-managed alerts](https://grafana.com/blog/2022/08/01/grafana-alerting-video-how-to-create-alerts-in-grafana-9/).
|
||||
|
||||
3. Create a rule group containing one or more rules.
|
||||
|
||||
In this example, the `grafana_rule_group` resource group is used.
|
||||
|
||||
```terraform
|
||||
resource "grafana_rule_group" "my_rule_group" {
|
||||
name = "My Alert Rules"
|
||||
folder_uid = grafana_folder.rule_folder.uid
|
||||
interval_seconds = 60
|
||||
org_id = 1
|
||||
|
||||
rule {
|
||||
name = "My Random Walk Alert"
|
||||
condition = "C"
|
||||
for = "0s"
|
||||
|
||||
// Query the datasource.
|
||||
data {
|
||||
ref_id = "A"
|
||||
relative_time_range {
|
||||
from = 600
|
||||
to = 0
|
||||
}
|
||||
datasource_uid = grafana_data_source.testdata_datasource.uid
|
||||
// `model` is a JSON blob that sends datasource-specific data.
|
||||
// It's different for every datasource. The alert's query is defined here.
|
||||
model = jsonencode({
|
||||
intervalMs = 1000
|
||||
maxDataPoints = 43200
|
||||
refId = "A"
|
||||
})
|
||||
}
|
||||
|
||||
// The query was configured to obtain data from the last 60 seconds. Let's alert on the average value of that series using a Reduce stage.
|
||||
data {
|
||||
datasource_uid = "-100"
|
||||
// You can also create a rule in the UI, then GET that rule to obtain the JSON.
|
||||
// This can be helpful when using more complex reduce expressions.
|
||||
model = <<EOT
|
||||
{"conditions":[{"evaluator":{"params":[0,0],"type":"gt"},"operator":{"type":"and"},"query":{"params":["A"]},"reducer":{"params":[],"type":"last"},"type":"avg"}],"datasource":{"name":"Expression","type":"__expr__","uid":"__expr__"},"expression":"A","hide":false,"intervalMs":1000,"maxDataPoints":43200,"reducer":"last","refId":"B","type":"reduce"}
|
||||
EOT
|
||||
ref_id = "B"
|
||||
relative_time_range {
|
||||
from = 0
|
||||
to = 0
|
||||
}
|
||||
}
|
||||
|
||||
// Now, let's use a math expression as our threshold.
|
||||
// We want to alert when the value of stage "B" above exceeds 70.
|
||||
data {
|
||||
datasource_uid = "-100"
|
||||
ref_id = "C"
|
||||
relative_time_range {
|
||||
from = 0
|
||||
to = 0
|
||||
}
|
||||
model = jsonencode({
|
||||
expression = "$B > 70"
|
||||
type = "math"
|
||||
refId = "C"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
4. Go to the Grafana UI and check your alert rule.
|
||||
|
||||
You can see whether or not the alert rule is firing. You can also see a visualization of each of the alert rule’s query stages
|
||||
|
||||
When the alert fires, Grafana routes a notification through the policy you defined.
|
||||
|
||||
For example, if you chose Slack as a contact point, Grafana’s embedded [Alertmanager](https://github.com/prometheus/alertmanager) automatically posts a message to Slack.
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/view-provisioned-resources
|
||||
description: View provisioned resources in Grafana
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- alerting resources
|
||||
- provisioning
|
||||
title: View provisioned resources in Grafana
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# View provisioned alerting resources in Grafana
|
||||
|
||||
Verify that your alerting resources were created in Grafana.
|
||||
|
||||
To view your provisioned resources in Grafana, complete the following steps.
|
||||
|
||||
1. Open your Grafana instance.
|
||||
1. Navigate to Alerting.
|
||||
1. Click an alerting resource folder, for example, Alert rules.
|
||||
|
||||
Provisioned resources are labeled **Provisioned**, so that it is clear that they were not created manually.
|
||||
|
||||
**Note:**
|
||||
|
||||
You cannot edit provisioned resources from Grafana. You can only change the resource properties by changing the provisioning file and restarting Grafana or carrying out a hot reload. This prevents changes being made to the resource that would be overwritten if a file is provisioned again or a hot reload is carried out.
|
||||
@@ -16,8 +16,6 @@ weight: 450
|
||||
|
||||
Use silences to stop notifications from one or more alerting rules. Silences do not prevent alert rules from being evaluated. Nor do they not stop alerting instances from being shown in the user interface. Silences only stop notifications from getting created. A silence lasts for only a specified window of time.
|
||||
|
||||
Silences do not prevent alert rules from being evaluated. They also do not stop alert instances from being shown in the user interface. Silences only prevent notifications from being created.
|
||||
|
||||
You can configure Grafana managed silences as well as silences for an [external Alertmanager data source]({{< relref "../../datasources/alertmanager/" >}}). For more information, see [Alertmanager]({{< relref "../fundamentals/alertmanager/" >}}).
|
||||
|
||||
See also:
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/
|
||||
description: Best practices for working with Grafana
|
||||
title: Best practices
|
||||
weight: 20
|
||||
---
|
||||
|
||||
# Best practices
|
||||
|
||||
This section provides information about best practices for intermediate Grafana administrators and users. Click on each of the links before for more information.
|
||||
|
||||
- [Best practices for creating dashboards]({{< relref "best-practices-for-creating-dashboards/" >}})
|
||||
- [Best practices for managing dashboards]({{< relref "best-practices-for-managing-dashboards/" >}})
|
||||
- [Common observability strategies]({{< relref "common-observability-strategies/" >}})
|
||||
- [Dashboard management maturity model]({{< relref "dashboard-management-maturity-levels/" >}})
|
||||
@@ -1,56 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-creating-dashboards/
|
||||
description: Best practices for creating dashboards in Grafana
|
||||
title: Best practices for creating dashboards
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Best practices for creating dashboards
|
||||
|
||||
This page outlines some best practices to follow when creating Grafana dashboards.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Here are some principles to consider before you create a dashboard.
|
||||
|
||||
### A dashboard should tell a story or answer a question
|
||||
|
||||
What story are you trying to tell with your dashboard? Try to create a logical progression of data, such as large to small or general to specific. What is the goal for this dashboard? (Hint: If the dashboard doesn't have a goal, then ask yourself if you really need the dashboard.)
|
||||
|
||||
Keep your graphs simple and focused on answering the question that you are asking. For example, if your question is "which servers are in trouble?", then maybe you don't need to show all the server data. Just show data for the ones in trouble.
|
||||
|
||||
### Dashboards should reduce cognitive load, not add to it
|
||||
|
||||
_Cognitive load_ is basically how hard you need to think about something in order to figure it out. Make your dashboard easy to interpret. Other users and future you (when you're trying to figure out what broke at 2AM) will appreciate it.
|
||||
|
||||
Ask yourself:
|
||||
|
||||
- Can I tell what exactly each graph represents? Is it obvious, or do I have to think about it?
|
||||
- If I show this to someone else, how long will it take them to figure it out? Will they get lost?
|
||||
|
||||
### Have a monitoring strategy
|
||||
|
||||
It's easy to make new dashboards. It's harder to optimize dashboard creation and adhere to a plan, but it's worth it. This strategy should govern both your overall dashboard scheme and enforce consistency in individual dashboard design.
|
||||
|
||||
Refer to [Common observability strategies]({{< relref "common-observability-strategies/" >}}) and [Dashboard management maturity levels]({{< relref "dashboard-management-maturity-levels/" >}}) for more information.
|
||||
|
||||
### Write it down
|
||||
|
||||
Once you have a strategy or design guidelines, write them down to help maintain consistency over time. Check out this [Wikimedia runbook example](https://wikitech.wikimedia.org/wiki/Performance/Runbook/Grafana_best_practices).
|
||||
|
||||
## Best practices to follow
|
||||
|
||||
- When creating a new dashboard, make sure it has a meaningful name.
|
||||
- If you are creating a dashboard to play or experiment, then put the word `TEST` or `TMP` in the name.
|
||||
- Consider including your name or initials in the dashboard name or as a tag so that people know who owns the dashboard.
|
||||
- Remove temporary experiment dashboards when you are done with them.
|
||||
- If you create many related dashboards, think about how to cross-reference them for easy navigation. Refer to [Best practices for managing dashboards]({{< relref "best-practices-for-managing-dashboards/" >}}) for more information.
|
||||
- Grafana retrieves data from a data source. A basic understanding of [data sources]({{< relref "../datasources/" >}}) in general and your specific is important.
|
||||
- Avoid unnecessary dashboard refreshing to reduce the load on the network or backend. For example, if your data changes every hour, then you don't need to set the dashboard refresh rate to 30 seconds.
|
||||
- Use the left and right Y-axes when displaying time series with different units or ranges.
|
||||
- Add documentation to dashboards and panels.
|
||||
- To add documentation to a dashboard, add a [Text panel visualization]({{< relref "../visualizations/text-panel/" >}}) to the dashboard. Record things like the purpose of the dashboard, useful resource links, and any instructions users might need to interact with the dashboard. Check out this [Wikimedia example](https://grafana.wikimedia.org/d/000000066/resourceloader?orgId=1).
|
||||
- To add documentation to a panel, edit the panel settings and add a description. Any text you add will appear if you hover your cursor over the small `i` in the top left corner of the panel.
|
||||
- Reuse your dashboards and enforce consistency by using [templates and variables]({{< relref "../variables/" >}}).
|
||||
- Be careful with stacking graph data. The visualizations can be misleading, and hide important data. We recommend turning it off in most cases.
|
||||
@@ -1,39 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-managing-dashboards/
|
||||
description: Best practices for managing dashboards in Grafana
|
||||
title: Best practices for managing dashboards
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Best practices for managing dashboards
|
||||
|
||||
This page outlines some best practices to follow when managing Grafana dashboards.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Here are some principles to consider before you start managing dashboards.
|
||||
|
||||
### Strategic observability
|
||||
|
||||
There are several [common observability strategies]({{< relref "common-observability-strategies/" >}}). You should research them and decide whether one of them works for you or if you want to come up with your own. Either way, have a plan, write it down, and stick to it.
|
||||
|
||||
Adapt your strategy to changing needs as necessary.
|
||||
|
||||
### Maturity level
|
||||
|
||||
What is your dashboard maturity level? Analyze your current dashboard setup and compare it to the [Dashboard management maturity model]({{< relref "dashboard-management-maturity-levels/" >}}). Understanding where you are can help you decide how to get to where you want to be.
|
||||
|
||||
## Best practices to follow
|
||||
|
||||
- Avoid dashboard sprawl, meaning the uncontrolled growth of dashboards. Dashboard sprawl negatively affects time to find the right dashboard. Duplicating dashboards and changing “one thing” (worse: keeping original tags) is the easiest kind of sprawl.
|
||||
- Periodically review the dashboards and remove unnecessary ones.
|
||||
- If you create a temporary dashboard, perhaps to test something, prefix the name with `TEST: `. Delete the dashboard when you are finished.
|
||||
- Copying dashboards with no significant changes is not a good idea.
|
||||
- You miss out on updates to the original dashboard, such as documentation changes, bug fixes, or additions to metrics.
|
||||
- In many cases copies are being made to simply customize the view by setting template parameters. This should instead be done by maintaining a link to the master dashboard and customizing the view with [URL parameters]({{< relref "../panels/configure-data-links/#data-link-variables" >}}).
|
||||
- When you must copy a dashboard, clearly rename it and _do not_ copy the dashboard tags. Tags are important metadata for dashboards that are used during search. Copying tags can result in false matches.
|
||||
- Maintain a dashboard of dashboards or cross-reference dashboards. This can be done in several ways:
|
||||
- Create dashboard links, panel, or data links. Links can go to other dashboards or to external systems. For more information, refer to [Manage dashboard links]({{< relref "../dashboards/manage-dashboard-links/" >}}).
|
||||
- Add a [Dashboard list panel]({{< relref "../visualizations/dashboard-list-panel/" >}}). You can then customize what you see by doing tag or folder searches.
|
||||
- Add a [Text panel]({{< relref "../visualizations/text-panel/" >}}) and use markdown to customize the display.
|
||||
@@ -1,62 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/common-observability-strategies/
|
||||
- /docs/grafana/latest/getting-started/strategies/
|
||||
description: Common observability strategies
|
||||
keywords:
|
||||
- grafana
|
||||
- intro
|
||||
- guide
|
||||
- concepts
|
||||
- methods
|
||||
title: Common observability strategies
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# Common observability strategies
|
||||
|
||||
When you have a lot to monitor, like a server farm, you need a strategy to decide what is important enough to monitor. This page describes several common methods for choosing what to monitor.
|
||||
|
||||
A logical strategy allows you to make uniform dashboards and scale your observability platform more easily.
|
||||
|
||||
## Guidelines for usage
|
||||
|
||||
- The USE method tells you how happy your machines are, the RED method tells you how happy your users are.
|
||||
- USE reports on causes of issues.
|
||||
- RED reports on user experience and is more likely to report symptoms of problems.
|
||||
- The best practice of alerting is to alert on symptoms rather than causes, so alerting should be done on RED dashboards.
|
||||
|
||||
## USE method
|
||||
|
||||
USE stands for:
|
||||
|
||||
- **Utilization -** Percent time the resource is busy, such as node CPU usage
|
||||
- **Saturation -** Amount of work a resource has to do, often queue length or node load
|
||||
- **Errors -** Count of error events
|
||||
|
||||
This method is best for hardware resources in infrastructure, such as CPU, memory, and network devices. For more information, refer to [The USE Method](http://www.brendangregg.com/usemethod.html).
|
||||
|
||||
## RED method
|
||||
|
||||
RED stands for:
|
||||
|
||||
- **Rate -** Requests per second
|
||||
- **Errors -** Number of requests that are failing
|
||||
- **Duration -** Amount of time these requests take, distribution of latency measurements
|
||||
|
||||
This method is most applicable to services, especially a microservices environment. For each of your services, instrument the code to expose these metrics for each component. RED dashboards are good for alerting and SLAs. A well-designed RED dashboard is a proxy for user experience.
|
||||
|
||||
For more information, refer to Tom Wilkie's blog post [The RED method: How to instrument your services](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services).
|
||||
|
||||
## The Four Golden Signals
|
||||
|
||||
According to the [Google SRE handbook](https://landing.google.com/sre/sre-book/chapters/monitoring-distributed-systems/#xref_monitoring_golden-signals), if you can only measure four metrics of your user-facing system, focus on these four.
|
||||
|
||||
This method is similar to the RED method, but it includes saturation.
|
||||
|
||||
- **Latency -** Time taken to serve a request
|
||||
- **Traffic -** How much demand is placed on your system
|
||||
- **Errors -** Rate of requests that are failing
|
||||
- **Saturation -** How "full" your system is
|
||||
|
||||
[Here's an example from Grafana Play](https://play.grafana.org/d/000000109/the-four-golden-signals?orgId=1).
|
||||
@@ -1,73 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/dashboard-management-maturity-levels/
|
||||
description: Explanation of dashboard management maturity model
|
||||
title: Dashboard management maturity model
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Dashboard management maturity model
|
||||
|
||||
_Dashboard management maturity_ refers to how well-designed and efficient your dashboard ecosystem is. We recommend periodically reviewing your dashboard setup to gauge where you are and how you can improve.
|
||||
|
||||
Broadly speaking, dashboard maturity can be defined as low, medium, or high.
|
||||
|
||||
Much of the content for this topic was taken from the KubeCon 2019 talk [Fool-Proof Kubernetes Dashboards for Sleep-Deprived Oncalls](https://www.youtube.com/watch?v=YE2aQFiMGfY).
|
||||
|
||||
## Low - default state
|
||||
|
||||
At this stage, you have no coherent dashboard management strategy. Almost everyone starts here.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Everyone can modify your dashboards.
|
||||
- Lots of copied dashboards, little to no dashboard reuse.
|
||||
- One-off dashboards that hang around forever.
|
||||
- No version control (dashboard JSON in version control).
|
||||
- Lots of browsing for dashboards, searching for the right dashboard. This means lots of wasted time trying to find the dashboard you need.
|
||||
- Not having any alerts to direct you to the right dashboard.
|
||||
|
||||
## Medium - methodical dashboards
|
||||
|
||||
At this stage, you are starting to manage your dashboard use with methodical dashboards. You might have laid out a strategy, but there are some things you could improve.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Prevent sprawl by using template variables. For example, you don't need a separate dashboard for each node, you can use query variables. Even better, you can make the data source a template variable too, so you can reuse the same dashboard across different clusters and monitoring backends.
|
||||
|
||||
Refer to the list of [Variable examples]({{< relref "../variables/variable-examples/" >}}) if you want some ideas.
|
||||
|
||||
- Methodical dashboards according to an [observability strategy]({{< relref "common-observability-strategies/" >}}).
|
||||
- Hierarchical dashboards with drill-downs to the next level.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/drill-down-example.png" caption="Example of using drill-down" >}}
|
||||
|
||||
- Dashboard design reflects service hierarchies. The example shown below uses the RED method (request and error rate on the left, latency duration on the right) with one row per service. The row order reflects the data flow.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/service-hierarchy-example.png" caption="Example of a service hierarchy" >}}
|
||||
|
||||
- Compare like to like: split service dashboards when the magnitude differs. Make sure aggregated metrics don't drown out important information.
|
||||
- Expressive charts with meaningful use of color and normalizing axes where you can.
|
||||
- Example of meaningful color: Blue means it's good, red means it's bad. [Thresholds]({{< relref "../panels/configure-thresholds/" >}}) can help with that.
|
||||
- Example of normalizing axes: When comparing CPU usage, measure by percentage rather than raw number, because machines can have a different number of cores. Normalizing CPU usage by the number of cores reduces cognitive load because the viewer can trust that at 100% all cores are being used, without having to know the number of CPUs.
|
||||
- Directed browsing cuts down on "guessing."
|
||||
- Template variables make it harder to “just browse” randomly or aimlessly.
|
||||
- Most dashboards should be linked to by alerts.
|
||||
- Browsing is directed with links. For more information, refer to [Manage dashboard links]({{< relref "../dashboards/manage-dashboard-links/" >}}).
|
||||
- Version-controlled dashboard JSON.
|
||||
|
||||
## High - optimized use
|
||||
|
||||
At this stage, you have optimized your dashboard management use with a consistent and thoughtful strategy. It requires maintenance, but the results are worth it.
|
||||
|
||||
- Actively reducing sprawl.
|
||||
- Regularly review existing dashboards to make sure they are still relevant.
|
||||
- Only approved dashboards added to master dashboard list.
|
||||
- Tracking dashboard use. If you're an Enterprise user, you can take advantage of [Usage insights]({{< relref "../enterprise/usage-insights/" >}}).
|
||||
- Consistency by design.
|
||||
- Use scripting libraries to generate dashboards, ensure consistency in pattern and style.
|
||||
- grafonnet (Jsonnet)
|
||||
- grafanalib (Python)
|
||||
- No editing in the browser. Dashboard viewers change views with variables.
|
||||
- Browsing for dashboards is the exception, not the rule.
|
||||
- Perform experimentation and testing in a separate Grafana instance dedicated to that purpose, not your production instance. When a dashboard in the test environment is proven useful, then add that dashboard to your main Grafana instance.
|
||||
@@ -16,13 +16,13 @@ Before you begin, ensure that you have configured a data source. See also:
|
||||
|
||||
- [Use dashboards]({{< relref "use-dashboards/" >}})
|
||||
- [Create dashboard folders]({{< relref "./manage-dashboards/#create-a-dashboard-folder" >}})
|
||||
- [Add and organize panels]({{< relref "add-organize-panels/" >}})
|
||||
- [Add and organize panels]({{< relref "./build-dashboards/add-organize-panels" >}})
|
||||
- [Manage dashboards]({{< relref "./manage-dashboards" >}})
|
||||
- [Public dashboards]({{< relref "dashboard-public/" >}})
|
||||
- [Annotations]({{< relref "annotations/" >}})
|
||||
- [Annotations]({{< relref "./build-dashboards/annotate-visualizations" >}})
|
||||
- [Playlist]({{< relref "./create-manage-playlists/" >}})
|
||||
- [Reporting]({{< relref "../share-dashboards-panels#reporting" >}})
|
||||
- [Time range controls]({{< relref "time-range-controls/" >}})
|
||||
- [Dashboard version history]({{< relref "dashboard-history/" >}})
|
||||
- [Dashboard export and import]({{< relref "export-import/" >}})
|
||||
- [Dashboard JSON model]({{< relref "json-model/" >}})
|
||||
- [Reporting]({{< relref "./create-reports" >}})
|
||||
- [Time range controls]({{< relref "./manage-dashboards/#common-time-range-controls" >}})
|
||||
- [Dashboard version history]({{< relref "./build-dashboards/manage-version-history" >}})
|
||||
- [Dashboard export and import]({{< relref "./manage-dashboards/#export-and-import-dashboards" >}})
|
||||
- [Dashboard JSON model]({{< relref "./build-dashboards/view-dashboard-json-model/" >}})
|
||||
|
||||
108
docs/sources/dashboards/assess-dashboard-usage/index.md
Normal file
108
docs/sources/dashboards/assess-dashboard-usage/index.md
Normal file
@@ -0,0 +1,108 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/enterprise/usage-insights/
|
||||
- /docs/grafana/latest/enterprise/usage-insights/dashboard-datasource-insights/
|
||||
- /docs/grafana/latest/enterprise/usage-insights/presence-indicator/
|
||||
- /docs/grafana/latest/enterprise/usage-insights/improved-search/
|
||||
- /docs/grafana/latest/dashboards/assess-dashboard-usage/
|
||||
description: Understand how your Grafana instance is used
|
||||
keywords:
|
||||
- grafana
|
||||
- usage-insights
|
||||
- enterprise
|
||||
- presence-indicator
|
||||
- search
|
||||
- sort
|
||||
title: Assess dashboard usage
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Assess dashboard usage
|
||||
|
||||
Usage insights enables you to have a better understanding of how your Grafana instance is used.
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../" >}}) and [Grafana Cloud Pro and Advanced]({{< ref "/docs/grafana-cloud" >}}).
|
||||
|
||||
The usage insights feature collects a number of aggregated data and stores them in the database:
|
||||
|
||||
- Dashboard views (aggregated and per user)
|
||||
- Data source errors
|
||||
- Data source queries
|
||||
|
||||
The aggregated data provides you access to several features:
|
||||
|
||||
- [Dashboard and data source insights]({{< relref "#dashboard-and-data-source-insights" >}})
|
||||
- [Presence indicator]({{< relref "#presence-indicator" >}})
|
||||
- [Sort dashboards by using insights data]({{< relref "#sort-dashboards-by-using-insights-data" >}})
|
||||
|
||||
This feature also generates detailed logs that can be exported to Loki. Refer to [Export logs of usage insights]({{< relref "../../setup-grafana/configure-security/export-logs/" >}}).
|
||||
|
||||
## Dashboard and data source insights
|
||||
|
||||
For every dashboard and data source, you can access usage information.
|
||||
|
||||
### Dashboard insights
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced]({{< ref "/docs/grafana-cloud" >}}).
|
||||
|
||||
To see dashboard usage information, click **Dashboard insights** in the top bar.
|
||||
|
||||
{{< figure src="/static/img/docs/enterprise/dashboard_insights_button.png" max-width="400px" class="docs-image--no-shadow" >}}
|
||||
|
||||
Dashboard insights show the following information:
|
||||
|
||||
- **Stats:** The number of daily queries and errors for the past 30 days.
|
||||
- **Users & activity:** The daily view count for the last 30 days; last activities on the dashboard and recent users (with a limit of 20).
|
||||
|
||||
{{< figure src="/static/img/docs/enterprise/dashboard_insights_stats.png" max-width="400px" class="docs-image--no-shadow" >}}{{< figure src="/static/img/docs/enterprise/dashboard_insights_users.png" max-width="400px" class="docs-image--no-shadow" >}}
|
||||
|
||||
### Data source insights
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../" >}}) version 7.3 and later, and [Grafana Cloud Pro and Advanced]({{< ref "/docs/grafana-cloud" >}}).
|
||||
|
||||
Data source insights provides information about how a data source has been used in the past 30 days, such as:
|
||||
|
||||
- Queries per day
|
||||
- Errors per day
|
||||
- Query load time per day (averaged in ms)
|
||||
|
||||
To find data source insights:
|
||||
|
||||
1. Go to the Data source list view.
|
||||
1. Click on a data source.
|
||||
1. Click the **Insights** tab.
|
||||
|
||||
{{< figure src="/static/img/docs/enterprise/datasource_insights.png" max-width="650px" class="docs-image--no-shadow" >}}
|
||||
|
||||
## Presence indicator
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced]({{< ref "/docs/grafana-cloud" >}}).
|
||||
|
||||
When you are signed in and looking at a dashboard, you can know who is looking at the same dashboard as you are via a presence indicator, which displays avatars of users who have recently interacted with the dashboard. The default timeframe is 10 minutes. To see the user's name, hover over the user's avatar. The avatars come from [Gravatar](https://gravatar.com) based on the user's email.
|
||||
|
||||
When there are more active users on a dashboard than can fit within the presence indicator, click the **+X** icon. Doing so opens [dashboard insights]({{< relref "#dashboard-and-data-source-insights" >}}), which contains more details about recent user activity.
|
||||
|
||||
{{< figure src="/static/img/docs/enterprise/presence_indicators.png" max-width="400px" class="docs-image--no-shadow" >}}
|
||||
|
||||
To change _recent_ to something other than the past 10 minutes, edit the [configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) file:
|
||||
|
||||
```ini
|
||||
[analytics.views]
|
||||
# Set age for recent active users
|
||||
recent_users_age = 10m
|
||||
```
|
||||
|
||||
## Sort dashboards by using insights data
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../" >}}) version 7.0 and later, and [Grafana Cloud Pro and Advanced]({{< ref "/docs/grafana-cloud" >}}).
|
||||
|
||||
In the search view, you can use insights data to help you find most-used, broken, and unused dashbaords.
|
||||
|
||||
You can sort the dashboards by:
|
||||
|
||||
- Errors total
|
||||
- Errors 30 days
|
||||
- Views total
|
||||
- Views 30 days
|
||||
|
||||
{{< figure src="/static/img/docs/enterprise/improved-search-7-5.png" max-width="650px" class="docs-image--no-shadow" >}}
|
||||
20
docs/sources/dashboards/build-dashboards/_index.md
Normal file
20
docs/sources/dashboards/build-dashboards/_index.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/next/dashboards/build-dashboards/
|
||||
title: Build dashboards
|
||||
menuTitle: Build dashboards
|
||||
weight: 2
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
- dashboard folders
|
||||
- create
|
||||
- build
|
||||
- design
|
||||
---
|
||||
|
||||
# Build dashboards
|
||||
|
||||
This section includes the following topics:
|
||||
|
||||
{{< section >}}
|
||||
@@ -6,9 +6,19 @@ aliases:
|
||||
- /docs/grafana/latest/features/dashboard/dashboards/
|
||||
- /docs/grafana/latest/panels/working-with-panels/add-panel/
|
||||
- /docs/grafana/latest/dashboards/add-organize-panels/
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/about-repeating-panels-rows/
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-rows/
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-panels/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/add-organize-panels/
|
||||
title: Add and organize panels
|
||||
menuTitle: Add and organize panels
|
||||
weight: 2
|
||||
weight: 200
|
||||
keywords:
|
||||
- panel
|
||||
- dashboard
|
||||
- dynamic
|
||||
- rows
|
||||
- add
|
||||
---
|
||||
|
||||
# Add and organize panels
|
||||
@@ -17,23 +27,23 @@ This section describes the areas of the Grafana panel editor.
|
||||
|
||||
1. Panel header: The header section lists the dashboard in which the panel appears and the following controls:
|
||||
|
||||
- **Dashboard settings (gear) icon -** Click to access the dashboard settings.
|
||||
- **Discard -** Discards changes you have made to the panel since you last saved the dashboard.
|
||||
- **Save -** Saves changes you made to the panel.
|
||||
- **Apply -** Applies changes you made and closes the panel editor, returning you to the dashboard. You will have to save the dashboard to persist the applied changes.
|
||||
- **Dashboard settings (gear) icon:** Click to access the dashboard settings.
|
||||
- **Discard:** Discards changes you have made to the panel since you last saved the dashboard.
|
||||
- **Save:** Saves changes you made to the panel.
|
||||
- **Apply:** Applies changes you made and closes the panel editor, returning you to the dashboard. You will have to save the dashboard to persist the applied changes.
|
||||
|
||||
1. Visualization preview: The visualization preview section contains the following options:
|
||||
|
||||
- **Table view:** Convert any visualization to a table so that you can see the data. Table views are useful for troubleshooting.
|
||||
- **Fill:** The visualization preview fills the available space. If you change the width of the side pane or height of the bottom pane the visualization changes to fill the available space.
|
||||
- **Actual:** The visualization preview will have the exact size as the size on the dashboard. If not enough space is available, the visualization will scale down preserving the aspect ratio.
|
||||
- **Time range controls:** For more information, refer to [Time range controls]({{< relref "../manage-dashboards/#configure-dashboard-time-range-controls" >}}).
|
||||
- **Time range controls:** For more information, refer to [Time range controls]({{< relref "../../manage-dashboards/#configure-dashboard-time-range-controls" >}}).
|
||||
|
||||
1. Data section: The data section contains tabs where you enter queries, transform your data, and create alert rules (if applicable).
|
||||
|
||||
- **Query tab -** Select your data source and enter queries here. For more information, refer to [Add a query]({{< relref "../panels/query-a-data-source/add-a-query/" >}}).
|
||||
- **Transform tab -** Apply data transformations. For more information, refer to [Transform data]({{< relref "../panels/transform-data/" >}}).
|
||||
- **Alert tab -** Write alert rules. For more information, refer to [Overview of Grafana 8 alerting]({{< relref "../alerting/" >}}).
|
||||
- **Query tab:** Select your data source and enter queries here. For more information, refer to [Add a query]({{< relref "../../../panels/query-a-data-source/add-a-query/" >}}).
|
||||
- **Transform tab:** Apply data transformations. For more information, refer to [Transform data]({{< relref "../../../panels/transform-data/" >}}).
|
||||
- **Alert tab:** Write alert rules. For more information, refer to [Overview of Grafana 8 alerting]({{< relref "../../../alerting/" >}}).
|
||||
|
||||
1. Panel display options: The display options section contains tabs where you configure almost every aspect of your data visualization.
|
||||
|
||||
@@ -67,10 +77,10 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you have the proper permissions. For more information about permissions, refer to [About users and permissions]({{< relref "../administration/roles-and-permissions/" >}}).
|
||||
- Ensure that you have the proper permissions. For more information about permissions, refer to [About users and permissions]({{< relref "../../../administration/roles-and-permissions/" >}}).
|
||||
- Identify the dashboard to which you want to add the panel.
|
||||
- Understand the query language of the target data source.
|
||||
- Ensure that data source for which you are writing a query has been added. For more information about adding a data source, refer to [Add a data source]({{< relref "../datasources/add-a-data-source/" >}}) if you need instructions.
|
||||
- Ensure that data source for which you are writing a query has been added. For more information about adding a data source, refer to [Add a data source]({{< relref "../../../datasources/add-a-data-source/" >}}) if you need instructions.
|
||||
|
||||
**To create a dashboard and add a panel**:
|
||||
|
||||
@@ -79,7 +89,7 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
1. In the first line of the **Query** tab, click the drop-down list and select a data source.
|
||||
1. Write or construct a query in the query language of your data source.
|
||||
|
||||
For more information about data sources, refer to [Data sources]({{< relref "../datasources/" >}}) for specific guidelines.
|
||||
For more information about data sources, refer to [Data sources]({{< relref "../../../datasources/" >}}) for specific guidelines.
|
||||
|
||||
1. In the Visualization list, select a visualization type.
|
||||
|
||||
@@ -87,18 +97,40 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
|
||||

|
||||
|
||||
For more information about individual visualizations, refer to [Visualizations options]({{< relref "../visualizations/" >}}).
|
||||
For more information about individual visualizations, refer to [Visualizations options]({{< relref "../../../visualizations/" >}}).
|
||||
|
||||
1. Refer to the following documentation for ways you can adjust panel settings.
|
||||
|
||||
While not required, most visualizations need some adjustment before they properly display the information that you need.
|
||||
|
||||
- [Configure value mappings]({{< relref "../../panels/configure-value-mappings" >}})
|
||||
- [Visualization-specific options]({{< relref "../../visualizations/" >}})
|
||||
- [Override field values]({{< relref "../../panels/configure-overrides/" >}})
|
||||
- [Configure thresholds]({{< relref "../../panels/configure-thresholds/" >}})
|
||||
- [Configure standard options]({{< relref "../../panels/configure-standard-options/" >}})
|
||||
- [Configure value mappings]({{< relref "../../../panels/configure-value-mappings" >}})
|
||||
- [Visualization-specific options]({{< relref "../../../visualizations/" >}})
|
||||
- [Override field values]({{< relref "../../../panels/configure-overrides/" >}})
|
||||
- [Configure thresholds]({{< relref "../../../panels/configure-thresholds/" >}})
|
||||
- [Configure standard options]({{< relref "../../../panels/configure-standard-options/" >}})
|
||||
|
||||
1. Add a note to describe the visualization (or describe your changes) and then click **Save** in the upper-right corner of the page.
|
||||
|
||||
Notes can be helpful if you need to revert the dashboard to a previous version.
|
||||
|
||||
## Configure repeating rows
|
||||
|
||||
You can configure Grafana to dynamically add panels or rows to a dashboard based on the value of a variable. Variables dynamically change your queries across all rows in a dashboard. For more information about repeating panels, refer to [Configure repeating panels](../../panels/configure-panel-options/#configure-repeating-panels).
|
||||
|
||||
To see an example of repeating rows, refer to [Dashboard with repeating rows](https://play.grafana.org/d/000000153/repeat-rows). The example shows that you can also repeat rows if you have variables set with `Multi-value` or `Include all values` selected.
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that the query includes a multi-value variable.
|
||||
|
||||
**To configure repeating rows:**
|
||||
|
||||
1. On the dashboard home page, click **Add panel**.
|
||||
|
||||
1. On the **Add a panel** dialog box, click **Add a new row**.
|
||||
|
||||
1. Hover over the row title and click the cog icon.
|
||||
|
||||
1. On the **Row Options** dialog box, add a title and select the variable for which you want to add repeating rows.
|
||||
|
||||
> **Note:** To provide context to dashboard users, add the variable to the row title.
|
||||
@@ -2,16 +2,18 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/annotations/
|
||||
- /docs/grafana/latest/reference/annotations/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/annotate-visualizations/
|
||||
keywords:
|
||||
- grafana
|
||||
- annotations
|
||||
- documentation
|
||||
- guide
|
||||
title: Annotations
|
||||
weight: 9
|
||||
title: Annotate visualizations
|
||||
menuTitle: Annotate visualizations
|
||||
weight: 600
|
||||
---
|
||||
|
||||
# Annotations
|
||||
# Annotate visualizations
|
||||
|
||||
Annotations provide a way to mark points on the graph with rich events. When you hover over an annotation
|
||||
you can get event description and event tags. The text field can include links to other systems with more detail.
|
||||
@@ -20,7 +22,7 @@ you can get event description and event tags. The text field can include links t
|
||||
|
||||
## Native annotations
|
||||
|
||||
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../developers/http_api/annotations/" >}}).
|
||||
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../../../developers/http_api/annotations/" >}}).
|
||||
|
||||
### Add annotation
|
||||
|
||||
@@ -94,4 +96,4 @@ to show.
|
||||
|
||||
### Annotation query details
|
||||
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../datasources/" >}}) topic.
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../../../datasources/" >}}) topic.
|
||||
215
docs/sources/dashboards/build-dashboards/best-practices/index.md
Normal file
215
docs/sources/dashboards/build-dashboards/best-practices/index.md
Normal file
@@ -0,0 +1,215 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/
|
||||
- /docs/grafana/latest/best-practices/common-observability-strategies/
|
||||
- /docs/grafana/latest/getting-started/strategies/
|
||||
- /docs/grafana/latest/best-practices/dashboard-management-maturity-levels/
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-creating-dashboards/
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-managing-dashboards/
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/best-practices/
|
||||
description: Best practices for working with Grafana
|
||||
title: Grafana dashboard best practices
|
||||
menuTitle: Best practices
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Grafana dashboard best practices
|
||||
|
||||
This section provides information about best practices for intermediate Grafana administrators and users about how to build and maintain Grafana dashboards.
|
||||
|
||||
For more information about the different kinds of dashboards you can create, refer to [Grafana dashboards: A complete guide to all the different types you can build](https://grafana.com/blog/2022/06/06/grafana-dashboards-a-complete-guide-to-all-the-different-types-you-can-build/?pg=webinar-getting-started-with-grafana-dashboard-design-amer&plcmt=related-content-1).
|
||||
|
||||
## Common observability strategies
|
||||
|
||||
When you have a lot to monitor, like a server farm, you need a strategy to decide what is important enough to monitor. This page describes several common methods for choosing what to monitor.
|
||||
|
||||
A logical strategy allows you to make uniform dashboards and scale your observability platform more easily.
|
||||
|
||||
### Guidelines for usage
|
||||
|
||||
- The USE method tells you how happy your machines are, the RED method tells you how happy your users are.
|
||||
- USE reports on causes of issues.
|
||||
- RED reports on user experience and is more likely to report symptoms of problems.
|
||||
- The best practice of alerting is to alert on symptoms rather than causes, so alerting should be done on RED dashboards.
|
||||
|
||||
### USE method
|
||||
|
||||
USE stands for:
|
||||
|
||||
- **Utilization -** Percent time the resource is busy, such as node CPU usage
|
||||
- **Saturation -** Amount of work a resource has to do, often queue length or node load
|
||||
- **Errors -** Count of error events
|
||||
|
||||
This method is best for hardware resources in infrastructure, such as CPU, memory, and network devices. For more information, refer to [The USE Method](http://www.brendangregg.com/usemethod.html).
|
||||
|
||||
### RED method
|
||||
|
||||
RED stands for:
|
||||
|
||||
- **Rate -** Requests per second
|
||||
- **Errors -** Number of requests that are failing
|
||||
- **Duration -** Amount of time these requests take, distribution of latency measurements
|
||||
|
||||
This method is most applicable to services, especially a microservices environment. For each of your services, instrument the code to expose these metrics for each component. RED dashboards are good for alerting and SLAs. A well-designed RED dashboard is a proxy for user experience.
|
||||
|
||||
For more information, refer to Tom Wilkie's blog post [The RED method: How to instrument your services](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services).
|
||||
|
||||
### The Four Golden Signals
|
||||
|
||||
According to the [Google SRE handbook](https://landing.google.com/sre/sre-book/chapters/monitoring-distributed-systems/#xref_monitoring_golden-signals), if you can only measure four metrics of your user-facing system, focus on these four.
|
||||
|
||||
This method is similar to the RED method, but it includes saturation.
|
||||
|
||||
- **Latency -** Time taken to serve a request
|
||||
- **Traffic -** How much demand is placed on your system
|
||||
- **Errors -** Rate of requests that are failing
|
||||
- **Saturation -** How "full" your system is
|
||||
|
||||
[Here's an example from Grafana Play](https://play.grafana.org/d/000000109/the-four-golden-signals?orgId=1).
|
||||
|
||||
## Dashboard management maturity model
|
||||
|
||||
_Dashboard management maturity_ refers to how well-designed and efficient your dashboard ecosystem is. We recommend periodically reviewing your dashboard setup to gauge where you are and how you can improve.
|
||||
|
||||
Broadly speaking, dashboard maturity can be defined as low, medium, or high.
|
||||
|
||||
Much of the content for this topic was taken from the KubeCon 2019 talk [Fool-Proof Kubernetes Dashboards for Sleep-Deprived Oncalls](https://www.youtube.com/watch?v=YE2aQFiMGfY).
|
||||
|
||||
### Low - default state
|
||||
|
||||
At this stage, you have no coherent dashboard management strategy. Almost everyone starts here.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Everyone can modify your dashboards.
|
||||
- Lots of copied dashboards, little to no dashboard reuse.
|
||||
- One-off dashboards that hang around forever.
|
||||
- No version control (dashboard JSON in version control).
|
||||
- Lots of browsing for dashboards, searching for the right dashboard. This means lots of wasted time trying to find the dashboard you need.
|
||||
- Not having any alerts to direct you to the right dashboard.
|
||||
|
||||
### Medium - methodical dashboards
|
||||
|
||||
At this stage, you are starting to manage your dashboard use with methodical dashboards. You might have laid out a strategy, but there are some things you could improve.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Prevent sprawl by using template variables. For example, you don't need a separate dashboard for each node, you can use query variables. Even better, you can make the data source a template variable too, so you can reuse the same dashboard across different clusters and monitoring backends.
|
||||
|
||||
Refer to the list of [Variable examples]({{< relref "../../variables/#examples-of-templates-and-variables" >}}) if you want some ideas.
|
||||
|
||||
- Methodical dashboards according to an [observability strategy]({{< relref "#common-observability-strategies" >}}).
|
||||
- Hierarchical dashboards with drill-downs to the next level.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/drill-down-example.png" caption="Example of using drill-down" >}}
|
||||
|
||||
- Dashboard design reflects service hierarchies. The example shown below uses the RED method (request and error rate on the left, latency duration on the right) with one row per service. The row order reflects the data flow.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/service-hierarchy-example.png" caption="Example of a service hierarchy" >}}
|
||||
|
||||
- Compare like to like: split service dashboards when the magnitude differs. Make sure aggregated metrics don't drown out important information.
|
||||
- Expressive charts with meaningful use of color and normalizing axes where you can.
|
||||
- Example of meaningful color: Blue means it's good, red means it's bad. [Thresholds]({{< relref "../../../panels/configure-thresholds/" >}}) can help with that.
|
||||
- Example of normalizing axes: When comparing CPU usage, measure by percentage rather than raw number, because machines can have a different number of cores. Normalizing CPU usage by the number of cores reduces cognitive load because the viewer can trust that at 100% all cores are being used, without having to know the number of CPUs.
|
||||
- Directed browsing cuts down on "guessing."
|
||||
- Template variables make it harder to “just browse” randomly or aimlessly.
|
||||
- Most dashboards should be linked to by alerts.
|
||||
- Browsing is directed with links. For more information, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links" >}}).
|
||||
- Version-controlled dashboard JSON.
|
||||
|
||||
### High - optimized use
|
||||
|
||||
At this stage, you have optimized your dashboard management use with a consistent and thoughtful strategy. It requires maintenance, but the results are worth it.
|
||||
|
||||
- Actively reducing sprawl.
|
||||
- Regularly review existing dashboards to make sure they are still relevant.
|
||||
- Only approved dashboards added to master dashboard list.
|
||||
- Tracking dashboard use. If you're an Enterprise user, you can take advantage of [Usage insights]({{< relref "../../assess-dashboard-usage/" >}}).
|
||||
- Consistency by design.
|
||||
- Use scripting libraries to generate dashboards, ensure consistency in pattern and style.
|
||||
- grafonnet (Jsonnet)
|
||||
- grafanalib (Python)
|
||||
- No editing in the browser. Dashboard viewers change views with variables.
|
||||
- Browsing for dashboards is the exception, not the rule.
|
||||
- Perform experimentation and testing in a separate Grafana instance dedicated to that purpose, not your production instance. When a dashboard in the test environment is proven useful, then add that dashboard to your main Grafana instance.
|
||||
|
||||
## Best practices for creating dashboards
|
||||
|
||||
This page outlines some best practices to follow when creating Grafana dashboards.
|
||||
|
||||
### Before you begin
|
||||
|
||||
Here are some principles to consider before you create a dashboard.
|
||||
|
||||
#### A dashboard should tell a story or answer a question
|
||||
|
||||
What story are you trying to tell with your dashboard? Try to create a logical progression of data, such as large to small or general to specific. What is the goal for this dashboard? (Hint: If the dashboard doesn't have a goal, then ask yourself if you really need the dashboard.)
|
||||
|
||||
Keep your graphs simple and focused on answering the question that you are asking. For example, if your question is "which servers are in trouble?", then maybe you don't need to show all the server data. Just show data for the ones in trouble.
|
||||
|
||||
#### Dashboards should reduce cognitive load, not add to it
|
||||
|
||||
_Cognitive load_ is basically how hard you need to think about something in order to figure it out. Make your dashboard easy to interpret. Other users and future you (when you're trying to figure out what broke at 2AM) will appreciate it.
|
||||
|
||||
Ask yourself:
|
||||
|
||||
- Can I tell what exactly each graph represents? Is it obvious, or do I have to think about it?
|
||||
- If I show this to someone else, how long will it take them to figure it out? Will they get lost?
|
||||
|
||||
#### Have a monitoring strategy
|
||||
|
||||
It's easy to make new dashboards. It's harder to optimize dashboard creation and adhere to a plan, but it's worth it. This strategy should govern both your overall dashboard scheme and enforce consistency in individual dashboard design.
|
||||
|
||||
Refer to [Common observability strategies]({{< relref "#common-observability-strategies" >}}) and [Dashboard management maturity levels]({{< relref "#dashboard-management-maturity-model" >}}) for more information.
|
||||
|
||||
#### Write it down
|
||||
|
||||
Once you have a strategy or design guidelines, write them down to help maintain consistency over time. Check out this [Wikimedia runbook example](https://wikitech.wikimedia.org/wiki/Performance/Runbook/Grafana_best_practices).
|
||||
|
||||
### Best practices to follow
|
||||
|
||||
- When creating a new dashboard, make sure it has a meaningful name.
|
||||
- If you are creating a dashboard to play or experiment, then put the word `TEST` or `TMP` in the name.
|
||||
- Consider including your name or initials in the dashboard name or as a tag so that people know who owns the dashboard.
|
||||
- Remove temporary experiment dashboards when you are done with them.
|
||||
- If you create many related dashboards, think about how to cross-reference them for easy navigation. Refer to [Best practices for managing dashboards]({{< relref "#best-practices-for-managing-dashboards" >}}) for more information.
|
||||
- Grafana retrieves data from a data source. A basic understanding of [data sources]({{< relref "../../../datasources/" >}}) in general and your specific is important.
|
||||
- Avoid unnecessary dashboard refreshing to reduce the load on the network or backend. For example, if your data changes every hour, then you don't need to set the dashboard refresh rate to 30 seconds.
|
||||
- Use the left and right Y-axes when displaying time series with different units or ranges.
|
||||
- Add documentation to dashboards and panels.
|
||||
- To add documentation to a dashboard, add a [Text panel visualization]({{< relref "../../../visualizations/text-panel/" >}}) to the dashboard. Record things like the purpose of the dashboard, useful resource links, and any instructions users might need to interact with the dashboard. Check out this [Wikimedia example](https://grafana.wikimedia.org/d/000000066/resourceloader?orgId=1).
|
||||
- To add documentation to a panel, edit the panel settings and add a description. Any text you add will appear if you hover your cursor over the small `i` in the top left corner of the panel.
|
||||
- Reuse your dashboards and enforce consistency by using [templates and variables]({{< relref "../../variables" >}}).
|
||||
- Be careful with stacking graph data. The visualizations can be misleading, and hide important data. We recommend turning it off in most cases.
|
||||
|
||||
## Best practices for managing dashboards
|
||||
|
||||
This page outlines some best practices to follow when managing Grafana dashboards.
|
||||
|
||||
### Before you begin
|
||||
|
||||
Here are some principles to consider before you start managing dashboards.
|
||||
|
||||
#### Strategic observability
|
||||
|
||||
There are several [common observability strategies]({{< relref "#common-observability-strategies" >}}). You should research them and decide whether one of them works for you or if you want to come up with your own. Either way, have a plan, write it down, and stick to it.
|
||||
|
||||
Adapt your strategy to changing needs as necessary.
|
||||
|
||||
#### Maturity level
|
||||
|
||||
What is your dashboard maturity level? Analyze your current dashboard setup and compare it to the [Dashboard management maturity model]({{< relref "#dashboard-management-maturity-model" >}}). Understanding where you are can help you decide how to get to where you want to be.
|
||||
|
||||
### Best practices to follow
|
||||
|
||||
- Avoid dashboard sprawl, meaning the uncontrolled growth of dashboards. Dashboard sprawl negatively affects time to find the right dashboard. Duplicating dashboards and changing “one thing” (worse: keeping original tags) is the easiest kind of sprawl.
|
||||
- Periodically review the dashboards and remove unnecessary ones.
|
||||
- If you create a temporary dashboard, perhaps to test something, prefix the name with `TEST: `. Delete the dashboard when you are finished.
|
||||
- Copying dashboards with no significant changes is not a good idea.
|
||||
- You miss out on updates to the original dashboard, such as documentation changes, bug fixes, or additions to metrics.
|
||||
- In many cases copies are being made to simply customize the view by setting template parameters. This should instead be done by maintaining a link to the master dashboard and customizing the view with [URL parameters]({{< relref "../../../panels/configure-data-links/#data-link-variables" >}}).
|
||||
- When you must copy a dashboard, clearly rename it and _do not_ copy the dashboard tags. Tags are important metadata for dashboards that are used during search. Copying tags can result in false matches.
|
||||
- Maintain a dashboard of dashboards or cross-reference dashboards. This can be done in several ways:
|
||||
- Create dashboard links, panel, or data links. Links can go to other dashboards or to external systems. For more information, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links/" >}}).
|
||||
- Add a [Dashboard list panel]({{< relref "../../../visualizations/dashboard-list-panel/" >}}). You can then customize what you see by doing tag or folder searches.
|
||||
- Add a [Text panel]({{< relref "../../../visualizations/text-panel/" >}}) and use markdown to customize the display.
|
||||
@@ -6,6 +6,7 @@ aliases:
|
||||
- /docs/grafana/latest/linking/dashboard-links/
|
||||
- /docs/grafana/latest/dashboards/manage-dashboard-links/
|
||||
- /docs/grafana/latest/panels/working-with-panels/add-link-to-panel/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/manage-dashboard-links/
|
||||
description: How to link Grafana dashboards.
|
||||
keywords:
|
||||
- link
|
||||
@@ -17,7 +18,7 @@ keywords:
|
||||
- navigate
|
||||
title: Manage dashboard links
|
||||
menuTitle: Manage dashboard links
|
||||
weight: 400
|
||||
weight: 500
|
||||
---
|
||||
|
||||
# Manage dasboard links
|
||||
@@ -35,7 +36,7 @@ The next step is to figure out which link type is right for your workflow. Even
|
||||
- If the link relates to most if not all of the panels in the dashboard, use [dashboard links]({{< relref "#dashboard-links" >}}).
|
||||
- If you want to drill down into specific panels, use [panel links]({{< relref "#panel-links" >}}).
|
||||
- If you want to link to an external site, you can use either a dashboard link or a panel link.
|
||||
- If you want to drill down into a specific series, or even a single measurement, use [data links]({{< relref "../../panels/configure-data-links/#data-links" >}}).
|
||||
- If you want to drill down into a specific series, or even a single measurement, use [data links]({{< relref "../../../panels/configure-data-links/#data-links" >}}).
|
||||
|
||||
## Controlling time range using the URL
|
||||
|
||||
@@ -47,7 +48,7 @@ You can control the time range of a panel or dashboard by providing following qu
|
||||
|
||||
## Dashboard links
|
||||
|
||||
When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you don’t have to worry whether the person you send the link to is looking at the right data. For other types of links, refer to [Data link variables]({{< relref "../../panels/configure-data-links/#data-link-variables/" >}}).
|
||||
When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you don’t have to worry whether the person you send the link to is looking at the right data. For other types of links, refer to [Data link variables]({{< relref "../../../panels/configure-data-links/#data-link-variables/" >}}).
|
||||
|
||||
Dashboard links can also be used as shortcuts to external systems, such as submitting [a GitHub issue with the current dashboard name](https://github.com/grafana/grafana/issues/new?title=Dashboard%3A%20HTTP%20Requests).
|
||||
|
||||
@@ -7,10 +7,11 @@ aliases:
|
||||
- /docs/grafana/latest/panels/library-panels/unlink-library-panel/
|
||||
- /docs/grafana/latest/panels/library-panels/manage-library-panel/
|
||||
- /docs/grafana/latest/panels/library-panels/delete-library-panel/
|
||||
- /docs/grafana/latest/dashboards/manage-library-panels/
|
||||
- /docs/grafana/next/dashboards/manage-library-panels/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/manage-library-panels/
|
||||
title: Manage Grafana library panels
|
||||
menuTitle: Manage library panels
|
||||
weight: 3
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# Manage Grafana library panels
|
||||
@@ -2,17 +2,19 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/dashboard-history/
|
||||
- /docs/grafana/latest/reference/dashboard_history/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/manage-version-history/
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
- documentation
|
||||
- version
|
||||
- history
|
||||
title: Dashboard version history
|
||||
weight: 14
|
||||
title: Manage dashboard version history
|
||||
menutitle: Manage version history
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Dashboard version history
|
||||
# Manage dashboard version history
|
||||
|
||||
Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are never lost. A list of these versions is available by entering the dashboard settings and then selecting "Versions" in the left side menu.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/json-model/
|
||||
- /docs/grafana/latest/reference/dashboard/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/view-dashboard-json-model/
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
@@ -9,7 +10,7 @@ keywords:
|
||||
- json
|
||||
- model
|
||||
title: JSON model
|
||||
weight: 1200
|
||||
weight: 700
|
||||
---
|
||||
|
||||
# Dashboard JSON model
|
||||
@@ -5,8 +5,10 @@ aliases:
|
||||
- /docs/grafana/latest/administration/reports/
|
||||
- /docs/grafana/latest/dashboards/reporting/
|
||||
- /docs/grafana/latest/enterprise/export-pdf/
|
||||
- /docs/grafana/latest/panels/create-reports
|
||||
- /docs/grafana/latest/dashboards/create-reports
|
||||
title: Create and manage reports
|
||||
menuTitle: Create and manage reports
|
||||
menuTitle: Reporting
|
||||
weight: 85
|
||||
keywords:
|
||||
- grafana
|
||||
@@ -26,6 +28,8 @@ Reporting enables you to automatically generate PDFs from any of your dashboards
|
||||
|
||||
Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report also changes.
|
||||
|
||||
For information about recent improvements to the reporting UI, refer to [Grafana reporting: How we improved the UX in Grafana](https://grafana.com/blog/2022/06/29/grafana-reporting-how-we-improved-the-ux-in-grafana/).
|
||||
|
||||
## Requirements
|
||||
|
||||
- SMTP must be configured for reports to be sent. Refer to [SMTP]({{< relref "../../setup-grafana/configure-grafana/#smtp" >}}) in [Configuration]({{< relref "../../setup-grafana/configure-grafana/" >}}) for more information.
|
||||
@@ -37,7 +41,7 @@ When [RBAC]({{< relref "../../administration/roles-and-permissions/access-contro
|
||||
|
||||
## Create or update a report
|
||||
|
||||
Only organization admins can create reports by default. You can customize who can create reports with [Role-based access control]({{< relref "../../administration/roles-and-permissions/access-control/" >}}).
|
||||
Only organization administrators can create reports by default. You can customize who can create reports with [Role-based access control]({{< relref "../../administration/roles-and-permissions/access-control/" >}}).
|
||||
|
||||
1. Click on the Reports icon in the side navigation menu.
|
||||
|
||||
@@ -74,7 +78,7 @@ Only organization admins can create reports by default. You can customize who ca
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../enterprise/" >}}) version 7.5 and later behind the `reportVariables` feature flag, Grafana Enterprise version 8.0 and later without a feature flag, and [Grafana Cloud Pro and Advanced]({{< ref "/grafana-cloud" >}}).
|
||||
|
||||
You can configure report-specific template variables for the dashboard on the report page. The variables that you select will override the variables from the dashboard, and they are used when rendering a PDF file of the report. For detailed information about using template variables, refer to the [Templates and variables]({{< relref "../../variables/" >}}) section.
|
||||
You can configure report-specific template variables for the dashboard on the report page. The variables that you select will override the variables from the dashboard, and they are used when rendering a PDF file of the report. For detailed information about using template variables, refer to the [Templates and variables]({{< relref "../variables/" >}}) section.
|
||||
|
||||
> **Note:** The query variables saved with a report might become of date if the results of that query change. For example, if your template variable queries for a list of hostnames and a new hostname is added, then it will not be included in the report. If that occurs, the selected variables must be manually updated in the report. If you select the `All` value for the template variable or if you keep the dashboard's original variable selection, then the report stays up-to-date as new values are added.
|
||||
|
||||
@@ -104,7 +108,7 @@ By default, reports use the saved time range of the dashboard. You can change th
|
||||
|
||||
The page header of the report displays the time range for the dashboard's data queries. Dashboards set to use the browser's time zone use the time zone on the Grafana server.
|
||||
|
||||
If the time zone is set differently between your Grafana server and its remote image renderer, then the time ranges in the report might be different between the page header and the time axes in the panels. To avoid this, set the time zone to UTC for dashboards when using a remote renderer. Each dashboard's time zone setting is visible in the [time range controls]({{< relref "../../dashboards/time-range-controls/#dashboard-time-settings" >}}).
|
||||
If the time zone is set differently between your Grafana server and its remote image renderer, then the time ranges in the report might be different between the page header and the time axes in the panels. To avoid this, set the time zone to UTC for dashboards when using a remote renderer. Each dashboard's time zone setting is visible in the [time range controls]({{< relref "./manage-dashboards/#dashboard-time-settings" >}}).
|
||||
|
||||
### Layout and orientation
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/dashboard-manage/
|
||||
- /docs/grafana/latest/features/dashboard/dashboards/
|
||||
title: Manage dashboards
|
||||
weight: 8
|
||||
---
|
||||
|
||||
## Manage dashboards
|
||||
|
||||
When managing dashboads, you can use:
|
||||
|
||||
- Select a time period for a dashboard using the [Time range controls]({{< relref "time-range-controls/" >}}) in the upper right of the dashboard.
|
||||
- Tag dashboards.
|
||||
- Use [templating]({{< relref "../variables/" >}}) to make them more dynamic and interactive.
|
||||
- Use [annotations]({{< relref "annotations/" >}}) to display event data across panels. This can help correlate the time series data in the panel with other events.
|
||||
- Use the dashboard picker for quick, searchable access to all dashboards in a particular organization.
|
||||
|
||||
You can also [share dashboards]({{< relref "../share-dashboards-panels#share-a-dashboard" >}}) in a variety of ways.
|
||||
@@ -14,7 +14,7 @@ aliases:
|
||||
title: Manage dashboards
|
||||
menuTitle: Manage dashboards
|
||||
weight: 8
|
||||
eywords:
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
- dashboard folders
|
||||
|
||||
@@ -80,7 +80,7 @@ Use the new [contextPerRenderKey]({{< relref "../setup-grafana/image-rendering/#
|
||||
|
||||
### Saving previews
|
||||
|
||||
The crawler saves previews and their metadata in Grafana's DB. Preview's metadata contains, among other things, the [dashboard version]({{< relref "dashboard-history/" >}}) from the time of taking the screenshot. During subsequent runs, the crawler uses the saved version to find stale dashboard previews.
|
||||
The crawler saves previews and their metadata in Grafana's DB. Preview's metadata contains, among other things, the [dashboard version]({{< relref "./build-dashboards/manage-version-history" >}}) from the time of taking the screenshot. During subsequent runs, the crawler uses the saved version to find stale dashboard previews.
|
||||
|
||||
## Permissions
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@ aliases:
|
||||
- /docs/grafana/latest/administration/reports/
|
||||
- /docs/grafana/latest/dashboards/reporting/
|
||||
- /docs/grafana/latest/enterprise/export-pdf/
|
||||
- docs/grafana/latest/dashboards/share-dashboards-panels/
|
||||
- /docs/grafana/latest/share-dashboards-panels/
|
||||
title: Share dashboards and panels
|
||||
menuTitle: Share dashboards and panels
|
||||
weight: 85
|
||||
@@ -87,7 +89,7 @@ If you created a snapshot by mistake, click **Delete snapshot** to remove the sn
|
||||
|
||||
### Dashboard export
|
||||
|
||||
Grafana dashboards can easily be exported and imported. For more information, refer to [Export and import dashboards]({{< relref "../dashboards/export-import/" >}}).
|
||||
Grafana dashboards can easily be exported and imported. For more information, refer to [Export and import dashboards]({{< relref "./manage-dashboards/#export-and-import-dashboards" >}}).
|
||||
|
||||

|
||||
|
||||
@@ -95,7 +97,7 @@ Grafana dashboards can easily be exported and imported. For more information, re
|
||||
|
||||
You can generate and save PDF files of any dashboard.
|
||||
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../introduction/grafana-enterprise/" >}}).
|
||||
> **Note:** Available in [Grafana Enterprise]({{< relref "../../introduction/grafana-enterprise/" >}}).
|
||||
|
||||
1. In the upper-right corner of the dashboard that you want to export as PDF, click the **Share dashboard** icon.
|
||||
1. On the PDF tab, select a layout option for the exported dashboard: **Portrait** or **Landscape**.
|
||||
@@ -125,7 +127,7 @@ The **Link** tab shows the current time range, template variables, and the defau
|
||||
1. Send the copied URL to a Grafana user with authorization to view the link.
|
||||
1. You also optionally click **Direct link rendered image** to share an image of the panel.
|
||||
|
||||
For more information, refer to [Image rendering]({{< relref "../setup-grafana/image-rendering/" >}}).
|
||||
For more information, refer to [Image rendering]({{< relref "../../setup-grafana/image-rendering/" >}}).
|
||||
|
||||
The following example shows a link to a server-side rendered PNG:
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/variables/
|
||||
title: Templates and variables
|
||||
- /docs/grafana/latest/variables/variable-examples/
|
||||
title: Variables
|
||||
weight: 130
|
||||
---
|
||||
|
||||
# Templates and variables
|
||||
# Variables
|
||||
|
||||
The following topics describe how to add and manage variables in your dashboards:
|
||||
|
||||
{{< section >}}
|
||||
|
||||
A variable is a placeholder for a value. You can use variables in metric queries and in panel titles. So when you change
|
||||
the value, using the dropdown at the top of the dashboard, your panel's metric queries will change to reflect the new value.
|
||||
@@ -31,9 +36,7 @@ wmi_system_threads{instance=~"$server"}
|
||||
|
||||
Variable values are always synced to the URL using the syntax `var-<varname>=value`.
|
||||
|
||||
## Examples of templates and variables
|
||||
|
||||
To see variable and template examples, go to any of the dashboards listed in [Variable examples]({{< relref "variable-examples/" >}}).
|
||||
## Examples
|
||||
|
||||
Variables are listed in drop-down lists across the top of the screen. Select different variables to see how the visualizations change.
|
||||
|
||||
@@ -41,6 +44,19 @@ To see variable settings, navigate to **Dashboard Settings > Variables**. Click
|
||||
|
||||
Variables can be used in titles, descriptions, text panels, and queries. Queries with text that starts with `$` are templates. Not all panels will have template queries.
|
||||
|
||||
The following dashboards in Grafana Play provide examples of template variables.
|
||||
|
||||
- [Elasticsearch Metrics](https://play.grafana.org/d/000000014/elasticsearch-metrics?orgId=1) - Uses ad hoc filters, global variables, and a custom variable.
|
||||
- [Graphite Templated Nested](https://play.grafana.org/d/000000056/graphite-templated-nested?orgId=1) - Uses query variables, chained query variables, an interval variable, and a repeated panel.
|
||||
- [Influx DB Group By Variable](https://play.grafana.org/d/000000137/influxdb-group-by-variable?orgId=1) - Query variable, panel uses the variable results to group the metric data.
|
||||
- [InfluxDB Raw Query Template Var](https://play.grafana.org/d/000000083/influxdb-raw-query-template-var?orgId=1) - Uses query variables, chained query variables, and an interval variable.
|
||||
- [InfluxDB Server Monitoring](https://play.grafana.org/d/AAy9r_bmk/influxdb-server-monitoring?orgId=1) - Uses query variables, chained query variables, an interval variable, and an ad hoc filter.
|
||||
- [Prometheus templating](https://play.grafana.org/d/000000063/prometheus-templating?orgId=1) - Uses chained query variables.
|
||||
- [Template Redux](https://play.grafana.org/d/p-k6QtkGz/template-redux?orgId=1) - Uses query variables, chained query variables, ad hoc filters, an interval variable, a text box variable, a custom variable, and a data source variable.
|
||||
- [Templating, repeated panels](https://play.grafana.org/d/000000025/templating-repeated-panels?orgId=1) - Two sets of repeated panels use query variables.
|
||||
- [Templating showcase](https://play.grafana.org/d/000000091/templating-showcase?orgId=1) - Uses custom, query, chained query, and data source variables.
|
||||
- [Templating value groups](https://play.grafana.org/d/000000024/templating-value-groups?orgId=1) - Uses query variable with value groups.
|
||||
|
||||
## Variable best practices
|
||||
|
||||
- Variable drop-down lists are displayed in the order they are listed in the variable list in Dashboard settings.
|
||||
@@ -0,0 +1,596 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/variables/variable-types/
|
||||
- /docs/grafana/latest/variables/add-query-variable/
|
||||
- /docs/grafana/latest/variables/variable-types/add-query-variable/
|
||||
- /docs/grafana/latest/variables/add-custom-variable/
|
||||
- /docs/grafana/latest/variables/variable-types/add-custom-variable/
|
||||
- /docs/grafana/latest/variables/add-text-box-variable/
|
||||
- /docs/grafana/latest/variables/variable-types/add-text-box-variable/
|
||||
- /docs/grafana/latest/variables/add-constant-variable/
|
||||
- /docs/grafana/latest/variables/variable-types/add-constant-variable/
|
||||
- /docs/grafana/latest/variables/add-data-source-variable/
|
||||
- /docs/grafana/latest/variables/variable-types/add-data-source-variable/
|
||||
- /docs/grafana/latest/variables/add-interval-variable/
|
||||
- /docs/grafana/latest/variables/variable-types/add-interval-variable/
|
||||
- /docs/grafana/latest/variables/add-ad-hoc-filters/
|
||||
- /docs/grafana/latest/variables/variable-types/add-ad-hoc-filters/
|
||||
- /docs/grafana/latest/variables/global-variables/
|
||||
- /docs/grafana/latest/variables/variable-types/global-variables/
|
||||
- /docs/grafana/latest/variables/chained-variables/
|
||||
- /docs/grafana/latest/variables/variable-types/chained-variables/
|
||||
- /docs/grafana/latest/variables/add-template-variables/
|
||||
- /docs/grafana/latest/variables/variable-selection-options/
|
||||
- /docs/grafana/latest/variables/filter-variables-with-regex/
|
||||
- /docs/grafana/latest/variables/formatting-multi-value-variables/
|
||||
- /docs/grafana/latest/reference/templating/
|
||||
- /docs/grafana/latest/variables/manage-variable/
|
||||
title: Add and manage variables
|
||||
menuTitle: Manage variables
|
||||
weight: 100
|
||||
keywords:
|
||||
- grafana
|
||||
- documentation
|
||||
- guide
|
||||
- variable
|
||||
- global
|
||||
- standard
|
||||
- nested
|
||||
- chained
|
||||
- linked
|
||||
---
|
||||
|
||||
# Add and manage variables
|
||||
|
||||
The following table lists the types of variables shipped with Grafana.
|
||||
|
||||
| Variable type | Description |
|
||||
| :---------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Query | Query-generated list of values such as metric names, server names, sensor IDs, data centers, and so on. [Add a query variable]({{< relref "#add-a-query-variable" >}}). |
|
||||
| Custom | Define the variable options manually using a comma-separated list. [Add a custom variable]({{< relref "#add-a-custom-variable" >}}). |
|
||||
| Text box | Display a free text input field with an optional default value. [Add a text box variable]({{< relref "#add-a-text-box-variable" >}}). |
|
||||
| Constant | Define a hidden constant. [Add a constant variable]({{< relref "#add-a-constant-variable" >}}). |
|
||||
| Data source | Quickly change the data source for an entire dashboard. [Add a data source variable]({{< relref "#add-a-data-source-variable" >}}). |
|
||||
| Interval | Interval variables represent time spans. [Add an interval variable]({{< relref "#add-an-interval-variable" >}}). |
|
||||
| Ad hoc filters | Key/value filters that are automatically added to all metric queries for a data source (InfluxDB, Prometheus, and Elasticsearch only). [Add ad hoc filters]({{< relref "#add-ad-hoc-filters" >}}). |
|
||||
| Global variables | Built-in variables that can be used in expressions in the query editor. Refer to [Global variables]({{< relref "#global-variables" >}}). |
|
||||
| Chained variables | Variable queries can contain other variables. Refer to [Chained variables]({{< relref "#chained-variables" >}}). |
|
||||
|
||||
## Enter General options
|
||||
|
||||
You must enter general options for any type of variable that you create.
|
||||
|
||||
1. Navigate to the dashboard you want to make a variable for and click the **Dashboard settings** (gear) icon at the top of the page.
|
||||
1. On the **Variables** tab, click **New**.
|
||||
1. Enter a **Name** for the variable.
|
||||
1. In the **Type** list, select **Query**.
|
||||
1. (Optional) In **Label**, enter the display name of the variable dropdown.
|
||||
|
||||
If you don't enter a display name, then the dropdown label is the variable name.
|
||||
|
||||
1. Choose a **Hide** option:
|
||||
- **No selection (blank):** The variable dropdown displays the variable **Name** or **Label** value. This is the default.
|
||||
- **Label:** The variable dropdown only displays the selected variable value and a down arrow.
|
||||
- **Variable:** No variable dropdown is displayed on the dashboard.
|
||||
|
||||
## Add a query variable
|
||||
|
||||
Query variables enable you to write a data source query that can return a list of metric names, tag values, or keys. For example, a query variable might return a list of server names, sensor IDs, or data centers. The variable values change as they dynamically fetch options with a data source query.
|
||||
|
||||
Query variables are generally only supported for strings. If your query returns numbers or any other data type, you might need to convert them to strings in order to use them as variables. For the Azure data source, for example, you can use the [tostring](https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/tostringfunction) function for this purpose.
|
||||
|
||||
Query expressions can contain references to other variables and in effect create linked variables. Grafana detects this and automatically refreshes a variable when one of its linked variables change.
|
||||
|
||||
> **Note:** Query expressions are different for each data source. For more information, refer to the documentation for your [data source]({{< relref "../../../datasources/" >}}).
|
||||
|
||||
1. [Enter general options](#enter-general-options).
|
||||
1. In the **Data source** list, select the target data source for the query. For more information about data sources, refer to [Add a data source]({{< relref "../../../datasources/add-a-data-source/" >}}).
|
||||
1. In the **Refresh** list, select when the variable should update options.
|
||||
- **On Dashboard Load:** Queries the data source every time the dashboard loads. This slows down dashboard loading, because the variable query needs to be completed before dashboard can be initialized.
|
||||
- **On Time Range Change:** Queries the data source when the dashboard time range changes. Only use this option if your variable options query contains a time range filter or is dependent on the dashboard time range.
|
||||
1. In the **Query** field, enter a query.
|
||||
- The query field varies according to your data source. Some data sources have custom query editors.
|
||||
- If you need more room in a single input field query editor, then hover your cursor over the lines in the lower right corner of the field and drag downward to expand.
|
||||
1. (Optional) In the **Regex** field, type a regex expression to filter or capture specific parts of the names returned by your data source query. To see examples, refer to [Filter variables with regex]({{< relref "#filter-variables-with-regex" >}}).
|
||||
1. In the **Sort** list, select the sort order for values to be displayed in the dropdown list. The default option, **Disabled**, means that the order of options returned by your data source query will be used.
|
||||
1. (Optional) Enter [Selection Options]({{< relref "#configure-variable-selection-options" >}}).
|
||||
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
## Add a custom variable
|
||||
|
||||
Use a _custom_ variable for a value that does not change, such as a number or a string.
|
||||
|
||||
For example, if you have server names or region names that never change, then you might want to create them as custom variables rather than query variables. Because they do not change, you might use them in [chained variables]({{< relref "#chained-variables" >}}) rather than other query variables. That would reduce the number of queries Grafana must send when chained variables are updated.
|
||||
|
||||
1. [Enter general options](#enter-general-options).
|
||||
1. In the **Values separated by comma** list, enter the values for this variable in a comma-separated list. You can include numbers, strings, or key/value pairs separated by a space and a colon. For example, `key1 : value1,key2 : value2`.
|
||||
1. (Optional) Enter [Selection Options]({{< relref "#configure-variable-selection-options" >}}).
|
||||
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
## Add a text box variable
|
||||
|
||||
_Text box_ variables display a free text input field with an optional default value. This is the most flexible variable, because you can enter any value. Use this type of variable if you have metrics with high cardinality or if you want to update multiple panels in a dashboard at the same time.
|
||||
|
||||
For more information about cardinality, refer to [What are cardinality spikes and why do they matter?](https://grafana.com/blog/2022/02/15/what-are-cardinality-spikes-and-why-do-they-matter/)
|
||||
|
||||
1. [Enter general options](#enter-general-options).
|
||||
1. (Optional) In the **Default value** field, select the default value for the variable. If you do not enter anything in this field, then Grafana displays an empty text box for users to type text into.
|
||||
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
## Add a constant variable
|
||||
|
||||
_Constant_ variables enable you to define a hidden constant. This is useful for metric path prefixes for dashboards you want to share. When you export a dashboard, constant variables are converted to import options.
|
||||
|
||||
Constant variables are _not_ flexible. Each constant variable only holds one value, and it cannot be updated unless you update the variable settings.
|
||||
|
||||
Constant variables are useful when you have complex values that you need to include in queries but don't want to retype in every query. For example, if you had a server path called `i-0b6a61efe2ab843gg`, then you could replace it with a variable called `$path_gg`.
|
||||
|
||||
1. [Enter general options](#enter-general-options).
|
||||
1. In the **Value** field, enter the variable value. You can enter letters, numbers, and symbols. You can even use wildcards if you use [raw format]({{< relref "../variable-syntax/#raw" >}}).
|
||||
1. In **Preview of values**, Grafana displays the current variable value. Review it to ensure it matches what you expect.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
## Add a data source variable
|
||||
|
||||
_Data source_ variables enable you to quickly change the data source for an entire dashboard. They are useful if you have multiple instances of a data source, perhaps in different environments.
|
||||
|
||||
1. [Enter general options](#enter-general-options).
|
||||
1. In the **Type** list, select the target data source for the variable. For more information about data sources, refer to [Add a data source]({{< relref "../../../datasources/add-a-data-source/" >}}).
|
||||
1. (Optional) In **Instance name filter**, enter a regex filter for which data source instances to choose from in the variable value drop-down list. Leave this field empty to display all instances.
|
||||
1. (Optional) Enter [Selection Options]({{< relref "#configure-variable-selection-options" >}}).
|
||||
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
## Add an interval variable
|
||||
|
||||
Use an _interval_ variable to represents time spans such as `1m`,`1h`, `1d`. You can think of them as a dashboard-wide "group by time" command. Interval variables change how the data is grouped in the visualization. You can also use the Auto Option to return a set number of data points per time span.
|
||||
|
||||
You can use an interval variable as a parameter to group by time (for InfluxDB), date histogram interval (for Elasticsearch), or as a summarize function parameter (for Graphite).
|
||||
|
||||
1. [Enter general options](#enter-general-options).
|
||||
1. In the **Values** field, enter the time range intervals that you want to appear in the variable drop-down list. The following time units are supported: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, and `y (years)`. You can also accept or edit the default values: `1m,10m,30m,1h,6h,12h,1d,7d,14d,30d`.
|
||||
1. (Optional) Turn on the **Auto Option** if you want to add the `auto` option to the list. This option allows you to specify how many times the current time range should be divided to calculate the current `auto` time span. If you turn it on, then two more options appear:
|
||||
- **Step count -** Select the number of times the current time range will be divided to calculate the value, similar to the **Max data points** query option. For example, if the current visible time range is 30 minutes, then the `auto` interval groups the data into 30 one-minute increments. The default value is 30 steps.
|
||||
- **Min Interval -** The minimum threshold below which the step count intervals will not divide the time. To continue the 30 minute example, if the minimum interval is set to 2m, then Grafana would group the data into 15 two-minute increments.
|
||||
1. In **Preview of values**, Grafana displays a list of the current variable values. Review them to ensure they match what you expect.
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
### Interval variable examples
|
||||
|
||||
The following example shows a template variable `myinterval` in a Graphite function:
|
||||
|
||||
```
|
||||
summarize($myinterval, sum, false)
|
||||
```
|
||||
|
||||
The following example shows a more complex Graphite example, from the [Graphite Template Nested Requests panel](https://play.grafana.org/d/000000056/graphite-templated-nested?editPanel=2&orgId=1):
|
||||
|
||||
```
|
||||
groupByNode(summarize(movingAverage(apps.$app.$server.counters.requests.count, 5), '$interval', 'sum', false), 2, 'sum')
|
||||
```
|
||||
|
||||
## Add ad hoc filters
|
||||
|
||||
_Ad hoc filters_ enable you to add key/value filters that are automatically added to all metric queries that use the specified data source. Unlike other variables, you do not use ad hoc filters in queries. Instead, you use ad hoc filters to write filters for existing queries.
|
||||
|
||||
> **Note:** Ad hoc filter variables only work with Prometheus, Loki, InfluxDB, and Elasticsearch data sources.
|
||||
|
||||
1. [Enter general options](#enter-general-options).
|
||||
1. In the **Data source** list, select the target data source. For more information about data sources, refer to [Add a data source]({{< relref "../../../datasources/add-a-data-source/" >}}).
|
||||
1. Click **Add** to add the variable to the dashboard.
|
||||
|
||||
### Create ad hoc filters
|
||||
|
||||
Ad hoc filters are one of the most complex and flexible variable options available. Instead of a regular list of variable options, this variable allows you to build a dashboard-wide ad hoc query. Filters you apply in this manner are applied to all panels on the dashboard.
|
||||
|
||||
## Configure variable selection options
|
||||
|
||||
**Selection Options** are a feature you can use to manage variable option selections. All selection options are optional, and they are off by default.
|
||||
|
||||
### Multi-value variables
|
||||
|
||||
Interpolating a variable with multiple values selected is tricky as it is not straight forward how to format the multiple values into a string that is valid in the given context where the variable is used. Grafana tries to solve this by allowing each data source plugin to inform the templating interpolation engine what format to use for multiple values.
|
||||
|
||||
> **Note:** The **Custom all value** option on the variable must be blank for Grafana to format all values into a single string. If leave it blank, then the Grafana concatenates (adds together) all the values in the query. Something like `value1,value2,value3`. If a custom `all` value is used, then instead the value will be something like `*` or `all`.
|
||||
|
||||
#### Multi-value variables with a Graphite data source
|
||||
|
||||
Graphite uses glob expressions. A variable with multiple values would, in this case, be interpolated as `{host1,host2,host3}` if the current variable value was _host1_, _host2_, and _host3_.
|
||||
|
||||
#### Multi-value variables with a Prometheus or InfluxDB data source
|
||||
|
||||
InfluxDB and Prometheus use regex expressions, so the same variable would be interpolated as `(host1|host2|host3)`. Every value would also be regex escaped. If not, a value with a regex control character would break the regex expression.
|
||||
|
||||
#### Multi-value variables with an Elastic data source
|
||||
|
||||
Elasticsearch uses lucene query syntax, so the same variable would be formatted as `("host1" OR "host2" OR "host3")`. In this case, every value must be escaped so that the value only contains lucene control words and quotation marks.
|
||||
|
||||
#### Troubleshoot multi-value variables
|
||||
|
||||
Automatic escaping and formatting can cause problems and it can be tricky to grasp the logic behind it. Especially for InfluxDB and Prometheus where the use of regex syntax requires that the variable is used in regex operator context.
|
||||
|
||||
If you do not want Grafana to do this automatic regex escaping and formatting, then you must do one of the following:
|
||||
|
||||
- Turn off the **Multi-value** or **Include All option** options.
|
||||
- Use the [raw variable format]({{< relref "../variable-syntax/#raw" >}}).
|
||||
|
||||
### Include All option
|
||||
|
||||
Grafana adds an `All` option to the variable dropdown list. If a user selects this option, then all variable options are selected.
|
||||
|
||||
### Custom all value
|
||||
|
||||
This option is only visible if the **Include All option** is selected.
|
||||
|
||||
Enter regex, globs, or lucene syntax in the **Custom all value** field to define the value of the `All` option.
|
||||
|
||||
By default the `All` value includes all options in combined expression. This can become very long and can have performance problems. Sometimes it can be better to specify a custom all value, like a wildcard regex.
|
||||
|
||||
In order to have custom regex, globs, or lucene syntax in the **Custom all value** option, it is never escaped so you will have to think about what is a valid value for your data source.
|
||||
|
||||
## Global variables
|
||||
|
||||
Grafana has global built-in variables that can be used in expressions in the query editor. This topic lists them in alphabetical order and defines them. These variables are useful in queries, dashboard links, panel links, and data links.
|
||||
|
||||
### $\_\_dashboard
|
||||
|
||||
> Only available in Grafana v6.7+. In Grafana 7.1, the variable changed from showing the UID of the current dashboard to the name of the current dashboard.
|
||||
|
||||
This variable is the name of the current dashboard.
|
||||
|
||||
### $\_\_from and $\_\_to
|
||||
|
||||
Grafana has two built-in time range variables: `$__from` and `$__to`. They are currently always interpolated as epoch milliseconds by default, but you can control date formatting.
|
||||
|
||||
> **Note:** This special formatting syntax is only available in Grafana 7.1.2+
|
||||
|
||||
| Syntax | Example result | Description |
|
||||
| ------------------------ | ------------------------ | --------------------------------------------------------------------------------------------------------- |
|
||||
| `${__from}` | 1594671549254 | Unix millisecond epoch |
|
||||
| `${__from:date}` | 2020-07-13T20:19:09.254Z | No args, defaults to ISO 8601/RFC 3339 |
|
||||
| `${__from:date:iso}` | 2020-07-13T20:19:09.254Z | ISO 8601/RFC 3339 |
|
||||
| `${__from:date:seconds}` | 1594671549 | Unix seconds epoch |
|
||||
| `${__from:date:YYYY-MM}` | 2020-07 | Any custom [date format](https://momentjs.com/docs/#/displaying/) that does not include the `:` character |
|
||||
|
||||
The syntax above also works with `${__to}`.
|
||||
|
||||
You can use this variable in URLs, as well. For example, you can send a user to a dashboard that shows a time range from six hours ago until now: https://play.grafana.org/d/000000012/grafana-play-home?viewPanel=2&orgId=1?from=now-6h&to=now
|
||||
|
||||
### $\_\_interval
|
||||
|
||||
You can use the `$__interval` variable as a parameter to group by time (for InfluxDB, MySQL, Postgres, MSSQL), Date histogram interval (for Elasticsearch), or as a _summarize_ function parameter (for Graphite).
|
||||
|
||||
Grafana automatically calculates an interval that can be used to group by time in queries. When there are more data points than can be shown on a graph, then queries can be made more efficient by grouping by a larger interval. It is more efficient to group by 1 day than by 10s when looking at 3 months of data and the graph will look the same and the query will be faster. The `$__interval` is calculated using the time range and the width of the graph (the number of pixels).
|
||||
|
||||
Approximate Calculation: `(to - from) / resolution`
|
||||
|
||||
For example, when the time range is 1 hour and the graph is full screen, then the interval might be calculated to `2m` - points are grouped in 2 minute intervals. If the time range is 6 months and the graph is full screen, then the interval might be `1d` (1 day) - points are grouped by day.
|
||||
|
||||
In the InfluxDB data source, the legacy variable `$interval` is the same variable. `$__interval` should be used instead.
|
||||
|
||||
The InfluxDB and Elasticsearch data sources have `Group by time interval` fields that are used to hard code the interval or to set the minimum limit for the `$__interval` variable (by using the `>` syntax -> `>10m`).
|
||||
|
||||
### $\_\_interval_ms
|
||||
|
||||
This variable is the `$__interval` variable in milliseconds, not a time interval formatted string. For example, if the `$__interval` is `20m` then the `$__interval_ms` is `1200000`.
|
||||
|
||||
### $\_\_name
|
||||
|
||||
This variable is only available in the Singlestat panel and can be used in the prefix or suffix fields on the Options tab. The variable will be replaced with the series name or alias.
|
||||
|
||||
### $\_\_org
|
||||
|
||||
This variable is the ID of the current organization.
|
||||
`${__org.name}` is the name of the current organization.
|
||||
|
||||
### $\_\_user
|
||||
|
||||
> Only available in Grafana v7.1+
|
||||
|
||||
`${__user.id}` is the ID of the current user.
|
||||
`${__user.login}` is the login handle of the current user.
|
||||
`${__user.email}` is the email for the current user.
|
||||
|
||||
### $\_\_range
|
||||
|
||||
Currently only supported for Prometheus and Loki data sources. This variable represents the range for the current dashboard. It is calculated by `to - from`. It has a millisecond and a second representation called `$__range_ms` and `$__range_s`.
|
||||
|
||||
### $\_\_rate_interval
|
||||
|
||||
Currently only supported for Prometheus data sources. The `$__rate_interval` variable is meant to be used in the rate function. Refer to [Prometheus query variables]({{< relref "../../../datasources/prometheus.md#using-__rate_interval">}}) for details.
|
||||
|
||||
### $timeFilter or $\_\_timeFilter
|
||||
|
||||
The `$timeFilter` variable returns the currently selected time range as an expression. For example, the time range interval `Last 7 days` expression is `time > now() - 7d`.
|
||||
|
||||
This is used in several places, including:
|
||||
|
||||
- The WHERE clause for the InfluxDB data source. Grafana adds it automatically to InfluxDB queries when in Query Editor mode. You can add it manually in Text Editor mode: `WHERE $timeFilter`.
|
||||
- Log Analytics queries in the Azure Monitor data source.
|
||||
- SQL queries in MySQL, Postgres, and MSSQL.
|
||||
- The `$__timeFilter` variable is used in the MySQL data source.
|
||||
|
||||
## Chained variables
|
||||
|
||||
_Chained variables_, also called _linked variables_ or _nested variables_, are query variables with one or more other variables in their variable query. This section explains how chained variables work and provides links to example dashboards that use chained variables.
|
||||
|
||||
Chained variable queries are different for every data source, but the premise is the same for all. You can use chained variable queries in any data source that allows them.
|
||||
|
||||
Extremely complex linked templated dashboards are possible, 5 or 10 levels deep. Technically, there is no limit to how deep or complex you can go, but the more links you have, the greater the query load.
|
||||
|
||||
### Grafana Play dashboard examples
|
||||
|
||||
The following Grafana Play dashboards contain fairly simple chained variables, only two layers deep. To view the variables and their settings, click **Dashboard settings** (gear icon) and then click **Variables**. Both examples are expanded in the following section.
|
||||
|
||||
- [Graphite Templated Nested](https://play.grafana.org/d/000000056/graphite-templated-nested?orgId=1&var-app=country&var-server=All&var-interval=1h)
|
||||
- [InfluxDB Templated](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1)
|
||||
|
||||
### Examples explained
|
||||
|
||||
Variables are useful to reuse dashboards and dynamically change what is shown in dashboards. Chained variables are especially useful to filter what you see.
|
||||
|
||||
Create parent/child relationship in a variable, sort of a tree structure where you can select different levels of filters.
|
||||
|
||||
The following sections explain the linked examples in the dashboards above in depth and builds on them. While the examples are data source-specific, the concepts can be applied broadly.
|
||||
|
||||
#### Graphite example
|
||||
|
||||
In this example, there are several applications. Each application has a different subset of servers. It is based on the [Graphite Templated Nested](https://play.grafana.org/d/000000056/graphite-templated-nested?orgId=1&var-app=country&var-server=All&var-interval=1h).
|
||||
|
||||
Now, you could make separate variables for each metric source, but then you have to know which server goes with which app. A better solution is to use one variable to filter another. In this example, when the user changes the value of the `app` variable, it changes the dropdown options returned by the `server` variable. Both variables use the **Multi-value** option and **Include all option**, enabling users to select some or all options presented at any time.
|
||||
|
||||
##### app variable
|
||||
|
||||
The query for this variable basically says, "Give me all the applications that exist."
|
||||
|
||||
```
|
||||
apps.*
|
||||
```
|
||||
|
||||
The values returned are `backend`, `country`, `fakesite`, and `All`.
|
||||
|
||||
##### server variable
|
||||
|
||||
The query for this variable basically says, "Give me all servers for the currently chosen application."
|
||||
|
||||
```
|
||||
apps.$app.*
|
||||
```
|
||||
|
||||
If the user selects `backend`, then the query changes to:
|
||||
|
||||
```
|
||||
apps.backend.*
|
||||
```
|
||||
|
||||
The query returns all servers associated with `backend`, including `backend_01`, `backend_02`, and so on.
|
||||
|
||||
If the user selects `fakesite`, then the query changes to:
|
||||
|
||||
```
|
||||
apps.fakesite.*
|
||||
```
|
||||
|
||||
The query returns all servers associated with `fakesite`, including `web_server_01`, `web_server_02`, and so on.
|
||||
|
||||
##### More variables
|
||||
|
||||
> **Note:** This example is theoretical. The Graphite server used in the example does not contain CPU metrics.
|
||||
|
||||
The dashboard stops at two levels, but you could keep going. For example, if you wanted to get CPU metrics for selected servers, you could copy the `server` variable and extend the query so that it reads:
|
||||
|
||||
```
|
||||
apps.$app.$server.cpu.*
|
||||
```
|
||||
|
||||
This query basically says, "Show me the CPU metrics for the selected server."
|
||||
|
||||
Depending on what variable options the user selects, you could get queries like:
|
||||
|
||||
```
|
||||
apps.backend.backend_01.cpu.*
|
||||
apps.{backend.backend_02,backend_03}.cpu.*
|
||||
apps.fakesite.web_server_01.cpu.*
|
||||
```
|
||||
|
||||
#### InfluxDB example
|
||||
|
||||
In this example, you have several data centers. Each data center has a different subset of hosts. It is based on the [InfluxDB Templated](https://play.grafana.org/d/000000002/influxdb-templated?orgId=1).
|
||||
|
||||
In this example, when the user changes the value of the `datacenter` variable, it changes the dropdown options returned by the `host` variable. The `host` variable uses the **Multi-value** option and **Include all option**, allowing users to select some or all options presented at any time. The `datacenter` does not use either option, so you can only select one data center at a time.
|
||||
|
||||
##### datacenter variable
|
||||
|
||||
The query for this variable basically says, "Give me all the data centers that exist."
|
||||
|
||||
```
|
||||
SHOW TAG VALUES WITH KEY = "datacenter"
|
||||
```
|
||||
|
||||
The values returned are `America`, `Africa`, `Asia`, and `Europe`.
|
||||
|
||||
##### host variable
|
||||
|
||||
The query for this variable basically says, "Give me all hosts for the currently chosen data center."
|
||||
|
||||
```
|
||||
SHOW TAG VALUES WITH KEY = "hostname" WHERE "datacenter" =~ /^$datacenter$/
|
||||
```
|
||||
|
||||
If the user selects `America`, then the query changes to:
|
||||
|
||||
```
|
||||
SHOW TAG VALUES WITH KEY = "hostname" WHERE "datacenter" =~ /^America/
|
||||
```
|
||||
|
||||
The query returns all servers associated with `America`, including `server1`, `server2`, and so on.
|
||||
|
||||
If the user selects `Europe`, then the query changes to:
|
||||
|
||||
```
|
||||
SHOW TAG VALUES WITH KEY = "hostname" WHERE "datacenter" =~ /^Europe/
|
||||
```
|
||||
|
||||
The query returns all servers associated with `Europe`, including `server3`, `server4`, and so on.
|
||||
|
||||
##### More variables
|
||||
|
||||
> **Note:** This example is theoretical. The InfluxDB server used in the example does not contain CPU metrics.
|
||||
|
||||
The dashboard stops at two levels, but you could keep going. For example, if you wanted to get CPU metrics for selected hosts, you could copy the `host` variable and extend the query so that it reads:
|
||||
|
||||
```
|
||||
SHOW TAG VALUES WITH KEY = "cpu" WHERE "datacenter" =~ /^$datacenter$/ AND "host" =~ /^$host$/
|
||||
```
|
||||
|
||||
This query basically says, "Show me the CPU metrics for the selected host."
|
||||
|
||||
Depending on what variable options the user selects, you could get queries like:
|
||||
|
||||
```bash
|
||||
SHOW TAG VALUES WITH KEY = "cpu" WHERE "datacenter" =~ /^America/ AND "host" =~ /^server2/
|
||||
SHOW TAG VALUES WITH KEY = "cpu" WHERE "datacenter" =~ /^Africa/ AND "host" =~ /^server/7/
|
||||
SHOW TAG VALUES WITH KEY = "cpu" WHERE "datacenter" =~ /^Europe/ AND "host" =~ /^server3+server4/
|
||||
```
|
||||
|
||||
### Best practices and tips
|
||||
|
||||
The following practices will make your dashboards and variables easier to use.
|
||||
|
||||
#### Creating new linked variables
|
||||
|
||||
- Chaining variables create parent/child dependencies. You can envision them as a ladder or a tree.
|
||||
- The easiest way to create a new chained variable is to copy the variable that you want to base the new one on. In the variable list, click the **Duplicate variable** icon to the right of the variable entry to create a copy. You can then add on to the query for the parent variable.
|
||||
- New variables created this way appear at the bottom of the list. You might need to drag it to a different position in the list to get it into a logical order.
|
||||
|
||||
#### Variable order
|
||||
|
||||
You can change the orders of variables in the dashboard variable list by clicking the up and down arrows on the right side of each entry. Grafana lists variable dropdowns left to right according to this list, with the variable at the top on the far left.
|
||||
|
||||
- List variables that do not have dependencies at the top, before their child variables.
|
||||
- Each variable should follow the one it is dependent on.
|
||||
- Remember there is no indication in the UI of which variables have dependency relationships. List the variables in a logical order to make it easy on other users (and yourself).
|
||||
|
||||
#### Complexity consideration
|
||||
|
||||
The more layers of dependency you have in variables, the longer it will take to update dashboards after you change variables.
|
||||
|
||||
For example, if you have a series of four linked variables (country, region, server, metric) and you change a root variable value (country), then Grafana must run queries for all the dependent variables before it updates the visualizations in the dashboard.
|
||||
|
||||
## Manage variables
|
||||
|
||||
The variables page lets you [add]({{< relref "./add-template-variables/" >}}) variables and manage existing variables. It also allows you to [inspect]({{< relref "inspect-variable/" >}}) variables and identify whether a variable is being referenced (or used) in other variables or dashboard.
|
||||
|
||||
**Move:** You can move a variable up or down the list using drag and drop.
|
||||
|
||||
**Clone:** To clone a variable, click the clone icon from the set of icons on the right. This creates a copy of the variable with the name of the original variable prefixed with `copy_of_`.
|
||||
|
||||
**Delete:** To delete a variable, click the trash icon from the set of icons on the right.
|
||||
|
||||
## Filter variables with regex
|
||||
|
||||
Using the Regex Query option, you filter the list of options returned by the variable query or modify the options returned.
|
||||
|
||||
This page shows how to use regex to filter/modify values in the variable dropdown.
|
||||
|
||||
Using the Regex Query Option, you filter the list of options returned by the Variable query or modify the options returned. For more information, refer to the Mozilla guide on [Regular expressions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions).
|
||||
|
||||
Examples of filtering on the following list of options:
|
||||
|
||||
```text
|
||||
backend_01
|
||||
backend_02
|
||||
backend_03
|
||||
backend_04
|
||||
```
|
||||
|
||||
### Filter so that only the options that end with `01` or `02` are returned:
|
||||
|
||||
Regex:
|
||||
|
||||
```regex
|
||||
/(01|02)$/
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```text
|
||||
backend_01
|
||||
backend_02
|
||||
```
|
||||
|
||||
### Filter and modify the options using a regex capture group to return part of the text:
|
||||
|
||||
Regex:
|
||||
|
||||
```regex
|
||||
/.*(01|02)/
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```text
|
||||
01
|
||||
02
|
||||
```
|
||||
|
||||
### Filter and modify - Prometheus Example
|
||||
|
||||
List of options:
|
||||
|
||||
```text
|
||||
up{instance="demo.robustperception.io:9090",job="prometheus"} 1 1521630638000
|
||||
up{instance="demo.robustperception.io:9093",job="alertmanager"} 1 1521630638000
|
||||
up{instance="demo.robustperception.io:9100",job="node"} 1 1521630638000
|
||||
```
|
||||
|
||||
Regex:
|
||||
|
||||
```regex
|
||||
/.*instance="([^"]*).*/
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
```text
|
||||
demo.robustperception.io:9090
|
||||
demo.robustperception.io:9093
|
||||
demo.robustperception.io:9100
|
||||
```
|
||||
|
||||
### Filter and modify using named text and value capture groups
|
||||
|
||||
> **Note:** This feature is available in Grafana 7.4+.
|
||||
|
||||
Using named capture groups, you can capture separate 'text' and 'value' parts from the options returned by the variable query. This allows the variable drop-down list to contain a friendly name for each value that can be selected.
|
||||
|
||||
For example, when querying the `node_hwmon_chip_names` Prometheus metric, the `chip_name` is a lot friendlier that the `chip` value. So the following variable query result:
|
||||
|
||||
```text
|
||||
node_hwmon_chip_names{chip="0000:d7:00_0_0000:d8:00_0",chip_name="enp216s0f0np0"} 1
|
||||
node_hwmon_chip_names{chip="0000:d7:00_0_0000:d8:00_1",chip_name="enp216s0f0np1"} 1
|
||||
node_hwmon_chip_names{chip="0000:d7:00_0_0000:d8:00_2",chip_name="enp216s0f0np2"} 1
|
||||
node_hwmon_chip_names{chip="0000:d7:00_0_0000:d8:00_3",chip_name="enp216s0f0np3"} 1
|
||||
```
|
||||
|
||||
Passed through the following Regex:
|
||||
|
||||
```regex
|
||||
/chip_name="(?<text>[^"]+)|chip="(?<value>[^"]+)/g
|
||||
```
|
||||
|
||||
Would produce the following drop-down list:
|
||||
|
||||
```text
|
||||
Display Name Value
|
||||
------------ -------------------------
|
||||
enp216s0f0np0 0000:d7:00_0_0000:d8:00_0
|
||||
enp216s0f0np1 0000:d7:00_0_0000:d8:00_1
|
||||
enp216s0f0np2 0000:d7:00_0_0000:d8:00_2
|
||||
enp216s0f0np3 0000:d7:00_0_0000:d8:00_3
|
||||
```
|
||||
|
||||
**Note:** Only `text` and `value` capture group names are supported.
|
||||
@@ -10,12 +10,12 @@ keywords:
|
||||
- template
|
||||
- variable
|
||||
title: Inspect variables
|
||||
weight: 125
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Inspect variables and their dependencies
|
||||
# Inspect variables
|
||||
|
||||
The variables page lets you easily identify whether a variable is being referenced (or used) in other variables or dashboard. In addition, you can also [add]({{< relref "variable-types/" >}}) variables and [manage]({{< relref "manage-variable/" >}}) existing variables from this page.
|
||||
The variables page lets you easily identify whether a variable is being referenced (or used) in other variables or dashboard. In addition, you can also [add]({{< relref "./add-template-variables/" >}}) and [manage](../manage-variable/) variables from this page.
|
||||
|
||||
> **Note:** This feature is available in Grafana 7.4 and later versions.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/variables/advanced-variable-format-options/
|
||||
- /docs/grafana/latest/reference/templating/
|
||||
- /docs/grafana/latest/variables/syntax/
|
||||
keywords:
|
||||
- grafana
|
||||
- templating
|
||||
@@ -8,17 +10,35 @@ keywords:
|
||||
- guide
|
||||
- template
|
||||
- variable
|
||||
title: Advanced variable format options
|
||||
weight: 600
|
||||
title: Variable syntax
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# Advanced variable format options
|
||||
# Variable syntax
|
||||
|
||||
Panel titles and metric queries can refer to variables using two different syntaxes:
|
||||
|
||||
- `$varname`
|
||||
This syntax is easy to read, but it does not allow you to use a variable in the middle of a word.
|
||||
**Example:** apps.frontend.$server.requests.count
|
||||
- `${var_name}` Use this syntax when you want to interpolate a variable in the middle of an expression.
|
||||
- `${var_name:<format>}` This format gives you more control over how Grafana interpolates values. Refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options/" >}}) for more detail on all the formatting types.
|
||||
- `[[varname]]` Do not use. Deprecated old syntax, will be removed in a future release.
|
||||
|
||||
Before queries are sent to your data source the query is _interpolated_, meaning the variable is replaced with its current value. During
|
||||
interpolation, the variable value might be _escaped_ in order to conform to the syntax of the query language and where it is used.
|
||||
For example, a variable used in a regex expression in an InfluxDB or Prometheus query will be regex escaped. Read the data source specific
|
||||
documentation topic for details on value escaping during interpolation.
|
||||
|
||||
For advanced syntax to override data source default formatting, refer to [Advanced variable format options]({{< relref "#advanced-variable-format-options/" >}}).
|
||||
|
||||
## Advanced variable format options
|
||||
|
||||
The formatting of the variable interpolation depends on the data source, but there are some situations where you might want to change the default formatting.
|
||||
|
||||
For example, the default for the MySql data source is to join multiple values as comma-separated with quotes: `'server01','server02'`. In some cases, you might want to have a comma-separated string without quotes: `server01,server02`. You can make that happen with advanced variable formatting options listed below.
|
||||
|
||||
## General syntax
|
||||
### General syntax
|
||||
|
||||
Syntax: `${var_name:option}`
|
||||
|
||||
@@ -28,7 +48,7 @@ If any invalid formatting option is specified, then `glob` is the default/fallba
|
||||
|
||||
An alternative syntax (that might be deprecated in the future) is `[[var_name:option]]`.
|
||||
|
||||
## CSV
|
||||
### CSV
|
||||
|
||||
Formats variables with multiple values as a comma-separated string.
|
||||
|
||||
@@ -38,7 +58,7 @@ String to interpolate: '${servers:csv}'
|
||||
Interpolation result: 'test1,test2'
|
||||
```
|
||||
|
||||
## Distributed - OpenTSDB
|
||||
### Distributed - OpenTSDB
|
||||
|
||||
Formats variables with multiple values in custom format for OpenTSDB.
|
||||
|
||||
@@ -48,7 +68,7 @@ String to interpolate: '${servers:distributed}'
|
||||
Interpolation result: 'test1,servers=test2'
|
||||
```
|
||||
|
||||
## Doublequote
|
||||
### Doublequote
|
||||
|
||||
Formats single- and multi-valued variables into a comma-separated string, escapes `"` in each value by `\"` and quotes each value with `"`.
|
||||
|
||||
@@ -58,7 +78,7 @@ String to interpolate: '${servers:doublequote}'
|
||||
Interpolation result: '"test1","test2"'
|
||||
```
|
||||
|
||||
## Glob - Graphite
|
||||
### Glob - Graphite
|
||||
|
||||
Formats variables with multiple values into a glob (for Graphite queries).
|
||||
|
||||
@@ -68,7 +88,7 @@ String to interpolate: '${servers:glob}'
|
||||
Interpolation result: '{test1,test2}'
|
||||
```
|
||||
|
||||
## JSON
|
||||
### JSON
|
||||
|
||||
Formats variables with multiple values as a comma-separated string.
|
||||
|
||||
@@ -78,7 +98,7 @@ String to interpolate: '${servers:json}'
|
||||
Interpolation result: '["test1", "test2"]'
|
||||
```
|
||||
|
||||
## Lucene - Elasticsearch
|
||||
### Lucene - Elasticsearch
|
||||
|
||||
Formats variables with multiple values in Lucene format for Elasticsearch.
|
||||
|
||||
@@ -88,7 +108,7 @@ String to interpolate: '${servers:lucene}'
|
||||
Interpolation result: '("test1" OR "test2")'
|
||||
```
|
||||
|
||||
## Percentencode
|
||||
### Percentencode
|
||||
|
||||
Formats single and multi valued variables for use in URL parameters.
|
||||
|
||||
@@ -98,7 +118,7 @@ String to interpolate: '${servers:percentencode}'
|
||||
Interpolation result: 'foo%28%29bar%20BAZ%2Ctest2'
|
||||
```
|
||||
|
||||
## Pipe
|
||||
### Pipe
|
||||
|
||||
Formats variables with multiple values into a pipe-separated string.
|
||||
|
||||
@@ -108,7 +128,7 @@ String to interpolate: '${servers:pipe}'
|
||||
Interpolation result: 'test1.|test2'
|
||||
```
|
||||
|
||||
## Raw
|
||||
### Raw
|
||||
|
||||
Turns off data source-specific formatting, such as single quotes in an SQL query.
|
||||
|
||||
@@ -118,7 +138,7 @@ String to interpolate: '${var_name:raw}'
|
||||
Interpolation result: 'test.1,test2'
|
||||
```
|
||||
|
||||
## Regex
|
||||
### Regex
|
||||
|
||||
Formats variables with multiple values into a regex string.
|
||||
|
||||
@@ -128,7 +148,7 @@ String to interpolate: '${servers:regex}'
|
||||
Interpolation result: '(test1\.|test2)'
|
||||
```
|
||||
|
||||
## Singlequote
|
||||
### Singlequote
|
||||
|
||||
Formats single- and multi-valued variables into a comma-separated string, escapes `'` in each value by `\'` and quotes each value with `'`.
|
||||
|
||||
@@ -138,7 +158,7 @@ String to interpolate: '${servers:singlequote}'
|
||||
Interpolation result: "'test1','test2'"
|
||||
```
|
||||
|
||||
## Sqlstring
|
||||
### Sqlstring
|
||||
|
||||
Formats single- and multi-valued variables into a comma-separated string, escapes `'` in each value by `''` and quotes each value with `'`.
|
||||
|
||||
@@ -148,7 +168,7 @@ String to interpolate: '${servers:sqlstring}'
|
||||
Interpolation result: "'test''1','test2'"
|
||||
```
|
||||
|
||||
## Text
|
||||
### Text
|
||||
|
||||
Formats single- and multi-valued variables into their text representation. For a single variable it will just return the text representation. For multi-valued variables it will return the text representation combined with `+`.
|
||||
|
||||
@@ -158,7 +178,7 @@ String to interpolate: '${servers:text}'
|
||||
Interpolation result: "test1 + test2"
|
||||
```
|
||||
|
||||
## Query parameters
|
||||
### Query parameters
|
||||
|
||||
Formats single- and multi-valued variables into their query parameter representation. Example: `var-foo=value1&var-foo=value2`
|
||||
|
||||
@@ -16,7 +16,9 @@ Each data source has a specific Query Editor that is customized for the features
|
||||
|
||||
## Supported data sources
|
||||
|
||||
The following data sources are officially supported:
|
||||
> **Note:** For a list of all data source plugins created by Grafana Labs, view the [plugin catalog](https://grafana.com/grafana/plugins/?type=datasource) and select the "Data sources" and "Grafana Labs created" filters. For a list of all Enterprise-level plugins, which have additional support, also enable the [Enterprise filter](https://grafana.com/grafana/plugins/?enterprise=1&type=datasource).
|
||||
|
||||
These data sources have additional documentation:
|
||||
|
||||
- [Alertmanager]({{< relref "./alertmanager/" >}})
|
||||
- [AWS CloudWatch]({{< relref "./aws-cloudwatch/" >}})
|
||||
@@ -36,7 +38,7 @@ The following data sources are officially supported:
|
||||
- [Tempo]({{< relref "./tempo/" >}})
|
||||
- [Testdata]({{< relref "./testdata/" >}})
|
||||
|
||||
In addition to the data sources that you have configured in your Grafana, there are three special data sources available:
|
||||
In addition to the data sources that you have configured in your Grafana instance, there are three special data sources available:
|
||||
|
||||
- **Grafana -** A built-in data source that generates random walk data. Useful for testing visualizations and running experiments.
|
||||
- **Mixed -** Select this to query multiple data sources in the same panel. When this data source is selected, Grafana allows you to select a data source for every new query that you add.
|
||||
@@ -47,4 +49,4 @@ In addition to the data sources that you have configured in your Grafana, there
|
||||
|
||||
## Data source plugins
|
||||
|
||||
Since Grafana 3.0 you can install data sources as plugins. Check out [Grafana.com/plugins](https://grafana.com/plugins) for more data sources.
|
||||
You can install additional data sources as plugins. To view available data source plugins, see the [Grafana Plugins catalog](https://grafana.com/plugins). To build your own, see the ["Build a data source plugin"](https://grafana.com/tutorials/build-a-data-source-plugin/) tutorial and our documentation about [building a plugin](/developers/plugins/).
|
||||
|
||||
@@ -11,7 +11,7 @@ weight: 10
|
||||
|
||||
Instead of hard-coding server, application, and sensor names in your metric queries, you can use variables. The variables are listed as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the display of data in your dashboard.
|
||||
|
||||
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../variables/" >}}) documentation.
|
||||
For an introduction to templating and template variables, refer to the [Templating]({{< relref "../../dashboards/variables" >}}) documentation.
|
||||
|
||||
## Query variable
|
||||
|
||||
@@ -36,7 +36,7 @@ For details about the metrics CloudWatch provides, please refer to the [CloudWat
|
||||
|
||||
### Using variables in queries
|
||||
|
||||
Variables can be used in the variable form. Refer to the [variable syntax documentation]({{< relref "../../variables/syntax/" >}}).
|
||||
Variables can be used in the variable form. Refer to the [variable syntax documentation]({{< relref "../../dashboards/variables/variable-syntax" >}}).
|
||||
|
||||
## ec2_instance_attribute examples
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ This topic explains configuring, querying, and other options specific to the Azu
|
||||
|
||||
To access Azure Monitor configuration, hover your mouse over the **Configuration** (gear) icon, click **Data Sources**, and then select the Azure Monitor data source. If you haven't already, you'll need to [add the Azure Monitor data source]({{< relref "../add-a-data-source/" >}}).
|
||||
|
||||
You must create an app registration and service principal in Azure AD to authenticate the data source. See the [Azure documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal#get-tenant-and-app-id-values-for-signing-in) for configuration details. Alternatively, if you are hosting Grafana in Azure (e.g. App Service, or Azure Virtual Machines) you can configure the Azure Monitor data source to use Managed Identity to securely authenticate without entering credentials into Grafana. Refer to [Configuring using Managed Identity](#configuring-using-managed-identity) for more details.
|
||||
You must create an app registration and service principal in Azure AD to authenticate the data source. For more information, refer to [Azure documentation](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal#get-tenant-and-app-id-values-for-signing-in) for configuration details. The app registration you create will need to have the `Reader` role assigned on the subscription. For more information, refer to [Azure docs for role assignments](https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal?tabs=current).
|
||||
|
||||
Alternatively, if you host Grafana in Azure (such as in App Service or Azure Virtual Machines), you can configure the Azure Monitor data source to use Managed Identity to securely authenticate without entering credentials into Grafana. Refer to [Configuring using Managed Identity](#configuring-using-managed-identity) for details.
|
||||
|
||||
| Name | Description |
|
||||
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|
||||
@@ -20,7 +20,7 @@ weight: 2
|
||||
|
||||
Instead of hard-coding values for fields like resource group or resource name in your queries, you can use variables in their place to create more interactive, dynamic, and reusable dashboards.
|
||||
|
||||
Check out the [Templating]({{< relref "../../variables/" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../../dashboards/variables" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
The Azure Monitor data source provides the following queries you can specify in the Query field in the Variable edit view
|
||||
|
||||
@@ -128,7 +128,7 @@ Instead of hard-coding things like server, application and sensor name in your m
|
||||
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
Check out the [Templating]({{< relref "../variables/" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../dashboards/variables/" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
### Query variable
|
||||
@@ -180,7 +180,7 @@ Example dashboard:
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view. Grafana can query any Elasticsearch index
|
||||
for annotation events.
|
||||
|
||||
|
||||
@@ -129,7 +129,7 @@ The option is called `cloud monitoring auto` and the defaults are:
|
||||
- 5m for time ranges >= 23 hours and < 6 days
|
||||
- 1h for time ranges >= 6 days
|
||||
|
||||
The other automatic option is `grafana auto`. This will automatically set the group by time depending on the time range chosen and the width of the time series panel. For more information about grafana auto, refer to the [interval variable]({{< relref "../../variables/variable-types/add-interval-variable/" >}}).
|
||||
The other automatic option is `grafana auto`. This will automatically set the group by time depending on the time range chosen and the width of the time series panel. For more information about grafana auto, refer to the [interval variable]({{< relref "../../dashboards/variables/add-template-variables/#add-an-interval-variable" >}}).
|
||||
|
||||
You can also choose fixed time intervals to group by, like `1h` or `1d`.
|
||||
|
||||
@@ -252,7 +252,7 @@ Instead of hard-coding things like server, application and sensor name in your m
|
||||
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
Check out the [Templating]({{< relref "../../variables/" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../../dashboards/variables/" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
### Query Variable
|
||||
@@ -274,13 +274,13 @@ Variable of the type _Query_ allows you to query Google Cloud Monitoring for var
|
||||
|
||||
### Using variables in queries
|
||||
|
||||
Refer to the [variable syntax documentation]({{< relref "../../variables/syntax/" >}}).
|
||||
Refer to the [variable syntax documentation]({{< relref "../../dashboards/variables/variable-syntax" >}}).
|
||||
|
||||
## Annotations
|
||||
|
||||
{{< figure src="/static/img/docs/google-cloud-monitoring/annotations-8-0.png" max-width= "400px" class="docs-image--right" >}}
|
||||
|
||||
[Annotations]({{< relref "../../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view. Annotation rendering is expensive so it is important to limit the number of rows returned. There is no support for showing Google Cloud Monitoring annotations and events yet but it works well with [custom metrics](https://cloud.google.com/monitoring/custom-metrics/) in Google Cloud Monitoring.
|
||||
|
||||
With the query editor for annotations, you can select a metric and filters. The `Title` and `Text` fields support templating and can use data returned from the query. For example, the Title field could have the following text:
|
||||
|
||||
@@ -117,7 +117,7 @@ Instead of hard-coding things like server, application, and sensor name in your
|
||||
Variables are shown as drop-down select boxes at the top of the dashboard. These dropdowns make it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
For more information, refer to [Variables and templates]({{< relref "../variables/" >}}).
|
||||
For more information, refer to [Variables and templates]({{< relref "../dashboards/variables/" >}}).
|
||||
|
||||
Graphite 1.1 introduced tags and Grafana added support for Graphite queries with tags in version 5.0. To create a variable using tag values, use the Grafana functions `tags` and `tag_values`.
|
||||
|
||||
@@ -212,11 +212,11 @@ Example of a tag expression with regex formatting and using the Equal Tilde oper
|
||||
server=~${servers:regex}
|
||||
```
|
||||
|
||||
For more information, refer to [Advanced variable format options]({{< relref "../variables/advanced-variable-format-options/" >}}).
|
||||
For more information, refer to [Advanced variable format options]({{< relref "../dashboards/variables/variable-syntax/#advanced-variable-format-options" >}}).
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view.
|
||||
|
||||
Graphite supports two ways to query annotations. A regular metric query, for this you use the `Graphite query` textbox. A Graphite events query, use the `Graphite event tags` textbox,
|
||||
|
||||
@@ -146,7 +146,7 @@ To add a filter, click the plus icon to the right of the `Measurements/Fields` b
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../../dashboards/annotations/" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
|
||||
[Annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
|
||||
|
||||
An example query:
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ weight: 300
|
||||
|
||||
Instead of hard-coding things like server, application and sensor name in your metric queries you can use variables in their place.
|
||||
|
||||
For more information, refer to [Templates and variables]({{< relref "../../variables/" >}}).
|
||||
For more information, refer to [Templates and variables]({{< relref "../../dashboards/variables/" >}}).
|
||||
|
||||
## Using variables in InfluxDB queries
|
||||
|
||||
@@ -35,7 +35,7 @@ Example dashboard:
|
||||
|
||||
## Query variables
|
||||
|
||||
If you add a query template variable, then you can write an InfluxDB exploration (metadata) query. These queries can return things like measurement names, key names or key values. For more information, refer to [Add query variable]({{< relref "../../variables/variable-types/add-query-variable/" >}}).
|
||||
If you add a query template variable, then you can write an InfluxDB exploration (metadata) query. These queries can return things like measurement names, key names or key values. For more information, refer to [Add query variable]({{< relref "../../dashboards/variables/add-template-variables/#add-a-query-variable" >}}).
|
||||
|
||||
For example, you can have a variable that contains all values for tag `hostname` if you specify a query like this in the query variable **Query**.
|
||||
|
||||
@@ -45,7 +45,7 @@ SHOW TAG VALUES WITH KEY = "hostname"
|
||||
|
||||
## Chained or nested variables
|
||||
|
||||
You can also create nested variables, sometimes called [chained variables]({{< relref "../../variables/variable-types/chained-variables/" >}}).
|
||||
You can also create nested variables, sometimes called [chained variables]({{< relref "../../dashboards/variables/add-template-variables/#chained-variables" >}}).
|
||||
|
||||
For example, if you had another variable, for example `region`. Then you could have the hosts variable only show hosts from the current selected region with a query like this:
|
||||
|
||||
@@ -65,4 +65,4 @@ If you have a variable with key names you can use this variable in a group by cl
|
||||
|
||||
InfluxDB supports the special `Ad hoc filters` variable type. This variable allows you to specify any number of key/value filters on the fly. These filters are automatically applied to all your InfluxDB queries.
|
||||
|
||||
For more information, refer to [Add ad hoc filters]({{< relref "../../variables/variable-types/add-ad-hoc-filters/" >}}).
|
||||
For more information, refer to [Add ad hoc filters]({{< relref "../../dashboards/variables/add-template-variables/#add-ad-hoc-filters" >}}).
|
||||
|
||||
@@ -208,7 +208,7 @@ LogQL supports wrapping a log query with functions that allow for creating metri
|
||||
|
||||
Instead of hard-coding things like server, application and sensor name in your metric queries, you can use variables in their place. Variables are shown as drop-down select boxes at the top of the dashboard. These drop-down boxes make it easy to change the data being displayed in your dashboard.
|
||||
|
||||
Check out the [Templating]({{< relref "../variables/" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
Check out the [Templating]({{< relref "../dashboards/variables" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
|
||||
## Query variable
|
||||
|
||||
@@ -227,11 +227,11 @@ Loki supports the special ad hoc filters variable type. It allows you to specify
|
||||
|
||||
### Using interval and range variables
|
||||
|
||||
You can use some global built-in variables in query variables; `$__interval`, `$__interval_ms`, `$__range`, `$__range_s` and `$__range_ms`. For more information, refer to [Global built-in variables]({{< relref "../variables/variable-types/global-variables/" >}}).
|
||||
You can use some global built-in variables in query variables; `$__interval`, `$__interval_ms`, `$__range`, `$__range_s` and `$__range_ms`. For more information, refer to [Global built-in variables]({{< relref "../dashboards/variables/add-template-variables/#global-variables/" >}}).
|
||||
|
||||
## Annotations
|
||||
|
||||
You can use any non-metric Loki query as a source for [annotations]({{< relref "../dashboards/annotations/" >}}). Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
|
||||
You can use any non-metric Loki query as a source for [annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}). Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ To access data source settings, hover your mouse over the **Configuration** (gea
|
||||
|
||||
### Min time interval
|
||||
|
||||
A lower limit for the [$__interval]({{< relref "../variables/variable-types/global-variables/#__interval" >}}) and [$__interval_ms]({{< relref "../variables/variable-types/global-variables/#__interval_ms" >}}) variables.
|
||||
A lower limit for the [$__interval]({{< relref "../dashboards/variables/add-template-variables/#__interval" >}}) and [$__interval_ms]({{< relref "../dashboards/variables/add-template-variables/#__interval_ms" >}}) variables.
|
||||
Recommended to be set to write frequency, for example `1m` if your data is written every minute.
|
||||
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
|
||||
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
|
||||
@@ -271,7 +271,7 @@ Data frame result:
|
||||
|
||||
Instead of hard-coding things like server, application and sensor name in your metric queries you can use variables in their place. Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the data being displayed in your dashboard.
|
||||
|
||||
Check out the [Templating]({{< relref "../variables/" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
Check out the [Templating]({{< relref "../dashboards/variables" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
|
||||
### Query variable
|
||||
|
||||
@@ -341,11 +341,11 @@ Grafana automatically creates a quoted, comma-separated string for multi-value v
|
||||
|
||||
`${servers:csv}`
|
||||
|
||||
Read more about variable formatting options in the [Variables]({{< relref "../variables/variable-types/#advanced-formatting-options" >}}) documentation.
|
||||
Read more about variable formatting options in the [Variables]({{< relref "../dashboards/variables/variable-syntax/#advanced-variable-format-options" >}}) documentation.
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Columns:**
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ Grafana ships with a built-in MySQL data source plugin that allows you to query
|
||||
|
||||
### Min time interval
|
||||
|
||||
A lower limit for the [$__interval]({{< relref "../variables/variable-types/global-variables/#__interval" >}}) and [$__interval_ms]({{< relref "../variables/variable-types/global-variables/#__interval_ms" >}}) variables.
|
||||
A lower limit for the [$__interval]({{< relref "../dashboards/variables/add-template-variables/#__interval" >}}) and [$__interval_ms]({{< relref "../dashboards/variables/add-template-variables/#__interval_ms" >}}) variables.
|
||||
Recommended to be set to write frequency, for example `1m` if your data is written every minute.
|
||||
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
|
||||
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
|
||||
@@ -283,7 +283,7 @@ This feature is currently available in the nightly builds and will be included i
|
||||
|
||||
Instead of hard-coding things like server, application and sensor name in your metric queries you can use variables in their place. Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the data being displayed in your dashboard.
|
||||
|
||||
Check out the [Templating]({{< relref "../variables/" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
Check out the [Templating]({{< relref "../dashboards/variables/" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
|
||||
### Query Variable
|
||||
|
||||
@@ -378,11 +378,11 @@ Grafana automatically creates a quoted, comma-separated string for multi-value v
|
||||
|
||||
`${servers:csv}`
|
||||
|
||||
Read more about variable formatting options in the [Variables]({{< relref "../variables/#advanced-formatting-options" >}}) documentation.
|
||||
Read more about variable formatting options in the [Variables]({{< relref "../dashboards/variables/variable-syntax/#advanced-variable-format-options" >}}) documentation.
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Example query using time column with epoch values:**
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ Instead of hard-coding things like server, application and sensor name in your m
|
||||
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
Check out the [Templating]({{< relref "../variables/" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../dashboards/variables/" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
### Query variable
|
||||
|
||||
@@ -19,26 +19,26 @@ Grafana ships with a built-in PostgreSQL data source plugin that allows you to q
|
||||
|
||||
To access PostgreSQL settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the PostgreSQL data source.
|
||||
|
||||
| Name | Description |
|
||||
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
||||
| `Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and it may cause errors. |
|
||||
| `Database` | Name of your PostgreSQL database. |
|
||||
| `User` | Database user's login/username |
|
||||
| `Password` | Database user's password |
|
||||
| `SSL Mode` | Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. When SSL Mode is disabled, SSL Method and Auth Details would not be visible. |
|
||||
| `SSL Auth Details Method` | Determines whether the SSL Auth details will be configured as a file path or file content. Grafana v7.5+ |
|
||||
| `SSL Auth Details Value` | File path or file content of SSL root certificate, client certificate and client key |
|
||||
| `Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). |
|
||||
| `Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). |
|
||||
| `Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). |
|
||||
| `Version` | Determines which functions are available in the query builder (only available in Grafana 5.3+). |
|
||||
| `TimescaleDB` | A time-series database built as a PostgreSQL extension. When enabled, Grafana uses `time_bucket` in the `$__timeGroup` macro to display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). |
|
||||
| Name | Description |
|
||||
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
||||
| `Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and it may cause errors. |
|
||||
| `Database` | Name of your PostgreSQL database. |
|
||||
| `User` | Database user's login/username |
|
||||
| `Password` | Database user's password |
|
||||
| `SSL Mode` | Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. When SSL Mode is disabled, SSL Method and Auth Details would not be visible. |
|
||||
| `SSL Auth Details Method` | Determines whether the SSL Auth details will be configured as a file path or file content. Grafana v7.5+ |
|
||||
| `SSL Auth Details Value` | File path or file content of SSL root certificate, client certificate and client key |
|
||||
| `Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). |
|
||||
| `Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). |
|
||||
| `Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). |
|
||||
| `Version` | Determines which functions are available in the query builder (only available in Grafana 5.3+). |
|
||||
| `TimescaleDB` | A time-series database built as a PostgreSQL extension. When enabled, Grafana uses `time_bucket` in the `$__timeGroup` macro to display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). For more information, see [TimescaleDB documentation](https://docs.timescale.com/timescaledb/latest/tutorials/grafana/grafana-timescalecloud/#connect-timescaledb-and-grafana). |
|
||||
|
||||
### Min time interval
|
||||
|
||||
A lower limit for the [$__interval]({{< relref "../variables/variable-types/global-variables/#__interval" >}}) and [$__interval_ms]({{< relref "../variables/variable-types/global-variables/#__interval_ms" >}}) variables.
|
||||
A lower limit for the [$__interval]({{< relref "../dashboards/variables/add-template-variables/#__interval" >}}) and [$__interval_ms]({{< relref "../dashboards/variables/add-template-variables/#__interval_ms" >}}) variables.
|
||||
Recommended to be set to write frequency, for example `1m` if your data is written every minute.
|
||||
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
|
||||
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
|
||||
@@ -283,7 +283,7 @@ Data frame result:
|
||||
|
||||
Instead of hard-coding things like server, application and sensor name in your metric queries you can use variables in their place. Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the data being displayed in your dashboard.
|
||||
|
||||
Refer to [Templates and variables]({{< relref "../variables/" >}}) for an introduction to the templating feature and the different types of template variables.
|
||||
Refer to [Templates and variables]({{< relref "../dashboards/variables" >}}) for an introduction to the templating feature and the different types of template variables.
|
||||
|
||||
### Query variable
|
||||
|
||||
@@ -376,11 +376,11 @@ Grafana automatically creates a quoted, comma-separated string for multi-value v
|
||||
|
||||
`${servers:csv}`
|
||||
|
||||
Read more about variable formatting options in the [Variables]({{< relref "../variables/#advanced-formatting-options" >}}) documentation.
|
||||
Read more about variable formatting options in the [Variables]({{< relref "../dashboards/variables/variable-syntax/#advanced-variable-format-options" >}}) documentation.
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Example query using time column with epoch values:**
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ Instead of hard-coding things like server, application and sensor name in your m
|
||||
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns make it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
Check out the [Templating]({{< relref "../variables/" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../dashboards/variables" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
### Query variable
|
||||
@@ -189,7 +189,7 @@ For details of what _metric names_, _label names_ and _label values_ are please
|
||||
|
||||
> Support for `$__range`, `$__range_s` and `$__range_ms` only available from Grafana v5.3
|
||||
|
||||
You can use some global built-in variables in query variables, for example, `$__interval`, `$__interval_ms`, `$__range`, `$__range_s` and `$__range_ms`. See [Global built-in variables]({{< relref "../variables/variable-types/global-variables/" >}}) for more information. They are convenient to use in conjunction with the `query_result` function when you need to filter variable queries since the `label_values` function doesn't support queries.
|
||||
You can use some global built-in variables in query variables, for example, `$__interval`, `$__interval_ms`, `$__range`, `$__range_s` and `$__range_ms`. See [Global built-in variables]({{< relref "../dashboards/variables/add-template-variables/#global-variables" >}}) for more information. They are convenient to use in conjunction with the `query_result` function when you need to filter variable queries since the `label_values` function doesn't support queries.
|
||||
|
||||
Make sure to set the variable's `refresh` trigger to be `On Time Range Change` to get the correct instances when changing the time range on the dashboard.
|
||||
|
||||
@@ -234,12 +234,12 @@ options are enabled, Grafana converts the labels from plain text to a regex comp
|
||||
|
||||
### Ad hoc filters variable
|
||||
|
||||
Prometheus supports the special [ad hoc filters]({{< relref "../variables/variable-types/add-ad-hoc-filters/" >}}) variable type. It allows you to specify any number of label/value filters on the fly. These filters are automatically
|
||||
Prometheus supports the special [ad hoc filters]({{< relref "../dashboards/variables/add-template-variables/#add-ad-hoc-filters" >}}) variable type. It allows you to specify any number of label/value filters on the fly. These filters are automatically
|
||||
applied to all your Prometheus queries.
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view.
|
||||
|
||||
Prometheus supports two ways to query annotations.
|
||||
|
||||
@@ -15,7 +15,7 @@ weight: 1400
|
||||
|
||||
# Tempo data source
|
||||
|
||||
Grafana ships with built-in support for Tempo a high volume, minimal dependency trace storage, OSS tracing solution from Grafana Labs. Add it as a data source, and you are ready to query your traces in [Explore]({{< relref "../explore/" >}}).
|
||||
Grafana ships with built-in support for Tempo, a high volume, minimal dependency trace storage, OSS tracing solution from Grafana Labs. Add it as a data source, and you are ready to query your traces in [Explore]({{< relref "../explore" >}}).
|
||||
|
||||
## Add data source
|
||||
|
||||
@@ -80,7 +80,7 @@ This is a configuration for the beta Node Graph visualization. The Node Graph is
|
||||
|
||||
-- **Enable Node Graph -** Enables the Node Graph visualization.
|
||||
|
||||
### Loki Search
|
||||
### Loki search
|
||||
|
||||
This is a configuration for the Loki search query type.
|
||||
|
||||
@@ -102,7 +102,7 @@ You can query and display traces from Tempo via [Explore]({{< relref "../explore
|
||||
|
||||
### Tempo search
|
||||
|
||||
Tempo search is an experimental feature behind a feature toggle. Use this to search for traces by service name, span name, duration range, or process-level attributes that are included in your application’s instrumentation, such as HTTP status code and customer ID.
|
||||
Use this to search for traces by service name, span name, duration range, or process-level attributes that are included in your application’s instrumentation, such as HTTP status code and customer ID.
|
||||
|
||||
{{< figure src="/static/img/docs/explore/tempo-search.png" class="docs-image--no-shadow" max-width="750px" caption="Screenshot of the Tempo search feature with a trace rendered in the right panel" >}}
|
||||
|
||||
@@ -176,7 +176,7 @@ Here is an example JSON:
|
||||
}
|
||||
```
|
||||
|
||||
## Service Graph
|
||||
## Service graph
|
||||
|
||||
A service graph is a visual representation of the relationships between services. Each node on the graph represents a service such as an API or database. With this graph, customers can easily detect performance issues, increases in error, fault, or throttle rates in any of their services, and dive deep into corresponding traces and root causes.
|
||||
|
||||
@@ -184,12 +184,12 @@ A service graph is a visual representation of the relationships between services
|
||||
|
||||
To display the service graph:
|
||||
|
||||
- [Configure the Grafana Agent](https://grafana.com/docs/tempo/next/grafana-agent/service-graphs/#quickstart) to generate service graph data
|
||||
- Link a Prometheus datasource in the Tempo datasource settings.
|
||||
- [Configure Grafana Agent](https://grafana.com/docs/tempo/latest/grafana-agent/service-graphs/#quickstart), or [Tempo or GET](https://grafana.com/docs/tempo/latest/metrics-generator/service_graphs/#tempo) to generate service graph data.
|
||||
- Link a Prometheus data source in the Tempo data source settings.
|
||||
- Navigate to [Explore]({{< relref "../explore/" >}}).
|
||||
- Select the Tempo datasource.
|
||||
- Select the Tempo data source.
|
||||
- Select the **Service Graph** query type and run the query.
|
||||
- (Optional): filter by service name.
|
||||
- (Optional): Filter by service name.
|
||||
|
||||
You can pan and zoom the view with buttons or you mouse. For details about the visualization, refer to [Node graph panel](https://grafana.com/docs/grafana/latest/panels/visualizations/node-graph/).
|
||||
|
||||
@@ -206,20 +206,23 @@ Click on the service to see a context menu with additional links for quick navig
|
||||
|
||||
## APM table
|
||||
|
||||
The APM (Application Performance Management) table allows you to view several APM metrics out of the box.
|
||||
The Application Performance Management (APM) table lets you view several APM metrics out of the box.
|
||||
The APM table is part of the APM dashboard.
|
||||
For more information, refer to the [APM dashboard documentation](https://grafana.com/docs/tempo/latest/metrics-generator/app-performance-mgmt/).
|
||||
|
||||
To display the APM table:
|
||||
|
||||
1. Activate the tempoApmTable feature flag in your ini file.
|
||||
1. Link a Prometheus datasource in the Tempo datasource settings.
|
||||
1. Activate the `tempoApmTable` feature flag in your `grafana.ini` file.
|
||||
1. Link a Prometheus data source in the Tempo data source settings.
|
||||
1. Navigate to [Explore]({{< relref "../explore/_index.md" >}}).
|
||||
1. Select the Tempo datasource.
|
||||
1. Select the Tempo data source.
|
||||
1. Select the **Service Graph** query type and run the query.
|
||||
1. (Optional): filter your results.
|
||||
1. (Optional): Filter your results.
|
||||
|
||||
Note: The metric traces_spanmetrics_calls_total is used to display the name, rate & error rate columns and traces_spanmetrics_latency_bucket is used to display the duration column (these metrics will need to exist in your Prometheus datasource).
|
||||
> **Note:** The metric `traces_spanmetrics_calls_total` is used to display the name, rate, and error rate columns and `traces_spanmetrics_latency_bucket` is used to display the duration column. These metrics need to exist in your Prometheus data source.
|
||||
|
||||
Click a row in the rate, error rate, or duration columns to open a query in Prometheus with the span name of that row automatically set in the query. Click a row in the links column to open a query in Tempo with the span name of that row automatically set in the query.
|
||||
Click a row in the rate, error rate, or duration columns to open a query in Prometheus with the span name of that row automatically set in the query.
|
||||
Click a row in the links column to open a query in Tempo with the span name of that row automatically set in the query.
|
||||
|
||||
{{< figure src="/static/img/docs/tempo/apm-table.png" class="docs-image--no-shadow" max-width="500px" caption="Screenshot of the Tempo APM table" >}}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ title: RBAC HTTP API
|
||||
|
||||
The API can be used to create, update, delete, get, and list roles.
|
||||
|
||||
To check which basic or fixed roles have the required permissions, refer to [RBAC role definitions]({{< ref "../../administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions.md" >}}).
|
||||
To check which basic or fixed roles have the required permissions, refer to [RBAC role definitions]({{< ref "../../administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/" >}}).
|
||||
|
||||
## Get status
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user