Compare commits
512 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7fa1db6bec | ||
|
|
11fd401fad | ||
|
|
f5d26bfcc9 | ||
|
|
45eda16a87 | ||
|
|
4a433ee630 | ||
|
|
66ca8a6621 | ||
|
|
88e9012cef | ||
|
|
f6f9e58d45 | ||
|
|
cf7a49977f | ||
|
|
bcc85862fe | ||
|
|
f1aa7dcd52 | ||
|
|
592cb386e2 | ||
|
|
43ac2b1dba | ||
|
|
294a6a0046 | ||
|
|
5dbbf1826c | ||
|
|
75ecc019d3 | ||
|
|
a7d746375d | ||
|
|
ade734168c | ||
|
|
3691faf136 | ||
|
|
1240db31d3 | ||
|
|
a8264fe316 | ||
|
|
3a7939c930 | ||
|
|
20d94f9703 | ||
|
|
35106537f2 | ||
|
|
dfde6e75ed | ||
|
|
ee5f030ded | ||
|
|
bf999a4f82 | ||
|
|
dd3dd407ad | ||
|
|
02d3a9f365 | ||
|
|
355a12d7cb | ||
|
|
0b6169b3f5 | ||
|
|
fd633a1d5d | ||
|
|
a02086814e | ||
|
|
a00af85f36 | ||
|
|
edb2dcf1b0 | ||
|
|
ff1b71bc20 | ||
|
|
871b98c06b | ||
|
|
bb52f3670e | ||
|
|
c68e7c7283 | ||
|
|
ea2f65b4c3 | ||
|
|
8d70f13393 | ||
|
|
5d70a36ad8 | ||
|
|
43cff3a2bd | ||
|
|
66bc1fea2d | ||
|
|
a5b3f2b891 | ||
|
|
8e7166b5c4 | ||
|
|
ad2a69bff4 | ||
|
|
f7ed24475c | ||
|
|
588ce6606c | ||
|
|
e6bdccbb05 | ||
|
|
525ae4fdf5 | ||
|
|
8dcfa18761 | ||
|
|
3a1700cbee | ||
|
|
4fcf79a3a6 | ||
|
|
0506cfdc1d | ||
|
|
2408d8f09a | ||
|
|
ce809de1ed | ||
|
|
0c5ef1453d | ||
|
|
5f5cdad97a | ||
|
|
c766802325 | ||
|
|
80a852b00a | ||
|
|
79d7213e11 | ||
|
|
51854ff4fa | ||
|
|
7b81ebc991 | ||
|
|
f39b40c2dd | ||
|
|
5aab6b5c20 | ||
|
|
5fb8b37241 | ||
|
|
fb386f3c8d | ||
|
|
5006f9e4c5 | ||
|
|
2e610cb256 | ||
|
|
50bc801f1c | ||
|
|
361acd3fa1 | ||
|
|
1dfa529941 | ||
|
|
b28ea0b407 | ||
|
|
2a18345eb2 | ||
|
|
099178466d | ||
|
|
288cc35529 | ||
|
|
f5eac2e91d | ||
|
|
16f072b320 | ||
|
|
9cebb23e01 | ||
|
|
74e12c260f | ||
|
|
09cb0f378b | ||
|
|
93e1d8a19c | ||
|
|
7f3a7ea128 | ||
|
|
dc0fb8be06 | ||
|
|
d69b63cbc0 | ||
|
|
a62ebb3e59 | ||
|
|
50daf7463d | ||
|
|
b44c599410 | ||
|
|
fe88658bdd | ||
|
|
c80eadcdf4 | ||
|
|
373389c920 | ||
|
|
48d9d0d356 | ||
|
|
011b2cd1b2 | ||
|
|
3aa1cb012a | ||
|
|
bbc8aa0525 | ||
|
|
eb31833d52 | ||
|
|
35232a77e6 | ||
|
|
1dd90c8105 | ||
|
|
f327e7c818 | ||
|
|
b6867891f0 | ||
|
|
e8a6af7b22 | ||
|
|
3e94d80430 | ||
|
|
85eb2aaa80 | ||
|
|
d6d64c53cd | ||
|
|
89fb60a956 | ||
|
|
9282182805 | ||
|
|
5e9f0771c5 | ||
|
|
91e866f145 | ||
|
|
17bf87fb62 | ||
|
|
7a497fd617 | ||
|
|
94446fb85c | ||
|
|
820abef82d | ||
|
|
d28ca54129 | ||
|
|
142c3a6bc2 | ||
|
|
68d4211c50 | ||
|
|
603725aeb0 | ||
|
|
af5ced0e18 | ||
|
|
98f0305e68 | ||
|
|
1e10fcad83 | ||
|
|
c8ac6add16 | ||
|
|
554c7ba96f | ||
|
|
e6bf266c4b | ||
|
|
98bb8bf761 | ||
|
|
3f95180c98 | ||
|
|
c0e087640b | ||
|
|
2bc91c8660 | ||
|
|
afd0fc3652 | ||
|
|
4a2941dc90 | ||
|
|
015932fd02 | ||
|
|
b752cfee1f | ||
|
|
8ce05a7c24 | ||
|
|
3ff362e446 | ||
|
|
4ce1ee4120 | ||
|
|
3acf106303 | ||
|
|
b94839574c | ||
|
|
b7956ef499 | ||
|
|
c3699d8259 | ||
|
|
5b05941dec | ||
|
|
5ab72f48fc | ||
|
|
658109e0d6 | ||
|
|
d8d44224f5 | ||
|
|
27e486d678 | ||
|
|
ca940c2ae5 | ||
|
|
400bd205a8 | ||
|
|
3f2a510568 | ||
|
|
79e788e46f | ||
|
|
767b460ff1 | ||
|
|
3a772c7f7f | ||
|
|
43a6a65f8b | ||
|
|
5dd9582520 | ||
|
|
0d12b37dfd | ||
|
|
bd4d665d54 | ||
|
|
14b8bd35ed | ||
|
|
0390b4187b | ||
|
|
999b1211b6 | ||
|
|
9151a2468d | ||
|
|
29de4e7c53 | ||
|
|
d5ef0403af | ||
|
|
d7321cd89c | ||
|
|
c83975f2e1 | ||
|
|
25f63e0581 | ||
|
|
59cebca4b2 | ||
|
|
b1de1e6f26 | ||
|
|
f54547776d | ||
|
|
66e4297816 | ||
|
|
c1e5f5be87 | ||
|
|
3351f959d0 | ||
|
|
0015183a7b | ||
|
|
6595be95eb | ||
|
|
37409163b9 | ||
|
|
bcb52417db | ||
|
|
4b76c6d652 | ||
|
|
153a9bf43a | ||
|
|
36c9b7df53 | ||
|
|
98b4074c16 | ||
|
|
aaa465a100 | ||
|
|
908be13c03 | ||
|
|
b481ff27b2 | ||
|
|
303e3de488 | ||
|
|
7ccc8ae298 | ||
|
|
f591bea696 | ||
|
|
a55be07ea5 | ||
|
|
fe42f81441 | ||
|
|
0f69e06fcf | ||
|
|
03c23dd9c1 | ||
|
|
909601d6ab | ||
|
|
dcffcbb6d3 | ||
|
|
26577ab600 | ||
|
|
89b27b35ba | ||
|
|
540d540ea9 | ||
|
|
9ea5af578e | ||
|
|
c60915c146 | ||
|
|
3ae0cfa1d0 | ||
|
|
87983021e2 | ||
|
|
119f5427af | ||
|
|
5b674ce29c | ||
|
|
bfd8afaf13 | ||
|
|
e15fed10e2 | ||
|
|
d800e64368 | ||
|
|
26ab25b7c0 | ||
|
|
3b18adfe1a | ||
|
|
6267ef1391 | ||
|
|
6e82dbafbc | ||
|
|
29dff8b6cd | ||
|
|
b4a89128b6 | ||
|
|
06a37d0023 | ||
|
|
ebbfc529e0 | ||
|
|
0f136a940c | ||
|
|
b72cdae563 | ||
|
|
0b6b5bac30 | ||
|
|
36676e23c1 | ||
|
|
c6a6ae261f | ||
|
|
dc002abe4c | ||
|
|
5d49846e1d | ||
|
|
665df676a5 | ||
|
|
c9bfa781fd | ||
|
|
ba4bbd1d47 | ||
|
|
3f0eb52389 | ||
|
|
5910411845 | ||
|
|
930da63173 | ||
|
|
0f29b8ac83 | ||
|
|
39b6c04643 | ||
|
|
014f6d5a75 | ||
|
|
41be15ee4e | ||
|
|
0d85c63fff | ||
|
|
b2fbb2691b | ||
|
|
acede1d5f9 | ||
|
|
4301463c82 | ||
|
|
59d89e422b | ||
|
|
d4e2f850b8 | ||
|
|
a0a1f4aacd | ||
|
|
7834eca394 | ||
|
|
5d6ed6c45f | ||
|
|
b5b93a68fc | ||
|
|
9e6a7dcb90 | ||
|
|
af9941e50a | ||
|
|
1a3170373a | ||
|
|
ba8c02f594 | ||
|
|
08e2bbef83 | ||
|
|
a534ac4948 | ||
|
|
108f582ec4 | ||
|
|
b1a6c7814d | ||
|
|
6a976a3f48 | ||
|
|
012b72cdbf | ||
|
|
9fc7303ddf | ||
|
|
0e67d5e327 | ||
|
|
3bb704144d | ||
|
|
fd2451823b | ||
|
|
6d7eacfa81 | ||
|
|
81102ccee1 | ||
|
|
e7f3480803 | ||
|
|
ecbe7d06a6 | ||
|
|
ac8b20a60c | ||
|
|
b51b681400 | ||
|
|
9073587705 | ||
|
|
52e1c4113b | ||
|
|
685ee393af | ||
|
|
9ad186bcc9 | ||
|
|
c44f6e2ec2 | ||
|
|
ba18a5866c | ||
|
|
c30947df61 | ||
|
|
6a485f3016 | ||
|
|
6488ccd113 | ||
|
|
ae4bcdd54b | ||
|
|
343143e95f | ||
|
|
5e11f1a2a1 | ||
|
|
48d77ea2a8 | ||
|
|
56fe1308ce | ||
|
|
d4e8e22fda | ||
|
|
5b38c230db | ||
|
|
143b56b5ac | ||
|
|
b3a53b8c56 | ||
|
|
e46814ba05 | ||
|
|
799aaf720a | ||
|
|
f8698dc49b | ||
|
|
a51b1e8951 | ||
|
|
b65ea57f97 | ||
|
|
f5c5c4b88b | ||
|
|
5fdfa3ff7e | ||
|
|
5b1e6513e6 | ||
|
|
b8f9edaea3 | ||
|
|
a3bf38cc21 | ||
|
|
f18de7e6a0 | ||
|
|
cd95f5bcc2 | ||
|
|
72783785a8 | ||
|
|
bf82d166bc | ||
|
|
a433698ddf | ||
|
|
bf85735a36 | ||
|
|
17492c091a | ||
|
|
538a8cff1e | ||
|
|
6292d7c204 | ||
|
|
c783bdac39 | ||
|
|
8b10fe1abc | ||
|
|
4dae217afc | ||
|
|
d5d42c046d | ||
|
|
63c79f066a | ||
|
|
894951c7d4 | ||
|
|
575f746baa | ||
|
|
d854abccad | ||
|
|
f46b7560e8 | ||
|
|
4a63d696ff | ||
|
|
ebcb8be19a | ||
|
|
e19b4a9291 | ||
|
|
c3bd07f9b4 | ||
|
|
5a26fc252e | ||
|
|
fec37f22b8 | ||
|
|
c8f7361e3f | ||
|
|
624b75b58c | ||
|
|
d4f40eac6f | ||
|
|
f5d2ce2a72 | ||
|
|
dbc0ff9739 | ||
|
|
ae367db377 | ||
|
|
8ed1d935df | ||
|
|
a1c1704d1f | ||
|
|
9d020ea1e2 | ||
|
|
7f83460f42 | ||
|
|
9aa6a6b4c4 | ||
|
|
38ec8ddefc | ||
|
|
ec94dfa890 | ||
|
|
1206ce261c | ||
|
|
ae5b3fd4b5 | ||
|
|
3c572aece6 | ||
|
|
c3a9a04dad | ||
|
|
afd4f37f39 | ||
|
|
7336a98bb1 | ||
|
|
a503c1d39c | ||
|
|
948a5259a2 | ||
|
|
497993e2b2 | ||
|
|
1be476b5f5 | ||
|
|
b6fafb13f5 | ||
|
|
caa8b6100e | ||
|
|
ae11bf7c14 | ||
|
|
3ff2dc2850 | ||
|
|
d23c77119e | ||
|
|
8838e43088 | ||
|
|
ac2e72f22a | ||
|
|
7583b78c3a | ||
|
|
1a8d05bbcb | ||
|
|
e7b604f538 | ||
|
|
1a3373e049 | ||
|
|
92d8b3f095 | ||
|
|
d83f0fb266 | ||
|
|
e9645045a0 | ||
|
|
e1765e360e | ||
|
|
e541e60bc3 | ||
|
|
7dcfd800b3 | ||
|
|
e5ec357625 | ||
|
|
d03b0d664b | ||
|
|
3e3cef28ec | ||
|
|
cdd17f4871 | ||
|
|
43d45f9fae | ||
|
|
357d394c66 | ||
|
|
728471eef4 | ||
|
|
2374e91bfa | ||
|
|
71d9126bb6 | ||
|
|
34da0711ab | ||
|
|
6aa0f35012 | ||
|
|
9d5e4bee56 | ||
|
|
f097bce565 | ||
|
|
e654f80e4b | ||
|
|
a228bb2308 | ||
|
|
0f2989e19b | ||
|
|
bb1097b7c9 | ||
|
|
2f4744ca71 | ||
|
|
c84e3c00fe | ||
|
|
c78a9368f0 | ||
|
|
a7d7f0d9f8 | ||
|
|
e33faac63b | ||
|
|
01f16ece3e | ||
|
|
bf680acae5 | ||
|
|
74fcb2494a | ||
|
|
77331e92b6 | ||
|
|
0c2aa91e61 | ||
|
|
b80b5e0317 | ||
|
|
261a832460 | ||
|
|
2dd49e6e50 | ||
|
|
80903c162e | ||
|
|
c91a1e994b | ||
|
|
aa3fc9f45f | ||
|
|
4b5929d577 | ||
|
|
d68bfaa8be | ||
|
|
17d95dc848 | ||
|
|
da6430ac01 | ||
|
|
2848773ab4 | ||
|
|
bddebf4c82 | ||
|
|
89a070029f | ||
|
|
577478baff | ||
|
|
95250e4ea3 | ||
|
|
676a113966 | ||
|
|
fc76530577 | ||
|
|
f48703502d | ||
|
|
201e93b7f9 | ||
|
|
d99f4f95c0 | ||
|
|
834446260f | ||
|
|
dea631bedc | ||
|
|
8334b24b42 | ||
|
|
56e53b8343 | ||
|
|
2f35759346 | ||
|
|
5701b73ab2 | ||
|
|
8070a7ca35 | ||
|
|
5a53051f72 | ||
|
|
9b6535cca1 | ||
|
|
beb203209b | ||
|
|
5f0a86be4c | ||
|
|
7861c27557 | ||
|
|
a8285d0eb4 | ||
|
|
8afb84a5e5 | ||
|
|
e91b00c355 | ||
|
|
a4a10f2b03 | ||
|
|
4d72323623 | ||
|
|
396eadc5ac | ||
|
|
93ac6680ab | ||
|
|
9e697a1f6e | ||
|
|
cda359e844 | ||
|
|
884e85fc81 | ||
|
|
2b78c47a5a | ||
|
|
c3b90f2028 | ||
|
|
c22097c95e | ||
|
|
0ba4c161c3 | ||
|
|
7863a0417c | ||
|
|
4fdb351c32 | ||
|
|
d25d689efa | ||
|
|
fcd5d581a8 | ||
|
|
b986f744e4 | ||
|
|
9cce5217d0 | ||
|
|
139f077453 | ||
|
|
1fd2270a93 | ||
|
|
89923bf77a | ||
|
|
48f384dcf1 | ||
|
|
b6184a71bd | ||
|
|
76b9b792b4 | ||
|
|
4632b8daa5 | ||
|
|
7a277c69ac | ||
|
|
c6feb903b1 | ||
|
|
2de439c5a1 | ||
|
|
cde87d9adc | ||
|
|
34edea4ac7 | ||
|
|
adb9d92082 | ||
|
|
a06ccaa428 | ||
|
|
974d38583d | ||
|
|
4aa227dd84 | ||
|
|
c4365e225c | ||
|
|
b51476f18a | ||
|
|
6114f63d7c | ||
|
|
89aea278a9 | ||
|
|
c22a192bb8 | ||
|
|
968ce15e7f | ||
|
|
90ef877e6e | ||
|
|
1d7a0db54b | ||
|
|
d58a560fda | ||
|
|
1e61eae9f4 | ||
|
|
e8141b48d2 | ||
|
|
b3a8d93dca | ||
|
|
6bb4abc0ac | ||
|
|
b2d880c6de | ||
|
|
6c01125416 | ||
|
|
92c67e8c83 | ||
|
|
c2c5f529f3 | ||
|
|
9ae3938136 | ||
|
|
e8da084baf | ||
|
|
8d68bd6bb9 | ||
|
|
1797e2221a | ||
|
|
43f039859a | ||
|
|
039fc2964a | ||
|
|
7cbb4020e9 | ||
|
|
74e90d01ec | ||
|
|
204fe007b7 | ||
|
|
8a43d4e25c | ||
|
|
5910453e8a | ||
|
|
ebebbddb2d | ||
|
|
eda3cffe22 | ||
|
|
4cc9f4f075 | ||
|
|
0f87279ab8 | ||
|
|
233062229a | ||
|
|
45a572ebd8 | ||
|
|
c144dc86f2 | ||
|
|
7923864935 | ||
|
|
702c9f7cc5 | ||
|
|
574afe8568 | ||
|
|
b86ae3f0e8 | ||
|
|
8ff7e1d05d | ||
|
|
24a0eb909c | ||
|
|
c4c64365f1 | ||
|
|
c51f84a12e | ||
|
|
8580b78ce6 | ||
|
|
cc1e69ace3 | ||
|
|
85e3ed623a | ||
|
|
11e3876a16 | ||
|
|
14241404ff | ||
|
|
199d0d152e | ||
|
|
f3ec139eab | ||
|
|
9de4d0fa6b | ||
|
|
eb4e71e2c6 | ||
|
|
c215f0b5ec | ||
|
|
7edc95cc35 | ||
|
|
2d840f12e0 | ||
|
|
fa68eb9be6 | ||
|
|
40b11654fd | ||
|
|
888d608090 | ||
|
|
91f60bb6c4 | ||
|
|
86b2048d3b | ||
|
|
a316b5fb80 | ||
|
|
4a22d22857 | ||
|
|
a834812e13 | ||
|
|
209f2debe6 | ||
|
|
3471e262a5 | ||
|
|
4c8310c2bf | ||
|
|
2f1c14fc98 | ||
|
|
055f21f1e8 | ||
|
|
63d51d0db3 | ||
|
|
a4daba63ea |
2
.github/ISSUE_TEMPLATE.md
vendored
2
.github/ISSUE_TEMPLATE.md
vendored
@@ -4,8 +4,6 @@ Read before posting:
|
||||
- Checkout FAQ: https://community.grafana.com/c/howto/faq
|
||||
- Checkout How to troubleshoot metric query issues: https://community.grafana.com/t/how-to-troubleshoot-metric-query-issues/50
|
||||
|
||||
Please prefix your title with [Bug] or [Feature request].
|
||||
|
||||
Please include this information:
|
||||
- What Grafana version are you using?
|
||||
- What datasource are you using?
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -12,6 +12,8 @@ awsconfig
|
||||
/tmp
|
||||
vendor/phantomjs/phantomjs
|
||||
vendor/phantomjs/phantomjs.exe
|
||||
profile.out
|
||||
coverage.txt
|
||||
|
||||
docs/AWS_S3_BUCKET
|
||||
docs/GIT_BRANCH
|
||||
@@ -36,12 +38,15 @@ public/css/*.min.css
|
||||
conf/custom.ini
|
||||
fig.yml
|
||||
docker-compose.yml
|
||||
docker-compose.yaml
|
||||
/conf/provisioning/**/custom.yaml
|
||||
profile.cov
|
||||
/grafana
|
||||
.notouch
|
||||
/pkg/cmd/grafana-cli/grafana-cli
|
||||
/pkg/cmd/grafana-server/grafana-server
|
||||
/pkg/cmd/grafana-server/debug
|
||||
debug.test
|
||||
/examples/*/dist
|
||||
/packaging/**/*.rpm
|
||||
/packaging/**/*.deb
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
test -z "$(gofmt -s -l . | grep -v vendor/src/ | tee /dev/stderr)"
|
||||
if [ $? -gt 0 ]; then
|
||||
echo "Some files aren't formatted, please run 'go fmt ./pkg/...' to format your source code before committing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
grunt test
|
||||
116
CHANGELOG.md
116
CHANGELOG.md
@@ -1,20 +1,118 @@
|
||||
# 5.0.0 (unreleased)
|
||||
|
||||
### WIP (in develop branch currently as its unstable or unfinished)
|
||||
- Dashboard folders
|
||||
- User groups
|
||||
- Dashboard permissions (on folder & dashboard level), permissions can be assigned to groups or individual users
|
||||
- UX changes to nav & side menu
|
||||
- New dashboard grid layout system
|
||||
### New Features
|
||||
- **Dashboards** Dashboard folders, [#1611](https://github.com/grafana/grafana/issues/1611)
|
||||
- **Teams** User groups (teams) implemented. Can be used in folder & dashboard permission list.
|
||||
- **Dashboard grid**: Panels are now layed out in a two dimensional grid (with x, y, w, h). [#9093](https://github.com/grafana/grafana/issues/9093).
|
||||
- **Templating**: Vertical repeat direction for panel repeats.
|
||||
- **UX**: Major update to page header and navigation
|
||||
- **Dashboard settings**: Combine dashboard settings views into one with side menu, [#9750](https://github.com/grafana/grafana/issues/9750)
|
||||
|
||||
## New Dashboard Grid
|
||||
|
||||
The new grid engine is major upgrade for how you can position and move panels. It enables new layouts and a much easier dashboard building experience. The change is backwards compatible. Grafana will automatically upgrade your dashboards to the new schema and position panels to match your existing layout. There might be minor differences in panel height.
|
||||
|
||||
Dashboard panels and rows are positioned using a gridPos object `{x: 0, y: 0, w: 24, h: 5}`. Units are in grid dimensions (24 columns, 1 height unit 30px). Rows and Panels objects exist (together) in a flat array directly on the dashboard root object. Rows are not needed for layouts anymore and are mainly there for backward compatibility. Some panel plugins that do not respect their panel height might require an update.
|
||||
|
||||
# 4.7.0 (unreleased)
|
||||
|
||||
## Breaking changes
|
||||
|
||||
`[dashboard.json]` have been replaced with [dashboard provisioning](http://docs.grafana.org/administration/provisioning/).
|
||||
|
||||
Config files for provisioning datasources as configuration have changed from `/conf/datasources` to `/conf/provisioning/datasources`.
|
||||
From `/etc/grafana/datasources` to `/etc/grafana/provisioning/datasources` when installed with deb/rpm packages.
|
||||
|
||||
## New Features
|
||||
* **Data Source Proxy**: Add support for whitelisting specified cookies that will be passed through to the data source when proxying data source requests [#5457](https://github.com/grafana/grafana/issues/5457), thanks [@robingustafsson](https://github.com/robingustafsson)
|
||||
* **Postgres/MySQL**: add __timeGroup macro for mysql [#9596](https://github.com/grafana/grafana/pull/9596), thanks [@svenklemm](https://github.com/svenklemm)
|
||||
* **Text**: Text panel are now edited in the ace editor. [#9698](https://github.com/grafana/grafana/pull/9698), thx [@mtanda](https://github.com/mtanda)
|
||||
* **Teams**: Add Microsoft Teams notifier as [#8523](https://github.com/grafana/grafana/issues/8523), thx [@anthu](https://github.com/anthu)
|
||||
* **Datasources**: Its now possible to configure datasources with config files [#1789](https://github.com/grafana/grafana/issues/1789)
|
||||
* **Graphite**: Query editor updated to support new query by tag features [#9230](https://github.com/grafana/grafana/issues/9230)
|
||||
* **Dashboard history**: New config file option versions_to_keep sets how many versions per dashboard to store, [#9671](https://github.com/grafana/grafana/issues/9671)
|
||||
* **Dashboard as cfg**: Load dashboards from file into Grafana on startup/change [#9654](https://github.com/grafana/grafana/issues/9654) [#5269](https://github.com/grafana/grafana/issues/5269)
|
||||
* **Prometheus**: Grafana can now send alerts to Prometheus Alertmanager while firing [#7481](https://github.com/grafana/grafana/issues/7481), thx [@Thib17](https://github.com/Thib17) and [@mtanda](https://github.com/mtanda)
|
||||
* **Table**: Support multiple table formated queries in table panel [#9170](https://github.com/grafana/grafana/issues/9170), thx [@davkal](https://github.com/davkal)
|
||||
## Minor
|
||||
* **Alert panel**: Adds placeholder text when no alerts are within the time range [#9624](https://github.com/grafana/grafana/issues/9624), thx [@straend](https://github.com/straend)
|
||||
* **Mysql**: MySQL enable MaxOpenCon and MaxIdleCon regards how constring is configured. [#9784](https://github.com/grafana/grafana/issues/9784), thx [@dfredell](https://github.com/dfredell)
|
||||
* **Cloudwatch**: Fixes broken query inspector for cloudwatch [#9661](https://github.com/grafana/grafana/issues/9661), thx [@mtanda](https://github.com/mtanda)
|
||||
* **Dashboard**: Make it possible to start dashboards from search and dashboard list panel [#1871](https://github.com/grafana/grafana/issues/1871)
|
||||
* **Annotations**: Posting annotations now return the id of the annotation [#9798](https://github.com/grafana/grafana/issues/9798)
|
||||
* **Systemd**: Use systemd notification ready flag [#10024](https://github.com/grafana/grafana/issues/10024), thx [@jgrassler](https://github.com/jgrassler)
|
||||
* **Github**: Use organizations_url provided from github to verify user belongs in org. [#10111](https://github.com/grafana/grafana/issues/10111), thx
|
||||
[@adiletmaratov](https://github.com/adiletmaratov)
|
||||
* **Backend**: Fixed bug where Grafana exited before all sub routines where finished [#10131](https://github.com/grafana/grafana/issues/10131)
|
||||
|
||||
## Tech
|
||||
* **RabbitMq**: Remove support for publishing events to RabbitMQ [#9645](https://github.com/grafana/grafana/issues/9645)
|
||||
|
||||
|
||||
## Fixes
|
||||
* **Sensu**: Send alert message to sensu output [#9551](https://github.com/grafana/grafana/issues/9551), thx [@cjchand](https://github.com/cjchand)
|
||||
* **Singlestat**: suppress error when result contains no datapoints [#9636](https://github.com/grafana/grafana/issues/9636), thx [@utkarshcmu](https://github.com/utkarshcmu)
|
||||
* **Postgres/MySQL**: Control quoting in SQL-queries when using template variables [#9030](https://github.com/grafana/grafana/issues/9030), thanks [@svenklemm](https://github.com/svenklemm)
|
||||
|
||||
# 4.6.3 (2017-12-14)
|
||||
|
||||
## Fixes
|
||||
* **Gzip**: Fixes bug gravatar images when gzip was enabled [#5952](https://github.com/grafana/grafana/issues/5952)
|
||||
* **Alert list**: Now shows alert state changes even after adding manual annotations on dashboard [#9951](https://github.com/grafana/grafana/issues/9951)
|
||||
* **Alerting**: Fixes bug where rules evaluated as firing when all conditions was false and using OR operator. [#9318](https://github.com/grafana/grafana/issues/9318)
|
||||
* **Cloudwatch**: CloudWatch no longer display metrics' default alias [#10151](https://github.com/grafana/grafana/issues/10151), thx [@mtanda](https://github.com/mtanda)
|
||||
|
||||
# 4.6.2 (2017-11-16)
|
||||
|
||||
## Important
|
||||
* **Prometheus**: Fixes bug with new prometheus alerts in Grafana. Make sure to download this version if your using Prometheus for alerting. More details in the issue. [#9777](https://github.com/grafana/grafana/issues/9777)
|
||||
|
||||
## Fixes
|
||||
* **Color picker**: Bug after using textbox input field to change/paste color string [#9769](https://github.com/grafana/grafana/issues/9769)
|
||||
* **Cloudwatch**: Fix for cloudwatch templating query `ec2_instance_attribute` [#9667](https://github.com/grafana/grafana/issues/9667), thanks [@mtanda](https://github.com/mtanda)
|
||||
* **Heatmap**: Fixed tooltip for "time series buckets" mode [#9332](https://github.com/grafana/grafana/issues/9332)
|
||||
* **InfluxDB**: Fixed query editor issue when using `>` or `<` operators in WHERE clause [#9871](https://github.com/grafana/grafana/issues/9871)
|
||||
|
||||
|
||||
# 4.6.1 (2017-11-01)
|
||||
|
||||
* **Singlestat**: Lost thresholds when using save dashboard as [#9681](https://github.com/grafana/grafana/issues/9681)
|
||||
* **Graph**: Fix for series override color picker [#9715](https://github.com/grafana/grafana/issues/9715)
|
||||
* **Go**: build using golang 1.9.2 [#9713](https://github.com/grafana/grafana/issues/9713)
|
||||
* **Plugins**: Fixed problem with loading plugin js files behind auth proxy [#9509](https://github.com/grafana/grafana/issues/9509)
|
||||
* **Graphite**: Annotation tooltip should render empty string when undefined [#9707](https://github.com/grafana/grafana/issues/9707)
|
||||
|
||||
# 4.6.0 (2017-10-26)
|
||||
|
||||
## Fixes
|
||||
* **Alerting**: Viewer can no longer pause alert rules [#9640](https://github.com/grafana/grafana/issues/9640)
|
||||
* **Playlist**: Bug where playlist controls was missing [#9639](https://github.com/grafana/grafana/issues/9639)
|
||||
* **Firefox**: Creating region annotations now work in firefox [#9638](https://github.com/grafana/grafana/issues/9638)
|
||||
|
||||
# 4.6.0-beta3 (2017-10-23)
|
||||
|
||||
## Fixes
|
||||
* **Prometheus**: Fix for browser crash for short time ranges. [#9575](https://github.com/grafana/grafana/issues/9575)
|
||||
* **Heatmap**: Fix for y-axis not showing. [#9576](https://github.com/grafana/grafana/issues/9576)
|
||||
* **Save to file**: Fix for save to file in export modal. [#9586](https://github.com/grafana/grafana/issues/9586)
|
||||
* **Postgres**: modify group by time macro so it can be used in select clause [#9527](https://github.com/grafana/grafana/pull/9527), thanks [@svenklemm](https://github.com/svenklemm)
|
||||
|
||||
# 4.6.0-beta2 (2017-10-17)
|
||||
|
||||
## Fixes
|
||||
* **ColorPicker**: Fix for color picker not showing [#9549](https://github.com/grafana/grafana/issues/9549)
|
||||
* **Alerting**: Fix for broken test rule button in alert tab [#9539](https://github.com/grafana/grafana/issues/9539)
|
||||
* **Cloudwatch**: Provide error message when failing to add cloudwatch datasource [#9534](https://github.com/grafana/grafana/pull/9534), thx [@mtanda](https://github.com/mtanda)
|
||||
* **Cloudwatch**: Fix unused period parameter [#9536](https://github.com/grafana/grafana/pull/9536), thx [@mtanda](https://github.com/mtanda)
|
||||
* **CSV Export**: Fix for broken CSV export [#9525](https://github.com/grafana/grafana/issues/9525)
|
||||
* **Text panel**: Fix for issue with break lines in Firefox [#9491](https://github.com/grafana/grafana/issues/9491)
|
||||
* **Annotations**: Fix for issue saving annotation event in MySQL DB [#9550](https://github.com/grafana/grafana/issues/9550), thanks [@krise3k](https://github.com/krise3k)
|
||||
|
||||
|
||||
# 4.6.0-beta1 (2017-10-13)
|
||||
|
||||
## New Features
|
||||
* **Annotations**: Add support for creating annotations from graph panel [#8197](https://github.com/grafana/grafana/pull/8197)
|
||||
* **GCS**: Adds support for Google Cloud Storage [#8370](https://github.com/grafana/grafana/issues/8370) thx [@chuhlomin](https://github.com/chuhlomin)
|
||||
* **Prometheus**: Adds /metrics endpoint for exposing Grafana metrics. [#9187](https://github.com/grafana/grafana/pull/9187)
|
||||
* **Graph**: Add support for local formating in axis. [#1395](https://github.com/grafana/grafana/issues/1395), thx [@m0nhawk](https://github.com/m0nhawk)
|
||||
@@ -32,11 +130,11 @@
|
||||
* **OAuth**: Verify TLS during OAuth callback [#9373](https://github.com/grafana/grafana/issues/9373), thx [@mattbostock](https://github.com/mattbostock)
|
||||
|
||||
## Minor
|
||||
* **SMTP**: Make it possible to set specific EHLO for smtp client. [#9319](https://github.com/grafana/grafana/issues/9319)
|
||||
* **Dataproxy**: Allow grafan to renegotiate tls connection [#9250](https://github.com/grafana/grafana/issues/9250)
|
||||
* **SMTP**: Make it possible to set specific HELO for smtp client. [#9319](https://github.com/grafana/grafana/issues/9319)
|
||||
* **Dataproxy**: Allow grafana to renegotiate tls connection [#9250](https://github.com/grafana/grafana/issues/9250)
|
||||
* **HTTP**: set net.Dialer.DualStack to true for all http clients [#9367](https://github.com/grafana/grafana/pull/9367)
|
||||
* **Alerting**: Add diff and percent diff as series reducers [#9386](https://github.com/grafana/grafana/pull/9386), thx [@shanhuhai5739](https://github.com/shanhuhai5739)
|
||||
* **Slack**: Allow images to be uploaded to slack when Token is precent [#7175](https://github.com/grafana/grafana/issues/7175), thx [@xginn8](https://github.com/xginn8)
|
||||
* **Slack**: Allow images to be uploaded to slack when Token is present [#7175](https://github.com/grafana/grafana/issues/7175), thx [@xginn8](https://github.com/xginn8)
|
||||
* **Opsgenie**: Use their latest API instead of old version [#9399](https://github.com/grafana/grafana/pull/9399), thx [@cglrkn](https://github.com/cglrkn)
|
||||
* **Table**: Add support for displaying the timestamp with milliseconds [#9429](https://github.com/grafana/grafana/pull/9429), thx [@s1061123](https://github.com/s1061123)
|
||||
* **Hipchat**: Add metrics, message and image to hipchat notifications [#9110](https://github.com/grafana/grafana/issues/9110), thx [@eloo](https://github.com/eloo)
|
||||
|
||||
@@ -22,9 +22,10 @@ module.exports = function (grunt) {
|
||||
}
|
||||
}
|
||||
|
||||
config.coverage = grunt.option('coverage');
|
||||
config.phjs = grunt.option('phjsToRelease');
|
||||
|
||||
config.pkg.version = grunt.option('pkgVer') || config.pkg.version;
|
||||
|
||||
console.log('Version', config.pkg.version);
|
||||
|
||||
// load plugins
|
||||
|
||||
208
LICENSE.md
208
LICENSE.md
@@ -1,14 +1,202 @@
|
||||
Copyright 2014-2017 Torkel Ödegaard, Raintank Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you
|
||||
may not use this file except in compliance with the License. You may
|
||||
obtain a copy of the License at
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
permissions and limitations under the License.
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
16
NOTICE.md
16
NOTICE.md
@@ -1,16 +1,6 @@
|
||||
|
||||
This software is based on Kibana:
|
||||
========================================
|
||||
Copyright 2014-2017 Grafana Labs
|
||||
|
||||
This software is based on Kibana:
|
||||
Copyright 2012-2013 Elasticsearch BV
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you
|
||||
may not use this file except in compliance with the License. You may
|
||||
obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing
|
||||
permissions and limitations under the License.
|
||||
|
||||
@@ -23,6 +23,6 @@ If you think we missed exposing a crucial lib or Grafana component let us know b
|
||||
|
||||
### Deprecated components
|
||||
|
||||
The angular directive `<spectrum-picker>` is no deprecated (will still work for a version more) but we recommend plugin authors
|
||||
The angular directive `<spectrum-picker>` is now deprecated (will still work for a version more) but we recommend plugin authors
|
||||
to upgrade to new `<color-picker color="ctrl.color" onChange="ctrl.onSparklineColorChange"></color-picker>`
|
||||
|
||||
|
||||
24
README.md
24
README.md
@@ -1,4 +1,4 @@
|
||||
[Grafana](https://grafana.com) [](https://circleci.com/gh/grafana/grafana) [](https://goreportcard.com/report/github.com/grafana/grafana)
|
||||
[Grafana](https://grafana.com) [](https://circleci.com/gh/grafana/grafana) [](https://goreportcard.com/report/github.com/grafana/grafana) [](https://codecov.io/gh/grafana/grafana)
|
||||
================
|
||||
[Website](https://grafana.com) |
|
||||
[Twitter](https://twitter.com/grafana) |
|
||||
@@ -19,7 +19,7 @@ If you have any problems please read the [troubleshooting guide](http://docs.gra
|
||||
Be sure to read the [getting started guide](http://docs.grafana.org/guides/gettingstarted/) and the other feature guides.
|
||||
|
||||
## Run from master
|
||||
If you want to build a package yourself, or contribute. Here is a guide for how to do that. You can always find
|
||||
If you want to build a package yourself, or contribute - Here is a guide for how to do that. You can always find
|
||||
the latest master builds [here](https://grafana.com/grafana/download)
|
||||
|
||||
### Dependencies
|
||||
@@ -81,16 +81,30 @@ You only need to add the options you want to override. Config files are applied
|
||||
|
||||
In your custom.ini uncomment (remove the leading `;`) sign. And set `app_mode = development`.
|
||||
|
||||
### Running tests
|
||||
|
||||
- You can run backend Golang tests using "go test ./pkg/...".
|
||||
- Execute all frontend tests with "npm run test"
|
||||
|
||||
Writing & watching frontend tests (we have two test runners)
|
||||
|
||||
- jest for all new tests that do not require browser context (React+more)
|
||||
- Start watcher: `npm run jest`
|
||||
- Jest will run all test files that end with the name ".jest.ts"
|
||||
- karma + mocha is used for testing angularjs components. We do want to migrate these test to jest over time (if possible).
|
||||
- Start watcher: `npm run karma`
|
||||
- Karma+Mocha runs all files that end with the name "_specs.ts".
|
||||
|
||||
## Contribute
|
||||
|
||||
If you have any idea for an improvement or found a bug do not hesitate to open an issue.
|
||||
If you have any idea for an improvement or found a bug, do not hesitate to open an issue.
|
||||
And if you have time clone this repo and submit a pull request and help me make Grafana
|
||||
the kickass metrics & devops dashboard we all dream about!
|
||||
|
||||
## Plugin development
|
||||
|
||||
Checkout the [Plugin Development Guide](http://docs.grafana.org/plugins/developing/development/) and checkout the [PLUGIN_DEV.md](https://github.com/grafana/grafana/blob/master/PLUGIN_DEV.md) file for changes in Grafana that relate to
|
||||
plugin development.
|
||||
Checkout the [Plugin Development Guide](http://docs.grafana.org/plugins/developing/development/) and checkout the [PLUGIN_DEV.md](https://github.com/grafana/grafana/blob/master/PLUGIN_DEV.md) file for changes in Grafana that relate to
|
||||
plugin development.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
25
ROADMAP.md
25
ROADMAP.md
@@ -1,29 +1,36 @@
|
||||
# Roadmap (2017-08-29)
|
||||
# Roadmap (2017-10-31)
|
||||
|
||||
This roadmap is a tentative plan for the core development team. Things change constantly as PRs come in and priorities change.
|
||||
But it will give you an idea of our current vision and plan.
|
||||
|
||||
### Short term (1-4 months)
|
||||
|
||||
- Release Grafana v4.5 with fixes and minor enhancements
|
||||
- Release Grafana v5
|
||||
- User groups
|
||||
- Dashboard folders
|
||||
- Dashboard permissions (on folders as well), permissions on groups or users
|
||||
- Dashboard & folder permissions (assigned to users or groups)
|
||||
- New Dashboard layout engine
|
||||
- New sidemenu & nav UX
|
||||
- Elasticsearch alerting
|
||||
- React migration foundation (core components)
|
||||
- Graphite 1.1 Tags Support
|
||||
|
||||
### Long term
|
||||
### Long term (4 - 8 months)
|
||||
|
||||
- Backend plugins to support more Auth options, Alerting data sources & notifications
|
||||
- Universal time series transformations for any data source (meta queries)
|
||||
- Reporting
|
||||
- Web socket & live data streams
|
||||
- Migrate to Angular2 or react
|
||||
- Alerting improvements (silence, per series tracking, etc)
|
||||
- Dashboard as configuration and other automation / provisioning improvements
|
||||
- Progress on React migration
|
||||
- Change visualization (panel type) on the fly.
|
||||
- Multi stat panel (vertical version of singlestat with bars/graph mode with big number etc)
|
||||
- Repeat panel by query results
|
||||
|
||||
### In a distant future far far away
|
||||
|
||||
- Meta queries
|
||||
- Integrated light weight TSDB
|
||||
- Web socket & live data sources
|
||||
|
||||
### Outside contributions
|
||||
We know this is being worked on right now by contributors (and we hope to merge it when it's ready).
|
||||
|
||||
- Clustering for alert engine (load distribution)
|
||||
|
||||
6
build.go
6
build.go
@@ -95,9 +95,9 @@ func main() {
|
||||
|
||||
case "package":
|
||||
grunt(gruntBuildArg("release")...)
|
||||
if runtime.GOOS != "windows" {
|
||||
createLinuxPackages()
|
||||
}
|
||||
if runtime.GOOS != "windows" {
|
||||
createLinuxPackages()
|
||||
}
|
||||
|
||||
case "pkg-rpm":
|
||||
grunt(gruntBuildArg("release")...)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
machine:
|
||||
node:
|
||||
version: 6.9.2
|
||||
version: 6.11.4
|
||||
python:
|
||||
version: 2.7.3
|
||||
services:
|
||||
@@ -30,10 +30,10 @@ dependencies:
|
||||
- sudo apt-get update; sudo apt-get install rpm; sudo apt-get install expect
|
||||
- ./scripts/build/build_container.sh
|
||||
|
||||
|
||||
test:
|
||||
override:
|
||||
- bash scripts/circle-test.sh
|
||||
- bash scripts/circle-test-frontend.sh
|
||||
- bash scripts/circle-test-backend.sh
|
||||
|
||||
deployment:
|
||||
gh_branch:
|
||||
|
||||
13
codecov.yml
Normal file
13
codecov.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
coverage:
|
||||
precision: 2
|
||||
round: down
|
||||
range: "50...100"
|
||||
|
||||
status:
|
||||
project: yes
|
||||
patch: yes
|
||||
changes: no
|
||||
|
||||
comment:
|
||||
layout: "diff"
|
||||
behavior: "once"
|
||||
@@ -12,17 +12,17 @@ instance_name = ${HOSTNAME}
|
||||
#################################### Paths ###############################
|
||||
[paths]
|
||||
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
|
||||
#
|
||||
data = data
|
||||
#
|
||||
|
||||
# Directory where grafana can store logs
|
||||
#
|
||||
logs = data/log
|
||||
#
|
||||
|
||||
# Directory where grafana will automatically scan and look for plugins
|
||||
#
|
||||
plugins = data/plugins
|
||||
|
||||
# folder that contains provisioning config files that grafana will apply on startup and while running.
|
||||
provisioning = conf/provisioning
|
||||
|
||||
#################################### Server ##############################
|
||||
[server]
|
||||
# Protocol (http, https, socket)
|
||||
@@ -82,6 +82,9 @@ max_idle_conn = 2
|
||||
# Max conn setting default is 0 (mean not set)
|
||||
max_open_conn =
|
||||
|
||||
# Set to true to log the sql calls and execution times.
|
||||
log_queries =
|
||||
|
||||
# For "postgres", use either "disable", "require" or "verify-full"
|
||||
# For "mysql", use either "true", "false", or "skip-verify".
|
||||
ssl_mode = disable
|
||||
@@ -171,6 +174,7 @@ disable_gravatar = false
|
||||
# data source proxy whitelist (ip_or_domain:port separated by spaces)
|
||||
data_source_proxy_whitelist =
|
||||
|
||||
#################################### Snapshots ###########################
|
||||
[snapshots]
|
||||
# snapshot sharing options
|
||||
external_enabled = true
|
||||
@@ -183,7 +187,13 @@ snapshot_remove_expired = true
|
||||
# remove snapshots after 90 days
|
||||
snapshot_TTL_days = 90
|
||||
|
||||
#################################### Users ####################################
|
||||
#################################### Dashboards ##################
|
||||
|
||||
[dashboards]
|
||||
# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
|
||||
versions_to_keep = 20
|
||||
|
||||
#################################### Users ###############################
|
||||
[users]
|
||||
# disable user signup / registration
|
||||
allow_sign_up = false
|
||||
@@ -211,6 +221,9 @@ external_manage_link_url =
|
||||
external_manage_link_name =
|
||||
external_manage_info =
|
||||
|
||||
# Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard.
|
||||
viewers_can_edit = false
|
||||
|
||||
[auth]
|
||||
# Set to true to disable (hide) the login form, useful if you use OAuth
|
||||
disable_login_form = false
|
||||
@@ -381,18 +394,6 @@ facility =
|
||||
# Syslog tag. By default, the process' argv[0] is used.
|
||||
tag =
|
||||
|
||||
|
||||
#################################### AMQP Event Publisher ################
|
||||
[event_publisher]
|
||||
enabled = false
|
||||
rabbitmq_url = amqp://localhost/
|
||||
exchange = grafana_events
|
||||
|
||||
#################################### Dashboard JSON files ################
|
||||
[dashboards.json]
|
||||
enabled = false
|
||||
path = /var/lib/grafana/dashboards
|
||||
|
||||
#################################### Usage Quotas ########################
|
||||
[quota]
|
||||
enabled = false
|
||||
@@ -436,7 +437,7 @@ enabled = true
|
||||
execute_alerts = true
|
||||
|
||||
#################################### Internal Grafana Metrics ############
|
||||
# Metrics available at HTTP API Url /api/metrics
|
||||
# Metrics available at HTTP API Url /metrics
|
||||
[metrics]
|
||||
enabled = true
|
||||
interval_seconds = 10
|
||||
@@ -492,3 +493,4 @@ public_url =
|
||||
[external_image_storage.gcs]
|
||||
key_file =
|
||||
bucket =
|
||||
path =
|
||||
6
conf/provisioning/dashboards/sample.yaml
Normal file
6
conf/provisioning/dashboards/sample.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
# - name: 'default'
|
||||
# org_id: 1
|
||||
# folder: ''
|
||||
# type: file
|
||||
# options:
|
||||
# folder: /var/lib/grafana/dashboards
|
||||
48
conf/provisioning/datasources/sample.yaml
Normal file
48
conf/provisioning/datasources/sample.yaml
Normal file
@@ -0,0 +1,48 @@
|
||||
# # list of datasources that should be deleted from the database
|
||||
#delete_datasources:
|
||||
# - name: Graphite
|
||||
# org_id: 1
|
||||
|
||||
# # list of datasources to insert/update depending
|
||||
# # whats available in the datbase
|
||||
#datasources:
|
||||
# # <string, required> name of the datasource. Required
|
||||
# - name: Graphite
|
||||
# # <string, required> datasource type. Required
|
||||
# type: graphite
|
||||
# # <string, required> access mode. direct or proxy. Required
|
||||
# access: proxy
|
||||
# # <int> org id. will default to org_id 1 if not specified
|
||||
# org_id: 1
|
||||
# # <string> url
|
||||
# url: http://localhost:8080
|
||||
# # <string> database password, if used
|
||||
# password:
|
||||
# # <string> database user, if used
|
||||
# user:
|
||||
# # <string> database name, if used
|
||||
# database:
|
||||
# # <bool> enable/disable basic auth
|
||||
# basic_auth:
|
||||
# # <string> basic auth username
|
||||
# basic_auth_user:
|
||||
# # <string> basic auth password
|
||||
# basic_auth_password:
|
||||
# # <bool> enable/disable with credentials headers
|
||||
# with_credentials:
|
||||
# # <bool> mark as default datasource. Max one per org
|
||||
# is_default:
|
||||
# # <map> fields that will be converted to json and stored in json_data
|
||||
# json_data:
|
||||
# graphiteVersion: "1.1"
|
||||
# tlsAuth: true
|
||||
# tlsAuthWithCACert: true
|
||||
# # <string> json object of data that will be encrypted.
|
||||
# secure_json_data:
|
||||
# tlsCACert: "..."
|
||||
# tlsClientCert: "..."
|
||||
# tlsClientKey: "..."
|
||||
# version: 1
|
||||
# # <bool> allow users to edit datasources from the UI.
|
||||
# editable: false
|
||||
|
||||
@@ -12,18 +12,17 @@
|
||||
#################################### Paths ####################################
|
||||
[paths]
|
||||
# Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used)
|
||||
#
|
||||
;data = /var/lib/grafana
|
||||
#
|
||||
|
||||
# Directory where grafana can store logs
|
||||
#
|
||||
;logs = /var/log/grafana
|
||||
#
|
||||
|
||||
# Directory where grafana will automatically scan and look for plugins
|
||||
#
|
||||
;plugins = /var/lib/grafana/plugins
|
||||
|
||||
#
|
||||
# folder that contains provisioning config files that grafana will apply on startup and while running.
|
||||
; provisioning = conf/provisioning
|
||||
|
||||
#################################### Server ####################################
|
||||
[server]
|
||||
# Protocol (http, https, socket)
|
||||
@@ -91,6 +90,8 @@
|
||||
# Max conn setting default is 0 (mean not set)
|
||||
;max_open_conn =
|
||||
|
||||
# Set to true to log the sql calls and execution times.
|
||||
log_queries =
|
||||
|
||||
#################################### Session ####################################
|
||||
[session]
|
||||
@@ -161,6 +162,7 @@
|
||||
# data source proxy whitelist (ip_or_domain:port separated by spaces)
|
||||
;data_source_proxy_whitelist =
|
||||
|
||||
#################################### Snapshots ###########################
|
||||
[snapshots]
|
||||
# snapshot sharing options
|
||||
;external_enabled = true
|
||||
@@ -173,7 +175,12 @@
|
||||
# remove snapshots after 90 days
|
||||
;snapshot_TTL_days = 90
|
||||
|
||||
#################################### Users ####################################
|
||||
#################################### Dashboards History ##################
|
||||
[dashboards]
|
||||
# Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1
|
||||
;versions_to_keep = 20
|
||||
|
||||
#################################### Users ###############################
|
||||
[users]
|
||||
# disable user signup / registration
|
||||
;allow_sign_up = true
|
||||
@@ -198,6 +205,9 @@
|
||||
;external_manage_link_name =
|
||||
;external_manage_info =
|
||||
|
||||
# Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard.
|
||||
;viewers_can_edit = false
|
||||
|
||||
[auth]
|
||||
# Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false
|
||||
;disable_login_form = false
|
||||
@@ -360,17 +370,6 @@
|
||||
;tag =
|
||||
|
||||
|
||||
#################################### AMQP Event Publisher ##########################
|
||||
[event_publisher]
|
||||
;enabled = false
|
||||
;rabbitmq_url = amqp://localhost/
|
||||
;exchange = grafana_events
|
||||
|
||||
;#################################### Dashboard JSON files ##########################
|
||||
[dashboards.json]
|
||||
;enabled = false
|
||||
;path = /var/lib/grafana/dashboards
|
||||
|
||||
#################################### Alerting ############################
|
||||
[alerting]
|
||||
# Disable alerting engine & UI features
|
||||
@@ -379,7 +378,7 @@
|
||||
;execute_alerts = true
|
||||
|
||||
#################################### Internal Grafana Metrics ##########################
|
||||
# Metrics available at HTTP API Url /api/metrics
|
||||
# Metrics available at HTTP API Url /metrics
|
||||
[metrics]
|
||||
# Disable / Enable internal metrics
|
||||
;enabled = true
|
||||
@@ -437,3 +436,4 @@
|
||||
[external_image_storage.gcs]
|
||||
;key_file =
|
||||
;bucket =
|
||||
;path =
|
||||
11
docker/blocks/collectd/docker-compose.yaml
Normal file
11
docker/blocks/collectd/docker-compose.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
collectd:
|
||||
build: blocks/collectd
|
||||
environment:
|
||||
HOST_NAME: myserver
|
||||
GRAPHITE_HOST: graphite
|
||||
GRAPHITE_PORT: 2003
|
||||
GRAPHITE_PREFIX: collectd.
|
||||
REPORT_BY_CPU: 'false'
|
||||
COLLECT_INTERVAL: 10
|
||||
links:
|
||||
- graphite
|
||||
@@ -1,11 +0,0 @@
|
||||
collectd:
|
||||
build: blocks/collectd
|
||||
environment:
|
||||
HOST_NAME: myserver
|
||||
GRAPHITE_HOST: graphite
|
||||
GRAPHITE_PORT: 2003
|
||||
GRAPHITE_PREFIX: collectd.
|
||||
REPORT_BY_CPU: 'false'
|
||||
COLLECT_INTERVAL: 10
|
||||
links:
|
||||
- graphite
|
||||
8
docker/blocks/elastic/docker-compose.yaml
Normal file
8
docker/blocks/elastic/docker-compose.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
elasticsearch:
|
||||
image: elasticsearch:2.4.1
|
||||
command: elasticsearch -Des.network.host=0.0.0.0
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
- ./blocks/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
@@ -1,8 +0,0 @@
|
||||
elasticsearch:
|
||||
image: elasticsearch:2.4.1
|
||||
command: elasticsearch -Des.network.host=0.0.0.0
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
- ./blocks/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
8
docker/blocks/elastic1/docker-compose.yaml
Normal file
8
docker/blocks/elastic1/docker-compose.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
elasticsearch1:
|
||||
image: elasticsearch:1.7.6
|
||||
command: elasticsearch -Des.network.host=0.0.0.0
|
||||
ports:
|
||||
- "11200:9200"
|
||||
- "11300:9300"
|
||||
volumes:
|
||||
- ./blocks/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
@@ -1,8 +0,0 @@
|
||||
elasticsearch1:
|
||||
image: elasticsearch:1.7.6
|
||||
command: elasticsearch -Des.network.host=0.0.0.0
|
||||
ports:
|
||||
- "11200:9200"
|
||||
- "11300:9300"
|
||||
volumes:
|
||||
- ./blocks/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
8
docker/blocks/elastic5/docker-compose.yaml
Normal file
8
docker/blocks/elastic5/docker-compose.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
|
||||
|
||||
elasticsearch5:
|
||||
image: elasticsearch:5
|
||||
command: elasticsearch
|
||||
ports:
|
||||
- "10200:9200"
|
||||
- "10300:9300"
|
||||
@@ -1,8 +0,0 @@
|
||||
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
|
||||
|
||||
elasticsearch5:
|
||||
image: elasticsearch:5
|
||||
command: elasticsearch
|
||||
ports:
|
||||
- "10200:9200"
|
||||
- "10300:9300"
|
||||
16
docker/blocks/graphite/docker-compose.yaml
Normal file
16
docker/blocks/graphite/docker-compose.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
graphite09:
|
||||
build: blocks/graphite
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "2003:2003"
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
|
||||
fake-graphite-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: graphite
|
||||
FD_PORT: 2003
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
graphite:
|
||||
build: blocks/graphite
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "2003:2003"
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
|
||||
fake-graphite-data:
|
||||
image: grafana/fake-data-gen
|
||||
net: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: graphite
|
||||
FD_PORT: 2003
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
FROM phusion/baseimage:0.9.22
|
||||
MAINTAINER Denys Zhdanov <denis.zhdanov@gmail.com>
|
||||
|
||||
|
||||
RUN apt-get -y update \
|
||||
&& apt-get -y upgrade \
|
||||
&& apt-get -y --force-yes install vim \
|
||||
&& apt-get -y install vim \
|
||||
nginx \
|
||||
python-dev \
|
||||
python-flup \
|
||||
@@ -22,38 +23,67 @@ RUN apt-get -y update \
|
||||
nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# choose a timezone at build-time
|
||||
# use `--build-arg CONTAINER_TIMEZONE=Europe/Brussels` in `docker build`
|
||||
ARG CONTAINER_TIMEZONE
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
RUN if [ ! -z "${CONTAINER_TIMEZONE}" ]; \
|
||||
then ln -sf /usr/share/zoneinfo/$CONTAINER_TIMEZONE /etc/localtime && \
|
||||
dpkg-reconfigure -f noninteractive tzdata; \
|
||||
fi
|
||||
|
||||
# fix python dependencies (LTS Django and newer memcached/txAMQP)
|
||||
RUN pip install django==1.8.18 \
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install django==1.8.18 \
|
||||
python-memcached==1.53 \
|
||||
txAMQP==0.6.2 \
|
||||
&& pip install --upgrade pip
|
||||
txAMQP==0.6.2
|
||||
|
||||
ARG version=1.0.2
|
||||
ARG whisper_version=${version}
|
||||
ARG carbon_version=${version}
|
||||
ARG graphite_version=${version}
|
||||
|
||||
RUN echo "Building Version: $version"
|
||||
|
||||
ARG whisper_repo=https://github.com/graphite-project/whisper.git
|
||||
ARG carbon_repo=https://github.com/graphite-project/carbon.git
|
||||
ARG graphite_repo=https://github.com/graphite-project/graphite-web.git
|
||||
|
||||
ARG statsd_version=v0.8.0
|
||||
|
||||
ARG statsd_repo=https://github.com/etsy/statsd.git
|
||||
|
||||
# install whisper
|
||||
RUN git clone -b 1.0.2 --depth 1 https://github.com/graphite-project/whisper.git /usr/local/src/whisper
|
||||
RUN git clone -b ${whisper_version} --depth 1 ${whisper_repo} /usr/local/src/whisper
|
||||
WORKDIR /usr/local/src/whisper
|
||||
RUN python ./setup.py install
|
||||
|
||||
# install carbon
|
||||
RUN git clone -b 1.0.2 --depth 1 https://github.com/graphite-project/carbon.git /usr/local/src/carbon
|
||||
RUN git clone -b ${carbon_version} --depth 1 ${carbon_repo} /usr/local/src/carbon
|
||||
WORKDIR /usr/local/src/carbon
|
||||
RUN pip install -r requirements.txt \
|
||||
&& python ./setup.py install
|
||||
|
||||
# install graphite
|
||||
RUN git clone -b 1.0.2 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web
|
||||
RUN git clone -b ${graphite_version} --depth 1 ${graphite_repo} /usr/local/src/graphite-web
|
||||
WORKDIR /usr/local/src/graphite-web
|
||||
RUN pip install -r requirements.txt \
|
||||
&& python ./setup.py install
|
||||
|
||||
# install statsd
|
||||
RUN git clone -b ${statsd_version} ${statsd_repo} /opt/statsd
|
||||
|
||||
# config graphite
|
||||
ADD conf/opt/graphite/conf/*.conf /opt/graphite/conf/
|
||||
ADD conf/opt/graphite/webapp/graphite/local_settings.py /opt/graphite/webapp/graphite/local_settings.py
|
||||
ADD conf/opt/graphite/webapp/graphite/app_settings.py /opt/graphite/webapp/graphite/app_settings.py
|
||||
# ADD conf/opt/graphite/webapp/graphite/app_settings.py /opt/graphite/webapp/graphite/app_settings.py
|
||||
WORKDIR /opt/graphite/webapp
|
||||
RUN mkdir -p /var/log/graphite/ \
|
||||
&& PYTHONPATH=/opt/graphite/webapp django-admin.py collectstatic --noinput --settings=graphite.settings
|
||||
|
||||
# install statsd
|
||||
RUN git clone -b v0.7.2 https://github.com/etsy/statsd.git /opt/statsd
|
||||
ADD conf/opt/statsd/config.js /opt/statsd/config.js
|
||||
# config statsd
|
||||
ADD conf/opt/statsd/config.js /opt/statsd/
|
||||
|
||||
# config nginx
|
||||
RUN rm /etc/nginx/sites-enabled/default
|
||||
@@ -63,8 +93,7 @@ ADD conf/etc/nginx/sites-enabled/graphite-statsd.conf /etc/nginx/sites-enabled/g
|
||||
# init django admin
|
||||
ADD conf/usr/local/bin/django_admin_init.exp /usr/local/bin/django_admin_init.exp
|
||||
ADD conf/usr/local/bin/manage.sh /usr/local/bin/manage.sh
|
||||
RUN chmod +x /usr/local/bin/manage.sh \
|
||||
&& /usr/local/bin/django_admin_init.exp
|
||||
RUN chmod +x /usr/local/bin/manage.sh && /usr/local/bin/django_admin_init.exp
|
||||
|
||||
# logging support
|
||||
RUN mkdir -p /var/log/carbon /var/log/graphite /var/log/nginx
|
||||
@@ -86,8 +115,10 @@ RUN apt-get clean\
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# defaults
|
||||
EXPOSE 80 2003-2004 2023-2024 8125/udp 8126
|
||||
EXPOSE 80 2003-2004 2023-2024 8125 8125/udp 8126
|
||||
VOLUME ["/opt/graphite/conf", "/opt/graphite/storage", "/etc/nginx", "/opt/statsd", "/etc/logrotate.d", "/var/log"]
|
||||
WORKDIR /
|
||||
ENV HOME /root
|
||||
ENV STATSD_INTERFACE udp
|
||||
|
||||
CMD ["/sbin/my_init"]
|
||||
|
||||
@@ -12,7 +12,7 @@ graphite_conf_dir_contents=$(find /opt/graphite/conf -mindepth 1 -print -quit)
|
||||
graphite_webapp_dir_contents=$(find /opt/graphite/webapp/graphite -mindepth 1 -print -quit)
|
||||
graphite_storage_dir_contents=$(find /opt/graphite/storage -mindepth 1 -print -quit)
|
||||
if [[ -z $graphite_dir_contents ]]; then
|
||||
git clone -b 1.0.2 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web
|
||||
# git clone -b 1.0.2 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web
|
||||
cd /usr/local/src/graphite-web && python ./setup.py install
|
||||
fi
|
||||
if [[ -z $graphite_storage_dir_contents ]]; then
|
||||
|
||||
@@ -8,18 +8,18 @@
|
||||
# Defaults to ../
|
||||
# GRAPHITE_CONF_DIR - Configuration directory (where this file lives).
|
||||
# Defaults to $GRAPHITE_ROOT/conf/
|
||||
# GRAPHITE_STORAGE_DIR - Storage directory for whipser/rrd/log/pid files.
|
||||
# GRAPHITE_STORAGE_DIR - Storage directory for whisper/rrd/log/pid files.
|
||||
# Defaults to $GRAPHITE_ROOT/storage/
|
||||
#
|
||||
# To change other directory paths, add settings to this file. The following
|
||||
# configuration variables are available with these default values:
|
||||
#
|
||||
# STORAGE_DIR = $GRAPHITE_STORAGE_DIR
|
||||
# LOCAL_DATA_DIR = STORAGE_DIR/whisper/
|
||||
# WHITELISTS_DIR = STORAGE_DIR/lists/
|
||||
# CONF_DIR = STORAGE_DIR/conf/
|
||||
# LOG_DIR = STORAGE_DIR/log/
|
||||
# PID_DIR = STORAGE_DIR/
|
||||
# LOCAL_DATA_DIR = %(STORAGE_DIR)s/whisper/
|
||||
# WHITELISTS_DIR = %(STORAGE_DIR)s/lists/
|
||||
# CONF_DIR = %(STORAGE_DIR)s/conf/
|
||||
# LOG_DIR = %(STORAGE_DIR)s/log/
|
||||
# PID_DIR = %(STORAGE_DIR)s/
|
||||
#
|
||||
# For FHS style directory structures, use:
|
||||
#
|
||||
@@ -30,20 +30,30 @@
|
||||
#
|
||||
#LOCAL_DATA_DIR = /opt/graphite/storage/whisper/
|
||||
|
||||
# Enable daily log rotation. If disabled, a kill -HUP can be used after a manual rotate
|
||||
# Specify the database library used to store metric data on disk. Each database
|
||||
# may have configurable options to change the behaviour of how it writes to
|
||||
# persistent storage.
|
||||
#
|
||||
# whisper - Fixed-size database, similar in design and purpose to RRD. This is
|
||||
# the default storage backend for carbon and the most rigorously tested.
|
||||
#
|
||||
# ceres - Experimental alternative database that supports storing data in sparse
|
||||
# files of arbitrary fixed-size resolutions.
|
||||
DATABASE = whisper
|
||||
|
||||
# Enable daily log rotation. If disabled, a new file will be opened whenever the log file path no
|
||||
# longer exists (i.e. it is removed or renamed)
|
||||
ENABLE_LOGROTATION = True
|
||||
|
||||
# Specify the user to drop privileges to
|
||||
# If this is blank carbon runs as the user that invokes it
|
||||
# If this is blank carbon-cache runs as the user that invokes it
|
||||
# This user must have write access to the local data directory
|
||||
USER =
|
||||
#
|
||||
# NOTE: The above settings must be set under [relay] and [aggregator]
|
||||
# to take effect for those daemons as well
|
||||
|
||||
# Limit the size of the cache to avoid swapping or becoming CPU bound.
|
||||
# Sorts and serving cache queries gets more expensive as the cache grows.
|
||||
# Use the value "inf" (infinity) for an unlimited cache size.
|
||||
# value should be an integer number of metric datapoints.
|
||||
MAX_CACHE_SIZE = inf
|
||||
|
||||
# Limits the number of whisper update_many() calls per second, which effectively
|
||||
@@ -60,14 +70,30 @@ MAX_UPDATES_PER_SECOND = 500
|
||||
# MAX_UPDATES_PER_SECOND_ON_SHUTDOWN = 1000
|
||||
|
||||
# Softly limits the number of whisper files that get created each minute.
|
||||
# Setting this value low (like at 50) is a good way to ensure your graphite
|
||||
# Setting this value low (e.g. 50) is a good way to ensure that your carbon
|
||||
# system will not be adversely impacted when a bunch of new metrics are
|
||||
# sent to it. The trade off is that it will take much longer for those metrics'
|
||||
# database files to all get created and thus longer until the data becomes usable.
|
||||
# Setting this value high (like "inf" for infinity) will cause graphite to create
|
||||
# the files quickly but at the risk of slowing I/O down considerably for a while.
|
||||
# sent to it. The trade off is that any metrics received in excess of this
|
||||
# value will be silently dropped, and the whisper file will not be created
|
||||
# until such point as a subsequent metric is received and fits within the
|
||||
# defined rate limit. Setting this value high (like "inf" for infinity) will
|
||||
# cause carbon to create the files quickly but at the risk of increased I/O.
|
||||
MAX_CREATES_PER_MINUTE = 50
|
||||
|
||||
# Set the minimum timestamp resolution supported by this instance. This allows
|
||||
# internal optimisations by overwriting points with equal truncated timestamps
|
||||
# in order to limit the number of updates to the database. It defaults to one
|
||||
# second.
|
||||
MIN_TIMESTAMP_RESOLUTION = 1
|
||||
|
||||
# Set the minimum lag in seconds for a point to be written to the database
|
||||
# in order to optimize batching. This means that each point will wait at least
|
||||
# the duration of this lag before being written. Setting this to 0 disable the feature.
|
||||
# This currently only works when using the timesorted write strategy.
|
||||
# MIN_TIMESTAMP_LAG = 0
|
||||
|
||||
# Set the interface and port for the line (plain text) listener. Setting the
|
||||
# interface to 0.0.0.0 listens on all interfaces. Port can be set to 0 to
|
||||
# disable this listener if it is not required.
|
||||
LINE_RECEIVER_INTERFACE = 0.0.0.0
|
||||
LINE_RECEIVER_PORT = 2003
|
||||
|
||||
@@ -78,11 +104,23 @@ ENABLE_UDP_LISTENER = False
|
||||
UDP_RECEIVER_INTERFACE = 0.0.0.0
|
||||
UDP_RECEIVER_PORT = 2003
|
||||
|
||||
# Set the interface and port for the pickle listener. Setting the interface to
|
||||
# 0.0.0.0 listens on all interfaces. Port can be set to 0 to disable this
|
||||
# listener if it is not required.
|
||||
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
|
||||
PICKLE_RECEIVER_PORT = 2004
|
||||
|
||||
# Set to false to disable logging of successful connections
|
||||
LOG_LISTENER_CONNECTIONS = True
|
||||
# Set the interface and port for the protobuf listener. Setting the interface to
|
||||
# 0.0.0.0 listens on all interfaces. Port can be set to 0 to disable this
|
||||
# listener if it is not required.
|
||||
# PROTOBUF_RECEIVER_INTERFACE = 0.0.0.0
|
||||
# PROTOBUF_RECEIVER_PORT = 2005
|
||||
|
||||
# Limit the number of open connections the receiver can handle as any time.
|
||||
# Default is no limit. Setting up a limit for sites handling high volume
|
||||
# traffic may be recommended to avoid running out of TCP memory or having
|
||||
# thousands of TCP connections reduce the throughput of the service.
|
||||
#MAX_RECEIVER_CONNECTIONS = inf
|
||||
|
||||
# Per security concerns outlined in Bug #817247 the pickle receiver
|
||||
# will use a more secure and slightly less efficient unpickler.
|
||||
@@ -98,13 +136,19 @@ CACHE_QUERY_PORT = 7002
|
||||
# data until the cache size falls below 95% MAX_CACHE_SIZE.
|
||||
USE_FLOW_CONTROL = True
|
||||
|
||||
# By default, carbon-cache will log every whisper update and cache hit. This can be excessive and
|
||||
# degrade performance if logging on the same volume as the whisper data is stored.
|
||||
LOG_UPDATES = False
|
||||
LOG_CACHE_HITS = False
|
||||
LOG_CACHE_QUEUE_SORTS = True
|
||||
# If enabled this setting is used to timeout metric client connection if no
|
||||
# metrics have been sent in specified time in seconds
|
||||
#METRIC_CLIENT_IDLE_TIMEOUT = None
|
||||
|
||||
# The thread that writes metrics to disk can use on of the following strategies
|
||||
# By default, carbon-cache will log every whisper update and cache hit.
|
||||
# This can be excessive and degrade performance if logging on the same
|
||||
# volume as the whisper data is stored.
|
||||
LOG_UPDATES = False
|
||||
LOG_CREATES = False
|
||||
LOG_CACHE_HITS = False
|
||||
LOG_CACHE_QUEUE_SORTS = False
|
||||
|
||||
# The thread that writes metrics to disk can use one of the following strategies
|
||||
# determining the order in which metrics are removed from cache and flushed to
|
||||
# disk. The default option preserves the same behavior as has been historically
|
||||
# available in version 0.9.10.
|
||||
@@ -114,6 +158,12 @@ LOG_CACHE_QUEUE_SORTS = True
|
||||
# moment of the list's creation. Metrics will then be flushed from the cache to
|
||||
# disk in that order.
|
||||
#
|
||||
# timesorted - All metrics in the list will be looked at and sorted according
|
||||
# to the timestamp of there datapoints. The metric that were the least recently
|
||||
# written will be written first. This is an hybrid strategy between max and
|
||||
# sorted which is particularly adapted to sets of metrics with non-uniform
|
||||
# resolutions.
|
||||
#
|
||||
# max - The writer thread will always pop and flush the metric from cache
|
||||
# that has the most datapoints. This will give a strong flush preference to
|
||||
# frequently updated metrics and will also reduce random file-io. Infrequently
|
||||
@@ -152,12 +202,61 @@ WHISPER_FALLOCATE_CREATE = True
|
||||
|
||||
# Enabling this option will cause Whisper to lock each Whisper file it writes
|
||||
# to with an exclusive lock (LOCK_EX, see: man 2 flock). This is useful when
|
||||
# multiple carbon-cache daemons are writing to the same files
|
||||
# multiple carbon-cache daemons are writing to the same files.
|
||||
# WHISPER_LOCK_WRITES = False
|
||||
|
||||
# On systems which has a large number of metrics, an amount of Whisper write(2)'s
|
||||
# pageback sometimes cause disk thrashing due to memory shortage, so that abnormal
|
||||
# disk reads occur. Enabling this option makes it possible to decrease useless
|
||||
# page cache memory by posix_fadvise(2) with POSIX_FADVISE_RANDOM option.
|
||||
# WHISPER_FADVISE_RANDOM = False
|
||||
|
||||
# By default all nodes stored in Ceres are cached in memory to improve the
|
||||
# throughput of reads and writes to underlying slices. Turning this off will
|
||||
# greatly reduce memory consumption for databases with millions of metrics, at
|
||||
# the cost of a steep increase in disk i/o, approximately an extra two os.stat
|
||||
# calls for every read and write. Reasons to do this are if the underlying
|
||||
# storage can handle stat() with practically zero cost (SSD, NVMe, zRAM).
|
||||
# Valid values are:
|
||||
# all - all nodes are cached
|
||||
# none - node caching is disabled
|
||||
# CERES_NODE_CACHING_BEHAVIOR = all
|
||||
|
||||
# Ceres nodes can have many slices and caching the right ones can improve
|
||||
# performance dramatically. Note that there are many trade-offs to tinkering
|
||||
# with this, and unless you are a ceres developer you *really* should not
|
||||
# mess with this. Valid values are:
|
||||
# latest - only the most recent slice is cached
|
||||
# all - all slices are cached
|
||||
# none - slice caching is disabled
|
||||
# CERES_SLICE_CACHING_BEHAVIOR = latest
|
||||
|
||||
# If a Ceres node accumulates too many slices, performance can suffer.
|
||||
# This can be caused by intermittently reported data. To mitigate
|
||||
# slice fragmentation there is a tolerance for how much space can be
|
||||
# wasted within a slice file to avoid creating a new one. That tolerance
|
||||
# level is determined by MAX_SLICE_GAP, which is the number of consecutive
|
||||
# null datapoints allowed in a slice file.
|
||||
# If you set this very low, you will waste less of the *tiny* bit disk space
|
||||
# that this feature wastes, and you will be prone to performance problems
|
||||
# caused by slice fragmentation, which can be pretty severe.
|
||||
# If you set this really high, you will waste a bit more disk space (each
|
||||
# null datapoint wastes 8 bytes, but keep in mind your filesystem's block
|
||||
# size). If you suffer slice fragmentation issues, you should increase this or
|
||||
# run the ceres-maintenance defrag plugin more often. However you should not
|
||||
# set it to be huge because then if a large but allowed gap occurs it has to
|
||||
# get filled in, which means instead of a simple 8-byte write to a new file we
|
||||
# could end up doing an (8 * MAX_SLICE_GAP)-byte write to the latest slice.
|
||||
# CERES_MAX_SLICE_GAP = 80
|
||||
|
||||
# Enabling this option will cause Ceres to lock each Ceres file it writes to
|
||||
# to with an exclusive lock (LOCK_EX, see: man 2 flock). This is useful when
|
||||
# multiple carbon-cache daemons are writing to the same files.
|
||||
# CERES_LOCK_WRITES = False
|
||||
|
||||
# Set this to True to enable whitelisting and blacklisting of metrics in
|
||||
# CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
|
||||
# empty, all metrics will pass through
|
||||
# CONF_DIR/whitelist.conf and CONF_DIR/blacklist.conf. If the whitelist is
|
||||
# missing or empty, all metrics will pass through
|
||||
# USE_WHITELIST = False
|
||||
|
||||
# By default, carbon itself will log statistics (such as a count,
|
||||
@@ -203,16 +302,25 @@ WHISPER_FALLOCATE_CREATE = True
|
||||
# Example: store everything
|
||||
# BIND_PATTERNS = #
|
||||
|
||||
# URL of graphite-web instance, this is used to add incoming series to the tag database
|
||||
GRAPHITE_URL = http://127.0.0.1:80
|
||||
|
||||
# Tag update interval, this specifies how frequently updates to existing series will trigger
|
||||
# an update to the tag index, the default setting is once every 100 updates
|
||||
# TAG_UPDATE_INTERVAL = 100
|
||||
|
||||
# To configure special settings for the carbon-cache instance 'b', uncomment this:
|
||||
#[cache:b]
|
||||
#LINE_RECEIVER_PORT = 2103
|
||||
#PICKLE_RECEIVER_PORT = 2104
|
||||
#CACHE_QUERY_PORT = 7102
|
||||
# and any other settings you want to customize, defaults are inherited
|
||||
# from [carbon] section.
|
||||
# from the [cache] section.
|
||||
# You can then specify the --instance=b option to manage this instance
|
||||
|
||||
|
||||
#
|
||||
# In order to turn off logging of successful connections for the line
|
||||
# receiver, set this to False
|
||||
# LOG_LISTENER_CONN_SUCCESS = True
|
||||
|
||||
[relay]
|
||||
LINE_RECEIVER_INTERFACE = 0.0.0.0
|
||||
@@ -220,9 +328,6 @@ LINE_RECEIVER_PORT = 2013
|
||||
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
|
||||
PICKLE_RECEIVER_PORT = 2014
|
||||
|
||||
# Set to false to disable logging of successful connections
|
||||
LOG_LISTENER_CONNECTIONS = True
|
||||
|
||||
# Carbon-relay has several options for metric routing controlled by RELAY_METHOD
|
||||
#
|
||||
# Use relay-rules.conf to route metrics to destinations based on pattern rules
|
||||
@@ -237,12 +342,24 @@ LOG_LISTENER_CONNECTIONS = True
|
||||
# instance.
|
||||
# Enable this for carbon-relays that send to a group of carbon-aggregators
|
||||
#RELAY_METHOD = aggregated-consistent-hashing
|
||||
#
|
||||
# You can also use fast-hashing and fast-aggregated-hashing which are in O(1)
|
||||
# and will always redirect the metrics to the same destination but do not try
|
||||
# to minimize rebalancing when the list of destinations is changing.
|
||||
RELAY_METHOD = rules
|
||||
|
||||
# If you use consistent-hashing you can add redundancy by replicating every
|
||||
# datapoint to more than one machine.
|
||||
REPLICATION_FACTOR = 1
|
||||
|
||||
# For REPLICATION_FACTOR >=2, set DIVERSE_REPLICAS to True to guarantee replicas
|
||||
# across distributed hosts. With this setting disabled, it's possible that replicas
|
||||
# may be sent to different caches on the same host. This has been the default
|
||||
# behavior since introduction of 'consistent-hashing' relay method.
|
||||
# Note that enabling this on an existing pre-0.9.14 cluster will require rebalancing
|
||||
# your metrics across the cluster nodes using a tool like Carbonate.
|
||||
#DIVERSE_REPLICAS = True
|
||||
|
||||
# This is a list of carbon daemons we will send any relayed or
|
||||
# generated metrics to. The default provided would send to a single
|
||||
# carbon-cache instance on the default port. However if you
|
||||
@@ -261,20 +378,71 @@ REPLICATION_FACTOR = 1
|
||||
# must be defined in this list
|
||||
DESTINATIONS = 127.0.0.1:2004
|
||||
|
||||
# This defines the maximum "message size" between carbon daemons.
|
||||
# You shouldn't need to tune this unless you really know what you're doing.
|
||||
MAX_DATAPOINTS_PER_MESSAGE = 500
|
||||
# This define the protocol to use to contact the destination. It can be
|
||||
# set to one of "line", "pickle", "udp" and "protobuf". This list can be
|
||||
# extended with CarbonClientFactory plugins and defaults to "pickle".
|
||||
# DESTINATION_PROTOCOL = pickle
|
||||
|
||||
# When using consistent hashing it sometime makes sense to make
|
||||
# the ring dynamic when you don't want to loose points when a
|
||||
# single destination is down. Replication is an answer to that
|
||||
# but it can be quite expensive.
|
||||
# DYNAMIC_ROUTER = False
|
||||
|
||||
# Controls the number of connection attempts before marking a
|
||||
# destination as down. We usually do one connection attempt per
|
||||
# second.
|
||||
# DYNAMIC_ROUTER_MAX_RETRIES = 5
|
||||
|
||||
# This is the maximum number of datapoints that can be queued up
|
||||
# for a single destination. Once this limit is hit, we will
|
||||
# stop accepting new data if USE_FLOW_CONTROL is True, otherwise
|
||||
# we will drop any subsequently received datapoints.
|
||||
MAX_QUEUE_SIZE = 10000
|
||||
|
||||
# This defines the maximum "message size" between carbon daemons. If
|
||||
# your queue is large, setting this to a lower number will cause the
|
||||
# relay to forward smaller discrete chunks of stats, which may prevent
|
||||
# overloading on the receiving side after a disconnect.
|
||||
MAX_DATAPOINTS_PER_MESSAGE = 500
|
||||
|
||||
# Limit the number of open connections the receiver can handle as any time.
|
||||
# Default is no limit. Setting up a limit for sites handling high volume
|
||||
# traffic may be recommended to avoid running out of TCP memory or having
|
||||
# thousands of TCP connections reduce the throughput of the service.
|
||||
#MAX_RECEIVER_CONNECTIONS = inf
|
||||
|
||||
# Specify the user to drop privileges to
|
||||
# If this is blank carbon-relay runs as the user that invokes it
|
||||
# USER =
|
||||
|
||||
# This is the percentage that the queue must be empty before it will accept
|
||||
# more messages. For a larger site, if the queue is very large it makes sense
|
||||
# to tune this to allow for incoming stats. So if you have an average
|
||||
# flow of 100k stats/minute, and a MAX_QUEUE_SIZE of 3,000,000, it makes sense
|
||||
# to allow stats to start flowing when you've cleared the queue to 95% since
|
||||
# you should have space to accommodate the next minute's worth of stats
|
||||
# even before the relay incrementally clears more of the queue
|
||||
QUEUE_LOW_WATERMARK_PCT = 0.8
|
||||
|
||||
# To allow for batch efficiency from the pickle protocol and to benefit from
|
||||
# other batching advantages, all writes are deferred by putting them into a queue,
|
||||
# and then the queue is flushed and sent a small fraction of a second later.
|
||||
TIME_TO_DEFER_SENDING = 0.0001
|
||||
|
||||
# Set this to False to drop datapoints when any send queue (sending datapoints
|
||||
# to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the
|
||||
# default) then sockets over which metrics are received will temporarily stop accepting
|
||||
# data until the send queues fall below 80% MAX_QUEUE_SIZE.
|
||||
# data until the send queues fall below QUEUE_LOW_WATERMARK_PCT * MAX_QUEUE_SIZE.
|
||||
USE_FLOW_CONTROL = True
|
||||
|
||||
# If enabled this setting is used to timeout metric client connection if no
|
||||
# metrics have been sent in specified time in seconds
|
||||
#METRIC_CLIENT_IDLE_TIMEOUT = None
|
||||
|
||||
# Set this to True to enable whitelisting and blacklisting of metrics in
|
||||
# CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
|
||||
# empty, all metrics will pass through
|
||||
# CONF_DIR/whitelist.conf and CONF_DIR/blacklist.conf. If the whitelist is
|
||||
# missing or empty, all metrics will pass through
|
||||
# USE_WHITELIST = False
|
||||
|
||||
# By default, carbon itself will log statistics (such as a count,
|
||||
@@ -282,7 +450,40 @@ USE_FLOW_CONTROL = True
|
||||
# seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
|
||||
# CARBON_METRIC_PREFIX = carbon
|
||||
# CARBON_METRIC_INTERVAL = 60
|
||||
#
|
||||
# In order to turn off logging of successful connections for the line
|
||||
# receiver, set this to False
|
||||
# LOG_LISTENER_CONN_SUCCESS = True
|
||||
|
||||
# If you're connecting from the relay to a destination that's over the
|
||||
# internet or similarly iffy connection, a backlog can develop because
|
||||
# of internet weather conditions, e.g. acks getting lost or similar issues.
|
||||
# To deal with that, you can enable USE_RATIO_RESET which will let you
|
||||
# re-set the connection to an individual destination. Defaults to being off.
|
||||
USE_RATIO_RESET=False
|
||||
|
||||
# When there is a small number of stats flowing, it's not desirable to
|
||||
# perform any actions based on percentages - it's just too "twitchy".
|
||||
MIN_RESET_STAT_FLOW=1000
|
||||
|
||||
# When the ratio of stats being sent in a reporting interval is far
|
||||
# enough from 1.0, we will disconnect the socket and reconnecto to
|
||||
# clear out queued stats. The default ratio of 0.9 indicates that 10%
|
||||
# of stats aren't being delivered within one CARBON_METRIC_INTERVAL
|
||||
# (default of 60 seconds), which can lead to a queue backup. Under
|
||||
# some circumstances re-setting the connection can fix this, so
|
||||
# set this according to your tolerance, and look in the logs for
|
||||
# "resetConnectionForQualityReasons" to observe whether this is kicking
|
||||
# in when your sent queue is building up.
|
||||
MIN_RESET_RATIO=0.9
|
||||
|
||||
# The minimum time between resets. When a connection is re-set, we
|
||||
# need to wait before another reset is performed.
|
||||
# (2*CARBON_METRIC_INTERVAL) + 1 second is the minimum time needed
|
||||
# before stats for the new connection will be available. Setting this
|
||||
# below (2*CARBON_METRIC_INTERVAL) + 1 second will result in a lot of
|
||||
# reset connections for no good reason.
|
||||
MIN_RESET_INTERVAL=121
|
||||
|
||||
[aggregator]
|
||||
LINE_RECEIVER_INTERFACE = 0.0.0.0
|
||||
@@ -291,14 +492,17 @@ LINE_RECEIVER_PORT = 2023
|
||||
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
|
||||
PICKLE_RECEIVER_PORT = 2024
|
||||
|
||||
# Set to false to disable logging of successful connections
|
||||
LOG_LISTENER_CONNECTIONS = True
|
||||
|
||||
# If set true, metric received will be forwarded to DESTINATIONS in addition to
|
||||
# the output of the aggregation rules. If set false the carbon-aggregator will
|
||||
# only ever send the output of aggregation.
|
||||
FORWARD_ALL = True
|
||||
|
||||
# Filenames of the configuration files to use for this instance of aggregator.
|
||||
# Filenames are relative to CONF_DIR.
|
||||
#
|
||||
# AGGREGATION_RULES = aggregation-rules.conf
|
||||
# REWRITE_RULES = rewrite-rules.conf
|
||||
|
||||
# This is a list of carbon daemons we will send any relayed or
|
||||
# generated metrics to. The default provided would send to a single
|
||||
# carbon-cache instance on the default port. However if you
|
||||
@@ -330,6 +534,10 @@ MAX_QUEUE_SIZE = 10000
|
||||
# data until the send queues fall below 80% MAX_QUEUE_SIZE.
|
||||
USE_FLOW_CONTROL = True
|
||||
|
||||
# If enabled this setting is used to timeout metric client connection if no
|
||||
# metrics have been sent in specified time in seconds
|
||||
#METRIC_CLIENT_IDLE_TIMEOUT = None
|
||||
|
||||
# This defines the maximum "message size" between carbon daemons.
|
||||
# You shouldn't need to tune this unless you really know what you're doing.
|
||||
MAX_DATAPOINTS_PER_MESSAGE = 500
|
||||
@@ -339,6 +547,12 @@ MAX_DATAPOINTS_PER_MESSAGE = 500
|
||||
# the past MAX_AGGREGATION_INTERVALS * intervalSize seconds.
|
||||
MAX_AGGREGATION_INTERVALS = 5
|
||||
|
||||
# Limit the number of open connections the receiver can handle as any time.
|
||||
# Default is no limit. Setting up a limit for sites handling high volume
|
||||
# traffic may be recommended to avoid running out of TCP memory or having
|
||||
# thousands of TCP connections reduce the throughput of the service.
|
||||
#MAX_RECEIVER_CONNECTIONS = inf
|
||||
|
||||
# By default (WRITE_BACK_FREQUENCY = 0), carbon-aggregator will write back
|
||||
# aggregated data points once every rule.frequency seconds, on a per-rule basis.
|
||||
# Set this (WRITE_BACK_FREQUENCY = N) to write back all aggregated data points
|
||||
@@ -348,8 +562,8 @@ MAX_AGGREGATION_INTERVALS = 5
|
||||
# WRITE_BACK_FREQUENCY = 0
|
||||
|
||||
# Set this to True to enable whitelisting and blacklisting of metrics in
|
||||
# CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
|
||||
# empty, all metrics will pass through
|
||||
# CONF_DIR/whitelist.conf and CONF_DIR/blacklist.conf. If the whitelist is
|
||||
# missing or empty, all metrics will pass through
|
||||
# USE_WHITELIST = False
|
||||
|
||||
# By default, carbon itself will log statistics (such as a count,
|
||||
@@ -357,3 +571,24 @@ MAX_AGGREGATION_INTERVALS = 5
|
||||
# seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
|
||||
# CARBON_METRIC_PREFIX = carbon
|
||||
# CARBON_METRIC_INTERVAL = 60
|
||||
|
||||
# In order to turn off logging of successful connections for the line
|
||||
# receiver, set this to False
|
||||
# LOG_LISTENER_CONN_SUCCESS = True
|
||||
|
||||
# In order to turn off logging of metrics with no corresponding
|
||||
# aggregation rules receiver, set this to False
|
||||
# LOG_AGGREGATOR_MISSES = False
|
||||
|
||||
# Specify the user to drop privileges to
|
||||
# If this is blank carbon-aggregator runs as the user that invokes it
|
||||
# USER =
|
||||
|
||||
# Part of the code, and particularly aggregator rules, need
|
||||
# to cache metric names. To avoid leaking too much memory you
|
||||
# can tweak the size of this cache. The default allow for 1M
|
||||
# different metrics per rule (~200MiB).
|
||||
# CACHE_METRIC_NAMES_MAX=1000000
|
||||
|
||||
# You can optionally set a ttl to this cache.
|
||||
# CACHE_METRIC_NAMES_TTL=600
|
||||
|
||||
@@ -40,4 +40,3 @@ aggregationMethod = sum
|
||||
pattern = .*
|
||||
xFilesFactor = 0.3
|
||||
aggregationMethod = average
|
||||
|
||||
|
||||
@@ -1,4 +1,23 @@
|
||||
# Schema definitions for Whisper files. Entries are scanned in order,
|
||||
# and first match wins. This file is scanned for changes every 60 seconds.
|
||||
#
|
||||
# Definition Syntax:
|
||||
#
|
||||
# [name]
|
||||
# pattern = regex
|
||||
# retentions = timePerPoint:timeToStore, timePerPoint:timeToStore, ...
|
||||
#
|
||||
# Remember: To support accurate aggregation from higher to lower resolution
|
||||
# archives, the precision of a longer retention archive must be
|
||||
# cleanly divisible by precision of next lower retention archive.
|
||||
#
|
||||
# Valid: 60s:7d,300s:30d (300/60 = 5)
|
||||
# Invalid: 180s:7d,300s:30d (300/180 = 3.333)
|
||||
#
|
||||
|
||||
# Carbon's internal metrics. This entry should match what is specified in
|
||||
# CARBON_METRIC_PREFIX and CARBON_METRIC_INTERVAL settings
|
||||
|
||||
[carbon]
|
||||
pattern = ^carbon\..*
|
||||
retentions = 1m:31d,10m:1y,1h:5y
|
||||
|
||||
2
docker/blocks/graphite1/conf/usr/local/bin/manage.sh
Normal file → Executable file
2
docker/blocks/graphite1/conf/usr/local/bin/manage.sh
Normal file → Executable file
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
PYTHONPATH=/opt/graphite/webapp django-admin.py syncdb --settings=graphite.settings
|
||||
PYTHONPATH=/opt/graphite/webapp django-admin.py update_users --settings=graphite.settings
|
||||
# PYTHONPATH=/opt/graphite/webapp django-admin.py update_users --settings=graphite.settings
|
||||
21
docker/blocks/graphite1/docker-compose.yaml
Normal file
21
docker/blocks/graphite1/docker-compose.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
graphite:
|
||||
build:
|
||||
context: blocks/graphite1
|
||||
args:
|
||||
version: master
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "2003:2003"
|
||||
- "8125:8125/udp"
|
||||
- "8126:8126"
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
|
||||
fake-graphite-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: graphite
|
||||
FD_PORT: 2003
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
graphite:
|
||||
build: blocks/graphite1
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "2003:2003"
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
|
||||
fake-graphite-data:
|
||||
image: grafana/fake-data-gen
|
||||
net: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: graphite
|
||||
FD_PORT: 2003
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
[cache]
|
||||
LOCAL_DATA_DIR = /opt/graphite/storage/whisper/
|
||||
|
||||
# Specify the user to drop privileges to
|
||||
# If this is blank carbon runs as the user that invokes it
|
||||
# This user must have write access to the local data directory
|
||||
USER =
|
||||
|
||||
# Limit the size of the cache to avoid swapping or becoming CPU bound.
|
||||
# Sorts and serving cache queries gets more expensive as the cache grows.
|
||||
# Use the value "inf" (infinity) for an unlimited cache size.
|
||||
MAX_CACHE_SIZE = inf
|
||||
|
||||
# Limits the number of whisper update_many() calls per second, which effectively
|
||||
# means the number of write requests sent to the disk. This is intended to
|
||||
# prevent over-utilizing the disk and thus starving the rest of the system.
|
||||
# When the rate of required updates exceeds this, then carbon's caching will
|
||||
# take effect and increase the overall throughput accordingly.
|
||||
MAX_UPDATES_PER_SECOND = 1000
|
||||
|
||||
# Softly limits the number of whisper files that get created each minute.
|
||||
# Setting this value low (like at 50) is a good way to ensure your graphite
|
||||
# system will not be adversely impacted when a bunch of new metrics are
|
||||
# sent to it. The trade off is that it will take much longer for those metrics'
|
||||
# database files to all get created and thus longer until the data becomes usable.
|
||||
# Setting this value high (like "inf" for infinity) will cause graphite to create
|
||||
# the files quickly but at the risk of slowing I/O down considerably for a while.
|
||||
MAX_CREATES_PER_MINUTE = inf
|
||||
|
||||
LINE_RECEIVER_INTERFACE = 0.0.0.0
|
||||
LINE_RECEIVER_PORT = 2003
|
||||
|
||||
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
|
||||
PICKLE_RECEIVER_PORT = 2004
|
||||
|
||||
CACHE_QUERY_INTERFACE = 0.0.0.0
|
||||
CACHE_QUERY_PORT = 7002
|
||||
|
||||
LOG_UPDATES = False
|
||||
|
||||
# Enable AMQP if you want to receve metrics using an amqp broker
|
||||
# ENABLE_AMQP = False
|
||||
|
||||
# Verbose means a line will be logged for every metric received
|
||||
# useful for testing
|
||||
# AMQP_VERBOSE = False
|
||||
|
||||
# AMQP_HOST = localhost
|
||||
# AMQP_PORT = 5672
|
||||
# AMQP_VHOST = /
|
||||
# AMQP_USER = guest
|
||||
# AMQP_PASSWORD = guest
|
||||
# AMQP_EXCHANGE = graphite
|
||||
|
||||
# Patterns for all of the metrics this machine will store. Read more at
|
||||
# http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol#Bindings
|
||||
#
|
||||
# Example: store all sales, linux servers, and utilization metrics
|
||||
# BIND_PATTERNS = sales.#, servers.linux.#, #.utilization
|
||||
#
|
||||
# Example: store everything
|
||||
# BIND_PATTERNS = #
|
||||
|
||||
# NOTE: you cannot run both a cache and a relay on the same server
|
||||
# with the default configuration, you have to specify a distinict
|
||||
# interfaces and ports for the listeners.
|
||||
|
||||
[relay]
|
||||
LINE_RECEIVER_INTERFACE = 0.0.0.0
|
||||
LINE_RECEIVER_PORT = 2003
|
||||
|
||||
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
|
||||
PICKLE_RECEIVER_PORT = 2004
|
||||
|
||||
CACHE_SERVERS = server1, server2, server3
|
||||
MAX_QUEUE_SIZE = 10000
|
||||
@@ -1,102 +0,0 @@
|
||||
import datetime
|
||||
import time
|
||||
|
||||
from django.utils.timezone import get_current_timezone
|
||||
from django.core.urlresolvers import get_script_prefix
|
||||
from django.http import HttpResponse
|
||||
from django.shortcuts import render_to_response, get_object_or_404
|
||||
from pytz import timezone
|
||||
|
||||
from graphite.util import json
|
||||
from graphite.events import models
|
||||
from graphite.render.attime import parseATTime
|
||||
|
||||
|
||||
def to_timestamp(dt):
|
||||
return time.mktime(dt.timetuple())
|
||||
|
||||
|
||||
class EventEncoder(json.JSONEncoder):
|
||||
def default(self, obj):
|
||||
if isinstance(obj, datetime.datetime):
|
||||
return to_timestamp(obj)
|
||||
return json.JSONEncoder.default(self, obj)
|
||||
|
||||
|
||||
def view_events(request):
|
||||
if request.method == "GET":
|
||||
context = { 'events' : fetch(request),
|
||||
'slash' : get_script_prefix()
|
||||
}
|
||||
return render_to_response("events.html", context)
|
||||
else:
|
||||
return post_event(request)
|
||||
|
||||
def detail(request, event_id):
|
||||
e = get_object_or_404(models.Event, pk=event_id)
|
||||
context = { 'event' : e,
|
||||
'slash' : get_script_prefix()
|
||||
}
|
||||
return render_to_response("event.html", context)
|
||||
|
||||
|
||||
def post_event(request):
|
||||
if request.method == 'POST':
|
||||
event = json.loads(request.body)
|
||||
assert isinstance(event, dict)
|
||||
|
||||
values = {}
|
||||
values["what"] = event["what"]
|
||||
values["tags"] = event.get("tags", None)
|
||||
values["when"] = datetime.datetime.fromtimestamp(
|
||||
event.get("when", time.time()))
|
||||
if "data" in event:
|
||||
values["data"] = event["data"]
|
||||
|
||||
e = models.Event(**values)
|
||||
e.save()
|
||||
|
||||
return HttpResponse(status=200)
|
||||
else:
|
||||
return HttpResponse(status=405)
|
||||
|
||||
def get_data(request):
|
||||
if 'jsonp' in request.REQUEST:
|
||||
response = HttpResponse(
|
||||
"%s(%s)" % (request.REQUEST.get('jsonp'),
|
||||
json.dumps(fetch(request), cls=EventEncoder)),
|
||||
mimetype='text/javascript')
|
||||
else:
|
||||
response = HttpResponse(
|
||||
json.dumps(fetch(request), cls=EventEncoder),
|
||||
mimetype="application/json")
|
||||
return response
|
||||
|
||||
def fetch(request):
|
||||
#XXX we need to move to USE_TZ=True to get rid of naive-time conversions
|
||||
def make_naive(dt):
|
||||
if 'tz' in request.GET:
|
||||
tz = timezone(request.GET['tz'])
|
||||
else:
|
||||
tz = get_current_timezone()
|
||||
local_dt = dt.astimezone(tz)
|
||||
if hasattr(local_dt, 'normalize'):
|
||||
local_dt = local_dt.normalize()
|
||||
return local_dt.replace(tzinfo=None)
|
||||
|
||||
if request.GET.get("from", None) is not None:
|
||||
time_from = make_naive(parseATTime(request.GET["from"]))
|
||||
else:
|
||||
time_from = datetime.datetime.fromtimestamp(0)
|
||||
|
||||
if request.GET.get("until", None) is not None:
|
||||
time_until = make_naive(parseATTime(request.GET["until"]))
|
||||
else:
|
||||
time_until = datetime.datetime.now()
|
||||
|
||||
tags = request.GET.get("tags", None)
|
||||
if tags is not None:
|
||||
tags = request.GET.get("tags").split(" ")
|
||||
|
||||
return [x.as_dict() for x in
|
||||
models.Event.find_events(time_from, time_until, tags=tags)]
|
||||
@@ -1,20 +0,0 @@
|
||||
[
|
||||
{
|
||||
"pk": 1,
|
||||
"model": "auth.user",
|
||||
"fields": {
|
||||
"username": "admin",
|
||||
"first_name": "",
|
||||
"last_name": "",
|
||||
"is_active": true,
|
||||
"is_superuser": true,
|
||||
"is_staff": true,
|
||||
"last_login": "2011-09-20 17:02:14",
|
||||
"groups": [],
|
||||
"user_permissions": [],
|
||||
"password": "sha1$1b11b$edeb0a67a9622f1f2cfeabf9188a711f5ac7d236",
|
||||
"email": "root@example.com",
|
||||
"date_joined": "2011-09-20 17:02:14"
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -1,42 +0,0 @@
|
||||
# Edit this file to override the default graphite settings, do not edit settings.py
|
||||
|
||||
# Turn on debugging and restart apache if you ever see an "Internal Server Error" page
|
||||
#DEBUG = True
|
||||
|
||||
# Set your local timezone (django will try to figure this out automatically)
|
||||
TIME_ZONE = 'UTC'
|
||||
|
||||
# Setting MEMCACHE_HOSTS to be empty will turn off use of memcached entirely
|
||||
#MEMCACHE_HOSTS = ['127.0.0.1:11211']
|
||||
|
||||
# Sometimes you need to do a lot of rendering work but cannot share your storage mount
|
||||
#REMOTE_RENDERING = True
|
||||
#RENDERING_HOSTS = ['fastserver01','fastserver02']
|
||||
#LOG_RENDERING_PERFORMANCE = True
|
||||
#LOG_CACHE_PERFORMANCE = True
|
||||
|
||||
# If you've got more than one backend server they should all be listed here
|
||||
#CLUSTER_SERVERS = []
|
||||
|
||||
# Override this if you need to provide documentation specific to your graphite deployment
|
||||
#DOCUMENTATION_URL = "http://wiki.mycompany.com/graphite"
|
||||
|
||||
# Enable email-related features
|
||||
#SMTP_SERVER = "mail.mycompany.com"
|
||||
|
||||
# LDAP / ActiveDirectory authentication setup
|
||||
#USE_LDAP_AUTH = True
|
||||
#LDAP_SERVER = "ldap.mycompany.com"
|
||||
#LDAP_PORT = 389
|
||||
#LDAP_SEARCH_BASE = "OU=users,DC=mycompany,DC=com"
|
||||
#LDAP_BASE_USER = "CN=some_readonly_account,DC=mycompany,DC=com"
|
||||
#LDAP_BASE_PASS = "readonly_account_password"
|
||||
#LDAP_USER_QUERY = "(username=%s)" #For Active Directory use "(sAMAccountName=%s)"
|
||||
|
||||
# If sqlite won't cut it, configure your real database here (don't forget to run manage.py syncdb!)
|
||||
#DATABASE_ENGINE = 'mysql' # or 'postgres'
|
||||
#DATABASE_NAME = 'graphite'
|
||||
#DATABASE_USER = 'graphite'
|
||||
#DATABASE_PASSWORD = 'graphite-is-awesome'
|
||||
#DATABASE_HOST = 'mysql.mycompany.com'
|
||||
#DATABASE_PORT = '3306'
|
||||
@@ -1 +0,0 @@
|
||||
grafana:$apr1$4R/20xhC$8t37jPP5dbcLr48btdkU//
|
||||
@@ -1,70 +0,0 @@
|
||||
daemon off;
|
||||
user www-data;
|
||||
worker_processes 1;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 2048;
|
||||
server_tokens off;
|
||||
|
||||
server_names_hash_bucket_size 32;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
|
||||
open_log_file_cache max=1000 inactive=20s min_uses=2 valid=1m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:8000;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Server $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header Host $host;
|
||||
|
||||
client_max_body_size 10m;
|
||||
client_body_buffer_size 128k;
|
||||
|
||||
proxy_connect_timeout 90;
|
||||
proxy_send_timeout 90;
|
||||
proxy_read_timeout 90;
|
||||
|
||||
proxy_buffer_size 4k;
|
||||
proxy_buffers 4 32k;
|
||||
proxy_busy_buffers_size 64k;
|
||||
proxy_temp_file_write_size 64k;
|
||||
}
|
||||
|
||||
add_header Access-Control-Allow-Origin "*";
|
||||
add_header Access-Control-Allow-Methods "GET, OPTIONS";
|
||||
add_header Access-Control-Allow-Headers "origin, authorization, accept";
|
||||
|
||||
location /content {
|
||||
alias /opt/graphite/webapp/content;
|
||||
|
||||
}
|
||||
|
||||
location /media {
|
||||
alias /usr/share/pyshared/django/contrib/admin/media;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
graphitePort: 2003,
|
||||
graphiteHost: "127.0.0.1",
|
||||
port: 8125,
|
||||
mgmt_port: 8126,
|
||||
backends: ['./backends/graphite'],
|
||||
debug: true
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
[min]
|
||||
pattern = \.min$
|
||||
xFilesFactor = 0.1
|
||||
aggregationMethod = min
|
||||
|
||||
[max]
|
||||
pattern = \.max$
|
||||
xFilesFactor = 0.1
|
||||
aggregationMethod = max
|
||||
|
||||
[sum]
|
||||
pattern = \.count$
|
||||
xFilesFactor = 0
|
||||
aggregationMethod = sum
|
||||
|
||||
[default_average]
|
||||
pattern = .*
|
||||
xFilesFactor = 0.5
|
||||
aggregationMethod = average
|
||||
@@ -1,16 +0,0 @@
|
||||
[carbon]
|
||||
pattern = ^carbon\..*
|
||||
retentions = 1m:31d,10m:1y,1h:5y
|
||||
|
||||
[highres]
|
||||
pattern = ^highres.*
|
||||
retentions = 1s:1d,1m:7d
|
||||
|
||||
[statsd]
|
||||
pattern = ^statsd.*
|
||||
retentions = 1m:7d,10m:1y
|
||||
|
||||
[default]
|
||||
pattern = .*
|
||||
retentions = 10s:1d,1m:7d,10m:1y
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
[supervisord]
|
||||
nodaemon = true
|
||||
environment = GRAPHITE_STORAGE_DIR='/opt/graphite/storage',GRAPHITE_CONF_DIR='/opt/graphite/conf'
|
||||
|
||||
[program:nginx]
|
||||
command = /usr/sbin/nginx
|
||||
stdout_logfile = /var/log/supervisor/%(program_name)s.log
|
||||
stderr_logfile = /var/log/supervisor/%(program_name)s.log
|
||||
autorestart = true
|
||||
|
||||
[program:carbon-cache]
|
||||
;user = www-data
|
||||
command = /opt/graphite/bin/carbon-cache.py --debug start
|
||||
stdout_logfile = /var/log/supervisor/%(program_name)s.log
|
||||
stderr_logfile = /var/log/supervisor/%(program_name)s.log
|
||||
autorestart = true
|
||||
|
||||
[program:graphite-webapp]
|
||||
;user = www-data
|
||||
directory = /opt/graphite/webapp
|
||||
environment = PYTHONPATH='/opt/graphite/webapp'
|
||||
command = /usr/bin/gunicorn_django -b127.0.0.1:8000 -w2 graphite/settings.py
|
||||
stdout_logfile = /var/log/supervisor/%(program_name)s.log
|
||||
stderr_logfile = /var/log/supervisor/%(program_name)s.log
|
||||
autorestart = true
|
||||
|
||||
17
docker/blocks/influxdb/docker-compose.yaml
Normal file
17
docker/blocks/influxdb/docker-compose.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
influxdb:
|
||||
image: influxdb:latest
|
||||
container_name: influxdb
|
||||
ports:
|
||||
- "2004:2004"
|
||||
- "8083:8083"
|
||||
- "8086:8086"
|
||||
volumes:
|
||||
- ./blocks/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf
|
||||
|
||||
fake-influxdb-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: influxdb
|
||||
FD_PORT: 8086
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
influxdb:
|
||||
image: influxdb:latest
|
||||
container_name: influxdb
|
||||
ports:
|
||||
- "2004:2004"
|
||||
- "8083:8083"
|
||||
- "8086:8086"
|
||||
volumes:
|
||||
- ./blocks/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf
|
||||
|
||||
fake-influxdb-data:
|
||||
image: grafana/fake-data-gen
|
||||
net: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: influxdb
|
||||
FD_PORT: 8086
|
||||
|
||||
6
docker/blocks/jaeger/docker-compose.yaml
Normal file
6
docker/blocks/jaeger/docker-compose.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
jaeger:
|
||||
image: jaegertracing/all-in-one:latest
|
||||
ports:
|
||||
- "127.0.0.1:6831:6831/udp"
|
||||
- "16686:16686"
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
jaeger:
|
||||
image: jaegertracing/all-in-one:latest
|
||||
ports:
|
||||
- "localhost:6831:6831/udp"
|
||||
- "16686:16686"
|
||||
|
||||
5
docker/blocks/memcached/docker-compose.yaml
Normal file
5
docker/blocks/memcached/docker-compose.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
memcached:
|
||||
image: memcached:latest
|
||||
ports:
|
||||
- "11211:11211"
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
memcached:
|
||||
image: memcached:latest
|
||||
ports:
|
||||
- "11211:11211"
|
||||
|
||||
14
docker/blocks/mysql/docker-compose.yaml
Normal file
14
docker/blocks/mysql/docker-compose.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
mysql:
|
||||
image: mysql:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: grafana
|
||||
MYSQL_USER: grafana
|
||||
MYSQL_PASSWORD: password
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb_monitor_enable=all]
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
mysql:
|
||||
image: mysql:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: grafana
|
||||
MYSQL_USER: grafana
|
||||
MYSQL_PASSWORD: password
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb_monitor_enable=all]
|
||||
|
||||
9
docker/blocks/mysql_opendata/docker-compose.yaml
Normal file
9
docker/blocks/mysql_opendata/docker-compose.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
mysql_opendata:
|
||||
build: blocks/mysql_opendata
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: testdata
|
||||
MYSQL_USER: grafana
|
||||
MYSQL_PASSWORD: password
|
||||
ports:
|
||||
- "3307:3306"
|
||||
@@ -1,9 +0,0 @@
|
||||
mysql_opendata:
|
||||
build: blocks/mysql_opendata
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: testdata
|
||||
MYSQL_USER: grafana
|
||||
MYSQL_PASSWORD: password
|
||||
ports:
|
||||
- "3307:3306"
|
||||
10
docker/blocks/mysql_tests/docker-compose.yaml
Normal file
10
docker/blocks/mysql_tests/docker-compose.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
mysqltests:
|
||||
image: mysql:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: grafana_tests
|
||||
MYSQL_USER: grafana
|
||||
MYSQL_PASSWORD: password
|
||||
ports:
|
||||
- "3306:3306"
|
||||
tmpfs: /var/lib/mysql:rw
|
||||
@@ -1,9 +0,0 @@
|
||||
mysqltests:
|
||||
image: mysql:latest
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: grafana_tests
|
||||
MYSQL_USER: grafana
|
||||
MYSQL_PASSWORD: password
|
||||
ports:
|
||||
- "3306:3306"
|
||||
@@ -1,6 +1,6 @@
|
||||
FROM debian:jessie
|
||||
|
||||
MAINTAINER Christian Luginbühl <dinke@pimprecords.com>
|
||||
LABEL maintainer="Christian Luginbühl <dinke@pimprecords.com>"
|
||||
|
||||
ENV OPENLDAP_VERSION 2.4.40
|
||||
|
||||
|
||||
10
docker/blocks/openldap/docker-compose.yaml
Normal file
10
docker/blocks/openldap/docker-compose.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
openldap:
|
||||
build: blocks/openldap
|
||||
environment:
|
||||
SLAPD_PASSWORD: grafana
|
||||
SLAPD_DOMAIN: grafana.org
|
||||
SLAPD_ADDITIONAL_MODULES: memberof
|
||||
ports:
|
||||
- "389:389"
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
openldap:
|
||||
build: blocks/openldap
|
||||
environment:
|
||||
SLAPD_PASSWORD: grafana
|
||||
SLAPD_DOMAIN: grafana.org
|
||||
SLAPD_ADDITIONAL_MODULES: memberof
|
||||
ports:
|
||||
- "389:389"
|
||||
|
||||
|
||||
11
docker/blocks/opentsdb/docker-compose.yaml
Normal file
11
docker/blocks/opentsdb/docker-compose.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
opentsdb:
|
||||
image: opower/opentsdb:latest
|
||||
ports:
|
||||
- "4242:4242"
|
||||
|
||||
fake-opentsdb-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: opentsdb
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
opentsdb:
|
||||
image: opower/opentsdb:latest
|
||||
ports:
|
||||
- "4242:4242"
|
||||
|
||||
fake-opentsdb-data:
|
||||
image: grafana/fake-data-gen
|
||||
net: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: opentsdb
|
||||
|
||||
9
docker/blocks/postgres/docker-compose.yaml
Normal file
9
docker/blocks/postgres/docker-compose.yaml
Normal file
@@ -0,0 +1,9 @@
|
||||
postgrestest:
|
||||
image: postgres:latest
|
||||
environment:
|
||||
POSTGRES_USER: grafana
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DATABASE: grafana
|
||||
ports:
|
||||
- "5432:5432"
|
||||
command: postgres -c log_connections=on -c logging_collector=on -c log_destination=stderr -c log_directory=/var/log/postgresql
|
||||
@@ -1,9 +0,0 @@
|
||||
postgrestest:
|
||||
image: postgres:latest
|
||||
environment:
|
||||
POSTGRES_USER: grafana
|
||||
POSTGRES_PASSWORD: password
|
||||
POSTGRES_DATABASE: grafana
|
||||
ports:
|
||||
- "5432:5432"
|
||||
command: postgres -c log_connections=on -c logging_collector=on -c log_destination=stderr -c log_directory=/var/log/postgresql
|
||||
8
docker/blocks/postgres_tests/docker-compose.yaml
Normal file
8
docker/blocks/postgres_tests/docker-compose.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
postgrestest:
|
||||
image: postgres:latest
|
||||
environment:
|
||||
POSTGRES_USER: grafanatest
|
||||
POSTGRES_PASSWORD: grafanatest
|
||||
ports:
|
||||
- "5432:5432"
|
||||
tmpfs: /var/lib/postgresql/data:rw
|
||||
@@ -1,7 +0,0 @@
|
||||
postgrestest:
|
||||
image: postgres:latest
|
||||
environment:
|
||||
POSTGRES_USER: grafanatest
|
||||
POSTGRES_PASSWORD: grafanatest
|
||||
ports:
|
||||
- "5432:5432"
|
||||
25
docker/blocks/prometheus/docker-compose.yaml
Normal file
25
docker/blocks/prometheus/docker-compose.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
prometheus:
|
||||
build: blocks/prometheus
|
||||
network_mode: host
|
||||
ports:
|
||||
- "9090:9090"
|
||||
|
||||
node_exporter:
|
||||
image: prom/node-exporter
|
||||
network_mode: host
|
||||
ports:
|
||||
- "9100:9100"
|
||||
|
||||
fake-prometheus-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: host
|
||||
ports:
|
||||
- "9091:9091"
|
||||
environment:
|
||||
FD_DATASOURCE: prom
|
||||
|
||||
alertmanager:
|
||||
image: quay.io/prometheus/alertmanager
|
||||
network_mode: host
|
||||
ports:
|
||||
- "9093:9093"
|
||||
@@ -1,25 +0,0 @@
|
||||
prometheus:
|
||||
build: blocks/prometheus
|
||||
net: host
|
||||
ports:
|
||||
- "9090:9090"
|
||||
|
||||
node_exporter:
|
||||
image: prom/node-exporter
|
||||
net: host
|
||||
ports:
|
||||
- "9100:9100"
|
||||
|
||||
fake-prometheus-data:
|
||||
image: grafana/fake-data-gen
|
||||
net: host
|
||||
ports:
|
||||
- "9091:9091"
|
||||
environment:
|
||||
FD_DATASOURCE: prom
|
||||
|
||||
alertmanager:
|
||||
image: quay.io/prometheus/alertmanager
|
||||
net: host
|
||||
ports:
|
||||
- "9093:9093"
|
||||
3
docker/blocks/prometheus2/Dockerfile
Normal file
3
docker/blocks/prometheus2/Dockerfile
Normal file
@@ -0,0 +1,3 @@
|
||||
FROM prom/prometheus:v2.0.0
|
||||
ADD prometheus.yml /etc/prometheus/
|
||||
ADD alert.rules /etc/prometheus/
|
||||
10
docker/blocks/prometheus2/alert.rules
Normal file
10
docker/blocks/prometheus2/alert.rules
Normal file
@@ -0,0 +1,10 @@
|
||||
# Alert Rules
|
||||
|
||||
ALERT AppCrash
|
||||
IF process_open_fds > 0
|
||||
FOR 15s
|
||||
LABELS { severity="critical" }
|
||||
ANNOTATIONS {
|
||||
summary = "Number of open fds > 0",
|
||||
description = "Just testing"
|
||||
}
|
||||
35
docker/blocks/prometheus2/prometheus.yml
Normal file
35
docker/blocks/prometheus2/prometheus.yml
Normal file
@@ -0,0 +1,35 @@
|
||||
# my global config
|
||||
global:
|
||||
scrape_interval: 10s # By default, scrape targets every 15 seconds.
|
||||
evaluation_interval: 10s # By default, scrape targets every 15 seconds.
|
||||
# scrape_timeout is set to the global default (10s).
|
||||
|
||||
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
|
||||
#rule_files:
|
||||
# - "alert.rules"
|
||||
# - "first.rules"
|
||||
# - "second.rules"
|
||||
|
||||
# alerting:
|
||||
# alertmanagers:
|
||||
# - scheme: http
|
||||
# static_configs:
|
||||
# - targets:
|
||||
# - "127.0.0.1:9093"
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
|
||||
- job_name: 'node_exporter'
|
||||
static_configs:
|
||||
- targets: ['127.0.0.1:9100']
|
||||
|
||||
- job_name: 'fake-data-gen'
|
||||
static_configs:
|
||||
- targets: ['127.0.0.1:9091']
|
||||
|
||||
- job_name: 'grafana'
|
||||
static_configs:
|
||||
- targets: ['127.0.0.1:3000']
|
||||
@@ -1,5 +1,5 @@
|
||||
FROM centos:centos7
|
||||
MAINTAINER Przemyslaw Ozgo <linux@ozgo.info>
|
||||
LABEL maintainer="Przemyslaw Ozgo <linux@ozgo.info>"
|
||||
|
||||
RUN \
|
||||
yum update -y && \
|
||||
|
||||
4
docker/blocks/smtp/docker-compose.yaml
Normal file
4
docker/blocks/smtp/docker-compose.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
snmpd:
|
||||
image: namshi/smtp
|
||||
ports:
|
||||
- "25:25"
|
||||
@@ -1,4 +0,0 @@
|
||||
snmpd:
|
||||
image: namshi/smtp
|
||||
ports:
|
||||
- "25:25"
|
||||
2
docker/compose_header.yml
Normal file
2
docker/compose_header.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
version: "2"
|
||||
services:
|
||||
@@ -7,8 +7,9 @@ template_dir=templates
|
||||
grafana_config_file=conf.tmp
|
||||
grafana_config=config
|
||||
|
||||
fig_file=docker-compose.yml
|
||||
fig_config=fig
|
||||
compose_header_file=compose_header.yml
|
||||
fig_file=docker-compose.yaml
|
||||
fig_config=docker-compose.yaml
|
||||
|
||||
if [ "$#" == 0 ]; then
|
||||
blocks=`ls $blocks_dir`
|
||||
@@ -23,13 +24,16 @@ if [ "$#" == 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for file in $gogs_config_file $fig_file; do
|
||||
for file in $grafana_config_file $fig_file; do
|
||||
if [ -e $file ]; then
|
||||
echo "Deleting $file"
|
||||
rm $file
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Adding Compose header to $fig_file"
|
||||
cat $compose_header_file >> $fig_file
|
||||
|
||||
for dir in $@; do
|
||||
current_dir=$blocks_dir/$dir
|
||||
if [ ! -d "$current_dir" ]; then
|
||||
@@ -45,7 +49,7 @@ for dir in $@; do
|
||||
|
||||
if [ -e $current_dir/$fig_config ]; then
|
||||
echo "Adding $current_dir/$fig_config to $fig_file"
|
||||
cat $current_dir/fig >> $fig_file
|
||||
cat $current_dir/$fig_config >> $fig_file
|
||||
echo "" >> $fig_file
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
version: "2"
|
||||
services:
|
||||
graphite:
|
||||
build:
|
||||
context: blocks/graphite1
|
||||
args:
|
||||
version: master
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "2003:2003"
|
||||
- "8125:8125/udp"
|
||||
- "8126:8126"
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
|
||||
fake-graphite-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: graphite
|
||||
FD_PORT: 2003
|
||||
|
||||
|
||||
prometheus:
|
||||
build: blocks/prometheus
|
||||
network_mode: host
|
||||
ports:
|
||||
- "9090:9090"
|
||||
|
||||
node_exporter:
|
||||
image: prom/node-exporter
|
||||
network_mode: host
|
||||
ports:
|
||||
- "9100:9100"
|
||||
|
||||
fake-prometheus-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: host
|
||||
ports:
|
||||
- "9091:9091"
|
||||
environment:
|
||||
FD_DATASOURCE: prom
|
||||
|
||||
alertmanager:
|
||||
image: quay.io/prometheus/alertmanager
|
||||
network_mode: host
|
||||
ports:
|
||||
- "9093:9093"
|
||||
|
||||
influxdb:
|
||||
image: influxdb:latest
|
||||
container_name: influxdb
|
||||
ports:
|
||||
- "2004:2004"
|
||||
- "8083:8083"
|
||||
- "8086:8086"
|
||||
volumes:
|
||||
- ./blocks/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf
|
||||
|
||||
fake-influxdb-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: influxdb
|
||||
FD_PORT: 8086
|
||||
|
||||
|
||||
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
|
||||
|
||||
elasticsearch5:
|
||||
image: elasticsearch:5
|
||||
command: elasticsearch
|
||||
ports:
|
||||
- "10200:9200"
|
||||
- "10300:9300"
|
||||
|
||||
184
docs/sources/administration/provisioning.md
Normal file
184
docs/sources/administration/provisioning.md
Normal file
@@ -0,0 +1,184 @@
|
||||
+++
|
||||
title = "Provisioning"
|
||||
description = ""
|
||||
keywords = ["grafana", "provisioning"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "admin"
|
||||
weight = 8
|
||||
+++
|
||||
|
||||
# Provisioning Grafana
|
||||
|
||||
## Config file
|
||||
|
||||
Checkout the [configuration](/installation/configuration) page for more information about what you can configure in `grafana.ini`
|
||||
|
||||
### Config file locations
|
||||
|
||||
- Default configuration from `$WORKING_DIR/conf/defaults.ini`
|
||||
- Custom configuration from `$WORKING_DIR/conf/custom.ini`
|
||||
- The custom configuration file path can be overridden using the `--config` parameter
|
||||
|
||||
> **Note.** If you have installed Grafana using the `deb` or `rpm`
|
||||
> packages, then your configuration file is located at
|
||||
> `/etc/grafana/grafana.ini`. This path is specified in the Grafana
|
||||
> init.d script using `--config` file parameter.
|
||||
|
||||
### Using environment variables
|
||||
|
||||
All options in the configuration file (listed below) can be overridden
|
||||
using environment variables using the syntax:
|
||||
|
||||
```bash
|
||||
GF_<SectionName>_<KeyName>
|
||||
```
|
||||
|
||||
Where the section name is the text within the brackets. Everything
|
||||
should be upper case, `.` should be replaced by `_`. For example, given these configuration settings:
|
||||
|
||||
```bash
|
||||
# default section
|
||||
instance_name = ${HOSTNAME}
|
||||
|
||||
[security]
|
||||
admin_user = admin
|
||||
|
||||
[auth.google]
|
||||
client_secret = 0ldS3cretKey
|
||||
```
|
||||
|
||||
Then you can override them using:
|
||||
|
||||
```bash
|
||||
export GF_DEFAULT_INSTANCE_NAME=my-instance
|
||||
export GF_SECURITY_ADMIN_USER=true
|
||||
export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
|
||||
```
|
||||
|
||||
<hr />
|
||||
|
||||
## Configuration management tools
|
||||
|
||||
Currently we do not provide any scripts/manifests for configuring Grafana. Rather then spending time learning and creating scripts/manifests for each tool, we think our time is better spent making Grafana easier to provision. Therefor, we heavily relay on the expertise of he community.
|
||||
|
||||
Tool | Project
|
||||
-----|------------
|
||||
Puppet | [https://forge.puppet.com/puppet/grafana](https://forge.puppet.com/puppet/grafana)
|
||||
Ansible | [https://github.com/cloudalchemy/ansible-grafana](https://github.com/cloudalchemy/ansible-grafana)
|
||||
Ansible | [https://github.com/picotrading/ansible-grafana](https://github.com/picotrading/ansible-grafana)
|
||||
Chef | [https://github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana)
|
||||
Saltstack | [https://github.com/salt-formulas/salt-formula-grafana](https://github.com/salt-formulas/salt-formula-grafana)
|
||||
|
||||
## Datasources
|
||||
|
||||
> This feature is available from v5.0
|
||||
|
||||
It's possible to manage datasources in Grafana by adding one or more yaml config files in the [`provisioning/datasources`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will be added or updated during start up. If the datasource already exists, Grafana will update it to match the configuration file. The config file can also contain a list of datasources that should be deleted. That list is called `delete_datasources`. Grafana will delete datasources listed in `delete_datasources` before inserting/updating those in the `datasource` list.
|
||||
|
||||
### Running multiple grafana instances.
|
||||
If you are running multiple instances of Grafana you might run into problems if they have different versions of the datasource.yaml configuration file. The best way to solve this problem is to add a version number to each datasource in the configuration and increase it when you update the config. Grafana will only update datasources with the same or lower version number than specified in the config. That way old configs cannot overwrite newer configs if they restart at the same time.
|
||||
|
||||
### Example datasource config file
|
||||
```yaml
|
||||
# list of datasources that should be deleted from the database
|
||||
delete_datasources:
|
||||
- name: Graphite
|
||||
org_id: 1
|
||||
|
||||
# list of datasources to insert/update depending
|
||||
# whats available in the datbase
|
||||
datasources:
|
||||
# <string, required> name of the datasource. Required
|
||||
- name: Graphite
|
||||
# <string, required> datasource type. Required
|
||||
type: graphite
|
||||
# <string, required> access mode. direct or proxy. Required
|
||||
access: proxy
|
||||
# <int> org id. will default to org_id 1 if not specified
|
||||
org_id: 1
|
||||
# <string> url
|
||||
url: http://localhost:8080
|
||||
# <string> database password, if used
|
||||
password:
|
||||
# <string> database user, if used
|
||||
user:
|
||||
# <string> database name, if used
|
||||
database:
|
||||
# <bool> enable/disable basic auth
|
||||
basic_auth:
|
||||
# <string> basic auth username
|
||||
basic_auth_user:
|
||||
# <string> basic auth password
|
||||
basic_auth_password:
|
||||
# <bool> enable/disable with credentials headers
|
||||
with_credentials:
|
||||
# <bool> mark as default datasource. Max one per org
|
||||
is_default:
|
||||
# <map> fields that will be converted to json and stored in json_data
|
||||
json_data:
|
||||
graphiteVersion: "1.1"
|
||||
tlsAuth: true
|
||||
tlsAuthWithCACert: true
|
||||
# <string> json object of data that will be encrypted.
|
||||
secure_json_data:
|
||||
tlsCACert: "..."
|
||||
tlsClientCert: "..."
|
||||
tlsClientKey: "..."
|
||||
version: 1
|
||||
# <bool> allow users to edit datasources from the UI.
|
||||
editable: false
|
||||
```
|
||||
|
||||
#### Json data
|
||||
|
||||
Since all datasources dont have the same configuration settings we only have the most common ones as fields. The rest should be stored as a json blob in the `json_data` field. Here are the most common settings that the core datasources use.
|
||||
|
||||
| Name | Type | Datasource |Description |
|
||||
| ----| ---- | ---- | --- |
|
||||
| tlsAuth | boolean | *All* | Enable TLS authentication using client cert configured in secure json data |
|
||||
| tlsAuthWithCACert | boolean | *All* | Enable TLS authtication using CA cert |
|
||||
| graphiteVersion | string | Graphite | Graphite version |
|
||||
| timeInterval | string | Elastic, Influxdb & Prometheus | Lowest interval/step value that should be used for this data source |
|
||||
| esVersion | string | Elastic | Elasticsearch version |
|
||||
| timeField | string | Elastic | Which field that should be used as timestamp |
|
||||
| interval | string | Elastic | Index date time format |
|
||||
| authType | string | Cloudwatch | Auth provider. keys/credentials/arn |
|
||||
| assumeRoleArn | string | Cloudwatch | ARN of Assume Role |
|
||||
| defaultRegion | string | Cloudwatch | AWS region |
|
||||
| customMetricsNamespaces | string | Cloudwatch | Namespaces of Custom Metrics |
|
||||
| tsdbVersion | string | OpenTsdb | Version |
|
||||
| tsdbResolution | string | OpenTsdb | Resolution |
|
||||
| sslmode | string | Postgre | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
|
||||
|
||||
|
||||
#### Secure Json data
|
||||
|
||||
{"authType":"keys","defaultRegion":"us-west-2","timeField":"@timestamp"}
|
||||
|
||||
Secure json data is a map of settings that will be encrypted with [secret key](/installation/configuration/#secret-key) from the grafana config. The purpose of this is only to hide content from the users of the application. This should be used for storing TLS Cert and password that Grafana will append to request on the server side. All these settings are optional.
|
||||
|
||||
| Name | Type | Datasource | Description |
|
||||
| ----| ---- | ---- | --- |
|
||||
| tlsCACert | string | *All* |CA cert for out going requests |
|
||||
| tlsClientCert | string | *All* |TLS Client cert for outgoing requests |
|
||||
| tlsClientKey | string | *All* |TLS Client key for outgoing requests |
|
||||
| password | string | Postgre | password |
|
||||
| user | string | Postgre | user |
|
||||
|
||||
### Dashboards
|
||||
|
||||
It's possible to manage dashboards in Grafana by adding one or more yaml config files in the [`provisioning/dashboards`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `dashboards providers` that will load dashboards into grafana. Currently we only support reading dashboards from file but we will add more providers in the future.
|
||||
|
||||
The dashboard provider config file looks like this
|
||||
|
||||
```yaml
|
||||
- name: 'default'
|
||||
org_id: 1
|
||||
folder: ''
|
||||
type: file
|
||||
options:
|
||||
folder: /var/lib/grafana/dashboards
|
||||
```
|
||||
|
||||
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.
|
||||
@@ -126,25 +126,26 @@ There are couple of configurations options which need to be set in Grafana UI un
|
||||
|
||||
Once these two properties are set, you can send the alerts to Kafka for further processing or throttling them.
|
||||
|
||||
### Other Supported Notification Channels
|
||||
### All supported notifier
|
||||
|
||||
Grafana also supports the following Notification Channels:
|
||||
Name | Type |Support images
|
||||
-----|------------ | ------
|
||||
Slack | `slack` | yes
|
||||
Pagerduty | `pagerduty` | yes
|
||||
Email | `email` | yes
|
||||
Webhook | `webhook` | link
|
||||
Kafka | `kafka` | no
|
||||
Hipchat | `hipchat` | yes
|
||||
VictorOps | `victorops` | yes
|
||||
Sensu | `sensu` | yes
|
||||
OpsGenie | `opsgenie` | yes
|
||||
Threema | `threema` | yes
|
||||
Pushover | `pushover` | no
|
||||
Telegram | `telegram` | no
|
||||
Line | `line` | no
|
||||
Prometheus Alertmanager | `prometheus-alertmanager` | no
|
||||
|
||||
- HipChat
|
||||
|
||||
- VictorOps
|
||||
|
||||
- Sensu
|
||||
|
||||
- OpsGenie
|
||||
|
||||
- Threema
|
||||
|
||||
- Pushover
|
||||
|
||||
- Telegram
|
||||
|
||||
- LINE
|
||||
|
||||
# Enable images in notifications {#external-image-store}
|
||||
|
||||
|
||||
@@ -27,8 +27,7 @@ and the conditions that need to be met for the alert to change state and trigger
|
||||
## Execution
|
||||
|
||||
The alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
|
||||
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`,
|
||||
`InfluxDB` and `OpenTSDB`.
|
||||
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`, `InfluxDB`, `OpenTSDB`, `MySQL`, `Postgres` and `Cloudwatch`.
|
||||
|
||||
### Clustering
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ Here you can find links to older versions of the documentation that might be bet
|
||||
of Grafana.
|
||||
|
||||
- [Latest](http://docs.grafana.org)
|
||||
- [Version 4.5](http://docs.grafana.org/v4.5)
|
||||
- [Version 4.4](http://docs.grafana.org/v4.4)
|
||||
- [Version 4.3](http://docs.grafana.org/v4.3)
|
||||
- [Version 4.2](http://docs.grafana.org/v4.2)
|
||||
|
||||
@@ -29,7 +29,7 @@ Name | Description
|
||||
------------ | -------------
|
||||
*Name* | The data source name. This is how you refer to the data source in panels & queries.
|
||||
*Default* | Default data source means that it will be pre-selected for new panels.
|
||||
*Credentials* profile name | Specify the name of the profile to use (if you use `~/aws/credentials` file), leave blank for default.
|
||||
*Credentials* profile name | Specify the name of the profile to use (if you use `~/.aws/credentials` file), leave blank for default.
|
||||
*Default Region* | Used in query editor to set region (can be changed on per query basis)
|
||||
*Custom Metrics namespace* | Specify the CloudWatch namespace of Custom metrics
|
||||
*Assume Role Arn* | Specify the ARN of the role to assume
|
||||
@@ -78,11 +78,14 @@ CloudWatch Datasource Plugin provides the following queries you can specify in t
|
||||
edit view. They allow you to fill a variable's options list with things like `region`, `namespaces`, `metric names`
|
||||
and `dimension keys/values`.
|
||||
|
||||
In place of `region` you can specify `default` to use the default region configured in the datasource for the query,
|
||||
e.g. `metrics(AWS/DynamoDB, default)` or `dimension_values(default, ..., ..., ...)`.
|
||||
|
||||
Name | Description
|
||||
------- | --------
|
||||
*regions()* | Returns a list of regions AWS provides their service.
|
||||
*namespaces()* | Returns a list of namespaces CloudWatch support.
|
||||
*metrics(namespace, [region])* | Returns a list of metrics in the namespace. (specify region for custom metrics)
|
||||
*metrics(namespace, [region])* | Returns a list of metrics in the namespace. (specify region or use "default" for custom metrics)
|
||||
*dimension_keys(namespace)* | Returns a list of dimension keys in the namespace.
|
||||
*dimension_values(region, namespace, metric, dimension_key)* | Returns a list of dimension values matching the specified `region`, `namespace`, `metric` and `dimension_key`.
|
||||
*ebs_volume_ids(region, instance_id)* | Returns a list of volume ids matching the specified `region`, `instance_id`.
|
||||
@@ -169,5 +172,3 @@ Amazon provides 1 million CloudWatch API requests each month at no additional ch
|
||||
it costs $0.01 per 1,000 GetMetricStatistics or ListMetrics requests. For each query Grafana will
|
||||
issue a GetMetricStatistics request and every time you pick a dimension in the query editor
|
||||
Grafana will issue a ListMetrics request.
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
+++
|
||||
title = "Data Sources"
|
||||
type = "docs"
|
||||
aliases = ["/datasources/overview/"]
|
||||
[menu.docs]
|
||||
name = "Data Sources"
|
||||
identifier = "datasources"
|
||||
@@ -27,8 +28,9 @@ The following datasources are officially supported:
|
||||
* [InfluxDB]({{< relref "influxdb.md" >}})
|
||||
* [OpenTSDB]({{< relref "opentsdb.md" >}})
|
||||
* [Prometheus]({{< relref "prometheus.md" >}})
|
||||
* [MySQL]({{< relref "mysql.md" >}})
|
||||
* [Postgres]({{< relref "postgres.md" >}})
|
||||
|
||||
## Data source plugins
|
||||
|
||||
Since grafana 3.0 you can install data sources as plugins. Checkout [Grafana.net](https://grafana.com/plugins) for more data sources.
|
||||
|
||||
|
||||
@@ -173,6 +173,4 @@ SELECT title, description from events WHERE $timeFilter order asc
|
||||
|
||||
For InfluxDB you need to enter a query like in the above example. You need to have the ```where $timeFilter```
|
||||
part. If you only select one column you will not need to enter anything in the column mapping fields. The
|
||||
Tags field can be a comma seperated string.
|
||||
|
||||
|
||||
Tags field can be a comma separated string.
|
||||
|
||||
@@ -127,6 +127,12 @@ A query can returns multiple columns and Grafana will automatically create a lis
|
||||
SELECT my_host.hostname, my_other_host.hostname2 FROM my_host JOIN my_other_host ON my_host.city = my_other_host.city
|
||||
```
|
||||
|
||||
To use time range dependent macros like `$__timeFilter(column)` in your query the refresh mode of the template variable needs to be set to *On Time Range Change*.
|
||||
|
||||
```sql
|
||||
SELECT event_name FROM event_log WHERE $__timeFilter(time_column)
|
||||
```
|
||||
|
||||
Another option is a query that can create a key/value variable. The query should return two columns that are named `__text` and `__value`. The `__text` column value should be unique (if it is not unique then the first value is used). The options in the dropdown will have a text and value that allows you to have a friendly name as text and an id as the value. An example query with `hostname` as the text and `id` as the value:
|
||||
|
||||
```sql
|
||||
@@ -142,7 +148,11 @@ SELECT hostname FROM my_host WHERE region IN($region)
|
||||
|
||||
### Using Variables in Queries
|
||||
|
||||
Template variables are quoted automatically so if it is a string value do not wrap them in quotes in where clauses. If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
|
||||
From Grafana 4.3.0 to 4.6.0, template variables are always quoted automatically so if it is a string value do not wrap them in quotes in where clauses.
|
||||
|
||||
From Grafana 4.7.0, template variable values are only quoted when the template variable is a `multi-value`.
|
||||
|
||||
If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
|
||||
|
||||
There are two syntaxes:
|
||||
|
||||
@@ -170,7 +180,28 @@ WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
|
||||
ORDER BY atimestamp ASC
|
||||
```
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
An example query:
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
UNIX_TIMESTAMP(atimestamp) as time_sec,
|
||||
value as text,
|
||||
CONCAT(tag1, ',', tag2) as tags
|
||||
FROM my_table
|
||||
WHERE $__timeFilter(atimestamp)
|
||||
ORDER BY atimestamp ASC
|
||||
```
|
||||
|
||||
Name | Description
|
||||
------------ | -------------
|
||||
time_sec | The name of the date/time field.
|
||||
text | Event description field.
|
||||
tags | Optional field name to use for event tags as a comma separated string.
|
||||
|
||||
## Alerting
|
||||
|
||||
Time series queries should work in alerting conditions. Table formatted queries is not yet supported in alert rule
|
||||
conditions.
|
||||
Time series queries should work in alerting conditions. Table formatted queries is not yet supported in alert rule conditions.
|
||||
|
||||
@@ -45,10 +45,10 @@ Macro example | Description
|
||||
------------ | -------------
|
||||
*$__time(dateColumn)* | Will be replaced by an expression to rename the column to `time`. For example, *dateColumn as time*
|
||||
*$__timeSec(dateColumn)* | Will be replaced by an expression to rename the column to `time` and converting the value to unix timestamp. For example, *extract(epoch from dateColumn) as time*
|
||||
*$__timeFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name. For example, *dateColumn > to_timestamp(1494410783) AND dateColumn < to_timestamp(1494497183)*
|
||||
*$__timeFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name. For example, *extract(epoch from dateColumn) BETWEEN 1494410783 AND 1494497183*
|
||||
*$__timeFrom()* | Will be replaced by the start of the currently active time selection. For example, *to_timestamp(1494410783)*
|
||||
*$__timeTo()* | Will be replaced by the end of the currently active time selection. For example, *to_timestamp(1494497183)*
|
||||
*$__timeGroup(dateColumn,'5m')* | Will be replaced by an expression usable in GROUP BY clause. For example, *(extract(epoch from "dateColumn")/extract(epoch from '5m'::interval))::int*extract(epoch from '5m'::interval)*
|
||||
*$__timeGroup(dateColumn,'5m')* | Will be replaced by an expression usable in GROUP BY clause. For example, *(extract(epoch from dateColumn)/300)::bigint*300 AS time*
|
||||
*$__unixEpochFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name with times represented as unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183*
|
||||
*$__unixEpochFrom()* | Will be replaced by the start of the currently active time selection as unix timestamp. For example, *1494410783*
|
||||
*$__unixEpochTo()* | Will be replaced by the end of the currently active time selection as unix timestamp. For example, *1494497183*
|
||||
@@ -94,7 +94,7 @@ Example with `metric` column
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup(time_date_time,'5m') as time,
|
||||
$__timeGroup(time_date_time,'5m'),
|
||||
min(value_double),
|
||||
'min' as metric
|
||||
FROM test_data
|
||||
@@ -107,7 +107,7 @@ Example with multiple columns:
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
$__timeGroup(time_date_time,'5m') as time,
|
||||
$__timeGroup(time_date_time,'5m'),
|
||||
min(value_double) as min_value,
|
||||
max(value_double) as max_value
|
||||
FROM test_data
|
||||
@@ -139,6 +139,12 @@ A query can return multiple columns and Grafana will automatically create a list
|
||||
SELECT host.hostname, other_host.hostname2 FROM host JOIN other_host ON host.city = other_host.city
|
||||
```
|
||||
|
||||
To use time range dependent macros like `$__timeFilter(column)` in your query the refresh mode of the template variable needs to be set to *On Time Range Change*.
|
||||
|
||||
```sql
|
||||
SELECT event_name FROM event_log WHERE $__timeFilter(time_column)
|
||||
```
|
||||
|
||||
Another option is a query that can create a key/value variable. The query should return two columns that are named `__text` and `__value`. The `__text` column value should be unique (if it is not unique then the first value is used). The options in the dropdown will have a text and value that allows you to have a friendly name as text and an id as the value. An example query with `hostname` as the text and `id` as the value:
|
||||
|
||||
```sql
|
||||
@@ -154,7 +160,11 @@ SELECT hostname FROM host WHERE region IN($region)
|
||||
|
||||
### Using Variables in Queries
|
||||
|
||||
Template variables are quoted automatically so if it is a string value do not wrap them in quotes in where clauses. If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
|
||||
From Grafana 4.3.0 to 4.6.0, template variables are always quoted automatically so if it is a string value do not wrap them in quotes in where clauses.
|
||||
|
||||
From Grafana 4.7.0, template variable values are only quoted when the template variable is a `multi-value`.
|
||||
|
||||
If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
|
||||
|
||||
There are two syntaxes:
|
||||
|
||||
@@ -180,6 +190,29 @@ WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
|
||||
ORDER BY atimestamp ASC
|
||||
```
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "reference/annotations.md" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
An example query:
|
||||
|
||||
```sql
|
||||
SELECT
|
||||
extract(epoch from time_date_time) AS time,
|
||||
metric1 as text,
|
||||
concat_ws(', ', metric1::text, metric2::text) as tags
|
||||
FROM
|
||||
public.test_data
|
||||
WHERE
|
||||
$__timeFilter(time_date_time)
|
||||
```
|
||||
|
||||
Name | Description
|
||||
------------ | -------------
|
||||
time | The name of the date/time field.
|
||||
text | Event description field.
|
||||
tags | Optional field name to use for event tags as a comma separated string.
|
||||
|
||||
## Alerting
|
||||
|
||||
Time series queries should work in alerting conditions. Table formatted queries is not yet supported in alert rule
|
||||
|
||||
@@ -96,3 +96,7 @@ Prometheus supports two ways to query annotations.
|
||||
- A Prometheus query for pending and firing alerts (for details see [Inspecting alerts during runtime](https://prometheus.io/docs/alerting/rules/#inspecting-alerts-during-runtime))
|
||||
|
||||
The step option is useful to limit the number of events returned from your query.
|
||||
|
||||
## Getting Grafana metrics into Prometheus
|
||||
|
||||
Since 4.6.0 Grafana exposes metrics for Prometheus on the `/metrics` endpoint. We also bundle a dashboard within Grafana so you can get started viewing your metrics faster. You can import the bundled dashboard by going to the data source edit page and click the dashboard tab. There you can find a dashboard for Grafana and one for Prometheus. Import and start viewing all the metrics!
|
||||
|
||||
@@ -17,7 +17,7 @@ This make is much easier to verify functionally since the data can be shared ver
|
||||
|
||||
## Enable
|
||||
|
||||
`Grafana TestData` is not enabled by default. To enable it you have to go to `/plugins/testdata/edit` and click the enable button to 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.
|
||||
|
||||
## Create mock data.
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ This makes exploring and filtering Prometheus data much easier.
|
||||
* **Opsgenie**: Use their latest API instead of old version [#9399](https://github.com/grafana/grafana/pull/9399), thx [@cglrkn](https://github.com/cglrkn)
|
||||
* **Table**: Add support for displaying the timestamp with milliseconds [#9429](https://github.com/grafana/grafana/pull/9429), thx [@s1061123](https://github.com/s1061123)
|
||||
* **Hipchat**: Add metrics, message and image to hipchat notifications [#9110](https://github.com/grafana/grafana/issues/9110), thx [@eloo](https://github.com/eloo)
|
||||
* **Postgres**: modify group by time macro so it can be used in select clause [#9527](https://github.com/grafana/grafana/pull/9527), thanks [@svenklemm](https://github.com/svenklemm)
|
||||
|
||||
### Tech
|
||||
* **Go**: Grafana is now built using golang 1.9
|
||||
|
||||
@@ -102,11 +102,6 @@ Content-Type: application/json
|
||||
"templates_pattern":"emails/*.html",
|
||||
"welcome_email_on_sign_up":"false"
|
||||
},
|
||||
"event_publisher":{
|
||||
"enabled":"false",
|
||||
"exchange":"grafana_events",
|
||||
"rabbitmq_url":"amqp://localhost/"
|
||||
},
|
||||
"log":{
|
||||
"buffer_len":"10000",
|
||||
"level":"Info",
|
||||
|
||||
@@ -133,6 +133,37 @@ Content-Type: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
## Create alert notification
|
||||
|
||||
You can find the full list of [supported notifers](/alerting/notifications/#all-supported-notifier) at the alert notifiers page.
|
||||
|
||||
`POST /api/alert-notifications`
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
POST /api/alert-notifications HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
{
|
||||
```
|
||||
|
||||
@@ -165,6 +196,8 @@ Content-Type: application/json
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
DELETE /api/alert-notifications/1 HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
@@ -89,7 +89,7 @@ Content-Type: application/json
|
||||
format (string with multiple tags being separated by a space).
|
||||
|
||||
`POST /api/annotations/graphite`
|
||||
POST /api/annotations/graphite HTTP/1.1
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```json
|
||||
@@ -117,7 +117,11 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
PUT /api/annotations/1141 HTTP/1.1
|
||||
## Update Annotation
|
||||
|
||||
`PUT /api/annotations/:id`
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```json
|
||||
PUT /api/annotations/1141 HTTP/1.1
|
||||
@@ -148,7 +152,10 @@ Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
HTTP/1.1 200
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
@@ -100,7 +100,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
```http
|
||||
DELETE /api/auth/keys/3 HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -258,7 +258,7 @@ Query parameters:
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
GET /api/search?query=MyDashboard&starred=true&tag=prod HTTP/1.1
|
||||
GET /api/search?query=Production%20Overview&starred=true&tag=prod HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
@@ -276,8 +276,8 @@ Content-Type: application/json
|
||||
"title":"Production Overview",
|
||||
"uri":"db/production-overview",
|
||||
"type":"dash-db",
|
||||
"tags":[],
|
||||
"isStarred":false
|
||||
"tags":[prod],
|
||||
"isStarred":true
|
||||
}
|
||||
]
|
||||
```
|
||||
```
|
||||
|
||||
@@ -14,12 +14,12 @@ parent = "http_api"
|
||||
|
||||
## Get current Organisation
|
||||
|
||||
`GET /api/org`
|
||||
`GET /api/org/`
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
GET /api/org HTTP/1.1
|
||||
GET /api/org/ HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
@@ -49,6 +49,8 @@ Accept: application/json
|
||||
to the request http url, like http://admin:admin@localhost:3000/api/orgs/1
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -81,6 +83,8 @@ Accept: application/json
|
||||
`POST /api/orgs`
|
||||
|
||||
**Example Request**:
|
||||
|
||||
```http
|
||||
POST /api/orgs HTTP/1.1
|
||||
Accept: application/json
|
||||
Content-Type: application/json
|
||||
@@ -118,6 +122,9 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
```
|
||||
|
||||
## Get all users within the actual organisation
|
||||
|
||||
@@ -279,6 +286,8 @@ Accept: application/json
|
||||
Content-Type: application/json
|
||||
[
|
||||
```
|
||||
|
||||
## Add User in Organisation
|
||||
|
||||
`POST /api/orgs/:orgId/users`
|
||||
|
||||
@@ -334,6 +343,9 @@ Accept: application/json
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
```
|
||||
|
||||
**Example Response**:
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
|
||||
@@ -140,9 +140,9 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
## Delete Snapshot by Id
|
||||
## Delete Snapshot by deleteKey
|
||||
|
||||
`GET /api/snapshots-delete/:key`
|
||||
`GET /api/snapshots-delete/:deleteKey`
|
||||
|
||||
**Example Request**:
|
||||
|
||||
|
||||
@@ -35,17 +35,19 @@ The back-end web server has a number of configuration options. Go the
|
||||
those options.
|
||||
|
||||
|
||||
## Getting started
|
||||
## Getting Started
|
||||
|
||||
- [Getting Started]({{< relref "guides/getting_started.md" >}})
|
||||
- [Basic Concepts]({{< relref "guides/basic_concepts.md" >}})
|
||||
- [Screencasts]({{< relref "tutorials/screencasts.md" >}})
|
||||
|
||||
## Data sources guides
|
||||
## Data Source Guides
|
||||
|
||||
- [Graphite]({{< relref "features/datasources/graphite.md" >}})
|
||||
- [Elasticsearch]({{< relref "features/datasources/elasticsearch.md" >}})
|
||||
- [InfluxDB]({{< relref "features/datasources/influxdb.md" >}})
|
||||
- [Prometheus]({{< relref "features/datasources/prometheus.md" >}})
|
||||
- [OpenTSDB]({{< relref "features/datasources/opentsdb.md" >}})
|
||||
|
||||
|
||||
- [MySQL]({{< relref "features/datasources/mysql.md" >}})
|
||||
- [Postgres]({{< relref "features/datasources/postgres.md" >}})
|
||||
- [Cloudwatch]({{< relref "features/datasources/cloudwatch.md" >}})
|
||||
|
||||
@@ -87,6 +87,16 @@ command line in the init.d script or the systemd service file. It can
|
||||
be overridden in the configuration file or in the default environment variable
|
||||
file.
|
||||
|
||||
### plugins
|
||||
|
||||
Directory where grafana will automatically scan and look for plugins
|
||||
|
||||
### provisioning
|
||||
|
||||
> This feature is available in 5.0+
|
||||
|
||||
Folder that contains [provisioning](/administration/provisioning) config files that grafana will apply on startup. Dashboards will be reloaded when the json files changes
|
||||
|
||||
## [server]
|
||||
|
||||
### http_addr
|
||||
@@ -195,7 +205,7 @@ The database user (not applicable for `sqlite3`).
|
||||
|
||||
### password
|
||||
|
||||
The database user's password (not applicable for `sqlite3`). If the password contains `#` or `;` you have to wrap it with trippel quotes. Ex `"""#password;"""`
|
||||
The database user's password (not applicable for `sqlite3`). If the password contains `#` or `;` you have to wrap it with triple quotes. Ex `"""#password;"""`
|
||||
|
||||
### ssl_mode
|
||||
|
||||
@@ -204,19 +214,19 @@ For MySQL, use either `true`, `false`, or `skip-verify`.
|
||||
|
||||
### ca_cert_path
|
||||
|
||||
(MySQL only) The path to the CA certificate to use. On many linux systems, certs can be found in `/etc/ssl/certs`.
|
||||
The path to the CA certificate to use. On many linux systems, certs can be found in `/etc/ssl/certs`.
|
||||
|
||||
### client_key_path
|
||||
|
||||
(MySQL only) The path to the client key. Only if server requires client authentication.
|
||||
The path to the client key. Only if server requires client authentication.
|
||||
|
||||
### client_cert_path
|
||||
|
||||
(MySQL only) The path to the client cert. Only if server requires client authentication.
|
||||
The path to the client cert. Only if server requires client authentication.
|
||||
|
||||
### server_cert_name
|
||||
|
||||
(MySQL only) The common name field of the certificate used by the `mysql` server. Not necessary if `ssl_mode` is set to `skip-verify`.
|
||||
The common name field of the certificate used by the `mysql` or `postgres` server. Not necessary if `ssl_mode` is set to `skip-verify`.
|
||||
|
||||
### max_idle_conn
|
||||
The maximum number of connections in the idle connection pool.
|
||||
@@ -224,6 +234,9 @@ The maximum number of connections in the idle connection pool.
|
||||
### max_open_conn
|
||||
The maximum number of open connections to the database.
|
||||
|
||||
### log_queries
|
||||
Set to `true` to log the sql calls and execution times.
|
||||
|
||||
<hr />
|
||||
|
||||
## [security]
|
||||
@@ -279,10 +292,14 @@ organization to be created for that new user.
|
||||
|
||||
The role new users will be assigned for the main organization (if the
|
||||
above setting is set to true). Defaults to `Viewer`, other valid
|
||||
options are `Admin` and `Editor` and `Read Only Editor`. e.g. :
|
||||
options are `Admin` and `Editor`. e.g. :
|
||||
|
||||
`auto_assign_org_role = Read Only Editor`
|
||||
`auto_assign_org_role = Viewer`
|
||||
|
||||
### viewers can edit
|
||||
|
||||
Viewers can edit/inspect dashboard settings in the browser. But not save the dashboard.
|
||||
Defaults to `false`.
|
||||
|
||||
<hr>
|
||||
|
||||
@@ -551,7 +568,7 @@ session provider you have configured.
|
||||
|
||||
- **file:** session file path, e.g. `data/sessions`
|
||||
- **mysql:** go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name`
|
||||
- **postgres:** ex: user=a password=b host=localhost port=5432 dbname=c sslmode=require
|
||||
- **postgres:** ex: user=a password=b host=localhost port=5432 dbname=c sslmode=verify-full
|
||||
- **memcache:** ex: 127.0.0.1:11211
|
||||
- **redis:** ex: `addr=127.0.0.1:6379,pool_size=100,prefix=grafana`
|
||||
|
||||
@@ -580,7 +597,7 @@ CREATE TABLE session (
|
||||
);
|
||||
```
|
||||
|
||||
Postgres valid `sslmode` are `disable`, `require` (default), `verify-ca`, and `verify-full`.
|
||||
Postgres valid `sslmode` are `disable`, `require`, `verify-ca`, and `verify-full` (default).
|
||||
|
||||
### cookie_name
|
||||
|
||||
@@ -613,10 +630,15 @@ Analytics ID here. By default this feature is disabled.
|
||||
|
||||
<hr />
|
||||
|
||||
## [dashboards]
|
||||
|
||||
### versions_to_keep (introduced in v5.0)
|
||||
|
||||
Number dashboard versions to keep (per dashboard). Default: 20, Minimum: 1.
|
||||
|
||||
## [dashboards.json]
|
||||
|
||||
If you have a system that automatically builds dashboards as json files you can enable this feature to have the
|
||||
Grafana backend index those json dashboards which will make them appear in regular dashboard search.
|
||||
> This have been replaced with dashboards [provisioning](/administration/provisioning) in 5.0+
|
||||
|
||||
### enabled
|
||||
`true` or `false`. Is disabled by default.
|
||||
@@ -673,7 +695,7 @@ Ex `filters = sqlstore:debug`
|
||||
## [metrics]
|
||||
|
||||
### enabled
|
||||
Enable metrics reporting. defaults true. Available via HTTP API `/api/metrics`.
|
||||
Enable metrics reporting. defaults true. Available via HTTP API `/metrics`.
|
||||
|
||||
### interval_seconds
|
||||
|
||||
@@ -761,6 +783,9 @@ Service Account should have "Storage Object Writer" role.
|
||||
### bucket name
|
||||
Bucket Name on Google Cloud Storage.
|
||||
|
||||
### path
|
||||
Optional extra path inside bucket
|
||||
|
||||
## [alerting]
|
||||
|
||||
### enabled
|
||||
|
||||
@@ -15,9 +15,7 @@ weight = 1
|
||||
|
||||
Description | Download
|
||||
------------ | -------------
|
||||
Stable for Debian-based Linux | [grafana_4.5.2_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.2_amd64.deb)
|
||||
|
||||
<!-- Beta for Debian-based Linux | [grafana_4.5.0-beta1_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.0-beta1_amd64.deb) -->
|
||||
Stable for Debian-based Linux | [grafana_4.6.3_amd64.deb](https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.6.3_amd64.deb)
|
||||
|
||||
Read [Upgrading Grafana]({{< relref "installation/upgrading.md" >}}) for tips and guidance on updating an existing
|
||||
installation.
|
||||
@@ -26,21 +24,10 @@ installation.
|
||||
|
||||
|
||||
```bash
|
||||
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.2_amd64.deb
|
||||
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.6.3_amd64.deb
|
||||
sudo apt-get install -y adduser libfontconfig
|
||||
sudo dpkg -i grafana_4.5.2_amd64.deb
|
||||
sudo dpkg -i grafana_4.6.3_amd64.deb
|
||||
```
|
||||
|
||||
<!--
|
||||
## Install Latest Beta
|
||||
|
||||
```bash
|
||||
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.5.2-beta1_amd64.deb
|
||||
sudo apt-get install -y adduser libfontconfig
|
||||
sudo dpkg -i grafana_4.5.2-beta1_amd64.deb
|
||||
```
|
||||
-->
|
||||
|
||||
## APT Repository
|
||||
|
||||
Add the following line to your `/etc/apt/sources.list` file.
|
||||
|
||||
@@ -36,11 +36,75 @@ $ docker run -d -p 3000:3000 \
|
||||
```
|
||||
|
||||
In the above example I map the data folder and sets a configuration option via
|
||||
an `ENV` instruction.
|
||||
an `ENV` instruction.
|
||||
|
||||
See the [docker volumes documentation](https://docs.docker.com/engine/admin/volumes/volumes/) if you want to create a volume to use with the Grafana docker image instead of a bind mount (binding to a directory in the host system).
|
||||
|
||||
## Configuration
|
||||
|
||||
The back-end web server has a number of configuration options. Go the
|
||||
All options defined in conf/grafana.ini can be overridden using environment
|
||||
variables by using the syntax `GF_<SectionName>_<KeyName>`.
|
||||
For example:
|
||||
|
||||
```bash
|
||||
$ docker run \
|
||||
-d \
|
||||
-p 3000:3000 \
|
||||
--name=grafana \
|
||||
-e "GF_SERVER_ROOT_URL=http://grafana.server.name" \
|
||||
-e "GF_SECURITY_ADMIN_PASSWORD=secret" \
|
||||
grafana/grafana
|
||||
```
|
||||
|
||||
You can use your own grafana.ini file by using environment variable `GF_PATHS_CONFIG`.
|
||||
|
||||
The back-end web server has a number of configuration options. Go to the
|
||||
[Configuration]({{< relref "configuration.md" >}}) page for details on all
|
||||
those options.
|
||||
|
||||
## Installing Plugins for Grafana
|
||||
|
||||
Pass the plugins you want installed to docker with the `GF_INSTALL_PLUGINS` environment variable as a comma separated list. This will pass each plugin name to `grafana-cli plugins install ${plugin}`.
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-d \
|
||||
-p 3000:3000 \
|
||||
--name=grafana \
|
||||
-e "GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-simple-json-datasource" \
|
||||
grafana/grafana
|
||||
```
|
||||
|
||||
## Running a Specific Version of Grafana
|
||||
|
||||
```bash
|
||||
# specify right tag, e.g. 4.5.2 - see Docker Hub for available tags
|
||||
$ docker run \
|
||||
-d \
|
||||
-p 3000:3000 \
|
||||
--name grafana \
|
||||
grafana/grafana:4.5.2
|
||||
```
|
||||
|
||||
## Configuring AWS Credentials for CloudWatch Support
|
||||
|
||||
```bash
|
||||
$ docker run \
|
||||
-d \
|
||||
-p 3000:3000 \
|
||||
--name=grafana \
|
||||
-e "GF_AWS_PROFILES=default" \
|
||||
-e "GF_AWS_default_ACCESS_KEY_ID=YOUR_ACCESS_KEY" \
|
||||
-e "GF_AWS_default_SECRET_ACCESS_KEY=YOUR_SECRET_KEY" \
|
||||
-e "GF_AWS_default_REGION=us-east-1" \
|
||||
grafana/grafana
|
||||
```
|
||||
|
||||
You may also specify multiple profiles to `GF_AWS_PROFILES` (e.g.
|
||||
`GF_AWS_PROFILES=default another`).
|
||||
|
||||
Supported variables:
|
||||
|
||||
- `GF_AWS_${profile}_ACCESS_KEY_ID`: AWS access key ID (required).
|
||||
- `GF_AWS_${profile}_SECRET_ACCESS_KEY`: AWS secret access key (required).
|
||||
- `GF_AWS_${profile}_REGION`: AWS region (optional).
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user