mirror of
https://github.com/grafana/grafana.git
synced 2026-01-06 17:33:49 +08:00
Compare commits
732 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3039f9c3bd | ||
|
|
ba5886d42c | ||
|
|
9c7776cd58 | ||
|
|
5b7d1c7fe1 | ||
|
|
e44acff11c | ||
|
|
758c47e13f | ||
|
|
100819fe09 | ||
|
|
cada7a4eb8 | ||
|
|
2d2963561a | ||
|
|
754597e116 | ||
|
|
58a23cd27d | ||
|
|
7031793d06 | ||
|
|
7c0c77cc1c | ||
|
|
3199365ead | ||
|
|
3570bd0cca | ||
|
|
e353e42e96 | ||
|
|
65c46c08d4 | ||
|
|
534feb1e5e | ||
|
|
8101355285 | ||
|
|
226cba97e1 | ||
|
|
7d7f2d9262 | ||
|
|
7ac9057f71 | ||
|
|
8673bd4974 | ||
|
|
f870bea288 | ||
|
|
1ab8109892 | ||
|
|
3655752bae | ||
|
|
d44da8786f | ||
|
|
2df8fe30da | ||
|
|
562e811179 | ||
|
|
2747607805 | ||
|
|
10a9031b1b | ||
|
|
a74d03b807 | ||
|
|
e621f54fe3 | ||
|
|
05a0019fcb | ||
|
|
dfb2119afa | ||
|
|
e931df8ab9 | ||
|
|
1e35109d3e | ||
|
|
ee35db1b8b | ||
|
|
236ac5c394 | ||
|
|
81014a717d | ||
|
|
fab8bea6f7 | ||
|
|
ea469bf48f | ||
|
|
85ca9c933b | ||
|
|
051c7a7c8e | ||
|
|
28978db293 | ||
|
|
56a0b90559 | ||
|
|
461fc94103 | ||
|
|
ee21c1be81 | ||
|
|
a3a9ce7f24 | ||
|
|
1e3265d047 | ||
|
|
88270a2bf8 | ||
|
|
f8bdda7adf | ||
|
|
7618fd36ac | ||
|
|
bca82d8814 | ||
|
|
783e5d12c7 | ||
|
|
e39fef1649 | ||
|
|
2145633e9b | ||
|
|
6503962013 | ||
|
|
40a33c56c2 | ||
|
|
42069bb254 | ||
|
|
4684c7971c | ||
|
|
903eccad20 | ||
|
|
2bc9374a9e | ||
|
|
47e162d6b2 | ||
|
|
b8c5174461 | ||
|
|
eedf6e53de | ||
|
|
5f539230da | ||
|
|
c14ac88b8d | ||
|
|
9417a0c277 | ||
|
|
4c27708b7b | ||
|
|
763d28ad96 | ||
|
|
949988219f | ||
|
|
4aa1d28683 | ||
|
|
a4846ee4fd | ||
|
|
c2403767a0 | ||
|
|
fce35e7aa9 | ||
|
|
0d47601175 | ||
|
|
28e50ae4fd | ||
|
|
fc96444b23 | ||
|
|
9eb16756b1 | ||
|
|
cde6a2de68 | ||
|
|
111c238df2 | ||
|
|
1630f21aee | ||
|
|
c2125493a7 | ||
|
|
33eec937dd | ||
|
|
073f46e289 | ||
|
|
7c1c0bc8c1 | ||
|
|
a9fc5ff45d | ||
|
|
7d1f0d619d | ||
|
|
aa1cdf0a20 | ||
|
|
0b109a1637 | ||
|
|
6a1f05d7ec | ||
|
|
1576b16219 | ||
|
|
44ba5482f1 | ||
|
|
972e07bd2e | ||
|
|
22211e5bdd | ||
|
|
d95c494d9d | ||
|
|
6e3a9d7927 | ||
|
|
4a68ba7b23 | ||
|
|
74ca7121eb | ||
|
|
4d1ea72426 | ||
|
|
11385c6cfe | ||
|
|
a7bfae67f4 | ||
|
|
19d27351e9 | ||
|
|
bd27be1351 | ||
|
|
d65569f5d9 | ||
|
|
285c22eea0 | ||
|
|
2ca6df814e | ||
|
|
1716b706da | ||
|
|
bbd24cd93a | ||
|
|
df72344d3c | ||
|
|
650ab72c88 | ||
|
|
83df83fa42 | ||
|
|
e93640878d | ||
|
|
07df165b86 | ||
|
|
199f772bcf | ||
|
|
a02c6f2d36 | ||
|
|
cbb9a63b9b | ||
|
|
3a9a4f4a49 | ||
|
|
bb4b7381fc | ||
|
|
686149966a | ||
|
|
e07d0ae452 | ||
|
|
d4239e6fd2 | ||
|
|
bbce01de04 | ||
|
|
db8d7ffbf6 | ||
|
|
891ae24f76 | ||
|
|
885467e46e | ||
|
|
4be56cde0d | ||
|
|
72fa5ccb7b | ||
|
|
277b6add6d | ||
|
|
7cf5172b8a | ||
|
|
46540f3146 | ||
|
|
4bb3f66569 | ||
|
|
05bfd17b00 | ||
|
|
20db5680d2 | ||
|
|
275c37503a | ||
|
|
e3bbc14feb | ||
|
|
6c7a452726 | ||
|
|
75a714aa51 | ||
|
|
810ec4c5f8 | ||
|
|
72e418247b | ||
|
|
81d7cb1773 | ||
|
|
463e8ffd92 | ||
|
|
8e36a15968 | ||
|
|
a47fac72bf | ||
|
|
3651a8e976 | ||
|
|
02cd1a441f | ||
|
|
69f9b6f945 | ||
|
|
6eabe6c29f | ||
|
|
38cb3f2cb2 | ||
|
|
aee5626dca | ||
|
|
ee5b8b3fec | ||
|
|
d243cd9421 | ||
|
|
49e629b278 | ||
|
|
d21558231f | ||
|
|
9a8289b6d9 | ||
|
|
1a711e7df0 | ||
|
|
dcd5752086 | ||
|
|
4488a4cd5a | ||
|
|
d1e6214a4a | ||
|
|
a5fb6bddbe | ||
|
|
c344422a68 | ||
|
|
1378cadb68 | ||
|
|
75d8853aac | ||
|
|
5070f7a75b | ||
|
|
942a14b4ce | ||
|
|
6465b2f0a3 | ||
|
|
61a7f6e2f3 | ||
|
|
460b01f1fe | ||
|
|
383aa21ab6 | ||
|
|
7e83e77dcd | ||
|
|
9f82cd4713 | ||
|
|
75706a4a8b | ||
|
|
fb3bec058a | ||
|
|
5d7cd2e9fc | ||
|
|
504b786141 | ||
|
|
9421ae93f8 | ||
|
|
c22940fe35 | ||
|
|
4422ba0f2d | ||
|
|
0e845f2bbe | ||
|
|
1abbb477cf | ||
|
|
084542a006 | ||
|
|
10715a1c79 | ||
|
|
bc9c53389c | ||
|
|
af0c73720e | ||
|
|
7f587b209f | ||
|
|
8f66f5b1ca | ||
|
|
62e1e78fbe | ||
|
|
e4642de505 | ||
|
|
6d8d0a6ba6 | ||
|
|
564a34a9c8 | ||
|
|
657dc612d5 | ||
|
|
112c28033d | ||
|
|
9a6bf88020 | ||
|
|
5ab38e9409 | ||
|
|
935d6b0ce1 | ||
|
|
6e3e9b7c39 | ||
|
|
69eb5afdf7 | ||
|
|
8ca28de305 | ||
|
|
f59d7acee6 | ||
|
|
629ce6897d | ||
|
|
fda9b1f089 | ||
|
|
271cc67038 | ||
|
|
615b000acd | ||
|
|
e8e280c83e | ||
|
|
2cd569219b | ||
|
|
a8b660d919 | ||
|
|
d3299796f5 | ||
|
|
1e38a24b88 | ||
|
|
f704d103bb | ||
|
|
b7d26b12dd | ||
|
|
f16bf361d3 | ||
|
|
57f994712e | ||
|
|
7b95984ad1 | ||
|
|
297a4ddd22 | ||
|
|
a1aeb4b50d | ||
|
|
5d1508ed8c | ||
|
|
78996516af | ||
|
|
4463b18ff5 | ||
|
|
e998f6e855 | ||
|
|
ba6aefb6ec | ||
|
|
19779bb961 | ||
|
|
f5de4f1fb1 | ||
|
|
1bde4de827 | ||
|
|
46df05fd9d | ||
|
|
740a9ad5f9 | ||
|
|
8d1ed33e20 | ||
|
|
0797fe88a1 | ||
|
|
0c61ff7672 | ||
|
|
05ed781184 | ||
|
|
b5b019dfcf | ||
|
|
703f728c0c | ||
|
|
cc95754e0d | ||
|
|
602dd1e226 | ||
|
|
58cefe73ee | ||
|
|
c16890c22d | ||
|
|
95d53f03a0 | ||
|
|
eb734a2f6e | ||
|
|
b5b1b9d64e | ||
|
|
b8d49999b7 | ||
|
|
3b383149db | ||
|
|
47a2ee5b24 | ||
|
|
e5d21461a0 | ||
|
|
4a30c65a5e | ||
|
|
36fd746c5d | ||
|
|
e2ba0731e2 | ||
|
|
eb792490d6 | ||
|
|
4853770db3 | ||
|
|
1479786fb8 | ||
|
|
5b5b247cb1 | ||
|
|
cf109df887 | ||
|
|
ea2bb7036c | ||
|
|
491b8680f7 | ||
|
|
157e54067d | ||
|
|
d6ed8c522c | ||
|
|
d1b230f84a | ||
|
|
d352c213b3 | ||
|
|
e6a5e88054 | ||
|
|
7b7000c5bc | ||
|
|
03f7fd0527 | ||
|
|
048f6f5301 | ||
|
|
4949869356 | ||
|
|
c7be689b0c | ||
|
|
0fa096e0d4 | ||
|
|
80e9546cec | ||
|
|
370791d50b | ||
|
|
fe74abfaae | ||
|
|
2288609195 | ||
|
|
fefbbc65a8 | ||
|
|
b4136c1eca | ||
|
|
35e2b87b61 | ||
|
|
aa5fb20cfd | ||
|
|
4aff2d7469 | ||
|
|
cd75dc93f6 | ||
|
|
e6460b31df | ||
|
|
146ca7a486 | ||
|
|
531e658123 | ||
|
|
a5b38b799a | ||
|
|
3e81a626a4 | ||
|
|
b44c8b6f6e | ||
|
|
54284ed9f7 | ||
|
|
989a1a3d5d | ||
|
|
fb7d036fa4 | ||
|
|
bd76c66e50 | ||
|
|
8fcbea2c2f | ||
|
|
093383eb83 | ||
|
|
66f6b05d5e | ||
|
|
91c24e1f56 | ||
|
|
b1dee9392b | ||
|
|
bd44d973cd | ||
|
|
cf2343fac8 | ||
|
|
258092ec7f | ||
|
|
7a27dfdffa | ||
|
|
c0139b7d42 | ||
|
|
04e0ee5cfc | ||
|
|
bd8a04a6a5 | ||
|
|
4c8ad8d031 | ||
|
|
034abaa73a | ||
|
|
1e88e50822 | ||
|
|
035497c7bd | ||
|
|
28ff9d2832 | ||
|
|
c0f3b2929c | ||
|
|
40b3473a10 | ||
|
|
85d5d8a0e6 | ||
|
|
12d2f2c026 | ||
|
|
79fea5df2a | ||
|
|
9aef680e66 | ||
|
|
d3c57ac251 | ||
|
|
1b65e889be | ||
|
|
5f1f820bb9 | ||
|
|
c7aac1fd40 | ||
|
|
ed694fd88a | ||
|
|
e8b5f2330d | ||
|
|
55f304f15d | ||
|
|
aa3d893079 | ||
|
|
282cb73d3a | ||
|
|
b15a401efa | ||
|
|
72b8300571 | ||
|
|
1040d824c5 | ||
|
|
9ff551edc8 | ||
|
|
5f923be2bf | ||
|
|
ce127acf84 | ||
|
|
35602099d7 | ||
|
|
2e68425ad7 | ||
|
|
40986f3015 | ||
|
|
a7bdc92fd7 | ||
|
|
47c3ae1f44 | ||
|
|
6fe9982ff0 | ||
|
|
1ea8346644 | ||
|
|
a9d34a3e6f | ||
|
|
53175a41c9 | ||
|
|
de1dc57242 | ||
|
|
920362537d | ||
|
|
94984627ea | ||
|
|
77be352c7e | ||
|
|
029b1db0d1 | ||
|
|
8309e8e31a | ||
|
|
ee1be75b7b | ||
|
|
be41589b70 | ||
|
|
e63b548c5d | ||
|
|
5293c9dd84 | ||
|
|
8474794aaa | ||
|
|
c53435f7a7 | ||
|
|
c7e38fd47f | ||
|
|
d62926b5a3 | ||
|
|
5f767e2c9a | ||
|
|
70038bfd5b | ||
|
|
293ecbdd4f | ||
|
|
ef61a64c46 | ||
|
|
c3549f845e | ||
|
|
e55756066b | ||
|
|
93a93b5031 | ||
|
|
54565349c5 | ||
|
|
05a5a66e2f | ||
|
|
4cf146a29d | ||
|
|
fd93764784 | ||
|
|
cb78104db5 | ||
|
|
7c36209513 | ||
|
|
1b4fd9ad3c | ||
|
|
29598d83ce | ||
|
|
69b366977a | ||
|
|
03f241a674 | ||
|
|
1790ece4d5 | ||
|
|
acae33edf9 | ||
|
|
a65f7d666d | ||
|
|
00a9af00fc | ||
|
|
6b4d1dceb0 | ||
|
|
e65dbcfea1 | ||
|
|
0f5b894256 | ||
|
|
ed92b41d47 | ||
|
|
cb2d1b5f93 | ||
|
|
927e698993 | ||
|
|
83065c9a2c | ||
|
|
2298bb951e | ||
|
|
ba953be95f | ||
|
|
e5414f44aa | ||
|
|
c4eca530ce | ||
|
|
63463e0e46 | ||
|
|
5d6af607d7 | ||
|
|
467348bded | ||
|
|
d040daa1cd | ||
|
|
17d3bb4287 | ||
|
|
689425059f | ||
|
|
104c99f1b0 | ||
|
|
1e543d5ac1 | ||
|
|
24673dc7d1 | ||
|
|
4c92bd1539 | ||
|
|
e4fcc39e55 | ||
|
|
b12df9d64c | ||
|
|
add1bcb59c | ||
|
|
1d9f47b6a6 | ||
|
|
f98e176d7b | ||
|
|
10158c90e3 | ||
|
|
51d1261a4b | ||
|
|
b2745c3e23 | ||
|
|
df7647b268 | ||
|
|
376a9d35e4 | ||
|
|
07582a8e85 | ||
|
|
13787294c6 | ||
|
|
8f72d621bf | ||
|
|
78febbbeef | ||
|
|
01ecbae2ee | ||
|
|
e4832fa1ee | ||
|
|
3e5d721d9c | ||
|
|
2760889501 | ||
|
|
53b9f325c0 | ||
|
|
d526647005 | ||
|
|
2a6ac88a73 | ||
|
|
c563633870 | ||
|
|
57a9e422b0 | ||
|
|
b703f21622 | ||
|
|
57abf39f25 | ||
|
|
f0eb124278 | ||
|
|
3532d08cbf | ||
|
|
6191e08080 | ||
|
|
07208d05ba | ||
|
|
34d5ffa562 | ||
|
|
3de3115dec | ||
|
|
9be7d5867f | ||
|
|
328ea80cca | ||
|
|
3833aa416d | ||
|
|
6a4f45625c | ||
|
|
4c02e9d7ea | ||
|
|
9d04dfe41a | ||
|
|
da027bb49f | ||
|
|
03a5e5348d | ||
|
|
f795a1577c | ||
|
|
47b2650a99 | ||
|
|
3a63044f19 | ||
|
|
4cd7a88e59 | ||
|
|
d3a23a617f | ||
|
|
81e3f93677 | ||
|
|
fcb9dcb0b8 | ||
|
|
139be3d7ba | ||
|
|
170abf2e3d | ||
|
|
7f6b75af70 | ||
|
|
b1cee7a424 | ||
|
|
9648a09a8b | ||
|
|
4af16e7673 | ||
|
|
012fe80607 | ||
|
|
ac38dd872d | ||
|
|
7e5f525473 | ||
|
|
231a32c4a3 | ||
|
|
2724f05d5e | ||
|
|
68154cf98d | ||
|
|
a0e5f51d05 | ||
|
|
374fbdf9b6 | ||
|
|
7bf5b395b6 | ||
|
|
1e4e2642bf | ||
|
|
f5a9b23d83 | ||
|
|
83d933d010 | ||
|
|
6a7cbd968f | ||
|
|
0da72131b9 | ||
|
|
880a11773b | ||
|
|
923faf78f1 | ||
|
|
3a469f6ca2 | ||
|
|
60e7b63c33 | ||
|
|
9a59f387d9 | ||
|
|
10041bca99 | ||
|
|
dca03a3b4a | ||
|
|
a1ee62877e | ||
|
|
81d1f6653f | ||
|
|
ad870c07cf | ||
|
|
8c1307e704 | ||
|
|
57273a8d0c | ||
|
|
4b8c4b2826 | ||
|
|
a5deabbe53 | ||
|
|
5f4526ca64 | ||
|
|
84031649e3 | ||
|
|
b5bf54f5ac | ||
|
|
4d18bda2e1 | ||
|
|
4f1bbdfc0a | ||
|
|
b7d5912ca8 | ||
|
|
ff465396ab | ||
|
|
a85e05cc23 | ||
|
|
e1f4287f70 | ||
|
|
44ca05272a | ||
|
|
21425f7e26 | ||
|
|
8b267c94ec | ||
|
|
d4d9af9c96 | ||
|
|
77633db00e | ||
|
|
0681729e92 | ||
|
|
4c62689bc2 | ||
|
|
9edd8b7c7e | ||
|
|
8aedf81133 | ||
|
|
6099398c37 | ||
|
|
25bdadab04 | ||
|
|
0b5d818771 | ||
|
|
460847f3ed | ||
|
|
bb099cb141 | ||
|
|
0f174de760 | ||
|
|
966b0a97b1 | ||
|
|
01de35d4db | ||
|
|
731deb9628 | ||
|
|
4f6fb2d46e | ||
|
|
de46dc7af0 | ||
|
|
5a6026a8c0 | ||
|
|
ad589c3201 | ||
|
|
ead259f26d | ||
|
|
e2368e623e | ||
|
|
793299af14 | ||
|
|
2f28823a42 | ||
|
|
ec08881e81 | ||
|
|
95fdae6499 | ||
|
|
5d23f0a295 | ||
|
|
a677cac74f | ||
|
|
22f2961cfd | ||
|
|
3a0f2dc160 | ||
|
|
50b2f26d80 | ||
|
|
71271ea5f4 | ||
|
|
37ae7c3af1 | ||
|
|
29afc2feb8 | ||
|
|
c62591e77b | ||
|
|
2f01f1320f | ||
|
|
cbf68c8ecc | ||
|
|
220590cb54 | ||
|
|
9fa551cc32 | ||
|
|
54ee4f4f72 | ||
|
|
f0a161807a | ||
|
|
b709f6ad71 | ||
|
|
6b29c11776 | ||
|
|
c5950d6380 | ||
|
|
e79b2a3f66 | ||
|
|
a40760a434 | ||
|
|
ce7b142d64 | ||
|
|
820eb5c80e | ||
|
|
62a233c9bf | ||
|
|
6aeb00a859 | ||
|
|
157c79872d | ||
|
|
d4d51db21b | ||
|
|
9f019d5603 | ||
|
|
1e74037eae | ||
|
|
44fae66bc0 | ||
|
|
cadadb6290 | ||
|
|
23610fbc3b | ||
|
|
3818e521f1 | ||
|
|
4db782fd5b | ||
|
|
9ccdd4b824 | ||
|
|
cc6df0ac6b | ||
|
|
7b6deef46d | ||
|
|
de1ce049e8 | ||
|
|
9106f2f68a | ||
|
|
9622536a98 | ||
|
|
2b23f81929 | ||
|
|
7b18b101b4 | ||
|
|
319051c70e | ||
|
|
150d9b2a77 | ||
|
|
0e53b15375 | ||
|
|
26964b383f | ||
|
|
f8801952bf | ||
|
|
2a54398e43 | ||
|
|
5a5575ef38 | ||
|
|
5ddc72fb95 | ||
|
|
e598664be1 | ||
|
|
3cdbeffdce | ||
|
|
0fc9ad1d67 | ||
|
|
7a44034d1c | ||
|
|
bd42407620 | ||
|
|
7fcf2615e1 | ||
|
|
b73d237bf8 | ||
|
|
6a0abf895e | ||
|
|
713fe39b1f | ||
|
|
98d5633601 | ||
|
|
96f26cbd5b | ||
|
|
0e8638ec92 | ||
|
|
bc8c05137b | ||
|
|
bf1e5aa16c | ||
|
|
ce8b5030c1 | ||
|
|
1b29d3460e | ||
|
|
d3a8f6d026 | ||
|
|
e4cbeb5cb3 | ||
|
|
59ffe4f413 | ||
|
|
28344c145f | ||
|
|
6efa3f95ae | ||
|
|
ee12f5e742 | ||
|
|
25e1238022 | ||
|
|
405145fdd3 | ||
|
|
7fbed90b89 | ||
|
|
c59f5436c0 | ||
|
|
2b9cc8ba30 | ||
|
|
0c8ee5b2c9 | ||
|
|
01bbcf4eea | ||
|
|
e11504dcd2 | ||
|
|
b4044e3e51 | ||
|
|
e754bcdcf9 | ||
|
|
abfa1b5d74 | ||
|
|
c60765a178 | ||
|
|
141c21c906 | ||
|
|
51509bb2ff | ||
|
|
cfac591234 | ||
|
|
660f2b4e99 | ||
|
|
77148ef616 | ||
|
|
7610d5717a | ||
|
|
2f22781cd8 | ||
|
|
85ae144a87 | ||
|
|
9481b7bcf2 | ||
|
|
54a90166a5 | ||
|
|
e323f7be51 | ||
|
|
37a2ac20c3 | ||
|
|
f1386c7892 | ||
|
|
c066c6047e | ||
|
|
f769ed035d | ||
|
|
083a2ce220 | ||
|
|
622246d56d | ||
|
|
f97d021c58 | ||
|
|
6c32a5b9bc | ||
|
|
033e5e53da | ||
|
|
0860dfe45d | ||
|
|
792e99918c | ||
|
|
0f964c0214 | ||
|
|
8e5a3a578a | ||
|
|
4cdd8bd933 | ||
|
|
16297da298 | ||
|
|
285ea7595d | ||
|
|
f29b70b442 | ||
|
|
8e0ba46d50 | ||
|
|
c075576f3a | ||
|
|
c8bae5fd3a | ||
|
|
cfaf3e309c | ||
|
|
85add88b8d | ||
|
|
bfd337dd00 | ||
|
|
277aee8642 | ||
|
|
cd9cbe5e16 | ||
|
|
c1b057a57d | ||
|
|
87c2e58dfd | ||
|
|
aa63404211 | ||
|
|
97e2837d7c | ||
|
|
f23ecc40b4 | ||
|
|
9e24c0944f | ||
|
|
ab12c908d8 | ||
|
|
8e8aae06a3 | ||
|
|
04c75265b5 | ||
|
|
03940c8471 | ||
|
|
1848900070 | ||
|
|
5f45a039b2 | ||
|
|
36fa54a288 | ||
|
|
cab066f8ce | ||
|
|
2d19c046f2 | ||
|
|
5feef22034 | ||
|
|
75de6165fc | ||
|
|
824eb94efe | ||
|
|
846142eebd | ||
|
|
c1919944ea | ||
|
|
a50cb6aa1f | ||
|
|
0ac006edf5 | ||
|
|
0c1f1dd8fd | ||
|
|
15ac76a47b | ||
|
|
892f9f789c | ||
|
|
20f0ee2f22 | ||
|
|
8de10a8b9f | ||
|
|
125ba95686 | ||
|
|
164242f5fd | ||
|
|
0475f96347 | ||
|
|
0396b220a3 | ||
|
|
7d800e7318 | ||
|
|
bffa0fa4f6 | ||
|
|
67dab0b767 | ||
|
|
74ddfe07a2 | ||
|
|
28f54bc2f7 | ||
|
|
64046e9a27 | ||
|
|
7992f8bfbc | ||
|
|
cb4266bae0 | ||
|
|
ffda007415 | ||
|
|
8fee956ce8 | ||
|
|
143a26769b | ||
|
|
c8d3d15292 | ||
|
|
1ece878037 | ||
|
|
5caf7f59e6 | ||
|
|
3f31028bf8 | ||
|
|
be2f932cac | ||
|
|
6883626834 | ||
|
|
cde86ff567 | ||
|
|
b8bc10018a | ||
|
|
444058a569 | ||
|
|
db91961405 | ||
|
|
98de101bd8 | ||
|
|
67ed579647 | ||
|
|
ae7f0aeb7a | ||
|
|
55533d12fd | ||
|
|
cb74bc6828 | ||
|
|
b2f8f25995 | ||
|
|
d5991a4b88 | ||
|
|
d5e7a253b3 | ||
|
|
2d29997bda | ||
|
|
9dd68dae36 | ||
|
|
c26374b0b2 | ||
|
|
876011d931 | ||
|
|
2e69b86990 | ||
|
|
f13a15ae48 | ||
|
|
34f61934a1 | ||
|
|
b16202acc2 | ||
|
|
d385045d16 | ||
|
|
a521a39ebf | ||
|
|
e341d4b26f | ||
|
|
c3b6ee1456 | ||
|
|
c5fc18ac02 | ||
|
|
2f5003ebf1 | ||
|
|
352f22042c | ||
|
|
367501eeab | ||
|
|
75e2da0c1d | ||
|
|
c671fdbbf8 | ||
|
|
96cb6d668f | ||
|
|
e333d61b97 | ||
|
|
1fafcd1562 | ||
|
|
482886279c | ||
|
|
694bc4b1ed | ||
|
|
aa4366e6ca | ||
|
|
8694970538 | ||
|
|
e8cd094f01 | ||
|
|
a655aa1ca8 | ||
|
|
35c097e475 | ||
|
|
221042c293 | ||
|
|
a9f39a4149 | ||
|
|
7e6ac12b9a | ||
|
|
8257633b1d | ||
|
|
d7a5f3ef80 | ||
|
|
bd3ca55117 | ||
|
|
de8c1b9ad7 | ||
|
|
c6bba9019d | ||
|
|
63d25944c4 | ||
|
|
a86639356e | ||
|
|
f714357fbf | ||
|
|
243fa5ea63 | ||
|
|
648dda96e9 | ||
|
|
f37c64c80c | ||
|
|
5e50409000 | ||
|
|
62aa15f760 | ||
|
|
e36a6ac476 | ||
|
|
a3ffbd9a70 | ||
|
|
948cdf835d | ||
|
|
e07fdbd881 | ||
|
|
fc0c717bfb |
@@ -35,13 +35,13 @@ executors:
|
||||
- image: cimg/base:stable
|
||||
node:
|
||||
docker:
|
||||
- image: cimg/node:12.16
|
||||
- image: cimg/node:12.18
|
||||
go:
|
||||
docker:
|
||||
- image: cimg/go:1.14
|
||||
grafana-build:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.16
|
||||
- image: grafana/build-container:1.2.20
|
||||
grafana-publish:
|
||||
docker:
|
||||
- image: grafana/grafana-ci-deploy:1.2.5
|
||||
@@ -56,7 +56,7 @@ commands:
|
||||
- run:
|
||||
name: "Install Grafana build pipeline tool"
|
||||
command: |
|
||||
VERSION=0.4.9
|
||||
VERSION=0.4.19
|
||||
curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v${VERSION}/grabpl
|
||||
chmod +x grabpl
|
||||
mv grabpl /tmp
|
||||
@@ -74,7 +74,7 @@ jobs:
|
||||
- run:
|
||||
name: Exit if enterprise and forked PR
|
||||
command: |
|
||||
if [[ "<< parameters.edition >>" == "enterprise" && -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
if [[ "<< parameters.edition >>" == "enterprise" && -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
echo "Nothing to do for forked PRs, so marking this step successful"
|
||||
circleci step halt
|
||||
fi
|
||||
@@ -88,15 +88,15 @@ jobs:
|
||||
command: |
|
||||
if [[ -n $CIRCLE_TAG ]]; then
|
||||
# A release build
|
||||
/tmp/grabpl build-backend --edition << parameters.edition >> \
|
||||
/tmp/grabpl build-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
|
||||
--variants << parameters.variant >> $CIRCLE_TAG
|
||||
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
/tmp/grabpl build-backend --edition << parameters.edition >> \
|
||||
/tmp/grabpl build-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
|
||||
--variants << parameters.variant >> v7.0.0-test
|
||||
else
|
||||
# A master or PR build
|
||||
/tmp/grabpl build-backend --edition << parameters.edition >> \
|
||||
/tmp/grabpl build-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
|
||||
--variants << parameters.variant >> --build-id $CIRCLE_WORKFLOW_ID
|
||||
fi
|
||||
- run:
|
||||
@@ -126,7 +126,7 @@ jobs:
|
||||
- run:
|
||||
name: Exit if enterprise and forked PR
|
||||
command: |
|
||||
if [[ "<< parameters.edition >>" == "enterprise" && -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
if [[ "<< parameters.edition >>" == "enterprise" && -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
echo "Nothing to do for forked PRs, so marking this step successful"
|
||||
circleci step halt
|
||||
fi
|
||||
@@ -158,13 +158,13 @@ jobs:
|
||||
command: |
|
||||
if [[ -n $CIRCLE_TAG ]]; then
|
||||
# A release build
|
||||
/tmp/grabpl build-frontend --edition << parameters.edition >> $CIRCLE_TAG
|
||||
/tmp/grabpl build-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> $CIRCLE_TAG
|
||||
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
/tmp/grabpl build-frontend --edition << parameters.edition >> 7.0.0-test
|
||||
/tmp/grabpl build-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> 7.0.0-test
|
||||
else
|
||||
# A master or PR build
|
||||
/tmp/grabpl build-frontend --edition << parameters.edition >> --build-id $CIRCLE_WORKFLOW_ID
|
||||
/tmp/grabpl build-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> --build-id $CIRCLE_WORKFLOW_ID
|
||||
fi
|
||||
- run:
|
||||
name: Move artifacts
|
||||
@@ -192,7 +192,7 @@ jobs:
|
||||
- run:
|
||||
name: Exit if enterprise and forked PR
|
||||
command: |
|
||||
if [[ "<< parameters.edition >>" == "enterprise" && -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
if [[ "<< parameters.edition >>" == "enterprise" && -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
echo "Nothing to do for forked PRs, so marking this step successful"
|
||||
circleci step halt
|
||||
fi
|
||||
@@ -414,20 +414,20 @@ jobs:
|
||||
export GRAFANA_API_KEY=$GRAFANA_COM_API_KEY
|
||||
if [[ -n $CIRCLE_TAG ]]; then
|
||||
# A release build
|
||||
/tmp/grabpl package --jobs 2 --edition oss --sign $CIRCLE_TAG
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign $CIRCLE_TAG
|
||||
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
/tmp/grabpl package --jobs 2 --edition oss --sign v7.0.0-test
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign v7.0.0-test
|
||||
elif [[ $CIRCLE_BRANCH == "master" ]]; then
|
||||
# A master build
|
||||
/tmp/grabpl package --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID
|
||||
elif [[ -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
# A forked PR build, don't sign as it requires an API secret
|
||||
/tmp/grabpl package --jobs 2 --edition oss --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
linux-x64,linux-x64-musl,osx64,win64
|
||||
else
|
||||
# A non-forked PR build
|
||||
/tmp/grabpl package --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
linux-x64,linux-x64-musl,osx64,win64
|
||||
fi
|
||||
- run:
|
||||
@@ -476,20 +476,20 @@ jobs:
|
||||
|
||||
if [[ -n $CIRCLE_TAG ]]; then
|
||||
# A release build
|
||||
/tmp/grabpl package --jobs 2 --edition enterprise --sign $CIRCLE_TAG
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign $CIRCLE_TAG
|
||||
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
/tmp/grabpl package --jobs 2 --edition enterprise --sign v7.0.0-test
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign v7.0.0-test
|
||||
elif [[ $CIRCLE_BRANCH == "master" ]]; then
|
||||
# A master build
|
||||
/tmp/grabpl package --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID
|
||||
elif [[ -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
# A forked PR build, don't sign as it requires an API secret
|
||||
/tmp/grabpl package --jobs 2 --edition enterprise --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
linux-x64,linux-x64-musl,osx64,win64
|
||||
else
|
||||
# A PR build
|
||||
/tmp/grabpl package --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
linux-x64,linux-x64-musl,osx64,win64
|
||||
fi
|
||||
- run:
|
||||
@@ -608,7 +608,7 @@ jobs:
|
||||
- run:
|
||||
name: Exit if enterprise and forked PR
|
||||
command: |
|
||||
if [[ "<< parameters.edition >>" == "enterprise" && -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
if [[ "<< parameters.edition >>" == "enterprise" && -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
echo "Nothing to do for forked PRs, so marking this step successful"
|
||||
circleci step halt
|
||||
fi
|
||||
@@ -625,11 +625,12 @@ jobs:
|
||||
- run:
|
||||
name: Install gcloud SDK
|
||||
command: |
|
||||
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | \
|
||||
sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
|
||||
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | \
|
||||
sudo apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -
|
||||
sudo apt-get update && sudo apt-get install google-cloud-sdk
|
||||
VERSION=298.0.0
|
||||
curl -fLO https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${VERSION}-linux-x86_64.tar.gz
|
||||
echo 0d58f451331abf43d080fa997c8e580d64897627e30be74f6d8f983ccfabef1e \
|
||||
google-cloud-sdk-${VERSION}-linux-x86_64.tar.gz | sha256sum --check --strict --status
|
||||
tar xf google-cloud-sdk-${VERSION}-linux-x86_64.tar.gz
|
||||
./google-cloud-sdk/install.sh -q
|
||||
# XXX: Is this necessary?
|
||||
- run: docker run --privileged linuxkit/binfmt:v0.6
|
||||
- run:
|
||||
@@ -639,6 +640,7 @@ jobs:
|
||||
- run:
|
||||
name: Build Docker images
|
||||
command: |
|
||||
source google-cloud-sdk/path.bash.inc
|
||||
if [[ -n $CIRCLE_TAG || $CIRCLE_BRANCH == "chore/test-release-pipeline" || $CIRCLE_BRANCH == "master" ]]; then
|
||||
# It's a full build
|
||||
/tmp/grabpl build-docker --jobs 4 --edition << parameters.edition >> \
|
||||
@@ -811,29 +813,31 @@ jobs:
|
||||
name: Install Go linters
|
||||
command: |
|
||||
pushd /tmp
|
||||
curl -fLO https://github.com/golangci/golangci-lint/releases/download/v1.24.0/golangci-lint-1.24.0-linux-amd64.tar.gz
|
||||
echo 241ca454102e909de04957ff8a5754c757cefa255758b3e1fba8a4533d19d179 \
|
||||
golangci-lint-1.24.0-linux-amd64.tar.gz | sha256sum --check --strict --status
|
||||
tar -xf golangci-lint-1.24.0-linux-amd64.tar.gz
|
||||
sudo mv golangci-lint-1.24.0-linux-amd64/golangci-lint /usr/local/bin/
|
||||
VERSION=1.27.0
|
||||
curl -fLO https://github.com/golangci/golangci-lint/releases/download/v${VERSION}/golangci-lint-${VERSION}-linux-amd64.tar.gz
|
||||
echo 8d345e4e88520e21c113d81978e89ad77fc5b13bfdf20e5bca86b83fc4261272 \
|
||||
golangci-lint-${VERSION}-linux-amd64.tar.gz | sha256sum --check --strict --status
|
||||
tar -xf golangci-lint-${VERSION}-linux-amd64.tar.gz
|
||||
sudo mv golangci-lint-${VERSION}-linux-amd64/golangci-lint /usr/local/bin/
|
||||
popd
|
||||
make scripts/go/bin/revive scripts/go/bin/gosec
|
||||
make scripts/go/bin/revive
|
||||
- run:
|
||||
name: Lint Go
|
||||
command: |
|
||||
go vet ./pkg/...
|
||||
golangci-lint run -v -j 4 --config scripts/go/configs/ci/.golangci.yml -E deadcode -E gofmt \
|
||||
-E gosimple -E ineffassign -E structcheck -E typecheck ./pkg/...
|
||||
golangci-lint run -v -j 4 --config scripts/go/configs/ci/.golangci.yml -E unconvert -E unused \
|
||||
-E varcheck -E goconst -E errcheck -E staticcheck ./pkg/...
|
||||
# To save memory, run in two batches
|
||||
golangci-lint run -v -j 4 --config scripts/go/configs/ci/.golangci.toml -E deadcode -E depguard -E dogsled \
|
||||
-E errcheck -E goconst -E golint -E gosec -E gosimple -E govet -E scopelint ./pkg/...
|
||||
golangci-lint run -v -j 4 --config scripts/go/configs/ci/.golangci.toml -E ineffassign \
|
||||
-E rowserrcheck -E staticcheck -E structcheck -E typecheck -E unconvert -E unused -E varcheck ./pkg/...
|
||||
./scripts/go/bin/revive -formatter stylish -config ./scripts/go/configs/revive.toml ./pkg/...
|
||||
./scripts/go/bin/revive -formatter stylish -config ./scripts/go/configs/revive-strict.toml \
|
||||
-exclude ./pkg/plugins/backendplugin/pluginextensionv2/... \
|
||||
./pkg/services/alerting/... \
|
||||
./pkg/services/provisioning/datasources/... \
|
||||
./pkg/services/provisioning/dashboards/...
|
||||
|
||||
./scripts/go/bin/gosec -quiet -exclude=G104,G107,G108,G201,G202,G204,G301,G304,G401,G402,G501 \
|
||||
-conf=./scripts/go/configs/gosec.json ./pkg/...
|
||||
./pkg/services/provisioning/dashboards/... \
|
||||
./pkg/services/provisioning/notifiers/... \
|
||||
./pkg/services/provisioning/values/... \
|
||||
./pkg/plugins/backendplugin/...
|
||||
|
||||
test-frontend:
|
||||
executor: node
|
||||
@@ -889,18 +893,13 @@ jobs:
|
||||
when: on_success
|
||||
|
||||
build-docs-website:
|
||||
executor: grafana-build
|
||||
executor: base
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: CI job started
|
||||
command: "./scripts/ci-job-started.sh"
|
||||
- run:
|
||||
name: Install docker
|
||||
command: |
|
||||
apt-get update
|
||||
apt-get install -y docker.io
|
||||
- run:
|
||||
name: Build Grafana docs website
|
||||
command: |
|
||||
@@ -972,7 +971,13 @@ jobs:
|
||||
command: "./scripts/ci-job-succeeded.sh"
|
||||
when: on_success
|
||||
|
||||
scan-docker-images:
|
||||
scan-docker-image:
|
||||
description: "Scans a docker image for vulnerabilities using trivy"
|
||||
parameters:
|
||||
image:
|
||||
type: string
|
||||
tag:
|
||||
type: string
|
||||
docker:
|
||||
- image: circleci/buildpack-deps:stretch
|
||||
steps:
|
||||
@@ -995,29 +1000,11 @@ jobs:
|
||||
name: Clear trivy cache
|
||||
command: trivy --clear-cache
|
||||
- run:
|
||||
name: Scan grafana/grafana:master
|
||||
command: trivy --exit-code 1 grafana/grafana:master
|
||||
name: Scan Docker image for unkown/low/medium vulnerabilities
|
||||
command: trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM << parameters.image >>:<< parameters.tag >>
|
||||
- run:
|
||||
name: Scan grafana/grafana:master-ubuntu
|
||||
command: trivy --exit-code 1 grafana/grafana:master-ubuntu
|
||||
- run:
|
||||
name: Scan grafana/grafana-enterprise:master
|
||||
command: trivy --exit-code 1 grafana/grafana-enterprise:master
|
||||
- run:
|
||||
name: Scan grafana/grafana-enterprise:master-ubuntu
|
||||
command: trivy --exit-code 1 grafana/grafana-enterprise:master-ubuntu
|
||||
- run:
|
||||
name: Scan grafana/grafana:latest
|
||||
command: trivy --exit-code 1 grafana/grafana:latest
|
||||
- run:
|
||||
name: Scan grafana/grafana:latest-ubuntu
|
||||
command: trivy --exit-code 1 grafana/grafana:latest-ubuntu
|
||||
- run:
|
||||
name: Scan grafana/grafana-enterprise:latest
|
||||
command: trivy --exit-code 1 grafana/grafana-enterprise:latest
|
||||
- run:
|
||||
name: Scan grafana/grafana-enterprise:latest-ubuntu
|
||||
command: trivy --exit-code 1 grafana/grafana-enterprise:latest-ubuntu
|
||||
name: Scan Docker image for high/critical vulnerabilities
|
||||
command: trivy --exit-code 1 --severity HIGH,CRITICAL << parameters.image >>:<< parameters.tag >>
|
||||
- save_cache:
|
||||
key: vulnerability-db
|
||||
paths:
|
||||
@@ -1343,4 +1330,8 @@ workflows:
|
||||
cron: "0 0 * * *"
|
||||
filters: *filter-only-master
|
||||
jobs:
|
||||
- scan-docker-images
|
||||
- scan-docker-image:
|
||||
matrix:
|
||||
parameters:
|
||||
image: [grafana/grafana, grafana/grafana-enterprise]
|
||||
tag: [latest, master, latest-ubuntu, master-ubuntu]
|
||||
|
||||
41
.github/CODEOWNERS
vendored
41
.github/CODEOWNERS
vendored
@@ -14,10 +14,47 @@
|
||||
# Documentation owner: Diana Payton
|
||||
/docs/ @oddlittlebird
|
||||
/contribute/ @oddlittlebird @marcusolsson
|
||||
# @grafana/ui component documentation
|
||||
*.mdx @marcusolsson @jessover9000
|
||||
|
||||
|
||||
# Backend code
|
||||
*.go @grafana/backend-platform
|
||||
go.mod @grafana/backend-platform
|
||||
go.sum @grafana/backend-platform
|
||||
|
||||
/e2e @grafana/grafana-frontend-platform
|
||||
/packages @grafana/grafana-frontend-platform
|
||||
/plugins-bundled @grafana/grafana-frontend-platform
|
||||
/public @grafana/grafana-frontend-platform
|
||||
/scripts/build/release-packages.sh @grafana/grafana-frontend-platform
|
||||
/scripts/circle-release-next-packages.sh @grafana/grafana-frontend-platform
|
||||
/scripts/ci-frontend-metrics.sh @grafana/grafana-frontend-platform
|
||||
/scripts/grunt @grafana/grafana-frontend-platform
|
||||
/scripts/webpack @grafana/grafana-frontend-platform
|
||||
package.json @grafana/grafana-frontend-platform
|
||||
tsconfig.json @grafana/grafana-frontend-platform
|
||||
lerna.json @grafana/grafana-frontend-platform
|
||||
.babelrc @grafana/grafana-frontend-platform
|
||||
.prettierrc.js @grafana/grafana-frontend-platform
|
||||
.eslintrc @grafana/grafana-frontend-platform
|
||||
|
||||
# @grafana/ui component documentation
|
||||
*.mdx @marcusolsson @jessover9000 @grafana/grafana-frontend-platform
|
||||
|
||||
/public/app/features/explore/ @grafana/observability-squad
|
||||
/packages/jaeger-ui-components/ @grafana/observability-squad
|
||||
|
||||
# Core datasources
|
||||
/public/app/plugins/datasource/cloudwatch @grafana/backend-platform @grafana/observability-squad
|
||||
/public/app/plugins/datasource/elasticsearch @grafana/observability-squad
|
||||
/public/app/plugins/datasource/grafana-azure-monitor-datasource @grafana/backend-platform
|
||||
/public/app/plugins/datasource/graphite @grafana/observability-squad
|
||||
/public/app/plugins/datasource/influxdb @grafana/observability-squad
|
||||
/public/app/plugins/datasource/jaeger @grafana/observability-squad
|
||||
/public/app/plugins/datasource/loki @grafana/observability-squad
|
||||
/public/app/plugins/datasource/mssql @grafana/backend-platform
|
||||
/public/app/plugins/datasource/mysql @grafana/backend-platform
|
||||
/public/app/plugins/datasource/opentsdb @grafana/backend-platform
|
||||
/public/app/plugins/datasource/postgres @grafana/backend-platform
|
||||
/public/app/plugins/datasource/prometheus @grafana/observability-squad
|
||||
/public/app/plugins/datasource/cloud-monitoring @grafana/backend-platform
|
||||
/public/app/plugins/datasource/zipkin @grafana/observability-squad
|
||||
|
||||
10
.github/ISSUE_TEMPLATE/1-bug_report.md
vendored
10
.github/ISSUE_TEMPLATE/1-bug_report.md
vendored
@@ -5,9 +5,13 @@ labels: 'type: bug'
|
||||
---
|
||||
|
||||
<!--
|
||||
Please use this template while reporting a bug and provide as much info as possible.
|
||||
Questions should be posted to https://community.grafana.com
|
||||
Use query inspector to troubleshoot issues: https://community.grafana.com/t/using-grafanas-query-inspector-to-troubleshoot-issues/2630
|
||||
Please use this template to create your bug report. By providing as much info as possible you help us understand the issue, reproduce it and resolve it for you quicker. Therefor take a couple of extra minutes to make sure you have provided all info needed.
|
||||
|
||||
PROTIP: record your screen and attach it as a gif to showcase the issue.
|
||||
|
||||
* Questions should be posted to: https://community.grafana.com
|
||||
* Use query inspector to troubleshoot issues: https://bit.ly/2XNF6YS
|
||||
* How to record and attach gif: https://bit.ly/2Mi8T6K
|
||||
-->
|
||||
|
||||
**What happened**:
|
||||
|
||||
39
.github/ISSUE_TEMPLATE/4-grafana_ui_component.md
vendored
Normal file
39
.github/ISSUE_TEMPLATE/4-grafana_ui_component.md
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
---
|
||||
name: '@grafana/ui component request'
|
||||
about: Suggest a component for the @grafana/ui package
|
||||
labels: 'area/grafana/ui'
|
||||
---
|
||||
|
||||
<!--
|
||||
By using this template you will make it easier for us to make sure that documentation and implementation stays up to date for every component in @grafana/ui
|
||||
|
||||
Thank you!
|
||||
-->
|
||||
|
||||
**Why is this component needed**:
|
||||
<!-- Explain your use case -->
|
||||
___
|
||||
- [ ] Is/could it be used in more than one place in Grafana?
|
||||
|
||||
**Where is/could it be used?**:
|
||||
|
||||
___
|
||||
- [ ] Post screenshots possible.
|
||||
- [ ] It has a single use case.
|
||||
- [ ] It is/could be used in multiple places.
|
||||
|
||||
**Implementation** (Checklist meant for the person implementing the component)
|
||||
|
||||
- [ ] Component has a story in Storybook.
|
||||
- [ ] Props and naming follows [our style guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/frontend.md).
|
||||
- [ ] It is extendable (rest props are spread, styles with className work, and so on).
|
||||
- [ ] Uses [theme for spacing, colors, and so on](https://github.com/grafana/grafana/blob/master/contribute/style-guides/themes.md).
|
||||
- [ ] Works with both light and dark theme.
|
||||
|
||||
**Documentation**
|
||||
|
||||
- [ ] Properties are documented.
|
||||
- [ ] Use cases are described.
|
||||
- [ ] Code examples for the different use cases.
|
||||
- [ ] Dos and don'ts.
|
||||
- [ ] Styling guidelines, specific color usage (if applicable).
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -15,6 +15,7 @@ awsconfig
|
||||
.yarnrc
|
||||
.yarn/
|
||||
vendor/
|
||||
.eslintcache
|
||||
|
||||
# Enterprise emails
|
||||
/emails/templates/enterprise_*
|
||||
@@ -46,6 +47,7 @@ public/css/*.min.css
|
||||
.DS_Store
|
||||
.vscode/
|
||||
.vs/
|
||||
.eslintcache
|
||||
|
||||
/data/*
|
||||
/bin/*
|
||||
@@ -112,7 +114,7 @@ compilation-stats.json
|
||||
/packages/grafana-e2e/cypress/logs
|
||||
/e2e/server.log
|
||||
/e2e/**/screenshots
|
||||
!/e2e/**/screenshots/expeced/*
|
||||
!/e2e/**/screenshots/expected/*
|
||||
/e2e/**/videos/*
|
||||
|
||||
# report dumping the whole system env
|
||||
|
||||
168
CHANGELOG.md
168
CHANGELOG.md
@@ -1,14 +1,100 @@
|
||||
# 7.0.0 (unreleased)
|
||||
# 7.0.5 (2020-06-30)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Datasource**: Make sure data proxy timeout applies to HTTP client. [#25865](https://github.com/grafana/grafana/pull/25865), [@marefr](https://github.com/marefr)
|
||||
- **Graphite**: Fix tag value dropdowns not showing in query editor. [#25889](https://github.com/grafana/grafana/pull/25889), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
# 7.0.4 (2020-06-25)
|
||||
|
||||
### Features / Enhancements
|
||||
|
||||
- **Dashboard**: Redirects for old (pre 7.0) edit & view panel urls. [#25653](https://github.com/grafana/grafana/pull/25653), [@torkelo](https://github.com/torkelo)
|
||||
- **Stackdriver**: Use default project name if project name isn't set on the query. [#25413](https://github.com/grafana/grafana/pull/25413), [@alexashley](https://github.com/alexashley)
|
||||
- **TablePanel**: Sort numbers correctly. [#25421](https://github.com/grafana/grafana/pull/25421), [@speakyourcode](https://github.com/speakyourcode)
|
||||
- **Update Bitcoin currency to use proper symbol, add mBTC and μBTC**. [#24182](https://github.com/grafana/grafana/pull/24182), [@overcookedpanda](https://github.com/overcookedpanda)
|
||||
- **Variables**: Links that update variables on current dashboard does not trigger refresh / update. [#25192](https://github.com/grafana/grafana/pull/25192), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Azure Monitor**: fixes undefined is not iterable. [#25586](https://github.com/grafana/grafana/pull/25586), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Datasources**: Handle URL parsing error. [#25742](https://github.com/grafana/grafana/pull/25742), [@marefr](https://github.com/marefr)
|
||||
- **InfluxDB**: Fix invalid memory address or nil pointer dereference when schema is missing in URL. [#25565](https://github.com/grafana/grafana/pull/25565), [@marefr](https://github.com/marefr)
|
||||
- **Security**: Use Header.Set and Header.Del for X-Grafana-User header. [#25495](https://github.com/grafana/grafana/pull/25495), [@beardhatcode](https://github.com/beardhatcode)
|
||||
- **Stackdriver**: Fix creating Label Values datasource query variable. [#25633](https://github.com/grafana/grafana/pull/25633), [@papagian](https://github.com/papagian)
|
||||
- **Table**: Support custom date formats via custom unit. [#25195](https://github.com/grafana/grafana/pull/25195), [@torkelo](https://github.com/torkelo)
|
||||
- **Templating**: Fixes query variable with \${\_\_searchFilter} value selection not causing refresh & url update. [#25770](https://github.com/grafana/grafana/pull/25770), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
# 7.0.3 (2020-06-03)
|
||||
|
||||
### Features / Enhancements
|
||||
|
||||
- **Stats**: include all fields. [#24829](https://github.com/grafana/grafana/pull/24829), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Variables**: change VariableEditorList row action Icon to IconButton. [#25217](https://github.com/grafana/grafana/pull/25217), [@hshoff](https://github.com/hshoff)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Cloudwatch**: Fix dimensions of DDoSProtection. [#25317](https://github.com/grafana/grafana/pull/25317), [@papagian](https://github.com/papagian)
|
||||
- **Configuration**: Fix env var override of sections containing hyphen. [#25178](https://github.com/grafana/grafana/pull/25178), [@marefr](https://github.com/marefr)
|
||||
- **Dashboard**: Get panels in collapsed rows. [#25079](https://github.com/grafana/grafana/pull/25079), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **Do not show alerts tab when alerting is disabled**. [#25285](https://github.com/grafana/grafana/pull/25285), [@dprokop](https://github.com/dprokop)
|
||||
- **Jaeger**: fixes cascader option label duration value. [#25129](https://github.com/grafana/grafana/pull/25129), [@Estrax](https://github.com/Estrax)
|
||||
- **Transformations**: Fixed Transform tab crash & no update after adding first transform. [#25152](https://github.com/grafana/grafana/pull/25152), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
# 7.0.2 (2020-06-03)
|
||||
|
||||
- **Security**: Urgent security patch release. Please read more in our [blog](https://grafana.com/blog/2020/06/03/grafana-6.7.4-and-7.0.2-released-with-important-security-fix/)
|
||||
|
||||
# 7.0.1 (2020-05-26)
|
||||
|
||||
### Features / Enhancements
|
||||
|
||||
- **Datasource/CloudWatch**: Makes CloudWatch Logs query history more readable. [#24795](https://github.com/grafana/grafana/pull/24795), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Download CSV**: Add date and time formatting. [#24992](https://github.com/grafana/grafana/pull/24992), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Table**: Make last cell value visible when right aligned. [#24921](https://github.com/grafana/grafana/pull/24921), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **TablePanel**: Adding sort order persistance. [#24705](https://github.com/grafana/grafana/pull/24705), [@torkelo](https://github.com/torkelo)
|
||||
- **Transformations**: Display correct field name when using reduce transformation. [#25068](https://github.com/grafana/grafana/pull/25068), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **Transformations**: Allow custom number input for binary operations. [#24752](https://github.com/grafana/grafana/pull/24752), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Cloudwatch**: Fix AWS WAF and AWS DDoSProtection metrics. [#25071](https://github.com/grafana/grafana/pull/25071), [@papagian](https://github.com/papagian)
|
||||
- **Dashboard/Links**: Fixes dashboard links by tags not working. [#24773](https://github.com/grafana/grafana/pull/24773), [@KamalGalrani](https://github.com/KamalGalrani)
|
||||
- **Dashboard/Links**: Fixes open in new window for dashboard link. [#24772](https://github.com/grafana/grafana/pull/24772), [@KamalGalrani](https://github.com/KamalGalrani)
|
||||
- **Dashboard/Links**: Variables are resolved and limits to 100. [#25076](https://github.com/grafana/grafana/pull/25076), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **DataLinks**: Bring back variables interpolation in title. [#24970](https://github.com/grafana/grafana/pull/24970), [@dprokop](https://github.com/dprokop)
|
||||
- **Datasource/CloudWatch**: Field suggestions no longer limited to prefix-only. [#24855](https://github.com/grafana/grafana/pull/24855), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Explore/Table**: Keep existing field types if possible. [#24944](https://github.com/grafana/grafana/pull/24944), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Explore**: Fix wrap lines toggle for results of queries with filter expression. [#24915](https://github.com/grafana/grafana/pull/24915), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore**: fix undo in query editor. [#24797](https://github.com/grafana/grafana/pull/24797), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Explore**: fix word break in type head info. [#25014](https://github.com/grafana/grafana/pull/25014), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Graph**: Legend decimals now work as expected. [#24931](https://github.com/grafana/grafana/pull/24931), [@torkelo](https://github.com/torkelo)
|
||||
- **LoginPage**: Fix hover color for service buttons. [#25009](https://github.com/grafana/grafana/pull/25009), [@tskarhed](https://github.com/tskarhed)
|
||||
- **LogsPanel**: Fix scrollbar. [#24850](https://github.com/grafana/grafana/pull/24850), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **MoveDashboard**: Fix for moving dashboard caused all variables to be lost. [#25005](https://github.com/grafana/grafana/pull/25005), [@torkelo](https://github.com/torkelo)
|
||||
- **Organize transformer**: Use display name in field order comparer. [#24984](https://github.com/grafana/grafana/pull/24984), [@dprokop](https://github.com/dprokop)
|
||||
- **Panel**: shows correct panel menu items in view mode. [#24912](https://github.com/grafana/grafana/pull/24912), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **PanelEditor Fix missing labels and description if there is only single option in category**. [#24905](https://github.com/grafana/grafana/pull/24905), [@dprokop](https://github.com/dprokop)
|
||||
- **PanelEditor**: Overrides name matcher still show all original field names even after Field default display name is specified. [#24933](https://github.com/grafana/grafana/pull/24933), [@torkelo](https://github.com/torkelo)
|
||||
- **PanelInspector**: Makes sure Data display options are visible. [#24902](https://github.com/grafana/grafana/pull/24902), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **PanelInspector**: Hides unsupported data display options for Panel type. [#24918](https://github.com/grafana/grafana/pull/24918), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **PanelMenu**: Make menu disappear on button press. [#25015](https://github.com/grafana/grafana/pull/25015), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Postgres**: Fix add button. [#25087](https://github.com/grafana/grafana/pull/25087), [@phemmer](https://github.com/phemmer)
|
||||
- **Prometheus**: Fix recording rules expansion. [#24977](https://github.com/grafana/grafana/pull/24977), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Stackdriver**: Fix creating Service Level Objectives (SLO) datasource query variable. [#25023](https://github.com/grafana/grafana/pull/25023), [@papagian](https://github.com/papagian)
|
||||
|
||||
# 7.0.0 (2020-05-18)
|
||||
|
||||
## Breaking changes
|
||||
|
||||
- **Removed PhantomJS**: PhantomJS was deprecated in [Grafana v6.4](https://grafana.com/docs/grafana/latest/guides/whats-new-in-v6-4/#phantomjs-deprecation) and starting from Grafana v7.0.0, all PhantomJS support has been removed. This means that Grafana no longer ships with a built-in image renderer, and we advise you to install the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer).
|
||||
- **Docker**: Our Ubuntu based images have been upgraded to Ubuntu [20.04 LTS](https://releases.ubuntu.com/20.04/).
|
||||
- **Dashboard**: A global minimum dashboard refresh interval is now enforced and defaults to 5 seconds.
|
||||
- **@grafana/ui**: Forms migration notice, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
|
||||
- **@grafana/ui**: Select API change for creating custom values, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
|
||||
- **Interval calculation**: There is now a new option `Max data points` that controls the auto interval `$__interval` calculation. Interval was previously calculated by dividing the panel width by the time range. With the new max data points option it is now easy to set `$__interval` to a dynamic value that is time range agnostic. For example if you set `Max data points` to 10 Grafana will dynamically set `$__interval` by dividing the current time range by 10.
|
||||
- **Datasource/Loki**: Support for [deprecated Loki endpoints](https://github.com/grafana/loki/blob/master/docs/api.md#lokis-http-api) has been removed.
|
||||
- **Backend plugins**: Grafana now requires backend plugins to be signed, otherwise Grafana will not load/start them. This is an additional security measure to make sure backend plugin binaries and files haven't been tampered with. Refer to [Upgrade Grafana](https://grafana.com/docs/grafana/latest/installation/upgrading/#upgrading-to-v7-0) for more information.
|
||||
- **Docker**: Our Ubuntu based images have been upgraded to Ubuntu [20.04 LTS](https://releases.ubuntu.com/20.04/).
|
||||
- **@grafana/ui**: Forms migration notice, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
|
||||
- **@grafana/ui**: Select API change for creating custom values, see [@grafana/ui changelog](https://github.com/grafana/grafana/blob/master/packages/grafana-ui/CHANGELOG.md)
|
||||
|
||||
**Deprecation warnings**
|
||||
|
||||
@@ -51,7 +137,7 @@ Grafana 7.0 comes with a new table panel (and deprecates the old one). This new
|
||||
|
||||
### Panel inspector
|
||||
|
||||
The panel inspector is a feature that every panel will support, including internal as well as external community plugins. In this new panel inspector, you can view the raw data in a table format, apply some pre-defined transformations, and download as CSV. You can find the __Inspect__ setting in the panel menu. Use the keyboard shortcut `i` when hovering over a panel to get the panel inspector to appear.
|
||||
The panel inspector is a feature that every panel will support, including internal as well as external community plugins. In this new panel inspector, you can view the raw data in a table format, apply some pre-defined transformations, and download as CSV. You can find the **Inspect** setting in the panel menu. Use the keyboard shortcut `i` when hovering over a panel to get the panel inspector to appear.
|
||||
|
||||
### Improved time zone support
|
||||
|
||||
@@ -61,6 +147,73 @@ With this feature, you can specify the local time zone of the service or system
|
||||
|
||||
We have also extended the time zone options so you can select any of the standard [ISO 8601 time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
|
||||
|
||||
### Features / Enhancements
|
||||
|
||||
- **Azure Monitor**: Deep linking from Log Analytic queries to the Azure Portal. [#24417](https://github.com/grafana/grafana/pull/24417), [@daniellee](https://github.com/daniellee)
|
||||
- **Backend plugins**: Log deprecation warning when using the unofficial first version of backend plugins. [#24675](https://github.com/grafana/grafana/pull/24675), [@marefr](https://github.com/marefr)
|
||||
- **CloudWatch/Logs**: Add data links to CloudWatch logs for deep linking to AWS. [#24334](https://github.com/grafana/grafana/pull/24334), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **CloudWatch**: Unify look of query mode select between dashboard and explore. [#24648](https://github.com/grafana/grafana/pull/24648), [@aocenas](https://github.com/aocenas)
|
||||
- **Docker**: Adds tzdata package to Ubuntu image. [#24422](https://github.com/grafana/grafana/pull/24422), [@xlson](https://github.com/xlson)
|
||||
- **Editor**: New line on Enter, run query on Shift+Enter. [#24654](https://github.com/grafana/grafana/pull/24654), [@davkal](https://github.com/davkal)
|
||||
- **Loki**: Allow multiple derived fields with the same name. [#24437](https://github.com/grafana/grafana/pull/24437), [@aocenas](https://github.com/aocenas)
|
||||
- **Orgs**: Add future deprecation notice. [#24502](https://github.com/grafana/grafana/pull/24502), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **@grafana/toolkit**: Use process.cwd() instead of PWD to get directory. [#24677](https://github.com/grafana/grafana/pull/24677), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Admin**: Makes long settings values line break in settings page. [#24559](https://github.com/grafana/grafana/pull/24559), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Azure Monitor**: Fix failure when using table join in Log Analytics queries. [#24528](https://github.com/grafana/grafana/pull/24528), [@daniellee](https://github.com/daniellee)
|
||||
- **CloudWatch/Logs**: Add error message when log groups are not selected. [#24361](https://github.com/grafana/grafana/pull/24361), [@aocenas](https://github.com/aocenas)
|
||||
- **CloudWatch/Logs**: Allows a user to search for log groups that aren't there initially. [#24695](https://github.com/grafana/grafana/pull/24695), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **CloudWatch/Logs**: Correctly interpolate variables in logs queries. [#24619](https://github.com/grafana/grafana/pull/24619), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **CloudWatch/Logs**: Fix autocomplete after by keyword. [#24644](https://github.com/grafana/grafana/pull/24644), [@aocenas](https://github.com/aocenas)
|
||||
- **CloudWatch/Logs**: Fix field autocomplete suggestions inside function. [#24406](https://github.com/grafana/grafana/pull/24406), [@aocenas](https://github.com/aocenas)
|
||||
- **CloudWatch/Logs**: Fix fields not being refetched when log group changed. [#24529](https://github.com/grafana/grafana/pull/24529), [@aocenas](https://github.com/aocenas)
|
||||
- **CloudWatch/Logs**: Fix panic on multiple aggregations queries. [#24683](https://github.com/grafana/grafana/pull/24683), [@aocenas](https://github.com/aocenas)
|
||||
- **CloudWatch/Logs**: Fix query error when results were sparse. [#24702](https://github.com/grafana/grafana/pull/24702), [@aocenas](https://github.com/aocenas)
|
||||
- **CloudWatch/Logs**: Fix suggestion for already inserted field. [#24581](https://github.com/grafana/grafana/pull/24581), [@aocenas](https://github.com/aocenas)
|
||||
- **CloudWatch/Logs**: Fix suggestions of fields after comma. [#24520](https://github.com/grafana/grafana/pull/24520), [@aocenas](https://github.com/aocenas)
|
||||
- **CloudWatch/Logs**: Fixes various autocomplete issues. [#24583](https://github.com/grafana/grafana/pull/24583), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **CloudWatch/Logs**: Handle errors that are not awserr.Error instances. [#24641](https://github.com/grafana/grafana/pull/24641), [@aknuds1](https://github.com/aknuds1)
|
||||
- **CloudWatch/Logs**: Handle invalidation of log groups when switching data source. [#24703](https://github.com/grafana/grafana/pull/24703), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **CloudWatch/Logs**: Make stats hint show consistently. [#24392](https://github.com/grafana/grafana/pull/24392), [@aocenas](https://github.com/aocenas)
|
||||
- **CloudWatch/Logs**: Prevents hidden data frame fields from displaying in tables. [#24580](https://github.com/grafana/grafana/pull/24580), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **CloudWatch/Logs**: Results of stats queries are now grouped. [#24396](https://github.com/grafana/grafana/pull/24396), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **CloudWatch/Logs**: Usability improvements. [#24447](https://github.com/grafana/grafana/pull/24447), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Dashboard**: Allow editing provisioned dashboard JSON and add confirmation when JSON is copied to dashboard. [#24680](https://github.com/grafana/grafana/pull/24680), [@dprokop](https://github.com/dprokop)
|
||||
- **Dashboard**: Fix for strange "dashboard not found" errors when opening links in dashboard settings. [#24416](https://github.com/grafana/grafana/pull/24416), [@torkelo](https://github.com/torkelo)
|
||||
- **Dashboard**: Fix so default data source is selected when data source can't be found in panel editor. [#24526](https://github.com/grafana/grafana/pull/24526), [@mckn](https://github.com/mckn)
|
||||
- **Dashboard**: Fixed issue changing a panel from transparent back to normal in panel editor. [#24483](https://github.com/grafana/grafana/pull/24483), [@torkelo](https://github.com/torkelo)
|
||||
- **Dashboard**: Make header names reflect the field name when exporting to CSV file from the the panel inspector. [#24624](https://github.com/grafana/grafana/pull/24624), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **Dashboard**: Make sure side pane is displayed with tabs by default in panel editor. [#24636](https://github.com/grafana/grafana/pull/24636), [@dprokop](https://github.com/dprokop)
|
||||
- **Data source**: Fix query/annotation help content formatting. [#24687](https://github.com/grafana/grafana/pull/24687), [@AgnesToulet](https://github.com/AgnesToulet)
|
||||
- **Data source**: Fixes async mount errors. [#24579](https://github.com/grafana/grafana/pull/24579), [@Estrax](https://github.com/Estrax)
|
||||
- **Data source**: Fixes saving a data source without failure when URL doesn't specify a protocol. [#24497](https://github.com/grafana/grafana/pull/24497), [@aknuds1](https://github.com/aknuds1)
|
||||
- **Explore/Prometheus**: Show results of instant queries only in table. [#24508](https://github.com/grafana/grafana/pull/24508), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore**: Fix rendering of react query editors. [#24593](https://github.com/grafana/grafana/pull/24593), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore**: Fixes loading more logs in logs context view. [#24135](https://github.com/grafana/grafana/pull/24135), [@Estrax](https://github.com/Estrax)
|
||||
- **Graphite**: Fix schema and dedupe strategy in rollup indicators for Metrictank queries. [#24685](https://github.com/grafana/grafana/pull/24685), [@torkelo](https://github.com/torkelo)
|
||||
- **Graphite**: Makes query annotations work again. [#24556](https://github.com/grafana/grafana/pull/24556), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Logs**: Clicking "Load more" from context overlay doesn't expand log row. [#24299](https://github.com/grafana/grafana/pull/24299), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **Logs**: Fix total bytes process calculation. [#24691](https://github.com/grafana/grafana/pull/24691), [@davkal](https://github.com/davkal)
|
||||
- **Org/user/team preferences**: Fixes so UI Theme can be set back to Default. [#24628](https://github.com/grafana/grafana/pull/24628), [@AgnesToulet](https://github.com/AgnesToulet)
|
||||
- **Plugins**: Fix manifest validation. [#24573](https://github.com/grafana/grafana/pull/24573), [@aknuds1](https://github.com/aknuds1)
|
||||
- **Provisioning**: Use proxy as default access mode in provisioning. [#24669](https://github.com/grafana/grafana/pull/24669), [@bergquist](https://github.com/bergquist)
|
||||
- **Search**: Fix select item when pressing enter and Grafana is served using a sub path. [#24634](https://github.com/grafana/grafana/pull/24634), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Search**: Save folder expanded state. [#24496](https://github.com/grafana/grafana/pull/24496), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Security**: Tag value sanitization fix in OpenTSDB data source. [#24539](https://github.com/grafana/grafana/pull/24539), [@rotemreiss](https://github.com/rotemreiss)
|
||||
- **Table**: Do not include angular options in options when switching from angular panel. [#24684](https://github.com/grafana/grafana/pull/24684), [@torkelo](https://github.com/torkelo)
|
||||
- **Table**: Fixed persisting column resize for time series fields. [#24505](https://github.com/grafana/grafana/pull/24505), [@torkelo](https://github.com/torkelo)
|
||||
- **Table**: Fixes Cannot read property subRows of null. [#24578](https://github.com/grafana/grafana/pull/24578), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Time picker**: Fixed so you can enter a relative range in the time picker without being converted to absolute range. [#24534](https://github.com/grafana/grafana/pull/24534), [@mckn](https://github.com/mckn)
|
||||
- **Transformations**: Make transform dropdowns not cropped. [#24615](https://github.com/grafana/grafana/pull/24615), [@dprokop](https://github.com/dprokop)
|
||||
- **Transformations**: Sort order should be preserved as entered by user when using the reduce transformation. [#24494](https://github.com/grafana/grafana/pull/24494), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Units**: Adds scale symbol for currencies with suffixed symbol. [#24678](https://github.com/grafana/grafana/pull/24678), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Variables**: Fixes filtering options with more than 1000 entries. [#24614](https://github.com/grafana/grafana/pull/24614), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Variables**: Fixes so Textbox variables read value from url. [#24623](https://github.com/grafana/grafana/pull/24623), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Zipkin**: Fix error when span contains remoteEndpoint. [#24524](https://github.com/grafana/grafana/pull/24524), [@aocenas](https://github.com/aocenas)
|
||||
- **SAML**: Switch from email to login for user login attribute mapping (Enterprise)
|
||||
|
||||
# 7.0.0-beta3 (2020-05-08)
|
||||
|
||||
### Features / Enhancements
|
||||
@@ -127,6 +280,7 @@ We have also extended the time zone options so you can select any of the standar
|
||||
- **Tracing**: Fix view bounds after trace change. [#23994](https://github.com/grafana/grafana/pull/23994), [@aocenas](https://github.com/aocenas)
|
||||
- **Variables**: Migrates old tags format for consistency. [#24276](https://github.com/grafana/grafana/pull/24276), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Reporting**: Update report schedule as soon as a report is updated (Enterprise)
|
||||
- **White-labeling**: Makes login title and subtitle configurable (Enterprise)
|
||||
|
||||
# 7.0.0-beta1 (2020-04-28)
|
||||
|
||||
@@ -258,6 +412,10 @@ We have also extended the time zone options so you can select any of the standar
|
||||
- **Rich history**: Fix create url and run query for various datasources. [#23627](https://github.com/grafana/grafana/pull/23627), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Security**: Fix XSS vulnerability in table panel. [#23816](https://github.com/grafana/grafana/pull/23816), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
# 6.7.4 (2020-06-03)
|
||||
|
||||
- **Security**: Urgent security patch release. Please read more in our [blog](https://grafana.com/blog/2020/06/03/grafana-6.7.4-and-7.0.2-released-with-important-security-fix/)
|
||||
|
||||
# 6.7.3 (2020-04-23)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -58,10 +58,10 @@ When you're ready to contribute, it's time to [Create a pull request](/contribut
|
||||
|
||||
#### Contributor License Agreement (CLA)
|
||||
|
||||
Before we can accept your pull request, you need to [sign our CLA](https://grafana.com/docs/contribute/cla/). If you haven't, our CLA assistant prompts you to when you create your pull request.
|
||||
Before we can accept your pull request, you need to [sign our CLA](https://grafana.com/docs/grafana/latest/developers/cla/). If you haven't, our CLA assistant prompts you to when you create your pull request.
|
||||
|
||||
## Where do I go from here?
|
||||
|
||||
- Set up your [development environment](contribute/developer-guide.md).
|
||||
- Learn how to [contribute documentation](contribute/documentation.md).
|
||||
- Get started [developing plugins](https://grafana.com/docs/plugins/developing/development/) for Grafana.
|
||||
- Get started [developing plugins](https://grafana.com/docs/grafana/latest/developers/plugins/) for Grafana.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM node:12.16.3-alpine3.11 as js-builder
|
||||
FROM node:12.18.1-alpine3.12 as js-builder
|
||||
|
||||
WORKDIR /usr/src/app/
|
||||
|
||||
@@ -16,7 +16,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN ./node_modules/.bin/grunt build
|
||||
|
||||
FROM golang:1.14.2-alpine3.11 as go-builder
|
||||
FROM golang:1.14.4-alpine3.12 as go-builder
|
||||
|
||||
RUN apk add --no-cache gcc g++
|
||||
|
||||
@@ -32,7 +32,7 @@ COPY build.go package.json ./
|
||||
RUN go run build.go build
|
||||
|
||||
# Final stage
|
||||
FROM alpine:3.11
|
||||
FROM alpine:3.12
|
||||
|
||||
LABEL maintainer="Grafana team <hello@grafana.com>"
|
||||
|
||||
|
||||
203
GOVERNANCE.md
Normal file
203
GOVERNANCE.md
Normal file
@@ -0,0 +1,203 @@
|
||||
# Governance
|
||||
|
||||
This document describes the rules and governance of the project. It is meant to be followed by all the developers of the project and the Grafana community. Common terminology used in this governance document are listed below:
|
||||
|
||||
- **Team members**: Any members of the private [grafana-team][team] Google group.
|
||||
|
||||
- **Maintainers**: Maintainers lead an individual project or parts thereof ([`MAINTAINERS.md`][maintainers]).
|
||||
|
||||
- **Projects**: A single repository in the Grafana GitHub organization and listed below is referred to as a project:
|
||||
|
||||
- clock-panel
|
||||
- devtools
|
||||
- gel-app
|
||||
- grafana
|
||||
- grafana-github-datasource
|
||||
- grafana-image-renderer
|
||||
- grafana-kiosk
|
||||
- grafana-plugin-sdk-go
|
||||
- grafana-polystat-panel
|
||||
- grafonnet-lib
|
||||
- kairosdb-datasource
|
||||
- piechart-panel
|
||||
- simple-angular-panel
|
||||
- simple-app-plugin
|
||||
- simple-datasource
|
||||
- simple-datasource-backend
|
||||
- simple-json-backend-datasource
|
||||
- simple-json-datasource
|
||||
- simple-react-panel
|
||||
- strava-datasource
|
||||
- tutorials
|
||||
- worldmap-panel
|
||||
|
||||
- **The Grafana project**: The sum of all activities performed under this governance, concerning one or more repositories or the community.
|
||||
|
||||
## Values
|
||||
|
||||
The Grafana developers and community are expected to follow the values defined in the Grafana Code of Conduct. Furthermore, the Grafana community strives for kindness, giving feedback effectively, and building a welcoming environment. The Grafana developers generally decide by consensus and only resort to conflict resolution by a majority vote if consensus cannot be reached.
|
||||
|
||||
## Projects
|
||||
|
||||
Each project must have a [`MAINTAINERS.md`][maintainers] file with at least one maintainer. Where a project has a release process, access and documentation should be such that more than one person can perform a release. Releases should be announced on the Grafana Labs blog. Any new projects should be first proposed on the [team mailing list][team] following the voting procedures listed below.
|
||||
|
||||
## Decision making
|
||||
|
||||
### Team members
|
||||
|
||||
Team member status may be given to those who have made ongoing contributions to the Grafana project for at least 3 months. This is usually in the form of code improvements and/or notable work on documentation, but organizing events or user support could also be taken into account.
|
||||
|
||||
New members may be proposed by any existing member by email to [grafana-team][team]. It is highly desirable to reach consensus about acceptance of a new member. However, the proposal is ultimately voted on by a formal [supermajority vote](#supermajority-vote).
|
||||
|
||||
If the new member proposal is accepted, the proposed team member should be contacted privately via email to confirm or deny their acceptance of team membership. This email will also be CC'd to [grafana-team][team] for record-keeping purposes.
|
||||
|
||||
If they choose to accept, the [onboarding](#onboarding) procedure is followed.
|
||||
|
||||
Team members may retire at any time by emailing [the team][team].
|
||||
|
||||
Team members can be removed by [supermajority vote](#supermajority-vote) on [the team mailing list][team].
|
||||
For this vote, the member in question is not eligible to vote and does not count towards the quorum.
|
||||
Any removal vote can cover only one single person.
|
||||
|
||||
Upon death of a member, they leave the team automatically.
|
||||
|
||||
In case a member leaves, the [offboarding](#offboarding) procedure is applied.
|
||||
|
||||
The current team members are:
|
||||
|
||||
- Alexander Zobnin ([Grafana Labs](https://grafana.com/))
|
||||
- Andrej Ocenas ([Grafana Labs](https://grafana.com/))
|
||||
- Arve Knudsen ([Grafana Labs](https://grafana.com/))
|
||||
- Brian Gann ([Grafana Labs](https://grafana.com/))
|
||||
- Carl Bergquist ([Grafana Labs](https://grafana.com/))
|
||||
- Chris Trott ([Grafana Labs](https://grafana.com/))
|
||||
- Daniel Lee ([Grafana Labs](https://grafana.com/))
|
||||
- David Kaltschmidt ([Grafana Labs](https://grafana.com/))
|
||||
- Diana Payton ([Grafana Labs](https://grafana.com/))
|
||||
- Diana Sarlinska ([Grafana Labs](https://grafana.com/))
|
||||
- Dominik Prokop ([Grafana Labs](https://grafana.com/))
|
||||
- Emil Tullstedt ([Grafana Labs](https://grafana.com/))
|
||||
- Hugo Häggmark ([Grafana Labs](https://grafana.com/))
|
||||
- Ivana Huckova ([Grafana Labs](https://grafana.com/))
|
||||
- Jeroen Op 't Eynde ([Grafana Labs](https://grafana.com/))
|
||||
- Jessica Müller ([Grafana Labs](https://grafana.com/))
|
||||
- Julien Pivotto ([Inuits](https://inuits.eu/))
|
||||
- Kay Delaney ([Grafana Labs](https://grafana.com/))
|
||||
- Kyle Brandt ([Grafana Labs](https://grafana.com/))
|
||||
- Leonard Gram ([Grafana Labs](https://grafana.com/))
|
||||
- Lukas Siatka ([Grafana Labs](https://grafana.com/))
|
||||
- Malcolm Holmes ([Grafana Labs](https://grafana.com/))
|
||||
- Marcus Andersson ([Grafana Labs](https://grafana.com/))
|
||||
- Marcus Efraimsson ([Grafana Labs](https://grafana.com/))
|
||||
- Marcus Olsson ([Grafana Labs](https://grafana.com/))
|
||||
- Mitsuhiro Tanda ([GREE](https://corp.gree.net/jp/en/))
|
||||
- Patrick O’Carroll ([Grafana Labs](https://grafana.com/))
|
||||
- Peter Holmberg ([Grafana Labs](https://grafana.com/))
|
||||
- Richard Hartmann ([Grafana Labs](https://grafana.com/))
|
||||
- Ryan McKinley ([Grafana Labs](https://grafana.com/))
|
||||
- Sofia Papagiannaki ([Grafana Labs](https://grafana.com/))
|
||||
- Stephanie Closson ([Grafana Labs](https://grafana.com/))
|
||||
- Tobias Skarhed ([Grafana Labs](https://grafana.com/))
|
||||
- Torkel Ödegaard ([Grafana Labs](https://grafana.com/))
|
||||
- Utkarsh Bhatnagar ([Tinder](https://www.tinder.com/))
|
||||
|
||||
### Maintainers
|
||||
|
||||
Maintainers lead one or more project(s) or parts thereof and serve as a point of conflict resolution amongst the contributors to this project. Ideally, maintainers are also team members, but exceptions are possible for suitable maintainers that, for whatever reason, are not yet team members.
|
||||
|
||||
Changes in maintainership have to be announced on the [developers mailing list][devs]. They are decided by [rough consensus](#consensus) and formalized by changing the [`MAINTAINERS.md`][maintainers] file of the respective repository.
|
||||
|
||||
Maintainers are granted commit rights to all projects covered by this governance.
|
||||
|
||||
A maintainer or committer may resign by notifying the [team mailing list][team]. A maintainer with no project activity for a year is considered to have resigned. Maintainers that wish to resign are encouraged to propose another team member to take over the project.
|
||||
|
||||
A project may have multiple maintainers, as long as the responsibilities are clearly agreed upon between them. This includes coordinating who handles which issues and pull requests.
|
||||
|
||||
### Technical decisions
|
||||
|
||||
Technical decisions that only affect a single project are made informally by the maintainer of this project, and [rough consensus](#consensus) is assumed. Technical decisions that span multiple parts of the Grafana project should be discussed and made on the [Grafana developer mailing list][devs].
|
||||
|
||||
Decisions are usually made by [rough consensus](#consensus). If no consensus can be reached, the matter may be resolved by [majority vote](#majority-vote).
|
||||
|
||||
### Governance changes
|
||||
|
||||
Changes to this document are made by Grafana Labs.
|
||||
|
||||
### Other matters
|
||||
|
||||
Any matter that needs a decision may be called to a vote by any member if they deem it necessary. For private or personnel matters, discussion and voting takes place on the [team mailing list][team], otherwise on the [developer mailing list][devs].
|
||||
|
||||
## Voting
|
||||
|
||||
The Grafana project usually runs by informal consensus, however sometimes a formal decision must be made.
|
||||
|
||||
Depending on the subject matter, as laid out [above](#decision-making), different methods of voting are used.
|
||||
|
||||
For all votes, voting must be open for at least one week. The end date should be clearly stated in the call to vote. A vote may be called and closed early if enough votes have come in one way so that further votes cannot change the final decision.
|
||||
|
||||
In all cases, all and only [team members](#team-members) are eligible to vote, with the sole exception of the forced removal of a team member, in which said member is not eligible to vote.
|
||||
|
||||
Discussion and votes on personnel matters (including but not limited to team membership and maintainership) are held in private on the [team mailing list][team]. All other discussion and votes are held in public on the [developer mailing list][devs].
|
||||
|
||||
For public discussions, anyone interested is encouraged to participate. Formal power to object or vote is limited to [team members](#team-members).
|
||||
|
||||
### Consensus
|
||||
|
||||
The default decision making mechanism for the Grafana project is [rough][rough] consensus. This means that any decision on technical issues is considered supported by the [team][team] as long as nobody objects or the objection has been considered but not necessarily accommodated.
|
||||
|
||||
Silence on any consensus decision is implicit agreement and equivalent to explicit agreement. Explicit agreement may be stated at will. Decisions may, but do not need to be called out and put up for decision on the [developers mailing list][devs] at any time and by anyone.
|
||||
|
||||
Consensus decisions can never override or go against the spirit of an earlier explicit vote.
|
||||
|
||||
If any [team member](#team-members) raises objections, the team members work together towards a solution that all involved can accept. This solution is again subject to rough consensus.
|
||||
|
||||
In case no consensus can be found, but a decision one way or the other must be made, any [team member](#team-members) may call a formal [majority vote](#majority-vote).
|
||||
|
||||
### Majority vote
|
||||
|
||||
Majority votes must be called explicitly in a separate thread on the appropriate mailing list. The subject must be prefixed with `[VOTE]`. In the body, the call to vote must state the proposal being voted on. It should reference any discussion leading up to this point.
|
||||
|
||||
Votes may take the form of a single proposal, with the option to vote yes or no, or the form of multiple alternatives.
|
||||
|
||||
A vote on a single proposal is considered successful if more vote in favor than against.
|
||||
|
||||
If there are multiple alternatives, members may vote for one or more alternatives, or vote “no” to object to all alternatives. It is not possible to cast an “abstain” vote. A vote on multiple alternatives is considered decided in favor of one alternative if it has received the most votes in favor, and a vote from more than half of those voting. Should no alternative reach this quorum, another vote on a reduced number of options may be called separately.
|
||||
|
||||
### Supermajority vote
|
||||
|
||||
Supermajority votes must be called explicitly in a separate thread on the appropriate mailing list. The subject must be prefixed with `[VOTE]`. In the body, the call to vote must state the proposal being voted on. It should reference any discussion leading up to this point.
|
||||
|
||||
Votes may take the form of a single proposal, with the option to vote yes or no, or the form of multiple alternatives.
|
||||
|
||||
A vote on a single proposal is considered successful if at least two thirds of those eligible to vote vote in favor.
|
||||
|
||||
If there are multiple alternatives, members may vote for one or more alternatives, or vote “no” to object to all alternatives. A vote on multiple alternatives is considered decided in favor of one alternative if it has received the most votes in favor, and a vote from at least two thirds of those eligible to vote. Should no alternative reach this quorum, another vote on a reduced number of options may be called separately.
|
||||
|
||||
## On- / Offboarding
|
||||
|
||||
### Onboarding
|
||||
|
||||
The new member is
|
||||
|
||||
- added to the list of [team members](#team-members). Ideally by sending a PR of their own, at least approving said PR.
|
||||
- announced on the [developers mailing list][devs] by an existing team member. Ideally, the new member replies in this thread, acknowledging team membership.
|
||||
- added to the projects with commit rights.
|
||||
- added to the [team mailing list][team].
|
||||
|
||||
### Offboarding
|
||||
|
||||
The ex-member is
|
||||
|
||||
- removed from the list of [team members](#team-members). Ideally by sending a PR of their own, at least approving said PR. In case of forced removal, no approval is needed.
|
||||
- removed from the projects. Optionally, they can retain maintainership of one or more repositories if the [team](#team-members) agrees.
|
||||
- removed from the team mailing list and demoted to a normal member of the other mailing lists.
|
||||
- not allowed to call themselves an active team member any more, nor allowed to imply this to be the case.
|
||||
- added to a list of previous members if they so choose.
|
||||
|
||||
If needed, we reserve the right to publicly announce removal.
|
||||
|
||||
[coc]: https://github.com/grafana/grafana/blob/master/CODE_OF_CONDUCT.md
|
||||
[devs]: https://groups.google.com/forum/#!forum/grafana-developers
|
||||
[maintainers]: https://github.com/grafana/grafana/blob/master/MAINTAINERS.md
|
||||
[rough]: https://tools.ietf.org/html/rfc7282
|
||||
[team]: https://groups.google.com/forum/#!forum/grafana-team
|
||||
@@ -143,7 +143,7 @@ Label | Description
|
||||
`type/feature-request` | Request for a new feature or enhancement.
|
||||
`type/docs` | Documentation problem or enhancement.
|
||||
`type/accessibility` | Accessibility problem or enhancement.
|
||||
`type/question` | Issue is or perceived as a question.
|
||||
`type/question` | Issue is a question or is perceived as such.
|
||||
`type/duplicate` | An existing issue of the same subject/request have already been reported.
|
||||
`type/works-as-intended` | A reported bug works as intended/by design.
|
||||
`type/build-packaging` | Build or packaging problem or enhancement.
|
||||
@@ -152,7 +152,7 @@ Label | Description
|
||||
|
||||
### Duplicate issue?
|
||||
|
||||
Make sure that it's not a duplicate by searching existing issues using related terms from the issue title and description. If you think you know there are an existing issue, but can't find it please reach out to one of the maintainers and ask for help. If you identify that the issue is a duplicate of an existing issue:
|
||||
Make sure it's not a duplicate by searching existing issues using related terms from the issue title and description. If you think you know there is an existing issue, but can't find it, please reach out to one of the maintainers and ask for help. If you identify that the issue is a duplicate of an existing issue:
|
||||
|
||||
1. Add a comment `Duplicate of #<issue number>`. GitHub will recognize this and add some additional context to the issue activity.
|
||||
2. Close the issue and label it with `type/duplicate`.
|
||||
@@ -188,8 +188,8 @@ If it's not perfectly clear that it's an actual bug, quickly try to reproduce it
|
||||
First, evaluate if the documentation makes sense to be included in the Grafana project:
|
||||
|
||||
- Is this something we want/can maintain as a project?
|
||||
- Is this referring to usage of some specific integration/tool and in that case are those a popular use case in combination with Grafana?
|
||||
- If unsure, kindly and politely add a comment explaining that we would need [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments) to identify that lots of other users wants/needs this.
|
||||
- Is this referring to usage of some specific integration/tool and in that case is that a popular use case in combination with Grafana?
|
||||
- If unsure, kindly and politely add a comment explaining that we would need [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments) to identify that lots of other users want/need this.
|
||||
|
||||
Second, label the issue `type/docs` and at least one `area/*` or `datasource/*` label.
|
||||
|
||||
@@ -219,9 +219,9 @@ In general bugs and enhancement issues should be labeled with a priority.
|
||||
|
||||
This is the most difficult thing with triaging issues since it requires a lot of knowledge, context and experience before being able to think of and start feel comfortable adding a certain priority label.
|
||||
|
||||
The key here is asking for help and discuss issues to understand how more experienced project members thinks and reason. By doing that you learn more and eventually be more and more comfortable with prioritizing issues.
|
||||
The key here is asking for help and discuss issues to understand how more experienced project members think and reason. By doing that you learn more and eventually be more and more comfortable with prioritizing issues.
|
||||
|
||||
In any case there are uncertainty around the priorization of an issue, please ask the maintainers for help.
|
||||
In case there is an uncertainty around the prioritization of an issue, please ask the maintainers for help.
|
||||
|
||||
Label | Description
|
||||
------- | --------
|
||||
@@ -235,7 +235,7 @@ Label | Description
|
||||
|
||||
**Critical bug?**
|
||||
|
||||
1. If a bug have been categorized and any of the following problems applies the bug should be labeled as critical and must be actively worked on as someone's top priority right now.
|
||||
1. If a bug has been categorized and any of the following criteria apply, the bug should be labeled as critical and must be actively worked on as someone's top priority right now.
|
||||
|
||||
- Results in any data loss
|
||||
- Critical security or performance issues
|
||||
@@ -273,9 +273,9 @@ Label | Description
|
||||
|
||||
## 5. Requesting help from the community
|
||||
|
||||
Depending on the issue and/or priority, it's always a good idea to consider signalling to the community that help from community is appreciated and needed in case an issue is not prioritized to be worked on by maintainers. Use your best judgement. In general, when requesting help from the community it means a contribution has a good chance of getting accepted and merged.
|
||||
Depending on the issue and/or priority, it's always a good idea to consider signalling to the community that help from community is appreciated and needed in case an issue is not prioritized to be worked on by maintainers. Use your best judgement. In general, requesting help from the community means that a contribution has a good chance of getting accepted and merged.
|
||||
|
||||
In many cases the issue author or community as a whole is more suitable to contribute changes since they're experts in their domain. It's also quite common that someone has tried to get something to work using the documentation without success and made an effort to get it to work and/or reached out to the [community site](https://community.grafana.com/) to get the missing information. In especially these areas it's more likely that there exists experts in their own domain and usually a good idea to request help from contributors:
|
||||
In many cases the issue author or community as a whole is more suitable to contribute changes since they're experts in their domain. It's also quite common that someone has tried to get something to work using the documentation without success and made an effort to get it to work and/or reached out to the [community site](https://community.grafana.com/) to get the missing information. Particularly in these areas it's more likely that there exist experts in their own domain and it is usually a good idea to request help from contributors:
|
||||
|
||||
- Database setups
|
||||
- Authentication like OAuth providers and LDAP setups
|
||||
@@ -292,11 +292,11 @@ In many cases the issue author or community as a whole is more suitable to contr
|
||||
|
||||
## Investigation of issues
|
||||
|
||||
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [Needs investigation](https://github.com/grafana/grafana/labels/needs%20investigation). Depending of the perceived severity and/or number of [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments), the investigation will either be delegated to another maintainer for further investigation or either put on hold until someone else (maintainer or contributor) picks it up and eventually start investigating it.
|
||||
When an issue has all basic information provided, but the triage responsible haven't been able to reproduce the reported problem at a first glance, the issue is labeled [Needs investigation](https://github.com/grafana/grafana/labels/needs%20investigation). Depending on the perceived severity and/or number of [upvotes](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments), the investigation will either be delegated to another maintainer for further investigation or put on hold until someone else (maintainer or contributor) picks it up and eventually starts investigating it.
|
||||
|
||||
Investigating issues can be a very time consuming task, especially for the maintainers given the huge number of combinations of plugins, data sources, platforms, databases, browsers, tools, hardware, integrations, versions and cloud services etc that are being used with Grafana. There are a certain amount of combinations that are more common than others and these are in general easier for maintainers to investigate.
|
||||
Investigating issues can be a very time consuming task, especially for the maintainers, given the huge number of combinations of plugins, data sources, platforms, databases, browsers, tools, hardware, integrations, versions and cloud services, etc that are being used with Grafana. There is a certain number of combinations that are more common than others, and these are in general easier for maintainers to investigate.
|
||||
|
||||
For some other combinations there may not be possible at all for a maintainer to setup a proper test environment for being able to investigate. In these cases we really appreciate any help we can get from the community. Otherwise the issue is highly likely to be closed.
|
||||
For some other combinations it may not be possible at all for a maintainer to setup a proper test environment to investigate the issue. In these cases we really appreciate any help we can get from the community. Otherwise the issue is highly likely to be closed.
|
||||
|
||||
Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments) the issue if you happen to have the same problem. If you have further details that may help investigating the issue please provide as much information as possible.
|
||||
|
||||
@@ -306,14 +306,14 @@ Part of issue triage should also be triaging of external PRs. Main goal should b
|
||||
|
||||
1. Check new external PRs which do not have a reviewer.
|
||||
1. Check if there is a link to an existing issue.
|
||||
1. If not and you know which issue it is solving add the link yourself, otherwise ask the author to link the issue or create one.
|
||||
1. If not and you know which issue it is solving, add the link yourself, otherwise ask the author to link the issue or create one.
|
||||
1. Assign a reviewer based on who was handling the linked issue or what code or feature does the PR touches (look at who was the last to make changes there if all else fails).
|
||||
|
||||
## Appendix
|
||||
|
||||
### Setting up Gmail filters
|
||||
|
||||
If you're using Gmail it's highly recommened that you setup filters to automatically remove email from the inbox and label them accordingly to make it easy for you to understand when you need to act upon a notification or process all incoming issues that haven't been triaged.
|
||||
If you're using Gmail it's highly recommended that you setup filters to automatically remove email from the inbox and label them accordingly to make it easy for you to understand when you need to act upon a notification or process all incoming issues that haven't been triaged.
|
||||
|
||||
This may be setup by personal preference, but here's a working configuration for reference.
|
||||
1. Follow instructions in [gist](https://gist.github.com/marefr/9167c2e31466f6316c1cba118874e74f)
|
||||
@@ -335,6 +335,6 @@ This will give you a structure of labels in the sidebar similar to the following
|
||||
- Grafana
|
||||
```
|
||||
|
||||
* All notifications you’ll need to read/take action on shows up as unread in Github (mine) and its sub-labels.
|
||||
* All other notifications you don’t need to take action on shows up as unread in Github (other) and its sub-labels
|
||||
* All notifications you’ll need to read/take action on show up as unread in Github (mine) and its sub-labels.
|
||||
* All other notifications you don’t need to take action on show up as unread in Github (other) and its sub-labels
|
||||
* This is convenient for issue triage and to follow the activity in the Grafana project.
|
||||
|
||||
8
MAINTAINERS.md
Normal file
8
MAINTAINERS.md
Normal file
@@ -0,0 +1,8 @@
|
||||
@torkelo is the main/default maintainer, some parts of the codebase have other maintainers:
|
||||
|
||||
* Backend:
|
||||
* @bergquist
|
||||
* Plugins:
|
||||
* @ryantxu
|
||||
* UX/UI:
|
||||
* @davkal
|
||||
33
Makefile
33
Makefile
@@ -4,7 +4,7 @@
|
||||
|
||||
-include local/Makefile
|
||||
|
||||
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go gosec revive golangci-lint go-vet test-go test-js test run run-frontend clean devenv devenv-down revive-alerting protobuf help
|
||||
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go revive golangci-lint test-go test-js test run run-frontend clean devenv devenv-down revive-strict protobuf help
|
||||
|
||||
GO = GO111MODULE=on go
|
||||
GO_FILES ?= ./pkg/...
|
||||
@@ -42,6 +42,7 @@ build-cli: ## Build Grafana CLI application.
|
||||
build-js: ## Build frontend assets.
|
||||
@echo "build frontend"
|
||||
yarn run build
|
||||
yarn run plugins:build-bundled
|
||||
|
||||
build: build-go build-js ## Build backend and frontend.
|
||||
|
||||
@@ -80,14 +81,18 @@ revive: scripts/go/bin/revive
|
||||
-config ./scripts/go/configs/revive.toml \
|
||||
$(GO_FILES)
|
||||
|
||||
revive-alerting: scripts/go/bin/revive
|
||||
@echo "lint alerting via revive"
|
||||
revive-strict: scripts/go/bin/revive
|
||||
@echo "lint via revive (strict)"
|
||||
@scripts/go/bin/revive \
|
||||
-formatter stylish \
|
||||
-config ./scripts/go/configs/revive-strict.toml \
|
||||
-exclude ./pkg/plugins/backendplugin/pluginextensionv2/... \
|
||||
./pkg/services/alerting/... \
|
||||
./pkg/services/provisioning/datasources/... \
|
||||
./pkg/services/provisioning/dashboards/...
|
||||
./pkg/services/provisioning/dashboards/... \
|
||||
./pkg/services/provisioning/notifiers/... \
|
||||
./pkg/services/provisioning/values/... \
|
||||
./pkg/plugins/backendplugin/...
|
||||
|
||||
scripts/go/bin/golangci-lint: scripts/go/go.mod
|
||||
@cd scripts/go; \
|
||||
@@ -96,26 +101,10 @@ scripts/go/bin/golangci-lint: scripts/go/go.mod
|
||||
golangci-lint: scripts/go/bin/golangci-lint
|
||||
@echo "lint via golangci-lint"
|
||||
@scripts/go/bin/golangci-lint run \
|
||||
--config ./scripts/go/configs/.golangci.yml \
|
||||
--config ./scripts/go/configs/.golangci.toml \
|
||||
$(GO_FILES)
|
||||
|
||||
scripts/go/bin/gosec: scripts/go/go.mod
|
||||
@cd scripts/go; \
|
||||
$(GO) build -o ./bin/gosec github.com/securego/gosec/cmd/gosec
|
||||
|
||||
# TODO recheck the rules and leave only necessary exclusions
|
||||
gosec: scripts/go/bin/gosec
|
||||
@echo "lint via gosec"
|
||||
@scripts/go/bin/gosec -quiet \
|
||||
-exclude=G104,G107,G108,G201,G202,G204,G301,G304,G401,G402,G501 \
|
||||
-conf=./scripts/go/configs/gosec.json \
|
||||
$(GO_FILES)
|
||||
|
||||
go-vet:
|
||||
@echo "lint via go vet"
|
||||
@$(GO) vet $(GO_FILES)
|
||||
|
||||
lint-go: go-vet golangci-lint revive revive-alerting gosec ## Run all code checks for backend.
|
||||
lint-go: golangci-lint revive revive-strict # Run all code checks for backend.
|
||||
|
||||
# with disabled SC1071 we are ignored some TCL,Expect `/usr/bin/env expect` scripts
|
||||
shellcheck: $(SH_FILES) ## Run checks for shell scripts.
|
||||
|
||||
@@ -15,15 +15,6 @@ Grafana allows you to query, visualize, alert on and understand your metrics no
|
||||
- **Alerting:** Visually define alert rules for your most important metrics. Grafana will continuously evaluate and send notifications to systems like Slack, PagerDuty, VictorOps, OpsGenie.
|
||||
- **Mixed Data Sources:** Mix different data sources in the same graph! You can specify a data source on a per-query basis. This works for even custom datasources.
|
||||
|
||||
### Grafana 7.0 and GrafanaCONline
|
||||
|
||||
- Grafana 7.0 Beta is [available for download](https://grafana.com/grafana/download).
|
||||
- Read [what's is new](https://grafana.com/docs/grafana/latest/guides/whats-new-in-v7-0/).
|
||||
|
||||
Want to learn more about Grafana 7 and more? Sign up for our online conference!
|
||||
|
||||
[](https://grafana.com/about/events/grafanacon/2020/?source=grafana-readme)
|
||||
|
||||
## Get started
|
||||
|
||||
- [Get Grafana](https://grafana.com/get)
|
||||
|
||||
@@ -6,7 +6,7 @@ Please encrypt your message to us; please use our PGP key. The key fingerprint i
|
||||
|
||||
F988 7BEA 027A 049F AE8E 5CAA D125 8932 BE24 C5CA
|
||||
|
||||
The key is available from [pgp.mit.edu](https://pgp.mit.edu/pks/lookup?op=get&search=0xF9887BEA027A049FAE8E5CAAD1258932BE24C5CA) by searching for [grafana](https://pgp.mit.edu/pks/lookup?search=grafana&op=index).
|
||||
The key is available from [keyserver.ubuntu.com](https://keyserver.ubuntu.com/pks/lookup?search=0xF9887BEA027A049FAE8E5CAAD1258932BE24C5CA&fingerprint=on&op=index).
|
||||
|
||||
Grafana Labs will send you a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
|
||||
|
||||
|
||||
73
WORKFLOW.md
Normal file
73
WORKFLOW.md
Normal file
@@ -0,0 +1,73 @@
|
||||
# Grafana workflow
|
||||
|
||||
This document is based on [GOVERNANCE.md](GOVERNANCE.md). We assume good faith and intend to keep all processes as lightweight as possible but as specific as required. In case of disagreements about anything in this document, GOVERNANCE.md applies.
|
||||
|
||||
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in [RFC2119](http://tools.ietf.org/html/rfc2119).
|
||||
|
||||
Git and [GitHub terminology](https://help.github.com/en/github/getting-started-with-github/github-glossary) are used throughout this document.
|
||||
|
||||
Team members and their access to repositories is maintained through [GitHub teams](https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/about-teams). Team maintainers add and remove team members as outlined in GOVERNANCE.md.
|
||||
|
||||
# Code changes
|
||||
|
||||
## Proposing changes
|
||||
|
||||
Examples of proposed changes are overarching architecture, component design, and specific code or graphical elements. Proposed changes SHOULD cover the big picture and intention, but individual parts SHOULD be split into the smallest possible changes. Changes SHOULD be based on and target the master branch. Depending on size of the proposed change, each change SHOULD be discussed, in increasing order of change size and complexity:
|
||||
* Directly in a RR (Pull Request) - this MAY be done, but SHOULD not be the common case.
|
||||
* Issue
|
||||
* Developer mailing list
|
||||
* Design document, shared via Google Docs, accessible to at least all team members.
|
||||
|
||||
Significant changes MUST be discussed and agreed upon with the relevant subsystem maintainers.
|
||||
|
||||
## Merging PRs (Pull Requests)
|
||||
|
||||
Depending on the size and complexity of a PR, different requirements MUST be applied. Any team member contributing substantially to a PR MUST NOT count against review requirements.
|
||||
Commits MUST be merged into master using PRs. They MUST NOT be merged into master directly.
|
||||
* Every merge MUST be approved by at least one team member.
|
||||
* Non-trivial changes MUST be approved by at least
|
||||
* two team members, or
|
||||
* one subsystem maintainer.
|
||||
* Significant changes MUST be approved by at least
|
||||
* two team members, AND
|
||||
* the relevant subsystem maintainer.
|
||||
|
||||
PRs MUST be [reviewed](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests) and [approved](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/approving-a-pull-request-with-required-reviews) via GitHub’s review system.
|
||||
* Reviewers MAY write comments if approving
|
||||
* Reviewers MUST write comments if rejecting a PR or if requesting changes.
|
||||
|
||||
Once a PR is approved as per above, any team member MAY merge the PR.
|
||||
|
||||
# Release workflow
|
||||
|
||||
## Branch structure
|
||||
|
||||
Grafana uses trunk-based development.
|
||||
|
||||
In particular, we found that the following principles match how we work:
|
||||
* Master and release branches MUST always build without failure.
|
||||
* Branches SHOULD be merged often. Larger changes SHOULD be activated with feature flags until they are ready. Long-lived development branches SHOULD be avoided.
|
||||
* Changes MAY be enabled by default once they are in a complete state
|
||||
* Changes which span multiple PRs MUST be described in an overarching issue or Google Doc.
|
||||
|
||||
## Releases
|
||||
|
||||
Releases MUST follow [Semantic Versioning](https://semver.org/) in naming and SHOULD follow Semantic Versioning as closely as reasonably possible for non-library software.
|
||||
|
||||
Release branches MUST be split from the following branches.
|
||||
* MAJOR release branches MUST be based on master.
|
||||
* MINOR release branches MUST be based on master.
|
||||
* PATCH release branches MUST be split from the relevant MINOR release branch’s most current PATCH
|
||||
|
||||
Security releases follow the same process but MUST be prepared in secret. Security releases MUST NOT include changes which are not related to the security fix. Normal release processes MUST accommodate the security release process. SECURITY.md MUST be followed.
|
||||
|
||||
PRs intended for inclusion in the next PATCH release MUST be labeled with `cherry-pick-needed` so they can be picked up by automated release tooling.
|
||||
|
||||
Releases follow the following cadence
|
||||
* MAJOR: Yearly
|
||||
* MINOR: Every 4-6 weeks
|
||||
* PATCH: As needed
|
||||
|
||||
Releases SHOULD NOT be delayed by pending changes.
|
||||
|
||||
Releases MUST be coordinated with the relevant subsystem maintainers.
|
||||
25
build.go
25
build.go
@@ -9,6 +9,7 @@ import (
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/build"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
@@ -57,8 +58,6 @@ func main() {
|
||||
log.SetOutput(os.Stdout)
|
||||
log.SetFlags(0)
|
||||
|
||||
ensureGoPath()
|
||||
|
||||
var buildIdRaw string
|
||||
|
||||
flag.StringVar(&goarch, "goarch", runtime.GOARCH, "GOARCH")
|
||||
@@ -106,16 +105,16 @@ func main() {
|
||||
|
||||
case "build-srv", "build-server":
|
||||
clean()
|
||||
build("grafana-server", "./pkg/cmd/grafana-server", []string{})
|
||||
doBuild("grafana-server", "./pkg/cmd/grafana-server", []string{})
|
||||
|
||||
case "build-cli":
|
||||
clean()
|
||||
build("grafana-cli", "./pkg/cmd/grafana-cli", []string{})
|
||||
doBuild("grafana-cli", "./pkg/cmd/grafana-cli", []string{})
|
||||
|
||||
case "build":
|
||||
//clean()
|
||||
for _, binary := range binaries {
|
||||
build(binary, "./pkg/cmd/"+binary, []string{})
|
||||
doBuild(binary, "./pkg/cmd/"+binary, []string{})
|
||||
}
|
||||
|
||||
case "build-frontend":
|
||||
@@ -417,18 +416,6 @@ func createPackage(options linuxPackageOptions) {
|
||||
runPrint("fpm", append([]string{"-t", options.packageType}, args...)...)
|
||||
}
|
||||
|
||||
func ensureGoPath() {
|
||||
if os.Getenv("GOPATH") == "" {
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
gopath := filepath.Clean(filepath.Join(cwd, "../../../../"))
|
||||
log.Println("GOPATH is", gopath)
|
||||
os.Setenv("GOPATH", gopath)
|
||||
}
|
||||
}
|
||||
|
||||
func grunt(params ...string) {
|
||||
if runtime.GOOS == windows {
|
||||
runPrint(`.\node_modules\.bin\grunt`, params...)
|
||||
@@ -476,7 +463,7 @@ func test(pkg string) {
|
||||
runPrint("go", "test", "-short", "-timeout", "60s", pkg)
|
||||
}
|
||||
|
||||
func build(binaryName, pkg string, tags []string) {
|
||||
func doBuild(binaryName, pkg string, tags []string) {
|
||||
libcPart := ""
|
||||
if libc != "" {
|
||||
libcPart = fmt.Sprintf("-%s", libc)
|
||||
@@ -554,7 +541,7 @@ func clean() {
|
||||
|
||||
rmr("dist")
|
||||
rmr("tmp")
|
||||
rmr(filepath.Join(os.Getenv("GOPATH"), fmt.Sprintf("pkg/%s_%s/github.com/grafana", goos, goarch)))
|
||||
rmr(filepath.Join(build.Default.GOPATH, fmt.Sprintf("pkg/%s_%s/github.com/grafana", goos, goarch)))
|
||||
}
|
||||
|
||||
func setBuildEnv() {
|
||||
|
||||
@@ -126,7 +126,8 @@ connstr =
|
||||
# This enables data proxy logging, default is false
|
||||
logging = false
|
||||
|
||||
# How long the data proxy should wait before timing out default is 30 (seconds)
|
||||
# How long the data proxy waits before timing out, default is 30 seconds.
|
||||
# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set.
|
||||
timeout = 30
|
||||
|
||||
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false.
|
||||
@@ -188,7 +189,6 @@ allow_embedding = false
|
||||
# Set to true if you want to enable http strict transport security (HSTS) response header.
|
||||
# This is only sent when HTTPS is enabled in this configuration.
|
||||
# HSTS tells browsers that the site should only be accessed using HTTPS.
|
||||
# The default will change to true in the next minor release, 6.3.
|
||||
strict_transport_security = false
|
||||
|
||||
# Sets how long a browser should cache HSTS. Only applied if strict_transport_security is enabled.
|
||||
@@ -202,12 +202,12 @@ strict_transport_security_subdomains = false
|
||||
|
||||
# Set to true to enable the X-Content-Type-Options response header.
|
||||
# The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised
|
||||
# in the Content-Type headers should not be changed and be followed. The default will change to true in the next minor release, 6.3.
|
||||
x_content_type_options = false
|
||||
# in the Content-Type headers should not be changed and be followed.
|
||||
x_content_type_options = true
|
||||
|
||||
# Set to true to enable the X-XSS-Protection header, which tells browsers to stop pages from loading
|
||||
# when they detect reflected cross-site scripting (XSS) attacks. The default will change to true in the next minor release, 6.3.
|
||||
x_xss_protection = false
|
||||
# when they detect reflected cross-site scripting (XSS) attacks.
|
||||
x_xss_protection = true
|
||||
|
||||
|
||||
#################################### Snapshots ###########################
|
||||
@@ -234,6 +234,9 @@ versions_to_keep = 20
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
min_refresh_interval = 5s
|
||||
|
||||
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
|
||||
default_home_dashboard_path =
|
||||
|
||||
#################################### Users ###############################
|
||||
[users]
|
||||
# disable user signup / registration
|
||||
@@ -315,6 +318,9 @@ org_name = Main Org.
|
||||
# specify role for unauthenticated users
|
||||
org_role = Viewer
|
||||
|
||||
# mask the Grafana version number for unauthenticated users
|
||||
hide_version = false
|
||||
|
||||
#################################### Github Auth #########################
|
||||
[auth.github]
|
||||
enabled = false
|
||||
@@ -464,6 +470,7 @@ skip_verify = false
|
||||
from_address = admin@grafana.localhost
|
||||
from_name = Grafana
|
||||
ehlo_identity =
|
||||
startTLS_policy =
|
||||
|
||||
[emails]
|
||||
welcome_email_on_sign_up = false
|
||||
@@ -748,7 +755,7 @@ rendering_clustering_mode =
|
||||
# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
|
||||
rendering_clustering_max_concurrency =
|
||||
|
||||
# Limit the maxiumum viewport width, height and device scale factor that can be requested.
|
||||
# Limit the maximum viewport width, height and device scale factor that can be requested.
|
||||
rendering_viewport_max_width =
|
||||
rendering_viewport_max_height =
|
||||
rendering_viewport_max_device_scale_factor =
|
||||
|
||||
11
conf/provisioning/plugins/sample.yaml
Normal file
11
conf/provisioning/plugins/sample.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
# # config file version
|
||||
apiVersion: 1
|
||||
|
||||
# apps:
|
||||
# - type: grafana-example-app
|
||||
# org_name: Main Org.
|
||||
# disabled: true
|
||||
# - type: raintank-worldping-app
|
||||
# org_id: 1
|
||||
# jsonData:
|
||||
# apiKey: "API KEY"
|
||||
@@ -127,7 +127,8 @@
|
||||
# This enables data proxy logging, default is false
|
||||
;logging = false
|
||||
|
||||
# How long the data proxy should wait before timing out default is 30 (seconds)
|
||||
# How long the data proxy waits before timing out, default is 30 seconds.
|
||||
# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set.
|
||||
;timeout = 30
|
||||
|
||||
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false.
|
||||
@@ -142,7 +143,7 @@
|
||||
;reporting_enabled = true
|
||||
|
||||
# Set to false to disable all checks to https://grafana.net
|
||||
# for new vesions (grafana itself and plugins), check is used
|
||||
# for new versions (grafana itself and plugins), check is used
|
||||
# in some UI views to notify that grafana or plugin update exists
|
||||
# This option does not cause any auto updates, nor send any information
|
||||
# only a GET request to http://grafana.com to get latest versions
|
||||
@@ -189,7 +190,6 @@
|
||||
# Set to true if you want to enable http strict transport security (HSTS) response header.
|
||||
# This is only sent when HTTPS is enabled in this configuration.
|
||||
# HSTS tells browsers that the site should only be accessed using HTTPS.
|
||||
# The default version will change to true in the next minor release, 6.3.
|
||||
;strict_transport_security = false
|
||||
|
||||
# Sets how long a browser should cache HSTS. Only applied if strict_transport_security is enabled.
|
||||
@@ -203,12 +203,12 @@
|
||||
|
||||
# Set to true to enable the X-Content-Type-Options response header.
|
||||
# The X-Content-Type-Options response HTTP header is a marker used by the server to indicate that the MIME types advertised
|
||||
# in the Content-Type headers should not be changed and be followed. The default will change to true in the next minor release, 6.3.
|
||||
;x_content_type_options = false
|
||||
# in the Content-Type headers should not be changed and be followed.
|
||||
;x_content_type_options = true
|
||||
|
||||
# Set to true to enable the X-XSS-Protection header, which tells browsers to stop pages from loading
|
||||
# when they detect reflected cross-site scripting (XSS) attacks. The default will change to true in the next minor release, 6.3.
|
||||
;x_xss_protection = false
|
||||
# when they detect reflected cross-site scripting (XSS) attacks.
|
||||
;x_xss_protection = true
|
||||
|
||||
#################################### Snapshots ###########################
|
||||
[snapshots]
|
||||
@@ -233,6 +233,9 @@
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;min_refresh_interval = 5s
|
||||
|
||||
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
|
||||
;default_home_dashboard_path =
|
||||
|
||||
#################################### Users ###############################
|
||||
[users]
|
||||
# disable user signup / registration
|
||||
@@ -314,6 +317,9 @@
|
||||
# specify role for unauthenticated users
|
||||
;org_role = Viewer
|
||||
|
||||
# mask the Grafana version number for unauthenticated users
|
||||
;hide_version = false
|
||||
|
||||
#################################### Github Auth ##########################
|
||||
[auth.github]
|
||||
;enabled = false
|
||||
@@ -454,6 +460,8 @@
|
||||
;from_name = Grafana
|
||||
# EHLO identity in SMTP dialog (defaults to instance_name)
|
||||
;ehlo_identity = dashboard.example.com
|
||||
# SMTP startTLS policy (defaults to 'OpportunisticStartTLS')
|
||||
;startTLS_policy = NoStartTLS
|
||||
|
||||
[emails]
|
||||
;welcome_email_on_sign_up = false
|
||||
@@ -737,7 +745,7 @@
|
||||
# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
|
||||
;rendering_clustering_max_concurrency =
|
||||
|
||||
# Limit the maxiumum viewport width, height and device scale factor that can be requested.
|
||||
# Limit the maximum viewport width, height and device scale factor that can be requested.
|
||||
;rendering_viewport_max_width =
|
||||
;rendering_viewport_max_height =
|
||||
;rendering_viewport_max_device_scale_factor =
|
||||
|
||||
@@ -225,7 +225,7 @@ For some people, typically using the bash shell, ulimit fails with an error simi
|
||||
ulimit: open files: cannot modify limit: Operation not permitted
|
||||
```
|
||||
|
||||
If that happens to you, chances are you've already set a lower limit and your shell won't let you set a higher one. Try looking in your shell initalization files (~/.bashrc typically), if there's already a ulimit command that you can tweak.
|
||||
If that happens to you, chances are you've already set a lower limit and your shell won't let you set a higher one. Try looking in your shell initialization files (~/.bashrc typically), if there's already a ulimit command that you can tweak.
|
||||
|
||||
## Next steps
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ All `exported` apis from the package should have a release tag to indicate its s
|
||||
|
||||
- [`@alpha`](https://api-extractor.com/pages/tsdoc/tag_alpha/) - early draft of api and will probably change.
|
||||
- [`@beta`](https://api-extractor.com/pages/tsdoc/tag_beta/) - close to being stable but might change.
|
||||
- [`@public`](https://api-extractor.com/pages/tsdoc/tag_public/) - ready for useage in production.
|
||||
- [`@public`](https://api-extractor.com/pages/tsdoc/tag_public/) - ready for usage in production.
|
||||
- [`@internal`](https://api-extractor.com/pages/tsdoc/tag_internal/) - for internal use only.
|
||||
|
||||
### Main stability of APIs
|
||||
@@ -139,7 +139,7 @@ This attribute can be skipped if the type provided by `typescript` and the funct
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Will help to create a resource resovler depending
|
||||
* Will help to create a resource resolver depending
|
||||
* on the current execution context.
|
||||
*
|
||||
* @param context - The current execution context.
|
||||
@@ -179,7 +179,7 @@ This attribute can be skipped if the type provided by `typescript` and the funct
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Will help to create a resource resovler depending
|
||||
* Will help to create a resource resolver depending
|
||||
* on the current execution context.
|
||||
*
|
||||
* @param context - The current execution context.
|
||||
@@ -206,4 +206,4 @@ export const factory = (context: Context): IResolver => {
|
||||
export const isEqual = (x: number, y: number): boolean => {
|
||||
return x === y;
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
@@ -18,6 +18,32 @@ For all items not covered in this guide, refer to the [Microsoft Style Guide](ht
|
||||
|
||||
The [codespell](https://github.com/codespell-project/codespell) tool is run for every change to catch common misspellings.
|
||||
|
||||
## Inclusive language
|
||||
|
||||
This section provides guidelines on how to avoid using charged language in documentation.
|
||||
|
||||
### Allowing and blocking
|
||||
|
||||
Don't use "whitelist" or "blacklist" when referring to allowing or blocking content or traffic.
|
||||
|
||||
* When used as a noun, use "allowlist" or "blocklist".
|
||||
* When used as a verb, use "allow" or "block"
|
||||
|
||||
Example: _To **allow** outgoing traffic, add the IP to the **allowlist**._
|
||||
|
||||
### Leader and follower
|
||||
|
||||
Don't use "master" or "slave" to describe relationships between nodes or processes.
|
||||
|
||||
* Use "leader", "main" or "primary," instead of "master."
|
||||
* Use "follower" or "secondary," instead of "slave."
|
||||
|
||||
### Exceptions
|
||||
|
||||
When referring to a configuration or settings used by third-party libraries och technologies outside the Grafana project, prefer the original name to avoid confusion.
|
||||
|
||||
For example, use "master" when referring to the default Git branch.
|
||||
|
||||
## Grafana-specific style
|
||||
|
||||
The following sections provide general guidelines on topics specific to Grafana documentation. Note that for the most part, these are *guidelines*, not rigid rules. If you have questions, ask in the #docs channel of Grafana Slack.
|
||||
@@ -31,7 +57,7 @@ The following sections provide general guidelines on topics specific to Grafana
|
||||
* Write in present tense.
|
||||
- Not: The panel will open.
|
||||
- Use: The panel opens. Grafana opens the panel.
|
||||
* Do not use an ampersand (&) as an abbreviation for "and."
|
||||
* Do not use an ampersand (&) as an abbreviation for "and."
|
||||
- **Exceptions:** If an ampersand is used in the Grafana UI, then match the UI.
|
||||
* Avoid using internal slang and jargon in technical documentation.
|
||||
|
||||
@@ -156,7 +182,7 @@ One word, not two.
|
||||
|
||||
#### open source, open-source
|
||||
|
||||
Do not hyphenate when used as an adjective unless the lack of hyphen would cause confusion. For example: _Open source software design is the most open open-source system I can imagine._
|
||||
Do not hyphenate when used as an adjective unless the lack of hyphen would cause confusion. For example: _Open source software design is the most open open-source system I can imagine._
|
||||
|
||||
Do not hyphenate when it is used as a noun. For example: _Open source is the best way to develop software._
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ Generally we follow the Airbnb [React Style Guide](https://github.com/airbnb/jav
|
||||
- [React](#react)
|
||||
- [Props](#props)
|
||||
- [State management](#state-management)
|
||||
|
||||
- [Proposal for removing or replacing Angular dependencies](https://github.com/grafana/grafana/pull/23048)
|
||||
|
||||
## Basic rules
|
||||
|
||||
@@ -107,7 +109,7 @@ class DateCalculator {
|
||||
}
|
||||
class DateCalculator {
|
||||
// bad
|
||||
calculate_timee_range () {...}
|
||||
calculate_time_range () {...}
|
||||
}
|
||||
|
||||
class DateCalculator {
|
||||
@@ -147,7 +149,7 @@ interface ModalState {
|
||||
```typescript
|
||||
const getStyles = = () => ({
|
||||
// bad
|
||||
ElementWraper: css`...`,
|
||||
ElementWrapper: css`...`,
|
||||
// bad
|
||||
["element-wrapper"]: css`...`,
|
||||
|
||||
@@ -324,6 +326,6 @@ static defaultProps: Partial<Props> = { ... }
|
||||
## State management
|
||||
|
||||
- Don't mutate state in reducers or thunks.
|
||||
- Use helpers `actionCreatorFactory` and `reducerFactory` instead of traditional `switch statement` reducers in Redux. See [Redux framework](redux.md) for more details.
|
||||
- Use `createSlice`. See [Redux Toolkit](https://redux-toolkit.js.org/) for more details.
|
||||
- Use `reducerTester` to test reducers. See [Redux framework](redux.md) for more details.
|
||||
- Use state selectors to access state instead of accessing state directly.
|
||||
|
||||
@@ -23,6 +23,27 @@ const ComponentA = () => (
|
||||
);
|
||||
```
|
||||
|
||||
### Styling with theme
|
||||
|
||||
To access the theme in your styles, use the `useStyles` hook. It provides basic memoization and access to the theme object.
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import { GrafanaTheme } from '@grafana/data';
|
||||
import { useStyles } from '@grafana/ui';
|
||||
import { css } from 'emotion';
|
||||
|
||||
const getComponentStyles = (theme: GrafanaTheme) => css`
|
||||
padding: ${theme.spacing.md};
|
||||
`;
|
||||
|
||||
const Foo: FC<FooProps> = () => {
|
||||
const styles = useStyles(getComponentsStyles);
|
||||
|
||||
// Use styles with className
|
||||
};
|
||||
```
|
||||
|
||||
### Styling complex components
|
||||
|
||||
In more complex cases, especially when you need to style multiple DOM elements in one component, or when using styles that depend on properties and/or state, you should create a helper function that returns an object of styles. This function should also be wrapped in the `stylesFactory` helper function, which will provide basic memoization.
|
||||
@@ -36,10 +57,7 @@ import { GrafanaTheme } from '@grafana/data';
|
||||
import { selectThemeVariant, stylesFactory, useTheme } from '@grafana/ui';
|
||||
|
||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||
const backgroundColor = selectThemeVariant(
|
||||
{ light: theme.colors.red, dark: theme.colors.blue },
|
||||
theme.type
|
||||
);
|
||||
const backgroundColor = selectThemeVariant({ light: theme.colors.red, dark: theme.colors.blue }, theme.type);
|
||||
|
||||
return {
|
||||
wrapper: css`
|
||||
|
||||
@@ -18,6 +18,40 @@ This section provides usage guidelines.
|
||||
|
||||
Here's how to use Grafana themes in React components.
|
||||
|
||||
#### useStyles hook
|
||||
|
||||
`useStyles` memoizes the function and provides access to the theme.
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import { GrafanaTheme } from '@grafana/data';
|
||||
import { useStyles } from '@grafana/ui';
|
||||
import { css } from 'emotion';
|
||||
|
||||
const getComponentStyles = (theme: GrafanaTheme) => css`
|
||||
padding: ${theme.spacing.md};
|
||||
`;
|
||||
|
||||
const Foo: FC<FooProps> = () => {
|
||||
const styles = useStyles(getComponentsStyles);
|
||||
|
||||
// Use styles with className
|
||||
};
|
||||
```
|
||||
|
||||
#### Get the theme object
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import { useTheme } from '@grafana/ui';
|
||||
|
||||
const Foo: FC<FooProps> = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
// Your component has access to the theme variables now
|
||||
};
|
||||
```
|
||||
|
||||
#### Using `ThemeContext` directly
|
||||
|
||||
```tsx
|
||||
@@ -26,19 +60,6 @@ import { ThemeContext } from '@grafana/ui';
|
||||
<ThemeContext.Consumer>{theme => <Foo theme={theme} />}</ThemeContext.Consumer>;
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```tsx
|
||||
import React, { useContext } from 'react';
|
||||
import { ThemeContext } from '@grafana/ui';
|
||||
|
||||
const Foo: React.FunctionComponent<FooProps> = () => {
|
||||
const theme = useContext(ThemeContext);
|
||||
|
||||
// Your component has access to the theme variables now
|
||||
}
|
||||
```
|
||||
|
||||
#### Using `withTheme` higher-order component (HOC)
|
||||
|
||||
With this method your component will be automatically wrapped in `ThemeContext.Consumer` and provided with current theme via `theme` prop. Components used with `withTheme` must implement the `Themeable` interface.
|
||||
@@ -76,69 +97,38 @@ describe('MyComponent', () => {
|
||||
restoreThemeContext();
|
||||
});
|
||||
|
||||
it('renders correctyl', () => {
|
||||
|
||||
it('renders correctly', () => {
|
||||
const wrapper = mount(<MyComponent />)
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
### Using themes in [Storybook](https://storybook.js.org/)
|
||||
|
||||
All stories are wrapped with `ThemeContext.Provider` using a global decorator. To render a `Themeable` component that isn't wrapped by a `withTheme` HOC, either create a new component in your story, or use the `renderComponentWithTheme` helper.
|
||||
|
||||
#### Create a new component:
|
||||
|
||||
```tsx
|
||||
// Foo.story.tsx
|
||||
const FooWithTheme = withTheme(Foo);
|
||||
|
||||
FooStories.add('Story' () => {
|
||||
return <FooWithTheme />
|
||||
});
|
||||
```
|
||||
|
||||
#### Use `renderComponentWithTheme` helper:
|
||||
|
||||
```tsx
|
||||
// Bar.story.tsx
|
||||
|
||||
BarStories.add('Story' () => {
|
||||
return renderComponentWithTheme(Bar, /* pass props here */)
|
||||
});
|
||||
```
|
||||
|
||||
### Using themes in Angular code
|
||||
|
||||
There should be very few cases where a theme would be used in an Angular context. For this purpose, there is a function available that retrieves the current theme:
|
||||
|
||||
```ts
|
||||
import { getCurrentTheme } from app/core/utils/ConfigProvider
|
||||
```
|
||||
|
||||
Angular components should be migrated to React, or if that's not possible at the moment, styled using Sass.
|
||||
|
||||
## FAQ
|
||||
|
||||
This section provides insight into frequently-asked questions.
|
||||
|
||||
### How can I modify Sass variable files?
|
||||
|
||||
**If possible, migrate styles to Emotion**
|
||||
|
||||
> For the following to apply you need to run `yarn dev` task.
|
||||
|
||||
`[_variables|_variables.dark|_variables.light].generated.scss` files are the ones that are referenced in the main Sass files for Sass variables to be available. **These files are automatically generated and should never be modified by hand!**
|
||||
|
||||
#### If you need to modify a *Sass variable value* you need to modify the corresponding Typescript file that is the source of the variables:
|
||||
#### If you need to modify a _Sass variable value_ you need to modify the corresponding Typescript file that is the source of the variables:
|
||||
|
||||
- `_variables.generated.scss` - modify `grafana-ui/src/themes/default.ts`
|
||||
- `_variables.light.generated.scss` - modify `grafana-ui/src/themes/light.ts`
|
||||
- `_variables.dark.generated.scss` - modify `grafana-ui/src/themes/dark.ts`
|
||||
|
||||
#### If you need to *add new variable* to Sass variables you need to modify corresponding template file:
|
||||
#### If you need to _add new variable_ to Sass variables you need to modify corresponding template file:
|
||||
|
||||
- `_variables.generated.scss` - modify `grafana-ui/src/themes/_variables.scss.tmpl.ts`
|
||||
- `_variables.light.generated.scss` - modify `grafana-ui/src/themes/_variables.light.scss.tmpl.ts`
|
||||
- `_variables.dark.generated.scss` - modify `grafana-ui/src/themes/_variables.dark.scss.tmpl.ts`
|
||||
|
||||
|
||||
## Limitations
|
||||
|
||||
This section describes limitations with Grafana's theming system.
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "percent",
|
||||
"label": "Perecent",
|
||||
"label": "Percent",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
@@ -1632,10 +1632,7 @@
|
||||
"revision": 8,
|
||||
"schemaVersion": 16,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"panel-tests"
|
||||
],
|
||||
"tags": ["gdev", "panel-tests"],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
@@ -1644,29 +1641,8 @@
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
]
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
|
||||
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
|
||||
},
|
||||
"timezone": "browser",
|
||||
"title": "Panel Tests - Graph",
|
||||
|
||||
@@ -428,6 +428,14 @@
|
||||
{
|
||||
"text": "Bitcoin (฿)",
|
||||
"value": "currencyBTC"
|
||||
},
|
||||
{
|
||||
"text": "Milli Bitcoin (mBTC)",
|
||||
"value": "currencymBTC"
|
||||
},
|
||||
{
|
||||
"text": "Micro Bitcoin (μBTC)",
|
||||
"value": "currencyμBTC"
|
||||
}
|
||||
],
|
||||
"text": "currency"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -28,7 +28,7 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1554310942895,
|
||||
"iteration": 1591027568655,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
@@ -47,7 +47,14 @@
|
||||
"datasource": "gdev-elasticsearch-v2-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -55,6 +62,7 @@
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 1,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -71,6 +79,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -170,7 +181,14 @@
|
||||
"datasource": "gdev-elasticsearch-v2-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
@@ -178,6 +196,7 @@
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -194,6 +213,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -292,7 +314,14 @@
|
||||
"datasource": "gdev-elasticsearch-v2-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
@@ -300,6 +329,7 @@
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -316,6 +346,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -427,6 +460,12 @@
|
||||
"datasource": "gdev-elasticsearch-v2-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -445,11 +484,13 @@
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"align": "auto",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
@@ -505,7 +546,7 @@
|
||||
],
|
||||
"title": "ES Metrics",
|
||||
"transform": "table",
|
||||
"type": "table"
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
@@ -529,6 +570,12 @@
|
||||
"datasource": "gdev-elasticsearch-v2-logs",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -547,6 +594,7 @@
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
@@ -574,7 +622,7 @@
|
||||
],
|
||||
"title": "ES Log query",
|
||||
"transform": "json",
|
||||
"type": "table"
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"circleMaxSize": 30,
|
||||
@@ -584,6 +632,12 @@
|
||||
"decimals": 0,
|
||||
"esGeoPoint": "@location",
|
||||
"esMetric": "Average",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 12,
|
||||
"w": 24,
|
||||
@@ -645,7 +699,7 @@
|
||||
"valueName": "total"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 18,
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["elasticsearch", "gdev", "datasource-test"],
|
||||
"templating": {
|
||||
@@ -678,5 +732,5 @@
|
||||
"timezone": "browser",
|
||||
"title": "Datasource tests - Elasticsearch v2",
|
||||
"uid": "RlqLq2fiz",
|
||||
"version": 5
|
||||
"version": 1
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1554310560048,
|
||||
"iteration": 1591027589702,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
@@ -47,7 +47,14 @@
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -55,6 +62,7 @@
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 1,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -71,6 +79,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -170,7 +181,14 @@
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
@@ -178,6 +196,7 @@
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -194,6 +213,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -292,7 +314,14 @@
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
@@ -300,6 +329,7 @@
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -316,6 +346,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -427,6 +460,12 @@
|
||||
"datasource": "gdev-elasticsearch-v5-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -445,11 +484,13 @@
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"align": "auto",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
@@ -505,7 +546,7 @@
|
||||
],
|
||||
"title": "ES Metrics",
|
||||
"transform": "table",
|
||||
"type": "table"
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
@@ -529,6 +570,12 @@
|
||||
"datasource": "gdev-elasticsearch-v5-logs",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -547,6 +594,7 @@
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
@@ -574,7 +622,7 @@
|
||||
],
|
||||
"title": "ES Log query",
|
||||
"transform": "json",
|
||||
"type": "table"
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"circleMaxSize": 30,
|
||||
@@ -585,6 +633,12 @@
|
||||
"esGeoPoint": "@location",
|
||||
"esLocationName": "",
|
||||
"esMetric": "Average",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 12,
|
||||
"w": 24,
|
||||
@@ -646,7 +700,7 @@
|
||||
"valueName": "total"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 18,
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["elasticsearch", "gdev", "datasource-test"],
|
||||
"templating": {
|
||||
@@ -679,5 +733,5 @@
|
||||
"timezone": "browser",
|
||||
"title": "Datasource tests - Elasticsearch v5",
|
||||
"uid": "8HjT32Bmz",
|
||||
"version": 5
|
||||
"version": 1
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1554310839317,
|
||||
"iteration": 1591027529668,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
@@ -47,7 +47,14 @@
|
||||
"datasource": "gdev-elasticsearch-v6-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -55,6 +62,7 @@
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 1,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -71,6 +79,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -170,7 +181,14 @@
|
||||
"datasource": "gdev-elasticsearch-v6-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
@@ -178,6 +196,7 @@
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -194,6 +213,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -292,7 +314,14 @@
|
||||
"datasource": "gdev-elasticsearch-v6-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
@@ -300,6 +329,7 @@
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -316,6 +346,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -427,6 +460,12 @@
|
||||
"datasource": "gdev-elasticsearch-v6-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -445,11 +484,13 @@
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"align": "auto",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
@@ -505,7 +546,7 @@
|
||||
],
|
||||
"title": "ES Metrics",
|
||||
"transform": "table",
|
||||
"type": "table"
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
@@ -529,6 +570,12 @@
|
||||
"datasource": "gdev-elasticsearch-v6-logs",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -547,6 +594,7 @@
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
@@ -574,7 +622,7 @@
|
||||
],
|
||||
"title": "ES Log query",
|
||||
"transform": "json",
|
||||
"type": "table"
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"circleMaxSize": 30,
|
||||
@@ -584,6 +632,12 @@
|
||||
"decimals": 0,
|
||||
"esGeoPoint": "@location",
|
||||
"esMetric": "Average",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 12,
|
||||
"w": 24,
|
||||
@@ -645,7 +699,8 @@
|
||||
"valueName": "total"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 18,
|
||||
"refresh": false,
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["elasticsearch", "gdev", "datasource-test"],
|
||||
"templating": {
|
||||
@@ -662,7 +717,7 @@
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-30m",
|
||||
"from": "now-1h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
@@ -678,5 +733,5 @@
|
||||
"timezone": "browser",
|
||||
"title": "Datasource tests - Elasticsearch v6",
|
||||
"uid": "NF8Pq2Biz",
|
||||
"version": 5
|
||||
"version": 1
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1554902936982,
|
||||
"iteration": 1591027621672,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
@@ -34,13 +34,21 @@
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v6-filebeat",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -54,6 +62,9 @@
|
||||
"lines": false,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
@@ -142,22 +153,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"text": "@timestamp",
|
||||
"value": "@timestamp"
|
||||
},
|
||||
{
|
||||
"text": "fields.level",
|
||||
"value": "fields.level"
|
||||
},
|
||||
{
|
||||
"text": "message",
|
||||
"value": "message"
|
||||
}
|
||||
],
|
||||
"datasource": "gdev-elasticsearch-v6-filebeat",
|
||||
"fontSize": "100%",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 22,
|
||||
"w": 24,
|
||||
@@ -166,58 +168,35 @@
|
||||
},
|
||||
"id": 2,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
"options": {
|
||||
"showLabels": false,
|
||||
"showTime": true,
|
||||
"sortOrder": "Descending",
|
||||
"wrapLogMessage": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"alias": "Time",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"alias": "Level",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"decimals": 2,
|
||||
"mappingType": 1,
|
||||
"pattern": "fields.level",
|
||||
"thresholds": [""],
|
||||
"type": "string",
|
||||
"unit": "short",
|
||||
"valueMaps": []
|
||||
},
|
||||
{
|
||||
"alias": "Message",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"decimals": 2,
|
||||
"pattern": "message",
|
||||
"preserveFormat": false,
|
||||
"sanitize": false,
|
||||
"thresholds": [],
|
||||
"type": "string",
|
||||
"unit": "short"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [],
|
||||
"bucketAggs": [
|
||||
{
|
||||
"$$hashKey": "object:394",
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"metrics": [
|
||||
{
|
||||
"$$hashKey": "object:359",
|
||||
"field": "select field",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {
|
||||
"size": 500
|
||||
},
|
||||
"type": "raw_document"
|
||||
"settings": {},
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"query": "fields.app:grafana",
|
||||
@@ -228,11 +207,10 @@
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"transform": "json",
|
||||
"type": "table"
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 18,
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "elasticsearch", "datasource-test"],
|
||||
"templating": {
|
||||
@@ -249,7 +227,7 @@
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-1h",
|
||||
"from": "now-30m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
@@ -259,5 +237,5 @@
|
||||
"timezone": "",
|
||||
"title": "Datasource tests - Elasticsearch v6 Filebeat",
|
||||
"uid": "06tPt4gZz",
|
||||
"version": 8
|
||||
"version": 1
|
||||
}
|
||||
|
||||
@@ -28,8 +28,7 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": 2342,
|
||||
"iteration": 1555593977614,
|
||||
"iteration": 1591027717495,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
@@ -48,7 +47,14 @@
|
||||
"datasource": "gdev-elasticsearch-v7-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -56,6 +62,7 @@
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 1,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -72,6 +79,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -171,7 +181,14 @@
|
||||
"datasource": "gdev-elasticsearch-v7-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
@@ -179,6 +196,7 @@
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -195,6 +213,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -293,7 +314,14 @@
|
||||
"datasource": "gdev-elasticsearch-v7-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"grid": {},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
@@ -301,6 +329,7 @@
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
@@ -317,6 +346,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -428,6 +460,12 @@
|
||||
"datasource": "gdev-elasticsearch-v7-metrics",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -446,11 +484,13 @@
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"align": "auto",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
@@ -506,7 +546,7 @@
|
||||
],
|
||||
"title": "ES Metrics",
|
||||
"transform": "table",
|
||||
"type": "table"
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
@@ -530,6 +570,12 @@
|
||||
"datasource": "gdev-elasticsearch-v7-logs",
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
@@ -548,6 +594,7 @@
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"align": "auto",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
@@ -575,7 +622,7 @@
|
||||
],
|
||||
"title": "ES Log query",
|
||||
"transform": "json",
|
||||
"type": "table"
|
||||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"circleMaxSize": 30,
|
||||
@@ -585,6 +632,12 @@
|
||||
"decimals": 0,
|
||||
"esGeoPoint": "@location",
|
||||
"esMetric": "Average",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 12,
|
||||
"w": 24,
|
||||
@@ -646,7 +699,7 @@
|
||||
"valueName": "total"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 18,
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["elasticsearch", "gdev", "datasource-test"],
|
||||
"templating": {
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": 2341,
|
||||
"iteration": 1555591591930,
|
||||
"iteration": 1591027736516,
|
||||
"links": [
|
||||
{
|
||||
"asDropdown": true,
|
||||
@@ -35,13 +34,21 @@
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-elasticsearch-v7-filebeat",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -55,6 +62,9 @@
|
||||
"lines": false,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
@@ -143,22 +153,13 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"columns": [
|
||||
{
|
||||
"text": "@timestamp",
|
||||
"value": "@timestamp"
|
||||
},
|
||||
{
|
||||
"text": "fields.level",
|
||||
"value": "fields.level"
|
||||
},
|
||||
{
|
||||
"text": "message",
|
||||
"value": "message"
|
||||
}
|
||||
],
|
||||
"datasource": "gdev-elasticsearch-v7-filebeat",
|
||||
"fontSize": "100%",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 22,
|
||||
"w": 24,
|
||||
@@ -167,58 +168,35 @@
|
||||
},
|
||||
"id": 2,
|
||||
"links": [],
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
"sort": {
|
||||
"col": 0,
|
||||
"desc": true
|
||||
"options": {
|
||||
"showLabels": false,
|
||||
"showTime": true,
|
||||
"sortOrder": "Descending",
|
||||
"wrapLogMessage": true
|
||||
},
|
||||
"styles": [
|
||||
{
|
||||
"alias": "Time",
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"pattern": "@timestamp",
|
||||
"type": "date"
|
||||
},
|
||||
{
|
||||
"alias": "Level",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
||||
"decimals": 2,
|
||||
"mappingType": 1,
|
||||
"pattern": "fields.level",
|
||||
"thresholds": [""],
|
||||
"type": "string",
|
||||
"unit": "short",
|
||||
"valueMaps": []
|
||||
},
|
||||
{
|
||||
"alias": "Message",
|
||||
"colorMode": null,
|
||||
"colors": ["rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)"],
|
||||
"decimals": 2,
|
||||
"pattern": "message",
|
||||
"preserveFormat": false,
|
||||
"sanitize": false,
|
||||
"thresholds": [],
|
||||
"type": "string",
|
||||
"unit": "short"
|
||||
}
|
||||
],
|
||||
"targets": [
|
||||
{
|
||||
"bucketAggs": [],
|
||||
"bucketAggs": [
|
||||
{
|
||||
"$$hashKey": "object:522",
|
||||
"field": "@timestamp",
|
||||
"id": "2",
|
||||
"settings": {
|
||||
"interval": "auto",
|
||||
"min_doc_count": 0,
|
||||
"trimEdges": 0
|
||||
},
|
||||
"type": "date_histogram"
|
||||
}
|
||||
],
|
||||
"metrics": [
|
||||
{
|
||||
"$$hashKey": "object:484",
|
||||
"field": "select field",
|
||||
"id": "1",
|
||||
"meta": {},
|
||||
"settings": {
|
||||
"size": 500
|
||||
},
|
||||
"type": "raw_document"
|
||||
"settings": {},
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"query": "fields.app:grafana",
|
||||
@@ -229,11 +207,10 @@
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"transform": "json",
|
||||
"type": "table"
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 18,
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["elasticsearch", "gdev", "datasource-test"],
|
||||
"templating": {
|
||||
|
||||
@@ -15,12 +15,18 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": 13844,
|
||||
"iteration": 1566896059256,
|
||||
"iteration": 1590677937026,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"content": "## Data center = $datacenter\n\n### server = $server\n\n#### pod = $pod",
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
@@ -29,7 +35,6 @@
|
||||
},
|
||||
"id": 4,
|
||||
"mode": "markdown",
|
||||
"options": {},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
@@ -47,6 +52,12 @@
|
||||
"colorValue": false,
|
||||
"colors": ["#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a"],
|
||||
"datasource": "gdev-testdata",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"format": "none",
|
||||
"gauge": {
|
||||
"maxValue": 100,
|
||||
@@ -75,7 +86,6 @@
|
||||
"maxDataPoints": 100,
|
||||
"nullPointMode": "connected",
|
||||
"nullText": null,
|
||||
"options": {},
|
||||
"postfix": "",
|
||||
"postfixFontSize": "50%",
|
||||
"prefix": "",
|
||||
@@ -119,6 +129,41 @@
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Go to drilldown",
|
||||
"url": "/d/O6GmNPvWk/dashboard-tests-nested-template-variables-drilldown?orgId=1&${__all_variables}&${__url_time_range}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"nullValueMode": "connected",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "none"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 4,
|
||||
@@ -128,40 +173,15 @@
|
||||
"id": 8,
|
||||
"links": [],
|
||||
"options": {
|
||||
"fieldOptions": {
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Go to drilldown",
|
||||
"url": "/d/O6GmNPvWk/dashboard-tests-nested-template-variables-drilldown?orgId=1&${__all_variables}&${__url_time_range}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"nullValueMode": "connected",
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "none"
|
||||
},
|
||||
"override": {},
|
||||
"values": false
|
||||
},
|
||||
"orientation": "horizontal",
|
||||
"showThresholdLabels": false,
|
||||
"showThresholdMarkers": true
|
||||
},
|
||||
"pluginVersion": "6.4.0-pre",
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
@@ -175,6 +195,41 @@
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Go to drilldown",
|
||||
"url": "/d/O6GmNPvWk/dashboard-tests-nested-template-variables-drilldown?orgId=1&${__all_variables}&${__url_time_range}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"nullValueMode": "connected",
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "none"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 4,
|
||||
@@ -185,38 +240,14 @@
|
||||
"links": [],
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"fieldOptions": {
|
||||
"orientation": "vertical",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"links": [
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Go to drilldown",
|
||||
"url": "/d/O6GmNPvWk/dashboard-tests-nested-template-variables-drilldown?orgId=1&${__all_variables}&${__url_time_range}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"nullValueMode": "connected",
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "none"
|
||||
},
|
||||
"override": {},
|
||||
"values": false
|
||||
},
|
||||
"orientation": "vertical"
|
||||
"showUnfilled": true
|
||||
},
|
||||
"pluginVersion": "6.4.0-pre",
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
@@ -228,20 +259,108 @@
|
||||
"title": "React gauge datalink",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": "CsvData",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"align": null
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "server"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "links",
|
||||
"value": [
|
||||
{
|
||||
"title": "filter",
|
||||
"url": "http://localhost:3000/d/-Y-tnEDWk/templating-nested-template-variables?var-datacenter=${__data.fields[datacenter]}&var-server=${__value.raw}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"id": 11,
|
||||
"options": {
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"config": {},
|
||||
"name": "datacenter",
|
||||
"type": "string",
|
||||
"values": ["A", "B", "C"]
|
||||
},
|
||||
{
|
||||
"config": {},
|
||||
"name": "server",
|
||||
"type": "string",
|
||||
"values": ["AA", "BB", "CC"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Data links that filter update variables on current dashboard",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-testdata",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 13,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
"y": 15
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -316,7 +435,7 @@
|
||||
}
|
||||
],
|
||||
"refresh": false,
|
||||
"schemaVersion": 19,
|
||||
"schemaVersion": 25,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "templating"],
|
||||
"templating": {
|
||||
@@ -324,6 +443,7 @@
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": "A",
|
||||
"value": ["A"]
|
||||
},
|
||||
@@ -349,6 +469,7 @@
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": "AA",
|
||||
"value": ["AA"]
|
||||
},
|
||||
@@ -374,6 +495,7 @@
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": "All",
|
||||
"value": ["$__all"]
|
||||
},
|
||||
@@ -403,7 +525,7 @@
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
"refresh_intervals": ["10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Templating - Nested Template Variables",
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Last non nulll",
|
||||
"title": "Last non-null",
|
||||
"type": "gauge"
|
||||
},
|
||||
{
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "percent",
|
||||
"label": "Perecent",
|
||||
"label": "Percent",
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
|
||||
@@ -428,6 +428,14 @@
|
||||
{
|
||||
"text": "Bitcoin (฿)",
|
||||
"value": "currencyBTC"
|
||||
},
|
||||
{
|
||||
"text": "Milli Bitcoin (mBTC)",
|
||||
"value": "currencymBTC"
|
||||
},
|
||||
{
|
||||
"text": "Micro Bitcoin (μBTC)",
|
||||
"value": "currencyμBTC"
|
||||
}
|
||||
],
|
||||
"text": "currency"
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
}
|
||||
],
|
||||
"thresholds": "5,10",
|
||||
"title": "prefix 3 ms (green) postfixt + sparkline",
|
||||
"title": "prefix 3 ms (green) postfix + sparkline",
|
||||
"type": "singlestat",
|
||||
"valueFontSize": "80%",
|
||||
"valueMaps": [
|
||||
|
||||
@@ -19,6 +19,42 @@
|
||||
"panels": [
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
"w": 24,
|
||||
@@ -29,51 +65,20 @@
|
||||
"interval": "6m",
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
@@ -93,6 +98,42 @@
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 24,
|
||||
@@ -103,51 +144,20 @@
|
||||
"interval": "7m",
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
@@ -166,6 +176,42 @@
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 24,
|
||||
@@ -176,51 +222,20 @@
|
||||
"interval": "7m",
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
@@ -239,8 +254,44 @@
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 14,
|
||||
"h": 18,
|
||||
"w": 6,
|
||||
"x": 0,
|
||||
"y": 15
|
||||
@@ -249,51 +300,20 @@
|
||||
"interval": "5m",
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
@@ -306,13 +326,49 @@
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"title": "Horizontal with graph",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"h": 9,
|
||||
"w": 4,
|
||||
"x": 6,
|
||||
"y": 15
|
||||
@@ -321,51 +377,20 @@
|
||||
"interval": "10m",
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"graphMode": "line",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
@@ -398,14 +423,50 @@
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"title": "Auto grid",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 8,
|
||||
"w": 6,
|
||||
"x": 10,
|
||||
"y": 15
|
||||
},
|
||||
@@ -413,51 +474,20 @@
|
||||
"interval": "10m",
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"graphMode": "line",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
@@ -490,11 +520,257 @@
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"title": "Horizontal",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"mappings": [],
|
||||
"max": 200,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 15
|
||||
},
|
||||
"id": 15,
|
||||
"interval": "5m",
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"sparkline": {
|
||||
"show": true
|
||||
},
|
||||
"textMode": "name"
|
||||
},
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
"max": 200,
|
||||
"min": 0,
|
||||
"noise": 5,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 7,
|
||||
"spread": 20,
|
||||
"startValue": 0
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Text mode name",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"mappings": [],
|
||||
"max": 200,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 18,
|
||||
"x": 6,
|
||||
"y": 24
|
||||
},
|
||||
"id": 16,
|
||||
"interval": "5m",
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"sparkline": {
|
||||
"show": true
|
||||
},
|
||||
"textMode": "value"
|
||||
},
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
"max": 200,
|
||||
"min": 0,
|
||||
"noise": 15,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 45,
|
||||
"spread": 1,
|
||||
"startValue": 0
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Value only",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {},
|
||||
"mappings": [],
|
||||
"max": 200,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "areaM2"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 33
|
||||
},
|
||||
"id": 17,
|
||||
"interval": "5m",
|
||||
"options": {
|
||||
"colorMode": "background",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": ["mean"],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"sparkline": {
|
||||
"show": true
|
||||
},
|
||||
"textMode": "none"
|
||||
},
|
||||
"pluginVersion": "7.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
"max": 200,
|
||||
"min": 0,
|
||||
"noise": 15,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 200,
|
||||
"spread": 1,
|
||||
"startValue": 0
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "No text",
|
||||
"type": "stat"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 22,
|
||||
"schemaVersion": 26,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "panel-tests"],
|
||||
"templating": {
|
||||
@@ -508,5 +784,7 @@
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Stat"
|
||||
"title": "Panel Tests - Stat",
|
||||
"uid": "EJ8_d9jZk",
|
||||
"version": 1
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# When not limiting the open file descritors limit, the memory consumption of
|
||||
# When not limiting the open file descriptors limit, the memory consumption of
|
||||
# slapd is absurdly high. See https://github.com/docker/docker/issues/8231
|
||||
ulimit -n 8192
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
# When not limiting the open file descritors limit, the memory consumption of
|
||||
# When not limiting the open file descriptors limit, the memory consumption of
|
||||
# slapd is absurdly high. See https://github.com/docker/docker/issues/8231
|
||||
ulimit -n 8192
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ usage() {
|
||||
echo "Usage:"
|
||||
echo " bulk-dashboards - create and provisioning 400 dashboards"
|
||||
echo " bulk-alerting-dashboards - create and provisioning 400 dashboards with alerts"
|
||||
echo " no args - provisiong core datasources and dev dashboards"
|
||||
echo " no args - provisioning core datasources and dev dashboards"
|
||||
}
|
||||
|
||||
main() {
|
||||
|
||||
@@ -53,7 +53,7 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
|
||||
<h4>Getting started</h4>
|
||||
<p>Learn the basics of using Grafana.</p>
|
||||
</a>
|
||||
<a href="{{< relref "installation/configuration.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<a href="{{< relref "administration/configuration.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Configure Grafana</h4>
|
||||
<p>Review the configuration and setup options.</p>
|
||||
</a>
|
||||
@@ -65,8 +65,8 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
|
||||
<h4>Provisioning</h4>
|
||||
<p>Learn how to automate your Grafana configuration.</p>
|
||||
</a>
|
||||
<a href="{{< relref "guides/whats-new-in-v6-6.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v6.6</h4>
|
||||
<a href="{{< relref "guides/whats-new-in-v7-0.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v7.0</h4>
|
||||
<p>Explore the features and enhancements in the latest release.</p>
|
||||
</a>
|
||||
|
||||
@@ -91,9 +91,9 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
|
||||
<img src="/img/docs/logos/icon_prometheus.svg" >
|
||||
<h5>Prometheus</h5>
|
||||
</a>
|
||||
<a href="{{< relref "features/datasources/stackdriver.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_stackdriver.svg">
|
||||
<h5>Google Stackdriver</h5>
|
||||
<a href="{{< relref "features/datasources/cloudmonitoring.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_cloudmonitoring.svg">
|
||||
<h5>Google Cloud Monitoring</h5>
|
||||
</a>
|
||||
<a href="{{< relref "features/datasources/cloudwatch.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_cloudwatch.svg">
|
||||
|
||||
@@ -8,4 +8,6 @@ identifier = "admin"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
# Administration
|
||||
|
||||
This section provides resources for Grafana administrators.
|
||||
|
||||
@@ -23,7 +23,7 @@ grafana-cli -h
|
||||
Some commands, such as installing or removing plugins, require `sudo` in order to run.
|
||||
|
||||
**Windows users**
|
||||
Some commands, such as installing or removing plugins, require you to run Windows PowerShell as Administrator.
|
||||
Some commands, such as installing or removing plugins, require you to run Windows PowerShell as Administrator.
|
||||
|
||||
Before you enter commands, `cd` into the Grafana bin directory. The default path is:
|
||||
```
|
||||
@@ -101,40 +101,40 @@ grafana-cli --insecure --pluginUrl https://company.com/grafana/plugins/<plugin-i
|
||||
|
||||
### Enable debug logging
|
||||
|
||||
`--debug` or `-d` enables debug logging. Debug output is returned and shown in the terminal.
|
||||
`--debug` or `-d` enables debug logging. Debug output is returned and shown in the terminal.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli --debug plugins install <plugin-id>
|
||||
```
|
||||
|
||||
### Override a configuration setting
|
||||
### Override a configuration setting
|
||||
|
||||
`--configOverrides` is a command line argument that acts like an environmental variable override.
|
||||
|
||||
For example, you can use it to redirect logging to another file (maybe to log plugin installations in a service like Hosted Grafana) or when resetting the admin password and you have non-default values for some important config value (like where the database is located).
|
||||
For example, you can use it to redirect logging to another file (maybe to log plugin installations in Grafana Cloud) or when resetting the admin password and you have non-default values for some important config value (like where the database is located).
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli --configOverrides cfg:default.paths.log=/dev/null plugins install <plugin-id>
|
||||
```
|
||||
|
||||
### Override homepath value
|
||||
### Override homepath value
|
||||
|
||||
Sets the path for the Grafana install/home path, defaults to working directory. You do not need to use this if you are in the Grafana installation directory when using the CLI.
|
||||
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli --homepath "c:\Program Files\grafana" admin reset-admin-password mynewpassword
|
||||
```
|
||||
|
||||
### Override config file
|
||||
### Override config file
|
||||
|
||||
`--config value` overrides the default location where Grafana expects the configuration file. Refer to [Configuration]({{< relref "../installation/configuration.md" >}}) for more information about configuring Grafana and default configuration file locations.
|
||||
`--config value` overrides the default location where Grafana expects the configuration file. Refer to [Configuration]({{< relref "../administration/configuration.md" >}}) for more information about configuring Grafana and default configuration file locations.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli admin reset-admin-password --config "/etc/configuration/" mynewpassword
|
||||
grafana-cli --config "/etc/configuration/" admin reset-admin-password mynewpassword
|
||||
```
|
||||
|
||||
## Plugins commands
|
||||
@@ -200,7 +200,7 @@ grafana-cli admin
|
||||
|
||||
If there are two flags being used to set the homepath and the config file path, then running the command returns this error:
|
||||
|
||||
> Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath
|
||||
> Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath
|
||||
|
||||
To correct this, use the `--homepath` global option to specify the Grafana default homepath for this command:
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@ Grafana supports automatic rendering of panels and dashboards as PNG images. Thi
|
||||
|
||||
While an image is being rendered, the PNG image is temporarily written to the file system. When the image is rendered, the PNG image is temporarily written to the `png` folder in the Grafana `data` folder.
|
||||
|
||||
A background job runs every 10 minutes and removes temporary images. You can configure how long an image should be stored before being removed by configuring the [temp-data-lifetime]({{< relref "../installation/configuration/#temp-data-lifetime" >}}) setting.
|
||||
A background job runs every 10 minutes and removes temporary images. You can configure how long an image should be stored before being removed by configuring the [temp-data-lifetime]({{< relref "../administration/configuration/#temp-data-lifetime" >}}) setting.
|
||||
|
||||
You can also render a PNG by clicking the dropdown arrow next to a panel title, then clicking **Share > Direct link rendered image**.
|
||||
|
||||
@@ -26,7 +26,7 @@ Rendering images can require a lot of memory, mainly because Grafana creates bro
|
||||
|
||||
## Alerting and render limits
|
||||
|
||||
Alert notifications can include images, but rendering many images at the same time can overload the server where the renderer is running. For instructions of how to configure this, see [concurrent_render_limit]({{< relref "../installation/configuration/#concurrent_render_limit" >}}).
|
||||
Alert notifications can include images, but rendering many images at the same time can overload the server where the renderer is running. For instructions of how to configure this, see [concurrent_render_limit]({{< relref "../administration/configuration/#concurrent_render_limit" >}}).
|
||||
|
||||
## Install Grafana Image Renderer plugin
|
||||
|
||||
@@ -154,6 +154,14 @@ On Ubuntu 18.10 the following dependencies have been confirmed as needed for the
|
||||
libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrender1 libxtst6 libglib2.0-0 libnss3 libcups2 libdbus-1-3 libxss1 libxrandr2 libgtk-3-0 libgtk-3-0 libasound2
|
||||
```
|
||||
|
||||
**Debian:**
|
||||
|
||||
On Debian 9 (Stretch) the following dependencies have been confirmed as needed for the image rendering to function.
|
||||
|
||||
```bash
|
||||
libx11 libcairo bcairo2 libcairo2 libxtst6 libxcomposite1 libx11-xcb1 libxcursor1 libxdamage1 libnss3 libcups libcups2 libXss libXss1 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0
|
||||
```
|
||||
|
||||
**Centos:**
|
||||
|
||||
On a minimal Centos installation, the following dependencies have been confirmed as needed for the image rendering to function:
|
||||
|
||||
@@ -12,7 +12,7 @@ weight = 8
|
||||
|
||||
Grafana collects some metrics about itself internally. Grafana supports pushing metrics to Graphite or exposing them to be scraped by Prometheus.
|
||||
|
||||
For more information about configuration options related to Grafana metrics, refer to [metrics]({{< relref "../installation/configuration/#metrics" >}}) and [metrics.graphite]({{< relref "../installation/configuration/#metrics-graphite" >}}) in [Configuration]({{< relref "../installation/configuration.md" >}}).
|
||||
For more information about configuration options related to Grafana metrics, refer to [metrics]({{< relref "../administration/configuration/#metrics" >}}) and [metrics.graphite]({{< relref "../administration/configuration/#metrics-graphite" >}}) in [Configuration]({{< relref "../administration/configuration.md" >}}).
|
||||
|
||||
## Available metrics
|
||||
|
||||
|
||||
453
docs/sources/administration/provisioning.md
Executable file → Normal file
453
docs/sources/administration/provisioning.md
Executable file → Normal file
@@ -15,7 +15,7 @@ In previous versions of Grafana, you could only use the API for provisioning dat
|
||||
|
||||
## Config File
|
||||
|
||||
Check out the [configuration]({{< relref "../installation/configuration" >}}) page for more information on what you can configure in `grafana.ini`
|
||||
Check out the [configuration]({{< relref "configuration.md" >}}) page for more information on what you can configure in `grafana.ini`
|
||||
|
||||
### Config File Locations
|
||||
|
||||
@@ -38,11 +38,11 @@ Example:
|
||||
|
||||
```yaml
|
||||
datasources:
|
||||
- name: Graphite
|
||||
url: http://localhost:$PORT
|
||||
user: $USER
|
||||
secureJsonData:
|
||||
password: $PASSWORD
|
||||
- name: Graphite
|
||||
url: http://localhost:$PORT
|
||||
user: $USER
|
||||
secureJsonData:
|
||||
password: $PASSWORD
|
||||
```
|
||||
|
||||
If you have a literal `$` in your value and want to avoid interpolation, `$$` can be used.
|
||||
@@ -53,25 +53,25 @@ If you have a literal `$` in your value and want to avoid interpolation, `$$` ca
|
||||
|
||||
Currently we do not provide any scripts/manifests for configuring Grafana. Rather than spending time learning and creating scripts/manifests for each tool, we think our time is better spent making Grafana easier to provision. Therefore, we heavily rely on the expertise of the community.
|
||||
|
||||
Tool | Project
|
||||
-----|------------
|
||||
Puppet | [https://forge.puppet.com/puppet/grafana](https://forge.puppet.com/puppet/grafana)
|
||||
Ansible | [https://github.com/cloudalchemy/ansible-grafana](https://github.com/cloudalchemy/ansible-grafana)
|
||||
Chef | [https://github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana)
|
||||
Saltstack | [https://github.com/salt-formulas/salt-formula-grafana](https://github.com/salt-formulas/salt-formula-grafana)
|
||||
Jsonnet | [https://github.com/grafana/grafonnet-lib/](https://github.com/grafana/grafonnet-lib/)
|
||||
| Tool | Project |
|
||||
| --------- | -------------------------------------------------------------------------------------------------------------- |
|
||||
| Puppet | [https://forge.puppet.com/puppet/grafana](https://forge.puppet.com/puppet/grafana) |
|
||||
| Ansible | [https://github.com/cloudalchemy/ansible-grafana](https://github.com/cloudalchemy/ansible-grafana) |
|
||||
| Chef | [https://github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana) |
|
||||
| Saltstack | [https://github.com/salt-formulas/salt-formula-grafana](https://github.com/salt-formulas/salt-formula-grafana) |
|
||||
| Jsonnet | [https://github.com/grafana/grafonnet-lib/](https://github.com/grafana/grafonnet-lib/) |
|
||||
|
||||
## Datasources
|
||||
## Data sources
|
||||
|
||||
> This feature is available from v5.0
|
||||
|
||||
It's possible to manage datasources in Grafana by adding one or more yaml config files in the [`provisioning/datasources`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will be added or updated during start up. If the datasource already exists, Grafana will update it to match the configuration file. The config file can also contain a list of datasources that should be deleted. That list is called `deleteDatasources`. Grafana will delete datasources listed in `deleteDatasources` before inserting/updating those in the `datasource` list.
|
||||
It's possible to manage data sources in Grafana by adding one or more yaml config files in the [`provisioning/datasources`](/administration/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will be added or updated during start up. If the data source already exists, then Grafana updates it to match the configuration file. The config file can also contain a list of data sources that should be deleted. That list is called `deleteDatasources`. Grafana will delete data sources listed in `deleteDatasources` before inserting/updating those in the `datasource` list.
|
||||
|
||||
### Running Multiple Grafana Instances
|
||||
|
||||
If you are running multiple instances of Grafana you might run into problems if they have different versions of the `datasource.yaml` configuration file. The best way to solve this problem is to add a version number to each datasource in the configuration and increase it when you update the config. Grafana will only update datasources with the same or lower version number than specified in the config. That way, old configs cannot overwrite newer configs if they restart at the same time.
|
||||
|
||||
### Example Datasource Config File
|
||||
### Example data source Config File
|
||||
|
||||
```yaml
|
||||
# config file version
|
||||
@@ -86,110 +86,112 @@ deleteDatasources:
|
||||
# what's available in the database
|
||||
datasources:
|
||||
# <string, required> name of the datasource. Required
|
||||
- name: Graphite
|
||||
# <string, required> datasource type. Required
|
||||
type: graphite
|
||||
# <string, required> access mode. proxy or direct (Server or Browser in the UI). Required
|
||||
access: proxy
|
||||
# <int> org id. will default to orgId 1 if not specified
|
||||
orgId: 1
|
||||
# <string> custom UID which can be used to reference this datasource in other parts of the configuration, if not specified will be generated automatically
|
||||
uid: my_unique_uid
|
||||
# <string> url
|
||||
url: http://localhost:8080
|
||||
# <string> Deprecated, use secureJsonData.password
|
||||
password:
|
||||
# <string> database user, if used
|
||||
user:
|
||||
# <string> database name, if used
|
||||
database:
|
||||
# <bool> enable/disable basic auth
|
||||
basicAuth:
|
||||
# <string> basic auth username
|
||||
basicAuthUser:
|
||||
# <string> Deprecated, use secureJsonData.basicAuthPassword
|
||||
basicAuthPassword:
|
||||
# <bool> enable/disable with credentials headers
|
||||
withCredentials:
|
||||
# <bool> mark as default datasource. Max one per org
|
||||
isDefault:
|
||||
# <map> fields that will be converted to json and stored in jsonData
|
||||
jsonData:
|
||||
graphiteVersion: "1.1"
|
||||
tlsAuth: true
|
||||
tlsAuthWithCACert: true
|
||||
# <string> json object of data that will be encrypted.
|
||||
secureJsonData:
|
||||
tlsCACert: "..."
|
||||
tlsClientCert: "..."
|
||||
tlsClientKey: "..."
|
||||
# <string> database password, if used
|
||||
- name: Graphite
|
||||
# <string, required> datasource type. Required
|
||||
type: graphite
|
||||
# <string, required> access mode. proxy or direct (Server or Browser in the UI). Required
|
||||
access: proxy
|
||||
# <int> org id. will default to orgId 1 if not specified
|
||||
orgId: 1
|
||||
# <string> custom UID which can be used to reference this datasource in other parts of the configuration, if not specified will be generated automatically
|
||||
uid: my_unique_uid
|
||||
# <string> url
|
||||
url: http://localhost:8080
|
||||
# <string> Deprecated, use secureJsonData.password
|
||||
password:
|
||||
# <string> basic auth password
|
||||
# <string> database user, if used
|
||||
user:
|
||||
# <string> database name, if used
|
||||
database:
|
||||
# <bool> enable/disable basic auth
|
||||
basicAuth:
|
||||
# <string> basic auth username
|
||||
basicAuthUser:
|
||||
# <string> Deprecated, use secureJsonData.basicAuthPassword
|
||||
basicAuthPassword:
|
||||
version: 1
|
||||
# <bool> allow users to edit datasources from the UI.
|
||||
editable: false
|
||||
# <bool> enable/disable with credentials headers
|
||||
withCredentials:
|
||||
# <bool> mark as default datasource. Max one per org
|
||||
isDefault:
|
||||
# <map> fields that will be converted to json and stored in jsonData
|
||||
jsonData:
|
||||
graphiteVersion: '1.1'
|
||||
tlsAuth: true
|
||||
tlsAuthWithCACert: true
|
||||
# <string> json object of data that will be encrypted.
|
||||
secureJsonData:
|
||||
tlsCACert: '...'
|
||||
tlsClientCert: '...'
|
||||
tlsClientKey: '...'
|
||||
# <string> database password, if used
|
||||
password:
|
||||
# <string> basic auth password
|
||||
basicAuthPassword:
|
||||
version: 1
|
||||
# <bool> allow users to edit datasources from the UI.
|
||||
editable: false
|
||||
```
|
||||
|
||||
#### Custom Settings per Datasource
|
||||
|
||||
Please refer to each datasource documentation for specific provisioning examples.
|
||||
|
||||
| Datasource | Misc |
|
||||
| ---- | ---- |
|
||||
| Datasource | Misc |
|
||||
| ------------- | ---------------------------------------------------------------------------------- |
|
||||
| Elasticsearch | Elasticsearch uses the `database` property to configure the index for a datasource |
|
||||
|
||||
#### Json Data
|
||||
|
||||
Since not all datasources have the same configuration settings we only have the most common ones as fields. The rest should be stored as a json blob in the `jsonData` field. Here are the most common settings that the core datasources use.
|
||||
|
||||
| Name | Type | Datasource | Description |
|
||||
| ---- | ---- | ---- | ---- |
|
||||
| tlsAuth | boolean | *All* | Enable TLS authentication using client cert configured in secure json data |
|
||||
| tlsAuthWithCACert | boolean | *All* | Enable TLS authentication using CA cert |
|
||||
| tlsSkipVerify | boolean | *All* | Controls whether a client verifies the server's certificate chain and host name. |
|
||||
| graphiteVersion | string | Graphite | Graphite version |
|
||||
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source |
|
||||
| esVersion | number | Elasticsearch | Elasticsearch version as a number (2/5/56/60/70) |
|
||||
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
|
||||
| interval | string | Elasticsearch | Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly' |
|
||||
| logMessageField | string | Elasticsearch | Which field should be used as the log message |
|
||||
| logLevelField | string | Elasticsearch | Which field should be used to indicate the priority of the log message |
|
||||
| authType | string | Cloudwatch | Auth provider. keys/credentials/arn |
|
||||
| assumeRoleArn | string | Cloudwatch | ARN of Assume Role |
|
||||
| defaultRegion | string | Cloudwatch | AWS region |
|
||||
| customMetricsNamespaces | string | Cloudwatch | Namespaces of Custom Metrics |
|
||||
| tsdbVersion | string | OpenTSDB | Version |
|
||||
| tsdbResolution | string | OpenTSDB | Resolution |
|
||||
| sslmode | string | PostgreSQL | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
|
||||
| sslRootCertFile | string | PostgreSQL | SSL server root certificate file, must be readable by the Grafana user |
|
||||
| sslCertFile | string | PostgreSQL | SSL client certificate file, must be readable by the Grafana user |
|
||||
| sslKeyFile | string | PostgreSQL | SSL client key file, must be readable by *only* the Grafana user |
|
||||
| encrypt | string | MSSQL | Connection SSL encryption handling. 'disable', 'false' or 'true' |
|
||||
| postgresVersion | number | PostgreSQL | Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, ..., v10 |
|
||||
| timescaledb | boolean | PostgreSQL | Enable usage of TimescaleDB extension |
|
||||
| maxOpenConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of open connections to the database (Grafana v5.4+) |
|
||||
| maxIdleConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of connections in the idle connection pool (Grafana v5.4+) |
|
||||
| connMaxLifetime | number | MySQL, PostgreSQL and MSSQL | Maximum amount of time in seconds a connection may be reused (Grafana v5.4+) |
|
||||
| Name | Type | Datasource | Description |
|
||||
| ----------------------- | ------- | ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
|
||||
| tlsAuth | boolean | _All_ | Enable TLS authentication using client cert configured in secure json data |
|
||||
| tlsAuthWithCACert | boolean | _All_ | Enable TLS authentication using CA cert |
|
||||
| tlsSkipVerify | boolean | _All_ | Controls whether a client verifies the server's certificate chain and host name. |
|
||||
| graphiteVersion | string | Graphite | Graphite version |
|
||||
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source |
|
||||
| esVersion | number | Elasticsearch | Elasticsearch version as a number (2/5/56/60/70) |
|
||||
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
|
||||
| interval | string | Elasticsearch | Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly' |
|
||||
| logMessageField | string | Elasticsearch | Which field should be used as the log message |
|
||||
| logLevelField | string | Elasticsearch | Which field should be used to indicate the priority of the log message |
|
||||
| authType | string | Cloudwatch | Auth provider. keys/credentials/arn |
|
||||
| assumeRoleArn | string | Cloudwatch | ARN of Assume Role |
|
||||
| defaultRegion | string | Cloudwatch | AWS region |
|
||||
| customMetricsNamespaces | string | Cloudwatch | Namespaces of Custom Metrics |
|
||||
| tsdbVersion | string | OpenTSDB | Version |
|
||||
| tsdbResolution | string | OpenTSDB | Resolution |
|
||||
| sslmode | string | PostgreSQL | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
|
||||
| sslRootCertFile | string | PostgreSQL | SSL server root certificate file, must be readable by the Grafana user |
|
||||
| sslCertFile | string | PostgreSQL | SSL client certificate file, must be readable by the Grafana user |
|
||||
| sslKeyFile | string | PostgreSQL | SSL client key file, must be readable by _only_ the Grafana user |
|
||||
| encrypt | string | MSSQL | Connection SSL encryption handling. 'disable', 'false' or 'true' |
|
||||
| postgresVersion | number | PostgreSQL | Postgres version as a number (903/904/905/906/1000) meaning v9.3, v9.4, ..., v10 |
|
||||
| timescaledb | boolean | PostgreSQL | Enable usage of TimescaleDB extension |
|
||||
| maxOpenConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of open connections to the database (Grafana v5.4+) |
|
||||
| maxIdleConns | number | MySQL, PostgreSQL and MSSQL | Maximum number of connections in the idle connection pool (Grafana v5.4+) |
|
||||
| connMaxLifetime | number | MySQL, PostgreSQL and MSSQL | Maximum amount of time in seconds a connection may be reused (Grafana v5.4+) |
|
||||
|
||||
#### Secure Json Data
|
||||
|
||||
`{"authType":"keys","defaultRegion":"us-west-2","timeField":"@timestamp"}`
|
||||
|
||||
Secure json data is a map of settings that will be encrypted with [secret key]({{< relref "../installation/configuration/#secret-key" >}}) from the Grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to the request on the server side. All of these settings are optional.
|
||||
Secure json data is a map of settings that will be encrypted with [secret key]({{< relref "configuration.md#secret-key" >}}) from the Grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to the request on the server side. All of these settings are optional.
|
||||
|
||||
| Name | Type | Datasource | Description |
|
||||
| ----| ---- | ---- | --- |
|
||||
| tlsCACert | string | *All* |CA cert for out going requests |
|
||||
| tlsClientCert | string | *All* |TLS Client cert for outgoing requests |
|
||||
| tlsClientKey | string | *All* |TLS Client key for outgoing requests |
|
||||
| password | string | *All* | password |
|
||||
| basicAuthPassword | string | *All* | password for basic authentication |
|
||||
| accessKey | string | Cloudwatch | Access key for connecting to Cloudwatch |
|
||||
| secretKey | string | Cloudwatch | Secret key for connecting to Cloudwatch |
|
||||
| Name | Type | Datasource | Description |
|
||||
| ----------------- | ------ | ---------- | --------------------------------------- |
|
||||
| tlsCACert | string | _All_ | CA cert for out going requests |
|
||||
| tlsClientCert | string | _All_ | TLS Client cert for outgoing requests |
|
||||
| tlsClientKey | string | _All_ | TLS Client key for outgoing requests |
|
||||
| password | string | _All_ | password |
|
||||
| basicAuthPassword | string | _All_ | password for basic authentication |
|
||||
| accessKey | string | Cloudwatch | Access key for connecting to Cloudwatch |
|
||||
| secretKey | string | Cloudwatch | Secret key for connecting to Cloudwatch |
|
||||
|
||||
#### Custom HTTP headers for datasources
|
||||
Datasources managed by Grafanas provisioning can be configured to add HTTP headers to all requests
|
||||
|
||||
Data sources managed by Grafanas provisioning can be configured to add HTTP headers to all requests
|
||||
going to that datasource. The header name is configured in the `jsonData` field and the header value should be
|
||||
configured in `secureJsonData`.
|
||||
|
||||
@@ -197,18 +199,48 @@ configured in `secureJsonData`.
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Graphite
|
||||
jsonData:
|
||||
httpHeaderName1: "HeaderName"
|
||||
httpHeaderName2: "Authorization"
|
||||
secureJsonData:
|
||||
httpHeaderValue1: "HeaderValue"
|
||||
httpHeaderValue2: "Bearer XXXXXXXXX"
|
||||
- name: Graphite
|
||||
jsonData:
|
||||
httpHeaderName1: 'HeaderName'
|
||||
httpHeaderName2: 'Authorization'
|
||||
secureJsonData:
|
||||
httpHeaderValue1: 'HeaderValue'
|
||||
httpHeaderValue2: 'Bearer XXXXXXXXX'
|
||||
```
|
||||
|
||||
## Plugins
|
||||
|
||||
> This feature is available from v7.1
|
||||
|
||||
You can manage plugins in Grafana by adding one or more YAML config files in the [`provisioning/plugins`]({{< relref "configuration.md#provisioning" >}}) directory. Each config file can contain a list of `apps` that will be updated during start up. Grafana updates each app to match the configuration file.
|
||||
|
||||
### Example plugin configuration file
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
apps:
|
||||
# <string> the type of app, plugin identifier. Required
|
||||
- type: raintank-worldping-app
|
||||
# <int> Org ID. Default to 1, unless org_name is specified
|
||||
org_id: 1
|
||||
# <string> Org name. Overrides org_id unless org_id not specified
|
||||
org_name: Main Org.
|
||||
# <bool> disable the app. Default to false.
|
||||
disabled: false
|
||||
# <map> fields that will be converted to json and stored in jsonData. Custom per app.
|
||||
jsonData:
|
||||
# key/value pairs of string to object
|
||||
key: value
|
||||
# <map> fields that will be converted to json, encrypted and stored in secureJsonData. Custom per app.
|
||||
secureJsonData:
|
||||
# key/value pairs of string to string
|
||||
key: value
|
||||
```
|
||||
|
||||
## Dashboards
|
||||
|
||||
It's possible to manage dashboards in Grafana by adding one or more yaml config files in the [`provisioning/dashboards`]({{< relref "../installation/configuration.md" >}}) directory. Each config file can contain a list of `dashboards providers` that will load dashboards into Grafana from the local filesystem.
|
||||
You can manage dashboards in Grafana by adding one or more YAML config files in the [`provisioning/dashboards`]({{< relref "configuration.md" >}}) directory. Each config file can contain a list of `dashboards providers` that load dashboards into Grafana from the local filesystem.
|
||||
|
||||
The dashboard provider config file looks somewhat like this:
|
||||
|
||||
@@ -216,32 +248,35 @@ The dashboard provider config file looks somewhat like this:
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
# <string> an unique provider name
|
||||
- name: 'a unique provider name'
|
||||
# <int> org id. will default to orgId 1 if not specified
|
||||
orgId: 1
|
||||
# <string, required> name of the dashboard folder. Required
|
||||
folder: ''
|
||||
# <string> folder UID. will be automatically generated if not specified
|
||||
folderUid: ''
|
||||
# <string, required> provider type. Required
|
||||
type: file
|
||||
# <bool> disable dashboard deletion
|
||||
disableDeletion: false
|
||||
# <bool> enable dashboard editing
|
||||
editable: true
|
||||
# <int> how often Grafana will scan for changed dashboards
|
||||
updateIntervalSeconds: 10
|
||||
# <bool> allow updating provisioned dashboards from the UI
|
||||
allowUiUpdates: false
|
||||
options:
|
||||
# <string, required> path to dashboard files on disk. Required
|
||||
path: /var/lib/grafana/dashboards
|
||||
# <string> an unique provider name. Required
|
||||
- name: 'a unique provider name'
|
||||
# <int> Org id. Default to 1
|
||||
orgId: 1
|
||||
# <string> name of the dashboard folder.
|
||||
folder: ''
|
||||
# <string> folder UID. will be automatically generated if not specified
|
||||
folderUid: ''
|
||||
# <string> provider type. Default to 'file'
|
||||
type: file
|
||||
# <bool> disable dashboard deletion
|
||||
disableDeletion: false
|
||||
# <bool> enable dashboard editing
|
||||
editable: true
|
||||
# <int> how often Grafana will scan for changed dashboards
|
||||
updateIntervalSeconds: 10
|
||||
# <bool> allow updating provisioned dashboards from the UI
|
||||
allowUiUpdates: false
|
||||
options:
|
||||
# <string, required> path to dashboard files on disk. Required when using the 'file' type
|
||||
path: /var/lib/grafana/dashboards
|
||||
# <bool> use folder names from filesystem to create folders in Grafana
|
||||
foldersFromFilesStructure: true
|
||||
```
|
||||
|
||||
When Grafana starts, it will update/insert all dashboards available in the configured path. Then later on poll that path every **updateIntervalSeconds** and look for updated json files and update/insert those into the database.
|
||||
|
||||
#### Making changes to a provisioned dashboard
|
||||
|
||||
It's possible to make changes to a provisioned dashboard in the Grafana UI. However, it is not possible to automatically save the changes back to the provisioning source.
|
||||
If `allowUiUpdates` is set to `true` and you make changes to a provisioned dashboard, you can `Save` the dashboard then changes will be persisted to the Grafana database.
|
||||
|
||||
@@ -250,7 +285,7 @@ If `allowUiUpdates` is set to `true` and you make changes to a provisioned dashb
|
||||
>
|
||||
> If a provisioned dashboard is saved from the UI and the source is removed, the dashboard stored in the database will be deleted unless the configuration option `disableDeletion` is set to true.
|
||||
|
||||
If `allowUiUpdates` is configured to `false`, you are not able to make changes to a provisioned dashboard. When you click `Save`, Grafana brings up a *Cannot save provisioned dashboard* dialog. The screenshot below illustrates this behavior.
|
||||
If `allowUiUpdates` is configured to `false`, you are not able to make changes to a provisioned dashboard. When you click `Save`, Grafana brings up a _Cannot save provisioned dashboard_ dialog. The screenshot below illustrates this behavior.
|
||||
|
||||
Grafana offers options to export the JSON definition of a dashboard. Either `Copy JSON to Clipboard` or `Save JSON to file` can help you synchronize your dashboard changes back to the provisioning source.
|
||||
|
||||
@@ -269,11 +304,41 @@ By default Grafana will delete dashboards in the database if the file is removed
|
||||
> Be careful not to re-use the same `title` multiple times within a folder
|
||||
> or `uid` within the same installation as this will cause weird behaviors.
|
||||
|
||||
### Provision folders structure from filesystem to Grafana
|
||||
If you already store your dashboards using folders in a git repo or on a filesystem, and also you want to have the same folder names in the Grafana menu, you can use `foldersFromFilesStructure` option.
|
||||
|
||||
For example, to replicate these dashboards structure from the filesystem to Grafana,
|
||||
```
|
||||
/etc/dashboards
|
||||
├── /server
|
||||
│ ├── /common_dashboard.json
|
||||
│ └── /network_dashboard.json
|
||||
└── /application
|
||||
├── /requests_dashboard.json
|
||||
└── /resources_dashboard.json
|
||||
```
|
||||
you need to specify just this short provision configuration file.
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: dashboards
|
||||
type: file
|
||||
updateIntervalSeconds: 30
|
||||
options:
|
||||
path: /etc/dashboards
|
||||
foldersFromFileStructure: true
|
||||
```
|
||||
`server` and `application` will become new folders in Grafana menu.
|
||||
|
||||
> **Note.** `folder` and `folderUid` options should be empty or missing to make `foldersFromFileStructure` works.
|
||||
|
||||
## Alert Notification Channels
|
||||
|
||||
Alert Notification Channels can be provisioned by adding one or more yaml config files in the [`provisioning/notifiers`](/installation/configuration/#provisioning) directory.
|
||||
Alert Notification Channels can be provisioned by adding one or more yaml config files in the [`provisioning/notifiers`](/administration/configuration/#provisioning) directory.
|
||||
|
||||
Each config file can contain the following top-level fields:
|
||||
|
||||
- `notifiers`, a list of alert notifications that will be added or updated during start up. If the notification channel already exists, Grafana will update it to match the configuration file.
|
||||
- `delete_notifiers`, a list of alert notifications to be deleted before inserting/updating those in the `notifiers` list.
|
||||
|
||||
@@ -316,8 +381,8 @@ notifiers:
|
||||
# See `Supported Settings` section for settings supporter for each
|
||||
# alert notification type.
|
||||
settings:
|
||||
recipient: "XXX"
|
||||
token: "xoxb"
|
||||
recipient: 'XXX'
|
||||
token: 'xoxb'
|
||||
uploadImage: true
|
||||
url: https://slack.com
|
||||
|
||||
@@ -338,131 +403,131 @@ The following sections detail the supported settings for each alert notification
|
||||
|
||||
#### Alert notification `pushover`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| Name |
|
||||
| -------- |
|
||||
| apiToken |
|
||||
| userKey |
|
||||
| device |
|
||||
| retry |
|
||||
| expire |
|
||||
| userKey |
|
||||
| device |
|
||||
| retry |
|
||||
| expire |
|
||||
|
||||
#### Alert notification `slack`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| url |
|
||||
| recipient |
|
||||
| username |
|
||||
| icon_emoji |
|
||||
| icon_url |
|
||||
| uploadImage |
|
||||
| mentionUsers |
|
||||
| mentionGroups |
|
||||
| Name |
|
||||
| -------------- |
|
||||
| url |
|
||||
| recipient |
|
||||
| username |
|
||||
| icon_emoji |
|
||||
| icon_url |
|
||||
| uploadImage |
|
||||
| mentionUsers |
|
||||
| mentionGroups |
|
||||
| mentionChannel |
|
||||
| token |
|
||||
| token |
|
||||
|
||||
#### Alert notification `victorops`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| url |
|
||||
| Name |
|
||||
| ----------- |
|
||||
| url |
|
||||
| autoResolve |
|
||||
|
||||
#### Alert notification `kafka`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| Name |
|
||||
| -------------- |
|
||||
| kafkaRestProxy |
|
||||
| kafkaTopic |
|
||||
| kafkaTopic |
|
||||
|
||||
#### Alert notification `LINE`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| Name |
|
||||
| ----- |
|
||||
| token |
|
||||
|
||||
#### Alert notification `pagerduty`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| Name |
|
||||
| -------------- |
|
||||
| integrationKey |
|
||||
| autoResolve |
|
||||
| autoResolve |
|
||||
|
||||
#### Alert notification `sensu`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| url |
|
||||
| source |
|
||||
| handler |
|
||||
| Name |
|
||||
| -------- |
|
||||
| url |
|
||||
| source |
|
||||
| handler |
|
||||
| username |
|
||||
| password |
|
||||
|
||||
#### Alert notification `prometheus-alertmanager`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| url |
|
||||
| basicAuthUser |
|
||||
| Name |
|
||||
| ----------------- |
|
||||
| url |
|
||||
| basicAuthUser |
|
||||
| basicAuthPassword |
|
||||
|
||||
#### Alert notification `teams`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| url |
|
||||
| url |
|
||||
|
||||
#### Alert notification `dingding`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| url |
|
||||
| url |
|
||||
|
||||
#### Alert notification `email`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| Name |
|
||||
| ----------- |
|
||||
| singleEmail |
|
||||
| addresses |
|
||||
| addresses |
|
||||
|
||||
#### Alert notification `hipchat`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| url |
|
||||
| Name |
|
||||
| ------ |
|
||||
| url |
|
||||
| apikey |
|
||||
| roomid |
|
||||
|
||||
#### Alert notification `opsgenie`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| apiKey |
|
||||
| apiUrl |
|
||||
| autoClose |
|
||||
| Name |
|
||||
| ---------------- |
|
||||
| apiKey |
|
||||
| apiUrl |
|
||||
| autoClose |
|
||||
| overridePriority |
|
||||
|
||||
#### Alert notification `telegram`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| bottoken |
|
||||
| chatid |
|
||||
| Name |
|
||||
| ----------- |
|
||||
| bottoken |
|
||||
| chatid |
|
||||
| uploadImage |
|
||||
|
||||
#### Alert notification `threema`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| gateway_id |
|
||||
| Name |
|
||||
| ------------ |
|
||||
| gateway_id |
|
||||
| recipient_id |
|
||||
| api_secret |
|
||||
| api_secret |
|
||||
|
||||
#### Alert notification `webhook`
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| url |
|
||||
| Name |
|
||||
| -------- |
|
||||
| url |
|
||||
| username |
|
||||
| password |
|
||||
|
||||
@@ -470,4 +535,4 @@ The following sections detail the supported settings for each alert notification
|
||||
|
||||
| Name |
|
||||
| ---- |
|
||||
| url |
|
||||
| url |
|
||||
|
||||
@@ -7,3 +7,51 @@ parent = "features"
|
||||
weight = 6
|
||||
+++
|
||||
|
||||
# Alerts overview
|
||||
|
||||
Alerts allow you to identify problems in your system moments after they occur. By quickly identifying unintended changes in your system, you can minimize disruptions to your services.
|
||||
|
||||
Alerts consists of two parts:
|
||||
|
||||
- Alert rules - When the alert is triggered. Alert rules are defined by one or more conditions that are regularly evaluated by Grafana.
|
||||
- Notification channel - How the alert is delivered. When the conditions of an alert rule are met, the Grafana notifies the channels configured for that alert.
|
||||
|
||||
Currently only the graph panel visualization supports alerts.
|
||||
|
||||
## Alert tasks
|
||||
|
||||
You can perform the following tasks for alerts:
|
||||
|
||||
- [Add or edit an alert notification channel]({{< relref "notifications.md" >}})
|
||||
- [Create an alert rule]({{< relref "create-alerts.md" >}})
|
||||
- [View existing alert rules and their current state]({{< relref "view-alerts.md" >}})
|
||||
- [Test alert rules and troubleshoot]({{< relref "troubleshoot-alerts.md" >}})
|
||||
|
||||
## Clustering
|
||||
|
||||
Currently alerting supports a limited form of high availability. Since v4.2.0 of Grafana, alert notifications are deduped when running multiple servers. This means all alerts are executed on every server but no duplicate alert notifications are sent due to the deduping logic. Proper load balancing of alerts will be introduced in the future.
|
||||
|
||||
## Notifications
|
||||
|
||||
You can also set alert rule notifications along with a detailed message about the alert rule. The message can contain anything: information about how you might solve the issue, link to runbook, and so on.
|
||||
|
||||
The actual notifications are configured and shared between multiple alerts.
|
||||
|
||||
## Alert execution
|
||||
|
||||
Alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
|
||||
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`, `InfluxDB`, `Elasticsearch`,
|
||||
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`.
|
||||
|
||||
## Metrics from the alert engine
|
||||
|
||||
The alert engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../administration/metrics/" >}}).
|
||||
|
||||
Description | Type | Metric name
|
||||
---------- | ----------- | ----------
|
||||
Total number of alerts | counter | `alerting.active_alerts`
|
||||
Alert execution result | counter | `alerting.result`
|
||||
Notifications sent counter | counter | `alerting.notifications_sent`
|
||||
Alert execution timer | timer | `alerting.execution_time`
|
||||
|
||||
|
||||
|
||||
56
docs/sources/alerting/alerts-overview.md
Normal file
56
docs/sources/alerting/alerts-overview.md
Normal file
@@ -0,0 +1,56 @@
|
||||
+++
|
||||
title = "Alerts overview"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
identifier = "alerting"
|
||||
parent = "Alerting"
|
||||
aliases = ["/docs/grafana/latest/alerting/rules/", "/docs/grafana/latest/alerting/metrics/", "/docs/grafana/latest/alerting/rules/#query-condition-example", "/docs/grafana/latest/alerting/rules/#for", "/docs/grafana/latest/alerting/rules/#rule-config"]
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Alerts overview
|
||||
|
||||
Alerts allow you to identify problems in your system moments after they occur. By quickly identifying unintended changes in your system, you can minimize disruptions to your services.
|
||||
|
||||
Alerts consists of two parts:
|
||||
|
||||
- Alert rules - When the alert is triggered. Alert rules are defined by one or more conditions that are regularly evaluated by Grafana.
|
||||
- Notification channel - How the alert is delivered. When the conditions of an alert rule are met, the Grafana notifies the channels configured for that alert.
|
||||
|
||||
Currently only the graph panel visualization supports alerts.
|
||||
|
||||
## Alert tasks
|
||||
|
||||
You can perform the following tasks for alerts:
|
||||
|
||||
- [Add or edit an alert notification channel]({{< relref "notifications.md" >}})
|
||||
- [Create an alert rule]({{< relref "create-alerts.md" >}})
|
||||
- [View existing alert rules and their current state]({{< relref "view-alerts.md" >}})
|
||||
- [Test alert rules and troubleshoot]({{< relref "troubleshoot-alerts.md" >}})
|
||||
|
||||
## Clustering
|
||||
|
||||
Currently alerting supports a limited form of high availability. Since v4.2.0 of Grafana, alert notifications are deduped when running multiple servers. This means all alerts are executed on every server but no duplicate alert notifications are sent due to the deduping logic. Proper load balancing of alerts will be introduced in the future.
|
||||
|
||||
## Notifications
|
||||
|
||||
You can also set alert rule notifications along with a detailed message about the alert rule. The message can contain anything: information about how you might solve the issue, link to runbook, and so on.
|
||||
|
||||
The actual notifications are configured and shared between multiple alerts.
|
||||
|
||||
## Alert execution
|
||||
|
||||
Alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
|
||||
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`, `InfluxDB`, `Elasticsearch`,
|
||||
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`.
|
||||
|
||||
## Metrics from the alert engine
|
||||
|
||||
The alert engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../administration/metrics/" >}}).
|
||||
|
||||
Description | Type | Metric name
|
||||
---------- | ----------- | ----------
|
||||
Total number of alerts | counter | `alerting.active_alerts`
|
||||
Alert execution result | counter | `alerting.result`
|
||||
Notifications sent counter | counter | `alerting.notifications_sent`
|
||||
Alert execution timer | timer | `alerting.execution_time`
|
||||
129
docs/sources/alerting/create-alerts.md
Normal file
129
docs/sources/alerting/create-alerts.md
Normal file
@@ -0,0 +1,129 @@
|
||||
+++
|
||||
title = "Create alerts"
|
||||
description = "Configure alert rules"
|
||||
keywords = ["grafana", "alerting", "guide", "rules"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Create alerts"
|
||||
parent = "alerting"
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
# Create alerts
|
||||
|
||||
Grafana alerting allows you to attach rules to your dashboard panels. When you save the dashboard, Grafana extracts the alert rules into a separate alert rule storage and schedules them for evaluation.
|
||||
|
||||
{{< imgbox max-width="1000px" img="/img/docs/alerting/drag_handles_gif.gif" caption="Alerting overview" >}}
|
||||
|
||||
In the Alert tab of the graph panel you can configure how often the alert rule should be evaluated and the conditions that need to be met for the alert to change state and trigger its [notifications]({{< relref "notifications.md" >}}).
|
||||
|
||||
Currently only the graph panel supports alert rules.
|
||||
|
||||
## Add or edit an alert rule
|
||||
|
||||
1. Navigate to the panel you want to add or edit an alert rule for, click the title, and then click **Edit**.
|
||||
1. On the Alert tab, click **Create Alert**. If an alert already exists for this panel, then you can just edit the fields on the Alert tab.
|
||||
1. Fill out the fields. Descriptions are listed below in [Alert rule fields](#alert-rule-fields).
|
||||
1. When you have finished writing your rule, click **Save** in the upper right corner to save alert rule and the dashboard.
|
||||
1. (Optional but recommended) Click **Test rule** to make sure the rule returns the results you expect.
|
||||
|
||||
## Delete an alert
|
||||
|
||||
To delete an alert, scroll to the bottom of the alert and then click **Delete**.
|
||||
|
||||
## Alert rule fields
|
||||
|
||||
This section describes the fields you fill out to create an alert.
|
||||
|
||||
### Rule
|
||||
|
||||
- **Name -** Enter a descriptive name. The name will be displayed in the Alert Rules list.
|
||||
- **Evaluate every -** Specify how often the scheduler should evaluate the alert rule. This is referred to as the _evaluation interval_.
|
||||
- **For -** Specify how long the query needs to violate the configured thresholds before the alert notification triggers.
|
||||
|
||||
You can set a minimum evaluation interval in the `alerting.min_interval_seconds` config field, to set a minimum time between evaluations. Refer to [Configuration]({{< relref "../administration/configuration.md" >}}#min-interval-seconds) for more information.
|
||||
|
||||
> **Caution:** Do not use `For` with the `If no data or all values are null` setting set to `No Data`. The triggering of `No Data` will trigger instantly and not take `For` into consideration. This may also result in that an OK notification not being sent if alert transitions from `No Data -> Pending -> OK`.
|
||||
|
||||
If an alert rule has a configured `For` and the query violates the configured threshold, then it will first go from `OK` to `Pending`. Going from `OK` to `Pending` Grafana will not send any notifications. Once the alert rule has been firing for more than `For` duration, it will change to `Alerting` and send alert notifications.
|
||||
|
||||
Typically, it's always a good idea to use this setting since it's often worse to get false positive than wait a few minutes before the alert notification triggers. Looking at the `Alert list` or `Alert list panels` you will be able to see alerts in pending state.
|
||||
|
||||
Below you can see an example timeline of an alert using the `For` setting. At ~16:04 the alert state changes to `Pending` and after 4 minutes it changes to `Alerting` which is when alert notifications are sent. Once the series falls back to normal the alert rule goes back to `OK`.
|
||||
{{< imgbox img="/img/docs/v54/alerting-for-dark-theme.png" caption="Alerting For" >}}
|
||||
|
||||
{{< imgbox max-width="40%" img="/img/docs/v4/alerting_conditions.png" caption="Alerting Conditions" >}}
|
||||
|
||||
### Conditions
|
||||
|
||||
Currently the only condition type that exists is a `Query` condition that allows you to
|
||||
specify a query letter, time range and an aggregation function.
|
||||
|
||||
#### Query condition example
|
||||
|
||||
```sql
|
||||
avg() OF query(A, 15m, now) IS BELOW 14
|
||||
```
|
||||
|
||||
- `avg()` Controls how the values for **each** series should be reduced to a value that can be compared against the threshold. Click on the function to change it to another aggregation function.
|
||||
- `query(A, 15m, now)` The letter defines what query to execute from the **Metrics** tab. The second two parameters define the time range, `15m, now` means 15 minutes ago to now. You can also do `10m, now-2m` to define a time range that will be 10 minutes ago to 2 minutes ago. This is useful if you want to ignore the last 2 minutes of data.
|
||||
- `IS BELOW 14` Defines the type of threshold and the threshold value. You can click on `IS BELOW` to change the type of threshold.
|
||||
|
||||
The query used in an alert rule cannot contain any template variables. Currently we only support `AND` and `OR` operators between conditions and they are executed serially.
|
||||
For example, we have 3 conditions in the following order:
|
||||
_condition:A(evaluates to: TRUE) OR condition:B(evaluates to: FALSE) AND condition:C(evaluates to: TRUE)_
|
||||
so the result will be calculated as ((TRUE OR FALSE) AND TRUE) = TRUE.
|
||||
|
||||
We plan to add other condition types in the future, like `Other Alert`, where you can include the state of another alert in your conditions, and `Time Of Day`.
|
||||
|
||||
#### Multiple Series
|
||||
|
||||
If a query returns multiple series then the aggregation function and threshold check will be evaluated for each series. What Grafana does not do currently is track alert rule state **per series**. This has implications that are detailed in the scenario below.
|
||||
|
||||
- Alert condition with query that returns 2 series: **server1** and **server2**
|
||||
- **server1** series causes the alert rule to fire and switch to state `Alerting`
|
||||
- Notifications are sent out with message: _load peaking (server1)_
|
||||
- In a subsequent evaluation of the same alert rule, the **server2** series also causes the alert rule to fire
|
||||
- No new notifications are sent as the alert rule is already in state `Alerting`.
|
||||
|
||||
So as you can see from the above scenario Grafana will not send out notifications when other series cause the alert to fire if the rule already is in state `Alerting`. To improve support for queries that return multiple series we plan to track state **per series** in a future release.
|
||||
|
||||
> Starting with Grafana v5.3 you can configure reminders to be sent for triggered alerts. This will send additional notifications
|
||||
> when an alert continues to fire. If other series (like server2 in the example above) also cause the alert rule to fire they will be included in the reminder notification. Depending on what notification channel you're using you may be able to take advantage of this feature for identifying new/existing series causing alert to fire.
|
||||
|
||||
### No Data & Error Handling
|
||||
|
||||
Below are conditions you can configure how the rule evaluation engine should handle queries that return no data or only null values.
|
||||
|
||||
| No Data Option | Description |
|
||||
| --------------- | ------------------------------------------------------------------------------------------ |
|
||||
| No Data | Set alert rule state to `NoData` |
|
||||
| Alerting | Set alert rule state to `Alerting` |
|
||||
| Keep Last State | Keep the current alert rule state, what ever it is. |
|
||||
| Ok | Not sure why you would want to send yourself an alert when things are okay, but you could. |
|
||||
|
||||
### Execution errors or timeouts
|
||||
|
||||
Tell Grafana how to handle execution or timeout errors.
|
||||
|
||||
| Error or timeout option | Description |
|
||||
| ----------------------- | --------------------------------------------------- |
|
||||
| Alerting | Set alert rule state to `Alerting` |
|
||||
| Keep Last State | Keep the current alert rule state, what ever it is. |
|
||||
|
||||
If you have an unreliable time series store from which queries sometime timeout or fail randomly you can set this option to `Keep Last State` in order to basically ignore them.
|
||||
|
||||
## Notifications
|
||||
|
||||
In alert tab you can also specify alert rule notifications along with a detailed message about the alert rule. The message can contain anything, information about how you might solve the issue, link to runbook, and so on.
|
||||
|
||||
The actual notifications are configured and shared between multiple alerts. Read
|
||||
[Alert notifications]({{< relref "notifications.md" >}}) for information on how to configure and set up notifications.
|
||||
|
||||
- **Send to -** Select an alert notification channel if you have one set up.
|
||||
- **Message -** Enter a text message to be sent on the notification channel. Some alert notifiers support transforming the text to HTML or other rich formats.
|
||||
- **Tags -** Specify a list of tags (key/value) to be included in the notification. It is only supported by [some notifiers]({{< relref "notifications/#all-supported-notifiers" >}}).
|
||||
|
||||
## Alert state history and annotations
|
||||
|
||||
Alert state changes are recorded in the internal annotation table in Grafana's database. The state changes are visualized as annotations in the alert rule's graph panel. You can also go into the `State history` submenu in the alert tab to view and clear state history.
|
||||
@@ -1,21 +0,0 @@
|
||||
+++
|
||||
title = "Alerting Metrics"
|
||||
description = "Alerting Metrics Guide"
|
||||
keywords = ["Grafana", "alerting", "guide", "metrics"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Metrics"
|
||||
parent = "alerting"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
# Metrics from the alert engine
|
||||
|
||||
The alert engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../administration/metrics/" >}}).
|
||||
|
||||
Description | Type | Metric name
|
||||
---------- | ----------- | ----------
|
||||
Total number of alerts | counter | `alerting.active_alerts`
|
||||
Alert execution result | counter | `alerting.result`
|
||||
Notifications sent counter | counter | `alerting.notifications_sent`
|
||||
Alert execution timer | timer | `alerting.execution_time`
|
||||
@@ -1,46 +1,42 @@
|
||||
+++
|
||||
title = "Alerting Notifications"
|
||||
description = "Alerting Notifications Guide"
|
||||
title = "Alert notifications"
|
||||
description = "Alerting notifications guide"
|
||||
keywords = ["Grafana", "alerting", "guide", "notifications"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Notifications"
|
||||
parent = "alerting"
|
||||
weight = 2
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
|
||||
# Alert Notifications
|
||||
|
||||
> Alerting is only available in Grafana v4.0 and above.
|
||||
# Alert notifications
|
||||
|
||||
When an alert changes state, it sends out notifications. Each alert rule can have
|
||||
multiple notifications. In order to add a notification to an alert rule you first need
|
||||
to add and configure a `notification` channel (can be email, PagerDuty or other integration).
|
||||
This is done from the Notification Channels page.
|
||||
to add and configure a `notification` channel (can be email, PagerDuty, or other integration).
|
||||
|
||||
## Notification Channel Setup
|
||||
This is done from the Notification channels page.
|
||||
|
||||
On the Notification Channels page hit the `New Channel` button to go the page where you
|
||||
can configure and setup a new Notification Channel.
|
||||
> **Note:** Alerting is only available in Grafana v4.0 and above.
|
||||
|
||||
You specify a name and a type, and type specific options. You can also test the notification to make
|
||||
sure it's setup correctly.
|
||||
## Add a notification channel
|
||||
|
||||
1. In the Grafana side bar, hover your cursor over the **Alerting** (bell) icon and then click **Notification channels**.
|
||||
1. Click **Add channel**.
|
||||
1. Fill out the fields or select options described below.
|
||||
|
||||
## New notification channel fields
|
||||
|
||||
### Default (send on all alerts)
|
||||
|
||||
When checked, this option will notify for all alert rules - existing and new.
|
||||
- **Name -** Enter a name for this channel. It will be displayed when users add notifications to alert rules.
|
||||
- **Type -** Select the channel type. Refer to the [List of supported notifiers](#list-of-supported-notifiers) for details.
|
||||
- **Default (send on all alerts) -** When selected, this option sends a notification on this channel for all alert rules.
|
||||
- **Include Image -** See [Enable images in notifications](#enable-images-in-notifications-external-image-store) for details.
|
||||
- **Disable Resolve Message -** When selected, this option disables the resolve message [OK] that is sent when the alerting state returns to false.
|
||||
- **Send reminders -** When this option is checked additional notifications (reminders) will be sent for triggered alerts. You can specify how often reminders should be sent using number of seconds (s), minutes (m) or hours (h), for example `30s`, `3m`, `5m` or `1h`.
|
||||
|
||||
### Send reminders
|
||||
|
||||
> Only available in Grafana v5.3 and above.
|
||||
|
||||
{{< docs-imagebox max-width="600px" img="/img/docs/v53/alerting_notification_reminders.png" class="docs-image--right" caption="Alerting notification reminders setup" >}}
|
||||
|
||||
When this option is checked additional notifications (reminders) will be sent for triggered alerts. You can specify how often reminders
|
||||
should be sent using number of seconds (s), minutes (m) or hours (h), for example `30s`, `3m`, `5m` or `1h` etc.
|
||||
|
||||
**Important:** Alert reminders are sent after rules are evaluated. Therefore a reminder can never be sent more frequently than a configured [alert rule evaluation interval]({{< relref "rules/#name-evaluation-interval" >}}).
|
||||
**Important:** Alert reminders are sent after rules are evaluated. Therefore a reminder can never be sent more frequently than a configured alert rule evaluation interval.
|
||||
|
||||
These examples show how often and when reminders are sent for a triggered alert.
|
||||
|
||||
@@ -55,17 +51,32 @@ Alert rule evaluation interval | Send reminders every | Reminder sent every (aft
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
### Disable resolve message
|
||||
## List of supported notifiers
|
||||
|
||||
When checked, this option will disable resolve message [OK] that is sent when alerting state returns to false.
|
||||
|
||||
## Supported Notification Types
|
||||
|
||||
Grafana ships with the following set of notification types:
|
||||
Name | Type | Supports images | Support alert rule tags
|
||||
-----|------|---------------- | -----------------------
|
||||
[DingDing](#dingdingdingtalk) | `dingding` | yes, external only | no
|
||||
Discord | `discord` | yes | no
|
||||
[Email](#email) | `email` | yes | no
|
||||
[Google Hangouts Chat](#google-hangouts-chat) | `googlechat` | yes, external only | no
|
||||
Hipchat | `hipchat` | yes, external only | no
|
||||
[Kafka](#kafka) | `kafka` | yes, external only | no
|
||||
Line | `line` | yes, external only | no
|
||||
Microsoft Teams | `teams` | yes, external only | no
|
||||
OpsGenie | `opsgenie` | yes, external only | yes
|
||||
[Pagerduty](#pagerduty) | `pagerduty` | yes, external only | yes
|
||||
Prometheus Alertmanager | `prometheus-alertmanager` | yes, external only | yes
|
||||
Pushover | `pushover` | yes | no
|
||||
Sensu | `sensu` | yes, external only | no
|
||||
[Slack](#slack) | `slack` | yes | no
|
||||
Telegram | `telegram` | yes | no
|
||||
Threema | `threema` | yes, external only | no
|
||||
VictorOps | `victorops` | yes, external only | no
|
||||
[Webhook](#webhook) | `webhook` | yes, external only | yes
|
||||
|
||||
### Email
|
||||
|
||||
To enable email notifications you have to setup [SMTP settings]({{< relref "../installation/configuration/#smtp" >}})
|
||||
To enable email notifications you have to setup [SMTP settings]({{< relref "../administration/configuration/#smtp" >}})
|
||||
in the Grafana config. Email notifications will upload an image of the alert graph to an
|
||||
external image destination if available or fallback to attaching the image to the email.
|
||||
Be aware that if you use the `local` image storage email servers and clients might not be
|
||||
@@ -83,20 +94,20 @@ Addresses | Email addresses to recipients. You can enter multiple email addresse
|
||||
To set up Slack, you need to configure an incoming Slack webhook URL. You can follow
|
||||
[Sending messages using Incoming Webhooks](https://api.slack.com/incoming-webhooks) on how to do that. If you want to include screenshots of the
|
||||
firing alerts in the Slack messages you have to configure either the [external image destination](#external-image-store)
|
||||
in Grafana or a bot integration via Slack Apps. Follow Slack's guide to set up a bot integration and use the token
|
||||
provided (https://api.slack.com/bot-users), which starts with "xoxb".
|
||||
in Grafana or a bot integration via Slack Apps. [Follow Slack's guide to set up a bot integration](https://api.slack.com/bot-users) and use the token
|
||||
provided, which starts with "xoxb".
|
||||
|
||||
Setting | Description
|
||||
---------- | -----------
|
||||
Url | Slack incoming webhook URL.
|
||||
Url | Slack incoming webhook URL, or eventually the [chat.postMessage](https://api.slack.com/methods/chat.postMessage) Slack API endpoint.
|
||||
Username | Set the username for the bot's message.
|
||||
Recipient | Allows you to override the Slack recipient. You must either provide a channel Slack ID, a user Slack ID, a username reference (@<user>, all lowercase, no whitespace), or a channel reference (#<channel>, all lowercase, no whitespace).
|
||||
Recipient | Allows you to override the Slack recipient. You must either provide a channel Slack ID, a user Slack ID, a username reference (@<user>, all lowercase, no whitespace), or a channel reference (#<channel>, all lowercase, no whitespace). If you use the `chat.postMessage` Slack API endpoint, this is required.
|
||||
Icon emoji | Provide an emoji to use as the icon for the bot's message. Ex :smile:
|
||||
Icon URL | Provide a URL to an image to use as the icon for the bot's message.
|
||||
Mention Users | Optionally mention one or more users in the Slack notification sent by Grafana. You have to refer to users, comma-separated, via their corresponding Slack IDs (which you can find by clicking the overflow button on each user's Slack profile).
|
||||
Mention Groups | Optionally mention one or more groups in the Slack notification sent by Grafana. You have to refer to groups, comma-separated, via their corresponding Slack IDs (which you can get from each group's Slack profile URL).
|
||||
Mention Channel | Optionally mention either all channel members or just active ones.
|
||||
Token | If provided, Grafana will upload the generated image via Slack's file.upload API method, not the external image destination.
|
||||
Token | If provided, Grafana will upload the generated image via Slack's file.upload API method, not the external image destination. If you use the `chat.postMessage` Slack API endpoint, this is required.
|
||||
|
||||
If you are using the token for a slack bot, then you have to invite the bot to the channel you want to send notifications and add the channel to the recipient field.
|
||||
|
||||
@@ -107,10 +118,16 @@ To set up PagerDuty, all you have to do is to provide an integration key.
|
||||
Setting | Description
|
||||
---------- | -----------
|
||||
Integration Key | Integration key for PagerDuty.
|
||||
Severity | Level for dynamic notifications, default is `critical`
|
||||
Severity | Level for dynamic notifications, default is `critical` (1)
|
||||
Auto resolve incidents | Resolve incidents in PagerDuty once the alert goes back to ok
|
||||
Message in details | Removes the Alert message from the PD summary field and puts it into custom details instead (2)
|
||||
|
||||
**Note:** The tags `Severity`, `Class`, `Group`, and `Component` have special meaning in the [Pagerduty Common Event Format - PD-CEF](https://support.pagerduty.com/docs/pd-cef). If an alert panel defines these tag keys, then they are transposed to the root of the event sent to Pagerduty. This means they will be available within the Pagerduty UI and Filtering tools. A Severity tag set on an alert overrides the global Severity set on the notification channel if it's a valid level.
|
||||
>**Note:** The tags `Severity`, `Class`, `Group`, and `Component` have special meaning in the [Pagerduty Common Event Format - PD-CEF](https://support.pagerduty.com/docs/pd-cef). If an alert panel defines these tag keys, then they are transposed to the root of the event sent to Pagerduty. This means they will be available within the Pagerduty UI and Filtering tools. A Severity tag set on an alert overrides the global Severity set on the notification channel if it's a valid level.
|
||||
|
||||
>Using Message In Details will change the structure of the `custom_details` field in the PagerDuty Event.
|
||||
This might break custom event rules in your PagerDuty rules if you rely on the fields in `payload.custom_details`.
|
||||
Move any existing rules using `custom_details.myMetric` to `custom_details.queries.myMetric`.
|
||||
This behavior will become the default in a future version of Grafana.
|
||||
|
||||
### Webhook
|
||||
|
||||
@@ -185,52 +202,22 @@ Notifications can be sent by setting up an incoming webhook in Google Hangouts c
|
||||
|
||||
Squadcast helps you get alerted via Phone call, SMS, Email and Push notifications and lets you take actions on those alerts. Grafana notifications can be sent to Squadcast via a simple incoming webhook. Refer the official [Squadcast support documentation](https://support.squadcast.com/docs/grafana) for configuring these webhooks.
|
||||
|
||||
### All supported notifiers
|
||||
### Prometheus Alertmanager
|
||||
|
||||
Name | Type | Supports images | Support alert rule tags
|
||||
-----|------|---------------- | -----------------------
|
||||
DingDing | `dingding` | yes, external only | no
|
||||
Discord | `discord` | yes | no
|
||||
Email | `email` | yes | no
|
||||
Google Hangouts Chat | `googlechat` | yes, external only | no
|
||||
Hipchat | `hipchat` | yes, external only | no
|
||||
Kafka | `kafka` | yes, external only | no
|
||||
Line | `line` | yes, external only | no
|
||||
Microsoft Teams | `teams` | yes, external only | no
|
||||
OpsGenie | `opsgenie` | yes, external only | yes
|
||||
Pagerduty | `pagerduty` | yes, external only | yes
|
||||
Prometheus Alertmanager | `prometheus-alertmanager` | yes, external only | yes
|
||||
Pushover | `pushover` | yes | no
|
||||
Sensu | `sensu` | yes, external only | no
|
||||
Slack | `slack` | yes | no
|
||||
Telegram | `telegram` | yes | no
|
||||
Threema | `threema` | yes, external only | no
|
||||
VictorOps | `victorops` | yes, external only | no
|
||||
Webhook | `webhook` | yes, external only | yes
|
||||
Alertmanager handles alerts sent by client applications such as Prometheus server or Grafana. It takes care of deduplicating, grouping, and routing them to the correct receiver. Grafana notifications can be sent to Alertmanager via a simple incoming webhook. Refer to the official [Prometheus Alertmanager documentation](https://prometheus.io/docs/alerting/alertmanager) for configuration information.
|
||||
|
||||
> **Caution:** In case of a high-availability setup, do not load balance traffic between Grafana and Alertmanagers to keep coherence between all your Alertmanager instances. Instead, point Grafana to a list of all Alertmanagers, by listing their URLs comma-separated in the notification channel configuration.
|
||||
|
||||
## Enable images in notifications {#external-image-store}
|
||||
|
||||
Grafana can render the panel associated with the alert rule as a PNG image and include that in the notification. Read more about the requirements and how to configure
|
||||
[image rendering]({{< relref "../administration/image_rendering/" >}}).
|
||||
|
||||
Most Notification Channels require that this image be publicly accessible (Slack and PagerDuty for example). In order to include images in alert notifications, Grafana can upload the image to an image store. It currently supports
|
||||
Amazon S3, Webdav, Google Cloud Storage and Azure Blob Storage. So to set that up you need to configure the [external image uploader]({{< relref "../installation/configuration/#external-image-storage" >}}) in your grafana-server ini config file.
|
||||
|
||||
Be aware that some notifiers require public access to the image to be able to include it in the notification. So make sure to enable public access to the images. If you're using local image uploader, your Grafana instance need to be accessible by the internet.
|
||||
You must configure an [external image storage provider]({{< relref "../administration/configuration/#external-image-storage" >}}) in order to receive images in alert notifications. If your notification channel requires that the image be publicly accessible (e.g. Slack, PagerDuty), configure a provider which uploads the image to a remote image store like Amazon S3, Webdav, Google Cloud Storage, or Azure Blob Storage. Otherwise, the local provider can be used to serve the image directly from Grafana.
|
||||
|
||||
Notification services which need public image access are marked as 'external only'.
|
||||
|
||||
## Use alert rule tags in notifications {#alert-rule-tags}
|
||||
|
||||
> Only available in Grafana v6.3+.
|
||||
|
||||
Grafana can include a list of tags (key/value) in the notification.
|
||||
It's called alert rule tags to contrast with tags parsed from timeseries.
|
||||
It currently supports only the Prometheus Alertmanager notifier.
|
||||
|
||||
This is an optional feature. You can get notifications without using alert rule tags.
|
||||
|
||||
## Configure the link back to Grafana from alert notifications
|
||||
|
||||
All alert notifications contain a link back to the triggered alert in the Grafana instance.
|
||||
This URL is based on the [domain]({{< relref "../installation/configuration/#domain" >}}) setting in Grafana.
|
||||
This URL is based on the [domain]({{< relref "../administration/configuration/#domain" >}}) setting in Grafana.
|
||||
|
||||
17
docs/sources/alerting/pause-an-alert-rule.md
Normal file
17
docs/sources/alerting/pause-an-alert-rule.md
Normal file
@@ -0,0 +1,17 @@
|
||||
+++
|
||||
title = "Pause alert rule"
|
||||
description = "Pause an existing alert rule"
|
||||
keywords = ["grafana", "alerting", "guide", "rules", "view"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "alerting"
|
||||
weight = 400
|
||||
+++
|
||||
|
||||
# Pause an alert rule
|
||||
|
||||
Pausing the evaluation of an alert rule can sometimes be useful. For example, during a maintenance window, pausing alert rules can avoid triggering a flood of alerts.
|
||||
|
||||
1. In the Grafana side bar, hover your cursor over the Alerting (bell) icon and then click **Alert Rules**. All configured alert rules are listed, along with their current state.
|
||||
1. Find your alert in the list, and click the **Pause** icon on the right. The **Pause** icon turns into a **Play** icon.
|
||||
1. Click the **Play** icon to resume evaluation of your alert.
|
||||
@@ -1,174 +0,0 @@
|
||||
+++
|
||||
title = "Alerting Engine and Rules Guide"
|
||||
description = "Configuring Alert Rules"
|
||||
keywords = ["grafana", "alerting", "guide", "rules"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Engine and Rules"
|
||||
parent = "alerting"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Alerting Engine and Rules Guide
|
||||
|
||||
Alerting in Grafana allows you to attach rules to your dashboard panels. When you save the dashboard,
|
||||
Grafana will extract the alert rules into a separate alert rule storage and schedule them for evaluation.
|
||||
|
||||
{{< imgbox max-width="40%" img="/img/docs/v4/drag_handles_gif.gif" caption="Alerting overview" >}}
|
||||
|
||||
In the alert tab of the graph panel you can configure how often the alert rule should be evaluated
|
||||
and the conditions that need to be met for the alert to change state and trigger its
|
||||
[notifications]({{< relref "notifications.md" >}}).
|
||||
|
||||
## Execution
|
||||
|
||||
The alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
|
||||
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`, `InfluxDB`, `Elasticsearch`,
|
||||
`Stackdriver`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`.
|
||||
|
||||
## Clustering
|
||||
|
||||
Currently alerting supports a limited form of high availability. Since v4.2.0 of Grafana, alert notifications are deduped when running multiple servers. This means all alerts are executed on every server but no duplicate alert notifications are sent due to the deduping logic. Proper load balancing of alerts will be introduced in the future.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
## Rule Config
|
||||
|
||||
Currently only the graph panel supports alert rules.
|
||||
|
||||
### Name and Evaluation interval
|
||||
|
||||
Here you can specify the name of the alert rule and how often the scheduler should evaluate the alert rule.
|
||||
**Note:** You can set a minimum interval in the `alerting.min_interval_seconds` config field, to set a minimum time between evaluations. Check out the [[configuration]]({{< relref "../installation/configuration.md" >}}#min-interval-seconds) page for more information.
|
||||
|
||||
### For
|
||||
|
||||
> **Important note regarding No Data:**
|
||||
>
|
||||
> Do not use `For` with the `If no data or all values are null` setting set to `No Data`. The triggering of `No Data` will trigger instantly and not take `For` into consideration. This may also result in that an OK notification not being sent if alert transitions from `No Data -> Pending -> OK`.
|
||||
|
||||
If an alert rule has a configured `For` and the query violates the configured threshold it will first go from `OK` to `Pending`. Going from `OK` to `Pending` Grafana will not send any notifications. Once the alert rule has been firing for more than `For` duration, it will change to `Alerting` and send alert notifications.
|
||||
|
||||
Typically, it's always a good idea to use this setting since it's often worse to get false positive than wait a few minutes before the alert notification triggers. Looking at the `Alert list` or `Alert list panels` you will be able to see alerts in pending state.
|
||||
|
||||
Below you can see an example timeline of an alert using the `For` setting. At ~16:04 the alert state changes to `Pending` and after 4 minutes it changes to `Alerting` which is when alert notifications are sent. Once the series falls back to normal the alert rule goes back to `OK`.
|
||||
{{< imgbox img="/img/docs/v54/alerting-for-dark-theme.png" caption="Alerting For" >}}
|
||||
|
||||
{{< imgbox max-width="40%" img="/img/docs/v4/alerting_conditions.png" caption="Alerting Conditions" >}}
|
||||
|
||||
### Conditions
|
||||
|
||||
Currently the only condition type that exists is a `Query` condition that allows you to
|
||||
specify a query letter, time range and an aggregation function.
|
||||
|
||||
### Query condition example
|
||||
|
||||
```sql
|
||||
avg() OF query(A, 15m, now) IS BELOW 14
|
||||
```
|
||||
|
||||
- `avg()` Controls how the values for **each** series should be reduced to a value that can be compared against the threshold. Click on the function to change it to another aggregation function.
|
||||
- `query(A, 15m, now)` The letter defines what query to execute from the **Metrics** tab. The second two parameters define the time range, `15m, now` means 15 minutes ago to now. You can also do `10m, now-2m` to define a time range that will be 10 minutes ago to 2 minutes ago. This is useful if you want to ignore the last 2 minutes of data.
|
||||
- `IS BELOW 14` Defines the type of threshold and the threshold value. You can click on `IS BELOW` to change the type of threshold.
|
||||
|
||||
The query used in an alert rule cannot contain any template variables. Currently we only support `AND` and `OR` operators between conditions and they are executed serially.
|
||||
For example, we have 3 conditions in the following order:
|
||||
*condition:A(evaluates to: TRUE) OR condition:B(evaluates to: FALSE) AND condition:C(evaluates to: TRUE)*
|
||||
so the result will be calculated as ((TRUE OR FALSE) AND TRUE) = TRUE.
|
||||
|
||||
We plan to add other condition types in the future, like `Other Alert`, where you can include the state
|
||||
of another alert in your conditions, and `Time Of Day`.
|
||||
|
||||
#### Multiple Series
|
||||
|
||||
If a query returns multiple series then the aggregation function and threshold check will be evaluated for each series.
|
||||
What Grafana does not do currently is track alert rule state **per series**. This has implications that are detailed
|
||||
in the scenario below.
|
||||
|
||||
- Alert condition with query that returns 2 series: **server1** and **server2**
|
||||
- **server1** series cause the alert rule to fire and switch to state `Alerting`
|
||||
- Notifications are sent out with message: _load peaking (server1)_
|
||||
- In a subsequence evaluation of the same alert rule the **server2** series also cause the alert rule to fire
|
||||
- No new notifications are sent as the alert rule is already in state `Alerting`.
|
||||
|
||||
So as you can see from the above scenario Grafana will not send out notifications when other series cause the alert
|
||||
to fire if the rule already is in state `Alerting`. To improve support for queries that return multiple series
|
||||
we plan to track state **per series** in a future release.
|
||||
|
||||
> Starting with Grafana v5.3 you can configure reminders to be sent for triggered alerts. This will send additional notifications
|
||||
> when an alert continues to fire. If other series (like server2 in the example above) also cause the alert rule to fire they will
|
||||
> be included in the reminder notification. Depending on what notification channel you're using you may be able to take advantage
|
||||
> of this feature for identifying new/existing series causing alert to fire. [Read more about notification reminders here]({{< relref "notifications/#send-reminders" >}}).
|
||||
|
||||
### No Data / Null values
|
||||
|
||||
Below your conditions you can configure how the rule evaluation engine should handle queries that return no data or only null values.
|
||||
|
||||
No Data Option | Description
|
||||
------------ | -------------
|
||||
NoData | Set alert rule state to `NoData`
|
||||
Alerting | Set alert rule state to `Alerting`
|
||||
Keep Last State | Keep the current alert rule state, what ever it is.
|
||||
|
||||
### Execution errors or timeouts
|
||||
|
||||
The last option tells how to handle execution or timeout errors.
|
||||
|
||||
Error or timeout option | Description
|
||||
------------ | -------------
|
||||
Alerting | Set alert rule state to `Alerting`
|
||||
Keep Last State | Keep the current alert rule state, what ever it is.
|
||||
|
||||
If you have an unreliable time series store from which queries sometime timeout or fail randomly you can set this option
|
||||
to `Keep Last State` in order to basically ignore them.
|
||||
|
||||
## Notifications
|
||||
|
||||
In alert tab you can also specify alert rule notifications along with a detailed message about the alert rule.
|
||||
The message can contain anything, information about how you might solve the issue, link to runbook, etc.
|
||||
|
||||
The actual notifications are configured and shared between multiple alerts. Read the
|
||||
[notifications]({{< relref "notifications.md" >}}) guide for how to configure and setup notifications.
|
||||
|
||||
## Alert State History and Annotations
|
||||
|
||||
Alert state changes are recorded in the internal annotation table in Grafana's database. The state changes
|
||||
are visualized as annotations in the alert rule's graph panel. You can also go into the `State history`
|
||||
submenu in the alert tab to view and clear state history.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
{{< imgbox max-width="40%" img="/img/docs/v4/alert_test_rule.png" caption="Test Rule" >}}
|
||||
|
||||
First level of troubleshooting you can do is hit the **Test Rule** button. You will get result back that you can expand
|
||||
to the point where you can see the raw data that was returned from your query.
|
||||
|
||||
Further troubleshooting can also be done by inspecting the grafana-server log. If it's not an error or for some reason
|
||||
the log does not say anything you can enable debug logging for some relevant components. This is done
|
||||
in Grafana's ini config file.
|
||||
|
||||
Example showing loggers that could be relevant when troubleshooting alerting.
|
||||
|
||||
```ini
|
||||
[log]
|
||||
filters = alerting.scheduler:debug \
|
||||
alerting.engine:debug \
|
||||
alerting.resultHandler:debug \
|
||||
alerting.evalHandler:debug \
|
||||
alerting.evalContext:debug \
|
||||
alerting.extractor:debug \
|
||||
alerting.notifier:debug \
|
||||
alerting.notifier.slack:debug \
|
||||
alerting.notifier.pagerduty:debug \
|
||||
alerting.notifier.email:debug \
|
||||
alerting.notifier.webhook:debug \
|
||||
tsdb.graphite:debug \
|
||||
tsdb.prometheus:debug \
|
||||
tsdb.opentsdb:debug \
|
||||
tsdb.influxdb:debug \
|
||||
tsdb.elasticsearch:debug \
|
||||
tsdb.elasticsearch.client:debug \
|
||||
```
|
||||
|
||||
If you want to log raw query sent to your TSDB and raw response in log you also have to set grafana.ini option `app_mode` to
|
||||
`development`.
|
||||
45
docs/sources/alerting/troubleshoot-alerts.md
Normal file
45
docs/sources/alerting/troubleshoot-alerts.md
Normal file
@@ -0,0 +1,45 @@
|
||||
+++
|
||||
title = "Troubleshoot alerts"
|
||||
description = "Troubleshoot alert rules"
|
||||
keywords = ["grafana", "alerting", "guide", "rules", "troubleshoot"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Troubleshoot alerts"
|
||||
parent = "alerting"
|
||||
weight = 500
|
||||
+++
|
||||
|
||||
# Troubleshoot alerts
|
||||
|
||||
If alerts are not behaving as you expect, here are some steps you can take to troubleshoot and figure out what is going wrong.
|
||||
|
||||
{{< imgbox max-width="1000px" img="/img/docs/v4/alert_test_rule.png" caption="Test Rule" >}}
|
||||
|
||||
The first level of troubleshooting you can do is click **Test Rule**. You will get result back that you can expand to the point where you can see the raw data that was returned from your query.
|
||||
|
||||
Further troubleshooting can also be done by inspecting the grafana-server log. If it's not an error or for some reason the log does not say anything you can enable debug logging for some relevant components. This is done in Grafana's ini config file.
|
||||
|
||||
Example showing loggers that could be relevant when troubleshooting alerting.
|
||||
|
||||
```ini
|
||||
[log]
|
||||
filters = alerting.scheduler:debug \
|
||||
alerting.engine:debug \
|
||||
alerting.resultHandler:debug \
|
||||
alerting.evalHandler:debug \
|
||||
alerting.evalContext:debug \
|
||||
alerting.extractor:debug \
|
||||
alerting.notifier:debug \
|
||||
alerting.notifier.slack:debug \
|
||||
alerting.notifier.pagerduty:debug \
|
||||
alerting.notifier.email:debug \
|
||||
alerting.notifier.webhook:debug \
|
||||
tsdb.graphite:debug \
|
||||
tsdb.prometheus:debug \
|
||||
tsdb.opentsdb:debug \
|
||||
tsdb.influxdb:debug \
|
||||
tsdb.elasticsearch:debug \
|
||||
tsdb.elasticsearch.client:debug \
|
||||
```
|
||||
|
||||
If you want to log raw query sent to your TSDB and raw response in log you also have to set grafana.ini option `app_mode` to `development`.
|
||||
23
docs/sources/alerting/view-alerts.md
Normal file
23
docs/sources/alerting/view-alerts.md
Normal file
@@ -0,0 +1,23 @@
|
||||
+++
|
||||
title = "View alerts"
|
||||
description = "View existing alert rules"
|
||||
keywords = ["grafana", "alerting", "guide", "rules", "view"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "View alerts"
|
||||
parent = "alerting"
|
||||
weight = 400
|
||||
+++
|
||||
|
||||
# View existing alert rules
|
||||
|
||||
Grafana stores individual alert rules in the panels where they are defined, but you can also view a list of all existing alert rules and their current state.
|
||||
|
||||
In the Grafana side bar, hover your cursor over the Alerting (bell) icon and then click **Alert Rules**. All configured alert rules are listed, along with their current state.
|
||||
|
||||
You can do several things while viewing alerts.
|
||||
|
||||
- **Filter alerts by name -** Type an alert name in the **Search alerts** field.
|
||||
- **Filter alerts by state -** In **States**, select which alert states you want to see. All others will be hidden.
|
||||
- **Pause or resume an alert -** Click the **Pause** or **Play** icon next to the alert to pause or resume evaluation. See [Pause an alert rule]({{< relref "pause-an-alert-rule.md" >}}) for more information.
|
||||
- **Access alert rule settings -** Click the alert name or the **Edit alert rule** (gear) icon. Grafana opens the Alert tab of the panel where the alert rule is defined. This is helpful when an alert is firing but you don't know which panel it is defined in.
|
||||
@@ -9,4 +9,135 @@ parent = "admin"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# User Authentication Overview
|
||||
|
||||
Grafana provides many ways to authenticate users. Some authentication integrations also enable syncing user permissions and org memberships.
|
||||
|
||||
Here is a table showing all supported authentication providers and the features available for them. [Team sync]({{< relref "../enterprise/team-sync.md" >}}) and [active sync]({{< relref "../enterprise/enhanced_ldap.md#active-ldap-synchronization" >}}) are only available in Grafana Enterprise.
|
||||
|
||||
Provider | Support | Role mapping | Team sync<br> *(Enterprise only)* | Active sync<br> *(Enterprise only)*
|
||||
-------- | :-----: | :----------: | :-------: | :---------:
|
||||
[Auth Proxy]({{< relref "auth-proxy.md" >}}) | v2.1+ | - | v6.3+ | -
|
||||
[Azure AD OAuth]({{< relref "azuread.md" >}}) | v6.7+ | v6.7+ | v6.7+ | -
|
||||
[Generic OAuth]({{< relref "generic-oauth.md" >}}) | v4.0+ | v6.5+ | - | -
|
||||
[GitHub OAuth]({{< relref "github.md" >}}) | v2.0+ | - | v6.3+ | -
|
||||
[GitLab OAuth]({{< relref "gitlab.md" >}}) | v5.3+ | - | v6.4+ | -
|
||||
[Google OAuth]({{< relref "google.md" >}}) | v2.0+ | - | - | -
|
||||
[LDAP]({{< relref "ldap.md" >}}) | v2.1+ | v2.1+ | v5.3+ | v6.3+
|
||||
[Okta OAuth]({{< relref "okta.md" >}}) | v7.0+ | v7.0+ | v7.0+ | -
|
||||
[SAML]({{< relref "../enterprise/saml.md" >}}) (Enterprise only) | v6.3+ | v7.0+ | v7.0+ | -
|
||||
|
||||
## Grafana Auth
|
||||
|
||||
Grafana of course has a built in user authentication system with password authentication enabled by default. You can
|
||||
disable authentication by enabling anonymous access. You can also hide login form and only allow login through an auth
|
||||
provider (listed above). There is also options for allowing self sign up.
|
||||
|
||||
### Login and short-lived tokens
|
||||
|
||||
> The following applies when using Grafana's built in user authentication, LDAP (without Auth proxy) or OAuth integration.
|
||||
|
||||
Grafana are using short-lived tokens as a mechanism for verifying authenticated users.
|
||||
These short-lived tokens are rotated each `token_rotation_interval_minutes` for an active authenticated user.
|
||||
|
||||
An active authenticated user that gets it token rotated will extend the `login_maximum_inactive_lifetime_days` time from "now" that Grafana will remember the user.
|
||||
This means that a user can close its browser and come back before `now + login_maximum_inactive_lifetime_days` and still being authenticated.
|
||||
This is true as long as the time since user login is less than `login_maximum_lifetime_days`.
|
||||
|
||||
#### Remote logout
|
||||
|
||||
You can logout from other devices by removing login sessions from the bottom of your profile page. If you are
|
||||
a Grafana admin user you can also do the same for any user from the Server Admin / Edit User view.
|
||||
|
||||
## Settings
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
|
||||
# Login cookie name
|
||||
login_cookie_name = grafana_session
|
||||
|
||||
# The lifetime (days) an authenticated user can be inactive before being required to login at next visit. Default is 7 days.
|
||||
login_maximum_inactive_lifetime_days = 7
|
||||
|
||||
# The maximum lifetime (days) an authenticated user can be logged in since login time before being required to login. Default is 30 days.
|
||||
login_maximum_lifetime_days = 30
|
||||
|
||||
# How often should auth tokens be rotated for authenticated users when being active. The default is each 10 minutes.
|
||||
token_rotation_interval_minutes = 10
|
||||
|
||||
# The maximum lifetime (seconds) an api key can be used. If it is set all the api keys should have limited lifetime that is lower than this value.
|
||||
api_key_max_seconds_to_live = -1
|
||||
```
|
||||
|
||||
### Anonymous authentication
|
||||
|
||||
You can make Grafana accessible without any login required by enabling anonymous access in the configuration file.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
[auth.anonymous]
|
||||
enabled = true
|
||||
|
||||
# Organization name that should be used for unauthenticated users
|
||||
org_name = Main Org.
|
||||
|
||||
# Role for unauthenticated users, other valid values are `Editor` and `Admin`
|
||||
org_role = Viewer
|
||||
```
|
||||
|
||||
If you change your organization name in the Grafana UI this setting needs to be updated to match the new name.
|
||||
|
||||
### Basic authentication
|
||||
|
||||
Basic auth is enabled by default and works with the built in Grafana user password authentication system and LDAP
|
||||
authentication integration.
|
||||
|
||||
To disable basic auth:
|
||||
|
||||
```bash
|
||||
[auth.basic]
|
||||
enabled = false
|
||||
```
|
||||
|
||||
### Disable login form
|
||||
|
||||
You can hide the Grafana login form using the below configuration settings.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
disable_login_form = true
|
||||
```
|
||||
|
||||
### Automatic OAuth login
|
||||
|
||||
Set to true to attempt login with OAuth automatically, skipping the login screen.
|
||||
This setting is ignored if multiple OAuth providers are configured.
|
||||
Defaults to `false`.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
oauth_auto_login = true
|
||||
```
|
||||
|
||||
### Hide sign-out menu
|
||||
|
||||
Set the option detailed below to true to hide sign-out menu link. Useful if you use an auth proxy.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
disable_signout_menu = true
|
||||
```
|
||||
|
||||
### URL redirect after signing out
|
||||
|
||||
URL to redirect the user to after signing out from Grafana. This can for example be used to enable signout from oauth provider.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
signout_redirect_url =
|
||||
```
|
||||
|
||||
|
||||
@@ -30,8 +30,8 @@ To enable the Azure AD OAuth2 you must register your application with Azure AD.
|
||||
1. Click the name of the new application to open the application details page.
|
||||
|
||||
1. Click **Endpoints**.
|
||||
- Note down the **OAuth 2.0 authorization endpoint (v2)**, this will be the auth url.
|
||||
- Note down the **OAuth 2.0 token endpoint (v2)**, this will be the token url.
|
||||
- Note down the **OAuth 2.0 authorization endpoint (v2)**, this will be the auth URL.
|
||||
- Note down the **OAuth 2.0 token endpoint (v2)**, this will be the token URL.
|
||||
|
||||
1. Close the Endpoints page to come back to the application details page.
|
||||
|
||||
@@ -92,9 +92,9 @@ To enable the Azure AD OAuth2 you must register your application with Azure AD.
|
||||
|
||||
1. Click on **Users and groups** and add Users/Groups to the Grafana roles by using **Add User**.
|
||||
|
||||
## Enable Azure AD Oauth in Grafana
|
||||
## Enable Azure AD OAuth in Grafana
|
||||
|
||||
1. Add the following to the [Grafana configuration file]({{< relref "../installation/configuration.md#config-file-locations" >}}):
|
||||
1. Add the following to the [Grafana configuration file]({{< relref "../administration/configuration.md#config-file-locations" >}}):
|
||||
|
||||
```ini
|
||||
[auth.azuread]
|
||||
@@ -110,7 +110,7 @@ allowed_domains =
|
||||
allowed_groups =
|
||||
```
|
||||
|
||||
> Note: Ensure that the [root_url]({{< relref "../installation/configuration/#root-url" >}}) in Grafana is set in your Azure Application Reply URLs (App -> Settings -> Reply URLs)
|
||||
> Note: Ensure that the [root_url]({{< relref "../administration/configuration/#root-url" >}}) in Grafana is set in your Azure Application Reply URLs (App -> Settings -> Reply URLs)
|
||||
|
||||
### Configure allowed groups and domains
|
||||
|
||||
|
||||
@@ -12,6 +12,6 @@ weight = 3
|
||||
|
||||
# Enhanced LDAP integration
|
||||
|
||||
The enhanced LDAP integration adds additional functionality on top of the existing {LDAP integration]({{< relref "ldap.md" >}}).
|
||||
The enhanced LDAP integration adds additional functionality on top of the existing [LDAP integration]({{< relref "ldap.md" >}}).
|
||||
|
||||
> Enhanced LDAP integration is only available in Grafana Enterprise. For more information, refer to [Enhanced LDAP integration]({{< relref "../enterprise/enhanced_ldap.md" >}}) in [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
@@ -12,7 +12,7 @@ weight = 3
|
||||
|
||||
# Generic OAuth Authentication
|
||||
|
||||
You can configure many different oauth2 authentication services with Grafana using the generic oauth2 feature. Below you
|
||||
You can configure many different OAuth2 authentication services with Grafana using the generic OAuth2 feature. Below you
|
||||
can find examples using Okta, BitBucket, OneLogin and Azure.
|
||||
|
||||
This callback URL must match the full HTTP address that you use in your browser to access Grafana, but with the prefix path of `/login/generic_oauth`.
|
||||
@@ -99,9 +99,9 @@ allowed_organizations =
|
||||
client_id = <client id>
|
||||
client_secret = <client secret>
|
||||
scopes = openid email name
|
||||
auth_url = https://<onelogin domain>.onelogin.com/oidc/auth
|
||||
token_url = https://<onelogin domain>.onelogin.com/oidc/token
|
||||
api_url = https://<onelogin domain>.onelogin.com/oidc/me
|
||||
auth_url = https://<onelogin domain>.onelogin.com/oidc/2/auth
|
||||
token_url = https://<onelogin domain>.onelogin.com/oidc/2/token
|
||||
api_url = https://<onelogin domain>.onelogin.com/oidc/2/me
|
||||
team_ids =
|
||||
allowed_organizations =
|
||||
```
|
||||
@@ -156,7 +156,7 @@ allowed_organizations =
|
||||
enabled = true
|
||||
allow_sign_up = true
|
||||
client_id = <OpenID Connect Client ID from Centrify>
|
||||
client_secret = <your generated OpenID Connect Client Sercret"
|
||||
client_secret = <your generated OpenID Connect Client Secret"
|
||||
scopes = openid profile email
|
||||
auth_url = https://<your domain>.my.centrify.com/OAuth2/Authorize/<Application ID>
|
||||
token_url = https://<your domain>.my.centrify.com/OAuth2/Token/<Application ID>
|
||||
|
||||
@@ -25,7 +25,7 @@ http://<my_grafana_server_name_or_ip>:<grafana_server_port>/login/github
|
||||
```
|
||||
|
||||
This callback URL must match the full HTTP address that you use in your
|
||||
browser to access Grafana, but with the prefix path of `/login/github`.
|
||||
browser to access Grafana, but with the suffix path of `/login/github`.
|
||||
When the GitHub OAuth application is created you will get a Client ID and a
|
||||
Client Secret. Specify these in the Grafana configuration file. For
|
||||
example:
|
||||
|
||||
@@ -5,14 +5,14 @@ keywords = ["grafana", "configuration", "documentation", "oauth"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Google"
|
||||
identifier = "ggogle_oauth2"
|
||||
identifier = "google_oauth2"
|
||||
parent = "authentication"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# Google OAuth2 Authentication
|
||||
|
||||
To enable the Google OAuth2 you must register your application with Google. Google will generate a client ID and secret key for you to use.
|
||||
To enable Google OAuth2 you must register your application with Google. Google will generate a client ID and secret key for you to use.
|
||||
|
||||
## Create Google OAuth keys
|
||||
|
||||
@@ -23,7 +23,7 @@ First, you need to create a Google OAuth Client:
|
||||
3. Enter the following:
|
||||
- Application Type: Web Application
|
||||
- Name: Grafana
|
||||
- Authorized Javascript Origins: https://grafana.mycompany.com
|
||||
- Authorized JavaScript Origins: https://grafana.mycompany.com
|
||||
- Authorized Redirect URLs: https://grafana.mycompany.com/login/google
|
||||
- Replace https://grafana.mycompany.com with the URL of your Grafana instance.
|
||||
4. Click Create
|
||||
@@ -31,7 +31,7 @@ First, you need to create a Google OAuth Client:
|
||||
|
||||
## Enable Google OAuth in Grafana
|
||||
|
||||
Specify the Client ID and Secret in the [Grafana configuration file]({{< relref "../installation/configuration.md#config-file-locations" >}}). For example:
|
||||
Specify the Client ID and Secret in the [Grafana configuration file]({{< relref "../administration/configuration.md#config-file-locations" >}}). For example:
|
||||
|
||||
```bash
|
||||
[auth.google]
|
||||
|
||||
@@ -26,7 +26,7 @@ This means that you should be able to configure LDAP integration using any compl
|
||||
|
||||
## Enable LDAP
|
||||
|
||||
In order to use LDAP integration you'll first need to enable LDAP in the [main config file]({{< relref "../installation/configuration.md" >}}) as well as specify the path to the LDAP
|
||||
In order to use LDAP integration you'll first need to enable LDAP in the [main config file]({{< relref "../administration/configuration.md" >}}) as well as specify the path to the LDAP
|
||||
specific configuration file (default: `/etc/grafana/ldap.toml`).
|
||||
|
||||
```bash
|
||||
@@ -37,8 +37,8 @@ enabled = true
|
||||
# Path to the LDAP specific configuration file (default: `/etc/grafana/ldap.toml`)
|
||||
config_file = /etc/grafana/ldap.toml
|
||||
|
||||
# Allow sign up should almost always be true (default) to allow new Grafana users to be created (if ldap authentication is ok). If set to
|
||||
# false only pre-existing Grafana users will be able to login (if ldap authentication is ok).
|
||||
# Allow sign up should almost always be true (default) to allow new Grafana users to be created (if LDAP authentication is ok). If set to
|
||||
# false only pre-existing Grafana users will be able to login (if LDAP authentication is ok).
|
||||
allow_sign_up = true
|
||||
```
|
||||
|
||||
@@ -54,11 +54,11 @@ See [configuration examples](#configuration-examples) for more information.
|
||||
host = "127.0.0.1"
|
||||
# Default port is 389 or 636 if use_ssl = true
|
||||
port = 389
|
||||
# Set to true if ldap server supports TLS
|
||||
# Set to true if LDAP server supports TLS
|
||||
use_ssl = false
|
||||
# Set to true if connect ldap server with STARTTLS pattern (create connection in insecure, then upgrade to secure connection with TLS)
|
||||
# Set to true if connect LDAP server with STARTTLS pattern (create connection in insecure, then upgrade to secure connection with TLS)
|
||||
start_tls = false
|
||||
# set to true if you want to skip ssl cert validation
|
||||
# set to true if you want to skip SSL cert validation
|
||||
ssl_skip_verify = false
|
||||
# set to the path to your root CA certificate or leave unset to use system defaults
|
||||
# root_ca_cert = "/path/to/certificate.crt"
|
||||
@@ -83,7 +83,7 @@ search_base_dns = ["dc=grafana,dc=org"]
|
||||
# group_search_filter_user_attribute = "distinguishedName"
|
||||
# group_search_base_dns = ["ou=groups,dc=grafana,dc=org"]
|
||||
|
||||
# Specify names of the ldap attributes your ldap uses
|
||||
# Specify names of the LDAP attributes your LDAP uses
|
||||
[servers.attributes]
|
||||
name = "givenName"
|
||||
surname = "sn"
|
||||
@@ -144,7 +144,7 @@ In this case you skip providing a `bind_password` and instead provide a `bind_dn
|
||||
The search filter and search bases settings are still needed to perform the LDAP search to retrieve the other LDAP information (like LDAP groups and email).
|
||||
|
||||
### POSIX schema
|
||||
If your ldap server does not support the memberOf attribute add these options:
|
||||
If your LDAP server does not support the memberOf attribute add these options:
|
||||
|
||||
```bash
|
||||
## Group search filter, to retrieve the groups of which the user is a member (only set if memberOf attribute is not available)
|
||||
@@ -355,7 +355,7 @@ Please inspect your Active Directory configuration and documentation to find the
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
To troubleshoot and get more log info enable ldap debug logging in the [main config file]({{< relref "../installation/configuration.md" >}}).
|
||||
To troubleshoot and get more log info enable LDAP debug logging in the [main config file]({{< relref "../administration/configuration.md" >}}).
|
||||
|
||||
```bash
|
||||
[log]
|
||||
|
||||
@@ -36,9 +36,9 @@ Before you can sign a user in, you need to create an Okta application from the O
|
||||
|
||||
1. Click **Done** to finish creating the Okta application.
|
||||
|
||||
## Enable Okta Oauth in Grafana
|
||||
## Enable Okta OAuth in Grafana
|
||||
|
||||
1. Add the following to the [Grafana configuration file]({{< relref "../installation/configuration.md#config-file-locations" >}}):
|
||||
1. Add the following to the [Grafana configuration file]({{< relref "../administration/configuration.md#config-file-locations" >}}):
|
||||
|
||||
```ini
|
||||
[auth.okta]
|
||||
|
||||
@@ -11,24 +11,21 @@ weight = 1
|
||||
|
||||
# User Authentication Overview
|
||||
|
||||
Grafana provides many ways to authenticate users. Some authentication integrations also enable syncing user
|
||||
permissions and org memberships.
|
||||
Grafana provides many ways to authenticate users. Some authentication integrations also enable syncing user permissions and org memberships.
|
||||
|
||||
## OAuth Integrations
|
||||
Here is a table showing all supported authentication providers and the features available for them. [Team sync]({{< relref "../enterprise/team-sync.md" >}}) and [active sync]({{< relref "../enterprise/enhanced_ldap.md#active-ldap-synchronization" >}}) are only available in Grafana Enterprise.
|
||||
|
||||
- [Google OAuth]({{< relref "google.md" >}})
|
||||
- [GitHub OAuth]({{< relref "github.md" >}})
|
||||
- [Gitlab OAuth]({{< relref "gitlab.md" >}})
|
||||
- [Generic OAuth]({{< relref "generic-oauth.md" >}}) (Okta2, BitBucket, Azure, OneLogin, Auth0)
|
||||
|
||||
## LDAP integrations
|
||||
|
||||
- [LDAP Authentication]({{< relref "ldap.md" >}}) (OpenLDAP, ActiveDirectory, etc)
|
||||
|
||||
## Auth proxy
|
||||
|
||||
- [Auth Proxy]({{< relref "auth-proxy.md" >}}) If you want to handle authentication outside Grafana using a reverse
|
||||
proxy.
|
||||
Provider | Support | Role mapping | Team sync<br> *(Enterprise only)* | Active sync<br> *(Enterprise only)*
|
||||
-------- | :-----: | :----------: | :-------: | :---------:
|
||||
[Auth Proxy]({{< relref "auth-proxy.md" >}}) | v2.1+ | - | v6.3+ | -
|
||||
[Azure AD OAuth]({{< relref "azuread.md" >}}) | v6.7+ | v6.7+ | v6.7+ | -
|
||||
[Generic OAuth]({{< relref "generic-oauth.md" >}}) | v4.0+ | v6.5+ | - | -
|
||||
[GitHub OAuth]({{< relref "github.md" >}}) | v2.0+ | - | v6.3+ | -
|
||||
[GitLab OAuth]({{< relref "gitlab.md" >}}) | v5.3+ | - | v6.4+ | -
|
||||
[Google OAuth]({{< relref "google.md" >}}) | v2.0+ | - | - | -
|
||||
[LDAP]({{< relref "ldap.md" >}}) | v2.1+ | v2.1+ | v5.3+ | v6.3+
|
||||
[Okta OAuth]({{< relref "okta.md" >}}) | v7.0+ | v7.0+ | v7.0+ | -
|
||||
[SAML]({{< relref "../enterprise/saml.md" >}}) (Enterprise only) | v6.3+ | v7.0+ | v7.0+ | -
|
||||
|
||||
## Grafana Auth
|
||||
|
||||
@@ -71,7 +68,7 @@ login_maximum_lifetime_days = 30
|
||||
# How often should auth tokens be rotated for authenticated users when being active. The default is each 10 minutes.
|
||||
token_rotation_interval_minutes = 10
|
||||
|
||||
# The maximum lifetime (seconds) an api key can be used. If it is set all the api keys should have limited lifetime that is lower than this value.
|
||||
# The maximum lifetime (seconds) an API key can be used. If it is set all the API keys should have limited lifetime that is lower than this value.
|
||||
api_key_max_seconds_to_live = -1
|
||||
```
|
||||
|
||||
@@ -137,7 +134,7 @@ disable_signout_menu = true
|
||||
|
||||
### URL redirect after signing out
|
||||
|
||||
URL to redirect the user to after signing out from Grafana. This can for example be used to enable signout from oauth provider.
|
||||
URL to redirect the user to after signing out from Grafana. This can for example be used to enable signout from OAuth provider.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
|
||||
@@ -5,3 +5,7 @@ type = "docs"
|
||||
identifier = "dashboards"
|
||||
weight = 4
|
||||
+++
|
||||
|
||||
# Dashboard overview
|
||||
|
||||
A *dashboard* is a set of one or more panels organized and arranged into one or more rows. Grafana ships with a variety of Panels. Grafana makes it easy to construct the right queries, and customize the display properties so that you can create the perfect dashboard for your need. Each panel can interact with data from any configured Grafana Data Source (currently Graphite, Prometheus, Elasticsearch, InfluxDB, OpenTSDB, MySQL, PostgreSQL, Microsoft SQL Server and AWS Cloudwatch).
|
||||
@@ -2,6 +2,7 @@
|
||||
title = "Annotations"
|
||||
keywords = ["grafana", "annotations", "documentation", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/reference/annotations/"]
|
||||
[menu.docs]
|
||||
name = "Annotations"
|
||||
parent = "dashboard_features"
|
||||
@@ -62,7 +63,7 @@ settings view. To create a new annotation query hit the `New` button.
|
||||
|
||||
Specify a name for the annotation query. This name is given to the toggle (checkbox) that will allow
|
||||
you to enable/disable showing annotation events from this query. For example you might have two
|
||||
annotation queries named `Deploys` and `Outages`. The toggles will allow you to decide what annotations
|
||||
annotation queries named `Deploys` and `Outages`. The toggle will allow you to decide what annotations
|
||||
to show.
|
||||
|
||||
### Annotation query details
|
||||
@@ -2,6 +2,7 @@
|
||||
title = "Dashboard Folders"
|
||||
keywords = ["grafana", "dashboard", "dashboard folders", "folder", "folders", "documentation", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/reference/dashboard_folders/"]
|
||||
[menu.docs]
|
||||
name = "Folders"
|
||||
parent = "dashboard_features"
|
||||
@@ -2,6 +2,7 @@
|
||||
title = "Dashboard Version History"
|
||||
keywords = ["grafana", "dashboard", "documentation", "version", "history"]
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/reference/dashboard_history/"]
|
||||
[menu.docs]
|
||||
name = "Dashboard Version History"
|
||||
parent = "dashboard_features"
|
||||
@@ -2,6 +2,7 @@
|
||||
title = "Playlist"
|
||||
keywords = ["grafana", "dashboard", "documentation", "playlist"]
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/reference/playlist/"]
|
||||
[menu.docs]
|
||||
parent = "dashboard_features"
|
||||
identifier = "feature_playlist"
|
||||
@@ -110,7 +111,7 @@ By default, each dashboard is displayed for the amount of time entered in the In
|
||||
- The navbar, row and panel controls appear at the top of the screen.
|
||||
- Enabled automatically after one minute of user inactivity.
|
||||
- You can enable it manually using the `d v` sequence shortcut, or by appending the parameter `?inactive` to the dashboard URL.
|
||||
- You can disable it with any mouse mouse movement or keyboard action.
|
||||
- You can disable it with any mouse movement or keyboard action.
|
||||
- **TV mode (with auto fit panels):**
|
||||
- The side menu is hidden/removed.
|
||||
- The navbar, row and panel controls appear at the top of the screen.
|
||||
@@ -2,6 +2,7 @@
|
||||
title = "Search"
|
||||
keywords = ["grafana", "dashboard", "documentation", "search"]
|
||||
type = "docs"
|
||||
aliases =["/docs/grafana/latest/reference/search/"]
|
||||
[menu.docs]
|
||||
parent = "dashboard_features"
|
||||
weight = 5
|
||||
118
docs/sources/dashboards/time-range-controls.md
Normal file
118
docs/sources/dashboards/time-range-controls.md
Normal file
@@ -0,0 +1,118 @@
|
||||
+++
|
||||
title = "Time range controls"
|
||||
keywords = ["grafana", "dashboard", "documentation", "time range"]
|
||||
aliases = ["/docs/grafana/latest/reference/timerange/"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Time range controls"
|
||||
parent = "dashboards"
|
||||
weight = 7
|
||||
+++
|
||||
|
||||
# Time range controls
|
||||
|
||||
Grafana provides several ways to manage the time ranges of the data being visualized, both at the dashboard level and the panel level.
|
||||
|
||||
This page describes supported time units and relative ranges, the common time controls, dashboard-wide time settings, and panel-specific time settings.
|
||||
|
||||
## Time units and relative ranges
|
||||
|
||||
The following time units are supported: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, and `y (years)`.
|
||||
|
||||
The minus operator allows you to step back in time, relative to now. If you wish to display the full period of the unit (day, week, month, etc...), append `/<time unit>` to the end.
|
||||
|
||||
The plus operator allows you to step forward in time relative to now. You might use this feature to look at predicted data in the future, for example.
|
||||
|
||||
Here are some examples:
|
||||
|
||||
| Example relative range | From: | To: |
|
||||
| ---------------------- | ---------- | ---------- |
|
||||
| Last 5 minutes | `now-5m` | `now` |
|
||||
| The day so far | `now/d` | `now` |
|
||||
| This week | `now/w` | `now/w` |
|
||||
| Week to date | `now/w` | `now` |
|
||||
| Previous Month | `now-1M/M` | `now-1M/M` |
|
||||
|
||||
## Common time range controls
|
||||
|
||||
The dashboard and panel time controls have a common user interface (UI).
|
||||
|
||||
<img class="no-shadow" src="/img/docs/time-range-controls/common-time-controls-7-0.png" max-width="700px">
|
||||
|
||||
The options are defined below.
|
||||
|
||||
### Current time range
|
||||
|
||||
The current time range, also called the _time picker_, shows the time range currently displayed in the dashboard or panel you are viewing.
|
||||
|
||||
Hover your cursor over the field to see the exact time stamps in the range and their source (such as the local browser).
|
||||
|
||||
<img class="no-shadow" src="/img/docs/time-range-controls/time-picker-7-0.png" max-width="300px">
|
||||
|
||||
Click on the current time range to change the time range. You can change the current time using a _relative time range_, such as the last 15 minutes, or an _absolute time range_, such as `2020-05-14 00:00:00 to 2020-05-15 23:59:59`.
|
||||
|
||||
<img class="no-shadow" src="/img/docs/time-range-controls/change-current-time-range-7-0.png" max-width="900px">
|
||||
|
||||
### Relative time range
|
||||
|
||||
Select the relative time range from the **Relative time ranges** list. Some examples of time ranges are:
|
||||
|
||||
- Last 30 minutes
|
||||
- Last 12 hours
|
||||
- Last 7 days
|
||||
- Last 2 years
|
||||
- Yesterday
|
||||
- Day before yesterday
|
||||
- This day last week
|
||||
- Today so far
|
||||
- This week so far
|
||||
- This month so far
|
||||
|
||||
### Absolute time range
|
||||
|
||||
Set an absolute time range one of two ways:
|
||||
|
||||
- Type values into the **From** and **To** fields. You can type exact time values or relative values, such as `now-24h`, and then click **Apply time range**.
|
||||
- Click in the **From** or **To** field. Grafana displays a calendar. Click the day or days you want to use as the current time range and then click **Apply time range**.
|
||||
|
||||
This section also displays recently used absolute ranges.
|
||||
|
||||
### Zoom out (Cmd+Z or Ctrl+Z)
|
||||
|
||||
Click the **Zoom out** icon to view a larger time range in the dashboard or panel visualization.
|
||||
|
||||
### Zoom in (only applicable to graph visualizations)
|
||||
|
||||
Click and drag to select the time range in the visualization that you want to view.
|
||||
|
||||
### Refresh dashboard
|
||||
|
||||
Click the **Refresh dashboard** icon to immediately run every query on the dashboard and refresh the visualizations.
|
||||
|
||||
By default, Grafana does not automatically refresh the dashboard. Queries run on their own schedule according to the panel settings. However, if you want to regularly refresh the dashboard, then click the down arrow next to the **Refresh dashboard** icon and then select a refresh interval.
|
||||
|
||||
## Dashboard time settings
|
||||
|
||||
Time settings are saved on a per-dashboard basis.
|
||||
|
||||
To access the dashboard time settings, click the **Dashboard settings** (gear) icon at the top of the screen. The settings are in the **Time Options** section of the General tab.
|
||||
|
||||
- **Timezone -** Specify the local time zone of the service or system that you are monitoring. This can be helpful when monitoring a system or service that operates across several time zones.
|
||||
- **Default -** The default selected time zone for the user profile, team, or organization is used. If no time zone is specified for the user profile, a team the user is a member of, or the organization, then Grafana uses local browser time.
|
||||
- **Local browser time -** The time zone configured for the viewing user browser is used. This is usually the same time zone as set on the computer.
|
||||
- Standard [ISO 8601 time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), including UTC.
|
||||
- **Auto-refresh -** Customize the options displayed for relative time and the auto-refresh options. Entries are comma separated and accept any valid time unit.
|
||||
- **Now delay now- -** Override the `now` value by entering a time delay. Most commonly, this feature is used to accommodate known delays in data aggregation to avoid null values.
|
||||
- **Hide time picker -** Select this option if you do not want Grafana to display the time picker.
|
||||
|
||||
## Panel time overrides and timeshift
|
||||
|
||||
In [Query options]({{< relref "../panels/queries.md#query-options" >}}), you can override the relative time range for individual panels, causing them to be different than what is selected in the dashboard time picker in the upper right. This allows you to show metrics from different time periods or days at the same time.
|
||||
|
||||
## Control the time range using a URL
|
||||
|
||||
Time range of a dashboard can be controlled by providing following query parameters in the dashboard URL:
|
||||
|
||||
- `from` - defines lower limit of the time range, specified in ms epoch or [relative time]({{< relref "#relative-time-range" >}})
|
||||
- `to` - defines upper limit of the time range, specified in ms epoch or [relative time]({{< relref "#relative-time-range" >}})
|
||||
- `time` and `time.window` - defines a time range from `time-time.window/2` to `time+time.window/2`. Both params should be specified in ms. For example `?time=1500000000000&time.window=10000` will result in 10s time range from 1499999995000 to 1500000005000
|
||||
@@ -2,3 +2,7 @@
|
||||
title = "Developers"
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Developers
|
||||
|
||||
This section of the documentation contains pages with resources for Grafana developers.
|
||||
@@ -11,7 +11,7 @@ For more information on the types of plugins you can build, refer to the [Plugin
|
||||
|
||||
The easiest way to start developing Grafana plugins is to use the [Grafana Toolkit](https://www.npmjs.com/package/@grafana/toolkit).
|
||||
|
||||
Open the terminal, and run the following command in your [plugin directory]({{< relref "../../installation/configuration/_index.md#plugins" >}}):
|
||||
Open the terminal, and run the following command in your [plugin directory]({{< relref "../../administration/configuration.md#plugins" >}}):
|
||||
|
||||
```bash
|
||||
npx @grafana/toolkit plugin:create my-grafana-plugin
|
||||
@@ -26,17 +26,6 @@ If you want a more guided introduction to plugin development, check out our tuto
|
||||
|
||||
Learn more about specific areas of plugin development.
|
||||
|
||||
### Concepts
|
||||
|
||||
Deepen your knowledge through a series of high-level overviews of plugin concepts.
|
||||
|
||||
- [Data frames]({{< relref "data-frames.md" >}})
|
||||
- [Authentication for data source plugins]({{< relref "authentication.md" >}})
|
||||
|
||||
### UI library
|
||||
|
||||
Explore the many UI components in our [Grafana UI library](https://developers.grafana.com/ui).
|
||||
|
||||
### Tutorials
|
||||
|
||||
If you're looking to build your first plugin, check out these introductory tutorials:
|
||||
@@ -48,6 +37,27 @@ Ready to learn more? Check out our other tutorials:
|
||||
|
||||
- [Build a panel plugin with D3.js]({{< relref "../../../../../tutorials/build-a-panel-plugin-with-d3.md" >}})
|
||||
|
||||
### Guides
|
||||
|
||||
Improve an existing plugin with one of our guides:
|
||||
|
||||
- [Add authentication for data source plugins]({{< relref "add-authentication-for-data-source-plugins" >}})
|
||||
- [Add support for annotations]({{< relref "add-support-for-annotations.md" >}})
|
||||
- [Add support for Explore queries]({{< relref "add-support-for-explore-queries.md" >}})
|
||||
- [Add support for variables]({{< relref "add-support-for-variables.md" >}})
|
||||
- [Build a logs data source plugin]({{< relref "build-a-logs-data-source-plugin.md" >}})
|
||||
- [Build a streaming data source plugin]({{< relref "build-a-streaming-data-source-plugin.md" >}})
|
||||
|
||||
### Concepts
|
||||
|
||||
Deepen your knowledge through a series of high-level overviews of plugin concepts:
|
||||
|
||||
- [Data frames]({{< relref "data-frames.md" >}})
|
||||
|
||||
### UI library
|
||||
|
||||
Explore the many UI components in our [Grafana UI library](https://developers.grafana.com/ui).
|
||||
|
||||
### API reference
|
||||
|
||||
Learn more about Grafana options and packages.
|
||||
@@ -64,4 +74,4 @@ Learn more about Grafana options and packages.
|
||||
|
||||
#### Go
|
||||
|
||||
- [Grafana Plugin SDK](https://pkg.go.dev/mod/github.com/grafana/grafana-plugin-sdk-go?tab=overview)
|
||||
- [Grafana Plugin SDK for Go]({{< relref "backend/grafana-plugin-sdk-for-go" >}})
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
+++
|
||||
title = "Add authentication for data source plugins"
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/plugins/developing/auth-for-datasources/", "/docs/grafana/latest/developers/plugins/authentication/"]
|
||||
+++
|
||||
|
||||
# Add authentication for data source plugins
|
||||
|
||||
This page explains how to use the Grafana data source proxy to authenticate against an third-party API from a data source plugin.
|
||||
|
||||
When a user saves a password or any other sensitive data as a data source option, Grafana encrypts the data and stores it in the Grafana database. Any encrypted data source options can only be decrypted on the Grafana server. This means that any data source that makes authenticated queries needs to request the decrypted data to be sent to the browser.
|
||||
|
||||
To minimize the amount of sensitive information sent to and from the browser, data source plugins can use the Grafana _data source proxy_. When using the data source proxy, any requests containing sensitive information go through the Grafana server. No sensitive data is sent to the browser after the data is saved.
|
||||
|
||||
Some data sources, like [Prometheus](https://grafana.com/docs/grafana/latest/features/datasources/prometheus/) and [InfluxDB](https://grafana.com/docs/grafana/latest/features/datasources/influxdb/), allow users to configure whether to use the data source proxy, through a setting called _access modes_.
|
||||
|
||||
## Add a proxy route to your plugin
|
||||
|
||||
To forward requests through the Grafana proxy, you need to configure one or more _routes_. A route specifies how the proxy transforms outgoing requests. All routes for a given plugin are defined in the [plugin.json]({{< relref "metadata.md" >}}) file.
|
||||
|
||||
Let's add a route to proxy requests to `https://api.example.com/foo/bar`.
|
||||
|
||||
1. Add the route to `plugin.json`. Note that you need to reload the Grafana server every time you make a change to your `plugin.json` file.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "https://api.example.com"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
1. In the `DataSource`, extract the proxy URL from `instanceSettings` to a class property called `url`.
|
||||
|
||||
```ts
|
||||
export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
|
||||
url?: string;
|
||||
|
||||
constructor(instanceSettings: DataSourceInstanceSettings<MyDataSourceOptions>) {
|
||||
super(instanceSettings);
|
||||
|
||||
this.url = instanceSettings.url;
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
1. In the `query` method, make a request using [BackendSrv]({{< relref "../../packages_api/runtime/backendsrv.md" >}}).
|
||||
|
||||
```ts
|
||||
const routePath = '/example';
|
||||
|
||||
getBackendSrv()
|
||||
.datasourceRequest({
|
||||
url: this.url + routePath + '/foo/bar',
|
||||
method: 'GET',
|
||||
});
|
||||
```
|
||||
|
||||
## Add a dynamic proxy route to your plugin
|
||||
|
||||
In the example above, the URL stays the same for everyone using the plugin. Let's look at how you can create dynamic routes based on data source options that are provided by the user.
|
||||
|
||||
Many of the properties in the `route` object can use templates in the form of `{{ .JsonData.YOUR_OPTION_NAME }}`, where `YOUR_OPTION_NAME` is the name of a property in the `jsonData` object.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "https://api.example.com/projects/{{ .JsonData.projectId }}"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
You can also access sensitive data in your route configuration by changing `.JsonData` into `.SecureJsonData`.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "https://{{ .JsonData.username }}:{{ .SecureJsonData.password }}@api.example.com"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Now you know how to define routes for your data source plugin. Next, let's look at how to authenticate requests for your routes.
|
||||
|
||||
## Configure the authentication method for a route
|
||||
|
||||
The Grafana proxy supports a number of different authentication methods. For more information on how to configure each authentication method, refer to [plugin.json]({{< relref "metadata.md" >}}).
|
||||
|
||||
For any sensitive data, make sure that you encrypt data source options, and that you use `{{ .SecureJsonData.YOUR_OPTION_NAME }}` when using sensitive data source options in your routes.
|
||||
|
||||
### Add HTTP header
|
||||
|
||||
To add HTTP headers to proxied requests, use the `headers` property.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "https://api.example.com",
|
||||
"headers": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"content": "Bearer {{ .SecureJsonData.apiToken }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Add URL parameters
|
||||
|
||||
To add URL parameters to proxied requests, use the `urlParams` property.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "http://api.example.com",
|
||||
"urlParams": [
|
||||
{
|
||||
"name": "apiKey",
|
||||
"content": "{{ .SecureJsonData.apiKey }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Enable token authentication
|
||||
|
||||
To enable token-based authentication for proxied requests, use the `tokenAuth` property.
|
||||
|
||||
Grafana automatically renews the token when it expires.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "https://api.example.com",
|
||||
"tokenAuth": {
|
||||
"url": "https://login.example.com/oauth2/token",
|
||||
"params": {
|
||||
"grant_type": "client_credentials",
|
||||
"client_id": "{{ .JsonData.clientId }}",
|
||||
"client_secret": "{{ .SecureJsonData.clientSecret }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
148
docs/sources/developers/plugins/add-support-for-annotations.md
Normal file
148
docs/sources/developers/plugins/add-support-for-annotations.md
Normal file
@@ -0,0 +1,148 @@
|
||||
+++
|
||||
title = "Add support for annotations"
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Add support for annotations
|
||||
|
||||
This guide explains how to add support for [annotations]({{< relref "../../dashboards/annotations.md" >}}) to an existing data source plugin.
|
||||
|
||||
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< relref "../../../../../tutorials/build-a-data-source-plugin.md" >}}).
|
||||
|
||||
Data sources in Grafana can support [Annotations]({{< relref "../../dashboards/annotations.md" >}}) by handling _annotation queries_.
|
||||
|
||||
Handling annotation queries is similar to how you'd handle a metrics query. The difference is that instead of returning [data frames]({{< relref "data-frames.md" >}}), an annotation query returns _annotation events_.
|
||||
|
||||
## Add annotations support to your data source
|
||||
|
||||
To add logs support to an existing data source, you need to:
|
||||
|
||||
- Enable annotations support
|
||||
- Override the `annotationQuery` method
|
||||
- Construct annotation events
|
||||
|
||||
### Enable annotations support
|
||||
|
||||
Tell Grafana that your data source plugin can return annotations events by adding `"annotations": true` to the [plugin.json]({{< relref "metadata.md" >}}) file.
|
||||
|
||||
```json
|
||||
{
|
||||
"annotations": true
|
||||
}
|
||||
```
|
||||
|
||||
### Override the `annotationQuery` method
|
||||
|
||||
In `DataSource.ts`, override the `annotationQuery` method from `DataSourceApi`.
|
||||
|
||||
```ts
|
||||
async annotationQuery(options: AnnotationQueryRequest<MyQuery>): Promise<AnnotationEvent[]> {
|
||||
return [];
|
||||
}
|
||||
```
|
||||
|
||||
### Construct annotation events
|
||||
|
||||
Return an array of [AnnotationEvent]({{< relref "../../packages_api/data/annotationevent.md" >}}).
|
||||
|
||||
```ts
|
||||
async annotationQuery(options: AnnotationQueryRequest<MyQuery>): Promise<AnnotationEvent[]> {
|
||||
const events: AnnotationEvent[] = [];
|
||||
|
||||
const date = new Date();
|
||||
|
||||
const event: AnnotationEvent = {
|
||||
time: date.valueOf(),
|
||||
text: 'foo',
|
||||
tags: ['bar'],
|
||||
};
|
||||
|
||||
events.push(event);
|
||||
|
||||
return events;
|
||||
}
|
||||
```
|
||||
|
||||
## Region annotations
|
||||
|
||||
[Region annotations]({{< relref "../../dashboards/annotations.md#adding-regions-events" >}}) have a start and end time. This can for example be used to annotate maintenance windows or downtime.
|
||||
|
||||
To return a region annotation, set the `timeEnd`, and `isRegion` properties.
|
||||
|
||||
```ts
|
||||
const regionEvent: AnnotationEvent = {
|
||||
time: startDate.valueOf(),
|
||||
timeEnd: endDate.valueOf(),
|
||||
isRegion: true,
|
||||
text: 'foo',
|
||||
tags: ['bar'],
|
||||
};
|
||||
```
|
||||
|
||||
## Build a annotation query editor
|
||||
|
||||
Let users write custom annotation queries to only display the annotation events they care about, by adding a _query editor_.
|
||||
|
||||
> **Note**: Annotation query editors have yet to receive support for React. The instructions here are given for Angular. Fortunately, you can run Angular even in a plugin otherwise written using React. This section will be updated once React support for annotation queries editors is available.
|
||||
|
||||
1. Create a file called `AnnotationQueryEditor.ts` in the plugin root directory, with the following content.
|
||||
|
||||
```ts
|
||||
export class AnnotationQueryEditor {
|
||||
static templateUrl = 'partials/annotations.editor.html';
|
||||
|
||||
annotation: any;
|
||||
|
||||
constructor() {
|
||||
this.annotation.rawQuery = this.annotation.rawQuery || '';
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
1. Create a directory called `partials` in the plugin root directory.
|
||||
|
||||
1. Create a file called `annotations.editor.html` in the `partials` directory you just created, with the following content.
|
||||
|
||||
```html
|
||||
<div class="gf-form-group">
|
||||
<div class="gf-form-inline">
|
||||
<div class="gf-form gf-form--grow">
|
||||
<input
|
||||
class="gf-form-input"
|
||||
placeholder="query expression"
|
||||
ng-model="ctrl.annotation.queryText"
|
||||
></input>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
```
|
||||
|
||||
1. In your data source query—the one that extends [DataQuery]({{< relref "../../packages_api/data/dataquery.md" >}})—add the `queryText` property. The name of the property needs to correspond to the text in `ng-model`, e.g. `ctrl.annotation.<propertyName>`.
|
||||
|
||||
```ts
|
||||
export interface MyQuery extends DataQuery {
|
||||
// ...
|
||||
queryText?: string;
|
||||
}
|
||||
```
|
||||
|
||||
1. In `module.ts`, add the annotation query editor to the plugin.
|
||||
|
||||
```ts
|
||||
import { AnnotationQueryEditor } from './AnnotationQueryEditor';
|
||||
|
||||
export const plugin = new DataSourcePlugin<DataSource, MyQuery, MyDataSourceOptions>(DataSource)
|
||||
.setConfigEditor(ConfigEditor)
|
||||
.setQueryEditor(QueryEditor)
|
||||
.setAnnotationQueryCtrl(AnnotationQueryEditor);
|
||||
```
|
||||
|
||||
The `queryText` property is now available on the `options` object in the `annotationQuery` method:
|
||||
|
||||
```ts
|
||||
async annotationQuery(options: AnnotationQueryRequest<MyQuery>): Promise<AnnotationEvent[]> {
|
||||
const expression = options.annotation.queryText;
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
@@ -0,0 +1,183 @@
|
||||
+++
|
||||
title = "Add support for Explore queries"
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Add support for Explore queries
|
||||
|
||||
This guide explains how to improve support for [Explore]({{< relref "../../features/explore/index.md" >}}) to an existing data source plugin.
|
||||
|
||||
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< relref "../../../../../tutorials/build-a-data-source-plugin.md" >}}).
|
||||
|
||||
With Explore, users can make ad-hoc queries without the use of a dashboard. This is useful when users want to troubleshoot or to learn more about the data.
|
||||
|
||||
Your data source already supports Explore by default, and will use the existing query editor for the data source. If you want to offer extended Explore functionality for your data source however, you can define a Explore-specific query editor. Optionally, your plugin can also define a _start page_ for Explore.
|
||||
|
||||
## Add a query editor for Explore
|
||||
|
||||
The query editor for Explore is similar to the query editor for the data source itself. In fact, you'll probably reuse the same components for both query editors.
|
||||
|
||||
1. Create a file `ExploreQueryEditor.tsx` in the `src` directory of your plugin, with the following content:
|
||||
|
||||
```ts
|
||||
import React from 'react';
|
||||
|
||||
import { ExploreQueryFieldProps } from '@grafana/data';
|
||||
import { QueryField } from '@grafana/ui';
|
||||
import { DataSource } from './DataSource';
|
||||
import { MyQuery, MyDataSourceOptions } from './types';
|
||||
|
||||
export type Props = ExploreQueryFieldProps<DataSource, MyQuery, MyDataSourceOptions>;
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<h2>My query editor</h2>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
1. Configure the plugin to use the `ExploreQueryEditor`.
|
||||
|
||||
```ts
|
||||
import ExploreQueryEditor from './ExploreQueryEditor';
|
||||
```
|
||||
|
||||
```ts
|
||||
export const plugin = new DataSourcePlugin<DataSource, MyQuery, MyDataSourceOptions>(DataSource)
|
||||
.setConfigEditor(ConfigEditor)
|
||||
.setQueryEditor(QueryEditor)
|
||||
.setExploreQueryField(ExploreQueryEditor);
|
||||
```
|
||||
|
||||
1. Add a [QueryField]({{< relref "../../packages_api/ui/queryfield.md" >}}) to `ExploreQueryEditor`.
|
||||
|
||||
```ts
|
||||
import { QueryField } from '@grafana/ui';
|
||||
```
|
||||
|
||||
```ts
|
||||
export default (props: Props) => {
|
||||
const { query } = props;
|
||||
|
||||
const onQueryChange = (value: string, override?: boolean) => {
|
||||
const { query, onChange, onRunQuery } = props;
|
||||
|
||||
if (onChange) {
|
||||
// Update the query whenever the query field changes.
|
||||
onChange({ ...query, queryText: value });
|
||||
|
||||
// Run the query on Enter.
|
||||
if (override && onRunQuery) {
|
||||
onRunQuery();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<QueryField
|
||||
portalOrigin="mock-origin"
|
||||
onChange={onQueryChange}
|
||||
onRunQuery={props.onRunQuery}
|
||||
onBlur={props.onBlur}
|
||||
query={query.queryText || ''}
|
||||
placeholder="Enter a query"
|
||||
/>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
## Add a start page for Explore
|
||||
|
||||
By adding an Explore start page for your plugin, you can for example create "cheat sheets" with commonly used queries. When the user clicks on one of the examples, it automatically updates the query editor, and runs the query. It's a great way to increase productivity for your users.
|
||||
|
||||
1. Create a file `ExploreStartPage.tsx` in the `src` directory of your plugin, with the following content:
|
||||
|
||||
```ts
|
||||
import React from 'react';
|
||||
import { ExploreStartPageProps } from '@grafana/data';
|
||||
|
||||
export default (props: ExploreStartPageProps) => {
|
||||
return (
|
||||
<h2>My start page</h2>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
1. Configure the plugin to use the `ExploreStartPage`.
|
||||
|
||||
```ts
|
||||
import ExploreStartPage from './ExploreStartPage';
|
||||
```
|
||||
|
||||
```ts
|
||||
export const plugin = new DataSourcePlugin<DataSource, MyQuery, MyDataSourceOptions>(DataSource)
|
||||
.setConfigEditor(ConfigEditor)
|
||||
.setQueryEditor(QueryEditor)
|
||||
.setExploreQueryField(ExploreQueryEditor)
|
||||
.setExploreStartPage(ExploreStartPage);
|
||||
```
|
||||
|
||||
1. Create a few examples.
|
||||
|
||||
```ts
|
||||
import React from 'react';
|
||||
import { ExploreStartPageProps, DataQuery } from '@grafana/data';
|
||||
|
||||
const examples = [
|
||||
{
|
||||
title: 'Addition',
|
||||
expression: '1 + 2',
|
||||
label: 'Add two integers',
|
||||
},
|
||||
{
|
||||
title: 'Subtraction',
|
||||
expression: '2 - 1',
|
||||
label: 'Subtract an integer from another',
|
||||
},
|
||||
];
|
||||
|
||||
export default (props: ExploreStartPageProps) => {
|
||||
return (
|
||||
<div>
|
||||
<h2>Cheat Sheet</h2>
|
||||
{examples.map((item, index) => (
|
||||
<div className="cheat-sheet-item" key={index}>
|
||||
<div className="cheat-sheet-item__title">{item.title}</div>
|
||||
{item.expression ? (
|
||||
<div
|
||||
className="cheat-sheet-item__example"
|
||||
onClick={e => props.onClickExample({ refId: 'A', queryText: item.expression } as DataQuery)}
|
||||
>
|
||||
<code>{item.expression}</code>
|
||||
</div>
|
||||
) : null}
|
||||
<div className="cheat-sheet-item__label">{item.label}</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
```
|
||||
|
||||
## Support multiple Explore modes
|
||||
|
||||
Explore lets you query any data source, regardless of whether it returns metrics or logs. You can change which type of query you want to make, by setting the _Explore mode_.
|
||||
|
||||
The query modes that the plugin supports are defined in the [plugin.json]({{< relref "metadata.md" >}}) file.
|
||||
|
||||
The query mode is available on the `props` object for both the query editor and the start page. For example, here's how you can change the query editor based on the currently selected mode:
|
||||
|
||||
```
|
||||
export default (props: Props) => {
|
||||
const { query, exploreMode } = props;
|
||||
|
||||
switch (exploreMode) {
|
||||
case ExploreMode.Metrics:
|
||||
return <MetricsQueryField query={query} />;
|
||||
case ExploreMode.Logs:
|
||||
return <LogsQueryField query={query} />;
|
||||
default:
|
||||
return <p>Unsupported mode</p>;
|
||||
}
|
||||
}
|
||||
```
|
||||
60
docs/sources/developers/plugins/add-support-for-variables.md
Normal file
60
docs/sources/developers/plugins/add-support-for-variables.md
Normal file
@@ -0,0 +1,60 @@
|
||||
+++
|
||||
title = "Add support for variables in plugins"
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Add support for variables in plugins
|
||||
|
||||
Variables are placeholders for values, and can be used to create things like templated queries and dashboard or panel links. For more information on variables, refer to [Templates and variables]({{< relref "../../variables/templates-and-variables.md" >}}).
|
||||
|
||||
This guide explains how to leverage template variables in your panel plugins and data source plugins.
|
||||
|
||||
We'll see how you can turn a string like this:
|
||||
|
||||
```sql
|
||||
SELECT * FROM services WHERE id = "$service"
|
||||
```
|
||||
|
||||
into
|
||||
|
||||
```sql
|
||||
SELECT * FROM services WHERE id = "auth-api"
|
||||
```
|
||||
|
||||
Grafana provides a couple of helper functions to interpolate variables in a string template. Let's see how you can use them in your plugin.
|
||||
|
||||
## Interpolate variables in panel plugins
|
||||
|
||||
For panels, the [replaceVariables]({{< relref "../../packages_api/data/panelprops.md#replacevariables-property" >}}) function is available in the [PanelProps]({{< relref "../../packages_api/data/panelprops.md" >}}).
|
||||
|
||||
Add `replaceVariables` to the argument list, and pass it a user-defined template string.
|
||||
|
||||
```ts
|
||||
export const SimplePanel: React.FC<Props> = ({ options, data, width, height, replaceVariables }) => {
|
||||
const query = replaceVariables('Now displaying $service')
|
||||
|
||||
return <div>{ query }</div>
|
||||
}
|
||||
```
|
||||
|
||||
## Interpolate variables in data source plugins
|
||||
|
||||
For data sources, you need to use the [getTemplateSrv]({{< relref "../../packages_api/runtime/gettemplatesrv.md" >}}), which returns an instance of [TemplateSrv]({{< relref "../../packages_api/runtime/templatesrv.md" >}}).
|
||||
|
||||
1. Import `getTemplateSrv` from the `runtime` package.
|
||||
|
||||
```ts
|
||||
import { getTemplateSrv } from '@grafana/runtime';
|
||||
```
|
||||
|
||||
1. In your `query` method, call the `replace` method with a user-defined template string.
|
||||
|
||||
```ts
|
||||
async query(options: DataQueryRequest<MyQuery>): Promise<DataQueryResponse> {
|
||||
const query = getTemplateSrv().replace('SELECT * FROM services WHERE id = "$service"'), options.scopedVars);
|
||||
|
||||
const data = makeDbQuery(query);
|
||||
|
||||
return { data };
|
||||
}
|
||||
```
|
||||
@@ -1,137 +0,0 @@
|
||||
+++
|
||||
title = "Authentication for data source plugins"
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/plugins/developing/auth-for-datasources/"]
|
||||
+++
|
||||
|
||||
# Authentication for data source plugins
|
||||
|
||||
Grafana has a proxy feature that proxies all data requests through the Grafana backend. The main benefit of using the proxy is secure handling of credentials when authenticating against an external/third-party API. The Grafana proxy also adds [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) headers to the proxied requests.
|
||||
|
||||
The proxy supports:
|
||||
|
||||
- [authentication with HTTP Headers]({{< relref "#api-key-http-header-authentication" >}}).
|
||||
- [token authentication]({{< relref "#how-token-authentication-works" >}}) and can automatically renew a token for the user when the token expires.
|
||||
|
||||
## How the proxy works
|
||||
|
||||
The user saves the API key/password on the plugin config page and it is encrypted (using the `secureJsonData` feature) and saved in the Grafana database. When a request from the data source is made, the Grafana proxy will:
|
||||
|
||||
1. Intercept the original request sent from the data source plugin.
|
||||
1. Load the `secureJsonData` data from the database and decrypt the API key or password on the Grafana backend.
|
||||
1. If using token authentication, carry out authentication and generate an OAuth token that will be added as an `Authorization` HTTP header to the requests (or alternatively it will add a HTTP header with the API key).
|
||||
1. Renew the token if it has expired.
|
||||
1. After adding CORS headers and authorization headers, forward the request to the external API.
|
||||
|
||||
This means that users that access the data source config page cannot access the API key or password after they have saved it the first time and that no secret keys are sent in plain text through the browser where they can be spied on.
|
||||
|
||||
For backend authentication to work, the external/third-party API must either have an OAuth endpoint or that the API accepts an API key as a HTTP header for authentication.
|
||||
|
||||
## Encrypting sensitive data
|
||||
|
||||
When a user saves a password or secret with your data source plugin's Config page, then you can save data in an encrypted blob in the Grafana database called `secureJsonData`. Any data saved in the blob is encrypted by Grafana and can only be decrypted by the Grafana server on the backend. This means once a password is saved, no sensitive data is sent to the browser. If the password is saved in the `jsonData` blob or the `password` field then it is unencrypted and anyone with Admin access (with the help of Chrome Developer Tools) can read it.
|
||||
|
||||
This is an example of using the `secureJsonData` blob to save a property called `password` in a html input:
|
||||
|
||||
```html
|
||||
<input type="password" class="gf-form-input" ng-model="ctrl.current.secureJsonData.password" placeholder="password" />
|
||||
```
|
||||
|
||||
## Plugin routes
|
||||
|
||||
A plugin route describes where the intercepted request should be forwarded to and how to authenticate for the external API. You can define multiple routes that can match multiple external API endpoints.
|
||||
|
||||
You specify routes in the `plugin.json` file for your data source plugin. [Here is an example](https://github.com/grafana/azure-monitor-datasource/blob/d74c82145c0a4af07a7e96cc8dde231bfd449bd9/src/plugin.json#L30-L95) with lots of routes (though most plugins will just have one route).
|
||||
|
||||
When you build your URL to the third-party API in your data source class, the URL should start with the text specified in the path field for a route. The proxy will strip out the path text and replace it with the value in the URL field.
|
||||
|
||||
### Simple plugin route example
|
||||
|
||||
- If my code makes a call to URL `azuremonitor/foo/bar` with this code:
|
||||
|
||||
```js
|
||||
this.backendSrv.datasourceRequest({
|
||||
url: url,
|
||||
method: "GET",
|
||||
});
|
||||
```
|
||||
|
||||
- and the plugin has this route:
|
||||
|
||||
```json
|
||||
"routes": [{
|
||||
"path": "azuremonitor",
|
||||
"method": "GET",
|
||||
"url": "https://management.azure.com"
|
||||
}]
|
||||
```
|
||||
|
||||
- then the Grafana proxy will transform the URL from the original request into `https://management.azure.com/foo/bar`
|
||||
- finally, it will add CORS headers and forward the request to the new URL. This example does not do any authentication.
|
||||
|
||||
The `method` parameter is optional. It can be set to a specific HTTP verb to provide more fine-grained control. For example you might have two plugin routes, one for GET requests and one for POST requests.
|
||||
|
||||
### Dynamic routes
|
||||
|
||||
When using routes, you can also reference a variable stored in JsonData or SecureJsonData which is interpolated (replacing the variable text with a value) when the data source makes a request to the proxy. These are variables that were entered by the user on the data source configuration page and saved in the Grafana database.
|
||||
|
||||
In this example, the value for `dynamicUrl` comes from the JsonData blob and the api key's value is set from the SecureJsonData blob. The `urlParams` field is for query string parameters for HTTP GET requests.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "custom/api/v5/*",
|
||||
"method": "GET",
|
||||
"url": "{{.JsonData.dynamicUrl}}",
|
||||
"urlParams": [
|
||||
{"name": "apiKey", "content": "{{.SecureJsonData.apiKey}}"}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Given that:
|
||||
|
||||
- `JsonData.dynamicUrl` has the value `http://example.com/api`
|
||||
- `SecureJsonData.apiKey` has the value `secretKey`
|
||||
|
||||
a call to the URL: `custom/api/v5/some/path`
|
||||
|
||||
will be proxied to the following URL: `http://example.com/api/some/path?apiKey=secretKey`
|
||||
|
||||
An app using this feature can be found [here](https://github.com/grafana/kentik-app).
|
||||
|
||||
## API key/HTTP header authentication
|
||||
|
||||
Some third-party API's accept a HTTP Header for authentication. The [example](https://github.com/grafana/azure-monitor-datasource/blob/d74c82145c0a4af07a7e96cc8dde231bfd449bd9/src/plugin.json#L91-L93) below has a `headers` section that defines the name of the HTTP Header that the API expects and it uses the `SecureJSONData` blob to fetch an encrypted API key. The Grafana server proxy will decrypt the key, add the `X-API-Key` header to the request and forward it to the third-party API.
|
||||
|
||||
```json
|
||||
{
|
||||
"path": "appinsights",
|
||||
"method": "GET",
|
||||
"url": "https://api.applicationinsights.io",
|
||||
"headers": [{ "name": "X-API-Key", "content": "{{.SecureJsonData.appInsightsApiKey}}" }]
|
||||
}
|
||||
```
|
||||
|
||||
## How token authentication works
|
||||
|
||||
The token auth section in the `plugin.json` file looks like this:
|
||||
|
||||
```json
|
||||
"tokenAuth": {
|
||||
"url": "https://login.microsoftonline.com/{{.JsonData.tenantId}}/oauth2/token",
|
||||
"params": {
|
||||
"grant_type": "client_credentials",
|
||||
"client_id": "{{.JsonData.clientId}}",
|
||||
"client_secret": "{{.SecureJsonData.clientSecret}}",
|
||||
"resource": "https://management.azure.com/"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This interpolates in data from both `jsonData` and `secureJsonData` to generate the token request to the third-party API. It is common for tokens to have a short expiry period (30 minutes). The Grafana proxy automatically renews the token if it has expired.
|
||||
|
||||
## Always restart the Grafana server after route changes
|
||||
|
||||
The plugin.json files are only loaded when the Grafana server starts so when a route is added or changed then the Grafana server has to be restarted for the changes to take effect.
|
||||
@@ -1,285 +0,0 @@
|
||||
+++
|
||||
title = "Backend plugins"
|
||||
keywords = ["grafana", "plugins", "backend", "plugin", "backend-plugins", "documentation"]
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/plugins/developing/backend-plugins-guide/"]
|
||||
+++
|
||||
|
||||
# Backend plugins
|
||||
|
||||
Grafana added support for plugins in Grafana 3.0 and this enabled the Grafana community to create panel plugins and data source plugins. It was wildly successful and has made Grafana much more useful as you can integrate it with anything and do any type of custom visualization that you want. However, these plugin hooks are on the frontend only and we also want to provide hooks into the Grafana backend to allow the community to extend and improve Grafana in new ways.
|
||||
|
||||
Once Grafana introduced the alerting feature, external data source plugins needed a backend component for the Grafana server to execute queries for evaluating alert rules (as the alerting engine cannot call frontend JavaScript code). So the obvious first backend plugin type is the **Datasource backend plugin** and it is a new component for an existing data source plugin. This new plugin type will enable alerting for external data source plugins but can also be used for achieving different goals such as query caching, request proxying, custom authentication methods, and more.
|
||||
|
||||
## Grafana's Backend Plugin System
|
||||
|
||||
The backend plugin feature is implemented with the [HashiCorp plugin system](https://github.com/hashicorp/go-plugin) which is a Go plugin system over RPC. Grafana server launches each plugin as a subprocess and communicates with it over RPC. This approach has a number of benefits:
|
||||
|
||||
- Plugins can't crash your grafana process: a panic in a plugin doesn't panic the server.
|
||||
- Plugins are easy to develop: just write a Go application and `go build` (or use any other language which supports gRPC).
|
||||
- Plugins can be relatively secure: The plugin only has access to the interfaces and args given to it, not to the entire memory space of the process.
|
||||
|
||||
## Data source plugin interface
|
||||
|
||||
The plugin interface is very simple and described as a Go interface type in [Grafana](https://github.com/grafana/grafana/blob/6724aaeff9a332dc73b4ee0f8abe0621f7253142/pkg/tsdb/query_endpoint.go#L10-L12) and as a general [RPC service](https://github.com/grafana/grafana-plugin-model/blob/84176c64269d8060f99e750ee8aba6f062753336/datasource.proto#L96-L98) in the corresponding `.proto` (protocol buffer file):
|
||||
|
||||
```go
|
||||
type TsdbQueryEndpoint interface {
|
||||
Query(ctx context.Context, ds *models.DataSource, query *TsdbQuery) (*Response, error)
|
||||
}
|
||||
```
|
||||
|
||||
```protobuf
|
||||
service DatasourcePlugin {
|
||||
rpc Query(DatasourceRequest) returns (DatasourceResponse);
|
||||
}
|
||||
```
|
||||
|
||||
Thus, a datasource plugin should only implement the `Query()` method.
|
||||
|
||||
## Introduction to building a backend component for a plugin
|
||||
|
||||
The [Simple JSON backend](https://github.com/grafana/simple-json-backend-datasource) data source is a good example of writing a simple backend plugin in Go. Let's take a look at some key points.
|
||||
|
||||
### Metadata
|
||||
|
||||
The plugin needs to know it has a backend component, this is done in the `plugin.json` file by setting two fields: `backend` and `executable`. If you want to enable alerting for your data source, set the `alerting` field to `true` as well.
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "grafana-simple-json-backend-datasource",
|
||||
"name": "Simple Json backend",
|
||||
"type": "datasource",
|
||||
|
||||
"metrics": true,
|
||||
"annotations": true,
|
||||
"backend": true,
|
||||
"alerting": true,
|
||||
"executable": "simple-json-plugin",
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
`executable` should be the the the first part of the binary filename. The actual binary filename has 3 possible endings:
|
||||
|
||||
- \_linux_amd64
|
||||
- \_darwin_amd64
|
||||
- \_windows_amd64.exe
|
||||
|
||||
When Grafana loads the plugin binary, it uses the executable field plus the current OS (Grafana knows which OS it is running on) to load in the correct version of the plugin. So in Simple JSON the executable field is `simple-json-plugin` and the 3 binaries are named:
|
||||
|
||||
- `simple-json-plugin_darwin_amd64`
|
||||
- `simple-json-plugin_linux_amd64`
|
||||
- `simple-json-plugin_windows_amd64.exe`
|
||||
|
||||
The resulting plugin directory will look like this:
|
||||
|
||||
```text
|
||||
simple-json-backend-datasource/
|
||||
|-- dist/
|
||||
| |-- partials/
|
||||
| |-- module.js
|
||||
| |-- plugin.json
|
||||
| |-- simple-json-plugin_linux_amd64
|
||||
| |-- simple-json-plugin_darwin_amd64
|
||||
| |-- simple-json-plugin_windows_amd64.exe
|
||||
...
|
||||
```
|
||||
|
||||
### Plugin code
|
||||
|
||||
A `pkg/` directory contains three `.go` files:
|
||||
|
||||
- `plugin.go` - an entry point of the plugin. This file would be very similar for your data source - you just need to change some details like the plugin name etc.
|
||||
- `datasource.go` - contains `Query()` method implementation and other plugin logic.
|
||||
- `models.go` - types for request and response specific to your data source.
|
||||
|
||||
The data source type is declared in [`datasource.go`](https://github.com/grafana/simple-json-backend-datasource/blob/7927ff0db60c3402dbf954a454f19d7230e18deb/pkg/datasource.go#L21-L24):
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
plugin "github.com/hashicorp/go-plugin"
|
||||
)
|
||||
|
||||
type JsonDatasource struct {
|
||||
plugin.NetRPCUnsupportedPlugin
|
||||
}
|
||||
```
|
||||
|
||||
The only requirement for the plugin type is that it should extend `plugin.NetRPCUnsupportedPlugin`. You can include more fields into your struct if you want to add some data source-specific features, like logging, cache etc:
|
||||
|
||||
```go
|
||||
type JsonDatasource struct {
|
||||
plugin.NetRPCUnsupportedPlugin
|
||||
logger hclog.Logger
|
||||
}
|
||||
```
|
||||
|
||||
The main method you should implement is the [`Query()`](https://github.com/grafana/simple-json-backend-datasource/blob/7927ff0db60c3402dbf954a454f19d7230e18deb/pkg/datasource.go#L26):
|
||||
|
||||
```go
|
||||
func (t *JsonDatasource) Query(ctx context.Context, tsdbReq *datasource.DatasourceRequest) (*datasource.DatasourceResponse, error) {
|
||||
...
|
||||
```
|
||||
|
||||
#### Request format
|
||||
|
||||
In order to call this method from the [frontend part of your data source](https://github.com/grafana/simple-json-backend-datasource/blob/7927ff0db60c3402dbf954a454f19d7230e18deb/src/datasource.ts#L116), use the `/api/tsdb/query` endpoint:
|
||||
|
||||
```js
|
||||
class SimpleJSONDatasource {
|
||||
...
|
||||
|
||||
doTsdbRequest(options) {
|
||||
const tsdbRequest = {
|
||||
from: options.range.from.valueOf().toString(),
|
||||
to: options.range.to.valueOf().toString(),
|
||||
queries: options.targets,
|
||||
};
|
||||
|
||||
return this.backendSrv.datasourceRequest({
|
||||
url: '/api/tsdb/query',
|
||||
method: 'POST',
|
||||
data: tsdbRequest
|
||||
});
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
This endpoint gets data in the following format (see [pkg/api/metrics.go](https://github.com/grafana/grafana/blob/7b63913dc1d79da07f0329cf19dc4c2704ec488f/pkg/api/metrics.go#L16) and [pkg/api/dtos/models.go](https://github.com/grafana/grafana/blob/7b63913dc1d79da07f0329cf19dc4c2704ec488f/pkg/api/dtos/models.go#L43-L47)):
|
||||
|
||||
```js
|
||||
{
|
||||
from: "1555324640782", // Optional, time range from
|
||||
to: "1555328240782", // Optional, time range to
|
||||
queries: [
|
||||
{
|
||||
datasourceId: 42, // Required
|
||||
refId: "A", // Optional, default is "A"
|
||||
maxDataPoints: 100, // Optional, default is 100
|
||||
intervalMs: 1000, // Optional, default is 1000
|
||||
|
||||
myFieldFoo: "bar", // Any other fields,
|
||||
myFieldBar: "baz", // defined by user
|
||||
...
|
||||
},
|
||||
...
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
There is only one query function but it is possible to move all your queries to the backend. In order to achieve this, you could add a kind of `queryType` field to your query model and check this type in the backend code. The Stackdriver and Cloudwatch core plugins have examples of supporting multiple types of queries if you need/want to do this:
|
||||
|
||||
- Stackdriver: [pkg/tsdb/stackdriver/stackdriver.go](https://github.com/grafana/grafana/blob/6724aaeff9a332dc73b4ee0f8abe0621f7253142/pkg/tsdb/stackdriver/stackdriver.go#L75-L88)
|
||||
- Cloudwatch: [pkg/tsdb/cloudwatch/cloudwatch.go](https://github.com/grafana/grafana/blob/7b63913dc1d79da07f0329cf19dc4c2704ec488f/pkg/tsdb/cloudwatch/cloudwatch.go#L62-L74)
|
||||
|
||||
#### Response format
|
||||
|
||||
Go types for the query response can be found in Grafana tsdb models ([pkg/tsdb/models.go](https://github.com/grafana/grafana/blob/7b63913dc1d79da07f0329cf19dc4c2704ec488f/pkg/tsdb/models.go#L22-L34)) or in the corresponding protocol buffer file ([datasource.proto](https://github.com/grafana/grafana-plugin-model/blob/84176c64269d8060f99e750ee8aba6f062753336/datasource.proto#L26-L36))
|
||||
|
||||
```protobuf
|
||||
// datasource.proto
|
||||
|
||||
message DatasourceResponse {
|
||||
repeated QueryResult results = 1;
|
||||
}
|
||||
|
||||
message QueryResult {
|
||||
string error = 1;
|
||||
string refId = 2;
|
||||
string metaJson = 3;
|
||||
repeated TimeSeries series = 4;
|
||||
repeated Table tables = 5;
|
||||
}
|
||||
```
|
||||
|
||||
```go
|
||||
// pkg/tsdb/models.go
|
||||
|
||||
type Response struct {
|
||||
Results map[string]*QueryResult `json:"results"`
|
||||
Message string `json:"message,omitempty"`
|
||||
}
|
||||
|
||||
type QueryResult struct {
|
||||
Error error `json:"-"`
|
||||
ErrorString string `json:"error,omitempty"`
|
||||
RefId string `json:"refId"`
|
||||
Meta *simplejson.Json `json:"meta,omitempty"`
|
||||
Series TimeSeriesSlice `json:"series"`
|
||||
Tables []*Table `json:"tables"`
|
||||
}
|
||||
```
|
||||
|
||||
The resulting JSON response which the frontend will receive looks like this:
|
||||
|
||||
```js
|
||||
results: {
|
||||
A: {
|
||||
refId: "A",
|
||||
series: [
|
||||
{ name: "series_1", points: [...] },
|
||||
{ name: "series_2", points: [...] },
|
||||
...
|
||||
],
|
||||
tables: null,
|
||||
// Request metadata (any arbitrary JSON).
|
||||
// Optional, empty field will be omitted.
|
||||
meta: {},
|
||||
// Error message. Optional, empty field will be omitted.
|
||||
error: "Request failed",
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Logging
|
||||
|
||||
Logs from the plugin will be automatically sent to the Grafana server and will appear in its log flow. Grafana server reads logs from the plugin's `stderr` stream, so with the standard `log` package you have to set output to `os.Stderr` first:
|
||||
|
||||
```go
|
||||
func main() {
|
||||
log.SetOutput(os.Stderr)
|
||||
log.Println("from plugin!")
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
Another option for logging - using [go-hclog](https://github.com/hashicorp/go-hclog) package:
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
hclog "github.com/hashicorp/go-hclog"
|
||||
)
|
||||
|
||||
var pluginLogger = hclog.New(&hclog.LoggerOptions{
|
||||
Name: "simple-json-backend-datasource",
|
||||
Level: hclog.LevelFromString("DEBUG"),
|
||||
})
|
||||
|
||||
func main() {
|
||||
pluginLogger.Debug("Running Simple JSON backend datasource")
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
### Building the backend binary
|
||||
|
||||
Building the binary depends on which OS you are using.
|
||||
|
||||
For a Linux distro, the build command would be:
|
||||
|
||||
```sh
|
||||
go build -o ./dist/simple-json-plugin_linux_amd64 ./pkg
|
||||
```
|
||||
|
||||
On Windows, the command would be:
|
||||
|
||||
```sh
|
||||
go build -o ./dist/simple-json-plugin_windows_amd64.exe ./pkg
|
||||
```
|
||||
|
||||
Restart your Grafana server and then check the Grafana logs to make sure your plugin is loaded properly.
|
||||
69
docs/sources/developers/plugins/backend/_index.md
Normal file
69
docs/sources/developers/plugins/backend/_index.md
Normal file
@@ -0,0 +1,69 @@
|
||||
+++
|
||||
title = "Backend plugins"
|
||||
keywords = ["grafana", "plugins", "backend", "plugin", "backend-plugins", "documentation"]
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/plugins/developing/backend-plugins-guide/"]
|
||||
+++
|
||||
|
||||
# Backend plugins
|
||||
|
||||
Grafana added support for plugins in version 3.0 and this enabled the Grafana community to create panel plugins and data source plugins. It was wildly successful and has made Grafana much more useful as you can integrate it with anything and do any type of custom visualization that you want.
|
||||
|
||||
However, one limitation with these plugins are that they execute on the client-side (in the browser) which makes it hard to support certain use cases/features, e.g. enable Grafana Alerting for data sources. Grafana v7.0 adds official support for backend plugins which removes this limitation. At the same time it gives plugin developers the possibility to extend Grafana in new and interesting ways, with code running in the backend (server side).
|
||||
|
||||
We use the term _backend plugin_ to denote that a plugin has a backend component. Still, normally a backend plugin requires frontend components as well. This is for example true for backend data source plugins which normally need configuration and query editor components implemented for the frontend.
|
||||
|
||||
Data source plugins can be extended with a backend component. In the future we plan to support additional types and possibly new kinds of plugins, such as [notifiers for Grafana Alerting]({{< relref "../../../alerting/notifications.md" >}}) and custom authentication to name a few.
|
||||
|
||||
## Use cases for implementing a backend plugin
|
||||
|
||||
The following examples gives you an idea of why you'd consider implementing a backend plugin:
|
||||
|
||||
- Enable [Grafana Alerting]({{< relref "../../../alerting" >}}) for data sources.
|
||||
- Connect to non-HTTP services that normally can't be connected to from a web browser, e.g. SQL database servers.
|
||||
- Keep state between users, e.g. query caching for data sources.
|
||||
- Use custom authentication methods and/or authorization checks that aren't supported in Grafana.
|
||||
- Use a custom data source request proxy, see [Resources]({{< relref "#resources" >}}).
|
||||
|
||||
## Grafana’s backend plugin system
|
||||
|
||||
The Grafana backend plugin system is based on the [go-plugin library by HashiCorp](https://github.com/hashicorp/go-plugin). The Grafana server launches each backend plugin as a subprocess and communicates with it over [gRPC](https://grpc.io/). This approach has a number of benefits:
|
||||
|
||||
- Plugins can’t crash your grafana process: a panic in a plugin doesn’t panic the server.
|
||||
- Plugins are easy to develop: just write a Go application and run `go build` (or use any other language which supports gRPC).
|
||||
- Plugins can be relatively secure: The plugin only has access to the interfaces and arguments that are given to it, not to the entire memory space of the process.
|
||||
|
||||
Grafana's backend plugin system exposes a couple of different capabilities, or building blocks, that a backend plugin can implement:
|
||||
|
||||
- Query data
|
||||
- Resources
|
||||
- Health checks
|
||||
- Collect metrics
|
||||
|
||||
### Query data
|
||||
|
||||
The query data capability allows a backend plugin to handle data source queries that are submitted from a [dashboard]({{< relref "../../../features/dashboard/dashboards.md" >}}), [Explore]({{< relref "../../../features/explore/index.md" >}}) or [Grafana Alerting]({{< relref "../../../alerting" >}}). The response contains [data frames]({{< relref "../data-frames.md" >}}), which are used to visualize metrics, logs, and traces. The query data capability is required to implement for a backend data source plugin.
|
||||
|
||||
### Resources
|
||||
|
||||
The resources capability allows a backend plugin to handle custom HTTP requests sent to the Grafana HTTP API and respond with custom HTTP responses. Here, the request and response formats can vary, e.g. JSON, plain text, HTML or static resources (files, images) etc. Compared to the query data capability where the response contains data frames, resources give the plugin developer a lot of flexibility for extending and open up Grafana for new and interesting use cases.
|
||||
|
||||
Examples of use cases for implementing resources:
|
||||
|
||||
- Implement a custom data source proxy in case certain authentication/authorization or other requirements are required/needed that are not supported in Grafana's [built-in data proxy](https://grafana.com/docs/grafana/latest/http_api/data_source/#data-source-proxy-calls).
|
||||
- Return data or information in a format suitable to use within a data source query editor to provide auto-complete functionality.
|
||||
- Return static resources, such as images or files.
|
||||
- Send a command to a device, such as a micro controller or IOT device.
|
||||
- Request information from a device, such as a micro controller or IOT device.
|
||||
- Extend Grafana's HTTP API with custom resources, methods and actions.
|
||||
- Use [chunked transfer encoding](https://en.wikipedia.org/wiki/Chunked_transfer_encoding) to return large data responses in chunks or to enable "basic" streaming capabilities.
|
||||
|
||||
### Health checks
|
||||
|
||||
The health checks capability allows a backend plugin to return the status of the plugin. For data source backend plugins the health check will automatically be called when you do _Save & Test_ in the UI when editing a data source. A plugin's health check endpoint is exposed in the Grafana HTTP API and allows external systems to continuously poll the plugin's health to make sure it's running and working as expected.
|
||||
|
||||
### Collect metrics
|
||||
|
||||
A backend plugin can collect and return runtime, process and custom metrics using the text-based Prometheus [exposition format](https://prometheus.io/docs/instrumenting/exposition_formats/). If you’re using the [Grafana Plugin SDK for Go]({{< relref "grafana-plugin-sdk-for-go.md" >}}) to implement your backend plugin, then the [Prometheus instrumentation library for Go applications](https://github.com/prometheus/client_golang) is built-in, and gives you Go runtime metrics and process metrics out of the box. By using the [Prometheus instrumentation library](https://github.com/prometheus/client_golang) you can add custom metrics to instrument your backend plugin.
|
||||
|
||||
A metrics endpoint (`/api/plugins/<plugin id>/metrics`) for a plugin is available in the Grafana HTTP API and allows a Prometheus instance to be configured to scrape the metrics.
|
||||
@@ -0,0 +1,20 @@
|
||||
+++
|
||||
title = "Grafana Plugin SDK for Go"
|
||||
keywords = ["grafana", "plugins", "backend", "plugin", "backend-plugins", "sdk", "documentation"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Grafana plugin SDK for Go
|
||||
|
||||
The Grafana plugin SDK for Go enables building Grafana backend plugins using [Go](https://golang.org/). The SDK provides a high-level framework with APIs, utilities and tooling that abstract away the details of the [plugin protocol]({{< relref "plugin-protocol.md" >}}) and RPC communication so plugin developers do not need to manage either.
|
||||
|
||||
The [github.com/grafana/grafana-plugin-sdk-go](https://pkg.go.dev/mod/github.com/grafana/grafana-plugin-sdk-go?tab=overview) is a Go module that provides a set of [Go packages](https://pkg.go.dev/mod/github.com/grafana/grafana-plugin-sdk-go?tab=packages) that can be used to implement a backend plugin.
|
||||
|
||||
## Versioning
|
||||
|
||||
The SDK is still in development. The [plugin protocol]({{< relref "plugin-protocol.md" >}}) between Grafana and the plugin SDK is versioned separately and considered stable. However, there might be breaking changes introduced in the SDK. This means that plugins using an older version of the SDK should still work with Grafana, but might lose out on new features and capabilities introduced in the SDK.
|
||||
|
||||
## See also
|
||||
|
||||
- [Source code](https://github.com/grafana/grafana-plugin-sdk-go)
|
||||
- [Go reference documentation](https://pkg.go.dev/github.com/grafana/grafana-plugin-sdk-go)
|
||||
28
docs/sources/developers/plugins/backend/plugin-protocol.md
Normal file
28
docs/sources/developers/plugins/backend/plugin-protocol.md
Normal file
@@ -0,0 +1,28 @@
|
||||
+++
|
||||
title = "Plugin protocol"
|
||||
keywords = ["grafana", "plugins", "backend", "plugin", "backend-plugins", "documentation"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Plugin protocol
|
||||
|
||||
There’s a physical wire protocol that Grafana server uses to communicate with backend plugins. This is the contract between Grafana and backend plugins, that must be agreed upon for Grafana and a backend plugin to be able to communicate with each other. The plugin protocol is built on [gRPC](https://grpc.io/) and is defined in [Protocol Buffers (a.k.a., protobuf)](https://developers.google.com/protocol-buffers).
|
||||
|
||||
We adwise for backend plugins to not be implemented directly against this protocol. Instead, prefer to use the [Grafana Plugin SDK for Go]({{< relref "grafana-plugin-sdk-for-go.md" >}}) that implements this protocol and provides higher level APIs.
|
||||
|
||||
The plugin protocol is available in the [GitHub repository](https://github.com/grafana/grafana-plugin-sdk-go/blob/master/proto/backend.proto). The plugin protocol lives in the [Grafana Plugin SDK for Go]({{< relref "grafana-plugin-sdk-for-go.md" >}}) since Grafana itself uses parts of the SDK as a dependency.
|
||||
|
||||
## Versioning
|
||||
|
||||
Additions of services, messages and fields in the latest version of the plugin protocol are expected to happen, but should not introduce any breaking changes. If breaking changes to the plugin protocol is needed, a new major version of the plugin protocol will be created and released together with a new major Grafana release. Grafana will then support both the old and the new plugin protocol for some time to make sure existing backend plugins continue to work.
|
||||
|
||||
Because Grafana maintains the plugin protocol, the plugin protocol attempts to follow Grafana's versioning, However, that doesn't automatically mean that a new major version of the plugin protocol is created when a new major release of Grafana is released.
|
||||
|
||||
## Writing plugins without Go
|
||||
|
||||
In case you want to write a backend plugin in another language than Go it’s possible as long as the language supports [gRPC](https://grpc.io/). However, writing a plugin in Go is recommended and has several advantages that should be carefully taken into account before proceeding:
|
||||
- There's an official [SDK]({{< relref "grafana-plugin-sdk-for-go.md" >}}) available.
|
||||
- Single binary as the compiled output.
|
||||
- Building and compiling for multiple platforms is easy.
|
||||
- A statically compiled binary (in most cases) doesn't require any additional dependencies installed on the target platform enabling it to run “everywhere”.
|
||||
- Small footprint in regards to binary size and resource usage.
|
||||
@@ -0,0 +1,122 @@
|
||||
+++
|
||||
title = "Build a logs data source plugin"
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Build a logs data source plugin
|
||||
|
||||
This guide explains how to build a logs data source plugin.
|
||||
|
||||
Data sources in Grafana supports both metrics and log data. The steps to build a logs data source plugin are largely the same as for a metrics data source. This guide assumes that you're already familiar with how to [Build a data source plugin]({{< relref "../../../../../tutorials/build-a-data-source-plugin.md" >}}) for metrics.
|
||||
|
||||
## Add logs support to your data source
|
||||
|
||||
To add logs support to an existing data source, you need to:
|
||||
|
||||
- Enable logs support
|
||||
- Construct the log data
|
||||
|
||||
### Enable logs support
|
||||
|
||||
Tell Grafana that your data source plugin can return log data, by adding `"logs": true` to the [plugin.json]({{< relref "metadata.md" >}}) file.
|
||||
|
||||
```json
|
||||
{
|
||||
"logs": true
|
||||
}
|
||||
```
|
||||
|
||||
### Construct the log data
|
||||
|
||||
Just like for metrics data, Grafana expects your plugin to return log data as a [data frame]({{< relref "data-frames.md" >}}).
|
||||
|
||||
To return log data, return a data frame with at least one time field and one text field from the data source's `query` method.
|
||||
|
||||
**Example:**
|
||||
|
||||
```ts
|
||||
const frame = new MutableDataFrame({
|
||||
refId: query.refId,
|
||||
fields: [
|
||||
{ name: 'time', type: FieldType.time },
|
||||
{ name: 'content', type: FieldType.string },
|
||||
],
|
||||
});
|
||||
|
||||
frame.add({ time: 1589189388597, content: 'user registered' });
|
||||
frame.add({ time: 1589189406480, content: 'user logged in' });
|
||||
```
|
||||
|
||||
That's all you need to start returning log data from your data source. Go ahead and try it out in [Explore]({{< relref "../../features/explore/index.md" >}}) or by adding a [Logs panel]({{< relref "../../panels/visualizations/logs-panel.md" >}}).
|
||||
|
||||
Congratulations, you just wrote your first logs data source plugin! Next, let's look at a couple of features that can further improve the experience for the user.
|
||||
|
||||
## Add labels to your logs
|
||||
|
||||
To help filter log lines, many log systems let you query logs based on metadata, or _labels_.
|
||||
|
||||
You can add labels to a stream of logs by setting the [labels](../../packages_api/data/field.md#labels-property) property on the [Field]({{< relref "../../packages_api/data/field.md" >}}).
|
||||
|
||||
**Example**:
|
||||
|
||||
```ts
|
||||
const frame = new MutableDataFrame({
|
||||
refId: query.refId,
|
||||
fields: [
|
||||
{ name: 'time', type: FieldType.time },
|
||||
{ name: 'content', type: FieldType.string, labels: { filename: 'file.txt' } },
|
||||
],
|
||||
});
|
||||
|
||||
frame.add({ time: 1589189388597, content: 'user registered' });
|
||||
frame.add({ time: 1589189406480, content: 'user logged in' });
|
||||
```
|
||||
|
||||
## Extract parsed fields from your logs
|
||||
|
||||
You can add additional information about each log line by adding more data frame fields.
|
||||
|
||||
If a data frame has more than one text field, then Grafana assumes the first field in the data frame to be the actual log line. Any subsequent text fields are treated as [parsed fields]({{< relref "../../features/explore/index.md#labels-and-parsed-fields" >}}).
|
||||
|
||||
While you can add any number of custom fields to your data frame, Grafana comes with a couple of dedicated fields: `levels` and `id`. Let's have a closer look at each one.
|
||||
|
||||
### Levels
|
||||
|
||||
To set the level for each log line, add a `level` field.
|
||||
|
||||
**Example:**
|
||||
|
||||
```ts
|
||||
const frame = new MutableDataFrame({
|
||||
refId: query.refId,
|
||||
fields: [
|
||||
{ name: 'time', type: FieldType.time },
|
||||
{ name: 'content', type: FieldType.string, labels: { filename: 'file.txt' } },
|
||||
{ name: 'level', type: FieldType.string },
|
||||
],
|
||||
});
|
||||
|
||||
frame.add({ time: 1589189388597, content: 'user registered', level: 'info' });
|
||||
frame.add({ time: 1589189406480, content: 'unknown error', level: 'error' });
|
||||
```
|
||||
|
||||
### Unique log lines
|
||||
|
||||
By default, Grafana offers basic support for deduplicating log lines. You can improve the support by adding an `id` field to explicitly assign identifiers to each log line.
|
||||
|
||||
**Example:**
|
||||
|
||||
```ts
|
||||
const frame = new MutableDataFrame({
|
||||
refId: query.refId,
|
||||
fields: [
|
||||
{ name: 'time', type: FieldType.time },
|
||||
{ name: 'content', type: FieldType.string, labels: { filename: 'file.txt' } },
|
||||
{ name: 'level', type: FieldType.string },
|
||||
{ name: 'id', type: FieldType.string },
|
||||
],
|
||||
});
|
||||
|
||||
frame.add({ time: 1589189388597, content: 'user registered', level: 'info', id: 'd3b07384d113edec49eaa6238ad5ff00' });
|
||||
frame.add({ time: 1589189406480, content: 'unknown error', level: 'error', id: 'c157a79031e1c40f85931829bc5fc552' });
|
||||
```
|
||||
@@ -0,0 +1,132 @@
|
||||
+++
|
||||
title = "Build a streaming data source plugin"
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Build a streaming data source plugin
|
||||
|
||||
This guide explains how to build a streaming data source plugin.
|
||||
|
||||
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< relref "../../../../../tutorials/build-a-data-source-plugin.md" >}}).
|
||||
|
||||
When monitoring critical applications, you want your dashboard to refresh as soon as your data does. In Grafana, you can set your dashboards to automatically refresh at a certain interval, no matter what data source you use. Unfortunately, this means that your queries are requesting all the data to be sent again, regardless of whether the data has actually changed.
|
||||
|
||||
By enabling _streaming_ for your data source plugin, you can update your dashboard as soon as new data becomes available.
|
||||
|
||||
For example, a streaming data source plugin can connect to a websocket, or subscribe to a message bus, and update the visualization whenever a new message is available.
|
||||
|
||||
Let's see how you can add streaming to an existing data source!
|
||||
|
||||
Grafana uses [RxJS](https://rxjs.dev/) to continuously send data from a data source to a panel visualization. There's a lot more to RxJS than what's covered in this guide. If you want to learn more, check out the [RxJS documentation](https://rxjs.dev/guide/overview).
|
||||
|
||||
1. Enable streaming for your data source in the `plugin.json` file.
|
||||
|
||||
```json
|
||||
{
|
||||
"streaming": true
|
||||
}
|
||||
```
|
||||
|
||||
1. Change the signature of the `query` method to return an `Observable` from the `rxjs` package. Make sure you remove the `async` keyword.
|
||||
|
||||
```ts
|
||||
import { Observable } from 'rxjs';
|
||||
```
|
||||
|
||||
```ts
|
||||
query(options: DataQueryRequest<MyQuery>): Observable<DataQueryResponse> {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
1. Create an `Observable` for each query, and then combine them all using the `merge` function from the `rxjs` package.
|
||||
|
||||
```ts
|
||||
import { Observable, merge } from 'rxjs';
|
||||
```
|
||||
|
||||
```ts
|
||||
const observables = options.targets.map(target => {
|
||||
return new Observable<DataQueryResponse>(subscriber => {
|
||||
// ...
|
||||
});
|
||||
});
|
||||
|
||||
return merge(...observables);
|
||||
```
|
||||
|
||||
1. In the `subscribe` function, create a `CircularDataFrame`.
|
||||
|
||||
```ts
|
||||
import { CircularDataFrame } from '@grafana/data';
|
||||
```
|
||||
|
||||
```ts
|
||||
const frame = new CircularDataFrame({
|
||||
append: 'tail',
|
||||
capacity: 1000,
|
||||
});
|
||||
|
||||
frame.refId = query.refId;
|
||||
frame.addField({ name: 'time', type: FieldType.time });
|
||||
frame.addField({ name: 'value', type: FieldType.number });
|
||||
```
|
||||
|
||||
Circular data frames have a limited capacity. When a circular data frame reaches its capacity, the oldest data point is removed.
|
||||
|
||||
1. Use `subscriber.next()` to send the updated data frame whenever you receive new updates.
|
||||
|
||||
```ts
|
||||
const intervalId = setInterval(() => {
|
||||
frame.add({ time: Date.now(), value: Math.random() });
|
||||
|
||||
subscriber.next({
|
||||
data: [frame],
|
||||
key: query.refId,
|
||||
});
|
||||
}, 500);
|
||||
|
||||
return () => {
|
||||
clearInterval(intervalId);
|
||||
};
|
||||
```
|
||||
|
||||
> **Note:** In practice, you'd call `subscriber.next` as soon as you receive new data from a websocket or a message bus. The example above simulates data being received every 500 milliseconds.
|
||||
|
||||
Here's the final `query` method.
|
||||
|
||||
```ts
|
||||
query(options: DataQueryRequest<MyQuery>): Observable<DataQueryResponse> {
|
||||
const streams = options.targets.map(target => {
|
||||
const query = defaults(target, defaultQuery);
|
||||
|
||||
return new Observable<DataQueryResponse>(subscriber => {
|
||||
const frame = new CircularDataFrame({
|
||||
append: 'tail',
|
||||
capacity: 1000,
|
||||
});
|
||||
|
||||
frame.refId = query.refId;
|
||||
frame.addField({ name: 'time', type: FieldType.time });
|
||||
frame.addField({ name: 'value', type: FieldType.number });
|
||||
|
||||
const intervalId = setInterval(() => {
|
||||
frame.add({ time: Date.now(), value: Math.random() });
|
||||
|
||||
subscriber.next({
|
||||
data: [frame],
|
||||
key: query.refId,
|
||||
});
|
||||
}, 100);
|
||||
|
||||
return () => {
|
||||
clearInterval(intervalId);
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
return merge(...streams);
|
||||
}
|
||||
```
|
||||
|
||||
One limitation with this example is that the panel visualization is cleared every time you update the dashboard. If you have access to historical data, you can add, or _backfill_, it to the data frame before the first call to `subscriber.next()`.
|
||||
@@ -65,7 +65,7 @@ By adding field configurations to a data frame, Grafana can configure visualizat
|
||||
|
||||
## Transformations
|
||||
|
||||
Along with the type information, field configs enables _data transformations_ within Grafana.
|
||||
Along with the type information, field configs enable _data transformations_ within Grafana.
|
||||
|
||||
A data transformation is any function that accepts a data frame as input, and returns another data frame as output. By using data frames in your plugin, you get a range of transformations for free.
|
||||
|
||||
@@ -73,7 +73,7 @@ A data transformation is any function that accepts a data frame as input, and re
|
||||
|
||||
A data frame with at least one time field is considered a _time series_.
|
||||
|
||||
For more information on time series, refer to our [Introduction to time series](https://grafana.com/docs/grafana/latest/guides/timeseries/).
|
||||
For more information on time series, refer to our [Introduction to time series]({{< relref "../../getting-started/timeseries.md" >}}).
|
||||
|
||||
### Wide format
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Grafana already has a strong community of contributors and plugin developers. By
|
||||
## Short version
|
||||
|
||||
1. [Set up Grafana](https://github.com/grafana/grafana/blob/master/contribute/developer-guide.md)
|
||||
2. Clone an example plugin into ```/var/lib/grafana/plugins``` or `data/plugins` (relative to grafana git repo if you're running development version from source dir)
|
||||
2. Clone an example plugin into `/var/lib/grafana/plugins` or `data/plugins` (relative to grafana git repo if you're running development version from source dir)
|
||||
3. Use one of our example plugins as a starting point
|
||||
|
||||
Example plugins
|
||||
@@ -36,7 +36,7 @@ Since everything turns into JavaScript, it's up to you to choose which language
|
||||
|
||||
## Buildscript
|
||||
|
||||
You can use any build system that supports systemjs. All the built content should end up in a folder named ```dist``` and be committed to the repository. By committing the dist folder, the person who installs your plugin does not have to run any build script. All of our example plugins have a build script configured.
|
||||
You can use any build system that supports systemjs. All the built content should end up in a folder named `dist` and be committed to the repository. By committing the dist folder, the person who installs your plugin does not have to run any build script. All of our example plugins have a build script configured.
|
||||
|
||||
## Keep your plugin up to date
|
||||
|
||||
@@ -63,35 +63,31 @@ The SDK contains three different plugin classes: PanelCtrl, MetricsPanelCtrl and
|
||||
Example:
|
||||
|
||||
```javascript
|
||||
import {ClockCtrl} from './clock_ctrl';
|
||||
import { ClockCtrl } from './clock_ctrl';
|
||||
|
||||
export {
|
||||
ClockCtrl as PanelCtrl
|
||||
};
|
||||
export { ClockCtrl as PanelCtrl };
|
||||
```
|
||||
|
||||
The module class is also where css for the dark and light themes is imported:
|
||||
|
||||
```javascript
|
||||
import {loadPluginCss} from 'app/plugins/sdk';
|
||||
import { loadPluginCss } from 'app/plugins/sdk';
|
||||
import WorldmapCtrl from './worldmap_ctrl';
|
||||
|
||||
loadPluginCss({
|
||||
dark: 'plugins/grafana-worldmap-panel/css/worldmap.dark.css',
|
||||
light: 'plugins/grafana-worldmap-panel/css/worldmap.light.css'
|
||||
light: 'plugins/grafana-worldmap-panel/css/worldmap.light.css',
|
||||
});
|
||||
|
||||
export {
|
||||
WorldmapCtrl as PanelCtrl
|
||||
};
|
||||
export { WorldmapCtrl as PanelCtrl };
|
||||
```
|
||||
|
||||
## Start developing your plugin
|
||||
|
||||
There are three ways that you can start developing a Grafana plugin.
|
||||
|
||||
1. Set up a Grafana development environment. [(described here)](https://github.com/grafana/grafana/blob/master/contribute/developer-guide.md) and place your plugin in the ```data/plugins``` folder.
|
||||
2. Install Grafana and place your plugin in the plugins directory which is set in your [config file](/installation/configuration). By default this is `/var/lib/grafana/plugins` on Linux systems.
|
||||
1. Set up a Grafana development environment. [(described here)](https://github.com/grafana/grafana/blob/master/contribute/developer-guide.md) and place your plugin in the `data/plugins` folder.
|
||||
2. Install Grafana and place your plugin in the plugins directory which is set in your [config file](/administration/configuration). By default this is `/var/lib/grafana/plugins` on Linux systems.
|
||||
3. Place your plugin directory anywhere you like and specify it grafana.ini.
|
||||
|
||||
We encourage people to set up the full Grafana environment so that you can get inspiration from the rest of the Grafana code base.
|
||||
@@ -116,11 +112,11 @@ If a panel receives data and hooks into the `data-received` event then it should
|
||||
|
||||
We have three different examples that you can fork/download to get started developing your Grafana plugin.
|
||||
|
||||
- [simple-json-datasource](https://github.com/grafana/simple-json-datasource) (small data source plugin for querying json data from backends)
|
||||
- [simple-app-plugin](https://github.com/grafana/simple-app-plugin)
|
||||
- [clock-panel](https://github.com/grafana/clock-panel)
|
||||
- [singlestat-panel](https://github.com/grafana/grafana/tree/master/public/app/plugins/panel/singlestat)
|
||||
- [piechart-panel](https://github.com/grafana/piechart-panel)
|
||||
- [simple-json-datasource](https://github.com/grafana/simple-json-datasource) (small data source plugin for querying json data from backends)
|
||||
- [simple-app-plugin](https://github.com/grafana/simple-app-plugin)
|
||||
- [clock-panel](https://github.com/grafana/clock-panel)
|
||||
- [singlestat-panel](https://github.com/grafana/grafana/tree/master/public/app/plugins/panel/singlestat)
|
||||
- [piechart-panel](https://github.com/grafana/piechart-panel)
|
||||
|
||||
## Other Articles
|
||||
|
||||
@@ -129,4 +125,4 @@ We have three different examples that you can fork/download to get started devel
|
||||
- [Grafana Plugin Code Styleguide]({{< relref "style-guide.md" >}})
|
||||
- [Grafana Apps]({{< relref "apps.md" >}})
|
||||
- [Grafana Data Sources]({{< relref "data-sources.md" >}})
|
||||
- [plugin.json Schema]({{< relref "metadata.md" >}})
|
||||
- [plugin.json Schema]({{< relref "../metadata.md" >}})
|
||||
|
||||
@@ -7,7 +7,7 @@ aliases = ["/docs/grafana/latest/plugins/developing/apps/"]
|
||||
|
||||
# Legacy app plugins
|
||||
|
||||
App plugins are a Grafana plugin that can bundle data source and panel plugins within one package. They also enable the plugin author to create custom pages within Grafana. The custom pages enable the plugin author to include things like documentation, sign-up forms, or to control other services with HTTP requests.
|
||||
App plugins are Grafana plugins that can bundle data source and panel plugins within one package. They also enable the plugin author to create custom pages within Grafana. The custom pages enable the plugin author to include things like documentation, sign-up forms, or to control other services with HTTP requests.
|
||||
|
||||
Data source and panel plugins will show up like normal plugins. The app pages will be available in the main menu.
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ A basic guide for data sources can be found [here](http://docs.grafana.org/plugi
|
||||
|
||||
If possible, any passwords or secrets should be be saved in the `secureJsonData` blob. To encrypt sensitive data, the Grafana server's proxy feature must be used. The Grafana server has support for token authentication (OAuth) and HTTP Header authentication. If the calls have to be sent directly from the browser to a third-party API, this will not be possible and sensitive data will not be encrypted.
|
||||
|
||||
Read more here about how [authentication for data sources]({{< relref "../authentication.md" >}}) works.
|
||||
Read more here about how [authentication for data sources]({{< relref "../add-authentication-for-data-source-plugins.md" >}}) works.
|
||||
|
||||
If using the proxy feature, the Config page should use the `secureJsonData` blob like this:
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ grafana-piechart-panel
|
||||
mtanda-histogram-panel
|
||||
```
|
||||
|
||||
The full file format for plugin.json is described [here]({{< relref "metadata.md" >}}).
|
||||
The full file format for plugin.json is described [here]({{< relref "../metadata.md" >}}).
|
||||
|
||||
Minimal plugin.json:
|
||||
|
||||
@@ -110,11 +110,23 @@ Below is a minimal example of an editor row with one form group and two fields,
|
||||
<div class="gf-form">
|
||||
<label class="gf-form-label width-10">Label1</label>
|
||||
<div class="gf-form-select-wrapper max-width-10">
|
||||
<select class="input-small gf-form-input" ng-model="ctrl.panel.mySelectProperty" ng-options="t for t in ['option1', 'option2', 'option3']" ng-change="ctrl.onSelectChange()"></select>
|
||||
<select
|
||||
class="input-small gf-form-input"
|
||||
ng-model="ctrl.panel.mySelectProperty"
|
||||
ng-options="t for t in ['option1', 'option2', 'option3']"
|
||||
ng-change="ctrl.onSelectChange()"
|
||||
></select>
|
||||
</div>
|
||||
<div class="gf-form">
|
||||
<label class="gf-form-label width-10">Label2</label>
|
||||
<input type="text" class="input-small gf-form-input width-10" ng-model="ctrl.panel.myProperty" ng-change="ctrl.onFieldChange()" placeholder="suggestion for user" ng-model-onblur />
|
||||
<input
|
||||
type="text"
|
||||
class="input-small gf-form-input width-10"
|
||||
ng-model="ctrl.panel.myProperty"
|
||||
ng-change="ctrl.onFieldChange()"
|
||||
placeholder="suggestion for user"
|
||||
ng-model-onblur
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,43 +149,45 @@ We recommend that you use a linter for your JavaScript. For ES6, the standard li
|
||||
2. Prefer to use `let` instead `var` ([Exploring ES6](http://exploringjs.com/es6/ch_core-features.html#_from-var-to-letconst))
|
||||
3. Use arrow functions, which don’t shadow `this` ([Exploring ES6](http://exploringjs.com/es6/ch_core-features.html#_from-function-expressions-to-arrow-functions)):
|
||||
|
||||
```js
|
||||
testDatasource() {
|
||||
return this.getServerStatus()
|
||||
.then(status => {
|
||||
return this.doSomething(status);
|
||||
})
|
||||
}
|
||||
```
|
||||
```js
|
||||
testDatasource() {
|
||||
return this.getServerStatus()
|
||||
.then(status => {
|
||||
return this.doSomething(status);
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
better than
|
||||
better than
|
||||
|
||||
```js
|
||||
testDatasource() {
|
||||
var self = this;
|
||||
return this.getServerStatus()
|
||||
.then(function(status) {
|
||||
return self.doSomething(status);
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
testDatasource() {
|
||||
var self = this;
|
||||
return this.getServerStatus()
|
||||
.then(function(status) {
|
||||
return self.doSomething(status);
|
||||
})
|
||||
}
|
||||
```
|
||||
4. Use native _Promise_ object:
|
||||
|
||||
```js
|
||||
metricFindQuery(query) {
|
||||
if (!query) {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
}
|
||||
```
|
||||
```js
|
||||
metricFindQuery(query) {
|
||||
if (!query) {
|
||||
return Promise.resolve([]);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
better than
|
||||
better than
|
||||
|
||||
```js
|
||||
metricFindQuery(query) {
|
||||
if (!query) {
|
||||
return this.$q.when([]);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```js
|
||||
metricFindQuery(query) {
|
||||
if (!query) {
|
||||
return this.$q.when([]);
|
||||
}
|
||||
}
|
||||
```
|
||||
5. If using Lodash, then be consistent and prefer that to the native ES6 array functions.
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
+++
|
||||
# -------------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by json-schema-docs.
|
||||
# -------------------------------------------------------------------------
|
||||
title = "plugin.json"
|
||||
keywords = ["grafana", "plugins", "documentation"]
|
||||
type = "docs"
|
||||
@@ -7,30 +10,177 @@ aliases = ["/docs/grafana/latest/plugins/developing/plugin.json/"]
|
||||
|
||||
# plugin.json
|
||||
|
||||
The plugin.json file is mandatory for all plugins. When Grafana starts it will scan the plugin folders and mount every folder that contains a plugin.json file unless the folder contains a subfolder named `dist`. In that case grafana will mount the `dist` folder instead.
|
||||
The plugin.json file is required for all plugins. When Grafana starts, it scans the plugin folders and mounts every folder that contains a plugin.json file unless the folder contains a subfolder named dist. In that case, Grafana mounts the dist folder instead.
|
||||
|
||||
## Schema
|
||||
## Properties
|
||||
|
||||
| Property | Description |
|
||||
|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------|
|
||||
| id | Unique name of the plugin. |
|
||||
| type | One of `app`, `datasource`, `panel` |
|
||||
| name | Human-readable name of the plugin |
|
||||
| dependencies.grafanaVersion | Required Grafana version for this plugin |
|
||||
| dependencies.plugins | An array of required plugins on which this plugin depends |
|
||||
| info.author.name | Author's name |
|
||||
| info.author.url | Link to author's website |
|
||||
| info.description | Description of plugin. Used for search on grafana.com |
|
||||
| info.keywords | Array of plugin keywords. Used for search on grafana.com |
|
||||
| info.links | An array of link objects to be displayed on this plugin's project page in the form `{name: 'foo', url: 'http://example.com'}` |
|
||||
| info.logos.small | Link to the "small" version of the plugin logo, which must be an SVG image. "Large" and "small" logos can be the same image. |
|
||||
| info.logos.large | Link to the "large" version of the plugin logo, which must be an SVG image. "Large" and "small" logos can be the same image. |
|
||||
| info.screenshots | An array of screenshot objects in the form `{name: 'bar', path: 'img/screenshot.png'}` |
|
||||
| info.updated | Date when this plugin was built. Use `%TODAY%` for Grafana to autopopulate this value. |
|
||||
| info.version | Project version of this commit. Use `%VERSION%` for Grafana to autopopulate this value. |
|
||||
| Property | Type | Required | Description |
|
||||
|-----------------|-------------------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `dependencies` | [object](#dependencies) | **Yes** | Plugin dependencies. |
|
||||
| `id` | string | **Yes** | Unique name of the plugin. If the plugin is published on grafana.com, then the plugin id has to follow the naming conventions. |
|
||||
| `info` | [object](#info) | **Yes** | Metadata for the plugin. Some fields are used on the plugins page in Grafana and others on grafana.com if the plugin is published. |
|
||||
| `name` | string | **Yes** | Human-readable name of the plugin that is shown to the user in the UI. |
|
||||
| `type` | string | **Yes** | Plugin type. Possible values are `app`, `datasource`, and `panel`. |
|
||||
| `alerting` | boolean | No | For data source plugins. If the plugin supports alerting. |
|
||||
| `annotations` | boolean | No | For data source plugins. If the plugin supports annotation queries. |
|
||||
| `backend` | boolean | No | If the plugin has a backend component. |
|
||||
| `category` | string | No | Plugin category used on the Add data source page. Possible values are: `tsdb`, `logging`, `cloud`, `tracing`, and `sql`. |
|
||||
| `executable` | string | No | The first part of the file name of the backend component executable. There can be multiple executables built for different operating system and architecture. Grafana will check for executables named `<executable>_<$GOOS>_<lower case $GOARCH><.exe for Windows>`, e.g. `plugin_linux_amd64`. Combination of $GOOS and $GOARCH can be found here: https://golang.org/doc/install/source#environment. |
|
||||
| `hiddenQueries` | boolean | No | |
|
||||
| `includes` | [object](#includes)[] | No | |
|
||||
| `logs` | boolean | No | For data source plugins. If the plugin supports logs. |
|
||||
| `metrics` | boolean | No | For data source plugins. If the plugin supports metric queries. Used in the Explore feature. |
|
||||
| `mixed` | boolean | No | Not to be used by external plugins. Special property for the built-in mixed plugin. |
|
||||
| `module` | string | No | |
|
||||
| `partials` | [object](#partials) | No | |
|
||||
| `queryOptions` | [object](#queryoptions) | No | For data source plugins. There is a query options section in the plugin's query editor and these options can be turned on if needed. |
|
||||
| `routes` | [object](#routes)[] | No | For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/latest/developers/plugins/authentication/). |
|
||||
| `sort` | number | No | Internal property for sorting. Cannot be used as will be overwritten by Grafana. |
|
||||
| `staticRoot` | string | No | |
|
||||
| `streaming` | boolean | No | For data source plugins. If the plugin supports streaming. |
|
||||
| `tables` | boolean | No | |
|
||||
| `tracing` | boolean | No | For data source plugins. If the plugin supports tracing. |
|
||||
|
||||
## Plugin.json Example
|
||||
## dependencies
|
||||
|
||||
Plugin dependencies.
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|------------------|----------|----------|------------------------------------------------------------------------------------------------------------------|
|
||||
| `grafanaVersion` | string | **Yes** | Required Grafana version for this plugin, e.g. `6.x.x 7.x.x` to denote plugin requires Grafana v6.x.x or v7.x.x. |
|
||||
| `plugins` | string[] | No | An array of required plugins on which this plugin depends. |
|
||||
|
||||
## includes
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|--------------|---------|----------|-------------|
|
||||
| `addToNav` | boolean | No | |
|
||||
| `component` | string | No | |
|
||||
| `defaultNav` | boolean | No | |
|
||||
| `name` | string | No | |
|
||||
| `role` | string | No | |
|
||||
| `type` | string | No | |
|
||||
|
||||
## info
|
||||
|
||||
Metadata for the plugin. Some fields are used on the plugins page in Grafana and others on grafana.com if the plugin is published.
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|---------------|--------------------------|----------|-------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `logos` | [object](#logos) | **Yes** | SVG images that are used as plugin icons. |
|
||||
| `updated` | string | **Yes** | Date when this plugin was built. |
|
||||
| `version` | string | **Yes** | Project version of this commit, e.g. `6.7.x`. |
|
||||
| `author` | [object](#author) | No | Information about the plugin author. |
|
||||
| `description` | string | No | Description of plugin. Used on the plugins page in Grafana and for search on grafana.com. |
|
||||
| `keywords` | string[] | No | Array of plugin keywords. Used for search on grafana.com. |
|
||||
| `links` | [object](#links)[] | No | An array of link objects to be displayed on this plugin's project page in the form `{name: 'foo', url: 'http://example.com'}` |
|
||||
| `screenshots` | [object](#screenshots)[] | No | An array of screenshot objects in the form `{name: 'bar', path: 'img/screenshot.png'}` |
|
||||
|
||||
### author
|
||||
|
||||
Information about the plugin author.
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------|--------|----------|---------------------------|
|
||||
| `email` | string | No | Author's name. |
|
||||
| `name` | string | No | Author's name. |
|
||||
| `url` | string | No | Link to author's website. |
|
||||
|
||||
### links
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------|--------|----------|-------------|
|
||||
| `name` | string | No | |
|
||||
| `url` | string | No | |
|
||||
|
||||
### logos
|
||||
|
||||
SVG images that are used as plugin icons.
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------|--------|----------|------------------------------------------------------------------------------------------------------------------------------|
|
||||
| `large` | string | **Yes** | Link to the "large" version of the plugin logo, which must be an SVG image. "Large" and "small" logos can be the same image. |
|
||||
| `small` | string | **Yes** | Link to the "small" version of the plugin logo, which must be an SVG image. "Large" and "small" logos can be the same image. |
|
||||
|
||||
### screenshots
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------|--------|----------|-------------|
|
||||
| `name` | string | No | |
|
||||
| `path` | string | No | |
|
||||
|
||||
## partials
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------|--------|----------|-------------|
|
||||
| `config` | string | No | |
|
||||
|
||||
## queryOptions
|
||||
|
||||
For data source plugins. There is a query options section in the plugin's query editor and these options can be turned on if needed.
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|-----------------|---------|----------|----------------------------------------------------------------------------------------------------------------------------|
|
||||
| `cacheTimeout` | boolean | No | For data source plugins. If the `cache timeout` option should be shown in the query options section in the query editor. |
|
||||
| `maxDataPoints` | boolean | No | For data source plugins. If the `max data points` option should be shown in the query options section in the query editor. |
|
||||
| `minInterval` | boolean | No | For data source plugins. If the `min interval` option should be shown in the query options section in the query editor. |
|
||||
|
||||
## routes
|
||||
|
||||
For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/latest/developers/plugins/authentication/).
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|---------------|----------------------|----------|---------------------------------------------------------------------------------------------------------|
|
||||
| `headers` | array | No | For data source plugins. Route headers adds HTTP headers to the proxied request. |
|
||||
| `method` | string | No | For data source plugins. Route method matches the HTTP verb like GET or POST. |
|
||||
| `path` | string | No | For data source plugins. The route path that is replaced by the route URL field when proxying the call. |
|
||||
| `reqRole` | string | No | |
|
||||
| `reqSignedIn` | boolean | No | |
|
||||
| `tokenAuth` | [object](#tokenauth) | No | For data source plugins. Token authentication section used with an OAuth API. |
|
||||
| `url` | string | No | For data source plugins. Route URL is where the request is proxied to. |
|
||||
|
||||
### tokenAuth
|
||||
|
||||
For data source plugins. Token authentication section used with an OAuth API.
|
||||
|
||||
#### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|----------|-------------------|----------|---------------------------------------------------------------------------|
|
||||
| `params` | [object](#params) | No | For data source plugins. Parameters for the token authentication request. |
|
||||
| `url` | string | No | For data source plugins. URL to fetch the authentication token. |
|
||||
|
||||
#### params
|
||||
|
||||
For data source plugins. Parameters for the token authentication request.
|
||||
|
||||
##### Properties
|
||||
|
||||
| Property | Type | Required | Description |
|
||||
|-----------------|--------|----------|--------------------------------------------------------------------------------------------------------------------|
|
||||
| `client_id` | string | No | For data source plugins. OAuth client id. |
|
||||
| `client_secret` | string | No | For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob. |
|
||||
| `grant_type` | string | No | For data source plugins. OAuth grant type. |
|
||||
| `resource` | string | No | For data source plugins. OAuth resource. |
|
||||
|
||||
Here's an example of an up-to-date plugin.json file:
|
||||
|
||||
https://github.com/grafana/clock-panel/blob/master/src/plugin.json
|
||||
|
||||
11
docs/sources/developers/plugins/metadata.md.tpl
Normal file
11
docs/sources/developers/plugins/metadata.md.tpl
Normal file
@@ -0,0 +1,11 @@
|
||||
+++
|
||||
# -------------------------------------------------------------------------
|
||||
# Do not edit this file. It is automatically generated by json-schema-docs.
|
||||
# -------------------------------------------------------------------------
|
||||
title = "plugin.json"
|
||||
keywords = ["grafana", "plugins", "documentation"]
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/plugins/developing/plugin.json/"]
|
||||
+++
|
||||
|
||||
{{ .Markdown 1 }}
|
||||
325
docs/sources/developers/plugins/plugin.schema.json
Normal file
325
docs/sources/developers/plugins/plugin.schema.json
Normal file
@@ -0,0 +1,325 @@
|
||||
{
|
||||
"$id": "https://grafana.com/plugin-metadata",
|
||||
"$schema": "http://json-schema.org/draft-07/schema",
|
||||
"type": "object",
|
||||
"title": "plugin.json",
|
||||
"description": "The plugin.json file is required for all plugins. When Grafana starts, it scans the plugin folders and mounts every folder that contains a plugin.json file unless the folder contains a subfolder named dist. In that case, Grafana mounts the dist folder instead.",
|
||||
"required": ["type", "name", "id", "info", "dependencies"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Unique name of the plugin. If the plugin is published on grafana.com, then the plugin id has to follow the naming conventions.",
|
||||
"pattern": "^[0-9a-z\\-]+$"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Plugin type. Possible values are `app`, `datasource`, and `panel`.",
|
||||
"enum": ["app", "datasource", "panel"]
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Human-readable name of the plugin that is shown to the user in the UI."
|
||||
},
|
||||
"category": {
|
||||
"type": "string",
|
||||
"description": "Plugin category used on the Add data source page. Possible values are: `tsdb`, `logging`, `cloud`, `tracing`, and `sql`.",
|
||||
"enum": ["tsdb", "logging", "cloud", "tracing", "sql"]
|
||||
},
|
||||
"annotations": {
|
||||
"type": "boolean",
|
||||
"description": "For data source plugins. If the plugin supports annotation queries."
|
||||
},
|
||||
"alerting": {
|
||||
"type": "boolean",
|
||||
"description": "For data source plugins. If the plugin supports alerting."
|
||||
},
|
||||
"backend": {
|
||||
"type": "boolean",
|
||||
"description": "If the plugin has a backend component."
|
||||
},
|
||||
"executable": {
|
||||
"type": "string",
|
||||
"description": "The first part of the file name of the backend component executable. There can be multiple executables built for different operating system and architecture. Grafana will check for executables named `<executable>_<$GOOS>_<lower case $GOARCH><.exe for Windows>`, e.g. `plugin_linux_amd64`. Combination of $GOOS and $GOARCH can be found here: https://golang.org/doc/install/source#environment."
|
||||
},
|
||||
"includes": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalItems": false,
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"component": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"type": "string"
|
||||
},
|
||||
"addToNav": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"defaultNav": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"logs": {
|
||||
"type": "boolean",
|
||||
"description": "For data source plugins. If the plugin supports logs."
|
||||
},
|
||||
"partials": {
|
||||
"type": "object",
|
||||
"additionalItems": false,
|
||||
"properties": {
|
||||
"config": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"metrics": {
|
||||
"type": "boolean",
|
||||
"description": "For data source plugins. If the plugin supports metric queries. Used in the Explore feature."
|
||||
},
|
||||
"mixed": {
|
||||
"type": "boolean",
|
||||
"description": "Not to be used by external plugins. Special property for the built-in mixed plugin."
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"sort": {
|
||||
"type": "number",
|
||||
"description": "Internal property for sorting. Cannot be used as will be overwritten by Grafana."
|
||||
},
|
||||
"staticRoot": {
|
||||
"type": "string"
|
||||
},
|
||||
"streaming": {
|
||||
"type": "boolean",
|
||||
"description": "For data source plugins. If the plugin supports streaming."
|
||||
},
|
||||
"tables": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"tracing": {
|
||||
"type": "boolean",
|
||||
"description": "For data source plugins. If the plugin supports tracing."
|
||||
},
|
||||
"hiddenQueries": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"dependencies": {
|
||||
"type": "object",
|
||||
"description": "Plugin dependencies.",
|
||||
"required": ["grafanaVersion"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"grafanaVersion": {
|
||||
"type": "string",
|
||||
"description": "Required Grafana version for this plugin, e.g. `6.x.x 7.x.x` to denote plugin requires Grafana v6.x.x or v7.x.x.",
|
||||
"pattern": "^([0-9x]+\\.[0-9x]+\\.*[0-9x]*\\s*)+$"
|
||||
},
|
||||
"plugins": {
|
||||
"type": "array",
|
||||
"description": "An array of required plugins on which this plugin depends.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
"type": "object",
|
||||
"description": "Metadata for the plugin. Some fields are used on the plugins page in Grafana and others on grafana.com if the plugin is published.",
|
||||
"required": ["logos", "version", "updated"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"author": {
|
||||
"type": "object",
|
||||
"description": "Information about the plugin author.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "Author's name."
|
||||
},
|
||||
"email": {
|
||||
"type": "string",
|
||||
"description": "Author's name.",
|
||||
"format": "email"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "Link to author's website.",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"description": "Description of plugin. Used on the plugins page in Grafana and for search on grafana.com."
|
||||
},
|
||||
"keywords": {
|
||||
"type": "array",
|
||||
"description": "Array of plugin keywords. Used for search on grafana.com.",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"type": "array",
|
||||
"description": "An array of link objects to be displayed on this plugin's project page in the form `{name: 'foo', url: 'http://example.com'}`",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"logos": {
|
||||
"type": "object",
|
||||
"description": "SVG images that are used as plugin icons.",
|
||||
"required": ["small", "large"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"small": {
|
||||
"type": "string",
|
||||
"description": "Link to the \"small\" version of the plugin logo, which must be an SVG image. \"Large\" and \"small\" logos can be the same image."
|
||||
},
|
||||
"large": {
|
||||
"type": "string",
|
||||
"description": "Link to the \"large\" version of the plugin logo, which must be an SVG image. \"Large\" and \"small\" logos can be the same image."
|
||||
}
|
||||
}
|
||||
},
|
||||
"screenshots": {
|
||||
"type": "array",
|
||||
"description": "An array of screenshot objects in the form `{name: 'bar', path: 'img/screenshot.png'}`",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"path": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"updated": {
|
||||
"type": "string",
|
||||
"description": "Date when this plugin was built.",
|
||||
"pattern": "^(\\d{4}-\\d{2}-\\d{2}|\\%TODAY\\%)$"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "Project version of this commit, e.g. `6.7.x`.",
|
||||
"pattern": "^([0-9x]+\\.[0-9x]+\\.*[0-9x]*$|\\%VERSION\\%)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"queryOptions": {
|
||||
"type": "object",
|
||||
"description": "For data source plugins. There is a query options section in the plugin's query editor and these options can be turned on if needed.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"maxDataPoints": {
|
||||
"type": "boolean",
|
||||
"description": "For data source plugins. If the `max data points` option should be shown in the query options section in the query editor."
|
||||
},
|
||||
"minInterval": {
|
||||
"type": "boolean",
|
||||
"description": "For data source plugins. If the `min interval` option should be shown in the query options section in the query editor."
|
||||
},
|
||||
"cacheTimeout": {
|
||||
"type": "boolean",
|
||||
"description": "For data source plugins. If the `cache timeout` option should be shown in the query options section in the query editor."
|
||||
}
|
||||
}
|
||||
},
|
||||
"routes": {
|
||||
"type": "array",
|
||||
"description": "For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/latest/developers/plugins/authentication/).",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"description": "For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](https://grafana.com/docs/grafana/latest/developers/plugins/authentication/).",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"path": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. The route path that is replaced by the route URL field when proxying the call."
|
||||
},
|
||||
"method": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. Route method matches the HTTP verb like GET or POST."
|
||||
},
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. Route URL is where the request is proxied to.",
|
||||
"format": "uri"
|
||||
},
|
||||
"reqSignedIn": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"reqRole": {
|
||||
"type": "string"
|
||||
},
|
||||
"headers": {
|
||||
"type": "array",
|
||||
"description": "For data source plugins. Route headers adds HTTP headers to the proxied request."
|
||||
},
|
||||
"tokenAuth": {
|
||||
"type": "object",
|
||||
"description": "For data source plugins. Token authentication section used with an OAuth API.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"url": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. URL to fetch the authentication token.",
|
||||
"format": "uri"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"description": "For data source plugins. Parameters for the token authentication request.",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"grant_type": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth grant type."
|
||||
},
|
||||
"client_id": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth client id."
|
||||
},
|
||||
"client_secret": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth client secret. Usually populated by decrypting the secret from the SecureJson blob."
|
||||
},
|
||||
"resource": {
|
||||
"type": "string",
|
||||
"description": "For data source plugins. OAuth resource."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
10
docs/sources/developers/plugins/sign-a-plugin.md
Normal file
10
docs/sources/developers/plugins/sign-a-plugin.md
Normal file
@@ -0,0 +1,10 @@
|
||||
+++
|
||||
title = "Sign a plugin"
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Sign a plugin
|
||||
|
||||
Signing a plugin allows Grafana to verify the authenticity of the plugin with [signature verification]({{< relref "../../plugins/plugin-signature-verification.md" >}}). This gives users a way to make sure plugins haven't been tampered with. All Grafana Labs-authored backend plugins, including Enterprise plugins, are signed.
|
||||
|
||||
We're looking into providing a process for allowing community plugins to be signed in an upcoming version of Grafana.
|
||||
@@ -19,21 +19,9 @@ Grafana Enterprise includes all of the features found in the open source edition
|
||||
|
||||
[Learn more about Grafana Enterprise.](https://grafana.com/enterprise)
|
||||
|
||||
## Enhanced security features
|
||||
## Authentication
|
||||
|
||||
Grafana Enterprise includes integrations with more ways to authenticate your users and enhanced authorization capabilities.
|
||||
|
||||
### Data source permissions
|
||||
|
||||
[Data source permissions]({{< relref "datasource_permissions.md" >}}) allow you to restrict query access to only specific teams and users.
|
||||
|
||||
### Enhanced LDAP integration
|
||||
|
||||
With Grafana Enterprise [enhanced LDAP]({{< relref "enhanced_ldap.md" >}}), you can set up synchronization between LDAP groups and Grafana teams.
|
||||
|
||||
### SAML authentication
|
||||
|
||||
[SAML authentication]({{< relref "saml.md" >}}) enables your Grafana Enterprise users to authenticate with SAML.
|
||||
Grafana Enterprise includes integrations with more ways to authenticate your users and enhanced authentication capabilities.
|
||||
|
||||
### Team sync
|
||||
|
||||
@@ -42,25 +30,31 @@ With Grafana Enterprise [enhanced LDAP]({{< relref "enhanced_ldap.md" >}}), you
|
||||
Supported auth providers:
|
||||
|
||||
* [Auth Proxy]({{< relref "../auth/auth-proxy.md#team-sync-enterprise-only">}})
|
||||
* [Azure AD OAuth]({{< relref "../auth/azuread.md#team-sync-enterprise-only" >}})
|
||||
* [GitHub OAuth]({{< relref "../auth/github.md#team-sync-enterprise-only" >}})
|
||||
* [GitLab OAuth]({{< relref "../auth/gitlab.md#team-sync-enterprise-only" >}})
|
||||
* [LDAP]({{< relref "enhanced_ldap.md#ldap-group-synchronization-for-teams" >}})
|
||||
* [Okta]({{< relref "../auth/okta.md#team-sync-enterprise-only" >}})
|
||||
* [SAML]({{< relref "saml.md#configure-team-sync" >}})
|
||||
|
||||
## Reporting
|
||||
### Enhanced LDAP integration
|
||||
|
||||
[Reporting]({{< relref "reporting.md" >}}) allows you to take any dashboard, generate a PDF report, and set up a schedule to have it emailed to whoever you choose.
|
||||
With Grafana Enterprise [enhanced LDAP]({{< relref "enhanced_ldap.md" >}}), you can set up active LDAP synchronization.
|
||||
|
||||
## Export dashboard as PDF
|
||||
### SAML authentication
|
||||
|
||||
[Export dashboard as PDF]({{< relref "export-pdf.md" >}}) allows you to export a dashboard as a PDF document.
|
||||
[SAML authentication]({{< relref "saml.md" >}}) enables your Grafana Enterprise users to authenticate with SAML.
|
||||
|
||||
## White labeling
|
||||
## Enterprise features
|
||||
|
||||
[White labeling]({{< relref "white-labeling.md" >}}) allows you to replace the Grafana brand and logo with your own corporate brand and logo. You can also change footer links to point to your custom resources.
|
||||
With Grafana Enterprise, you get access to new features, including:
|
||||
|
||||
## Usage insights
|
||||
|
||||
[Usage insights]({{< relref "usage-insights.md" >}}) allow you to understand how your Grafana instance is used. You can see who is looking at a dashboard, how often a dashboard is seen, and which dashboards are prone to errors. You'll also be able to discover what are the least and the most used dashboards.
|
||||
* [Data source permissions]({{< relref "datasource_permissions.md" >}}) to restrict query access to specific teams and users.
|
||||
* [Reporting]({{< relref "reporting.md" >}}) to generate a PDF report from any dashboard and set up a schedule to have it emailed to whoever you choose.
|
||||
* [Export dashboard as PDF]({{< relref "export-pdf.md" >}})
|
||||
* [White labeling]({{< relref "white-labeling.md" >}}) to customize Grafana from the brand and logo to the footer links.
|
||||
* [Usage insights]({{< relref "usage-insights.md" >}}) to understand how your Grafana instance is used.
|
||||
* [Vault integration]({{< relref "vault.md" >}}) to manage your configuration or provisioning secrets with Vault.
|
||||
|
||||
## Enterprise plugins
|
||||
|
||||
@@ -79,11 +73,11 @@ With a Grafana Enterprise license, you get access to premium plugins, including:
|
||||
|
||||
To purchase or obtain a trial license contact the Grafana Labs [Sales Team](https://grafana.com/contact?about=support&topic=Grafana%20Enterprise).
|
||||
|
||||
## License file management
|
||||
### License file management
|
||||
|
||||
To download your Grafana Enterprise license log in to your [Grafana.com](https://grafana.com) account and go to your **Org Profile**. In the side menu there is a section for Grafana Enterprise licenses. At the bottom of the license details page there is **Download Token** link that will download the *license.jwt* file containing your license.
|
||||
To download your Grafana Enterprise license log in to your [Grafana Cloud Account](https://grafana.com) and go to your **Org Profile**. In the side menu there is a section for Grafana Enterprise licenses. At the bottom of the license details page there is **Download Token** link that will download the *license.jwt* file containing your license.
|
||||
|
||||
Place the *license.jwt* file in Grafana's data folder. This is usually located at `/var/lib/grafana/data` on Linux systems.
|
||||
Place the *license.jwt* file in Grafana's data folder. This is usually located at `/var/lib/grafana` on Linux systems.
|
||||
|
||||
You can also configure a custom location for the license file via the ini setting:
|
||||
|
||||
@@ -93,3 +87,22 @@ license_path = /company/secrets/license.jwt
|
||||
```
|
||||
|
||||
This setting can also be set with an environment variable, which is useful if you're running Grafana with Docker and have a custom volume where you have placed the license file. In this case, set the environment variable `GF_ENTERPRISE_LICENSE_PATH` to point to the location of your license file.
|
||||
|
||||
### Root URL
|
||||
|
||||
Update the [`root_url`](../administration/configuration/#root-url) in your configuration. It should be the URL that users type in their browsers to access the frontend, not the node hostname(s).
|
||||
|
||||
This is important, because as part of the validation checks at startup, Grafana compares the license URL to the [`root_url`](../administration/configuration/#root-url) in your configuration.
|
||||
|
||||
In your configuration file:
|
||||
|
||||
```
|
||||
[server]
|
||||
root_url = https://grafana.blah.com/
|
||||
```
|
||||
|
||||
Or with an environment variable:
|
||||
|
||||
```
|
||||
GF_SERVER_ROOT_URL=https://grafana.blah.com/
|
||||
```
|
||||
|
||||
218
docs/sources/enterprise/enterprise-configuration.md
Normal file
218
docs/sources/enterprise/enterprise-configuration.md
Normal file
@@ -0,0 +1,218 @@
|
||||
+++
|
||||
title = "Enterprise configuration"
|
||||
description = "Enterprise configuration documentation"
|
||||
keywords = ["grafana", "configuration", "documentation", "enterprise"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Enterprise configuration"
|
||||
identifier = "enterprise-config"
|
||||
parent = "enterprise"
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
# Grafana Enterprise configuration
|
||||
|
||||
This page describes Grafana Enterprise-specific configuration options that you can specify in a `.ini` configuration file or using environment variables. Refer to [Configuration]({{< relref "../administration/configuration.md" >}}) for more information about available configuration options.
|
||||
|
||||
## [white_labeling]
|
||||
|
||||
### app_title
|
||||
|
||||
Set to your company name to override application title.
|
||||
|
||||
### login_logo
|
||||
|
||||
Set to complete URL to override login logo.
|
||||
|
||||
### login_background
|
||||
|
||||
Set to complete CSS background expression to override login background. Example:
|
||||
|
||||
```bash
|
||||
[white_labeling]
|
||||
login_background = url(http://www.bhmpics.com/wallpapers/starfield-1920x1080.jpg)
|
||||
```
|
||||
|
||||
### menu_logo
|
||||
|
||||
Set to complete URL to override menu logo.
|
||||
|
||||
### fav_icon
|
||||
|
||||
Set to complete URL to override fav icon (icon shown in browser tab).
|
||||
|
||||
### apple_touch_icon
|
||||
|
||||
Set to complete URL to override Apple/iOS icon.
|
||||
|
||||
### footer_links
|
||||
|
||||
List the link IDs to use here. Grafana will look for matching link configurations, the link IDs should be space-separated and contain no whitespace.
|
||||
|
||||
## [meta_analytics]
|
||||
|
||||
### max_file_age
|
||||
|
||||
Max age for data files before they get deleted.
|
||||
|
||||
### max_data_directory_size
|
||||
|
||||
Max size in megabytes of the data files directory before files get deleted.
|
||||
|
||||
### data_path
|
||||
|
||||
The directory where events will be stored in.
|
||||
|
||||
## [analytics.summaries]
|
||||
|
||||
### buffer_write_interval
|
||||
|
||||
Interval for writing dashboard usage stats buffer to database.
|
||||
|
||||
### buffer_write_timeout
|
||||
|
||||
Timeout for writing dashboard usage stats buffer to database.
|
||||
|
||||
### rollup_interval
|
||||
|
||||
Interval for trying to roll up per dashboard usage summary. Only rolled up at most once per day.
|
||||
|
||||
### rollup_timeout
|
||||
|
||||
Timeout for trying to rollup per dashboard usage summary.
|
||||
|
||||
## [analytics.views]
|
||||
|
||||
### recent_users_age
|
||||
|
||||
Age for recent active users.
|
||||
|
||||
## [reporting]
|
||||
|
||||
### rendering_timeout
|
||||
|
||||
Timeout for each panel rendering request.
|
||||
|
||||
### concurrent_render_limit
|
||||
|
||||
Maximum number of concurrent calls to the rendering service.
|
||||
|
||||
### image_scale_factor
|
||||
|
||||
Scale factor for rendering images. Value `2` is enough for monitor resolutions, `4` would be better for printed material. Setting a higher value affects performance and memory.
|
||||
|
||||
## [auth.saml]
|
||||
|
||||
### enabled
|
||||
|
||||
If true, the feature is enabled. Defaults to false.
|
||||
|
||||
### certificate
|
||||
|
||||
Base64-encoded public X.509 certificate. Used to sign requests to the IdP.
|
||||
|
||||
### certificate_path
|
||||
|
||||
Path to the public X.509 certificate. Used to sign requests to the IdP.
|
||||
|
||||
### private_key
|
||||
|
||||
Base64-encoded private key. Used to decrypt assertions from the IdP.
|
||||
|
||||
### private_key_path
|
||||
|
||||
Path to the private key. Used to decrypt assertions from the IdP.
|
||||
|
||||
### idp_metadata
|
||||
|
||||
Base64-encoded IdP SAML metadata XML. Used to verify and obtain binding locations from the IdP.
|
||||
|
||||
### idp_metadata_path
|
||||
|
||||
Path to the SAML metadata XML. Used to verify and obtain binding locations from the IdP.
|
||||
|
||||
### idp_metadata_url
|
||||
|
||||
URL to fetch SAML IdP metadata. Used to verify and obtain binding locations from the IdP.
|
||||
|
||||
### max_issue_delay
|
||||
|
||||
Time since the IdP issued a response and the SP is allowed to process it. Defaults to 90 seconds.
|
||||
|
||||
### metadata_valid_duration
|
||||
|
||||
How long the SPs metadata is valid. Defaults to 48 hours.
|
||||
|
||||
### assertion_attribute_name
|
||||
|
||||
Friendly name or name of the attribute within the SAML assertion to use as the user name.
|
||||
|
||||
### assertion_attribute_login
|
||||
|
||||
Friendly name or name of the attribute within the SAML assertion to use as the user login handle.
|
||||
|
||||
### assertion_attribute_email
|
||||
|
||||
Friendly name or name of the attribute within the SAML assertion to use as the user email.
|
||||
|
||||
### assertion_attribute_groups
|
||||
|
||||
Friendly name or name of the attribute within the SAML assertion to use as the user groups.
|
||||
|
||||
### assertion_attribute_role
|
||||
|
||||
Friendly name or name of the attribute within the SAML assertion to use as the user roles.
|
||||
|
||||
### assertion_attribute_org
|
||||
|
||||
Friendly name or name of the attribute within the SAML assertion to use as the user organization.
|
||||
|
||||
### allowed_organizations
|
||||
|
||||
List of comma- or space-separated organizations. Each user must be a member of at least one organization to log in.
|
||||
|
||||
### org_mapping
|
||||
|
||||
List of comma- or space-separated Organization:OrgId mappings.
|
||||
|
||||
### role_values_editor
|
||||
|
||||
List of comma- or space-separated roles that will be mapped to the Editor role.
|
||||
|
||||
### role_values_admin
|
||||
|
||||
List of comma- or space-separated roles that will be mapped to the Admin role.
|
||||
|
||||
### role_values_grafana_admin
|
||||
|
||||
List of comma- or space-separated roles that will be mapped to the Grafana Admin (Super Admin) role.
|
||||
|
||||
## [keystore.vault]
|
||||
|
||||
### url
|
||||
|
||||
Location of the Vault server.
|
||||
|
||||
### namespace
|
||||
|
||||
Vault namespace if using Vault with multi-tenancy.
|
||||
|
||||
### auth_method
|
||||
|
||||
Method for authenticating towards Vault. Vault is inactive if this option is not set. Current possible values: `token`.
|
||||
|
||||
### token
|
||||
|
||||
Secret token to connect to Vault when auth_method is `token`.
|
||||
|
||||
### lease_renewal_interval
|
||||
|
||||
Time between checking if there are any secrets which needs to be renewed.
|
||||
|
||||
### lease_renewal_expires_within
|
||||
|
||||
Time until expiration for tokens which are renewed. Should have a value higher than lease_renewal_interval.
|
||||
|
||||
### lease_renewal_increment
|
||||
|
||||
New duration for renewed tokens. Vault may be configured to ignore this value and impose a stricter limit.
|
||||
@@ -8,7 +8,7 @@ parent = "enterprise"
|
||||
weight = 8
|
||||
+++
|
||||
|
||||
# License expiration
|
||||
# License expiration
|
||||
|
||||
If your license has expired most of Grafana keeps working as normal. Some enterprise functionality stops or runs with reduced functionality and Grafana displays a banner informing the users that Grafana is running on an expired license. Your Grafana admin needs to upload a new license file to restore full functionality.
|
||||
|
||||
@@ -16,13 +16,14 @@ If your license has expired most of Grafana keeps working as normal. Some enterp
|
||||
|
||||
## Update your license
|
||||
|
||||
1. Locate your current `license.jwt` file. In a standard installation it is stored inside Grafana's data directory, which on a typical Linux installation is in `/var/lib/grafana/data`. This location might be overridden in the ini file [Configuration](https://grafana.com/docs/grafana/latest/installation/configuration/)
|
||||
```
|
||||
[enterprise]
|
||||
license_path = /path/to/your/license.jwt
|
||||
```
|
||||
The configuration file's location may also be overridden by the `GF_ENTERPRISE_LICENSE_PATH` environment variable.
|
||||
2. Log in to your [Grafana.com](https://grafana.com/login) user and make sure you're in the correct organization in the dropdown at the top of the page.
|
||||
1. Locate your current `license.jwt` file. In a standard installation it is stored inside Grafana's data directory, which on a typical Linux installation is in `/var/lib/grafana/data`. This location might be overridden in the ini file [Configuration](https://grafana.com/docs/grafana/latest/administration/configuration/).
|
||||
```ini
|
||||
[enterprise]
|
||||
license_path = /path/to/your/license.jwt
|
||||
```
|
||||
The configuration file's location may also be overridden by the `GF_ENTERPRISE_LICENSE_PATH` environment variable.
|
||||
|
||||
2. Log in to your [Grafana Cloud Account](https://grafana.com/login) and make sure you're in the correct organization in the dropdown at the top of the page.
|
||||
3. Under the **Grafana Enterprise** section in the menu bar to the left, choose licenses and download the currently valid license with which you want to run Grafana. If you cannot see a valid license on Grafana.com, please contact your account manager at Grafana Labs to renew your subscription.
|
||||
4. Replace the current `license.jwt`-file with the one you've just downloaded.
|
||||
5. Restart Grafana.
|
||||
@@ -52,3 +53,7 @@ Enterprise plugins might stop working.
|
||||
## White labeling
|
||||
|
||||
The white labeling feature is turned off, meaning that any white labeling options will not have any effect.
|
||||
|
||||
## Usage insights
|
||||
|
||||
All the usage insights features are turned off, meaning that you won't be able to look at dashboard usage, presence indicator or to use improved search. Grafana still collects usage data and you will have access to it as soon as you update your license.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user