Compare commits
611 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
21bf8b71bc | ||
|
|
dcb8beecb1 | ||
|
|
64568a1938 | ||
|
|
9b3241a629 | ||
|
|
4bc6bf5e54 | ||
|
|
828ba74674 | ||
|
|
568bbf4ff7 | ||
|
|
17fc5251e1 | ||
|
|
b1d3fec9a8 | ||
|
|
12d3576666 | ||
|
|
476f9b6224 | ||
|
|
29c6fa4114 | ||
|
|
248f73a00f | ||
|
|
4fa2e9b90a | ||
|
|
04c2e41733 | ||
|
|
4c21a1e016 | ||
|
|
604a603e82 | ||
|
|
9dd964f503 | ||
|
|
338c2b738e | ||
|
|
5bc6a3505d | ||
|
|
3b5efdbc84 | ||
|
|
a3cea78f40 | ||
|
|
36f02aaef7 | ||
|
|
2aefb73876 | ||
|
|
94c374d187 | ||
|
|
6eb60b943a | ||
|
|
8c14a6e070 | ||
|
|
a069b5d639 | ||
|
|
49255fbb6a | ||
|
|
0c843ae8d2 | ||
|
|
52a5645c85 | ||
|
|
9ad66b7fed | ||
|
|
af10ba3f1f | ||
|
|
5c11bbdfb4 | ||
|
|
872bc2d973 | ||
|
|
cbace87b56 | ||
|
|
f59b9b6545 | ||
|
|
3ac81e50d7 | ||
|
|
0378c66dcd | ||
|
|
79de911d0a | ||
|
|
eecd09d1c8 | ||
|
|
14ae363aaa | ||
|
|
18a92cc540 | ||
|
|
cfb8912200 | ||
|
|
47c57a1b9d | ||
|
|
ce3f43c6d0 | ||
|
|
6717d43921 | ||
|
|
a951bab782 | ||
|
|
841e140f5b | ||
|
|
bbd2014e9d | ||
|
|
8ce48b98dc | ||
|
|
60419f7e72 | ||
|
|
38e4db88d1 | ||
|
|
d619c529f0 | ||
|
|
a8643d89be | ||
|
|
a7c52c7dc8 | ||
|
|
7ad14532a3 | ||
|
|
23f977f000 | ||
|
|
c172fe8915 | ||
|
|
ddeee1820d | ||
|
|
f28fd41c3b | ||
|
|
57fb967fec | ||
|
|
9046263122 | ||
|
|
2306826cff | ||
|
|
a0b04559e4 | ||
|
|
2732aca05c | ||
|
|
79255fafaf | ||
|
|
dfeee3dd4a | ||
|
|
e84a047a67 | ||
|
|
b2c235c46d | ||
|
|
cc2586d250 | ||
|
|
aba402f98e | ||
|
|
152059fec9 | ||
|
|
d2b08c8368 | ||
|
|
b087edc224 | ||
|
|
e762190616 | ||
|
|
7cbf3d8dab | ||
|
|
fef31acbf2 | ||
|
|
59469e14cf | ||
|
|
5af7b15c10 | ||
|
|
66d8871415 | ||
|
|
8bc4ef3e9c | ||
|
|
c738a889ed | ||
|
|
26f72ccc4e | ||
|
|
0e3a7b1a6f | ||
|
|
303bbb9900 | ||
|
|
e18d35add4 | ||
|
|
9ebd99d595 | ||
|
|
8616f1beac | ||
|
|
ca84829647 | ||
|
|
d40b66f1c1 | ||
|
|
5f3d913cec | ||
|
|
b398bc592b | ||
|
|
e7e0d18bc8 | ||
|
|
260239d98b | ||
|
|
72023d90bd | ||
|
|
71ffd1d108 | ||
|
|
6e412d88c9 | ||
|
|
d910f69b2c | ||
|
|
aa0982da56 | ||
|
|
20aac7f04b | ||
|
|
15b2bf3e5c | ||
|
|
1e2f7567f0 | ||
|
|
e64b5fd018 | ||
|
|
0f0374544f | ||
|
|
5a31e48548 | ||
|
|
0cfcc85dec | ||
|
|
451e9beaf0 | ||
|
|
1636e8873b | ||
|
|
23f3ec020a | ||
|
|
1a0df77b32 | ||
|
|
cc1d468041 | ||
|
|
43dbbe51f0 | ||
|
|
18fda3b8b4 | ||
|
|
1a9bf91542 | ||
|
|
c5da1864a6 | ||
|
|
f6130db03d | ||
|
|
29e9b1f774 | ||
|
|
76ba2db4e7 | ||
|
|
3f957a3735 | ||
|
|
dce4d184a1 | ||
|
|
a35b2ac463 | ||
|
|
29687903f8 | ||
|
|
32f055111c | ||
|
|
5c711bfb79 | ||
|
|
f56f54b1a3 | ||
|
|
16ded9fe6e | ||
|
|
54c9b11ae8 | ||
|
|
98bbdea69d | ||
|
|
2355d0901a | ||
|
|
f6c94b9c40 | ||
|
|
ba7d8c1a3d | ||
|
|
a1579283a6 | ||
|
|
492912845f | ||
|
|
d26075644c | ||
|
|
a6fac58088 | ||
|
|
45dc4a834e | ||
|
|
a0d43de761 | ||
|
|
d135f1229d | ||
|
|
6b3041d358 | ||
|
|
962d0f6a0e | ||
|
|
bcac76f5d4 | ||
|
|
abc806e17b | ||
|
|
1a810ebfe4 | ||
|
|
bb849d53bf | ||
|
|
8505d90768 | ||
|
|
108039af33 | ||
|
|
891b84e986 | ||
|
|
30eef76162 | ||
|
|
b6c75b10d1 | ||
|
|
27a77f588c | ||
|
|
4f0fa776be | ||
|
|
b0515f46cc | ||
|
|
35679d4689 | ||
|
|
cfba25630e | ||
|
|
a7509d2ca0 | ||
|
|
aada45a4cb | ||
|
|
77ec7afa2b | ||
|
|
0f0772b629 | ||
|
|
8a02fa7691 | ||
|
|
673ccdc448 | ||
|
|
c5f906f472 | ||
|
|
a3c99f4871 | ||
|
|
e9bcee30fa | ||
|
|
7521d2bba0 | ||
|
|
15fe58f193 | ||
|
|
53007e07e3 | ||
|
|
bb649489c8 | ||
|
|
bf18704490 | ||
|
|
0bf9e9bc28 | ||
|
|
7784b519a0 | ||
|
|
418cb9a8da | ||
|
|
91ea3b15fa | ||
|
|
3866f609ce | ||
|
|
fe61f6b7a7 | ||
|
|
baba1634b8 | ||
|
|
5321e7536f | ||
|
|
cd5d5bcbba | ||
|
|
cf2dd51827 | ||
|
|
d22e53bba8 | ||
|
|
1ba5ccb159 | ||
|
|
f7053e19d2 | ||
|
|
1c71637d11 | ||
|
|
34d9274c4c | ||
|
|
9492742812 | ||
|
|
386035da4d | ||
|
|
f774c4a076 | ||
|
|
b4fa27b8a4 | ||
|
|
8233c407a2 | ||
|
|
ee77e1a791 | ||
|
|
630f75d3ef | ||
|
|
eac66813ca | ||
|
|
f0764ceda8 | ||
|
|
90d20ec5af | ||
|
|
e78074992b | ||
|
|
f93f1c4b51 | ||
|
|
27a308a3a4 | ||
|
|
06dee734bd | ||
|
|
b8b618241e | ||
|
|
1ba072cd58 | ||
|
|
aa58a21833 | ||
|
|
8febceb67a | ||
|
|
1aa52f259c | ||
|
|
e550572033 | ||
|
|
cb3d91b53c | ||
|
|
512a42d2c6 | ||
|
|
d63ad9ac93 | ||
|
|
41fd265c64 | ||
|
|
534e343c71 | ||
|
|
e1acc77297 | ||
|
|
c1b707874d | ||
|
|
1764c2417f | ||
|
|
42032f6c03 | ||
|
|
85072b78a4 | ||
|
|
48a93a5bd3 | ||
|
|
ea934048f0 | ||
|
|
3667781e6f | ||
|
|
334b89f3ee | ||
|
|
649fa6789e | ||
|
|
355b906493 | ||
|
|
71411490bf | ||
|
|
de1e51448a | ||
|
|
4f10dca058 | ||
|
|
b630e57290 | ||
|
|
4835539248 | ||
|
|
e2375593fc | ||
|
|
57c8155971 | ||
|
|
d9e9843a10 | ||
|
|
36aad1c101 | ||
|
|
45b7de1910 | ||
|
|
545b72da33 | ||
|
|
8477104925 | ||
|
|
d0360de8f1 | ||
|
|
8740c66218 | ||
|
|
af2cd77655 | ||
|
|
e031cbb1a1 | ||
|
|
d0ba644355 | ||
|
|
bc10a69626 | ||
|
|
68f73b18fb | ||
|
|
bf79b97b6e | ||
|
|
15fed09c48 | ||
|
|
6ac53a1312 | ||
|
|
74924c8284 | ||
|
|
1de24cc929 | ||
|
|
7e8f4d0b0e | ||
|
|
31c59f3de9 | ||
|
|
3347b45a95 | ||
|
|
8d537b7afb | ||
|
|
6c2375e495 | ||
|
|
5addf9fafd | ||
|
|
b8c0924ab1 | ||
|
|
22ff0eab15 | ||
|
|
d98fa28287 | ||
|
|
392819c5d0 | ||
|
|
587e4009f3 | ||
|
|
104c2e3636 | ||
|
|
05d831df29 | ||
|
|
14b2dad9da | ||
|
|
6cad058018 | ||
|
|
75c1b73064 | ||
|
|
f33a917af2 | ||
|
|
88aab3e6c1 | ||
|
|
15547290c1 | ||
|
|
052d6984aa | ||
|
|
f1b675b12e | ||
|
|
0676189291 | ||
|
|
66b70b50b8 | ||
|
|
7aeba652c9 | ||
|
|
06347e3f86 | ||
|
|
f1845d8084 | ||
|
|
34aaa3d1f7 | ||
|
|
653e427433 | ||
|
|
10413c4aa5 | ||
|
|
5b3ff90377 | ||
|
|
2e60752258 | ||
|
|
34c1433ba4 | ||
|
|
ff422be961 | ||
|
|
05cb85feba | ||
|
|
26aa1f0cca | ||
|
|
475bd7ad09 | ||
|
|
8c089b98b3 | ||
|
|
e9079c3faa | ||
|
|
841cffbe9a | ||
|
|
331bc173cc | ||
|
|
f8fa140ad1 | ||
|
|
13073fa6ba | ||
|
|
7d21868931 | ||
|
|
cef328d1d6 | ||
|
|
4f1fffb948 | ||
|
|
842dde3dc9 | ||
|
|
71382ae7ed | ||
|
|
16f0e75448 | ||
|
|
664cb5f8f1 | ||
|
|
fcc74ad2b4 | ||
|
|
8283cd4b4c | ||
|
|
c91a20f822 | ||
|
|
1ff7496748 | ||
|
|
5baf070bc3 | ||
|
|
d28c5ff113 | ||
|
|
6de4933a4a | ||
|
|
e27ab89aed | ||
|
|
f65da93d72 | ||
|
|
c14398edc8 | ||
|
|
e5695b155b | ||
|
|
096b82027c | ||
|
|
fd2131c1e3 | ||
|
|
4dba02dd20 | ||
|
|
483415ac7c | ||
|
|
98bea0990f | ||
|
|
818972f11b | ||
|
|
e96f962076 | ||
|
|
1aa39ee458 | ||
|
|
1f73e2aadf | ||
|
|
c27262c50c | ||
|
|
06bf7e8ef1 | ||
|
|
b12dc890b8 | ||
|
|
cd39c2bd25 | ||
|
|
a187500c0e | ||
|
|
e69ec6ca53 | ||
|
|
4e1e0b9065 | ||
|
|
70e38ec352 | ||
|
|
8fd1931e1c | ||
|
|
3e73258c1a | ||
|
|
5a3c1dc6a4 | ||
|
|
34299a1bd2 | ||
|
|
e7ae220cde | ||
|
|
c1b74becce | ||
|
|
5568b32c9b | ||
|
|
34236ca1ae | ||
|
|
fe8b533497 | ||
|
|
32c9d558f9 | ||
|
|
8495af4c52 | ||
|
|
4698cef2a2 | ||
|
|
23510f95a3 | ||
|
|
72ee1b9a94 | ||
|
|
7d6bd78e0b | ||
|
|
75923c43d1 | ||
|
|
67d83d1ffc | ||
|
|
2d5dc5d6b2 | ||
|
|
3f48033b38 | ||
|
|
0e4850f203 | ||
|
|
26789d1eb6 | ||
|
|
83b402165d | ||
|
|
0c89b93ce0 | ||
|
|
f24b84faef | ||
|
|
1774b8f7e9 | ||
|
|
c530426506 | ||
|
|
6efadc9d79 | ||
|
|
bf0d87aaf6 | ||
|
|
5e34e061d5 | ||
|
|
1a2dad9d0c | ||
|
|
7665dcc867 | ||
|
|
36ff6d8635 | ||
|
|
8140c9bab7 | ||
|
|
5d6d5bf64d | ||
|
|
a3ab04c0de | ||
|
|
93ab0532c7 | ||
|
|
0e952d5e5f | ||
|
|
fc00d8336f | ||
|
|
caa3c6c9a5 | ||
|
|
a7f4e4c56a | ||
|
|
58cffde0f2 | ||
|
|
10d36b282b | ||
|
|
4ba5d946f2 | ||
|
|
4ad8b6f030 | ||
|
|
23327fcdea | ||
|
|
b4736558ac | ||
|
|
ab3df98523 | ||
|
|
6f4f327887 | ||
|
|
30771f25bf | ||
|
|
1d2a7a2c37 | ||
|
|
6f468c670a | ||
|
|
413be3a6a0 | ||
|
|
047abc87c2 | ||
|
|
a533e00622 | ||
|
|
2a44cbd137 | ||
|
|
ced13da889 | ||
|
|
4a25ec0d36 | ||
|
|
a9bf8f80e9 | ||
|
|
9d9f0e1b8c | ||
|
|
d8984d211c | ||
|
|
4a7c514727 | ||
|
|
cbd81ffeb8 | ||
|
|
827688f152 | ||
|
|
20fad92a80 | ||
|
|
87485e24a4 | ||
|
|
c4c031ef43 | ||
|
|
880fbcb09a | ||
|
|
62f0aca3e6 | ||
|
|
9a7a1b86ee | ||
|
|
178bb1d3ab | ||
|
|
4b8a50e70b | ||
|
|
2098b9eb44 | ||
|
|
5f72bfe6e7 | ||
|
|
ad33d95dd3 | ||
|
|
4c9cb415ec | ||
|
|
c43aa3485c | ||
|
|
7a710737ae | ||
|
|
e0229045f2 | ||
|
|
b111fee642 | ||
|
|
abc7893fdc | ||
|
|
6682a36b8a | ||
|
|
79c0fa4ca5 | ||
|
|
02bbdca604 | ||
|
|
fd2b39a3e9 | ||
|
|
d7c76dacad | ||
|
|
3289ee8b77 | ||
|
|
431bf2b179 | ||
|
|
700b93a75c | ||
|
|
a093fbb51a | ||
|
|
5cd4ffffe3 | ||
|
|
363bd1174a | ||
|
|
5a4465a382 | ||
|
|
2027e1aaee | ||
|
|
3f348287aa | ||
|
|
45259f4362 | ||
|
|
5710e52c11 | ||
|
|
31181c9981 | ||
|
|
aa9d00d019 | ||
|
|
64916cd7a9 | ||
|
|
e216044c75 | ||
|
|
74ac73716f | ||
|
|
a1605c58d9 | ||
|
|
899de7fe27 | ||
|
|
e68e93f595 | ||
|
|
87d19787b4 | ||
|
|
a7a9bcbcbb | ||
|
|
b1af28122b | ||
|
|
8b7cd15314 | ||
|
|
6c20dc6463 | ||
|
|
31408d4912 | ||
|
|
68944f8286 | ||
|
|
d571e29aac | ||
|
|
2e6974c7f8 | ||
|
|
0b7a5d4ed1 | ||
|
|
6eb7813565 | ||
|
|
cdb5e6a944 | ||
|
|
7cda134762 | ||
|
|
9b29842766 | ||
|
|
8894e2858c | ||
|
|
fcde26e2db | ||
|
|
67bfdaeb3c | ||
|
|
fad098c9d1 | ||
|
|
b3816a2727 | ||
|
|
71792d698b | ||
|
|
f2574f4944 | ||
|
|
130fb02b17 | ||
|
|
75f04c731f | ||
|
|
c5ff7fa580 | ||
|
|
02d7d00560 | ||
|
|
5cfc681175 | ||
|
|
116b6188a6 | ||
|
|
49dfb9a5d3 | ||
|
|
a538e67d4d | ||
|
|
d6ef02b3b3 | ||
|
|
616e2eb29f | ||
|
|
3c7cfbebe8 | ||
|
|
1751770394 | ||
|
|
29d27fbaf0 | ||
|
|
2929649fd4 | ||
|
|
21fed8c5f1 | ||
|
|
2f101d1db5 | ||
|
|
758201e862 | ||
|
|
e9f9912dea | ||
|
|
0a3662c359 | ||
|
|
4afd40018b | ||
|
|
1776c11fc6 | ||
|
|
1b8701d4c8 | ||
|
|
4a2104a1de | ||
|
|
c53ed5bbac | ||
|
|
cd07c3e652 | ||
|
|
514f2beafc | ||
|
|
665079dc8c | ||
|
|
65942efb95 | ||
|
|
a4a9715237 | ||
|
|
d17d82b3d0 | ||
|
|
fc3be40bc0 | ||
|
|
1bd0c87f66 | ||
|
|
e7f0bbf1ff | ||
|
|
b83fdd1a14 | ||
|
|
ac8aa4b300 | ||
|
|
05c951ead6 | ||
|
|
b16cb92b32 | ||
|
|
b7a3758799 | ||
|
|
17362b4180 | ||
|
|
2c2ed8371d | ||
|
|
31f4dea3d0 | ||
|
|
6c50feb252 | ||
|
|
cbdca6cce8 | ||
|
|
662e514f1d | ||
|
|
161f481f12 | ||
|
|
b028ffa21e | ||
|
|
de94298d3a | ||
|
|
ccc7f39b8a | ||
|
|
3fc5f4552a | ||
|
|
29b46f7a28 | ||
|
|
c6a9a83bf3 | ||
|
|
bccc5397f6 | ||
|
|
be6a4e806a | ||
|
|
d9abf01ce1 | ||
|
|
f78b3b1329 | ||
|
|
f47759b98e | ||
|
|
11304b14b6 | ||
|
|
569c81d07e | ||
|
|
2484b24c75 | ||
|
|
caff9146ea | ||
|
|
83fa91b1f4 | ||
|
|
bff08ab99f | ||
|
|
fcad439c29 | ||
|
|
37051cd844 | ||
|
|
0a080beffa | ||
|
|
4ddb113b79 | ||
|
|
013179eebc | ||
|
|
1cc1e545a0 | ||
|
|
231e620f95 | ||
|
|
c9645a96c6 | ||
|
|
4f4898a782 | ||
|
|
f05607d4c0 | ||
|
|
e33cf32b97 | ||
|
|
65bacf2df6 | ||
|
|
22edacd4a8 | ||
|
|
d630ac4b68 | ||
|
|
ea7ccda647 | ||
|
|
359416b89f | ||
|
|
e03d702d0c | ||
|
|
2079386a7d | ||
|
|
49685a92fd | ||
|
|
9f94e059cf | ||
|
|
6a4ad136dc | ||
|
|
cc21e3efbe | ||
|
|
d3d595a776 | ||
|
|
58b7958952 | ||
|
|
ec18e2bfc3 | ||
|
|
d1c523838b | ||
|
|
1b38d94537 | ||
|
|
432f36024b | ||
|
|
a30cc9e62c | ||
|
|
322c110b89 | ||
|
|
c2e401667c | ||
|
|
ca3dff99e8 | ||
|
|
af35e081c2 | ||
|
|
38d5abfadb | ||
|
|
99e635071e | ||
|
|
785584a690 | ||
|
|
4b8249341c | ||
|
|
836cf8e639 | ||
|
|
d02f4ea64b | ||
|
|
90b41e86f2 | ||
|
|
5ecc12505f | ||
|
|
c9309edbb0 | ||
|
|
7a8c6a9b54 | ||
|
|
e7e416cf8a | ||
|
|
4f6b49bc70 | ||
|
|
3f144bdd05 | ||
|
|
82f4fc2783 | ||
|
|
85b7ddefc0 | ||
|
|
886bad2fd5 | ||
|
|
eadf324062 | ||
|
|
de9ea829a4 | ||
|
|
ef4d98b441 | ||
|
|
dfa2f3d2fb | ||
|
|
e0a2d4beac | ||
|
|
1248457fee | ||
|
|
f1c8330877 | ||
|
|
d4e013fd44 | ||
|
|
d602da20f6 | ||
|
|
e60f7d008e | ||
|
|
5b84a3cd53 | ||
|
|
da1df02813 | ||
|
|
860411cb4d | ||
|
|
073e9ef9e7 | ||
|
|
771ee549fb | ||
|
|
4483bcadec | ||
|
|
2ca1cc5645 | ||
|
|
00bef917ee | ||
|
|
1f018adbf3 | ||
|
|
e9668fd251 | ||
|
|
d46690ddc9 | ||
|
|
4260cd548f | ||
|
|
17fe704ae8 | ||
|
|
5b42bb58f6 | ||
|
|
9e0499000c | ||
|
|
e9f9f628ea | ||
|
|
85b371a02a | ||
|
|
17724e9f84 | ||
|
|
adc84c6ac5 | ||
|
|
822b0b2708 | ||
|
|
b8029dcd4e | ||
|
|
6959cf77ca | ||
|
|
3a8cd7b76c | ||
|
|
6d70545c07 | ||
|
|
2850419470 | ||
|
|
9f81fcdd2f | ||
|
|
08fcff107d | ||
|
|
ceb7f51b40 | ||
|
|
ff47238b26 | ||
|
|
fa91462d53 | ||
|
|
b756aa0bb1 | ||
|
|
78520ac3d1 | ||
|
|
c941718a5f | ||
|
|
a08c2c43db | ||
|
|
6f3f0bf3e0 | ||
|
|
422a94707d | ||
|
|
9fa18a2df5 | ||
|
|
dd6f5efabe | ||
|
|
8430a182ef | ||
|
|
767c672a2f | ||
|
|
7e96a57c37 | ||
|
|
4d741ea387 | ||
|
|
26c030667a | ||
|
|
f0ccfd9ed6 |
@@ -1,3 +1,5 @@
|
||||
version: 2.1
|
||||
|
||||
aliases:
|
||||
# Workflow filters
|
||||
- &filter-only-release
|
||||
@@ -14,12 +16,10 @@ aliases:
|
||||
branches:
|
||||
only: master
|
||||
|
||||
version: 2
|
||||
|
||||
jobs:
|
||||
mysql-integration-test:
|
||||
docker:
|
||||
- image: circleci/golang:1.13.1
|
||||
- image: circleci/golang:1.13.4
|
||||
- image: circleci/mysql:5.6-ram
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
@@ -29,6 +29,9 @@ jobs:
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run: sudo apt update
|
||||
- run: sudo apt install -y default-mysql-client
|
||||
- run: dockerize -wait tcp://127.0.0.1:3306 -timeout 120s
|
||||
@@ -36,10 +39,18 @@ jobs:
|
||||
- run:
|
||||
name: mysql integration tests
|
||||
command: './scripts/circle-test-mysql.sh'
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
postgres-integration-test:
|
||||
docker:
|
||||
- image: circleci/golang:1.13.1
|
||||
- image: circleci/golang:1.13.4
|
||||
- image: circleci/postgres:9.3-ram
|
||||
environment:
|
||||
POSTGRES_USER: grafanatest
|
||||
@@ -48,6 +59,9 @@ jobs:
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run: sudo apt update
|
||||
- run: sudo apt install -y postgresql-client
|
||||
- run: dockerize -wait tcp://127.0.0.1:5432 -timeout 120s
|
||||
@@ -55,28 +69,50 @@ jobs:
|
||||
- run:
|
||||
name: postgres integration tests
|
||||
command: './scripts/circle-test-postgres.sh'
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
cache-server-test:
|
||||
docker:
|
||||
- image: circleci/golang:1.13.1
|
||||
- image: circleci/golang:1.13.4
|
||||
- image: circleci/redis:4-alpine
|
||||
- image: memcached
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run: dockerize -wait tcp://127.0.0.1:11211 -timeout 120s
|
||||
- run: dockerize -wait tcp://127.0.0.1:6379 -timeout 120s
|
||||
- run:
|
||||
name: cache server tests
|
||||
command: './scripts/circle-test-cache-servers.sh'
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
end-to-end-test:
|
||||
docker:
|
||||
- image: circleci/node:10-browsers
|
||||
- image: circleci/node:12-browsers
|
||||
- image: grafana/grafana-dev:master-$CIRCLE_SHA1
|
||||
steps:
|
||||
- run: dockerize -wait tcp://127.0.0.1:3000 -timeout 120s
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "yarn.lock" }}
|
||||
- run:
|
||||
@@ -89,22 +125,36 @@ jobs:
|
||||
- node_modules
|
||||
- run:
|
||||
name: run end-to-end tests
|
||||
command: 'env BASE_URL=http://127.0.0.1:3000 yarn e2e-tests'
|
||||
command: 'env BASE_URL=http://127.0.0.1:3000 yarn e2e-tests:ci'
|
||||
no_output_timeout: 5m
|
||||
- store_artifacts:
|
||||
path: public/e2e-test/screenShots/theTruth
|
||||
path: public/e2e-tests/screenShots/theTruth
|
||||
destination: expected-screenshots
|
||||
- store_artifacts:
|
||||
path: public/e2e-test/screenShots/theOutput
|
||||
path: public/e2e-tests/screenShots/theOutput
|
||||
destination: output-screenshots
|
||||
- store_artifacts:
|
||||
path: public/e2e-tests/videos
|
||||
destination: output-videos
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
end-to-end-test-release:
|
||||
docker:
|
||||
- image: circleci/node:10-browsers
|
||||
- image: circleci/node:12-browsers
|
||||
- image: grafana/grafana-dev:$CIRCLE_TAG
|
||||
steps:
|
||||
- run: dockerize -wait tcp://127.0.0.1:3000 -timeout 120s
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "yarn.lock" }}
|
||||
- run:
|
||||
@@ -117,14 +167,25 @@ jobs:
|
||||
- node_modules
|
||||
- run:
|
||||
name: run end-to-end tests
|
||||
command: 'env BASE_URL=http://127.0.0.1:3000 yarn e2e-tests'
|
||||
command: 'env BASE_URL=http://127.0.0.1:3000 yarn e2e-tests:ci'
|
||||
no_output_timeout: 5m
|
||||
- store_artifacts:
|
||||
path: public/e2e-test/screenShots/theTruth
|
||||
path: public/e2e-tests/screenShots/theTruth
|
||||
destination: expected-screenshots
|
||||
- store_artifacts:
|
||||
path: public/e2e-test/screenShots/theOutput
|
||||
path: public/e2e-tests/screenShots/theOutput
|
||||
destination: output-screenshots
|
||||
- store_artifacts:
|
||||
path: public/e2e-tests/videos
|
||||
destination: output-videos
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
codespell:
|
||||
docker:
|
||||
@@ -144,7 +205,7 @@ jobs:
|
||||
|
||||
lint-go:
|
||||
docker:
|
||||
- image: circleci/golang:1.13.1
|
||||
- image: circleci/golang:1.13.4
|
||||
environment:
|
||||
# we need CGO because of go-sqlite3
|
||||
CGO_ENABLED: 1
|
||||
@@ -166,9 +227,12 @@ jobs:
|
||||
|
||||
test-frontend:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "yarn.lock" }}
|
||||
- run:
|
||||
@@ -182,26 +246,51 @@ jobs:
|
||||
- run:
|
||||
name: frontend tests
|
||||
command: './scripts/circle-test-frontend.sh'
|
||||
- store_test_results:
|
||||
path: reports/junit
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
test-backend:
|
||||
docker:
|
||||
- image: circleci/golang:1.13.1
|
||||
- image: circleci/golang:1.13.4
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run:
|
||||
name: build backend and run go tests
|
||||
command: './scripts/circle-test-backend.sh'
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
|
||||
build-all:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.11
|
||||
- image: grafana/build-container:1.2.13
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: prepare build tools
|
||||
command: '/tmp/bootstrap.sh'
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- restore_cache:
|
||||
key: phantomjs-binaries-{{ checksum "scripts/build/download-phantomjs.sh" }}
|
||||
- run:
|
||||
@@ -236,13 +325,24 @@ jobs:
|
||||
- scripts/*.sh
|
||||
- scripts/build/release_publisher/release_publisher
|
||||
- scripts/build/publish.sh
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
build:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.11
|
||||
- image: grafana/build-container:1.2.13
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run:
|
||||
name: prepare build tools
|
||||
command: '/tmp/bootstrap.sh'
|
||||
@@ -265,16 +365,27 @@ jobs:
|
||||
root: .
|
||||
paths:
|
||||
- dist/*
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
build-fast-backend:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.11
|
||||
- image: grafana/build-container:1.2.13
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: prepare build tools
|
||||
command: '/tmp/bootstrap.sh'
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run:
|
||||
name: build grafana backend
|
||||
command: './scripts/build/build.sh --fast --backend-only'
|
||||
@@ -282,16 +393,27 @@ jobs:
|
||||
root: .
|
||||
paths:
|
||||
- bin/*
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
build-fast-frontend:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.11
|
||||
- image: grafana/build-container:1.2.13
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: prepare build tools
|
||||
command: '/tmp/bootstrap.sh'
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- restore_cache:
|
||||
key: frontend-dependency-cache-{{ checksum "yarn.lock" }}
|
||||
- run:
|
||||
@@ -306,13 +428,58 @@ jobs:
|
||||
paths:
|
||||
- public/build/*
|
||||
- tools/phantomjs/*
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
build-docs-website:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.13
|
||||
working_directory: /docs
|
||||
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: |
|
||||
# https://circleci.com/docs/2.0/building-docker-images/#mounting-folders
|
||||
# create a dummy container which will hold a volume with config
|
||||
docker create -v /hugo/content/docs/grafana --name docs-website alpine:3.4 /bin/true
|
||||
# copy a config file into this volume
|
||||
docker cp ${PWD}/docs/sources docs-website:/hugo/content/docs/grafana/latest
|
||||
# start an application container using this volume
|
||||
docker run --volumes-from docs-website --rm -it grafana/docs-base:latest /bin/bash -c 'npm i && make prod'
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: 'docker stop docs-website && docker rm docs-website && ./scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: 'docker stop docs-website && docker rm docs-website && ./scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
build-fast-package:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.11
|
||||
- image: grafana/build-container:1.2.13
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- restore_cache:
|
||||
@@ -333,13 +500,24 @@ jobs:
|
||||
root: /go/src/github.com/grafana/grafana
|
||||
paths:
|
||||
- dist/*
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
build-fast-save:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.11
|
||||
- image: grafana/build-container:1.2.13
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- restore_cache:
|
||||
@@ -379,12 +557,23 @@ jobs:
|
||||
root: .
|
||||
paths:
|
||||
- dist/*
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
grafana-docker-master:
|
||||
machine:
|
||||
image: circleci/classic:201808-01
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run: docker info
|
||||
@@ -394,12 +583,23 @@ jobs:
|
||||
- run: rm packaging/docker/grafana-latest.linux-*.tar.gz
|
||||
- run: cp enterprise-dist/grafana-enterprise-*.linux-amd64-musl.tar.gz packaging/docker/grafana-latest.linux-x64-musl.tar.gz
|
||||
- run: cd packaging/docker && ./build-enterprise.sh "master"
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
grafana-docker-ubuntu-master:
|
||||
machine:
|
||||
image: circleci/classic:201808-01
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run: docker info
|
||||
@@ -409,36 +609,69 @@ jobs:
|
||||
- run: rm packaging/docker/grafana-latest.linux-*.tar.gz
|
||||
- run: cp enterprise-dist/grafana-enterprise-*.linux-amd64.tar.gz packaging/docker/grafana-latest.linux-x64.tar.gz
|
||||
- run: cd packaging/docker && ./build-enterprise.sh --ubuntu "master"
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
grafana-docker-pr:
|
||||
machine:
|
||||
image: circleci/classic:201808-01
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run: docker info
|
||||
- run: docker run --privileged linuxkit/binfmt:v0.6
|
||||
- run: cp dist/grafana-latest.linux-*.tar.gz packaging/docker
|
||||
- run: cd packaging/docker && ./build.sh --fast "${CIRCLE_SHA1}"
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
grafana-docker-ubuntu-pr:
|
||||
machine:
|
||||
image: circleci/classic:201808-01
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run: docker info
|
||||
- run: docker run --privileged linuxkit/binfmt:v0.6
|
||||
- run: cp dist/grafana-latest.linux-*.tar.gz packaging/docker
|
||||
- run: cd packaging/docker && ./build.sh --fast --ubuntu "${CIRCLE_SHA1}"
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
grafana-docker-release:
|
||||
machine:
|
||||
image: circleci/classic:201808-01
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run: docker info
|
||||
@@ -448,12 +681,23 @@ jobs:
|
||||
- run: rm packaging/docker/grafana-latest.linux-*.tar.gz
|
||||
- run: cp enterprise-dist/grafana-enterprise-*.linux-amd64-musl.tar.gz packaging/docker/grafana-latest.linux-x64-musl.tar.gz
|
||||
- run: cd packaging/docker && ./build-enterprise.sh "${CIRCLE_TAG}"
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
grafana-docker-ubuntu-release:
|
||||
machine:
|
||||
image: circleci/classic:201808-01
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run: docker info
|
||||
@@ -463,16 +707,27 @@ jobs:
|
||||
- run: rm packaging/docker/grafana-latest.linux-*.tar.gz
|
||||
- run: cp enterprise-dist/grafana-enterprise-*.linux-amd64.tar.gz packaging/docker/grafana-latest.linux-x64.tar.gz
|
||||
- run: cd packaging/docker && ./build-enterprise.sh --ubuntu "${CIRCLE_TAG}"
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
build-enterprise:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.11
|
||||
- image: grafana/build-container:1.2.13
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: prepare build tools
|
||||
command: '/tmp/bootstrap.sh'
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run:
|
||||
name: checkout enterprise
|
||||
command: './scripts/build/prepare-enterprise.sh'
|
||||
@@ -498,16 +753,27 @@ jobs:
|
||||
root: .
|
||||
paths:
|
||||
- enterprise-dist/*
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
build-all-enterprise:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.11
|
||||
- image: grafana/build-container:1.2.13
|
||||
working_directory: /go/src/github.com/grafana/grafana
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: prepare build tools
|
||||
command: '/tmp/bootstrap.sh'
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run:
|
||||
name: checkout enterprise
|
||||
command: './scripts/build/prepare-enterprise.sh'
|
||||
@@ -545,10 +811,18 @@ jobs:
|
||||
root: .
|
||||
paths:
|
||||
- enterprise-dist/*
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
deploy-enterprise-master:
|
||||
docker:
|
||||
- image: grafana/grafana-ci-deploy:1.2.2
|
||||
- image: grafana/grafana-ci-deploy:1.2.3
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
@@ -570,9 +844,12 @@ jobs:
|
||||
|
||||
deploy-enterprise-release:
|
||||
docker:
|
||||
- image: grafana/grafana-ci-deploy:1.2.2
|
||||
- image: grafana/grafana-ci-deploy:1.2.3
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
@@ -605,11 +882,19 @@ jobs:
|
||||
- run:
|
||||
name: Publish RPM repository
|
||||
command: './scripts/build/update_repo/publish-rpm.sh "enterprise" "$CIRCLE_TAG"'
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
|
||||
deploy-master:
|
||||
docker:
|
||||
- image: grafana/grafana-ci-deploy:1.2.2
|
||||
- image: grafana/grafana-ci-deploy:1.2.3
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
@@ -633,9 +918,12 @@ jobs:
|
||||
|
||||
deploy-release:
|
||||
docker:
|
||||
- image: grafana/grafana-ci-deploy:1.2.2
|
||||
- image: grafana/grafana-ci-deploy:1.2.3
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
@@ -668,12 +956,23 @@ jobs:
|
||||
- run:
|
||||
name: Publish RPM repository
|
||||
command: './scripts/build/update_repo/publish-rpm.sh "oss" "$CIRCLE_TAG"'
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
build-oss-msi:
|
||||
docker:
|
||||
- image: grafana/wix-toolset-ci:v3
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
@@ -684,52 +983,83 @@ jobs:
|
||||
paths:
|
||||
- dist/grafana-*.msi
|
||||
- dist/grafana-*.msi.sha256
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
build-ee-msi:
|
||||
docker:
|
||||
- image: grafana/wix-toolset-ci:v3
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Build EE MSI
|
||||
command: './scripts/build/ci-msi-build/ci-msi-build-ee.sh'
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- enterprise-dist/grafana-*.msi
|
||||
- enterprise-dist/grafana-*.msi.sha256
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
store-build-artifacts:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- store_artifacts:
|
||||
path: ./dist
|
||||
|
||||
trigger-docs-update:
|
||||
build-grafana-packages:
|
||||
docker:
|
||||
- image: circleci/python:3.6.8
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: Trigger Docs update
|
||||
command: |
|
||||
if git diff --name-only HEAD^ | grep -q "^docs"; then
|
||||
echo "Build URL:"
|
||||
curl -s -u "$DOCS_CIRCLE_TOKEN:" \
|
||||
-d build_parameters[CIRCLE_JOB]=pull-submodule-changes \
|
||||
https://circleci.com/api/v1.1/project/github/grafana/docs.grafana.com/tree/master \
|
||||
| jq .build_url
|
||||
else
|
||||
echo "-- no changes to docs files --"
|
||||
fi
|
||||
|
||||
build-grafana-packages:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
steps:
|
||||
- checkout
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run:
|
||||
name: Boostrap lerna
|
||||
command: 'npx lerna bootstrap'
|
||||
- run:
|
||||
name: Build packages
|
||||
command: yarn packages:build
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
|
||||
release-next-packages:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run:
|
||||
name: Boostrap lerna
|
||||
command: 'npx lerna bootstrap'
|
||||
@@ -739,12 +1069,23 @@ jobs:
|
||||
- run:
|
||||
name: Release next packages
|
||||
command: './scripts/circle-release-next-packages.sh'
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
release-packages:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: ci job started
|
||||
command: './scripts/ci-job-started.sh'
|
||||
- run:
|
||||
name: Boostrap lerna
|
||||
command: 'npx lerna bootstrap'
|
||||
@@ -754,6 +1095,14 @@ jobs:
|
||||
- run:
|
||||
name: Release packages
|
||||
command: ./scripts/build/release-packages.sh "${CIRCLE_TAG}"
|
||||
- run:
|
||||
name: ci job failed
|
||||
command: './scripts/ci-job-failed.sh'
|
||||
when: on_fail
|
||||
- run:
|
||||
name: ci job succeeded
|
||||
command: './scripts/ci-job-succeeded.sh'
|
||||
when: on_success
|
||||
|
||||
scan-docker-master:
|
||||
docker:
|
||||
@@ -783,7 +1132,6 @@ jobs:
|
||||
- $HOME/.cache/trivy
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build-master:
|
||||
jobs:
|
||||
- build-all:
|
||||
@@ -851,6 +1199,7 @@ workflows:
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- build-all-enterprise
|
||||
- build-ee-msi
|
||||
filters: *filter-only-master
|
||||
- build-oss-msi:
|
||||
requires:
|
||||
@@ -863,14 +1212,21 @@ workflows:
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
filters: *filter-only-master
|
||||
- build-ee-msi:
|
||||
requires:
|
||||
- build-all-enterprise
|
||||
- test-backend
|
||||
- test-frontend
|
||||
- codespell
|
||||
- lint-go
|
||||
- shellcheck
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
filters: *filter-only-master
|
||||
- end-to-end-test:
|
||||
requires:
|
||||
- grafana-docker-master
|
||||
filters: *filter-only-master
|
||||
- trigger-docs-update:
|
||||
requires:
|
||||
- end-to-end-test
|
||||
filters: *filter-only-master
|
||||
- release-next-packages:
|
||||
requires:
|
||||
- build-all
|
||||
@@ -920,6 +1276,7 @@ workflows:
|
||||
- shellcheck
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- build-ee-msi
|
||||
filters: *filter-only-release
|
||||
- grafana-docker-release:
|
||||
requires:
|
||||
@@ -968,6 +1325,17 @@ workflows:
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
filters: *filter-only-release
|
||||
- build-ee-msi:
|
||||
requires:
|
||||
- build-all-enterprise
|
||||
- test-backend
|
||||
- test-frontend
|
||||
- codespell
|
||||
- lint-go
|
||||
- shellcheck
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
filters: *filter-only-release
|
||||
- end-to-end-test-release:
|
||||
requires:
|
||||
- grafana-docker-release
|
||||
@@ -1038,6 +1406,8 @@ workflows:
|
||||
- postgres-integration-test
|
||||
- cache-server-test
|
||||
filters: *filter-not-release-or-master
|
||||
- build-docs-website:
|
||||
filters: *filter-not-release-or-master
|
||||
nightly:
|
||||
triggers:
|
||||
- schedule:
|
||||
|
||||
16
.github/CODEOWNERS
vendored
Normal file
16
.github/CODEOWNERS
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# Lines starting with '#' are comments.
|
||||
# Each line is a file pattern followed by one or more owners.
|
||||
|
||||
# More details are here: https://help.github.com/articles/about-codeowners/
|
||||
|
||||
# The '*' pattern is global owners.
|
||||
|
||||
# Order is important. The last matching pattern has the most precedence.
|
||||
# The folders are ordered as follows:
|
||||
|
||||
# In each subsection folders are ordered first by depth, then alphabetically.
|
||||
# This should make it easy to add new rules without breaking existing ones.
|
||||
|
||||
# Documentation owner: Diana Payton
|
||||
/docs/ @oddlittlebird
|
||||
/contribute/ @oddlittlebird @marcusolsson
|
||||
14
.github/ISSUE_TEMPLATE/4-question.md
vendored
14
.github/ISSUE_TEMPLATE/4-question.md
vendored
@@ -1,14 +0,0 @@
|
||||
---
|
||||
name: Support request
|
||||
about: 'Question or support request relating to using Grafana'
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
---
|
||||
|
||||
STOP -- PLEASE READ!
|
||||
|
||||
GitHub is not the right place for questions and support requests.
|
||||
|
||||
Please ask questions on our community site: [https://community.grafana.com/](https://community.grafana.com/)
|
||||
|
||||
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
5
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Questions & Help
|
||||
url: https://community.grafana.com
|
||||
about: Please ask and answer questions here.
|
||||
7
.github/actions/gha-publish-to-git/Dockerfile
vendored
Normal file
7
.github/actions/gha-publish-to-git/Dockerfile
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM alpine
|
||||
RUN apk update
|
||||
RUN apk add rsync git bash
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
|
||||
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]
|
||||
21
.github/actions/gha-publish-to-git/LICENSE
vendored
Normal file
21
.github/actions/gha-publish-to-git/LICENSE
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 Sean Middleditch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
60
.github/actions/gha-publish-to-git/README.md
vendored
Normal file
60
.github/actions/gha-publish-to-git/README.md
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
publish-to-git
|
||||
==============
|
||||
|
||||
[GitHub Action](https://github.com/features/actions) for publishing a directory
|
||||
and its contents to another git repository.
|
||||
|
||||
This can be especially useful for publishing static website, such as with
|
||||
[GitHub Pages](https://pages.github.com/), from built files in other job
|
||||
steps, such as [Doxygen](http://www.doxygen.nl/) generated HTML files.
|
||||
|
||||
**NOTE**: GitHub currently requires the use of a Personal Access Token for
|
||||
pushing to other repositories. Pushing to the current repository should work
|
||||
with the always-available GitHub Token (available via
|
||||
`{{ secrets.GITHUB_TOKEN }}`. If pushing to another repository, a Personal
|
||||
Access Token will need to be [created](https://help.github.com/en/articles/creating-a-personal-access-token-for-the-command-line) and assigned to the
|
||||
workflow [secrets](https://help.github.com/en/articles/virtual-environments-for-github-actions#creating-and-using-secrets-encrypted-variables).
|
||||
|
||||
Inputs
|
||||
------
|
||||
|
||||
- `repository`: Destination repository (default: current repository).
|
||||
- `branch`: Destination branch (required).
|
||||
- `host`: Destination git host (default: `github.com`).
|
||||
- `github_token`: GitHub Token (required; use `secrets.GITHUB_TOKEN`).
|
||||
- `github_pat`: Personal Access Token or other https credentials.
|
||||
- `source_folder`: Source folder in workspace to copy (default: workspace root).
|
||||
- `target_folder`: Target folder in destination branch to copy to (default: repository root).
|
||||
- `commit_author`: Override commit author (default: `{github.actor}@users.noreply.github.com`).
|
||||
- `commit_message`: Set commit message (default: `[workflow] Publish from [repository]:[branch]/[folder]`).
|
||||
- `dry_run`: Does not push if non-empty (default: empty).
|
||||
- `working_directory`: Location to checkout repository (default: random location in `${HOME}`)
|
||||
|
||||
Outputs
|
||||
-------
|
||||
|
||||
- `commit_hash`: SHA hash of the new commit.
|
||||
- `working_directory`: Working directory of git clone of repository.
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
MIT License. See [LICENSE](LICENSE) for details.
|
||||
|
||||
Usage Example
|
||||
-------------
|
||||
|
||||
```yaml
|
||||
jobs:
|
||||
publish:
|
||||
- uses: actions/checkout@master
|
||||
- run: |
|
||||
sh scripts/build-doxygen-html.sh --out static/html
|
||||
- uses: seanmiddleditch/gha-publish-to-git@master
|
||||
with:
|
||||
branch: gh-pages
|
||||
github_token: '${{ secrets.GITHUB_TOKEN }}'
|
||||
github_pat: '${{ secrets.GH_PAT }}'
|
||||
source_folder: static/html
|
||||
if: success() && github.event == 'push'
|
||||
```
|
||||
60
.github/actions/gha-publish-to-git/action.yml
vendored
Normal file
60
.github/actions/gha-publish-to-git/action.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
---
|
||||
name: publish-to-git
|
||||
description: 'Publish files to a git repository'
|
||||
branding:
|
||||
icon: 'git-commit'
|
||||
color: 'blue'
|
||||
inputs:
|
||||
repository:
|
||||
description: 'Destination repository (default: current repository)'
|
||||
default: ''
|
||||
branch:
|
||||
description: 'Destination branch'
|
||||
required: true
|
||||
host:
|
||||
description: 'Destination git host'
|
||||
default: 'github.com'
|
||||
github_token:
|
||||
description: 'GitHub Token (use `secrets.GITHUB_TOKEN`)'
|
||||
required: true
|
||||
github_pat:
|
||||
description: 'Personal Access Token or other https credentials'
|
||||
default: ''
|
||||
source_folder:
|
||||
description: 'Source folder in workspace to copy (default: workspace root)'
|
||||
defaault: ''
|
||||
target_folder:
|
||||
description: 'Target folder in destination branch to copy to (default: repository root)'
|
||||
default: ''
|
||||
commit_author:
|
||||
description: 'User Name <email@address> (default: [github.actor]@users.noreply.github.com)'
|
||||
default: ''
|
||||
commit_message:
|
||||
description: 'Commit message (default: [workflow] Publish from [repository]:[branch]/[folder])'
|
||||
default: ''
|
||||
dry_run:
|
||||
description: 'Do not push to repository (set to non-empty string to make dry-run)'
|
||||
default: ''
|
||||
working_directory:
|
||||
description: 'Working directory for clone (default: random location in `${HOME}`)'
|
||||
default: ''
|
||||
outputs:
|
||||
commit_hash:
|
||||
description: 'Hash of the new commit'
|
||||
working_directory:
|
||||
description: 'Working directory of temporary repository'
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
||||
args:
|
||||
- ${{ inputs.repository }}
|
||||
- ${{ inputs.branch }}
|
||||
- ${{ inputs.host }}
|
||||
- ${{ inputs.github_token }}
|
||||
- ${{ inputs.github_pat }}
|
||||
- ${{ inputs.source_folder }}
|
||||
- ${{ inputs.target_folder }}
|
||||
- ${{ inputs.commit_author }}
|
||||
- ${{ inputs.commit_message }}
|
||||
- ${{ inputs.dry_run }}
|
||||
- ${{ inputs.working_directory }}
|
||||
99
.github/actions/gha-publish-to-git/entrypoint.sh
vendored
Normal file
99
.github/actions/gha-publish-to-git/entrypoint.sh
vendored
Normal file
@@ -0,0 +1,99 @@
|
||||
#/bin/bash
|
||||
|
||||
# Name the Docker inputs.
|
||||
#
|
||||
INPUT_REPOSITORY="$1"
|
||||
INPUT_BRANCH="$2"
|
||||
INPUT_HOST="$3"
|
||||
INPUT_GITHUB_TOKEN="$4"
|
||||
INPUT_GITHUB_PAT="$5"
|
||||
INPUT_SOURCE_FOLDER="$6"
|
||||
INPUT_TARGET_FOLDER="$7"
|
||||
INPUT_COMMIT_AUTHOR="$8"
|
||||
INPUT_COMMIT_MESSAGE="$9"
|
||||
INPUT_DRYRUN="${10}"
|
||||
INPUT_WORKDIR="${11}"
|
||||
|
||||
# Check for required inputs.
|
||||
#
|
||||
[ -z "$INPUT_BRANCH" ] && echo >&2 "::error::'branch' is required" && exit 1
|
||||
[ -z "$INPUT_GITHUB_TOKEN" -a -z "$INPUT_GITHUB_PAT" ] && echo >&2 "::error::'github_token' or 'github_pat' is required" && exit 1
|
||||
|
||||
# Set state from inputs or defaults.
|
||||
#
|
||||
REPOSITORY="${INPUT_REPOSITORY:-${GITHUB_REPOSITORY}}"
|
||||
BRANCH="${INPUT_BRANCH}"
|
||||
HOST="${INPUT_GIT_HOST:-github.com}"
|
||||
TOKEN="${INPUT_GITHUB_PAT:-${INPUT_GITHUB_TOKEN}}"
|
||||
REMOTE="${INPUT_REMOTE:-https://${TOKEN}@${HOST}/${REPOSITORY}.git}"
|
||||
|
||||
SOURCE_FOLDER="${INPUT_SOURCE_FOLDER:-.}"
|
||||
TARGET_FOLDER="${INPUT_TARGET_FOLDER}"
|
||||
|
||||
REF="${GITHUB_BASE_REF:-${GITHUB_REF}}"
|
||||
REF_BRANCH=$(echo "${REF}" | rev | cut -d/ -f1 | rev)
|
||||
[ -z "$REF_BRANCH" ] && echo 2>&1 "No ref branch" && exit 1
|
||||
|
||||
COMMIT_AUTHOR="${INPUT_AUTHOR:-${GITHUB_ACTOR} <${GITHUB_ACTOR}@users.noreply.github.com>}"
|
||||
COMMIT_MESSAGE="${INPUT_COMMIT_MESSAGE:-[${GITHUB_WORKFLOW}] Publish from ${GITHUB_REPOSITORY}:${REF_BRANCH}/${SOURCE_FOLDER}}"
|
||||
|
||||
# Calculate the real source path.
|
||||
#
|
||||
SOURCE_PATH="$(realpath "${SOURCE_FOLDER}")"
|
||||
[ -z "${SOURCE_PATH}" ] && exit 1
|
||||
echo "::debug::SOURCE_PATH=${SOURCE_PATH}"
|
||||
|
||||
# Let's start doing stuff.
|
||||
echo "Publishing ${SOURCE_FOLDER} to ${REMOTE}:${BRANCH}/${TARGET_FOLDER}"
|
||||
|
||||
# Create a working directory; the workspace may be filled with other important
|
||||
# files.
|
||||
#
|
||||
WORK_DIR="${INPUT_WORKDIR:-$(mktemp -d "${HOME}/gitrepo.XXXXXX")}"
|
||||
[ -z "${WORK_DIR}" ] && echo >&2 "::error::Failed to create temporary working directory" && exit 1
|
||||
cd "${WORK_DIR}"
|
||||
|
||||
# Initialize git repo and configure for remote access.
|
||||
#
|
||||
echo "Initializing repository with remote ${REMOTE}"
|
||||
git init || exit 1
|
||||
git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com" || exit 1
|
||||
git config --local user.name "${GITHUB_ACTOR}" || exit 1
|
||||
git remote add origin "${REMOTE}" || exit 1
|
||||
git remote -v
|
||||
|
||||
# Fetch initial (current contents).
|
||||
#
|
||||
echo "Fetching ${REMOTE}:${BRANCH}"
|
||||
git fetch --depth 1 origin "${BRANCH}" || exit 1
|
||||
git checkout -b "${BRANCH}" || exit 1
|
||||
git pull origin "${BRANCH}" || exit 1
|
||||
|
||||
# Create the target directory (if necessary) and copy files from source.
|
||||
#
|
||||
TARGET_PATH="${WORK_DIR}/${TARGET_FOLDER}"
|
||||
echo "Populating ${TARGET_PATH}"
|
||||
mkdir -p "${TARGET_PATH}" || exit 1
|
||||
rsync -a --quiet --delete "${SOURCE_PATH}/" "${TARGET_PATH}" || exit 1
|
||||
|
||||
# Create commit with changes.
|
||||
#
|
||||
echo "Creating commit"
|
||||
git add "${TARGET_PATH}" || exit 1
|
||||
git commit -m "${COMMIT_MESSAGE}" --author "${COMMIT_AUTHOR}" || exit 1
|
||||
COMMIT_HASH="$(git rev-parse HEAD)"
|
||||
echo "Created commit ${COMMIT_HASH}"
|
||||
|
||||
# Publish output variables.
|
||||
#
|
||||
echo "::set-output name=commit_hash::${COMMIT_HASH}"
|
||||
echo "::set-output name=working_directory::${WORK_DIR}"
|
||||
|
||||
# Push if not a dry-run.
|
||||
#
|
||||
if [ -z "${INPUT_DRYRUN}" ] ; then
|
||||
echo "Pushing to ${REMOTE}:${BRANCH}"
|
||||
git push origin "${BRANCH}" || exit 1
|
||||
else
|
||||
echo "[DRY-RUN] Not pushing to ${REMOTE}:${BRANCH}"
|
||||
fi
|
||||
47
.github/stale.yml
vendored
Normal file
47
.github/stale.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
|
||||
# General configuration
|
||||
# Label to use when marking as stale
|
||||
staleLabel: stale
|
||||
|
||||
# Pull request specific configuration
|
||||
pulls:
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
daysUntilStale: 14
|
||||
# Number of days of inactivity before a stale Issue or Pull Request is closed.
|
||||
# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale.
|
||||
daysUntilClose: 30
|
||||
# Comment to post when marking as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This pull request has been automatically marked as stale because it has not had
|
||||
activity in the last 2 weeks. It will be closed in 30 days if no further activity occurs. Please
|
||||
feel free to give a status update now, ping for review, or re-open when it's ready.
|
||||
Thank you for your contributions!
|
||||
# Comment to post when closing a stale Issue or Pull Request.
|
||||
closeComment: >
|
||||
This pull request has been automatically closed because it has not had
|
||||
activity in the last 30 days. Please feel free to give a status update now, ping for review, or re-open when it's ready.
|
||||
Thank you for your contributions!
|
||||
# Limit the number of actions per hour, from 1-30. Default is 30
|
||||
limitPerRun: 1
|
||||
|
||||
exemptLabels:
|
||||
- help wanted
|
||||
- type/bug
|
||||
- type/feature-request
|
||||
- Epic
|
||||
- no stalebot
|
||||
|
||||
# Issue specific configuration
|
||||
issues:
|
||||
limitPerRun: 1
|
||||
daysUntilStale: 100000
|
||||
daysUntilClose: 100000
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had activity in the
|
||||
last 100 days. It will be closed in the next 100 days if no activity occurs.
|
||||
Thank you for your contributions.
|
||||
closeComment: >
|
||||
This issue has been automatically closed because it has not had activity in the
|
||||
last month and a half. If this issue is still valid, please ping a maintainer and ask them to check this again.
|
||||
Thank you for your contributions.
|
||||
30
.github/workflows/publish.yml
vendored
Normal file
30
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: publish_docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
paths:
|
||||
- 'docs/sources/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: publish-to-git
|
||||
uses: ./.github/actions/gha-publish-to-git
|
||||
id: publish
|
||||
with:
|
||||
repository: grafana/website
|
||||
branch: docs-grafana
|
||||
host: github.com
|
||||
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
|
||||
source_folder: docs/sources
|
||||
target_folder: content/docs/grafana/latest
|
||||
- shell: bash
|
||||
run: |
|
||||
test -n "${{ steps.publish.outputs.commit_hash }}"
|
||||
test -n "${{ steps.publish.outputs.working_directory }}"
|
||||
16
.gitignore
vendored
16
.gitignore
vendored
@@ -10,13 +10,12 @@ awsconfig
|
||||
/public/views/index.html
|
||||
/public/views/error.html
|
||||
/emails/dist
|
||||
/reports
|
||||
|
||||
# Enterprise emails
|
||||
/emails/templates/enterprise_*
|
||||
/public/emails/enterprise_*
|
||||
|
||||
/public_gen
|
||||
/public/vendor/npm
|
||||
/tmp
|
||||
tools/phantomjs/phantomjs
|
||||
tools/phantomjs/phantomjs.exe
|
||||
@@ -61,7 +60,8 @@ profile.cov
|
||||
/pkg/cmd/grafana-cli/grafana-cli
|
||||
/pkg/cmd/grafana-server/grafana-server
|
||||
/pkg/cmd/grafana-server/debug
|
||||
/pkg/extensions
|
||||
/pkg/extensions/*
|
||||
!/pkg/extensions/main.go
|
||||
/public/app/extensions
|
||||
debug.test
|
||||
/examples/*/dist
|
||||
@@ -90,10 +90,16 @@ debug.test
|
||||
/packages/**/compiled
|
||||
/packages/**/.rpt2_cache
|
||||
|
||||
theOutput/
|
||||
|
||||
# Ignore go local build dependencies
|
||||
/scripts/go/bin/**
|
||||
|
||||
# Ignore compilation stats from `yarn stats`
|
||||
compilation-stats.json
|
||||
|
||||
# e2e tests
|
||||
/packages/grafana-e2e/cypress/screenshots
|
||||
/packages/grafana-e2e/cypress/videos
|
||||
/packages/grafana-e2e/cypress/logs
|
||||
/public/e2e-test/screenShots/theOutput
|
||||
/public/e2e-tests/screenShots/theOutput/*.png
|
||||
/public/e2e-tests/videos
|
||||
|
||||
123
CHANGELOG.md
123
CHANGELOG.md
@@ -1,5 +1,95 @@
|
||||
# 6.6.0 (unreleased)
|
||||
|
||||
### Features / Enhancements
|
||||
|
||||
* **Graphite**: Add Metrictank dashboard to Graphite datasource
|
||||
|
||||
## Breaking changes
|
||||
* **PagerDuty**: Change `payload.custom_details` field in PagerDuty notification to be a JSON object instead of a string.
|
||||
* **Security**: The `[security]` setting `cookie_samesite` configured to `none` now renders cookies with `SameSite=None` attribute compared to before where no `SameSite` attribute was added to cookies. To get the old behavior, use value `disabled` instead of `none`. Refer to [Upgrade Grafana](https://grafana.com/docs/grafana/latest/installation/upgrading/#upgrading-to-v6-6) for more information.
|
||||
|
||||
# 6.5.3 (2020-01-15)
|
||||
### Features / Enhancements
|
||||
* **API**: Validate redirect_to cookie has valid (Grafana) url . [#21057](https://github.com/grafana/grafana/pull/21057), [@papagian](https://github.com/papagian)
|
||||
|
||||
### Bug Fixes
|
||||
* **AdHocFilter**: Shows SubMenu when filtering directly from table. [#21017](https://github.com/grafana/grafana/pull/21017), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Cloudwatch**: Fixed crash when switching from cloudwatch data source. [#21376](https://github.com/grafana/grafana/pull/21376), [@torkelo](https://github.com/torkelo)
|
||||
* **DataLinks**: Sanitize data/panel link URLs. [#21140](https://github.com/grafana/grafana/pull/21140), [@dprokop](https://github.com/dprokop)
|
||||
* **Elastic**: Fix multiselect variable interpolation for logs. [#20894](https://github.com/grafana/grafana/pull/20894), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Prometheus**: Fixes so user can change HTTP Method in config settings. [#21055](https://github.com/grafana/grafana/pull/21055), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Prometheus**: Prevents validation of inputs when clicking in them without changing the value. [#21059](https://github.com/grafana/grafana/pull/21059), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Rendering**: Fix panel PNG rendering when using sub url & serve_from_sub_path = true. [#21306](https://github.com/grafana/grafana/pull/21306), [@bgranvea](https://github.com/bgranvea)
|
||||
* **Table**: Matches column names with unescaped regex characters. [#21164](https://github.com/grafana/grafana/pull/21164), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
|
||||
# 6.5.2 (2019-12-11)
|
||||
|
||||
### Bug Fixes
|
||||
* **Alerting**: Improve alert threshold handle dragging behavior. [#20922](https://github.com/grafana/grafana/pull/20922), [@torkelo](https://github.com/torkelo)
|
||||
* **AngularPanels**: Fixed loading spinner being stuck in some rare cases. [#20878](https://github.com/grafana/grafana/pull/20878), [@torkelo](https://github.com/torkelo)
|
||||
* **CloudWatch**: Fix query editor does not render in Explore. [#20909](https://github.com/grafana/grafana/pull/20909), [@davkal](https://github.com/davkal)
|
||||
* **CloudWatch**: Remove illegal character escaping in inferred expressions. [#20915](https://github.com/grafana/grafana/pull/20915), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: Remove template variable error message. [#20864](https://github.com/grafana/grafana/pull/20864), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: Use datasource template variable in curated dashboards. [#20917](https://github.com/grafana/grafana/pull/20917), [@sunker](https://github.com/sunker)
|
||||
* **Elasticsearch**: Set default port to 9200 in ConfigEditor. [#20948](https://github.com/grafana/grafana/pull/20948), [@papagian](https://github.com/papagian)
|
||||
* **Gauge/BarGauge**: Added support for value mapping of "no data"-state to text/value. [#20842](https://github.com/grafana/grafana/pull/20842), [@mckn](https://github.com/mckn)
|
||||
* **Graph**: Prevent tooltip from being displayed outside of window. [#20874](https://github.com/grafana/grafana/pull/20874), [@mckn](https://github.com/mckn)
|
||||
* **Graphite**: Fixes error with annotation metric queries . [#20857](https://github.com/grafana/grafana/pull/20857), [@dprokop](https://github.com/dprokop)
|
||||
* **Login**: Fix fatal error when navigating from reset password page. [#20747](https://github.com/grafana/grafana/pull/20747), [@peterholmberg](https://github.com/peterholmberg)
|
||||
* **MixedDatasources**: Do not filter out all mixed data sources in add mixed query dropdown. [#20990](https://github.com/grafana/grafana/pull/20990), [@torkelo](https://github.com/torkelo)
|
||||
* **Prometheus**: Fix caching for default labels request. [#20718](https://github.com/grafana/grafana/pull/20718), [@aocenas](https://github.com/aocenas)
|
||||
* **Prometheus**: Run default labels query only once. [#20898](https://github.com/grafana/grafana/pull/20898), [@aocenas](https://github.com/aocenas)
|
||||
* **Security**: Fix invite link still accessible after completion or revocation. [#20863](https://github.com/grafana/grafana/pull/20863), [@aknuds1](https://github.com/aknuds1)
|
||||
* **Server**: Fail when unable to create log directory. [#20804](https://github.com/grafana/grafana/pull/20804), [@aknuds1](https://github.com/aknuds1)
|
||||
* **TeamPicker**: Increase size limit from 10 to 100. [#20882](https://github.com/grafana/grafana/pull/20882), [@hendrikvh](https://github.com/hendrikvh)
|
||||
* **Units**: Remove SI prefix symbol from new milli/microSievert(/h) units. [#20650](https://github.com/grafana/grafana/pull/20650), [@zegelin](https://github.com/zegelin)
|
||||
|
||||
# 6.5.1 (2019-11-28)
|
||||
|
||||
### Bug Fixes
|
||||
* **CloudWatch**: Region template query fix. [#20661](https://github.com/grafana/grafana/pull/20661), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: Fix annotations query editor loading. [#20687](https://github.com/grafana/grafana/pull/20687), [@sunker](https://github.com/sunker)
|
||||
* **Panel**: Fixes undefined services/dependencies in plugins without `/**@ngInject*/`. [#20696](https://github.com/grafana/grafana/pull/20696), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Server**: Fix failure to start with "bind: address already in use" when using socket as protocol. [#20679](https://github.com/grafana/grafana/pull/20679), [@aknuds1](https://github.com/aknuds1)
|
||||
* **Stats**: Fix active admins/editors/viewers stats are counted more than once if the user is part of more than one org. [#20711](https://github.com/grafana/grafana/pull/20711), [@papagian](https://github.com/papagian)
|
||||
|
||||
# 6.5.0 (2019-11-25)
|
||||
|
||||
### Features / Enhancements
|
||||
|
||||
* **CloudWatch**: Add curated dashboards for most popular amazon services. [#20486](https://github.com/grafana/grafana/pull/20486), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: Enable Min time interval. [#20260](https://github.com/grafana/grafana/pull/20260), [@mtanda](https://github.com/mtanda)
|
||||
* **Explore**: UI improvements for log details. [#20485](https://github.com/grafana/grafana/pull/20485), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Server**: Improve grafana-server diagnostics configuration for profiling and tracing. [#20593](https://github.com/grafana/grafana/pull/20593), [@papagian](https://github.com/papagian)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **BarGauge/Gauge**: Add back missing title option field display options. [#20616](https://github.com/grafana/grafana/pull/20616), [@torkelo](https://github.com/torkelo)
|
||||
* **CloudWatch**: Fix high CPU load. [#20579](https://github.com/grafana/grafana/pull/20579), [@marefr](https://github.com/marefr)
|
||||
* **CloudWatch**: Fix high resolution mode without expression. [#20459](https://github.com/grafana/grafana/pull/20459), [@mtanda](https://github.com/mtanda)
|
||||
* **CloudWatch**: Make sure period variable is being interpreted correctly. [#20447](https://github.com/grafana/grafana/pull/20447), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: Remove HighResolution toggle since it's not being used. [#20440](https://github.com/grafana/grafana/pull/20440), [@sunker](https://github.com/sunker)
|
||||
* **Cloudwatch**: Fix LaunchTime attribute tag bug. [#20237](https://github.com/grafana/grafana/pull/20237), [@sunker](https://github.com/sunker)
|
||||
* **Data links**: Fix URL field turns read-only for graph panels. [#20381](https://github.com/grafana/grafana/pull/20381), [@dprokop](https://github.com/dprokop)
|
||||
* **Explore**: Keep logQL filters when selecting labels in log row details. [#20570](https://github.com/grafana/grafana/pull/20570), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **MySQL**: Fix TLS auth settings in config page. [#20501](https://github.com/grafana/grafana/pull/20501), [@peterholmberg](https://github.com/peterholmberg)
|
||||
* **Provisioning**: Fix unmarshaling nested jsonData values. [#20399](https://github.com/grafana/grafana/pull/20399), [@aocenas](https://github.com/aocenas)
|
||||
* **Server**: Should fail when server is unable to bind port. [#20409](https://github.com/grafana/grafana/pull/20409), [@aknuds1](https://github.com/aknuds1)
|
||||
* **Templating**: Prevents crash when $__searchFilter is not a string. [#20526](https://github.com/grafana/grafana/pull/20526), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **TextPanel**: Fixes issue with template variable value not properly html escaped [#20588](https://github.com/grafana/grafana/pull/20588), [@torkelo](https://github.com/torkelo)
|
||||
* **TimePicker**: Should update after location change. [#20466](https://github.com/grafana/grafana/pull/20466), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
## Breaking changes
|
||||
* **CloudWatch**: Pre Grafana 6.5.0, the CloudWatch datasource used the GetMetricStatistics API for all queries that did not have an ´id´ and did not have an ´expression´ defined in the query editor. The GetMetricStatistics API has a limit of 400 transactions per second. In this release, all queries use the GetMetricData API. The GetMetricData API has a limit of 50 transactions per second and 100 metrics per transaction. For API pricing information, please refer to the CloudWatch pricing page (https://aws.amazon.com/cloudwatch/pricing/).
|
||||
|
||||
* **CloudWatch**: The GetMetricData API does not return metric unit, so unit auto detection in panels is no longer supported.
|
||||
|
||||
* **CloudWatch**: The `HighRes` switch has been removed from the query editor. Read more about this in [upgrading to 6.5](https://grafana.com/docs/installation/upgrading/#upgrading-to-v6-5).
|
||||
|
||||
* **CloudWatch**: In previous versions of Grafana, there was partial support for using multi-valued template variables as dimension values. When a multi-valued template variable is being used for dimension values in Grafana 6.5, a [search expression](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-search-expressions.html) will be generated. In the GetMetricData API, expressions are limited to 1024 characters, so you might reach this limit if you are using a large number of values. Read our [upgrading to 6.5](https://grafana.com/docs/installation/upgrading/#upgrading-to-v6-5) guide to see how you can use the `*` wildcard for this use case.
|
||||
|
||||
# 6.5.0-beta1 (2019-11-14)
|
||||
|
||||
|
||||
### Features / Enhancements
|
||||
|
||||
* **API**: Add `createdAt` and `updatedAt` to api/users/lookup. [#19496](https://github.com/grafana/grafana/pull/19496), [@gotjosh](https://github.com/gotjosh)
|
||||
@@ -43,7 +133,7 @@
|
||||
* **Templating**: Made default template variable query editor field a textarea with automatic height. [#20288](https://github.com/grafana/grafana/pull/20288), [@torkelo](https://github.com/torkelo)
|
||||
* **Units**: Add milli/microSievert, milli/microSievert/h and pixels. [#20144](https://github.com/grafana/grafana/pull/20144), [@ryantxu](https://github.com/ryantxu)
|
||||
* **Units**: Added mega ampere and watt-hour per kg. [#19922](https://github.com/grafana/grafana/pull/19922), [@Karan96Kaushik](https://github.com/Karan96Kaushik)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
* **API**: Added dashboardId and slug in response to dashboard import api. [#19692](https://github.com/grafana/grafana/pull/19692), [@jongyllen](https://github.com/jongyllen)
|
||||
* **API**: Fix logging of dynamic listening port. [#19644](https://github.com/grafana/grafana/pull/19644), [@oleggator](https://github.com/oleggator)
|
||||
@@ -67,25 +157,36 @@
|
||||
* **ReactPanels**: Adds Explore menu item. [#20236](https://github.com/grafana/grafana/pull/20236), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Team Sync**: Fix URL encode Group IDs for external team sync. [#20280](https://github.com/grafana/grafana/pull/20280), [@gotjosh](https://github.com/gotjosh)
|
||||
|
||||
|
||||
## Breaking changes
|
||||
* **CloudWatch**: Pre Grafana 6.5.0, the CloudWatch datasource used the GetMetricStatistics API for all queries that did not have an ´id´ and did not have an ´expression´ defined in the query editor. The GetMetricStatistics API has a limit of 400 transactions per second. In this release, all queries use the GetMetricData API. The GetMetricData API has a limit of 50 transactions per second and 100 metrics per transaction. Also the GetMetricData API pricing is different from GetMetricStatistics. While GetMetricStatistics qualified for the CloudWatch API free tier, this is not the case for GetMetricData calls. For more information, please refer to the CloudWatch pricing page (https://aws.amazon.com/cloudwatch/pricing/). Read more about GetMetricData limits in [upgrading to 6.5](https://grafana.com/docs/installation/upgrading/#upgrading-to-v6-5).
|
||||
* **CloudWatch**: Pre Grafana 6.5.0, the CloudWatch datasource used the GetMetricStatistics API for all queries that did not have an ´id´ and did not have an ´expression´ defined in the query editor. The GetMetricStatistics API has a limit of 400 transactions per second. In this release, all queries use the GetMetricData API. The GetMetricData API has a limit of 50 transactions per second and 100 metrics per transaction. For API pricing information, please refer to the CloudWatch pricing page (https://aws.amazon.com/cloudwatch/pricing/).
|
||||
|
||||
* **CloudWatch**: The GetMetricData API does not return metric unit, so unit auto detection in panels is no longer supported.
|
||||
* **CloudWatch**: The GetMetricData API does not return metric unit, so unit auto detection in panels is no longer supported.
|
||||
|
||||
* **CloudWatch**: The `HighRes` switch has been removed from the query editor. Read more about this in [upgrading to 6.5](https://grafana.com/docs/installation/upgrading/#upgrading-to-v6-5).
|
||||
* **CloudWatch**: The `HighRes` switch has been removed from the query editor. Read more about this in [upgrading to 6.5](https://grafana.com/docs/installation/upgrading/#upgrading-to-v6-5).
|
||||
|
||||
* **CloudWatch**: In previous versions of Grafana, there was partial support for using multi template variables as dimension values. When a multi template variable is being used for dimension values in Grafana 6.5, a [search expression](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-search-expressions.html) will be generated. In the GetMetricData API, expressions are limited to 1024 characters, so it might be the case that this limit is reached when a multi template variable that has a lot of values is being used. Read about the suggested workaround in [upgrading to 6.5](https://grafana.com/docs/installation/upgrading/#upgrading-to-v6-5).
|
||||
* **CloudWatch**: In previous versions of Grafana, there was partial support for using multi-valued template variables as dimension values. When a multi-valued template variable is being used for dimension values in Grafana 6.5, a [search expression](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-search-expressions.html) will be generated. In the GetMetricData API, expressions are limited to 1024 characters, so you might reach this limit if you are using a large number of values. Read our [upgrading to 6.5](https://grafana.com/docs/installation/upgrading/#upgrading-to-v6-5) guide to see how you can use the `*` wildcard for this use case.
|
||||
|
||||
# 6.4.5 (2019-11-25)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **CloudWatch**: Fix high CPU load [#20579](https://github.com/grafana/grafana/pull/20579)
|
||||
|
||||
# 6.4.4 (2019-11-06)
|
||||
|
||||
### Bug Fixes
|
||||
* **MySQL**: Fix encoding in connection string [#20192](https://github.com/grafana/grafana/pull/20192)
|
||||
* **DataLinks**: Fix blur issues. [#19883](https://github.com/grafana/grafana/pull/19883), [@aocenas](https://github.com/aocenas)
|
||||
* **Docker**: Makes it possible to parse timezones in the docker image. [#20081](https://github.com/grafana/grafana/pull/20081), [@xlson](https://github.com/xlson)
|
||||
* **LDAP**: All LDAP servers should be tried even if one of them returns a connection error. [#20077](https://github.com/grafana/grafana/pull/20077), [@jongyllen](https://github.com/jongyllen)
|
||||
* **LDAP**: No longer shows incorrectly matching groups based on role in debug page. [#20018](https://github.com/grafana/grafana/pull/20018), [@xlson](https://github.com/xlson)
|
||||
* **Singlestat**: Fix no data / null value mapping . [#19951](https://github.com/grafana/grafana/pull/19951), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
#### Security vulnerability
|
||||
|
||||
The MySQL data source connnection string fix, [#20192](https://github.com/grafana/grafana/pull/20192), that was part of this release
|
||||
also fixed a security vulnerability. Thanks Yuriy Dyachenko for discovering and notifying us about this.
|
||||
|
||||
# 6.4.3 (2019-10-16)
|
||||
|
||||
### Bug Fixes
|
||||
@@ -177,7 +278,7 @@
|
||||
* **Dashboard**: Adds Logs Panel (alpha) as visualization option for Dashboards. [#18641](https://github.com/grafana/grafana/pull/18641), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Dashboard**: Reuse query results between panels . [#16660](https://github.com/grafana/grafana/pull/16660), [@ryantxu](https://github.com/ryantxu)
|
||||
* **Dashboard**: Set time to to 23:59:59 when setting To time using calendar. [#18595](https://github.com/grafana/grafana/pull/18595), [@simPod](https://github.com/simPod)
|
||||
* **DataLinks**: Add DataLinks support to Gauge, BarGauge and SingleStat2 panel. [#18605](https://github.com/grafana/grafana/pull/18605), [@ryantxu](https://github.com/ryantxu)
|
||||
* **DataLinks**: Add DataLinks support to Gauge, BarGauge and stat panel. [#18605](https://github.com/grafana/grafana/pull/18605), [@ryantxu](https://github.com/ryantxu)
|
||||
* **DataLinks**: Enable access to labels & field names. [#18918](https://github.com/grafana/grafana/pull/18918), [@torkelo](https://github.com/torkelo)
|
||||
* **DataLinks**: Enable multiple data links per panel. [#18434](https://github.com/grafana/grafana/pull/18434), [@dprokop](https://github.com/dprokop)
|
||||
* **Docker**: switch docker image to alpine base with phantomjs support. [#18468](https://github.com/grafana/grafana/pull/18468), [@DanCech](https://github.com/DanCech)
|
||||
@@ -247,6 +348,11 @@ Grafana is now using Alpine 3.10 as docker base image.
|
||||
|
||||
Please consider migrating from PhantomJS to the [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer).
|
||||
|
||||
# 6.3.7 (2019-11-22)
|
||||
|
||||
### Bug Fixes
|
||||
* **CloudWatch**: Fix high CPU load [#20579](https://github.com/grafana/grafana/pull/20579)
|
||||
|
||||
# 6.3.6 (2019-09-23)
|
||||
|
||||
### Features / Enhancements
|
||||
@@ -2896,4 +3002,3 @@ Thanks to everyone who contributed fixes and provided feedback :+1:
|
||||
# 1.0.0 (2014-01-19)
|
||||
|
||||
First public release
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Golang build container
|
||||
FROM golang:1.13.1-alpine
|
||||
FROM golang:1.13.4-alpine
|
||||
|
||||
RUN apk add --no-cache gcc g++
|
||||
|
||||
@@ -16,7 +16,7 @@ COPY build.go package.json ./
|
||||
RUN go run build.go build
|
||||
|
||||
# Node build container
|
||||
FROM node:10.14.2-alpine
|
||||
FROM node:12.13.0-alpine
|
||||
|
||||
# PhantomJS
|
||||
RUN apk add --no-cache curl &&\
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM golang:1.13.1 AS go-builder
|
||||
FROM golang:1.13.4 AS go-builder
|
||||
|
||||
WORKDIR /src/grafana
|
||||
|
||||
@@ -12,7 +12,7 @@ COPY pkg pkg/
|
||||
|
||||
RUN go run build.go build
|
||||
|
||||
FROM node:10.17 AS js-builder
|
||||
FROM node:12.13 AS js-builder
|
||||
|
||||
# PhantomJS
|
||||
RUN apt-get update && apt-get install -y curl &&\
|
||||
|
||||
5
Makefile
5
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 clean devenv devenv-down revive-alerting 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 gosec revive golangci-lint go-vet test-go test-js test run run-frontend clean devenv devenv-down revive-alerting help
|
||||
|
||||
GO = GO111MODULE=on go
|
||||
GO_FILES ?= ./pkg/...
|
||||
@@ -52,6 +52,9 @@ scripts/go/bin/bra: scripts/go/go.mod
|
||||
run: scripts/go/bin/bra ## Build and run web server on filesystem changes.
|
||||
@GO111MODULE=on scripts/go/bin/bra run
|
||||
|
||||
run-frontend: deps-js ## Fetch js dependencies and watch frontend for rebuild
|
||||
yarn start
|
||||
|
||||
##@ Testing
|
||||
|
||||
test-go: ## Run tests for backend.
|
||||
|
||||
@@ -179,7 +179,7 @@ disable_brute_force_login_protection = false
|
||||
# set to true if you host Grafana behind HTTPS. default is false.
|
||||
cookie_secure = false
|
||||
|
||||
# set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict" and "none"
|
||||
# set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict", "none" and "disabled"
|
||||
cookie_samesite = lax
|
||||
|
||||
# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
|
||||
@@ -318,6 +318,7 @@ scopes = user:email,read:org
|
||||
auth_url = https://github.com/login/oauth/authorize
|
||||
token_url = https://github.com/login/oauth/access_token
|
||||
api_url = https://api.github.com/user
|
||||
allowed_domains =
|
||||
team_ids =
|
||||
allowed_organizations =
|
||||
|
||||
@@ -331,6 +332,7 @@ scopes = api
|
||||
auth_url = https://gitlab.com/oauth/authorize
|
||||
token_url = https://gitlab.com/oauth/token
|
||||
api_url = https://gitlab.com/api/v4
|
||||
allowed_domains =
|
||||
allowed_groups =
|
||||
|
||||
#################################### Google Auth #########################
|
||||
@@ -374,17 +376,17 @@ client_secret = some_secret
|
||||
scopes = user:email
|
||||
email_attribute_name = email:primary
|
||||
email_attribute_path =
|
||||
role_attribute_path =
|
||||
role_attribute_path =
|
||||
auth_url =
|
||||
token_url =
|
||||
api_url =
|
||||
allowed_domains =
|
||||
team_ids =
|
||||
allowed_organizations =
|
||||
tls_skip_verify_insecure = false
|
||||
tls_client_cert =
|
||||
tls_client_key =
|
||||
tls_client_ca =
|
||||
send_client_credentials_via_post = false
|
||||
|
||||
#################################### SAML Auth ###########################
|
||||
[auth.saml] # Enterprise only
|
||||
@@ -437,6 +439,7 @@ enabled = false
|
||||
header_name = X-WEBAUTH-USER
|
||||
header_property = username
|
||||
auto_sign_up = true
|
||||
# Deprecated, use sync_ttl instead
|
||||
ldap_sync_ttl = 60
|
||||
sync_ttl = 60
|
||||
whitelist =
|
||||
@@ -590,6 +593,8 @@ notification_timeout_seconds = 30
|
||||
# Default setting for max attempts to sending alert notifications. Default value is 3
|
||||
max_attempts = 3
|
||||
|
||||
# Makes it possible to enforce a minimal interval between evaluations, to reduce load on the backend
|
||||
min_interval_seconds = 1
|
||||
|
||||
#################################### Explore #############################
|
||||
[explore]
|
||||
@@ -614,6 +619,7 @@ basic_auth_password =
|
||||
address =
|
||||
prefix = prod.grafana.%(instance_name)s.
|
||||
|
||||
#################################### Grafana.com integration ##########################
|
||||
[grafana_net]
|
||||
url = https://grafana.com
|
||||
|
||||
@@ -644,10 +650,13 @@ disable_shared_zipkin_spans = false
|
||||
|
||||
#################################### External Image Storage ##############
|
||||
[external_image_storage]
|
||||
# Used for uploading images to public servers so they can be included in slack/email messages.
|
||||
# You can choose between (s3, webdav, gcs, azure_blob, local)
|
||||
provider =
|
||||
|
||||
[external_image_storage.s3]
|
||||
endpoint =
|
||||
path_style_access =
|
||||
bucket_url =
|
||||
bucket =
|
||||
region =
|
||||
|
||||
132
conf/sample.ini
132
conf/sample.ini
@@ -46,7 +46,7 @@
|
||||
|
||||
# The full public facing url you use in browser, used for redirects and emails
|
||||
# If you use reverse proxy and sub path specify full url (with sub path)
|
||||
;root_url = http://localhost:3000
|
||||
;root_url = %(protocol)s://%(domain)s:%(http_port)s/
|
||||
|
||||
# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons.
|
||||
;serve_from_sub_path = false
|
||||
@@ -87,6 +87,11 @@
|
||||
# For "postgres" only, either "disable", "require" or "verify-full"
|
||||
;ssl_mode = disable
|
||||
|
||||
;ca_cert_path =
|
||||
;client_key_path =
|
||||
;client_cert_path =
|
||||
;server_cert_name =
|
||||
|
||||
# For "sqlite3" only, path relative to data_path setting
|
||||
;path = grafana.db
|
||||
|
||||
@@ -175,7 +180,7 @@
|
||||
# set to true if you host Grafana behind HTTPS. default is false.
|
||||
;cookie_secure = false
|
||||
|
||||
# set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict" and "none"
|
||||
# set cookie SameSite attribute. defaults to `lax`. can be set to "lax", "strict", "none" and "disabled"
|
||||
;cookie_samesite = lax
|
||||
|
||||
# set to true if you want to allow browsers to render Grafana in a <frame>, <iframe>, <embed> or <object>. default is false.
|
||||
@@ -235,9 +240,15 @@
|
||||
# Set to true to automatically assign new users to the default organization (id 1)
|
||||
;auto_assign_org = true
|
||||
|
||||
# Set this value to automatically add new users to the provided organization (if auto_assign_org above is set to true)
|
||||
;auto_assign_org_id = 1
|
||||
|
||||
# Default role new users will be automatically assigned (if disabled above is set to true)
|
||||
;auto_assign_org_role = Viewer
|
||||
|
||||
# Require email validation before sign up completes
|
||||
;verify_email_enabled = false
|
||||
|
||||
# Background text for the user field on the login page
|
||||
;login_hint = email or username
|
||||
;password_hint = password
|
||||
@@ -282,6 +293,9 @@
|
||||
# This setting is ignored if multiple OAuth providers are configured.
|
||||
;oauth_auto_login = false
|
||||
|
||||
# limit of api_key seconds to live before expiration
|
||||
;api_key_max_seconds_to_live = -1
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
@@ -303,9 +317,23 @@
|
||||
;auth_url = https://github.com/login/oauth/authorize
|
||||
;token_url = https://github.com/login/oauth/access_token
|
||||
;api_url = https://api.github.com/user
|
||||
;allowed_domains =
|
||||
;team_ids =
|
||||
;allowed_organizations =
|
||||
|
||||
#################################### GitLab Auth #########################
|
||||
[auth.gitlab]
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;client_id = some_id
|
||||
;client_secret = some_secret
|
||||
;scopes = api
|
||||
;auth_url = https://gitlab.com/oauth/authorize
|
||||
;token_url = https://gitlab.com/oauth/token
|
||||
;api_url = https://gitlab.com/api/v4
|
||||
;allowed_domains =
|
||||
;allowed_groups =
|
||||
|
||||
#################################### Google Auth ##########################
|
||||
[auth.google]
|
||||
;enabled = false
|
||||
@@ -317,6 +345,16 @@
|
||||
;token_url = https://accounts.google.com/o/oauth2/token
|
||||
;api_url = https://www.googleapis.com/oauth2/v1/userinfo
|
||||
;allowed_domains =
|
||||
;hosted_domain =
|
||||
|
||||
#################################### Grafana.com Auth ####################
|
||||
[auth.grafana_com]
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;client_id = some_id
|
||||
;client_secret = some_secret
|
||||
;scopes = user:email
|
||||
;allowed_organizations =
|
||||
|
||||
#################################### Generic OAuth ##########################
|
||||
[auth.generic_oauth]
|
||||
@@ -331,6 +369,7 @@
|
||||
;auth_url = https://foo.bar/login/oauth/authorize
|
||||
;token_url = https://foo.bar/login/oauth/access_token
|
||||
;api_url = https://foo.bar/user
|
||||
;allowed_domains =
|
||||
;team_ids =
|
||||
;allowed_organizations =
|
||||
;role_attribute_path =
|
||||
@@ -339,10 +378,6 @@
|
||||
;tls_client_key =
|
||||
;tls_client_ca =
|
||||
|
||||
; Set to true to enable sending client_id and client_secret via POST body instead of Basic authentication HTTP header
|
||||
; This might be required if the OAuth provider is not RFC6749 compliant, only supporting credentials passed via POST payload
|
||||
;send_client_credentials_via_post = false
|
||||
|
||||
#################################### SAML Auth ###########################
|
||||
[auth.saml] # Enterprise only
|
||||
# Defaults to false. If true, the feature is enabled.
|
||||
@@ -384,14 +419,9 @@
|
||||
# Friendly name or name of the attribute within the SAML assertion to use as the user's email
|
||||
;assertion_attribute_email = mail
|
||||
|
||||
#################################### Grafana.com Auth ####################
|
||||
[auth.grafana_com]
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;client_id = some_id
|
||||
;client_secret = some_secret
|
||||
;scopes = user:email
|
||||
;allowed_organizations =
|
||||
#################################### Basic Auth ##########################
|
||||
[auth.basic]
|
||||
;enabled = true
|
||||
|
||||
#################################### Auth Proxy ##########################
|
||||
[auth.proxy]
|
||||
@@ -405,10 +435,6 @@
|
||||
# Read the auth proxy docs for details on what the setting below enables
|
||||
;enable_login_token = false
|
||||
|
||||
#################################### Basic Auth ##########################
|
||||
[auth.basic]
|
||||
;enabled = true
|
||||
|
||||
#################################### Auth LDAP ##########################
|
||||
[auth.ldap]
|
||||
;enabled = false
|
||||
@@ -437,6 +463,7 @@
|
||||
|
||||
[emails]
|
||||
;welcome_email_on_sign_up = false
|
||||
;templates_pattern = emails/*.html
|
||||
|
||||
#################################### Logging ##########################
|
||||
[log]
|
||||
@@ -495,6 +522,41 @@
|
||||
# Syslog tag. By default, the process' argv[0] is used.
|
||||
;tag =
|
||||
|
||||
#################################### Usage Quotas ########################
|
||||
[quota]
|
||||
; enabled = false
|
||||
|
||||
#### set quotas to -1 to make unlimited. ####
|
||||
# limit number of users per Org.
|
||||
; org_user = 10
|
||||
|
||||
# limit number of dashboards per Org.
|
||||
; org_dashboard = 100
|
||||
|
||||
# limit number of data_sources per Org.
|
||||
; org_data_source = 10
|
||||
|
||||
# limit number of api_keys per Org.
|
||||
; org_api_key = 10
|
||||
|
||||
# limit number of orgs a user can create.
|
||||
; user_org = 10
|
||||
|
||||
# Global limit of users.
|
||||
; global_user = -1
|
||||
|
||||
# global limit of orgs.
|
||||
; global_org = -1
|
||||
|
||||
# global limit of dashboards
|
||||
; global_dashboard = -1
|
||||
|
||||
# global limit of api_keys
|
||||
; global_api_key = -1
|
||||
|
||||
# global limit on number of logged in users.
|
||||
; global_session = -1
|
||||
|
||||
#################################### Alerting ############################
|
||||
[alerting]
|
||||
# Disable alerting engine & UI features
|
||||
@@ -522,6 +584,9 @@
|
||||
# Default setting for max attempts to sending alert notifications. Default value is 3
|
||||
;max_attempts = 3
|
||||
|
||||
# Makes it possible to enforce a minimal interval between evaluations, to reduce load on the backend
|
||||
;min_interval_seconds = 1
|
||||
|
||||
#################################### Explore #############################
|
||||
[explore]
|
||||
# Enable the Explore section
|
||||
@@ -532,11 +597,14 @@
|
||||
[metrics]
|
||||
# Disable / Enable internal metrics
|
||||
;enabled = true
|
||||
# Graphite Publish interval
|
||||
;interval_seconds = 10
|
||||
# Disable total stats (stat_totals_*) metrics to be generated
|
||||
;disable_total_stats = false
|
||||
|
||||
# Publish interval
|
||||
;interval_seconds = 10
|
||||
#If both are set, basic auth will be required for the metrics endpoint.
|
||||
; basic_auth_username =
|
||||
; basic_auth_password =
|
||||
|
||||
# Send internal metrics to Graphite
|
||||
[metrics.graphite]
|
||||
@@ -544,6 +612,11 @@
|
||||
;address =
|
||||
;prefix = prod.grafana.%(instance_name)s.
|
||||
|
||||
#################################### Grafana.com integration ##########################
|
||||
# Url used to import dashboards directly from Grafana.com
|
||||
[grafana_com]
|
||||
;url = https://grafana.com
|
||||
|
||||
#################################### Distributed tracing ############
|
||||
[tracing.jaeger]
|
||||
# Enable by setting the address sending traces to jaeger (ex localhost:6831)
|
||||
@@ -566,11 +639,6 @@
|
||||
# Not disabling is the most common setting when using Zipkin elsewhere in your infrastructure.
|
||||
;disable_shared_zipkin_spans = false
|
||||
|
||||
#################################### Grafana.com integration ##########################
|
||||
# Url used to import dashboards directly from Grafana.com
|
||||
[grafana_com]
|
||||
;url = https://grafana.com
|
||||
|
||||
#################################### External image storage ##########################
|
||||
[external_image_storage]
|
||||
# Used for uploading images to public servers so they can be included in slack/email messages.
|
||||
@@ -578,6 +646,8 @@
|
||||
;provider =
|
||||
|
||||
[external_image_storage.s3]
|
||||
;endpoint =
|
||||
;path_style_access =
|
||||
;bucket =
|
||||
;region =
|
||||
;path =
|
||||
@@ -610,10 +680,6 @@
|
||||
# If the remote HTTP image renderer service runs on a different server than the Grafana server you may have to configure this to a URL where Grafana is reachable, e.g. http://grafana.domain/.
|
||||
;callback_url =
|
||||
|
||||
[enterprise]
|
||||
# Path to a valid Grafana Enterprise license.jwt file
|
||||
;license_path =
|
||||
|
||||
[panels]
|
||||
# If set to true Grafana will allow script tags in text panels. Not recommended as it enable XSS vulnerabilities.
|
||||
;disable_sanitize_html = false
|
||||
@@ -621,3 +687,11 @@
|
||||
[plugins]
|
||||
;enable_alpha = false
|
||||
;app_tls_skip_verify_insecure = false
|
||||
|
||||
[enterprise]
|
||||
# Path to a valid Grafana Enterprise license.jwt file
|
||||
;license_path =
|
||||
|
||||
[feature_toggles]
|
||||
# enable features, separated by spaces
|
||||
;enable =
|
||||
|
||||
@@ -32,7 +32,7 @@ The `Init` method is used to initialize and configure the service to make it rea
|
||||
|
||||
Every service needs to be registered with the application for it to be included in the service graph.
|
||||
|
||||
To register a service, call the `registry.RegisterService` function in a `init` function within your package.
|
||||
To register a service, call the `registry.RegisterService` function in an `init` function within your package.
|
||||
|
||||
```go
|
||||
func init() {
|
||||
|
||||
@@ -10,7 +10,7 @@ Before you begin, you might want to read [How to contribute to Grafana as a juni
|
||||
Make sure you have the following dependencies installed before setting up your developer environment:
|
||||
|
||||
- [Git](https://git-scm.com/)
|
||||
- [Go](https://golang.org/dl/)
|
||||
- [Go](https://golang.org/dl/) (see [go.mod](../go.mod#L3) for minimum required version)
|
||||
- [Node.js (Long Term Support)](https://nodejs.org)
|
||||
- [Yarn](https://yarnpkg.com)
|
||||
|
||||
@@ -72,6 +72,10 @@ Log in using the default credentials:
|
||||
|
||||
When you log in for the first time, Grafana asks you to change your password.
|
||||
|
||||
#### Building on Windows
|
||||
|
||||
The Grafana backend includes Sqlite3 which requires GCC to compile. So in order to compile Grafana on Windows you need to install GCC. We recommend [TDM-GCC](http://tdm-gcc.tdragon.net/download).
|
||||
|
||||
## Test Grafana
|
||||
|
||||
The test suite consists of three types of tests: _Frontend tests_, _backend tests_, and _end-to-end tests_.
|
||||
@@ -94,7 +98,9 @@ go test -v ./pkg/...
|
||||
|
||||
### Run end-to-end tests
|
||||
|
||||
The end-to-end tests in Grafana uses [puppeteer](https://github.com/GoogleChrome/puppeteer) to run automated scripts in a headless Chrome browser. To run the tests:
|
||||
The end to end tests in Grafana use [Cypress](https://www.cypress.io/) to run automated scripts in a headless Chromium browser. Read more about our [e2e framework](/contribute/style-guides/e2e.md).
|
||||
|
||||
To run the tests:
|
||||
|
||||
```
|
||||
yarn e2e-tests
|
||||
@@ -106,10 +112,10 @@ By default, the end-to-end tests assumes Grafana is available on `localhost:3000
|
||||
BASE_URL=http://localhost:3333 yarn e2e-tests
|
||||
```
|
||||
|
||||
To follow the tests in the browser while they're running, add the `BROWSER` and `SLOWMO` environment variables:
|
||||
To follow the tests in the browser while they're running, use the `yarn e2e-tests:debug` instead.
|
||||
|
||||
```
|
||||
BROWSER=1 SLOWMO=1 yarn e2e-tests
|
||||
yarn e2e-tests:debug
|
||||
```
|
||||
|
||||
## Configure Grafana for development
|
||||
|
||||
@@ -81,12 +81,44 @@ Always give the reader some idea of what to expect in the reference. Avoid blind
|
||||
When possible, use the exact title of the page or section you are linking to as the link text.
|
||||
|
||||
**Example**
|
||||
* Refer to the [Documentation style guide](documentation-style-guide.md) for information about word usage and capitalization guidelines.
|
||||
Refer to the [Documentation style guide](documentation-style-guide.md) for information about word usage and capitalization guidelines.
|
||||
|
||||
### Command line examples
|
||||
|
||||
* Do not assume everyone is using Linux. Make sure instructions include enough information for Windows and Mac users to successfully complete procedures.
|
||||
|
||||
* Do not add `$` before commands. Make it easy for users to copy and paste commands.
|
||||
|
||||
* **Wrong:** `$ sudo yum install grafana`
|
||||
* **Right:** `sudo yum install grafana`
|
||||
|
||||
* Include `sudo` before commands that require `sudo` to work.
|
||||
|
||||
For terminal examples and Grafana configuration, use a `bash` code block:
|
||||
```bash
|
||||
sudo yum install grafana
|
||||
```
|
||||
For HTTP request/response, use an `http` code block:
|
||||
```http
|
||||
GET /api/dashboards/id/1/permissions HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
### Word usage
|
||||
|
||||
Grafana products has some words, abbreviations, and slang particular to this discourse community.
|
||||
|
||||
#### checkout, check out
|
||||
|
||||
Two words if used as a verb, one word if used as a noun.
|
||||
|
||||
**Examples**
|
||||
|
||||
* Check out these new features!
|
||||
* Proceed to checkout.
|
||||
|
||||
#### data source
|
||||
|
||||
Two words, not one
|
||||
@@ -94,7 +126,6 @@ Two words, not one
|
||||
**Exceptions:**
|
||||
* "datasource" used as an identifier
|
||||
* "datasource" in a URL
|
||||
* "Open source" should be hyphenated when used as an adjective, e.g. *open-source software*. The open form should be preferred when used as a noun, e.g. *Grafana is open source*.
|
||||
* Use "data source" instead of "datasource" unless used as an identifier, in code, or as part of a URL.
|
||||
* Spell out "repository" and avoid the shorter "repo."
|
||||
* Use "Unix" as the preferred spelling (as opposed to "UNIX", or "unix") when referring to the family of operating systems.
|
||||
@@ -108,7 +139,7 @@ Two words, not one
|
||||
|
||||
#### open source, open-source
|
||||
|
||||
Hyphenate when used as an adjective. For example: _open-source software._
|
||||
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._
|
||||
|
||||
|
||||
160
contribute/style-guides/e2e.md
Normal file
160
contribute/style-guides/e2e.md
Normal file
@@ -0,0 +1,160 @@
|
||||
# End to end test framework
|
||||
Grafana Labs uses a minimal home grown solution built on top of Cypress for our end to end (e2e) tests.
|
||||
|
||||
## Basic concepts
|
||||
Here is a good introduction to e2e best practices: https://martinfowler.com/bliki/PageObject.html.
|
||||
- `Selector`: A unique identifier that is used from the e2e framework to retrieve an element from the Browser
|
||||
- `Page`: An abstraction for an object that contains one or more `Selectors`
|
||||
- `Flow`: An abstraction that contains a sequence of actions on one or more `Pages` that can be reused and shared between tests
|
||||
|
||||
## Basic example
|
||||
Let's start with a simple example with a single selector. For simplicity, all examples are in JSX.
|
||||
|
||||
In our example app, we have an input that we want to type some text into during our e2e test.
|
||||
```jsx harmony
|
||||
<div>
|
||||
<input type="text" className="gf-form-input login-form-input"/>
|
||||
</div>
|
||||
```
|
||||
|
||||
We could define a selector using `JQuery` [type selectors](https://api.jquery.com/category/selectors/) with a string like `'.gf-form-input.login-form-input'` but that would be brittle as style changes occur frequently. Furthermore there is nothing that signals to future developers that this input is part of an e2e test.
|
||||
|
||||
At Grafana, we use `aria-label` as our preferred way of defining selectors instead of `data-*` attributes. This also aids in accessibility.
|
||||
Let's add a descriptive `aria-label` to our simple example.
|
||||
```jsx harmony
|
||||
<div>
|
||||
<input type="text" className="gf-form-input login-form-input" aria-label="Username input field"/>
|
||||
</div>
|
||||
```
|
||||
|
||||
Now that we added the `aria-label` we suddenly get more information about this particular field. It's an input field that represents a username, but there it's still not really signaling that it's part of an e2e test.
|
||||
|
||||
The next step is to create a `Page` representation in our e2e test framework to glue the test with the real implementation using the `pageFactory` function. For that function we can supply a `url` and `selectors` like in the example below:
|
||||
```typescript
|
||||
export const Login = pageFactory({
|
||||
url: '/login', // used when called from Login.visit()
|
||||
selectors: {
|
||||
username: 'Username input field', // used when called from Login.username().type('Hello World')
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
The next step is to add the `Login` page to the exported const `Pages` in `packages/grafana-e2e/src/pages/index.ts` so that it appears when we type `e2e.pages` in our IDE.
|
||||
```ecmascript 6
|
||||
export const Pages = {
|
||||
Login,
|
||||
...,
|
||||
...,
|
||||
...,
|
||||
};
|
||||
|
||||
```
|
||||
Now that we have a `Page` called `Login` in our `Pages` const we can use that to add a selector in our html like shown below and now this really signals to future developers that it is part of an e2e test.
|
||||
```jsx harmony
|
||||
<div>
|
||||
<input type="text" className="gf-form-input login-form-input" aria-label={e2e.pages.Login.selectors.username}/>
|
||||
</div>
|
||||
```
|
||||
|
||||
The last step in our example is to use our `Login` page as part of a test. The `pageFactory` function we used before gives us two things:
|
||||
- The `url` property is used whenever we call the `visit` function and is equivalent to the Cypress function [cy.visit()](https://docs.cypress.io/api/commands/visit.html#Syntax).
|
||||
> Best practice after calling `visit` is to always call `should` on a selector to prevent flaky tests when you try to access an element that isn't ready. For more information, refer to [Commands vs. assertions](https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions).
|
||||
- Any defined selector in the `selectors` property can be accessed from the `Login` page by invoking it. This is equivalent to the result of the Cypress function [cy.get(...)](https://docs.cypress.io/api/commands/get.html#Syntax).
|
||||
```ecmascript 6
|
||||
describe('Login test', () => {
|
||||
it('Should pass', () => {
|
||||
e2e.pages.Login.visit();
|
||||
// To prevent flaky tests, always do a .should on any selector that you expect to be in the DOM.
|
||||
// Read more here: https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions
|
||||
e2e.pages.Login.username().should('be.visible');
|
||||
e2e.pages.Login.username().type('admin');
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Advanced example
|
||||
Let's take a look at an example that uses the same `selector` for multiple items in a list for instance. In this example app we have a list of data sources that we want to click on during an e2e test.
|
||||
|
||||
```jsx harmony
|
||||
<ul>
|
||||
{dataSources.map(dataSource => (
|
||||
<li className="card-item-wrapper" key={dataSource.id}>
|
||||
<a className="card-item" href={`datasources/edit/${dataSource.id}`}>
|
||||
<div className="card-item-name">
|
||||
{dataSource.name}
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
```
|
||||
```
|
||||
|
||||
Just as before in the basic example we'll start by creating a page abstraction using the `pageFactory` function:
|
||||
```typescript
|
||||
export const DataSources = pageFactory({
|
||||
url: '/datasources',
|
||||
selectors: {
|
||||
dataSources: (dataSourceName: string) => `Data source list item ${dataSourceName}`,
|
||||
},
|
||||
});
|
||||
```
|
||||
You might have noticed that instead of a simple `string` as the `selector`, we're using a `function` that takes a string parameter as an argument and returns a formatted string using the argument.
|
||||
|
||||
Just as before we need to add the `DataSources` page to the exported const `Pages` in `packages/grafana-e2e/src/pages/index.ts`.
|
||||
|
||||
The next step is to use the `dataSources` selector function as in our example below:
|
||||
```jsx harmony
|
||||
<ul>
|
||||
{dataSources.map(dataSource => (
|
||||
<li className="card-item-wrapper" key={dataSource.id}>
|
||||
<a className="card-item" href={`datasources/edit/${dataSource.id}`}>
|
||||
<div className="card-item-name" aria-label={e2e.pages.DataSources.selectors.dataSources(dataSource.name)}>
|
||||
{dataSource.name}
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
```
|
||||
|
||||
When this list is rendered with the data sources with names `A`, `B`, `C` the resulting html would become:
|
||||
```jsx harmony
|
||||
<div class="card-item-name" aria-label="Data source list item A">
|
||||
A
|
||||
</div>
|
||||
...
|
||||
<div class="card-item-name" aria-label="Data source list item B">
|
||||
B
|
||||
</div>
|
||||
...
|
||||
<div class="card-item-name" aria-label="Data source list item C">
|
||||
C
|
||||
</div>
|
||||
```
|
||||
|
||||
Now we can write our test. The one thing that differs from the `Basic example` is that we pass in which data source we want to click on as an argument to the selector function:
|
||||
> Best practice after calling `visit` is to always call `should` on a selector to prevent flaky tests when you try to access an element that isn't ready. For more information, refer to [Commands vs. assertions](https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions).
|
||||
```ecmascript 6
|
||||
describe('List test', () => {
|
||||
it('Clicking on data source named B', () => {
|
||||
e2e.pages.DataSources.visit();
|
||||
// To prevent flaky tests, always do a .should on any selector that you expect to be in the DOM.
|
||||
// Read more here: https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions
|
||||
e2e.pages.DataSources.dataSources('B').should('be.visible');
|
||||
e2e.pages.DataSources.dataSources('B').click();
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## Debugging PhantomJS image rendering
|
||||
|
||||
There is no easy or comprehensive way to debug PhantomJS smoke test (image rendering) failures. However, PhantomJS exposes remote debugging interface which can give you a sense of what is going wrong in the smoke test. Before performing the steps described below make sure your local Grafana instance is running:
|
||||
|
||||
1. Go to `tools/phantomjs` directory
|
||||
2. Execute `phantomjs` binary against `render.js` file: `./phantomjs --remote-debugger-port=9009 --remote-debugger-autorun=yes ./render.js url="http://localhost:3000"`
|
||||
3. In your browser navigate to `http://localhost:9009/`
|
||||
4. Select `http://localhost:3000/login` from the list. You will get access to Webkit's inspector to see the console's output from the smoke test.
|
||||
|
||||
The method described above is not perfect, but is helpful to evaluate smoke tests breaking due to bundle errors.
|
||||
@@ -1,129 +1,15 @@
|
||||
# Redux framework
|
||||
|
||||
To reduce the amount of boilerplate code used to create a strongly typed redux solution with actions, action creators, reducers and tests we've introduced a small framework around Redux.
|
||||
Grafana uses [Redux Toolkit](https://redux-toolkit.js.org/) to handle Redux boilerplate code.
|
||||
> Some of our Reducers are used by Angular and therefore state is to be considered as mutable for those reducers.
|
||||
|
||||
`+` Much less boilerplate code
|
||||
`-` Non Redux standard api
|
||||
|
||||
## New core functionality
|
||||
|
||||
### actionCreatorFactory
|
||||
|
||||
Used to create an action creator with the following signature
|
||||
|
||||
```typescript
|
||||
{ type: string , (payload: T): {type: string; payload: T;} }
|
||||
```
|
||||
|
||||
where the `type` string will be ensured to be unique and `T` is the type supplied to the factory.
|
||||
|
||||
#### Example
|
||||
|
||||
```typescript
|
||||
export const someAction = actionCreatorFactory<string>('SOME_ACTION').create();
|
||||
|
||||
// later when dispatched
|
||||
someAction('this rocks!');
|
||||
```
|
||||
|
||||
```typescript
|
||||
// best practices, always use an interface as type
|
||||
interface SomeAction {
|
||||
data: string;
|
||||
}
|
||||
export const someAction = actionCreatorFactory<SomeAction>('SOME_ACTION').create();
|
||||
|
||||
// later when dispatched
|
||||
someAction({ data: 'best practices' });
|
||||
```
|
||||
|
||||
```typescript
|
||||
// declaring an action creator with a type string that has already been defined will throw
|
||||
export const someAction = actionCreatorFactory<string>('SOME_ACTION').create();
|
||||
export const theAction = actionCreatorFactory<string>('SOME_ACTION').create(); // will throw
|
||||
```
|
||||
|
||||
### reducerFactory
|
||||
|
||||
Fluent API used to create a reducer. (same as implementing the standard switch statement in Redux)
|
||||
|
||||
#### Example
|
||||
|
||||
```typescript
|
||||
interface ExampleReducerState {
|
||||
data: string[];
|
||||
}
|
||||
|
||||
const intialState: ExampleReducerState = { data: [] };
|
||||
|
||||
export const someAction = actionCreatorFactory<string>('SOME_ACTION').create();
|
||||
export const otherAction = actionCreatorFactory<string[]>('Other_ACTION').create();
|
||||
|
||||
export const exampleReducer = reducerFactory<ExampleReducerState>(intialState)
|
||||
// addMapper is the function that ties an action creator to a state change
|
||||
.addMapper({
|
||||
// action creator to filter out which mapper to use
|
||||
filter: someAction,
|
||||
// mapper function where the state change occurs
|
||||
mapper: (state, action) => ({ ...state, data: state.data.concat(action.payload) }),
|
||||
})
|
||||
// a developer can just chain addMapper functions until reducer is done
|
||||
.addMapper({
|
||||
filter: otherAction,
|
||||
mapper: (state, action) => ({ ...state, data: action.payload }),
|
||||
})
|
||||
.create(); // this will return the reducer
|
||||
```
|
||||
|
||||
#### Typing limitations
|
||||
|
||||
There is a challenge left with the mapper function that I can not solve with TypeScript. The signature of a mapper is
|
||||
|
||||
```typescript
|
||||
<State, Payload>(state: State, action: ActionOf<Payload>) => State;
|
||||
```
|
||||
|
||||
If you would to return an object that is not of the state type like the following mapper
|
||||
|
||||
```typescript
|
||||
mapper: (state, action) => ({ nonExistingProperty: ''}),
|
||||
```
|
||||
|
||||
Then you would receive the following compile error
|
||||
|
||||
```shell
|
||||
[ts] Property 'data' is missing in type '{ nonExistingProperty: string; }' but required in type 'ExampleReducerState'. [2741]
|
||||
```
|
||||
|
||||
But if you return an object that is spreading state and add a non existing property type like the following mapper
|
||||
|
||||
```typescript
|
||||
mapper: (state, action) => ({ ...state, nonExistingProperty: ''}),
|
||||
```
|
||||
|
||||
Then you would not receive any compile error.
|
||||
|
||||
If you want to make sure that never happens you can just supply the State type to the mapper callback like the following mapper:
|
||||
|
||||
```typescript
|
||||
mapper: (state, action): ExampleReducerState => ({ ...state, nonExistingProperty: 'kalle' }),
|
||||
```
|
||||
|
||||
Then you would receive the following compile error
|
||||
|
||||
```shell
|
||||
[ts]
|
||||
Type '{ nonExistingProperty: string; data: string[]; }' is not assignable to type 'ExampleReducerState'.
|
||||
Object literal may only specify known properties, and 'nonExistingProperty' does not exist in type 'ExampleReducerState'. [2322]
|
||||
```
|
||||
|
||||
## New test functionality
|
||||
## Test functionality
|
||||
|
||||
### reducerTester
|
||||
|
||||
Fluent API that simplifies the testing of reducers
|
||||
|
||||
#### Example
|
||||
#### Usage
|
||||
|
||||
```typescript
|
||||
reducerTester()
|
||||
@@ -131,3 +17,32 @@ reducerTester()
|
||||
.whenActionIsDispatched(someAction('reducer tests'))
|
||||
.thenStateShouldEqual({ ...initialState, data: 'reducer tests' });
|
||||
```
|
||||
|
||||
#### Complex usage
|
||||
Sometimes you encounter a `resulting state` that contains properties that are hard to compare, such as `Dates`, but you still want to compare that other props in state are correct.
|
||||
|
||||
Then you can use `thenStatePredicateShouldEqual` function on `reducerTester` that will return the `resulting state` so that you can expect upon individual properties..
|
||||
|
||||
```typescript
|
||||
reducerTester()
|
||||
.givenReducer(someReducer, initialState)
|
||||
.whenActionIsDispatched(someAction('reducer tests'))
|
||||
.thenStatePredicateShouldEqual(resultingState => {
|
||||
expect(resultingState.data).toEqual('reducer tests');
|
||||
return true;
|
||||
});
|
||||
```
|
||||
|
||||
### thunkTester
|
||||
|
||||
Fluent API that simplifies the testing of thunks.
|
||||
|
||||
#### Usage
|
||||
|
||||
```typescript
|
||||
const dispatchedActions = await thunkTester(initialState)
|
||||
.givenThunk(someThunk)
|
||||
.whenThunkIsDispatched(arg1, arg2, arg3);
|
||||
|
||||
expect(dispatchedActions).toEqual([someAction('reducer tests')]);
|
||||
```
|
||||
|
||||
@@ -20,8 +20,8 @@ datasources:
|
||||
url: http://localhost:3011
|
||||
|
||||
- name: gdev-testdata
|
||||
type: testdata
|
||||
isDefault: true
|
||||
type: testdata
|
||||
|
||||
- name: gdev-influxdb
|
||||
type: influxdb
|
||||
@@ -227,6 +227,20 @@ datasources:
|
||||
authType: credentials
|
||||
defaultRegion: eu-west-2
|
||||
|
||||
# Keep to test old /api/prom API
|
||||
- name: gdev-loki-0.3
|
||||
type: loki
|
||||
access: proxy
|
||||
url: http://localhost:3103
|
||||
editable: false
|
||||
|
||||
# First version with new v1 API (remove once v1 is out)
|
||||
- name: gdev-loki-0.4
|
||||
type: loki
|
||||
access: proxy
|
||||
url: http://localhost:3104
|
||||
editable: false
|
||||
|
||||
- name: gdev-loki
|
||||
type: loki
|
||||
access: proxy
|
||||
|
||||
@@ -15,10 +15,12 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1573479899663,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"alert": {
|
||||
"alertRuleTags": {},
|
||||
"conditions": [
|
||||
{
|
||||
"evaluator": {
|
||||
@@ -52,12 +54,14 @@
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 10,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
@@ -73,6 +77,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -142,6 +149,7 @@
|
||||
},
|
||||
{
|
||||
"alert": {
|
||||
"alertRuleTags": {},
|
||||
"conditions": [
|
||||
{
|
||||
"evaluator": {
|
||||
@@ -165,7 +173,7 @@
|
||||
"for": "900000h",
|
||||
"frequency": "1m",
|
||||
"handler": 1,
|
||||
"name": "Always Pending",
|
||||
"name": "TestData - Always Pending",
|
||||
"noDataState": "no_data",
|
||||
"notifications": []
|
||||
},
|
||||
@@ -177,12 +185,14 @@
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 10,
|
||||
"x": 10,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 7,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
@@ -198,6 +208,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -227,7 +240,7 @@
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Always Alerting with For",
|
||||
"title": "Always Pending with For",
|
||||
"tooltip": {
|
||||
"msResolution": false,
|
||||
"shared": true,
|
||||
@@ -268,6 +281,7 @@
|
||||
{
|
||||
"dashboardFilter": "",
|
||||
"dashboardTags": [],
|
||||
"datasource": null,
|
||||
"folderId": null,
|
||||
"gridPos": {
|
||||
"h": 20,
|
||||
@@ -280,6 +294,7 @@
|
||||
"links": [],
|
||||
"nameFilter": "$namefilter",
|
||||
"onlyAlertsOnDashboard": false,
|
||||
"options": {},
|
||||
"show": "current",
|
||||
"sortOrder": 1,
|
||||
"stateFilter": [],
|
||||
@@ -290,6 +305,7 @@
|
||||
},
|
||||
{
|
||||
"alert": {
|
||||
"alertRuleTags": {},
|
||||
"conditions": [
|
||||
{
|
||||
"evaluator": {
|
||||
@@ -313,7 +329,7 @@
|
||||
"for": "1m",
|
||||
"frequency": "1m",
|
||||
"handler": 1,
|
||||
"name": "TestData - Always Pending",
|
||||
"name": "TestData - Always Alerting For",
|
||||
"noDataState": "no_data",
|
||||
"notifications": []
|
||||
},
|
||||
@@ -325,12 +341,14 @@
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 10,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 6,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
@@ -346,6 +364,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -446,12 +467,14 @@
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 10,
|
||||
"x": 10,
|
||||
"y": 7
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
@@ -467,6 +490,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -571,12 +597,14 @@
|
||||
"editable": true,
|
||||
"error": false,
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 10,
|
||||
"x": 0,
|
||||
"y": 13
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 5,
|
||||
"isNew": true,
|
||||
"legend": {
|
||||
@@ -592,6 +620,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "connected",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -661,7 +692,7 @@
|
||||
}
|
||||
],
|
||||
"revision": 2,
|
||||
"schemaVersion": 18,
|
||||
"schemaVersion": 21,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "alerting"],
|
||||
"templating": {
|
||||
@@ -711,5 +742,5 @@
|
||||
"timezone": "browser",
|
||||
"title": "Alerting with TestData",
|
||||
"uid": "7MeksYbmk",
|
||||
"version": 1
|
||||
"version": 3
|
||||
}
|
||||
|
||||
@@ -4,11 +4,37 @@
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"enable": false,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Annotations & Alerts",
|
||||
"showIn": 0,
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "gdev-mssql",
|
||||
"enable": false,
|
||||
"hide": false,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Single",
|
||||
"rawQuery": "SELECT TOP 1\n createdAt as time,\n 'single' as text,\n hostname as tags\nFROM\n grafana_metric\nWHERE\n $__timeFilter(createdAt)\nORDER BY time\n",
|
||||
"showIn": 0,
|
||||
"tags": [],
|
||||
"type": "tags"
|
||||
},
|
||||
{
|
||||
"datasource": "gdev-mssql",
|
||||
"enable": false,
|
||||
"hide": false,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Region",
|
||||
"rawQuery": "SELECT TOP 1\n DATEADD(MINUTE, 1, createdAt) as time,\n DATEADD(MINUTE, 6, createdAt) as timeend,\n 'region' as text,\n hostname as tags\nFROM\n grafana_metric\nWHERE\n $__timeFilter(createdAt)\nORDER BY time",
|
||||
"showIn": 0,
|
||||
"tags": [],
|
||||
"type": "tags"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -16,7 +42,7 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1532618661457,
|
||||
"iteration": 1576251075020,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
@@ -28,12 +54,14 @@
|
||||
"dashes": false,
|
||||
"datasource": "gdev-mssql",
|
||||
"fill": 2,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -48,6 +76,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -79,6 +110,7 @@
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Average logins / $summarize",
|
||||
"tooltip": {
|
||||
@@ -125,12 +157,14 @@
|
||||
"dashes": false,
|
||||
"datasource": "gdev-mssql",
|
||||
"fill": 2,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 18,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 8,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -145,6 +179,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -169,6 +206,7 @@
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Average payments started/ended / $summarize",
|
||||
"tooltip": {
|
||||
@@ -214,12 +252,14 @@
|
||||
"dashes": false,
|
||||
"datasource": "gdev-mssql",
|
||||
"fill": 2,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 6,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -234,6 +274,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -252,6 +295,7 @@
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Max CPU / $summarize",
|
||||
"tooltip": {
|
||||
@@ -302,6 +346,7 @@
|
||||
},
|
||||
"id": 4,
|
||||
"links": [],
|
||||
"options": {},
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
@@ -340,15 +385,19 @@
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 16,
|
||||
"schemaVersion": 21,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "mssql", "datasource-test"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {},
|
||||
"current": {
|
||||
"text": "Africa",
|
||||
"value": "Africa"
|
||||
},
|
||||
"datasource": "gdev-mssql",
|
||||
"definition": "",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Datacenter",
|
||||
@@ -368,8 +417,13 @@
|
||||
},
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {},
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
},
|
||||
"datasource": "gdev-mssql",
|
||||
"definition": "",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"label": "Hostname",
|
||||
@@ -392,6 +446,7 @@
|
||||
"auto_count": 30,
|
||||
"auto_min": "10s",
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "1m",
|
||||
"value": "1m"
|
||||
},
|
||||
@@ -488,5 +543,5 @@
|
||||
"timezone": "",
|
||||
"title": "Datasource tests - MSSQL",
|
||||
"uid": "86Js1xRmk",
|
||||
"version": 1
|
||||
"version": 2
|
||||
}
|
||||
|
||||
@@ -4,11 +4,35 @@
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"enable": false,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "gdev-mysql",
|
||||
"enable": false,
|
||||
"hide": false,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Single",
|
||||
"rawQuery": "SELECT\n createdAt as time,\n 'single' as text,\n hostname as tags\nFROM\n grafana_metric\nWHERE\n $__timeFilter(createdAt)\nORDER BY time\nLIMIT 1\n",
|
||||
"showIn": 0,
|
||||
"tags": [],
|
||||
"type": "tags"
|
||||
},
|
||||
{
|
||||
"datasource": "gdev-mysql",
|
||||
"enable": false,
|
||||
"hide": false,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Region",
|
||||
"rawQuery": "SELECT\n ADDTIME(createdAt, '00:01:00') as time,\n ADDTIME(createdAt, '00:06:00') as timeend,\n 'region' as text,\n hostname as tags\nFROM\n grafana_metric\nWHERE\n $__timeFilter(createdAt)\nORDER BY time\nLIMIT 1\n",
|
||||
"showIn": 0,
|
||||
"tags": [],
|
||||
"type": "tags"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -16,7 +40,7 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1532620738041,
|
||||
"iteration": 1576250298312,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
@@ -28,12 +52,14 @@
|
||||
"dashes": false,
|
||||
"datasource": "gdev-mysql",
|
||||
"fill": 2,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -48,6 +74,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -81,6 +110,7 @@
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Average logins / $summarize",
|
||||
"tooltip": {
|
||||
@@ -126,12 +156,14 @@
|
||||
"dashes": false,
|
||||
"datasource": "gdev-mysql",
|
||||
"fill": 2,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 18,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -146,6 +178,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -171,6 +206,7 @@
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Average payments started/ended / $summarize",
|
||||
"tooltip": {
|
||||
@@ -216,12 +252,14 @@
|
||||
"dashes": false,
|
||||
"datasource": "gdev-mysql",
|
||||
"fill": 2,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -236,6 +274,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -255,6 +296,7 @@
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Max CPU / $summarize",
|
||||
"tooltip": {
|
||||
@@ -305,6 +347,7 @@
|
||||
},
|
||||
"id": 6,
|
||||
"links": [],
|
||||
"options": {},
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
@@ -346,7 +389,8 @@
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 16,
|
||||
"refresh": false,
|
||||
"schemaVersion": 21,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "mysql", "datasource-tags"],
|
||||
"templating": {
|
||||
@@ -358,6 +402,7 @@
|
||||
"value": "America"
|
||||
},
|
||||
"datasource": "gdev-mysql",
|
||||
"definition": "",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Datacenter",
|
||||
@@ -378,10 +423,12 @@
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
},
|
||||
"datasource": "gdev-mysql",
|
||||
"definition": "",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"label": "Hostname",
|
||||
@@ -404,6 +451,7 @@
|
||||
"auto_count": 5,
|
||||
"auto_min": "10s",
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "1m",
|
||||
"value": "1m"
|
||||
},
|
||||
@@ -500,5 +548,5 @@
|
||||
"timezone": "",
|
||||
"title": "Datasource tests - MySQL",
|
||||
"uid": "DGsCac3kz",
|
||||
"version": 8
|
||||
"version": 2
|
||||
}
|
||||
|
||||
@@ -4,11 +4,35 @@
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"enable": false,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": "gdev-postgres",
|
||||
"enable": false,
|
||||
"hide": false,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Single",
|
||||
"rawQuery": "SELECT\n \"createdAt\" as time,\n 'single' as text,\n hostname as tags\nFROM\n grafana_metric\nWHERE\n $__timeFilter(\"createdAt\")\nORDER BY time\nLIMIT 1\n",
|
||||
"showIn": 0,
|
||||
"tags": [],
|
||||
"type": "tags"
|
||||
},
|
||||
{
|
||||
"datasource": "gdev-postgres",
|
||||
"enable": false,
|
||||
"hide": false,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"limit": 100,
|
||||
"name": "Region",
|
||||
"rawQuery": "SELECT\n \"createdAt\" + (interval '1 minute') as time,\n \"createdAt\" + (6 * interval '1 minute') as timeend,\n 'region' as text,\n hostname as tags\nFROM\n grafana_metric\nWHERE\n $__timeFilter(\"createdAt\")\nORDER BY time\nLIMIT 1\n",
|
||||
"showIn": 0,
|
||||
"tags": [],
|
||||
"type": "tags"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -16,7 +40,7 @@
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1532620601931,
|
||||
"iteration": 1576249087264,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
@@ -28,12 +52,14 @@
|
||||
"dashes": false,
|
||||
"datasource": "gdev-postgres",
|
||||
"fill": 2,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -48,6 +74,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -67,20 +96,59 @@
|
||||
{
|
||||
"alias": "",
|
||||
"format": "time_series",
|
||||
"group": [],
|
||||
"hide": false,
|
||||
"metricColumn": "none",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT\n $__timeGroup(\"createdAt\",'$summarize'),\n avg(value) as \"value\",\n hostname as \"metric\"\nFROM \n grafana_metric\nWHERE\n $__timeFilter(\"createdAt\") AND\n measurement = 'logins.count' AND\n hostname IN($host)\nGROUP BY time, metric\nORDER BY time",
|
||||
"refId": "A",
|
||||
"target": ""
|
||||
"select": [
|
||||
[
|
||||
{
|
||||
"params": ["value"],
|
||||
"type": "column"
|
||||
}
|
||||
]
|
||||
],
|
||||
"target": "",
|
||||
"timeColumn": "time",
|
||||
"where": [
|
||||
{
|
||||
"name": "$__timeFilter",
|
||||
"params": [],
|
||||
"type": "macro"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"alias": "",
|
||||
"format": "time_series",
|
||||
"group": [],
|
||||
"metricColumn": "none",
|
||||
"rawQuery": true,
|
||||
"rawSql": "SELECT\n $__timeGroup(\"createdAt\",'$summarize'),\n min(value) as \"value\",\n 'total avg' as \"metric\"\nFROM \n grafana_metric\nWHERE\n $__timeFilter(\"createdAt\") AND\n measurement = 'logins.count'\nGROUP BY time\nORDER BY time",
|
||||
"refId": "B"
|
||||
"refId": "B",
|
||||
"select": [
|
||||
[
|
||||
{
|
||||
"params": ["value"],
|
||||
"type": "column"
|
||||
}
|
||||
]
|
||||
],
|
||||
"timeColumn": "time",
|
||||
"where": [
|
||||
{
|
||||
"name": "$__timeFilter",
|
||||
"params": [],
|
||||
"type": "macro"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Average logins / $summarize",
|
||||
"tooltip": {
|
||||
@@ -126,12 +194,14 @@
|
||||
"dashes": false,
|
||||
"datasource": "gdev-postgres",
|
||||
"fill": 2,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 18,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -146,6 +216,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -171,6 +244,7 @@
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Average payments started/ended / $summarize",
|
||||
"tooltip": {
|
||||
@@ -216,12 +290,14 @@
|
||||
"dashes": false,
|
||||
"datasource": "gdev-postgres",
|
||||
"fill": 2,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
@@ -236,6 +312,9 @@
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
@@ -255,6 +334,7 @@
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Max CPU / $summarize",
|
||||
"tooltip": {
|
||||
@@ -305,6 +385,7 @@
|
||||
},
|
||||
"id": 6,
|
||||
"links": [],
|
||||
"options": {},
|
||||
"pageSize": null,
|
||||
"scroll": true,
|
||||
"showHeader": true,
|
||||
@@ -345,7 +426,7 @@
|
||||
"type": "table"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 16,
|
||||
"schemaVersion": 21,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "postgres", "datasource-test"],
|
||||
"templating": {
|
||||
@@ -357,6 +438,7 @@
|
||||
"value": "America"
|
||||
},
|
||||
"datasource": "gdev-postgres",
|
||||
"definition": "",
|
||||
"hide": 0,
|
||||
"includeAll": false,
|
||||
"label": "Datacenter",
|
||||
@@ -377,10 +459,12 @@
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
},
|
||||
"datasource": "gdev-postgres",
|
||||
"definition": "",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"label": "Hostname",
|
||||
@@ -403,6 +487,7 @@
|
||||
"auto_count": 5,
|
||||
"auto_min": "10s",
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "1m",
|
||||
"value": "1m"
|
||||
},
|
||||
@@ -499,5 +584,5 @@
|
||||
"timezone": "",
|
||||
"title": "Datasource tests - Postgres",
|
||||
"uid": "JYola5qzz",
|
||||
"version": 4
|
||||
"version": 5
|
||||
}
|
||||
|
||||
491
devenv/dev-dashboards/datasource-testdata/bar-gauge-demo2.json
Normal file
491
devenv/dev-dashboards/datasource-testdata/bar-gauge-demo2.json
Normal file
@@ -0,0 +1,491 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 32,
|
||||
"w": 9,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 4,
|
||||
"options": {
|
||||
"displayMode": "gradient",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "red",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "yellow",
|
||||
"value": 50
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "horizontal",
|
||||
"showUnfilled": true
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "D",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "E",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "G",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"labels": "",
|
||||
"refId": "H",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "I",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "J",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "K",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "L",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "M",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "N",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"labels": "",
|
||||
"refId": "O",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "P",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "Q",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 8,
|
||||
"x": 9,
|
||||
"y": 0
|
||||
},
|
||||
"id": 3,
|
||||
"options": {
|
||||
"displayMode": "gradient",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "vertical",
|
||||
"showUnfilled": true
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "D",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "E",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "G",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "H",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 33,
|
||||
"w": 7,
|
||||
"x": 17,
|
||||
"y": 0
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "blue",
|
||||
"value": 50
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "horizontal",
|
||||
"showUnfilled": true
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "K",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "L",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "M",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "N",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "O",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "P",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "Q",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "R",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "S",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "T",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "U",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "V",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "W",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "X",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 8,
|
||||
"x": 9,
|
||||
"y": 11
|
||||
},
|
||||
"id": 7,
|
||||
"options": {
|
||||
"displayMode": "gradient",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "vertical",
|
||||
"showUnfilled": true
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "D",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "E",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "G",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "H",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 8,
|
||||
"x": 9,
|
||||
"y": 22
|
||||
},
|
||||
"id": 8,
|
||||
"options": {
|
||||
"displayMode": "gradient",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "vertical",
|
||||
"showUnfilled": true
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "D",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "E",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "G",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "H",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "bargauge"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 21,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "demo"],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Bar Gauge Demo Unfilled",
|
||||
"uid": "xMsQdBfWz",
|
||||
"version": 5
|
||||
}
|
||||
@@ -222,7 +222,7 @@
|
||||
"text": "A",
|
||||
"value": ["A"]
|
||||
},
|
||||
"datasource": "TestData DB-1",
|
||||
"datasource": "gdev-testdata",
|
||||
"definition": "*",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
@@ -247,7 +247,7 @@
|
||||
"text": "AA",
|
||||
"value": ["AA"]
|
||||
},
|
||||
"datasource": "TestData DB-1",
|
||||
"datasource": "gdev-testdata",
|
||||
"definition": "$datacenter.*",
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
|
||||
530
devenv/dev-dashboards/panel-bargauge/panel_tests_bar_gauge2.json
Normal file
530
devenv/dev-dashboards/panel-bargauge/panel_tests_bar_gauge2.json
Normal file
@@ -0,0 +1,530 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 8,
|
||||
"links": [],
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"decimals": null,
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 50
|
||||
},
|
||||
{
|
||||
"color": "blue",
|
||||
"value": 70
|
||||
}
|
||||
],
|
||||
"unit": "watt"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "vertical",
|
||||
"showUnfilled": false
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "D",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "I",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "J",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "K",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "L",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "M",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "N",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "O",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "P",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "Q",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Basic vertical ",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"id": 22,
|
||||
"links": [],
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"decimals": null,
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "blue",
|
||||
"value": 25
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 37.5
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 43.75
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 50
|
||||
}
|
||||
],
|
||||
"unit": "watt"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "vertical",
|
||||
"showUnfilled": true
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "H",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "100,100,100"
|
||||
},
|
||||
{
|
||||
"refId": "J",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "K",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "L",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "M",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "N",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "O",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "P",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "Q",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Basic vertical (Unfilled)",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 10
|
||||
},
|
||||
"id": 12,
|
||||
"links": [],
|
||||
"options": {
|
||||
"displayMode": "gradient",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"decimals": null,
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "celsius"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "horizontal",
|
||||
"showUnfilled": false
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "Inside",
|
||||
"refId": "H",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "100,100,100"
|
||||
},
|
||||
{
|
||||
"alias": "Outhouse",
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Gradient ",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 10
|
||||
},
|
||||
"id": 23,
|
||||
"links": [],
|
||||
"options": {
|
||||
"displayMode": "gradient",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"decimals": null,
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "celsius"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "horizontal",
|
||||
"showUnfilled": true
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "Inside",
|
||||
"refId": "H",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "100,100,100"
|
||||
},
|
||||
{
|
||||
"alias": "Outhouse",
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Gradient (Unfilled)",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 19
|
||||
},
|
||||
"id": 21,
|
||||
"links": [],
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"decimals": null,
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "celsius"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "horizontal",
|
||||
"showUnfilled": false
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "Inside",
|
||||
"refId": "H",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "100,100,100"
|
||||
},
|
||||
{
|
||||
"alias": "Outhouse",
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Title to left of bar",
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 19
|
||||
},
|
||||
"id": 24,
|
||||
"links": [],
|
||||
"options": {
|
||||
"displayMode": "basic",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"decimals": null,
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "celsius"
|
||||
},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "horizontal",
|
||||
"showUnfilled": true
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "Inside",
|
||||
"refId": "H",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "100,100,100"
|
||||
},
|
||||
{
|
||||
"alias": "Outhouse",
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Title to left of bar (Filled)",
|
||||
"type": "bargauge"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 21,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "panel-tests"],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"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"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Bar Gauge 2",
|
||||
"uid": "sRrEibfZk",
|
||||
"version": 5
|
||||
}
|
||||
@@ -20,142 +20,352 @@
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 20,
|
||||
"h": 3,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"interval": "10m",
|
||||
"id": 6,
|
||||
"interval": "6m",
|
||||
"options": {
|
||||
"colorMode": 0,
|
||||
"displayMode": 2,
|
||||
"colorMode": "background",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
"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"
|
||||
},
|
||||
"override": {},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"graphMode": "area",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
"labels": "",
|
||||
"min": 0,
|
||||
"noise": 5,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 6,
|
||||
"spread": 100
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 3
|
||||
},
|
||||
"id": 10,
|
||||
"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",
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "D",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "E",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "G",
|
||||
"scenarioId": "random_walk"
|
||||
"alias": "__house_locations",
|
||||
"min": 0,
|
||||
"noise": 10,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 6,
|
||||
"spread": 10
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "singlestat2"
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 20,
|
||||
"h": 6,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"id": 14,
|
||||
"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",
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__house_locations",
|
||||
"min": 0,
|
||||
"noise": 10,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 6,
|
||||
"spread": 10
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 14,
|
||||
"w": 6,
|
||||
"x": 0,
|
||||
"y": 15
|
||||
},
|
||||
"id": 13,
|
||||
"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",
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"alias": "__server_names",
|
||||
"min": 0,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"seriesCount": 7,
|
||||
"spread": 100
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 4,
|
||||
"x": 20,
|
||||
"y": 0
|
||||
"x": 6,
|
||||
"y": 15
|
||||
},
|
||||
"id": 8,
|
||||
"interval": "10m",
|
||||
"options": {
|
||||
"colorMode": 0,
|
||||
"displayMode": 2,
|
||||
"colorMode": "background",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
"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"
|
||||
},
|
||||
"override": {},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"graphMode": "line",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
@@ -189,60 +399,65 @@
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "singlestat2"
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
"w": 20,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
"h": 9,
|
||||
"w": 8,
|
||||
"x": 10,
|
||||
"y": 15
|
||||
},
|
||||
"id": 6,
|
||||
"id": 12,
|
||||
"interval": "10m",
|
||||
"options": {
|
||||
"colorMode": 0,
|
||||
"displayMode": 2,
|
||||
"colorMode": "background",
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
"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"
|
||||
},
|
||||
"override": {},
|
||||
"overrides": [],
|
||||
"values": false
|
||||
},
|
||||
"orientation": "auto",
|
||||
"graphMode": "line",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"pluginVersion": "6.6.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
@@ -276,358 +491,10 @@
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "singlestat2"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 20,
|
||||
"x": 0,
|
||||
"y": 10
|
||||
},
|
||||
"id": 3,
|
||||
"interval": "10m",
|
||||
"options": {
|
||||
"colorMode": 0,
|
||||
"displayMode": 3,
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
},
|
||||
"override": {},
|
||||
"values": false
|
||||
},
|
||||
"orientation": "auto",
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "D",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "E",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "G",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "singlestat2"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 20,
|
||||
"x": 0,
|
||||
"y": 16
|
||||
},
|
||||
"id": 4,
|
||||
"interval": "10m",
|
||||
"options": {
|
||||
"colorMode": 0,
|
||||
"displayMode": 0,
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
},
|
||||
"override": {},
|
||||
"values": false
|
||||
},
|
||||
"orientation": "auto",
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "D",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "E",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "G",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "singlestat2"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 21,
|
||||
"w": 4,
|
||||
"x": 20,
|
||||
"y": 20
|
||||
},
|
||||
"id": 9,
|
||||
"interval": "10m",
|
||||
"options": {
|
||||
"colorMode": 0,
|
||||
"displayMode": 0,
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
},
|
||||
"override": {},
|
||||
"values": false
|
||||
},
|
||||
"orientation": "auto",
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "D",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "E",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "G",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "singlestat2"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 20,
|
||||
"x": 0,
|
||||
"y": 22
|
||||
},
|
||||
"id": 5,
|
||||
"interval": "10m",
|
||||
"options": {
|
||||
"colorMode": 0,
|
||||
"displayMode": 1,
|
||||
"fieldOptions": {
|
||||
"calcs": ["mean"],
|
||||
"defaults": {
|
||||
"mappings": [],
|
||||
"max": 100,
|
||||
"min": 0,
|
||||
"thresholds": [
|
||||
{
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 10
|
||||
},
|
||||
{
|
||||
"color": "purple",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 40
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
],
|
||||
"unit": "percent"
|
||||
},
|
||||
"override": {},
|
||||
"values": false
|
||||
},
|
||||
"orientation": "auto",
|
||||
"sparkline": {
|
||||
"show": true
|
||||
}
|
||||
},
|
||||
"pluginVersion": "6.5.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "C",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "D",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "E",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "F",
|
||||
"scenarioId": "random_walk"
|
||||
},
|
||||
{
|
||||
"refId": "G",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"type": "singlestat2"
|
||||
"type": "stat"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 20,
|
||||
"schemaVersion": 22,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "panel-tests"],
|
||||
"templating": {
|
||||
@@ -641,7 +508,5 @@
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Stat",
|
||||
"uid": "jWWHNJpWz",
|
||||
"version": 6
|
||||
"title": "Panel Tests - Stat"
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
image: grafana/fake-data-gen
|
||||
links:
|
||||
- elasticsearch5
|
||||
# network_mode: bridge
|
||||
environment:
|
||||
FD_SERVER: elasticsearch5
|
||||
FD_DATASOURCE: elasticsearch
|
||||
FD_PORT: 10200
|
||||
FD_PORT: 9200
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
|
||||
fake-elastic6-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: bridge
|
||||
links:
|
||||
- elasticsearch6
|
||||
environment:
|
||||
FD_SERVER: elasticsearch6
|
||||
FD_DATASOURCE: elasticsearch6
|
||||
FD_PORT: 11200
|
||||
FD_PORT: 9200
|
||||
|
||||
filebeat6:
|
||||
image: docker.elastic.co/beats/filebeat-oss:6.7.1
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
|
||||
fake-elastic7-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: bridge
|
||||
links:
|
||||
- elasticsearch7
|
||||
environment:
|
||||
FD_SERVER: elasticsearch7
|
||||
FD_DATASOURCE: elasticsearch7
|
||||
FD_PORT: 12200
|
||||
FD_PORT: 9200
|
||||
|
||||
filebeat7:
|
||||
image: docker.elastic.co/beats/filebeat-oss:7.0.0
|
||||
@@ -24,7 +26,6 @@
|
||||
|
||||
metricbeat7:
|
||||
image: docker.elastic.co/beats/metricbeat-oss:7.0.0
|
||||
network_mode: host
|
||||
command: metricbeat -e -strict.perms=false
|
||||
user: root
|
||||
volumes:
|
||||
@@ -35,5 +36,7 @@
|
||||
image: docker.elastic.co/kibana/kibana-oss:7.0.0
|
||||
ports:
|
||||
- "5601:5601"
|
||||
links:
|
||||
- elasticsearch7
|
||||
environment:
|
||||
ELASTICSEARCH_HOSTS: http://elasticsearch7:9200
|
||||
|
||||
@@ -28,11 +28,11 @@ processors:
|
||||
- add_cloud_metadata: ~
|
||||
|
||||
output.elasticsearch:
|
||||
hosts: ["localhost:12200"]
|
||||
hosts: ["elasticsearch7:9200"]
|
||||
index: "metricbeat-%{+yyyy.MM.dd}"
|
||||
|
||||
setup.template.name: "metricbeat"
|
||||
setup.template.pattern: "metricbeat-*"
|
||||
setup.template.settings:
|
||||
index.number_of_shards: 1
|
||||
index.number_of_replicas: 1
|
||||
index.number_of_replicas: 1
|
||||
|
||||
@@ -1,6 +1,27 @@
|
||||
jaeger:
|
||||
image: jaegertracing/all-in-one:latest
|
||||
ports:
|
||||
- "127.0.0.1:6831:6831/udp"
|
||||
- "6831:6831"
|
||||
- "16686:16686"
|
||||
# Additional loki to generate some traces
|
||||
# datasource URL: http://localhost:3100/
|
||||
loki:
|
||||
image: grafana/loki:master
|
||||
ports:
|
||||
- "3100:3100"
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
# Optional jaeger tracing
|
||||
environment:
|
||||
- JAEGER_AGENT_HOST=jaeger
|
||||
- JAEGER_AGENT_PORT=6831
|
||||
- JAEGER_SAMPLER_TYPE=const
|
||||
- JAEGER_SAMPLER_PARAM=1
|
||||
promtail:
|
||||
image: grafana/promtail:master
|
||||
volumes:
|
||||
- ./docker/blocks/loki/config.yaml:/etc/promtail/docker-config.yaml
|
||||
- /var/log:/var/log
|
||||
- ../data/log:/var/log/grafana
|
||||
command:
|
||||
-config.file=/etc/promtail/docker-config.yaml
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# datasource URL: http://localhost:3100/
|
||||
loki:
|
||||
image: grafana/loki:master
|
||||
ports:
|
||||
- "3100:3100"
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
|
||||
promtail:
|
||||
image: grafana/promtail:master
|
||||
volumes:
|
||||
|
||||
27
devenv/docker/blocks/loki0.3/config.yaml
Normal file
27
devenv/docker/blocks/loki0.3/config.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
client:
|
||||
url: http://loki0.3:3100/api/prom/push
|
||||
|
||||
scrape_configs:
|
||||
- job_name: system
|
||||
entry_parser: raw
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: varlogs
|
||||
__path__: /var/log/*log
|
||||
- job_name: grafana
|
||||
entry_parser: raw
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: grafana
|
||||
__path__: /var/log/grafana/*log
|
||||
15
devenv/docker/blocks/loki0.3/docker-compose.yaml
Normal file
15
devenv/docker/blocks/loki0.3/docker-compose.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# datasource URL: http://localhost:3103/
|
||||
loki0.3:
|
||||
image: grafana/loki:v0.3.0
|
||||
ports:
|
||||
- "3103:3100"
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
|
||||
promtail0.3:
|
||||
image: grafana/promtail:v0.3.0
|
||||
volumes:
|
||||
- ./docker/blocks/loki0.3/config.yaml:/etc/promtail/docker-config.yaml
|
||||
- /var/log:/var/log
|
||||
- ../data/log:/var/log/grafana
|
||||
command:
|
||||
-config.file=/etc/promtail/docker-config.yaml
|
||||
27
devenv/docker/blocks/loki0.4/config.yaml
Normal file
27
devenv/docker/blocks/loki0.4/config.yaml
Normal file
@@ -0,0 +1,27 @@
|
||||
server:
|
||||
http_listen_port: 9080
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: /tmp/positions.yaml
|
||||
|
||||
client:
|
||||
url: http://loki0.4:3100/api/prom/push
|
||||
|
||||
scrape_configs:
|
||||
- job_name: system
|
||||
entry_parser: raw
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: varlogs
|
||||
__path__: /var/log/*log
|
||||
- job_name: grafana
|
||||
entry_parser: raw
|
||||
static_configs:
|
||||
- targets:
|
||||
- localhost
|
||||
labels:
|
||||
job: grafana
|
||||
__path__: /var/log/grafana/*log
|
||||
15
devenv/docker/blocks/loki0.4/docker-compose.yaml
Normal file
15
devenv/docker/blocks/loki0.4/docker-compose.yaml
Normal file
@@ -0,0 +1,15 @@
|
||||
# datasource URL: http://localhost:3104/
|
||||
loki0.4:
|
||||
image: grafana/loki:v0.4.0
|
||||
ports:
|
||||
- "3104:3100"
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
|
||||
promtail0.4:
|
||||
image: grafana/promtail:v0.4.0
|
||||
volumes:
|
||||
- ./docker/blocks/loki0.4/config.yaml:/etc/promtail/docker-config.yaml
|
||||
- /var/log:/var/log
|
||||
- ../data/log:/var/log/grafana
|
||||
command:
|
||||
-config.file=/etc/promtail/docker-config.yaml
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM microsoft/mssql-server-linux:2017-CU4
|
||||
FROM mcr.microsoft.com/mssql/server:2017-CU4-ubuntu
|
||||
WORKDIR /usr/setup
|
||||
COPY . /usr/setup
|
||||
RUN chmod +x /usr/setup/setup.sh
|
||||
|
||||
42
devenv/docker/blocks/nginx_proxy_mac/nginx_login_only.conf
Normal file
42
devenv/docker/blocks/nginx_proxy_mac/nginx_login_only.conf
Normal file
@@ -0,0 +1,42 @@
|
||||
events { worker_connections 1024; }
|
||||
|
||||
http {
|
||||
sendfile on;
|
||||
|
||||
proxy_redirect off;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
|
||||
server {
|
||||
listen 10080;
|
||||
|
||||
location /grafana/ {
|
||||
################################################################
|
||||
# Enable these settings to test with basic auth and an auth proxy header
|
||||
# the htpasswd file contains an admin user with password admin and
|
||||
# user1: grafana and user2: grafana
|
||||
################################################################
|
||||
|
||||
|
||||
################################################################
|
||||
# To use the auth proxy header, set the following in custom.ini:
|
||||
# [auth.proxy]
|
||||
# enabled = true
|
||||
# header_name = X-WEBAUTH-USER
|
||||
# header_property = username
|
||||
################################################################
|
||||
|
||||
location /grafana/login {
|
||||
auth_basic "Restricted Content";
|
||||
auth_basic_user_file /etc/nginx/htpasswd;
|
||||
proxy_set_header X-WEBAUTH-USER $remote_user;
|
||||
proxy_pass http://host.docker.internal:3000/login;
|
||||
}
|
||||
|
||||
proxy_set_header Authorization "";
|
||||
proxy_pass http://host.docker.internal:3000/;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
postgrestest:
|
||||
postgres:
|
||||
image: postgres:${postgres_version}
|
||||
environment:
|
||||
POSTGRES_USER: grafana
|
||||
@@ -7,6 +7,11 @@
|
||||
ports:
|
||||
- "5432:5432"
|
||||
command: postgres -c log_connections=on -c logging_collector=on -c log_destination=stderr -c log_directory=/var/log/postgresql
|
||||
healthcheck:
|
||||
test: [ "CMD", "pg_isready", "-q", "-d", "$$POSTGRES_DATABASE", "-U", "$$POSTGRES_USER" ]
|
||||
timeout: 45s
|
||||
interval: 10s
|
||||
retries: 10
|
||||
|
||||
fake-postgres-data:
|
||||
image: grafana/fake-data-gen
|
||||
@@ -14,3 +19,6 @@
|
||||
environment:
|
||||
FD_DATASOURCE: postgres
|
||||
FD_PORT: 5432
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# This Dockerfile builds an image for a client_golang example.
|
||||
|
||||
# Builder image, where we build the example.
|
||||
FROM golang:1.13.0 AS builder
|
||||
FROM golang:1.13.4 AS builder
|
||||
# Download prometheus/client_golang/examples/random first
|
||||
RUN go get github.com/prometheus/client_golang/examples/random
|
||||
WORKDIR /go/src/github.com/prometheus/client_golang
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
version: "2"
|
||||
version: "2.1"
|
||||
services:
|
||||
|
||||
@@ -35,6 +35,12 @@ Run load test for 10 virtual users:
|
||||
$ ./run.sh -v 10
|
||||
```
|
||||
|
||||
Run auth token slow test (random query latency between 1 and 30 seconds):
|
||||
|
||||
```bash
|
||||
$ ./run.sh -c auth_token_slow_test -s 30
|
||||
```
|
||||
|
||||
Run auth proxy test:
|
||||
|
||||
```bash
|
||||
|
||||
71
devenv/docker/loadtest/annotations_by_tag_test.js
Normal file
71
devenv/docker/loadtest/annotations_by_tag_test.js
Normal file
@@ -0,0 +1,71 @@
|
||||
import { sleep, check, group } from 'k6';
|
||||
import { createClient, createBasicAuthClient } from './modules/client.js';
|
||||
import { createTestOrgIfNotExists, createTestdataDatasourceIfNotExists } from './modules/util.js';
|
||||
|
||||
export let options = {
|
||||
noCookiesReset: true
|
||||
};
|
||||
|
||||
let endpoint = __ENV.URL || 'http://localhost:3000';
|
||||
const client = createClient(endpoint);
|
||||
|
||||
export const setup = () => {
|
||||
const basicAuthClient = createBasicAuthClient(endpoint, 'admin', 'admin');
|
||||
const orgId = createTestOrgIfNotExists(basicAuthClient);
|
||||
const datasourceId = createTestdataDatasourceIfNotExists(basicAuthClient);
|
||||
client.withOrgId(orgId);
|
||||
return {
|
||||
orgId: orgId,
|
||||
datasourceId: datasourceId,
|
||||
};
|
||||
}
|
||||
|
||||
export default (data) => {
|
||||
group("annotation by tag test", () => {
|
||||
if (__ITER === 0) {
|
||||
group("user authenticates thru ui with username and password", () => {
|
||||
let res = client.ui.login('admin', 'admin');
|
||||
|
||||
check(res, {
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
'response has cookie \'grafana_session\' with 32 characters': (r) => r.cookies.grafana_session[0].value.length === 32,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (__ITER !== 0) {
|
||||
group("batch tsdb requests with annotations by tag", () => {
|
||||
const batchCount = 20;
|
||||
const requests = [];
|
||||
const payload = {
|
||||
from: '1547765247624',
|
||||
to: '1547768847624',
|
||||
queries: [{
|
||||
refId: 'A',
|
||||
scenarioId: 'random_walk',
|
||||
intervalMs: 10000,
|
||||
maxDataPoints: 433,
|
||||
datasourceId: data.datasourceId,
|
||||
}]
|
||||
};
|
||||
|
||||
requests.push({ method: 'GET', url: '/api/annotations?from=1580825186534&to=1580846786535' });
|
||||
|
||||
for (let n = 0; n < batchCount; n++) {
|
||||
requests.push({ method: 'POST', url: '/api/tsdb/query', body: payload });
|
||||
}
|
||||
|
||||
let responses = client.batch(requests);
|
||||
for (let n = 0; n < batchCount; n++) {
|
||||
check(responses[n], {
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
sleep(5)
|
||||
}
|
||||
|
||||
export const teardown = (data) => {}
|
||||
73
devenv/docker/loadtest/auth_token_slow_test.js
Normal file
73
devenv/docker/loadtest/auth_token_slow_test.js
Normal file
@@ -0,0 +1,73 @@
|
||||
import { sleep, check, group } from 'k6';
|
||||
import { createClient, createBasicAuthClient } from './modules/client.js';
|
||||
import { createTestOrgIfNotExists, createTestdataDatasourceIfNotExists } from './modules/util.js';
|
||||
|
||||
export let options = {
|
||||
noCookiesReset: true
|
||||
};
|
||||
|
||||
let endpoint = __ENV.URL || 'http://localhost:3000';
|
||||
const slowQuery = (__ENV.SLOW_QUERY && __ENV.SLOW_QUERY.length > 0) ? parseInt(__ENV.SLOW_QUERY, 10) : 5;
|
||||
const client = createClient(endpoint);
|
||||
|
||||
export const setup = () => {
|
||||
const basicAuthClient = createBasicAuthClient(endpoint, 'admin', 'admin');
|
||||
const orgId = createTestOrgIfNotExists(basicAuthClient);
|
||||
const datasourceId = createTestdataDatasourceIfNotExists(basicAuthClient);
|
||||
client.withOrgId(orgId);
|
||||
return {
|
||||
orgId: orgId,
|
||||
datasourceId: datasourceId,
|
||||
};
|
||||
}
|
||||
|
||||
export default (data) => {
|
||||
group(`user auth token slow test (queries between 1 and ${slowQuery} seconds)`, () => {
|
||||
if (__ITER === 0) {
|
||||
group("user authenticates thru ui with username and password", () => {
|
||||
let res = client.ui.login('admin', 'admin');
|
||||
|
||||
check(res, {
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
'response has cookie \'grafana_session\' with 32 characters': (r) => r.cookies.grafana_session[0].value.length === 32,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (__ITER !== 0) {
|
||||
group('batch tsdb requests', () => {
|
||||
const batchCount = 20;
|
||||
const requests = [];
|
||||
const payload = {
|
||||
from: '1547765247624',
|
||||
to: '1547768847624',
|
||||
queries: [{
|
||||
refId: 'A',
|
||||
scenarioId: 'slow_query',
|
||||
stringInput: `${Math.floor(Math.random() * slowQuery) + 1}s`,
|
||||
intervalMs: 10000,
|
||||
maxDataPoints: 433,
|
||||
datasourceId: data.datasourceId,
|
||||
}]
|
||||
};
|
||||
|
||||
requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' });
|
||||
|
||||
for (let n = 0; n < batchCount; n++) {
|
||||
requests.push({ method: 'POST', url: '/api/tsdb/query', body: payload });
|
||||
}
|
||||
|
||||
let responses = client.batch(requests);
|
||||
for (let n = 0; n < batchCount; n++) {
|
||||
check(responses[n], {
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
sleep(5)
|
||||
}
|
||||
|
||||
export const teardown = (data) => {}
|
||||
@@ -144,6 +144,7 @@ export const BaseClient = class BaseClient {
|
||||
let params = requests[n].params || {};
|
||||
params.headers = params.headers || {};
|
||||
params.headers['Content-Type'] = 'application/json';
|
||||
params.timeout = 120000;
|
||||
this.beforeRequest(params);
|
||||
this.onBeforeRequest(params);
|
||||
requests[n].params = params;
|
||||
|
||||
@@ -7,8 +7,9 @@ run() {
|
||||
url='http://localhost:3000'
|
||||
vus='2'
|
||||
testcase='auth_token_test'
|
||||
slowQuery=''
|
||||
|
||||
while getopts ":d:u:v:c:" o; do
|
||||
while getopts ":d:u:v:c:s:" o; do
|
||||
case "${o}" in
|
||||
d)
|
||||
duration=${OPTARG}
|
||||
@@ -22,11 +23,14 @@ run() {
|
||||
c)
|
||||
testcase=${OPTARG}
|
||||
;;
|
||||
s)
|
||||
slowQuery=${OPTARG}
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
docker run -t --network=host -v $PWD:/src -e URL=$url --rm -i loadimpact/k6:master run --vus $vus --duration $duration src/$testcase.js
|
||||
docker run -t --network=host -v $PWD:/src -e URL=$url -e SLOW_QUERY=$slowQuery --rm -i loadimpact/k6:master run --vus $vus --duration $duration src/$testcase.js
|
||||
}
|
||||
|
||||
run "$@"
|
||||
|
||||
1
docs/.gitignore
vendored
Normal file
1
docs/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
data/menu.yaml
|
||||
@@ -1,14 +0,0 @@
|
||||
FROM grafana/docs-base:latest
|
||||
|
||||
# to get the git info for this repo
|
||||
# COPY config.toml /site
|
||||
|
||||
# RUN rm -rf /site/content/*
|
||||
|
||||
# COPY ./sources /site/content/docs/
|
||||
|
||||
COPY config.toml /site
|
||||
COPY awsconfig /site
|
||||
COPY versions.json /site/static/js
|
||||
|
||||
VOLUME ["/site/content"]
|
||||
@@ -1,38 +1,9 @@
|
||||
.PHONY: all default docs docs-build docs-shell shell checkvars
|
||||
.PHONY: docs docs-test
|
||||
|
||||
# to allow `make DOCSPORT=9000 docs`
|
||||
DOCSPORT := 3004
|
||||
docs:
|
||||
docker pull grafana/docs-base:latest
|
||||
docker run -v $(PWD)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it grafana/docs-base:latest /bin/bash -c 'npm i && make webpack && hugo server -p 3002 -D --ignoreCache --baseUrl http://localhost:3002 --bind 0.0.0.0'
|
||||
|
||||
DOCKER_DOCS_IMAGE := grafana/grafana-docs
|
||||
SOURCES_HOST_DIR := "$(shell pwd)/sources"
|
||||
|
||||
# assuming grafana and grafana.org-repo to be checked out in the same folder
|
||||
DEFAULT_LAYOUTS_DIR := "$(shell pwd)/../../../../../../grafana.org/layouts"
|
||||
|
||||
# to allow `make DOCSDIR=docs docs-shell` (to create a bind mount in docs)
|
||||
LAYOUTS_MOUNT := $(if $(LAYOUTS),-v $(DEFAULT_LAYOUTS_DIR):/site/layouts)
|
||||
DOCS_MOUNT := -v $(SOURCES_HOST_DIR):/site/content
|
||||
|
||||
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) $(LAYOUTS_MOUNT) -e NOCACHE -p 3004:3004 -p 3005:3005
|
||||
|
||||
VERSION := $(shell head -n 1 VERSION)
|
||||
|
||||
default: docs
|
||||
|
||||
checkvars:
|
||||
ifndef ENV
|
||||
$(error ENV is undefined set via ENV=staging or ENV=prod as argument to make)
|
||||
endif
|
||||
|
||||
docs: docs-build
|
||||
$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs && grunt connect --port=3004"
|
||||
|
||||
watch: docs-build
|
||||
$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) $(LAYOUTS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs && grunt connect --port=3004 & grunt watch --port=3004 --env=dev-docs"
|
||||
|
||||
publish: checkvars docs-build
|
||||
$(info Publishing ENV=${ENV} and VERSION=${VERSION})
|
||||
$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh ${ENV}-docs ${VERSION}"
|
||||
|
||||
docs-build:
|
||||
docker build -t "$(DOCKER_DOCS_IMAGE)" --no-cache .
|
||||
docs-test:
|
||||
docker pull grafana/docs-base:latest
|
||||
docker run -v $(PWD)/sources:/hugo/content/docs/grafana/latest --rm -it grafana/docs-base:latest /bin/bash -c 'npm i && make prod'
|
||||
@@ -1,90 +1,38 @@
|
||||
### Note for external contributors
|
||||
# Building the docs locally
|
||||
|
||||
We are currently working on migrating the docs to a new static website. The `grafana/website` repository will be private during this migration, which unfortunately means the docs site can't be built without access.
|
||||
When you contribute to documentation, it is a good practice to build the docs on your local machine to make sure your changes appear as you expect. This README explains the process for doing that.
|
||||
|
||||
The Markdown content however, is still public in this repository. We still encourage pull requests to make the docs better, and we will make sure the changed content works well on the current docs site. Include any images in your pull request, and we will move them to the `grafana/website` repository.
|
||||
## Requirements
|
||||
|
||||
# Building the docs
|
||||
Docker >= 2.1.0.3
|
||||
|
||||
To build the docs locally, you need to have Docker installed. The docs are built using [Hugo](http://gohugo.io/) - a static site generator.
|
||||
## Build the doc site
|
||||
|
||||
**Prepare the Docker image**:
|
||||
1. In the command line, make sure you are in the docs folder: `cd docs`.
|
||||
2. Run `make docs`. This launches a preview of the docs website at `http://localhost:3002/docs/grafana/latest/` which will refresh automatically when changes to content in the `sources` directory are made.
|
||||
|
||||
> Due to migration to new static site, the Docker image needs to be built from `old-docs` branch.
|
||||
---
|
||||
|
||||
Git clone `grafana/website` repo. Run these commands in the root of that repo. **Note** that you may require `sudo`
|
||||
when running `make docs-build` depending on how your system's Docker
|
||||
service is configured):
|
||||
## Content guidelines
|
||||
|
||||
```
|
||||
git clone https://github.com/grafana/website
|
||||
cd website
|
||||
make docs-build
|
||||
```
|
||||
Edit content in the `sources` directory.
|
||||
|
||||
**Build the Documentation**:
|
||||
### Using `relref` for internal links
|
||||
|
||||
Now that the Docker image has been prepared we can build the
|
||||
grafana docs and start a docs server.
|
||||
Use the Hugo shortcode [relref](https://gohugo.io/content-management/cross-references/#use-ref-and-relref) any time you are linking to other internal docs pages.
|
||||
|
||||
If you have not cloned the Grafana repository already then:
|
||||
### Edit the side menu
|
||||
|
||||
```
|
||||
cd ..
|
||||
git clone https://github.com/grafana/grafana
|
||||
```
|
||||
Edit [sources/menu.yaml](sources/menu.yaml) to make changes to the sidebar. Stop and rerun the `make docs` command for changes to take effect.
|
||||
|
||||
Switch your working directory to the directory this file
|
||||
(README.md) is in.
|
||||
### Add images
|
||||
|
||||
```
|
||||
cd grafana/docs
|
||||
```
|
||||
Images are currently hosted in the grafana/website repo.
|
||||
|
||||
An AWS config file is required to build the docs Docker image and to publish the site to AWS. If you are building locally only and do not have any AWS credentials for docs.grafana.org then create an empty file named `awsconfig` in the current directory.
|
||||
---
|
||||
|
||||
```
|
||||
touch awsconfig
|
||||
```
|
||||
## Deploy changes to grafana.com
|
||||
|
||||
Then run (possibly with `sudo`):
|
||||
When a PR is merged to master with changes in the `docs` directory, those changes are automatically synched to the grafana/website repo on the `docs-grafana` branch.
|
||||
|
||||
```
|
||||
make watch
|
||||
```
|
||||
|
||||
This command will not return control of the shell to the user. Instead
|
||||
the command is now running a new Docker container built from the image
|
||||
we created in the previous step.
|
||||
|
||||
Open [localhost:3004](http://localhost:3004) to view the docs.
|
||||
|
||||
### Images and Content
|
||||
|
||||
All markdown files are part of [this repository](https://github.com/grafana/grafana). However, all images are added to the [website repository](https://github.com/grafana/website). Therefore, the process of adding images is not as straightforward. These are the steps:
|
||||
|
||||
1. Ensure you create a feature branch within the [website repository](https://github.com/grafana/website) to make the change. This branch needs to be based on the `old-docs` branch.
|
||||
1. Ensure the image(s) are compressed and optimised e.g. Using [tinypng](https://tinypng.com/).
|
||||
1. Add the image(s) to the `/static/img/docs` directory.
|
||||
1. Then, make a commit that adds the image(s).
|
||||
1. The Pull Request you create needs to target where you branched off, the branch `old-docs`.
|
||||
|
||||
Finally, run:
|
||||
|
||||
```
|
||||
make docs-build
|
||||
```
|
||||
|
||||
This will rebuild the docs Docker image.
|
||||
|
||||
To be able to use your image(s) you have to quit (Ctrl+C) the `make watch` command (that you run in the same directory as this README). Then simply rerun `make watch`, it will restart the docs server but now with access to your image(s).
|
||||
|
||||
### Editing content
|
||||
|
||||
Changes to the markdown files should automatically cause a docs rebuild and live reload should reload the page in your browser.
|
||||
|
||||
### Troubleshooting
|
||||
|
||||
#### Running `make watch` errors out with `Warning: Task "default" not found.`
|
||||
|
||||
Ensure that the Docker image from the [website repository](https://github.com/grafana/website) is built using the `old-docs` branch.
|
||||
In order to make those changes live, open a PR in the website repo that merges the `docs-grafana` branch into `master`. Then follow the publishing guidelines in that repo.
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
baseurl = "http://localhost:3002/"
|
||||
languageCode = "en-us"
|
||||
title = "Grafana Documentation"
|
||||
canonifyurls = true
|
||||
relativeURLs = false
|
||||
verbose = true
|
||||
enableRobotsTXT = true
|
||||
disableSitemap = false
|
||||
disableRSS = false
|
||||
preservetaxonomynames = true
|
||||
metaDataFormat = "yaml"
|
||||
|
||||
[taxonomies]
|
||||
tag = "tags"
|
||||
category = "categories"
|
||||
|
||||
[permalinks]
|
||||
blog = ":year/:month/:day/:title/"
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 23.0.4, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 85.12 92.46" style="enable-background:new 0 0 85.12 92.46;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:url(#SVGID_1_);}
|
||||
</style>
|
||||
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="42.562" y1="113.2595" x2="42.562" y2="28.7828">
|
||||
<stop offset="0" style="stop-color:#FFF200"/>
|
||||
<stop offset="1" style="stop-color:#F15A29"/>
|
||||
</linearGradient>
|
||||
<path class="st0" d="M85.01,40.8c-0.14-1.55-0.41-3.35-0.93-5.32c-0.51-1.97-1.28-4.13-2.39-6.37c-1.12-2.24-2.57-4.57-4.47-6.82
|
||||
c-0.74-0.88-1.54-1.76-2.42-2.6c1.3-5.17-1.59-9.65-1.59-9.65c-4.98-0.31-8.14,1.54-9.31,2.39c-0.2-0.08-0.39-0.17-0.59-0.25
|
||||
c-0.85-0.34-1.72-0.66-2.61-0.95c-0.89-0.28-1.81-0.54-2.74-0.76c-0.94-0.22-1.89-0.4-2.86-0.55c-0.17-0.03-0.34-0.05-0.51-0.07
|
||||
C52.41,2.9,46.18,0,46.18,0c-6.95,4.41-8.27,10.57-8.27,10.57s-0.03,0.14-0.07,0.36c-0.38,0.11-0.77,0.22-1.15,0.34
|
||||
c-0.53,0.16-1.06,0.36-1.59,0.55c-0.53,0.21-1.06,0.41-1.58,0.64c-1.05,0.45-2.09,0.96-3.1,1.53c-0.99,0.55-1.95,1.16-2.9,1.82
|
||||
c-0.14-0.06-0.24-0.11-0.24-0.11c-9.62-3.68-18.17,0.75-18.17,0.75c-0.78,10.24,3.84,16.68,4.76,17.86
|
||||
c-0.23,0.63-0.44,1.27-0.64,1.92c-0.71,2.32-1.24,4.7-1.57,7.16c-0.05,0.35-0.09,0.71-0.13,1.07C2.63,48.84,0,57.84,0,57.84
|
||||
c7.42,8.53,16.07,9.06,16.07,9.06c0.01-0.01,0.02-0.01,0.02-0.02c1.1,1.96,2.37,3.83,3.8,5.57c0.6,0.73,1.23,1.43,1.88,2.11
|
||||
c-2.71,7.74,0.38,14.18,0.38,14.18c8.26,0.31,13.69-3.61,14.83-4.52c0.82,0.28,1.66,0.53,2.5,0.74c2.54,0.65,5.14,1.04,7.74,1.15
|
||||
c0.65,0.03,1.3,0.04,1.95,0.04l0.31,0l0.21-0.01l0.41-0.01l0.4-0.02l0.01,0.01c3.89,5.55,10.74,6.34,10.74,6.34
|
||||
c4.87-5.13,5.15-10.22,5.15-11.33l0,0c0,0,0-0.04,0-0.07c0-0.09,0-0.15,0-0.15s0,0,0,0c0-0.08-0.01-0.15-0.01-0.23
|
||||
c1.02-0.72,2-1.49,2.92-2.31c1.95-1.76,3.65-3.77,5.06-5.93c0.13-0.2,0.26-0.41,0.39-0.62c5.51,0.32,9.39-3.41,9.39-3.41
|
||||
c-0.91-5.74-4.18-8.54-4.87-9.07l0,0c0,0-0.03-0.02-0.07-0.05c-0.04-0.03-0.06-0.05-0.06-0.05l0,0c-0.04-0.02-0.08-0.05-0.12-0.08
|
||||
c0.03-0.35,0.06-0.69,0.08-1.04c0.04-0.62,0.06-1.24,0.06-1.85l0-0.46l0-0.23l0-0.12c0-0.16,0-0.1,0-0.16l-0.02-0.38l-0.03-0.52
|
||||
c-0.01-0.18-0.02-0.34-0.04-0.5c-0.01-0.16-0.03-0.32-0.05-0.48l-0.06-0.48l-0.07-0.47c-0.09-0.63-0.21-1.26-0.36-1.88
|
||||
c-0.58-2.47-1.54-4.82-2.82-6.93c-1.28-2.11-2.86-3.98-4.65-5.56c-1.79-1.58-3.79-2.85-5.9-3.79c-2.1-0.95-4.31-1.55-6.51-1.83
|
||||
c-1.1-0.14-2.2-0.2-3.28-0.19l-0.41,0.01l-0.1,0c-0.03,0-0.15,0-0.14,0l-0.17,0.01l-0.4,0.03c-0.15,0.01-0.31,0.02-0.45,0.04
|
||||
c-0.56,0.05-1.11,0.13-1.66,0.23c-2.18,0.41-4.24,1.2-6.06,2.28c-1.82,1.09-3.39,2.45-4.68,3.98c-1.28,1.54-2.28,3.24-2.96,5
|
||||
c-0.69,1.76-1.07,3.58-1.18,5.35c-0.03,0.44-0.04,0.88-0.03,1.32c0,0.11,0,0.22,0.01,0.33l0.01,0.35c0.02,0.21,0.03,0.42,0.05,0.63
|
||||
c0.09,0.9,0.25,1.75,0.49,2.58c0.48,1.66,1.25,3.15,2.2,4.43c0.95,1.28,2.08,2.33,3.28,3.15c1.2,0.82,2.49,1.41,3.76,1.79
|
||||
c1.27,0.38,2.54,0.54,3.74,0.53c0.15,0,0.3,0,0.44-0.01c0.08,0,0.16-0.01,0.24-0.01c0.08,0,0.16-0.01,0.24-0.01
|
||||
c0.13-0.01,0.25-0.03,0.38-0.04c0.03,0,0.07-0.01,0.11-0.01l0.12-0.02c0.08-0.01,0.15-0.02,0.23-0.03c0.16-0.02,0.29-0.05,0.43-0.08
|
||||
c0.14-0.03,0.28-0.05,0.42-0.09c0.27-0.06,0.54-0.14,0.8-0.22c0.52-0.17,1.01-0.38,1.46-0.61c0.45-0.23,0.87-0.5,1.26-0.77
|
||||
c0.11-0.08,0.22-0.16,0.33-0.25c0.42-0.33,0.48-0.94,0.15-1.35c-0.29-0.36-0.79-0.45-1.19-0.23c-0.1,0.05-0.2,0.11-0.3,0.16
|
||||
c-0.35,0.17-0.71,0.32-1.09,0.45c-0.39,0.12-0.79,0.22-1.2,0.29c-0.21,0.03-0.42,0.06-0.63,0.08c-0.11,0.01-0.21,0.02-0.32,0.02
|
||||
c-0.11,0-0.22,0.01-0.32,0.01c-0.1,0-0.21,0-0.31-0.01c-0.13-0.01-0.26-0.01-0.39-0.02c0,0-0.07,0-0.01,0l-0.04,0L51.4,61.6
|
||||
c-0.06-0.01-0.12-0.01-0.17-0.02c-0.12-0.01-0.23-0.03-0.35-0.04c-0.93-0.13-1.88-0.4-2.79-0.82c-0.91-0.41-1.79-0.98-2.57-1.69
|
||||
c-0.79-0.71-1.48-1.56-2.01-2.52c-0.54-0.96-0.92-2.03-1.09-3.16c-0.09-0.56-0.13-1.14-0.11-1.71c0.01-0.16,0.01-0.31,0.02-0.47
|
||||
c0,0.04,0-0.02,0-0.03l0-0.06l0.01-0.12c0.01-0.08,0.01-0.15,0.02-0.23c0.03-0.31,0.08-0.62,0.13-0.92
|
||||
c0.43-2.45,1.65-4.83,3.55-6.65c0.47-0.45,0.98-0.87,1.53-1.25c0.55-0.37,1.12-0.7,1.73-0.98c0.6-0.28,1.23-0.5,1.88-0.68
|
||||
c0.65-0.17,1.31-0.29,1.98-0.35c0.34-0.03,0.67-0.04,1.01-0.04c0.09,0,0.16,0,0.23,0l0.27,0.01l0.17,0.01c0.07,0,0,0,0.03,0l0.07,0
|
||||
l0.27,0.02c0.73,0.06,1.46,0.16,2.17,0.32c1.43,0.32,2.83,0.85,4.13,1.57c2.6,1.44,4.81,3.69,6.17,6.4c0.69,1.35,1.16,2.81,1.4,4.31
|
||||
c0.06,0.38,0.1,0.76,0.13,1.14l0.02,0.29l0.01,0.29c0.01,0.1,0.01,0.19,0.01,0.29c0,0.09,0.01,0.2,0,0.27l0,0.25l-0.01,0.28
|
||||
c-0.01,0.19-0.02,0.49-0.03,0.67c-0.03,0.42-0.07,0.83-0.12,1.24c-0.05,0.41-0.12,0.82-0.19,1.22c-0.08,0.4-0.17,0.81-0.27,1.21
|
||||
c-0.2,0.8-0.46,1.59-0.76,2.36c-0.61,1.54-1.42,3-2.4,4.36c-1.96,2.7-4.64,4.9-7.69,6.29c-1.52,0.69-3.13,1.19-4.78,1.47
|
||||
c-0.82,0.14-1.66,0.22-2.5,0.25l-0.15,0.01l-0.13,0l-0.27,0l-0.41,0l-0.21,0c0.11,0-0.02,0-0.01,0l-0.08,0
|
||||
c-0.45-0.01-0.9-0.03-1.34-0.07c-1.79-0.13-3.55-0.45-5.27-0.95c-1.71-0.49-3.38-1.16-4.95-2c-3.14-1.68-5.95-3.98-8.15-6.76
|
||||
c-1.11-1.38-2.07-2.87-2.87-4.43c-0.8-1.56-1.42-3.2-1.89-4.88c-0.46-1.68-0.75-3.39-0.86-5.12l-0.02-0.32l-0.01-0.08l0-0.07l0-0.14
|
||||
l-0.01-0.28l0-0.07l0-0.1l0-0.2l-0.01-0.4l0-0.08c0,0.01,0,0.01,0-0.03l0-0.16c0-0.21,0.01-0.42,0.01-0.63
|
||||
c0.03-0.85,0.1-1.73,0.21-2.61c0.11-0.88,0.26-1.76,0.44-2.63c0.18-0.87,0.39-1.74,0.64-2.59c0.49-1.71,1.1-3.36,1.82-4.92
|
||||
c1.44-3.12,3.34-5.88,5.61-8.09c0.57-0.55,1.16-1.08,1.77-1.57c0.61-0.49,1.25-0.95,1.9-1.37c0.65-0.43,1.32-0.82,2.02-1.18
|
||||
c0.34-0.19,0.7-0.35,1.05-0.52c0.18-0.08,0.36-0.16,0.53-0.24c0.18-0.08,0.36-0.16,0.54-0.23c0.72-0.3,1.46-0.56,2.21-0.8
|
||||
c0.19-0.06,0.38-0.11,0.56-0.17c0.19-0.06,0.38-0.1,0.57-0.16c0.38-0.11,0.76-0.2,1.14-0.29c0.19-0.05,0.39-0.08,0.58-0.13
|
||||
c0.19-0.04,0.38-0.08,0.58-0.12c0.19-0.04,0.39-0.07,0.58-0.11l0.29-0.05l0.29-0.04c0.2-0.03,0.39-0.06,0.59-0.09
|
||||
c0.22-0.04,0.44-0.05,0.66-0.09c0.18-0.02,0.48-0.06,0.65-0.08c0.14-0.01,0.28-0.03,0.41-0.04l0.28-0.03l0.14-0.01l0.16-0.01
|
||||
c0.22-0.01,0.44-0.03,0.66-0.04l0.33-0.02c0,0,0.12,0,0.02,0l0.07,0l0.14-0.01c0.19-0.01,0.38-0.02,0.56-0.03
|
||||
c0.75-0.02,1.5-0.02,2.24,0c1.48,0.06,2.93,0.22,4.34,0.48c2.82,0.53,5.49,1.43,7.89,2.62c2.41,1.18,4.57,2.63,6.44,4.2
|
||||
c0.12,0.1,0.23,0.2,0.35,0.3c0.11,0.1,0.23,0.2,0.34,0.3c0.23,0.2,0.44,0.41,0.66,0.61c0.22,0.2,0.43,0.41,0.64,0.62
|
||||
c0.2,0.21,0.41,0.41,0.61,0.63c0.8,0.84,1.53,1.69,2.19,2.55c1.33,1.71,2.39,3.44,3.24,5.07c0.05,0.1,0.11,0.2,0.16,0.3
|
||||
c0.05,0.1,0.1,0.2,0.15,0.3c0.1,0.2,0.2,0.4,0.29,0.6c0.09,0.2,0.19,0.39,0.27,0.59c0.09,0.2,0.17,0.39,0.25,0.58
|
||||
c0.32,0.76,0.61,1.49,0.84,2.18c0.39,1.11,0.67,2.11,0.89,2.98c0.09,0.35,0.42,0.58,0.78,0.55c0.37-0.03,0.66-0.34,0.66-0.71
|
||||
C85.14,43.15,85.11,42.05,85.01,40.8z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 6.6 KiB |
@@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
make publish ENV=prod VERSION=root
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"ErrorDocument": {
|
||||
"Key": "jsearch/index.html"
|
||||
},
|
||||
"IndexDocument": {
|
||||
"Suffix": "index.html"
|
||||
},
|
||||
"RoutingRules": [
|
||||
{ "Condition": { "KeyPrefixEquals": "jsearch/index.html" }, "Redirect": { "HostName": "$BUCKET", "ReplaceKeyPrefixWith": "jsearch/" } }
|
||||
]
|
||||
}
|
||||
11
docs/sources/_index.md
Normal file → Executable file
11
docs/sources/_index.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "Grafana documentation"
|
||||
description = "Guides, Installation and Feature Documentation"
|
||||
keywords = ["grafana", "installation", "documentation"]
|
||||
type = "docs"
|
||||
aliases = ["/v1.1", "/guides/reference/admin", "/v3.1"]
|
||||
aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin", "/docs/grafana/v3.1"]
|
||||
+++
|
||||
|
||||
# Grafana Documentation
|
||||
@@ -60,14 +60,11 @@ aliases = ["/v1.1", "/guides/reference/admin", "/v3.1"]
|
||||
<h4>Provisioning</h4>
|
||||
<p>Learn how to automate your Grafana configuration.</p>
|
||||
</a>
|
||||
<a href="{{< relref "guides/whats-new-in-v6-4.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v6.4</h4>
|
||||
<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>
|
||||
<p>Explore the features and enhancements in the latest release.</p>
|
||||
</a>
|
||||
<a href="{{< relref "tutorials/screencasts.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Screencasts</h4>
|
||||
<p>Watch Grafana video tutorials and guides.</p>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Data Source Guides</h2>
|
||||
|
||||
@@ -10,41 +10,215 @@ weight = 8
|
||||
|
||||
# Grafana CLI
|
||||
|
||||
Grafana cli is a small executable that is bundled with Grafana-server and is supposed to be executed on the same machine Grafana-server is running on.
|
||||
Grafana CLI is a small executable that is bundled with Grafana server and is supposed to be executed on the same machine Grafana server is running on.
|
||||
|
||||
## Plugins
|
||||
Grafana CLI has `plugins` and `admin` commands, as well as global options.
|
||||
|
||||
The CLI allows you to install, upgrade and manage your plugins on the machine it is running on.
|
||||
You can find more information about how to install and manage your plugins in the
|
||||
[plugins page]({{< relref "../plugins/installation.md" >}}).
|
||||
To list all commands and options:
|
||||
```
|
||||
grafana-cli -h
|
||||
```
|
||||
|
||||
## Admin
|
||||
**Linux users**
|
||||
Some commands, such as installing or removing plugins, require `sudo` in order to run.
|
||||
|
||||
> This feature is only available in Grafana 4.1 and above.
|
||||
**Windows users**
|
||||
Some commands, such as installing or removing plugins, require you to run Windows PowerShell as Administrator.
|
||||
|
||||
To show all admin commands:
|
||||
`grafana-cli admin`
|
||||
Before you enter commands, `cd` into the Grafana bin directory. The default path is:
|
||||
```
|
||||
cd "C:\Program Files\GrafanaLabs\grafana\bin"
|
||||
```
|
||||
|
||||
## Grafana CLI command syntax
|
||||
|
||||
The general syntax for commands in Grafana CLI is:
|
||||
```bash
|
||||
grafana-cli [global options] command [command options] [arguments...]
|
||||
```
|
||||
|
||||
## Global options
|
||||
|
||||
Grafana CLI allows you to temporarily override certain Grafana default settings. Except for `--help` and `--version`, most global options are only used by developers.
|
||||
|
||||
Each global option applies only to the command in which it is used. For example, `--pluginsDir value` does not permanently change where Grafana saves plugins. It only changes it for command in which you apply the option.
|
||||
|
||||
### Display Grafana CLI help
|
||||
|
||||
`--help` or `-h` displays the help, including default paths and Docker configuration information.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli -h
|
||||
```
|
||||
|
||||
### Display Grafana CLI version
|
||||
|
||||
`--version` or `-v` prints the version of Grafana CLI currently running.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli -v
|
||||
```
|
||||
|
||||
### Override default plugin directory
|
||||
|
||||
`--pluginsDir value` overrides the path to where your local Grafana instance stores plugins. Use this option if you want to install, update, or remove a plugin somewhere other than the default directory ("/var/lib/grafana/plugins") [$GF_PLUGIN_DIR].
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli --pluginsDir "/var/lib/grafana/devplugins" plugins install <plugin-id>
|
||||
```
|
||||
|
||||
### Override default plugin repo URL
|
||||
|
||||
`--repo value` allows you to download and install or update plugins from a repository other than the default Grafana repo.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli --repo "https://example.com/plugins" plugins install <plugin-id>
|
||||
```
|
||||
|
||||
### Override default plugin .zip URL
|
||||
|
||||
`--pluginUrl value` allows you to download a .zip file containing a plugin from a local URL instead of downloading it from the default Grafana source.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli --pluginUrl https://company.com/grafana/plugins/<plugin-id>-<plugin-version>.zip plugins install <plugin-id>
|
||||
```
|
||||
|
||||
### Override Transport Layer Security
|
||||
|
||||
**Warning:** Turning off TLS is a significant security risk. We do not recommend using this option.
|
||||
|
||||
`--insecure` allows you to turn off Transport Layer Security (TLS) verification (insecure). You might want to do this if you are downloading a plugin from a non-default source.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli --insecure --pluginUrl https://company.com/grafana/plugins/<plugin-id>-<plugin-version>.zip plugins install <plugin-id>
|
||||
```
|
||||
|
||||
### Enable debug logging
|
||||
|
||||
`--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
|
||||
|
||||
`--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 installs 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).
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli --configOverrides cfg:default.paths.log=/dev/null plugins install <plugin-id>
|
||||
```
|
||||
|
||||
### 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 admin reset-admin-password --homepath "c:\Program Files\grafana" mynewpassword
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli admin reset-admin-password --config "/etc/configuration/" mynewpassword
|
||||
```
|
||||
|
||||
## Plugins commands
|
||||
|
||||
Grafana CLI allows you to install, upgrade, and manage your Grafana plugins. For more information about installing plugins, refer to [plugins page]({{< relref "../plugins/installation.md" >}}).
|
||||
|
||||
All listed commands apply to the Grafana default repositories and directories. You can override the defaults with [Global Options](#global-options).
|
||||
|
||||
### List available plugins
|
||||
|
||||
```bash
|
||||
grafana-cli plugins list-remote
|
||||
```
|
||||
|
||||
### Install the latest version of a plugin
|
||||
|
||||
```bash
|
||||
grafana-cli plugins install <plugin-id>
|
||||
```
|
||||
|
||||
### Install a specific version of a plugin
|
||||
|
||||
```bash
|
||||
grafana-cli plugins install <plugin-id> <version>
|
||||
```
|
||||
|
||||
### List installed plugins
|
||||
|
||||
```bash
|
||||
grafana-cli plugins ls
|
||||
```
|
||||
|
||||
### Update all installed plugins
|
||||
```bash
|
||||
grafana-cli plugins update-all
|
||||
```
|
||||
|
||||
### Update one plugin
|
||||
|
||||
```bash
|
||||
grafana-cli plugins update <plugin-id>
|
||||
```
|
||||
|
||||
### Remove one plugin
|
||||
|
||||
```bash
|
||||
grafana-cli plugins remove <plugin-id>
|
||||
```
|
||||
|
||||
## Admin commands
|
||||
|
||||
Admin commands are only available in Grafana 4.1 and later.
|
||||
|
||||
### Show all admin commands
|
||||
|
||||
```bash
|
||||
grafana-cli admin
|
||||
```
|
||||
|
||||
### Reset admin password
|
||||
|
||||
You can reset the password for the admin user using the CLI. The use case for this command is when you have lost the admin password.
|
||||
`grafana-cli admin reset-admin-password <new password>` resets the password for the admin user using the CLI. You might need to do this if you lose the admin password.
|
||||
|
||||
`grafana-cli admin reset-admin-password ...`
|
||||
If there are two flags being used to set the homepath and the config file path, then running the command returns this error:
|
||||
|
||||
If 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
|
||||
|
||||
then there are two flags that can be used to set homepath and the config file path.
|
||||
|
||||
`grafana-cli --homepath "/usr/share/grafana" admin reset-admin-password newpass`
|
||||
|
||||
If you have not lost the admin password then it is better to set in the Grafana UI. If you need to set the password in a script then the [Grafana API](http://docs.grafana.org/http_api/user/#change-password) can be used. Here is an example using curl with basic auth:
|
||||
To correct this, use the `--homepath` global option to specify the Grafana default homepath for this command:
|
||||
|
||||
```bash
|
||||
curl -X PUT -H "Content-Type: application/json" -d '{
|
||||
"oldPassword": "admin",
|
||||
"newPassword": "newpass",
|
||||
"confirmNew": "newpass"
|
||||
}' http://admin:admin@<your_grafana_host>:3000/api/user/password
|
||||
grafana-cli --homepath "/usr/share/grafana" admin reset-admin-password <new password>
|
||||
```
|
||||
|
||||
If you have not lost the admin password, we recommend that you change the user password either in the User Preferences or in the Server Admin > User tab.
|
||||
|
||||
If you need to set the password in a script, then you can use the [Grafana User API]({{< relref "../http_api/user.md#change-password" >}}).
|
||||
|
||||
### Migrate data and encrypt passwords
|
||||
|
||||
`data-migration` runs a script that migrates or cleans up data in your database.
|
||||
|
||||
`encrypt-datasource-passwords` migrates passwords from unsecured fields to secure_json_data field. Returns `ok` unless there is an error. Safe to execute multiple times.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli admin data-migration encrypt-datasource-passwords
|
||||
```
|
||||
|
||||
4
docs/sources/administration/image_rendering.md
Normal file → Executable file
4
docs/sources/administration/image_rendering.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "Image Rendering"
|
||||
description = ""
|
||||
keywords = ["grafana", "image", "rendering", "phantomjs"]
|
||||
type = "docs"
|
||||
aliases = ["/installation/image-rendering"]
|
||||
aliases = ["/docs/grafana/latest/installation/image-rendering"]
|
||||
[menu.docs]
|
||||
parent = "admin"
|
||||
weight = 8
|
||||
@@ -125,7 +125,7 @@ Please note that PhantomJS binaries are not included for ARM. To support this yo
|
||||
|
||||
## 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](/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 "../installation/configuration/#concurrent_render_limit" >}}).
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
|
||||
12
docs/sources/administration/provisioning.md
Normal file → Executable file
12
docs/sources/administration/provisioning.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "Provisioning"
|
||||
description = ""
|
||||
keywords = ["grafana", "provisioning"]
|
||||
type = "docs"
|
||||
aliases = ["/installation/provisioning"]
|
||||
aliases = ["/docs/grafana/latest/installation/provisioning"]
|
||||
[menu.docs]
|
||||
parent = "admin"
|
||||
weight = 8
|
||||
@@ -15,7 +15,7 @@ In previous versions of Grafana, you could only use the API for provisioning dat
|
||||
|
||||
## Config File
|
||||
|
||||
Checkout the [configuration](/installation/configuration) page for more information on what you can configure in `grafana.ini`
|
||||
Check out the [configuration]({{< relref "../installation/configuration" >}}) page for more information on what you can configure in `grafana.ini`
|
||||
|
||||
### Config File Locations
|
||||
|
||||
@@ -171,7 +171,7 @@ Since not all datasources have the same configuration settings we only have the
|
||||
|
||||
`{"authType":"keys","defaultRegion":"us-west-2","timeField":"@timestamp"}`
|
||||
|
||||
Secure json data is a map of settings that will be encrypted with [secret key](/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 "../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.
|
||||
|
||||
| Name | Type | Datasource | Description |
|
||||
| ----| ---- | ---- | --- |
|
||||
@@ -348,8 +348,8 @@ The following sections detail the supported settings for each alert notification
|
||||
| url |
|
||||
| recipient |
|
||||
| username |
|
||||
| iconEmoji |
|
||||
| iconUrl |
|
||||
| icon_emoji |
|
||||
| icon_url |
|
||||
| uploadImage |
|
||||
| mention |
|
||||
| token |
|
||||
@@ -430,6 +430,7 @@ The following sections detail the supported settings for each alert notification
|
||||
| apiKey |
|
||||
| apiUrl |
|
||||
| autoClose |
|
||||
| overridePriority |
|
||||
|
||||
#### Alert notification `telegram`
|
||||
|
||||
@@ -437,6 +438,7 @@ The following sections detail the supported settings for each alert notification
|
||||
| ---- |
|
||||
| bottoken |
|
||||
| chatid |
|
||||
| uploadImage |
|
||||
|
||||
#### Alert notification `threema`
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ When checked, this option will notify for all alert rules - existing and new.
|
||||
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](/alerting/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]({{< relref "rules/#name-evaluation-interval" >}}).
|
||||
|
||||
These examples show how often and when reminders are sent for a triggered alert.
|
||||
|
||||
@@ -65,7 +65,7 @@ Grafana ships with the following set of notification types:
|
||||
|
||||
### Email
|
||||
|
||||
To enable email notifications you have to setup [SMTP settings](/installation/configuration/#smtp)
|
||||
To enable email notifications you have to setup [SMTP settings]({{< relref "../installation/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
|
||||
@@ -100,6 +100,7 @@ To set up PagerDuty, all you have to do is to provide an API key.
|
||||
Setting | Description
|
||||
---------- | -----------
|
||||
Integration Key | Integration key for PagerDuty.
|
||||
Severity | Level for dynamic notifications, default is `critical`
|
||||
Auto resolve incidents | Resolve incidents in PagerDuty once the alert goes back to ok
|
||||
|
||||
### Webhook
|
||||
@@ -111,22 +112,27 @@ Example json body:
|
||||
|
||||
```json
|
||||
{
|
||||
"title": "My alert",
|
||||
"ruleId": 1,
|
||||
"ruleName": "Load peaking!",
|
||||
"ruleUrl": "http://url.to.grafana/db/dashboard/my_dashboard?panelId=2",
|
||||
"state": "alerting",
|
||||
"imageUrl": "http://s3.image.url",
|
||||
"message": "Load is peaking. Make sure the traffic is real and spin up more webfronts",
|
||||
"evalMatches": [
|
||||
"dashboardId":1,
|
||||
"evalMatches":[
|
||||
{
|
||||
"metric": "requests",
|
||||
"tags": {},
|
||||
"value": 122
|
||||
"value":1,
|
||||
"metric":"Count",
|
||||
"tags":{}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
],
|
||||
"imageUrl":"https://grafana.com/assets/img/blog/mixed_styles.png",
|
||||
"message":"Notification Message",
|
||||
"orgId":1,
|
||||
"panelId":2,
|
||||
"ruleId":1,
|
||||
"ruleName":"Panel Title alert",
|
||||
"ruleUrl":"http://localhost:3000/d/hZ7BuVbWz/test-dashboard?fullscreen\u0026edit\u0026tab=alert\u0026panelId=2\u0026orgId=1",
|
||||
"state":"alerting",
|
||||
"tags":{
|
||||
"tag name":"tag value"
|
||||
},
|
||||
"title":"[Alerting] Panel Title alert"
|
||||
}```
|
||||
|
||||
- **state** - The possible values for alert state are: `ok`, `paused`, `alerting`, `pending`, `no_data`.
|
||||
|
||||
@@ -165,6 +171,10 @@ Once these two properties are set, you can send the alerts to Kafka for further
|
||||
|
||||
Notifications can be sent by setting up an incoming webhook in Google Hangouts chat. Configuring such a webhook is described [here](https://developers.google.com/hangouts/chat/how-tos/webhooks).
|
||||
|
||||
### Squadcast
|
||||
|
||||
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
|
||||
|
||||
Name | Type | Supports images | Support alert rule tags
|
||||
@@ -177,12 +187,13 @@ 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 | no
|
||||
OpsGenie | `opsgenie` | yes, external only | yes
|
||||
Pagerduty | `pagerduty` | yes, external only | no
|
||||
Prometheus Alertmanager | `prometheus-alertmanager` | yes, external only | yes
|
||||
Pushover | `pushover` | yes | no
|
||||
Sensu | `sensu` | yes, external only | no
|
||||
Slack | `slack` | yes | no
|
||||
Squadcast | `webhook` | no | no
|
||||
Telegram | `telegram` | yes | no
|
||||
Threema | `threema` | yes, external only | no
|
||||
VictorOps | `victorops` | yes, external only | no
|
||||
@@ -190,10 +201,10 @@ Webhook | `webhook` | yes, external only | yes
|
||||
|
||||
# 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 [here](/administration/image_rendering/).
|
||||
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 [here]({{< 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](/installation/configuration/#external-image-storage) in your grafana-server ini config file.
|
||||
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 requires 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.
|
||||
|
||||
@@ -212,4 +223,4 @@ It currently supports only the Prometheus Alertmanager notifier.
|
||||
# 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](/installation/configuration/#domain) setting in Grafana.
|
||||
This url is based on the [domain]({{< relref "../installation/configuration/#domain" >}}) setting in Grafana.
|
||||
|
||||
8
docs/sources/alerting/rules.md
Normal file → Executable file
8
docs/sources/alerting/rules.md
Normal file → Executable file
@@ -40,14 +40,12 @@ Currently alerting supports a limited form of high availability. Since v4.2.0 of
|
||||
|
||||
## Rule Config
|
||||
|
||||
|
||||
|
||||
Currently only the graph panel supports alert rules but this will be added to the **Singlestat** and **Table**
|
||||
panels as well in a future release.
|
||||
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
|
||||
|
||||
@@ -107,7 +105,7 @@ 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](/alerting/notifications/#send-reminders).
|
||||
> 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
|
||||
|
||||
|
||||
@@ -12,12 +12,10 @@ weight = 200
|
||||
Here you can find links to older versions of the documentation that might be better suited for your version
|
||||
of Grafana.
|
||||
|
||||
- [Latest](http://docs.grafana.org)
|
||||
- [Version 4.5](http://docs.grafana.org/v4.5)
|
||||
- [Version 4.4](http://docs.grafana.org/v4.4)
|
||||
- [Version 4.3](http://docs.grafana.org/v4.3)
|
||||
- [Version 4.2](http://docs.grafana.org/v4.2)
|
||||
- [Version 4.1](http://docs.grafana.org/v4.1)
|
||||
- [Version 4.0](http://docs.grafana.org/v4.0)
|
||||
- [Version 3.1](http://docs.grafana.org/v3.1)
|
||||
- [Version 3.0](http://docs.grafana.org/v3.0)
|
||||
- [Latest](/docs/grafana/latest/)
|
||||
- [Version 4.5](/docs/grafana/v4.5)
|
||||
- [Version 4.4](/docs/grafana/v4.4)
|
||||
- [Version 4.3](/docs/grafana/v4.3)
|
||||
- [Version 4.2](/docs/grafana/v4.2)
|
||||
- [Version 4.1](/docs/grafana/v4.1)
|
||||
- [Version 3.1](/docs/grafana/v3.1)
|
||||
|
||||
10
docs/sources/auth/auth-proxy.md
Normal file → Executable file
10
docs/sources/auth/auth-proxy.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "Auth Proxy"
|
||||
description = "Grafana Auth Proxy Guide "
|
||||
keywords = ["grafana", "configuration", "documentation", "proxy"]
|
||||
type = "docs"
|
||||
aliases = ["/tutorials/authproxy/"]
|
||||
aliases = ["/docs/grafana/latest/tutorials/authproxy/"]
|
||||
[menu.docs]
|
||||
name = "Auth Proxy"
|
||||
identifier = "auth-proxy"
|
||||
@@ -37,7 +37,7 @@ whitelist =
|
||||
# Optionally define more headers to sync other user attributes
|
||||
# Example `headers = Name:X-WEBAUTH-NAME Email:X-WEBAUTH-EMAIL Groups:X-WEBAUTH-GROUPS`
|
||||
headers =
|
||||
# Checkout docs on this for more details on the below setting
|
||||
# Check out docs on this for more details on the below setting
|
||||
enable_login_token = false
|
||||
```
|
||||
|
||||
@@ -238,7 +238,7 @@ headers = "Groups:X-WEBAUTH-GROUPS"
|
||||
|
||||
You use the `X-WEBAUTH-GROUPS` header to send the team information for each user. Specifically, the set of Grafana's group IDs that the user belongs to.
|
||||
|
||||
First, we need to set up the mapping between your authentication provider and Grafana. Follow [these instructions]({{< relref "auth/team-sync.md#enable-synchronization-for-a-team" >}}) to add groups to a team within Grafana.
|
||||
First, we need to set up the mapping between your authentication provider and Grafana. Follow [these instructions]({{< relref "team-sync.md#enable-synchronization-for-a-team" >}}) to add groups to a team within Grafana.
|
||||
|
||||
Once that's done. You can verify your mappings by querying the API.
|
||||
|
||||
@@ -296,7 +296,7 @@ curl -H "X-WEBAUTH-USER: leonard" -H "X-WEBAUTH-GROUPS: lokiteamOnExternalSystem
|
||||
|
||||
With this, the user `leonard` will be automatically placed into the Loki team as part of Grafana authentication.
|
||||
|
||||
[Learn more about Team Sync]({{< relref "auth/team-sync.md" >}})
|
||||
[Learn more about Team Sync]({{< relref "team-sync.md" >}})
|
||||
|
||||
|
||||
## Login token and session cookie
|
||||
@@ -306,4 +306,4 @@ a login token and cookie. You only have to configure your auth proxy to provide
|
||||
Requests via other routes will be authenticated using the cookie.
|
||||
|
||||
Use settings `login_maximum_inactive_lifetime_days` and `login_maximum_lifetime_days` under `[auth]` to control session
|
||||
lifetime. [Read more about login tokens](/auth/overview/#login-and-short-lived-tokens)
|
||||
lifetime. [Read more about login tokens]({{< relref "overview/#login-and-short-lived-tokens" >}})
|
||||
|
||||
6
docs/sources/auth/enhanced_ldap.md
Normal file → Executable file
6
docs/sources/auth/enhanced_ldap.md
Normal file → Executable file
@@ -12,9 +12,9 @@ weight = 3
|
||||
|
||||
# Enhanced LDAP Integration
|
||||
|
||||
> Enhanced LDAP Integration is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "enterprise" >}}).
|
||||
> Enhanced LDAP Integration is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
The enhanced LDAP integration adds additional functionality on top of the [existing LDAP integration]({{< relref "auth/ldap.md" >}}).
|
||||
The enhanced LDAP integration adds additional functionality on top of the [existing LDAP integration]({{< relref "ldap.md" >}}).
|
||||
|
||||
## LDAP Group Synchronization for Teams
|
||||
|
||||
@@ -28,7 +28,7 @@ Grafana keeps track of all synchronized users in teams and you can see which use
|
||||
This mechanism allows Grafana to remove an existing synchronized user from a team when its LDAP group membership changes. This mechanism also enables you to manually add
|
||||
a user as member of a team and it will not be removed when the user signs in. This gives you flexibility to combine LDAP group memberships and Grafana team memberships.
|
||||
|
||||
[Learn more about Team Sync]({{< relref "auth/team-sync.md">}})
|
||||
[Learn more about Team Sync]({{< relref "team-sync.md">}})
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
|
||||
15
docs/sources/auth/generic-oauth.md
Normal file → Executable file
15
docs/sources/auth/generic-oauth.md
Normal file → Executable file
@@ -188,7 +188,7 @@ allowed_organizations =
|
||||
allowed_organizations =
|
||||
```
|
||||
|
||||
> Note: It's important to ensure that the [root_url](/installation/configuration/#root-url) in Grafana is set in your Azure Application Reply URLs (App -> Settings -> Reply URLs)
|
||||
> Note: It's important to ensure that the [root_url]({{< relref "../installation/configuration/#root-url" >}}) in Grafana is set in your Azure Application Reply URLs (App -> Settings -> Reply URLs)
|
||||
|
||||
## Set up OAuth2 with Centrify
|
||||
|
||||
@@ -221,19 +221,6 @@ allowed_organizations =
|
||||
api_url = https://<your domain>.my.centrify.com/OAuth2/UserInfo/<Application ID>
|
||||
```
|
||||
|
||||
## Set up OAuth2 with non-compliant providers
|
||||
|
||||
> Only available in Grafana v6.0 and above.
|
||||
|
||||
Some OAuth2 providers might not support `client_id` and `client_secret` passed via Basic Authentication HTTP header, which
|
||||
results in `invalid_client` error. To allow Grafana to authenticate via these type of providers, the client identifiers must be
|
||||
send via POST body, which can be enabled via the following settings:
|
||||
|
||||
```bash
|
||||
[auth.generic_oauth]
|
||||
send_client_credentials_via_post = true
|
||||
```
|
||||
|
||||
## JMESPath examples
|
||||
|
||||
To ease configuring a proper JMESPath expression you can test/evaluate expression with a custom payload at http://jmespath.org/.
|
||||
|
||||
@@ -113,4 +113,4 @@ Your GitHub teams can be referenced in two ways:
|
||||
|
||||
Example: `@grafana/developers`
|
||||
|
||||
[Learn more about Team Sync]({{< relref "auth/team-sync.md" >}})
|
||||
[Learn more about Team Sync]({{< relref "team-sync.md" >}})
|
||||
|
||||
@@ -125,5 +125,5 @@ the correct teams.
|
||||
|
||||
Your GitLab groups can be referenced in the same way as `allowed_groups`, like `example` or `foo/bar`.
|
||||
|
||||
[Learn more about Team Sync]({{< relref "auth/enhanced_ldap.md" >}})
|
||||
[Learn more about Team Sync]({{< relref "enhanced_ldap.md" >}})
|
||||
|
||||
|
||||
@@ -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 "../installation/configuration.md#config-file-locations" >}}). For example:
|
||||
|
||||
```bash
|
||||
[auth.google]
|
||||
|
||||
@@ -3,7 +3,7 @@ title = "LDAP Authentication"
|
||||
description = "Grafana LDAP Authentication Guide "
|
||||
keywords = ["grafana", "configuration", "documentation", "ldap", "active directory"]
|
||||
type = "docs"
|
||||
aliases = ["/installation/ldap/"]
|
||||
aliases = ["/docs/grafana/latest/installation/ldap/"]
|
||||
[menu.docs]
|
||||
name = "LDAP"
|
||||
identifier = "ldap"
|
||||
@@ -24,7 +24,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 "../installation/configuration.md" >}}) as well as specify the path to the LDAP
|
||||
specific configuration file (default: `/etc/grafana/ldap.toml`).
|
||||
|
||||
```bash
|
||||
@@ -334,7 +334,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 "../installation/configuration.md" >}}).
|
||||
|
||||
```bash
|
||||
[log]
|
||||
|
||||
@@ -16,18 +16,18 @@ permissions and org memberships.
|
||||
|
||||
## OAuth Integrations
|
||||
|
||||
- [Google OAuth]({{< relref "auth/google.md" >}})
|
||||
- [GitHub OAuth]({{< relref "auth/github.md" >}})
|
||||
- [Gitlab OAuth]({{< relref "auth/gitlab.md" >}})
|
||||
- [Generic OAuth]({{< relref "auth/generic-oauth.md" >}}) (Okta2, BitBucket, Azure, OneLogin, Auth0)
|
||||
- [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 "auth/ldap.md" >}}) (OpenLDAP, ActiveDirectory, etc)
|
||||
- [LDAP Authentication]({{< relref "ldap.md" >}}) (OpenLDAP, ActiveDirectory, etc)
|
||||
|
||||
## Auth proxy
|
||||
|
||||
- [Auth Proxy]({{< relref "auth/auth-proxy.md" >}}) If you want to handle authentication outside Grafana using a reverse
|
||||
- [Auth Proxy]({{< relref "auth-proxy.md" >}}) If you want to handle authentication outside Grafana using a reverse
|
||||
proxy.
|
||||
|
||||
## Grafana Auth
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "SAML Authentication"
|
||||
description = "Grafana SAML Authentication"
|
||||
keywords = ["grafana", "saml", "documentation", "saml-auth"]
|
||||
aliases = ["/auth/saml/"]
|
||||
aliases = ["/docs/grafana/latest/auth/saml/"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "SAML"
|
||||
@@ -12,7 +12,7 @@ weight = 5
|
||||
|
||||
# SAML Authentication
|
||||
|
||||
> SAML Authentication integration is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "enterprise" >}}).
|
||||
> SAML Authentication integration is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
> Only available in Grafana v6.3+
|
||||
|
||||
@@ -44,7 +44,7 @@ At the moment of writing, Grafana supports:
|
||||
|
||||
## Set up SAML Authentication
|
||||
|
||||
To use the SAML integration, you need to enable SAML in the [main config file]({{< relref "installation/configuration.md" >}}).
|
||||
To use the SAML integration, you need to enable SAML in the [main config file]({{< relref "../installation/configuration.md" >}}).
|
||||
|
||||
```bash
|
||||
[auth.saml]
|
||||
@@ -90,7 +90,7 @@ assertion_attribute_email = mail
|
||||
|
||||
Important to note:
|
||||
|
||||
- like any other Grafana configuration, use of [environment variables for these options is supported]({{< relref "installation/configuration.md#using-environment-variables" >}})
|
||||
- like any other Grafana configuration, use of [environment variables for these options is supported]({{< relref "../installation/configuration.md#using-environment-variables" >}})
|
||||
- only one form of configuration option is required. Using multiple forms, e.g. both `certificate` and `certificate_path` will result in an error
|
||||
|
||||
## Grafana Configuration
|
||||
@@ -170,7 +170,7 @@ An example is `assertion_attribute_name = "givenName"` where Grafana looks withi
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
To troubleshoot and get more log info enable saml debug logging in the [main config file]({{< relref "installation/configuration.md" >}}).
|
||||
To troubleshoot and get more log info enable saml debug logging in the [main config file]({{< relref "../installation/configuration.md" >}}).
|
||||
|
||||
```bash
|
||||
[log]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Team Sync"
|
||||
description = "Grafana Team Sync"
|
||||
keywords = ["grafana", "auth", "documentation"]
|
||||
aliases = ["/auth/saml/"]
|
||||
aliases = ["/docs/grafana/latest/auth/saml/"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Team Sync"
|
||||
@@ -12,7 +12,7 @@ weight = 5
|
||||
|
||||
# Team Sync
|
||||
|
||||
> Team Sync is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "enterprise" >}}).
|
||||
> Team Sync is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/team_members_ldap.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" >}}
|
||||
|
||||
@@ -42,6 +42,6 @@ a user as member of a team and it will not be removed when the user signs in. Th
|
||||
|
||||
### Supported Providers
|
||||
|
||||
* [LDAP]({{< relref "auth/enhanced_ldap.md#ldap-group-synchronization-for-teams" >}})
|
||||
* [GitHub OAuth]({{< relref "auth/github.md#team-sync-enterprise-only" >}})
|
||||
* [Auth Proxy]({{< relref "auth/auth-proxy.md#team-sync-enterprise-only">}})
|
||||
* [LDAP]({{< relref "enhanced_ldap.md#ldap-group-synchronization-for-teams" >}})
|
||||
* [GitHub OAuth]({{< relref "github.md#team-sync-enterprise-only" >}})
|
||||
* [Auth Proxy]({{< relref "auth-proxy.md#team-sync-enterprise-only">}})
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Contributor License Agreement (CLA)"
|
||||
description = "Contributor License Agreement (CLA)"
|
||||
type = "docs"
|
||||
aliases = ["/project/cla", "docs/contributing/cla.html"]
|
||||
aliases = ["/docs/grafana/latest/project/cla", "docs/contributing/cla.html"]
|
||||
[menu.docs]
|
||||
parent = "contribute"
|
||||
weight = 1
|
||||
|
||||
24
docs/sources/enterprise/_index.md
Normal file → Executable file
24
docs/sources/enterprise/_index.md
Normal file → Executable file
@@ -14,7 +14,7 @@ weight = 30
|
||||
Grafana Enterprise is a commercial edition of Grafana that includes additional features not found in the open source
|
||||
version.
|
||||
|
||||
Building on everything you already know and love about Grafana, Grafana Enterprise adds premium data sources,
|
||||
Building on everything you already know and love about Grafana, Grafana Enterprise adds enterprise data sources,
|
||||
advanced authentication options, more permission controls, 24x7x365 support, and training from the core Grafana team.
|
||||
|
||||
Grafana Enterprise includes all of the features found in the open source edition and more.
|
||||
@@ -23,33 +23,33 @@ ___
|
||||
|
||||
### Enhanced LDAP Integration
|
||||
|
||||
With Grafana Enterprise you can set up synchronization between LDAP Groups and Teams. [Learn More]({{< relref "auth/enhanced_ldap.md" >}}).
|
||||
With Grafana Enterprise you can set up synchronization between LDAP Groups and Teams. [Learn More]({{< relref "../auth/enhanced_ldap.md" >}}).
|
||||
|
||||
### SAML Authentication
|
||||
|
||||
Enables your Grafana Enterprise users to authenticate with SAML. [Learn More]({{< relref "auth/saml.md" >}}).
|
||||
Enables your Grafana Enterprise users to authenticate with SAML. [Learn More]({{< relref "../auth/saml.md" >}}).
|
||||
|
||||
### Team Sync
|
||||
|
||||
Team Sync allows you to setup synchronization between teams in Grafana and teams in your auth provider so that your users automatically end up in the right team. [Learn More]({{< relref "auth/team-sync.md" >}}).
|
||||
Team Sync allows you to setup synchronization between teams in Grafana and teams in your auth provider so that your users automatically end up in the right team. [Learn More]({{< relref "../auth/team-sync.md" >}}).
|
||||
|
||||
Supported auth providers:
|
||||
|
||||
* [LDAP]({{< relref "auth/enhanced_ldap.md#ldap-group-synchronization-for-teams" >}})
|
||||
* [GitHub OAuth]({{< relref "auth/github.md#team-sync-enterprise-only" >}})
|
||||
* [Auth Proxy]({{< relref "auth/auth-proxy.md#team-sync-enterprise-only">}})
|
||||
* [LDAP]({{< relref "../auth/enhanced_ldap.md#ldap-group-synchronization-for-teams" >}})
|
||||
* [GitHub OAuth]({{< relref "../auth/github.md#team-sync-enterprise-only" >}})
|
||||
* [Auth Proxy]({{< relref "../auth/auth-proxy.md#team-sync-enterprise-only">}})
|
||||
|
||||
### Data source permissions
|
||||
|
||||
Data source permissions allow you to restrict query access to only specific Teams and Users. [Learn More]({{< relref "permissions/datasource_permissions.md" >}}).
|
||||
Data source permissions allow you to restrict query access to only specific Teams and Users. [Learn More]({{< relref "../permissions/datasource_permissions.md" >}}).
|
||||
|
||||
### Reporting
|
||||
|
||||
Reporting make it possible to take any Dashboard and generate a PDF report and setup a schedule to have it delivered. [Learn More]({{< relref "features/reporting.md" >}}).
|
||||
Reporting makes it possible to take any dashboard, generate a PDF report, and set up a schedule to have it delivered. [Learn More]({{< relref "../features/reporting.md" >}}).
|
||||
|
||||
### Premium Plugins
|
||||
### Enterprise Plugins
|
||||
|
||||
With a Grafana Enterprise license you will get access to premium plugins, including:
|
||||
With a Grafana Enterprise license you will get access to enterprise plugins, including:
|
||||
|
||||
* [Splunk](https://grafana.com/plugins/grafana-splunk-datasource)
|
||||
* [AppDynamics](https://grafana.com/plugins/dlopes7-appdynamics-datasource)
|
||||
@@ -83,5 +83,3 @@ This setting can also be set via ENV variable which is useful if you're running
|
||||
volume where you have placed the license file. In this case set the ENV variable `GF_ENTERPRISE_LICENSE_PATH` to point
|
||||
to the location of your license file.
|
||||
|
||||
|
||||
|
||||
|
||||
0
docs/sources/features/_index.md
Normal file → Executable file
0
docs/sources/features/_index.md
Normal file → Executable file
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Data Sources"
|
||||
type = "docs"
|
||||
aliases = ["/datasources/overview/"]
|
||||
aliases = ["/docs/grafana/latest/datasources/overview/"]
|
||||
[menu.docs]
|
||||
name = "Data Sources"
|
||||
identifier = "datasources"
|
||||
@@ -38,4 +38,4 @@ The following data sources are officially supported:
|
||||
|
||||
## Data source plugins
|
||||
|
||||
Since grafana 3.0 you can install data sources as plugins. Checkout [Grafana.net](https://grafana.com/plugins) for more data sources.
|
||||
Since Grafana 3.0 you can install data sources as plugins. Check out [Grafana.net](https://grafana.com/plugins) for more data sources.
|
||||
|
||||
10
docs/sources/features/datasources/azuremonitor.md
Normal file → Executable file
10
docs/sources/features/datasources/azuremonitor.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "Using Azure Monitor in Grafana"
|
||||
description = "Guide for using Azure Monitor in Grafana"
|
||||
keywords = ["grafana", "microsoft", "azure", "monitor", "application", "insights", "log", "analytics", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/datasources/azuremonitor"]
|
||||
aliases = ["/docs/grafana/latest/datasources/azuremonitor"]
|
||||
[menu.docs]
|
||||
name = "Azure Monitor"
|
||||
parent = "datasources"
|
||||
@@ -146,7 +146,7 @@ Examples:
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v60/azuremonitor-service-variables.png" class="docs-image--no-shadow" caption="Nested Azure Monitor Template Variables" >}}
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
### Azure Monitor Metrics Whitelist
|
||||
@@ -155,7 +155,7 @@ Not all metrics returned by the Azure Monitor API have values. The Grafana data
|
||||
|
||||
### Azure Monitor Alerting
|
||||
|
||||
Grafana alerting is supported for the Azure Monitor service. This is not Azure Alerts support. Read more about how alerting in Grafana works [here]({{< relref "alerting/rules.md" >}}).
|
||||
Grafana alerting is supported for the Azure Monitor service. This is not Azure Alerts support. Read more about how alerting in Grafana works [here]({{< relref "../../alerting/rules.md" >}}).
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v60/azuremonitor-alerting.png" class="docs-image--no-shadow" caption="Azure Monitor Alerting" >}}
|
||||
|
||||
@@ -198,7 +198,7 @@ Examples:
|
||||
|
||||
Use the one of the following queries in the `Query` field in the Variable edit view.
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
| Name | Description |
|
||||
@@ -216,7 +216,7 @@ Examples:
|
||||
|
||||
### Application Insights Alerting
|
||||
|
||||
Grafana alerting is supported for Application Insights. This is not Azure Alerts support. Read more about how alerting in Grafana works [here]({{< relref "alerting/rules.md" >}}).
|
||||
Grafana alerting is supported for Application Insights. This is not Azure Alerts support. Read more about how alerting in Grafana works [here]({{< relref "../../alerting/rules.md" >}}).
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v60/azuremonitor-alerting.png" class="docs-image--no-shadow" caption="Azure Monitor Alerting" >}}
|
||||
|
||||
|
||||
30
docs/sources/features/datasources/cloudwatch.md
Normal file → Executable file
30
docs/sources/features/datasources/cloudwatch.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "AWS CloudWatch"
|
||||
description = "Guide for using CloudWatch in Grafana"
|
||||
keywords = ["grafana", "cloudwatch", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/datasources/cloudwatch"]
|
||||
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||
[menu.docs]
|
||||
name = "AWS Cloudwatch"
|
||||
identifier = "cloudwatch"
|
||||
@@ -17,10 +17,9 @@ Grafana ships with built in support for CloudWatch. You just have to add it as a
|
||||
|
||||
## Adding the data source
|
||||
|
||||
1. Open the side menu by clicking the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
3. Click the `+ Add data source` button in the top header.
|
||||
4. Select `Cloudwatch` from the _Type_ dropdown.
|
||||
1. In the side menu under the `Configuration` link, click on `Data Sources`.
|
||||
2. Click the `Add data source` button.
|
||||
3. Select `Cloudwatch` in the `Cloud` section.
|
||||
|
||||
> NOTE: If at any moment you have issues with getting this data source to work and Grafana is giving you undescriptive errors then don't
|
||||
> forget to check your log file (try looking in /var/log/grafana/grafana.log).
|
||||
@@ -35,25 +34,6 @@ Grafana ships with built in support for CloudWatch. You just have to add it as a
|
||||
| _Credentials_ profile name | Specify the name of the profile to use (if you use `~/.aws/credentials` file), leave blank for default. |
|
||||
| _Assume Role Arn_ | Specify the ARN of the role to assume |
|
||||
|
||||
### Min time interval
|
||||
|
||||
> Only available in Grafana v6.5+.
|
||||
|
||||
A lower limit for the auto group by time interval. Recommended to be set to write frequency, for example `1m` if your data is written every minute.
|
||||
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
|
||||
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
|
||||
|
||||
| Identifier | Description |
|
||||
| ---------- | ----------- |
|
||||
| `y` | year |
|
||||
| `M` | month |
|
||||
| `w` | week |
|
||||
| `d` | day |
|
||||
| `h` | hour |
|
||||
| `m` | minute |
|
||||
| `s` | second |
|
||||
| `ms` | millisecond |
|
||||
|
||||
## Authentication
|
||||
|
||||
### IAM Roles
|
||||
@@ -326,7 +306,7 @@ Please see the AWS documentation for [Service Quotas](https://docs.aws.amazon.co
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
|
||||
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title = "Using Elasticsearch in Grafana"
|
||||
description = "Guide for using Elasticsearch in Grafana"
|
||||
keywords = ["grafana", "elasticsearch", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/datasources/elasticsearch"]
|
||||
aliases = ["/docs/grafana/latest/datasources/elasticsearch"]
|
||||
[menu.docs]
|
||||
name = "Elasticsearch"
|
||||
parent = "datasources"
|
||||
@@ -84,7 +84,7 @@ Identifier | Description
|
||||
> Only available in Grafana v6.3+.
|
||||
|
||||
There are two parameters, `Message field name` and `Level field name`, that can optionally be configured from the data source settings page that determine
|
||||
which fields will be used for log messages and log levels when visualizing logs in [Explore](/features/explore).
|
||||
which fields will be used for log messages and log levels when visualizing logs in [Explore]({{< relref "../explore" >}}).
|
||||
|
||||
For example, if you're using a default setup of Filebeat for shipping logs to Elasticsearch the following configuration should work:
|
||||
|
||||
@@ -120,7 +120,7 @@ Instead of hard-coding things like server, application and sensor name in you me
|
||||
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
### Query variable
|
||||
@@ -168,11 +168,11 @@ In the above example, we have a lucene query that filters documents based on the
|
||||
a variable in the *Terms* group by field input box. This allows you to use a variable to quickly change how the data is grouped.
|
||||
|
||||
Example dashboard:
|
||||
[Elasticsearch Templated Dashboard](http://play.grafana.org/dashboard/db/elasticsearch-templated)
|
||||
[Elasticsearch Templated Dashboard](https://play.grafana.org/dashboard/db/elasticsearch-templated)
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../../reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view. Grafana can query any Elasticsearch index
|
||||
for annotation events.
|
||||
|
||||
@@ -188,7 +188,7 @@ Tags | Optional field name to use for event tags (can be an array or a CSV strin
|
||||
|
||||
> Only available in Grafana v6.3+.
|
||||
|
||||
Querying and displaying log data from Elasticsearch is available via [Explore](/features/explore).
|
||||
Querying and displaying log data from Elasticsearch is available via [Explore]({{< relref "../explore" >}}).
|
||||
|
||||

|
||||
|
||||
@@ -208,7 +208,7 @@ Optionally enter a lucene query into the query field to filter the log messages.
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
|
||||
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
|
||||
12
docs/sources/features/datasources/graphite.md
Normal file → Executable file
12
docs/sources/features/datasources/graphite.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "Using Graphite in Grafana"
|
||||
description = "Guide for using graphite in Grafana"
|
||||
keywords = ["grafana", "graphite", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/datasources/graphite"]
|
||||
aliases = ["/docs/grafana/latest/datasources/graphite"]
|
||||
[menu.docs]
|
||||
name = "Graphite"
|
||||
identifier = "graphite"
|
||||
@@ -91,7 +91,7 @@ Instead of hard-coding things like server, application and sensor name in you me
|
||||
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
Graphite 1.1 introduced tags and Grafana added support for Graphite queries with tags in version 5.0. To create a variable using tag values, then you need to use the Grafana functions `tags` and `tag_values`.
|
||||
@@ -147,7 +147,7 @@ Why two ways? The first syntax is easier to read and write but does not allow yo
|
||||
the second syntax in expressions like `my.server[[serverNumber]].count`.
|
||||
|
||||
Example:
|
||||
[Graphite Templated Dashboard](http://play.grafana.org/dashboard/db/graphite-templated-nested)
|
||||
[Graphite Templated Dashboard](https://play.grafana.org/dashboard/db/graphite-templated-nested)
|
||||
|
||||
### Variable Usage in Tag Queries
|
||||
|
||||
@@ -159,11 +159,11 @@ Example of a tag expression with regex formatting and using the Equal Tilde oper
|
||||
server=~${servers:regex}
|
||||
```
|
||||
|
||||
Checkout the [Advanced Formatting Options section in the Variables]({{< relref "../../reference/templating.md#advanced-formatting-options" >}}) documentation for examples and details.
|
||||
Check out the [Advanced Formatting Options section in the Variables]({{< relref "../../reference/templating.md#advanced-formatting-options" >}}) documentation for examples and details.
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../../reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view.
|
||||
|
||||
Graphite supports two ways to query annotations. A regular metric query, for this you use the `Graphite query` textbox. A Graphite events query, use the `Graphite event tags` textbox,
|
||||
@@ -171,7 +171,7 @@ specify a tag or wildcard (leave empty should also work)
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
|
||||
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
|
||||
39
docs/sources/features/datasources/influxdb.md
Normal file → Executable file
39
docs/sources/features/datasources/influxdb.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "Using InfluxDB in Grafana"
|
||||
description = "Guide for using InfluxDB in Grafana"
|
||||
keywords = ["grafana", "influxdb", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/datasources/influxdb"]
|
||||
aliases = ["/docs/grafana/latest/datasources/influxdb"]
|
||||
[menu.docs]
|
||||
name = "InfluxDB"
|
||||
parent = "datasources"
|
||||
@@ -12,9 +12,9 @@ weight = 2
|
||||
|
||||
# Using InfluxDB in Grafana
|
||||
|
||||
Grafana ships with very feature rich data source plugin for InfluxDB. Supporting a feature rich query editor, annotation and templating queries.
|
||||
Grafana ships with a feature-rich data source plugin for InfluxDB. The plugin includes a custom query editor and supports annotations and query templates.
|
||||
|
||||
## Adding the data source
|
||||
## Add the data source
|
||||
|
||||
1. Open the side menu by clicking the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
@@ -64,24 +64,24 @@ Identifier | Description
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v45/influxdb_query_still.png" class="docs-image--no-shadow" animated-gif="/img/docs/v45/influxdb_query.gif" >}}
|
||||
|
||||
You find the InfluxDB editor in the metrics tab in Graph or Singlestat panel's edit mode. You enter edit mode by clicking the
|
||||
panel title, then edit. The editor allows you to select metrics and tags.
|
||||
You can access the InfluxDB editor under the metrics tab when you are in the edit mode of the Graph or Singlestat panels.
|
||||
Enter edit mode by clicking the panel title, and clicking **Edit**. The editor allows you to select metrics and tags.
|
||||
|
||||
### Filter data (WHERE)
|
||||
To add a tag filter click the plus icon to the right of the `WHERE` condition. You can remove tag filters by clicking on
|
||||
the tag key and select `--remove tag filter--`.
|
||||
the tag key and then selecting `--remove tag filter--`.
|
||||
|
||||
**Regex matching**
|
||||
|
||||
You can type in regex patterns for metric names or tag filter values, be sure to wrap the regex pattern in forward slashes (`/`). Grafana
|
||||
will automatically adjust the filter tag condition to use the InfluxDB regex match condition operator (`=~`).
|
||||
You can type in regex patterns for metric names or tag filter values. Be sure to wrap the regex pattern in forward slashes (`/`). Grafana automatically adjusts the filter tag condition to use the InfluxDB regex match condition operator (`=~`).
|
||||
|
||||
### Field and Aggregation functions
|
||||
In the `SELECT` row you can specify what fields and functions you want to use. If you have a
|
||||
group by time you need an aggregation function. Some functions like derivative require an aggregation function. The editor tries simplify and unify this part of the query. For example:<br>
|
||||
<br>
|
||||
group by time you need an aggregation function. Some functions like derivative require an aggregation function. The editor tries to simplify and unify this part of the query. For example:
|
||||
|
||||
The above will generate the following InfluxDB `SELECT` clause:
|
||||

|
||||
|
||||
The above generates the following InfluxDB `SELECT` clause:
|
||||
|
||||
```sql
|
||||
SELECT derivative(mean("value"), 10s) /10 AS "REQ/s" FROM ....
|
||||
@@ -121,7 +121,7 @@ change the option `Format As` to `Table` if you want to show raw data in the `Ta
|
||||
|
||||
> Only available in Grafana v6.3+.
|
||||
|
||||
Querying and displaying log data from InfluxDB is available via [Explore](/features/explore).
|
||||
Querying and displaying log data from InfluxDB is available via [Explore]({{< relref "../explore" >}}).
|
||||
|
||||

|
||||
|
||||
@@ -144,7 +144,7 @@ Instead of hard-coding things like server, application and sensor name in you me
|
||||
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
### Query variable
|
||||
@@ -194,7 +194,7 @@ Why two ways? The first syntax is easier to read and write but does not allow yo
|
||||
options are enabled, Grafana converts the labels from plain text to a regex compatible string. Which means you have to use `=~` instead of `=`.
|
||||
|
||||
Example Dashboard:
|
||||
[InfluxDB Templated Dashboard](http://play.grafana.org/dashboard/db/influxdb-templated-queries)
|
||||
[InfluxDB Templated Dashboard](https://play.grafana.org/dashboard/db/influxdb-templated)
|
||||
|
||||
### Ad hoc filters variable
|
||||
|
||||
@@ -203,8 +203,7 @@ be applied to all your InfluxDB queries.
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../../reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
|
||||
|
||||
An example query:
|
||||
|
||||
@@ -212,15 +211,13 @@ An example query:
|
||||
SELECT title, description from events WHERE $timeFilter ORDER BY time ASC
|
||||
```
|
||||
|
||||
For InfluxDB you need to enter a query like in the above example. You need to have the ```where $timeFilter```
|
||||
part. If you only select one column you will not need to enter anything in the column mapping fields. The
|
||||
Tags field can be a comma separated string.
|
||||
For InfluxDB, you need to enter a query like the one in the example above. The ```where $timeFilter``` component is required. If you only select one column, then you do not need to enter anything in the column mapping fields. The **Tags** field can be a comma-separated string.
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
You can now configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources).
|
||||
|
||||
Here are some provisioning examples for this dat asource.
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
40
docs/sources/features/datasources/loki.md
Normal file → Executable file
40
docs/sources/features/datasources/loki.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "Using Loki in Grafana"
|
||||
description = "Guide for using Loki in Grafana"
|
||||
keywords = ["grafana", "loki", "logging", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/datasources/loki"]
|
||||
aliases = ["/docs/grafana/latest/datasources/loki"]
|
||||
[menu.docs]
|
||||
name = "Loki"
|
||||
parent = "datasources"
|
||||
@@ -18,7 +18,7 @@ weight = 6
|
||||
> Viewing Loki data in dashboard panels is supported in Grafana v6.4+.
|
||||
|
||||
Grafana ships with built-in support for Loki, Grafana's log aggregation system.
|
||||
Just add it as a data source and you are ready to query your log data in [Explore](/features/explore).
|
||||
Just add it as a data source and you are ready to query your log data in [Explore]({{< relref "../explore" >}}).
|
||||
|
||||
## Adding the data source
|
||||
|
||||
@@ -36,9 +36,28 @@ Just add it as a data source and you are ready to query your log data in [Explor
|
||||
| _URL_ | The URL of the Loki instance, e.g., `http://localhost:3100` |
|
||||
| _Maximum lines_ | Upper limit for number of log lines returned by Loki (default is 1000). Decrease if your browser is sluggish when displaying logs in Explore. |
|
||||
|
||||
### Derived fields
|
||||
|
||||
The Derived Fields configuration allows you to:
|
||||
* Add fields parsed from the log message.
|
||||
* Add a link that uses the value of the field.
|
||||
|
||||
You can use this functionality to link to your tracing backend directly from your logs, or link to a user profile page if a userId is present in the log line. These links will be shown in the [log details](/features/explore/#labels-and-parsed-fields).
|
||||
{{< docs-imagebox img="/img/docs/v65/loki_derived_fields.png" class="docs-image--no-shadow" caption="Screenshot of the derived fields configuration" >}}
|
||||
Each derived field consists of:
|
||||
- **Name:** Shown in the log details as a label.
|
||||
- **Regex:** A Regex pattern that runs on the log message and captures part of it to as the value of the new field. Can only contain capture a single group.
|
||||
- **URL**: A URL template used to construct a link next to the field value in log details. Use special `${__value.raw}` value in your template to interpolate the real field value into your URL template.
|
||||
|
||||
You can use a debug section to see what your fields extract and how the URL is interpolated. Click **Show example log message** to show the text area where you can enter a log message.
|
||||
{{< docs-imagebox img="/img/docs/v65/loki_derived_fields_debug.png" class="docs-image--no-shadow" caption="Screenshot of the derived fields debugging" >}}
|
||||
|
||||
The new field with the link shown in log details:
|
||||
{{< docs-imagebox img="/img/docs/v65/loki_derived_fields_detail.png" class="docs-image--no-shadow" caption="Screenshot of the derived field in log detail" >}}
|
||||
|
||||
## Querying Logs
|
||||
|
||||
Querying and displaying log data from Loki is available via [Explore](/features/explore), and with the [logs panel](/features/panels/logs/) in dashboards. Select the Loki data source, and then enter a log query to display your logs.
|
||||
Querying and displaying log data from Loki is available via [Explore]({{< relref "../explore" >}}), and with the [logs panel]({{< relref "../panels/logs/" >}}) in dashboards. Select the Loki data source, and then enter a log query to display your logs.
|
||||
|
||||
### Log Queries
|
||||
|
||||
@@ -50,7 +69,7 @@ Once the result is returned, the log panel shows a list of log rows and a bar ch
|
||||
|
||||
<div class="medium-6 columns">
|
||||
<video width="800" height="500" controls>
|
||||
<source src="/assets/videos/explore_loki.mp4" type="video/mp4">
|
||||
<source src="https://grafana.com/static/assets/videos/explore_loki.mp4" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
</div>
|
||||
@@ -106,7 +125,7 @@ The following filter types are currently supported:
|
||||
|
||||
## Live tailing
|
||||
|
||||
Loki supports Live tailing which displays logs in real-time. This feature is supported in [Explore](/features/explore/#loki-specific-features) and in dashboards with a Live toggle in the query editor.
|
||||
Loki supports Live tailing which displays logs in real-time. This feature is supported in [Explore]({{< relref "../explore/#loki-specific-features" >}}) and in dashboards with a Live toggle in the query editor.
|
||||
|
||||
Note that Live Tailing relies on two Websocket connections: one between the browser and the Grafana server, and another between the Grafana server and the Loki server. If you run any reverse proxies, please configure them accordingly.
|
||||
|
||||
@@ -125,7 +144,7 @@ log message you're interested in.
|
||||
|
||||
Instead of hard-coding things like server, application and sensor name in your metric queries, you can use variables in their place. Variables are shown as drop-down select boxes at the top of the dashboard. These drop-down boxes make it easy to change the data being displayed in your dashboard.
|
||||
|
||||
Checkout the [Templating](/reference/templating) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
Check out the [Templating]({{< relref "../../reference/templating" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
|
||||
## Annotations
|
||||
|
||||
@@ -136,7 +155,7 @@ You can use any non-metric Loki query as a source for annotations. Log content w
|
||||
## Configure the data source with provisioning
|
||||
|
||||
You can set up the data source via config files with Grafana's provisioning system.
|
||||
You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
|
||||
|
||||
Here is an example:
|
||||
|
||||
@@ -152,7 +171,7 @@ datasources:
|
||||
maxLines: 1000
|
||||
```
|
||||
|
||||
Here's another with basic auth:
|
||||
Here's another with basic auth and derived field. Keep in mind that `$` character needs to be escaped in yaml values as it is used to interpolate environment variables:
|
||||
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
@@ -167,4 +186,9 @@ datasources:
|
||||
basicAuthPassword: test_password
|
||||
jsonData:
|
||||
maxLines: 1000
|
||||
derivedFields:
|
||||
- datasourceName: Jaeger
|
||||
matcherRegex: "traceID=(\\w+)"
|
||||
name: TraceID
|
||||
url: "http://localhost:16686/trace/$${__value.raw}"
|
||||
```
|
||||
|
||||
@@ -39,7 +39,7 @@ Name | Description
|
||||
|
||||
### Min time interval
|
||||
|
||||
A lower limit for the [$__interval](/reference/templating/#the-interval-variable) and [$__interval_ms](/reference/templating/#the-interval-ms-variable) variables.
|
||||
A lower limit for the [$__interval]({{< relref "../../reference/templating/#the-interval-variable" >}}) and [$__interval_ms]({{< relref "../../reference/templating/#the-interval-ms-variable" >}}) variables.
|
||||
Recommended to be set to write frequency, for example `1m` if your data is written every minute.
|
||||
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
|
||||
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
|
||||
@@ -178,7 +178,7 @@ The resulting table panel:
|
||||
|
||||
## Time series queries
|
||||
|
||||
If you set `Format as` to `Time series`, for use in Graph panel for example, then the query must must have a column named `time` that returns either a sql datetime or any numeric datatype representing Unix epoch in seconds. You may return a column named `metric` that is used as metric name for the value column. Any column except `time` and `metric` is treated as a value column. If you omit the `metric` column, the name of the value column will be the metric name. You may select multiple value columns, each will have its name as metric.
|
||||
If you set `Format as` to `Time series`, for use in Graph panel for example, then the query must have a column named `time` that returns either a SQL datetime or any numeric datatype representing Unix epoch in seconds. You may return a column named `metric` that is used as metric name for the value column. Any column except `time` and `metric` is treated as a value column. If you omit the `metric` column, the name of the value column will be the metric name. You may select multiple value columns, each will have its name as metric.
|
||||
If you return multiple value columns and a column named `metric` then this column is used as prefix for the series name (only available in Grafana 5.3+).
|
||||
|
||||
Resultsets of time series queries need to be sorted by time.
|
||||
@@ -300,7 +300,7 @@ Any series lacking a value in a 3 minute window will have a value of zero which
|
||||
|
||||
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place. Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data being displayed in your dashboard.
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
|
||||
### Query Variable
|
||||
|
||||
@@ -374,13 +374,14 @@ Read more about variable formatting options in the [Variables]({{< relref "../..
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../../reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Columns:**
|
||||
|
||||
Name | Description
|
||||
------------ | -------------
|
||||
time | The name of the date/time field. Could be a column with a native sql date/time data type or epoch value.
|
||||
time | The name of the date/time field. Could be a column with a native SQL date/time data type or epoch value.
|
||||
timeend | Optional name of the end date/time field. Could be a column with a native SQL date/time data type or epoch value.
|
||||
text | Event description field.
|
||||
tags | Optional field name to use for event tags as a comma separated string.
|
||||
|
||||
@@ -410,7 +411,7 @@ WHERE
|
||||
ORDER BY 1
|
||||
```
|
||||
|
||||
**Example query using time column of native sql date/time data type:**
|
||||
**Example query using time column of native SQL date/time data type:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
@@ -579,7 +580,7 @@ conditions.
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
|
||||
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
|
||||
15
docs/sources/features/datasources/mysql.md
Normal file → Executable file
15
docs/sources/features/datasources/mysql.md
Normal file → Executable file
@@ -41,7 +41,7 @@ Name | Description
|
||||
|
||||
### Min time interval
|
||||
|
||||
A lower limit for the [$__interval](/reference/templating/#the-interval-variable) and [$__interval_ms](/reference/templating/#the-interval-ms-variable) variables.
|
||||
A lower limit for the [$__interval]({{< relref "../../reference/templating/#the-interval-variable" >}}) and [$__interval_ms]({{< relref "../../reference/templating/#the-interval-ms-variable" >}}) variables.
|
||||
Recommended to be set to write frequency, for example `1m` if your data is written every minute.
|
||||
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
|
||||
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
|
||||
@@ -182,7 +182,7 @@ The resulting table panel:
|
||||
|
||||
## Time series queries
|
||||
|
||||
If you set `Format as` to `Time series`, for use in Graph panel for example, then the query must return a column named `time` that returns either a sql datetime or any numeric datatype representing Unix epoch.
|
||||
If you set `Format as` to `Time series`, for use in Graph panel for example, then the query must return a column named `time` that returns either a SQL datetime or any numeric datatype representing Unix epoch.
|
||||
Any column except `time` and `metric` is treated as a value column.
|
||||
You may return a column named `metric` that is used as metric name for the value column.
|
||||
If you return multiple value columns and a column named `metric` then this column is used as prefix for the series name (only available in Grafana 5.3+).
|
||||
@@ -238,7 +238,7 @@ This feature is currently available in the nightly builds and will be included i
|
||||
|
||||
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place. Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data being displayed in your dashboard.
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
|
||||
### Query Variable
|
||||
|
||||
@@ -335,7 +335,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../..
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../../reference/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Example query using time column with epoch values:**
|
||||
|
||||
@@ -350,7 +350,7 @@ WHERE
|
||||
$__unixEpochFilter(epoch_time)
|
||||
```
|
||||
|
||||
**Example query using time column of native sql date/time data type:**
|
||||
**Example query using time column of native SQL date/time data type:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
@@ -365,7 +365,8 @@ WHERE
|
||||
|
||||
Name | Description
|
||||
------------ | -------------
|
||||
time | The name of the date/time field. Could be a column with a native sql date/time data type or epoch value.
|
||||
time | The name of the date/time field. Could be a column with a native SQL date/time data type or epoch value.
|
||||
timeend | Optional name of the end date/time field. Could be a column with a native SQL date/time data type or epoch value.
|
||||
text | Event description field.
|
||||
tags | Optional field name to use for event tags as a comma separated string.
|
||||
|
||||
@@ -375,7 +376,7 @@ Time series queries should work in alerting conditions. Table formatted queries
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
|
||||
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title = "Using OpenTSDB in Grafana"
|
||||
description = "Guide for using OpenTSDB in Grafana"
|
||||
keywords = ["grafana", "opentsdb", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/datasources/opentsdb", "docs/features/opentsdb"]
|
||||
aliases = ["/docs/grafana/latest/datasources/opentsdb", "/docs/grafana/latest/features/opentsdb"]
|
||||
[menu.docs]
|
||||
name = "OpenTSDB"
|
||||
parent = "datasources"
|
||||
@@ -53,7 +53,7 @@ Instead of hard-coding things like server, application and sensor name in you me
|
||||
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
### Query variable
|
||||
@@ -86,11 +86,11 @@ Query | Description
|
||||
*tag_values(cpu, hostname, env=$env)* | Return tag values for cpu metric, selected env tag value and tag key hostname
|
||||
*tag_values(cpu, hostname, env=$env, region=$region)* | Return tag values for cpu metric, selected env tag value, selected region tag value and tag key hostname
|
||||
|
||||
For details on OpenTSDB metric queries checkout the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)
|
||||
For details on OpenTSDB metric queries, check out the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
|
||||
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
@@ -106,3 +106,8 @@ datasources:
|
||||
tsdbResolution: 1
|
||||
tsdbVersion: 1
|
||||
```
|
||||
|
||||
## Lookup limits
|
||||
|
||||
By default, at most 1000 records are looked up from OpenTSDB.
|
||||
You can change this by modifying the "Lookup Limit" in the OpenTSDB settings page.
|
||||
|
||||
13
docs/sources/features/datasources/postgres.md
Normal file → Executable file
13
docs/sources/features/datasources/postgres.md
Normal file → Executable file
@@ -41,7 +41,7 @@ Name | Description
|
||||
|
||||
### Min time interval
|
||||
|
||||
A lower limit for the [$__interval](/reference/templating/#the-interval-variable) and [$__interval_ms](/reference/templating/#the-interval-ms-variable) variables.
|
||||
A lower limit for the [$__interval]({{< relref "../../reference/templating/#the-interval-variable" >}}) and [$__interval_ms]({{< relref "../../reference/templating/#the-interval-ms-variable" >}}) variables.
|
||||
Recommended to be set to write frequency, for example `1m` if your data is written every minute.
|
||||
This option can also be overridden/configured in a dashboard panel under data source options. It's important to note that this value **needs** to be formatted as a
|
||||
number followed by a valid time identifier, e.g. `1m` (1 minute) or `30s` (30 seconds). The following time identifiers are supported:
|
||||
@@ -244,7 +244,7 @@ ORDER BY time
|
||||
|
||||
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place. Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data being displayed in your dashboard.
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
|
||||
|
||||
### Query Variable
|
||||
|
||||
@@ -339,7 +339,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../..
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../../reference/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Example query using time column with epoch values:**
|
||||
|
||||
@@ -354,7 +354,7 @@ WHERE
|
||||
$__unixEpochFilter(epoch_time)
|
||||
```
|
||||
|
||||
**Example query using time column of native sql date/time data type:**
|
||||
**Example query using time column of native SQL date/time data type:**
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
@@ -369,7 +369,8 @@ WHERE
|
||||
|
||||
Name | Description
|
||||
------------ | -------------
|
||||
time | The name of the date/time field. Could be a column with a native sql date/time data type or epoch value.
|
||||
time | The name of the date/time field. Could be a column with a native SQL date/time data type or epoch value.
|
||||
timeend | Optional name of the time end field, needs to be date/time data type. If set, then annotations are marked as regions between time and time-end.
|
||||
text | Event description field.
|
||||
tags | Optional field name to use for event tags as a comma separated string.
|
||||
|
||||
@@ -380,7 +381,7 @@ conditions.
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
|
||||
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
|
||||
39
docs/sources/features/datasources/prometheus.md
Normal file → Executable file
39
docs/sources/features/datasources/prometheus.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "Using Prometheus in Grafana"
|
||||
description = "Guide for using Prometheus in Grafana"
|
||||
keywords = ["grafana", "prometheus", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/datasources/prometheus"]
|
||||
aliases = ["/docs/grafana/latest/datasources/prometheus"]
|
||||
[menu.docs]
|
||||
name = "Prometheus"
|
||||
parent = "datasources"
|
||||
@@ -25,16 +25,16 @@ Grafana includes built-in support for Prometheus.
|
||||
|
||||
## Data source options
|
||||
|
||||
| Name | Description |
|
||||
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| _Name_ | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| _Default_ | Default data source means that it will be pre-selected for new panels. |
|
||||
| _Url_ | The HTTP protocol, ip and port of you Prometheus server (default port is usually 9090) |
|
||||
| _Access_ | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. |
|
||||
| _Basic Auth_ | Enable basic authentication to the Prometheus data source. |
|
||||
| _User_ | Name of your Prometheus user |
|
||||
| _Password_ | Database user's password |
|
||||
| _Scrape interval_ | This will be used as a lower limit for the Prometheus step query parameter. Default value is 15s. |
|
||||
| Name | Description |
|
||||
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| _Name_ | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| _Default_ | Default data source means that it will be pre-selected for new panels. |
|
||||
| _Url_ | The URL of your Prometheus server, e.g. `http://prometheus.example.org:9090`. |
|
||||
| _Access_ | Server (default) = URL needs to be accessible from the Grafana backend/server, Browser = URL needs to be accessible from the browser. |
|
||||
| _Basic Auth_ | Enable basic authentication to the Prometheus data source. |
|
||||
| _User_ | User name for basic authentication. |
|
||||
| _Password_ | Password for basic authentication. |
|
||||
| _Scrape interval_ | Set this to the typical scrape and evaluation interval configured in Prometheus. Defaults to 15s. |
|
||||
| _Custom Query Parameters_ | Add custom parameters to the Prometheus query URL. For example `timeout`, `partial_response`, `dedup` or `max_source_resolution`. Multiple parameters should be concatenated together with an '&'. |
|
||||
|
||||
## Query editor
|
||||
@@ -48,11 +48,12 @@ Open a graph in edit mode by click the title > Edit (or by pressing `e` key whil
|
||||
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| _Query expression_ | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/). |
|
||||
| _Legend format_ | Controls the name of the time series, using name or pattern. For example `{{hostname}}` will be replaced with label value for the label `hostname`. |
|
||||
| _Min step_ | Set a lower limit for the Prometheus step option. Step controls how big the jumps are when the Prometheus query engine performs range queries. Sadly there is no official prometheus documentation to link to for this very important option. |
|
||||
| _Resolution_ | Controls the step option. Small steps create high-resolution graphs but can be slow over larger time ranges, lowering the resolution can speed things up. `1/2` will try to set step option to generate 1 data point for every other pixel. A value of `1/10` will try to set step option so there is a data point every 10 pixels. |
|
||||
| _Min step_ | An additional lower limit for the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) and for the `$__interval` variable. The limit is absolute and not modified by the _Resolution_ setting. |
|
||||
| _Resolution_ | `1/1` sets both the `$__interval` variable and the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries) such that each pixel corresponds to one data point. For better performance, lower resolutions can be picked. `1/2` only retrieves a data point for every other pixel, and `1/10` retrieves one data point per 10 pixels. Note that both _Min time interval_ and _Min step_ limit the final value of `$__interval` and `step`. |
|
||||
| _Metric lookup_ | Search for metric names in this input field. |
|
||||
| _Format as_ | Switch between Table, Time series or Heatmap. Table format will only work in the Table panel. Heatmap format is suitable for displaying metrics having histogram type on Heatmap panel. Under the hood, it converts cumulative histogram to regular and sorts series by the bucket bound. |
|
||||
| _Format as_ | Switch between `Table`, `Time series` or `Heatmap`. `Table` will only work in the Table panel. `Heatmap` is suitable for displaying metrics of the Histogram type on a Heatmap panel. Under the hood, it converts cumulative histograms to regular ones and sorts series by the bucket bound. |
|
||||
| _Instant_ | Perform an "instant" query, to return only the latest value that Prometheus has scraped for the requested time series. Instant queries return results much faster than normal range queries. Use them to look up label sets. |
|
||||
| _Min time interval_| This value multiplied by the denominator from the _Resolution_ setting sets a lower limit to both the `$__interval` variable and the [`step` parameter of Prometheus range queries](https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries). Defaults to _Scrape interval_ as set in the data source options. |
|
||||
|
||||
> NOTE: Grafana slightly modifies the request dates for queries to align them with the dynamically calculated step.
|
||||
> This ensures consistent display of metrics data but can result in a small gap of data at the right edge of a graph.
|
||||
@@ -62,7 +63,7 @@ Open a graph in edit mode by click the title > Edit (or by pressing `e` key whil
|
||||
The Prometheus datasource allows you to run "instant" queries, which queries only the latest value.
|
||||
You can visualize the results in a table panel to see all available labels of a timeseries.
|
||||
|
||||
Instant query results are made up only of one datapoint per series but can be shown in the graph panel with the help of [series overrides](/features/panels/graph/#series-overrides).
|
||||
Instant query results are made up only of one datapoint per series but can be shown in the graph panel with the help of [series overrides]({{< relref "../panels/graph/#series-overrides" >}}).
|
||||
To show them in the graph as a latest value point, add a series override and select `Points > true`.
|
||||
To show a horizontal line across the whole graph, add a series override and select `Transform > constant`.
|
||||
|
||||
@@ -74,7 +75,7 @@ Instead of hard-coding things like server, application and sensor name in your m
|
||||
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
### Query variable
|
||||
@@ -96,7 +97,7 @@ For details of _metric names_, _label names_ and _label values_ are please refer
|
||||
|
||||
> Support for `$__range`, `$__range_s` and `$__range_ms` only available from Grafana v5.3
|
||||
|
||||
It's possible to use some global built-in variables in query variables; `$__interval`, `$__interval_ms`, `$__range`, `$__range_s` and `$__range_ms`, see [Global built-in variables](/reference/templating/#global-built-in-variables) for more information. These can be convenient to use in conjunction with the `query_result` function when you need to filter variable queries since
|
||||
It's possible to use some global built-in variables in query variables; `$__interval`, `$__interval_ms`, `$__range`, `$__range_s` and `$__range_ms`, see [Global built-in variables]({{< relref "../../reference/templating/#global-built-in-variables" >}}) for more information. These can be convenient to use in conjunction with the `query_result` function when you need to filter variable queries since
|
||||
`label_values` function doesn't support queries.
|
||||
|
||||
Make sure to set the variable's `refresh` trigger to be `On Time Range Change` to get the correct instances when changing the time range on the dashboard.
|
||||
@@ -129,7 +130,7 @@ options are enabled, Grafana converts the labels from plain text to a regex comp
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../../reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view.
|
||||
|
||||
Prometheus supports two ways to query annotations.
|
||||
@@ -145,7 +146,7 @@ Since 4.6.0 Grafana exposes metrics for Prometheus on the `/metrics` endpoint. W
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
|
||||
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
|
||||
8
docs/sources/features/datasources/stackdriver.md
Normal file → Executable file
8
docs/sources/features/datasources/stackdriver.md
Normal file → Executable file
@@ -3,7 +3,7 @@ title = "Using Stackdriver in Grafana"
|
||||
description = "Guide for using Stackdriver in Grafana"
|
||||
keywords = ["grafana", "stackdriver", "google", "guide"]
|
||||
type = "docs"
|
||||
aliases = ["/datasources/stackdriver"]
|
||||
aliases = ["/docs/grafana/latest/datasources/stackdriver"]
|
||||
[menu.docs]
|
||||
name = "Google Stackdriver"
|
||||
parent = "datasources"
|
||||
@@ -172,7 +172,7 @@ Instead of hard-coding things like server, application and sensor name in you me
|
||||
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
|
||||
being displayed in your dashboard.
|
||||
|
||||
Checkout the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
Check out the [Templating]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
### Query Variable
|
||||
@@ -202,7 +202,7 @@ Why two ways? The first syntax is easier to read and write but does not allow yo
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v53/stackdriver_annotations_query_editor.png" max-width= "400px" class="docs-image--right" >}}
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../../reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view. Annotation rendering is expensive so it is important to limit the number of rows returned. There is no support for showing Stackdriver annotations and events yet but it works well with [custom metrics](https://cloud.google.com/monitoring/custom-metrics/) in Stackdriver.
|
||||
|
||||
With the query editor for annotations, you can select a metric and filters. The `Title` and `Text` fields support templating and can use data returned from the query. For example, the Title field could have the following text:
|
||||
@@ -224,7 +224,7 @@ Example Result: `monitoring.googleapis.com/uptime_check/http_status has this val
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page](/administration/provisioning/#datasources)
|
||||
It's now possible to configure data sources using config files with Grafana's provisioning system. You can read more about how it works and all the settings you can set for data sources on the [provisioning docs page]({{< relref "../../administration/provisioning/#datasources" >}})
|
||||
|
||||
Here is a provisioning example using the JWT (Service Account key file) authentication type.
|
||||
|
||||
|
||||
8
docs/sources/features/explore/index.md
Normal file → Executable file
8
docs/sources/features/explore/index.md
Normal file → Executable file
@@ -31,11 +31,11 @@ If you just want to explore your data and do not want to create a dashboard then
|
||||
|
||||
There is a new Explore icon on the menu bar to the left. This opens a new empty Explore tab.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v60/explore_menu.png" class="docs-image--no-shadow" caption="Screenshot of the new Explore Icon" >}}
|
||||
{{< docs-imagebox img="/img/docs/v65/explore_menu.png" class="docs-image--no-shadow" caption="Screenshot of the new Explore Icon" >}}
|
||||
|
||||
If you want to start with an existing query in a panel then choose the Explore option from the Panel menu. This opens an Explore tab with the query from the panel and allows you to tweak or iterate in the query outside of your dashboard.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v60/explore_panel_menu.png" class="docs-image--no-shadow" caption="Screenshot of the new Explore option in the panel menu" >}}
|
||||
{{< docs-imagebox img="/img/docs/v65/explore_panel_menu.png" class="docs-image--no-shadow" caption="Screenshot of the new Explore option in the panel menu" >}}
|
||||
|
||||
Choose your data source in the dropdown in the top left. Prometheus has a custom Explore implementation, the other data sources (for now) use their standard query editor.
|
||||
|
||||
@@ -45,7 +45,7 @@ The query field is where you can write your query and explore your data. There a
|
||||
|
||||
The Split feature is an easy way to compare graphs and tables side-by-side or to look at related data together on one page. Click the split button to duplicate the current query and split the page into two side-by-side queries. It is possible to select another data source for the new query which for example, allows you to compare the same query for two different servers or to compare the staging environment to the production environment.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v60/explore_split.png" class="docs-image--no-shadow" caption="Screenshot of the new Explore option in the panel menu" >}}
|
||||
{{< docs-imagebox img="/img/docs/v65/explore_split.png" class="docs-image--no-shadow" caption="Screenshot of the new Explore option in the panel menu" >}}
|
||||
|
||||
In split view, timepickers for both panels can be linked (if you change one, the other gets changed as well) by clicking on one of the time-sync buttons attached to the timepickers. Linking of timepickers helps with keeping the start and the end times of the split view queries in sync and it will ensure that you’re looking at the same time interval in both split panels.
|
||||
|
||||
@@ -59,7 +59,7 @@ The first version of Explore features a custom querying experience for Prometheu
|
||||
|
||||
On the left-hand side of the query field is a `Metrics` button, clicking on this opens the Metric Explorer. This shows a hierarchical menu with metrics grouped by their prefix. For example, all the Alert Manager metrics will be grouped under the `alertmanager` prefix. This is a good starting point if you just want to explore which metrics are available.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v60/explore_metric_explorer.png" class="docs-image--no-shadow" caption="Screenshot of the new Explore option in the panel menu" >}}
|
||||
{{< docs-imagebox img="/img/docs/v65/explore_metric_explorer.png" class="docs-image--no-shadow" caption="Screenshot of the new Explore option in the panel menu" >}}
|
||||
|
||||
### Query Field
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Alert List"
|
||||
keywords = ["grafana", "alert list", "documentation", "panel", "alertlist"]
|
||||
type = "docs"
|
||||
aliases = ["/reference/alertlist/"]
|
||||
aliases = ["/docs/grafana/latest/reference/alertlist/"]
|
||||
[menu.docs]
|
||||
name = "Alert list"
|
||||
parent = "panels"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Dashboard List"
|
||||
keywords = ["grafana", "dashboard list", "documentation", "panel", "dashlist"]
|
||||
type = "docs"
|
||||
aliases = ["/reference/dashlist/"]
|
||||
aliases = ["/docs/grafana/latest/reference/dashlist/"]
|
||||
[menu.docs]
|
||||
name = "Dashboard list"
|
||||
parent = "panels"
|
||||
|
||||
4
docs/sources/features/panels/graph.md
Normal file → Executable file
4
docs/sources/features/panels/graph.md
Normal file → Executable file
@@ -2,7 +2,7 @@
|
||||
title = "Graph Panel"
|
||||
keywords = ["grafana", "graph panel", "documentation", "guide", "graph"]
|
||||
type = "docs"
|
||||
aliases = ["/reference/graph/"]
|
||||
aliases = ["/docs/grafana/latest/reference/graph/"]
|
||||
[menu.docs]
|
||||
name = "Graph"
|
||||
parent = "panels"
|
||||
@@ -187,7 +187,7 @@ Time regions allow you to highlight certain time regions of the graph to make it
|
||||
|
||||
The time range tab allows you to override the dashboard time range and specify a panel specific time.
|
||||
Either through a relative from now time option or through a timeshift.
|
||||
Panel time overrides and timeshift are described in more detail [here]({{< relref "reference/timerange.md#panel-time-overrides-timeshift" >}}).
|
||||
Panel time overrides and timeshift are described in more detail [here]({{< relref "../../reference/timerange.md#panel-time-overrides-timeshift" >}}).
|
||||
|
||||
### Data link
|
||||
|
||||
|
||||
0
docs/sources/features/panels/heatmap.md
Normal file → Executable file
0
docs/sources/features/panels/heatmap.md
Normal file → Executable file
2
docs/sources/features/panels/logs.md
Normal file → Executable file
2
docs/sources/features/panels/logs.md
Normal file → Executable file
@@ -2,7 +2,7 @@
|
||||
title = "Logs Panel"
|
||||
keywords = ["grafana", "dashboard", "documentation", "panels", "logs panel"]
|
||||
type = "docs"
|
||||
aliases = ["/reference/logs/"]
|
||||
aliases = ["/docs/grafana/latest/reference/logs/"]
|
||||
[menu.docs]
|
||||
name = "Logs"
|
||||
parent = "panels"
|
||||
|
||||
2
docs/sources/features/panels/singlestat.md
Normal file → Executable file
2
docs/sources/features/panels/singlestat.md
Normal file → Executable file
@@ -2,7 +2,7 @@
|
||||
title = "Singlestat Panel"
|
||||
keywords = ["grafana", "dashboard", "documentation", "panels", "singlestat"]
|
||||
type = "docs"
|
||||
aliases = ["/reference/singlestat/"]
|
||||
aliases = ["/docs/grafana/latest/reference/singlestat/"]
|
||||
[menu.docs]
|
||||
name = "Singlestat"
|
||||
parent = "panels"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user