Compare commits
471 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
822ff7595e | ||
|
|
515ebf4b4c | ||
|
|
68fe9e3431 | ||
|
|
beeef8b96b | ||
|
|
634112e1d4 | ||
|
|
1116ef1983 | ||
|
|
dfaae953f8 | ||
|
|
d6135f54a9 | ||
|
|
1d5ca3ae77 | ||
|
|
9fec4a7f80 | ||
|
|
ad3d82abee | ||
|
|
2575e64e8a | ||
|
|
278c85ca07 | ||
|
|
d11e65d3ac | ||
|
|
028e41b152 | ||
|
|
68374a988a | ||
|
|
fb60ab66f1 | ||
|
|
3d786313c2 | ||
|
|
a65c0a491e | ||
|
|
fea410ebb1 | ||
|
|
fb9e6d3286 | ||
|
|
e439828db9 | ||
|
|
1e4cd19824 | ||
|
|
b4e40c3280 | ||
|
|
249ad5c256 | ||
|
|
ae7e4811b1 | ||
|
|
bb3432361c | ||
|
|
2dd848c344 | ||
|
|
cb71fddd24 | ||
|
|
1623150bb5 | ||
|
|
1734acbc9f | ||
|
|
2d406f13de | ||
|
|
6bc37296c7 | ||
|
|
cbb2aa5001 | ||
|
|
4c16d55e11 | ||
|
|
d9858e0af9 | ||
|
|
18c547d695 | ||
|
|
2671c7d6cd | ||
|
|
fffbb74aaf | ||
|
|
074ef08db3 | ||
|
|
5e83e3862a | ||
|
|
350bb10cdd | ||
|
|
5cdd8dfed1 | ||
|
|
79e2da441a | ||
|
|
0131a8ef05 | ||
|
|
cc843e67ae | ||
|
|
efbfb42f15 | ||
|
|
fd515d1318 | ||
|
|
4efbf432a4 | ||
|
|
61ea316f10 | ||
|
|
ab26f9c820 | ||
|
|
92ab8a4189 | ||
|
|
190d7d12e3 | ||
|
|
6c79c846ba | ||
|
|
862c9a2c73 | ||
|
|
fc45cf178e | ||
|
|
d03007de01 | ||
|
|
1b23e38a86 | ||
|
|
7eb704f49d | ||
|
|
df2500a928 | ||
|
|
1a598bf75e | ||
|
|
bc0c5f118b | ||
|
|
ef45e1016a | ||
|
|
468523a1ce | ||
|
|
740aedbcbb | ||
|
|
dc4007e7bd | ||
|
|
81fef5b4b4 | ||
|
|
acd0d18552 | ||
|
|
682d4134d6 | ||
|
|
fd1d0a2a7c | ||
|
|
f4cf33a81d | ||
|
|
070fc7dbef | ||
|
|
601c113dbf | ||
|
|
5f114cb3f0 | ||
|
|
e97c02ef12 | ||
|
|
d15a70371f | ||
|
|
d478184e47 | ||
|
|
2ca6b89d8f | ||
|
|
469b805515 | ||
|
|
16c2a2b6cb | ||
|
|
89ac0a79ad | ||
|
|
4410fe538d | ||
|
|
1d2bbce1cf | ||
|
|
392dfd7e15 | ||
|
|
f1db840fe1 | ||
|
|
cbae9dda34 | ||
|
|
28c0f8c49e | ||
|
|
592cf2ac72 | ||
|
|
a1972c0f5b | ||
|
|
164148b3de | ||
|
|
b5b8d226ad | ||
|
|
60074192e9 | ||
|
|
d2a59bd78d | ||
|
|
1e77c2941b | ||
|
|
37bef2d0b2 | ||
|
|
3a12aa00c0 | ||
|
|
42471f1031 | ||
|
|
833014d924 | ||
|
|
24c98204e3 | ||
|
|
c447ff2581 | ||
|
|
0d33b57428 | ||
|
|
d38a50c2f3 | ||
|
|
f0fb1edb7c | ||
|
|
f84f9d5b44 | ||
|
|
5f26262655 | ||
|
|
0f9168953b | ||
|
|
901cc09416 | ||
|
|
f98a092a96 | ||
|
|
b3611ab407 | ||
|
|
354727ae32 | ||
|
|
ec01ce9cae | ||
|
|
07bfa64bb4 | ||
|
|
46d1c1c112 | ||
|
|
1cbc05abd1 | ||
|
|
e9e67c3d98 | ||
|
|
cd00485304 | ||
|
|
cae5c5e46b | ||
|
|
9ab2fd5ec9 | ||
|
|
3805f72b6a | ||
|
|
a95eca61ff | ||
|
|
276dc632f6 | ||
|
|
80db97f134 | ||
|
|
1f65d8a899 | ||
|
|
a4808d12ed | ||
|
|
2745265f99 | ||
|
|
2b0291f997 | ||
|
|
43ab6bee9c | ||
|
|
b6689bdf47 | ||
|
|
e01b1285b9 | ||
|
|
14a76fecf1 | ||
|
|
dd4f6f383d | ||
|
|
a4d72f0e5d | ||
|
|
f300bdfa15 | ||
|
|
21d7936007 | ||
|
|
d246127b2b | ||
|
|
f9c70dc834 | ||
|
|
21a0d45b63 | ||
|
|
7ab2f13c87 | ||
|
|
9e39855e33 | ||
|
|
4451724573 | ||
|
|
cfea2a61f1 | ||
|
|
23931ef3af | ||
|
|
1569452425 | ||
|
|
3f0e41cd93 | ||
|
|
c5cff65563 | ||
|
|
9252d6b05f | ||
|
|
a376e41ff1 | ||
|
|
638ea61172 | ||
|
|
13f367ed27 | ||
|
|
9a2970b5e8 | ||
|
|
ff07379029 | ||
|
|
7e838c511c | ||
|
|
6cd8305467 | ||
|
|
da9c028c7e | ||
|
|
36b94c5a67 | ||
|
|
242577ad33 | ||
|
|
55829f1646 | ||
|
|
6a9f5b260d | ||
|
|
c78da2c50c | ||
|
|
15c9d4e3e2 | ||
|
|
4fd5765354 | ||
|
|
17a091dfb6 | ||
|
|
86be18a668 | ||
|
|
dd24946f0f | ||
|
|
9fce4436ea | ||
|
|
c9b8c851fa | ||
|
|
eb018c417d | ||
|
|
fd50fc8ec7 | ||
|
|
4c274d1615 | ||
|
|
d86e6c072e | ||
|
|
7a3163da1f | ||
|
|
732f794e16 | ||
|
|
8ac34f9c76 | ||
|
|
72b5f5fdff | ||
|
|
4e2ee85751 | ||
|
|
059c5905bb | ||
|
|
e7c0b6a248 | ||
|
|
8db130f746 | ||
|
|
7a96df875b | ||
|
|
5c5d45e19f | ||
|
|
ffd39d5f36 | ||
|
|
a97ad5e6e4 | ||
|
|
4a7c0eafd4 | ||
|
|
982dfe21f5 | ||
|
|
a156582fc4 | ||
|
|
e3ea4f839b | ||
|
|
be3032c4e8 | ||
|
|
b4e30f1bd3 | ||
|
|
906af3bf4b | ||
|
|
603c7ce2aa | ||
|
|
601b9e3e8a | ||
|
|
e442c3e790 | ||
|
|
748e99a923 | ||
|
|
ab7efc2bb6 | ||
|
|
7b10cf8b87 | ||
|
|
0e3c8b6aa3 | ||
|
|
8a2e2aa063 | ||
|
|
a23ff23deb | ||
|
|
8849243d27 | ||
|
|
ded96ea901 | ||
|
|
658388573e | ||
|
|
fcdf4ee25c | ||
|
|
f0a975fc09 | ||
|
|
422e388fa2 | ||
|
|
ad6f9a0c32 | ||
|
|
56d51e45ae | ||
|
|
1bdd2c54d9 | ||
|
|
c4075fe2e3 | ||
|
|
8c1b326585 | ||
|
|
8b6c978d6d | ||
|
|
f4750c7a6b | ||
|
|
bd331f76ed | ||
|
|
4fca76a631 | ||
|
|
3cae0e4d18 | ||
|
|
f1810430a9 | ||
|
|
aee6c15316 | ||
|
|
688d68af7e | ||
|
|
ed605c97f9 | ||
|
|
dd5b51527d | ||
|
|
6fc58b6ea0 | ||
|
|
8784364f59 | ||
|
|
6ee6dbc8df | ||
|
|
11f2a91377 | ||
|
|
7360428b3e | ||
|
|
fa5309a3a8 | ||
|
|
4e4dad60ce | ||
|
|
d5e06ffcf4 | ||
|
|
331756990d | ||
|
|
0c75b8c92a | ||
|
|
41f0542c1e | ||
|
|
c82ac69dff | ||
|
|
904dcdd2d7 | ||
|
|
03023af9c9 | ||
|
|
6362bb2f36 | ||
|
|
df42e49d06 | ||
|
|
94e9c0ea48 | ||
|
|
1d721107c3 | ||
|
|
4c2822e5b7 | ||
|
|
d25695b1e3 | ||
|
|
2108faff7c | ||
|
|
d76bcd082f | ||
|
|
557c310c8c | ||
|
|
a95c3419b7 | ||
|
|
6b9f067bf2 | ||
|
|
c882b7a525 | ||
|
|
7f410cceee | ||
|
|
74eb38e2fc | ||
|
|
1aaed7c2fe | ||
|
|
7f6f9fbce9 | ||
|
|
7eda7945d3 | ||
|
|
da8d9e6854 | ||
|
|
e3ffea3f1b | ||
|
|
7b64b6f140 | ||
|
|
3fa0811d6b | ||
|
|
bc49ceddb7 | ||
|
|
f5c55ffbe3 | ||
|
|
ebc38afce5 | ||
|
|
64b58cc3a1 | ||
|
|
a817a8ac52 | ||
|
|
b052edf8ba | ||
|
|
956f728f61 | ||
|
|
1647073a00 | ||
|
|
7b67612f7d | ||
|
|
9439b6acba | ||
|
|
6f9ecceb9f | ||
|
|
6c512e1414 | ||
|
|
e6c2291a44 | ||
|
|
ccc0a52d4a | ||
|
|
c8d6168bbf | ||
|
|
e49bf5926a | ||
|
|
4aa622f7f1 | ||
|
|
a8b2415b1f | ||
|
|
4fe55be39e | ||
|
|
d78e78c2f4 | ||
|
|
69dc4b281d | ||
|
|
681c2b3338 | ||
|
|
c0b872aae1 | ||
|
|
5d772ffbe0 | ||
|
|
b04a21b002 | ||
|
|
5fe040d26b | ||
|
|
57060a2276 | ||
|
|
7feb7dab38 | ||
|
|
6a08652891 | ||
|
|
cf02cb2987 | ||
|
|
aa6355b6ea | ||
|
|
1e533f37ed | ||
|
|
7083577a4a | ||
|
|
ada0a52a0f | ||
|
|
0546486f31 | ||
|
|
dd8bf2afa8 | ||
|
|
553a8d0e55 | ||
|
|
56dff33244 | ||
|
|
865ae950ae | ||
|
|
d97bc8c0a9 | ||
|
|
0924f4e268 | ||
|
|
d9cc16af41 | ||
|
|
29eb1c1149 | ||
|
|
151cfc9693 | ||
|
|
949662ee5e | ||
|
|
ebe4596c75 | ||
|
|
38f58cc42b | ||
|
|
159953e258 | ||
|
|
78cabc2e39 | ||
|
|
17e92cc436 | ||
|
|
4344975654 | ||
|
|
5bb876f414 | ||
|
|
adfb3d4e21 | ||
|
|
d1b02d524c | ||
|
|
2f5d699a3e | ||
|
|
7727ba3f69 | ||
|
|
abc13765b9 | ||
|
|
a489759271 | ||
|
|
f99e87f2ed | ||
|
|
a606cb9b1e | ||
|
|
bd6f91fa83 | ||
|
|
10cdbad0ad | ||
|
|
a7d22e4b45 | ||
|
|
3f839c734c | ||
|
|
cb0ffc3ba3 | ||
|
|
a108647836 | ||
|
|
a96a58a305 | ||
|
|
e777729f6f | ||
|
|
e555bcdd01 | ||
|
|
1c87edb7cf | ||
|
|
0727a3a66b | ||
|
|
ec170be577 | ||
|
|
3eca7864ed | ||
|
|
d2c9c33d41 | ||
|
|
b5f2e6ae0f | ||
|
|
b06b3d5a61 | ||
|
|
8ba26e2f09 | ||
|
|
0b02a7e918 | ||
|
|
f70ffc30e7 | ||
|
|
eae88f8ce8 | ||
|
|
735630f364 | ||
|
|
ddb6922773 | ||
|
|
d8c4981b77 | ||
|
|
765655fefd | ||
|
|
727119f9ce | ||
|
|
ba313788d5 | ||
|
|
8168629948 | ||
|
|
0df47643fd | ||
|
|
c24d507800 | ||
|
|
3884cfe270 | ||
|
|
a7a9d002cb | ||
|
|
dfff63da1b | ||
|
|
7206d16352 | ||
|
|
fdd80b1b4c | ||
|
|
bf3ce22358 | ||
|
|
f6b0cd714d | ||
|
|
2335c3d0d5 | ||
|
|
bfb3e90750 | ||
|
|
bee8b0a9dd | ||
|
|
fb9f1a3b04 | ||
|
|
216f018377 | ||
|
|
5e46bbe823 | ||
|
|
55cbd415a2 | ||
|
|
e9b6b66a46 | ||
|
|
5a68094a45 | ||
|
|
8fef4d7a8a | ||
|
|
4a67bfc102 | ||
|
|
6dc4e4d563 | ||
|
|
2ca76fa8ae | ||
|
|
aa48f0f6a0 | ||
|
|
4c967fe718 | ||
|
|
0101d3a51d | ||
|
|
3652af9e0b | ||
|
|
5f4379a24d | ||
|
|
e1eebdcf75 | ||
|
|
c767dedffd | ||
|
|
f704fa423d | ||
|
|
6d6e875a84 | ||
|
|
a0e0414720 | ||
|
|
ad1498e30c | ||
|
|
1ccca4b187 | ||
|
|
8415398b2e | ||
|
|
638735a37c | ||
|
|
fbee5f402e | ||
|
|
6f5f36d305 | ||
|
|
d76104fedf | ||
|
|
fe968a329e | ||
|
|
e6cad0f415 | ||
|
|
04741642c5 | ||
|
|
f44c41fde8 | ||
|
|
5bf678bcf0 | ||
|
|
ed29c58d8b | ||
|
|
e2c03cf843 | ||
|
|
9364ec4404 | ||
|
|
0f27ab2d8f | ||
|
|
4a876b6986 | ||
|
|
b8aeab41de | ||
|
|
fea7355e75 | ||
|
|
922b34817c | ||
|
|
337bce75a5 | ||
|
|
b3a1a063fe | ||
|
|
6d44eb8954 | ||
|
|
986e54c127 | ||
|
|
8b0109c095 | ||
|
|
8633344706 | ||
|
|
f37d9bf13a | ||
|
|
c0d87c9779 | ||
|
|
dc27360a89 | ||
|
|
d41bfec2f8 | ||
|
|
1c7e55085c | ||
|
|
48b74313b5 | ||
|
|
0d0a795d02 | ||
|
|
47cf96dfee | ||
|
|
13473eae6d | ||
|
|
15c09dcd68 | ||
|
|
c3bc0a861f | ||
|
|
eba521f12b | ||
|
|
3acfa1b8d0 | ||
|
|
631b2f08a8 | ||
|
|
f45f160ab8 | ||
|
|
d99847423b | ||
|
|
653a3bdfbf | ||
|
|
fca62d20d6 | ||
|
|
52e2a2403f | ||
|
|
cb9a36b91f | ||
|
|
72b3478935 | ||
|
|
81f2f68535 | ||
|
|
ebe20d1998 | ||
|
|
771013904a | ||
|
|
ba85b954e1 | ||
|
|
b23bd2c105 | ||
|
|
02dd5a6f0e | ||
|
|
ea84eb499a | ||
|
|
e3d25450ed | ||
|
|
d149b2aae3 | ||
|
|
1de3c88c0e | ||
|
|
17f3a5a4a3 | ||
|
|
1a18413505 | ||
|
|
21ea2e2e6f | ||
|
|
f7c144f957 | ||
|
|
0d6135dccb | ||
|
|
df3b68e659 | ||
|
|
e2b6820d42 | ||
|
|
ef05f687ca | ||
|
|
7319caaa63 | ||
|
|
8dd3cd15e4 | ||
|
|
b1177e2f8f | ||
|
|
c8ae5539bc | ||
|
|
0822375888 | ||
|
|
587c9677bb | ||
|
|
7294dbc2a7 | ||
|
|
45048ebc4b | ||
|
|
3956e2b422 | ||
|
|
d678865934 | ||
|
|
44204a745c | ||
|
|
ec09a5995d | ||
|
|
01c5587eda | ||
|
|
ea1dae55e8 | ||
|
|
bac7b5ad6d | ||
|
|
6f8763f03d | ||
|
|
ee46b14371 | ||
|
|
8a677b0ae4 | ||
|
|
7e05261dfe | ||
|
|
603cff9491 | ||
|
|
52d6afbae7 | ||
|
|
7f919c0e55 | ||
|
|
34a1621a5c | ||
|
|
0577e4b119 | ||
|
|
50041c8138 | ||
|
|
5c2ae8fbf4 | ||
|
|
255b91b2ba | ||
|
|
57f5b34038 | ||
|
|
126b7f8049 | ||
|
|
3a75fb635d | ||
|
|
d86e725369 | ||
|
|
d15419ef5b | ||
|
|
9d4c719205 |
12
.bingo/.gitignore
vendored
12
.bingo/.gitignore
vendored
@@ -1,12 +0,0 @@
|
||||
|
||||
# Ignore everything
|
||||
*
|
||||
|
||||
# But not these files:
|
||||
!.gitignore
|
||||
!*.mod
|
||||
!README.md
|
||||
!Variables.mk
|
||||
!variables.env
|
||||
|
||||
*tmp.mod
|
||||
@@ -1,14 +0,0 @@
|
||||
# Project Development Dependencies.
|
||||
|
||||
This is directory which stores Go modules with pinned buildable package that is used within this repository, managed by https://github.com/bwplotka/bingo.
|
||||
|
||||
* Run `bingo get` to install all tools having each own module file in this directory.
|
||||
* Run `bingo get <tool>` to install <tool> that have own module file in this directory.
|
||||
* For Makefile: Make sure to put `include .bingo/Variables.mk` in your Makefile, then use $(<upper case tool name>) variable where <tool> is the .bingo/<tool>.mod.
|
||||
* For shell: Run `source .bingo/variables.env` to source all environment variable for each tool.
|
||||
* For go: Import `.bingo/variables.go` to for variable names.
|
||||
* See https://github.com/bwplotka/bingo or -h on how to add, remove or change binaries dependencies.
|
||||
|
||||
## Requirements
|
||||
|
||||
* Go 1.14+
|
||||
@@ -1,31 +0,0 @@
|
||||
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
|
||||
# All tools are designed to be build inside $GOBIN.
|
||||
BINGO_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||
GOPATH ?= $(shell go env GOPATH)
|
||||
GOBIN ?= $(firstword $(subst :, ,${GOPATH}))/bin
|
||||
GO ?= $(shell which go)
|
||||
|
||||
# Below generated variables ensure that every time a tool under each variable is invoked, the correct version
|
||||
# will be used; reinstalling only if needed.
|
||||
# For example for drone variable:
|
||||
#
|
||||
# In your main Makefile (for non array binaries):
|
||||
#
|
||||
#include .bingo/Variables.mk # Assuming -dir was set to .bingo .
|
||||
#
|
||||
#command: $(DRONE)
|
||||
# @echo "Running drone"
|
||||
# @$(DRONE) <flags/args..>
|
||||
#
|
||||
DRONE := $(GOBIN)/drone-v1.2.4
|
||||
$(DRONE): $(BINGO_DIR)/drone.mod
|
||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||
@echo "(re)installing $(GOBIN)/drone-v1.2.4"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.2.4 "github.com/drone/drone-cli/drone"
|
||||
|
||||
WIRE := $(GOBIN)/wire-v0.5.0
|
||||
$(WIRE): $(BINGO_DIR)/wire.mod
|
||||
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
|
||||
@echo "(re)installing $(GOBIN)/wire-v0.5.0"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=wire.mod -o=$(GOBIN)/wire-v0.5.0 "github.com/google/wire/cmd/wire"
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.17
|
||||
|
||||
replace github.com/docker/docker => github.com/docker/engine v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+incompatible
|
||||
|
||||
require github.com/drone/drone-cli v1.2.4 // drone
|
||||
@@ -1 +0,0 @@
|
||||
module _ // Fake go.mod auto-created by 'bingo' for go -moddir compatibility with non-Go projects. Commit this file, together with other .mod files.
|
||||
@@ -1,14 +0,0 @@
|
||||
# Auto generated binary variables helper managed by https://github.com/bwplotka/bingo v0.5.1. DO NOT EDIT.
|
||||
# All tools are designed to be build inside $GOBIN.
|
||||
# Those variables will work only until 'bingo get' was invoked, or if tools were installed via Makefile's Variables.mk.
|
||||
GOBIN=${GOBIN:=$(go env GOBIN)}
|
||||
|
||||
if [ -z "$GOBIN" ]; then
|
||||
GOBIN="$(go env GOPATH)/bin"
|
||||
fi
|
||||
|
||||
|
||||
DRONE="${GOBIN}/drone-v1.2.4"
|
||||
|
||||
WIRE="${GOBIN}/wire-v0.5.0"
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.16
|
||||
|
||||
require github.com/google/wire v0.5.0 // cmd/wire
|
||||
@@ -1,6 +1,5 @@
|
||||
[run]
|
||||
init_cmds = [
|
||||
["make", "gen-go"],
|
||||
["go", "run", "build.go", "-dev", "build-cli"],
|
||||
["go", "run", "build.go", "-dev", "build-server"],
|
||||
["./bin/grafana-server", "-packaging=dev", "cfg:app_mode=development"]
|
||||
|
||||
18
.drone.star
18
.drone.star
@@ -1,15 +1,9 @@
|
||||
# To generate the .drone.yml file:
|
||||
# 1. Modify the *.star definitions
|
||||
# 2. Login to drone and export the env variables (token and server) shown here: https://drone.grafana.net/account
|
||||
# 3. Run `make drone`
|
||||
# More information about this process here: https://github.com/grafana/deployment_tools/blob/master/docs/infrastructure/drone/signing.md
|
||||
|
||||
load('scripts/drone/pipelines/pr.star', 'pr_pipelines')
|
||||
load('scripts/drone/pipelines/main.star', 'main_pipelines')
|
||||
load('scripts/drone/pipelines/release.star', 'release_pipelines', 'test_release_pipelines')
|
||||
load('scripts/drone/version.star', 'version_branch_pipelines')
|
||||
load('scripts/drone/pipelines/cron.star', 'cronjobs')
|
||||
load('scripts/drone/vault.star', 'secrets')
|
||||
load('scripts/pr.star', 'pr_pipelines')
|
||||
load('scripts/main.star', 'main_pipelines')
|
||||
load('scripts/release.star', 'release_pipelines', 'test_release_pipelines')
|
||||
load('scripts/version.star', 'version_branch_pipelines')
|
||||
load('scripts/job.star', 'cronjobs')
|
||||
load('scripts/vault.star', 'secrets')
|
||||
|
||||
def main(ctx):
|
||||
edition = 'oss'
|
||||
|
||||
1014
.drone.yml
1014
.drone.yml
File diff suppressed because it is too large
Load Diff
10
.github/CODEOWNERS
vendored
10
.github/CODEOWNERS
vendored
@@ -11,9 +11,9 @@
|
||||
# In each subsection folders are ordered first by depth, then alphabetically.
|
||||
# This should make it easy to add new rules without breaking existing ones.
|
||||
|
||||
# Documentation owner: Jita Chatterjee
|
||||
/docs/ @grafana/docs-squad @pkolyvas
|
||||
/contribute/ @marcusolsson @grafana/docs-squad @pkolyvas
|
||||
# Documentation owner: Diana Payton
|
||||
/docs/ @grafana/docs-squad
|
||||
/contribute/ @marcusolsson @grafana/docs-squad
|
||||
/docs/sources/developers/plugins/ @marcusolsson @grafana/docs-squad
|
||||
/docs/sources/enterprise/ @osg-grafana @grafana/docs-squad
|
||||
|
||||
@@ -22,10 +22,6 @@
|
||||
go.mod @grafana/backend-platform
|
||||
go.sum @grafana/backend-platform
|
||||
|
||||
# Continuous Integration
|
||||
.drone.yml @malcolmholmes @dsotirakis @zserge
|
||||
/scripts/drone/ @malcolmholmes @dsotirakis @zserge
|
||||
|
||||
# Cloud Datasources backend code
|
||||
/pkg/tsdb/cloudwatch @grafana/cloud-datasources @grafana/observability-squad
|
||||
/pkg/tsdb/azuremonitor @grafana/cloud-datasources
|
||||
|
||||
11
.github/ISSUE_TEMPLATE/2-feature_request.md
vendored
Normal file
11
.github/ISSUE_TEMPLATE/2-feature_request.md
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: Enhancement request
|
||||
about: Suggest an enhancement or new feature for the Grafana project
|
||||
labels: 'type: feature request'
|
||||
---
|
||||
|
||||
<!-- Please only use this template for submitting feature requests -->
|
||||
|
||||
**What would you like to be added**:
|
||||
|
||||
**Why is this needed**:
|
||||
3
.github/ISSUE_TEMPLATE/config.yml
vendored
3
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,8 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Feature Request
|
||||
url: https://github.com/grafana/grafana/discussions/new
|
||||
about: Discuss ideas for new features of changes
|
||||
- name: Questions & Help
|
||||
url: https://community.grafana.com
|
||||
about: Please ask and answer questions here.
|
||||
|
||||
13
.github/pr-commands.json
vendored
13
.github/pr-commands.json
vendored
@@ -66,6 +66,9 @@
|
||||
"packaging/**/*",
|
||||
"scripts/build/**/*",
|
||||
"scripts/*.sh",
|
||||
"scripts/*.star",
|
||||
".drone.star",
|
||||
".drone.yml",
|
||||
"Makefile",
|
||||
"Dockerfile",
|
||||
"Dockerfile.ubuntu"
|
||||
@@ -73,16 +76,6 @@
|
||||
"action": "updateLabel",
|
||||
"addLabel": "type/build-packaging"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [
|
||||
"scripts/*.star",
|
||||
".drone.star",
|
||||
".drone.yml"
|
||||
],
|
||||
"action": "updateLabel",
|
||||
"addLabel": "type/ci"
|
||||
},
|
||||
{
|
||||
"type": "changedfiles",
|
||||
"matches": [ "public/app/plugins/datasource/grafana-azure-monitor-datasource/**/*", "pkg/tsdb/azuremonitor/**/*"],
|
||||
|
||||
44
.github/workflows/publish.yml
vendored
Normal file
44
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
name: publish_docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v8.0.x
|
||||
paths:
|
||||
- 'docs/sources/**'
|
||||
- 'packages/grafana-*/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
|
||||
- uses: actions/cache@v2.1.5
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
|
||||
- name: generate-packages-docs
|
||||
uses: actions/setup-node@v2.1.5
|
||||
id: generate-docs
|
||||
with:
|
||||
node-version: '14'
|
||||
- run: yarn install --pure-lockfile --no-progress
|
||||
- run: ./scripts/ci-reference-docs-build.sh
|
||||
- name: publish-to-git
|
||||
uses: ./.github/actions/website-sync
|
||||
id: publish
|
||||
with:
|
||||
repository: grafana/website
|
||||
branch: master
|
||||
host: github.com
|
||||
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
|
||||
source_folder: docs/sources
|
||||
target_folder: content/docs/grafana/latest
|
||||
allow_no_changes: 'true'
|
||||
- shell: bash
|
||||
run: |
|
||||
test -n "${{ steps.publish.outputs.commit_hash }}"
|
||||
test -n "${{ steps.publish.outputs.working_directory }}"
|
||||
9
.gitignore
vendored
9
.gitignore
vendored
@@ -50,7 +50,6 @@ public/css/*.min.css
|
||||
*.tmp
|
||||
.DS_Store
|
||||
.vscode/
|
||||
!.vscode/launch.json
|
||||
.vs/
|
||||
.eslintcache
|
||||
|
||||
@@ -75,7 +74,6 @@ profile.cov
|
||||
/pkg/cmd/grafana-server/grafana-server
|
||||
/pkg/cmd/grafana-server/debug
|
||||
/pkg/extensions/*
|
||||
/pkg/server/wireexts_enterprise.go
|
||||
!/pkg/extensions/main.go
|
||||
/public/app/extensions
|
||||
debug.test
|
||||
@@ -123,15 +121,8 @@ compilation-stats.json
|
||||
!/e2e/**/screenshots/expected/*
|
||||
/e2e/**/videos/*
|
||||
|
||||
# a11y tests
|
||||
/pa11y-ci-results.json
|
||||
/pa11y-ci-report
|
||||
|
||||
# report dumping the whole system env
|
||||
/report.*.json
|
||||
|
||||
# auto generated frontend docs
|
||||
/docs/sources/packages_api
|
||||
|
||||
# auto generated Go files
|
||||
*_gen.go
|
||||
|
||||
@@ -1,96 +0,0 @@
|
||||
var config = {
|
||||
defaults: {
|
||||
concurrency: 1,
|
||||
runners: ['axe'],
|
||||
chromeLaunchConfig: {
|
||||
args: ['--no-sandbox'],
|
||||
},
|
||||
},
|
||||
|
||||
urls: [
|
||||
{
|
||||
url: '${HOST}/login',
|
||||
actions: [
|
||||
"set field input[name='user'] to admin",
|
||||
"set field input[name='password'] to admin",
|
||||
"click element button[aria-label='Login button']",
|
||||
"wait for element [aria-label='Skip change password button'] to be visible",
|
||||
],
|
||||
threshold: 3,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/?orgId=1',
|
||||
threshold: 7,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge',
|
||||
hideElements: '.sidemenu',
|
||||
threshold: 2,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
|
||||
rootElement: '.dashboard-settings',
|
||||
threshold: 10,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/?orgId=1&search=open',
|
||||
rootElement: '.main-view',
|
||||
threshold: 15,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/alerting/list',
|
||||
rootElement: '.main-view',
|
||||
threshold: 7,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/datasources',
|
||||
rootElement: '.main-view',
|
||||
threshold: 36,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org/users',
|
||||
rootElement: '.main-view',
|
||||
threshold: 4,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org/teams',
|
||||
rootElement: '.main-view',
|
||||
threshold: 1,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/plugins',
|
||||
rootElement: '.main-view',
|
||||
threshold: 41,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org',
|
||||
rootElement: '.main-view',
|
||||
threshold: 2,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org/apikeys',
|
||||
rootElement: '.main-view',
|
||||
threshold: 5,
|
||||
},
|
||||
{
|
||||
url: '${HOST}/dashboards',
|
||||
rootElement: '.main-view',
|
||||
threshold: 8,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
function myPa11yCiConfiguration(urls, defaults) {
|
||||
const HOST_SERVER = process.env.HOST || 'localhost';
|
||||
const PORT_SERVER = process.env.PORT || '3000';
|
||||
for (var idx = 0; idx < urls.length; idx++) {
|
||||
urls[idx] = { ...urls[idx], url: urls[idx].url.replace('${HOST}', `${HOST_SERVER}:${PORT_SERVER}`) };
|
||||
}
|
||||
|
||||
return {
|
||||
defaults: defaults,
|
||||
urls: urls,
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = myPa11yCiConfiguration(config.urls, config.defaults);
|
||||
@@ -1,83 +0,0 @@
|
||||
var config = {
|
||||
defaults: {
|
||||
concurrency: 1,
|
||||
runners: ['axe'],
|
||||
chromeLaunchConfig: {
|
||||
args: ['--no-sandbox'],
|
||||
},
|
||||
},
|
||||
|
||||
urls: [
|
||||
{
|
||||
url: '${HOST}/login',
|
||||
actions: [
|
||||
"set field input[name='user'] to admin",
|
||||
"set field input[name='password'] to admin",
|
||||
"click element button[aria-label='Login button']",
|
||||
"wait for element [aria-label='Skip change password button'] to be visible",
|
||||
],
|
||||
},
|
||||
{
|
||||
url: '${HOST}/?orgId=1',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge',
|
||||
hideElements: '.sidemenu',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/d/O6f11TZWk/panel-tests-bar-gauge?orgId=1&editview=settings',
|
||||
rootElement: '.dashboard-settings',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/?orgId=1&search=open',
|
||||
rootElement: '.main-view',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/alerting/list',
|
||||
rootElement: '.main-view',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/datasources',
|
||||
rootElement: '.main-view',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org/users',
|
||||
rootElement: '.main-view',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org/teams',
|
||||
rootElement: '.main-view',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/plugins',
|
||||
rootElement: '.main-view',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org',
|
||||
rootElement: '.main-view',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/org/apikeys',
|
||||
rootElement: '.main-view',
|
||||
},
|
||||
{
|
||||
url: '${HOST}/dashboards',
|
||||
rootElement: '.main-view',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
function myPa11yCiConfiguration(urls, defaults) {
|
||||
const HOST_SERVER = process.env.HOST || 'localhost';
|
||||
const PORT_SERVER = process.env.PORT || '3000';
|
||||
for (var idx = 0; idx < urls.length; idx++) {
|
||||
urls[idx] = { ...urls[idx], url: urls[idx].url.replace('${HOST}', `${HOST_SERVER}:${PORT_SERVER}`) };
|
||||
}
|
||||
|
||||
return {
|
||||
defaults: defaults,
|
||||
urls: urls,
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = myPa11yCiConfiguration(config.urls, config.defaults);
|
||||
@@ -5,9 +5,8 @@ pkg/
|
||||
node_modules
|
||||
public/vendor/
|
||||
vendor/
|
||||
/data/
|
||||
data/
|
||||
e2e/tmp
|
||||
public/build/
|
||||
public/sass/*.generated.scss
|
||||
devenv/
|
||||
public/lib/monaco
|
||||
|
||||
14
.vscode/launch.json
vendored
14
.vscode/launch.json
vendored
@@ -1,14 +0,0 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Run Server",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana-server/",
|
||||
"env": {},
|
||||
"args": ["--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
}
|
||||
]
|
||||
}
|
||||
2123
CHANGELOG.md
2123
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
@@ -26,12 +26,10 @@ Report a bug by submitting a [bug report](https://github.com/grafana/grafana/iss
|
||||
Follow the issue template and add additional information that will help us replicate the problem.
|
||||
|
||||
For data visualization issues:
|
||||
|
||||
- Query results from the inspect drawer (data tab & query inspector)
|
||||
- Panel settings can be extracted in the panel inspect drawer JSON tab
|
||||
|
||||
For a dashboard related issues:
|
||||
|
||||
- Dashboard JSON can be found in the dashboard settings JSON model view
|
||||
|
||||
For authentication and alerting Grafana server logs are useful.
|
||||
@@ -42,7 +40,7 @@ If you believe you've found a security vulnerability, please read our [security
|
||||
|
||||
### Suggest enhancements
|
||||
|
||||
If you have an idea of how to improve Grafana, submit an [enhancement request](https://github.com/grafana/grafana/discussions/new).
|
||||
If you have an idea of how to improve Grafana, submit an [enhancement request](https://github.com/grafana/grafana/issues/new?labels=type%3A+feature+request&template=2-feature_request.md).
|
||||
|
||||
We want to make Grafana accessible to even more people. Submit an [accessibility issue](https://github.com/grafana/grafana/issues/new?labels=type%3A+accessibility&template=3-accessibility.md) to help us understand what we can improve.
|
||||
|
||||
|
||||
24
Dockerfile
24
Dockerfile
@@ -1,10 +1,9 @@
|
||||
FROM node:16-alpine3.14 as js-builder
|
||||
FROM node:14.16.0-alpine3.13 as js-builder
|
||||
|
||||
WORKDIR /usr/src/app/
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
COPY packages packages
|
||||
COPY plugins-bundled plugins-bundled
|
||||
|
||||
RUN apk --no-cache add git
|
||||
RUN yarn install --pure-lockfile --no-progress
|
||||
@@ -18,26 +17,25 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.17.3-alpine3.14 as go-builder
|
||||
FROM golang:1.16.1-alpine3.13 as go-builder
|
||||
|
||||
RUN apk add --no-cache gcc g++ make
|
||||
RUN apk add --no-cache gcc g++
|
||||
|
||||
WORKDIR $GOPATH/src/github.com/grafana/grafana
|
||||
|
||||
COPY go.mod go.sum embed.go ./
|
||||
COPY cue cue
|
||||
COPY cue.mod cue.mod
|
||||
COPY packages/grafana-schema packages/grafana-schema
|
||||
COPY public/app/plugins public/app/plugins
|
||||
COPY pkg pkg
|
||||
COPY Makefile build.go package.json ./
|
||||
COPY .bingo .bingo
|
||||
|
||||
RUN go mod verify
|
||||
RUN make build-go
|
||||
|
||||
COPY cue cue
|
||||
COPY public/app/plugins public/app/plugins
|
||||
COPY pkg pkg
|
||||
COPY build.go package.json ./
|
||||
|
||||
RUN go run build.go build
|
||||
|
||||
# Final stage
|
||||
FROM alpine:3.14.3
|
||||
FROM alpine:3.13
|
||||
|
||||
LABEL maintainer="Grafana team <hello@grafana.com>"
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ WORKDIR /usr/src/app/
|
||||
|
||||
COPY package.json yarn.lock ./
|
||||
COPY packages packages
|
||||
COPY plugins-bundled plugins-bundled
|
||||
|
||||
RUN apt-get update && apt-get install -yq git
|
||||
RUN yarn install --pure-lockfile
|
||||
@@ -18,23 +17,20 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.17.3 AS go-builder
|
||||
|
||||
RUN apk add --no-cache make
|
||||
FROM golang:1.16 AS go-builder
|
||||
|
||||
WORKDIR /src/grafana
|
||||
|
||||
COPY go.mod go.sum embed.go ./
|
||||
COPY Makefile build.go package.json ./
|
||||
COPY .bingo .bingo
|
||||
COPY pkg pkg/
|
||||
COPY cue cue/
|
||||
COPY cue.mod cue.mod/
|
||||
COPY packages/grafana-schema packages/grafana-schema/
|
||||
COPY public/app/plugins public/app/plugins/
|
||||
|
||||
RUN go mod verify
|
||||
RUN make build-go
|
||||
|
||||
COPY build.go package.json ./
|
||||
COPY pkg pkg/
|
||||
COPY cue cue/
|
||||
COPY public/app/plugins public/app/plugins/
|
||||
|
||||
RUN go run build.go build
|
||||
|
||||
FROM ubuntu:20.04
|
||||
|
||||
|
||||
@@ -78,7 +78,6 @@ The current team members are:
|
||||
- Diana Sarlinska ([Grafana Labs](https://grafana.com/))
|
||||
- Dominik Prokop ([Grafana Labs](https://grafana.com/))
|
||||
- Emil Tullstedt ([Grafana Labs](https://grafana.com/))
|
||||
- Erik Sundell ([Grafana Labs](https://grafana.com/))
|
||||
- Fredrik Enestad ([Soundtrack Your Brand](https://www.soundtrackyourbrand.com/))
|
||||
- Hugo Häggmark ([Grafana Labs](https://grafana.com/))
|
||||
- Ivana Huckova ([Grafana Labs](https://grafana.com/))
|
||||
@@ -103,8 +102,6 @@ The current team members are:
|
||||
- Tobias Skarhed ([Grafana Labs](https://grafana.com/))
|
||||
- Torkel Ödegaard ([Grafana Labs](https://grafana.com/))
|
||||
- Utkarsh Bhatnagar ([Tinder](https://www.tinder.com/))
|
||||
- Will Browne ([Grafana Labs](https://grafana.com/))
|
||||
- Zoltán Bedi ([Grafana Labs](https://grafana.com/))
|
||||
|
||||
### Maintainers
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ The default license for this project is [AGPL-3.0-only](LICENSE).
|
||||
|
||||
## Apache-2.0
|
||||
|
||||
The following directories and their subdirectories are licensed under Apache-2.0:
|
||||
The following folders and their subfolders are licensed under Apache-2.0:
|
||||
|
||||
```
|
||||
packages/grafana-data/
|
||||
@@ -20,9 +20,3 @@ packaging/
|
||||
grafana-mixin/
|
||||
cue/
|
||||
```
|
||||
|
||||
The following directories and their subdirectories are the original upstream licenses:
|
||||
|
||||
```
|
||||
public/vendor/
|
||||
```
|
||||
|
||||
27
Makefile
27
Makefile
@@ -2,14 +2,11 @@
|
||||
##
|
||||
## For more information, refer to https://suva.sh/posts/well-documented-makefiles/
|
||||
|
||||
WIRE_TAGS = "oss"
|
||||
|
||||
-include local/Makefile
|
||||
include .bingo/Variables.mk
|
||||
|
||||
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go golangci-lint test-go test-js test run run-frontend clean devenv devenv-down protobuf drone help
|
||||
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go golangci-lint test-go test-js test run run-frontend clean devenv devenv-down protobuf help
|
||||
|
||||
GO = go
|
||||
GO = GO111MODULE=on go
|
||||
GO_FILES ?= ./pkg/...
|
||||
SH_FILES ?= $(shell find ./scripts -name *.sh)
|
||||
|
||||
@@ -30,11 +27,7 @@ node_modules: package.json yarn.lock ## Install node modules.
|
||||
|
||||
##@ Building
|
||||
|
||||
gen-go: $(WIRE)
|
||||
@echo "generate go files"
|
||||
$(WIRE) gen -tags $(WIRE_TAGS) ./pkg/server
|
||||
|
||||
build-go: gen-go ## Build all Go binaries.
|
||||
build-go: ## Build all Go binaries.
|
||||
@echo "build go files"
|
||||
$(GO) run build.go build
|
||||
|
||||
@@ -43,7 +36,7 @@ build-server: ## Build Grafana server.
|
||||
$(GO) run build.go build-server
|
||||
|
||||
build-cli: ## Build Grafana CLI application.
|
||||
@echo "build grafana-cli"
|
||||
@echo "build in CI environment"
|
||||
$(GO) run build.go build-cli
|
||||
|
||||
build-js: ## Build frontend assets.
|
||||
@@ -58,7 +51,7 @@ scripts/go/bin/bra: scripts/go/go.mod
|
||||
$(GO) build -o ./bin/bra github.com/unknwon/bra
|
||||
|
||||
run: scripts/go/bin/bra ## Build and run web server on filesystem changes.
|
||||
@scripts/go/bin/bra run
|
||||
@GO111MODULE=on scripts/go/bin/bra run
|
||||
|
||||
run-frontend: deps-js ## Fetch js dependencies and watch frontend for rebuild
|
||||
yarn start
|
||||
@@ -98,7 +91,7 @@ shellcheck: $(SH_FILES) ## Run checks for shell scripts.
|
||||
build-docker-dev: ## Build Docker image for development (fast).
|
||||
@echo "build development container"
|
||||
@echo "\033[92mInfo:\033[0m the frontend code is expected to be built already."
|
||||
$(GO) run build.go -goos linux -pkg-arch amd64 ${OPT} build latest
|
||||
$(GO) run build.go -goos linux -pkg-arch amd64 ${OPT} build pkg-archive latest
|
||||
cp dist/grafana-latest.linux-x64.tar.gz packaging/docker
|
||||
cd packaging/docker && docker build --tag grafana/grafana:dev .
|
||||
|
||||
@@ -147,13 +140,5 @@ clean: ## Clean up intermediate build artifacts.
|
||||
rm -rf node_modules
|
||||
rm -rf public/build
|
||||
|
||||
# This repository's configuration is protected (https://readme.drone.io/signature/).
|
||||
# Use this make target to regenerate the configuration YAML files when
|
||||
# you modify starlark files.
|
||||
drone:
|
||||
$(DRONE) starlark convert
|
||||
$(DRONE) lint
|
||||
$(DRONE) --server https://drone.grafana.net sign --save grafana/grafana
|
||||
|
||||
help: ## Display this help.
|
||||
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
||||
|
||||
@@ -4,14 +4,14 @@ Upgrading Go or Node.js requires making changes in many different files. See bel
|
||||
|
||||
## Go
|
||||
|
||||
- Drone
|
||||
- CircleCi
|
||||
- `grafana/build-container`
|
||||
- Appveyor
|
||||
- Dockerfile
|
||||
|
||||
## Node.js
|
||||
|
||||
- Drone
|
||||
- CircleCI
|
||||
- `grafana/build-container`
|
||||
- Appveyor
|
||||
- Dockerfile
|
||||
@@ -20,29 +20,28 @@ Upgrading Go or Node.js requires making changes in many different files. See bel
|
||||
|
||||
The Grafana project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.11 or greater installed.
|
||||
|
||||
> **Note:** Since most developers of Grafana still use the `GOPATH` we need to specify `GO111MODULE=on` to make `go mod` and `got get` work as intended. If you have setup Grafana outside of the `GOPATH` on your machine you can skip `GO111MODULE=on` when running the commands below.
|
||||
|
||||
To add or update a new dependency, use the `go get` command:
|
||||
|
||||
```bash
|
||||
go get example.com/some/module/pkg
|
||||
# The GO111MODULE variable can be omitted when the code isn't located in GOPATH.
|
||||
# Pick the latest tagged release.
|
||||
GO111MODULE=on go get example.com/some/module/pkg
|
||||
|
||||
# Pick a specific version.
|
||||
go get example.com/some/module/pkg@vX.Y.Z
|
||||
GO111MODULE=on go get example.com/some/module/pkg@vX.Y.Z
|
||||
```
|
||||
|
||||
Tidy up the `go.mod` and `go.sum` files:
|
||||
|
||||
```bash
|
||||
go mod tidy
|
||||
# The GO111MODULE variable can be omitted when the code isn't located in GOPATH.
|
||||
GO111MODULE=on go mod tidy
|
||||
```
|
||||
|
||||
You have to commit the changes to `go.mod` and `go.sum` before submitting the pull request.
|
||||
|
||||
To understand what the actual dependencies of `grafana-server` are, one could run it with `-vv` flag. This might produce an output, different from `go.mod` contents and `-vv` option is the source of truth here. It lists the modules _compiled_ into the executable, while `go.mod` lists also test and weak transitive dependencies (modules, used in some package, which is not in use by itself). If you are interested in reporting a vulnerability in a dependency module - please consult `-vv` output, maybe the "dependency" is not a dependency as such.
|
||||
|
||||
### Upgrading dependencies
|
||||
|
||||
If you need to upgrade a direct or indirect dependency, you can do it like so, $MODULE being the dependency in question: `go get -u $MODULE`. The corresponding entry in go.mod should then have the version you specified; if it's an indirect dependency, the entry should have the `// indirect` comment. Follow this by executing `go mod tidy`, to ensure that go.mod and go.sum are up to date. If the indirect dependency turns out to not be used (transitively) by any of our packages, `go mod tidy` will actually strip it from go.mod. In that case, you can just ignore it since it isn't used in the end.
|
||||
|
||||
## Node.js dependencies
|
||||
|
||||
Updated using `yarn`.
|
||||
@@ -51,9 +50,9 @@ Updated using `yarn`.
|
||||
|
||||
## Where to make changes
|
||||
|
||||
### Drone
|
||||
### CircleCI
|
||||
|
||||
Our CI builds run on Drone.
|
||||
Our builds run on CircleCI through our build script.
|
||||
|
||||
#### Files
|
||||
|
||||
@@ -67,7 +66,7 @@ Our CI builds run on Drone.
|
||||
|
||||
### grafana/build-container
|
||||
|
||||
The main build steps (in Drone) happen using a custom Docker image that comes pre-baked with some of the necessary dependencies.
|
||||
The main build step (in CircleCI) is built using a custom build container that comes pre-baked with some of the necessary dependencies.
|
||||
|
||||
Link: [grafana/build-container](https://github.com/grafana/grafana/tree/main/scripts/build/ci-build)
|
||||
|
||||
|
||||
470
build.go
470
build.go
@@ -3,14 +3,480 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"crypto/sha256"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"go/build"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
"github.com/grafana/grafana/pkg/build"
|
||||
const (
|
||||
windows = "windows"
|
||||
linux = "linux"
|
||||
)
|
||||
|
||||
var (
|
||||
//versionRe = regexp.MustCompile(`-[0-9]{1,3}-g[0-9a-f]{5,10}`)
|
||||
goarch string
|
||||
goos string
|
||||
gocc string
|
||||
cgo bool
|
||||
libc string
|
||||
pkgArch string
|
||||
version string = "v1"
|
||||
buildTags []string
|
||||
// deb & rpm does not support semver so have to handle their version a little differently
|
||||
linuxPackageVersion string = "v1"
|
||||
linuxPackageIteration string = ""
|
||||
race bool
|
||||
workingDir string
|
||||
includeBuildId bool = true
|
||||
buildId string = "0"
|
||||
serverBinary string = "grafana-server"
|
||||
cliBinary string = "grafana-cli"
|
||||
binaries []string = []string{serverBinary, cliBinary}
|
||||
isDev bool = false
|
||||
enterprise bool = false
|
||||
skipRpmGen bool = false
|
||||
skipDebGen bool = false
|
||||
printGenVersion bool = false
|
||||
)
|
||||
|
||||
func main() {
|
||||
log.SetOutput(os.Stdout)
|
||||
log.SetFlags(0)
|
||||
os.Exit(build.RunCmd())
|
||||
|
||||
var buildIdRaw string
|
||||
var buildTagsRaw string
|
||||
|
||||
flag.StringVar(&goarch, "goarch", runtime.GOARCH, "GOARCH")
|
||||
flag.StringVar(&goos, "goos", runtime.GOOS, "GOOS")
|
||||
flag.StringVar(&gocc, "cc", "", "CC")
|
||||
flag.StringVar(&libc, "libc", "", "LIBC")
|
||||
flag.StringVar(&buildTagsRaw, "build-tags", "", "Sets custom build tags")
|
||||
flag.BoolVar(&cgo, "cgo-enabled", cgo, "Enable cgo")
|
||||
flag.StringVar(&pkgArch, "pkg-arch", "", "PKG ARCH")
|
||||
flag.BoolVar(&race, "race", race, "Use race detector")
|
||||
flag.BoolVar(&includeBuildId, "includeBuildId", includeBuildId, "IncludeBuildId in package name")
|
||||
flag.BoolVar(&enterprise, "enterprise", enterprise, "Build enterprise version of Grafana")
|
||||
flag.StringVar(&buildIdRaw, "buildId", "0", "Build ID from CI system")
|
||||
flag.BoolVar(&isDev, "dev", isDev, "optimal for development, skips certain steps")
|
||||
flag.BoolVar(&skipRpmGen, "skipRpm", skipRpmGen, "skip rpm package generation (default: false)")
|
||||
flag.BoolVar(&skipDebGen, "skipDeb", skipDebGen, "skip deb package generation (default: false)")
|
||||
flag.BoolVar(&printGenVersion, "gen-version", printGenVersion, "generate Grafana version and output (default: false)")
|
||||
flag.Parse()
|
||||
|
||||
buildId = shortenBuildId(buildIdRaw)
|
||||
|
||||
readVersionFromPackageJson()
|
||||
|
||||
if pkgArch == "" {
|
||||
pkgArch = goarch
|
||||
}
|
||||
|
||||
if printGenVersion {
|
||||
printGeneratedVersion()
|
||||
return
|
||||
}
|
||||
|
||||
if len(buildTagsRaw) > 0 {
|
||||
buildTags = strings.Split(buildTagsRaw, ",")
|
||||
}
|
||||
|
||||
log.Printf("Version: %s, Linux Version: %s, Package Iteration: %s\n", version, linuxPackageVersion, linuxPackageIteration)
|
||||
|
||||
if flag.NArg() == 0 {
|
||||
log.Println("Usage: go run build.go build")
|
||||
return
|
||||
}
|
||||
|
||||
workingDir, _ = os.Getwd()
|
||||
|
||||
for _, cmd := range flag.Args() {
|
||||
switch cmd {
|
||||
case "setup":
|
||||
setup()
|
||||
|
||||
case "build-srv", "build-server":
|
||||
clean()
|
||||
doBuild("grafana-server", "./pkg/cmd/grafana-server", buildTags)
|
||||
|
||||
case "build-cli":
|
||||
clean()
|
||||
doBuild("grafana-cli", "./pkg/cmd/grafana-cli", buildTags)
|
||||
|
||||
case "build":
|
||||
//clean()
|
||||
for _, binary := range binaries {
|
||||
doBuild(binary, "./pkg/cmd/"+binary, buildTags)
|
||||
}
|
||||
|
||||
case "build-frontend":
|
||||
yarn("build")
|
||||
|
||||
case "sha-dist":
|
||||
shaFilesInDist()
|
||||
|
||||
case "latest":
|
||||
makeLatestDistCopies()
|
||||
|
||||
case "clean":
|
||||
clean()
|
||||
|
||||
default:
|
||||
log.Fatalf("Unknown command %q", cmd)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func makeLatestDistCopies() {
|
||||
files, err := ioutil.ReadDir("dist")
|
||||
if err != nil {
|
||||
log.Fatalf("failed to create latest copies. Cannot read from /dist")
|
||||
}
|
||||
|
||||
latestMapping := map[string]string{
|
||||
"_amd64.deb": "dist/grafana_latest_amd64.deb",
|
||||
".x86_64.rpm": "dist/grafana-latest-1.x86_64.rpm",
|
||||
".linux-amd64.tar.gz": "dist/grafana-latest.linux-x64.tar.gz",
|
||||
".linux-amd64-musl.tar.gz": "dist/grafana-latest.linux-x64-musl.tar.gz",
|
||||
".linux-armv7.tar.gz": "dist/grafana-latest.linux-armv7.tar.gz",
|
||||
".linux-armv7-musl.tar.gz": "dist/grafana-latest.linux-armv7-musl.tar.gz",
|
||||
".linux-armv6.tar.gz": "dist/grafana-latest.linux-armv6.tar.gz",
|
||||
".linux-arm64.tar.gz": "dist/grafana-latest.linux-arm64.tar.gz",
|
||||
".linux-arm64-musl.tar.gz": "dist/grafana-latest.linux-arm64-musl.tar.gz",
|
||||
}
|
||||
|
||||
for _, file := range files {
|
||||
for extension, fullName := range latestMapping {
|
||||
if strings.HasSuffix(file.Name(), extension) {
|
||||
runError("cp", path.Join("dist", file.Name()), fullName)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func readVersionFromPackageJson() {
|
||||
reader, err := os.Open("package.json")
|
||||
if err != nil {
|
||||
log.Fatal("Failed to open package.json")
|
||||
return
|
||||
}
|
||||
defer reader.Close()
|
||||
|
||||
jsonObj := map[string]interface{}{}
|
||||
jsonParser := json.NewDecoder(reader)
|
||||
|
||||
if err := jsonParser.Decode(&jsonObj); err != nil {
|
||||
log.Fatal("Failed to decode package.json")
|
||||
}
|
||||
|
||||
version = jsonObj["version"].(string)
|
||||
linuxPackageVersion = version
|
||||
linuxPackageIteration = ""
|
||||
|
||||
// handle pre version stuff (deb / rpm does not support semver)
|
||||
parts := strings.Split(version, "-")
|
||||
|
||||
if len(parts) > 1 {
|
||||
linuxPackageVersion = parts[0]
|
||||
linuxPackageIteration = parts[1]
|
||||
}
|
||||
|
||||
// add timestamp to iteration
|
||||
if includeBuildId {
|
||||
if buildId != "0" {
|
||||
linuxPackageIteration = fmt.Sprintf("%s%s", buildId, linuxPackageIteration)
|
||||
} else {
|
||||
linuxPackageIteration = fmt.Sprintf("%d%s", time.Now().Unix(), linuxPackageIteration)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func yarn(params ...string) {
|
||||
runPrint(`yarn run`, params...)
|
||||
}
|
||||
|
||||
func genPackageVersion() string {
|
||||
if includeBuildId {
|
||||
return fmt.Sprintf("%v-%v", linuxPackageVersion, linuxPackageIteration)
|
||||
} else {
|
||||
return version
|
||||
}
|
||||
}
|
||||
|
||||
func setup() {
|
||||
args := []string{"install", "-v"}
|
||||
if goos == windows {
|
||||
args = append(args, "-buildmode=exe")
|
||||
}
|
||||
args = append(args, "./pkg/cmd/grafana-server")
|
||||
runPrint("go", args...)
|
||||
}
|
||||
|
||||
func printGeneratedVersion() {
|
||||
fmt.Print(genPackageVersion())
|
||||
}
|
||||
|
||||
func test(pkg string) {
|
||||
setBuildEnv()
|
||||
args := []string{"test", "-short", "-timeout", "60s"}
|
||||
if goos == windows {
|
||||
args = append(args, "-buildmode=exe")
|
||||
}
|
||||
args = append(args, pkg)
|
||||
runPrint("go", args...)
|
||||
}
|
||||
|
||||
func doBuild(binaryName, pkg string, tags []string) {
|
||||
libcPart := ""
|
||||
if libc != "" {
|
||||
libcPart = fmt.Sprintf("-%s", libc)
|
||||
}
|
||||
binary := fmt.Sprintf("./bin/%s-%s%s/%s", goos, goarch, libcPart, binaryName)
|
||||
if isDev {
|
||||
//don't include os/arch/libc in output path in dev environment
|
||||
binary = fmt.Sprintf("./bin/%s", binaryName)
|
||||
}
|
||||
|
||||
if goos == windows {
|
||||
binary += ".exe"
|
||||
}
|
||||
|
||||
if !isDev {
|
||||
rmr(binary, binary+".md5")
|
||||
}
|
||||
args := []string{"build", "-ldflags", ldflags()}
|
||||
if goos == windows {
|
||||
// Work around a linking error on Windows: "export ordinal too large"
|
||||
args = append(args, "-buildmode=exe")
|
||||
}
|
||||
if len(tags) > 0 {
|
||||
args = append(args, "-tags", strings.Join(tags, ","))
|
||||
}
|
||||
if race {
|
||||
args = append(args, "-race")
|
||||
}
|
||||
|
||||
args = append(args, "-o", binary)
|
||||
args = append(args, pkg)
|
||||
|
||||
if !isDev {
|
||||
setBuildEnv()
|
||||
runPrint("go", "version")
|
||||
libcPart := ""
|
||||
if libc != "" {
|
||||
libcPart = fmt.Sprintf("/%s", libc)
|
||||
}
|
||||
fmt.Printf("Targeting %s/%s%s\n", goos, goarch, libcPart)
|
||||
}
|
||||
|
||||
runPrint("go", args...)
|
||||
|
||||
if !isDev {
|
||||
// Create an md5 checksum of the binary, to be included in the archive for
|
||||
// automatic upgrades.
|
||||
err := md5File(binary)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func ldflags() string {
|
||||
var b bytes.Buffer
|
||||
b.WriteString("-w")
|
||||
b.WriteString(fmt.Sprintf(" -X main.version=%s", version))
|
||||
b.WriteString(fmt.Sprintf(" -X main.commit=%s", getGitSha()))
|
||||
b.WriteString(fmt.Sprintf(" -X main.buildstamp=%d", buildStamp()))
|
||||
b.WriteString(fmt.Sprintf(" -X main.buildBranch=%s", getGitBranch()))
|
||||
if v := os.Getenv("LDFLAGS"); v != "" {
|
||||
b.WriteString(fmt.Sprintf(" -extldflags \"%s\"", v))
|
||||
}
|
||||
return b.String()
|
||||
}
|
||||
|
||||
func rmr(paths ...string) {
|
||||
for _, path := range paths {
|
||||
log.Println("rm -r", path)
|
||||
os.RemoveAll(path)
|
||||
}
|
||||
}
|
||||
|
||||
func clean() {
|
||||
if isDev {
|
||||
return
|
||||
}
|
||||
|
||||
rmr("dist")
|
||||
rmr("tmp")
|
||||
rmr(filepath.Join(build.Default.GOPATH, fmt.Sprintf("pkg/%s_%s/github.com/grafana", goos, goarch)))
|
||||
}
|
||||
|
||||
func setBuildEnv() {
|
||||
os.Setenv("GOOS", goos)
|
||||
if goos == windows {
|
||||
// require windows >=7
|
||||
os.Setenv("CGO_CFLAGS", "-D_WIN32_WINNT=0x0601")
|
||||
}
|
||||
if goarch != "amd64" || goos != linux {
|
||||
// needed for all other archs
|
||||
cgo = true
|
||||
}
|
||||
if strings.HasPrefix(goarch, "armv") {
|
||||
os.Setenv("GOARCH", "arm")
|
||||
os.Setenv("GOARM", goarch[4:])
|
||||
} else {
|
||||
os.Setenv("GOARCH", goarch)
|
||||
}
|
||||
if goarch == "386" {
|
||||
os.Setenv("GO386", "387")
|
||||
}
|
||||
if cgo {
|
||||
os.Setenv("CGO_ENABLED", "1")
|
||||
}
|
||||
if gocc != "" {
|
||||
os.Setenv("CC", gocc)
|
||||
}
|
||||
}
|
||||
|
||||
func getGitBranch() string {
|
||||
v, err := runError("git", "rev-parse", "--abbrev-ref", "HEAD")
|
||||
if err != nil {
|
||||
return "main"
|
||||
}
|
||||
return string(v)
|
||||
}
|
||||
|
||||
func getGitSha() string {
|
||||
v, err := runError("git", "rev-parse", "--short", "HEAD")
|
||||
if err != nil {
|
||||
return "unknown-dev"
|
||||
}
|
||||
return string(v)
|
||||
}
|
||||
|
||||
func buildStamp() int64 {
|
||||
// use SOURCE_DATE_EPOCH if set.
|
||||
if s, _ := strconv.ParseInt(os.Getenv("SOURCE_DATE_EPOCH"), 10, 64); s > 0 {
|
||||
return s
|
||||
}
|
||||
|
||||
bs, err := runError("git", "show", "-s", "--format=%ct")
|
||||
if err != nil {
|
||||
return time.Now().Unix()
|
||||
}
|
||||
s, _ := strconv.ParseInt(string(bs), 10, 64)
|
||||
return s
|
||||
}
|
||||
|
||||
func runError(cmd string, args ...string) ([]byte, error) {
|
||||
ecmd := exec.Command(cmd, args...)
|
||||
bs, err := ecmd.CombinedOutput()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return bytes.TrimSpace(bs), nil
|
||||
}
|
||||
|
||||
func runPrint(cmd string, args ...string) {
|
||||
log.Println(cmd, strings.Join(args, " "))
|
||||
ecmd := exec.Command(cmd, args...)
|
||||
ecmd.Env = append(os.Environ(), "GO111MODULE=on")
|
||||
ecmd.Stdout = os.Stdout
|
||||
ecmd.Stderr = os.Stderr
|
||||
err := ecmd.Run()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func md5File(file string) error {
|
||||
fd, err := os.Open(file)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer fd.Close()
|
||||
|
||||
h := md5.New()
|
||||
_, err = io.Copy(h, fd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
out, err := os.Create(file + ".md5")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = fmt.Fprintf(out, "%x\n", h.Sum(nil))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return out.Close()
|
||||
}
|
||||
|
||||
func shaFilesInDist() {
|
||||
filepath.Walk("./dist", func(path string, f os.FileInfo, err error) error {
|
||||
if path == "./dist" {
|
||||
return nil
|
||||
}
|
||||
|
||||
if !strings.Contains(path, ".sha256") {
|
||||
err := shaFile(path)
|
||||
if err != nil {
|
||||
log.Printf("Failed to create sha file. error: %v\n", err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func shaFile(file string) error {
|
||||
fd, err := os.Open(file)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer fd.Close()
|
||||
|
||||
h := sha256.New()
|
||||
_, err = io.Copy(h, fd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
out, err := os.Create(file + ".sha256")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = fmt.Fprintf(out, "%x\n", h.Sum(nil))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return out.Close()
|
||||
}
|
||||
|
||||
func shortenBuildId(buildId string) string {
|
||||
buildId = strings.Replace(buildId, "-", "", -1)
|
||||
if len(buildId) < 9 {
|
||||
return buildId
|
||||
}
|
||||
return buildId[0:8]
|
||||
}
|
||||
|
||||
@@ -166,18 +166,15 @@ max_conns_per_host = 0
|
||||
# The maximum number of idle connections that Grafana will keep alive.
|
||||
max_idle_connections = 100
|
||||
|
||||
# The maximum number of idle connections per host that Grafana will keep alive.
|
||||
max_idle_connections_per_host = 2
|
||||
|
||||
# How many seconds the data proxy keeps an idle connection open before timing out.
|
||||
idle_conn_timeout_seconds = 90
|
||||
|
||||
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request.
|
||||
send_user_header = false
|
||||
|
||||
# Limit the amount of bytes that will be read/accepted from responses of outgoing HTTP requests.
|
||||
response_limit = 0
|
||||
|
||||
# Limits the number of rows that Grafana will process from SQL data sources.
|
||||
row_limit = 1000000
|
||||
|
||||
#################################### Analytics ###########################
|
||||
[analytics]
|
||||
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
|
||||
@@ -202,18 +199,6 @@ google_analytics_ua_id =
|
||||
# Google Tag Manager ID, only enabled if you specify an id here
|
||||
google_tag_manager_id =
|
||||
|
||||
# Rudderstack write key, enabled only if rudderstack_data_plane_url is also set
|
||||
rudderstack_write_key =
|
||||
|
||||
# Rudderstack data plane url, enabled only if rudderstack_write_key is also set
|
||||
rudderstack_data_plane_url =
|
||||
|
||||
# Application Insights connection string. Specify an URL string to enable this feature.
|
||||
application_insights_connection_string =
|
||||
|
||||
# Optional. Specifies an Application Insights endpoint URL where the endpoint string is wrapped in backticks ``.
|
||||
application_insights_endpoint_url =
|
||||
|
||||
#################################### Security ############################
|
||||
[security]
|
||||
# disable creation of admin user on first start of grafana
|
||||
@@ -508,13 +493,10 @@ login_attribute_path =
|
||||
name_attribute_path =
|
||||
role_attribute_path =
|
||||
role_attribute_strict = false
|
||||
groups_attribute_path =
|
||||
id_token_attribute_name =
|
||||
team_ids_attribute_path =
|
||||
auth_url =
|
||||
token_url =
|
||||
api_url =
|
||||
teams_url =
|
||||
allowed_domains =
|
||||
team_ids =
|
||||
allowed_organizations =
|
||||
@@ -609,8 +591,7 @@ startTLS_policy =
|
||||
|
||||
[emails]
|
||||
welcome_email_on_sign_up = false
|
||||
templates_pattern = emails/*.html, emails/*.txt
|
||||
content_types = text/html
|
||||
templates_pattern = emails/*.html
|
||||
|
||||
#################################### Logging ##########################
|
||||
[log]
|
||||
@@ -729,67 +710,11 @@ global_session = -1
|
||||
# global limit of alerts
|
||||
global_alert_rule = -1
|
||||
|
||||
#################################### Unified Alerting ####################
|
||||
[unified_alerting]
|
||||
# Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.
|
||||
enabled = false
|
||||
|
||||
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
|
||||
disabled_orgs =
|
||||
|
||||
# Specify the frequency of polling for admin config changes.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
admin_config_poll_interval = 60s
|
||||
|
||||
# Specify the frequency of polling for Alertmanager config changes.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
alertmanager_config_poll_interval = 60s
|
||||
|
||||
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port.
|
||||
ha_listen_address = "0.0.0.0:9094"
|
||||
|
||||
# Explicit address/hostname and port to advertise other Grafana instances. The port is used for both TCP and UDP.
|
||||
ha_advertise_address = ""
|
||||
|
||||
# Comma-separated list of initial instances (in a format of host:port) that will form the HA cluster. Configuring this setting will enable High Availability mode for alerting.
|
||||
ha_peers = ""
|
||||
|
||||
# Time to wait for an instance to send a notification via the Alertmanager. In HA, each Grafana instance will
|
||||
# be assigned a position (e.g. 0, 1). We then multiply this position with the timeout to indicate how long should
|
||||
# each instance wait before sending the notification to take into account replication lag.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
ha_peer_timeout = 15s
|
||||
|
||||
# The interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated
|
||||
# across cluster more quickly at the expense of increased bandwidth usage.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
ha_gossip_interval = 200ms
|
||||
|
||||
# The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds
|
||||
# across larger clusters at the expense of increased bandwidth usage.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
ha_push_pull_interval = 60s
|
||||
|
||||
# Enable or disable alerting rule execution. The alerting UI remains visible. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
execute_alerts = true
|
||||
|
||||
# Alert evaluation timeout when fetching data from the datasource. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
evaluation_timeout = 30s
|
||||
|
||||
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
max_attempts = 3
|
||||
|
||||
# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
min_interval = 10s
|
||||
|
||||
#################################### Alerting ############################
|
||||
[alerting]
|
||||
# Disable legacy alerting engine & UI features
|
||||
# Disable alerting engine & UI features
|
||||
enabled = true
|
||||
|
||||
# Makes it possible to turn off alert execution but alerting UI is visible
|
||||
# Makes it possible to turn off alert rule execution but alerting UI is visible
|
||||
execute_alerts = true
|
||||
|
||||
# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
|
||||
@@ -965,7 +890,7 @@ app_tls_skip_verify_insecure = false
|
||||
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
|
||||
allow_loading_unsigned_plugins =
|
||||
# Enable or disable installing plugins directly from within Grafana.
|
||||
plugin_admin_enabled = true
|
||||
plugin_admin_enabled = false
|
||||
plugin_admin_external_manage_enabled = false
|
||||
plugin_catalog_url = https://grafana.com/grafana/plugins/
|
||||
|
||||
@@ -980,17 +905,6 @@ max_connections = 100
|
||||
# If not set then origin will be matched over root_url. Supports wildcard symbol "*".
|
||||
allowed_origins =
|
||||
|
||||
# engine defines an HA (high availability) engine to use for Grafana Live. By default no engine used - in
|
||||
# this case Live features work only on a single Grafana server.
|
||||
# Available options: "redis".
|
||||
# Setting ha_engine is an EXPERIMENTAL feature.
|
||||
ha_engine =
|
||||
|
||||
# ha_engine_address sets a connection address for Live HA engine. Depending on engine type address format can differ.
|
||||
# For now we only support Redis connection address in "host:port" format.
|
||||
# This option is EXPERIMENTAL.
|
||||
ha_engine_address = "127.0.0.1:6379"
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
|
||||
@@ -1034,14 +948,12 @@ rendering_chrome_bin =
|
||||
# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
|
||||
rendering_mode =
|
||||
|
||||
# When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
|
||||
# When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
|
||||
# and will cluster using browser instances.
|
||||
# Mode 'context' will cluster using incognito pages.
|
||||
rendering_clustering_mode =
|
||||
# When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is '5'.
|
||||
# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
|
||||
rendering_clustering_max_concurrency =
|
||||
# When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
|
||||
rendering_clustering_timeout =
|
||||
|
||||
# Limit the maximum viewport width, height and device scale factor that can be requested.
|
||||
rendering_viewport_max_width =
|
||||
@@ -1083,10 +995,3 @@ default_timezone = browser
|
||||
[expressions]
|
||||
# Enable or disable the expressions functionality.
|
||||
enabled = true
|
||||
|
||||
[geomap]
|
||||
# Set the JSON configuration for the default basemap
|
||||
default_baselayer_config =
|
||||
|
||||
# Enable or disable loading other base map layers
|
||||
enable_custom_baselayers = true
|
||||
|
||||
105
conf/sample.ini
105
conf/sample.ini
@@ -172,18 +172,15 @@
|
||||
# The maximum number of idle connections that Grafana will keep alive.
|
||||
;max_idle_connections = 100
|
||||
|
||||
# The maximum number of idle connections per host that Grafana will keep alive.
|
||||
;max_idle_connections_per_host = 2
|
||||
|
||||
# How many seconds the data proxy keeps an idle connection open before timing out.
|
||||
;idle_conn_timeout_seconds = 90
|
||||
|
||||
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false.
|
||||
;send_user_header = false
|
||||
|
||||
# Limit the amount of bytes that will be read/accepted from responses of outgoing HTTP requests.
|
||||
;response_limit = 0
|
||||
|
||||
# Limits the number of rows that Grafana will process from SQL data sources.
|
||||
;row_limit = 1000000
|
||||
|
||||
#################################### Analytics ####################################
|
||||
[analytics]
|
||||
# Server reporting, sends usage counters to stats.grafana.org every 24 hours.
|
||||
@@ -489,14 +486,11 @@
|
||||
;auth_url = https://foo.bar/login/oauth/authorize
|
||||
;token_url = https://foo.bar/login/oauth/access_token
|
||||
;api_url = https://foo.bar/user
|
||||
;teams_url =
|
||||
;allowed_domains =
|
||||
;team_ids =
|
||||
;allowed_organizations =
|
||||
;role_attribute_path =
|
||||
;role_attribute_strict = false
|
||||
;groups_attribute_path =
|
||||
;team_ids_attribute_path =
|
||||
;tls_skip_verify_insecure = false
|
||||
;tls_client_cert =
|
||||
;tls_client_key =
|
||||
@@ -586,8 +580,7 @@
|
||||
|
||||
[emails]
|
||||
;welcome_email_on_sign_up = false
|
||||
;templates_pattern = emails/*.html, emails/*.txt
|
||||
;content_types = text/html
|
||||
;templates_pattern = emails/*.html
|
||||
|
||||
#################################### Logging ##########################
|
||||
[log]
|
||||
@@ -706,67 +699,11 @@
|
||||
# global limit of alerts
|
||||
;global_alert_rule = -1
|
||||
|
||||
#################################### Unified Alerting ####################
|
||||
[unified_alerting]
|
||||
#Enable the Unified Alerting sub-system and interface. When enabled we'll migrate all of your alert rules and notification channels to the new system. New alert rules will be created and your notification channels will be converted into an Alertmanager configuration. Previous data is preserved to enable backwards compatibility but new data is removed.```
|
||||
;enabled = false
|
||||
|
||||
# Comma-separated list of organization IDs for which to disable unified alerting. Only supported if unified alerting is enabled.
|
||||
;disabled_orgs =
|
||||
|
||||
# Specify the frequency of polling for admin config changes.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;admin_config_poll_interval = 60s
|
||||
|
||||
# Specify the frequency of polling for Alertmanager config changes.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;alertmanager_config_poll_interval = 60s
|
||||
|
||||
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
|
||||
;ha_listen_address = "0.0.0.0:9094"
|
||||
|
||||
# Listen address/hostname and port to receive unified alerting messages for other Grafana instances. The port is used for both TCP and UDP. It is assumed other Grafana instances are also running on the same port. The default value is `0.0.0.0:9094`.
|
||||
;ha_advertise_address = ""
|
||||
|
||||
# Comma-separated list of initial instances (in a format of host:port) that will form the HA cluster. Configuring this setting will enable High Availability mode for alerting.
|
||||
;ha_peers = ""
|
||||
|
||||
# Time to wait for an instance to send a notification via the Alertmanager. In HA, each Grafana instance will
|
||||
# be assigned a position (e.g. 0, 1). We then multiply this position with the timeout to indicate how long should
|
||||
# each instance wait before sending the notification to take into account replication lag.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;ha_peer_timeout = "15s"
|
||||
|
||||
# The interval between sending gossip messages. By lowering this value (more frequent) gossip messages are propagated
|
||||
# across cluster more quickly at the expense of increased bandwidth usage.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;ha_gossip_interval = "200ms"
|
||||
|
||||
# The interval between gossip full state syncs. Setting this interval lower (more frequent) will increase convergence speeds
|
||||
# across larger clusters at the expense of increased bandwidth usage.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;ha_push_pull_interval = "60s"
|
||||
|
||||
# Enable or disable alerting rule execution. The alerting UI remains visible. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
;execute_alerts = true
|
||||
|
||||
# Alert evaluation timeout when fetching data from the datasource. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
# The timeout string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;evaluation_timeout = 30s
|
||||
|
||||
# Number of times we'll attempt to evaluate an alert rule before giving up on that evaluation. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
;max_attempts = 3
|
||||
|
||||
# Minimum interval to enforce between rule evaluations. Rules will be adjusted if they are less than this value or if they are not multiple of the scheduler interval (10s). Higher values can help with resource management as we'll schedule fewer evaluations over time. This option has a legacy version in the `[alerting]` section that takes precedence.
|
||||
# The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. 30s or 1m.
|
||||
;min_interval = 10s
|
||||
|
||||
#################################### Alerting ############################
|
||||
[alerting]
|
||||
# Disable legacy alerting engine & UI features
|
||||
# Disable alerting engine & UI features
|
||||
;enabled = true
|
||||
|
||||
# Makes it possible to turn off alert execution but alerting UI is visible
|
||||
# Makes it possible to turn off alert rule execution but alerting UI is visible
|
||||
;execute_alerts = true
|
||||
|
||||
# Default setting for new alert rules. Defaults to categorize error and timeouts as alerting. (alerting, keep_state)
|
||||
@@ -779,6 +716,7 @@
|
||||
# This limit will protect the server from render overloading and make sure notifications are sent out quickly
|
||||
;concurrent_render_limit = 5
|
||||
|
||||
|
||||
# Default setting for alert calculation timeout. Default value is 30
|
||||
;evaluation_timeout_seconds = 30
|
||||
|
||||
@@ -953,16 +891,6 @@
|
||||
# If not set then origin will be matched over root_url. Supports wildcard symbol "*".
|
||||
;allowed_origins =
|
||||
|
||||
# engine defines an HA (high availability) engine to use for Grafana Live. By default no engine used - in
|
||||
# this case Live features work only on a single Grafana server. Available options: "redis".
|
||||
# Setting ha_engine is an EXPERIMENTAL feature.
|
||||
;ha_engine =
|
||||
|
||||
# ha_engine_address sets a connection address for Live HA engine. Depending on engine type address format can differ.
|
||||
# For now we only support Redis connection address in "host:port" format.
|
||||
# This option is EXPERIMENTAL.
|
||||
;ha_engine_address = "127.0.0.1:6379"
|
||||
|
||||
#################################### Grafana Image Renderer Plugin ##########################
|
||||
[plugin.grafana-image-renderer]
|
||||
# Instruct headless browser instance to use a default timezone when not provided by Grafana, e.g. when rendering panel image of alert.
|
||||
@@ -1006,14 +934,12 @@
|
||||
# Mode 'reusable' will have one browser instance and will create a new incognito page on each request.
|
||||
;rendering_mode =
|
||||
|
||||
# When rendering_mode = clustered, you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
|
||||
# When rendering_mode = clustered you can instruct how many browsers or incognito pages can execute concurrently. Default is 'browser'
|
||||
# and will cluster using browser instances.
|
||||
# Mode 'context' will cluster using incognito pages.
|
||||
;rendering_clustering_mode =
|
||||
# When rendering_mode = clustered, you can define the maximum number of browser instances/incognito pages that can execute concurrently. Default is '5'.
|
||||
# When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
|
||||
;rendering_clustering_max_concurrency =
|
||||
# When rendering_mode = clustered, you can specify the duration a rendering request can take before it will time out. Default is `30` seconds.
|
||||
;rendering_clustering_timeout =
|
||||
|
||||
# Limit the maximum viewport width, height and device scale factor that can be requested.
|
||||
;rendering_viewport_max_width =
|
||||
@@ -1056,16 +982,3 @@
|
||||
[expressions]
|
||||
# Enable or disable the expressions functionality.
|
||||
;enabled = true
|
||||
|
||||
[geomap]
|
||||
# Set the JSON configuration for the default basemap
|
||||
;default_baselayer_config = `{
|
||||
; "type": "xyz",
|
||||
; "config": {
|
||||
; "attribution": "Open street map",
|
||||
; "url": "https://tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
; }
|
||||
;}`
|
||||
|
||||
# Enable or disable loading other base map layers
|
||||
;enable_custom_baselayers = true
|
||||
|
||||
@@ -6,7 +6,6 @@ This directory contains guides for contributors to the Grafana project.
|
||||
- [Contributing documentation](documentation.md)
|
||||
- [Developer guide](developer-guide.md)
|
||||
- [Triage issues](triage-issues.md)
|
||||
- [Merge a pull request](merge-pull-request.md)
|
||||
|
||||
The `style-guides` directory contains style guides for the Grafana software project and documentation.
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ An event is something that happened in the past. Since an event has already happ
|
||||
|
||||
### Subscribe to an event
|
||||
|
||||
In order to react to an event, you first need to _subscribe_ to it.
|
||||
In order to react to an event, you first need to _subscribe_ to it.
|
||||
|
||||
To subscribe to an event, register an _event listener_ in the service's `Init` method:
|
||||
|
||||
@@ -51,16 +51,14 @@ A command is a request for an action to be taken. Unlike an event's fire-and-for
|
||||
|
||||
### Dispatch a command
|
||||
|
||||
To dispatch a command, pass the `context.Context` and object to the `DispatchCtx` method:
|
||||
To dispatch a command, pass the object to the `Dispatch` method:
|
||||
|
||||
```go
|
||||
// context.Context from caller
|
||||
ctx := req.Request.Context()
|
||||
cmd := &models.SendStickersCommand {
|
||||
UserID: "taylor",
|
||||
Count: 1,
|
||||
}
|
||||
if err := s.bus.DispatchCtx(ctx, cmd); err != nil {
|
||||
if err := s.bus.Dispatch(cmd); err != nil {
|
||||
if err == bus.ErrHandlerNotFound {
|
||||
return nil
|
||||
}
|
||||
@@ -68,9 +66,7 @@ if err := s.bus.DispatchCtx(ctx, cmd); err != nil {
|
||||
}
|
||||
```
|
||||
|
||||
> **Note:** `DispatchCtx` will return an error if no handler is registered for that command.
|
||||
|
||||
> **Note:** `Dispatch` currently exists and requires no `context.Context` to be provided, but it's strongly suggested to not use this since there's an ongoing refactoring to remove usage of non-context-aware functions/methods and use context.Context everywhere.
|
||||
> **Note:** `Dispatch` will return an error if no handler is registered for that command.
|
||||
|
||||
**Tip:** Browse the available commands in the `models` package.
|
||||
|
||||
@@ -82,34 +78,30 @@ To handle a command, register a command handler in the `Init` function.
|
||||
|
||||
```go
|
||||
func (s *MyService) Init() error {
|
||||
s.bus.AddHandlerCtx(s.SendStickers)
|
||||
s.bus.AddHandler(s.SendStickers)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *MyService) SendStickers(ctx context.Context, cmd *models.SendStickersCommand) error {
|
||||
func (s *MyService) SendStickers(cmd *models.SendStickersCommand) error {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
> **Note:** The handler method may return an error if unable to complete the command.
|
||||
|
||||
> **Note:** `AddHandler` currently exists and requires no `context.Context` to be provided, but it's strongly suggested to not use this since there's an ongoing refactoring to remove usage of non-context-aware functions/methods and use context.Context everywhere.
|
||||
|
||||
## Queries
|
||||
|
||||
A command handler can optionally populate the command sent to it. This pattern is commonly used to implement _queries_.
|
||||
|
||||
### Making a query
|
||||
|
||||
To make a query, dispatch the query instance just like you would a command. When the `DispatchCtx` method returns, the `Results` field contains the result of the query.
|
||||
To make a query, dispatch the query instance just like you would a command. When the `Dispatch` method returns, the `Results` field contains the result of the query.
|
||||
|
||||
```go
|
||||
// context.Context from caller
|
||||
ctx := req.Request.Context()
|
||||
query := &models.FindDashboardQuery{
|
||||
ID: "foo",
|
||||
}
|
||||
if err := bus.DispatchCtx(ctx, query); err != nil {
|
||||
if err := bus.Dispatch(query); err != nil {
|
||||
return err
|
||||
}
|
||||
// The query now contains a result.
|
||||
@@ -118,14 +110,12 @@ for _, item := range query.Results {
|
||||
}
|
||||
```
|
||||
|
||||
> **Note:** `Dispatch` currently exists and requires no `context.Context` to be provided, but it's strongly suggested to not use this since there's an ongoing refactoring to remove usage of non-context-aware functions/methods and use context.Context everywhere.
|
||||
|
||||
### Return query results
|
||||
|
||||
To return results for a query, set any of the fields on the query argument before returning:
|
||||
|
||||
```go
|
||||
func (s *MyService) FindDashboard(ctx context.Context, query *models.FindDashboardQuery) error {
|
||||
func (s *MyService) FindDashboard(query *models.FindDashboardQuery) error {
|
||||
// ...
|
||||
query.Result = dashboard
|
||||
return nil
|
||||
|
||||
@@ -33,18 +33,18 @@ To register a handler:
|
||||
|
||||
```go
|
||||
func init() {
|
||||
bus.AddHandlerCtx("sql", DeleteDashboard)
|
||||
bus.AddHandler("sql", DeleteDashboard)
|
||||
}
|
||||
|
||||
func DeleteDashboard(ctx context.Context, cmd *models.DeleteDashboardCommand) error {
|
||||
return inTransactionCtx(ctx, func(sess *DBSession) error {
|
||||
func DeleteDashboard(cmd *models.DeleteDashboardCommand) error {
|
||||
return inTransaction(func(sess *DBSession) error {
|
||||
_, err := sess.Exec("DELETE FROM dashboards WHERE dashboard_id=?", cmd.DashboardID)
|
||||
return err
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
Here, `inTransactionCtx` is a helper function in the `sqlstore` package that provides a session, that lets you execute SQL statements.
|
||||
Here, `inTransaction` is a helper function in the `sqlstore` package that provides a session, that lets you execute SQL statements.
|
||||
|
||||
## `SQLStore`
|
||||
|
||||
@@ -61,7 +61,7 @@ type MyService struct {
|
||||
You can now make SQL queries in any of your [command handlers](communication.md#handle-commands) or [event listeners](communication.md#subscribe-to-an-event):
|
||||
|
||||
```go
|
||||
func (s *MyService) DeleteDashboard(ctx context.Context, cmd *models.DeleteDashboardCommand) error {
|
||||
func (s *MyService) DeleteDashboard(cmd *models.DeleteDashboardCommand) error {
|
||||
if err := s.SQLStore.WithDbSession(ctx, func(sess *sqlstore.DBSession) error {
|
||||
_, err := sess.Exec("DELETE FROM dashboards WHERE dashboard_id=?", cmd.DashboardID)
|
||||
return err
|
||||
|
||||
@@ -1,138 +1,69 @@
|
||||
# Services
|
||||
|
||||
A Grafana _service_ encapsulates and exposes application logic to the rest of the application, through a set of related operations.
|
||||
A Grafana _service_ encapsulates and exposes application logic to the rest of the application, through a set of related operations.
|
||||
|
||||
Grafana uses [Wire](https://github.com/google/wire), which is a code generation tool that automates connecting components using [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection). Dependencies between components are represented in Wire as function parameters, encouraging explicit initialization instead of global variables.
|
||||
Before a service can start communicating with the rest of Grafana, it needs to be registered in the _service registry_.
|
||||
|
||||
The service registry keeps track of all available services during runtime. On start-up, Grafana uses the registry to build a dependency graph of services, a _service graph_.
|
||||
|
||||
Even though the services in Grafana do different things, they share a number of patterns. To better understand how a service works, let's build one from scratch!
|
||||
|
||||
Before a service can start communicating with the rest of Grafana, it needs to be registered with Wire, see `ProvideService` factory function/method in the service example below and how it's being referenced in the wire.go example below.
|
||||
## Create a service
|
||||
|
||||
When Wire is run it will inspect the parameters of `ProvideService` and make sure that all it's dependencies has been wired up and initialized properly.
|
||||
To start building a service:
|
||||
|
||||
**Service example:**
|
||||
- Create a new Go package `mysvc` in the [pkg/services](/pkg/services) directory.
|
||||
- Create a `service.go` file inside your new directory.
|
||||
|
||||
All services need to implement the [Service](https://godoc.org/github.com/grafana/grafana/pkg/registry#Service) interface:
|
||||
|
||||
```go
|
||||
package example
|
||||
|
||||
// Service service is the service responsible for X, Y and Z.
|
||||
type Service struct {
|
||||
logger log.Logger
|
||||
cfg *setting.Cfg
|
||||
sqlStore *sqlstore.SQLStore
|
||||
type MyService struct {
|
||||
}
|
||||
|
||||
// ProvideService provides Service as dependency for other services.
|
||||
func ProvideService(cfg *setting.Cfg, sqlStore *sqlstore.SQLStore) (*Service, error) {
|
||||
s := &Service{
|
||||
logger: log.New("service"),
|
||||
cfg: cfg,
|
||||
sqlStore: sqlStore,
|
||||
}
|
||||
|
||||
if s.IsDisabled() {
|
||||
// skip certain initialization logic
|
||||
return s, nil
|
||||
}
|
||||
|
||||
if err := s.init(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return s, nil
|
||||
}
|
||||
|
||||
func (s *Service) init() error {
|
||||
// additional initialization logic...
|
||||
func (s *MyService) Init() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// IsDisabled returns true if the service is disabled.
|
||||
//
|
||||
// Satisfies the registry.CanBeDisabled interface which will guarantee
|
||||
// that Run() is not called if the service is disabled.
|
||||
func (s *Service) IsDisabled() bool {
|
||||
return !s.cfg.IsServiceEnabled()
|
||||
}
|
||||
|
||||
// Run runs the service in the background.
|
||||
//
|
||||
// Satisfies the registry.BackgroundService interface which will
|
||||
// guarantee that the service can be registered as a background service.
|
||||
func (s *Service) Run(ctx context.Context) error {
|
||||
// background service logic...
|
||||
<-ctx.Done()
|
||||
return ctx.Err()
|
||||
}
|
||||
```
|
||||
|
||||
[wire.go](/pkg/server/wire.go)
|
||||
The `Init` method is used to initialize and configure the service to make it ready to use. Services that return an error halt Grafana's startup process and cause the error to be logged as it exits.
|
||||
|
||||
## Register a service
|
||||
|
||||
Every service needs to be registered with the application for it to be included in the service graph.
|
||||
|
||||
To register a service, call the `registry.RegisterService` function in an `init` function within your package.
|
||||
|
||||
```go
|
||||
// +build wireinject
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
"github.com/google/wire"
|
||||
"github.com/grafana/grafana/pkg/example"
|
||||
"github.com/grafana/grafana/pkg/services/sqlstore"
|
||||
)
|
||||
|
||||
var wireBasicSet = wire.NewSet(
|
||||
example.ProvideService,
|
||||
|
||||
)
|
||||
|
||||
var wireSet = wire.NewSet(
|
||||
wireBasicSet,
|
||||
sqlstore.ProvideService,
|
||||
)
|
||||
|
||||
var wireTestSet = wire.NewSet(
|
||||
wireBasicSet,
|
||||
)
|
||||
|
||||
func Initialize(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions) (*Server, error) {
|
||||
wire.Build(wireExtsSet)
|
||||
return &Server{}, nil
|
||||
func init() {
|
||||
registry.RegisterService(&MyService{})
|
||||
}
|
||||
|
||||
func InitializeForTest(cla setting.CommandLineArgs, opts Options, apiOpts api.ServerOptions, sqlStore *sqlstore.SQLStore) (*Server, error) {
|
||||
wire.Build(wireExtsTestSet)
|
||||
return &Server{}, nil
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Background services
|
||||
`init` functions are only run whenever a package is imported, so we also need to import the package in the application. In the `server.go` file under `pkg/server`, import the package we just created:
|
||||
|
||||
A background service is a service that runs in the background of the lifecycle between Grafana starts up and shutdown. If you want a service to be run in the background your Service should satisfy the `registry.BackgroundService` interface and add it as argument to the [ProvideBackgroundServiceRegistry](/pkg/server/backgroundsvcs/background_services.go) function and add it as argument to `NewBackgroundServiceRegistry` to register it as a background service.
|
||||
```go
|
||||
import _ "github.com/grafana/grafana/pkg/services/mysvc"
|
||||
```
|
||||
|
||||
You can see an example implementation above of the Run method.
|
||||
## Dependencies
|
||||
|
||||
## Disabled services
|
||||
Grafana uses the [inject](https://github.com/facebookgo/inject) package to inject dependencies during runtime.
|
||||
|
||||
If you want to guarantee that a background service is not run by Grafana when certain criteria is met/service is disabled your service should satisfy the `registry.CanBeDisabled` interface. When the service.IsDisabled method return false Grafana would not call the service.Run method.
|
||||
For example, to access the [bus](communication.md), add it to the `MyService` struct:
|
||||
|
||||
If you want to run certain initialization code if service is disabled or not, you need to handle this in the service factory method.
|
||||
```go
|
||||
type MyService struct {
|
||||
Bus bus.Bus `inject:""`
|
||||
}
|
||||
```
|
||||
|
||||
You can see an example implementation above of the IsDisabled method and custom initialization code when service is disabled.
|
||||
You can also inject other services in the same way:
|
||||
|
||||
## Run Wire / generate code
|
||||
```go
|
||||
type MyService struct {
|
||||
Service other.Service `inject:""`
|
||||
}
|
||||
```
|
||||
|
||||
When running `make run` it will call `make gen-go` on the first run. `gen-go` in turn will call the wire binary and generate the code in [wire_gen.go](/pkg/server/wire_gen.go). The wire binary is installed using [bingo](https://github.com/bwplotka/bingo) which will make sure to download and install all the tools needed, including the Wire binary at using a specific version.
|
||||
|
||||
## OSS vs Enterprise
|
||||
|
||||
Grafana OSS and Grafana Enterprise shares code and dependencies. Grafana Enterprise might need to override/extend certain OSS services.
|
||||
|
||||
There's a [wireexts_oss.go](/pkg/server/wireexts_oss.go) that has the `wireinject` and `oss` build tags as requirements. Here services that might have other implementations, e.g. Grafana Enterprise, can be registered.
|
||||
|
||||
Similarly, there's a wireexts_enterprise.go file in the Enterprise source code repository where other service implementations can be overridden/be registered.
|
||||
|
||||
To extend oss background service create a specific background interface for that type and inject that type to [ProvideBackgroundServiceRegistry](/pkg/server/backgroundsvcs/background_services.go) instead of the concrete type. Then add a wire binding for that interface in [wireexts_oss.go](/pkg/server/wireexts_oss.go) and in the enterprise wireexts file.
|
||||
|
||||
## Methods
|
||||
|
||||
Any public method of a service should take `context.Context` as its first argument. If the method calls the bus, other services or the database the context should be propagated, if possible.
|
||||
> **Note:** Any injected dependency needs to be an exported field. Any unexported fields result in a runtime error.
|
||||
|
||||
@@ -16,7 +16,7 @@ If this is your first time contributing to an open-source project on GitHub, mak
|
||||
To increase the chance of having your pull request accepted, make sure your pull request follows these guidelines:
|
||||
|
||||
- Title and description matches the implementation.
|
||||
- Commits within the pull request follow the [Formatting guidelines](#Formatting-guidelines).
|
||||
- Commits within the pull request follow the [Formatting guidelines](#Formatting-guidelines).
|
||||
- The pull request closes one related issue.
|
||||
- The pull request contains necessary tests that verify the intended behavior.
|
||||
- If your pull request has conflicts, rebase your branch onto the main branch.
|
||||
@@ -43,29 +43,6 @@ Pull requests for Redux contributions must:
|
||||
- Not contain code that mutates state in reducers or thunks.
|
||||
- Not contain code that accesses the reducers state slice directly. Instead, the code should use state selectors to access state.
|
||||
|
||||
Pull requests that add or modify unit tests that are written in Jest must adhere to these guidelines:
|
||||
|
||||
- Don't add snapshots tests. We are incrementally removing existing snapshot tests, we don't want more.
|
||||
- If an existing unit test is written in Enzyme, migrate it to RTL (React Testing Library), unless you’re fixing a bug. Bug fixes usually shouldn't include any bigger refactoring, so it’s ok to skip migrating the test to RTL.
|
||||
|
||||
Pull requests that create new UI components or modify existing ones must adhere to the following accessibility guidelines:
|
||||
|
||||
- Use semantic HTML.
|
||||
- Use ARIA roles, labels and other accessibility attributes correctly. Accessibility attributes should only be used when semantic HTML doesn't satisfy your use case.
|
||||
- Use the [Grafana theme palette](/contribute/style-guides/themes.md) for styling. It contains colors with good contrast which aids accessibility.
|
||||
- Use [RTL](https://testing-library.com/docs/dom-testing-library/api-accessibility/) for writing unit tests. It helps to create accessible components.
|
||||
|
||||
Pull requests that introduce accessibility(a11y) errors:
|
||||
|
||||
We use [pa11y-ci](https://github.com/pa11y/pa11y-ci) to collect accessibility errors on [some URLs on the project](https://github.com/grafana/grafana/issues/36555), threshold errors are specified per URL.
|
||||
|
||||
If the contribution introduces new a11y errors, our continuous integration will fail, preventing you to merge on the main branch. In those cases there are two alternatives for moving forward:
|
||||
|
||||
- Check the error log on the pipeline step `test-a11y-frontend-pr`, identify what was the error, and fix it.
|
||||
- Locally run the command `yarn test:accessibility-report` that generates an HTML accessibility report, then go to the URL that contains your change, identify the error, and fix it. Keep in mind, a local Grafana instance needs to be running on `http://localhost:3000`.
|
||||
|
||||
You can also prevent introducing a11y errors by installing an a11y plugin in your browser, for example, axe DevTools, Accessibility Insights for Web among others.
|
||||
|
||||
### Backend-specific guidelines
|
||||
|
||||
Please refer to the [backend style guidelines](/contribute/style-guides/backend.md).
|
||||
@@ -113,8 +90,6 @@ For changes to panels, the area should be the name of the panel, suffixed with P
|
||||
- `GraphPanel: Fix legend sorting issues`
|
||||
- `Docs: Changed url to URL in all documentation files`
|
||||
|
||||
If you're unsure, please have a look at the existing [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) for inspiration/guidance.
|
||||
|
||||
### Pull request titles
|
||||
|
||||
The Grafana team _squashes_ all commits into one when we accept a pull request. The title of the pull request becomes the subject line of the squashed commit message. We still encourage contributors to write informative commit messages, as they becomes a part of the Git commit body.
|
||||
@@ -127,6 +102,6 @@ Make sure that the title for your pull request uses the same format as the subje
|
||||
|
||||
If your PR includes configuration changes, all of the following files must be changed correspondingly:
|
||||
|
||||
- conf/defaults.ini
|
||||
- conf/sample.ini
|
||||
- docs/sources/administration/configuration.md
|
||||
* conf/defaults.ini
|
||||
* conf/sample.ini
|
||||
* docs/sources/administration/configuration.md
|
||||
|
||||
@@ -10,14 +10,8 @@ Make sure you have the following dependencies installed before setting up your d
|
||||
|
||||
- [Git](https://git-scm.com/)
|
||||
- [Go](https://golang.org/dl/) (see [go.mod](../go.mod#L3) for minimum required version)
|
||||
|
||||
Additionally you'll need:
|
||||
|
||||
- [Node.js](https://nodejs.org) (see `volta.node` property in [package.json](../package.json) for the correct version).
|
||||
- [Yarn](https://yarnpkg.com) (see `volta.yarn` property in [package.json](../package.json) for the correct version).
|
||||
|
||||
We recommend using [Volta](https://github.com/volta-cli/volta) to manage your JS toolchain.
|
||||
Refer to the [Volta Getting Started Guide](https://docs.volta.sh/guide/getting-started) for setup instructions for your operating system.
|
||||
- [Node.js (Long Term Support)](https://nodejs.org)
|
||||
- [Yarn](https://yarnpkg.com)
|
||||
|
||||
### macOS
|
||||
|
||||
@@ -26,6 +20,9 @@ We recommend using [Homebrew](https://brew.sh/) for installing any missing depen
|
||||
```
|
||||
brew install git
|
||||
brew install go
|
||||
brew install node@14
|
||||
|
||||
npm install -g yarn
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
||||
@@ -1,118 +0,0 @@
|
||||
# Merge a pull request
|
||||
|
||||
When a pull request has been reviewed and approved by at least one person and all checks have passed it's time to merge the pull request.
|
||||
|
||||
## Who is expected to merge a pull request?
|
||||
|
||||
Maintainers are responsible for merging all pull requests. If a maintainer has opened a pull request the general rule is that the same maintainer merges the pull request. If a non-maintainer has opened a pull request it's suggested that one of the maintainers reviewing the pull request merges the pull request.
|
||||
|
||||
## Checklist/summary
|
||||
|
||||
The following checklist/summary should give you a quick overview of what to ask/consider before merging a pull request.
|
||||
|
||||
- Reviewed and approved?
|
||||
- All checks passed?
|
||||
- Proper pull request title?
|
||||
- Milestone assigned?
|
||||
- Add to changelog/release notes?
|
||||
- Needs backporting?
|
||||
|
||||
## Before merge
|
||||
|
||||
Before actually merging a pull request there's a couple of things to take into consideration.
|
||||
|
||||
### Format the pull request title
|
||||
|
||||
Make sure that the pull request title is properly formatted according to `<Area>: <Summary>` and try to make the summary short and understandable for the community as a whole.
|
||||
|
||||
All commits in a pull request are squashed when merged and the pull request title will be the default subject line of the squashed commit message. It's also used for [changelog/release notes](#include-in-changelog-and-release-notes).
|
||||
|
||||
See [formatting guidelines](create-pull-request.md#formatting-guidelines) for more information.
|
||||
|
||||
### Assign a milestone
|
||||
|
||||
It's recommended to add a milestone to every pull request. This makes it easier to track what changes did go into a certain release. Without this you're basically left with going through git commits which could be a lot harder.
|
||||
|
||||
There's also various tooling built that in some cases requires a pull request to be assigned a milestone, for example [generating changelog/release notes](#include-in-changelog-and-release-notes).
|
||||
|
||||
### Include in changelog and release notes?
|
||||
|
||||
At Grafana we generate the [changelog](https://github.com/grafana/grafana/blob/main/CHANGELOG.md) and [release notes](https://grafana.com/docs/grafana/latest/release-notes/) based on merged pull requests. Including changes in the changelog/release notes is very important to provide a somewhat complete picture of what changes a Grafana release actually includes.
|
||||
|
||||
Exactly what changes should be added to the changelog is hard to answer but some general guidance would be any change that you think would be interesting for the community as a whole. Use your best judgement and/or ask other maintainers for advice.
|
||||
|
||||
There's a GitHub action available in the repository named [Update changelog](https://github.com/grafana/grafana/blob/main/.github/workflows/update-changelog.yml) that can manually be triggered to re-generate the changelog and release notes for any release.
|
||||
|
||||
To include a pull request in the changelog/release notes the general rule of thumb is that a milestone should be assigned and labeled with `add to changelog`.
|
||||
|
||||
The changelog/release notes are divided into sections and here's a description of how you make a pull request show up in a certain section.
|
||||
|
||||
**Features and enhancements:**
|
||||
|
||||
Milestone assigned and labeled with `add to changelog` and any of the other section rules don't apply.
|
||||
|
||||
**Bug fixes:**
|
||||
|
||||
Milestone assigned and labeled with `add to changelog` and either labeled with `type/bug` or the pull request title contains `fix` or `fixes`.
|
||||
|
||||
**Plugin development fixes & changes:**
|
||||
|
||||
Milestone assigned and labeled with `area/grafana/toolkit`, `area/grafana/ui` or `area/grafana/runtime`.
|
||||
|
||||
**Deprecations:**
|
||||
|
||||
In case the pull request introduces a deprecation you should document this. Label the pull request with `add to changelog` and use the following template at the end of the pull request description describing the deprecation change.
|
||||
|
||||
```md
|
||||
# Deprecation notice
|
||||
|
||||
<Deprecation description>
|
||||
```
|
||||
|
||||
**Breaking changes:**
|
||||
|
||||
In case the pull request introduces a breaking change you should document this. Label the pull request with `add to changelog` and `breaking change` and use the following template at the end of the pull request description describing the breaking change.
|
||||
|
||||
```md
|
||||
# Release notice breaking change
|
||||
|
||||
<Breaking change description>
|
||||
```
|
||||
|
||||
### Should the pull request be backported?
|
||||
|
||||
If your pull request has changes that need to go into one or several existing release branches you need to backport the changes. Please refer to [Backport PR](.github/bot.md#backport-pr) for detailed instructions.
|
||||
|
||||
Some examples when backport is required:
|
||||
|
||||
- The change needs to be released in the next upcoming patch release, e.g. v8.1.3, so you have to backport it, e.g. into the v8.1.x release branch.
|
||||
- You have a change to be released in the next major/minor release, e.g. v8.0.0, and there's already a release branch, e.g. v8.0.x, you have to backport it, e.g. into the v8.0.x release branch.
|
||||
- The change includes documentation changes that needs to be updated for one or multiple older versions, then you have to backport it to each release branch.
|
||||
|
||||
Some examples when backport is not required:
|
||||
|
||||
- The change is supposed to be released in the next major/minor release, e.g. v8.0.0, but the release branch, e.g. v8.0.x, has not yet been created.
|
||||
|
||||
> **Note:** You can still backport a pull request after it's been merged.
|
||||
|
||||
## Doing the actual merge
|
||||
|
||||
Time to actually merge the pull request changes. All commits in a pull request are squashed, hence the GitHub `Squash and merge` button is used to initialize the merge.
|
||||
|
||||
This will present you with options allowing you to optionally change the commit message before merging. Please remember that developers might use the commit information when reviewing changes of files, doing git blame and resolving merge conflicts etc., trying to quickly figure out what the actual change was. But there's not really any best practices around this, the following is an attempt to bring some guidance.
|
||||
|
||||
Do:
|
||||
|
||||
- Make sure the pull request title is formatted properly before merging, this will automatically give you a good and short summary of the commit/change.
|
||||
- Leave `Co-authored-by:` lines as is so that co-authors will be accounted for the contribution.
|
||||
- Remove any commit information that doesn't bring any context to the change.
|
||||
|
||||
Consider:
|
||||
|
||||
- Add any references to issues that the pull request fixes/closes/references to ease giving quick context to things. Doing this allows cross-reference between the commit and referenced issue(s).
|
||||
|
||||
Finalize the merge by clicking on the `Confirm squash and merge` button.
|
||||
|
||||
## After the merge
|
||||
|
||||
Make sure to close any referenced/related issues. It's recommended to assign the same milestone on the issues that the pull request fixes/closes, but not required.
|
||||
@@ -4,13 +4,13 @@ This style guide applies to all documentation created for Grafana products.
|
||||
|
||||
For information about how to write technical documentation, refer to the following resources:
|
||||
|
||||
- [Google Technical Writing courses](https://developers.google.com/tech-writing)
|
||||
- [Divio documentation system](https://documentation.divio.com/)
|
||||
- [Vue writing principles](https://v3.vuejs.org/guide/contributing/writing-guide.html#principles)
|
||||
* [Google Technical Writing courses](https://developers.google.com/tech-writing)
|
||||
* [Divio documentation system](https://documentation.divio.com/)
|
||||
* [Vue writing principles](https://v3.vuejs.org/guide/contributing/writing-guide.html#principles)
|
||||
|
||||
## Contributing
|
||||
|
||||
The _Documentation style guide_ is a living document. Add to it whenever a style decision is made or a question is answered regarding style, grammar, or word choice.
|
||||
The *Documentation style guide* is a living document. Add to it whenever a style decision is made or a question is answered regarding style, grammar, or word choice.
|
||||
|
||||
## Published guides
|
||||
|
||||
@@ -46,14 +46,10 @@ Avoid _master_ or _slave_.
|
||||
|
||||
## Grafana-specific style
|
||||
|
||||
The following guidelines are specific to Grafana documentation. For the most part, these are _guidelines_ are not rigid rules. If you have questions, then please ask in the #docs channel of Grafana Slack.
|
||||
The following guidelines are specific to Grafana documentation. For the most part, these are *guidelines* are not rigid rules. If you have questions, then please ask in the #docs channel of Grafana Slack.
|
||||
|
||||
### General
|
||||
|
||||
Per the [Voice and tone](https://developers.google.com/style/tone) section of the Google developer documentation style guide:
|
||||
|
||||
> In your documents, aim for a voice and tone that's conversational, friendly, and respectful without being overly colloquial or frivolous; a voice that's casual and natural and approachable, not pedantic or pushy. Try to sound like a knowledgeable friend who understands what the developer wants to do.
|
||||
|
||||
- Use active voice:
|
||||
- Active: Grafana displays the heatmap visualization.
|
||||
- Passive: The heatmap visualization is displayed.
|
||||
@@ -108,7 +104,6 @@ However, sometimes we need to use headings as numbered steps. This is mostly in
|
||||
If that is the case, then use the following format for headings:
|
||||
|
||||
##### Step 1. Install the software
|
||||
|
||||
##### Step 2. Run the software
|
||||
|
||||
### Images
|
||||
@@ -154,7 +149,6 @@ In general, "integration" is not capitalized. Only capitalize it if it is capita
|
||||
The first letter of the name of an integration is always capitalized, even if the original named source is lowercase.
|
||||
|
||||
**Examples:**
|
||||
|
||||
- MySQL Integration
|
||||
- CockroachDB Integration
|
||||
- Etcd Integration
|
||||
@@ -218,20 +212,16 @@ Warnings tell the user not to do something. For example:
|
||||
- Do not assume everyone is using Linux. Make sure instructions include enough information for Windows and Mac users to successfully complete procedures.
|
||||
|
||||
- Do not add `$` before commands. Make it easy for users to copy and paste commands.
|
||||
|
||||
- **Right:** `sudo yum install grafana`
|
||||
- **Wrong:** `$ sudo yum install grafana`
|
||||
|
||||
- Include `sudo` before commands that require `sudo` to work.
|
||||
|
||||
For terminal examples and Grafana configuration, use a `bash` code block:
|
||||
|
||||
```bash
|
||||
sudo yum install grafana
|
||||
```
|
||||
|
||||
For HTTP request/response, use an `http` code block:
|
||||
|
||||
```http
|
||||
GET /api/dashboards/id/1/permissions HTTP/1.1
|
||||
Accept: application/json
|
||||
@@ -269,7 +259,6 @@ Two words if used as a verb, one word if used as a noun.
|
||||
Two words, not one.
|
||||
|
||||
**Exceptions:**
|
||||
|
||||
- "datasource" used as an identifier
|
||||
- "datasource" in a URL
|
||||
- Use "data source" instead of "datasource" unless used as an identifier, in code, or as part of a URL.
|
||||
@@ -278,8 +267,7 @@ Two words, not one.
|
||||
|
||||
#### display (verb)
|
||||
|
||||
_Display_ is a transitive verb, which means it always needs a direct object.
|
||||
|
||||
*Display* is a transitive verb, which means it always needs a direct object.
|
||||
- Correct, active voice: Grafana displays your list of active alarms.
|
||||
- Correct, but passive voice: Your list of active alarms is displayed.
|
||||
- Incorrect: The list of active alarms displays.
|
||||
@@ -339,7 +327,6 @@ Two words, not one.
|
||||
**Incorrect:** webserver
|
||||
|
||||
### MS SQL Server
|
||||
|
||||
Always use "MS SQL" when referring to MS SQL Server application.
|
||||
|
||||
Incorrect UI spellings will be corrected in a later version of Grafana.
|
||||
|
||||
@@ -23,13 +23,20 @@ Inspired by https://martinfowler.com/bliki/PageObject.html
|
||||
Let's start with a simple [JSX](https://reactjs.org/docs/introducing-jsx.html) example containing a single input field that we want to populate during our E2E test:
|
||||
|
||||
```jsx
|
||||
<input className="gf-form-input login-form-input" type="text" />
|
||||
<input
|
||||
className="gf-form-input login-form-input"
|
||||
type="text"
|
||||
/>
|
||||
```
|
||||
|
||||
We _could_ target the field with a CSS selector like `.gf-form-input.login-form-input` but that would be brittle as style changes occur frequently. Furthermore there is nothing that signals to future developers that this input is part of an E2E test. At Grafana, we use `aria-label` attributes as our preferred way of defining selectors instead of [`data-*`](https://mdn.io/docs/Web/HTML/Global_attributes/data-*) as they also aid in [accessibility](https://mdn.io/docs/Learn/Accessibility/What_is_accessibility):
|
||||
|
||||
```jsx
|
||||
<input aria-label="Username input field" className="gf-form-input login-form-input" type="text" />
|
||||
<input
|
||||
aria-label="Username input field"
|
||||
className="gf-form-input login-form-input"
|
||||
type="text"
|
||||
/>
|
||||
```
|
||||
|
||||
The next step is to create a `Page` representation in our E2E framework to glue the test with the real implementation using the `pageFactory` function. For that function we can supply a `url` and `selectors` like in the example below:
|
||||
@@ -38,6 +45,7 @@ The next step is to create a `Page` representation in our E2E framework to glue
|
||||
export const Login = {
|
||||
// Called via `Login.visit()`
|
||||
url: '/login',
|
||||
|
||||
// Called via `Login.username()`
|
||||
username: 'Username input field',
|
||||
};
|
||||
@@ -59,7 +67,11 @@ Now that we have a `Page` called `Login` in our `Pages` const we can use that to
|
||||
```jsx
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
<input aria-label={selectors.pages.Login.username} className="gf-form-input login-form-input" type="text" />;
|
||||
<input
|
||||
aria-label={selectors.pages.Login.username}
|
||||
className="gf-form-input login-form-input"
|
||||
type="text"
|
||||
/>
|
||||
```
|
||||
|
||||
The last step in our example is to use our `Login` page as part of a test.
|
||||
@@ -74,7 +86,9 @@ describe('Login test', () => {
|
||||
e2e.pages.Login.visit();
|
||||
// To prevent flaky tests, always do a `.should` on any selector that you expect to be in the DOM.
|
||||
// Read more here: https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions
|
||||
e2e.pages.Login.username().should('be.visible').type('admin');
|
||||
e2e.pages.Login.username()
|
||||
.should('be.visible')
|
||||
.type('admin');
|
||||
});
|
||||
});
|
||||
```
|
||||
@@ -140,52 +154,9 @@ describe('List test', () => {
|
||||
e2e.pages.DataSources.visit();
|
||||
// To prevent flaky tests, always do a .should on any selector that you expect to be in the DOM.
|
||||
// Read more here: https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions
|
||||
e2e.pages.DataSources.dataSources('B').should('be.visible').click();
|
||||
e2e.pages.DataSources.dataSources('B')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Aria-Labels vs data-testid
|
||||
|
||||
Our selectors are set up to work with both aria-labels and data-testid attributes. Aria-labels help assistive technologies such as screenreaders identify interactive elements of a page for our users.
|
||||
|
||||
A good example of a time to use an aria-label might be if you have a button with an X to close:
|
||||
|
||||
```
|
||||
<button aria-label="close">X<button>
|
||||
```
|
||||
|
||||
It might be clear visually that the X closes the modal, but audibly it would not be clear for example.
|
||||
|
||||
```
|
||||
<button aria-label="close">Close<button>
|
||||
```
|
||||
|
||||
The example might read aloud to a user as "Close, Close" or something similar.
|
||||
|
||||
However adding aria-labels to elements that are already clearly labeled or not interactive can be confusing and redundant for users with assistive technologies.
|
||||
|
||||
In such cases rather than adding unnecessary aria-labels to components so as to make them selectable for testing, it is preferable to use a data attribute that would not be read aloud with an assistive technology for example:
|
||||
|
||||
```
|
||||
<button data-testid="modal-close-button">Close<button>
|
||||
```
|
||||
|
||||
We have added support for this in our selectors, to use:
|
||||
|
||||
Prefix your selector string with "data-testid":
|
||||
|
||||
```typescript
|
||||
export const Components = {
|
||||
Login: {
|
||||
openButton: 'open-button', // this would look for an aria-label
|
||||
closeButton: 'data-testid modal-close-button', // this would look for a data-testid
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
and in your component, import the selectors and add the data test id:
|
||||
|
||||
```
|
||||
<button data-testid={Selectors.Components.Login.closeButton}>
|
||||
```
|
||||
|
||||
@@ -5,7 +5,6 @@ Generally we follow the Airbnb [React Style Guide](https://github.com/airbnb/jav
|
||||
## Table of Contents
|
||||
|
||||
- [Frontend Style Guide](#frontend-style-guide)
|
||||
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Basic rules](#basic-rules)
|
||||
- [Naming conventions](#naming-conventions)
|
||||
@@ -29,12 +28,12 @@ Generally we follow the Airbnb [React Style Guide](https://github.com/airbnb/jav
|
||||
- [Linting](#linting)
|
||||
- [React](#react)
|
||||
- [Props](#props)
|
||||
- [Name callback props and handlers with an "on" prefix.](#name-callback-props-and-handlers-with-an-on-prefix)
|
||||
- [React Component definitions](#react-component-definitions)
|
||||
- [React Component constructor](#react-component-constructor)
|
||||
- [React Component defaultProps](#react-component-defaultprops)
|
||||
- [Name callback props and handlers with an "on" prefix.](#name-callback-props-and-handlers-with-an-on-prefix)
|
||||
- [React Component definitions](#react-component-definitions)
|
||||
- [React Component constructor](#react-component-constructor)
|
||||
- [React Component defaultProps](#react-component-defaultprops)
|
||||
- [State management](#state-management)
|
||||
|
||||
|
||||
- [Proposal for removing or replacing Angular dependencies](https://github.com/grafana/grafana/pull/23048)
|
||||
|
||||
## Basic rules
|
||||
@@ -195,12 +194,12 @@ _SASS styles are deprecated. Please migrate to Emotion whenever you need to modi
|
||||
|
||||
### Typing
|
||||
|
||||
In general, you should let Typescript infer the types so that there's no need to explicitly define type for each variable.
|
||||
In general, you should let Typescript infer the types so that there's no need to explicitly define type for each variable.
|
||||
|
||||
There are some exceptions to this:
|
||||
|
||||
```typescript
|
||||
// Typescript needs to know type of arrays or objects otherwise it would infer it as array of any
|
||||
// Typescript needs to know type of arrays or objects otherwise it would infer it as array of any
|
||||
|
||||
// bad
|
||||
const stringArray = [];
|
||||
@@ -209,7 +208,7 @@ const stringArray = [];
|
||||
const stringArray: string[] = [];
|
||||
```
|
||||
|
||||
Specify function return types explicitly in new code. This improves readability by being able to tell what a function returns just by looking at the signature. It also prevents errors when a function's return type is broader than expected by the author.
|
||||
Specify function return types explicitly in new code. This improves readability by being able to tell what a function returns just by looking at the signature. It also prevents errors when a function's return type is broader than expected by the author.
|
||||
|
||||
> **Note:** We don't have linting for this enabled because of lots of old code that needs to be fixed first.
|
||||
|
||||
@@ -217,18 +216,18 @@ Specify function return types explicitly in new code. This improves readability
|
||||
// bad
|
||||
function transform(value?: string) {
|
||||
if (!value) {
|
||||
return undefined;
|
||||
return undefined
|
||||
}
|
||||
return applyTransform(value);
|
||||
}
|
||||
return applyTransform(value)
|
||||
};
|
||||
|
||||
// good
|
||||
function transform(value?: string): TransformedValue | undefined {
|
||||
if (!value) {
|
||||
return undefined;
|
||||
return undefined
|
||||
}
|
||||
return applyTransform(value);
|
||||
}
|
||||
return applyTransform(value)
|
||||
};
|
||||
```
|
||||
|
||||
### File and directory naming conventions
|
||||
@@ -245,8 +244,6 @@ For files exporting multiple utility functions, use the name that describes the
|
||||
- Use `reducers.ts` Redux reducers.
|
||||
- Use `*.test.ts(x)` for test files.
|
||||
|
||||
- Use kebab case for directory names: lowercase, words delimited by hyphen ( `-` ). For example, `features/new-important-feature/utils.ts`.
|
||||
|
||||
### Code organization
|
||||
|
||||
Organize your code in a directory that encloses feature code:
|
||||
|
||||
@@ -4,8 +4,11 @@
|
||||
|
||||
**Themes are implemented in Typescript.** That's because our goal is to share variables between Grafana TypeScript and [Sass](https://sass-lang.com/) code. Theme definitions are located in the following files:
|
||||
|
||||
- [packages/grafana-data/src/themes/createTheme.ts](../../packages/grafana-data/src/themes/createTheme.ts)
|
||||
- [packages/grafana-data/src/themes/createColors.ts](../../packages/grafana-data/src/themes/createColors.ts)
|
||||
- [packages/grafana-ui/src/themes/dark.ts](../../packages/grafana-ui/src/themes/dark.ts)
|
||||
- [packages/grafana-ui/src/themes/default.ts](../../packages/grafana-ui/src/themes/default.ts)
|
||||
- [packages/grafana-ui/src/themes/light.ts](../../packages/grafana-ui/src/themes/light.ts)
|
||||
|
||||
The `default.ts` file holds common variables like typography and spacing definitions, while `[light|dark].ts` primarily specify colors used in themes.
|
||||
|
||||
## Usage
|
||||
|
||||
@@ -15,22 +18,23 @@ This section provides usage guidelines.
|
||||
|
||||
Here's how to use Grafana themes in React components.
|
||||
|
||||
#### useStyles2 hook
|
||||
#### useStyles hook
|
||||
|
||||
`useStyles2` memoizes the function and provides access to the theme.
|
||||
`useStyles` memoizes the function and provides access to the theme.
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { useStyles2 } from '@grafana/ui';
|
||||
import { GrafanaTheme } from '@grafana/data';
|
||||
import { useStyles } from '@grafana/ui';
|
||||
import { css } from '@emotion/css';
|
||||
|
||||
const getComponentStyles = (theme: GrafanaTheme2) => css`
|
||||
const getComponentStyles = (theme: GrafanaTheme) => css`
|
||||
padding: ${theme.spacing.md};
|
||||
`;
|
||||
|
||||
const Foo: FC<FooProps> = () => {
|
||||
const styles = useStyles2(getComponentsStyles);
|
||||
const styles = useStyles(getComponentsStyles);
|
||||
|
||||
// Use styles with className
|
||||
};
|
||||
```
|
||||
@@ -39,89 +43,15 @@ const Foo: FC<FooProps> = () => {
|
||||
|
||||
```tsx
|
||||
import React, { FC } from 'react';
|
||||
import { useTheme2 } from '@grafana/ui';
|
||||
import { useTheme } from '@grafana/ui';
|
||||
|
||||
const Foo: FC<FooProps> = () => {
|
||||
const theme = useTheme2();
|
||||
const theme = useTheme();
|
||||
|
||||
// Your component has access to the theme variables now
|
||||
};
|
||||
```
|
||||
|
||||
## Picking the right variable
|
||||
|
||||
### The rich color object and the state colors
|
||||
|
||||
The theme.colors object has 6 rich color objects for `primary`, `secondary`, `info`, `success`, `warning` and `error`. These all
|
||||
have the same sub colors that have different use cases.
|
||||
|
||||
| Property | When to use |
|
||||
| ------------ | ---------------------------------------------------------- |
|
||||
| main | For backgrounds |
|
||||
| shade | For hover highlight |
|
||||
| text | For text color |
|
||||
| border | For borders, currently always the same as text color |
|
||||
| contrastText | Text color to use for text placed on top of the main color |
|
||||
|
||||
Example use cases:
|
||||
|
||||
- Want a `red` background? Use `theme.colors.error.main`
|
||||
- Want `green` text? Use `theme.colors.success.text`
|
||||
- Want text to be visible when placed inside a background that uses `theme.colors.error.main` then use `theme.colors.error.contrastText`.
|
||||
|
||||
### Text colors
|
||||
|
||||
| Property | When to use |
|
||||
| ----------------------------- | ------------------------------------------------------------------------------ |
|
||||
| theme.colors.text.primary | The default text color |
|
||||
| theme.colors.text.secondary | Text color for things that should be a bit less prominent |
|
||||
| theme.colors.text.disabled | Text color for disabled / faint things |
|
||||
| theme.colors.text.link | Text link color |
|
||||
| theme.colors.text.maxContrast | Maximum contrast (absolute white in dark theme, absolute black in white theme) |
|
||||
|
||||
### Background colors
|
||||
|
||||
| Property | When to use |
|
||||
| --------------------------------- | ------------------------------------------------------------------------------------------------- |
|
||||
| theme.colors.background.canvas | Think dashboard background. A background surface for panels and panes that use primary background |
|
||||
| theme.colors.background.primary | The default content background for content panes and panels |
|
||||
| theme.colors.background.secondary | For cards and other surfaces that need to stand out when placed on top of the primary background |
|
||||
|
||||
### Borders
|
||||
|
||||
| Property | When to use |
|
||||
| -------------------------- | ------------------------------------------------------------ |
|
||||
| theme.colors.border.weak | Primary border for panels and panes and other subtle borders |
|
||||
| theme.colors.border.medium | For stronger borders like inputs |
|
||||
| theme.colors.border.strong | For even stronger border like hover highighted border |
|
||||
|
||||
### Actions
|
||||
|
||||
| Property | When to use |
|
||||
| ---------------------------- | ----------------------------------------------------- |
|
||||
| theme.colors.action.hover | Background color for hover on card, menu or list item |
|
||||
| theme.colors.action.focus | Background color for focused card, menu or list item |
|
||||
| theme.colors.action.selected | Background color for selected card, menu or list item |
|
||||
|
||||
### Paddings and margins
|
||||
|
||||
| Example | Result |
|
||||
| --------------------------- | ----------------- |
|
||||
| theme.spacing(1) | 8px |
|
||||
| theme.spacing(1, 2) | 8px 16px |
|
||||
| theme.spacing(1, 2, 0.5, 4) | 8px 16px 4px 32px |
|
||||
|
||||
### Border radius
|
||||
|
||||
| Example | Result |
|
||||
| --------------------------- | ------ |
|
||||
| theme.shape.borderRadius(1) | 2px |
|
||||
| theme.shape.borderRadius(2) | 4px |
|
||||
|
||||
### Typography
|
||||
|
||||
For font family, font sizes and line heights use the variables under `theme.typography`.
|
||||
|
||||
#### Using `ThemeContext` directly
|
||||
|
||||
```tsx
|
||||
@@ -137,25 +67,39 @@ With this method your component will be automatically wrapped in `ThemeContext.C
|
||||
```ts
|
||||
import { ThemeContext, Themeable } from '@grafana/ui';
|
||||
|
||||
interface FooProps extends Themeable2 {}
|
||||
interface FooProps extends Themeable {}
|
||||
|
||||
const Foo: React.FunctionComponent<FooProps> = () => ...
|
||||
|
||||
export default withTheme2(Foo);
|
||||
export default withTheme(Foo);
|
||||
```
|
||||
|
||||
### Using theme in tests
|
||||
### Test components that use `ThemeContext`
|
||||
|
||||
If you need to pass a theme object to a function under test just import `createTheme` and call it without
|
||||
any arguments.
|
||||
When implementing snapshot tests for components that use the `withTheme` HOC, the snapshot will contain the entire theme object. Any change to the theme renders the snapshot outdated.
|
||||
|
||||
To make your snapshot theme independent, use the `mockThemeContext` helper function:
|
||||
|
||||
```tsx
|
||||
import { createTheme } from '@grafana/data';
|
||||
import { mockThemeContext } from '@grafana/ui';
|
||||
import { MyComponent } from './MyComponent';
|
||||
|
||||
describe('MyComponent', () => {
|
||||
it('should work', () => {
|
||||
result = functionThatNeedsTheme(createTheme());
|
||||
expect(result).toBe(true);
|
||||
let restoreThemeContext;
|
||||
|
||||
beforeAll(() => {
|
||||
// Create ThemeContext mock before any snapshot test is executed
|
||||
restoreThemeContext = mockThemeContext({ type: GrafanaThemeType.Dark });
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
// Make sure the theme is restored after snapshot tests are performed
|
||||
restoreThemeContext();
|
||||
});
|
||||
|
||||
it('renders correctly', () => {
|
||||
const wrapper = mount(<MyComponent />);
|
||||
expect(wrapper).toMatchSnapshot();
|
||||
});
|
||||
});
|
||||
```
|
||||
@@ -172,5 +116,36 @@ This section provides insight into frequently-asked questions.
|
||||
|
||||
`[_variables|_variables.dark|_variables.light].generated.scss` files are the ones that are referenced in the main Sass files for Sass variables to be available. **These files are automatically generated and should never be modified by hand!**
|
||||
|
||||
If you need to modify the sass variable files be sure to update the files that end with `.tmpl.ts` and
|
||||
not the `.generated.scss` files.
|
||||
#### If you need to modify a _Sass variable value_ you need to modify the corresponding Typescript file that is the source of the variables:
|
||||
|
||||
- `_variables.generated.scss` - modify `grafana-ui/src/themes/default.ts`
|
||||
- `_variables.light.generated.scss` - modify `grafana-ui/src/themes/light.ts`
|
||||
- `_variables.dark.generated.scss` - modify `grafana-ui/src/themes/dark.ts`
|
||||
|
||||
#### If you need to _add new variable_ to Sass variables you need to modify corresponding template file:
|
||||
|
||||
- `_variables.generated.scss` - modify `grafana-ui/src/themes/_variables.scss.tmpl.ts`
|
||||
- `_variables.light.generated.scss` - modify `grafana-ui/src/themes/_variables.light.scss.tmpl.ts`
|
||||
- `_variables.dark.generated.scss` - modify `grafana-ui/src/themes/_variables.dark.scss.tmpl.ts`
|
||||
|
||||
## Limitations
|
||||
|
||||
This section describes limitations with Grafana's theming system.
|
||||
|
||||
### You must ensure `ThemeContext` provider is available in a React tree
|
||||
|
||||
By default all react2angular directives have `ThemeContext.Provider` ensured. But, there are cases where we create another React tree via `ReactDOM.render`. This happens in the case of graph legend rendering and the `ReactContainer` directive. In such cases theme consumption will fail. To make sure theme context is available in such cases, you need to wrap your rendered component with ThemeContext.Provider using the `provideTheme` function:
|
||||
|
||||
```ts
|
||||
// graph.ts
|
||||
import { provideTheme } from 'app/core/utils/ConfigProvider';
|
||||
|
||||
// Create component with ThemeContext.Provider first.
|
||||
// Otherwise React will create new components every time it renders!
|
||||
const LegendWithThemeProvider = provideTheme(Legend);
|
||||
|
||||
const legendReactElem = React.createElement(LegendWithThemeProvider, legendProps);
|
||||
ReactDOM.render(legendReactElem, this.legendElem, () => this.renderPanel());
|
||||
```
|
||||
|
||||
`provideTheme` makes current theme available via ThemeContext by checking if user has `lightTheme` set in her boot data.
|
||||
|
||||
214
cue/data/gen.cue
Normal file
214
cue/data/gen.cue
Normal file
@@ -0,0 +1,214 @@
|
||||
package grafanaschema
|
||||
|
||||
import "github.com/grafana/grafana/cue/scuemata"
|
||||
|
||||
Family: scuemata.#Family & {
|
||||
lineages: [
|
||||
[
|
||||
{ // 0.0
|
||||
// Unique numeric identifier for the dashboard.
|
||||
// TODO must isolate or remove identifiers local to a Grafana instance...?
|
||||
id?: number
|
||||
// Unique dashboard identifier that can be generated by anyone. string (8-40)
|
||||
uid?: string
|
||||
// Title of dashboard.
|
||||
title?: string
|
||||
// Description of dashboard.
|
||||
description?: string
|
||||
|
||||
gnetId?: string
|
||||
// Tags associated with dashboard.
|
||||
tags?: [...string]
|
||||
// Theme of dashboard.
|
||||
style: *"light" | "dark"
|
||||
// Timezone of dashboard,
|
||||
timezone?: *"browser" | "utc"
|
||||
// Whether a dashboard is editable or not.
|
||||
editable: bool | *true
|
||||
// 0 for no shared crosshair or tooltip (default).
|
||||
// 1 for shared crosshair.
|
||||
// 2 for shared crosshair AND shared tooltip.
|
||||
graphTooltip: >=0 & <=2 | *0
|
||||
// Time range for dashboard, e.g. last 6 hours, last 7 days, etc
|
||||
time?: {
|
||||
from: string | *"now-6h"
|
||||
to: string | *"now"
|
||||
}
|
||||
// Timepicker metadata.
|
||||
timepicker?: {
|
||||
// Whether timepicker is collapsed or not.
|
||||
collapse: bool | *false
|
||||
// Whether timepicker is enabled or not.
|
||||
enable: bool | *true
|
||||
// Whether timepicker is visible or not.
|
||||
hidden: bool | *false
|
||||
// Selectable intervals for auto-refresh.
|
||||
refresh_intervals: [...string] | *["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
}
|
||||
// Templating.
|
||||
templating?: list: [...{...}]
|
||||
// Annotations.
|
||||
annotations?: list: [...{
|
||||
builtIn: number | *0
|
||||
// Datasource to use for annotation.
|
||||
datasource: string
|
||||
// Whether annotation is enabled.
|
||||
enable?: bool | *true
|
||||
// Whether to hide annotation.
|
||||
hide?: bool | *false
|
||||
// Annotation icon color.
|
||||
iconColor?: string
|
||||
// Name of annotation.
|
||||
name?: string
|
||||
type: string | *"dashboard"
|
||||
// Query for annotation data.
|
||||
rawQuery?: string
|
||||
showIn: number | *0
|
||||
}]
|
||||
// Auto-refresh interval.
|
||||
refresh?: string
|
||||
// Version of the JSON schema, incremented each time a Grafana update brings
|
||||
// changes to said schema.
|
||||
schemaVersion: number | *25
|
||||
// Version of the dashboard, incremented each time the dashboard is updated.
|
||||
version?: number
|
||||
panels?: [...#Panel]
|
||||
|
||||
// Dashboard panels. Panels are canonically defined inline
|
||||
// because they share a version timeline with the dashboard
|
||||
// schema; they do not vary independently. We create a separate,
|
||||
// synthetic Family to represent them in Go, for ease of generating
|
||||
// e.g. JSON Schema.
|
||||
#Panel: {
|
||||
...
|
||||
// The panel plugin type id.
|
||||
type: !=""
|
||||
|
||||
// Internal - the exact major and minor versions of the panel plugin
|
||||
// schema. Hidden and therefore not a part of the data model, but
|
||||
// expected to be filled with panel plugin schema versions so that it's
|
||||
// possible to figure out which schema version matched on a successful
|
||||
// unification.
|
||||
// _pv: { maj: int, min: int }
|
||||
// The major and minor versions of the panel plugin for this schema.
|
||||
// TODO 2-tuple list instead of struct?
|
||||
panelSchema?: { maj: number, min: number }
|
||||
|
||||
// Panel title.
|
||||
title?: string
|
||||
// Description.
|
||||
description?: string
|
||||
// Whether to display the panel without a background.
|
||||
transparent: bool | *false
|
||||
// Name of default datasource.
|
||||
datasource?: string
|
||||
// Grid position.
|
||||
gridPos?: {
|
||||
// Panel
|
||||
h: number & >0 | *9
|
||||
// Panel
|
||||
w: number & >0 & <=24 | *12
|
||||
// Panel x
|
||||
x: number & >=0 & <24 | *0
|
||||
// Panel y
|
||||
y: number & >=0 | *0
|
||||
// true if fixed
|
||||
static?: bool
|
||||
}
|
||||
// Panel links.
|
||||
// links?: [..._panelLink]
|
||||
// Name of template variable to repeat for.
|
||||
repeat?: string
|
||||
// Direction to repeat in if 'repeat' is set.
|
||||
// "h" for horizontal, "v" for vertical.
|
||||
repeatDirection: *"h" | "v"
|
||||
// Schema for panel targets is specified by datasource
|
||||
// plugins. We use a placeholder definition, which the Go
|
||||
// schema loader either left open/as-is with the Base
|
||||
// variant of the Dashboard and Panel families, or filled
|
||||
// with types derived from plugins in the Instance variant.
|
||||
// When working directly from CUE, importers can extend this
|
||||
// type directly to achieve the same effect.
|
||||
targets?: [...{...}]
|
||||
|
||||
// The values depend on panel type
|
||||
options: {...}
|
||||
fieldConfig: {
|
||||
defaults: {
|
||||
...
|
||||
// The display value for this field. This supports template variables blank is auto
|
||||
displayName?: string
|
||||
|
||||
// This can be used by data sources that return and explicit naming structure for values and labels
|
||||
// When this property is configured, this value is used rather than the default naming strategy.
|
||||
displayNameFromDS?: string
|
||||
|
||||
// Human readable field metadata
|
||||
description?: string
|
||||
|
||||
// An explict path to the field in the datasource. When the frame meta includes a path,
|
||||
// This will default to `${frame.meta.path}/${field.name}
|
||||
//
|
||||
// When defined, this value can be used as an identifier within the datasource scope, and
|
||||
// may be used to update the results
|
||||
path?: string
|
||||
|
||||
// True if data source can write a value to the path. Auth/authz are supported separately
|
||||
writeable?: bool
|
||||
|
||||
// True if data source field supports ad-hoc filters
|
||||
filterable?: bool
|
||||
|
||||
// Numeric Options
|
||||
unit?: string
|
||||
|
||||
// Significant digits (for display)
|
||||
decimals?: number
|
||||
|
||||
min?: number
|
||||
max?: number
|
||||
|
||||
// // Convert input values into a display string
|
||||
// mappings?: ValueMapping[];
|
||||
|
||||
// // Map numeric values to states
|
||||
// thresholds?: ThresholdsConfig;
|
||||
|
||||
// // Map values to a display color
|
||||
// color?: FieldColor;
|
||||
|
||||
// // Used when reducing field values
|
||||
// nullValueMode?: NullValueMode;
|
||||
|
||||
// // The behavior when clicking on a result
|
||||
links?: [...]
|
||||
|
||||
// Alternative to empty string
|
||||
noValue?: string
|
||||
|
||||
// Can always exist. Valid fields within this are
|
||||
// defined by the panel plugin - that's the
|
||||
// PanelFieldConfig that comes from the plugin.
|
||||
custom?: {...}
|
||||
}
|
||||
overrides: [...{
|
||||
matcher: {
|
||||
id: string | *""
|
||||
options?: _
|
||||
}
|
||||
properties: [...{
|
||||
id: string | *""
|
||||
value?: _
|
||||
}]
|
||||
}]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
|
||||
#Latest: {
|
||||
#Dashboard: Family.latest
|
||||
#Panel: Family.latest._Panel
|
||||
}
|
||||
@@ -8,10 +8,10 @@ package scuemata
|
||||
// the larger Dashboard schema.
|
||||
#PanelSchema: {
|
||||
// Defines plugin specific options for a panel
|
||||
PanelOptions: {...} @cuetsy(kind="interface")
|
||||
PanelOptions: {...}
|
||||
|
||||
// Define the custom properties that exist within standard field config
|
||||
PanelFieldConfig?: {...} @cuetsy(kind="interface")
|
||||
PanelFieldConfig?: {...}
|
||||
|
||||
// Panels may define their own types
|
||||
...
|
||||
|
||||
@@ -14,7 +14,6 @@ package scuemata
|
||||
// its position in the list of lineages - e.g., 0.0 corresponds to the first
|
||||
// schema in the first lineage.
|
||||
#Family: {
|
||||
compose?: {...}
|
||||
lineages: [#Lineage, ...#Lineage]
|
||||
migrations: [...#Migration]
|
||||
let lseq = lineages[len(lineages)-1]
|
||||
|
||||
93
cue/ui/gen.cue
Normal file
93
cue/ui/gen.cue
Normal file
@@ -0,0 +1,93 @@
|
||||
package grafanaschema
|
||||
|
||||
TableCellDisplayMode: {
|
||||
Auto: "auto",
|
||||
ColorText: "color-text",
|
||||
ColorBackground: "color-background",
|
||||
GradientGauge: "gradient-gauge",
|
||||
LcdGauge: "lcd-gauge",
|
||||
JSONView: "json-view",
|
||||
BasicGauge: "basic",
|
||||
Image: "image",
|
||||
} @cuetsy(targetType="enum")
|
||||
|
||||
TableFieldOptions: {
|
||||
width?: number
|
||||
align: FieldTextAlignment | *"auto"
|
||||
displayMode: TableCellDisplayMode | *"auto"
|
||||
hidden?: bool // ?? default is missing or false ??
|
||||
} @cuetsy(targetType="interface")
|
||||
|
||||
TableSortByFieldState: {
|
||||
displayName: string
|
||||
desc?: bool
|
||||
} @cuetsy(targetType="interface")
|
||||
|
||||
TooltipDisplayMode: "single" | "multi" | "none" @cuetsy(targetType="enum")
|
||||
FieldTextAlignment: "auto" | "left" | "right" | "center" @cuetsy(targetType="type")
|
||||
AxisPlacement: "auto" | "top" | "right" | "bottom" | "left" | "hidden" @cuetsy(targetType="enum")
|
||||
PointVisibility: "auto" | "never" | "always" @cuetsy(targetType="enum")
|
||||
DrawStyle: "line" | "bars" | "points" @cuetsy(targetType="enum")
|
||||
LineInterpolation: "linear" | "smooth" | "stepBefore" | "stepAfter" @cuetsy(targetType="enum")
|
||||
ScaleDistribution: "linear" | "log" @cuetsy(targetType="enum")
|
||||
GraphGradientMode: "none" | "opacity" | "hue" | "scheme" @cuetsy(targetType="enum")
|
||||
LineStyle: {
|
||||
fill?: "solid" | "dash" | "dot" | "square"
|
||||
dash?: [number]
|
||||
} @cuetsy(targetType="interface")
|
||||
LineConfig: {
|
||||
lineColor?: string
|
||||
lineWidth?: number
|
||||
lineInterpolation?: LineInterpolation
|
||||
lineStyle?: LineStyle
|
||||
spanNulls?: bool
|
||||
} @cuetsy(targetType="interface")
|
||||
FillConfig: {
|
||||
fillColor?: string
|
||||
fillOpacity?: number
|
||||
fillBelowTo?: string
|
||||
} @cuetsy(targetType="interface")
|
||||
PointsConfig: {
|
||||
showPoints?: PointVisibility
|
||||
pointSize?: number
|
||||
pointColor?: string
|
||||
pointSymbol?: string
|
||||
} @cuetsy(targetType="interface")
|
||||
ScaleDistributionConfig: {
|
||||
type: ScaleDistribution
|
||||
log?: number
|
||||
} @cuetsy(targetType="interface")
|
||||
AxisConfig: {
|
||||
axisPlacement?: AxisPlacement
|
||||
axisLabel?: string
|
||||
axisWidth?: number
|
||||
axisSoftMin?: number
|
||||
axisSoftMax?: number
|
||||
scaleDistribution?: ScaleDistributionConfig
|
||||
} @cuetsy(targetType="interface")
|
||||
HideSeriesConfig: {
|
||||
tooltip: bool
|
||||
legend: bool
|
||||
graph: bool
|
||||
} @cuetsy(targetType="interface")
|
||||
LegendPlacement: "bottom" | "right" @cuetsy(targetType="type")
|
||||
LegendDisplayMode: "list" | "table" | "hidden" @cuetsy(targetType="enum")
|
||||
TableFieldOptions: {
|
||||
width?: number
|
||||
align: FieldTextAlignment | *"auto"
|
||||
displayMode: TableCellDisplayMode | *"auto"
|
||||
hidden?: bool
|
||||
} @cuetsy(targetType="interface")
|
||||
GraphFieldConfig: LineConfig & FillConfig & PointsConfig & AxisConfig & {
|
||||
drawStyle?: DrawStyle
|
||||
gradientMode?: GraphGradientMode
|
||||
hideFrom?: HideSeriesConfig
|
||||
} @cuetsy(targetType="interface")
|
||||
VizLegendOptions: {
|
||||
displayMode: LegendDisplayMode
|
||||
placement: LegendPlacement
|
||||
calcs: [string]
|
||||
} @cuetsy(targetType="interface")
|
||||
VizTooltipOptions: {
|
||||
mode: TooltipDisplayMode
|
||||
} @cuetsy(targetType="interface")
|
||||
@@ -55,15 +55,15 @@ Jaeger block runs both Jaeger and Loki container. Loki container sends traces to
|
||||
| 1.0 | graphite1 | 8280 | 2203 | 2203 |
|
||||
| 0.9 | graphite09 | 8380 | 2303 | 2303 |
|
||||
|
||||
## Debugging setup in VS Code
|
||||
An example of launch.json is provided in `devenv/vscode/launch.json`. It basically does what Makefile and .bra.toml do. The 'program' field is set to the folder name so VS Code loads all *.go files in it instead of just main.go.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Containers that read from log files fail to start (Mac OS)
|
||||
|
||||
If you are running Mac OSX, containers that read from the log files (e.g. Telegraf, Fileabeat, Promtail) can fail to start. This is because the default Docker for Mac does not have permission to create `grafana` folder at the `/var/log` location, as it runs as the current user. To solve this issue, manually create the folder `/var/log/grafana`, then start the containers again.
|
||||
### Containers fail to start (Mac OS)
|
||||
|
||||
```
|
||||
sudo mkdir /var/log/grafana
|
||||
ERROR: for <service_name> Cannot start service <service_name>: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"rootfs_linux.go:58: mounting ... merged/var/log/grafana: operation not permitted\\\"\"": unknown
|
||||
ERROR: Encountered errors while bringing up the project.
|
||||
```
|
||||
|
||||
If running Mac OSX the above error might be encountered when starting certain Docker containers that mount `/var/log/`. When first run this causes Docker to try to create the folder `/var/log/grafana` however by default Docker for Mac does not have permission to create folders at this location as it runs as the current user.
|
||||
|
||||
To solve this issue manually create the folder `/var/log/grafana` and give your user write permissions then try starting the containers again.
|
||||
|
||||
@@ -84,14 +84,6 @@ datasources:
|
||||
tsdbResolution: 1
|
||||
tsdbVersion: 1
|
||||
|
||||
- name: gdev-opentsdb-v2.3
|
||||
type: opentsdb
|
||||
access: proxy
|
||||
url: http://localhost:4242
|
||||
jsonData:
|
||||
tsdbResolution: 1
|
||||
tsdbVersion: 3
|
||||
|
||||
- name: gdev-elasticsearch-v2-metrics
|
||||
type: elasticsearch
|
||||
access: proxy
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,235 +0,0 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"graphTooltip": 0,
|
||||
"id": 3151,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-opentsdb-v2.3",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"links": []
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"aggregator": "sum",
|
||||
"alias": "$tag_hostname",
|
||||
"currentFilterGroupBy": false,
|
||||
"currentFilterKey": "",
|
||||
"currentFilterType": "literal_or",
|
||||
"currentFilterValue": "",
|
||||
"disableDownsampling": false,
|
||||
"downsampleAggregator": "avg",
|
||||
"downsampleFillPolicy": "none",
|
||||
"explicitTags": false,
|
||||
"filters": [
|
||||
{
|
||||
"filter": "*",
|
||||
"groupBy": true,
|
||||
"tagk": "hostname",
|
||||
"type": "wildcard"
|
||||
}
|
||||
],
|
||||
"metric": "cpu",
|
||||
"refId": "A",
|
||||
"shouldComputeRate": false
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "CPU per host",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "gdev-opentsdb-v2.3",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"links": []
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"aggregator": "sum",
|
||||
"alias": "$tag_hostname",
|
||||
"currentFilterGroupBy": false,
|
||||
"currentFilterKey": "",
|
||||
"currentFilterType": "literal_or",
|
||||
"currentFilterValue": "",
|
||||
"downsampleAggregator": "avg",
|
||||
"downsampleFillPolicy": "none",
|
||||
"filters": [
|
||||
{
|
||||
"filter": "*",
|
||||
"groupBy": true,
|
||||
"tagk": "hostname",
|
||||
"type": "wildcard"
|
||||
}
|
||||
],
|
||||
"metric": "logins.count",
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeRegions": [],
|
||||
"title": "Login Count per host",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"mode": "time",
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"logBase": 1,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"schemaVersion": 30,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-1h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Datasource tests - OpenTSDB v2.3",
|
||||
"uid": "rZRUGik7k",
|
||||
"version": 3
|
||||
}
|
||||
@@ -511,6 +511,7 @@
|
||||
},
|
||||
"id": 41,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -612,6 +613,7 @@
|
||||
},
|
||||
"id": 42,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -714,6 +716,7 @@
|
||||
},
|
||||
"id": 32,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -816,6 +819,7 @@
|
||||
},
|
||||
"id": 44,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -2066,6 +2070,7 @@
|
||||
"id": 29,
|
||||
"maxDataPoints": 500,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [
|
||||
"last"
|
||||
|
||||
@@ -13,11 +13,13 @@
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": 625,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": null,
|
||||
"gridPos": {
|
||||
"h": 4,
|
||||
"w": 24,
|
||||
@@ -36,10 +38,13 @@
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"transparent": true,
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -102,7 +107,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -160,6 +166,7 @@
|
||||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
@@ -200,7 +207,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue"
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
@@ -259,9 +267,10 @@
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
@@ -284,7 +293,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue"
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
@@ -333,6 +343,7 @@
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 13,
|
||||
@@ -375,7 +386,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue"
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "#EAB839",
|
||||
@@ -461,7 +473,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue"
|
||||
"color": "blue",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "#EAB839",
|
||||
@@ -509,6 +522,7 @@
|
||||
"type": "status-history"
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
@@ -548,7 +562,7 @@
|
||||
"fillOpacity": 74,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -559,7 +573,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -664,7 +679,7 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -698,7 +713,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue"
|
||||
"color": "blue",
|
||||
"value": null
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -741,6 +757,7 @@
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
@@ -766,6 +783,7 @@
|
||||
"type": "text"
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 6,
|
||||
@@ -805,7 +823,7 @@
|
||||
"fillOpacity": 50,
|
||||
"gradientMode": "hue",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -830,7 +848,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -905,6 +924,8 @@
|
||||
"stringInput": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Interpolation mode: smooth",
|
||||
"type": "timeseries"
|
||||
},
|
||||
@@ -923,7 +944,7 @@
|
||||
"fillOpacity": 40,
|
||||
"gradientMode": "hue",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -948,7 +969,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1023,6 +1045,8 @@
|
||||
"stringInput": "1,20,90,30,5,0"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Interpolation mode: Step before",
|
||||
"type": "timeseries"
|
||||
},
|
||||
@@ -1041,7 +1065,7 @@
|
||||
"fillOpacity": 40,
|
||||
"gradientMode": "hue",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -1066,7 +1090,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1141,10 +1166,13 @@
|
||||
"stringInput": "1,20,90,30,5,0"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Interpolation mode: Step after",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
@@ -1182,9 +1210,12 @@
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"gradientMode": {
|
||||
"label": "None",
|
||||
"value": "none"
|
||||
},
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -1209,7 +1240,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1229,6 +1261,7 @@
|
||||
},
|
||||
"id": 41,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -1267,6 +1300,8 @@
|
||||
"stringInput": "10,11,12,11,10,11,12,12,11,10,9,10,11,12,10,10,11,12,13,11,10,9,10,11,12,13,14,10,10"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Auto min max",
|
||||
"type": "timeseries"
|
||||
},
|
||||
@@ -1284,9 +1319,12 @@
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"gradientMode": {
|
||||
"label": "None",
|
||||
"value": "none"
|
||||
},
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -1313,7 +1351,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1333,6 +1372,7 @@
|
||||
},
|
||||
"id": 32,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -1371,6 +1411,8 @@
|
||||
"stringInput": "10,11,12,11,10,11,12,12,11,10,9,10,11,12,200,10,11,12,13,11,10,9,10,11,12,13,14,10,10"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Hard min 0, max 30",
|
||||
"type": "timeseries"
|
||||
},
|
||||
@@ -1390,9 +1432,12 @@
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"gradientMode": {
|
||||
"label": "None",
|
||||
"value": "none"
|
||||
},
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -1417,7 +1462,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1437,6 +1483,7 @@
|
||||
},
|
||||
"id": 44,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -1475,10 +1522,13 @@
|
||||
"stringInput": "10,11,12,11,10,11,12,12,11,10,9,10,11,12,200,10,11,12,13,11,10,9,10,11,12,13,14,10,10"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Soft min 0, soft max 30",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
@@ -1520,7 +1570,7 @@
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "opacity",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -1545,7 +1595,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1718,6 +1769,7 @@
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
@@ -1755,9 +1807,12 @@
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"gradientMode": {
|
||||
"label": "None",
|
||||
"value": "none"
|
||||
},
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -1789,7 +1844,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -2077,9 +2133,12 @@
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"gradientMode": {
|
||||
"label": "None",
|
||||
"value": "none"
|
||||
},
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -2111,7 +2170,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -2401,7 +2461,7 @@
|
||||
"fillOpacity": 82,
|
||||
"gradientMode": "hue",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -2433,7 +2493,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -2512,6 +2573,7 @@
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"cacheTimeout": null,
|
||||
"datasource": "gdev-testdata",
|
||||
"gridPos": {
|
||||
"h": 3,
|
||||
@@ -2547,7 +2609,7 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "hue",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -2558,7 +2620,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -2592,6 +2655,7 @@
|
||||
"y": 83
|
||||
},
|
||||
"id": 49,
|
||||
"maxDataPoints": null,
|
||||
"options": {
|
||||
"bucketOffset": 0,
|
||||
"bucketSize": 10,
|
||||
@@ -2655,7 +2719,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -2689,6 +2754,7 @@
|
||||
"y": 83
|
||||
},
|
||||
"id": 77,
|
||||
"maxDataPoints": null,
|
||||
"options": {
|
||||
"showHeader": true
|
||||
},
|
||||
@@ -2772,4 +2838,4 @@
|
||||
"title": "New Features in v8.0",
|
||||
"uid": "8mux8PqGz",
|
||||
"version": 17
|
||||
}
|
||||
}
|
||||
@@ -8,188 +8,127 @@
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"folderId": null,
|
||||
"gridPos": {
|
||||
"h": 26,
|
||||
"w": 6,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"headings": true,
|
||||
"id": 7,
|
||||
"limit": 100,
|
||||
"links": [],
|
||||
"options": {
|
||||
"maxItems": 100,
|
||||
"query": "",
|
||||
"showHeadings": true,
|
||||
"showRecentlyViewed": true,
|
||||
"showSearch": false,
|
||||
"showStarred": true,
|
||||
"tags": []
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"query": "",
|
||||
"recent": true,
|
||||
"search": false,
|
||||
"starred": true,
|
||||
"tags": [],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Starred",
|
||||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"folderId": null,
|
||||
"gridPos": {
|
||||
"h": 13,
|
||||
"w": 6,
|
||||
"x": 6,
|
||||
"y": 0
|
||||
},
|
||||
"headings": false,
|
||||
"id": 2,
|
||||
"limit": 1000,
|
||||
"links": [],
|
||||
"options": {
|
||||
"maxItems": 1000,
|
||||
"query": "",
|
||||
"showHeadings": false,
|
||||
"showRecentlyViewed": false,
|
||||
"showSearch": true,
|
||||
"showStarred": false,
|
||||
"tags": [
|
||||
"panel-tests"
|
||||
]
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"tags": [
|
||||
"panel-tests"
|
||||
],
|
||||
"query": "",
|
||||
"recent": false,
|
||||
"search": true,
|
||||
"starred": false,
|
||||
"tags": ["panel-tests"],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "tag: panel-tests",
|
||||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"folderId": null,
|
||||
"gridPos": {
|
||||
"h": 13,
|
||||
"h": 26,
|
||||
"w": 6,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"headings": false,
|
||||
"id": 3,
|
||||
"limit": 1000,
|
||||
"links": [],
|
||||
"options": {
|
||||
"maxItems": 1000,
|
||||
"query": "",
|
||||
"showHeadings": false,
|
||||
"showRecentlyViewed": false,
|
||||
"showSearch": true,
|
||||
"showStarred": false,
|
||||
"tags": [
|
||||
"gdev",
|
||||
"demo"
|
||||
]
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"demo"
|
||||
],
|
||||
"query": "",
|
||||
"recent": false,
|
||||
"search": true,
|
||||
"starred": false,
|
||||
"tags": ["gdev", "demo"],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "tag: dashboard-demo",
|
||||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"folderId": null,
|
||||
"gridPos": {
|
||||
"h": 26,
|
||||
"w": 6,
|
||||
"x": 18,
|
||||
"y": 0
|
||||
},
|
||||
"headings": false,
|
||||
"id": 5,
|
||||
"limit": 1000,
|
||||
"links": [],
|
||||
"options": {
|
||||
"maxItems": 1000,
|
||||
"query": "",
|
||||
"showHeadings": false,
|
||||
"showRecentlyViewed": false,
|
||||
"showSearch": true,
|
||||
"showStarred": false,
|
||||
"tags": [
|
||||
"gdev",
|
||||
"datasource-test"
|
||||
]
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"datasource-test"
|
||||
],
|
||||
"query": "",
|
||||
"recent": false,
|
||||
"search": true,
|
||||
"starred": false,
|
||||
"tags": ["gdev", "datasource-test"],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Data source tests",
|
||||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"folderId": null,
|
||||
"gridPos": {
|
||||
"h": 13,
|
||||
"w": 6,
|
||||
"x": 6,
|
||||
"y": 13
|
||||
},
|
||||
"headings": false,
|
||||
"id": 4,
|
||||
"limit": 1000,
|
||||
"links": [],
|
||||
"options": {
|
||||
"maxItems": 1000,
|
||||
"query": "",
|
||||
"showHeadings": false,
|
||||
"showRecentlyViewed": false,
|
||||
"showSearch": true,
|
||||
"showStarred": false,
|
||||
"tags": [
|
||||
"templating",
|
||||
"gdev"
|
||||
]
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"tags": [
|
||||
"templating",
|
||||
"gdev"
|
||||
],
|
||||
"query": "",
|
||||
"recent": false,
|
||||
"search": true,
|
||||
"starred": false,
|
||||
"tags": ["templating", "gdev"],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "tag: templating ",
|
||||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"gridPos": {
|
||||
"h": 13,
|
||||
"w": 6,
|
||||
"x": 12,
|
||||
"y": 13
|
||||
},
|
||||
"id": 8,
|
||||
"links": [],
|
||||
"options": {
|
||||
"maxItems": 1000,
|
||||
"query": "",
|
||||
"showHeadings": false,
|
||||
"showRecentlyViewed": false,
|
||||
"showSearch": true,
|
||||
"showStarred": false,
|
||||
"tags": [
|
||||
"gdev",
|
||||
"transform"
|
||||
]
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"demo"
|
||||
],
|
||||
"title": "tag: transforms",
|
||||
"type": "dashlist"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 30,
|
||||
"schemaVersion": 18,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"templating": {
|
||||
@@ -200,29 +139,8 @@
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
]
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"],
|
||||
"time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Grafana Dev Overview & Home",
|
||||
|
||||
@@ -8,21 +8,17 @@
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -35,9 +31,9 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
"tooltip": false
|
||||
},
|
||||
"lineWidth": 0
|
||||
},
|
||||
@@ -46,7 +42,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -76,7 +73,6 @@
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"text": {},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
@@ -84,7 +80,7 @@
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "Time,Name,Stat1,Stat2\n2020-01-01T00:00:00Z,Stockholm, 10, 15\n2020-01-01T00:00:00Z,New York, 19, 5\n2020-01-01T00:00:00Z,London, 10, 1\n2020-01-01T00:00:00Z,Negative, 15, -5\n2020-01-01T00:00:00Z,Long value, 15,10",
|
||||
"csvContent": "Name,Stat1,Stat2\nStockholm, 10, 15\nNew York, 19, 5\nLondon, 10, 1\nNegative, 15, -5\nLong value, 15,10",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
@@ -93,6 +89,7 @@
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"description": "Should be smaller given the longer value",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -106,9 +103,9 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
"tooltip": false
|
||||
},
|
||||
"lineWidth": 0
|
||||
},
|
||||
@@ -118,7 +115,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -148,7 +146,6 @@
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"text": {},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
@@ -165,6 +162,7 @@
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -177,9 +175,9 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
"tooltip": false
|
||||
},
|
||||
"lineWidth": 0
|
||||
},
|
||||
@@ -188,7 +186,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -218,7 +217,6 @@
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"text": {},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
@@ -235,6 +233,7 @@
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -247,9 +246,9 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
"tooltip": false
|
||||
},
|
||||
"lineWidth": 0
|
||||
},
|
||||
@@ -258,7 +257,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -288,7 +288,6 @@
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "always",
|
||||
"stacking": "none",
|
||||
"text": {},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
@@ -318,9 +317,9 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
"tooltip": false
|
||||
},
|
||||
"lineWidth": 0
|
||||
},
|
||||
@@ -329,7 +328,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -357,9 +357,8 @@
|
||||
},
|
||||
"orientation": "auto",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"text": {
|
||||
"titleSize": 10,
|
||||
"size": 10,
|
||||
"valueSize": 25
|
||||
},
|
||||
"tooltip": {
|
||||
@@ -376,6 +375,7 @@
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -388,19 +388,19 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
"tooltip": false
|
||||
},
|
||||
"lineWidth": 0
|
||||
},
|
||||
"decimals": 7,
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -430,7 +430,6 @@
|
||||
},
|
||||
"orientation": "horizontal",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"text": {},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
@@ -438,7 +437,7 @@
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "Name,Stat1,Stat2\nStockholm, 10, 15\nNew York, 19, -5\nLondon, 10, 1\nLong value, 15,10",
|
||||
"csvContent": "Name,Stat1,Stat2\nStockholm, 10, 15\nNew York, 19, 5\nLondon, 10, 1\nLong value, 15,10",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
@@ -447,6 +446,7 @@
|
||||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -460,9 +460,9 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
"tooltip": false
|
||||
},
|
||||
"lineWidth": 0
|
||||
},
|
||||
@@ -471,7 +471,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -501,7 +502,6 @@
|
||||
},
|
||||
"orientation": "horizontal",
|
||||
"showValue": "auto",
|
||||
"stacking": "none",
|
||||
"text": {},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
@@ -537,5 +537,5 @@
|
||||
"timezone": "",
|
||||
"title": "BarChart - Panel Tests - Value sizing",
|
||||
"uid": "WFlOM-jM1",
|
||||
"version": 9
|
||||
}
|
||||
"version": 3
|
||||
}
|
||||
@@ -1,395 +0,0 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-GrYlRd"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 9,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 62,
|
||||
"options": {
|
||||
"basemap": {
|
||||
"config": {},
|
||||
"type": "default"
|
||||
},
|
||||
"controls": {
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"config": {
|
||||
"color": {
|
||||
"field": "Price",
|
||||
"fixed": "dark-green"
|
||||
},
|
||||
"fillOpacity": 0.4,
|
||||
"shape": "circle",
|
||||
"showLegend": true,
|
||||
"size": {
|
||||
"field": "Count",
|
||||
"fixed": 5,
|
||||
"max": 15,
|
||||
"min": 2
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"gazetteer": "public/gazetteer/usa-states.json",
|
||||
"lookup": "State",
|
||||
"mode": "auto"
|
||||
},
|
||||
"type": "markers"
|
||||
}
|
||||
],
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 38.297683,
|
||||
"lon": -99.228359,
|
||||
"shared": true,
|
||||
"zoom": 3.98
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_file"
|
||||
}
|
||||
],
|
||||
"title": "Size, color mapped to different fields + share view",
|
||||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
},
|
||||
{
|
||||
"color": "#EAB839",
|
||||
"value": 90
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 9,
|
||||
"x": 9,
|
||||
"y": 0
|
||||
},
|
||||
"id": 66,
|
||||
"options": {
|
||||
"basemap": {
|
||||
"config": {},
|
||||
"type": "default"
|
||||
},
|
||||
"controls": {
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"config": {
|
||||
"color": {
|
||||
"field": "Price",
|
||||
"fixed": "dark-green"
|
||||
},
|
||||
"fillOpacity": 0.4,
|
||||
"shape": "circle",
|
||||
"showLegend": true,
|
||||
"size": {
|
||||
"field": "Count",
|
||||
"fixed": 5,
|
||||
"max": 15,
|
||||
"min": 2
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"gazetteer": "public/gazetteer/usa-states.json",
|
||||
"lookup": "State",
|
||||
"mode": "auto"
|
||||
},
|
||||
"type": "markers"
|
||||
}
|
||||
],
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 38.297683,
|
||||
"lon": -99.228359,
|
||||
"shared": true,
|
||||
"zoom": 3.98
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_file"
|
||||
}
|
||||
],
|
||||
"title": "Thresholds legend",
|
||||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-BlYlRd"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 9,
|
||||
"x": 0,
|
||||
"y": 11
|
||||
},
|
||||
"id": 63,
|
||||
"options": {
|
||||
"basemap": {
|
||||
"config": {},
|
||||
"type": "default"
|
||||
},
|
||||
"controls": {
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"config": {
|
||||
"blur": 27,
|
||||
"radius": 25,
|
||||
"weight": {
|
||||
"field": "Count",
|
||||
"fixed": 1,
|
||||
"max": 1,
|
||||
"min": 0
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"gazetteer": "public/gazetteer/usa-states.json",
|
||||
"lookup": "State",
|
||||
"mode": "auto"
|
||||
},
|
||||
"type": "heatmap"
|
||||
}
|
||||
],
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 38.251497,
|
||||
"lon": -100.932144,
|
||||
"shared": false,
|
||||
"zoom": 4.15
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_file"
|
||||
}
|
||||
],
|
||||
"title": "Heatmap data layer",
|
||||
"transformations": [],
|
||||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-GrYlRd"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 9,
|
||||
"x": 9,
|
||||
"y": 11
|
||||
},
|
||||
"id": 65,
|
||||
"options": {
|
||||
"basemap": {
|
||||
"config": {
|
||||
"server": "world-imagery"
|
||||
},
|
||||
"type": "esri-xyz"
|
||||
},
|
||||
"controls": {
|
||||
"mouseWheelZoom": true,
|
||||
"showAttribution": true,
|
||||
"showDebug": false,
|
||||
"showScale": false,
|
||||
"showZoom": true
|
||||
},
|
||||
"layers": [
|
||||
{
|
||||
"config": {
|
||||
"color": {
|
||||
"fixed": "#ff001e"
|
||||
},
|
||||
"fillOpacity": 0.4,
|
||||
"shape": "star",
|
||||
"showLegend": true,
|
||||
"size": {
|
||||
"field": "Count",
|
||||
"fixed": 5,
|
||||
"max": 15,
|
||||
"min": 2
|
||||
}
|
||||
},
|
||||
"location": {
|
||||
"gazetteer": "public/gazetteer/usa-states.json",
|
||||
"lookup": "State",
|
||||
"mode": "auto"
|
||||
},
|
||||
"type": "markers"
|
||||
}
|
||||
],
|
||||
"view": {
|
||||
"id": "coords",
|
||||
"lat": 40.159084,
|
||||
"lon": -96.508021,
|
||||
"shared": true,
|
||||
"zoom": 3.83
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"csvFileName": "flight_info_by_state.csv",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_file"
|
||||
}
|
||||
],
|
||||
"title": "Base layer ArcGIS wold imagery + star shape + share view",
|
||||
"type": "geomap"
|
||||
}
|
||||
],
|
||||
"refresh": "",
|
||||
"schemaVersion": 30,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"panel-tests"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": [
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Geomap",
|
||||
"uid": "2xuwrgV7z",
|
||||
"version": 5
|
||||
}
|
||||
@@ -1,846 +0,0 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 37,
|
||||
"gradientMode": "scheme",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 3,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 50,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 15
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "degree"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 11,
|
||||
"maxDataPoints": 45,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,10,20,30,40,50"
|
||||
}
|
||||
],
|
||||
"title": "15 orange, 30 red",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 37,
|
||||
"gradientMode": "scheme",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 3,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 50,
|
||||
"min": 20,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 15
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "degree"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 0
|
||||
},
|
||||
"id": 12,
|
||||
"maxDataPoints": 45,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,10,20,30,40,50"
|
||||
}
|
||||
],
|
||||
"title": "15 orange, 30 red",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 37,
|
||||
"gradientMode": "scheme",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 2,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 50,
|
||||
"min": 20,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 15
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 50
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "degree"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 0
|
||||
},
|
||||
"id": 13,
|
||||
"maxDataPoints": 45,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_metric_values",
|
||||
"stringInput": "1,10,20,30,40,50"
|
||||
}
|
||||
],
|
||||
"title": "15 orange, 50 red",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": "-- Dashboard --",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 5,
|
||||
"gradientMode": "scheme",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 3,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 50,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "degree"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 7
|
||||
},
|
||||
"id": 9,
|
||||
"maxDataPoints": 45,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"panelId": 4,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Color line by discrete tresholds",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "bars",
|
||||
"fillOpacity": 84,
|
||||
"gradientMode": "scheme",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 0,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 50,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "degree"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 7
|
||||
},
|
||||
"id": 4,
|
||||
"interval": "80s",
|
||||
"maxDataPoints": 42,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"max": 40,
|
||||
"min": 0,
|
||||
"noise": 1,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"spread": 20,
|
||||
"startValue": 1
|
||||
}
|
||||
],
|
||||
"title": "Color bars by discrete thresholds",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": "-- Dashboard --",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-GrYlRd"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "scheme",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 3,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 50,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue"
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "degree"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 14
|
||||
},
|
||||
"id": 6,
|
||||
"maxDataPoints": 50,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"panelId": 4,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Color line by color scale",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": "-- Dashboard --",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-GrYlRd"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "bars",
|
||||
"fillOpacity": 64,
|
||||
"gradientMode": "scheme",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 50,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue"
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "degree"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 14
|
||||
},
|
||||
"id": 10,
|
||||
"maxDataPoints": 45,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"panelId": 4,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Color bars by color scale",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": "-- Dashboard --",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-GrYlRd"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 64,
|
||||
"gradientMode": "scheme",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 50,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue"
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "degree"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 21
|
||||
},
|
||||
"id": 7,
|
||||
"maxDataPoints": 50,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"panelId": 4,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Color line by color scale",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-GrYlRd"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "points",
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "scheme",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "smooth",
|
||||
"lineWidth": 3,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"group": "A",
|
||||
"mode": "none"
|
||||
},
|
||||
"thresholdsStyle": {
|
||||
"mode": "off"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"max": 50,
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "blue"
|
||||
},
|
||||
{
|
||||
"color": "green",
|
||||
"value": 0
|
||||
},
|
||||
{
|
||||
"color": "orange",
|
||||
"value": 20
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
"unit": "degree"
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 21
|
||||
},
|
||||
"id": 8,
|
||||
"maxDataPoints": 250,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"max": 45,
|
||||
"min": 20,
|
||||
"noise": 0,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"spread": 12,
|
||||
"startValue": 40
|
||||
},
|
||||
{
|
||||
"hide": false,
|
||||
"max": 20,
|
||||
"min": 1,
|
||||
"noise": 0,
|
||||
"refId": "B",
|
||||
"scenarioId": "random_walk",
|
||||
"spread": 10
|
||||
}
|
||||
],
|
||||
"title": "Color line by color scale",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": false,
|
||||
"schemaVersion": 30,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"panel-tests"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Graph NG - By value color schemes",
|
||||
"uid": "aBXrJ0R7z",
|
||||
"version": 11
|
||||
}
|
||||
@@ -92,6 +92,7 @@
|
||||
"interval": "1m",
|
||||
"links": [],
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"displayMode": "hidden",
|
||||
"placement": "bottom"
|
||||
@@ -180,6 +181,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 10,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"displayMode": "hidden",
|
||||
"placement": "bottom"
|
||||
@@ -268,6 +270,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 20,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"displayMode": "hidden",
|
||||
"placement": "bottom"
|
||||
@@ -355,6 +358,7 @@
|
||||
"interval": "1m",
|
||||
"links": [],
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"displayMode": "hidden",
|
||||
"placement": "bottom"
|
||||
@@ -443,6 +447,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 80,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"displayMode": "hidden",
|
||||
"placement": "bottom"
|
||||
@@ -531,6 +536,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 50,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"displayMode": "hidden",
|
||||
"placement": "bottom"
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 9,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -193,6 +194,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 9,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -287,6 +289,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 9,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -381,6 +384,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 9,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -475,6 +479,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 9,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -569,6 +574,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 9,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -663,6 +669,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 100,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -757,6 +764,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 100,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -851,6 +859,7 @@
|
||||
"links": [],
|
||||
"maxDataPoints": 100,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
|
||||
@@ -8,17 +8,12 @@
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"links": [
|
||||
{
|
||||
@@ -48,6 +43,7 @@
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
@@ -73,7 +69,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -94,6 +91,7 @@
|
||||
"id": 3,
|
||||
"links": [],
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -134,6 +132,8 @@
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Show gaps",
|
||||
"type": "timeseries"
|
||||
},
|
||||
@@ -153,6 +153,7 @@
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
@@ -179,7 +180,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -200,6 +202,7 @@
|
||||
"id": 2,
|
||||
"links": [],
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -248,6 +251,8 @@
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Gaps & null between every point for series B",
|
||||
"type": "timeseries"
|
||||
},
|
||||
@@ -267,6 +272,7 @@
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
@@ -293,7 +299,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -314,6 +321,7 @@
|
||||
"id": 6,
|
||||
"links": [],
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -382,6 +390,8 @@
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "No nulls but unaligned series",
|
||||
"type": "timeseries"
|
||||
},
|
||||
@@ -400,6 +410,7 @@
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
@@ -425,7 +436,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -446,6 +458,7 @@
|
||||
"id": 4,
|
||||
"links": [],
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -486,6 +499,8 @@
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Connected",
|
||||
"type": "timeseries"
|
||||
},
|
||||
@@ -505,6 +520,7 @@
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
@@ -531,7 +547,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -552,6 +569,7 @@
|
||||
"id": 5,
|
||||
"links": [],
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -600,6 +618,8 @@
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Same as above but connected",
|
||||
"type": "timeseries"
|
||||
},
|
||||
@@ -619,6 +639,7 @@
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
@@ -645,7 +666,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -666,6 +688,7 @@
|
||||
"id": 7,
|
||||
"links": [],
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -734,6 +757,8 @@
|
||||
"target": ""
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Same as above but connected",
|
||||
"type": "timeseries"
|
||||
},
|
||||
@@ -752,6 +777,7 @@
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
@@ -777,7 +803,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -828,6 +855,9 @@
|
||||
},
|
||||
"id": 11,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"calcs": [],
|
||||
@@ -873,6 +903,8 @@
|
||||
"stringInput": "1,20,90,30,5,0"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Null values in first series & show gaps ",
|
||||
"transformations": [],
|
||||
"type": "timeseries"
|
||||
@@ -892,6 +924,7 @@
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
@@ -917,7 +950,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -968,6 +1002,9 @@
|
||||
},
|
||||
"id": 9,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"calcs": [],
|
||||
@@ -1013,11 +1050,14 @@
|
||||
"stringInput": "10,25,null,null,50,10"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Null values in second series show gaps (bugged)",
|
||||
"transformations": [],
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -1031,6 +1071,7 @@
|
||||
"fillOpacity": 10,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
@@ -1056,7 +1097,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1076,6 +1118,7 @@
|
||||
},
|
||||
"id": 13,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
@@ -1114,10 +1157,13 @@
|
||||
"stringInput": "1,20,90,null,30,5,0"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Span nulls below 1hr",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -1159,7 +1205,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -1216,5 +1263,5 @@
|
||||
"timezone": "",
|
||||
"title": "Panel Tests - Graph NG - Gaps and Connected",
|
||||
"uid": "8mmCAF1Mz",
|
||||
"version": 2
|
||||
}
|
||||
"version": 12
|
||||
}
|
||||
@@ -80,6 +80,7 @@
|
||||
"id": 2,
|
||||
"maxDataPoints": 50,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -150,6 +151,7 @@
|
||||
"id": 3,
|
||||
"maxDataPoints": 50,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -220,6 +222,7 @@
|
||||
"id": 4,
|
||||
"maxDataPoints": 50,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -290,6 +293,7 @@
|
||||
"id": 5,
|
||||
"maxDataPoints": 50,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -360,6 +364,7 @@
|
||||
"id": 6,
|
||||
"maxDataPoints": 50,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
@@ -430,6 +435,7 @@
|
||||
"id": 7,
|
||||
"maxDataPoints": 50,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "hidden",
|
||||
|
||||
@@ -113,6 +113,9 @@
|
||||
"id": 47,
|
||||
"maxDataPoints": 500,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -234,6 +237,9 @@
|
||||
"id": 48,
|
||||
"maxDataPoints": 20,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -355,6 +361,9 @@
|
||||
"id": 55,
|
||||
"maxDataPoints": 20,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -476,6 +485,9 @@
|
||||
"id": 56,
|
||||
"maxDataPoints": 90,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -597,6 +609,9 @@
|
||||
"id": 52,
|
||||
"maxDataPoints": 10,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -718,6 +733,9 @@
|
||||
"id": 53,
|
||||
"maxDataPoints": 10,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -839,6 +857,9 @@
|
||||
"id": 54,
|
||||
"maxDataPoints": 10,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -960,6 +981,9 @@
|
||||
"id": 57,
|
||||
"maxDataPoints": 10,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -1160,6 +1184,9 @@
|
||||
},
|
||||
"id": 60,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -1441,6 +1468,7 @@
|
||||
"interval": null,
|
||||
"maxDataPoints": 100,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"displayMode": "list",
|
||||
"placement": "right"
|
||||
@@ -1571,6 +1599,9 @@
|
||||
"id": 63,
|
||||
"maxDataPoints": 10,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -1706,6 +1737,9 @@
|
||||
"id": 64,
|
||||
"maxDataPoints": 10,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -1841,6 +1875,9 @@
|
||||
"id": 65,
|
||||
"maxDataPoints": 10,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -1976,6 +2013,9 @@
|
||||
"id": 66,
|
||||
"maxDataPoints": 100,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -2139,6 +2179,9 @@
|
||||
"id": 32,
|
||||
"maxDataPoints": 100,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "list",
|
||||
@@ -2276,6 +2319,9 @@
|
||||
"id": 35,
|
||||
"maxDataPoints": 100,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "list",
|
||||
@@ -2427,6 +2473,9 @@
|
||||
"id": 31,
|
||||
"maxDataPoints": 200,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": true,
|
||||
"displayMode": "table",
|
||||
@@ -2577,6 +2626,9 @@
|
||||
"id": 51,
|
||||
"maxDataPoints": 200,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": true,
|
||||
"displayMode": "table",
|
||||
@@ -2716,6 +2768,9 @@
|
||||
},
|
||||
"id": 19,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -2821,6 +2876,9 @@
|
||||
},
|
||||
"id": 20,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -2925,6 +2983,9 @@
|
||||
},
|
||||
"id": 21,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -3030,6 +3091,9 @@
|
||||
},
|
||||
"id": 9,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "hidden",
|
||||
@@ -3151,6 +3215,9 @@
|
||||
},
|
||||
"id": 46,
|
||||
"options": {
|
||||
"graph": {
|
||||
"realTimeUpdates": false
|
||||
},
|
||||
"legend": {
|
||||
"asTable": false,
|
||||
"displayMode": "list",
|
||||
@@ -3291,6 +3358,7 @@
|
||||
},
|
||||
"id": 68,
|
||||
"options": {
|
||||
"graph": {},
|
||||
"legend": {
|
||||
"displayMode": "hidden",
|
||||
"placement": "bottom"
|
||||
|
||||
@@ -13,11 +13,13 @@
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": 632,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -27,7 +29,7 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -38,7 +40,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -86,7 +89,7 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -97,7 +100,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -135,6 +139,7 @@
|
||||
"type": "histogram"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -144,7 +149,7 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -155,7 +160,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -206,6 +212,7 @@
|
||||
"type": "histogram"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -215,7 +222,7 @@
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"viz": false,
|
||||
"graph": false,
|
||||
"legend": false,
|
||||
"tooltip": false
|
||||
},
|
||||
@@ -226,7 +233,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -277,6 +285,7 @@
|
||||
"type": "histogram"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -291,7 +300,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -343,6 +353,7 @@
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -357,7 +368,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -427,4 +439,4 @@
|
||||
"title": "Panel Tests - Histogram",
|
||||
"uid": "UTv--wqMk",
|
||||
"version": 4
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 1,
|
||||
"graphTooltip": 0,
|
||||
"id": 479,
|
||||
"links": [],
|
||||
"panels": [
|
||||
|
||||
@@ -8,21 +8,17 @@
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -59,7 +55,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -85,12 +82,9 @@
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"mergeValues": true,
|
||||
"mode": "changes",
|
||||
"rowHeight": 0.98,
|
||||
"showValue": "always",
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
"showValue": "always"
|
||||
},
|
||||
"pluginVersion": "7.5.0-pre",
|
||||
"targets": [
|
||||
@@ -119,6 +113,7 @@
|
||||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -156,7 +151,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -177,17 +173,9 @@
|
||||
"options": {
|
||||
"alignValue": "center",
|
||||
"colWidth": 1,
|
||||
"legend": {
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"mergeValues": true,
|
||||
"mode": "changes",
|
||||
"rowHeight": 0.98,
|
||||
"showValue": "always",
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
"showValue": "always"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
@@ -219,6 +207,7 @@
|
||||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"description": "Should show gaps",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
@@ -257,7 +246,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -278,17 +268,9 @@
|
||||
"options": {
|
||||
"alignValue": "center",
|
||||
"colWidth": 1,
|
||||
"legend": {
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"mergeValues": true,
|
||||
"mode": "changes",
|
||||
"rowHeight": 0.98,
|
||||
"showValue": "always",
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
"showValue": "always"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
@@ -319,6 +301,7 @@
|
||||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -336,7 +319,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -355,6 +339,7 @@
|
||||
"y": 19
|
||||
},
|
||||
"id": 4,
|
||||
"interval": null,
|
||||
"maxDataPoints": 20,
|
||||
"options": {
|
||||
"alignValue": "center",
|
||||
@@ -364,11 +349,9 @@
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"mode": "samples",
|
||||
"rowHeight": 0.98,
|
||||
"showValue": "always",
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
"showValue": "always"
|
||||
},
|
||||
"pluginVersion": "7.5.0-pre",
|
||||
"targets": [
|
||||
@@ -427,5 +410,5 @@
|
||||
"timezone": "utc",
|
||||
"title": "Timeline Demo",
|
||||
"uid": "mIJjFy8Kz",
|
||||
"version": 3
|
||||
}
|
||||
"version": 13
|
||||
}
|
||||
@@ -8,22 +8,18 @@
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": 329,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -38,7 +34,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -66,10 +63,7 @@
|
||||
},
|
||||
"mergeValues": true,
|
||||
"rowHeight": 0.9,
|
||||
"showValue": "always",
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
"showValue": "always"
|
||||
},
|
||||
"pluginVersion": "7.5.0-pre",
|
||||
"targets": [
|
||||
@@ -171,6 +165,7 @@
|
||||
1616557148000
|
||||
],
|
||||
[
|
||||
null,
|
||||
1616558756000
|
||||
],
|
||||
[
|
||||
@@ -178,6 +173,7 @@
|
||||
1616561658000
|
||||
],
|
||||
[
|
||||
null,
|
||||
1616562446000
|
||||
],
|
||||
[
|
||||
@@ -185,6 +181,7 @@
|
||||
1616564104000
|
||||
],
|
||||
[
|
||||
null,
|
||||
1616564548000
|
||||
],
|
||||
[
|
||||
@@ -200,6 +197,7 @@
|
||||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -214,7 +212,8 @@
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
@@ -242,10 +241,7 @@
|
||||
},
|
||||
"mergeValues": true,
|
||||
"rowHeight": 0.9,
|
||||
"showValue": "always",
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
"showValue": "always"
|
||||
},
|
||||
"pluginVersion": "7.5.0-pre",
|
||||
"targets": [
|
||||
@@ -271,6 +267,7 @@
|
||||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
@@ -285,7 +282,8 @@
|
||||
"mode": "percentage",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "#EAB839",
|
||||
@@ -308,6 +306,7 @@
|
||||
"y": 21
|
||||
},
|
||||
"id": 4,
|
||||
"interval": null,
|
||||
"maxDataPoints": 20,
|
||||
"options": {
|
||||
"colWidth": 0.9,
|
||||
@@ -317,10 +316,7 @@
|
||||
"placement": "bottom"
|
||||
},
|
||||
"rowHeight": 0.9,
|
||||
"showValue": "always",
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
"showValue": "always"
|
||||
},
|
||||
"pluginVersion": "7.5.0-pre",
|
||||
"targets": [
|
||||
@@ -375,5 +371,5 @@
|
||||
"timezone": "utc",
|
||||
"title": "Timeline Modes",
|
||||
"uid": "mIJjFy8Gz",
|
||||
"version": 13
|
||||
"version": 12
|
||||
}
|
||||
|
||||
@@ -1,551 +0,0 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"description": "",
|
||||
"editable": true,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"barAlignment": 0,
|
||||
"drawStyle": "line",
|
||||
"fillOpacity": 0,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineInterpolation": "linear",
|
||||
"lineWidth": 1,
|
||||
"pointSize": 5,
|
||||
"scaleDistribution": {
|
||||
"type": "linear"
|
||||
},
|
||||
"showPoints": "auto",
|
||||
"spanNulls": false,
|
||||
"thresholdsStyle": {
|
||||
"mode": "line"
|
||||
}
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"hide": false,
|
||||
"max": 100,
|
||||
"min": 1,
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk",
|
||||
"startValue": 50
|
||||
},
|
||||
{
|
||||
"alias": "",
|
||||
"csvContent": "min,max,threshold1\n1000,1000,8000\n0,100,80\n\n",
|
||||
"refId": "config",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Min, max, threshold from separate query",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "configFromData",
|
||||
"options": {
|
||||
"configRefId": "config",
|
||||
"mappings": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "left",
|
||||
"displayMode": "auto"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "SensorA"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.displayMode",
|
||||
"value": "color-text"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"id": 5,
|
||||
"options": {
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "Name, Value, SensorA, MyUnit, MyColor\nGoogle, 10, 50, km/h, blue\nGoogle, 100, 100,km/h, orange\n",
|
||||
"hide": false,
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Custom mappings and apply to self",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "configFromData",
|
||||
"options": {
|
||||
"applyTo": {
|
||||
"id": "byName",
|
||||
"options": "SensorA"
|
||||
},
|
||||
"applyToConfig": true,
|
||||
"configRefId": "A",
|
||||
"mappings": [
|
||||
{
|
||||
"configProperty": "unit",
|
||||
"fieldName": "MyUnit",
|
||||
"handlerKey": "unit"
|
||||
},
|
||||
{
|
||||
"fieldName": "MyColor",
|
||||
"handlerKey": "color"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "center",
|
||||
"displayMode": "auto"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Value"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.displayMode",
|
||||
"value": "color-background-solid"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 9
|
||||
},
|
||||
"id": 7,
|
||||
"options": {
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "ID, DisplayText\n21412312312, Homer\n12421412413, Simpsons \n12321312313, Bart",
|
||||
"hide": false,
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Mapping data",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "configFromData",
|
||||
"options": {
|
||||
"applyToConfig": true,
|
||||
"configRefId": "A",
|
||||
"mappings": [
|
||||
{
|
||||
"fieldName": "Color",
|
||||
"handlerKey": "mappings.color"
|
||||
},
|
||||
{
|
||||
"fieldName": "Value",
|
||||
"handlerKey": "mappings.value"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "center",
|
||||
"displayMode": "auto"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Value"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.displayMode",
|
||||
"value": "color-background-solid"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 9
|
||||
},
|
||||
"id": 6,
|
||||
"options": {
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "Value, Color\nOK, blue\nPretty bad, red\nYay it's green, green\nSomething is off, orange\nNo idea, #88AA00\nAm I purple?, purple",
|
||||
"hide": false,
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Value mappings from query result applied to itself",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "configFromData",
|
||||
"options": {
|
||||
"applyTo": {
|
||||
"id": "byName",
|
||||
"options": "Value"
|
||||
},
|
||||
"applyToConfig": true,
|
||||
"configRefId": "A",
|
||||
"mappings": [
|
||||
{
|
||||
"fieldName": "Color",
|
||||
"handlerKey": "mappings.color"
|
||||
},
|
||||
{
|
||||
"fieldName": "Value",
|
||||
"handlerKey": "mappings.value"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "center",
|
||||
"displayMode": "auto"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 14
|
||||
},
|
||||
"id": 8,
|
||||
"options": {
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "ID, Value\n21412312312, 100\n12421412413, 20\n12321312313, 10",
|
||||
"hide": false,
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Display data",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "configFromData",
|
||||
"options": {
|
||||
"applyToConfig": true,
|
||||
"configRefId": "A",
|
||||
"mappings": [
|
||||
{
|
||||
"fieldName": "Color",
|
||||
"handlerKey": "mappings.color"
|
||||
},
|
||||
{
|
||||
"fieldName": "Value",
|
||||
"handlerKey": "mappings.value"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "palette-classic"
|
||||
},
|
||||
"custom": {
|
||||
"axisLabel": "",
|
||||
"axisPlacement": "auto",
|
||||
"axisSoftMin": 0,
|
||||
"fillOpacity": 80,
|
||||
"gradientMode": "none",
|
||||
"hideFrom": {
|
||||
"legend": false,
|
||||
"tooltip": false,
|
||||
"viz": false
|
||||
},
|
||||
"lineWidth": 1
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 19
|
||||
},
|
||||
"id": 9,
|
||||
"options": {
|
||||
"barWidth": 0.97,
|
||||
"groupWidth": 0.7,
|
||||
"legend": {
|
||||
"calcs": [],
|
||||
"displayMode": "list",
|
||||
"placement": "bottom"
|
||||
},
|
||||
"orientation": "horizontal",
|
||||
"showValue": "auto",
|
||||
"text": {},
|
||||
"tooltip": {
|
||||
"mode": "single"
|
||||
}
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "ID, Value\nA21412312312, 100\nA12421412413, 20\nA12321312313, 10\n",
|
||||
"hide": false,
|
||||
"refId": "data",
|
||||
"scenarioId": "csv_content"
|
||||
},
|
||||
{
|
||||
"csvContent": "ID, DisplayText\nA21412312312, Homer\nA12421412413, Marge \nA12321312313, Bart",
|
||||
"hide": false,
|
||||
"refId": "mappings",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Value mapping ID -> DisplayText from separate query",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "configFromData",
|
||||
"options": {
|
||||
"applyTo": {
|
||||
"id": "byName",
|
||||
"options": "ID"
|
||||
},
|
||||
"applyToConfig": false,
|
||||
"configRefId": "mappings",
|
||||
"mappings": [
|
||||
{
|
||||
"fieldName": "ID",
|
||||
"handlerKey": "mappings.value"
|
||||
},
|
||||
{
|
||||
"fieldName": "DisplayText",
|
||||
"handlerKey": "mappings.text"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "barchart"
|
||||
}
|
||||
],
|
||||
"refresh": "",
|
||||
"schemaVersion": 30,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"transform"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Transforms - Config from query",
|
||||
"uid": "Juj4_7ink",
|
||||
"version": 1
|
||||
}
|
||||
@@ -1,600 +0,0 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"target": {
|
||||
"limit": 100,
|
||||
"matchAny": false,
|
||||
"tags": [],
|
||||
"type": "dashboard"
|
||||
},
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": "-- Dashboard --",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "left",
|
||||
"displayMode": "auto"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 8,
|
||||
"options": {
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"panelId": 2,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Raw data",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": "-- Dashboard --",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "left",
|
||||
"displayMode": "auto"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Value"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 82
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Unit"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 108
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"id": 7,
|
||||
"options": {
|
||||
"showHeader": true,
|
||||
"sortBy": []
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"panelId": 3,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Raw data",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 5
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"text": {},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "Name,Value,Unit,Color\nTemperature,10,degree,green\nPressure,100,bar,blue\nSpeed,30,km/h,red",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Unit and color from data",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "rowsToFields",
|
||||
"options": {}
|
||||
}
|
||||
],
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 5
|
||||
},
|
||||
"id": 3,
|
||||
"options": {
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showThresholdLabels": true,
|
||||
"showThresholdMarkers": true,
|
||||
"text": {}
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "Name,Value,Unit,min,max, threshold1\nTemperature,10,degree,0,50,30\nPressure,100,Pa,0,300,200\nSpeed,30,km/h,0,150,110",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Min, Max & Thresholds from data",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "rowsToFields",
|
||||
"options": {}
|
||||
}
|
||||
],
|
||||
"type": "gauge"
|
||||
},
|
||||
{
|
||||
"datasource": "-- Dashboard --",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "left",
|
||||
"displayMode": "auto"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 12
|
||||
},
|
||||
"id": 10,
|
||||
"options": {
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"panelId": 9,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Raw data",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": "-- Dashboard --",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"custom": {
|
||||
"align": "left",
|
||||
"displayMode": "auto"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Value"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 82
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Unit"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "custom.width",
|
||||
"value": 108
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 5,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 12
|
||||
},
|
||||
"id": 12,
|
||||
"options": {
|
||||
"showHeader": true,
|
||||
"sortBy": []
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"panelId": 11,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"title": "Raw data (Custom mapping)",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "continuous-GrYlRd"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 17
|
||||
},
|
||||
"id": 9,
|
||||
"options": {
|
||||
"displayMode": "gradient",
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showUnfilled": true,
|
||||
"text": {}
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "Name,Value,Unit,Min,Max\nTemperature,20,degree,0,50\nPressure,150,Pa,0,300\nSpeed,100,km/h,0,110",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Min max from data",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "rowsToFields",
|
||||
"options": {}
|
||||
}
|
||||
],
|
||||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"min": 0,
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 17
|
||||
},
|
||||
"id": 11,
|
||||
"options": {
|
||||
"orientation": "auto",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"showThresholdLabels": true,
|
||||
"showThresholdMarkers": true,
|
||||
"text": {}
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "Name,Value,Type,Quota, Warning\nTemperature,25,degree,50,30\nPressure,100,Pa,300,200\nSpeed,30,km/h,150,130",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Custom mapping",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "rowsToFields",
|
||||
"options": {
|
||||
"mappings": [
|
||||
{
|
||||
"configProperty": "unit",
|
||||
"fieldName": "Type",
|
||||
"handlerKey": "unit"
|
||||
},
|
||||
{
|
||||
"configProperty": "max",
|
||||
"fieldName": "Quota",
|
||||
"handlerKey": "max"
|
||||
},
|
||||
{
|
||||
"configProperty": "threshold1",
|
||||
"fieldName": "Warning",
|
||||
"handlerKey": "threshold1"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"type": "gauge"
|
||||
},
|
||||
{
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
"mode": "thresholds"
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green"
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 24
|
||||
},
|
||||
"id": 13,
|
||||
"options": {
|
||||
"colorMode": "value",
|
||||
"graphMode": "none",
|
||||
"justifyMode": "auto",
|
||||
"orientation": "horizontal",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
],
|
||||
"fields": "",
|
||||
"values": false
|
||||
},
|
||||
"text": {},
|
||||
"textMode": "auto"
|
||||
},
|
||||
"pluginVersion": "8.1.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"csvContent": "Name, City, Country, Value\nSensorA, Stockholm, Sweden, 20\nSensorB, London, England, 50\nSensorC, New York, USA,100",
|
||||
"refId": "A",
|
||||
"scenarioId": "csv_content"
|
||||
}
|
||||
],
|
||||
"title": "Extra string fields to labels",
|
||||
"transformations": [
|
||||
{
|
||||
"id": "rowsToFields",
|
||||
"options": {}
|
||||
}
|
||||
],
|
||||
"type": "stat"
|
||||
}
|
||||
],
|
||||
"refresh": "",
|
||||
"schemaVersion": 30,
|
||||
"style": "dark",
|
||||
"tags": [
|
||||
"gdev",
|
||||
"transform"
|
||||
],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Transforms - Rows to fields",
|
||||
"uid": "PMtIInink",
|
||||
"version": 1
|
||||
}
|
||||
@@ -1,19 +1,15 @@
|
||||
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
|
||||
|
||||
elasticsearch-latest:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.2
|
||||
command: elasticsearch
|
||||
environment:
|
||||
- "discovery.type=single-node"
|
||||
elasticsearch:
|
||||
image: elasticsearch:2.4.1
|
||||
command: elasticsearch -Des.network.host=0.0.0.0
|
||||
ports:
|
||||
- "14200:9200"
|
||||
- "14300:9300"
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
- ./docker/blocks/elastic/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
|
||||
fake-elastic-latest-data:
|
||||
fake-elastic-data:
|
||||
image: grafana/fake-data-gen
|
||||
links:
|
||||
- elasticsearch-latest
|
||||
network_mode: bridge
|
||||
environment:
|
||||
FD_SERVER: elasticsearch-latest
|
||||
FD_DATASOURCE: elasticsearch7
|
||||
FD_PORT: 9200
|
||||
FD_DATASOURCE: elasticsearch
|
||||
FD_PORT: 9200
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
script.inline: on
|
||||
script.indexed: on
|
||||
xpack.license.self_generated.type: basic
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
elasticsearch2:
|
||||
image: elasticsearch:2.4.1
|
||||
command: elasticsearch -Des.network.host=0.0.0.0
|
||||
ports:
|
||||
- "9200:9200"
|
||||
- "9300:9300"
|
||||
volumes:
|
||||
- ./docker/blocks/elastic2/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
|
||||
|
||||
fake-elastic-data:
|
||||
image: grafana/fake-data-gen
|
||||
network_mode: bridge
|
||||
environment:
|
||||
FD_DATASOURCE: elasticsearch2
|
||||
FD_PORT: 9200
|
||||
@@ -1,2 +0,0 @@
|
||||
script.inline: on
|
||||
script.indexed: on
|
||||
@@ -1,44 +0,0 @@
|
||||
# You need to run 'sysctl -w vm.max_map_count=262144' on the host machine
|
||||
|
||||
elasticsearch77:
|
||||
image: docker.elastic.co/elasticsearch/elasticsearch:7.7.1
|
||||
command: elasticsearch
|
||||
environment:
|
||||
- "discovery.type=single-node"
|
||||
ports:
|
||||
- "13200:9200"
|
||||
- "13300:9300"
|
||||
|
||||
fake-elastic77-data:
|
||||
image: grafana/fake-data-gen
|
||||
links:
|
||||
- elasticsearch77
|
||||
environment:
|
||||
FD_SERVER: elasticsearch77
|
||||
FD_DATASOURCE: elasticsearch7
|
||||
FD_PORT: 9200
|
||||
|
||||
filebeat77:
|
||||
image: docker.elastic.co/beats/filebeat:7.7.1
|
||||
command: filebeat -e -strict.perms=false
|
||||
volumes:
|
||||
- ./docker/blocks/elastic77/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
|
||||
- /var/log:/var/log:ro
|
||||
- ../data/log:/var/log/grafana:ro
|
||||
|
||||
metricbeat77:
|
||||
image: docker.elastic.co/beats/metricbeat:7.7.1
|
||||
command: metricbeat -e -strict.perms=false
|
||||
user: root
|
||||
volumes:
|
||||
- ./docker/blocks/elastic77/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
|
||||
kibana77:
|
||||
image: docker.elastic.co/kibana/kibana:7.7.1
|
||||
ports:
|
||||
- "5601:5601"
|
||||
links:
|
||||
- elasticsearch77
|
||||
environment:
|
||||
ELASTICSEARCH_HOSTS: http://elasticsearch77:9200
|
||||
@@ -1,3 +0,0 @@
|
||||
script.inline: on
|
||||
script.indexed: on
|
||||
xpack.license.self_generated.type: basic
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,38 +0,0 @@
|
||||
metricbeat.config:
|
||||
modules:
|
||||
path: ${path.config}/modules.d/*.yml
|
||||
# Reload module configs as they change:
|
||||
reload.enabled: false
|
||||
|
||||
metricbeat.autodiscover:
|
||||
providers:
|
||||
- type: docker
|
||||
hints.enabled: true
|
||||
|
||||
metricbeat.modules:
|
||||
- module: docker
|
||||
metricsets:
|
||||
- "container"
|
||||
- "cpu"
|
||||
- "diskio"
|
||||
- "healthcheck"
|
||||
- "info"
|
||||
#- "image"
|
||||
- "memory"
|
||||
- "network"
|
||||
hosts: ["unix:///var/run/docker.sock"]
|
||||
period: 10s
|
||||
enabled: true
|
||||
|
||||
processors:
|
||||
- add_cloud_metadata: ~
|
||||
|
||||
output.elasticsearch:
|
||||
hosts: ["elasticsearch77:9200"]
|
||||
index: "metricbeat-%{+yyyy.MM.dd}"
|
||||
|
||||
setup.template.name: "metricbeat"
|
||||
setup.template.pattern: "metricbeat-*"
|
||||
setup.template.settings:
|
||||
index.number_of_shards: 1
|
||||
index.number_of_replicas: 1
|
||||
@@ -24,12 +24,12 @@
|
||||
- influxdb
|
||||
|
||||
telegraf:
|
||||
image: telegraf:latest
|
||||
image: telegraf:1.10.4
|
||||
links:
|
||||
- influxdb
|
||||
depends_on:
|
||||
- influxdb_cli
|
||||
volumes:
|
||||
- ./docker/blocks/influxdb/telegraf.conf:/etc/telegraf/telegraf.conf:ro
|
||||
- /var/log:/var/log/host
|
||||
- /var/log:/var/log
|
||||
- ../data/log:/var/log/grafana
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
[[inputs.logparser]]
|
||||
files = [
|
||||
"/var/log/host/*.log",
|
||||
"/var/log/*.log",
|
||||
"/var/log/grafana/*.log"
|
||||
]
|
||||
[inputs.logparser.grok]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
influxdb1:
|
||||
image: influxdb:1.8
|
||||
image: influxdb:1.8.4-alpine
|
||||
container_name: influxdb1
|
||||
ports:
|
||||
- '2004:2004'
|
||||
@@ -22,11 +22,11 @@
|
||||
FD_PORT: 8086
|
||||
|
||||
telegraf-influxdb1:
|
||||
image: telegraf:latest
|
||||
image: telegraf:1.10.4
|
||||
links:
|
||||
- influxdb1
|
||||
volumes:
|
||||
- ./docker/blocks/influxdb1/telegraf.conf:/etc/telegraf/telegraf.conf:ro
|
||||
- /var/log:/var/log/host
|
||||
- /var/log:/var/log
|
||||
- ../data/log:/var/log/grafana
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
[[inputs.logparser]]
|
||||
files = [
|
||||
"/var/log/host/*.log",
|
||||
"/var/log/*.log",
|
||||
"/var/log/grafana/*.log"
|
||||
]
|
||||
[inputs.logparser.grok]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
jaeger:
|
||||
image: jaegertracing/all-in-one:latest
|
||||
ports:
|
||||
- "6831:6831/udp"
|
||||
- "6831:6831"
|
||||
- "16686:16686"
|
||||
# Additional loki to generate some traces
|
||||
# datasource URL: http://localhost:3100/
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# datasource URL: http://localhost:3100/
|
||||
loki:
|
||||
image: grafana/loki:latest
|
||||
image: grafana/loki:master
|
||||
ports:
|
||||
- "3100:3100"
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
promtail:
|
||||
image: grafana/promtail:latest
|
||||
image: grafana/promtail:master
|
||||
volumes:
|
||||
- ./docker/blocks/loki/config.yaml:/etc/promtail/docker-config.yaml
|
||||
- /var/log:/var/log
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
# This Dockerfile builds an image for a client_golang example.
|
||||
|
||||
# Builder image, where we build the example.
|
||||
FROM golang:1.17 AS builder
|
||||
FROM golang:1.15.1 AS builder
|
||||
# Download prometheus/client_golang/examples/random first
|
||||
RUN CGO_ENABLED=0 GOOS=linux go install -tags netgo -ldflags '-w' github.com/prometheus/client_golang/examples/random@latest
|
||||
RUN go get github.com/prometheus/client_golang/examples/random
|
||||
WORKDIR /go/src/github.com/prometheus/client_golang
|
||||
WORKDIR /go/src/github.com/prometheus/client_golang/prometheus
|
||||
RUN go get -d
|
||||
WORKDIR /go/src/github.com/prometheus/client_golang/examples/random
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w'
|
||||
|
||||
# Final image.
|
||||
FROM scratch
|
||||
LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>"
|
||||
COPY --from=builder /go/bin/random .
|
||||
COPY --from=builder /go/src/github.com/prometheus/client_golang/examples/random .
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["/random"]
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
ORIGIN_SERVER=http://host.docker.internal:9090/
|
||||
ORIGIN_SERVER=http://localhost:9090/
|
||||
SLEEP_DURATION=60s
|
||||
@@ -1,11 +1,7 @@
|
||||
FROM golang:latest as builder
|
||||
|
||||
FROM golang:latest
|
||||
ADD main.go /
|
||||
WORKDIR /
|
||||
RUN go mod init proxy
|
||||
RUN CGO_ENABLED=0 go build -o main .
|
||||
|
||||
FROM scratch
|
||||
WORKDIR /
|
||||
RUN GO111MODULE=off go build -o main .
|
||||
EXPOSE 3011
|
||||
COPY --from=builder /main /main
|
||||
ENTRYPOINT ["/main"]
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
slow_proxy:
|
||||
build: docker/blocks/slow_proxy
|
||||
network_mode: host
|
||||
ports:
|
||||
- "3011:3011"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
environment:
|
||||
ORIGIN_SERVER: ${ORIGIN_SERVER}
|
||||
SLEEP_DURATION: ${SLEEP_DURATION}
|
||||
@@ -12,14 +12,12 @@ import (
|
||||
func main() {
|
||||
origin := os.Getenv("ORIGIN_SERVER")
|
||||
if origin == "" {
|
||||
// it is never not-set, the default is in the `.env` file
|
||||
log.Fatalf("missing env-variable ORIGIN_SERVER")
|
||||
origin = "http://localhost:9090/"
|
||||
}
|
||||
|
||||
sleepDurationStr := os.Getenv("SLEEP_DURATION")
|
||||
if sleepDurationStr == "" {
|
||||
// it is never not-set, the default is in the `.env` file
|
||||
log.Fatalf("missing env-variable SLEEP_DURATION")
|
||||
sleepDurationStr = "60s"
|
||||
}
|
||||
|
||||
sleep, err := time.ParseDuration(sleepDurationStr)
|
||||
|
||||
7
devenv/docker/blocks/slow_proxy_mac/Dockerfile
Normal file
7
devenv/docker/blocks/slow_proxy_mac/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
FROM golang:latest
|
||||
ADD main.go /
|
||||
WORKDIR /
|
||||
RUN GO111MODULE=off go build -o main .
|
||||
EXPOSE 3011
|
||||
ENTRYPOINT ["/main"]
|
||||
6
devenv/docker/blocks/slow_proxy_mac/docker-compose.yaml
Normal file
6
devenv/docker/blocks/slow_proxy_mac/docker-compose.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
slow_proxy_mac:
|
||||
build: docker/blocks/slow_proxy_mac
|
||||
ports:
|
||||
- '3011:3011'
|
||||
environment:
|
||||
ORIGIN_SERVER: 'http://host.docker.internal:9090/'
|
||||
31
devenv/docker/blocks/slow_proxy_mac/main.go
Normal file
31
devenv/docker/blocks/slow_proxy_mac/main.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
|
||||
func main() {
|
||||
origin := os.Getenv("ORIGIN_SERVER")
|
||||
if origin == "" {
|
||||
origin = "http://host.docker.internal:9090/"
|
||||
}
|
||||
|
||||
sleep := time.Minute
|
||||
|
||||
originURL, _ := url.Parse(origin)
|
||||
proxy := httputil.NewSingleHostReverseProxy(originURL)
|
||||
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
fmt.Printf("sleeping for %s then proxying request: %s", sleep.String(), r.RequestURI)
|
||||
<-time.After(sleep)
|
||||
proxy.ServeHTTP(w, r)
|
||||
})
|
||||
|
||||
log.Fatal(http.ListenAndServe(":3011", nil))
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
grafana/provisioning/dashboards/alerts/alert-*
|
||||
@@ -1,66 +0,0 @@
|
||||
# Grafana Unified Alerting High Availability (HA) test setup
|
||||
|
||||
A set of docker compose services which together creates a Grafana HA test setup for unified alerting.
|
||||
|
||||
Included services
|
||||
|
||||
- Grafana
|
||||
- Mysql - Grafana configuration database, exporter for metrics and session storage
|
||||
- Prometheus - Monitoring of Grafana and used as data source
|
||||
- Nginx - Reverse proxy for Grafana and Prometheus. Enables browsing Grafana/Prometheus UI using a hostname
|
||||
|
||||
## Prerequisites
|
||||
|
||||
### Build grafana docker container
|
||||
|
||||
Build a Grafana docker container from current branch and commit and tag it as grafana/grafana:dev.
|
||||
|
||||
```bash
|
||||
$ cd <grafana repo>
|
||||
$ make build-docker-full
|
||||
```
|
||||
|
||||
### Virtual host names
|
||||
|
||||
#### Alternative 1 - Use dnsmasq
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install dnsmasq
|
||||
$ echo 'address=/loc/127.0.0.1' | sudo tee /etc/dnsmasq.d/dnsmasq-loc.conf > /dev/null
|
||||
$ sudo /etc/init.d/dnsmasq restart
|
||||
$ ping whatever.loc
|
||||
PING whatever.loc (127.0.0.1) 56(84) bytes of data.
|
||||
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.076 ms
|
||||
--- whatever.loc ping statistics ---
|
||||
1 packet transmitted, 1 received, 0% packet loss, time 1998ms
|
||||
```
|
||||
|
||||
#### Alternative 2 - Manually update /etc/hosts
|
||||
|
||||
Update your `/etc/hosts` to be able to access Grafana and/or Prometheus UI using a hostname.
|
||||
|
||||
```bash
|
||||
$ cat /etc/hosts
|
||||
127.0.0.1 grafana.loc
|
||||
127.0.0.1 prometheus.loc
|
||||
```
|
||||
|
||||
## Start services
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||
Browse
|
||||
- http://grafana.loc/
|
||||
- http://prometheus.loc/
|
||||
|
||||
|
||||
## Test alerting
|
||||
|
||||
### Create contact points
|
||||
TBD
|
||||
### Create alerts
|
||||
TBD
|
||||
### Create silences
|
||||
TBD
|
||||
@@ -1,90 +0,0 @@
|
||||
version: "2.1"
|
||||
|
||||
services:
|
||||
db:
|
||||
image: mysql:5.6
|
||||
platform: linux/x86_64
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: grafana
|
||||
MYSQL_USER: grafana
|
||||
MYSQL_PASSWORD: password
|
||||
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb_monitor_enable=all, --max-connections=1001]
|
||||
ports:
|
||||
- 3306
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
mysqld-exporter:
|
||||
image: prom/mysqld-exporter
|
||||
environment:
|
||||
- DATA_SOURCE_NAME=root:rootpass@(db:3306)/
|
||||
ports:
|
||||
- 9104
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
prometheus:
|
||||
image: prom/prometheus:v2.4.2
|
||||
volumes:
|
||||
- ./prometheus/:/etc/prometheus/
|
||||
environment:
|
||||
- VIRTUAL_HOST=prometheus.loc
|
||||
ports:
|
||||
- 909
|
||||
nginx-proxy:
|
||||
image: jwilder/nginx-proxy
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/tmp/docker.sock:ro
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
grafana1:
|
||||
image: grafana/grafana:dev
|
||||
volumes:
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/
|
||||
environment:
|
||||
- VIRTUAL_HOST=grafana.loc
|
||||
- GF_FEATURE_TOGGLES_ENABLE=ngalert
|
||||
- GF_UNIFIED_ALERTING_HA_PEERS=ha-test-unified-alerting_grafana2_1:9094,ha-test-unified-alerting_grafana1_1:9094
|
||||
- GF_SERVER_ROOT_URL=http://grafana.loc
|
||||
- GF_DATABASE_NAME=grafana
|
||||
- GF_DATABASE_USER=grafana
|
||||
- GF_DATABASE_PASSWORD=password
|
||||
- GF_DATABASE_TYPE=mysql
|
||||
- GF_DATABASE_HOST=db:3306
|
||||
- GF_DATABASE_MAX_OPEN_CONN=300
|
||||
- GF_SESSION_PROVIDER=mysql
|
||||
- GF_SESSION_PROVIDER_CONFIG=grafana:password@tcp(db:3306)/grafana?allowNativePasswords=true
|
||||
ports:
|
||||
- 3010:3000
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
grafana2:
|
||||
image: grafana/grafana:dev
|
||||
volumes:
|
||||
- ./grafana/provisioning/:/etc/grafana/provisioning/
|
||||
environment:
|
||||
- VIRTUAL_HOST=grafana.loc
|
||||
- GF_FEATURE_TOGGLES_ENABLE=ngalert
|
||||
- GF_UNIFIED_ALERTING_HA_PEERS=ha-test-unified-alerting_grafana2_1:9094,ha-test-unified-alerting_grafana1_1:9094
|
||||
- GF_SERVER_ROOT_URL=http://grafana.loc
|
||||
- GF_DATABASE_NAME=grafana
|
||||
- GF_DATABASE_USER=grafana
|
||||
- GF_DATABASE_PASSWORD=password
|
||||
- GF_DATABASE_TYPE=mysql
|
||||
- GF_DATABASE_HOST=db:3306
|
||||
- GF_DATABASE_MAX_OPEN_CONN=300
|
||||
- GF_SESSION_PROVIDER=mysql
|
||||
- GF_SESSION_PROVIDER_CONFIG=grafana:password@tcp(db:3306)/grafana?allowNativePasswords=true
|
||||
ports:
|
||||
- 3020:3000
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
@@ -1,203 +0,0 @@
|
||||
local numAlerts = std.extVar('alerts');
|
||||
local condition = std.extVar('condition');
|
||||
local arr = std.range(1, numAlerts);
|
||||
|
||||
local alertDashboardTemplate = {
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"id": null,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"alert": {
|
||||
"conditions": [
|
||||
{
|
||||
"evaluator": {
|
||||
"params": [
|
||||
65
|
||||
],
|
||||
"type": "gt"
|
||||
},
|
||||
"operator": {
|
||||
"type": "and"
|
||||
},
|
||||
"query": {
|
||||
"params": [
|
||||
"A",
|
||||
"5m",
|
||||
"now"
|
||||
]
|
||||
},
|
||||
"reducer": {
|
||||
"params": [],
|
||||
"type": "avg"
|
||||
},
|
||||
"type": "query"
|
||||
}
|
||||
],
|
||||
"executionErrorState": "alerting",
|
||||
"frequency": "10s",
|
||||
"handler": 1,
|
||||
"for": "1m",
|
||||
"name": "bulk alerting",
|
||||
"noDataState": "no_data",
|
||||
"notifications": [
|
||||
{
|
||||
"id": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "Prometheus",
|
||||
"fill": 1,
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"$$hashKey": "object:117",
|
||||
"expr": "go_goroutines",
|
||||
"format": "time_series",
|
||||
"intervalFactor": 1,
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"thresholds": [
|
||||
{
|
||||
"colorMode": "critical",
|
||||
"fill": true,
|
||||
"line": true,
|
||||
"op": "gt",
|
||||
"value": 50
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Panel Title",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"schemaVersion": 16,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "New dashboard",
|
||||
"uid": null,
|
||||
"version": 0
|
||||
};
|
||||
|
||||
|
||||
{
|
||||
['alert-' + std.toString(x) + '.json']:
|
||||
alertDashboardTemplate + {
|
||||
panels: [
|
||||
alertDashboardTemplate.panels[0] +
|
||||
{
|
||||
alert+: {
|
||||
name: 'Alert rule ' + x,
|
||||
conditions: [
|
||||
alertDashboardTemplate.panels[0].alert.conditions[0] +
|
||||
{
|
||||
evaluator+: {
|
||||
params: [condition]
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
uid: 'alert-' + x,
|
||||
title: 'Alert ' + x
|
||||
},
|
||||
for x in arr
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"aliasColors": {
|
||||
"Active alerts": "#bf1b00"
|
||||
},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": "Prometheus",
|
||||
"fill": 1,
|
||||
"gridPos": {
|
||||
"h": 12,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"interval": "",
|
||||
"legend": {
|
||||
"alignAsTable": true,
|
||||
"avg": false,
|
||||
"current": true,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"rightSide": true,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": true
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 2,
|
||||
"links": [],
|
||||
"nullPointMode": "null",
|
||||
"percentage": false,
|
||||
"pointradius": 5,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [
|
||||
{
|
||||
"alias": "Active grafana instances",
|
||||
"dashes": true,
|
||||
"fill": 0
|
||||
}
|
||||
],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"expr": "sum(increase(grafana_alerting_notification_sent_total[1m])) by(job)",
|
||||
"format": "time_series",
|
||||
"instant": false,
|
||||
"interval": "1m",
|
||||
"intervalFactor": 1,
|
||||
"legendFormat": "Notifications sent",
|
||||
"refId": "A"
|
||||
},
|
||||
{
|
||||
"expr": "min(grafana_alerting_active_alerts) without(instance)",
|
||||
"format": "time_series",
|
||||
"interval": "1m",
|
||||
"intervalFactor": 1,
|
||||
"legendFormat": "Active alerts",
|
||||
"refId": "B"
|
||||
},
|
||||
{
|
||||
"expr": "count(up{job=\"grafana\"})",
|
||||
"format": "time_series",
|
||||
"intervalFactor": 1,
|
||||
"legendFormat": "Active grafana instances",
|
||||
"refId": "C"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Notifications sent vs active alerts",
|
||||
"tooltip": {
|
||||
"shared": true,
|
||||
"sort": 0,
|
||||
"value_type": "individual"
|
||||
},
|
||||
"type": "graph",
|
||||
"xaxis": {
|
||||
"buckets": null,
|
||||
"mode": "time",
|
||||
"name": null,
|
||||
"show": true,
|
||||
"values": []
|
||||
},
|
||||
"yaxes": [
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": "0",
|
||||
"show": true
|
||||
},
|
||||
{
|
||||
"format": "short",
|
||||
"label": null,
|
||||
"logBase": 1,
|
||||
"max": null,
|
||||
"min": null,
|
||||
"show": true
|
||||
}
|
||||
],
|
||||
"yaxis": {
|
||||
"align": false,
|
||||
"alignLevel": 3
|
||||
}
|
||||
}
|
||||
],
|
||||
"schemaVersion": 16,
|
||||
"style": "dark",
|
||||
"tags": [],
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"time": {
|
||||
"from": "now-1h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
],
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Overview",
|
||||
"uid": "xHy7-hAik",
|
||||
"version": 6
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
apiVersion: 1
|
||||
|
||||
providers:
|
||||
- name: 'Alerts'
|
||||
folder: 'Alerts'
|
||||
type: file
|
||||
options:
|
||||
path: /etc/grafana/provisioning/dashboards/alerts
|
||||
|
||||
- name: 'MySQL'
|
||||
folder: 'MySQL'
|
||||
type: file
|
||||
options:
|
||||
path: /etc/grafana/provisioning/dashboards/mysql
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +0,0 @@
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
- name: Prometheus
|
||||
type: prometheus
|
||||
access: proxy
|
||||
url: http://prometheus:9090
|
||||
jsonData:
|
||||
timeInterval: 10s
|
||||
queryTimeout: 30s
|
||||
httpMethod: POST
|
||||
|
||||
- name: Loki
|
||||
type: loki
|
||||
access: proxy
|
||||
url: http://loki:3100
|
||||
@@ -1,47 +0,0 @@
|
||||
# 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: 'grafana'
|
||||
dns_sd_configs:
|
||||
- names:
|
||||
- 'grafana'
|
||||
type: 'A'
|
||||
port: 3000
|
||||
refresh_interval: 10s
|
||||
|
||||
- job_name: 'mysql'
|
||||
dns_sd_configs:
|
||||
- names:
|
||||
- 'mysqld-exporter'
|
||||
type: 'A'
|
||||
port: 9104
|
||||
refresh_interval: 10s
|
||||
|
||||
- job_name: 'loki'
|
||||
dns_sd_configs:
|
||||
- names:
|
||||
- 'loki'
|
||||
type: 'A'
|
||||
port: 3100
|
||||
refresh_interval: 10s
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user