Compare commits
515 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca6d08d5cb | ||
|
|
d01bdb517d | ||
|
|
63dfdb7066 | ||
|
|
e95667fffb | ||
|
|
c08b901664 | ||
|
|
7cd6fef466 | ||
|
|
1b4f93b88c | ||
|
|
c4656a885d | ||
|
|
818a2f3d64 | ||
|
|
7f52e023b5 | ||
|
|
962a06545a | ||
|
|
79aeeaa10a | ||
|
|
ea483c0ce1 | ||
|
|
3e88197f96 | ||
|
|
66df54db80 | ||
|
|
e4b4480064 | ||
|
|
4e4f69b5f6 | ||
|
|
a4b7209e39 | ||
|
|
6c001d9c09 | ||
|
|
312600aa2c | ||
|
|
26d701dcf9 | ||
|
|
e347b62cee | ||
|
|
36232857df | ||
|
|
9d605bdd04 | ||
|
|
4d235b978e | ||
|
|
6575c9cb6e | ||
|
|
0ad27a6596 | ||
|
|
a0c6afa0a5 | ||
|
|
3d0bc141c7 | ||
|
|
ed307897e7 | ||
|
|
1d63f57caf | ||
|
|
e00f393a17 | ||
|
|
277e00aaed | ||
|
|
ba6104190e | ||
|
|
eaaca91f25 | ||
|
|
a551cd2470 | ||
|
|
9bcccd7574 | ||
|
|
6b61c65b58 | ||
|
|
d11bb2e198 | ||
|
|
69a5530aec | ||
|
|
08d8190c02 | ||
|
|
c75574298c | ||
|
|
8477d7b4a2 | ||
|
|
f26d14eef1 | ||
|
|
49418f1a63 | ||
|
|
34c9233501 | ||
|
|
be022d4239 | ||
|
|
688283a5cc | ||
|
|
bbed213115 | ||
|
|
4845321b43 | ||
|
|
c6829645c7 | ||
|
|
cf6adb8b54 | ||
|
|
9824219a58 | ||
|
|
ec18b00e2d | ||
|
|
6a3e4db692 | ||
|
|
b4666456f0 | ||
|
|
e2a9dcdc32 | ||
|
|
800431bc1f | ||
|
|
763fb3bc32 | ||
|
|
73c4bef70f | ||
|
|
2c6993f18a | ||
|
|
b761679d80 | ||
|
|
23d72d25e4 | ||
|
|
9cab3b65ec | ||
|
|
9a67e94618 | ||
|
|
5f94d31da9 | ||
|
|
62c824e3a4 | ||
|
|
da37f4c83f | ||
|
|
cd012bdfb4 | ||
|
|
65370c5443 | ||
|
|
7598d3fb43 | ||
|
|
c12245bbb3 | ||
|
|
805abdfa2a | ||
|
|
17a14a8a48 | ||
|
|
6979b44592 | ||
|
|
4e25823705 | ||
|
|
5aeb367322 | ||
|
|
385be77687 | ||
|
|
cc813d71c6 | ||
|
|
88c3b719a1 | ||
|
|
0e7c746a87 | ||
|
|
cd42b31da5 | ||
|
|
0304493bd2 | ||
|
|
5d8fc6a1a9 | ||
|
|
9d858220ce | ||
|
|
9716289196 | ||
|
|
e6aac7a36c | ||
|
|
46fcf9bf08 | ||
|
|
aa7e6cf55f | ||
|
|
3745cccde6 | ||
|
|
5a53c2d02b | ||
|
|
917860c4d3 | ||
|
|
733450c7b7 | ||
|
|
1dcfaf25fc | ||
|
|
c73a0007c7 | ||
|
|
0f6769665a | ||
|
|
99daa4454b | ||
|
|
6af45bf4ac | ||
|
|
5ad8a9722e | ||
|
|
0b86a371bb | ||
|
|
4ff613a432 | ||
|
|
f95c8b785c | ||
|
|
e688f13535 | ||
|
|
0f8cfca4e6 | ||
|
|
d227353321 | ||
|
|
ea3d368e91 | ||
|
|
c6cc840ceb | ||
|
|
54a3f5fd87 | ||
|
|
2cf538a466 | ||
|
|
b27985ef38 | ||
|
|
c5ceae3808 | ||
|
|
e1af933d4a | ||
|
|
766d8a5888 | ||
|
|
3fdd2648b1 | ||
|
|
fcaff011b1 | ||
|
|
9731ea9b89 | ||
|
|
3c6a7a51bf | ||
|
|
5166073f98 | ||
|
|
ee5fcc03df | ||
|
|
c3884abf62 | ||
|
|
b24c7cdd64 | ||
|
|
98418ea55f | ||
|
|
3aa3fa3ee1 | ||
|
|
3a5375ddd8 | ||
|
|
d66e72fa67 | ||
|
|
87da6a293b | ||
|
|
e6cec8dbdc | ||
|
|
8b122ee464 | ||
|
|
f09ee3d8c2 | ||
|
|
baa356e26d | ||
|
|
cc638e81f4 | ||
|
|
2483efb8c5 | ||
|
|
29a8417c93 | ||
|
|
934a8f08ae | ||
|
|
75fe3c839b | ||
|
|
3c21a37bbe | ||
|
|
94951df1c1 | ||
|
|
f9962eabff | ||
|
|
a8531978b6 | ||
|
|
0c020f222e | ||
|
|
0f06200a9d | ||
|
|
768911a6f9 | ||
|
|
1db26d354f | ||
|
|
72628c8ea0 | ||
|
|
1db8849e51 | ||
|
|
63fe7fd8c7 | ||
|
|
67ec9edcc8 | ||
|
|
f2f2722bb1 | ||
|
|
8b9b67f248 | ||
|
|
c002a39456 | ||
|
|
60dbf72820 | ||
|
|
646b74efbb | ||
|
|
3f7b058bea | ||
|
|
066d5cf4da | ||
|
|
0606555ba1 | ||
|
|
2b6a88bf59 | ||
|
|
63c6fc5f4e | ||
|
|
62d86c956f | ||
|
|
f92f657f17 | ||
|
|
cffcc95be0 | ||
|
|
67a7e03615 | ||
|
|
22ce16cc9b | ||
|
|
712253fbee | ||
|
|
bb6a6d795f | ||
|
|
eb98d9c15b | ||
|
|
6bc369629d | ||
|
|
89e6c45090 | ||
|
|
9272af264a | ||
|
|
1dd404a1fb | ||
|
|
204682e9b8 | ||
|
|
12f1af2956 | ||
|
|
e2038e0614 | ||
|
|
002d2119fd | ||
|
|
d3c50692c0 | ||
|
|
e4d2b6c203 | ||
|
|
c758440c50 | ||
|
|
798d62c605 | ||
|
|
aeab27c34c | ||
|
|
7f86f2d4f3 | ||
|
|
7946eee389 | ||
|
|
3de625ef8e | ||
|
|
5b40b26744 | ||
|
|
22eb558d80 | ||
|
|
1f4a04436c | ||
|
|
c79e7afcbd | ||
|
|
bf908424a7 | ||
|
|
8c2107cd35 | ||
|
|
d6ca781c49 | ||
|
|
e7a1896fae | ||
|
|
9154d7013f | ||
|
|
252a2fdce3 | ||
|
|
9baec83600 | ||
|
|
21015b0899 | ||
|
|
4f9b6c55c0 | ||
|
|
fa8246aa4c | ||
|
|
458eccbfc0 | ||
|
|
0418fb3f4f | ||
|
|
ccdd964811 | ||
|
|
48648561fa | ||
|
|
e7244f0f8a | ||
|
|
d2689b6d6c | ||
|
|
9cf84c51f5 | ||
|
|
49fe4ff69e | ||
|
|
9a65c5a90d | ||
|
|
5e1d1c1d01 | ||
|
|
d0a80c59f3 | ||
|
|
9d7c74ef91 | ||
|
|
f82a6aa0d0 | ||
|
|
b0b46991ec | ||
|
|
8d1bef3769 | ||
|
|
4c282c538a | ||
|
|
d5a2bc1a54 | ||
|
|
b148b306e2 | ||
|
|
7bf3f0b9c1 | ||
|
|
0dbe5323d7 | ||
|
|
e6c59d0729 | ||
|
|
55277ca732 | ||
|
|
943f9b29ec | ||
|
|
b81c842510 | ||
|
|
a45794d0ec | ||
|
|
e591fbc322 | ||
|
|
33fae87899 | ||
|
|
fd52570b7f | ||
|
|
131610e8f7 | ||
|
|
c35dc9a0f5 | ||
|
|
e08b39d4f0 | ||
|
|
39e0ce305b | ||
|
|
37aa584a54 | ||
|
|
7acea5b3fa | ||
|
|
4cf765839a | ||
|
|
6ad8375293 | ||
|
|
ff9556229a | ||
|
|
08bf2a5452 | ||
|
|
45da3b77a8 | ||
|
|
fe16028e02 | ||
|
|
934d93ad94 | ||
|
|
10fbabfb2e | ||
|
|
0c4dae321c | ||
|
|
029a6c64b4 | ||
|
|
d9414b4693 | ||
|
|
bfa959c66a | ||
|
|
5396c9ef92 | ||
|
|
4ca3967091 | ||
|
|
f1ecaa5d45 | ||
|
|
a743a1cc12 | ||
|
|
90541d3084 | ||
|
|
c162af8142 | ||
|
|
cc589a0d76 | ||
|
|
131a3248ba | ||
|
|
21b53b7d79 | ||
|
|
69c512d5f4 | ||
|
|
ffde18eedf | ||
|
|
0d3d8edb92 | ||
|
|
d03075b811 | ||
|
|
019834ae12 | ||
|
|
f1989f1bfc | ||
|
|
56cd845e97 | ||
|
|
fd44abd177 | ||
|
|
c433a1513f | ||
|
|
fa34a7692e | ||
|
|
565387a42e | ||
|
|
0e2d874ecf | ||
|
|
0cde7decd7 | ||
|
|
e846a26c8c | ||
|
|
f2fc7aa3aa | ||
|
|
961cb6b284 | ||
|
|
2c9b321c48 | ||
|
|
824f7362d4 | ||
|
|
4f94a4c495 | ||
|
|
63d999a739 | ||
|
|
e1d5cfbd20 | ||
|
|
335b1a8983 | ||
|
|
70b0ec65b3 | ||
|
|
9c55500cc0 | ||
|
|
e60b124001 | ||
|
|
ba7c931286 | ||
|
|
e5df200893 | ||
|
|
0d5c1e1bc7 | ||
|
|
ff6a082e23 | ||
|
|
ceca067d4f | ||
|
|
9ed08d1903 | ||
|
|
6d879a0227 | ||
|
|
8641b91389 | ||
|
|
a0464c1239 | ||
|
|
cece9547ae | ||
|
|
2be4d8dfd0 | ||
|
|
ef36276584 | ||
|
|
003fb4a3d0 | ||
|
|
cfe30080e4 | ||
|
|
1448767c08 | ||
|
|
fa1602daea | ||
|
|
60ed1e9527 | ||
|
|
df1d43167a | ||
|
|
8080bbc8ec | ||
|
|
8264b220c5 | ||
|
|
95b1607cbf | ||
|
|
6ee84cd2fc | ||
|
|
6f09bc9fb4 | ||
|
|
717e1a3b2b | ||
|
|
929cbd3315 | ||
|
|
e1518666dd | ||
|
|
4642a76ad8 | ||
|
|
ca85176ac6 | ||
|
|
534295a9ae | ||
|
|
b55a39a221 | ||
|
|
173375cb65 | ||
|
|
2a2b33bb55 | ||
|
|
113365cff9 | ||
|
|
ec0051c075 | ||
|
|
fee18f143e | ||
|
|
02c779cfa3 | ||
|
|
e612d7a2f9 | ||
|
|
94b66258b5 | ||
|
|
34e4f182bc | ||
|
|
e07e03c26d | ||
|
|
3b86bc97ea | ||
|
|
ffdbe60da0 | ||
|
|
47314d0f13 | ||
|
|
26e294c29b | ||
|
|
0ff19e9414 | ||
|
|
679acd30ba | ||
|
|
efbe5e8729 | ||
|
|
5dd170d2e9 | ||
|
|
bc412b48ea | ||
|
|
747b546c26 | ||
|
|
49407987fe | ||
|
|
258b507179 | ||
|
|
0b082e8768 | ||
|
|
bf4c11d0d4 | ||
|
|
dd37d003ef | ||
|
|
cd6809685f | ||
|
|
31101d54a4 | ||
|
|
34b52cb835 | ||
|
|
58639ee53e | ||
|
|
bedc708dfa | ||
|
|
1554dcee0d | ||
|
|
e9c6c040da | ||
|
|
88922ea4ee | ||
|
|
08a4317b46 | ||
|
|
1728742096 | ||
|
|
25431f32f0 | ||
|
|
eba0390502 | ||
|
|
e9bc8afac8 | ||
|
|
34c397002c | ||
|
|
2feaad8b0d | ||
|
|
66191f946d | ||
|
|
a58d2b87f8 | ||
|
|
b8e68efe70 | ||
|
|
c75ca5cf06 | ||
|
|
da395729c3 | ||
|
|
20c4d00df8 | ||
|
|
3617e59548 | ||
|
|
e7710f0c66 | ||
|
|
e17b76ad7a | ||
|
|
a51ac787c0 | ||
|
|
72b9f78e14 | ||
|
|
d0470409d6 | ||
|
|
f48169633c | ||
|
|
7dcf5887e6 | ||
|
|
285ebd3413 | ||
|
|
9b6a843177 | ||
|
|
4b271f27fb | ||
|
|
4a8dfc42cf | ||
|
|
f2c3d23140 | ||
|
|
e2b06d9228 | ||
|
|
32394374ff | ||
|
|
2d3c5064e1 | ||
|
|
df48d1c19f | ||
|
|
9b9f1ad1b9 | ||
|
|
8b632ac029 | ||
|
|
89d1ab37de | ||
|
|
165c3adf1d | ||
|
|
59530e4758 | ||
|
|
c16040a4a6 | ||
|
|
5ae95190ed | ||
|
|
26d71c90f5 | ||
|
|
90d415861d | ||
|
|
b84e651eac | ||
|
|
28230bbf52 | ||
|
|
140e267639 | ||
|
|
88226672f1 | ||
|
|
caac9d83ca | ||
|
|
78b1ab8360 | ||
|
|
5c54bd1e98 | ||
|
|
3d8317a747 | ||
|
|
bb8e15ceab | ||
|
|
959c49f6d8 | ||
|
|
5c89a8451e | ||
|
|
96099636dc | ||
|
|
21340a5ece | ||
|
|
98c912e1a7 | ||
|
|
0953dae221 | ||
|
|
c4e3110034 | ||
|
|
7720bfab95 | ||
|
|
93195facba | ||
|
|
c140d110c6 | ||
|
|
249ae05281 | ||
|
|
0390b5601e | ||
|
|
5345868148 | ||
|
|
6e80315531 | ||
|
|
aa6ee5ef38 | ||
|
|
f8654a3a2f | ||
|
|
b7faa9023e | ||
|
|
050d902ed1 | ||
|
|
c425a837a9 | ||
|
|
f7fe4d4865 | ||
|
|
61b5471ed8 | ||
|
|
865a8dd355 | ||
|
|
d99121d6fa | ||
|
|
a5ca5dffa4 | ||
|
|
db3797c1d2 | ||
|
|
e230e1df96 | ||
|
|
2bdbdd6930 | ||
|
|
57a0f0fe92 | ||
|
|
9005b484f0 | ||
|
|
a0ad81180e | ||
|
|
1ef91e3fc4 | ||
|
|
0fd088c757 | ||
|
|
7638156666 | ||
|
|
6dada090b3 | ||
|
|
9882464505 | ||
|
|
13948c0b76 | ||
|
|
c344a3a66e | ||
|
|
c15ddc295c | ||
|
|
63dfc892f1 | ||
|
|
5203376bc5 | ||
|
|
80a2dce994 | ||
|
|
427629b4d5 | ||
|
|
ffe0a1f975 | ||
|
|
cab082438e | ||
|
|
8aed87394d | ||
|
|
08d330b406 | ||
|
|
0fa20cb231 | ||
|
|
85dad73e9d | ||
|
|
b4570b4996 | ||
|
|
20e96a9241 | ||
|
|
b75412d6ae | ||
|
|
ae3d25986d | ||
|
|
e95bcc4ba2 | ||
|
|
b3bcbcccce | ||
|
|
5dbd7c9e58 | ||
|
|
ea18779781 | ||
|
|
9e5eb05769 | ||
|
|
d5d5f1858c | ||
|
|
2acfbdb768 | ||
|
|
be09722d84 | ||
|
|
044bea0935 | ||
|
|
6c32a4c0ab | ||
|
|
1ad569c470 | ||
|
|
67c5531961 | ||
|
|
c3a19c6d98 | ||
|
|
7569a8608a | ||
|
|
00fa30f243 | ||
|
|
0e4f7e1d9a | ||
|
|
50993b5dfd | ||
|
|
261191ffd7 | ||
|
|
1c0d022ac2 | ||
|
|
4e3ff19689 | ||
|
|
f46ee12364 | ||
|
|
8f2f07cabf | ||
|
|
3fabbbff4d | ||
|
|
84ef0ebb17 | ||
|
|
5166ffca33 | ||
|
|
18788727f4 | ||
|
|
0fda3c4f44 | ||
|
|
ed140346a7 | ||
|
|
751eb2c8bb | ||
|
|
089162b0be | ||
|
|
90f552b6b6 | ||
|
|
4c41d7e7fb | ||
|
|
39f7cff7c7 | ||
|
|
b28eac2626 | ||
|
|
198f561541 | ||
|
|
63a912629d | ||
|
|
d9e1cb44c8 | ||
|
|
5e87af8b2a | ||
|
|
e75840737e | ||
|
|
f91a495875 | ||
|
|
8266959681 | ||
|
|
b3d5e678f4 | ||
|
|
c0b839eff7 | ||
|
|
b0dfa48f04 | ||
|
|
0fcb2d0b2f | ||
|
|
cdfac32dfd | ||
|
|
87af7d9987 | ||
|
|
3fd8505195 | ||
|
|
a734cd3640 | ||
|
|
814020c05c | ||
|
|
296af36a6f | ||
|
|
a115729c55 | ||
|
|
2283ceec09 | ||
|
|
5afcf79c59 | ||
|
|
36aab3a738 | ||
|
|
685c9043a8 | ||
|
|
741e1bb7e9 | ||
|
|
5dddc91ba5 | ||
|
|
c228cde2b6 | ||
|
|
aee07949a3 | ||
|
|
6553d775d5 | ||
|
|
6feb4a3221 | ||
|
|
92ef8644c5 | ||
|
|
935d447c6a | ||
|
|
4a1f993fd1 | ||
|
|
e8be2bbbec | ||
|
|
35d4aef5f8 | ||
|
|
46ccfacb2b | ||
|
|
25e2f1c2dd | ||
|
|
07d96fe486 | ||
|
|
cf2cc71393 | ||
|
|
6ff315a299 | ||
|
|
5f14d62c0d | ||
|
|
2021a2df74 | ||
|
|
a1733bb412 | ||
|
|
5f332682ec | ||
|
|
7e0890d57d |
1578
.circleci/config.yml
1578
.circleci/config.yml
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,9 @@ charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.{js,ts,tsx,scss}]
|
||||
quote_type = single
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
|
||||
4
.eslintrc
Normal file
4
.eslintrc
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"extends": ["@grafana/eslint-config"],
|
||||
"root": true
|
||||
}
|
||||
7
.github/CODEOWNERS
vendored
7
.github/CODEOWNERS
vendored
@@ -13,4 +13,9 @@
|
||||
|
||||
# Documentation owner: Diana Payton
|
||||
/docs/ @oddlittlebird
|
||||
/contribute/ @oddlittlebird @marcusolsson
|
||||
/contribute/ @oddlittlebird @marcusolsson
|
||||
|
||||
# Backend code
|
||||
*.go @grafana/backend-platform
|
||||
go.mod @grafana/backend-platform
|
||||
go.sum @grafana/backend-platform
|
||||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
id: publish
|
||||
with:
|
||||
repository: grafana/website
|
||||
branch: docs-grafana
|
||||
branch: master
|
||||
host: github.com
|
||||
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
|
||||
source_folder: docs/sources
|
||||
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -11,6 +11,8 @@ awsconfig
|
||||
/public/views/error.html
|
||||
/emails/dist
|
||||
/reports
|
||||
.yarnrc
|
||||
.yarn/
|
||||
|
||||
# Enterprise emails
|
||||
/emails/templates/enterprise_*
|
||||
@@ -89,6 +91,7 @@ debug.test
|
||||
/packages/**/dist
|
||||
/packages/**/compiled
|
||||
/packages/**/.rpt2_cache
|
||||
/packages/**/tsdoc-metadata.json
|
||||
|
||||
# Ignore go local build dependencies
|
||||
/scripts/go/bin/**
|
||||
|
||||
164
CHANGELOG.md
164
CHANGELOG.md
@@ -1,16 +1,169 @@
|
||||
# 6.6.0 (unreleased)
|
||||
# 6.7.0 (unreleased)
|
||||
|
||||
## Breaking changes
|
||||
* **Slack**: Removed _Mention_ setting and instead introduce _Mention Users_, _Mention Groups_, and _Mention Channel_. The first two settings require user and group IDs, respectively. This change was necessary because the way of mentioning via the Slack API [changed](https://api.slack.com/changelog/2017-09-the-one-about-usernames) and mentions in Slack notifications no longer worked.
|
||||
|
||||
* **Alerting**: Reverts the behavior of `diff` and `percent_diff` to not always be absolute. Something we introduced by mistake in [6.1.0](https://github.com/grafana/grafana/commit/28eaac3a9c7082e8c496005c1cb66b4b70a4f82f). Alerting now support `diff()`, `diff_abs()`, `percent_diff()` and `percent_diff_abs()`. [#21338](https://github.com/grafana/grafana/pull/21338)
|
||||
|
||||
### Notice about changes in backendSrv for plugin authors
|
||||
|
||||
In our mission to migrate away from AngularJS to React we have removed all AngularJS dependencies in the core data retrieval service `backendSrv`.
|
||||
|
||||
Removing the AngularJS dependencies in `backendSrv` has the unfortunate side effect of AngularJS digest no longer being triggered for any request made with `backendSrv`. Because of this, external plugins using `backendSrv` directly may suffer from strange behaviour in the UI.
|
||||
|
||||
To remedy this issue, as a plugin author you need to trigger the digest after a direct call to `backendSrv`.
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
backendSrv.get(‘http://your.url/api’).then(result => {
|
||||
this.result = result;
|
||||
this.$scope.$digest();
|
||||
});
|
||||
```
|
||||
|
||||
You can test your plugin with the `master` branch version of Grafana.
|
||||
|
||||
# 6.6.2 (2020-02-20)
|
||||
|
||||
### Features / Enhancements
|
||||
* **Data proxy**: Log proxy errors using Grafana logger. [#22174](https://github.com/grafana/grafana/pull/22174), [@bergquist](https://github.com/bergquist)
|
||||
* **Metrics**: Add gauge for requests currently in flight. [#22168](https://github.com/grafana/grafana/pull/22168), [@bergquist](https://github.com/bergquist)
|
||||
|
||||
* **Graphite**: Add Metrictank dashboard to Graphite datasource
|
||||
### Bug Fixes
|
||||
* **@grafana/ui**: Fix displaying of bars in React Graph. [#21968](https://github.com/grafana/grafana/pull/21968), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **API**: Fix redirect issue when configured to use a subpath. [#21652](https://github.com/grafana/grafana/pull/21652), [@briangann](https://github.com/briangann)
|
||||
* **API**: Improve recovery middleware when response already been written. [#22256](https://github.com/grafana/grafana/pull/22256), [@marefr](https://github.com/marefr)
|
||||
* **Auth**: Don't rotate auth token when requests are cancelled by client. [#22106](https://github.com/grafana/grafana/pull/22106), [@bergquist](https://github.com/bergquist)
|
||||
* **Docker**: Downgrade to 18.04 LTS base image. [#22313](https://github.com/grafana/grafana/pull/22313), [@aknuds1](https://github.com/aknuds1)
|
||||
* **Elasticsearch**: Fix auto interval for date histogram in explore logs mode. [#21937](https://github.com/grafana/grafana/pull/21937), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Image Rendering**: Fix PhantomJS compatibility with es2016 node dependencies. [#21677](https://github.com/grafana/grafana/pull/21677), [@dprokop](https://github.com/dprokop)
|
||||
* **Links**: Assure base url when single stat, panel and data links are built. [#21956](https://github.com/grafana/grafana/pull/21956), [@dprokop](https://github.com/dprokop)
|
||||
* **Loki, Prometheus**: Fix PromQL and LogQL syntax highlighting. [#21944](https://github.com/grafana/grafana/pull/21944), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **OAuth**: Enforce auto_assign_org_id setting when role mapping enabled using Generic OAuth. [#22268](https://github.com/grafana/grafana/pull/22268), [@aknuds1](https://github.com/aknuds1)
|
||||
* **Prometheus**: Updates explore query editor to prevent it from throwing error on edit. [#21605](https://github.com/grafana/grafana/pull/21605), [@Estrax](https://github.com/Estrax)
|
||||
* **Server**: Reorder cipher suites for better security. [#22101](https://github.com/grafana/grafana/pull/22101), [@tofu-rocketry](https://github.com/tofu-rocketry)
|
||||
* **TimePicker**: fixing weird behavior with calendar when switching between months/years . [#22253](https://github.com/grafana/grafana/pull/22253), [@mckn](https://github.com/mckn)
|
||||
|
||||
# 6.6.1 (2020-02-06)
|
||||
|
||||
### Bug Fixes
|
||||
* **Annotations**: Change indices and rewrites annotation find query to improve database query performance. [#21915](https://github.com/grafana/grafana/pull/21915), [@papagian](https://github.com/papagian), [@marefr](https://github.com/marefr), [@kylebrandt](https://github.com/kylebrandt)
|
||||
* **Azure Monitor**: Fix Application Insights API key field to allow input. [#21738](https://github.com/grafana/grafana/pull/21738), [@shavonn](https://github.com/shavonn)
|
||||
* **BarGauge**: Fix so we properly display the "no result" value when query returns empty result. [#21791](https://github.com/grafana/grafana/pull/21791), [@mckn](https://github.com/mckn)
|
||||
* **Datasource**: Show access (Browser/Server) select on the Prometheus datasource. [#21833](https://github.com/grafana/grafana/pull/21833), [@jorgelbg](https://github.com/jorgelbg)
|
||||
* **DatasourceSettings**: Fixed issue navigating away from data source settings page. [#21841](https://github.com/grafana/grafana/pull/21841), [@torkelo](https://github.com/torkelo)
|
||||
* **Graph Panel**: Fix typo in thresholds form. [#21903](https://github.com/grafana/grafana/pull/21903), [@orendain](https://github.com/orendain)
|
||||
* **Graphite**: Fixed issue with functions with multiple required params and no defaults caused params that could not be edited (groupByNodes groupByTags). [#21814](https://github.com/grafana/grafana/pull/21814), [@torkelo](https://github.com/torkelo)
|
||||
* **Image Rendering**: Fix render of graph panel legend aligned to the right using Grafana image renderer plugin/service. [#21854](https://github.com/grafana/grafana/pull/21854), [@marefr](https://github.com/marefr)
|
||||
* **Metrics**: Adds back missing summary quantiles. [#21858](https://github.com/grafana/grafana/pull/21858), [@kogent](https://github.com/kogent)
|
||||
* **OpenTSDB**: Adds back missing ngInject to make it work again. [#21796](https://github.com/grafana/grafana/pull/21796), [@marefr](https://github.com/marefr)
|
||||
* **Plugins**: Fix routing in app plugin pages. [#21847](https://github.com/grafana/grafana/pull/21847), [@dprokop](https://github.com/dprokop)
|
||||
* **Prometheus**: Fixes default step value for annotation query. [#21934](https://github.com/grafana/grafana/pull/21934), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Quota**: Makes LDAP + Quota work for the first login of a new user. [#21949](https://github.com/grafana/grafana/pull/21949), [@xlson](https://github.com/xlson)
|
||||
* **StatPanels**: Fixed change from singlestat to Gauge / BarGauge / Stat where default min & max (0, 100) was copied . [#21820](https://github.com/grafana/grafana/pull/21820), [@torkelo](https://github.com/torkelo)
|
||||
* **TimePicker**: Should display in kiosk mode. [#21816](https://github.com/grafana/grafana/pull/21816), [@evgbibko](https://github.com/evgbibko)
|
||||
* **grafana/toolkit**: Fix failing linter when there were lint issues. [#21849](https://github.com/grafana/grafana/pull/21849), [@dprokop](https://github.com/dprokop)
|
||||
|
||||
# 6.6.0 (2020-01-27)
|
||||
|
||||
### Features / Enhancements
|
||||
* **CloudWatch**: Add DynamoDB Accelerator (DAX) metrics & dimensions. [#21644](https://github.com/grafana/grafana/pull/21644), [@kenju](https://github.com/kenju)
|
||||
* **CloudWatch**: Auto period snap to next higher period. [#21659](https://github.com/grafana/grafana/pull/21659), [@sunker](https://github.com/sunker)
|
||||
* **Template variables**: Add error for failed query variable on time range update. [#21731](https://github.com/grafana/grafana/pull/21731), [@tskarhed](https://github.com/tskarhed)
|
||||
* **XSS**: Sanitize column link. [#21735](https://github.com/grafana/grafana/pull/21735), [@tskarhed](https://github.com/tskarhed)
|
||||
|
||||
### Bug Fixes
|
||||
* **Elasticsearch**: Fix adhoc variable filtering for logs query. [#21346](https://github.com/grafana/grafana/pull/21346), [@ceh](https://github.com/ceh)
|
||||
* **Explore**: Fix colors for log level when level value is capitalised. [#21646](https://github.com/grafana/grafana/pull/21646), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Explore**: Fix context view in logs, where some rows may have been filtered out.. [#21729](https://github.com/grafana/grafana/pull/21729), [@aocenas](https://github.com/aocenas)
|
||||
* **Loki**: Fix Loki with repeated panels and interpolation for Explore. [#21685](https://github.com/grafana/grafana/pull/21685), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **SQLStore**: Fix PostgreSQL failure to create organisation for first time. [#21648](https://github.com/grafana/grafana/pull/21648), [@papagian](https://github.com/papagian)
|
||||
|
||||
# 6.6.0-beta1 (2020-01-20)
|
||||
|
||||
## 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.
|
||||
|
||||
### Features / Enhancements
|
||||
* **Graphite**: Add Metrictank dashboard to Graphite datasource
|
||||
* **Admin**: Show name of user in users table view. [#18108](https://github.com/grafana/grafana/pull/18108), [@eleijonmarck](https://github.com/eleijonmarck)
|
||||
* **Alerting**: Add configurable severity support for PagerDuty notifier. [#19425](https://github.com/grafana/grafana/pull/19425), [@yemble](https://github.com/yemble)
|
||||
* **Alerting**: Add more information to webhook notifications. [#20420](https://github.com/grafana/grafana/pull/20420), [@michael-az](https://github.com/michael-az)
|
||||
* **Alerting**: Add support for sending tags in OpsGenie notifier. [#20810](https://github.com/grafana/grafana/pull/20810), [@aSapien](https://github.com/aSapien)
|
||||
* **Alerting**: Added fallbackText to Google Chat notifier. [#21464](https://github.com/grafana/grafana/pull/21464), [@alvarolmedo](https://github.com/alvarolmedo)
|
||||
* **Alerting**: Adds support for sending a single email to all recipients in email notifier. [#21091](https://github.com/grafana/grafana/pull/21091), [@marefr](https://github.com/marefr)
|
||||
* **Alerting**: Enable setting of OpsGenie priority via a tag. [#21298](https://github.com/grafana/grafana/pull/21298), [@zabullet](https://github.com/zabullet)
|
||||
* **Alerting**: Use fully qualified status emoji in Threema notifier. [#21305](https://github.com/grafana/grafana/pull/21305), [@dbrgn](https://github.com/dbrgn)
|
||||
* **Alerting**: new min_interval_seconds option to enforce a minimum evaluation frequency . [#21188](https://github.com/grafana/grafana/pull/21188), [@papagian](https://github.com/papagian)
|
||||
* **CloudWatch**: Calculate period based on time range. [#21471](https://github.com/grafana/grafana/pull/21471), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: Display partial result in graph when max DP/call limit is reached . [#21533](https://github.com/grafana/grafana/pull/21533), [@sunker](https://github.com/sunker)
|
||||
* **CloudWatch**: ECS/ContainerInsights metrics support. [#21125](https://github.com/grafana/grafana/pull/21125), [@briancurt](https://github.com/briancurt)
|
||||
* **CloudWatch**: Upgrade aws-sdk-go. [#20510](https://github.com/grafana/grafana/pull/20510), [@mtanda](https://github.com/mtanda)
|
||||
* **DataLinks**: allow using values from other fields in the same row (cells). [#21478](https://github.com/grafana/grafana/pull/21478), [@ryantxu](https://github.com/ryantxu)
|
||||
* **Editor**: Ignore closing brace when it was added by editor. [#21172](https://github.com/grafana/grafana/pull/21172), [@davkal](https://github.com/davkal)
|
||||
* **Explore**: Context tooltip to copy labels and values from graph. [#21405](https://github.com/grafana/grafana/pull/21405), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Explore**: Log message line wrapping options for logs. [#20360](https://github.com/grafana/grafana/pull/20360), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Forms**: introduce RadioButtonGroup. [#20828](https://github.com/grafana/grafana/pull/20828), [@dprokop](https://github.com/dprokop)
|
||||
* **Frontend**: Changes in Redux location should not strip subpath from location url. [#20161](https://github.com/grafana/grafana/pull/20161), [@wybczu](https://github.com/wybczu)
|
||||
* **Graph**: Add fill gradient option to series override line fill. [#20941](https://github.com/grafana/grafana/pull/20941), [@hendrikvh](https://github.com/hendrikvh)
|
||||
* **Graphite**: Add metrictank dashboard to Graphite datasource. [#20776](https://github.com/grafana/grafana/pull/20776), [@Dieterbe](https://github.com/Dieterbe)
|
||||
* **Graphite**: Do not change query when opening the query editor and there is no data. [#21588](https://github.com/grafana/grafana/pull/21588), [@daniellee](https://github.com/daniellee)
|
||||
* **Gravatar**: Use HTTPS by default. [#20964](https://github.com/grafana/grafana/pull/20964), [@jiajunhuang](https://github.com/jiajunhuang)
|
||||
* **Loki**: Support for template variable queries. [#20697](https://github.com/grafana/grafana/pull/20697), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **NewsPanel**: Add news as a builtin panel. [#21128](https://github.com/grafana/grafana/pull/21128), [@ryantxu](https://github.com/ryantxu)
|
||||
* **OAuth**: Removes send_client_credentials_via_post setting . [#20044](https://github.com/grafana/grafana/pull/20044), [@LK4D4](https://github.com/LK4D4)
|
||||
* **OpenTSDB**: Adding lookup limit to OpenTSDB datasource settings. [#20647](https://github.com/grafana/grafana/pull/20647), [@itamarst](https://github.com/itamarst)
|
||||
* **Postgres/MySQL/MSSQL**: Adds support for region annotations. [#20752](https://github.com/grafana/grafana/pull/20752), [@Bercon](https://github.com/Bercon)
|
||||
* **Prometheus**: Field to specify step in Explore. [#20195](https://github.com/grafana/grafana/pull/20195), [@Estrax](https://github.com/Estrax)
|
||||
* **Prometheus**: User metrics metadata to inform query hints. [#21304](https://github.com/grafana/grafana/pull/21304), [@davkal](https://github.com/davkal)
|
||||
* **Renderer**: Add user-agent to remote rendering service requests. [#20956](https://github.com/grafana/grafana/pull/20956), [@kfdm](https://github.com/kfdm)
|
||||
* **Security**: Add disabled option for cookie samesite attribute. [#21472](https://github.com/grafana/grafana/pull/21472), [@marefr](https://github.com/marefr)
|
||||
* **Stackdriver**: Support meta labels. [#21373](https://github.com/grafana/grafana/pull/21373), [@sunker](https://github.com/sunker)
|
||||
* **TablePanel, GraphPanel**: Exclude hidden columns from CSV. [#19925](https://github.com/grafana/grafana/pull/19925), [@literalplus](https://github.com/literalplus)
|
||||
* **Templating**: Update variables on location changed. [#21480](https://github.com/grafana/grafana/pull/21480), [@ryantxu](https://github.com/ryantxu)
|
||||
* **Tracing**: Support configuring Jaeger client from environment. [#21103](https://github.com/grafana/grafana/pull/21103), [@hairyhenderson](https://github.com/hairyhenderson)
|
||||
* **Units**: Add currency and energy units. [#20428](https://github.com/grafana/grafana/pull/20428), [@anirudh-ramesh](https://github.com/anirudh-ramesh)
|
||||
* **Units**: Support dynamic count and currency units. [#21279](https://github.com/grafana/grafana/pull/21279), [@ryantxu](https://github.com/ryantxu)
|
||||
* **grafana/toolkit**: Add option to override webpack config. [#20872](https://github.com/grafana/grafana/pull/20872), [@sebimarkgraf](https://github.com/sebimarkgraf)
|
||||
* **grafana/ui**: ConfirmModal component. [#20965](https://github.com/grafana/grafana/pull/20965), [@alexanderzobnin](https://github.com/alexanderzobnin)
|
||||
* **grafana/ui**: Create Tabs component. [#21328](https://github.com/grafana/grafana/pull/21328), [@peterholmberg](https://github.com/peterholmberg)
|
||||
* **grafana/ui**: New table component. [#20991](https://github.com/grafana/grafana/pull/20991), [@peterholmberg](https://github.com/peterholmberg)
|
||||
* **grafana/ui**: New updated time picker. [#20931](https://github.com/grafana/grafana/pull/20931), [@mckn](https://github.com/mckn)
|
||||
* **White-labeling**: Makes it possible to customize the footer and login background (Enterprise)
|
||||
|
||||
### Bug Fixes
|
||||
* **API**: Optionally list expired API keys. [#20468](https://github.com/grafana/grafana/pull/20468), [@papagian](https://github.com/papagian)
|
||||
* **Alerting**: Fix custom_details to be a JSON object instead of a string in PagerDuty notifier. [#21150](https://github.com/grafana/grafana/pull/21150), [@tehGoti](https://github.com/tehGoti)
|
||||
* **Alerting**: Fix image rendering and uploading timeout preventing to send alert notifications. [#21536](https://github.com/grafana/grafana/pull/21536), [@marefr](https://github.com/marefr)
|
||||
* **Alerting**: Fix panic in dingding notifier . [#20378](https://github.com/grafana/grafana/pull/20378), [@csyangchen](https://github.com/csyangchen)
|
||||
* **Alerting**: Fix template query validation logic. [#20721](https://github.com/grafana/grafana/pull/20721), [@okhowang](https://github.com/okhowang)
|
||||
* **Alerting**: If no permission to clear history, keep the historical data. [#19007](https://github.com/grafana/grafana/pull/19007), [@lzdw](https://github.com/lzdw)
|
||||
* **Alerting**: Unpausing a non-paused alert rule should not change status to Unknown. [#21375](https://github.com/grafana/grafana/pull/21375), [@vikkyomkar](https://github.com/vikkyomkar)
|
||||
* **Api**: Fix returned message when enabling, disabling and deleting a non-existing user. [#21391](https://github.com/grafana/grafana/pull/21391), [@dpavlos](https://github.com/dpavlos)
|
||||
* **Auth**: Rotate auth tokens at the end of requests. [#21347](https://github.com/grafana/grafana/pull/21347), [@woodsaj](https://github.com/woodsaj)
|
||||
* **Azure Monitor**: Fixes error using azure monitor credentials with log analytics and non-default cloud. [#21032](https://github.com/grafana/grafana/pull/21032), [@shavonn](https://github.com/shavonn)
|
||||
* **CLI**: Return error and aborts when plugin file extraction fails. [#20849](https://github.com/grafana/grafana/pull/20849), [@marefr](https://github.com/marefr)
|
||||
* **CloudWatch**: Multi-valued template variable dimension alias fix. [#21541](https://github.com/grafana/grafana/pull/21541), [@sunker](https://github.com/sunker)
|
||||
* **Dashboard**: Disable draggable panels on small devices. [#20629](https://github.com/grafana/grafana/pull/20629), [@peterholmberg](https://github.com/peterholmberg)
|
||||
* **DataLinks**: Links with ${__value.time} do not work when clicking on first result . [#20019](https://github.com/grafana/grafana/pull/20019), [@dweineha](https://github.com/dweineha)
|
||||
* **Explore**: Fix showing of results in selected timezone (UTC/local). [#20812](https://github.com/grafana/grafana/pull/20812), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Explore**: Fix timepicker when browsing back after switching datasource. [#21454](https://github.com/grafana/grafana/pull/21454), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Explore**: Sync timepicker and logs after live-tailing stops. [#20979](https://github.com/grafana/grafana/pull/20979), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Graph**: Fix when clicking a plot on a touch device we won't display the annotation menu. [#21479](https://github.com/grafana/grafana/pull/21479), [@mckn](https://github.com/mckn)
|
||||
* **OAuth**: Fix role mapping from id token. [#20300](https://github.com/grafana/grafana/pull/20300), [@seanson](https://github.com/seanson)
|
||||
* **Plugins**: Add appSubUrl string to config pages. [#21414](https://github.com/grafana/grafana/pull/21414), [@Maddin-619](https://github.com/Maddin-619)
|
||||
* **Provisioning**: Start provision dashboards after Grafana server have started. [#21564](https://github.com/grafana/grafana/pull/21564), [@marefr](https://github.com/marefr)
|
||||
* **Render**: Use https as protocol when rendering if HTTP2 enabled. [#21600](https://github.com/grafana/grafana/pull/21600), [@marefr](https://github.com/marefr)
|
||||
* **Security**: Use same cookie settings for all cookies. [#19787](https://github.com/grafana/grafana/pull/19787), [@jeffdesc](https://github.com/jeffdesc)
|
||||
* **Singlestat**: Support empty value map texts. [#20952](https://github.com/grafana/grafana/pull/20952), [@hendrikvh](https://github.com/hendrikvh)
|
||||
* **Units**: Custom suffix and prefix units can now be specified, for example custom currency & SI & time formats. [#20763](https://github.com/grafana/grafana/pull/20763), [@ryantxu](https://github.com/ryantxu)
|
||||
* **grafana/ui**: Do not build grafana/ui in strict mode as it depends on non-strict libs. [#21319](https://github.com/grafana/grafana/pull/21319), [@dprokop](https://github.com/dprokop)
|
||||
|
||||
# 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)
|
||||
* **API**: Validate redirect_to cookie has valid (Grafana) url . [#21057](https://github.com/grafana/grafana/pull/21057), [@papagian](https://github.com/papagian), Thanks Habi S Ravi for reporting this issue.
|
||||
|
||||
### Bug Fixes
|
||||
* **AdHocFilter**: Shows SubMenu when filtering directly from table. [#21017](https://github.com/grafana/grafana/pull/21017), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
@@ -133,7 +286,8 @@
|
||||
* **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)
|
||||
|
||||
* **Enterprise**: Enterprise without a license behaves like OSS (Enterprise)
|
||||
|
||||
### 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)
|
||||
@@ -234,6 +388,7 @@ also fixed a security vulnerability. Thanks Yuriy Dyachenko for discovering and
|
||||
* **Explore**: Take root_url setting into account when redirecting from dashboard to explore. [#19447](https://github.com/grafana/grafana/pull/19447), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Explore**: Update broken link to logql docs. [#19510](https://github.com/grafana/grafana/pull/19510), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Logs**: Adds Logs Panel as a visualization. [#19504](https://github.com/grafana/grafana/pull/19504), [@davkal](https://github.com/davkal)
|
||||
* **Reporting**: Generate and email PDF reports based on Dashboards (Enterprise)
|
||||
|
||||
### Bug Fixes
|
||||
* **CLI**: Fix version selection for plugin install. [#19498](https://github.com/grafana/grafana/pull/19498), [@aocenas](https://github.com/aocenas)
|
||||
@@ -486,6 +641,7 @@ Please consider migrating from PhantomJS to the [Grafana Image Renderer plugin](
|
||||
* **Templating**: Support selecting all filtered values of a multi-value variable. [#16873](https://github.com/grafana/grafana/pull/16873), [@r66ad](https://github.com/r66ad)
|
||||
* **Tracing**: allow propagation with Zipkin headers. [#17009](https://github.com/grafana/grafana/pull/17009), [@jrockway](https://github.com/jrockway)
|
||||
* **Users**: Disable users removed from LDAP. [#16820](https://github.com/grafana/grafana/pull/16820), [@alexanderzobnin](https://github.com/alexanderzobnin)
|
||||
* **SAML**: Add SAML as an authentication option (Enterprise)
|
||||
|
||||
### Bug Fixes
|
||||
* **AddPanel**: Fix issue when removing moved add panel widget . [#17659](https://github.com/grafana/grafana/pull/17659), [@dehrax](https://github.com/dehrax)
|
||||
|
||||
@@ -35,7 +35,7 @@ COPY packages packages
|
||||
|
||||
RUN yarn install --pure-lockfile --no-progress
|
||||
|
||||
COPY Gruntfile.js tsconfig.json tslint.json .browserslistrc ./
|
||||
COPY Gruntfile.js tsconfig.json .eslintrc .editorconfig .browserslistrc ./
|
||||
COPY public public
|
||||
COPY scripts scripts
|
||||
COPY emails emails
|
||||
|
||||
@@ -26,15 +26,15 @@ COPY packages packages
|
||||
|
||||
RUN yarn install --pure-lockfile
|
||||
|
||||
COPY Gruntfile.js tsconfig.json tslint.json .browserslistrc ./
|
||||
COPY public public
|
||||
COPY Gruntfile.js tsconfig.json .eslintrc .editorconfig .browserslistrc ./
|
||||
COPY public public
|
||||
COPY scripts scripts
|
||||
COPY emails emails
|
||||
|
||||
ENV NODE_ENV production
|
||||
RUN ./node_modules/.bin/grunt build
|
||||
|
||||
FROM ubuntu:18.10
|
||||
FROM ubuntu:19.10
|
||||
|
||||
LABEL maintainer="Grafana team <hello@grafana.com>"
|
||||
EXPOSE 3000
|
||||
|
||||
34
api-extractor.json
Normal file
34
api-extractor.json
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
||||
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
|
||||
"bundledPackages": [],
|
||||
"compiler": {},
|
||||
"apiReport": {
|
||||
"enabled": false
|
||||
},
|
||||
"docModel": {
|
||||
"enabled": true,
|
||||
"apiJsonFilePath": "<projectFolder>/../../reports/docs/<unscopedPackageName>.api.json"
|
||||
},
|
||||
"dtsRollup": {
|
||||
"enabled": false
|
||||
},
|
||||
"tsdocMetadata": {},
|
||||
"messages": {
|
||||
"compilerMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
}
|
||||
},
|
||||
"extractorMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
}
|
||||
},
|
||||
"tsdocMessageReporting": {
|
||||
"default": {
|
||||
"logLevel": "warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -230,6 +230,10 @@ snapshot_remove_expired = true
|
||||
# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
|
||||
versions_to_keep = 20
|
||||
|
||||
# Minimum dashboard refresh interval. When set, this will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is not set/unrestricted.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
min_refresh_interval =
|
||||
|
||||
#################################### Users ###############################
|
||||
[users]
|
||||
# disable user signup / registration
|
||||
@@ -366,6 +370,19 @@ client_secret = some_secret
|
||||
scopes = user:email
|
||||
allowed_organizations =
|
||||
|
||||
#################################### Azure AD OAuth #######################
|
||||
[auth.azuread]
|
||||
name = Azure AD
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
client_id = some_client_id
|
||||
client_secret = some_client_secret
|
||||
scopes = openid email profile
|
||||
auth_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorize
|
||||
token_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
|
||||
allowed_domains =
|
||||
allowed_groups =
|
||||
|
||||
#################################### Generic OAuth #######################
|
||||
[auth.generic_oauth]
|
||||
name = OAuth
|
||||
|
||||
@@ -229,6 +229,10 @@
|
||||
# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
|
||||
;versions_to_keep = 20
|
||||
|
||||
# Minimum dashboard refresh interval. When set, this will restrict users to set the refresh interval of a dashboard lower than given interval. Per default this is not set/unrestricted.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;min_refresh_interval =
|
||||
|
||||
#################################### Users ###############################
|
||||
[users]
|
||||
# disable user signup / registration
|
||||
@@ -356,6 +360,19 @@
|
||||
;scopes = user:email
|
||||
;allowed_organizations =
|
||||
|
||||
#################################### Azure AD OAuth #######################
|
||||
[auth.azuread]
|
||||
;name = Azure AD
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
;client_id = some_client_id
|
||||
;client_secret = some_client_secret
|
||||
;scopes = openid email profile
|
||||
;auth_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorize
|
||||
;token_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
|
||||
;allowed_domains =
|
||||
;allowed_groups =
|
||||
|
||||
#################################### Generic OAuth ##########################
|
||||
[auth.generic_oauth]
|
||||
;enabled = false
|
||||
|
||||
@@ -72,7 +72,7 @@ if err := s.bus.Dispatch(cmd); err != nil {
|
||||
|
||||
### Handle commands
|
||||
|
||||
Let others parts of the application dispatch commands to a service, by registering a _command handler_:
|
||||
Let other parts of the application dispatch commands to a service, by registering a _command handler_:
|
||||
|
||||
To handle a command, register a command handler in the `Init` function.
|
||||
|
||||
@@ -91,7 +91,7 @@ func (s *MyService) SendStickers(cmd *models.SendStickersCommand) error {
|
||||
|
||||
## Queries
|
||||
|
||||
A command handler can optionally populate the command sent it. This pattern is commonly used to implement _queries_.
|
||||
A command handler can optionally populate the command sent to it. This pattern is commonly used to implement _queries_.
|
||||
|
||||
### Making a query
|
||||
|
||||
|
||||
@@ -39,7 +39,3 @@ Tests must use the standard library, `testing`. For assertions, prefer using [te
|
||||
The majority of our tests uses [GoConvey](http://goconvey.co/) but that's something we want to avoid going forward.
|
||||
|
||||
In the `sqlstore` package we do database operations in tests and while some might say that's not suited for unit tests. We think they are fast enough and provide a lot of value.
|
||||
|
||||
## General guidelines
|
||||
|
||||
- Avoid using import aliases, e.g. `import m "github.com/grafana/grafana/pkg/models"`.
|
||||
|
||||
209
contribute/style-guides/code-comments.md
Normal file
209
contribute/style-guides/code-comments.md
Normal file
@@ -0,0 +1,209 @@
|
||||
# Guidelines for code comments in grafana-* packages
|
||||
|
||||
This document aims to give you some recommendation on how to add code comments to the exported code in the grafana packages.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Add package description](#add-package-description)
|
||||
1. [Set stability of an API](#set-stability-of-an-api)
|
||||
1. [Deprecate an API](#deprecate-an-api)
|
||||
1. [Specify parameters](#specify-parameters)
|
||||
1. [Set return values](#set-return-values)
|
||||
____
|
||||
|
||||
## Add package description
|
||||
|
||||
Each package has an overview explaining the overall responsibility and usage of the package.
|
||||
|
||||
You can document this description with [`@packageDocumentation`](https://api-extractor.com/pages/tsdoc/tag_packagedocumentation/) tag.
|
||||
|
||||
Add this tag to the `<packageRoot>/src/index.ts` entry file to have one place for the package description.
|
||||
|
||||
## Set stability of an API
|
||||
|
||||
All `exported` apis from the package should have a release tag to indicate its stability.
|
||||
|
||||
- [`@alpha`](https://api-extractor.com/pages/tsdoc/tag_alpha/) - early draft of api and will probably change.
|
||||
- [`@beta`](https://api-extractor.com/pages/tsdoc/tag_beta/) - close to being stable but might change.
|
||||
- [`@public`](https://api-extractor.com/pages/tsdoc/tag_public/) - ready for useage in production.
|
||||
- [`@internal`](https://api-extractor.com/pages/tsdoc/tag_internal/) - for internal use only.
|
||||
|
||||
### Main stability of APIs
|
||||
|
||||
Add a tag to mark the stability of the whole exported `class/interface/function/type` etc.
|
||||
|
||||
Please place the `release tag` at the bottom of the comment to make it consistent among files and easier to read.
|
||||
|
||||
**Do:**
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Will help to create DataFrame objects and handle
|
||||
* the heavy lifting of creating a complex object.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const dataFrame = factory.create();
|
||||
* ```
|
||||
*
|
||||
* @public
|
||||
**/
|
||||
export class DataFrameFactory {
|
||||
create(): DataFrame { }
|
||||
}
|
||||
```
|
||||
|
||||
**Don't**
|
||||
```typescript
|
||||
/**
|
||||
* Will help to create DataFrame objects and handle
|
||||
* the heavy lifting of creating a complex object.
|
||||
*
|
||||
* @public
|
||||
* @example
|
||||
* ```typescript
|
||||
* const dataFrame = factory.create();
|
||||
* ```
|
||||
**/
|
||||
export class DataFrameFactory {
|
||||
create(): DataFrame { }
|
||||
}
|
||||
```
|
||||
|
||||
### Partial stability of APIs
|
||||
|
||||
Add the main stability of the API at the top according to [Main stability of API](#main-stability-of-api).
|
||||
|
||||
Then override the non-stable parts of the API with the proper [release tag](#release-tags). This should also be place at the bottom of the comment block.
|
||||
|
||||
**Do:**
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Will help to create DataFrame objects and handle
|
||||
* the heavy lifting of creating a complex object.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const dataFrame = factory.create();
|
||||
* ```
|
||||
*
|
||||
* @public
|
||||
**/
|
||||
export class DataFrameFactory {
|
||||
create(): DataFrame { }
|
||||
|
||||
/**
|
||||
* @beta
|
||||
**/
|
||||
createMany(): DataFrames[] {}
|
||||
}
|
||||
```
|
||||
|
||||
**Don't**
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Will help to create DataFrame objects and handle
|
||||
* the heavy lifting of creating a complex object.
|
||||
*
|
||||
* @example
|
||||
* ```typescript
|
||||
* const dataFrame = factory.create();
|
||||
* ```
|
||||
**/
|
||||
export class DataFrameFactory {
|
||||
/**
|
||||
* @public
|
||||
**/
|
||||
create(): DataFrame { }
|
||||
|
||||
/**
|
||||
* @beta
|
||||
**/
|
||||
createMany(): DataFrame[] {}
|
||||
}
|
||||
```
|
||||
|
||||
## Deprecate an API
|
||||
If you want to mark an API as deprecated to signal that this API will be removed in the future, then add the [`@deprecated`](https://api-extractor.com/pages/tsdoc/tag_deprecated/) tag.
|
||||
|
||||
If applicable add a reason why the API is deprecated directly after the `@deprecated tag`.
|
||||
|
||||
## Specify parameters
|
||||
If you want to specify the possible parameters that can be passed to an API, then add the [`@param`](https://api-extractor.com/pages/tsdoc/tag_param/) tag.
|
||||
|
||||
This attribute can be skipped if the type provided by `typescript` and the function comment or the function name is enough to explain what the parameters are.
|
||||
|
||||
**Do:**
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Will help to create a resource resovler depending
|
||||
* on the current execution context.
|
||||
*
|
||||
* @param context - The current execution context.
|
||||
* @returns FileResolver if executed on the server otherwise a HttpResolver.
|
||||
* @public
|
||||
**/
|
||||
export const factory = (context: Context): IResolver => {
|
||||
if (context.isServer) {
|
||||
return new FileResolver();
|
||||
}
|
||||
return new HttpResolver();
|
||||
}
|
||||
```
|
||||
|
||||
**Don't**
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Will compare two numbers to see if they are equal to each others.
|
||||
*
|
||||
* @param x - The first number
|
||||
* @param y - The second number
|
||||
* @public
|
||||
**/
|
||||
export const isEqual = (x: number, y: number): boolean => {
|
||||
return x === y;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Set return values
|
||||
If you want to specify the return value from a function you can use the [`@returns`](https://api-extractor.com/pages/tsdoc/tag_returns/) tag.
|
||||
|
||||
This attribute can be skipped if the type provided by `typescript` and the function comment or the function name is enough to explain what the function returns.
|
||||
|
||||
**Do:**
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Will help to create a resource resovler depending
|
||||
* on the current execution context.
|
||||
*
|
||||
* @param context - The current execution context.
|
||||
* @returns FileResolver if executed on the server otherwise a HttpResolver.
|
||||
* @public
|
||||
**/
|
||||
export const factory = (context: Context): IResolver => {
|
||||
if (context.isServer) {
|
||||
return new FileResolver();
|
||||
}
|
||||
return new HttpResolver();
|
||||
}
|
||||
```
|
||||
|
||||
**Don't**
|
||||
|
||||
```typescript
|
||||
/**
|
||||
* Will compare two numbers to see if they are equal to each others.
|
||||
*
|
||||
* @returns true if values are equal
|
||||
* @public
|
||||
**/
|
||||
export const isEqual = (x: number, y: number): boolean => {
|
||||
return x === y;
|
||||
}
|
||||
```
|
||||
144
contribute/style-guides/documentation-markdown-guide.md
Normal file
144
contribute/style-guides/documentation-markdown-guide.md
Normal file
@@ -0,0 +1,144 @@
|
||||
# Markdown style guide
|
||||
|
||||
This guide for Markdown style helps keep contributions consistent across all documentation
|
||||
created for Grafana products. Refer to the guide and update its sections as needed when a
|
||||
Subject Matter Expert answers a question on Markdown style, or a decision is made about
|
||||
how to apply Markdown.
|
||||
|
||||
## Headers
|
||||
|
||||
In Markdown, the number of "#" symbols creates different heading levels, similar to
|
||||
HTML heading levels:
|
||||
|
||||
**Example**
|
||||
|
||||
* \# is \<h1>.
|
||||
* \#\# is \<h2>.
|
||||
* \#\#\# is \<h3>.
|
||||
|
||||
Start your document with a single ``#`` for the title of the page. Add the sub-headings with two ``##``.
|
||||
|
||||
## Bold and emphasis
|
||||
|
||||
* Make text **bold** using two asterisks.
|
||||
|
||||
**Example:** It is ``**important**`` to use Github Flavored Markdown emoji consistently.
|
||||
|
||||
* Make text ``*emphasized*`` using single `` _underscores_`` or a single asterisk.
|
||||
|
||||
**Example:** Github Flavored Markdown emoji should _only_ appear in specific cases.
|
||||
|
||||
|
||||
## Links and references
|
||||
|
||||
Create links to other website by wrapping the display text in square brackets, and
|
||||
the web URL in curved brackets.
|
||||
|
||||
\[text to display](www.website.com)
|
||||
|
||||
**Example:** For more information on including emoji in Github flavored Markdown, refer to the [webfx page on emoji](https://www.webfx.com/tools/emoji-cheat-sheet/) for a list of emoji.
|
||||
|
||||
## Block quotes
|
||||
|
||||
Include Block quotes inside text using right-facing arrows:
|
||||
|
||||
**Example**
|
||||
|
||||
> Any important information
|
||||
> about emoji can be separated into
|
||||
> a blockquote.
|
||||
|
||||
## Code blocks
|
||||
|
||||
Code blocks written with markdown can show off syntax highlighting specific
|
||||
to different languages. Use three back tics to create a code block:
|
||||
|
||||
```
|
||||
function testNum(a) {
|
||||
if (a > 0) {
|
||||
return "positive";
|
||||
} else {
|
||||
return "NOT positive";
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Write the name of the language after the first set of back tics, no spaces,
|
||||
to show specific syntax highlighting. For example; "\```javascript" produces the following:
|
||||
|
||||
```javascript
|
||||
function testNum(a) {
|
||||
if (a > 0) {
|
||||
return "positive";
|
||||
} else {
|
||||
return "NOT positive";
|
||||
}
|
||||
}
|
||||
```
|
||||
## Tables
|
||||
|
||||
Construct a table by typing the table headings, and separating them with
|
||||
a "|" character. Then, add a second line of dashes ("-") separated by
|
||||
another "|" character. When constructing the table cells, separate each cell data with another
|
||||
"|".
|
||||
|
||||
**Example**
|
||||
|
||||
Heading one | Heading two
|
||||
|
||||
\------------|------------
|
||||
|
||||
Cell one data| Cell two data
|
||||
|
||||
Will publish as:
|
||||
|
||||
Heading one | Heading two
|
||||
------------|------------
|
||||
Cell one data| Cell two data
|
||||
|
||||
## Lists
|
||||
|
||||
### Numbered lists
|
||||
|
||||
To avoid inconsistent list numbering, use repetitive list numbering:
|
||||
|
||||
\1. First
|
||||
|
||||
\1. Second
|
||||
|
||||
\1. Third
|
||||
|
||||
The list above will always display as:
|
||||
|
||||
1. First
|
||||
2. Second
|
||||
3. Third
|
||||
|
||||
### Unordered lists
|
||||
|
||||
Build a list of points - an unordered or unnumbered list - by
|
||||
using "\*" characters.
|
||||
|
||||
**Example**
|
||||
|
||||
* First
|
||||
* Another item
|
||||
* The last list item
|
||||
|
||||
## Images
|
||||
|
||||
Include images in a document using the following syntax:
|
||||
|
||||
**Example** \!\[Grafana Logo](/link/to/grafanalogo/logo.png)
|
||||
|
||||
This follows the format of "!", alt text wrapped in "[]" and the link URL wrapped in "()".
|
||||
|
||||
## Comments
|
||||
|
||||
You can include comments that will not appear in published markdown using the
|
||||
following syntax:
|
||||
|
||||
\[comment]: <> (Comment text to display)
|
||||
|
||||
The word "comment" wrapped in "[]" followed by a ":", a space, "<>", and then
|
||||
the comment itself wrapped in "()".
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
This style guide applies to all documentation created for Grafana products.
|
||||
|
||||
For information about how to write technical documentation, we suggest reviewing the content of the [Google Technical Writing courses](https://developers.google.com/tech-writing).
|
||||
|
||||
## Contributing
|
||||
|
||||
The *Documentation style guide* is a living document. Add to it whenever a style decision is made or a question is answered regarding style, grammar, or word choice.
|
||||
@@ -137,6 +139,10 @@ Two words, not one
|
||||
* Correct, but passive voice: Your list of active alarms is displayed.
|
||||
* Incorrect: The list of active alarms displays.
|
||||
|
||||
#### metadata
|
||||
|
||||
One word, not two.
|
||||
|
||||
#### open source, open-source
|
||||
|
||||
Do not hyphenate when used as an adjective unless the lack of hyphen would cause confusion. For example: _Open source software design is the most open open-source system I can imagine._
|
||||
|
||||
@@ -150,6 +150,14 @@ describe('List test', () => {
|
||||
|
||||
## Debugging PhantomJS image rendering
|
||||
|
||||
### Common Error
|
||||
The most common error with PhantomJs image rendering is when a PR introduces an import that has functionality that's not supported by PhantomJs. To quickly identify which new import causes this you can use a tool like `es-check`.
|
||||
|
||||
1. Run > `npx es-check es5 './public/build/*.js'`
|
||||
2. Check the output for files that break es5 compatibility.
|
||||
3. Lazy load the failing imports if possible.
|
||||
|
||||
### Debugging
|
||||
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
|
||||
|
||||
@@ -7,31 +7,239 @@ Generally we follow the Airbnb [React Style Guide](https://github.com/airbnb/jav
|
||||
- [Frontend Style Guide](#frontend-style-guide)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Basic rules](#basic-rules)
|
||||
- [Organization](#organization)
|
||||
- [Props](#props)
|
||||
- [Naming conventions](#naming-conventions)
|
||||
- [Files and directories naming conventions](#files-and-directories-naming-conventions)
|
||||
- [Code organization](#code-organization)
|
||||
- [Exports](#exports)
|
||||
- [Comments](#comments)
|
||||
- [React](#react)
|
||||
- [Props](#props)
|
||||
- [State management](#state-management)
|
||||
|
||||
## Basic rules
|
||||
|
||||
- Try to keep files small and focused.
|
||||
- Break large components up into sub-components.
|
||||
- Use spaces for indentation.
|
||||
|
||||
## Organization
|
||||
### Naming conventions
|
||||
|
||||
- Components and types that needs to be used by external plugins needs to go into @grafana/ui
|
||||
- Components should get their own folder under features/xxx/components
|
||||
- Sub components can live in that component folders, so small component do not need their own folder
|
||||
- Place test next to their component file (same dir)
|
||||
- Component sass should live in the same folder as component code
|
||||
- State logic & domain models should live in features/xxx/state
|
||||
- Containers (pages) can live in feature root features/xxx
|
||||
- up for debate?
|
||||
#### Use `PascalCase` for:
|
||||
|
||||
## Props
|
||||
##### Typescript class names
|
||||
|
||||
- Name callback props and handlers with an "on" prefix.
|
||||
```typescript
|
||||
// bad
|
||||
class dataLink {
|
||||
//...
|
||||
}
|
||||
|
||||
// good
|
||||
class DataLink {
|
||||
//...
|
||||
}
|
||||
```
|
||||
|
||||
##### Types and interfaces
|
||||
|
||||
```
|
||||
// bad
|
||||
interface buttonProps {
|
||||
//...
|
||||
}
|
||||
// bad
|
||||
interface button_props {
|
||||
//...
|
||||
}
|
||||
// bad
|
||||
interface IButtonProps {
|
||||
//...
|
||||
}
|
||||
|
||||
// good
|
||||
interface ButtonProps {
|
||||
//...
|
||||
}
|
||||
|
||||
// bad
|
||||
type requestInfo = ...
|
||||
// bad
|
||||
type request_info = ...
|
||||
|
||||
// good
|
||||
type RequestInfo = ...
|
||||
```
|
||||
|
||||
##### Enums
|
||||
|
||||
```
|
||||
// bad
|
||||
enum buttonVariant {
|
||||
//...
|
||||
}
|
||||
|
||||
// good
|
||||
enum ButtonVariant {
|
||||
//...
|
||||
}
|
||||
```
|
||||
|
||||
#### Use `camelCase` for:
|
||||
|
||||
##### Functions
|
||||
|
||||
```typescript
|
||||
// bad
|
||||
const CalculatePercentage = () => { ... }
|
||||
// bad
|
||||
const calculate_percentage = () => { ... }
|
||||
|
||||
// good
|
||||
const calculatePercentage = () => { ... }
|
||||
```
|
||||
|
||||
##### Methods
|
||||
|
||||
```typescript
|
||||
class DateCalculator {
|
||||
// bad
|
||||
CalculateTimeRange () {...}
|
||||
}
|
||||
class DateCalculator {
|
||||
// bad
|
||||
calculate_timee_range () {...}
|
||||
}
|
||||
|
||||
class DateCalculator {
|
||||
// good
|
||||
calculateTimeRange () {...}
|
||||
}
|
||||
```
|
||||
|
||||
##### Variables
|
||||
|
||||
```typescript
|
||||
// bad
|
||||
const QueryTargets = [];
|
||||
// bad
|
||||
const query_targets = [];
|
||||
|
||||
// good
|
||||
const queryTargets = [];
|
||||
```
|
||||
|
||||
##### React state and properties
|
||||
|
||||
```typescript
|
||||
interface ModalState {
|
||||
// bad
|
||||
IsActive: boolean;
|
||||
// bad
|
||||
is_active: boolean;
|
||||
|
||||
// good
|
||||
isActive: boolean;
|
||||
}
|
||||
```
|
||||
|
||||
##### Emotion class names
|
||||
|
||||
```typescript
|
||||
const getStyles = = () => ({
|
||||
// bad
|
||||
ElementWraper: css`...`,
|
||||
// bad
|
||||
["element-wrapper"]: css`...`,
|
||||
|
||||
// good
|
||||
elementWrapper: css`...`,
|
||||
});
|
||||
```
|
||||
|
||||
#### Use `ALL_CAPS` for constants.
|
||||
|
||||
```typescript
|
||||
// bad
|
||||
const constantValue = "This string won't change";
|
||||
// bad
|
||||
const constant_value = "This string won't change";
|
||||
|
||||
// good
|
||||
const CONSTANT_VALUE = "This string won't change";
|
||||
```
|
||||
|
||||
#### Use [BEM](http://getbem.com/) convention for SASS styles.
|
||||
|
||||
_SASS styles are deprecated. Please migrate to Emotion whenever you need to modify SASS styles._
|
||||
|
||||
### File and directory naming conventions
|
||||
|
||||
Name files according to the primary export:
|
||||
|
||||
- When the primary export is a class or React component, use PascalCase.
|
||||
- When the primary export is a function, use camelCase.
|
||||
|
||||
For files exporting multiple utility functions, use the name that describes the responsibility of grouped utilities. For example, a file exporting math utilities should be named `math.ts`.
|
||||
|
||||
- Use `constants.ts` for files exporting constants.
|
||||
- Use `actions.ts` for files exporting Redux actions.
|
||||
- Use `reducers.ts` Redux reducers.
|
||||
- Use `*.test.ts(x)` for test files.
|
||||
|
||||
### Code organization
|
||||
|
||||
Organize your code in a directory that encloses feature code:
|
||||
|
||||
- Put Redux state and domain logic code in `state` directory (i.e. `features/my-feature/state/actions.ts`).
|
||||
- Put React components in `components` directory (i.e. `features/my-feature/components/ButtonPeopleDreamOf.tsx`).
|
||||
- Put test files next to the test subject.
|
||||
- Put containers (pages) in feature root (i.e. `features/my-feature/DashboardPage.tsx`).
|
||||
- Subcomponents can live in the component folders. Small component do not need their own folder.
|
||||
- Component SASS styles should live in the same folder as component code.
|
||||
|
||||
For code that needs to be used by external plugin:
|
||||
|
||||
- Put components and types in `@grafana/ui`.
|
||||
- Put data models and data utilities in `@grafana/data`.
|
||||
- Put runtime services interfaces in `@grafana/runtime`.
|
||||
|
||||
#### Exports
|
||||
|
||||
- Use named exports for all code you want to export from a file.
|
||||
- Use declaration exports (i.e. `export const foo = ...`).
|
||||
- Export only the code that is meant to be used outside the module.
|
||||
|
||||
### Comments
|
||||
|
||||
- Use [TSDoc](https://github.com/microsoft/tsdoc) comments to document your code.
|
||||
- Use [react-docgen](https://github.com/reactjs/react-docgen) comments (`/** ... */`) for props documentation.
|
||||
- Use inline comments for comments inside functions, classes etc.
|
||||
- Please try to follow the [code comment guidelines](./code-comments.md) when adding comments.
|
||||
|
||||
### Linting
|
||||
|
||||
Linting is performed using [@grafana/eslint-config](https://github.com/grafana/eslint-config-grafana).
|
||||
|
||||
## React
|
||||
|
||||
Use the following conventions when implementing React components:
|
||||
|
||||
### Props
|
||||
|
||||
##### Name callback props and handlers with an "on" prefix.
|
||||
|
||||
```tsx
|
||||
// bad
|
||||
handleChange = () => {
|
||||
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<MyComponent changed={this.handleChange} />
|
||||
);
|
||||
}
|
||||
|
||||
// good
|
||||
onChange = () => {
|
||||
|
||||
@@ -43,46 +251,36 @@ render() {
|
||||
);
|
||||
}
|
||||
|
||||
// bad
|
||||
handleChange = () => {
|
||||
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<MyComponent changed={this.handleChange} />
|
||||
);
|
||||
}
|
||||
```
|
||||
|
||||
- React Component definitions
|
||||
##### React Component definitions
|
||||
|
||||
```jsx
|
||||
// good
|
||||
export class YourClass extends PureComponent<{},{}> { ... }
|
||||
|
||||
// bad
|
||||
export class YourClass extends PureComponent { ... }
|
||||
|
||||
// good
|
||||
export class YourClass extends PureComponent<{},{}> { ... }
|
||||
```
|
||||
|
||||
- React Component constructor
|
||||
##### React Component constructor
|
||||
|
||||
```typescript
|
||||
// good
|
||||
constructor(props:Props) {...}
|
||||
|
||||
// bad
|
||||
constructor(props) {...}
|
||||
|
||||
// good
|
||||
constructor(props: Props) {...}
|
||||
```
|
||||
|
||||
- React Component defaultProps
|
||||
##### React Component defaultProps
|
||||
|
||||
```typescript
|
||||
// good
|
||||
static defaultProps: Partial<Props> = { ... }
|
||||
|
||||
// bad
|
||||
static defaultProps = { ... }
|
||||
|
||||
// good
|
||||
static defaultProps: Partial<Props> = { ... }
|
||||
```
|
||||
|
||||
## State management
|
||||
|
||||
179
contribute/style-guides/storybook.md
Normal file
179
contribute/style-guides/storybook.md
Normal file
@@ -0,0 +1,179 @@
|
||||
# Storybook
|
||||
|
||||
[Storybook](https://storybook.js.org/) is a tool which we use to manage our design system and the components which are a part of it. Storybook consists of _stories:_ each story represents a component and a case in which it is used. To show a wide variety of use cases is good both documentation wise and for troubleshooting -- it might be possible to reproduce a bug for an edge case in a story.
|
||||
|
||||
Storybook is:
|
||||
|
||||
- A good way to publish our design system with its implementations
|
||||
- Used as a tool for documentation
|
||||
- Used for debugging and displaying edge cases
|
||||
|
||||
## How to create stories
|
||||
|
||||
Stories for a component should be placed next to the component file. The Storybook file requires the same name as the component file. For example, a story for `SomeComponent.tsx` will have the file name `SomeComponent.story.tsx`.
|
||||
|
||||
### Writing stories
|
||||
|
||||
When writing stories, we use the [CSF format](https://storybook.js.org/docs/formats/component-story-format/). For more in-depth information on writing stories, see [Storybook’s documentation on writing stories](https://storybook.js.org/docs/basics/writing-stories/).
|
||||
|
||||
With the CSF format, the default export defines some general information about the stories in the file:
|
||||
|
||||
- `title`: Where the component is going to live in the hierarchy
|
||||
- `decorators`: A list which can contain wrappers or provide context, such as theming
|
||||
|
||||
```jsx
|
||||
// In MyComponent.story.tsx
|
||||
|
||||
import MyComponent from './MyComponent';
|
||||
|
||||
export default {
|
||||
title: 'General/MyComponent',
|
||||
component: MyComponent,
|
||||
decorators: [ ... ],
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
When it comes to writing the actual stories, you continue in the same file with named exports. The exports are turned into the story name.
|
||||
|
||||
```jsx
|
||||
// Will produce a story name “some story”
|
||||
export const someStory = () => <MyComponent />;
|
||||
```
|
||||
|
||||
If you want to write cover cases with different values for props, then using knobs is usually enough. You don’t need to create a new story. This will be covered further down.
|
||||
|
||||
### Categorization
|
||||
|
||||
We currently have these categories:
|
||||
|
||||
- **Docs Overview** - Guidelines and information regarding the design system
|
||||
- **Forms** - Components commonly used in forms such as different kind of inputs
|
||||
- **General** - Components which can be used in a lot of different places
|
||||
- **Visualizations** - Data visualizations
|
||||
- **Panel** - Components belonging to panels and panel editors
|
||||
|
||||
## Writing MDX documentation
|
||||
|
||||
An MDX file is basically a markdown file with the possibility to add jsx. These files are used by Storybook to create a “docs” tab.
|
||||
|
||||
### Link the MDX file to a component’s stories
|
||||
|
||||
To link a component’s stories with an MDX file you have to do this:
|
||||
|
||||
```jsx
|
||||
// In TabsBar.story.tsx
|
||||
|
||||
import { TabsBar } from "./TabsBar";
|
||||
|
||||
// Import the MDX file
|
||||
import mdx from "./TabsBar.mdx";
|
||||
|
||||
export default {
|
||||
title: "General/Tabs/TabsBar",
|
||||
component: TabsBar,
|
||||
parameters: {
|
||||
docs: {
|
||||
// This is the reference required for the MDX file
|
||||
page: mdx,
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
### MDX file structure
|
||||
|
||||
There are some things that the MDX file should contain:
|
||||
|
||||
- When and why the component should be used
|
||||
- Best practices - dos and don’ts for the component
|
||||
- Usage examples with code. It is possible to use the `Preview` element to show live examples in MDX
|
||||
- Props table. This can be generated by doing the following:
|
||||
|
||||
```jsx
|
||||
// In MyComponent.mdx
|
||||
|
||||
import { Props } from "@storybook/addon-docs/blocks";
|
||||
import { MyComponent } from "./MyComponent";
|
||||
|
||||
<Props of={MyComponent} />;
|
||||
```
|
||||
|
||||
### MDX file without a relationship to a component
|
||||
|
||||
An MDX file can exist by itself without any connection to a story. This can be good for writing things such as a general guidelines page. Something that is required when the MDX file has no relation to a component is a `Meta` tag that says where in the hierarchy the component will live. It can look like this:
|
||||
|
||||
```jsx
|
||||
<Meta title="Docs Overview/Color Palettes"/>
|
||||
|
||||
# Guidelines for using colors
|
||||
|
||||
...
|
||||
|
||||
```
|
||||
|
||||
You can add parameters to the Meta tag. This example shows how to hide the tools:
|
||||
|
||||
```jsx
|
||||
<Meta title="Docs Overview/Color Palettes" parameters={{ options: { isToolshown: false }}}/>
|
||||
|
||||
# Guidelines for using colors
|
||||
|
||||
...
|
||||
|
||||
```
|
||||
|
||||
## Documenting component properties
|
||||
|
||||
A quick way to get an overview of what a component does is by looking at its properties. That's why it is important that we document these in a good way.
|
||||
|
||||
### Comments
|
||||
|
||||
When writing the props interface for a component, it is possible to add a comment to that specific property, which will end up in the Props table in the MDX file. The comments are generated by [react-docgen](https://github.com/reactjs/react-docgen) and are formatted by writing `/** */`.
|
||||
|
||||
```jsx
|
||||
interface MyProps {
|
||||
/** Sets the initial values, which are overridden when the query returns a value*/
|
||||
defaultValues: Array<T>;
|
||||
}
|
||||
```
|
||||
|
||||
### Knobs
|
||||
|
||||
Knobs is an [addon to Storybook](https://github.com/storybookjs/storybook/tree/master/addons/knobs) which can be used to easily switch values in the UI. A good use case for it is to try different props for the component. Using knobs is easy. Grafana is set up so knobs can be used straight out of the box. Here is an example of how you might use it.
|
||||
|
||||
```jsx
|
||||
// In MyComponent.story.tsx
|
||||
|
||||
import { number, text } from "@storybook/addon-knobs";
|
||||
|
||||
export const basicStory = () => (
|
||||
<MyComponent
|
||||
max={number("Max value", 10)}
|
||||
min={number("Min value", -10)}
|
||||
title={text("Title", "Look at the value!")}
|
||||
/>
|
||||
);
|
||||
```
|
||||
|
||||
The general convention is that the first parameter of the knob is its name and the second is the default value. There are some more types:
|
||||
|
||||
| Knob | Description |
|
||||
| --------- | ------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `text` | Any text field |
|
||||
| `number` | Any number input. Also [available as range](https://github.com/storybookjs/storybook/tree/master/addons/knobs#number-bound-by-range) |
|
||||
| `boolean` | A switch between true/false |
|
||||
| `color` | Color picker |
|
||||
| `object` | JSON input or array. Good to use if the property requires more complex data structures. |
|
||||
| `array` | Array of strings separated by a comma |
|
||||
| `select` | Select a value from an options object. Good for trying different test cases. |
|
||||
| `options` | Configurable UI for selecting a range of options |
|
||||
| `files` | File selector |
|
||||
| `date` | Select date as stringified Unix timestamp |
|
||||
| `button` | Has a handler which is called when clicked |
|
||||
|
||||
## Best practices
|
||||
|
||||
- When creating a new component or writing documentation for an existing one, always cover the basic use case it was intended for with a code example.
|
||||
- Use stories and knobs to create edge cases. If you are trying to solve a bug, try to reproduce it with a story.
|
||||
- Do not create stories in the MDX, always create them in the `*.story.tsx` file.
|
||||
@@ -1,48 +1,55 @@
|
||||
# Styling Grafana
|
||||
|
||||
## Emotion
|
||||
|
||||
[Emotion](https://emotion.sh/docs/introduction) is our default-to-be approach to styling React components. It provides a way for styles to be a consequence of properties and state of a component.
|
||||
|
||||
### Usage
|
||||
## Usage
|
||||
|
||||
#### Basic styling
|
||||
### Basic styling
|
||||
|
||||
For styling components use Emotion's `css` function
|
||||
For styling components, use [Emotion's `css` function](https://emotion.sh/docs/emotion#css).
|
||||
|
||||
```tsx
|
||||
import { css } from 'emotion';
|
||||
import React from 'react';
|
||||
import { css } from 'emotion';
|
||||
|
||||
|
||||
const ComponentA = () => {
|
||||
return (
|
||||
<div className={css`background: red;`}>
|
||||
As red as you can ge
|
||||
</div>
|
||||
);
|
||||
}
|
||||
const ComponentA = () => (
|
||||
<div
|
||||
className={css`
|
||||
background: red;
|
||||
`}
|
||||
>
|
||||
As red as you can get
|
||||
</div>
|
||||
);
|
||||
```
|
||||
|
||||
#### Styling complex components
|
||||
### Styling complex components
|
||||
|
||||
In more complex cases, especially when you need to style multiple DOM elements in one component or when your styles that depend on properties and/or state, you should create a helper function that returns an object with desired stylesheet. This function should also be wrapped in `stylesFactory` helper function that will provide basic memoization.
|
||||
In more complex cases, especially when you need to style multiple DOM elements in one component, or when using styles that depend on properties and/or state, you should create a helper function that returns an object of styles. This function should also be wrapped in the `stylesFactory` helper function, which will provide basic memoization.
|
||||
|
||||
Let's say you need to style a component that has different background depending on the theme:
|
||||
Let's say you need to style a component that has a different background depending on the theme:
|
||||
|
||||
```tsx
|
||||
import { css, cx } from 'emotion';
|
||||
import { GrafanaTheme, useTheme, selectThemeVariant, stylesFactory } from '@grafana/ui';
|
||||
import React from 'react';
|
||||
import { css } from 'emotion';
|
||||
import { GrafanaTheme } from '@grafana/data';
|
||||
import { selectThemeVariant, stylesFactory, useTheme } from '@grafana/ui';
|
||||
|
||||
const getStyles = stylesFactory((theme: GrafanaTheme) => {
|
||||
const backgroundColor = selectThemeVariant({ light: theme.colors.red, dark: theme.colors.blue }, theme.type);
|
||||
const backgroundColor = selectThemeVariant(
|
||||
{ light: theme.colors.red, dark: theme.colors.blue },
|
||||
theme.type
|
||||
);
|
||||
|
||||
return {
|
||||
wrapper: css`
|
||||
background: ${backgroundColor};
|
||||
`,
|
||||
icon: css`font-size:${theme.typography.size.sm}`;
|
||||
icon: css`
|
||||
font-size: ${theme.typography.size.sm};
|
||||
`,
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
const ComponentA = () => {
|
||||
const theme = useTheme();
|
||||
@@ -54,18 +61,18 @@ const ComponentA = () => {
|
||||
<i className={styles.icon} />
|
||||
</div>
|
||||
);
|
||||
});
|
||||
};
|
||||
```
|
||||
|
||||
For more information about themes at Grafana please see [themes guide](./themes.md)
|
||||
For more information about themes at Grafana please see the [themes guide](./themes.md).
|
||||
|
||||
#### Composing class names
|
||||
### Composing class names
|
||||
|
||||
For class composition use Emotion's `cx` function
|
||||
For class composition, use [Emotion's `cx` function](https://emotion.sh/docs/emotion#cx).
|
||||
|
||||
```tsx
|
||||
import { css, cx } from 'emotion';
|
||||
|
||||
import React from 'react';
|
||||
import { css, cx } from 'emotion';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
@@ -74,13 +81,11 @@ interface Props {
|
||||
const ComponentA: React.FC<Props> = ({ className }) => {
|
||||
const finalClassName = cx(
|
||||
className,
|
||||
css`background: red`,
|
||||
)
|
||||
|
||||
return (
|
||||
<div className={finalClassName}>
|
||||
As red as you can ge
|
||||
</div>
|
||||
css`
|
||||
background: red;
|
||||
`
|
||||
);
|
||||
}
|
||||
|
||||
return <div className={finalClassName}>As red as you can ge</div>;
|
||||
};
|
||||
```
|
||||
|
||||
@@ -2,11 +2,22 @@
|
||||
|
||||
## Overview
|
||||
|
||||
**Themes are implemented in Typescript.** That's because our goal is to share variables between Grafana Typescript code and SASS files. Theme definitions are located in `packages/grafana-ui/src/themes/[default|dark|light].ts` files. `default.ts` file holds common variables like typography and spacing definitions, while `[light|dark].ts` primarily specify colors used in themes.
|
||||
**Themes are implemented in Typescript.** That's because our goal is to share variables between Grafana TypeScript and [Sass](https://sass-lang.com/) code. Theme definitions are located in the following files:
|
||||
|
||||
- [packages/grafana-ui/src/themes/dark.ts](../../packages/grafana-ui/src/themes/dark.ts)
|
||||
- [packages/grafana-ui/src/themes/default.ts](../../packages/grafana-ui/src/themes/default.ts)
|
||||
- [packages/grafana-ui/src/themes/light.ts](../../packages/grafana-ui/src/themes/light.ts)
|
||||
|
||||
The `default.ts` file holds common variables like typography and spacing definitions, while `[light|dark].ts` primarily specify colors used in themes.
|
||||
|
||||
## Usage
|
||||
|
||||
This section provides usage guidelines.
|
||||
|
||||
### Using themes in React components
|
||||
|
||||
Here's how to use Grafana themes in React components.
|
||||
|
||||
#### Using `ThemeContext` directly
|
||||
|
||||
```tsx
|
||||
@@ -26,12 +37,11 @@ const Foo: React.FunctionComponent<FooProps> = () => {
|
||||
|
||||
// Your component has access to the theme variables now
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
#### Using `withTheme` higher-order component (HOC)
|
||||
|
||||
With this method your component will be automatically wrapped in `ThemeContext.Consumer` and provided with current theme via `theme` prop. Component used with `withTheme` must implement `Themeable` interface.
|
||||
With this method your component will be automatically wrapped in `ThemeContext.Consumer` and provided with current theme via `theme` prop. Components used with `withTheme` must implement the `Themeable` interface.
|
||||
|
||||
```ts
|
||||
import { ThemeContext, Themeable } from '@grafana/ui';
|
||||
@@ -43,7 +53,7 @@ const Foo: React.FunctionComponent<FooProps> = () => ...
|
||||
export default withTheme(Foo);
|
||||
```
|
||||
|
||||
### Test components that use ThemeContext
|
||||
### Test components that use `ThemeContext`
|
||||
|
||||
When implementing snapshot tests for components that use the `withTheme` HOC, the snapshot will contain the entire theme object. Any change to the theme renders the snapshot outdated.
|
||||
|
||||
@@ -73,9 +83,11 @@ describe('MyComponent', () => {
|
||||
});
|
||||
```
|
||||
|
||||
### Using themes in Storybook
|
||||
### Using themes in [Storybook](https://storybook.js.org/)
|
||||
|
||||
All stories are wrapped with `ThemeContext.Provider` using global decorator. To render `Themeable` component that's not wrapped by `withTheme` HOC you either create a new component in your story:
|
||||
All stories are wrapped with `ThemeContext.Provider` using a global decorator. To render a `Themeable` component that isn't wrapped by a `withTheme` HOC, either create a new component in your story, or use the `renderComponentWithTheme` helper.
|
||||
|
||||
#### Create a new component:
|
||||
|
||||
```tsx
|
||||
// Foo.story.tsx
|
||||
@@ -86,7 +98,7 @@ FooStories.add('Story' () => {
|
||||
});
|
||||
```
|
||||
|
||||
or use `renderComponentWithTheme` helper:
|
||||
#### Use `renderComponentWithTheme` helper:
|
||||
|
||||
```tsx
|
||||
// Bar.story.tsx
|
||||
@@ -98,29 +110,42 @@ BarStories.add('Story' () => {
|
||||
|
||||
### Using themes in Angular code
|
||||
|
||||
There should be very few cases where theme would be used in Angular context. For this purpose there is a function available that retrieves current theme: `import { getCurrentTheme } from app/core/utils/ConfigProvider`. Angular components should be migrated to React, or if that's not possible at the moment, styled using SASS.
|
||||
There should be very few cases where a theme would be used in an Angular context. For this purpose, there is a function available that retrieves the current theme:
|
||||
|
||||
```ts
|
||||
import { getCurrentTheme } from app/core/utils/ConfigProvider
|
||||
```
|
||||
|
||||
Angular components should be migrated to React, or if that's not possible at the moment, styled using Sass.
|
||||
|
||||
## FAQ
|
||||
### How can I modify SASS variable files?
|
||||
|
||||
This section provides insight into frequently-asked questions.
|
||||
|
||||
### How can I modify Sass variable files?
|
||||
|
||||
> For the following to apply you need to run `yarn dev` task.
|
||||
|
||||
`[_variables|_variables.dark|_variables.light].generated.scss` files are the ones that are referenced in the main SASS files for SASS variables to be available. **These files are automatically generated and should never be modified by hand!**.
|
||||
`[_variables|_variables.dark|_variables.light].generated.scss` files are the ones that are referenced in the main Sass files for Sass variables to be available. **These files are automatically generated and should never be modified by hand!**
|
||||
|
||||
#### If you need to modify *SASS variable value* you need to modify corresponding Typescript file that is a source of the variables:
|
||||
#### If you need to modify a *Sass variable value* you need to modify the corresponding Typescript file that is the source of the variables:
|
||||
- `_variables.generated.scss` - modify `grafana-ui/src/themes/default.ts`
|
||||
- `_variables.light.generated.scss` - modify `grafana-ui/src/themes/light.ts`
|
||||
- `_variables.dark.generated.scss` - modify `grafana-ui/src/themes/dark.ts`
|
||||
|
||||
#### If you need to *add new variable* to SASS variables you need to modify corresponding template file:
|
||||
#### If you need to *add new variable* to Sass variables you need to modify corresponding template file:
|
||||
- `_variables.generated.scss` - modify `grafana-ui/src/themes/_variables.scss.tmpl.ts`
|
||||
- `_variables.light.generated.scss` - modify `grafana-ui/src/themes/_variables.light.scss.tmpl.ts`
|
||||
- `_variables.dark.generated.scss` - modify `grafana-ui/src/themes/_variables.dark.scss.tmpl.ts`
|
||||
|
||||
|
||||
## Limitations
|
||||
### You must ensure ThemeContext provider is available in a React tree
|
||||
By default all react2angular directives have `ThemeContext.Provider` ensured. But, there are cases where we create another React tree via `ReactDOM.render`. This happens in case of graph legend rendering and `ReactContainer` directive. In such cases theme consumption will fail. To make sure theme context is available in such cases, you need to wrap your rendered component with ThemeContext.Provider using `provideTheme` function:
|
||||
|
||||
This section describes limitations with Grafana's theming system.
|
||||
|
||||
### You must ensure `ThemeContext` provider is available in a React tree
|
||||
|
||||
By default all react2angular directives have `ThemeContext.Provider` ensured. But, there are cases where we create another React tree via `ReactDOM.render`. This happens in the case of graph legend rendering and the `ReactContainer` directive. In such cases theme consumption will fail. To make sure theme context is available in such cases, you need to wrap your rendered component with ThemeContext.Provider using the `provideTheme` function:
|
||||
|
||||
```ts
|
||||
// graph.ts
|
||||
|
||||
57
contribute/templates/README.md
Normal file
57
contribute/templates/README.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Templates
|
||||
|
||||
Templates are both a starting point and an instruction manual for writing something new. They are intended to make life easier by providing a jumping-off point, something besides a blank page to start from. They are not intended to be a limitation. If the template does not work perfectly for your use case, you can adjust or change it. We will work it out in code review.
|
||||
|
||||
## Create a template
|
||||
|
||||
Feel free to add templates to the `templates` folder. Try to make them as generic as possible and include clear instructions for when and how to use the template. Assume that the template user is a brand new contributor and write accordingly.
|
||||
|
||||
## Use a template
|
||||
|
||||
1. Read the template. Make sure you understand what it is for and how it is intended to be used.
|
||||
1. Copy and rename the template. Move it to where you actually need it.
|
||||
You might also want to copy the content of the template and paste it into a different file. This is acceptable use.
|
||||
1. Replace the template content with your own. Delete whatever is unnecessary.
|
||||
|
||||
## Documentation templates
|
||||
|
||||
In an ideal world, each topic will correspond to an information *type* ([task](doc-task-template.md), [reference](doc-reference-template.md), [concept](doc-concept-template.md)) and contain only that type of information.
|
||||
|
||||
However, this is not always practical. For example, you have a series of short topics, you can group them into one topic.
|
||||
|
||||
Try to *chunk* your content. This means you should organize the document so that the same kinds of content are grouped together.
|
||||
|
||||
### Chunking example
|
||||
|
||||
If I was writing a topic called *Doggie handbook*, I might organize it like this.
|
||||
|
||||
**Concept**
|
||||
* What a dog is
|
||||
* Brief history of dogs
|
||||
* Why you might want a dog
|
||||
* Tasks dogs can be trained to do
|
||||
|
||||
**Tasks**
|
||||
* Feed the dog
|
||||
* Groom the dog
|
||||
* Train the dog
|
||||
|
||||
**Reference**
|
||||
* List of dog equipment you will need
|
||||
* Table of breeds that includes breed name, size range, short or long hair, and type of dog
|
||||
|
||||
### Audience
|
||||
|
||||
Write for an audience that is computer literate and has general technical knowledge, but is not necessarily familiar with Grafana or the finer points of observability.
|
||||
|
||||
Pretend you are explaining your topic to a brand new Grafana user or developer.
|
||||
|
||||
### Self-contained
|
||||
|
||||
Thanks to search engines, every page in the documentation might be a reader's entry point. This means that each page needs to be self-contained and make sense on its own. The reader should not need to read other topics in order to perform the task or understand the concept.
|
||||
|
||||
However, try to be helpful and link to related information. Using the *Doggie handbook* example, the concept topic that explains what dogs can be trained to do might link to the Train the dog task.
|
||||
|
||||
## Code templates
|
||||
|
||||
This is a placeholder for future templates.
|
||||
42
contribute/templates/doc-concept-template.md
Normal file
42
contribute/templates/doc-concept-template.md
Normal file
@@ -0,0 +1,42 @@
|
||||
DELETE THIS LINE: If draft = false, then the document will not be built in the doc site. If the date is earlier than the build date, than the document will not show in the build site. Use these settings to control whether future content is shown in the doc site.
|
||||
+++
|
||||
draft = "false"
|
||||
date = "yyyy-mm-dd"
|
||||
title = "Title in sentence case"
|
||||
description = "Description in title case"
|
||||
keywords = ["grafana", "enter", "keywords", "here"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Name of topic"
|
||||
identifier = "identifier"
|
||||
parent = "menu parent"
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Concept
|
||||
|
||||
The title of the concept topic will generally be a noun or a gerund. Examples include Templates, Templating, Dashboards, and panels.
|
||||
|
||||
Concepts are topic types for any information that doesn't involve task lists or reference information. Ideally you use concept elements to explain concepts, ideas, overviews, workflows, and the like. In the intro section, this first paragraph or two, you should explain to the user what to expect in this topic or section.
|
||||
|
||||
[Permissions overview](https://grafana.com/docs/grafana/latest/permissions/overview/) is an example of a concept topic.
|
||||
|
||||
## Idea
|
||||
|
||||
Concept topics or sections explain *what* and *why*. They do not explain *how*. If you are a new user, you might look for concept information to learn about what Grafana is, why it might be useful to you, and what the general workflow is.
|
||||
|
||||
## Workflow
|
||||
|
||||
Continuing the example in the previous section, here is a sample Grafana workflow.
|
||||
|
||||
1. Install Grafana. <link to task for installing Grafana>
|
||||
2. Set up data sources. <link to data sources concept topic, which links to data source task topics>
|
||||
3. Create panels. <link to panel concept topic, which links to tasks>
|
||||
4. Create dashboards. <link to panel concept topic, which links to tasks>
|
||||
5. Enter queries. <link to query editor concept topic>
|
||||
6. Add users. <link to user management concept topic, which links to tasks>
|
||||
7. Create playlists. <link to Playlist topic that contains concept information and tasks>
|
||||
|
||||
## Next steps
|
||||
|
||||
Concept tasks often link to related information, including *tasks* related to the concept and *reference* topics related to the concept.
|
||||
75
contribute/templates/doc-reference-template.md
Normal file
75
contribute/templates/doc-reference-template.md
Normal file
@@ -0,0 +1,75 @@
|
||||
DELETE THIS LINE: If draft = false, then the document will not be built in the doc site. If the date is earlier than the build date, than the document will not show in the build site. Use these settings to control whether future content is shown in the doc site.
|
||||
+++
|
||||
draft = "false"
|
||||
date = "yyyy-mm-dd"
|
||||
title = "Title in sentence case"
|
||||
description = "Description in title case"
|
||||
keywords = ["grafana", "enter", "keywords", "here"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Name of topic"
|
||||
identifier = "identifier"
|
||||
parent = "menu parent"
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Reference
|
||||
|
||||
The *reference* topic type is for storing reference information, such as extensive tables, lists, or other information that is used as support for a task. Reference topics are also designed for API information.
|
||||
|
||||
Often reference topics are linked from *task* topics, because they contain information the user needs in order to perform a task.
|
||||
|
||||
[Grafana CLI](https://grafana.com/docs/grafana/latest/administration/cli/) is one example of a reference topic.
|
||||
|
||||
## Lists
|
||||
|
||||
Lists of commands or parameters are often organized in reference topics. The information you need to present will dictate the format.
|
||||
|
||||
* They might
|
||||
* be in
|
||||
* unordered lists.
|
||||
|
||||
[Configuration](https://grafana.com/docs/grafana/latest/installation/configuration/) is an example of lists.
|
||||
|
||||
## Tables
|
||||
|
||||
If you have a large list of things to store in a table, then you are probably dealing with reference information. Hugo accepts either tables in Markdown or in HTML format, so use whichever is easier for you.
|
||||
|
||||
The [Glossary](https://grafana.com/docs/grafana/latest/guides/glossary/) provides an example of reference data in a table.
|
||||
|
||||
### Empty markdown table
|
||||
|
||||
While you might not need a heading for each table, headings are a good way to chunk information if you have several tables. They also make the content easy to skim. Use headings or intro paragraphs like this one to explain to the reader what the information in the table is used for.
|
||||
|
||||
| | | | | | |
|
||||
|:---|:---|:--:|:--:|---:|---:|
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
| | | | | | |
|
||||
|
||||
### Empty HTML table
|
||||
|
||||
And here is intro text, similar to the paragraph in the previous section. Do not add local styling to the table. The website CSS will take care of that for you.
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>Firstname</th>
|
||||
<th>Lastname</th>
|
||||
<th>Age</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Jill</td>
|
||||
<td>Smith</td>
|
||||
<td>50</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Eve</td>
|
||||
<td>Jackson</td>
|
||||
<td>94</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## API documentation
|
||||
|
||||
API documentation is always a reference topic rather than a task topic, but it has its own rules.
|
||||
57
contribute/templates/doc-task-template.md
Normal file
57
contribute/templates/doc-task-template.md
Normal file
@@ -0,0 +1,57 @@
|
||||
+++
|
||||
draft = "false"
|
||||
date = "yyyy-mm-dd"
|
||||
title = "Title in sentence case"
|
||||
description = "Description in title case"
|
||||
keywords = ["grafana", "enter", "keywords", "here"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Name of topic"
|
||||
identifier = "identifier"
|
||||
parent = "menu parent"
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Task
|
||||
|
||||
A *task* topic is intended for a procedure that describes how to accomplish a task. It lists a series of steps that users follow to produce an intended outcome. It tells the reader *how* to do something. [Install Grafana plugins](https://grafana.com/docs/grafana/latest/plugins/installation/) and [Playlist](https://grafana.com/docs/grafana/latest/reference/playlist/) are examples of task topics. Playlist includes a small amount of concept information in the introduction, which is appropriate.
|
||||
|
||||
Always include an introduction of a short paragraph or two to explain what the task is for, perhaps give the reader an idea of what the outcome will be.
|
||||
|
||||
In most cases, each topic should only contain one task. If you have several very short, related tasks, then you might combine them into one topic.
|
||||
|
||||
In the case of a long task, then you probably won't need any headings except for the h1 at the top of the page.
|
||||
|
||||
1. Start with step one.
|
||||
1. Use second-person imperative tense.
|
||||
1. Basically, "You, do this" with every sentence.
|
||||
1. Do not use the third-person "user" for steps you want the reader ("you") to perform.
|
||||
1. Write steps that contain one action, possibly two related actions, such as copy and paste a thing or save and quite the program.
|
||||
If a sentence is not telling the reader to do something, then it is not a step. You can use nested images or paragraphs like this one to add information if necessary.
|
||||
|
||||
In many cases, you should tell the reader what the outcome should be so that they know when they are done.
|
||||
|
||||
## One-step task
|
||||
|
||||
Some tasks are so short, they only contain one step.
|
||||
|
||||
Write one-step tasks as simple sentences, not as unordered lists or numbered lists.
|
||||
|
||||
## Short task
|
||||
|
||||
Short tasks can be grouped. How short constitutes "short" is a judgment call based on number of steps and how long individual steps are.
|
||||
|
||||
1. Use your judgment.
|
||||
2. Ask your coworkers or someone on the Comm team for advice if you aren't sure.
|
||||
|
||||
## Next steps
|
||||
|
||||
If the task you are writing leads naturally to one or more other tasks, then include links after the task to help the reader figure out where to go next.
|
||||
|
||||
Thanks to internet search engines, every page in the documentation could be page one. Pretend you are explaining your task to a new Grafana user who just walked in off the street.
|
||||
|
||||
## Testing
|
||||
|
||||
It is a good practice to have someone else test the task you have written. If they can successfully complete the task using *only* what the steps you have written, not guessing or using their inherent knowledge, then your task has passed the test. However, it is very common to find you have skipped steps, because *you* are very familiar with Grafana and the topic you are explaining.
|
||||
|
||||
New users or people from other teams are very helpful for these tests.
|
||||
191
devenv/dev-dashboards/datasource-influxdb/influxdb-logs.json
Normal file
191
devenv/dev-dashboards/datasource-influxdb/influxdb-logs.json
Normal file
@@ -0,0 +1,191 @@
|
||||
{
|
||||
"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,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": true,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-influxdb-telegraf",
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": false,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": false,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "Count",
|
||||
"groupBy": [
|
||||
{
|
||||
"params": ["1m"],
|
||||
"type": "time"
|
||||
},
|
||||
{
|
||||
"params": ["null"],
|
||||
"type": "fill"
|
||||
}
|
||||
],
|
||||
"measurement": "logs",
|
||||
"orderByTime": "ASC",
|
||||
"policy": "default",
|
||||
"refId": "A",
|
||||
"resultFormat": "time_series",
|
||||
"select": [
|
||||
[
|
||||
{
|
||||
"params": ["message"],
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"params": [],
|
||||
"type": "count"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Log messages over time",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"datasource": "gdev-influxdb-telegraf",
|
||||
"gridPos": {
|
||||
"h": 18,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 6
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"showLabels": false,
|
||||
"showTime": true,
|
||||
"sortOrder": "Descending",
|
||||
"wrapLogMessage": true
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"groupBy": [],
|
||||
"measurement": "logs",
|
||||
"orderByTime": "ASC",
|
||||
"policy": "default",
|
||||
"refId": "A",
|
||||
"resultFormat": "table",
|
||||
"select": [
|
||||
[
|
||||
{
|
||||
"params": ["message"],
|
||||
"type": "field"
|
||||
}
|
||||
]
|
||||
],
|
||||
"tags": []
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Logs",
|
||||
"type": "logs"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 22,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "influxdb", "datasource-test"],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-1h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Datasource tests - InfluxDB Logs",
|
||||
"uid": "yjRroGsWk",
|
||||
"version": 4
|
||||
}
|
||||
217
devenv/dev-dashboards/datasource-opentsdb/opentsdb.json
Normal file
217
devenv/dev-dashboards/datasource-opentsdb/opentsdb.json
Normal file
@@ -0,0 +1,217 @@
|
||||
{
|
||||
"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,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-opentsdb",
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"aggregator": "sum",
|
||||
"downsampleAggregator": "avg",
|
||||
"downsampleFillPolicy": "none",
|
||||
"metric": "cpu",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "CPU",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-opentsdb",
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 3,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"dataLinks": []
|
||||
},
|
||||
"percentage": false,
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"aggregator": "sum",
|
||||
"downsampleAggregator": "avg",
|
||||
"downsampleFillPolicy": "none",
|
||||
"metric": "logins.count",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Login Count",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": null
|
||||
}
|
||||
}
|
||||
],
|
||||
"schemaVersion": 22,
|
||||
"style": "dark",
|
||||
"tags": ["datasource-test", "gdev", "opentsdb"],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-1h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Datasource tests - OpenTSDB",
|
||||
"uid": "tFU1mQyWz",
|
||||
"version": 2
|
||||
}
|
||||
@@ -66,7 +66,7 @@
|
||||
{
|
||||
"targetBlank": false,
|
||||
"title": "Drill it down",
|
||||
"url": "http://localhost:3000/d/wfTJJL5Wz/datalinks-source?var-seriesName=${__series.name}&var-labelDatacenter=${__series.labels.datacenter}&var-labelDatacenterRegion=${__series.labels[\"datacenter.region\"]}&var-valueTime=${__value.time}&var-valueNumeric=${__value.numeric}&var-valueText=${__value.text}"
|
||||
"url": "/d/wfTJJL5Wz/datalinks-source?var-seriesName=${__series.name}&var-labelDatacenter=${__series.labels.datacenter}&var-labelDatacenterRegion=${__series.labels[\"datacenter.region\"]}&var-valueTime=${__value.time}&var-valueNumeric=${__value.numeric}&var-valueText=${__value.text}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -164,7 +164,7 @@
|
||||
{
|
||||
"targetBlank": false,
|
||||
"title": "Drill it down",
|
||||
"url": "http://localhost:3000/d/wfTJJL5Wz/datalinks-source?var-seriesName=${__series.name}&var-valueTime=${__value.time}&var-valueNumeric=${__value.numeric}&var-valueText=${__value.text}&var-fieldName=${__field.name}"
|
||||
"url": "/d/wfTJJL5Wz/datalinks-source?var-seriesName=${__series.name}&var-valueTime=${__value.time}&var-valueNumeric=${__value.numeric}&var-valueText=${__value.text}&var-fieldName=${__field.name}"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -246,7 +246,7 @@
|
||||
{
|
||||
"targetBlank": true,
|
||||
"title": "Drill it down!",
|
||||
"url": "http://localhost:3000/d/wfTJJL5Wz/datalinks-source\n?var-fieldName=${__field.name}\n&var-labelDatacenter=${__series.labels.datacenter}\n&var-labelDatacenterRegion=${__series.labels[\"datacenter.region\"]}\n&var-valueNumeric=${__value.numeric}\n&var-valueText=${__value.text}\n&var-valueCalc=${__value.calc}"
|
||||
"url": "/d/wfTJJL5Wz/datalinks-source\n?var-fieldName=${__field.name}\n&var-labelDatacenter=${__series.labels.datacenter}\n&var-labelDatacenterRegion=${__series.labels[\"datacenter.region\"]}\n&var-valueNumeric=${__value.numeric}\n&var-valueText=${__value.text}\n&var-valueCalc=${__value.calc}"
|
||||
}
|
||||
],
|
||||
"mappings": [
|
||||
@@ -307,7 +307,7 @@
|
||||
"links": [
|
||||
{
|
||||
"title": "Drill it down",
|
||||
"url": "http://localhost:3000/d/wfTJJL5Wz/datalinks-source?var-fieldName=${__field.name}&var-labelDatacenter=${__series.labels.datacenter}&var-labelDatacenterRegion=${__series.labels[\"datacenter.region\"]}&var-valueNumeric=${__value.numeric}&var-valueText=${__value.text}&var-valueCalc=${__value.calc}"
|
||||
"url": "/d/wfTJJL5Wz/datalinks-source?var-fieldName=${__field.name}&var-labelDatacenter=${__series.labels.datacenter}&var-labelDatacenterRegion=${__series.labels[\"datacenter.region\"]}&var-valueNumeric=${__value.numeric}&var-valueText=${__value.text}&var-valueCalc=${__value.calc}"
|
||||
}
|
||||
],
|
||||
"mappings": [],
|
||||
|
||||
@@ -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,
|
||||
|
||||
19
devenv/docker/blocks/traefik/configs/subpath_no_rewrite.yml
Normal file
19
devenv/docker/blocks/traefik/configs/subpath_no_rewrite.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
http:
|
||||
middlewares:
|
||||
compress-response:
|
||||
compress: {}
|
||||
|
||||
services:
|
||||
grafana-subpath:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- url: 'http://grafana-subpath:3000/'
|
||||
|
||||
routers:
|
||||
grafana-subpath:
|
||||
entryPoints:
|
||||
- web
|
||||
middlewares:
|
||||
- compress-response
|
||||
rule: 'Path(`/grafana`) || PathPrefix(`/grafana/`)'
|
||||
service: grafana-subpath
|
||||
19
devenv/docker/blocks/traefik/docker-compose.yml
Normal file
19
devenv/docker/blocks/traefik/docker-compose.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v2.1
|
||||
volumes:
|
||||
- './traefik.yml:/etc/traefik/traefik.yml'
|
||||
- './configs:/etc/traefik/configs'
|
||||
ports:
|
||||
- '80:80'
|
||||
- '8080:8080'
|
||||
links:
|
||||
- grafana-subpath
|
||||
|
||||
grafana-subpath:
|
||||
image: grafana/grafana:latest
|
||||
environment:
|
||||
- GF_SERVER_ROOT_URL=/grafana
|
||||
- GF_SERVER_SERVE_FROM_SUB_PATH=true
|
||||
18
devenv/docker/blocks/traefik/traefik.yml
Normal file
18
devenv/docker/blocks/traefik/traefik.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
## traefik.yml
|
||||
|
||||
# Entrypoints enabled
|
||||
entryPoints:
|
||||
web:
|
||||
address: ':80'
|
||||
|
||||
# API and dashboard configuration
|
||||
api:
|
||||
insecure: true
|
||||
|
||||
# Loggings
|
||||
log: {}
|
||||
|
||||
# File configurations folder
|
||||
providers:
|
||||
file:
|
||||
directory: /etc/traefik/configs
|
||||
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) => {}
|
||||
@@ -1,24 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"target": "es6",
|
||||
"lib": ["es6"],
|
||||
"module": "commonjs",
|
||||
"declaration": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"inlineSourceMap": false,
|
||||
"sourceMap": true,
|
||||
"noEmitOnError": false,
|
||||
"emitDecoratorMetadata": false,
|
||||
"experimentalDecorators": true,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": false,
|
||||
"noImplicitUseStrict":false,
|
||||
"noImplicitAny": false,
|
||||
"noUnusedLocals": true
|
||||
},
|
||||
"include": [
|
||||
"*.ts",
|
||||
"**/*.ts"
|
||||
]
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"declaration": false,
|
||||
"emitDecoratorMetadata": false,
|
||||
"experimentalDecorators": true,
|
||||
"inlineSourceMap": false,
|
||||
"lib": ["es6"],
|
||||
"module": "commonjs",
|
||||
"moduleResolution": "node",
|
||||
"noEmitOnError": false,
|
||||
"noImplicitAny": false,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": false,
|
||||
"noImplicitUseStrict": false,
|
||||
"noUnusedLocals": true,
|
||||
"sourceMap": true,
|
||||
"target": "es6"
|
||||
},
|
||||
"include": ["*.ts", "**/*.ts"]
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
.PHONY: docs docs-test
|
||||
.PHONY: docs docs-no-pull docs-test
|
||||
|
||||
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 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 && make docs-menu && hugo server -p 3002 -D --ignoreCache --baseUrl http://localhost:3002 --bind 0.0.0.0'
|
||||
|
||||
docs-no-pull:
|
||||
docker run -v $(PWD)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it grafana/docs-base:latest /bin/bash -c 'make docs-menu && hugo server -p 3002 -D --ignoreCache --baseUrl http://localhost:3002 --bind 0.0.0.0'
|
||||
|
||||
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'
|
||||
docker run -v $(PWD)/sources:/hugo/content/docs/grafana/latest --rm -it grafana/docs-base:latest /bin/bash -c 'npm i && make prod'
|
||||
|
||||
@@ -6,24 +6,28 @@ type = "docs"
|
||||
aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin", "/docs/grafana/v3.1"]
|
||||
+++
|
||||
|
||||
# Grafana Documentation
|
||||
# Grafana documentation
|
||||
|
||||
<h2>Installing Grafana</h2>
|
||||
<div class="nav-cards">
|
||||
<a href="{{< relref "installation/debian.md" >}}" class="nav-cards__item nav-cards__item--install">
|
||||
<div class="nav-cards__icon fa fa-linux">
|
||||
</div>
|
||||
<h5>Installing on Linux</h5>
|
||||
<h5>Install on Linux</h5>
|
||||
</a>
|
||||
<a href="{{< relref "installation/mac.md" >}}" class="nav-cards__item nav-cards__item--install">
|
||||
<div class="nav-cards__icon fa fa-apple">
|
||||
</div>
|
||||
<h5>Installing on macOS</h5>
|
||||
<h5>Install on macOS</h5>
|
||||
</a>
|
||||
<a href="{{< relref "installation/windows.md" >}}" class="nav-cards__item nav-cards__item--install">
|
||||
<a href="{{< relref "installation/windows.md" >}}" class="nav-cards__item nav-cards__item--install">
|
||||
<div class="nav-cards__icon fa fa-windows">
|
||||
</div>
|
||||
<h5>Installing on Windows</h5>
|
||||
<h5>Install on Windows</h5>
|
||||
</a>
|
||||
<a href="{{< relref "installation/docker.md" >}}" class="nav-cards__item nav-cards__item--install">
|
||||
<h4>Run Docker image</h4>
|
||||
<p>Run Grafana on a Docker image.</p>
|
||||
</a>
|
||||
<a href="https://grafana.com/cloud/grafana" class="nav-cards__item nav-cards__item--install">
|
||||
<div class="nav-cards__icon fa fa-cloud">
|
||||
@@ -33,28 +37,28 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
|
||||
<a href="https://grafana.com/grafana/download" class="nav-cards__item nav-cards__item--install">
|
||||
<div class="nav-cards__icon fa fa-moon-o">
|
||||
</div>
|
||||
<h5>Nightly Builds</h5>
|
||||
<h5>Nightly builds</h5>
|
||||
</a>
|
||||
<div class="nav-cards__item nav-cards__item--install">
|
||||
<h5>For other platforms read the <a href="{{< relref "project/building_from_source.md" >}}">build from source</a>
|
||||
instructions for more information.</h5>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Guides</h2>
|
||||
|
||||
<div class="nav-cards">
|
||||
<a href="https://grafana.com/grafana" class="nav-cards__item nav-cards__item--guide">
|
||||
<a href="{{< relref "guides/what-is-grafana.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What is Grafana?</h4>
|
||||
<p>Get an overview of Grafana's key features.</p>
|
||||
</a>
|
||||
<a href="{{< relref "guides/getting_started.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Getting started</h4>
|
||||
<p>Learn the basics of using Grafana.</p>
|
||||
</a>
|
||||
<a href="{{< relref "installation/configuration.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Configure Grafana</h4>
|
||||
<p>Review the configuration and setup options.</p>
|
||||
</a>
|
||||
<a href="{{< relref "guides/getting_started.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Getting started</h4>
|
||||
<p>Learn the basics of using Grafana.</p>
|
||||
<a href="{{< relref "guides/timeseries.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Intro to time series</h4>
|
||||
<p>Learn about time series data.</p>
|
||||
</a>
|
||||
<a href="{{< relref "administration/provisioning.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>Provisioning</h4>
|
||||
@@ -67,7 +71,7 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
|
||||
|
||||
</div>
|
||||
|
||||
<h2>Data Source Guides</h2>
|
||||
<h2>Data source guides</h2>
|
||||
<div class="nav-cards">
|
||||
<a href="{{< relref "features/datasources/graphite.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_graphite.svg" >
|
||||
|
||||
@@ -125,7 +125,7 @@ Sets the path for the Grafana install/home path, defaults to working directory.
|
||||
|
||||
**Example:**
|
||||
```bash
|
||||
grafana-cli admin reset-admin-password --homepath "c:\Program Files\grafana" mynewpassword
|
||||
grafana-cli --homepath "c:\Program Files\grafana" admin reset-admin-password mynewpassword
|
||||
```
|
||||
|
||||
### Override config file
|
||||
|
||||
@@ -1,66 +1,58 @@
|
||||
+++
|
||||
title = "Image Rendering"
|
||||
title = "Image rendering"
|
||||
description = ""
|
||||
keywords = ["grafana", "image", "rendering", "phantomjs"]
|
||||
keywords = ["grafana", "image", "rendering", "plugin"]
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/installation/image-rendering"]
|
||||
[menu.docs]
|
||||
parent = "admin"
|
||||
parent = "features"
|
||||
weight = 8
|
||||
+++
|
||||
|
||||
# Image Rendering
|
||||
# Image rendering
|
||||
|
||||
Grafana supports rendering of panels and dashboards as PNG-images.
|
||||
Grafana supports automatic rendering of panels and dashboards as PNG images. This allows Grafana to automatically generate images of your panels to include in [alert notifications]({{< relref "../alerting/notifications.md" >}}).
|
||||
|
||||
When an image is being rendered the PNG-image is temporary written to the filesystem, i.e. a sub-directory of Grafana's [data](/installation/configuration/#data) directory named `png`.
|
||||
When an image is being rendered the PNG-image is temporarily written to the file system. When an image is rendered, the PNG image is temporary written to the `png` folder in the Grafana `data` folder.
|
||||
|
||||
A background job runs each 10 minutes and will remove temporary images. You can configure how long time an image should be stored before being removed by configuring the [temp-data-lifetime](/installation/configuration/#temp-data-lifetime) setting.
|
||||
A background job runs every 10 minutes and removes temporary images. You can configure how long an image should be stored before being removed by configuring the [temp-data-lifetime]({{< relref "../installation/configuration/#temp-data-lifetime" >}}) setting.
|
||||
|
||||
## Requirements
|
||||
You can also render a PNG by clicking the dropdown arrow next to a panel title, then clicking **Share > Direct link rendered image**.
|
||||
|
||||
Rendering images may require quite a lot of memory, mainly because there are "browser instances" started in the
|
||||
background responsible for the actual rendering. Further, if multiple images are being rendered in parallel it most
|
||||
certainly has a bigger memory footprint. Minimum free memory recommendation is 1GB.
|
||||
## Memory requirements
|
||||
|
||||
Depending on [rendering method](#rendering-methods) you would need that memory available in the system where the
|
||||
rendering process is running. For [Grafana Image renderer plugin](#grafana-image-renderer-plugin) and [PhantomJS](#phantomjs)
|
||||
it's the system which Grafana is installed on. For [Remote rendering service](#remote-rendering-service) it is the system where
|
||||
that's installed.
|
||||
Minimum free memory recommendation is 16GB on the system doing the rendering.
|
||||
|
||||
## Rendering methods
|
||||
Rendering images can require a lot of memory, mainly because Grafana creates browser instances in the background for the actual rendering. If multiple images are rendered in parallel, then the rendering has a bigger memory footprint. One advantage of using the remote rendering service is that the rendering will be done on the remote system, so your local system resources will not be affected by rendering.
|
||||
|
||||
### Grafana image renderer plugin
|
||||
## Alerting and render limits
|
||||
|
||||
> This plugin currently does not work if it is installed in the Grafana docker image. See [Install in Grafana docker image](#install-in-grafana-docker-image).
|
||||
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" >}}).
|
||||
|
||||
The [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) is a plugin that runs on the backend and handles rendering panels and dashboards as PNG-images using headless chrome.
|
||||
## Install Grafana Image Renderer plugin
|
||||
|
||||
You can install it using grafana-cli:
|
||||
The [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) is a plugin that runs on the backend and handles rendering panels and dashboards as PNG images using headless Chrome.
|
||||
|
||||
```bash
|
||||
grafana-cli plugins install grafana-image-renderer
|
||||
```
|
||||
To install the plugin, refer to the [Grafana Image Renderer Installation instructions](https://grafana.com/grafana/plugins/grafana-image-renderer/installation).
|
||||
|
||||
For further information and instructions refer to [troubleshooting](#troubleshooting) and the [plugin details](https://grafana.com/grafana/plugins/grafana-image-renderer).
|
||||
## Run in custom Grafana Docker image
|
||||
|
||||
#### Install in Grafana docker image
|
||||
We recommend setting up another Docker container for rendering and using remote rendering. Refer to [Remote rendering service]({{< relref "#remote-rendering-service" >}}) for instructions.
|
||||
|
||||
This plugin is not compatible with the current Grafana Docker image without installing further system-level dependencies. We recommend setting up another Docker container for rendering and using remote rendering, see [Remote rendering service](#remote-rendering-service) for reference.
|
||||
If you still want to install the plugin in the Grafana Docker image, refer to [Build with Grafana Image Renderer plugin pre-installed]({{< relref "../installation/docker/#build-with-grafana-image-renderer-plugin-pre-installed" >}}).
|
||||
|
||||
If you still want to install the plugin in the Grafana docker image we provide instructions for how to build a custom Grafana image, see [Installing using Docker](/installation/docker/#custom-image-with-grafana-image-renderer-plugin-pre-installed).
|
||||
## Remote rendering service
|
||||
|
||||
### Remote rendering service
|
||||
> Requires an internet connection.
|
||||
|
||||
The [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) can also be run as a remote HTTP rendering service. In this setup Grafana will render an image by making a HTTP request to the remote rendering service, which in turn render the image and returns it back in the HTTP response to Grafana.
|
||||
The [Grafana Image Renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) can also be run as a remote HTTP rendering service. In this setup, Grafana renders an image by making a HTTP request to the remote rendering service, which in turn renders the image and returns it back in the HTTP response to Grafana.
|
||||
|
||||
You can run the remote HTTP rendering service using Docker or as a standalone Node.js application.
|
||||
|
||||
**Using Docker:**
|
||||
### Run in Docker
|
||||
|
||||
The following example describes how to run Grafana and the remote HTTP rendering service in two separate docker containers using Docker Compose.
|
||||
The following example shows how to run Grafana and the remote HTTP rendering service in two separate Docker containers using Docker Compose.
|
||||
|
||||
Create a `docker-compose.yml` with the following content.
|
||||
Create a `docker-compose.yml` with the following content:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
@@ -80,54 +72,45 @@ services:
|
||||
- 8081
|
||||
```
|
||||
|
||||
and finally run:
|
||||
And then run:
|
||||
|
||||
```bash
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
**Running as standalone Node.js application:**
|
||||
## Run as standalone Node.js application
|
||||
|
||||
The following example describes how to build and run the remote HTTP rendering service as a standalone node.js application and configure Grafana appropriately.
|
||||
The following example describes how to build and run the remote HTTP rendering service as a standalone Node.js application and configure Grafana appropriately.
|
||||
|
||||
1. Git clone the [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) repository.
|
||||
1. Clone the [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) Git repository.
|
||||
2. Install dependencies and build:
|
||||
|
||||
```bash
|
||||
yarn install --pure-lockfile
|
||||
yarn run build
|
||||
```
|
||||
3. Run the server
|
||||
```bash
|
||||
yarn install --pure-lockfile
|
||||
yarn run build
|
||||
```
|
||||
|
||||
```bash
|
||||
node build/app.js server --port=8081
|
||||
```
|
||||
3. Update Grafana configuration:
|
||||
3. Run the server:
|
||||
|
||||
```
|
||||
[rendering]
|
||||
server_url = http://localhost:8081/render
|
||||
callback_url = http://localhost:3000/
|
||||
```
|
||||
4. Restart Grafana
|
||||
```bash
|
||||
node build/app.js server --port=8081
|
||||
```
|
||||
|
||||
For further information and instructions refer to [troubleshooting](#troubleshooting) and the [plugin details](https://grafana.com/grafana/plugins/grafana-image-renderer).
|
||||
4. Update Grafana configuration:
|
||||
|
||||
### PhantomJS
|
||||
```
|
||||
[rendering]
|
||||
server_url = http://localhost:8081/render
|
||||
callback_url = http://localhost:3000/
|
||||
```
|
||||
|
||||
> PhantomJS is deprecated since Grafana v6.4 and will be removed in a future release. Please migrate to Grafana image renderer plugin or remote rendering service.
|
||||
5. Restart Grafana.
|
||||
|
||||
[PhantomJS](https://phantomjs.org/) have been the only supported and default image renderer since Grafana v2.x and is shipped with Grafana.
|
||||
## PhantomJS
|
||||
|
||||
PhantomJS binaries are included for Linux (x64), Windows (x64) and Darwin (x64). For Linux you should ensure that any required libraries, e.g. libfontconfig1, are available.
|
||||
> PhantomJS is deprecated since Grafana v6.4 and will be removed in a future release. Please migrate to the Grafana Image Renderer plugin or remote rendering service.
|
||||
|
||||
Please note that PhantomJS binaries are not included for ARM. To support this you will need to ensure that a phantomjs binary is available under tools/phantomjs/phantomjs.
|
||||
|
||||
## Alerting and render limits
|
||||
|
||||
Alert notifications can include images, but rendering many images at the same time can overload the server where the renderer is running. For instructions of how to configure this, see [concurrent_render_limit]({{< relref "../installation/configuration/#concurrent_render_limit" >}}).
|
||||
|
||||
## Troubleshooting
|
||||
## Troubleshoot image rendering
|
||||
|
||||
Enable debug log messages for rendering in the Grafana configuration file and inspect the Grafana server log.
|
||||
|
||||
@@ -147,19 +130,19 @@ error while loading shared libraries: libX11.so.6: cannot open shared object fil
|
||||
```
|
||||
|
||||
In general you can use the [`ldd`](https://en.wikipedia.org/wiki/Ldd_(Unix)) utility to figure out what shared libraries
|
||||
are missing/not installed in your system:
|
||||
are not installed in your system:
|
||||
|
||||
```bash
|
||||
$ cd <grafana-image-render plugin directiry>
|
||||
$ ldd chrome-linux/chrome
|
||||
linux-vdso.so.1 (0x00007fff1bf65000)
|
||||
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2047945000)
|
||||
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2047924000)
|
||||
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f204791a000)
|
||||
libX11.so.6 => not found
|
||||
libX11-xcb.so.1 => not found
|
||||
libxcb.so.1 => not found
|
||||
libXcomposite.so.1 => not found
|
||||
cd <grafana-image-render plugin directory>
|
||||
ldd chrome-linux/chrome
|
||||
linux-vdso.so.1 (0x00007fff1bf65000)
|
||||
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2047945000)
|
||||
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2047924000)
|
||||
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f204791a000)
|
||||
libX11.so.6 => not found
|
||||
libX11-xcb.so.1 => not found
|
||||
libxcb.so.1 => not found
|
||||
libXcomposite.so.1 => not found
|
||||
...
|
||||
```
|
||||
|
||||
@@ -173,23 +156,43 @@ libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3
|
||||
|
||||
**Centos:**
|
||||
|
||||
On a minimal Centos install the following dependencies have been confirmed as needed for the image rendering to function.
|
||||
On a minimal Centos install the following dependencies have been confirmed as needed for the image rendering to function:
|
||||
|
||||
```bash
|
||||
libXcomposite libXdamage libXtst cups libXScrnSaver pango atk adwaita-cursor-theme adwaita-icon-theme at at-spi2-atk at-spi2-core cairo-gobject colord-libs dconf desktop-file-utils ed emacs-filesystem gdk-pixbuf2 glib-networking gnutls gsettings-desktop-schemas gtk-update-icon-cache gtk3 hicolor-icon-theme jasper-libs json-glib libappindicator-gtk3 libdbusmenu libdbusmenu-gtk3 libepoxy liberation-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts libgusb libindicator-gtk3 libmodman libproxy libsoup libwayland-cursor libwayland-egl libxkbcommon m4 mailx nettle patch psmisc redhat-lsb-core redhat-lsb-submod-security rest spax time trousers xdg-utils xkeyboard-config
|
||||
```
|
||||
|
||||
#### Using custom Chrome/Chromium
|
||||
### Certificate signed by internal certificate authorities
|
||||
|
||||
In many cases Grafana, runs on internal servers and uses certificates that have not been signed by a CA ([Certificate Authority](https://en.wikipedia.org/wiki/Certificate_authority)) known to Chrome, and therefore cannot be validated. Chrome internally uses NSS ([Network Security Services](https://en.wikipedia.org/wiki/Network_Security_Services)) for cryptogtraphic operations such as the validation of certificates.
|
||||
|
||||
If you are using the Grafana Image Renderer with a Grafana server that uses a certificate signed by such a custom CA (for example a company-internal CA), rendering images will fail and you will see messages like this in the Grafana log:
|
||||
|
||||
```
|
||||
t=2019-12-04T12:39:22+0000 lvl=error msg="Render request failed" logger=rendering error=map[] url="https://192.168.106.101:3443/d-solo/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m&from=1575438321300&to=1575459921300&var-Host=master1&panelId=4&width=1000&height=500&tz=Europe%2FBerlin&render=1" timestamp=0001-01-01T00:00:00.000Z
|
||||
t=2019-12-04T12:39:22+0000 lvl=error msg="Rendering failed." logger=context userId=1 orgId=1 uname=admin error="Rendering failed: Error: net::ERR_CERT_AUTHORITY_INVALID at https://192.168.106.101:3443/d-solo/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m&from=1575438321300&to=1575459921300&var-Host=master1&panelId=4&width=1000&height=500&tz=Europe%2FBerlin&render=1"
|
||||
t=2019-12-04T12:39:22+0000 lvl=error msg="Request Completed" logger=context userId=1 orgId=1 uname=admin method=GET path=/render/d-solo/zxDJxNaZk/graphite-metrics status=500 remote_addr=192.168.106.101 time_ms=310 size=1722 referer="https://grafana.xxx-xxx/d/zxDJxNaZk/graphite-metrics?orgId=1&refresh=1m"
|
||||
```
|
||||
|
||||
(The severity-level `error` in the above messages might be misspelled with a single `r`)
|
||||
|
||||
If this happens, then you have to add the certificate to the trust store. If you have the certificate file for the internal root CA in the file `internal-root-ca.crt.pem`, then use these commands to create a user specific NSS trust store for the Grafana user (`grafana` for the purpose of this example) and execute the following steps:
|
||||
|
||||
```[root@server ~]# [ -d /usr/share/grafana/.pki/nssdb ] || mkdir -p /usr/share/grafana/.pki/nssdb
|
||||
[root@merver ~]# certutil -d sql:/usr/share/grafana/.pki/nssdb -A -n internal-root-ca -t C -i /etc/pki/tls/certs/internal-root-ca.crt.pem
|
||||
[root@server ~]# chown -R grafana: /usr/share/grafana/.pki/nssdb
|
||||
```
|
||||
|
||||
### Custom Chrome/Chromium
|
||||
|
||||
As a last resort, if you already have [Chrome](https://www.google.com/chrome/) or [Chromium](https://www.chromium.org/)
|
||||
installed on your system you can configure [Grafana Image renderer plugin](#grafana-image-renderer-plugin) to use this
|
||||
installed on your system, then you can configure [Grafana Image renderer plugin](#grafana-image-renderer-plugin) to use this
|
||||
instead of the pre-packaged version of Chromium.
|
||||
|
||||
> Please note that this is not recommended since you may encounter problems if the installed version of Chrome/Chromium is not
|
||||
> is compatible with the [Grafana Image renderer plugin](#grafana-image-renderer-plugin).
|
||||
> Please note that this is not recommended, since you may encounter problems if the installed version of Chrome/Chromium is not
|
||||
> compatible with the [Grafana Image renderer plugin](#grafana-image-renderer-plugin).
|
||||
|
||||
To override the path to the Chrome/Chromium executable you can set an environment variable and make sure that
|
||||
it's available for the Grafana process, e.g.
|
||||
To override the path to the Chrome/Chromium executable, set an environment variable and make sure that it's available for the Grafana process. For example:
|
||||
|
||||
```bash
|
||||
export GF_RENDERER_PLUGIN_CHROME_BIN="/usr/bin/chromium-browser"
|
||||
|
||||
@@ -253,9 +253,9 @@ Note: The JSON definition in the input field when using `Copy JSON to Clipboard`
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v51/provisioning_cannot_save_dashboard.png" max-width="500px" class="docs-image--no-shadow" >}}
|
||||
|
||||
### Reusable Dashboard Urls
|
||||
### Reusable Dashboard URLs
|
||||
|
||||
If the dashboard in the json file contains an [uid](/reference/dashboard/#json-fields), Grafana will force insert/update on that uid. This allows you to migrate dashboards betweens Grafana instances and provisioning Grafana from configuration without breaking the urls given since the new dashboard url uses the uid as identifier.
|
||||
If the dashboard in the json file contains an [uid](/reference/dashboard/#json-fields), Grafana will force insert/update on that uid. This allows you to migrate dashboards betweens Grafana instances and provisioning Grafana from configuration without breaking the URLs given since the new dashboard URL uses the uid as identifier.
|
||||
When Grafana starts, it will update/insert all dashboards available in the configured folders. If you modify the file, the dashboard will also be updated.
|
||||
By default Grafana will delete dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
|
||||
|
||||
@@ -270,7 +270,7 @@ Alert Notification Channels can be provisioned by adding one or more yaml config
|
||||
|
||||
Each config file can contain the following top-level fields:
|
||||
- `notifiers`, a list of alert notifications that will be added or updated during start up. If the notification channel already exists, Grafana will update it to match the configuration file.
|
||||
- `delete_notifiers`, a list of alert notifications to be deleted before before inserting/updating those in the `notifiers` list.
|
||||
- `delete_notifiers`, a list of alert notifications to be deleted before inserting/updating those in the `notifiers` list.
|
||||
|
||||
Provisioning looks up alert notifications by uid, and will update any existing notification with the provided uid.
|
||||
|
||||
@@ -351,7 +351,9 @@ The following sections detail the supported settings for each alert notification
|
||||
| icon_emoji |
|
||||
| icon_url |
|
||||
| uploadImage |
|
||||
| mention |
|
||||
| mentionUsers |
|
||||
| mentionGroups |
|
||||
| mentionChannel |
|
||||
| token |
|
||||
|
||||
#### Alert notification `victorops`
|
||||
|
||||
@@ -11,9 +11,7 @@ weight = 2
|
||||
|
||||
# Metrics from the alert engine
|
||||
|
||||
> Alerting is only available in Grafana v4.0 and above.
|
||||
|
||||
The alert engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics](/installation/configuration/#metrics).
|
||||
The alert engine publishes some internal metrics about itself. You can read more about how Grafana publishes [internal metrics]({{< relref "../administration/metrics/" >}}).
|
||||
|
||||
Description | Type | Metric name
|
||||
---------- | ----------- | ----------
|
||||
|
||||
@@ -75,27 +75,29 @@ able to access the image.
|
||||
|
||||
{{< imgbox max-width="40%" img="/img/docs/v4/slack_notification.png" caption="Alerting Slack Notification" >}}
|
||||
|
||||
To set up slack you need to configure an incoming webhook url at slack. You can follow their guide on how
|
||||
to do that [here](https://api.slack.com/incoming-webhooks). If you want to include screenshots of the firing alerts
|
||||
in the Slack messages you have to configure either the [external image destination](#external-image-store) in Grafana,
|
||||
or a bot integration via Slack Apps. Follow Slack's guide to set up a bot integration and use the token provided
|
||||
(https://api.slack.com/bot-users), which starts with "xoxb".
|
||||
To set up Slack, you need to configure an incoming Slack webhook URL. You can follow
|
||||
[their guide](https://api.slack.com/incoming-webhooks) on how to do that. If you want to include screenshots of the
|
||||
firing alerts in the Slack messages you have to configure either the [external image destination](#external-image-store)
|
||||
in Grafana, or a bot integration via Slack Apps. Follow Slack's guide to set up a bot integration and use the token
|
||||
provided (https://api.slack.com/bot-users), which starts with "xoxb".
|
||||
|
||||
Setting | Description
|
||||
---------- | -----------
|
||||
Url | Slack incoming webhook url.
|
||||
Url | Slack incoming webhook URL.
|
||||
Username | Set the username for the bot's message.
|
||||
Recipient | Allows you to override the Slack recipient.
|
||||
Recipient | Allows you to override the Slack recipient. You must either provide a channel Slack ID, a user Slack ID, a username reference (@<user>, all lowercase, no whitespace), or a channel reference (#<channel>, all lowercase, no whitespace).
|
||||
Icon emoji | Provide an emoji to use as the icon for the bot's message. Ex :smile:
|
||||
Icon URL | Provide a url to an image to use as the icon for the bot's message.
|
||||
Mention | make it possible to include a mention in the Slack notification sent by Grafana. Ex @here or @channel
|
||||
Icon URL | Provide a URL to an image to use as the icon for the bot's message.
|
||||
Mention Users | Optionally mention one or more users in the Slack notification sent by Grafana. You have to refer to users, comma-separated, via their corresponding Slack IDs (which you can find by clicking the overflow button on each user's Slack profile).
|
||||
Mention Groups | Optionally mention one or more groups in the Slack notification sent by Grafana. You have to refer to groups, comma-separated, via their corresponding Slack IDs (which you can get from each group's Slack profile URL).
|
||||
Mention Channel | Optionally mention either all channel members or just active ones.
|
||||
Token | If provided, Grafana will upload the generated image via Slack's file.upload API method, not the external image destination.
|
||||
|
||||
If you are using the token for a slack bot, then you have to invite the bot to the channel you want to send notifications and add the channel to the recipient field.
|
||||
|
||||
### PagerDuty
|
||||
|
||||
To set up PagerDuty, all you have to do is to provide an API key.
|
||||
To set up PagerDuty, all you have to do is to provide an integration key.
|
||||
|
||||
Setting | Description
|
||||
---------- | -----------
|
||||
@@ -103,6 +105,8 @@ 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
|
||||
|
||||
**Note:** The tags `Class`, `Group`, and `Component` have special meaning in the [Pagerduty Common Event Format - PD-CEF](https://support.pagerduty.com/docs/pd-cef). If an alert panel defines these tag keys they will be transposed to the root of the event sent to Pagerduty. This means they will be available within the Pagerduty UI and Filtering tools.
|
||||
|
||||
### Webhook
|
||||
|
||||
The webhook notification is a simple way to send information about a state change over HTTP to a custom endpoint.
|
||||
@@ -132,7 +136,8 @@ Example json body:
|
||||
"tag name":"tag value"
|
||||
},
|
||||
"title":"[Alerting] Panel Title alert"
|
||||
}```
|
||||
}
|
||||
```
|
||||
|
||||
- **state** - The possible values for alert state are: `ok`, `paused`, `alerting`, `pending`, `no_data`.
|
||||
|
||||
@@ -188,7 +193,7 @@ Kafka | `kafka` | yes, external only | no
|
||||
Line | `line` | yes, external only | no
|
||||
Microsoft Teams | `teams` | yes, external only | no
|
||||
OpsGenie | `opsgenie` | yes, external only | yes
|
||||
Pagerduty | `pagerduty` | yes, external only | no
|
||||
Pagerduty | `pagerduty` | yes, external only | yes
|
||||
Prometheus Alertmanager | `prometheus-alertmanager` | yes, external only | yes
|
||||
Pushover | `pushover` | yes | no
|
||||
Sensu | `sensu` | yes, external only | no
|
||||
@@ -201,7 +206,8 @@ 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]({{< relref "../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]({{< relref "../administration/image_rendering/" >}}).
|
||||
|
||||
Most Notification Channels require that this image be publicly accessible (Slack and PagerDuty for example). In order to include images in alert notifications, Grafana can upload the image to an image store. It currently supports
|
||||
Amazon S3, Webdav, Google Cloud Storage and Azure Blob Storage. So to set that up you need to configure the [external image uploader]({{< relref "../installation/configuration/#external-image-storage" >}}) in your grafana-server ini config file.
|
||||
@@ -223,4 +229,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]({{< relref "../installation/configuration/#domain" >}}) setting in Grafana.
|
||||
This URL is based on the [domain]({{< relref "../installation/configuration/#domain" >}}) setting in Grafana.
|
||||
|
||||
@@ -11,15 +11,11 @@ weight = 1
|
||||
|
||||
# Alerting Engine and Rules Guide
|
||||
|
||||
> Alerting is only available in Grafana v4.0 and above.
|
||||
|
||||
## Introduction
|
||||
|
||||
{{< imgbox max-width="40%" img="/img/docs/v4/drag_handles_gif.gif" caption="Alerting overview" >}}
|
||||
|
||||
Alerting in Grafana allows you to attach rules to your dashboard panels. When you save the dashboard
|
||||
Grafana will extract the alert rules into a separate alert rule storage and schedule them for evaluation.
|
||||
|
||||
{{< imgbox max-width="40%" img="/img/docs/v4/drag_handles_gif.gif" caption="Alerting overview" >}}
|
||||
|
||||
In the alert tab of the graph panel you can configure how often the alert rule should be evaluated
|
||||
and the conditions that need to be met for the alert to change state and trigger its
|
||||
[notifications]({{< relref "notifications.md" >}}).
|
||||
@@ -28,11 +24,9 @@ and the conditions that need to be met for the alert to change state and trigger
|
||||
|
||||
The alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
|
||||
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`, `InfluxDB`, `Elasticsearch`,
|
||||
`Stackdriver`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle` and `Azure Data Explorer`.
|
||||
`Stackdriver`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Data Explorer`.
|
||||
|
||||
> Alerting support for Azure Monitor is only available in Grafana v6.0 and above.
|
||||
|
||||
### Clustering
|
||||
## Clustering
|
||||
|
||||
Currently alerting supports a limited form of high availability. Since v4.2.0 of Grafana, alert notifications are deduped when running multiple servers. This means all alerts are executed on every server but no duplicate alert notifications are sent due to the deduping logic. Proper load balancing of alerts will be introduced in the future.
|
||||
|
||||
@@ -67,7 +61,6 @@ Below you can see an example timeline of an alert using the `For` setting. At ~1
|
||||
Currently the only condition type that exists is a `Query` condition that allows you to
|
||||
specify a query letter, time range and an aggregation function.
|
||||
|
||||
|
||||
### Query condition example
|
||||
|
||||
```sql
|
||||
|
||||
140
docs/sources/auth/azuread.md
Normal file
140
docs/sources/auth/azuread.md
Normal file
@@ -0,0 +1,140 @@
|
||||
+++
|
||||
title = "Azure AD OAuth2 authentication"
|
||||
description = "Grafana Azure AD OAuth Guide "
|
||||
keywords = ["grafana", "configuration", "documentation", "oauth"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Azure AD"
|
||||
identifier = "azuread_oauth2"
|
||||
parent = "authentication"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# Azure AD OAuth2 authentication
|
||||
|
||||
> Only available in Grafana v6.7+
|
||||
|
||||
The Azure AD authentication provides the possibility to use an Azure Active Directory tenant as an identity provider for Grafana. By using Azure AD Application Roles it is also possible to assign Users and Groups to Grafana roles from the Azure Portal.
|
||||
|
||||
## Create the Azure AD application
|
||||
|
||||
To enable the Azure AD OAuth2 you must register your application with Azure AD.
|
||||
|
||||
1. Log in to [Azure Portal](https://portal.azure.com) and click **Azure Active Directory** in the side menu.
|
||||
|
||||
1. Click **App Registrations** and add a new application registration:
|
||||
- Name: Grafana
|
||||
- Application type: Web app / API
|
||||
- Sign-on URL: `https://<grafana domain>/login/azuread`
|
||||
|
||||
1. Click the name of the new application to open the application details page.
|
||||
|
||||
1. Click **Endpoints**.
|
||||
- Note down the **OAuth 2.0 authorization endpoint (v2)**, this will be the auth url.
|
||||
- Note down the **OAuth 2.0 token endpoint (v2)**, this will be the token url.
|
||||
|
||||
1. Close the Endpoints page to come back to the application details page.
|
||||
|
||||
1. Note down the "Application ID", this will be the OAuth client id.
|
||||
|
||||
1. Click **Certificates & secrets** and add a new entry under Client secrets.
|
||||
- Description: Grafana OAuth
|
||||
- Expires: Never
|
||||
|
||||
1. Click **Add** then copy the key value, this will be the OAuth client secret.
|
||||
|
||||
1. Click **Manifest**.
|
||||
- Add definitions for the required Application Roles for Grafana (Viewer, Editor, Admin). Without this configuration all users will be assigned to the Viewer role.
|
||||
- Every role has to have a unique id. On Linux this can be created with `uuidgen` for instance.
|
||||
|
||||
```json
|
||||
"appRoles": [
|
||||
{
|
||||
"allowedMemberTypes": [
|
||||
"User"
|
||||
],
|
||||
"description": "Grafana admin Users",
|
||||
"displayName": "Grafana Admin",
|
||||
"id": "SOME_UNIQUE_ID",
|
||||
"isEnabled": true,
|
||||
"lang": null,
|
||||
"origin": "Application",
|
||||
"value": "Admin"
|
||||
},
|
||||
{
|
||||
"allowedMemberTypes": [
|
||||
"User"
|
||||
],
|
||||
"description": "Grafana read only Users",
|
||||
"displayName": "Grafana Viewer",
|
||||
"id": "SOME_UNIQUE_ID",
|
||||
"isEnabled": true,
|
||||
"lang": null,
|
||||
"origin": "Application",
|
||||
"value": "Viewer"
|
||||
},
|
||||
{
|
||||
"allowedMemberTypes": [
|
||||
"User"
|
||||
],
|
||||
"description": "Grafana Editor Users",
|
||||
"displayName": "Grafana Editor",
|
||||
"id": "SOME_UNIQUE_ID",
|
||||
"isEnabled": true,
|
||||
"lang": null,
|
||||
"origin": "Application",
|
||||
"value": "Editor"
|
||||
}
|
||||
],
|
||||
```
|
||||
|
||||
1. Click Overview and then on **Managed application in local directory** to show the Enterprise Application details.
|
||||
|
||||
1. Click on **Users and groups** and add Users/Groups to the Grafana roles by using **Add User**.
|
||||
|
||||
## Enable Azure AD Oauth in Grafana
|
||||
|
||||
1. Add the following to the [Grafana configuration file]({{< relref "../installation/configuration.md#config-file-locations" >}}):
|
||||
|
||||
```ini
|
||||
[auth.azuread]
|
||||
name = Azure AD
|
||||
enabled = true
|
||||
allow_sign_up = true
|
||||
client_id = APPLICATION_ID
|
||||
client_secret = CLIENT_SECRET
|
||||
scopes = openid email profile
|
||||
auth_url = https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/authorize
|
||||
token_url = https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/token
|
||||
allowed_domains =
|
||||
allowed_groups =
|
||||
```
|
||||
|
||||
> Note: Ensure that the [root_url]({{< relref "../installation/configuration/#root-url" >}}) in Grafana is set in your Azure Application Reply URLs (App -> Settings -> Reply URLs)
|
||||
|
||||
### Configure allowed groups and domains
|
||||
|
||||
To limit access to authenticated users that are members of one or more groups, set `allowed_groups`
|
||||
to a comma- or space-separated list of group Object Ids. Object Id for a specific group can be found on the Azure portal: go to Azure Active Directory -> Groups. For instance, if you want to
|
||||
only give access to members of the group `example` which has Id `8bab1c86-8fba-33e5-2089-1d1c80ec267d`, set
|
||||
|
||||
```ini
|
||||
allowed_groups = 8bab1c86-8fba-33e5-2089-1d1c80ec267d
|
||||
```
|
||||
|
||||
The `allowed_domains` option limits access to the users belonging to the specific domains. Domains should be separated by space or comma.
|
||||
|
||||
```ini
|
||||
allowed_domains = mycompany.com mycompany.org
|
||||
```
|
||||
|
||||
### Team Sync (Enterprise only)
|
||||
|
||||
> Only available in Grafana Enterprise v6.7+
|
||||
|
||||
With Team Sync you can map your Azure AD groups to teams in Grafana so that your users will automatically be added to
|
||||
the correct teams.
|
||||
|
||||
Azure AD groups can be referenced by group Object Id, like `8bab1c86-8fba-33e5-2089-1d1c80ec267d`.
|
||||
|
||||
[Learn more about Team Sync]({{< relref "team-sync.md" >}})
|
||||
@@ -10,51 +10,8 @@ parent = "authentication"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# Enhanced LDAP Integration
|
||||
# Enhanced LDAP integration
|
||||
|
||||
> 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 "ldap.md" >}}).
|
||||
|
||||
The enhanced LDAP integration adds additional functionality on top of the [existing LDAP integration]({{< relref "ldap.md" >}}).
|
||||
|
||||
## LDAP Group Synchronization for Teams
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/team_members_ldap.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" >}}
|
||||
|
||||
With the enhanced LDAP integration it's possible to setup synchronization between LDAP groups and teams. This enables LDAP users which are members
|
||||
of certain LDAP groups to automatically be added/removed as members to certain teams in Grafana. Currently the synchronization will only happen every
|
||||
time a user logs in, unless Grafana 6.3 (or later) is used with active background synchronization enabled.
|
||||
|
||||
Grafana keeps track of all synchronized users in teams and you can see which users have been synchronized from LDAP in the team members list, see `LDAP` label in screenshot.
|
||||
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 "team-sync.md">}})
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
## Active LDAP Synchronization
|
||||
|
||||
> Only available in Grafana Enterprise v6.3+
|
||||
|
||||
In the open source version of Grafana, user data from LDAP will be synchronized only during the login process when authenticating using LDAP.
|
||||
|
||||
With this feature you can configure Grafana to actively sync users with LDAP server(s) in the background. Role and team membership will be updated, removed users will be disabled and logged out. Only users that have logged into Grafana at least once will be synchronized.
|
||||
|
||||
```bash
|
||||
[auth.ldap]
|
||||
...
|
||||
|
||||
# You can use the Cron syntax or several predefined schedulers -
|
||||
# @yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 *
|
||||
# @monthly | Run once a month, midnight, first of month | 0 0 0 1 * *
|
||||
# @weekly | Run once a week, midnight between Sat/Sun | 0 0 0 * * 0
|
||||
# @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * *
|
||||
# @hourly | Run once an hour, beginning of hour | 0 0 * * * *
|
||||
sync_cron = "0 0 1 * * *" # This is default value (At 1 am every day)
|
||||
# This cron expression format uses 6 space-separated fields (including seconds), for example
|
||||
# sync_cron = "* */10 * * * *"
|
||||
# This will run the LDAP Synchronization every 10th minute, which is also the minimal interval between the grafana sync times i.e. you cannot set it for every 9th minute
|
||||
|
||||
# You can also disable active LDAP synchronization
|
||||
active_sync_enabled = true # enabled by default
|
||||
```
|
||||
> Enhanced LDAP integration is only available in Grafana Enterprise. For more information, refer to [Enhanced LDAP integration]({{< relref "../enterprise/enhanced_ldap.md" >}}) in [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
@@ -50,7 +50,7 @@ Grafana will also attempt to do role mapping through OAuth as described below.
|
||||
|
||||
> Only available in Grafana v6.5+.
|
||||
|
||||
Check for the presence of an role using the [JMESPath](http://jmespath.org/examples.html) specified via the `role_attribute_path` configuration option. The JSON used for the path lookup is the HTTP response obtained from querying the UserInfo endpoint specified via the `api_url` configuration option. The result after evaluating the `role_attribute_path` JMESPath expression needs to be a valid Grafana role, i.e. `Viewer`, `Editor` or `Admin`.
|
||||
Check for the presence of a role using the [JMESPath](http://jmespath.org/examples.html) specified via the `role_attribute_path` configuration option. The JSON used for the path lookup is the HTTP response obtained from querying the UserInfo endpoint specified via the `api_url` configuration option. The result after evaluating the `role_attribute_path` JMESPath expression needs to be a valid Grafana role, i.e. `Viewer`, `Editor` or `Admin`.
|
||||
|
||||
See [JMESPath examples](#jmespath-examples) for more information.
|
||||
|
||||
@@ -105,7 +105,7 @@ allowed_organizations =
|
||||
then:
|
||||
3. Under the SSO tab on the Grafana App details page you'll find the Client ID and Client Secret.
|
||||
|
||||
Your OneLogin Domain will match the url you use to access OneLogin.
|
||||
Your OneLogin Domain will match the URL you use to access OneLogin.
|
||||
|
||||
Configure Grafana as follows:
|
||||
|
||||
@@ -223,7 +223,7 @@ allowed_organizations =
|
||||
|
||||
## JMESPath examples
|
||||
|
||||
To ease configuring a proper JMESPath expression you can test/evaluate expression with a custom payload at http://jmespath.org/.
|
||||
To ease configuration of a proper JMESPath expression, you can test/evaluate expressions with custom payloads at http://jmespath.org/.
|
||||
|
||||
### Role mapping
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ To enable the GitHub OAuth2 you must register your application with GitHub. GitH
|
||||
|
||||
## Configure GitHub OAuth application
|
||||
|
||||
You need to create a GitHub OAuth application (you find this under the GitHub
|
||||
You need to create a GitHub OAuth application (you will find this under the GitHub
|
||||
settings page). When you create the application you will need to specify
|
||||
a callback URL. Specify this as callback:
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ weight = 5
|
||||
|
||||
# GitLab OAuth2 Authentication
|
||||
|
||||
To enable the GitLab OAuth2 you must register an application in GitLab. GitLab will generate a client ID and secret key for you to use.
|
||||
To enable GitLab OAuth2 you must register the application in GitLab. GitLab will generate a client ID and secret key for you to use.
|
||||
|
||||
## Create GitLab OAuth keys
|
||||
|
||||
@@ -73,7 +73,7 @@ who can authenticate on GitLab will be able to login on your Grafana instance;
|
||||
if you use the public `gitlab.com`, it means anyone in the world would be able
|
||||
to login on your Grafana instance.
|
||||
|
||||
You can can however limit access to only members of a given group or list of
|
||||
You can limit access to only members of a given group or list of
|
||||
groups by setting the `allowed_groups` option.
|
||||
|
||||
### allowed_groups
|
||||
@@ -125,5 +125,4 @@ 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 "enhanced_ldap.md" >}})
|
||||
|
||||
[Learn more about Team Sync]({{< relref "team-sync.md" >}})
|
||||
|
||||
@@ -18,8 +18,8 @@ To enable the Google OAuth2 you must register your application with Google. Goog
|
||||
|
||||
First, you need to create a Google OAuth Client:
|
||||
|
||||
1. Go to https://console.developers.google.com/apis/credentials
|
||||
2. Click the 'Create Credentials' button, then click 'OAuth Client ID' in the menu that drops down
|
||||
1. Go to https://console.developers.google.com/apis/credentials.
|
||||
2. Click **Create Credentials**, then click **OAuth Client ID** in the drop-down menu
|
||||
3. Enter the following:
|
||||
- Application Type: Web Application
|
||||
- Name: Grafana
|
||||
|
||||
@@ -16,6 +16,8 @@ weight = 2
|
||||
The LDAP integration in Grafana allows your Grafana users to login with their LDAP credentials. You can also specify mappings between LDAP
|
||||
group memberships and Grafana Organization user roles.
|
||||
|
||||
> [Enhanced LDAP authentication]({{< relref "../enterprise/enhanced_ldap.md" >}}) is available in [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
## Supported LDAP Servers
|
||||
|
||||
Grafana uses a [third-party LDAP library](https://github.com/go-ldap/ldap) under the hood that supports basic LDAP v3 functionality.
|
||||
@@ -189,16 +191,27 @@ Setting | Required | Description | Default
|
||||
Users with nested/recursive group membership must have an LDAP server that supports `LDAP_MATCHING_RULE_IN_CHAIN`
|
||||
and configure `group_search_filter` in a way that it returns the groups the submitted username is a member of.
|
||||
|
||||
To configure `group_search_filter`:
|
||||
* You can set `group_search_base_dns` to specify where the matching groups are defined.
|
||||
* If you do not use `group_search_base_dns`, then the previously defined `search_base_dns` is used.
|
||||
|
||||
**Active Directory example:**
|
||||
|
||||
Active Directory groups store the Distinguished Names (DNs) of members, so your filter will need to know the DN for the user based only on the submitted username.
|
||||
Multiple DN templates can be searched by combining filters with the LDAP OR-operator. Examples:
|
||||
Multiple DN templates can be searched by combining filters with the LDAP OR-operator. Two examples:
|
||||
|
||||
```bash
|
||||
group_search_filter = "(member:1.2.840.113556.1.4.1941:=%s)"
|
||||
group_search_base_dns = ["DC=mycorp,DC=mytld"]
|
||||
group_search_filter_user_attribute = "dn"
|
||||
```
|
||||
|
||||
```bash
|
||||
group_search_filter = "(member:1.2.840.113556.1.4.1941:=CN=%s,[user container/OU])"
|
||||
group_search_filter = "(|(member:1.2.840.113556.1.4.1941:=CN=%s,[user container/OU])(member:1.2.840.113556.1.4.1941:=CN=%s,[another user container/OU]))"
|
||||
group_search_filter_user_attribute = "cn"
|
||||
```
|
||||
|
||||
For more information on AD searches see [Microsoft's Search Filter Syntax](https://docs.microsoft.com/en-us/windows/desktop/adsi/search-filter-syntax) documentation.
|
||||
|
||||
For troubleshooting, by changing `member_of` in `[servers.attributes]` to "dn" it will show you more accurate group memberships when [debug is enabled](#troubleshooting).
|
||||
|
||||
@@ -128,7 +128,7 @@ oauth_auto_login = true
|
||||
|
||||
### Hide sign-out menu
|
||||
|
||||
Set to the option detailed below to true to hide sign-out menu link. Useful if you use an auth proxy.
|
||||
Set the option detailed below to true to hide sign-out menu link. Useful if you use an auth proxy.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
|
||||
@@ -10,169 +10,8 @@ parent = "authentication"
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
# SAML Authentication
|
||||
# SAML authentication
|
||||
|
||||
> SAML Authentication integration is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
The SAML authentication integration allows your Grafana users to log in by using an external SAML Identity Provider (IdP). To enable this, Grafana becomes a Service Provider (SP) in the authentication flow, interacting with the IdP to exchange user information.
|
||||
|
||||
> Only available in Grafana v6.3+
|
||||
|
||||
The SAML authentication integration allows your Grafana users to log in by
|
||||
using an external SAML Identity Provider (IdP). To enable this, Grafana becomes
|
||||
a Service Provider (SP) in the authentication flow, interacting with the IdP to
|
||||
exchange user information.
|
||||
|
||||
## Supported SAML
|
||||
|
||||
The SAML single-sign-on (SSO) standard is varied and flexible. Our implementation contains the subset of features needed to provide a smooth authentication experience into Grafana.
|
||||
|
||||
> Should you encounter any problems with our implementation, please don't hesitate to contact us.
|
||||
|
||||
At the moment of writing, Grafana supports:
|
||||
|
||||
1. From the Service Provider (SP) to the Identity Provider (IdP)
|
||||
|
||||
- `HTTP-POST` binding
|
||||
- `HTTP-Redirect` binding
|
||||
|
||||
2. From the Identity Provider (IdP) to the Service Provider (SP)
|
||||
|
||||
- `HTTP-POST` binding
|
||||
|
||||
3. In terms of security, we currently support signed and encrypted Assertions. However, signed or encrypted requests are not supported.
|
||||
|
||||
4. In terms of initiation, only SP-initiated requests are supported. There's no support for IdP-initiated request.
|
||||
|
||||
## Set up SAML Authentication
|
||||
|
||||
To use the SAML integration, you need to enable SAML in the [main config file]({{< relref "../installation/configuration.md" >}}).
|
||||
|
||||
```bash
|
||||
[auth.saml]
|
||||
# Defaults to false. If true, the feature is enabled
|
||||
enabled = true
|
||||
|
||||
# Base64-encoded public X.509 certificate. Used to sign requests to the IdP
|
||||
certificate =
|
||||
|
||||
# Path to the public X.509 certificate. Used to sign requests to the IdP
|
||||
certificate_path =
|
||||
|
||||
# Base64-encoded private key. Used to decrypt assertions from the IdP
|
||||
private_key =
|
||||
|
||||
# Path to the private key. Used to decrypt assertions from the IdP
|
||||
private_key_path =
|
||||
|
||||
# Base64-encoded IdP SAML metadata XML. Used to verify and obtain binding locations from the IdP
|
||||
idp_metadata =
|
||||
|
||||
# Path to the SAML metadata XML. Used to verify and obtain binding locations from the IdP
|
||||
idp_metadata_path =
|
||||
|
||||
# URL to fetch SAML IdP metadata. Used to verify and obtain binding locations from the IdP
|
||||
idp_metadata_url =
|
||||
|
||||
# Duration, since the IdP issued a response and the SP is allowed to process it. Defaults to 90 seconds
|
||||
max_issue_delay =
|
||||
|
||||
# Duration, for how long the SP's metadata should be valid. Defaults to 48 hours
|
||||
metadata_valid_duration =
|
||||
|
||||
# Friendly name or name of the attribute within the SAML assertion to use as the user's name
|
||||
assertion_attribute_name = displayName
|
||||
|
||||
# Friendly name or name of the attribute within the SAML assertion to use as the user's login handle
|
||||
assertion_attribute_login = mail
|
||||
|
||||
# Friendly name or name of the attribute within the SAML assertion to use as the user's email
|
||||
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" >}})
|
||||
- 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
|
||||
|
||||
An example working configuration example looks like:
|
||||
|
||||
```bash
|
||||
[auth.saml]
|
||||
enabled = true
|
||||
certificate_path = "/path/to/certificate.cert"
|
||||
private_key_path = "/path/to/private_key.pem"
|
||||
metadata_path = "/my/metadata.xml"
|
||||
max_issue_delay = 90s
|
||||
metadata_valid_duration = 48h
|
||||
assertion_attribute_name = displayName
|
||||
assertion_attribute_login = mail
|
||||
assertion_attribute_email = mail
|
||||
```
|
||||
|
||||
And here is a comprehensive list of the options:
|
||||
|
||||
| Setting | Required | Description | Default |
|
||||
| ----------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------- | ------------- |
|
||||
| `enabled` | No | Whenever SAML authentication is allowed | `false` |
|
||||
| `certificate` or `certificate_path` | Yes | Base64-encoded string or Path for the SP X.509 certificate | |
|
||||
| `private_key` or `private_key_path` | Yes | Base64-encoded string or Path for the SP private key | |
|
||||
| `idp_metadata` or `idp_metadata_path` or `idp_metadata_url` | Yes | Base64-encoded string, Path or URL for the IdP SAML metadata XML | |
|
||||
| `max_issue_delay` | No | Duration, since the IdP issued a response and the SP is allowed to process it | `90s` |
|
||||
| `metadata_valid_duration` | No | Duration, for how long the SP's metadata should be valid | `48h` |
|
||||
| `assertion_attribute_name` | No | Friendly name or name of the attribute within the SAML assertion to use as the user's name | `displayName` |
|
||||
| `assertion_attribute_login` | No | Friendly name or name of the attribute within the SAML assertion to use as the user's login handle | `mail` |
|
||||
| `assertion_attribute_email` | No | Friendly name or name of the attribute within the SAML assertion to use as the user's email | `mail` |
|
||||
|
||||
### Cert and Private Key
|
||||
|
||||
The SAML SSO standard uses asymmetric encryption to exchange information between the SP (Grafana) and the IdP. To perform such encryption, you need a public part and a private part. In this case, the X.509 certificate provides the public part, while the private key provides the private part.
|
||||
|
||||
Grafana supports two ways of specifying both the `certificate` and `private_key`. Without a suffix (e.g. `certificate=`), the configuration assumes you've supplied the base64-encoded file contents. However, if specified with the `_path` suffix (e.g. `certificate_path=`) Grafana will treat it as a file path and attempt to read the file from the file system.
|
||||
|
||||
### IdP Metadata
|
||||
|
||||
Expanding on the above, we'll also need the public part from our IdP for message verification. The SAML IdP metadata XML tells us where and how we should exchange the user information.
|
||||
|
||||
Currently, we support three ways of specifying the IdP metadata. Without a suffix `idp_metadata=` Grafana assumes base64-encoded XML file contents, with the `_path` suffix assumes a file path and attempts to read the file from the file system and with the `_url` suffix assumes an URL and attempts to load the metadata from the given location.
|
||||
|
||||
### Max Issue Delay
|
||||
|
||||
Prevention of SAML response replay attacks and internal clock skews between the SP (Grafana), and the IdP is covered. You can set a maximum amount of time between the IdP issuing a response and the SP (Grafana) processing it.
|
||||
|
||||
The configuration options is specified as a duration e.g. `max_issue_delay = 90s` or `max_issue_delay = 1h`
|
||||
|
||||
### Metadata valid duration
|
||||
|
||||
As an SP, our metadata is likely to expire at some point, e.g. due to a certificate rotation or change of location binding. Grafana allows you to specify for how long the metadata should be valid. Leveraging the standard's `validUntil` field, you can tell consumers until when your metadata is going to be valid. The duration is computed by adding the duration to the current time.
|
||||
|
||||
The configuration option is specified as a duration e.g. `metadata_valid_duration = 48h`
|
||||
|
||||
## Identity Provider (IdP) registration
|
||||
|
||||
For the SAML integration to work correctly, you need to make the IdP aware of the SP.
|
||||
|
||||
The integration provides two key endpoints as part of Grafana:
|
||||
|
||||
- The `/saml/metadata` endpoint. Which contains the SP's metadata. You can either download and upload it manually or make the IdP request it directly from the endpoint. Some providers name it Identifier or Entity ID.
|
||||
|
||||
- The `/saml/acs` endpoint. Which is intended to receive the ACS (Assertion Customer Service) callback. Some providers name it SSO URL or Reply URL.
|
||||
|
||||
## Assertion mapping
|
||||
|
||||
During the SAML SSO authentication flow, we receive the ACS (Assertion Customer Service) callback. The callback contains all the relevant information of the user under authentication embedded in the SAML response. Grafana parses the response to create (or update) the user within its internal database.
|
||||
|
||||
For Grafana to map the user information, it looks at the individual attributes within the assertion. You can think of these attributes as Key/Value pairs (although, they contain more information than that).
|
||||
|
||||
Grafana provides configuration options that let you modify which keys to look at for these values. The data we need to create the user in Grafana is Name, Login handle, and email.
|
||||
|
||||
An example is `assertion_attribute_name = "givenName"` where Grafana looks within the assertion for an attribute with a friendly name or name of `givenName`. Both, the friendly name (e.g. `givenName`) or the name (e.g. `urn:oid:2.5.4.42`) can be used interchangeably as the value for the configuration option.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
To troubleshoot and get more log info enable saml debug logging in the [main config file]({{< relref "../installation/configuration.md" >}}).
|
||||
|
||||
```bash
|
||||
[log]
|
||||
filters = saml.auth:debug
|
||||
```
|
||||
> SAML authentication integration is only available in Grafana Enterprise v6.3 or later. For more information, refer to [SAML authentication]({{< relref "../enterprise/saml.md" >}}) in [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
@@ -10,38 +10,17 @@ parent = "authentication"
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
# Team Sync
|
||||
|
||||
> 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" >}}
|
||||
# Team sync
|
||||
|
||||
With the Team Sync it's possible to setup synchronization between your auth providers teams and teams in Grafana. This enables LDAP or GitHub OAuth users which are members
|
||||
of certain teams/groups to automatically be added/removed as members to certain teams in Grafana. Currently the synchronization will only happen every
|
||||
time a user logs in, unless LDAP is used together with active background synchronization that was added in Grafana 6.3.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/team_members_ldap.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" >}}
|
||||
|
||||
Grafana keeps track of all synchronized users in teams and you can see which users have been synchronized in the team members list, see `LDAP` label in screenshot.
|
||||
This mechanism allows Grafana to remove an existing synchronized user from a team when its LDAP group membership (for example) 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.
|
||||
This mechanism allows Grafana to remove an existing synchronized user from a team when its LDAP group membership (for example) 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.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
### Enable synchronization for a team
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/team_add_external_group.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" >}}
|
||||
|
||||
1. Navigate to Configuration / Teams.
|
||||
2. Select a team.
|
||||
3. Select the External group sync tab and click on the `Add group` button.
|
||||
4. Insert the value of the group you want to sync with. This becomes what Grafana denominates as a `GroupID`.
|
||||
|
||||
- Using LDAP as an example, this is the LDAP distinguished name (DN) of LDAP group you want to synchronize with the team.
|
||||
- Using Auth Proxy as an example, this is the value we receive as part of the custom `Groups` header.
|
||||
|
||||
5. Click on `Add group` button to save.
|
||||
|
||||
### Supported Providers
|
||||
|
||||
* [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">}})
|
||||
> Team Sync is only available in Grafana Enterprise. For more information, refer to [Team sync]({{< relref "../enterprise/team-sync.md" >}}) in [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
@@ -7,6 +7,3 @@ name = "Contribute"
|
||||
identifier = "contribute"
|
||||
weight = 20
|
||||
+++
|
||||
|
||||
### Contribute info
|
||||
|
||||
48
docs/sources/developers/developer-resources.md
Normal file
48
docs/sources/developers/developer-resources.md
Normal file
@@ -0,0 +1,48 @@
|
||||
+++
|
||||
title = "Developer resources"
|
||||
description = "Resources for Grafana developers"
|
||||
keywords = ["grafana", "documentation", "developers", "resources"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Grafana resources"
|
||||
identifier = "Developer resources"
|
||||
weight = 30
|
||||
+++
|
||||
|
||||
# Developer resources
|
||||
|
||||
This page lists resources for developers who want to contribute to the Grafana software ecosystem or build plugins for Grafana.
|
||||
|
||||
##
|
||||
General resources
|
||||
These resources are useful for all developers.
|
||||
|
||||
* [Contributing to Grafana](https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md): Start here to learn how you can contribute your skills to make Grafana even better.
|
||||
|
||||
* [Developer guide](https://github.com/grafana/grafana/blob/master/contribute/developer-guide.md): A guide to help you get started developing Grafana software, includes instructions for how to configure Grafana for development.
|
||||
|
||||
* [Contributing to documentation](https://github.com/grafana/grafana/blob/master/contribute/documentation.md): A guide to help you contribute to Grafana documentation, includes links to beginner-friendly issues.
|
||||
|
||||
* [Architecture guides](https://github.com/grafana/grafana/tree/master/contribute/architecture): These guides explain Grafana’s background architecture.
|
||||
|
||||
* [Create a pull request](https://github.com/grafana/grafana/blob/master/contribute/create-pull-request.md): A guide for new contributors about how to create your first Grafana pull request.
|
||||
|
||||
* [REST APIs](https://grafana.com/docs/grafana/latest/http_api/) allow you to interact programmatically with the Grafana backend.
|
||||
|
||||
## Best practices and style
|
||||
|
||||
Our [style guides](https://github.com/grafana/grafana/tree/master/contribute/style-guides) outline Grafana style for frontend, backend, documentation, and more, including best practices. Please read through them before you start editing or coding!
|
||||
|
||||
* [Backend style guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/backend.md) explains how we want to write Go code in the future.
|
||||
|
||||
* [Documentation style guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/documentation-style-guide.md) applies to all documentation created for Grafana products.
|
||||
|
||||
* [End to end test framework](https://github.com/grafana/grafana/blob/master/contribute/style-guides/e2e.md) provides guidance for Grafana e2e tests.
|
||||
|
||||
* [Frontend style guide](https://github.com/grafana/grafana/blob/master/contribute/style-guides/frontend.md) provides rules and guidance on developing in React for Grafana.
|
||||
|
||||
* [Redux framework](https://github.com/grafana/grafana/blob/master/contribute/style-guides/redux.md) explains how Grafana handles Redux boilerplate code.
|
||||
|
||||
* [Styling Grafana](https://github.com/grafana/grafana/blob/master/contribute/style-guides/styling.md) expands on styling React components with Emotion.
|
||||
|
||||
* [Theming Grafana](https://github.com/grafana/grafana/blob/master/contribute/style-guides/themes.md) explains how to use themes and ThemeContext in Grafana code.
|
||||
@@ -6,69 +6,73 @@ type = "docs"
|
||||
[menu.docs]
|
||||
name = "Grafana Enterprise"
|
||||
identifier = "enterprise"
|
||||
weight = 30
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Grafana Enterprise
|
||||
|
||||
Grafana Enterprise is a commercial edition of Grafana that includes additional features not found in the open source
|
||||
version.
|
||||
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 enterprise data sources,
|
||||
advanced authentication options, more permission controls, 24x7x365 support, and training from the core Grafana team.
|
||||
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.
|
||||
|
||||
___
|
||||
[Learn more about Grafana Enterprise.](https://grafana.com/enterprise)
|
||||
|
||||
### Enhanced LDAP Integration
|
||||
## Enhanced security features
|
||||
|
||||
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" >}}).
|
||||
|
||||
### 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" >}}).
|
||||
|
||||
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">}})
|
||||
Grafana Enterprise includes integrations with more ways to authenticate your users and enhanced authorization capabilities.
|
||||
|
||||
### 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]({{< relref "datasource_permissions.md" >}}) allow you to restrict query access to only specific teams and users.
|
||||
|
||||
### Reporting
|
||||
### Enhanced LDAP integration
|
||||
|
||||
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" >}}).
|
||||
With Grafana Enterprise [enhanced LDAP]({{< relref "enhanced_ldap.md" >}}), you can set up synchronization between LDAP groups and Grafana teams.
|
||||
|
||||
### Enterprise Plugins
|
||||
### SAML authentication
|
||||
|
||||
With a Grafana Enterprise license you will get access to enterprise plugins, including:
|
||||
[SAML authentication]({{< relref "saml.md" >}}) enables your Grafana Enterprise users to authenticate with SAML.
|
||||
|
||||
* [Splunk](https://grafana.com/plugins/grafana-splunk-datasource)
|
||||
### Team sync
|
||||
|
||||
[Team sync]({{< relref "team-sync.md" >}}) allows you to set up synchronization between teams in Grafana and teams in your auth provider so that your users automatically end up in the right team.
|
||||
|
||||
Supported auth providers:
|
||||
|
||||
* [Auth Proxy]({{< relref "../auth/auth-proxy.md#team-sync-enterprise-only">}})
|
||||
* [GitHub OAuth]({{< relref "../auth/github.md#team-sync-enterprise-only" >}})
|
||||
* [GitLab OAuth]({{< relref "../auth/gitlab.md#team-sync-enterprise-only" >}})
|
||||
* [LDAP]({{< relref "enhanced_ldap.md#ldap-group-synchronization-for-teams" >}})
|
||||
|
||||
## Reporting
|
||||
|
||||
[Reporting]({{< relref "reporting.md" >}}) allows you to take any dashboard, generate a PDF report, and set up a schedule to have it emailed to whoever you choose.
|
||||
|
||||
## White labeling
|
||||
|
||||
[White labeling]({{< relref "white-labeling.md" >}}) allows you to replace the Grafana brand and logo with your own corporate brand and logo. You can also change footer links to point to your custom resources.
|
||||
|
||||
## Enterprise plugins
|
||||
|
||||
With a Grafana Enterprise license, you get access to premium plugins, including:
|
||||
|
||||
* [Amazon Timestream](https://grafana.com/plugins/grafana-timestream-datasource)
|
||||
* [AppDynamics](https://grafana.com/plugins/dlopes7-appdynamics-datasource)
|
||||
* [DataDog](https://grafana.com/plugins/grafana-datadog-datasource)
|
||||
* [Dynatrace](https://grafana.com/plugins/grafana-dynatrace-datasource)
|
||||
* [New Relic](https://grafana.com/plugins/grafana-newrelic-datasource)
|
||||
* [Amazon Timestream](https://grafana.com/plugins/grafana-timestream-datasource)
|
||||
* [Oracle Database](https://grafana.com/plugins/grafana-oracle-datasource)
|
||||
* [Splunk](https://grafana.com/plugins/grafana-splunk-datasource)
|
||||
|
||||
## Try Grafana Enterprise
|
||||
|
||||
You can learn more about Grafana Enterprise [here](https://grafana.com/enterprise). To purchase or obtain a trial license contact
|
||||
the Grafana Labs [Sales Team](https://grafana.com/contact?about=support&topic=Grafana%20Enterprise).
|
||||
To purchase or obtain a trial license contact the Grafana Labs [Sales Team](https://grafana.com/contact?about=support&topic=Grafana%20Enterprise).
|
||||
|
||||
## License file management
|
||||
|
||||
To download your Grafana Enterprise license log in to your [Grafana.com](https://grafana.com) account and go to your **Org
|
||||
Profile**. In the side menu there is a section for Grafana Enterprise licenses. At the bottom of the license
|
||||
details page there is **Download Token** link that will download the *license.jwt* file containing your license.
|
||||
To download your Grafana Enterprise license log in to your [Grafana.com](https://grafana.com) account and go to your **Org Profile**. In the side menu there is a section for Grafana Enterprise licenses. At the bottom of the license details page there is **Download Token** link that will download the *license.jwt* file containing your license.
|
||||
|
||||
Place the *license.jwt* file in Grafana's data folder. This is usually located at `/var/lib/grafana/data` on Linux systems.
|
||||
|
||||
@@ -79,7 +83,4 @@ You can also configure a custom location for the license file via the ini settin
|
||||
license_path = /company/secrets/license.jwt
|
||||
```
|
||||
|
||||
This setting can also be set via ENV variable which is useful if you're running Grafana via docker and have a custom
|
||||
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.
|
||||
|
||||
This setting can also be set with an environment variable, which is useful if you're running Grafana with Docker and have a custom volume where you have placed the license file. In this case, set the environment variable `GF_ENTERPRISE_LICENSE_PATH` to point to the location of your license file.
|
||||
|
||||
66
docs/sources/enterprise/datasource_permissions.md
Normal file
66
docs/sources/enterprise/datasource_permissions.md
Normal file
@@ -0,0 +1,66 @@
|
||||
+++
|
||||
title = "Data source permissions"
|
||||
description = "Grafana Datasource Permissions Guide "
|
||||
keywords = ["grafana", "configuration", "documentation", "datasource", "permissions", "users", "teams", "enterprise"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Datasource"
|
||||
identifier = "datasource-permissions"
|
||||
parent = "enterprise"
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
# Data source permissions
|
||||
|
||||
Data source permissions allow you to restrict access for users to query a data source. For each data source there is a permission page that allows you to enable permissions and restrict query permissions to specific **Users** and **Teams**.
|
||||
|
||||
> Only available in Grafana Enterprise.
|
||||
|
||||
## Enable data source permissions
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/datasource_permissions_enable_still.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" animated-gif="/img/docs/enterprise/datasource_permissions_enable.gif" >}}
|
||||
|
||||
By default, data sources in an organization can be queried by any user in that organization. For example, a user with the `Viewer` role can issue any possible query to a data source, not just
|
||||
queries that exist on dashboards they have access to.
|
||||
|
||||
When permissions are enabled for a data source in an organization, you restrict admin and query access for that data source to [admin users]({{< relref "../permissions/organization_roles/#admin-role" >}}) in that organization.
|
||||
|
||||
**Enable permissions for a data source:**
|
||||
|
||||
1. Navigate to **Configuration > Data Sources**.
|
||||
2. Select the data source you want to enable permissions for.
|
||||
3. On the Permissions tab, click **Enable**.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
## Allow users and teams to query a data source
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/datasource_permissions_add_still.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" animated-gif="/img/docs/enterprise/datasource_permissions_add.gif" >}}
|
||||
|
||||
After you have enabled permissions for a data source you can assign query permissions to users and teams which will allow access to query the data source.
|
||||
|
||||
**Assign query permission to users and teams:**
|
||||
|
||||
1. Navigate to **Configuration > Data Sources**.
|
||||
2. Select the data source you want to assign query permissions for.
|
||||
3. On the Permissions tab, click **Add Permission**.
|
||||
4. Select **Team** or **User**.
|
||||
5. Select the entity you want to allow query access and then click **Save**.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
## Disable data source permissions
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/datasource_permissions_disable_still.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" animated-gif="/img/docs/enterprise/datasource_permissions_disable.gif" >}}
|
||||
|
||||
If you have enabled permissions for a data source and want to return data source permissions to the default, then you can disable permissions with a click of a button.
|
||||
|
||||
Note that *all* existing permissions created for the data source will be deleted.
|
||||
|
||||
**Disable permissions for a data source:**
|
||||
|
||||
1. Navigate to **Configuration > Data Sources**.
|
||||
2. Select the data source you want to disable permissions for.
|
||||
3. On the Permissions tab, click **Disable Permissions**.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
63
docs/sources/enterprise/enhanced_ldap.md
Normal file
63
docs/sources/enterprise/enhanced_ldap.md
Normal file
@@ -0,0 +1,63 @@
|
||||
+++
|
||||
title = "Enhanced LDAP Integration"
|
||||
description = "Grafana Enhanced LDAP Integration Guide "
|
||||
keywords = ["grafana", "configuration", "documentation", "ldap", "active directory", "enterprise"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Enhanced LDAP"
|
||||
identifier = "enhanced-ldap"
|
||||
parent = "enterprise"
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
# Enhanced LDAP integration
|
||||
|
||||
The enhanced LDAP integration adds additional functionality on top of the [LDAP integration]({{< relref "../auth/ldap.md" >}}) available in the open source edition of Grafana.
|
||||
|
||||
> Enhanced LDAP integration is only available in Grafana Enterprise.
|
||||
|
||||
## LDAP group synchronization for teams
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/team_members_ldap.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" >}}
|
||||
|
||||
With enhanced LDAP integration, you can set up synchronization between LDAP groups and teams. This enables LDAP users that are members
|
||||
of certain LDAP groups to automatically be added or removed as members to certain teams in Grafana.
|
||||
|
||||
Grafana keeps track of all synchronized users in teams, and you can see which users have been synchronized from LDAP in the team members list, see `LDAP` label in screenshot.
|
||||
This mechanism allows Grafana to remove an existing synchronized user from a team when its LDAP group membership changes. This mechanism also allows 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 "team-sync.md">}})
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
## Active LDAP synchronization
|
||||
|
||||
In the open source version of Grafana, user data from LDAP is synchronized only during the login process when authenticating using LDAP.
|
||||
|
||||
With active LDAP synchronization, available in Grafana Enterprise v6.3+, you can configure Grafana to actively sync users with LDAP servers in the background. Only users that have logged into Grafana at least once are synchronized.
|
||||
|
||||
Users with updated role and team membership will need to refresh the page to get access to the new features.
|
||||
|
||||
Removed users are automatically logged out and their account disabled. These accounts are displayed in the Server Admin > Users page with a `disabled` label. Disabled users keep their custom permissions on dashboards, folders, and data sources, so if you add them back in your LDAP database, they have access to the application with the same custom permissions as before.
|
||||
|
||||
```bash
|
||||
[auth.ldap]
|
||||
...
|
||||
|
||||
# You can use the Cron syntax or several predefined schedulers -
|
||||
# @yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 *
|
||||
# @monthly | Run once a month, midnight, first of month | 0 0 0 1 * *
|
||||
# @weekly | Run once a week, midnight between Sat/Sun | 0 0 0 * * 0
|
||||
# @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * *
|
||||
# @hourly | Run once an hour, beginning of hour | 0 0 * * * *
|
||||
sync_cron = "0 0 1 * * *" # This is default value (At 1 am every day)
|
||||
# This cron expression format uses 6 space-separated fields (including seconds), for example
|
||||
# sync_cron = "* */10 * * * *"
|
||||
# This will run the LDAP Synchronization every 10th minute, which is also the minimal interval between the Grafana sync times i.e. you cannot set it for every 9th minute
|
||||
|
||||
# You can also disable active LDAP synchronization
|
||||
active_sync_enabled = true # enabled by default
|
||||
```
|
||||
|
||||
Single bind configuration (as in the [Single bind example]({{< relref "../auth/ldap.md#single-bind-example">}})) is not supported with active LDAP synchronization because Grafana needs user information to perform LDAP searches.
|
||||
54
docs/sources/enterprise/license-expiration.md
Normal file
54
docs/sources/enterprise/license-expiration.md
Normal file
@@ -0,0 +1,54 @@
|
||||
+++
|
||||
title = "License Expiration"
|
||||
description = ""
|
||||
keywords = ["grafana", "licensing"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "enterprise"
|
||||
weight = 8
|
||||
+++
|
||||
|
||||
# License expiration
|
||||
|
||||
If your license has expired most of Grafana keeps working as normal. Some enterprise functionality stops or runs with reduced functionality and Grafana displays a banner informing the users that Grafana is running on an expired license. Your Grafana admin needs to upload a new license file to restore full functionality.
|
||||
|
||||
> Replace your license as soon as possible. Running Grafana Enterprise with an expired license is unsupported and can lead to unexpected consequences.
|
||||
|
||||
## Update your license
|
||||
|
||||
1. Locate your current `license.jwt` file. In a standard installation it is stored inside Grafana's data directory, which on a typical Linux installation is in `/var/lib/grafana/data`. This location might be overridden in the ini file [Configuration](https://grafana.com/docs/grafana/latest/installation/configuration/)
|
||||
```
|
||||
[enterprise]
|
||||
license_path = /path/to/your/license.jwt
|
||||
```
|
||||
The configuration file's location may also be overridden by the `GF_ENTERPRISE_LICENSE_PATH` environment variable.
|
||||
2. Log in to your [Grafana.com](https://grafana.com/login) user and make sure you're in the correct organization in the dropdown at the top of the page.
|
||||
3. Under the **Grafana Enterprise** section in the menu bar to the left, choose licenses and download the currently valid license with which you want to run Grafana. If you cannot see a valid license on Grafana.com, please contact your account manager at Grafana Labs to renew your subscription.
|
||||
4. Replace the current `license.jwt`-file with the one you've just downloaded.
|
||||
5. Restart Grafana.
|
||||
|
||||
## Data source permissions
|
||||
|
||||
Your current data source permissions will keep working as expected, but you'll be unable to add new data source permissions until the license has been renewed.
|
||||
|
||||
## LDAP authentication
|
||||
|
||||
* LDAP synchronization is not affected by an expired license.
|
||||
* Enhanced LDAP debugging is unavailable.
|
||||
|
||||
## SAML authentication
|
||||
|
||||
SAML authentication is not affected by an expired license.
|
||||
|
||||
## Reporting
|
||||
|
||||
* You're unable to configure new reports or generate previews.
|
||||
* Scheduled reports are not generated or sent.
|
||||
|
||||
## Enterprise plugins
|
||||
|
||||
Enterprise plugins might stop working.
|
||||
|
||||
## White labeling
|
||||
|
||||
The white labeling feature is turned off, meaning that any white labeling options will not have any effect.
|
||||
63
docs/sources/enterprise/reporting.md
Normal file
63
docs/sources/enterprise/reporting.md
Normal file
@@ -0,0 +1,63 @@
|
||||
+++
|
||||
title = "Reporting"
|
||||
description = ""
|
||||
keywords = ["grafana", "reporting"]
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/administration/reports"]
|
||||
[menu.docs]
|
||||
parent = "enterprise"
|
||||
weight = 400
|
||||
+++
|
||||
|
||||
# Reporting
|
||||
|
||||
Reporting allows you to automatically generate PDFs from any of your dashboards and have Grafana email them to interested parties on a schedule.
|
||||
|
||||
> Only available in Grafana Enterprise v6.4+.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/reports_list.png" max-width="500px" class="docs-image--no-shadow" >}}
|
||||
|
||||
Any changes you make to a dashboard used in a report are reflected the next time the report is sent. For example, if you change the time range in the dashboard, then the time range in the report changes as well.
|
||||
|
||||
## Requirements
|
||||
|
||||
* SMTP must be configured for reports to be sent. Refer to [SMTP]({{< relref "../installation/configuration.md#smtp" >}}) in [Configuration]({{< relref "../installation/configuration.md" >}}) for more information.
|
||||
* The Image Renderer plugin must be installed or the remote rendering service must be set up. Refer to [Image rendering]({{< relref "../administration/image_rendering.md" >}}) for more information.
|
||||
|
||||
## Create or update a report
|
||||
|
||||
Currently only Organization Admins can create reports.
|
||||
|
||||
1. Click on the reports icon in the side menu. The Reports tab allow you to view, create, and update your reports.
|
||||
1. Enter report information. All fields are required unless otherwise indicated.
|
||||
* **Name -** Name of the report as you want it to appear in the Reports list.
|
||||
* **Choose dashboard -** Select the dashboard to generate the report from.
|
||||
* **Recipients -** Enter the emails of the people or teams that you want to receive the report.
|
||||
* **Reply to -** (optional) The address that will appear in the **Reply to** field of the email.
|
||||
* **Custom message -** (optional) Message body in the email with the report.
|
||||
1. **Preview** the report to make sure it appears as you expect. Update if necessary.
|
||||
1. Enter scheduling information. Options vary depending on the frequency you select.
|
||||
1. **Save** the report.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/reports_create_new.png" max-width="500px" class="docs-image--no-shadow" >}}
|
||||
|
||||
## Rendering configuration
|
||||
|
||||
When Grafana generates a report, it will render each panel separately and then put them together in a PDF file. You can configure the per-panel rendering request timeout and the maximum number of concurrent calls to the rendering service. These options are available in the [configuration]({{< relref "../installation/configuration.md">}}) file.
|
||||
|
||||
```ini
|
||||
[reporting]
|
||||
# Set timeout for each panel rendering request
|
||||
rendering_timeout = 10s
|
||||
# Set maximum number of concurrent calls to the rendering service
|
||||
concurrent_render_limit = 10
|
||||
```
|
||||
|
||||
## Troubleshoot reporting
|
||||
|
||||
To troubleshoot and get more log information, enable debug logging in the configuration file. Refer to [Configuration]({{< relref "../installation/configuration.md#filters" >}}) for more information.
|
||||
|
||||
```bash
|
||||
[log]
|
||||
filters = saml.auth:debug
|
||||
```
|
||||
134
docs/sources/enterprise/saml.md
Normal file
134
docs/sources/enterprise/saml.md
Normal file
@@ -0,0 +1,134 @@
|
||||
+++
|
||||
title = "SAML Authentication"
|
||||
description = "Grafana SAML Authentication"
|
||||
keywords = ["grafana", "saml", "documentation", "saml-auth"]
|
||||
aliases = ["/docs/grafana/latest/auth/saml/"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "SAML"
|
||||
parent = "authentication"
|
||||
weight = 500
|
||||
+++
|
||||
|
||||
# SAML authentication
|
||||
|
||||
SAML authentication integration allows your Grafana users to log in by using an external SAML Identity Provider (IdP). To enable this, Grafana becomes a Service Provider (SP) in the authentication flow, interacting with the IdP to exchange user information.
|
||||
|
||||
The SAML single-sign-on (SSO) standard is varied and flexible. Our implementation contains the subset of features needed to provide a smooth authentication experience into Grafana.
|
||||
|
||||
> Only available in Grafana Enterprise v6.3+. If you encounter any problems with our implementation, please don't hesitate to contact us.
|
||||
|
||||
## Supported SAML
|
||||
|
||||
Grafana supports the following SAML integrations.
|
||||
|
||||
* From the Service Provider (SP) to the Identity Provider (IdP):
|
||||
- `HTTP-POST` binding
|
||||
- `HTTP-Redirect` binding
|
||||
|
||||
* From the Identity Provider (IdP) to the Service Provider (SP):
|
||||
- `HTTP-POST` binding
|
||||
|
||||
In terms of security:
|
||||
* Grafana supports signed and encrypted assertions.
|
||||
* Grafana does not support signed or encrypted requests.
|
||||
|
||||
In terms of initiation:
|
||||
* Grafana supports SP-initiated requests.
|
||||
* Grafana does not support IdP-initiated request.
|
||||
|
||||
## Set up SAML authentication
|
||||
|
||||
The table below describes all SAML configuration options. Continue reading below for details on specific options. Like any other Grafana configuration, you can apply these options as [environment variables]({{< relref "../installation/configuration.md#configure-with-environment-variables" >}}).
|
||||
|
||||
| Setting | Required | Description | Default |
|
||||
| ----------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------- | ------------- |
|
||||
| `enabled` | No | Whether SAML authentication is allowed | `false` |
|
||||
| `certificate` or `certificate_path` | Yes | Base64-encoded string or Path for the SP X.509 certificate | |
|
||||
| `private_key` or `private_key_path` | Yes | Base64-encoded string or Path for the SP private key | |
|
||||
| `idp_metadata`, `idp_metadata_path`, or `idp_metadata_url` | Yes | Base64-encoded string, Path or URL for the IdP SAML metadata XML | |
|
||||
| `max_issue_delay` | No | Duration, since the IdP issued a response and the SP is allowed to process it | `90s` |
|
||||
| `metadata_valid_duration` | No | Duration, for how long the SP metadata is valid | `48h` |
|
||||
| `assertion_attribute_name` | No | Friendly name or name of the attribute within the SAML assertion to use as the user name | `displayName` |
|
||||
| `assertion_attribute_login` | No | Friendly name or name of the attribute within the SAML assertion to use as the user login handle | `mail` |
|
||||
| `assertion_attribute_email` | No | Friendly name or name of the attribute within the SAML assertion to use as the user email | `mail` |
|
||||
|
||||
### Enable SAML authentication
|
||||
|
||||
To use the SAML integration, in the `auth.saml` section of in the Grafana custom configuration file, set `enabled` to `true`.
|
||||
|
||||
Refer to [Configuration]({{< relref "../installation/configuration.md" >}}) for more information about configuring Grafana.
|
||||
|
||||
### Certificate and private key
|
||||
|
||||
The SAML SSO standard uses asymmetric encryption to exchange information between the SP (Grafana) and the IdP. To perform such encryption, you need a public part and a private part. In this case, the X.509 certificate provides the public part, while the private key provides the private part.
|
||||
|
||||
Grafana supports two ways of specifying both the `certificate` and `private_key`.
|
||||
* Without a suffix (`certificate` or `private_key`), the configuration assumes you've supplied the base64-encoded file contents.
|
||||
* With the `_path` suffix (`certificate_path` or `private_key_path`), then Grafana treats the value entered as a file path and attempt to read the file from the file system.
|
||||
|
||||
You can only use one form of each configuration option. Using multiple forms, such as both `certificate` and `certificate_path`, results in an error.
|
||||
|
||||
### IdP metadata
|
||||
|
||||
You also need to define the public part of the IdP for message verification. The SAML IdP metadata XML defines where and how Grafana exchanges user information.
|
||||
|
||||
Grafana supports three ways of specifying the IdP metadata.
|
||||
* Without a suffix `idp_metadata`, Grafana assumes base64-encoded XML file contents.
|
||||
* With the `_path` suffix, Grafana assumes a file path and attempts to read the file from the file system.
|
||||
* With the `_url` suffix, Grafana assumes a URL and attempts to load the metadata from the given location.
|
||||
|
||||
### Maximum issue delay
|
||||
|
||||
Prevents SAML response replay attacks and internal clock skews between the SP (Grafana) and the IdP. You can set a maximum amount of time between the IdP issuing a response and the SP (Grafana) processing it.
|
||||
|
||||
The configuration options is specified as a duration, such as `max_issue_delay = 90s` or `max_issue_delay = 1h`.
|
||||
|
||||
### Metadata valid duration
|
||||
|
||||
SP metadata is likely to expire at some point, perhaps due to a certificate rotation or change of location binding. Grafana allows you to specify for how long the metadata should be valid. Leveraging the `validUntil` field, you can tell consumers until when your metadata is going to be valid. The duration is computed by adding the duration to the current time.
|
||||
|
||||
The configuration option is specified as a duration, such as `metadata_valid_duration = 48h`.
|
||||
|
||||
### Identity provider (IdP) registration
|
||||
|
||||
For the SAML integration to work correctly, you need to make the IdP aware of the SP.
|
||||
|
||||
The integration provides two key endpoints as part of Grafana:
|
||||
|
||||
* The `/saml/metadata` endpoint, which contains the SP metadata. You can either download and upload it manually, or youmake the IdP request it directly from the endpoint. Some providers name it Identifier or Entity ID.
|
||||
* The `/saml/acs` endpoint, which is intended to receive the ACS (Assertion Customer Service) callback. Some providers name it SSO URL or Reply URL.
|
||||
|
||||
### Assertion mapping
|
||||
|
||||
During the SAML SSO authentication flow, Grafana receives the ACS callback. The callback contains all the relevant information of the user under authentication embedded in the SAML response. Grafana parses the response to create (or update) the user within its internal database.
|
||||
|
||||
For Grafana to map the user information, it looks at the individual attributes within the assertion. You can think of these attributes as Key/Value pairs (although, they contain more information than that).
|
||||
|
||||
Grafana provides configuration options that let you modify which keys to look at for these values. The data we need to create the user in Grafana is Name, Login handle, and email.
|
||||
|
||||
An example is `assertion_attribute_name = "givenName"` where Grafana looks within the assertion for an attribute with a friendly name or name of `givenName`. Both, the friendly name (e.g. `givenName`) or the name (e.g. `urn:oid:2.5.4.42`) can be used interchangeably as the value for the configuration option.
|
||||
|
||||
## Example SAML configuration
|
||||
|
||||
```bash
|
||||
[auth.saml]
|
||||
enabled = true
|
||||
certificate_path = "/path/to/certificate.cert"
|
||||
private_key_path = "/path/to/private_key.pem"
|
||||
metadata_path = "/my/metadata.xml"
|
||||
max_issue_delay = 90s
|
||||
metadata_valid_duration = 48h
|
||||
assertion_attribute_name = displayName
|
||||
assertion_attribute_login = mail
|
||||
assertion_attribute_email = mail
|
||||
```
|
||||
|
||||
## Troubleshoot SAML authentication
|
||||
|
||||
To troubleshoot and get more log information, enable SAML debug logging in the configuration file. Refer to [Configuration]({{< relref "../installation/configuration.md#filters" >}}) for more information.
|
||||
|
||||
```bash
|
||||
[log]
|
||||
filters = saml.auth:debug
|
||||
```
|
||||
51
docs/sources/enterprise/team-sync.md
Normal file
51
docs/sources/enterprise/team-sync.md
Normal file
@@ -0,0 +1,51 @@
|
||||
+++
|
||||
title = "Team sync"
|
||||
description = "Grafana Team Sync"
|
||||
keywords = ["grafana", "auth", "documentation"]
|
||||
aliases = ["/docs/grafana/latest/auth/saml/"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Team sync"
|
||||
parent = "enterprise"
|
||||
weight = 600
|
||||
+++
|
||||
|
||||
# Team sync
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/team_members_ldap.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" >}}
|
||||
|
||||
Team sync lets you set up synchronization between your auth providers teams and teams in Grafana. This enables LDAP or GitHub OAuth users who are members
|
||||
of certain teams or groups to automatically be added or removed as members of certain teams in Grafana.
|
||||
|
||||
> Only available in Grafana Enterprise.
|
||||
|
||||
Grafana keeps track of all synchronized users in teams, and you can see which users have been synchronized in the team members list, see `LDAP` label in screenshot.
|
||||
This mechanism allows Grafana to remove an existing synchronized user from a team when its 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.
|
||||
|
||||
> Currently the synchronization only happens when a user logs in, unless LDAP is used with the active background synchronization that was added in Grafana 6.3.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
## Synchronize a Grafana team with an external group
|
||||
|
||||
If you have already grouped some users into a team, then you can synchronize that team with an external group.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/team_add_external_group.png" class="docs-image--no-shadow docs-image--right" max-width= "600px" >}}
|
||||
|
||||
1. In Grafana, navigate to **Configuration > Teams**.
|
||||
1. Select a team.
|
||||
1. On the External group sync tab, and click **Add group**.
|
||||
1. Insert the value of the group you want to sync with. This becomes the Grafana `GroupID`.
|
||||
Examples:
|
||||
|
||||
- For LDAP, this is the LDAP distinguished name (DN) of LDAP group you want to synchronize with the team.
|
||||
- For Auth Proxy, this is the value we receive as part of the custom `Groups` header.
|
||||
|
||||
1. Click `Add group` to save.
|
||||
|
||||
## Supported providers
|
||||
|
||||
* [Auth Proxy]({{< relref "../auth/auth-proxy.md#team-sync-enterprise-only">}})
|
||||
* [GitHub OAuth]({{< relref "../auth/github.md#team-sync-enterprise-only" >}})
|
||||
* [GitLab OAuth]({{< relref "../auth/gitlab.md#team-sync-enterprise-only" >}})
|
||||
* [LDAP]({{< relref "enhanced_ldap.md#ldap-group-synchronization-for-teams" >}})
|
||||
77
docs/sources/enterprise/white-labeling.md
Normal file
77
docs/sources/enterprise/white-labeling.md
Normal file
@@ -0,0 +1,77 @@
|
||||
+++
|
||||
title = "White-labeling"
|
||||
description = "White-labeling"
|
||||
keywords = ["grafana", "white-labeling", "enterprise"]
|
||||
aliases = ["/docs/grafana/latest/enterprise/white-labeling/"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "White-labeling"
|
||||
parent = "enterprise"
|
||||
weight = 700
|
||||
+++
|
||||
|
||||
# White labeling
|
||||
|
||||
White labeling allows you to replace the Grafana brand and logo with your own corporate brand and logo.
|
||||
|
||||
> Only available in Grafana Enterprise v6.6+.
|
||||
|
||||
Grafana Enterprise has white labeling options in the `grafana.ini` file. As with all configuration options, you can also be set set them with environment variables.
|
||||
|
||||
You can change the following elements:
|
||||
|
||||
- Application title
|
||||
- Login background
|
||||
- Login logo
|
||||
- Side menu top logo
|
||||
- Footer and help menu links
|
||||
- Fav icon (shown in browser tab)
|
||||
|
||||
> You will have to host your logo and other images used by the white labeling feature separately. Make sure Grafana can access the URL where the assets are stored.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v66/whitelabeling_1.png" max-width="800px" caption="White labeling example" >}}
|
||||
|
||||
The configuration file in Grafana Enterprise contains the following options. Each option is defined in the file. For more information about configuring Grafana, refer to [Configuration]({{< relref "../installation/configuration.md">}}).
|
||||
|
||||
```ini
|
||||
# Enterprise only
|
||||
[white_labeling]
|
||||
# Set to your company name to override application title
|
||||
;app_title =
|
||||
|
||||
# Set to complete URL to override login logo
|
||||
;login_logo =
|
||||
|
||||
# Set to complete css background expression to override login background
|
||||
# example: login_background = url(http://www.bhmpics.com/wallpapers/starfield-1920x1080.jpg)
|
||||
;login_background =
|
||||
|
||||
# Set to complete URL to override menu logo
|
||||
;menu_logo =
|
||||
|
||||
# Set to complete URL to override fav icon (icon shown in browser tab)
|
||||
;fav_icon =
|
||||
|
||||
# Set to complete URL to override apple/ios icon
|
||||
;apple_touch_icon =
|
||||
```
|
||||
|
||||
Below is an example for how to replace the default footer and help links with two custom links.
|
||||
|
||||
```ini
|
||||
footer_links = support guides
|
||||
footer_links_support_text = Support
|
||||
footer_links_support_url = http://your.support.site
|
||||
footer_links_guides_text = Guides
|
||||
footer_links_guides_url = http://your.guides.site
|
||||
```
|
||||
|
||||
Here is the same example using environment variables instead of the custom.ini or grafana.ini file.
|
||||
|
||||
```
|
||||
GF_WHITE_LABELING_FOOTER_LINKS=support guides
|
||||
GF_WHITE_LABELING_FOOTER_LINKS_SUPPORT_TEXT=Support
|
||||
GF_WHITE_LABELING_FOOTER_LINKS_SUPPORT_URL=http://your.support.site
|
||||
GF_WHITE_LABELING_FOOTER_LINKS_GUIDES_TEXT=Guides
|
||||
GF_WHITE_LABELING_FOOTER_LINKS_GUIDES_URL=http://your.guides.site
|
||||
```
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Beginner Guides"
|
||||
description = "Beginner guides"
|
||||
title = "Features"
|
||||
description = "List of features"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Features"
|
||||
|
||||
64
docs/sources/features/dashboard/dashboards.md
Normal file
64
docs/sources/features/dashboard/dashboards.md
Normal file
@@ -0,0 +1,64 @@
|
||||
+++
|
||||
title = "Dashboard overview"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
identifier = "dashboards"
|
||||
parent = "features"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Dashboard overview
|
||||
|
||||
A *dashboard* is a set of one or more panels organized and arranged into one or more rows. Grafana ships with a variety of Panels. Grafana makes it easy to construct the right queries, and customize the display properties so that you can create the perfect dashboard for your need. Each panel can interact with data from any configured Grafana Data Source (currently Graphite, Prometheus, Elasticsearch, InfluxDB, OpenTSDB, MySQL, PostgreSQL, Microsoft SQL Server and AWS Cloudwatch).
|
||||
|
||||
## Dashboard UI
|
||||
|
||||
<img src="/img/docs/v50/dashboard_annotated.png" class="no-shadow" width="700px">
|
||||
|
||||
1. Zoom out time range
|
||||
2. Time picker dropdown. Here you can access relative time range options, auto refresh options and set custom absolute time ranges.
|
||||
3. Manual refresh button. Will cause all panels to refresh (fetch new data).
|
||||
4. Dashboard panel. You edit panels by clicking the panel title.
|
||||
5. Graph legend. You can change series colors, y-axis and series visibility directly from the legend.
|
||||
|
||||
## Dashboard header
|
||||
|
||||
Click the new Dashboard link on the right side of the Dashboard picker. You now have a blank Dashboard.
|
||||
|
||||
<img class="no-shadow" src="/img/docs/v50/top_nav_annotated.png" width="580px">
|
||||
|
||||
The image above shows you the top header for a Dashboard.
|
||||
|
||||
1. Side menubar toggle: This toggles the side menu, allowing you to focus on the data presented in the dashboard. The side menu provides access to features unrelated to a Dashboard such as Users, Organizations, and Data Sources.
|
||||
2. Dashboard dropdown: This dropdown shows you which Dashboard you are currently viewing, and allows you to easily switch to a new Dashboard. From here you can also create a new Dashboard or folder, Import existing Dashboards, and manage Dashboard playlists.
|
||||
3. Add Panel: Adds a new panel to the current Dashboard
|
||||
4. Star Dashboard: Star (or unstar) the current Dashboard. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you're interested in.
|
||||
5. Share Dashboard: Share the current dashboard by creating a link or create a static Snapshot of it. Make sure the Dashboard is saved before sharing.
|
||||
6. Save dashboard: The current Dashboard will be saved with the current Dashboard name.
|
||||
7. Settings: Manage Dashboard settings and features such as Templating and Annotations.
|
||||
|
||||
## Manage dashboards
|
||||
|
||||
The time period for the dashboard can be controlled by the [Time range controls]({{< relref "../../reference/timerange.md" >}}) in the upper right of the dashboard.
|
||||
|
||||
Dashboards can use [templating]({{< relref "../../reference/templating.md" >}}) to make them more dynamic and interactive.
|
||||
|
||||
Dashboards can use [annotations]({{< relref "../../reference/annotations.md" >}}) to display event data across panels. This can help correlate the time series data in the panel with other events.
|
||||
|
||||
Dashboards can be [shared]({{< relref "../../reference/share_dashboard.md" >}}) easily in a variety of ways.
|
||||
|
||||
Dashboards can be tagged, and the dashboard picker provides quick, searchable access to all dashboards in a particular organization.
|
||||
|
||||
## Rows
|
||||
|
||||
A *row* is a logical divider within a dashboard. It is used to group panels together.
|
||||
|
||||
Rows are always 12 “units” wide. These units are automatically scaled dependent on the horizontal resolution of your browser. You can control the relative width of panels within a row by setting their specific width.
|
||||
|
||||
We use a unit abstraction so that Grafana looks great on all screens sizes.
|
||||
|
||||
> Note: With MaxDataPoint functionality, Grafana can show you the perfect number of data points, regardless of resolution or time range.
|
||||
|
||||
Collapse a row by clicking on the row title. If you save a dashboard with a row collapsed, then it saves in that state and does not load those graphs until you expand the row.
|
||||
|
||||
Use the [repeating rows]({{< relref "../../reference/templating.md#repeating-rows" >}}) functionality to dynamically create or remove entire rows, which can be filled with panels, based on the template variables selected.
|
||||
29
docs/sources/features/datasources/add-a-data-source.md
Normal file
29
docs/sources/features/datasources/add-a-data-source.md
Normal file
@@ -0,0 +1,29 @@
|
||||
+++
|
||||
title = "Add a data source"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Add a data source"
|
||||
identifier = "add_data_source"
|
||||
parent = "features"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
# Add a data source
|
||||
|
||||
Before you create your first dashboard, you need to add your data source. Following are the list of instructions to create one.
|
||||
|
||||
1. Move your cursor to the cog on the side menu which will show you the configuration menu. If the side menu is not visible click the Grafana icon in the upper left corner. Click on **Configuration** > **Data Sources** in the side menu and you'll be taken to the data sources page
|
||||
where you can add add and edit data sources. You can also click the cog.
|
||||
{{< docs-imagebox img="/img/docs/v52/sidemenu-datasource.png" max-width="250px" class="docs-image--no-shadow">}}
|
||||
|
||||
1. Click **Add data source** and you will come to the settings page of your new data source.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v52/add-datasource.png" max-width="700px" class="docs-image--no-shadow">}}
|
||||
|
||||
1. In the **Name** box, enter a name for this data source.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v52/datasource-settings.png" max-width="700px" class="docs-image--no-shadow">}}
|
||||
|
||||
1. In the **Type**, select the type of data source. See [Supported data sources]({{< relref "../../features/datasources/#supported-data-sources/" >}}) for more information and how to configure your data source.
|
||||
|
||||
1. Click **Save & Test**.
|
||||
@@ -274,6 +274,45 @@ There are also some Grafana variables that can be used in Azure Log Analytics qu
|
||||
|
||||
- `$__interval` - Grafana calculates the minimum time grain that can be used to group by time in queries. More details on how it works [here]({{< relref "../../reference/templating.md#interval-variables" >}}). It returns a time grain like `5m` or `1h` that can be used in the bin function. E.g. `summarize count() by bin(TimeGenerated, $__interval)`
|
||||
|
||||
### Templating with Variables for Azure Log Analytics
|
||||
|
||||
Any Log Analytics query that returns a list of values can be used in the `Query` field in the Variable edit view. There is also one Grafana function for Log Analytics that returns a list of workspaces.
|
||||
|
||||
Refer to the [Variables]({{< relref "../../reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
|
||||
types of template variables.
|
||||
|
||||
| Name | Description |
|
||||
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
|
||||
| _workspaces()_ | Returns a list of workspaces for the default subscription. |
|
||||
| _workspaces(12345678-aaaa-bbbb-cccc-123456789aaa)_ | Returns a list of workspaces for the specified subscription (the parameter can be quoted or unquoted). |
|
||||
|
||||
Example variable queries:
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| Query | Description |
|
||||
| --------------------------------------------------------------------------------------- | --------------------------------------------------------- |
|
||||
| _subscriptions()_ | Returns a list of Azure subscriptions |
|
||||
| _workspaces()_ | Returns a list of workspaces for default subscription |
|
||||
| _workspaces("12345678-aaaa-bbbb-cccc-123456789aaa")_ | Returns a list of workspaces for a specified subscription |
|
||||
| _workspaces("$subscription")_ | With template variable for the subscription parameter |
|
||||
| _workspace("myWorkspace").Heartbeat \| distinct Computer_ | Returns a list of Virtual Machines |
|
||||
| _workspace("$workspace").Heartbeat \| distinct Computer_ | Returns a list of Virtual Machines with template variable |
|
||||
| _workspace("$workspace").Perf \| distinct ObjectName_ | Returns a list of objects from the Perf table |
|
||||
| _workspace("$workspace").Perf \| where ObjectName == "$object" \| distinct CounterName_ | Returns a list of metric names from the Perf table |
|
||||
|
||||
<!-- prettier-ignore-end -->
|
||||
|
||||
Example of a time series query using variables:
|
||||
|
||||
```
|
||||
Perf
|
||||
| where ObjectName == "$object" and CounterName == "$metric"
|
||||
| where TimeGenerated >= $__timeFrom() and TimeGenerated <= $__timeTo()
|
||||
| where $__contains(Computer, $computer)
|
||||
| summarize avg(CounterValue) by bin(TimeGenerated, $__interval), Computer
|
||||
| order by TimeGenerated asc
|
||||
```
|
||||
|
||||
### Azure Log Analytics Alerting
|
||||
|
||||
Not implemented yet.
|
||||
|
||||
@@ -146,6 +146,12 @@ As an example, if you want to apply arithmetic operations on a metric, you can d
|
||||
|
||||
Please note that in the case you use the expression field to reference another query, like `queryA * 2`, it will not be possible to create an alert rule based on that query.
|
||||
|
||||
### Period
|
||||
|
||||
A period is the length of time associated with a specific Amazon CloudWatch statistic. Periods are defined in numbers of seconds, and valid values for period are 1, 5, 10, 30, or any multiple of 60.
|
||||
|
||||
If the period field is left blank or set to `auto`, then it calculates automatically based on the time range. The formula used is `time range in seconds / 2000`, and then it snaps to the next higher value in an array of predefined periods `[60, 300, 900, 3600, 21600, 86400]`. By clicking `Show Query Preview` in the query editor, you can see what period Grafana used.
|
||||
|
||||
### Deep linking from Grafana panels to the CloudWatch console
|
||||
|
||||
> Only available in Grafana v6.5+.
|
||||
|
||||
22
docs/sources/features/datasources/data-sources.md
Normal file
22
docs/sources/features/datasources/data-sources.md
Normal file
@@ -0,0 +1,22 @@
|
||||
+++
|
||||
title = "Data sources overview"
|
||||
description = "Overview of data sources in Grafana"
|
||||
keywords = ["grafana", "data sources"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Data sources overview"
|
||||
parent = "datasources"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Data sources
|
||||
|
||||
Grafana can visualize, explore, and alert on data from many different databases and cloud services. Each database or service type is accessed from a *data source*. Before you can create visualizations in Grafana, you must [add a data source]({{< relref "add-a-data-source.md" >}}).
|
||||
|
||||
Each data source has a specific query editor that is customized for the features and capabilities that the particular data source exposes. The query language and capabilities of each data source are obviously very different. You can combine data from multiple data sources into a single dashboard, but each panel is connected to a specific data source that belongs to a particular organization.
|
||||
|
||||
Use the query editor to build one or more queries in your time series database. The panel instantly updates, allowing you to effectively explore your data in real time and build a perfect query for that particular panel.
|
||||
|
||||
You can use [template variables]({{< relref "../../reference/templating.md" >}}) in the query editor within the queries themselves. This provides a powerful way to explore data dynamically based on the templating variables selected on the dashboard.
|
||||
|
||||
Grafana allows you to reference queries in the query editor by the row that they’re on. If you add a second query to graph, you can reference the first query by typing in #A. This provides an easy and convenient way to build compound queries.
|
||||
@@ -215,7 +215,7 @@ For InfluxDB, you need to enter a query like the one in the example above. The `
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
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).
|
||||
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]({{< relref "../../administration/provisioning/#datasources" >}}).
|
||||
|
||||
Here are some provisioning examples for this data source.
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ Query: query_result(topk(5, sum(rate(http_requests_total[$__range])) by (instanc
|
||||
Regex: /"([^"]+)"/
|
||||
```
|
||||
|
||||
Populate a variable with the instances having a certain state over the time range shown in the dashboard, using the more precise `$__range_s`:
|
||||
Populate a variable with the instances having a certain state over the time range shown in the dashboard, using `$__range_s`:
|
||||
|
||||
```
|
||||
Query: query_result(max_over_time(<metric>[${__range_s}s]) != <state>)
|
||||
|
||||
@@ -131,6 +131,12 @@ It is also possible to choose fixed time intervals to group by, like `1h` or `1d
|
||||
|
||||
Group by resource or metric labels to reduce the number of time series and to aggregate the results by a group by. E.g. Group by instance_name to see an aggregated metric for a Compute instance.
|
||||
|
||||
#### Metadata labels
|
||||
|
||||
Resource metadata labels contains information to uniquely identify a resource in Google cloud. Metadata labels are only returned in the time series response if they're part of the **Group By** segment in the time series request. There's no API for retrieving metadata labels, so it's not possible to populate the group by dropdown with the metadata labels that are available for the selected service and metric. However, the **Group By** field dropdown comes with a pre-defined list of common system labels.
|
||||
|
||||
User labels cannot be pre-defined, but it's possible to enter them manually in the **Group By** field. If a metadata label, user label or system label is included in the **Group By** segment, then you can create filters based on it and expand its value on the **Alias** field.
|
||||
|
||||
### Alias Patterns
|
||||
|
||||
The Alias By field allows you to control the format of the legend keys. The default is to show the metric name and labels. This can be long and hard to read. Using the following patterns in the alias field, you can format the legend key the way you want it.
|
||||
@@ -151,6 +157,8 @@ In the Group By dropdown, you can see a list of metric and resource labels for a
|
||||
| ------------------------ | -------------------------------- | -------------------------------- | ---------------- |
|
||||
| `{{metric.label.xxx}}` | returns the metric label value | `{{metric.label.instance_name}}` | `grafana-1-prod` |
|
||||
| `{{resource.label.xxx}}` | returns the resource label value | `{{resource.label.zone}}` | `us-east1-b` |
|
||||
| `{{metadata.system_labels.xxx}}` | returns the meta data system label value | `{{metadata.system_labels.name}}` | `grafana` |
|
||||
| `{{metadata.user_labels.xxx}}` | returns the meta data user label value | `{{metadata.user_labels.tag}}` | `production` |
|
||||
|
||||
Example Alias By: `{{metric.type}} - {{metric.labels.instance_name}}`
|
||||
|
||||
|
||||
@@ -9,36 +9,43 @@ weight = 20
|
||||
+++
|
||||
|
||||
|
||||
# Grafana TestData
|
||||
# Grafana TestData DB
|
||||
|
||||
The purpose of this data sources is to make it easier to create fake data for any panel.
|
||||
Using `Grafana TestData` you can build your own time series and have any panel render it.
|
||||
The purpose of this data source is to make it easier to create fake data for any panel.
|
||||
Using `TestData DB` you can build your own time series and have any panel render it.
|
||||
This make is much easier to verify functionally since the data can be shared very easily.
|
||||
|
||||
## Enable
|
||||
|
||||
`Grafana TestData` is not enabled by default. To enable it, first navigate to the Plugins section, found in your Grafana main menu. Click the Apps tabs in the Plugins section and select the Grafana TestData App. (Or navigate to http://your_grafana_instance/plugins/testdata/edit to go directly there). Finally click the enable button to enable.
|
||||
The `TestData DB` data source is not enabled by default. To enable it:
|
||||
|
||||
1. In the **Configuration** menu (small gear on the left side of the screen, click **Data Sources**.
|
||||
2. Click **Add Data Source**.
|
||||
3. Search and click `TestData DB`.
|
||||
4. Click **Save & Test** to enable it.
|
||||
|
||||
## Create mock data.
|
||||
|
||||
Once `Grafana TestData` is enabled you can use it as a data source in any metric panel.
|
||||
Once `TestData DB` is enabled, you can use it as a data source in any metric panel.
|
||||
|
||||

|
||||
|
||||
## CSV
|
||||
|
||||
The comma separated values scenario is the most powerful one since it lets you create any kind of graph you like.
|
||||
Once you provided the numbers `Grafana TestData` will distribute them evenly based on the time range of your query.
|
||||
Once you provided the numbers, `TestData DB` distributes them evenly based on the time range of your query.
|
||||
|
||||

|
||||
|
||||
## Dashboards
|
||||
|
||||
`Grafana TestData` also contains some dashboards with example. `/plugins/testdata/edit`
|
||||
`TestData DB` also contains some dashboards with examples.
|
||||
1. Click **Configuration** > **Data Sources** > **TestData DB** > **Dashboards**.
|
||||
1. **Import** the **Simple Streaming Example** dashboard.
|
||||
|
||||
### Commit updates to the dashboards
|
||||
|
||||
If you want to submit a change to one of the current dashboards bundled with `Grafana TestData` you have to update the revision property.
|
||||
To submit a change to one of the current dashboards bundled with `TestData DB`, update the revision property.
|
||||
Otherwise the dashboard will not be updated automatically for other Grafana users.
|
||||
|
||||
## Using test data in issues
|
||||
|
||||
@@ -84,7 +84,11 @@ Along with metrics, Explore allows you to investigate your logs with the followi
|
||||
- [InfluxDB](../datasources/influxdb)
|
||||
- [Elasticsearch](../datasources/elasticsearch)
|
||||
|
||||
### Deduping
|
||||
### Visualization options
|
||||
|
||||
You can customize how logs are displayed and select which columns are shown.
|
||||
|
||||
#### Deduping
|
||||
|
||||
Log data can be very repetitive and Explore can help by hiding duplicate log lines. There are a few different deduplication algorithms that you can use:
|
||||
|
||||
@@ -92,18 +96,23 @@ Log data can be very repetitive and Explore can help by hiding duplicate log lin
|
||||
* `numbers` Matches on the line after stripping out numbers (durations, IP addresses etc.).
|
||||
* `signature` The most aggressive deduping - strips all letters and numbers, and matches on the remaining whitespace and punctuation.
|
||||
|
||||
### Timestamp and Local time
|
||||
#### Time
|
||||
|
||||
There are some other check boxes under the logging graph apart from the Deduping options.
|
||||
Shows or hides the time column. This is the timestamp associated with the log line as reported from the data source.
|
||||
|
||||
* Timestamp: shows/hides the Timestamp column
|
||||
* Local time: shows/hides the Local time column
|
||||
#### Unique labels
|
||||
|
||||
Shows or hides the unique labels column that includes only non-common labels. All common labels are displayed above.
|
||||
|
||||
#### Wrap lines
|
||||
|
||||
Set this to True if you want the display to use line wrapping. If set to False, it will result in horizontal scrolling.
|
||||
|
||||
### Labels and Parsed fields
|
||||
|
||||
Each log row has an extendable area with its labels and parsed fields, for more robust interaction. For all labels we have added the ability to filter for (positive filter) and filter out (negative filter) selected labels. Each field or label also has a stats icon to display ad-hoc statistics in relation to all displayed logs.
|
||||
Each log row has an extendable area with its labels and parsed fields, for more robust interaction. For all labels we have added the ability to filter for (positive filter) and filter out (negative filter) selected labels. Each field or label also has a stats icon to display ad-hoc statistics in relation to all displayed logs.
|
||||
|
||||
### Loki-specific Features
|
||||
### Loki-specific features
|
||||
|
||||
As mentioned, one of the log integrations is for the new open source log aggregation system from Grafana Labs - [Loki](https://github.com/grafana/loki). Loki is designed to be very cost effective, as it does not index the contents of the logs, but rather a set of labels for each log stream. The logs from Loki are queried in a similar way to querying with label selectors in Prometheus. It uses labels to group log streams which can be made to match up with your Prometheus labels. Read more about Grafana Loki [here](https://github.com/grafana/loki) or the Grafana Labs hosted variant: [Grafana Cloud Logs](https://grafana.com/loki).
|
||||
|
||||
|
||||
124
docs/sources/features/navigation-links.md
Normal file
124
docs/sources/features/navigation-links.md
Normal file
@@ -0,0 +1,124 @@
|
||||
+++
|
||||
title = "Navigation links"
|
||||
description = ""
|
||||
keywords = ["grafana", "linking", "create links", "link panels", "link dashboards", "navigate"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "features"
|
||||
weight = 9
|
||||
+++
|
||||
|
||||
# Navigation links
|
||||
|
||||
You can use links to navigate between commonly used dashboards. Links let you create shortcuts to other dashboards, panels, and even external websites.
|
||||
|
||||
Grafana supports three types of links: Dashboard Links, Panel Links, and Data Links. They are all available from your dashboard.
|
||||
|
||||
{{< docs-imagebox img="/static/assets/img/blog/dashboard_links.png" max-width="800px" caption="Links Supported in Grafana" >}}
|
||||
|
||||
## Which link should you use?
|
||||
|
||||
Start by figuring out how you're currently navigating between dashboards. If you're often jumping between a set of dashboards and struggling to find the same context in each, links can help optimize your workflow.
|
||||
|
||||
The next step is to figure out which link type is right for your workflow. Even though all the link types in Grafana are used to create shortcuts to other dashboards or external websites, they work in different contexts.
|
||||
|
||||
- If the link relates to most if not all of the panels in the dashboard, use a *dashboard link*.
|
||||
- If you want to drill down into specific panels, use a *panel link*.
|
||||
- If you want to drill down into a specific series, or even a single measurement, use a *data link*.
|
||||
|
||||
## Dashboard links
|
||||
|
||||
When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you don’t have to worry whether the person you send the link to is looking at the right data.
|
||||
|
||||
Dashboard links can also be used as shortcuts to external systems, such as submitting [a GitHub issue with the current dashboard name](https://github.com/grafana/grafana/issues/new?title=Dashboard%3A%20HTTP%20Requests).
|
||||
|
||||
To see an example of dashboard links in action, check out [this demo](https://play.grafana.org/d/rUpVRdamz/dashboard-links-with-variables?orgId=1).
|
||||
|
||||
Once you've added a dashboard link, it appears in the upper right corner of your dashboard.
|
||||
|
||||
### Add links to dashboards
|
||||
|
||||
Add a links to other dashboards at the top of your current dashboard.
|
||||
|
||||
1. While viewing the dashboard you want to link, click the gear at the top of the screen to open **Dashboard settings**.
|
||||
1. Click **Links** and then click **Add Dashboard Link** or **New**.
|
||||
1. In **Type**, select **dashboards**.
|
||||
1. Select link options:
|
||||
- **With tags** – Enter tags to limit the linked dashboards to only the ones with the tags you enter. Otherwise, Grafana includes links to all other dashboards.
|
||||
- **As dropdown** – If you are linking to lots of dashboards, then you probably want to select this option and add an optional title to the dropdown. Otherwise, Grafana displays the dashboard links side by side across the top of your dashboard.
|
||||
- **Time range** – Select this option to include the dashboard time range in the link. When the user clicks the link, the linked dashboard opens with the indicated time range already set. **Example:** https://play.grafana.org/d/000000010/annotations?orgId=1&from=now-3h&to=now
|
||||
- **Variable values** – Select this option to include template variables currently used as query parameters in the link. When the user clicks the link, any matching templates in the linked dashboard are set to the values from the link. **Example:** https://play.grafana.org/d/000000074/alerting?var-app=backend&var-server=backend_01&var-server=backend_03&var-interval=1h
|
||||
- **Open in new tab** – Select this option if you want the dashboard link to open in a new tab or window.
|
||||
1. Click **Add**.
|
||||
|
||||
### Add a link to a URL
|
||||
|
||||
Add a link to a URL at the top of your current dashboard. You can link to any available URL, including dashboards, panels, or external sites. You can even [control the time range](https://grafana.com/docs/grafana/latest/reference/timerange/#controlling-time-range-using-url) to ensure the user is zoomed in on the right data in Grafana.
|
||||
|
||||
1. While viewing the dashboard you want to link, click the gear at the top of the screen to open **Dashboard settings**.
|
||||
1. Click **Links** and then click **Add Dashboard Link** or **New**.
|
||||
1. In **Type**, select **link**.
|
||||
1. Select link options:
|
||||
- **Url** – Enter the URL you want to link to. Depending on the target, you might want to include field values. **Example:** https://github.com/grafana/grafana/issues/new?title=Dashboard%3A%20HTTP%20Requests
|
||||
- **Title** – Enter the title you want the link to display.
|
||||
- **Tooltip** – Enter the tooltip you want the link to display when the user hovers their mouse over it.
|
||||
- **Icon** – Choose the icon you want displayed with the link.
|
||||
- **Time range** – Select this option to include the dashboard time range in the link. When the user clicks the link, the linked dashboard opens with the indicated time range already set. **Example:** https://play.grafana.org/d/000000010/annotations?orgId=1&from=now-3h&to=now
|
||||
- **Variable values** – Select this option to include template variables currently used as query parameters in the link. When the user clicks the link, any matching templates in the linked dashboard are set to the values from the link. **Example:** https://play.grafana.org/d/000000074/alerting?var-app=backend&var-server=backend_01&var-server=backend_03&var-interval=1h
|
||||
- **Open in new tab** – Select this option if you want the dashboard link to open in a new tab or window.
|
||||
1. Click **Add**.
|
||||
|
||||
### Update a dashboard link
|
||||
|
||||
To change or update an existing dashboard link, follow this procedure.
|
||||
|
||||
1. In Dashboard Settings, on the Links tab, click the existing link that you want to edit.
|
||||
1. Change the settings and then click **Update**.
|
||||
|
||||
### Delete a dashboard link
|
||||
|
||||
To delete an existing dashboard link, click the red **X** next to the existing link that you want to delete.
|
||||
|
||||
## Panel links
|
||||
|
||||
Each panel can have its own set of links that are shown in the upper left corner of the panel. You can link to any available URL, including dashboards, panels, or external sites. You can even [control the time range](https://grafana.com/docs/grafana/latest/reference/timerange/#controlling-time-range-using-url) to ensure the user is zoomed in on the right data in Grafana.
|
||||
|
||||
Click the icon on the top left corner of a panel to see available panel links. To see an example of panel links in action, check out [this demo](https://play.grafana.org/d/000000156/dashboard-with-panel-link?orgId=1).
|
||||
|
||||
### Add a panel link
|
||||
|
||||
1. Hover your cursor over the panel that you want to add a link to and then press `e`. Or click the dropdown arrow next to the panel title and then click **Edit**.
|
||||
2. Open the **General** tab in the panel settings and then scroll down to the Panel links section.
|
||||
3. Click **Add link**.
|
||||
4. Enter a **Title**.
|
||||
5. If you want the link to open in a new tab, then select **Open in a new tab**.
|
||||
6. Enter the **URL** you want to link to.
|
||||
You can even add one of the template variables that are available. Press Ctrl+Space in the **URL** field to see the available variables. By adding template variables to your panel ink, the link sends the user to the right context, with the relevant variables already set.
|
||||
|
||||
### Update or delete a panel link
|
||||
|
||||
On the panel settings General tab, in the Panel links section, find the panel link that you want to make changes to or delete. Make any necessary changes, or click the **X** to the right of the title to delete the link.
|
||||
|
||||
## Data links
|
||||
|
||||
Data links allow you to provide more granular context to your links. You can create links that include the series name or even the value under the cursor. For example, if your visualization showed four servers, you could add a data link to one or two of them.
|
||||
|
||||
Click directly on the panel to see the data link. It appears on the context menu under **Add annotation**.
|
||||
|
||||
To see an example of data links in action, check out [this demo](https://play.grafana.org/d/ZvPm55mWk/new-features-in-v6-3?orgId=1&fullscreen&panelId=27).
|
||||
|
||||
## Add a data link to a panel
|
||||
|
||||
Currently, data links are only supported in the Graph, Stat, Gauge, and Bar Gauge visualizations.
|
||||
|
||||
1. Hover your cursor over the panel that you want to add a link to and then press `e`. Or click the dropdown arrow next to the panel title and then click **Edit**.
|
||||
1. Open the **Visualization** tab in the panel settings and then scroll down to the Data links section.
|
||||
1. Click **Add link**.
|
||||
1. Enter a **Title**.
|
||||
1. If you want the link to open in a new tab, then select **Open in a new tab**.
|
||||
1. Enter the **URL** you want to link to.
|
||||
You can even add one of the template variables that are available. Press Ctrl+Space in the **URL** field to see the available variables. By adding template variables to your panel ink, the link sends the user to the right context, with the relevant variables already set.
|
||||
|
||||
### Update or delete a panel link
|
||||
|
||||
On the panel settings General tab, in the Panel links section, find the panel link that you want to make changes to or delete. Make any necessary changes, or click the **X** to the right of the title to delete the link.
|
||||
60
docs/sources/features/panels/bar_gauge.md
Normal file
60
docs/sources/features/panels/bar_gauge.md
Normal file
@@ -0,0 +1,60 @@
|
||||
+++
|
||||
draft = "false"
|
||||
date = "2020-02-19"
|
||||
title = "Bar gauge panel"
|
||||
description = "Bar gauge panel docs"
|
||||
keywords = ["grafana", "enter", "keywords", "here"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Bar gauge panel
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v66/bar_gauge_cover.png" max-width="1025px" caption="Stat panel" >}}
|
||||
|
||||
This panel can show one or more bar gauges depending on how many series, rows or columns your query returns. The
|
||||
thresholds control the bar & value color.
|
||||
|
||||
## Display options
|
||||
|
||||
* Show
|
||||
* `Calculation` - Show a calculated value like min or max based on all rows.
|
||||
* `All values` - Show a separate stat for every row.
|
||||
* Calc
|
||||
* Specify calculation / reducer function. Since this panel is designed to only show a single value Grafana needs to
|
||||
know how to reduce a fields many values to a single value.
|
||||
* Orientation
|
||||
* `Horizontal` - The bar will stretch horizontally from left to right.
|
||||
* `Vertical` - The bar will stretch vertically from top to bottom.
|
||||
* Mode
|
||||
* `Gradient` - The threshold levels define a gradient.
|
||||
* `Retro LCD` - The gauge is split up in small cells that are lit or unlit.
|
||||
* `Basic` - Single color based on the matching threshold.
|
||||
|
||||
Retro LCD example:
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v66/bar_gauge_lcd.png" max-width="1025px" caption="Stat panel" >}}
|
||||
|
||||
### Field
|
||||
|
||||
* `Title` - When multiple stats are shown this field controls the title in each stat. By default this is the series name
|
||||
and field name. You can use expressions like `${__series.name}` or `${__field.name}` to use only series name or field
|
||||
name in title or `${__cell_2}` to refer to other fields (2 being field/column with index 2).
|
||||
* `Min` - The minimum value, leave blank for auto calculation based on all series & fields. Used by Graph to set y-axis min.
|
||||
* `Max` - The maximum value, leave blank for auto calculation based on all series & fields. Used by Graph to set y-axis max.
|
||||
* `Decimals` - Number of decimals to render value with. Leave empty for Grafana to automatically figure out the best
|
||||
number of decimals to use.
|
||||
|
||||
### Thresholds
|
||||
|
||||
Define thresholds that will set the color of either the value or the background depending on your `Color` display option. The
|
||||
thresholds are automatically sorted from lowest value to highest. The `Base` value represents minus infinity.
|
||||
|
||||
|
||||
### Value mappings
|
||||
|
||||
Map a number or a range of numbers to a text value.
|
||||
|
||||
### Data links
|
||||
|
||||
Data links allow you add dynamic URL links to your visualizations, [read more on data links]({{< relref "../../reference/datalinks.md" >}}).
|
||||
|
||||
50
docs/sources/features/panels/gauge.md
Normal file
50
docs/sources/features/panels/gauge.md
Normal file
@@ -0,0 +1,50 @@
|
||||
+++
|
||||
draft = "false"
|
||||
date = "2020-02-19"
|
||||
title = "Gauge panel"
|
||||
description = "Gauge panel docs"
|
||||
keywords = ["grafana", "enter", "keywords", "here"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Gauge panel
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v66/gauge_panel_cover.png" max-width="1025px" caption="Stat panel" >}}
|
||||
|
||||
The Gauge is a single value panel that can repeat a gauge for every series, column or row.
|
||||
|
||||
## Display options
|
||||
|
||||
* Show
|
||||
* `Calculation` - Show a calculated value like min or max based on all rows.
|
||||
* `All values` - Show a separate stat for every row.
|
||||
* Calc
|
||||
* Specify calculation / reducer function. Since this panel is designed to only show a single value Grafana needs to
|
||||
know how to reduce a fields many values to a single value.
|
||||
* Labels - Controls if thresholds values are shown.
|
||||
* Markers - Controls if a thresholds band is shown outside the inner gauge value band.
|
||||
|
||||
## Field
|
||||
|
||||
* `Title` - When multiple stats are shown this field controls the title in each stat. By default this is the series name
|
||||
and field name. You can use expressions like `${__series.name}` or `${__field.name}` to use only series name or field
|
||||
name in title or `${__cell_2}` to refer to other fields (2 being field/column with index 2).
|
||||
* `Min` - The minimum value, leave blank for auto calculation based on all series & fields. Used by Graph to set y-axis min.
|
||||
* `Max` - The maximum value, leave blank for auto calculation based on all series & fields. Used by Graph to set y-axis max.
|
||||
* `Decimals` - Number of decimals to render value with. Leave empty for Grafana to automatically figure out the best
|
||||
number of decimals to use.
|
||||
|
||||
### Thresholds
|
||||
|
||||
Define thresholds that will set the color of either the value or the background depending on your `Color` display option. The
|
||||
thresholds are automatically sorted from lowerst value to highest. The `Base` value represents minus infinity.
|
||||
|
||||
|
||||
### Value mappings
|
||||
|
||||
Map a number or a range of numbers to a text value.
|
||||
|
||||
### Data links
|
||||
|
||||
Data links allow you add dynamic URL links to your visualizations, [read more on data links]({{< relref "../../reference/datalinks.md" >}}).
|
||||
|
||||
@@ -189,62 +189,9 @@ The time range tab allows you to override the dashboard time range and specify a
|
||||
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" >}}).
|
||||
|
||||
### Data link
|
||||
### Data links
|
||||
|
||||
> Only available in Grafana v6.3+.
|
||||
{{< docs-imagebox img="/img/docs/v66/datalinks_graph.png" max-width="1025px" caption="Data links" >}}
|
||||
|
||||
Data link allows adding dynamic links to the visualization. Those links can link to either other dashboard or to an external URL.
|
||||
Data links allow you add dynamic URL links to your visualizations, [read more on data links]({{< relref "../../reference/datalinks.md" >}}).
|
||||
|
||||
{{< docs-imagebox img="/img/docs/data_link.png" max-width= "800px" >}}
|
||||
|
||||
Data link is defined by title, url and a setting whether or not it should be opened in a new window.
|
||||
|
||||
**Title** is a human readable label for the link that will be displayed in the UI. The link itself is accessible in the graph's context menu when user **clicks on a single data point**:
|
||||
|
||||
{{< docs-imagebox img="/img/docs/data_link_tooltip.png" max-width= "800px" >}}
|
||||
|
||||
**URL** field allows the URL configuration for a given link. Apart from regular query params it also supports built-in variables and dashboard variables that you can choose from
|
||||
available suggestions:
|
||||
|
||||
{{< docs-imagebox img="/img/docs/data_link_typeahead.png" max-width= "800px" >}}
|
||||
|
||||
|
||||
#### Built-in variables
|
||||
|
||||
> These variables changed in 6.4 so if you have an older version of Grafana please use the version picker to select
|
||||
docs for an older version of Grafana.
|
||||
|
||||
``__url_time_range`` - current dashboard's time range (i.e. ``?from=now-6h&to=now``)
|
||||
``__from`` - current dashboard's time range from value
|
||||
``__to`` - current dashboard's time range to value
|
||||
|
||||
#### Series variables
|
||||
Series specific variables are available under ``__series`` namespace:
|
||||
|
||||
``__series.name`` - series name to the URL
|
||||
|
||||
``__series.labels.<LABEL>`` - label's value to the URL. If your label contains dots use ``__series.labels["<LABEL>"]`` syntax
|
||||
|
||||
#### Field variables
|
||||
Field specific variables are available under ``__field`` namespace:
|
||||
|
||||
``__field.name`` - field name to the URL
|
||||
|
||||
#### Value variables
|
||||
Value specific variables are available under ``__value`` namespace:
|
||||
|
||||
``__value.time`` - value's timestamp (Unix ms epoch) to the URL (i.e. ``?time=1560268814105``)
|
||||
|
||||
``__value.raw`` - raw value
|
||||
|
||||
``__value.numeric`` - numeric representation of a value
|
||||
|
||||
``__value.text`` - text representation of a value
|
||||
|
||||
``__value.calc`` - calculation name if the value is result of calculation
|
||||
|
||||
|
||||
#### Template variables
|
||||
|
||||
When linking to another dashboard that uses template variables, you can use ``var-myvar=${myvar}`` syntax (where ``myvar`` is a name of template variable)
|
||||
to use current dashboard's variable value. If you want to add all of the current dashboard's variables to the URL use ``__all_variables`` variable.
|
||||
|
||||
@@ -28,12 +28,11 @@ Note that you can scroll inside the panel in case the datasource returns more li
|
||||
|
||||
To limit the number of lines rendered, you can use the queries-wide **Max data points** setting. If it is not set, the datasource will usually enforce a limit.
|
||||
|
||||
## Visualization Options
|
||||
## Visualization options
|
||||
|
||||
### Columns
|
||||
|
||||
1. **Time**: Show/hide the time column. This is the timestamp associated with the log line as reported from the datasource.
|
||||
1. **Time**: Show/hide the time column. This is the timestamp associated with the log line as reported from the data source.
|
||||
2. **Order**: Set to **Ascending** to show the oldest log lines first.
|
||||
|
||||
3. **Wrap lines**: The wrapped-line option is set as a default, unwrapped setting results in horizontal scrolling.
|
||||
4. **Unique labels**: Show/hide the unique labels column which includes only non-common labels.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
46
docs/sources/features/panels/panels.md
Normal file
46
docs/sources/features/panels/panels.md
Normal file
@@ -0,0 +1,46 @@
|
||||
+++
|
||||
title = "Panel overview"
|
||||
keywords = ["grafana", "panel", "documentation", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Panels"
|
||||
parent = "panels"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Panel overview
|
||||
|
||||
The *panel* is the basic visualization building block in Grafana. Each panel has a Query Editor specific to the data source selected in the panel. The query editor allows you to extract the perfect visualization to display on the panel.
|
||||
|
||||
There are a wide variety of styling and formatting options for each panel. Panels can be dragged and dropped and rearranged on the Dashboard. They can also be resized.
|
||||
|
||||
Panels like the [Graph]({{< relref "graph.md" >}}) panel allow you to graph as many metrics and series as you want. Other panels like [Singlestat]({{< relref "singlestat.md" >}}) require a reduction of a single query into a single number.
|
||||
|
||||
Panels can be made more dynamic with [Dashboard Templating]({{< relref "../../reference/templating.md" >}}) variable strings within the panel configuration. The template can include queries to your data source configured in the Query Editor.
|
||||
|
||||
Panels can be [shared]({{< relref "../../reference/share_panel.md" >}}) easily in a variety of ways.
|
||||
|
||||
## Adding and editing graphs and panels
|
||||
|
||||

|
||||
|
||||
1. You add panels by clicking the Add panel icon on the top menu.
|
||||
1. To edit the graph you click on the graph title to open the panel menu, then `Edit`.
|
||||
1. This should take you to the `Metrics` tab. In this tab you should see the editor for your default data source.
|
||||
|
||||
When you click the `Metrics` tab, you are presented with a Query Editor that is specific to the Panel Data Source. Use the Query Editor to build your queries and Grafana will visualize them in real time.
|
||||
|
||||
## Move panels
|
||||
|
||||
You can drag and drop panels by clicking and holding the panel title, then dragging it to its new location. You can also easily resize panels by clicking the (-) and (+) icons.
|
||||
|
||||

|
||||
|
||||
## Tips and shortcuts
|
||||
|
||||
* Click the graph title and in the dropdown menu quickly change span or duplicate the panel.
|
||||
* Click the Save icon in the menu to save the dashboard with a new name.
|
||||
* Click the Save icon in the menu and then advanced to export the dashboard to json file, or set it as your default dashboard.
|
||||
* Click the colored icon in the legend to select series color.
|
||||
* Click series name in the legend to hide series.
|
||||
* Ctrl/Shift/Meta + click legend name to hide other series.
|
||||
@@ -66,19 +66,6 @@ Sparklines are a great way of seeing the historical data related to the summary
|
||||
|
||||
> ***Pro-tip:*** Reduce the opacity on fill colors for nice looking panels.
|
||||
|
||||
### Gauge
|
||||
|
||||
Gauges gives a clear picture of how high a value is in it's context. It's a great way to see if a value is close to the thresholds. The gauge uses the colors set in the color options.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v45/singlestat-gauge-options.png" max-width="500px" class="docs-image--right docs-image--no-shadow">}}
|
||||
|
||||
1. **Show**: The show checkbox will toggle whether the gauge is shown in the panel. When unselected, only the Singlestat value will appear.
|
||||
2. **Min/Max**: This sets the start and end point for the gauge.
|
||||
3. **Threshold Labels**: Check if you want to show the threshold labels. Thresholds are set in the color options.
|
||||
4. **Threshold Markers**: Check if you want to have a second meter showing the thresholds.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
### Value/Range to text mapping
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v45/singlestat-value-mapping.png" class="docs-image--right docs-image--no-shadow">}}
|
||||
@@ -106,3 +93,9 @@ To fix your singlestat panel:
|
||||
|
||||
- Do you have one query?
|
||||
- Solution: This likely means your query is returning multiple series. You will want to reduce this down to a single series. This can be accomplished in many ways, depending on your data source. Some common practices include summing the series, averaging or any number of other functions. Consult the documentation for your data source for additional information.
|
||||
|
||||
### Gauge
|
||||
|
||||
The Gauge feature in this panel is deprecated, please use the new [Gauge panel]({{< relref
|
||||
"../../features/panels/gauge.md" >}}) instead.
|
||||
|
||||
|
||||
79
docs/sources/features/panels/stat.md
Normal file
79
docs/sources/features/panels/stat.md
Normal file
@@ -0,0 +1,79 @@
|
||||
+++
|
||||
draft = "false"
|
||||
date = "2020-02-19"
|
||||
title = "Stat panel"
|
||||
description = "Stat panel documentation"
|
||||
keywords = ["grafana", "docs", "stat panel"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# Stat panel
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v66/stat_panel_dark3.png" max-width="1025px" caption="Stat panel" >}}
|
||||
|
||||
The stat panel is designed to show a big single stat values with an optional graph sparkline. You can control
|
||||
background or value color using thresholds.
|
||||
|
||||
## Display options
|
||||
|
||||
* Show
|
||||
* `Calculation` - Show a calculated value like min or max based on all rows.
|
||||
* `All values` - Show a separate stat for every row.
|
||||
* Calc
|
||||
* Specify calculation / reducer function. Since this panel is designed to only show a single value Grafana needs to
|
||||
know how to reduce a fields many values to a single value.
|
||||
* Orientation
|
||||
* If your query returns multiple series or you have set **Show** to `All values` then the visualization will repeat for every series or row. This orientation option will control in what direction it will repeat.
|
||||
* Color
|
||||
* `Value` - Color the value and graph area only.
|
||||
* `Background` - Color the background.
|
||||
** Graph
|
||||
* `None` - Disable the graph / sparkline
|
||||
* `Area graph` - Show area graph below value. This requires that your query returns a time column.
|
||||
** Justify
|
||||
* `Auto` - If only a single value is shown (no repeat) the value is centered. If multiple series or rows the value is
|
||||
* left aligned.
|
||||
* `Center` - Force center alignment.
|
||||
|
||||
|
||||
### Auto layout
|
||||
|
||||
The panel will try to auto adjust layout depending on width & height. The graph will also hide if the panel becomes
|
||||
to small.
|
||||
|
||||
Example of stacked layout where graph is automatically hidden due to each stat being too small:
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v66/stat_panel_stacked.png" max-width="405px" caption="Stat panel" >}}
|
||||
|
||||
### Color mode
|
||||
|
||||
Example of value color mode:
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v66/stat_panel_dark4.png" max-width="900px" caption="Stat panel" >}}
|
||||
|
||||
### Field
|
||||
|
||||
* `Title` - When multiple stats are shown this field controls the title in each stat. By default this is the series name
|
||||
and field name. You can use expressions like `${__series.name}` or `${__field.name}` to use only series name or field
|
||||
name in title or `${__cell_2}` to refer to other fields (2 being field/column with index 2).
|
||||
* `Min` - The minimum value, leave blank for auto calculation based on all series & fields. Used by graph/sparkline
|
||||
* (when enabled) to set y-axis min.
|
||||
* `Max` - The maximum value, leave blank for auto calculation based on all series & fields. Used by graph/sparkline
|
||||
* (when enabled) to set y-axis max.
|
||||
* `Decimals` - Number of decimals to render value with. Leave empty for Grafana to automatically figure out the best
|
||||
number of decimals to use.
|
||||
|
||||
### Thresholds
|
||||
|
||||
Define thresholds that will set the color of either the value or the background depending on your `Color` display option. The
|
||||
thresholds are automatically sorted from lowerst value to highest. The `Base` value represents minus infinity.
|
||||
|
||||
|
||||
### Value mappings
|
||||
|
||||
Map a number or a range of numbers to a text value.
|
||||
|
||||
### Data links
|
||||
|
||||
Data links allow you add dynamic URL links to your visualizations, [read more on data links]({{< relref "../../reference/datalinks.md" >}}).
|
||||
|
||||
@@ -11,44 +11,8 @@ weight = 8
|
||||
|
||||
# Reporting
|
||||
|
||||
> Reporting is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
> Only available in Grafana v6.4+
|
||||
|
||||
Reporting allows you to generate PDFs from any of your Dashboards and have them sent out to interested parties on a schedule.
|
||||
Reporting allows you to generate PDFs from any of your dashboards and have them sent out to interested parties on a schedule.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/reports_list.png" max-width="500px" class="docs-image--no-shadow" >}}
|
||||
|
||||
## Dashboard as a Report
|
||||
|
||||
With Reports there are a few things to keep in mind, most importantly, any changes you make to the Dashboard used in a report will be reflected in the report. If you change the time range in the Dashboard the time range will be the same in the report as well.
|
||||
|
||||
## Setup
|
||||
|
||||
> SMTP must be configured for reports to be sent
|
||||
|
||||
|
||||
### Rendering
|
||||
|
||||
> Reporting requires the [rendering plugin]({{< relref "../administration/image_rendering.md#grafana-image-renderer-plugin" >}}).
|
||||
|
||||
Reporting with the built-in image rendering is not supported. We recommend installing the image renderer plugin.
|
||||
|
||||
## Usage
|
||||
|
||||
{{< docs-imagebox img="/img/docs/enterprise/reports_create_new.png" max-width="500px" class="docs-image--no-shadow" >}}
|
||||
|
||||
Currently only Organisation Admins can create reports. To get to report click on the reports icon in the side menu. This will allow you to list, create and update your reports.
|
||||
|
||||
| Setting | Description |
|
||||
| --------------|------------------------------------------------------------------ |
|
||||
| Name | name of the Report |
|
||||
| Dashboard | what dashboard to generate the report from |
|
||||
| Recipients | emails of the people who will receive this report |
|
||||
| ReplyTo | your email address, so that the recipient can respond |
|
||||
| Message | message body in the email with the report |
|
||||
| Schedule | how often do you want the report generated and sent |
|
||||
|
||||
## Debugging errors
|
||||
|
||||
If you have problems with the reporting feature you can enable debug logging by switching the logger to debug (`filters = report:debug`). Learn more about making configuration changes [here]({{< relref "../installation/configuration.md#filters" >}}).
|
||||
> Reporting is only available in Grafana Enterprise, v6.4 or later. For more information, refer to [Reporting]({{< relref "../enterprise/reporting.md" >}}) in [Grafana Enterprise]({{< relref "../enterprise" >}}).
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
+++
|
||||
title = "Keyboard Shortcuts"
|
||||
title = "Keyboard shortcuts"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "features"
|
||||
@@ -8,46 +8,11 @@ weight = 7
|
||||
|
||||
# Keyboard shortcuts
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v50/shortcuts.png" max-width="20rem" class="docs-image--right" >}}
|
||||
Grafana has a number of keyboard shortcuts available. Press Shift + `?` on your keyboard to display all keyboard shortcuts available in your version of Grafana.
|
||||
|
||||
Grafana v4 introduces a number of really powerful keyboard shortcuts. You can now focus a panel
|
||||
by hovering over it with your mouse. With a panel focused you can simple hit `e` to toggle panel
|
||||
edit mode, or `v` to toggle fullscreen mode. `p` `r` removes the panel. `p` `s` opens share
|
||||
modal.
|
||||
**Popular shortcuts:**
|
||||
|
||||
Hit `?` on your keyboard to open the shortcuts help modal.
|
||||
|
||||
### Global
|
||||
|
||||
- `g` `h` Go to Home Dashboard
|
||||
- `g` `p` Go to Profile
|
||||
- `s` `o` Open search
|
||||
- `s` `s` Open search with starred filter
|
||||
- `s` `t` Open search in tags view
|
||||
- `esc` Exit edit/setting views
|
||||
|
||||
### Dashboard
|
||||
|
||||
- `mod+s` Save dashboard
|
||||
- `mod+h` Hide row controls
|
||||
- `d` `r` Refresh all panels
|
||||
- `d` `s` Dashboard settings
|
||||
- `d` `v` Toggle in-active / view mode
|
||||
- `d` `k` Toggle kiosk mode (hides top nav)
|
||||
- `d` `E` Expand all rows
|
||||
- `d` `C` Collapse all rows
|
||||
- `mod+o` Toggle shared graph crosshair
|
||||
|
||||
### Focused Panel
|
||||
- `e` Toggle panel edit view
|
||||
- `v` Toggle panel fullscreen view
|
||||
- `p` `s` Open Panel Share Modal
|
||||
- `p` `d` Duplicate Panel
|
||||
- `p` `r` Remove Panel
|
||||
|
||||
### Time Range
|
||||
- `t` `z` Zoom out time range
|
||||
- `t` Move time range back
|
||||
- `t` Move time range forward
|
||||
|
||||
mod = Ctrl on Windows or Linux and Cmd key on macOS
|
||||
* Ctrl+S saves the current dashboard.
|
||||
* Ctrl+F opens the dashboard finder / search.
|
||||
* Ctrl+H hides all controls (good for tv displays).
|
||||
* Press Escape to exit graph when in fullscreen or edit mode.
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
+++
|
||||
title = "Basic Concepts"
|
||||
description = "Grafana intro and concept guide"
|
||||
keywords = ["grafana", "intro", "guide", "concepts"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Basic concepts"
|
||||
identifier = "basic_concepts"
|
||||
parent = "guides"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
# Basic concepts
|
||||
|
||||
This document is an introduction to basic concepts in Grafana. Use it as a starting point to get familiar with core Grafana features.
|
||||
|
||||
## Dashboard
|
||||
|
||||
The *dashboard* is where it all comes together. A dashboard is a set of one or more panels organized and arranged into one or more rows.
|
||||
|
||||
The time period for the dashboard can be controlled by the [Time range controls]({{< relref "../reference/timerange.md" >}}) in the upper right of the dashboard.
|
||||
|
||||
Dashboards can use [templating]({{< relref "../reference/templating.md" >}}) to make them more dynamic and interactive.
|
||||
|
||||
Dashboards can use [annotations]({{< relref "../reference/annotations.md" >}}) to display event data across panels. This can help correlate the time series data in the panel with other events.
|
||||
|
||||
Dashboards can be [shared]({{< relref "../reference/share_dashboard.md" >}}) easily in a variety of ways.
|
||||
|
||||
Dashboards can be tagged, and the dashboard picker provides quick, searchable access to all dashboards in a particular organization.
|
||||
|
||||
## Data source
|
||||
|
||||
Grafana can visualize, explore, and alert on data from many different databases and cloud services. Each database or service type is accessed from a *data source*.
|
||||
|
||||
Each data source has a specific query editor that is customized for the features and capabilities that the particular data source exposes. The query language and capabilities of each data source are obviously very different. You can combine data from multiple data sources into a single dashboard, but each panel is connected to a specific data source that belongs to a particular organization.
|
||||
|
||||
Refer to the [Data sources section]({{< relref "../features/datasources" >}}) for a list of data sources that Grafana officially supports.
|
||||
|
||||
## Organization
|
||||
|
||||
Grafana supports multiple *organizations* in order to support a wide variety of deployment models, including using a single Grafana instance to provide service to multiple potentially untrusted organizations.
|
||||
|
||||
In most cases, Grafana is deployed with a single organization.
|
||||
|
||||
Each organization can have one or more data sources.
|
||||
|
||||
All dashboards are owned by a particular organization.
|
||||
|
||||
> Note: Most metric databases do not provide per-user series authentication. This means that organization data sources and dashboards are available to all users in a particular organization.
|
||||
|
||||
Refer to [Organization roles]({{< relref "../permissions/organization_roles.md" >}}) for more information.
|
||||
|
||||
## Panel
|
||||
|
||||
The *panel* is the basic visualization building block in Grafana. Each panel has a Query Editor specific to the data source selected in the panel. The query editor allows you to extract the perfect visualization to display on the panel.
|
||||
|
||||
There are a wide variety of styling and formatting options for each panel. Panels can be dragged and dropped and rearranged on the Dashboard. They can also be resized.
|
||||
|
||||
Panels like the [Graph]({{< relref "../features/panels/graph.md" >}}) panel allow you to graph as many metrics and series as you want. Other panels like [Singlestat]({{< relref "../features/panels/singlestat.md" >}}) require a reduction of a single query into a single number.
|
||||
|
||||
Panels can be made more dynamic with [Dashboard Templating]({{< relref "../reference/templating.md" >}}) variable strings within the panel configuration. The template can include queries to your data source configured in the Query Editor.
|
||||
|
||||
Panels can be [shared]({{< relref "../reference/share_panel.md" >}}) easily in a variety of ways.
|
||||
|
||||
## Query editor
|
||||
|
||||
The *query editor* exposes capabilities of your data source and allows you to query the metrics that it contains.
|
||||
|
||||
Use the query editor to build one or more queries in your time series database. The panel instantly updates, allowing you to effectively explore your data in real time and build a perfect query for that particular panel.
|
||||
|
||||
You can use [template variables]({{< relref "../reference/templating.md" >}}) in the query editor within the queries themselves. This provides a powerful way to explore data dynamically based on the templating variables selected on the dashboard.
|
||||
|
||||
Grafana allows you to reference queries in the query editor by the row that they’re on. If you add a second query to graph, you can reference the first query by typing in #A. This provides an easy and convenient way to build compound queries.
|
||||
|
||||
## Row
|
||||
|
||||
A *row* is a logical divider within a dashboard. It is used to group panels together.
|
||||
|
||||
Rows are always 12 “units” wide. These units are automatically scaled dependent on the horizontal resolution of your browser. You can control the relative width of panels within a row by setting their specific width.
|
||||
|
||||
We use a unit abstraction so that Grafana looks great on all screens sizes.
|
||||
|
||||
> Note: With MaxDataPoint functionality, Grafana can show you the perfect number of data points, regardless of resolution or time range.
|
||||
|
||||
Collapse a row by clicking on the row title. If you save a dashboard with a row collapsed, then it saves in that state and does not load those graphs until you expand the row.
|
||||
|
||||
Use the [repeating rows]({{< relref "../reference/templating.md#repeating-rows" >}}) functionality to dynamically create or remove entire rows, which can be filled with panels, based on the template variables selected.
|
||||
|
||||
## User
|
||||
|
||||
A *user* is a named account in Grafana. A user can belong to one or more organizations and can be assigned different levels of privileges through roles.
|
||||
|
||||
Grafana supports a wide variety of internal and external ways for users to authenticate themselves. These include from its own integrated database, from an external SQL server, or from an external LDAP server.
|
||||
|
||||
Refer to the [Permissions overview](docs\sources\permissions\overview.md) for information about roles and permissions.
|
||||
@@ -1,114 +1,61 @@
|
||||
+++
|
||||
title = "Getting Started"
|
||||
description = "Getting started with Grafana guide"
|
||||
title = "Getting started"
|
||||
description = "Guide for getting started with Grafana"
|
||||
keywords = ["grafana", "intro", "guide", "started"]
|
||||
type = "docs"
|
||||
aliases = ["/docs/grafana/latest/guides/gettingstarted"]
|
||||
[menu.docs]
|
||||
name = "Getting Started"
|
||||
name = "Getting started"
|
||||
identifier = "getting_started_guide"
|
||||
parent = "guides"
|
||||
weight = 1
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Getting started
|
||||
|
||||
This guide will help you get started and acquainted with Grafana. It assumes you have a working Grafana server up and running. If not please read the [installation guide]({{< relref "../installation/" >}}).
|
||||
This guide will help you get started and acquainted with Grafana. To learn more about Grafana in general, refer to [What is Grafana?]({{< relref "what-is-grafana.md" >}}).
|
||||
|
||||
## Logging in for the first time
|
||||
## Install Grafana
|
||||
|
||||
To run Grafana open your browser and go to http://localhost:3000/. 3000 is the default HTTP port that Grafana listens to if you haven't [configured a different port]({{< relref "../installation/configuration/#http-port" >}}).
|
||||
This step varies according to your computer operating system. Refer to the instructions for your OS in the [Installation]({{< relref "../installation/_index.md" >}}) section for instructions.
|
||||
|
||||
There you will see the login page. Default username is admin and default password is admin. When you log in for the first time you will be asked to change your password. We strongly encourage you to
|
||||
follow Grafana’s best practices and change the default administrator password. You can later go to user preferences and change your user name.
|
||||
## Log in for the first time
|
||||
|
||||
1. Open your web browser and go to http://localhost:3000/. `3000` is the default HTTP port that Grafana listens to if you haven’t configured a different port.
|
||||
1. On the login page, type `admin` for the username and password.
|
||||
1. Change your password.
|
||||
|
||||
## How to add a data source
|
||||
> **Note:** We strongly encourage you to follow Grafana best practices and change the default administrator password. Don't forget to record your credentials!
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v52/sidemenu-datasource.png" max-width="250px" class="docs-image--right docs-image--no-shadow">}}
|
||||
## Create a dashboard
|
||||
|
||||
Before you create your first dashboard you need to add your data source.
|
||||
1. Click **New dashboard**.
|
||||
1. Click **Add Query**. Grafana creates a basic graph panel with the Random Walk scenario.
|
||||
1. Save your dashboard. Click the **Save dashboard** icon in the top corner of the screen.
|
||||
|
||||
First move your cursor to the cog on the side menu which will show you the configuration menu. If the side menu is not visible click the Grafana icon in the upper left corner. The first item on the configuration menu is data sources, click on that and you'll be taken to the data sources page where you can add and edit data sources. You can also simply click the cog.
|
||||
Congratulations, you have gotten started with Grafana! You have a dashboard and are displaying results. Feel free to experiment with what you have built, continue on to add another data source, or explore [Next steps](#next-steps).
|
||||
|
||||
## Next steps
|
||||
|
||||
Click Add data source and you will come to the settings page of your new data source.
|
||||
Different user types will have different interests. Some suggestions are listed below, or refer to [What is Grafana?]({{< relref "what-is-grafana.md" >}}) for a general overview of Grafana features.
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v52/add-datasource.png" max-width="700px" class="docs-image--no-shadow">}}
|
||||
### All users
|
||||
|
||||
First, give the data source a Name and then select which Type of data source you'll want to create, see [Supported data sources]({{< relref "../features/datasources/#supported-data-sources/" >}}) for more information and how to configure your data source.
|
||||
All users might want to learn about:
|
||||
|
||||
* [Panels]({{< relref "../features/panels/panels.md" >}})
|
||||
* [Dashboards]({{< relref "../features/dashboard/dashboards.md" >}})
|
||||
* [Data sources]({{< relref "../features/datasources/data-sources.md" >}}) and [Add a data source]({{< relref "../features/datasources/add-a-data-source.md" >}})
|
||||
* [Keyboard shortcuts]({{< relref "../features/shortcuts.md" >}})
|
||||
* [Explore workflow]({{< relref "../features/explore/index.md" >}})
|
||||
* [Plugins](https://grafana.com/grafana/plugins?orderBy=weight&direction=asc)
|
||||
|
||||
{{< docs-imagebox img="/img/docs/v52/datasource-settings.png" max-width="700px" class="docs-image--no-shadow">}}
|
||||
### Admins
|
||||
|
||||
After you have configured your data source you are ready to save and test.
|
||||
|
||||
## Beginner guides
|
||||
|
||||
Watch the 10min [beginners guide to building dashboards](https://www.youtube.com/watch?v=sKNZMtoSHN4&index=7&list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2) to get a quick intro to setting up Dashboards and Panels.
|
||||
|
||||
## Basic concepts
|
||||
|
||||
Read the [Basic Concepts]({{< relref "basic_concepts" >}}) document to get a crash course in key Grafana concepts.
|
||||
|
||||
### Top header
|
||||
|
||||
Let's start with creating a new Dashboard. You can find the new Dashboard link on the right side of the Dashboard picker. You now have a blank Dashboard.
|
||||
|
||||
<img class="no-shadow" src="/img/docs/v50/top_nav_annotated.png" width="580px">
|
||||
|
||||
The image above shows you the top header for a Dashboard.
|
||||
|
||||
1. Side menubar toggle: This toggles the side menu, allowing you to focus on the data presented in the dashboard. The side menu provides access to features unrelated to a Dashboard such as Users, Organizations, and Data Sources.
|
||||
2. Dashboard dropdown: This dropdown shows you which Dashboard you are currently viewing, and allows you to easily switch to a new Dashboard. From here you can also create a new Dashboard or folder, Import existing Dashboards, and manage Dashboard playlists.
|
||||
3. Add Panel: Adds a new panel to the current Dashboard
|
||||
4. Star Dashboard: Star (or unstar) the current Dashboard. Starred Dashboards will show up on your own Home Dashboard by default, and are a convenient way to mark Dashboards that you're interested in.
|
||||
5. Share Dashboard: Share the current dashboard by creating a link or create a static Snapshot of it. Make sure the Dashboard is saved before sharing.
|
||||
6. Save dashboard: The current Dashboard will be saved with the current Dashboard name.
|
||||
7. Settings: Manage Dashboard settings and features such as Templating and Annotations.
|
||||
|
||||
## Dashboards, panels, the building blocks of Grafana...
|
||||
|
||||
Dashboards are at the core of what Grafana is all about. Dashboards are composed of individual Panels arranged on a grid. Grafana ships with a variety of Panels. Grafana makes it easy to construct the right queries, and customize the display properties so that you can create the perfect Dashboard for your need. Each Panel can interact with data from any configured Grafana Data Source (currently Graphite, Prometheus, Elasticsearch, InfluxDB, OpenTSDB, MySQL, PostgreSQL, Microsoft SQL Server and AWS Cloudwatch). The [Basic Concepts]({{< relref "basic_concepts" >}}) guide explores these key ideas in detail.
|
||||
|
||||
<img src="/img/docs/v50/dashboard_annotated.png" class="no-shadow" width="700px">
|
||||
|
||||
1. Zoom out time range
|
||||
2. Time picker dropdown. Here you can access relative time range options, auto refresh options and set custom absolute time ranges.
|
||||
3. Manual refresh button. Will cause all panels to refresh (fetch new data).
|
||||
4. Dashboard panel. You edit panels by clicking the panel title.
|
||||
5. Graph legend. You can change series colors, y-axis and series visibility directly from the legend.
|
||||
|
||||
|
||||
## Adding and editing graphs and panels
|
||||
|
||||

|
||||
|
||||
1. You add panels by clicking the Add panel icon on the top menu.
|
||||
2. To edit the graph you click on the graph title to open the panel menu, then `Edit`.
|
||||
3. This should take you to the `Metrics` tab. In this tab you should see the editor for your default data source.
|
||||
|
||||
When you click the `Metrics` tab, you are presented with a Query Editor that is specific to the Panel Data Source. Use the Query Editor to build your queries and Grafana will visualize them in real time.
|
||||
|
||||
## Drag-and-Drop panels
|
||||
|
||||
You can Drag-and-Drop Panels by simply clicking and holding the Panel title, and drag it to its new location. You can also easily resize panels by clicking the (-) and (+) icons.
|
||||
|
||||

|
||||
|
||||
## Tips and shortcuts
|
||||
|
||||
* Click the graph title and in the dropdown menu quickly change span or duplicate the panel.
|
||||
* Click the Save icon in the menu to save the dashboard with a new name
|
||||
* Click the Save icon in the menu and then advanced to export the dashboard to json file, or set it as your default dashboard.
|
||||
* Click the colored icon in the legend to select series color
|
||||
* Click series name in the legend to hide series
|
||||
* Ctrl/Shift/Meta + Click legend name to hide other series
|
||||
|
||||
## Grafana loves the keyboard
|
||||
|
||||
* Ctrl+S Saves the current dashboard
|
||||
* Ctrl+F Opens the dashboard finder / search
|
||||
* Ctrl+H Hides all controls (good for tv displays)
|
||||
* Hit Escape to exit graph when in fullscreen or edit mode
|
||||
Administrators might want to learn about:
|
||||
|
||||
* [Grafana configuration]({{< relref "../installation/configuration.md" >}})
|
||||
* [Authentication]({{< relref "../auth/overview.md" >}})
|
||||
* [User permissions and roles]({{< relref "../permissions/overview.md" >}})
|
||||
* [Provisioning]({{< relref "../administration/provisioning.md" >}})
|
||||
* [Grafana CLI]({{< relref "../administration/cli.md" >}})
|
||||
|
||||
@@ -7,7 +7,7 @@ type = "docs"
|
||||
name = "Glossary"
|
||||
identifier = "glossary"
|
||||
parent = "guides"
|
||||
weight = 4
|
||||
weight = 400
|
||||
+++
|
||||
|
||||
# Glossary
|
||||
|
||||
@@ -7,7 +7,7 @@ type = "docs"
|
||||
name = "Time series"
|
||||
identifier = "time_series"
|
||||
parent = "guides"
|
||||
weight = 3
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
# Introduction to time series
|
||||
@@ -24,7 +24,7 @@ Temperature data like this is one example of what we call a *time series*—a se
|
||||
|
||||
Tables are useful when you want to identify individual measurements but make it difficult to see the big picture. A more common visualization for time series is the _graph_, which instead places each measurement along a time axis. Visual representations like the graph make it easier to discover patterns and features of the data that otherwise would be difficult to see.
|
||||
|
||||
<img src="/img/docs/example_graph.png" />
|
||||
{{< docs-imagebox img="/img/docs/example_graph.png" class="docs-image--no-shadow" max-width="850px" >}}
|
||||
|
||||
Temperature data like the one in the example, is far from the only example of a time series. Other examples of time series are:
|
||||
|
||||
|
||||
93
docs/sources/guides/what-is-grafana.md
Normal file
93
docs/sources/guides/what-is-grafana.md
Normal file
@@ -0,0 +1,93 @@
|
||||
+++
|
||||
title = "What is Grafana?"
|
||||
description = "Overview of Grafana and features"
|
||||
keywords = ["grafana", "intro", "guide", "started"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "What is Grafana?"
|
||||
identifier = "what_is_grafana"
|
||||
parent = "guides"
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
# What is Grafana?
|
||||
|
||||
This topic provides a high-level look at Grafana, the Grafana process, and Grafana features. It's a good place to start if you want to learn more about Grafana software. To jump right in, refer to [Getting started]({{< relref "getting_started.md" >}}).
|
||||
|
||||
Grafana is open source visualization and analytics software. It allows you to query, visualize, alert on, and explore your metrics no matter where they are stored. In plain English, it provides you with tools to turn your time-series database (TSDB) data into beautiful graphs and visualizations.
|
||||
|
||||
After creating a dashboard like you do in [Getting started]({{< relref "getting_started.md" >}}), there are many possible things you might do next. It all depends on your needs and your use case.
|
||||
|
||||
For example, if you want to view weather data and statistics about your smart home, then you might create a playlist. If you are the administrator for a corporation and are managing Grafana for multiple teams, then you might need to set up provisioning and authentication.
|
||||
|
||||
The following sections provide an overview of things you might want to do with your Grafana database and links so you can learn more. For more guidance and ideas, check out the [Grafana Community forums](https://community.grafana.com/).
|
||||
|
||||
## Explore metrics and logs
|
||||
|
||||
Explore your data through ad-hoc queries and dynamic drilldown. Split view and compare different time ranges, queries and data sources side by side.
|
||||
|
||||
Refer to [Explore]({{< relref "../features/explore/index.md" >}}) for more information.
|
||||
|
||||
## Alerts
|
||||
|
||||
If you're using Grafana alerting, then you can have alerts sent through a number of different [alert notifiers]({{< relref "../alerting/notifications.md" >}}), including PagerDuty, SMS, email, VictorOps, OpsGenie, or Slack.
|
||||
|
||||
Alert hooks allow you to create different notifiers with a bit of code if you prefer some other channels of communication. Visually define [alert rules]({{< relref "../alerting/rules.md" >}}) for your most important metrics.
|
||||
|
||||
## Annotations
|
||||
|
||||
Annotate graphs with rich events from different data sources. Hover over events to see the full event metadata and tags.
|
||||
|
||||
This feature, which shows up as a graph marker in Grafana, is useful for correlating data in case something goes wrong. You can create the annotations manually—just control-click on a graph and input some text—or you can fetch data from any data source.
|
||||
|
||||
Refer to [Annotations]({{< relref "../reference/annotations.md" >}}) for more information.
|
||||
|
||||
## Dashboard variables
|
||||
|
||||
[Template variables]({{< relref "../reference/templating.md" >}}) allow you to create dashboards that can be reused for lots of different use cases. Values aren't hard-coded with these templates, so for instance, if you have a production server and a test server, you can use the same dashboard for both.
|
||||
|
||||
Templating allows you to drill down into your data, say, from all data to North America data, down to Texas data, and beyond. You can also share these dashboards across teams within your organization—or if you create a great dashboard template for a popular data source, you can contribute it to the whole community to customize and use.
|
||||
|
||||
## Configure Grafana
|
||||
|
||||
If you're a Grafana administrator, then you'll want to thoroughly familiarize yourself with [Grafana configuration options]({{< relref "../installation/configuration.md" >}}) and the [Grafana CLI]({{< relref "../administration/cli.md" >}}).
|
||||
|
||||
Configuration covers both config files and environment variables. You can set up default ports, logging levels, email IP addresses, security, and more.
|
||||
|
||||
## Import dashboards and plugins
|
||||
|
||||
Discover hundreds of [dashboards](https://grafana.com/grafana/dashboards) and [plugins](https://grafana.com/grafana/plugins) in the official library. Thanks to the passion and momentum of community members, new ones are added every week.
|
||||
|
||||
## Authentication
|
||||
|
||||
Grafana supports different authentication methods, such as LDAP and OAuth, and allows you to map users to organizations. Refer to the [User authentication overview]({{< relref "../auth/overview.md" >}}) for more information.
|
||||
|
||||
In Grafana Enterprise, you can also map users to teams: If your company has its own authentication system, Grafana allows you to map the teams in your internal systems to teams in Grafana. That way, you can automatically give people access to the dashboards designated for their teams.
|
||||
|
||||
Refer to [Grafana Enterprise]({{< relref "../enterprise/_index.md" >}}) for more information.
|
||||
|
||||
## Provisioning
|
||||
|
||||
While it's easy to click, drag, and drop to create a single dashboard, power users in need of many dashboards will want to automate the setup with a script. You can script anything in Grafana.
|
||||
|
||||
For example, if you're spinning up a new Kubernetes cluster, you can also spin up a Grafana automatically with a script that would have the right server, IP address, and data sources preset and locked in so users cannot change them. It's also a way of getting control over a lot of dashboards.
|
||||
|
||||
Refer to [Provisioning]({{< relref "../administration/provisioning.md" >}}) for more information.
|
||||
|
||||
## Permissions
|
||||
|
||||
When organizations have one Grafana and multiple teams, they often want the ability to both keep things separate and share dashboards. You can create a team of users and then set [permissions]({{< relref "../permissions/overview.md" >}}) on folders, dashboards, and down to the [data source level]({{< relref "../enterprise/datasource_permissions.md" >}}) if you're using [Grafana Enterprise]({{< relref "../enterprise/_index.md" >}}).
|
||||
|
||||
## Grafana Cloud
|
||||
|
||||
Grafana Cloud is a highly available, fast, fully managed OpenSaaS logging and metrics platform. Everything you love about Grafana, but Grafana Labs hosts it for you and handles all the headaches.
|
||||
|
||||
[Learn more about Grafana Cloud.](https://grafana.com/cloud/)
|
||||
|
||||
## Grafana Enterprise
|
||||
|
||||
[Grafana Enterprise]({{< relref "../enterprise/_index.md" >}}) 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 enterprise data sources, advanced authentication options, more permission controls, 24x7x365 support, and training from the core Grafana team.
|
||||
|
||||
[Learn more about Grafana Enterprise](https://grafana.com/enterprise). To purchase Enterprise or obtain a trial license, contact the Grafana Labs [Sales Team](https://grafana.com/contact?about=support&topic=Grafana%20Enterprise).
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "What's New in Grafana v2.1"
|
||||
title = "What's new in Grafana v2.1"
|
||||
description = "Feature and improvement highlights for Grafana v2.1"
|
||||
keywords = ["grafana", "new", "documentation", "2.1"]
|
||||
keywords = ["grafana", "new", "documentation", "2.1", "release notes"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "What's New in Grafana v2.5"
|
||||
title = "What's new in Grafana v2.5"
|
||||
description = "Feature and improvement highlights for Grafana v2.5"
|
||||
keywords = ["grafana", "new", "documentation", "2.5"]
|
||||
keywords = ["grafana", "new", "documentation", "2.5", "release notes"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
@@ -103,4 +103,3 @@ view the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG
|
||||
- - -
|
||||
|
||||
### <a href="https://grafana.com/get">Download Grafana 2.5 now</a>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "What's New in Grafana v2.6"
|
||||
title = "What's new in Grafana v2.6"
|
||||
description = "Feature and improvement highlights for Grafana v2.6"
|
||||
keywords = ["grafana", "new", "documentation", "2.6"]
|
||||
keywords = ["grafana", "new", "documentation", "2.6", "release notes"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
@@ -122,4 +122,3 @@ view the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG
|
||||
- - -
|
||||
|
||||
<a href="http://grafana.org/download">Download Grafana 2.6 now</a>
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
+++
|
||||
title = "What's New in Grafana v2.0"
|
||||
title = "What's new in Grafana v2.0"
|
||||
description = "Feature and improvement highlights for Grafana v2.0"
|
||||
keywords = ["grafana", "new", "documentation", "2.0"]
|
||||
keywords = ["grafana", "new", "documentation", "2.0", "release notes"]
|
||||
type = "docs"
|
||||
+++
|
||||
|
||||
# What's New in Grafana v2.0
|
||||
# What's new in Grafana v2.0
|
||||
|
||||
Grafana 2.0 represents months of work by the Grafana team and the community. We are pleased to be able to
|
||||
release the Grafana 2.0 beta. This is a guide that describes some of changes and new features that can
|
||||
@@ -173,5 +173,3 @@ Grafana now supports server-side PNG rendering. From the Panel share dialog you
|
||||
> **Note** This requires that your Data Source is accessible from your Grafana instance.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "What's New in Grafana v3.1"
|
||||
title = "What's new in Grafana v3.1"
|
||||
description = "Feature and improvement highlights for Grafana v3.1"
|
||||
keywords = ["grafana", "new", "documentation", "3.1"]
|
||||
keywords = ["grafana", "new", "documentation", "3.1", "release notes"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 3.1"
|
||||
@@ -10,7 +10,7 @@ parent = "whatsnew"
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
# What's New in Grafana v3.1
|
||||
# What's new in Grafana v3.1
|
||||
|
||||
## Dashboard Export and Import
|
||||
|
||||
@@ -32,7 +32,7 @@ Here you can change the name of the dashboard and also pick what data sources yo
|
||||
|
||||
## Discover Dashboards
|
||||
|
||||
On [Grafana.com](https://grafana.com) you can now browse and search for dashboards. We have already added a few but more are being uploaded every day. To import a dashboard just copy the dashboard url and head back to Grafana, then Dashboard Search -> Import -> Paste Grafana.com Dashboard URL.
|
||||
On [Grafana.com](https://grafana.com) you can now browse and search for dashboards. We have already added a few but more are being uploaded every day. To import a dashboard just copy the dashboard URL and head back to Grafana, then Dashboard Search -> Import -> Paste Grafana.com Dashboard URL.
|
||||
|
||||
<img src="/img/docs/v31/gnet_dashboards_list.png">
|
||||
|
||||
@@ -40,9 +40,9 @@ On [Grafana.com](https://grafana.com) you can now browse and search for dashboar
|
||||
|
||||
We added a new template variable named constant that makes it easier to share and export dashboard that have custom prefixes.
|
||||
|
||||
## Dashboard Urls
|
||||
## Dashboard URLs
|
||||
|
||||
Having current time range and template variable value always sync with the URL makes it possible to always copy your current Grafana url to share with a colleague without having to use the Share modal.
|
||||
Having current time range and template variable value always sync with the URL makes it possible to always copy your current Grafana URL to share with a colleague without having to use the Share modal.
|
||||
|
||||
## Internal metrics
|
||||
|
||||
@@ -59,6 +59,4 @@ Switched logging framework to log15 to enable key value per logging and filterin
|
||||
|
||||
## CHANGELOG
|
||||
|
||||
For a detailed list and link to github issues for everything included
|
||||
in the 3.1 release please view the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md)
|
||||
file.
|
||||
For a detailed list and link to github issues for everything included in the 3.1 release please view the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) file.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "What's New in Grafana v3.0"
|
||||
title = "What's new in Grafana v3.0"
|
||||
description = "Feature and improvement highlights for Grafana v3.0"
|
||||
keywords = ["grafana", "new", "documentation", "3.0"]
|
||||
keywords = ["grafana", "new", "documentation", "3.0", "release notes"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 3.0"
|
||||
@@ -10,7 +10,7 @@ parent = "whatsnew"
|
||||
weight = 6
|
||||
+++
|
||||
|
||||
# What's New in Grafana v3.0
|
||||
# What's new in Grafana v3.0
|
||||
|
||||
## Commercial Support
|
||||
|
||||
@@ -65,7 +65,6 @@ Grafana.net will officially launch along with the stable version of
|
||||
Grafana 3.0, but go to <a href=https://grafana.com> and check out the preview
|
||||
and sign up for an account</a> in the meantime.
|
||||
|
||||
|
||||
## grafana-cli
|
||||
|
||||
Grafana 3.0 comes with a new command line tool called grafana-cli. You
|
||||
@@ -225,5 +224,4 @@ Check out the full list of plugins on [Grafana.com](https://grafana.com/plugins)
|
||||
|
||||
For a detailed list and link to github issues for everything included
|
||||
in the 3.0 release please view the
|
||||
[CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md)
|
||||
file.
|
||||
[CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) file.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "What's New in Grafana v4.1"
|
||||
title = "What's new in Grafana v4.1"
|
||||
description = "Feature and improvement highlights for Grafana v4.1"
|
||||
keywords = ["grafana", "new", "documentation", "4.1.0"]
|
||||
keywords = ["grafana", "new", "documentation", "4.1.0", "release notes"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 4.1"
|
||||
@@ -10,7 +10,6 @@ parent = "whatsnew"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
|
||||
## What's new in Grafana v4.1
|
||||
- **Graph**: Support for shared tooltip on all graphs as you hover over one graph. [#1578](https://github.com/grafana/grafana/pull/1578), [#6274](https://github.com/grafana/grafana/pull/6274)
|
||||
- **Victorops**: Add VictorOps notification integration [#6411](https://github.com/grafana/grafana/issues/6411), thx [@ichekrygin](https://github.com/ichekrygin)
|
||||
@@ -42,7 +41,6 @@ You can set a help text in the general tab on any panel. The help text is using
|
||||
Panels with a help text available have a little indicator in the top left corner. You can show the help text by hovering the icon.
|
||||
<div class="clearfix"></div>
|
||||
|
||||
|
||||
### Easier Cloudwatch configuration
|
||||
|
||||
{{< imgbox max-width="60%" img="/img/docs/v41/cloudwatch_settings.png" caption="Cloudwatch configuration" >}}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "What's New in Grafana v4.2"
|
||||
title = "What's new in Grafana v4.2"
|
||||
description = "Feature and improvement highlights for Grafana v4.2"
|
||||
keywords = ["grafana", "new", "documentation", "4.2.0"]
|
||||
keywords = ["grafana", "new", "documentation", "4.2.0", "release notes"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 4.2"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "What's New in Grafana v4.3"
|
||||
title = "What's new in Grafana v4.3"
|
||||
description = "Feature and improvement highlights for Grafana v4.3"
|
||||
keywords = ["grafana", "new", "documentation", "4.3.0"]
|
||||
keywords = ["grafana", "new", "documentation", "4.3.0", "release notes"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 4.3"
|
||||
@@ -10,7 +10,7 @@ parent = "whatsnew"
|
||||
weight = -2
|
||||
+++
|
||||
|
||||
## What's New in Grafana v4.3
|
||||
## What's new in Grafana v4.3
|
||||
|
||||
Grafana v4.3 Beta is now [available for download](https://grafana.com/grafana/download/4.3.0-beta1).
|
||||
|
||||
@@ -102,4 +102,3 @@ Head to the [v4.3 download page](https://grafana.com/grafana/download) for downl
|
||||
## Thanks
|
||||
|
||||
A big thanks to all the Grafana users who contribute by submitting PRs, bug reports, helping out on our [community site](https://community.grafana.com/) and providing feedback!
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user