Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92461d8d1e | ||
|
|
c048378ad5 |
@@ -6967,8 +6967,8 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "49"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "50"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "51"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "52"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "53"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "52"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "53"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "54"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "55"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "56"],
|
||||
@@ -6977,7 +6977,10 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "59"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "60"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "61"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "62"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "62"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "63"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "64"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "65"]
|
||||
],
|
||||
"public/app/plugins/datasource/graphite/datasource_integration.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
|
||||
@@ -29,17 +29,17 @@ $(DRONE): $(BINGO_DIR)/drone.mod
|
||||
@echo "(re)installing $(GOBIN)/drone-v1.5.0"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=drone.mod -o=$(GOBIN)/drone-v1.5.0 "github.com/drone/drone-cli/drone"
|
||||
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.49.0
|
||||
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.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)/golangci-lint-v1.49.0"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.49.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
|
||||
SWAGGER := $(GOBIN)/swagger-v0.30.2
|
||||
SWAGGER := $(GOBIN)/swagger-v0.29.0
|
||||
$(SWAGGER): $(BINGO_DIR)/swagger.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)/swagger-v0.30.2"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.30.2 "github.com/go-swagger/go-swagger/cmd/swagger"
|
||||
@echo "(re)installing $(GOBIN)/swagger-v0.29.0"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=swagger.mod -o=$(GOBIN)/swagger-v0.29.0 "github.com/go-swagger/go-swagger/cmd/swagger"
|
||||
|
||||
GOLANGCI_LINT := $(GOBIN)/golangci-lint-v1.40.1
|
||||
$(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.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)/golangci-lint-v1.40.1"
|
||||
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.40.1 "github.com/golangci/golangci-lint/cmd/golangci-lint"
|
||||
|
||||
WIRE := $(GOBIN)/wire-v0.5.0
|
||||
$(WIRE): $(BINGO_DIR)/wire.mod
|
||||
|
||||
@@ -1,174 +1,5 @@
|
||||
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.19
|
||||
go 1.17
|
||||
|
||||
require github.com/golangci/golangci-lint v1.49.0 // cmd/golangci-lint
|
||||
|
||||
require (
|
||||
4d63.com/gochecknoglobals v0.1.0 // indirect
|
||||
github.com/Antonboom/errname v0.1.7 // indirect
|
||||
github.com/Antonboom/nilnil v0.1.1 // indirect
|
||||
github.com/BurntSushi/toml v1.2.0 // indirect
|
||||
github.com/Djarvur/go-err113 v0.0.0-20210108212216-aea10b59be24 // indirect
|
||||
github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 // indirect
|
||||
github.com/Masterminds/semver v1.5.0 // indirect
|
||||
github.com/OpenPeeDeeP/depguard v1.1.0 // indirect
|
||||
github.com/alexkohler/prealloc v1.0.0 // indirect
|
||||
github.com/alingse/asasalint v0.0.11 // indirect
|
||||
github.com/ashanbrown/forbidigo v1.3.0 // indirect
|
||||
github.com/ashanbrown/makezero v1.1.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bkielbasa/cyclop v1.2.0 // indirect
|
||||
github.com/blizzy78/varnamelen v0.8.0 // indirect
|
||||
github.com/bombsimon/wsl/v3 v3.3.0 // indirect
|
||||
github.com/breml/bidichk v0.2.3 // indirect
|
||||
github.com/breml/errchkjson v0.3.0 // indirect
|
||||
github.com/butuzov/ireturn v0.1.1 // indirect
|
||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||
github.com/charithe/durationcheck v0.0.9 // indirect
|
||||
github.com/chavacava/garif v0.0.0-20220630083739-93517212f375 // indirect
|
||||
github.com/curioswitch/go-reassign v0.1.2 // indirect
|
||||
github.com/daixiang0/gci v0.6.3 // indirect
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/denis-tingaikin/go-header v0.4.3 // indirect
|
||||
github.com/esimonov/ifshort v1.0.4 // indirect
|
||||
github.com/ettle/strcase v0.1.1 // indirect
|
||||
github.com/fatih/color v1.13.0 // indirect
|
||||
github.com/fatih/structtag v1.2.0 // indirect
|
||||
github.com/firefart/nonamedreturns v1.0.4 // indirect
|
||||
github.com/fsnotify/fsnotify v1.5.4 // indirect
|
||||
github.com/fzipp/gocyclo v0.6.0 // indirect
|
||||
github.com/go-critic/go-critic v0.6.4 // indirect
|
||||
github.com/go-toolsmith/astcast v1.0.0 // indirect
|
||||
github.com/go-toolsmith/astcopy v1.0.1 // indirect
|
||||
github.com/go-toolsmith/astequal v1.0.2 // indirect
|
||||
github.com/go-toolsmith/astfmt v1.0.0 // indirect
|
||||
github.com/go-toolsmith/astp v1.0.0 // indirect
|
||||
github.com/go-toolsmith/strparse v1.0.0 // indirect
|
||||
github.com/go-toolsmith/typep v1.0.2 // indirect
|
||||
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b // indirect
|
||||
github.com/gobwas/glob v0.2.3 // indirect
|
||||
github.com/gofrs/flock v0.8.1 // indirect
|
||||
github.com/golang/protobuf v1.5.2 // indirect
|
||||
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
|
||||
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
|
||||
github.com/golangci/go-misc v0.0.0-20220329215616-d24fe342adfe // indirect
|
||||
github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a // indirect
|
||||
github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 // indirect
|
||||
github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca // indirect
|
||||
github.com/golangci/misspell v0.3.5 // indirect
|
||||
github.com/golangci/revgrep v0.0.0-20220804021717-745bb2f7c2e6 // indirect
|
||||
github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4 // indirect
|
||||
github.com/google/go-cmp v0.5.8 // indirect
|
||||
github.com/gordonklaus/ineffassign v0.0.0-20210914165742-4cc7213b9bc8 // indirect
|
||||
github.com/gostaticanalysis/analysisutil v0.7.1 // indirect
|
||||
github.com/gostaticanalysis/comment v1.4.2 // indirect
|
||||
github.com/gostaticanalysis/forcetypeassert v0.1.0 // indirect
|
||||
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
|
||||
github.com/hashicorp/errwrap v1.0.0 // indirect
|
||||
github.com/hashicorp/go-multierror v1.1.1 // indirect
|
||||
github.com/hashicorp/go-version v1.6.0 // indirect
|
||||
github.com/hashicorp/hcl v1.0.0 // indirect
|
||||
github.com/hexops/gotextdiff v1.0.3 // indirect
|
||||
github.com/inconshreveable/mousetrap v1.0.0 // indirect
|
||||
github.com/jgautheron/goconst v1.5.1 // indirect
|
||||
github.com/jingyugao/rowserrcheck v1.1.1 // indirect
|
||||
github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af // indirect
|
||||
github.com/julz/importas v0.1.0 // indirect
|
||||
github.com/kisielk/errcheck v1.6.2 // indirect
|
||||
github.com/kisielk/gotool v1.0.0 // indirect
|
||||
github.com/kulti/thelper v0.6.3 // indirect
|
||||
github.com/kunwardeep/paralleltest v1.0.6 // indirect
|
||||
github.com/kyoh86/exportloopref v0.1.8 // indirect
|
||||
github.com/ldez/gomoddirectives v0.2.3 // indirect
|
||||
github.com/ldez/tagliatelle v0.3.1 // indirect
|
||||
github.com/leonklingele/grouper v1.1.0 // indirect
|
||||
github.com/lufeee/execinquery v1.2.1 // indirect
|
||||
github.com/magiconair/properties v1.8.6 // indirect
|
||||
github.com/maratori/testpackage v1.1.0 // indirect
|
||||
github.com/matoous/godox v0.0.0-20210227103229-6504466cf951 // indirect
|
||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||
github.com/mattn/go-isatty v0.0.16 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.9 // indirect
|
||||
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
|
||||
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
|
||||
github.com/mgechev/revive v1.2.3 // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/mitchellh/mapstructure v1.5.0 // indirect
|
||||
github.com/moricho/tparallel v0.2.1 // indirect
|
||||
github.com/nakabonne/nestif v0.3.1 // indirect
|
||||
github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 // indirect
|
||||
github.com/nishanths/exhaustive v0.8.1 // indirect
|
||||
github.com/nishanths/predeclared v0.2.2 // indirect
|
||||
github.com/olekukonko/tablewriter v0.0.5 // indirect
|
||||
github.com/pelletier/go-toml v1.9.5 // indirect
|
||||
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
|
||||
github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d // indirect
|
||||
github.com/pkg/errors v0.9.1 // indirect
|
||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||
github.com/polyfloyd/go-errorlint v1.0.2 // indirect
|
||||
github.com/prometheus/client_golang v1.12.1 // indirect
|
||||
github.com/prometheus/client_model v0.2.0 // indirect
|
||||
github.com/prometheus/common v0.32.1 // indirect
|
||||
github.com/prometheus/procfs v0.7.3 // indirect
|
||||
github.com/quasilyte/go-ruleguard v0.3.17 // indirect
|
||||
github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect
|
||||
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
|
||||
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
|
||||
github.com/ryancurrah/gomodguard v1.2.4 // indirect
|
||||
github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect
|
||||
github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect
|
||||
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
|
||||
github.com/sashamelentyev/usestdlibvars v1.13.0 // indirect
|
||||
github.com/securego/gosec/v2 v2.13.1 // indirect
|
||||
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
|
||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
||||
github.com/sivchari/containedctx v1.0.2 // indirect
|
||||
github.com/sivchari/nosnakecase v1.7.0 // indirect
|
||||
github.com/sivchari/tenv v1.7.0 // indirect
|
||||
github.com/sonatard/noctx v0.0.1 // indirect
|
||||
github.com/sourcegraph/go-diff v0.6.1 // indirect
|
||||
github.com/spf13/afero v1.8.2 // indirect
|
||||
github.com/spf13/cast v1.5.0 // indirect
|
||||
github.com/spf13/cobra v1.5.0 // indirect
|
||||
github.com/spf13/jwalterweatherman v1.1.0 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.12.0 // indirect
|
||||
github.com/ssgreg/nlreturn/v2 v2.2.1 // indirect
|
||||
github.com/stbenjam/no-sprintf-host-port v0.1.1 // indirect
|
||||
github.com/stretchr/objx v0.4.0 // indirect
|
||||
github.com/stretchr/testify v1.8.0 // indirect
|
||||
github.com/subosito/gotenv v1.4.0 // indirect
|
||||
github.com/sylvia7788/contextcheck v1.0.6 // indirect
|
||||
github.com/tdakkota/asciicheck v0.1.1 // indirect
|
||||
github.com/tetafro/godot v1.4.11 // indirect
|
||||
github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect
|
||||
github.com/timonwong/logrlint v0.1.0 // indirect
|
||||
github.com/tomarrell/wrapcheck/v2 v2.6.2 // indirect
|
||||
github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect
|
||||
github.com/ultraware/funlen v0.0.3 // indirect
|
||||
github.com/ultraware/whitespace v0.0.5 // indirect
|
||||
github.com/uudashr/gocognit v1.0.6 // indirect
|
||||
github.com/yagipy/maintidx v1.0.0 // indirect
|
||||
github.com/yeya24/promlinter v0.2.0 // indirect
|
||||
gitlab.com/bosi/decorder v0.2.3 // indirect
|
||||
go.uber.org/atomic v1.7.0 // indirect
|
||||
go.uber.org/multierr v1.6.0 // indirect
|
||||
go.uber.org/zap v1.17.0 // indirect
|
||||
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
|
||||
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
|
||||
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
|
||||
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab // indirect
|
||||
golang.org/x/text v0.3.7 // indirect
|
||||
golang.org/x/tools v0.1.12 // indirect
|
||||
google.golang.org/protobuf v1.28.0 // indirect
|
||||
gopkg.in/ini.v1 v1.66.6 // indirect
|
||||
gopkg.in/yaml.v2 v2.4.0 // indirect
|
||||
gopkg.in/yaml.v3 v3.0.1 // indirect
|
||||
honnef.co/go/tools v0.3.3 // indirect
|
||||
mvdan.cc/gofumpt v0.3.1 // indirect
|
||||
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect
|
||||
mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect
|
||||
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442 // indirect
|
||||
)
|
||||
require github.com/golangci/golangci-lint v1.40.1 // cmd/golangci-lint
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,4 +2,4 @@ module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
|
||||
|
||||
go 1.18
|
||||
|
||||
require github.com/go-swagger/go-swagger v0.30.2 // cmd/swagger
|
||||
require github.com/go-swagger/go-swagger v0.29.0 // cmd/swagger
|
||||
|
||||
@@ -1,86 +1,48 @@
|
||||
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
|
||||
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
|
||||
github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8=
|
||||
github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
|
||||
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
|
||||
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ=
|
||||
github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o=
|
||||
github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk=
|
||||
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
|
||||
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
|
||||
github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU=
|
||||
github.com/go-openapi/analysis v0.21.4 h1:ZDFLvSNxpDaomuCueM0BlSXxpANBlFYiBvr+GXrvIHc=
|
||||
github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8=
|
||||
github.com/go-openapi/errors v0.20.3 h1:rz6kiC84sqNQoqrtulzaL/VERgkoCyB6WdEkc2ujzUc=
|
||||
github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4=
|
||||
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
|
||||
github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
|
||||
github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA=
|
||||
github.com/go-openapi/loads v0.21.0 h1:jYtUO4wwP7psAweisP/MDoOpdzsYEESdoPcsWjHDR68=
|
||||
github.com/go-openapi/loads v0.21.2 h1:r2a/xFIYeZ4Qd2TnGpWDIQNcP80dIaZgf704za8enro=
|
||||
github.com/go-openapi/runtime v0.21.1 h1:/KIG00BzA2x2HRStX2tnhbqbQdPcFlkgsYCiNY20FZs=
|
||||
github.com/go-openapi/runtime v0.24.1 h1:Sml5cgQKGYQHF+M7yYSHaH1eOjvTykrddTE/KtQVjqo=
|
||||
github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
|
||||
github.com/go-openapi/spec v0.20.7 h1:1Rlu/ZrOCCob0n+JKKJAWhNWMPW8bOZRg8FJaY+0SKI=
|
||||
github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM=
|
||||
github.com/go-openapi/strfmt v0.21.3 h1:xwhj5X6CjXEZZHMWy1zKJxvW9AfHC9pkyUjLvHtKG7o=
|
||||
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
|
||||
github.com/go-openapi/swag v0.22.3 h1:yMBqmnQ0gyZvEb/+KzuWZOXgllrXT4SADYbvDaXHv/g=
|
||||
github.com/go-openapi/validate v0.20.3 h1:GZPPhhKSZrE8HjB4eEkoYAZmoWA4+tCemSgINH1/vKw=
|
||||
github.com/go-openapi/validate v0.22.0 h1:b0QecH6VslW/TxtpKgzpO1SNG7GU2FsaqKdP1E2T50Y=
|
||||
github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
|
||||
github.com/go-swagger/go-swagger v0.29.0 h1:z3YoZtLvS1Y8TE/PCat1VypcZxM0IgKLt0NvZxQyNl8=
|
||||
github.com/go-swagger/go-swagger v0.29.0/go.mod h1:Z4GJzI+bHKKkGB2Ji1rawpi3/ldXX8CkzGIa9HAC5EE=
|
||||
github.com/go-swagger/go-swagger v0.30.2 h1:23odPUyQZdkNFZZSBJ3mqYYcdh+LnuReEbdWN18OMRo=
|
||||
github.com/go-swagger/go-swagger v0.30.2/go.mod h1:neDPes8r8PCz2JPvHRDj8BTULLh4VJUt7n6MpQqxhHM=
|
||||
github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y=
|
||||
github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4=
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw=
|
||||
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
|
||||
github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=
|
||||
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
|
||||
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
|
||||
github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo=
|
||||
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
|
||||
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
|
||||
github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
|
||||
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
|
||||
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
|
||||
github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
|
||||
github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
|
||||
github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8=
|
||||
github.com/pelletier/go-toml/v2 v2.0.1 h1:8e3L2cCQzLFi2CR4g7vGFuFxX7Jl1kKX8gW+iV0GUKU=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg=
|
||||
github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
|
||||
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
|
||||
github.com/spf13/afero v1.8.0 h1:5MmtuhAgYeU6qpa7w7bP0dv6MBYuup0vekhSpSkoq60=
|
||||
github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo=
|
||||
github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
|
||||
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
|
||||
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
|
||||
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
|
||||
github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk=
|
||||
github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ=
|
||||
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
|
||||
github.com/subosito/gotenv v1.3.0 h1:mjC+YW8QpAdXibNi+vNWgzmgBH4+5l5dCXv8cNysBLI=
|
||||
github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9rrstGQ=
|
||||
go.mongodb.org/mongo-driver v1.8.2 h1:8ssUXufb90ujcIvR6MyE1SchaNj0SFxsakiZgxIyrMk=
|
||||
go.mongodb.org/mongo-driver v1.10.1 h1:NujsPveKwHaWuKUer/ceo9DzEe7HIj1SlJ6uvXZG0S4=
|
||||
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 h1:Y/gsMcFOcR+6S6f3YeMKl5g+dZMEWqcz5Czj/GWYbkM=
|
||||
golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
|
||||
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
|
||||
golang.org/x/net v0.0.0-20220121210141-e204ce36a2ba h1:6u6sik+bn/y7vILcYkK3iwTBWN7WtBvB0+SZswQnbf8=
|
||||
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0=
|
||||
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 h1:v6hYoSR9T5oet+pMXwUWkbiVqx/63mlHjefrHmxwfeY=
|
||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
||||
golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w=
|
||||
golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
|
||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
||||
gopkg.in/ini.v1 v1.66.3 h1:jRskFVxYaMGAMUbN0UZ7niA9gzL9B49DOqE78vg0k3w=
|
||||
gopkg.in/ini.v1 v1.66.4 h1:SsAcf+mM7mRZo2nJNGt8mZCjG8ZRaNGMURJw7BsIST4=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||
|
||||
@@ -12,9 +12,9 @@ BRA="${GOBIN}/bra-v0.0.0-20200517080246-1e3013ecaff8"
|
||||
|
||||
DRONE="${GOBIN}/drone-v1.5.0"
|
||||
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.49.0"
|
||||
SWAGGER="${GOBIN}/swagger-v0.29.0"
|
||||
|
||||
SWAGGER="${GOBIN}/swagger-v0.30.2"
|
||||
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.40.1"
|
||||
|
||||
WIRE="${GOBIN}/wire-v0.5.0"
|
||||
|
||||
|
||||
516
.drone.yml
516
.drone.yml
File diff suppressed because it is too large
Load Diff
26
CHANGELOG.md
26
CHANGELOG.md
@@ -1,29 +1,3 @@
|
||||
<!-- 9.1.6 START -->
|
||||
|
||||
# 9.1.6 (2022-09-20)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Auth:** Trigger auth token cleanup job. (Enterprise)
|
||||
- **DataSource:** Adding possibility to hide queries from the inspector. [#54892](https://github.com/grafana/grafana/pull/54892), [@mckn](https://github.com/mckn)
|
||||
- **Inspect:** Hide Actions tab when it is empty. [#55272](https://github.com/grafana/grafana/pull/55272), [@ryantxu](https://github.com/ryantxu)
|
||||
- **PanelMenu:** Remove hide legend action as it was showing on all panel types. [#54876](https://github.com/grafana/grafana/pull/54876), [@torkelo](https://github.com/torkelo)
|
||||
- **Provisioning Contact points:** Support disableResolveMessage via YAML. [#54122](https://github.com/grafana/grafana/pull/54122), [@mmusenbr](https://github.com/mmusenbr)
|
||||
- **PublicDashboards:** Support subpaths when generating pubdash url. [#55204](https://github.com/grafana/grafana/pull/55204), [@owensmallwood](https://github.com/owensmallwood)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix legacy migration crash when rule name is too long. [#55053](https://github.com/grafana/grafana/pull/55053), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Fix send resolved notifications. [#54793](https://github.com/grafana/grafana/pull/54793), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Azure Monitor:** Fix migration issue with MetricDefinitionsQuery template variable query types. [#55262](https://github.com/grafana/grafana/pull/55262), [@yaelleC](https://github.com/yaelleC)
|
||||
- **Browse:** Hide dashboard actions if user does not have enough permission. [#55218](https://github.com/grafana/grafana/pull/55218), [@lpskdl](https://github.com/lpskdl)
|
||||
- **ElasticSearch:** Fix dispatching queries at a wrong time. [#55225](https://github.com/grafana/grafana/pull/55225), [@svennergr](https://github.com/svennergr)
|
||||
- **Panel:** Disable legends when showLegend is false prior to schema v37. [#55126](https://github.com/grafana/grafana/pull/55126), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **Prometheus:** Fix metadata requests for browser access mode. [#55403](https://github.com/grafana/grafana/pull/55403), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Search:** Avoid requesting all dashboards when in Folder View. [#55169](https://github.com/grafana/grafana/pull/55169), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **TablePanel/StatPanel:** Fix values not being visible when background transparent. [#55092](https://github.com/grafana/grafana/pull/55092), [@mdvictor](https://github.com/mdvictor)
|
||||
|
||||
<!-- 9.1.6 END -->
|
||||
<!-- 9.1.5 START -->
|
||||
|
||||
# 9.1.5 (2022-09-12)
|
||||
|
||||
@@ -20,7 +20,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.19.1-alpine3.15 as go-builder
|
||||
FROM golang:1.17.12-alpine3.15 as go-builder
|
||||
|
||||
RUN apk add --no-cache gcc g++ make
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.19.1 AS go-builder
|
||||
FROM golang:1.17.12 AS go-builder
|
||||
|
||||
WORKDIR /src/grafana
|
||||
|
||||
|
||||
2
Makefile
2
Makefile
@@ -129,7 +129,7 @@ test: test-go test-js ## Run all tests.
|
||||
golangci-lint: $(GOLANGCI_LINT)
|
||||
@echo "lint via golangci-lint"
|
||||
$(GOLANGCI_LINT) run \
|
||||
--config .golangci.toml \
|
||||
--config ./conf/.golangci.toml \
|
||||
$(GO_FILES)
|
||||
|
||||
lint-go: golangci-lint ## Run all code checks for backend. You can use GO_FILES to specify exact files to check
|
||||
|
||||
@@ -22,12 +22,13 @@ rules = "pkg/ruleguard.rules.go"
|
||||
disable-all = true
|
||||
enable = [
|
||||
"bodyclose",
|
||||
"deadcode",
|
||||
"depguard",
|
||||
"dogsled",
|
||||
"errcheck",
|
||||
# "gochecknoinits",
|
||||
"goconst",
|
||||
# "gocritic", # Temporarily disabled on 2022-09-09, running into weird bug "ruleguard: execution error: used Run() with an empty rule set; forgot to call Load() first?"
|
||||
"gocritic",
|
||||
"goimports",
|
||||
"goprintffuncname",
|
||||
"gosec",
|
||||
@@ -39,10 +40,12 @@ enable = [
|
||||
"rowserrcheck",
|
||||
"exportloopref",
|
||||
"staticcheck",
|
||||
"structcheck",
|
||||
"stylecheck",
|
||||
"typecheck",
|
||||
"unconvert",
|
||||
"unused",
|
||||
"varcheck",
|
||||
"whitespace",
|
||||
"gocyclo",
|
||||
"exhaustive",
|
||||
@@ -71,13 +74,6 @@ text = "ST1003"
|
||||
linters = ["stylecheck"]
|
||||
text = "ST1001"
|
||||
|
||||
# Enable when appropriate
|
||||
# strings.Title has been deprecated since Go 1.18 and an alternative has been available since Go 1.0: The rule Title uses for word boundaries does not handle Unicode punctuation properly.
|
||||
# Use golang.org/x/text/cases instead.
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["staticcheck"]
|
||||
text = "SA1019"
|
||||
|
||||
[[issues.exclude-rules]]
|
||||
linters = ["gosec"]
|
||||
text = "G108"
|
||||
@@ -1282,19 +1282,3 @@ scheduler_interval =
|
||||
[storage]
|
||||
# Allow uploading SVG files without sanitization.
|
||||
allow_unsanitized_svg_upload = false
|
||||
|
||||
|
||||
#################################### Search ################################################
|
||||
|
||||
[search]
|
||||
# Defines the number of dashboards loaded at once in a batch during a full reindex.
|
||||
# This is a temporary settings that might be removed in the future.
|
||||
dashboard_loading_batch_size = 200
|
||||
|
||||
# Defines the frequency of a full search reindex.
|
||||
# This is a temporary settings that might be removed in the future.
|
||||
full_reindex_interval = 5m
|
||||
|
||||
# Defines the frequency of partial index updates based on recent changes such as dashboard updates.
|
||||
# This is a temporary settings that might be removed in the future.
|
||||
index_update_interval = 10s
|
||||
|
||||
@@ -59,7 +59,7 @@ func themaTestableDashboards() (map[string][]byte, error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close() //nolint:errcheck
|
||||
defer f.Close() // nolint: errcheck
|
||||
|
||||
b, err := io.ReadAll(f)
|
||||
if err != nil {
|
||||
|
||||
@@ -319,7 +319,7 @@ Note: The JSON definition in the input field when using `Copy JSON to Clipboard`
|
||||
|
||||
### Reusable Dashboard URLs
|
||||
|
||||
If the dashboard in the JSON file contains an [UID]({{< relref "../../dashboards/build-dashboards/view-dashboard-json-model" >}}), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
|
||||
If the dashboard in the JSON file contains an [UID]({{< relref "../../dashboards/json-model/" >}}), Grafana forces insert/update on that UID. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given because the new dashboard URL uses the UID as identifier.
|
||||
When Grafana starts, it updates/inserts all dashboards available in the configured folders. If you modify the file, then the dashboard is also updated.
|
||||
By default, Grafana deletes dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ Grafana Enterprise includes the ability for you to assign discrete fixed roles t
|
||||
Assign fixed roles when the basic roles do not meet your permission requirements. For example, you might want a user with the basic viewer role to also edit dashboards. Or, you might want anyone with the editor role to also add and manage users. Fixed roles provide users more granular access to create, view, and update the following Grafana resources:
|
||||
|
||||
- [Alerting]({{< relref "../../../alerting/" >}})
|
||||
- [Annotations]({{< relref "../../../dashboards/build-dashboards/annotate-visualizations" >}})
|
||||
- [Annotations]({{< relref "../../../dashboards/annotations/" >}})
|
||||
- [API keys]({{< relref "../../api-keys/" >}})
|
||||
- [Dashboards and folders]({{< relref "../../../dashboards/" >}})
|
||||
- [Data sources]({{< relref "../../../datasources/" >}})
|
||||
|
||||
@@ -9,7 +9,7 @@ weight: 105
|
||||
|
||||
# Explore Grafana Alerting
|
||||
|
||||
Learn about the key concepts and features that help you create, manage, and take action on your alerts and improve your team's ability to resolve issues quickly.
|
||||
Whether you're starting or expanding your implementation of Grafana Alerting, learn more about the key concepts and available features that help you create, manage, and take action on your alerts and improve your team’s ability to resolve issues quickly.
|
||||
|
||||
- [Data sources](https://grafana.com/docs/grafana/latest/alerting/fundamentals/data-source-alerting/)
|
||||
- [Alert rules](https://grafana.com/docs/grafana/latest/alerting/fundamentals/alert-rules/)
|
||||
|
||||
@@ -16,7 +16,7 @@ weight: 401
|
||||
|
||||
# Annotations and labels for alerting rules
|
||||
|
||||
Annotations and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in [templates]({{< relref "../../contact-points/message-templating/" >}}) and [template functions]({{< relref "../../contact-points/fundamentals/annotation-label/template-functions/" >}}) to create notification content dynamically.
|
||||
Annotations and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in [templates]({{< relref "../../contact-points/message-templating/" >}}) and [template functions]({{< relref "../../contact-points/fundamentals/annotation-label/template-functions/" >}}) to create notification contact dynamically.
|
||||
|
||||
## Annotations
|
||||
|
||||
|
||||
@@ -30,18 +30,15 @@ A label matchers consists of 3 distinct parts, the **label**, the **value** and
|
||||
| `=~` | Select labels that regex-match the value. |
|
||||
| `!~` | Select labels that do not regex-match the value. |
|
||||
|
||||
If you are using multiple label matchers, they are combined using the AND logical operator. This means that all matchers must match in order to link a rule to a policy.
|
||||
## Example of a label matcher
|
||||
|
||||
## Example scenario
|
||||
|
||||
If you define the following set of labels for your alert:
|
||||
Imagine we've defined the following set of labels for our alert.
|
||||
|
||||
`{ foo=bar, baz=qux, id=12 }`
|
||||
|
||||
then:
|
||||
In this situation,
|
||||
|
||||
- A label matcher defined as `foo=bar` matches this alert rule.
|
||||
- A label matcher defined as `foo!=bar` does _not_ match this alert rule.
|
||||
- A label matcher defined as `id=~[0-9]+` matches this alert rule.
|
||||
- A label matcher defined as `baz!~[0-9]+` matches this alert rule.
|
||||
- Two label matchers defined as `foo=bar` and `id=~[0-9]+` match this alert rule.
|
||||
- A label matcher defined as `foo=bar` will match this alert rule.
|
||||
- A label matcher defined as `foo!=bar` will _not_ match this alert rule.
|
||||
- A label matcher defined as `id=~[0-9]+` will match this alert rule.
|
||||
- A label matcher defined as `baz!~[0-9]+` will match this alert rule.
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources
|
||||
description: Provision alerting resources
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- set up
|
||||
- configure
|
||||
- provisioning
|
||||
title: Provision Grafana Alerting resources
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Provision Grafana Alerting resources
|
||||
|
||||
Alerting infrastructure is often complex, with many pieces of the pipeline that often live in different places. Scaling this across multiple teams and organizations is an especially challenging task. Grafana Alerting provisioning makes this process easier by enabling you to create, manage, and maintain your alerting data in a way that best suits your organization.
|
||||
|
||||
There are three options to choose from:
|
||||
|
||||
1. Use file provisioning to provision your Grafana Alerting resources, such as alert rules and contact points, through files on disk.
|
||||
|
||||
1. Provision your alerting resources using the Grafana HTTP API.
|
||||
|
||||
For more information on the Grafana Alerting provisioning API, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/).
|
||||
|
||||
1. Provision your alerting resources using Terraform.
|
||||
|
||||
**Note:**
|
||||
|
||||
Currently, provisioning for Grafana Alerting supports alert rules, contact points, mute timings, and templates. Provisioned alerting resources can only be edited in the source that created them and not from within Grafana or any other source. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
|
||||
|
||||
**Useful Links:**
|
||||
|
||||
[Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/)
|
||||
|
||||
[Grafana Cloud provisioning](https://grafana.com/docs/grafana-cloud/infrastructure-as-code/terraform/)
|
||||
|
||||
[Grafana Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning)
|
||||
@@ -1,18 +1,44 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/file-provisioning
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/file-provisioning
|
||||
description: Create and manage resources using file provisioning
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources
|
||||
description: Provision alerting resources
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- alerting resources
|
||||
- file provisioning
|
||||
- set up
|
||||
- configure
|
||||
- provisioning
|
||||
title: Create and manage alerting resources using file provisioning
|
||||
weight: 100
|
||||
title: Provision Grafana Alerting resources
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Provision Grafana Alerting resources
|
||||
|
||||
Alerting infrastructure is often complex, with many pieces of the pipeline that often live in different places. Scaling this across multiple teams and organizations is an especially challenging task. Grafana Alerting provisioning makes this process easier by enabling you to create, manage, and maintain your alerting data in a way that best suits your organization.
|
||||
|
||||
There are three options to choose from:
|
||||
|
||||
1. Use file provisioning to provision your Grafana Alerting resources, such as alert rules and contact points, through files on disk.
|
||||
|
||||
1. Provision your alerting resources using the Grafana HTTP API.
|
||||
|
||||
For more information on the Grafana Alerting provisioning API, refer to [Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning/).
|
||||
|
||||
1. Provision your alerting resources using Terraform.
|
||||
|
||||
**Note:**
|
||||
|
||||
Currently, provisioning for Grafana Alerting supports alert rules, contact points, mute timings, and templates. Provisioned alerting resources can only be edited in the source that created them and not from within Grafana or any other source. For example, if you provision your alerting resources using files from disk, you cannot edit the data in Terraform or from within Grafana.
|
||||
|
||||
**Useful Links:**
|
||||
|
||||
[Grafana provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/)
|
||||
|
||||
[Grafana Cloud provisioning](https://grafana.com/docs/grafana-cloud/infrastructure-as-code/terraform/)
|
||||
|
||||
[Grafana Alerting provisioning API](https://grafana.com/docs/grafana/latest/developers/http_api/alerting_provisioning)
|
||||
|
||||
## Create and manage alerting resources using file provisioning
|
||||
|
||||
Provision your alerting resources using files from disk. When you start Grafana, the data from these files is created in your Grafana system. Grafana adds any new resources you created, updates any that you changed, and deletes old ones.
|
||||
@@ -1,321 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/terraform-provisioning
|
||||
description: Create and manage alerting resources using Terraform
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- alerting resources
|
||||
- provisioning
|
||||
- Terraform
|
||||
title: Create and manage alerting resources using Terraform
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Create and manage alerting resources using Terraform
|
||||
|
||||
Use Terraform’s Grafana Provider to manage your alerting resources and provision them into your Grafana system. Terraform provider support for Grafana Alerting makes it easy to create, manage, and maintain your entire Grafana Alerting stack as code.
|
||||
|
||||
For more information on managing your alerting resources using Terraform, refer to the [Grafana Provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs) documentation.
|
||||
|
||||
Complete the following tasks to create and manage your alerting resources using Terraform.
|
||||
|
||||
1. Create an API key for provisioning.
|
||||
1. Configure the Terraform provider.
|
||||
1. Define your alerting resources in Terraform.
|
||||
1. Run `terraform apply` to provision your alerting resources.
|
||||
|
||||
## Before you begin
|
||||
|
||||
- Ensure you have the grafana/grafana [Terraform provider](https://registry.terraform.io/providers/grafana/grafana/1.28.0) 1.27.0 or higher.
|
||||
|
||||
- Ensure you are using Grafana 9.1 or higher.
|
||||
|
||||
## Create an API key for provisioning
|
||||
|
||||
You can [create a normal Grafana API key](https://grafana.com/docs/grafana/latest/administration/api-keys/) to authenticate Terraform with Grafana. Most existing tooling using API keys should automatically work with the new Grafana Alerting support.
|
||||
|
||||
There are also dedicated RBAC roles for alerting provisioning. This lets you easily authenticate as a [service account](https://grafana.com/docs/grafana/latest/administration/service-accounts/) with the minimum permissions needed to provision your Alerting infrastructure.
|
||||
|
||||
To create an API key for provisioning, complete the following steps.
|
||||
|
||||
1. Create a new service account for your CI pipeline.
|
||||
1. Assign the role “Access the alert rules Provisioning API.”
|
||||
1. Create a new service account token.
|
||||
1. Name and save the token for use in Terraform.
|
||||
|
||||
Alternatively, you can use basic authentication. To view all the supported authentication formats, see [here](https://registry.terraform.io/providers/grafana/grafana/latest/docs#authentication).
|
||||
|
||||
## Configure the Terraform provider
|
||||
|
||||
Grafana Alerting support is included as part of the [Grafana Terraform provider](https://registry.terraform.io/providers/grafana/grafana/latest/docs).
|
||||
|
||||
The following is an example you can use to configure the Terraform provider.
|
||||
|
||||
```terraform
|
||||
terraform {
|
||||
required_providers {
|
||||
grafana = {
|
||||
source = "grafana/grafana"
|
||||
version = ">= 1.28.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
provider "grafana" {
|
||||
url = <YOUR_GRAFANA_URL>
|
||||
auth = <YOUR_GRAFANA_API_KEY>
|
||||
}
|
||||
```
|
||||
|
||||
## Provision contact points and templates
|
||||
|
||||
Contact points connect an alerting stack to the outside world. They tell Grafana how to connect to your external systems and where to deliver notifications. There are over fifteen different [integrations](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/contact_point#optional) to choose from.
|
||||
|
||||
To provision contact points and templates, complete the following steps.
|
||||
|
||||
1. Copy this code block into a .tf file on your local machine.
|
||||
|
||||
This example creates a contact point that sends alert notifications to Slack.
|
||||
|
||||
```terraform
|
||||
resource "grafana_contact_point" "my_slack_contact_point" {
|
||||
name = "Send to My Slack Channel"
|
||||
|
||||
slack {
|
||||
url = <YOUR_SLACK_WEBHOOK_URL>
|
||||
text = <<EOT
|
||||
{{ len .Alerts.Firing }} alerts are firing!
|
||||
|
||||
Alert summaries:
|
||||
{{ range .Alerts.Firing }}
|
||||
{{ template "Alert Instance Template" . }}
|
||||
{{ end }}
|
||||
EOT
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
2. Enter text for your notification in the text field.
|
||||
|
||||
The `text` field supports [Go-style templating](https://pkg.go.dev/text/template). This enables you to manage your Grafana Alerting message templates directly in Terraform.
|
||||
|
||||
3. Run the command ‘terraform apply’.
|
||||
|
||||
4. Go to the Grafana UI and check the details of your contact point.
|
||||
|
||||
You cannot edit resources provisioned via Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
|
||||
|
||||
5. Click **Test** to verify that the contact point works correctly.
|
||||
|
||||
**Note:**
|
||||
|
||||
You can re-use the same templates across many contact points. In the example above, a shared template ie embedded using the statement `{{ template “Alert Instance Template” . }}`
|
||||
|
||||
This fragment can then be managed separately in Terraform:
|
||||
|
||||
```terraform
|
||||
resource "grafana_message_template" "my_alert_template" {
|
||||
name = "Alert Instance Template"
|
||||
|
||||
template = <<EOT
|
||||
{{ define "Alert Instance Template" }}
|
||||
Firing: {{ .Labels.alertname }}
|
||||
Silence: {{ .SilenceURL }}
|
||||
{{ end }}
|
||||
EOT
|
||||
}
|
||||
```
|
||||
|
||||
## Provision notification policies and routing
|
||||
|
||||
Notification policies tell Grafana how to route alert instances, as opposed to where. They connect firing alerts to your previously defined contact points using a system of labels and matchers.
|
||||
|
||||
To provision notification policies and routing, complete the following steps.
|
||||
|
||||
1. Copy this code block into a .tf file on your local machine.
|
||||
|
||||
In this example, the alerts are grouped by `alertname`, which means that any notifications coming from alerts which share the same name, are grouped into the same Slack message.
|
||||
|
||||
If you want to route specific notifications differently, you can add sub-policies. Sub-policies allow you to apply routing to different alerts based on label matching. In this example, we apply a mute timing to all alerts with the label a=b.
|
||||
|
||||
resource "grafana_notification_policy" "my_policy" {
|
||||
group_by = ["alertname"]
|
||||
contact_point = grafana_contact_point.my_slack_contact_point.name
|
||||
|
||||
group_wait = "45s"
|
||||
group_interval = "6m"
|
||||
repeat_interval = "3h"
|
||||
|
||||
policy {
|
||||
matcher {
|
||||
label = "a"
|
||||
match = "="
|
||||
value = "b"
|
||||
}
|
||||
group_by = ["..."]
|
||||
contact_point = grafana_contact_point.a_different_contact_point.name
|
||||
mute_timings = [grafana_mute_timing.my_mute_timing.name]
|
||||
|
||||
policy {
|
||||
matcher {
|
||||
label = "sublabel"
|
||||
match = "="
|
||||
value = "subvalue"
|
||||
}
|
||||
contact_point = grafana_contact_point.a_third_contact_point.name
|
||||
group_by = ["..."]
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
2. In the mute_timings field, link a mute timing to your notification policy.
|
||||
|
||||
3. Run the command ‘terraform apply’.
|
||||
|
||||
4. Go to the Grafana UI and check the details of your notification policy.
|
||||
|
||||
**Note:**
|
||||
|
||||
You cannot edit resources provisioned from Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
|
||||
|
||||
5. Click **Test** to verify that the notification point is working correctly.
|
||||
|
||||
## Provision mute timings
|
||||
|
||||
Mute timings provide the ability to mute alert notifications for defined time periods.
|
||||
|
||||
To provision mute timings, complete the following steps.
|
||||
|
||||
1. Copy this code block into a .tf file on your local machine.
|
||||
|
||||
In this example, alert notifications are muted on weekends.
|
||||
|
||||
resource "grafana_mute_timing" "my_mute_timing" {
|
||||
name = "My Mute Timing"
|
||||
|
||||
intervals {
|
||||
times {
|
||||
start = "04:56"
|
||||
end = "14:17"
|
||||
}
|
||||
weekdays = ["saturday", "sunday", "tuesday:thursday"]
|
||||
months = ["january:march", "12"]
|
||||
years = ["2025:2027"]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
2. Run the command ‘terraform apply’.
|
||||
3. Go to the Grafana UI and check the details of your mute timing.
|
||||
4. Reference your newly created mute timing in a notification policy using the `mute_timings` field.
|
||||
This will apply your mute timing to some or all of your notifications.
|
||||
|
||||
**Note:**
|
||||
|
||||
You cannot edit resources provisioned from Terraform from the UI. This ensures that your alerting stack always stays in sync with your code.
|
||||
|
||||
5. Click **Test** to verify that the mute timing is working correctly.
|
||||
|
||||
## Provision alert rules
|
||||
|
||||
[Alert rules](https://grafana.com/docs/grafana/latest/alerting/alerting-rules/) enable you to alert against any Grafana data source. This can be a data source that you already have configured, or you can [define your data sources in Terraform](https://registry.terraform.io/providers/grafana/grafana/latest/docs/resources/data_source) alongside your alert rules.
|
||||
|
||||
To provision alert rules, complete the following steps.
|
||||
|
||||
1. Create a data source to query and a folder to store your rules in.
|
||||
|
||||
In this example, the [TestData](https://grafana.com/docs/grafana/latest/datasources/testdata/) data source is used.
|
||||
|
||||
Alerts can be defined against any backend datasource in Grafana.
|
||||
|
||||
```terraform
|
||||
resource "grafana_data_source" "testdata_datasource" {
|
||||
name = "TestData"
|
||||
type = "testdata"
|
||||
}
|
||||
|
||||
resource "grafana_folder" "rule_folder" {
|
||||
title = "My Rule Folder"
|
||||
}
|
||||
```
|
||||
|
||||
2. Define an alert rule.
|
||||
|
||||
For more information on alert rules, refer to [how to create Grafana-managed alerts](https://grafana.com/blog/2022/08/01/grafana-alerting-video-how-to-create-alerts-in-grafana-9/).
|
||||
|
||||
3. Create a rule group containing one or more rules.
|
||||
|
||||
In this example, the `grafana_rule_group` resource group is used.
|
||||
|
||||
```terraform
|
||||
resource "grafana_rule_group" "my_rule_group" {
|
||||
name = "My Alert Rules"
|
||||
folder_uid = grafana_folder.rule_folder.uid
|
||||
interval_seconds = 60
|
||||
org_id = 1
|
||||
|
||||
rule {
|
||||
name = "My Random Walk Alert"
|
||||
condition = "C"
|
||||
for = "0s"
|
||||
|
||||
// Query the datasource.
|
||||
data {
|
||||
ref_id = "A"
|
||||
relative_time_range {
|
||||
from = 600
|
||||
to = 0
|
||||
}
|
||||
datasource_uid = grafana_data_source.testdata_datasource.uid
|
||||
// `model` is a JSON blob that sends datasource-specific data.
|
||||
// It's different for every datasource. The alert's query is defined here.
|
||||
model = jsonencode({
|
||||
intervalMs = 1000
|
||||
maxDataPoints = 43200
|
||||
refId = "A"
|
||||
})
|
||||
}
|
||||
|
||||
// The query was configured to obtain data from the last 60 seconds. Let's alert on the average value of that series using a Reduce stage.
|
||||
data {
|
||||
datasource_uid = "-100"
|
||||
// You can also create a rule in the UI, then GET that rule to obtain the JSON.
|
||||
// This can be helpful when using more complex reduce expressions.
|
||||
model = <<EOT
|
||||
{"conditions":[{"evaluator":{"params":[0,0],"type":"gt"},"operator":{"type":"and"},"query":{"params":["A"]},"reducer":{"params":[],"type":"last"},"type":"avg"}],"datasource":{"name":"Expression","type":"__expr__","uid":"__expr__"},"expression":"A","hide":false,"intervalMs":1000,"maxDataPoints":43200,"reducer":"last","refId":"B","type":"reduce"}
|
||||
EOT
|
||||
ref_id = "B"
|
||||
relative_time_range {
|
||||
from = 0
|
||||
to = 0
|
||||
}
|
||||
}
|
||||
|
||||
// Now, let's use a math expression as our threshold.
|
||||
// We want to alert when the value of stage "B" above exceeds 70.
|
||||
data {
|
||||
datasource_uid = "-100"
|
||||
ref_id = "C"
|
||||
relative_time_range {
|
||||
from = 0
|
||||
to = 0
|
||||
}
|
||||
model = jsonencode({
|
||||
expression = "$B > 70"
|
||||
type = "math"
|
||||
refId = "C"
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
4. Go to the Grafana UI and check your alert rule.
|
||||
|
||||
You can see whether or not the alert rule is firing. You can also see a visualization of each of the alert rule’s query stages
|
||||
|
||||
When the alert fires, Grafana routes a notification through the policy you defined.
|
||||
|
||||
For example, if you chose Slack as a contact point, Grafana’s embedded [Alertmanager](https://github.com/prometheus/alertmanager) automatically posts a message to Slack.
|
||||
@@ -1,28 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/alerting/provision-alerting-resources/view-provisioned-resources
|
||||
description: View provisioned resources in Grafana
|
||||
keywords:
|
||||
- grafana
|
||||
- alerting
|
||||
- alerting resources
|
||||
- provisioning
|
||||
title: View provisioned resources in Grafana
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# View provisioned alerting resources in Grafana
|
||||
|
||||
Verify that your alerting resources were created in Grafana.
|
||||
|
||||
To view your provisioned resources in Grafana, complete the following steps.
|
||||
|
||||
1. Open your Grafana instance.
|
||||
1. Navigate to Alerting.
|
||||
1. Click an alerting resource folder, for example, Alert rules.
|
||||
|
||||
Provisioned resources are labeled **Provisioned**, so that it is clear that they were not created manually.
|
||||
|
||||
**Note:**
|
||||
|
||||
You cannot edit provisioned resources from Grafana. You can only change the resource properties by changing the provisioning file and restarting Grafana or carrying out a hot reload. This prevents changes being made to the resource that would be overwritten if a file is provisioned again or a hot reload is carried out.
|
||||
16
docs/sources/best-practices/_index.md
Normal file
16
docs/sources/best-practices/_index.md
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/
|
||||
description: Best practices for working with Grafana
|
||||
title: Best practices
|
||||
weight: 20
|
||||
---
|
||||
|
||||
# Best practices
|
||||
|
||||
This section provides information about best practices for intermediate Grafana administrators and users. Click on each of the links before for more information.
|
||||
|
||||
- [Best practices for creating dashboards]({{< relref "best-practices-for-creating-dashboards/" >}})
|
||||
- [Best practices for managing dashboards]({{< relref "best-practices-for-managing-dashboards/" >}})
|
||||
- [Common observability strategies]({{< relref "common-observability-strategies/" >}})
|
||||
- [Dashboard management maturity model]({{< relref "dashboard-management-maturity-levels/" >}})
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-creating-dashboards/
|
||||
description: Best practices for creating dashboards in Grafana
|
||||
title: Best practices for creating dashboards
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Best practices for creating dashboards
|
||||
|
||||
This page outlines some best practices to follow when creating Grafana dashboards.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Here are some principles to consider before you create a dashboard.
|
||||
|
||||
### A dashboard should tell a story or answer a question
|
||||
|
||||
What story are you trying to tell with your dashboard? Try to create a logical progression of data, such as large to small or general to specific. What is the goal for this dashboard? (Hint: If the dashboard doesn't have a goal, then ask yourself if you really need the dashboard.)
|
||||
|
||||
Keep your graphs simple and focused on answering the question that you are asking. For example, if your question is "which servers are in trouble?", then maybe you don't need to show all the server data. Just show data for the ones in trouble.
|
||||
|
||||
### Dashboards should reduce cognitive load, not add to it
|
||||
|
||||
_Cognitive load_ is basically how hard you need to think about something in order to figure it out. Make your dashboard easy to interpret. Other users and future you (when you're trying to figure out what broke at 2AM) will appreciate it.
|
||||
|
||||
Ask yourself:
|
||||
|
||||
- Can I tell what exactly each graph represents? Is it obvious, or do I have to think about it?
|
||||
- If I show this to someone else, how long will it take them to figure it out? Will they get lost?
|
||||
|
||||
### Have a monitoring strategy
|
||||
|
||||
It's easy to make new dashboards. It's harder to optimize dashboard creation and adhere to a plan, but it's worth it. This strategy should govern both your overall dashboard scheme and enforce consistency in individual dashboard design.
|
||||
|
||||
Refer to [Common observability strategies]({{< relref "common-observability-strategies/" >}}) and [Dashboard management maturity levels]({{< relref "dashboard-management-maturity-levels/" >}}) for more information.
|
||||
|
||||
### Write it down
|
||||
|
||||
Once you have a strategy or design guidelines, write them down to help maintain consistency over time. Check out this [Wikimedia runbook example](https://wikitech.wikimedia.org/wiki/Performance/Runbook/Grafana_best_practices).
|
||||
|
||||
## Best practices to follow
|
||||
|
||||
- When creating a new dashboard, make sure it has a meaningful name.
|
||||
- If you are creating a dashboard to play or experiment, then put the word `TEST` or `TMP` in the name.
|
||||
- Consider including your name or initials in the dashboard name or as a tag so that people know who owns the dashboard.
|
||||
- Remove temporary experiment dashboards when you are done with them.
|
||||
- If you create many related dashboards, think about how to cross-reference them for easy navigation. Refer to [Best practices for managing dashboards]({{< relref "best-practices-for-managing-dashboards/" >}}) for more information.
|
||||
- Grafana retrieves data from a data source. A basic understanding of [data sources]({{< relref "../datasources/" >}}) in general and your specific is important.
|
||||
- Avoid unnecessary dashboard refreshing to reduce the load on the network or backend. For example, if your data changes every hour, then you don't need to set the dashboard refresh rate to 30 seconds.
|
||||
- Use the left and right Y-axes when displaying time series with different units or ranges.
|
||||
- Add documentation to dashboards and panels.
|
||||
- To add documentation to a dashboard, add a [Text panel visualization]({{< relref "../visualizations/text-panel/" >}}) to the dashboard. Record things like the purpose of the dashboard, useful resource links, and any instructions users might need to interact with the dashboard. Check out this [Wikimedia example](https://grafana.wikimedia.org/d/000000066/resourceloader?orgId=1).
|
||||
- To add documentation to a panel, edit the panel settings and add a description. Any text you add will appear if you hover your cursor over the small `i` in the top left corner of the panel.
|
||||
- Reuse your dashboards and enforce consistency by using [templates and variables]({{< relref "../dashboards/variables" >}}).
|
||||
- Be careful with stacking graph data. The visualizations can be misleading, and hide important data. We recommend turning it off in most cases.
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-managing-dashboards/
|
||||
description: Best practices for managing dashboards in Grafana
|
||||
title: Best practices for managing dashboards
|
||||
weight: 200
|
||||
---
|
||||
|
||||
# Best practices for managing dashboards
|
||||
|
||||
This page outlines some best practices to follow when managing Grafana dashboards.
|
||||
|
||||
## Before you begin
|
||||
|
||||
Here are some principles to consider before you start managing dashboards.
|
||||
|
||||
### Strategic observability
|
||||
|
||||
There are several [common observability strategies]({{< relref "common-observability-strategies/" >}}). You should research them and decide whether one of them works for you or if you want to come up with your own. Either way, have a plan, write it down, and stick to it.
|
||||
|
||||
Adapt your strategy to changing needs as necessary.
|
||||
|
||||
### Maturity level
|
||||
|
||||
What is your dashboard maturity level? Analyze your current dashboard setup and compare it to the [Dashboard management maturity model]({{< relref "dashboard-management-maturity-levels/" >}}). Understanding where you are can help you decide how to get to where you want to be.
|
||||
|
||||
## Best practices to follow
|
||||
|
||||
- Avoid dashboard sprawl, meaning the uncontrolled growth of dashboards. Dashboard sprawl negatively affects time to find the right dashboard. Duplicating dashboards and changing “one thing” (worse: keeping original tags) is the easiest kind of sprawl.
|
||||
- Periodically review the dashboards and remove unnecessary ones.
|
||||
- If you create a temporary dashboard, perhaps to test something, prefix the name with `TEST: `. Delete the dashboard when you are finished.
|
||||
- Copying dashboards with no significant changes is not a good idea.
|
||||
- You miss out on updates to the original dashboard, such as documentation changes, bug fixes, or additions to metrics.
|
||||
- In many cases copies are being made to simply customize the view by setting template parameters. This should instead be done by maintaining a link to the master dashboard and customizing the view with [URL parameters]({{< relref "../panels/configure-data-links/#data-link-variables" >}}).
|
||||
- When you must copy a dashboard, clearly rename it and _do not_ copy the dashboard tags. Tags are important metadata for dashboards that are used during search. Copying tags can result in false matches.
|
||||
- Maintain a dashboard of dashboards or cross-reference dashboards. This can be done in several ways:
|
||||
- Create dashboard links, panel, or data links. Links can go to other dashboards or to external systems. For more information, refer to [Manage dashboard links]({{< relref "../dashboards/manage-dashboard-links/" >}}).
|
||||
- Add a [Dashboard list panel]({{< relref "../visualizations/dashboard-list-panel/" >}}). You can then customize what you see by doing tag or folder searches.
|
||||
- Add a [Text panel]({{< relref "../visualizations/text-panel/" >}}) and use markdown to customize the display.
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/common-observability-strategies/
|
||||
- /docs/grafana/latest/getting-started/strategies/
|
||||
description: Common observability strategies
|
||||
keywords:
|
||||
- grafana
|
||||
- intro
|
||||
- guide
|
||||
- concepts
|
||||
- methods
|
||||
title: Common observability strategies
|
||||
weight: 300
|
||||
---
|
||||
|
||||
# Common observability strategies
|
||||
|
||||
When you have a lot to monitor, like a server farm, you need a strategy to decide what is important enough to monitor. This page describes several common methods for choosing what to monitor.
|
||||
|
||||
A logical strategy allows you to make uniform dashboards and scale your observability platform more easily.
|
||||
|
||||
## Guidelines for usage
|
||||
|
||||
- The USE method tells you how happy your machines are, the RED method tells you how happy your users are.
|
||||
- USE reports on causes of issues.
|
||||
- RED reports on user experience and is more likely to report symptoms of problems.
|
||||
- The best practice of alerting is to alert on symptoms rather than causes, so alerting should be done on RED dashboards.
|
||||
|
||||
## USE method
|
||||
|
||||
USE stands for:
|
||||
|
||||
- **Utilization -** Percent time the resource is busy, such as node CPU usage
|
||||
- **Saturation -** Amount of work a resource has to do, often queue length or node load
|
||||
- **Errors -** Count of error events
|
||||
|
||||
This method is best for hardware resources in infrastructure, such as CPU, memory, and network devices. For more information, refer to [The USE Method](http://www.brendangregg.com/usemethod.html).
|
||||
|
||||
## RED method
|
||||
|
||||
RED stands for:
|
||||
|
||||
- **Rate -** Requests per second
|
||||
- **Errors -** Number of requests that are failing
|
||||
- **Duration -** Amount of time these requests take, distribution of latency measurements
|
||||
|
||||
This method is most applicable to services, especially a microservices environment. For each of your services, instrument the code to expose these metrics for each component. RED dashboards are good for alerting and SLAs. A well-designed RED dashboard is a proxy for user experience.
|
||||
|
||||
For more information, refer to Tom Wilkie's blog post [The RED method: How to instrument your services](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services).
|
||||
|
||||
## The Four Golden Signals
|
||||
|
||||
According to the [Google SRE handbook](https://landing.google.com/sre/sre-book/chapters/monitoring-distributed-systems/#xref_monitoring_golden-signals), if you can only measure four metrics of your user-facing system, focus on these four.
|
||||
|
||||
This method is similar to the RED method, but it includes saturation.
|
||||
|
||||
- **Latency -** Time taken to serve a request
|
||||
- **Traffic -** How much demand is placed on your system
|
||||
- **Errors -** Rate of requests that are failing
|
||||
- **Saturation -** How "full" your system is
|
||||
|
||||
[Here's an example from Grafana Play](https://play.grafana.org/d/000000109/the-four-golden-signals?orgId=1).
|
||||
@@ -0,0 +1,73 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/dashboard-management-maturity-levels/
|
||||
description: Explanation of dashboard management maturity model
|
||||
title: Dashboard management maturity model
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Dashboard management maturity model
|
||||
|
||||
_Dashboard management maturity_ refers to how well-designed and efficient your dashboard ecosystem is. We recommend periodically reviewing your dashboard setup to gauge where you are and how you can improve.
|
||||
|
||||
Broadly speaking, dashboard maturity can be defined as low, medium, or high.
|
||||
|
||||
Much of the content for this topic was taken from the KubeCon 2019 talk [Fool-Proof Kubernetes Dashboards for Sleep-Deprived Oncalls](https://www.youtube.com/watch?v=YE2aQFiMGfY).
|
||||
|
||||
## Low - default state
|
||||
|
||||
At this stage, you have no coherent dashboard management strategy. Almost everyone starts here.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Everyone can modify your dashboards.
|
||||
- Lots of copied dashboards, little to no dashboard reuse.
|
||||
- One-off dashboards that hang around forever.
|
||||
- No version control (dashboard JSON in version control).
|
||||
- Lots of browsing for dashboards, searching for the right dashboard. This means lots of wasted time trying to find the dashboard you need.
|
||||
- Not having any alerts to direct you to the right dashboard.
|
||||
|
||||
## Medium - methodical dashboards
|
||||
|
||||
At this stage, you are starting to manage your dashboard use with methodical dashboards. You might have laid out a strategy, but there are some things you could improve.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Prevent sprawl by using template variables. For example, you don't need a separate dashboard for each node, you can use query variables. Even better, you can make the data source a template variable too, so you can reuse the same dashboard across different clusters and monitoring backends.
|
||||
|
||||
Refer to the list of [Variable examples]({{< relref "../dashboards/variables/#examples-of-templates-and-variables" >}}) if you want some ideas.
|
||||
|
||||
- Methodical dashboards according to an [observability strategy]({{< relref "common-observability-strategies/" >}}).
|
||||
- Hierarchical dashboards with drill-downs to the next level.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/drill-down-example.png" caption="Example of using drill-down" >}}
|
||||
|
||||
- Dashboard design reflects service hierarchies. The example shown below uses the RED method (request and error rate on the left, latency duration on the right) with one row per service. The row order reflects the data flow.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/service-hierarchy-example.png" caption="Example of a service hierarchy" >}}
|
||||
|
||||
- Compare like to like: split service dashboards when the magnitude differs. Make sure aggregated metrics don't drown out important information.
|
||||
- Expressive charts with meaningful use of color and normalizing axes where you can.
|
||||
- Example of meaningful color: Blue means it's good, red means it's bad. [Thresholds]({{< relref "../panels/configure-thresholds/" >}}) can help with that.
|
||||
- Example of normalizing axes: When comparing CPU usage, measure by percentage rather than raw number, because machines can have a different number of cores. Normalizing CPU usage by the number of cores reduces cognitive load because the viewer can trust that at 100% all cores are being used, without having to know the number of CPUs.
|
||||
- Directed browsing cuts down on "guessing."
|
||||
- Template variables make it harder to “just browse” randomly or aimlessly.
|
||||
- Most dashboards should be linked to by alerts.
|
||||
- Browsing is directed with links. For more information, refer to [Manage dashboard links]({{< relref "../dashboards/manage-dashboard-links/" >}}).
|
||||
- Version-controlled dashboard JSON.
|
||||
|
||||
## High - optimized use
|
||||
|
||||
At this stage, you have optimized your dashboard management use with a consistent and thoughtful strategy. It requires maintenance, but the results are worth it.
|
||||
|
||||
- Actively reducing sprawl.
|
||||
- Regularly review existing dashboards to make sure they are still relevant.
|
||||
- Only approved dashboards added to master dashboard list.
|
||||
- Tracking dashboard use. If you're an Enterprise user, you can take advantage of [Usage insights]({{< relref "../dashboards/assess-dashboard-usage/" >}}).
|
||||
- Consistency by design.
|
||||
- Use scripting libraries to generate dashboards, ensure consistency in pattern and style.
|
||||
- grafonnet (Jsonnet)
|
||||
- grafanalib (Python)
|
||||
- No editing in the browser. Dashboard viewers change views with variables.
|
||||
- Browsing for dashboards is the exception, not the rule.
|
||||
- Perform experimentation and testing in a separate Grafana instance dedicated to that purpose, not your production instance. When a dashboard in the test environment is proven useful, then add that dashboard to your main Grafana instance.
|
||||
@@ -16,13 +16,13 @@ Before you begin, ensure that you have configured a data source. See also:
|
||||
|
||||
- [Use dashboards]({{< relref "use-dashboards/" >}})
|
||||
- [Create dashboard folders]({{< relref "./manage-dashboards/#create-a-dashboard-folder" >}})
|
||||
- [Add and organize panels]({{< relref "./build-dashboards/add-organize-panels" >}})
|
||||
- [Add and organize panels]({{< relref "add-organize-panels/" >}})
|
||||
- [Manage dashboards]({{< relref "./manage-dashboards" >}})
|
||||
- [Public dashboards]({{< relref "dashboard-public/" >}})
|
||||
- [Annotations]({{< relref "./build-dashboards/annotate-visualizations" >}})
|
||||
- [Annotations]({{< relref "annotations/" >}})
|
||||
- [Playlist]({{< relref "./create-manage-playlists/" >}})
|
||||
- [Reporting]({{< relref "./create-reports" >}})
|
||||
- [Time range controls]({{< relref "./manage-dashboards/#common-time-range-controls" >}})
|
||||
- [Dashboard version history]({{< relref "./build-dashboards/manage-version-history" >}})
|
||||
- [Dashboard version history]({{< relref "dashboard-history/" >}})
|
||||
- [Dashboard export and import]({{< relref "./manage-dashboards/#export-and-import-dashboards" >}})
|
||||
- [Dashboard JSON model]({{< relref "./build-dashboards/view-dashboard-json-model/" >}})
|
||||
- [Dashboard JSON model]({{< relref "json-model/" >}})
|
||||
|
||||
@@ -6,19 +6,9 @@ aliases:
|
||||
- /docs/grafana/latest/features/dashboard/dashboards/
|
||||
- /docs/grafana/latest/panels/working-with-panels/add-panel/
|
||||
- /docs/grafana/latest/dashboards/add-organize-panels/
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/about-repeating-panels-rows/
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-rows/
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-panels/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/add-organize-panels/
|
||||
title: Add and organize panels
|
||||
menuTitle: Add and organize panels
|
||||
weight: 200
|
||||
keywords:
|
||||
- panel
|
||||
- dashboard
|
||||
- dynamic
|
||||
- rows
|
||||
- add
|
||||
weight: 2
|
||||
---
|
||||
|
||||
# Add and organize panels
|
||||
@@ -27,23 +17,23 @@ This section describes the areas of the Grafana panel editor.
|
||||
|
||||
1. Panel header: The header section lists the dashboard in which the panel appears and the following controls:
|
||||
|
||||
- **Dashboard settings (gear) icon:** Click to access the dashboard settings.
|
||||
- **Discard:** Discards changes you have made to the panel since you last saved the dashboard.
|
||||
- **Save:** Saves changes you made to the panel.
|
||||
- **Apply:** Applies changes you made and closes the panel editor, returning you to the dashboard. You will have to save the dashboard to persist the applied changes.
|
||||
- **Dashboard settings (gear) icon -** Click to access the dashboard settings.
|
||||
- **Discard -** Discards changes you have made to the panel since you last saved the dashboard.
|
||||
- **Save -** Saves changes you made to the panel.
|
||||
- **Apply -** Applies changes you made and closes the panel editor, returning you to the dashboard. You will have to save the dashboard to persist the applied changes.
|
||||
|
||||
1. Visualization preview: The visualization preview section contains the following options:
|
||||
|
||||
- **Table view:** Convert any visualization to a table so that you can see the data. Table views are useful for troubleshooting.
|
||||
- **Fill:** The visualization preview fills the available space. If you change the width of the side pane or height of the bottom pane the visualization changes to fill the available space.
|
||||
- **Actual:** The visualization preview will have the exact size as the size on the dashboard. If not enough space is available, the visualization will scale down preserving the aspect ratio.
|
||||
- **Time range controls:** For more information, refer to [Time range controls]({{< relref "../../manage-dashboards/#configure-dashboard-time-range-controls" >}}).
|
||||
- **Time range controls:** For more information, refer to [Time range controls]({{< relref "../manage-dashboards/#configure-dashboard-time-range-controls" >}}).
|
||||
|
||||
1. Data section: The data section contains tabs where you enter queries, transform your data, and create alert rules (if applicable).
|
||||
|
||||
- **Query tab:** Select your data source and enter queries here. For more information, refer to [Add a query]({{< relref "../../../panels/query-a-data-source/add-a-query/" >}}).
|
||||
- **Transform tab:** Apply data transformations. For more information, refer to [Transform data]({{< relref "../../../panels/transform-data/" >}}).
|
||||
- **Alert tab:** Write alert rules. For more information, refer to [Overview of Grafana 8 alerting]({{< relref "../../../alerting/" >}}).
|
||||
- **Query tab -** Select your data source and enter queries here. For more information, refer to [Add a query]({{< relref "../panels/query-a-data-source/add-a-query/" >}}).
|
||||
- **Transform tab -** Apply data transformations. For more information, refer to [Transform data]({{< relref "../panels/transform-data/" >}}).
|
||||
- **Alert tab -** Write alert rules. For more information, refer to [Overview of Grafana 8 alerting]({{< relref "../alerting/" >}}).
|
||||
|
||||
1. Panel display options: The display options section contains tabs where you configure almost every aspect of your data visualization.
|
||||
|
||||
@@ -77,10 +67,10 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that you have the proper permissions. For more information about permissions, refer to [About users and permissions]({{< relref "../../../administration/roles-and-permissions/" >}}).
|
||||
- Ensure that you have the proper permissions. For more information about permissions, refer to [About users and permissions]({{< relref "../administration/roles-and-permissions/" >}}).
|
||||
- Identify the dashboard to which you want to add the panel.
|
||||
- Understand the query language of the target data source.
|
||||
- Ensure that data source for which you are writing a query has been added. For more information about adding a data source, refer to [Add a data source]({{< relref "../../../datasources/add-a-data-source/" >}}) if you need instructions.
|
||||
- Ensure that data source for which you are writing a query has been added. For more information about adding a data source, refer to [Add a data source]({{< relref "../datasources/add-a-data-source/" >}}) if you need instructions.
|
||||
|
||||
**To create a dashboard and add a panel**:
|
||||
|
||||
@@ -89,7 +79,7 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
1. In the first line of the **Query** tab, click the drop-down list and select a data source.
|
||||
1. Write or construct a query in the query language of your data source.
|
||||
|
||||
For more information about data sources, refer to [Data sources]({{< relref "../../../datasources/" >}}) for specific guidelines.
|
||||
For more information about data sources, refer to [Data sources]({{< relref "../datasources/" >}}) for specific guidelines.
|
||||
|
||||
1. In the Visualization list, select a visualization type.
|
||||
|
||||
@@ -97,40 +87,18 @@ Dashboards and panels allow you to show your data in visual form. Each panel nee
|
||||
|
||||

|
||||
|
||||
For more information about individual visualizations, refer to [Visualizations options]({{< relref "../../../visualizations/" >}}).
|
||||
For more information about individual visualizations, refer to [Visualizations options]({{< relref "../visualizations/" >}}).
|
||||
|
||||
1. Refer to the following documentation for ways you can adjust panel settings.
|
||||
|
||||
While not required, most visualizations need some adjustment before they properly display the information that you need.
|
||||
|
||||
- [Configure value mappings]({{< relref "../../../panels/configure-value-mappings" >}})
|
||||
- [Visualization-specific options]({{< relref "../../../visualizations/" >}})
|
||||
- [Override field values]({{< relref "../../../panels/configure-overrides/" >}})
|
||||
- [Configure thresholds]({{< relref "../../../panels/configure-thresholds/" >}})
|
||||
- [Configure standard options]({{< relref "../../../panels/configure-standard-options/" >}})
|
||||
- [Configure value mappings]({{< relref "../../panels/configure-value-mappings" >}})
|
||||
- [Visualization-specific options]({{< relref "../../visualizations/" >}})
|
||||
- [Override field values]({{< relref "../../panels/configure-overrides/" >}})
|
||||
- [Configure thresholds]({{< relref "../../panels/configure-thresholds/" >}})
|
||||
- [Configure standard options]({{< relref "../../panels/configure-standard-options/" >}})
|
||||
|
||||
1. Add a note to describe the visualization (or describe your changes) and then click **Save** in the upper-right corner of the page.
|
||||
|
||||
Notes can be helpful if you need to revert the dashboard to a previous version.
|
||||
|
||||
## Configure repeating rows
|
||||
|
||||
You can configure Grafana to dynamically add panels or rows to a dashboard based on the value of a variable. Variables dynamically change your queries across all rows in a dashboard. For more information about repeating panels, refer to [Configure repeating panels](../../panels/configure-panel-options/#configure-repeating-panels).
|
||||
|
||||
To see an example of repeating rows, refer to [Dashboard with repeating rows](https://play.grafana.org/d/000000153/repeat-rows). The example shows that you can also repeat rows if you have variables set with `Multi-value` or `Include all values` selected.
|
||||
|
||||
**Before you begin:**
|
||||
|
||||
- Ensure that the query includes a multi-value variable.
|
||||
|
||||
**To configure repeating rows:**
|
||||
|
||||
1. On the dashboard home page, click **Add panel**.
|
||||
|
||||
1. On the **Add a panel** dialog box, click **Add a new row**.
|
||||
|
||||
1. Hover over the row title and click the cog icon.
|
||||
|
||||
1. On the **Row Options** dialog box, add a title and select the variable for which you want to add repeating rows.
|
||||
|
||||
> **Note:** To provide context to dashboard users, add the variable to the row title.
|
||||
@@ -2,18 +2,16 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/annotations/
|
||||
- /docs/grafana/latest/reference/annotations/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/annotate-visualizations/
|
||||
keywords:
|
||||
- grafana
|
||||
- annotations
|
||||
- documentation
|
||||
- guide
|
||||
title: Annotate visualizations
|
||||
menuTitle: Annotate visualizations
|
||||
weight: 600
|
||||
title: Annotations
|
||||
weight: 9
|
||||
---
|
||||
|
||||
# Annotate visualizations
|
||||
# Annotations
|
||||
|
||||
Annotations provide a way to mark points on the graph with rich events. When you hover over an annotation
|
||||
you can get event description and event tags. The text field can include links to other systems with more detail.
|
||||
@@ -22,7 +20,7 @@ you can get event description and event tags. The text field can include links t
|
||||
|
||||
## Native annotations
|
||||
|
||||
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../../../developers/http_api/annotations/" >}}).
|
||||
Grafana comes with a native annotation store and the ability to add annotation events directly from the graph panel or via the [HTTP API]({{< relref "../developers/http_api/annotations/" >}}).
|
||||
|
||||
### Add annotation
|
||||
|
||||
@@ -96,4 +94,4 @@ to show.
|
||||
|
||||
### Annotation query details
|
||||
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../../../datasources/" >}}) topic.
|
||||
The annotation query options are different for each data source. For information about annotations in a specific data source, refer to the specific [data source]({{< relref "../datasources/" >}}) topic.
|
||||
@@ -1,20 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/next/dashboards/build-dashboards/
|
||||
title: Build dashboards
|
||||
menuTitle: Build dashboards
|
||||
weight: 2
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
- dashboard folders
|
||||
- create
|
||||
- build
|
||||
- design
|
||||
---
|
||||
|
||||
# Build dashboards
|
||||
|
||||
This section includes the following topics:
|
||||
|
||||
{{< section >}}
|
||||
@@ -1,213 +0,0 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/best-practices/
|
||||
- /docs/grafana/latest/best-practices/common-observability-strategies/
|
||||
- /docs/grafana/latest/getting-started/strategies/
|
||||
- /docs/grafana/latest/best-practices/dashboard-management-maturity-levels/
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-creating-dashboards/
|
||||
- /docs/grafana/latest/best-practices/best-practices-for-managing-dashboards/
|
||||
- /docs/grafana/latest/dashboards/build-dashboards/best-practices/
|
||||
description: Best practices for working with Grafana
|
||||
title: Grafana dashboard best practices
|
||||
menuTitle: Best practices
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# Grafana dashboard best practices
|
||||
|
||||
This section provides information about best practices for intermediate Grafana administrators and users. Click on each of the links before for more information.
|
||||
|
||||
## Common observability strategies
|
||||
|
||||
When you have a lot to monitor, like a server farm, you need a strategy to decide what is important enough to monitor. This page describes several common methods for choosing what to monitor.
|
||||
|
||||
A logical strategy allows you to make uniform dashboards and scale your observability platform more easily.
|
||||
|
||||
### Guidelines for usage
|
||||
|
||||
- The USE method tells you how happy your machines are, the RED method tells you how happy your users are.
|
||||
- USE reports on causes of issues.
|
||||
- RED reports on user experience and is more likely to report symptoms of problems.
|
||||
- The best practice of alerting is to alert on symptoms rather than causes, so alerting should be done on RED dashboards.
|
||||
|
||||
### USE method
|
||||
|
||||
USE stands for:
|
||||
|
||||
- **Utilization -** Percent time the resource is busy, such as node CPU usage
|
||||
- **Saturation -** Amount of work a resource has to do, often queue length or node load
|
||||
- **Errors -** Count of error events
|
||||
|
||||
This method is best for hardware resources in infrastructure, such as CPU, memory, and network devices. For more information, refer to [The USE Method](http://www.brendangregg.com/usemethod.html).
|
||||
|
||||
### RED method
|
||||
|
||||
RED stands for:
|
||||
|
||||
- **Rate -** Requests per second
|
||||
- **Errors -** Number of requests that are failing
|
||||
- **Duration -** Amount of time these requests take, distribution of latency measurements
|
||||
|
||||
This method is most applicable to services, especially a microservices environment. For each of your services, instrument the code to expose these metrics for each component. RED dashboards are good for alerting and SLAs. A well-designed RED dashboard is a proxy for user experience.
|
||||
|
||||
For more information, refer to Tom Wilkie's blog post [The RED method: How to instrument your services](https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-services).
|
||||
|
||||
### The Four Golden Signals
|
||||
|
||||
According to the [Google SRE handbook](https://landing.google.com/sre/sre-book/chapters/monitoring-distributed-systems/#xref_monitoring_golden-signals), if you can only measure four metrics of your user-facing system, focus on these four.
|
||||
|
||||
This method is similar to the RED method, but it includes saturation.
|
||||
|
||||
- **Latency -** Time taken to serve a request
|
||||
- **Traffic -** How much demand is placed on your system
|
||||
- **Errors -** Rate of requests that are failing
|
||||
- **Saturation -** How "full" your system is
|
||||
|
||||
[Here's an example from Grafana Play](https://play.grafana.org/d/000000109/the-four-golden-signals?orgId=1).
|
||||
|
||||
## Dashboard management maturity model
|
||||
|
||||
_Dashboard management maturity_ refers to how well-designed and efficient your dashboard ecosystem is. We recommend periodically reviewing your dashboard setup to gauge where you are and how you can improve.
|
||||
|
||||
Broadly speaking, dashboard maturity can be defined as low, medium, or high.
|
||||
|
||||
Much of the content for this topic was taken from the KubeCon 2019 talk [Fool-Proof Kubernetes Dashboards for Sleep-Deprived Oncalls](https://www.youtube.com/watch?v=YE2aQFiMGfY).
|
||||
|
||||
### Low - default state
|
||||
|
||||
At this stage, you have no coherent dashboard management strategy. Almost everyone starts here.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Everyone can modify your dashboards.
|
||||
- Lots of copied dashboards, little to no dashboard reuse.
|
||||
- One-off dashboards that hang around forever.
|
||||
- No version control (dashboard JSON in version control).
|
||||
- Lots of browsing for dashboards, searching for the right dashboard. This means lots of wasted time trying to find the dashboard you need.
|
||||
- Not having any alerts to direct you to the right dashboard.
|
||||
|
||||
### Medium - methodical dashboards
|
||||
|
||||
At this stage, you are starting to manage your dashboard use with methodical dashboards. You might have laid out a strategy, but there are some things you could improve.
|
||||
|
||||
How can you tell you are here?
|
||||
|
||||
- Prevent sprawl by using template variables. For example, you don't need a separate dashboard for each node, you can use query variables. Even better, you can make the data source a template variable too, so you can reuse the same dashboard across different clusters and monitoring backends.
|
||||
|
||||
Refer to the list of [Variable examples]({{< relref "../../variables/#examples-of-templates-and-variables" >}}) if you want some ideas.
|
||||
|
||||
- Methodical dashboards according to an [observability strategy]({{< relref "#common-observability-strategies" >}}).
|
||||
- Hierarchical dashboards with drill-downs to the next level.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/drill-down-example.png" caption="Example of using drill-down" >}}
|
||||
|
||||
- Dashboard design reflects service hierarchies. The example shown below uses the RED method (request and error rate on the left, latency duration on the right) with one row per service. The row order reflects the data flow.
|
||||
|
||||
{{< figure class="float-right" max-width="100%" src="/static/img/docs/best-practices/service-hierarchy-example.png" caption="Example of a service hierarchy" >}}
|
||||
|
||||
- Compare like to like: split service dashboards when the magnitude differs. Make sure aggregated metrics don't drown out important information.
|
||||
- Expressive charts with meaningful use of color and normalizing axes where you can.
|
||||
- Example of meaningful color: Blue means it's good, red means it's bad. [Thresholds]({{< relref "../../../panels/configure-thresholds/" >}}) can help with that.
|
||||
- Example of normalizing axes: When comparing CPU usage, measure by percentage rather than raw number, because machines can have a different number of cores. Normalizing CPU usage by the number of cores reduces cognitive load because the viewer can trust that at 100% all cores are being used, without having to know the number of CPUs.
|
||||
- Directed browsing cuts down on "guessing."
|
||||
- Template variables make it harder to “just browse” randomly or aimlessly.
|
||||
- Most dashboards should be linked to by alerts.
|
||||
- Browsing is directed with links. For more information, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links" >}}).
|
||||
- Version-controlled dashboard JSON.
|
||||
|
||||
### High - optimized use
|
||||
|
||||
At this stage, you have optimized your dashboard management use with a consistent and thoughtful strategy. It requires maintenance, but the results are worth it.
|
||||
|
||||
- Actively reducing sprawl.
|
||||
- Regularly review existing dashboards to make sure they are still relevant.
|
||||
- Only approved dashboards added to master dashboard list.
|
||||
- Tracking dashboard use. If you're an Enterprise user, you can take advantage of [Usage insights]({{< relref "../../assess-dashboard-usage/" >}}).
|
||||
- Consistency by design.
|
||||
- Use scripting libraries to generate dashboards, ensure consistency in pattern and style.
|
||||
- grafonnet (Jsonnet)
|
||||
- grafanalib (Python)
|
||||
- No editing in the browser. Dashboard viewers change views with variables.
|
||||
- Browsing for dashboards is the exception, not the rule.
|
||||
- Perform experimentation and testing in a separate Grafana instance dedicated to that purpose, not your production instance. When a dashboard in the test environment is proven useful, then add that dashboard to your main Grafana instance.
|
||||
|
||||
## Best practices for creating dashboards
|
||||
|
||||
This page outlines some best practices to follow when creating Grafana dashboards.
|
||||
|
||||
### Before you begin
|
||||
|
||||
Here are some principles to consider before you create a dashboard.
|
||||
|
||||
#### A dashboard should tell a story or answer a question
|
||||
|
||||
What story are you trying to tell with your dashboard? Try to create a logical progression of data, such as large to small or general to specific. What is the goal for this dashboard? (Hint: If the dashboard doesn't have a goal, then ask yourself if you really need the dashboard.)
|
||||
|
||||
Keep your graphs simple and focused on answering the question that you are asking. For example, if your question is "which servers are in trouble?", then maybe you don't need to show all the server data. Just show data for the ones in trouble.
|
||||
|
||||
#### Dashboards should reduce cognitive load, not add to it
|
||||
|
||||
_Cognitive load_ is basically how hard you need to think about something in order to figure it out. Make your dashboard easy to interpret. Other users and future you (when you're trying to figure out what broke at 2AM) will appreciate it.
|
||||
|
||||
Ask yourself:
|
||||
|
||||
- Can I tell what exactly each graph represents? Is it obvious, or do I have to think about it?
|
||||
- If I show this to someone else, how long will it take them to figure it out? Will they get lost?
|
||||
|
||||
#### Have a monitoring strategy
|
||||
|
||||
It's easy to make new dashboards. It's harder to optimize dashboard creation and adhere to a plan, but it's worth it. This strategy should govern both your overall dashboard scheme and enforce consistency in individual dashboard design.
|
||||
|
||||
Refer to [Common observability strategies]({{< relref "#common-observability-strategies" >}}) and [Dashboard management maturity levels]({{< relref "#dashboard-management-maturity-model" >}}) for more information.
|
||||
|
||||
#### Write it down
|
||||
|
||||
Once you have a strategy or design guidelines, write them down to help maintain consistency over time. Check out this [Wikimedia runbook example](https://wikitech.wikimedia.org/wiki/Performance/Runbook/Grafana_best_practices).
|
||||
|
||||
### Best practices to follow
|
||||
|
||||
- When creating a new dashboard, make sure it has a meaningful name.
|
||||
- If you are creating a dashboard to play or experiment, then put the word `TEST` or `TMP` in the name.
|
||||
- Consider including your name or initials in the dashboard name or as a tag so that people know who owns the dashboard.
|
||||
- Remove temporary experiment dashboards when you are done with them.
|
||||
- If you create many related dashboards, think about how to cross-reference them for easy navigation. Refer to [Best practices for managing dashboards]({{< relref "#best-practices-for-managing-dashboards" >}}) for more information.
|
||||
- Grafana retrieves data from a data source. A basic understanding of [data sources]({{< relref "../../../datasources/" >}}) in general and your specific is important.
|
||||
- Avoid unnecessary dashboard refreshing to reduce the load on the network or backend. For example, if your data changes every hour, then you don't need to set the dashboard refresh rate to 30 seconds.
|
||||
- Use the left and right Y-axes when displaying time series with different units or ranges.
|
||||
- Add documentation to dashboards and panels.
|
||||
- To add documentation to a dashboard, add a [Text panel visualization]({{< relref "../../../visualizations/text-panel/" >}}) to the dashboard. Record things like the purpose of the dashboard, useful resource links, and any instructions users might need to interact with the dashboard. Check out this [Wikimedia example](https://grafana.wikimedia.org/d/000000066/resourceloader?orgId=1).
|
||||
- To add documentation to a panel, edit the panel settings and add a description. Any text you add will appear if you hover your cursor over the small `i` in the top left corner of the panel.
|
||||
- Reuse your dashboards and enforce consistency by using [templates and variables]({{< relref "../../variables" >}}).
|
||||
- Be careful with stacking graph data. The visualizations can be misleading, and hide important data. We recommend turning it off in most cases.
|
||||
|
||||
## Best practices for managing dashboards
|
||||
|
||||
This page outlines some best practices to follow when managing Grafana dashboards.
|
||||
|
||||
### Before you begin
|
||||
|
||||
Here are some principles to consider before you start managing dashboards.
|
||||
|
||||
#### Strategic observability
|
||||
|
||||
There are several [common observability strategies]({{< relref "#common-observability-strategies" >}}). You should research them and decide whether one of them works for you or if you want to come up with your own. Either way, have a plan, write it down, and stick to it.
|
||||
|
||||
Adapt your strategy to changing needs as necessary.
|
||||
|
||||
#### Maturity level
|
||||
|
||||
What is your dashboard maturity level? Analyze your current dashboard setup and compare it to the [Dashboard management maturity model]({{< relref "#dashboard-management-maturity-model" >}}). Understanding where you are can help you decide how to get to where you want to be.
|
||||
|
||||
### Best practices to follow
|
||||
|
||||
- Avoid dashboard sprawl, meaning the uncontrolled growth of dashboards. Dashboard sprawl negatively affects time to find the right dashboard. Duplicating dashboards and changing “one thing” (worse: keeping original tags) is the easiest kind of sprawl.
|
||||
- Periodically review the dashboards and remove unnecessary ones.
|
||||
- If you create a temporary dashboard, perhaps to test something, prefix the name with `TEST: `. Delete the dashboard when you are finished.
|
||||
- Copying dashboards with no significant changes is not a good idea.
|
||||
- You miss out on updates to the original dashboard, such as documentation changes, bug fixes, or additions to metrics.
|
||||
- In many cases copies are being made to simply customize the view by setting template parameters. This should instead be done by maintaining a link to the master dashboard and customizing the view with [URL parameters]({{< relref "../../../panels/configure-data-links/#data-link-variables" >}}).
|
||||
- When you must copy a dashboard, clearly rename it and _do not_ copy the dashboard tags. Tags are important metadata for dashboards that are used during search. Copying tags can result in false matches.
|
||||
- Maintain a dashboard of dashboards or cross-reference dashboards. This can be done in several ways:
|
||||
- Create dashboard links, panel, or data links. Links can go to other dashboards or to external systems. For more information, refer to [Manage dashboard links]({{< relref "../manage-dashboard-links/" >}}).
|
||||
- Add a [Dashboard list panel]({{< relref "../../../visualizations/dashboard-list-panel/" >}}). You can then customize what you see by doing tag or folder searches.
|
||||
- Add a [Text panel]({{< relref "../../../visualizations/text-panel/" >}}) and use markdown to customize the display.
|
||||
@@ -2,19 +2,17 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/dashboard-history/
|
||||
- /docs/grafana/latest/reference/dashboard_history/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/manage-version-history/
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
- documentation
|
||||
- version
|
||||
- history
|
||||
title: Manage dashboard version history
|
||||
menutitle: Manage version history
|
||||
weight: 400
|
||||
title: Dashboard version history
|
||||
weight: 14
|
||||
---
|
||||
|
||||
# Manage dashboard version history
|
||||
# Dashboard version history
|
||||
|
||||
Whenever you save a version of your dashboard, a copy of that version is saved so that previous versions of your dashboard are never lost. A list of these versions is available by entering the dashboard settings and then selecting "Versions" in the left side menu.
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
aliases:
|
||||
- /docs/grafana/latest/dashboards/json-model/
|
||||
- /docs/grafana/latest/reference/dashboard/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/view-dashboard-json-model/
|
||||
keywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
@@ -10,7 +9,7 @@ keywords:
|
||||
- json
|
||||
- model
|
||||
title: JSON model
|
||||
weight: 700
|
||||
weight: 1200
|
||||
---
|
||||
|
||||
# Dashboard JSON model
|
||||
@@ -6,7 +6,6 @@ aliases:
|
||||
- /docs/grafana/latest/linking/dashboard-links/
|
||||
- /docs/grafana/latest/dashboards/manage-dashboard-links/
|
||||
- /docs/grafana/latest/panels/working-with-panels/add-link-to-panel/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/manage-dashboard-links/
|
||||
description: How to link Grafana dashboards.
|
||||
keywords:
|
||||
- link
|
||||
@@ -18,7 +17,7 @@ keywords:
|
||||
- navigate
|
||||
title: Manage dashboard links
|
||||
menuTitle: Manage dashboard links
|
||||
weight: 500
|
||||
weight: 400
|
||||
---
|
||||
|
||||
# Manage dasboard links
|
||||
@@ -36,7 +35,7 @@ The next step is to figure out which link type is right for your workflow. Even
|
||||
- If the link relates to most if not all of the panels in the dashboard, use [dashboard links]({{< relref "#dashboard-links" >}}).
|
||||
- If you want to drill down into specific panels, use [panel links]({{< relref "#panel-links" >}}).
|
||||
- If you want to link to an external site, you can use either a dashboard link or a panel link.
|
||||
- If you want to drill down into a specific series, or even a single measurement, use [data links]({{< relref "../../../panels/configure-data-links/#data-links" >}}).
|
||||
- If you want to drill down into a specific series, or even a single measurement, use [data links]({{< relref "../../panels/configure-data-links/#data-links" >}}).
|
||||
|
||||
## Controlling time range using the URL
|
||||
|
||||
@@ -48,7 +47,7 @@ You can control the time range of a panel or dashboard by providing following qu
|
||||
|
||||
## Dashboard links
|
||||
|
||||
When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you don’t have to worry whether the person you send the link to is looking at the right data. For other types of links, refer to [Data link variables]({{< relref "../../../panels/configure-data-links/#data-link-variables/" >}}).
|
||||
When you create a dashboard link, you can include the time range and current template variables to directly jump to the same context in another dashboard. This way, you don’t have to worry whether the person you send the link to is looking at the right data. For other types of links, refer to [Data link variables]({{< relref "../../panels/configure-data-links/#data-link-variables/" >}}).
|
||||
|
||||
Dashboard links can also be used as shortcuts to external systems, such as submitting [a GitHub issue with the current dashboard name](https://github.com/grafana/grafana/issues/new?title=Dashboard%3A%20HTTP%20Requests).
|
||||
|
||||
@@ -14,7 +14,7 @@ aliases:
|
||||
title: Manage dashboards
|
||||
menuTitle: Manage dashboards
|
||||
weight: 8
|
||||
keywords:
|
||||
eywords:
|
||||
- grafana
|
||||
- dashboard
|
||||
- dashboard folders
|
||||
|
||||
@@ -7,11 +7,10 @@ aliases:
|
||||
- /docs/grafana/latest/panels/library-panels/unlink-library-panel/
|
||||
- /docs/grafana/latest/panels/library-panels/manage-library-panel/
|
||||
- /docs/grafana/latest/panels/library-panels/delete-library-panel/
|
||||
- /docs/grafana/next/dashboards/manage-library-panels/
|
||||
- /docs/grafana/next/dashboards/build-dashboards/manage-library-panels/
|
||||
- /docs/grafana/latest/dashboards/manage-library-panels/
|
||||
title: Manage Grafana library panels
|
||||
menuTitle: Manage library panels
|
||||
weight: 300
|
||||
weight: 3
|
||||
---
|
||||
|
||||
# Manage Grafana library panels
|
||||
@@ -80,7 +80,7 @@ Use the new [contextPerRenderKey]({{< relref "../setup-grafana/image-rendering/#
|
||||
|
||||
### Saving previews
|
||||
|
||||
The crawler saves previews and their metadata in Grafana's DB. Preview's metadata contains, among other things, the [dashboard version]({{< relref "./build-dashboards/manage-version-history" >}}) from the time of taking the screenshot. During subsequent runs, the crawler uses the saved version to find stale dashboard previews.
|
||||
The crawler saves previews and their metadata in Grafana's DB. Preview's metadata contains, among other things, the [dashboard version]({{< relref "dashboard-history/" >}}) from the time of taking the screenshot. During subsequent runs, the crawler uses the saved version to find stale dashboard previews.
|
||||
|
||||
## Permissions
|
||||
|
||||
|
||||
@@ -16,9 +16,7 @@ Each data source has a specific Query Editor that is customized for the features
|
||||
|
||||
## Supported data sources
|
||||
|
||||
> **Note:** For a list of all data source plugins created by Grafana Labs, view the [plugin catalog](https://grafana.com/grafana/plugins/?type=datasource) and select the "Data sources" and "Grafana Labs created" filters. For a list of all Enterprise-level plugins, which have additional support, also enable the [Enterprise filter](https://grafana.com/grafana/plugins/?enterprise=1&type=datasource).
|
||||
|
||||
These data sources have additional documentation:
|
||||
The following data sources are officially supported:
|
||||
|
||||
- [Alertmanager]({{< relref "./alertmanager/" >}})
|
||||
- [AWS CloudWatch]({{< relref "./aws-cloudwatch/" >}})
|
||||
@@ -38,7 +36,7 @@ These data sources have additional documentation:
|
||||
- [Tempo]({{< relref "./tempo/" >}})
|
||||
- [Testdata]({{< relref "./testdata/" >}})
|
||||
|
||||
In addition to the data sources that you have configured in your Grafana instance, there are three special data sources available:
|
||||
In addition to the data sources that you have configured in your Grafana, there are three special data sources available:
|
||||
|
||||
- **Grafana -** A built-in data source that generates random walk data. Useful for testing visualizations and running experiments.
|
||||
- **Mixed -** Select this to query multiple data sources in the same panel. When this data source is selected, Grafana allows you to select a data source for every new query that you add.
|
||||
@@ -49,4 +47,4 @@ In addition to the data sources that you have configured in your Grafana instanc
|
||||
|
||||
## Data source plugins
|
||||
|
||||
You can install additional data sources as plugins. To view available data source plugins, see the [Grafana Plugins catalog](https://grafana.com/plugins). To build your own, see the ["Build a data source plugin"](https://grafana.com/tutorials/build-a-data-source-plugin/) tutorial and our documentation about [building a plugin](/developers/plugins/).
|
||||
Since Grafana 3.0 you can install data sources as plugins. Check out [Grafana.com/plugins](https://grafana.com/plugins) for more data sources.
|
||||
|
||||
@@ -180,7 +180,7 @@ Example dashboard:
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view. Grafana can query any Elasticsearch index
|
||||
for annotation events.
|
||||
|
||||
|
||||
@@ -280,7 +280,7 @@ Refer to the [variable syntax documentation]({{< relref "../../dashboards/variab
|
||||
|
||||
{{< figure src="/static/img/docs/google-cloud-monitoring/annotations-8-0.png" max-width= "400px" class="docs-image--right" >}}
|
||||
|
||||
[Annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view. Annotation rendering is expensive so it is important to limit the number of rows returned. There is no support for showing Google Cloud Monitoring annotations and events yet but it works well with [custom metrics](https://cloud.google.com/monitoring/custom-metrics/) in Google Cloud Monitoring.
|
||||
|
||||
With the query editor for annotations, you can select a metric and filters. The `Title` and `Text` fields support templating and can use data returned from the query. For example, the Title field could have the following text:
|
||||
|
||||
@@ -216,7 +216,7 @@ For more information, refer to [Advanced variable format options]({{< relref "..
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view.
|
||||
|
||||
Graphite supports two ways to query annotations. A regular metric query, for this you use the `Graphite query` textbox. A Graphite events query, use the `Graphite event tags` textbox,
|
||||
|
||||
@@ -146,7 +146,7 @@ To add a filter, click the plus icon to the right of the `Measurements/Fields` b
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
|
||||
[Annotations]({{< relref "../../dashboards/annotations/" >}}) allows you to overlay rich event information on top of graphs. Add annotation queries using the Annotations view in the Dashboard menu.
|
||||
|
||||
An example query:
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ You can use some global built-in variables in query variables; `$__interval`, `$
|
||||
|
||||
## Annotations
|
||||
|
||||
You can use any non-metric Loki query as a source for [annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}). Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
|
||||
You can use any non-metric Loki query as a source for [annotations]({{< relref "../dashboards/annotations/" >}}). Log content will be used as annotation text and your log stream labels as tags, so there is no need for additional mapping.
|
||||
|
||||
## Configure the data source with provisioning
|
||||
|
||||
|
||||
@@ -345,7 +345,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../da
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Columns:**
|
||||
|
||||
|
||||
@@ -382,7 +382,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../da
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Example query using time column with epoch values:**
|
||||
|
||||
|
||||
@@ -19,22 +19,22 @@ Grafana ships with a built-in PostgreSQL data source plugin that allows you to q
|
||||
|
||||
To access PostgreSQL settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the PostgreSQL data source.
|
||||
|
||||
| Name | Description |
|
||||
| ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
||||
| `Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and it may cause errors. |
|
||||
| `Database` | Name of your PostgreSQL database. |
|
||||
| `User` | Database user's login/username |
|
||||
| `Password` | Database user's password |
|
||||
| `SSL Mode` | Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. When SSL Mode is disabled, SSL Method and Auth Details would not be visible. |
|
||||
| `SSL Auth Details Method` | Determines whether the SSL Auth details will be configured as a file path or file content. Grafana v7.5+ |
|
||||
| `SSL Auth Details Value` | File path or file content of SSL root certificate, client certificate and client key |
|
||||
| `Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). |
|
||||
| `Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). |
|
||||
| `Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). |
|
||||
| `Version` | Determines which functions are available in the query builder (only available in Grafana 5.3+). |
|
||||
| `TimescaleDB` | A time-series database built as a PostgreSQL extension. When enabled, Grafana uses `time_bucket` in the `$__timeGroup` macro to display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). For more information, see [TimescaleDB documentation](https://docs.timescale.com/timescaledb/latest/tutorials/grafana/grafana-timescalecloud/#connect-timescaledb-and-grafana). |
|
||||
| Name | Description |
|
||||
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `Name` | The data source name. This is how you refer to the data source in panels and queries. |
|
||||
| `Default` | Default data source means that it will be pre-selected for new panels. |
|
||||
| `Host` | The IP address/hostname and optional port of your PostgreSQL instance. _Do not_ include the database name. The connection string for connecting to Postgres will not be correct and it may cause errors. |
|
||||
| `Database` | Name of your PostgreSQL database. |
|
||||
| `User` | Database user's login/username |
|
||||
| `Password` | Database user's password |
|
||||
| `SSL Mode` | Determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server. When SSL Mode is disabled, SSL Method and Auth Details would not be visible. |
|
||||
| `SSL Auth Details Method` | Determines whether the SSL Auth details will be configured as a file path or file content. Grafana v7.5+ |
|
||||
| `SSL Auth Details Value` | File path or file content of SSL root certificate, client certificate and client key |
|
||||
| `Max open` | The maximum number of open connections to the database, default `unlimited` (Grafana v5.4+). |
|
||||
| `Max idle` | The maximum number of connections in the idle connection pool, default `2` (Grafana v5.4+). |
|
||||
| `Max lifetime` | The maximum amount of time in seconds a connection may be reused, default `14400`/4 hours (Grafana v5.4+). |
|
||||
| `Version` | Determines which functions are available in the query builder (only available in Grafana 5.3+). |
|
||||
| `TimescaleDB` | A time-series database built as a PostgreSQL extension. When enabled, Grafana uses `time_bucket` in the `$__timeGroup` macro to display TimescaleDB specific aggregate functions in the query builder (only available in Grafana 5.3+). |
|
||||
|
||||
### Min time interval
|
||||
|
||||
@@ -380,7 +380,7 @@ Read more about variable formatting options in the [Variables]({{< relref "../da
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation queries via the Dashboard menu / Annotations view.
|
||||
|
||||
**Example query using time column with epoch values:**
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ applied to all your Prometheus queries.
|
||||
|
||||
## Annotations
|
||||
|
||||
[Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
[Annotations]({{< relref "../dashboards/annotations/" >}}) allow you to overlay rich event information on top of graphs. You add annotation
|
||||
queries via the Dashboard menu / Annotations view.
|
||||
|
||||
Prometheus supports two ways to query annotations.
|
||||
|
||||
@@ -21,7 +21,7 @@ title: RBAC HTTP API
|
||||
|
||||
The API can be used to create, update, delete, get, and list roles.
|
||||
|
||||
To check which basic or fixed roles have the required permissions, refer to [RBAC role definitions]({{< ref "../../administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions/" >}}).
|
||||
To check which basic or fixed roles have the required permissions, refer to [RBAC role definitions]({{< ref "../../administration/roles-and-permissions/access-control/rbac-fixed-basic-role-definitions.md" >}}).
|
||||
|
||||
## Get status
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ title: Add support for annotations
|
||||
|
||||
# Add support for annotations
|
||||
|
||||
This guide explains how to add support for [annotations]({{< relref "../../dashboards/build-dashboards/annotate-visualizations" >}}) to an existing data source plugin.
|
||||
This guide explains how to add support for [annotations]({{< relref "../../dashboards/annotations/" >}}) to an existing data source plugin.
|
||||
|
||||
This guide assumes that you're already familiar with how to [Build a data source plugin]({{< ref "build-a-data-source-plugin.md" >}}).
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ title: Legacy snapshot mode
|
||||
|
||||
{{< figure class="float-right" src="/static/img/docs/Grafana-snapshot-example.png" caption="A dashboard using snapshot data and not live data." >}}
|
||||
|
||||
Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../dashboards/build-dashboards/view-dashboard-json-model" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](https://snapshots.raintank.io) if you want to send the snapshot to someone who does not have access to your Grafana server.
|
||||
Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../dashboards/json-model/" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](https://snapshots.raintank.io) if you want to send the snapshot to someone who does not have access to your Grafana server.
|
||||
|
||||
{{< figure class="float-right" src="/static/img/docs/animated_gifs/snapshots.gif" caption="Selecting a snapshot" >}}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ Alert hooks allow you to create different notifiers with a bit of code if you pr
|
||||
|
||||
Annotate graphs with rich events from different data sources. Hover over events to see the full event metadata and tags.
|
||||
|
||||
This feature, which shows up as a graph marker in Grafana, is useful for correlating data in case something goes wrong. You can create the annotations manually—just control-click on a graph and input some text—or you can fetch data from any data source. Refer to [Annotations]({{< relref "../dashboards/build-dashboards/annotate-visualizations" >}}) for more information.
|
||||
This feature, which shows up as a graph marker in Grafana, is useful for correlating data in case something goes wrong. You can create the annotations manually—just control-click on a graph and input some text—or you can fetch data from any data source. Refer to [Annotations]({{< relref "../dashboards/annotations.md" >}}) for more information.
|
||||
|
||||
## Dashboard variables
|
||||
|
||||
|
||||
18
docs/sources/panels/add-panels-dynamically/_index.md
Normal file
18
docs/sources/panels/add-panels-dynamically/_index.md
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/
|
||||
- /docs/grafana/latest/panels/repeat-panels-or-rows/
|
||||
- /docs/sources/panels/add-panels-dynamically/
|
||||
keywords:
|
||||
- dynamic
|
||||
- variable
|
||||
- panel
|
||||
title: Enable template variables to add panels dynamically
|
||||
weight: 800
|
||||
---
|
||||
|
||||
# Enable template variables to add panels dynamically
|
||||
|
||||
Harness the power of Grafana by configuring the system to automatically and dynamically add panels based on criteria that you define.
|
||||
|
||||
{{< section >}}
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/about-repeating-panels-rows/
|
||||
- /docs/sources/panels/add-panels-dynamically/about-repeating-panels-rows/
|
||||
title: About repeating panels or rows
|
||||
weight: 10
|
||||
---
|
||||
|
||||
# About repeating panels and rows
|
||||
|
||||
You can configure Grafana to dynamically add panels or rows to a dashboard. A dynamic panel (or row) is a panel that the system creates based on the value of a variable. Variables dynamically change your queries across all panels in a dashboard.
|
||||
|
||||
## Grafana Play examples
|
||||
|
||||
You can see examples in the following dashboards:
|
||||
|
||||
- [Prometheus repeat](https://play.grafana.org/d/000000036/prometheus-repeat)
|
||||
- [Repeated Rows Dashboard](https://play.grafana.org/d/000000153/repeat-rows).
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-panels/
|
||||
- /docs/sources/panels/add-panels-dynamically/configure-repeating-panels/
|
||||
title: Configure repeating panels
|
||||
weight: 20
|
||||
---
|
||||
|
||||
# Configure repeating panels
|
||||
|
||||
For queries that return multiple values for a variable, you can configure Grafana to dynamically add panels based on those values.
|
||||
|
||||
> **Note:** Repeating panels require variables to have one or more items selected; you cannot repeat a panel zero times to hide it.
|
||||
|
||||
## Before you begin
|
||||
|
||||
- Ensure that the query includes a multi-value variable.
|
||||
|
||||
**To configure repeating panels**:
|
||||
|
||||
1. Edit the panel you want to repeat.
|
||||
|
||||
1. On the display options pane, expand **Panel options > Repeat options**.
|
||||
|
||||
1. Select a `direction`.
|
||||
|
||||
- Choose `horizontal` to arrange panels side-by-side. Grafana adjusts the width of a repeated panel. Currently, you cannot mix other panels on a row with a repeated panel.
|
||||
- Choose `vertical` to arrange panels in a column. The width of repeated panels is the same as the original, repeated panel.
|
||||
|
||||
1. To propagate changes to all panels, reload the dashboard.
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/panels/add-panels-dynamically/configure-repeating-rows/
|
||||
- /docs/sources/panels/add-panels-dynamically/configure-repeating-rows/
|
||||
title: Configure repeating rows
|
||||
weight: 30
|
||||
---
|
||||
|
||||
# Configure repeating rows
|
||||
|
||||
As seen above with the panels you can also repeat rows if you have variables set with `Multi-value` or
|
||||
`Include all value` selection option.
|
||||
|
||||
## Before you begin
|
||||
|
||||
- Ensure that the query includes a multi-value variable.
|
||||
|
||||
**To configure repeating rows**:
|
||||
|
||||
1. On the dashboard home page, click **Add panel**.
|
||||
|
||||
1. On the **Add a panel** dialog box, click **Add a new row**.
|
||||
|
||||
1. Hover over the row title and click the cog icon.
|
||||
|
||||
1. On the `Row Options` configuration panel, select the variable for which you want to add repeating rows.
|
||||
|
||||
> To help provide context to dashboard users, add the variable to the row title.
|
||||
@@ -67,7 +67,7 @@ You can also paste a native emoji in the unit picker and pick it as a custom uni
|
||||
|
||||
#### String units
|
||||
|
||||
Grafana can sometimes be too aggressive in parsing strings and displaying them as numbers. To configure Grafana to show the original string value, create a field override and add a unit property with the `String` unit.
|
||||
Grafana can sometime be too aggressive in parsing strings and displaying them as numbers. To make Grafana show the original string create a field override and add a unit property with the `string` unit.
|
||||
|
||||
### Min
|
||||
|
||||
@@ -79,9 +79,9 @@ Lets you set the maximum value used in percentage threshold calculations. Leave
|
||||
|
||||
### Decimals
|
||||
|
||||
Specify the number of decimals Grafana includes in the rendered value. If you leave this field blank, Grafana automatically truncates the number of decimals based on the value. For example 1.1234 will display as 1.12 and 100.456 will display as 100.
|
||||
Number of decimals to render value with. Leave empty for Grafana to use the number of decimals provided by the data source.
|
||||
|
||||
To display all decimals, set the unit to `String`.
|
||||
To change this setting, type a number in the field and then click outside the field or press Enter.
|
||||
|
||||
### Display name
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ The Dashboard data source lets you select a panel in your dashboard that contain
|
||||
|
||||
This strategy can drastically reduce the number of queries being made when you for example have several panels visualizing the same data.
|
||||
|
||||
1. [Create a dashboard and add a panel]({{< relref "../../dashboards/build-dashboards/add-organize-panels/#create-a-dashboard-and-add-a-panel" >}}).
|
||||
1. [Create a dashboard and add a panel]({{< relref "../../dashboards/add-organize-panels/#create-a-dashboard-and-add-a-panel" >}}).
|
||||
1. Change the title to "Source panel". You'll use this panel as a source for the other panels.
|
||||
1. Define the [query]({{< relref "add-a-query/" >}}) or queries that you want share.
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ is_nan takes a number or a series and returns `1` for `NaN` values and `0` for o
|
||||
|
||||
##### is_null
|
||||
|
||||
is_null takes a number or a series and returns `1` for `null` values and `0` for other values. For example `is_null($A)`.
|
||||
is_nan takes a number or a series and returns `1` for `null` values and `0` for other values. For example `is_null($A)`.
|
||||
|
||||
##### is_number
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/panels/working-with-panels/add-title-and-description/
|
||||
- /docs/sources/panels/working-with-panels/add-title-and-description/
|
||||
title: Add a title and description to a panel
|
||||
weight: 30
|
||||
---
|
||||
|
||||
# Add a title and description to a panel
|
||||
|
||||
Add a title and description to a panel to share with users any important information about the visualization. For example, use the description to document the purpose of the visualization.
|
||||
|
||||
1. Open a panel.
|
||||
|
||||
1. In the panel display options pane, locate the **Panel options** section.
|
||||
|
||||
1. Enter a **Title**.
|
||||
|
||||
Text entered in this field is displayed at the top of your panel in the panel editor and in the dashboard.
|
||||
|
||||
You can use [variables you have defined]({{< relref "../../variables/" >}}) in either field, but not [global variables]({{< relref "../../variables/variable-types/global-variables/" >}}).
|
||||
|
||||
1. Write a description of the panel and the data you are displaying.
|
||||
|
||||
Text entered in this field is displayed in a tooltip in the upper left corner of the panel.
|
||||
|
||||
You can use [variables you have defined]({{< relref "../../variables/" >}}) in either field, but not [global variables]({{< relref "../../variables/variable-types/global-variables/" >}}).
|
||||
|
||||

|
||||
21
docs/sources/panels/working-with-panels/view-json-model.md
Normal file
21
docs/sources/panels/working-with-panels/view-json-model.md
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
aliases:
|
||||
- /docs/grafana/latest/panels/working-with-panels/view-json-model/
|
||||
- /docs/sources/panels/working-with-panels/view-json-model/
|
||||
title: View a panel JSON model
|
||||
weight: 100
|
||||
---
|
||||
|
||||
# View a panel JSON model
|
||||
|
||||
Explore and export panel, panel data, and data frame JSON models.
|
||||
|
||||
1. Open the panel inspector and then click the **JSON** tab or in the panel menu click **Inspect > Panel JSON**.
|
||||
|
||||
1. In Select source, choose one of the following options:
|
||||
|
||||
- **Panel JSON -** Displays a JSON object representing the panel.
|
||||
- **Panel data -** Displays a JSON object representing the data that was passed to the panel.
|
||||
- **DataFrame structure -** Displays the raw result set with transformations, field configuration, and overrides configuration applied.
|
||||
|
||||
1. You can expand or collapse portions of the JSON to explore it, or you can click **Copy to clipboard** and paste the JSON in another application.
|
||||
@@ -10,7 +10,6 @@ weight: 10000
|
||||
Here you can find detailed release notes that list everything that is included in every release as well as notices
|
||||
about deprecations, breaking changes as well as changes that relate to plugin development.
|
||||
|
||||
- [Release notes for 9.1.6]({{< relref "release-notes-9-1-6" >}})
|
||||
- [Release notes for 9.1.5]({{< relref "release-notes-9-1-5" >}})
|
||||
- [Release notes for 9.1.4]({{< relref "release-notes-9-1-4" >}})
|
||||
- [Release notes for 9.1.3]({{< relref "release-notes-9-1-3" >}})
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
+++
|
||||
title = "Release notes for Grafana 9.1.6"
|
||||
hide_menu = true
|
||||
+++
|
||||
|
||||
<!-- Auto generated by update changelog github action -->
|
||||
|
||||
# Release notes for Grafana 9.1.6
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Auth:** Trigger auth token cleanup job. (Enterprise)
|
||||
- **DataSource:** Adding possibility to hide queries from the inspector. [#54892](https://github.com/grafana/grafana/pull/54892), [@mckn](https://github.com/mckn)
|
||||
- **Inspect:** Hide Actions tab when it is empty. [#55272](https://github.com/grafana/grafana/pull/55272), [@ryantxu](https://github.com/ryantxu)
|
||||
- **PanelMenu:** Remove hide legend action as it was showing on all panel types. [#54876](https://github.com/grafana/grafana/pull/54876), [@torkelo](https://github.com/torkelo)
|
||||
- **Provisioning Contact points:** Support disableResolveMessage via YAML. [#54122](https://github.com/grafana/grafana/pull/54122), [@mmusenbr](https://github.com/mmusenbr)
|
||||
- **PublicDashboards:** Support subpaths when generating pubdash url. [#55204](https://github.com/grafana/grafana/pull/55204), [@owensmallwood](https://github.com/owensmallwood)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix legacy migration crash when rule name is too long. [#55053](https://github.com/grafana/grafana/pull/55053), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Fix send resolved notifications. [#54793](https://github.com/grafana/grafana/pull/54793), [@grobinson-grafana](https://github.com/grobinson-grafana)
|
||||
- **Azure Monitor:** Fix migration issue with MetricDefinitionsQuery template variable query types. [#55262](https://github.com/grafana/grafana/pull/55262), [@yaelleC](https://github.com/yaelleC)
|
||||
- **Browse:** Hide dashboard actions if user does not have enough permission. [#55218](https://github.com/grafana/grafana/pull/55218), [@lpskdl](https://github.com/lpskdl)
|
||||
- **ElasticSearch:** Fix dispatching queries at a wrong time. [#55225](https://github.com/grafana/grafana/pull/55225), [@svennergr](https://github.com/svennergr)
|
||||
- **Panel:** Disable legends when showLegend is false prior to schema v37. [#55126](https://github.com/grafana/grafana/pull/55126), [@ivanortegaalba](https://github.com/ivanortegaalba)
|
||||
- **Prometheus:** Fix metadata requests for browser access mode. [#55403](https://github.com/grafana/grafana/pull/55403), [@itsmylife](https://github.com/itsmylife)
|
||||
- **Search:** Avoid requesting all dashboards when in Folder View. [#55169](https://github.com/grafana/grafana/pull/55169), [@JoaoSilvaGrafana](https://github.com/JoaoSilvaGrafana)
|
||||
- **TablePanel/StatPanel:** Fix values not being visible when background transparent. [#55092](https://github.com/grafana/grafana/pull/55092), [@mdvictor](https://github.com/mdvictor)
|
||||
@@ -9,7 +9,7 @@ weight: 100
|
||||
|
||||
# Configure Grafana Enterprise
|
||||
|
||||
This page describes Grafana Enterprise-specific configuration options that you can specify in a `.ini` configuration file or using environment variables. Refer to [Configuration]({{< relref "../" >}}) for more information about available configuration options.
|
||||
This page describes Grafana Enterprise-specific configuration options that you can specify in a `.ini` configuration file or using environment variables. Refer to [Configuration]({{< relref "/" >}}) for more information about available configuration options.
|
||||
|
||||
## [enterprise]
|
||||
|
||||
|
||||
@@ -62,14 +62,14 @@ If `auto_sign_up` is enabled, then the `sub` claim is used as the "external Auth
|
||||
If you want to embed Grafana in an iframe while maintaning user identity and role checks,
|
||||
you can use JWT authentication to authenticate the iframe.
|
||||
|
||||
> **Note**: For Grafana Cloud, or scenarios where verifying viewer identity is not required,
|
||||
> embed [public dashboards]({{< relref "../../../dashboards/dashboard-public" >}}).
|
||||
> **Note**: for scenarios where verifying viewer identity is not required,
|
||||
> [public dashboards]({{< relref "../../../dashboards/dashboard-public" >}}) embedding should be used.
|
||||
|
||||
In this scenario, you will need to configure Grafana to accept a JWT
|
||||
provided in the HTTP header and a reverse proxy should rewrite requests to the
|
||||
Grafana instance to include the JWT in the request's headers.
|
||||
|
||||
> **Note**: For embedding to work, you must enable `allow_embedding` in the [security section]({{< relref "../../configure-grafana#allow_embedding" >}}). This setting is not available in Grafana Cloud.
|
||||
> **Note**: for embedding to work `allow_embedding` must be enabled in the [security section]({{< relref "../../configure-grafana#allow_embedding" >}}).
|
||||
|
||||
In a scenario where it is not possible to rewrite the request headers you
|
||||
can use URL login instead.
|
||||
|
||||
@@ -190,7 +190,7 @@ org_role = "Viewer"
|
||||
| Setting | Required | Description | Default |
|
||||
| --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
|
||||
| `group_dn` | Yes | LDAP distinguished name (DN) of LDAP group. If you want to match all (or no LDAP groups) then you can use wildcard (`"*"`) |
|
||||
| `org_role` | Yes | Assign users of `group_dn` the organization role `Admin`, `Editor`, or `Viewer`. The organization role name is case sensitive. |
|
||||
| `org_role` | Yes | Assign users of `group_dn` the organization role `"Admin"`, `"Editor"` or `"Viewer"` |
|
||||
| `org_id` | No | The Grafana organization database id. Setting this allows for multiple group_dn's to be assigned to the same `org_role` provided the `org_id` differs | `1` (default org id) |
|
||||
| `grafana_admin` | No | When `true` makes user of `group_dn` Grafana server admin. A Grafana server admin has admin access over all organizations and users. Available in Grafana v5.3 and above | `false` |
|
||||
|
||||
|
||||
@@ -58,8 +58,6 @@ By default, Grafana installs with and uses SQLite, which is an embedded database
|
||||
Grafana will support the versions of these databases that are officially supported by the project at the time of a Grafana version's release. When a version becomes unsupported, Grafana may also drop support for that version. See the links above for the support policies for each project.
|
||||
|
||||
> **Note:** PostgreSQL versions 10.9, 11.4, and 12-beta2 are affected by a bug (tracked by the PostgreSQL project as [bug #15865](https://www.postgresql.org/message-id/flat/15865-17940eacc8f8b081%40postgresql.org)) which prevents those versions from being used with Grafana. The bug has been fixed in more recent versions of PostgreSQL.
|
||||
>
|
||||
> Grafana can report errors when relying on read-only MySQL servers, such as in high-availability failover scenarios or serverless AWS Aurora MySQL. This is a known issue; for more information, see [issue #13399](https://github.com/grafana/grafana/issues/13399).
|
||||
|
||||
## Supported web browsers
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ spec:
|
||||
- 0
|
||||
containers:
|
||||
- name: grafana
|
||||
image: grafana/grafana:9.1.0
|
||||
image: grafana/grafana:8.4.4
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 3000
|
||||
|
||||
@@ -129,7 +129,7 @@ grafana-cli plugins update-all
|
||||
|
||||
The dashboard grid layout engine has changed. All dashboards will be automatically upgraded to new positioning system when you load them in v5. Dashboards saved in v5 will not work in older versions of Grafana. Some external panel plugins might need to be updated to work properly.
|
||||
|
||||
For more details on the new panel positioning system, refer to [panel size position]({{< relref "../dashboards/build-dashboards/view-dashboard-json-model/#panel-size-and-position" >}}).
|
||||
For more details on the new panel positioning system, refer to [panel size position]({{< relref "../dashboards/json-model/#panel-size-position" >}})
|
||||
|
||||
## Upgrading to v5.2
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ To learn more about the differences between new alerts and the legacy alerts, re
|
||||
|
||||
### Library panels
|
||||
|
||||
Library panels allow users to build panels that can be used in multiple dashboards. Any updates made to that shared panel will then automatically be applied to all the dashboards that have that panel. For instructions on how to create, add, unlink and manage library panels, refer to [Library panels]({{< relref "../dashboards/build-dashboards/manage-library-panels" >}}).
|
||||
Library panels allow users to build panels that can be used in multiple dashboards. Any updates made to that shared panel will then automatically be applied to all the dashboards that have that panel. For instructions on how to create, add, unlink and manage library panels, refer to [Library panels]({{< relref "../dashboards/manage-library-panels/" >}}).
|
||||
|
||||
### Real-time streaming
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ You can now easily embed Grafana in other applications by adding a JWT token dir
|
||||
When the JWT token is passed through the request URL to Grafana, Grafana validates and authenticates the token linked to a specific user, allowing access to dashboards which that user can view.
|
||||
To see JWT URL embedding in action, see the [sample project](https://github.com/grafana/grafana-iframe-oauth-sample).
|
||||
|
||||
> **Note:** JWT URL Embedding and `allow_embedding` are not available to Grafana Cloud users. For Grafana Cloud, use the [Public Dashboards]({{< relref "../dashboards/dashboard-public/" >}}) feature. To enable that, [open a ticket with our Support team](https://grafana.com/docs/grafana-cloud/account-management/support/).
|
||||
Grafana Cloud users can access this feature by [opening a support ticket in the Cloud Portal](https://grafana.com/profile/org#support).
|
||||
|
||||
{{< figure src="/static/img/docs/dashboards/jwt-url-embedding-9-1.png" max-width="750px" caption="A JWT token used to embed Grafana" >}}
|
||||
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
"packages": [
|
||||
"packages/*"
|
||||
],
|
||||
"version": "9.1.7"
|
||||
"version": "9.1.6"
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"license": "AGPL-3.0-only",
|
||||
"private": true,
|
||||
"name": "grafana",
|
||||
"version": "9.1.7",
|
||||
"version": "9.1.6",
|
||||
"repository": "github:grafana/grafana",
|
||||
"scripts": {
|
||||
"api-tests": "jest --notify --watch --config=devenv/e2e-api-tests/jest.js",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/data",
|
||||
"version": "9.1.7",
|
||||
"version": "9.1.6",
|
||||
"description": "Grafana Data Library",
|
||||
"keywords": [
|
||||
"typescript"
|
||||
@@ -22,7 +22,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@braintree/sanitize-url": "6.0.0",
|
||||
"@grafana/schema": "9.1.7",
|
||||
"@grafana/schema": "9.1.6",
|
||||
"@types/d3-interpolate": "^1.4.0",
|
||||
"d3-interpolate": "1.4.0",
|
||||
"date-fns": "2.29.1",
|
||||
|
||||
@@ -221,5 +221,4 @@ export interface GrafanaConfig {
|
||||
export interface AuthSettings {
|
||||
OAuthSkipOrgRoleUpdateSync?: boolean;
|
||||
SAMLSkipOrgRoleSync?: boolean;
|
||||
DisableSyncLock?: boolean;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/e2e-selectors",
|
||||
"version": "9.1.7",
|
||||
"version": "9.1.6",
|
||||
"description": "Grafana End-to-End Test Selectors Library",
|
||||
"keywords": [
|
||||
"cli",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/e2e",
|
||||
"version": "9.1.7",
|
||||
"version": "9.1.6",
|
||||
"description": "Grafana End-to-End Test Library",
|
||||
"keywords": [
|
||||
"cli",
|
||||
@@ -48,7 +48,7 @@
|
||||
"@babel/core": "7.18.9",
|
||||
"@babel/preset-env": "7.18.9",
|
||||
"@cypress/webpack-preprocessor": "5.12.0",
|
||||
"@grafana/e2e-selectors": "9.1.7",
|
||||
"@grafana/e2e-selectors": "9.1.6",
|
||||
"@grafana/tsconfig": "^1.2.0-rc1",
|
||||
"@mochajs/json-file-reporter": "^1.2.0",
|
||||
"babel-loader": "8.2.5",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/runtime",
|
||||
"version": "9.1.7",
|
||||
"version": "9.1.6",
|
||||
"description": "Grafana Runtime Library",
|
||||
"keywords": [
|
||||
"grafana",
|
||||
@@ -23,9 +23,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@grafana/agent-web": "^0.4.0",
|
||||
"@grafana/data": "9.1.7",
|
||||
"@grafana/e2e-selectors": "9.1.7",
|
||||
"@grafana/ui": "9.1.7",
|
||||
"@grafana/data": "9.1.6",
|
||||
"@grafana/e2e-selectors": "9.1.6",
|
||||
"@grafana/ui": "9.1.6",
|
||||
"@sentry/browser": "6.19.7",
|
||||
"history": "4.10.1",
|
||||
"lodash": "4.17.21",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/schema",
|
||||
"version": "9.1.7",
|
||||
"version": "9.1.6",
|
||||
"description": "Grafana Schema Library",
|
||||
"keywords": [
|
||||
"typescript"
|
||||
|
||||
@@ -122,7 +122,7 @@ HideableFieldConfig: {
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
// TODO docs
|
||||
GraphTresholdsStyleMode: "off" | "line" | "dashed" | "area" | "line+area" | "dashed+area" | "series" @cuetsy(kind="enum",memberNames="Off|Line|Dashed|Area|LineAndArea|DashedAndArea|Series")
|
||||
GraphTresholdsStyleMode: "off" | "line" | "area" | "line+area" | "series" @cuetsy(kind="enum",memberNames="Off|Line|Area|LineAndArea|Series")
|
||||
|
||||
// TODO docs
|
||||
GraphThresholdsStyleConfig: {
|
||||
@@ -239,9 +239,9 @@ VizLegendOptions: {
|
||||
showLegend: bool
|
||||
asTable?: bool
|
||||
isVisible?: bool
|
||||
sortBy?: string
|
||||
sortDesc?: bool
|
||||
width?: number
|
||||
sortBy?: string
|
||||
sortDesc?: bool
|
||||
width?: number
|
||||
calcs: [...string]
|
||||
} @cuetsy(kind="interface")
|
||||
|
||||
|
||||
@@ -155,8 +155,6 @@ export interface HideableFieldConfig {
|
||||
|
||||
export enum GraphTresholdsStyleMode {
|
||||
Area = 'area',
|
||||
Dashed = 'dashed',
|
||||
DashedAndArea = 'dashed+area',
|
||||
Line = 'line',
|
||||
LineAndArea = 'line+area',
|
||||
Off = 'off',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/toolkit",
|
||||
"version": "9.1.7",
|
||||
"version": "9.1.6",
|
||||
"description": "Grafana Toolkit",
|
||||
"keywords": [
|
||||
"grafana",
|
||||
@@ -38,10 +38,10 @@
|
||||
"@babel/preset-env": "^7.18.9",
|
||||
"@babel/preset-react": "^7.18.6",
|
||||
"@babel/preset-typescript": "^7.18.6",
|
||||
"@grafana/data": "9.1.7",
|
||||
"@grafana/data": "9.1.6",
|
||||
"@grafana/eslint-config": "^4.0.0",
|
||||
"@grafana/tsconfig": "^1.2.0-rc1",
|
||||
"@grafana/ui": "9.1.7",
|
||||
"@grafana/ui": "9.1.6",
|
||||
"@jest/core": "27.5.1",
|
||||
"@types/command-exists": "^1.2.0",
|
||||
"@types/eslint": "8.4.1",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"author": "Grafana Labs",
|
||||
"license": "Apache-2.0",
|
||||
"name": "@grafana/ui",
|
||||
"version": "9.1.7",
|
||||
"version": "9.1.6",
|
||||
"description": "Grafana Components Library",
|
||||
"keywords": [
|
||||
"grafana",
|
||||
@@ -32,9 +32,9 @@
|
||||
"dependencies": {
|
||||
"@emotion/css": "11.9.0",
|
||||
"@emotion/react": "11.9.3",
|
||||
"@grafana/data": "9.1.7",
|
||||
"@grafana/e2e-selectors": "9.1.7",
|
||||
"@grafana/schema": "9.1.7",
|
||||
"@grafana/data": "9.1.6",
|
||||
"@grafana/e2e-selectors": "9.1.6",
|
||||
"@grafana/schema": "9.1.6",
|
||||
"@grafana/slate-react": "0.22.10-grafana",
|
||||
"@monaco-editor/react": "4.3.1",
|
||||
"@popperjs/core": "2.11.5",
|
||||
|
||||
@@ -23,7 +23,7 @@ export const FooterRow = (props: FooterRowProps) => {
|
||||
const tableStyles = useStyles2(getTableStyles);
|
||||
|
||||
return (
|
||||
<div
|
||||
<table
|
||||
style={{
|
||||
position: isPaginationVisible ? 'relative' : 'absolute',
|
||||
width: totalColumnsWidth ? `${totalColumnsWidth}px` : '100%',
|
||||
@@ -33,20 +33,22 @@ export const FooterRow = (props: FooterRowProps) => {
|
||||
{footerGroups.map((footerGroup: HeaderGroup) => {
|
||||
const { key, ...footerGroupProps } = footerGroup.getFooterGroupProps();
|
||||
return (
|
||||
<div
|
||||
<tfoot
|
||||
className={tableStyles.tfoot}
|
||||
{...footerGroupProps}
|
||||
key={key}
|
||||
data-testid={e2eSelectorsTable.footer}
|
||||
style={height ? { height: `${height}px` } : undefined}
|
||||
>
|
||||
{footerGroup.headers.map((column: ColumnInstance, index: number) =>
|
||||
renderFooterCell(column, tableStyles, height)
|
||||
)}
|
||||
</div>
|
||||
<tr>
|
||||
{footerGroup.headers.map((column: ColumnInstance, index: number) =>
|
||||
renderFooterCell(column, tableStyles, height)
|
||||
)}
|
||||
</tr>
|
||||
</tfoot>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</table>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -65,9 +67,9 @@ function renderFooterCell(column: ColumnInstance, tableStyles: TableStyles, heig
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={tableStyles.headerCell} {...footerProps}>
|
||||
<th className={tableStyles.headerCell} {...footerProps}>
|
||||
{column.render('Footer')}
|
||||
</div>
|
||||
</th>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -275,7 +275,6 @@ export const preparePlotConfigBuilder: UPlotConfigPrepFn<{
|
||||
theme,
|
||||
grid: { show: customConfig.axisGridShow },
|
||||
decimals: field.config.decimals,
|
||||
distr: customConfig.scaleDistribution?.type,
|
||||
...axisColorOpts,
|
||||
},
|
||||
field
|
||||
|
||||
@@ -66,9 +66,7 @@ export const graphFieldOptions = {
|
||||
thresholdsDisplayModes: [
|
||||
{ label: 'Off', value: GraphTresholdsStyleMode.Off },
|
||||
{ label: 'As lines', value: GraphTresholdsStyleMode.Line },
|
||||
{ label: 'As lines (dashed)', value: GraphTresholdsStyleMode.Dashed },
|
||||
{ label: 'As filled regions', value: GraphTresholdsStyleMode.Area },
|
||||
{ label: 'As filled regions and lines', value: GraphTresholdsStyleMode.LineAndArea },
|
||||
{ label: 'As filled regions and lines (dashed)', value: GraphTresholdsStyleMode.DashedAndArea },
|
||||
] as Array<SelectableValue<GraphTresholdsStyleMode>>,
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
systemDateFormats,
|
||||
TimeZone,
|
||||
} from '@grafana/data';
|
||||
import { AxisPlacement, ScaleDistribution } from '@grafana/schema';
|
||||
import { AxisPlacement } from '@grafana/schema';
|
||||
|
||||
import { measureText } from '../../../utils/measureText';
|
||||
import { PlotConfigBuilder } from '../types';
|
||||
@@ -39,7 +39,6 @@ export interface AxisProps {
|
||||
color?: uPlot.Axis.Stroke;
|
||||
border?: uPlot.Axis.Border;
|
||||
decimals?: DecimalCount;
|
||||
distr?: ScaleDistribution;
|
||||
}
|
||||
|
||||
export const UPLOT_AXIS_FONT_SIZE = 12;
|
||||
@@ -122,7 +121,6 @@ export class UPlotAxisBuilder extends PlotConfigBuilder<AxisProps, Axis> {
|
||||
color,
|
||||
border,
|
||||
decimals,
|
||||
distr = ScaleDistribution.Linear,
|
||||
} = this.props;
|
||||
|
||||
const font = `${UPLOT_AXIS_FONT_SIZE}px ${theme.typography.fontFamily}`;
|
||||
@@ -133,7 +131,7 @@ export class UPlotAxisBuilder extends PlotConfigBuilder<AxisProps, Axis> {
|
||||
splits = [0, 1];
|
||||
}
|
||||
|
||||
if (decimals === 0 && distr === ScaleDistribution.Linear) {
|
||||
if (decimals === 0) {
|
||||
filter = (u, splits) => splits.map((v) => (Number.isInteger(v) ? v : null));
|
||||
}
|
||||
|
||||
|
||||
@@ -269,10 +269,7 @@ export class UPlotConfigBuilder {
|
||||
const xAxis = axes.find((a) => a.props.scaleKey === 'x');
|
||||
const axesWithoutGridSet = axes.filter((a) => a.props.grid?.show === undefined);
|
||||
const firstValueAxisIdx = axesWithoutGridSet.findIndex(
|
||||
(a) =>
|
||||
a.props.placement === AxisPlacement.Left ||
|
||||
a.props.placement === AxisPlacement.Right ||
|
||||
(a.props.placement === AxisPlacement.Bottom && a !== xAxis)
|
||||
(a) => a.props.placement === AxisPlacement.Left || (a.props.placement === AxisPlacement.Bottom && a !== xAxis)
|
||||
);
|
||||
|
||||
// For all axes with no grid set, set the grid automatically (grid only for first left axis )
|
||||
|
||||
@@ -91,8 +91,6 @@ export class UPlotScaleBuilder extends PlotConfigBuilder<ScaleProps, Scale> {
|
||||
return minMax;
|
||||
}
|
||||
|
||||
let logBase = scale.log ?? 10;
|
||||
|
||||
if (scale.distr === 1 || scale.distr === 2) {
|
||||
if (centeredZero) {
|
||||
let absMin = Math.abs(dataMin!);
|
||||
@@ -105,36 +103,12 @@ export class UPlotScaleBuilder extends PlotConfigBuilder<ScaleProps, Scale> {
|
||||
// @ts-ignore here we may use hardMin / hardMax to make sure any extra padding is computed from a more accurate delta
|
||||
minMax = uPlot.rangeNum(hardMinOnly ? hardMin : dataMin, hardMaxOnly ? hardMax : dataMax, rangeConfig);
|
||||
} else if (scale.distr === 3) {
|
||||
minMax = uPlot.rangeLog(dataMin!, dataMax!, logBase, true);
|
||||
minMax = uPlot.rangeLog(dataMin!, dataMax!, scale.log ?? 10, true);
|
||||
}
|
||||
|
||||
if (decimals === 0) {
|
||||
if (scale.distr === 1 || scale.distr === 2) {
|
||||
minMax[0] = incrRoundDn(minMax[0]!, 1);
|
||||
minMax[1] = incrRoundUp(minMax[1]!, 1);
|
||||
}
|
||||
// log2 or log10 scale min must be clamped to 1
|
||||
else if (scale.distr === 3) {
|
||||
let logFn = scale.log === 2 ? Math.log2 : Math.log10;
|
||||
|
||||
if (minMax[0]! <= 1) {
|
||||
// clamp min
|
||||
minMax[0] = 1;
|
||||
} else {
|
||||
// snap min to nearest mag below
|
||||
let minExp = Math.floor(logFn(minMax[0]!));
|
||||
minMax[0] = logBase ** minExp;
|
||||
}
|
||||
|
||||
// snap max to nearest mag above
|
||||
let maxExp = Math.ceil(logFn(minMax[1]!));
|
||||
minMax[1] = logBase ** maxExp;
|
||||
|
||||
// inflate max by mag if same
|
||||
if (minMax[0] === minMax[1]) {
|
||||
minMax[1] *= logBase;
|
||||
}
|
||||
}
|
||||
minMax[0] = incrRoundDn(minMax[0]!, 1);
|
||||
minMax[1] = incrRoundUp(minMax[1]!, 1);
|
||||
}
|
||||
|
||||
// if all we got were hard limits, treat them as static min/max
|
||||
@@ -148,7 +122,7 @@ export class UPlotScaleBuilder extends PlotConfigBuilder<ScaleProps, Scale> {
|
||||
|
||||
// guard against invalid y ranges
|
||||
if (minMax[0]! >= minMax[1]!) {
|
||||
minMax[0] = scale.distr === 3 ? 1 : 0;
|
||||
minMax[0] = 0;
|
||||
minMax[1] = 100;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,12 +18,6 @@ export interface UPlotThresholdOptions {
|
||||
}
|
||||
|
||||
export function getThresholdsDrawHook(options: UPlotThresholdOptions) {
|
||||
const dashSegments =
|
||||
options.config.mode === GraphTresholdsStyleMode.Dashed ||
|
||||
options.config.mode === GraphTresholdsStyleMode.DashedAndArea
|
||||
? [10, 10]
|
||||
: null;
|
||||
|
||||
function addLines(u: uPlot, steps: Threshold[], theme: GrafanaTheme2, xMin: number, xMax: number, yScaleKey: string) {
|
||||
let ctx = u.ctx;
|
||||
|
||||
@@ -40,10 +34,6 @@ export function getThresholdsDrawHook(options: UPlotThresholdOptions) {
|
||||
|
||||
ctx.lineWidth = 2;
|
||||
|
||||
if (dashSegments) {
|
||||
ctx.setLineDash(dashSegments);
|
||||
}
|
||||
|
||||
// Ignore the base -Infinity threshold by always starting on index 1
|
||||
for (let idx = 1; idx < steps.length; idx++) {
|
||||
const step = steps[idx];
|
||||
@@ -124,14 +114,12 @@ export function getThresholdsDrawHook(options: UPlotThresholdOptions) {
|
||||
|
||||
switch (config.mode) {
|
||||
case GraphTresholdsStyleMode.Line:
|
||||
case GraphTresholdsStyleMode.Dashed:
|
||||
addLines(u, steps, theme, xMin, xMax, scaleKey);
|
||||
break;
|
||||
case GraphTresholdsStyleMode.Area:
|
||||
addAreas(u, steps, theme);
|
||||
break;
|
||||
case GraphTresholdsStyleMode.LineAndArea:
|
||||
case GraphTresholdsStyleMode.DashedAndArea:
|
||||
addAreas(u, steps, theme);
|
||||
addLines(u, steps, theme, xMin, xMax, scaleKey);
|
||||
}
|
||||
|
||||
@@ -143,8 +143,6 @@ export function SuggestionsPlugin({
|
||||
|
||||
const preserveSuffix = suggestion.kind === 'function';
|
||||
const move = suggestion.move || 0;
|
||||
const moveForward = move > 0 ? move : 0;
|
||||
const moveBackward = move < 0 ? -move : 0;
|
||||
|
||||
const { typeaheadPrefix, typeaheadText, typeaheadContext } = state;
|
||||
|
||||
@@ -182,8 +180,7 @@ export function SuggestionsPlugin({
|
||||
.deleteBackward(backward)
|
||||
.deleteForward(forward)
|
||||
.insertText(suggestionText)
|
||||
.moveForward(moveForward)
|
||||
.moveBackward(moveBackward)
|
||||
.moveForward(move)
|
||||
.focus();
|
||||
|
||||
return editor;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jaegertracing/jaeger-ui-components",
|
||||
"version": "9.1.7",
|
||||
"version": "9.1.6",
|
||||
"main": "src/index.ts",
|
||||
"types": "src/index.ts",
|
||||
"license": "Apache-2.0",
|
||||
@@ -31,10 +31,10 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@emotion/css": "11.9.0",
|
||||
"@grafana/data": "9.1.7",
|
||||
"@grafana/e2e-selectors": "9.1.7",
|
||||
"@grafana/runtime": "9.1.7",
|
||||
"@grafana/ui": "9.1.7",
|
||||
"@grafana/data": "9.1.6",
|
||||
"@grafana/e2e-selectors": "9.1.6",
|
||||
"@grafana/runtime": "9.1.6",
|
||||
"@grafana/ui": "9.1.6",
|
||||
"chance": "^1.0.10",
|
||||
"classnames": "^2.2.5",
|
||||
"combokeys": "^3.0.0",
|
||||
|
||||
@@ -342,7 +342,7 @@ func (hs *HTTPServer) GetAlertNotificationByID(c *models.ReqContext) response.Re
|
||||
|
||||
// swagger:route GET /alert-notifications/uid/{notification_channel_uid} legacy_alerts_notification_channels getAlertNotificationChannelByUID
|
||||
//
|
||||
// Get notification channel by UID.
|
||||
// Get notification channel by UID
|
||||
//
|
||||
// Returns the notification channel given the notification channel UID.
|
||||
//
|
||||
|
||||
@@ -289,7 +289,7 @@ func (hs *HTTPServer) UpdateAnnotation(c *models.ReqContext) response.Response {
|
||||
|
||||
// swagger:route PATCH /annotations/{annotation_id} annotations patchAnnotation
|
||||
//
|
||||
// Patch Annotation.
|
||||
// Patch Annotation
|
||||
//
|
||||
// Updates one or more properties of an annotation that matches the specified ID.
|
||||
// This operation currently supports updating of the `text`, `tags`, `time` and `timeEnd` properties.
|
||||
|
||||
@@ -3,30 +3,29 @@
|
||||
// The Grafana backend exposes an HTTP API, the same API is used by the frontend to do
|
||||
// everything from saving dashboards, creating users and updating data sources.
|
||||
//
|
||||
// Schemes: http, https
|
||||
// BasePath: /api
|
||||
// Version: 0.0.1
|
||||
// License: GNU Affero General Public License v3.0 https://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
// Contact: Grafana Labs<hello@grafana.com> https://grafana.com
|
||||
// Schemes: http, https
|
||||
// BasePath: /api
|
||||
// Version: 0.0.1
|
||||
// License: GNU Affero General Public License v3.0 https://www.gnu.org/licenses/agpl-3.0.en.html
|
||||
// Contact: Grafana Labs<hello@grafana.com> https://grafana.com
|
||||
//
|
||||
// Consumes:
|
||||
// - application/json
|
||||
// Consumes:
|
||||
// - application/json
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// Produces:
|
||||
// - application/json
|
||||
//
|
||||
// Security:
|
||||
// - basic:
|
||||
// - api_key:
|
||||
// Security:
|
||||
// - basic:
|
||||
// - api_key:
|
||||
//
|
||||
// SecurityDefinitions:
|
||||
// basic:
|
||||
// type: basic
|
||||
//
|
||||
// api_key:
|
||||
// type: apiKey
|
||||
// name: Authorization
|
||||
// in: header
|
||||
// SecurityDefinitions:
|
||||
// basic:
|
||||
// type: basic
|
||||
// api_key:
|
||||
// type: apiKey
|
||||
// name: Authorization
|
||||
// in: header
|
||||
//
|
||||
// swagger:meta
|
||||
package api
|
||||
@@ -154,7 +153,6 @@ func (hs *HTTPServer) registerRoutes() {
|
||||
r.Get("/playlists/*", reqSignedIn, hs.Index)
|
||||
r.Get("/alerting/", reqSignedIn, hs.Index)
|
||||
r.Get("/alerting/*", reqSignedIn, hs.Index)
|
||||
r.Get("/library-panels/", reqSignedIn, hs.Index)
|
||||
|
||||
// sign up
|
||||
r.Get("/verify", hs.Index)
|
||||
|
||||
@@ -94,7 +94,7 @@ func (hs *HTTPServer) DeleteAPIKey(c *models.ReqContext) response.Response {
|
||||
//
|
||||
// Creates an API key.
|
||||
//
|
||||
// Will return details of the created API key.
|
||||
// Will return details of the created API key
|
||||
//
|
||||
// Responses:
|
||||
// 200: postAPIkeyResponse
|
||||
|
||||
@@ -138,7 +138,6 @@ func (hs *HTTPServer) getFrontendSettingsMap(c *models.ReqContext) (map[string]i
|
||||
"auth": map[string]interface{}{
|
||||
"OAuthSkipOrgRoleUpdateSync": hs.Cfg.OAuthSkipOrgRoleUpdateSync,
|
||||
"SAMLSkipOrgRoleSync": hs.Cfg.SectionWithEnvOverrides("auth.saml").Key("skip_org_role_sync").MustBool(false),
|
||||
"DisableSyncLock": hs.Cfg.DisableSyncLock,
|
||||
},
|
||||
"buildInfo": map[string]interface{}{
|
||||
"hideVersion": hideVersion,
|
||||
|
||||
@@ -46,7 +46,7 @@ func (hs *HTTPServer) handleQueryMetricsError(err error) *response.NormalRespons
|
||||
// QueryMetricsV2 returns query metrics.
|
||||
// swagger:route POST /ds/query ds queryMetricsWithExpressions
|
||||
//
|
||||
// DataSource query metrics with expressions.
|
||||
// DataSource query metrics with expressions
|
||||
//
|
||||
// If you are running Grafana Enterprise and have Fine-grained access control enabled
|
||||
// you need to have a permission with action: `datasources:query`.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user