mirror of https://github.com/grafana/grafana
commit
d4beee2bb0
@ -0,0 +1,644 @@ |
||||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. |
||||
|
||||
|
||||
[[projects]] |
||||
name = "cloud.google.com/go" |
||||
packages = ["compute/metadata"] |
||||
revision = "767c40d6a2e058483c25fa193e963a22da17236d" |
||||
version = "v0.18.0" |
||||
|
||||
[[projects]] |
||||
name = "github.com/BurntSushi/toml" |
||||
packages = ["."] |
||||
revision = "b26d9c308763d68093482582cea63d69be07a0f0" |
||||
version = "v0.3.0" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/Unknwon/com" |
||||
packages = ["."] |
||||
revision = "7677a1d7c1137cd3dd5ba7a076d0c898a1ef4520" |
||||
|
||||
[[projects]] |
||||
name = "github.com/apache/thrift" |
||||
packages = ["lib/go/thrift"] |
||||
revision = "b2a4d4ae21c789b689dd162deb819665567f481c" |
||||
version = "0.10.0" |
||||
|
||||
[[projects]] |
||||
name = "github.com/aws/aws-sdk-go" |
||||
packages = [ |
||||
"aws", |
||||
"aws/awserr", |
||||
"aws/awsutil", |
||||
"aws/client", |
||||
"aws/client/metadata", |
||||
"aws/corehandlers", |
||||
"aws/credentials", |
||||
"aws/credentials/ec2rolecreds", |
||||
"aws/credentials/endpointcreds", |
||||
"aws/credentials/stscreds", |
||||
"aws/defaults", |
||||
"aws/ec2metadata", |
||||
"aws/endpoints", |
||||
"aws/request", |
||||
"aws/session", |
||||
"aws/signer/v4", |
||||
"internal/shareddefaults", |
||||
"private/protocol", |
||||
"private/protocol/ec2query", |
||||
"private/protocol/query", |
||||
"private/protocol/query/queryutil", |
||||
"private/protocol/rest", |
||||
"private/protocol/restxml", |
||||
"private/protocol/xml/xmlutil", |
||||
"service/cloudwatch", |
||||
"service/ec2", |
||||
"service/ec2/ec2iface", |
||||
"service/s3", |
||||
"service/sts" |
||||
] |
||||
revision = "decd990ddc5dcdf2f73309cbcab90d06b996ca28" |
||||
version = "v1.12.67" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/benbjohnson/clock" |
||||
packages = ["."] |
||||
revision = "7dc76406b6d3c05b5f71a86293cbcf3c4ea03b19" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/beorn7/perks" |
||||
packages = ["quantile"] |
||||
revision = "4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/bmizerany/assert" |
||||
packages = ["."] |
||||
revision = "b7ed37b82869576c289d7d97fb2bbd8b64a0cb28" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/bradfitz/gomemcache" |
||||
packages = ["memcache"] |
||||
revision = "1952afaa557dc08e8e0d89eafab110fb501c1a2b" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/codahale/hdrhistogram" |
||||
packages = ["."] |
||||
revision = "3a0bb77429bd3a61596f5e8a3172445844342120" |
||||
|
||||
[[projects]] |
||||
name = "github.com/codegangsta/cli" |
||||
packages = ["."] |
||||
revision = "cfb38830724cc34fedffe9a2a29fb54fa9169cd1" |
||||
version = "v1.20.0" |
||||
|
||||
[[projects]] |
||||
name = "github.com/davecgh/go-spew" |
||||
packages = ["spew"] |
||||
revision = "346938d642f2ec3594ed81d874461961cd0faa76" |
||||
version = "v1.1.0" |
||||
|
||||
[[projects]] |
||||
name = "github.com/denisenkom/go-mssqldb" |
||||
packages = ["."] |
||||
revision = "ee492709d4324cdcb051d2ac266b77ddc380f5c5" |
||||
|
||||
[[projects]] |
||||
name = "github.com/fatih/color" |
||||
packages = ["."] |
||||
revision = "570b54cabe6b8eb0bc2dfce68d964677d63b5260" |
||||
version = "v1.5.0" |
||||
|
||||
[[projects]] |
||||
name = "github.com/go-ini/ini" |
||||
packages = ["."] |
||||
revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a" |
||||
version = "v1.32.0" |
||||
|
||||
[[projects]] |
||||
name = "github.com/go-ldap/ldap" |
||||
packages = ["."] |
||||
revision = "bb7a9ca6e4fbc2129e3db588a34bc970ffe811a9" |
||||
version = "v2.5.1" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/go-macaron/binding" |
||||
packages = ["."] |
||||
revision = "ac54ee249c27dca7e76fad851a4a04b73bd1b183" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/go-macaron/gzip" |
||||
packages = ["."] |
||||
revision = "cad1c6580a07c56f5f6bc52d66002a05985c5854" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/go-macaron/inject" |
||||
packages = ["."] |
||||
revision = "d8a0b8677191f4380287cfebd08e462217bac7ad" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/go-macaron/session" |
||||
packages = [ |
||||
".", |
||||
"memcache", |
||||
"mysql", |
||||
"postgres", |
||||
"redis" |
||||
] |
||||
revision = "b8e286a0dba8f4999042d6b258daf51b31d08938" |
||||
|
||||
[[projects]] |
||||
name = "github.com/go-sql-driver/mysql" |
||||
packages = ["."] |
||||
revision = "2cc627ac8defc45d65066ae98f898166f580f9a4" |
||||
|
||||
[[projects]] |
||||
name = "github.com/go-stack/stack" |
||||
packages = ["."] |
||||
revision = "259ab82a6cad3992b4e21ff5cac294ccb06474bc" |
||||
version = "v1.7.0" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/go-xorm/builder" |
||||
packages = ["."] |
||||
revision = "488224409dd8aa2ce7a5baf8d10d55764a913738" |
||||
|
||||
[[projects]] |
||||
name = "github.com/go-xorm/core" |
||||
packages = ["."] |
||||
revision = "e8409d73255791843585964791443dbad877058c" |
||||
|
||||
[[projects]] |
||||
name = "github.com/go-xorm/xorm" |
||||
packages = ["."] |
||||
revision = "6687a2b4e824f4d87f2d65060ec5cb0d896dff1e" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/golang/protobuf" |
||||
packages = [ |
||||
"proto", |
||||
"ptypes", |
||||
"ptypes/any", |
||||
"ptypes/duration", |
||||
"ptypes/timestamp" |
||||
] |
||||
revision = "c65a0412e71e8b9b3bfd22925720d23c0f054237" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/gopherjs/gopherjs" |
||||
packages = ["js"] |
||||
revision = "178c176a91fe05e3e6c58fa5c989bad19e6cdcb3" |
||||
|
||||
[[projects]] |
||||
name = "github.com/gorilla/websocket" |
||||
packages = ["."] |
||||
revision = "ea4d1f681babbce9545c9c5f3d5194a789c89f5b" |
||||
version = "v1.2.0" |
||||
|
||||
[[projects]] |
||||
name = "github.com/gosimple/slug" |
||||
packages = ["."] |
||||
revision = "e9f42fa127660e552d0ad2b589868d403a9be7c6" |
||||
version = "v1.1.1" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/grafana/grafana_plugin_model" |
||||
packages = ["go/datasource"] |
||||
revision = "dfe5dc0a6ce05825ba7fe2d0323d92e631bffa89" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/hashicorp/go-hclog" |
||||
packages = ["."] |
||||
revision = "5bcb0f17e36442247290887cc914a6e507afa5c4" |
||||
|
||||
[[projects]] |
||||
name = "github.com/hashicorp/go-plugin" |
||||
packages = ["."] |
||||
revision = "3e6d191694b5a3a2b99755f31b47fa209e4bcd09" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/hashicorp/go-version" |
||||
packages = ["."] |
||||
revision = "4fe82ae3040f80a03d04d2cccb5606a626b8e1ee" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/hashicorp/yamux" |
||||
packages = ["."] |
||||
revision = "683f49123a33db61abfb241b7ac5e4af4dc54d55" |
||||
|
||||
[[projects]] |
||||
name = "github.com/inconshreveable/log15" |
||||
packages = ["."] |
||||
revision = "0decfc6c20d9ca0ad143b0e89dcaa20f810b4fb3" |
||||
version = "v2.13" |
||||
|
||||
[[projects]] |
||||
name = "github.com/jmespath/go-jmespath" |
||||
packages = ["."] |
||||
revision = "0b12d6b5" |
||||
|
||||
[[projects]] |
||||
name = "github.com/jtolds/gls" |
||||
packages = ["."] |
||||
revision = "77f18212c9c7edc9bd6a33d383a7b545ce62f064" |
||||
version = "v4.2.1" |
||||
|
||||
[[projects]] |
||||
name = "github.com/klauspost/compress" |
||||
packages = [ |
||||
"flate", |
||||
"gzip" |
||||
] |
||||
revision = "6c8db69c4b49dd4df1fff66996cf556176d0b9bf" |
||||
version = "v1.2.1" |
||||
|
||||
[[projects]] |
||||
name = "github.com/klauspost/cpuid" |
||||
packages = ["."] |
||||
revision = "ae7887de9fa5d2db4eaa8174a7eff2c1ac00f2da" |
||||
version = "v1.1" |
||||
|
||||
[[projects]] |
||||
name = "github.com/klauspost/crc32" |
||||
packages = ["."] |
||||
revision = "cb6bfca970f6908083f26f39a79009d608efd5cd" |
||||
version = "v1.1" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/kr/pretty" |
||||
packages = ["."] |
||||
revision = "cfb55aafdaf3ec08f0db22699ab822c50091b1c4" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/kr/text" |
||||
packages = ["."] |
||||
revision = "7cafcd837844e784b526369c9bce262804aebc60" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/lib/pq" |
||||
packages = [ |
||||
".", |
||||
"oid" |
||||
] |
||||
revision = "61fe37aa2ee24fabcdbe5c4ac1d4ac566f88f345" |
||||
|
||||
[[projects]] |
||||
name = "github.com/mattn/go-colorable" |
||||
packages = ["."] |
||||
revision = "167de6bfdfba052fa6b2d3664c8f5272e23c9072" |
||||
version = "v0.0.9" |
||||
|
||||
[[projects]] |
||||
name = "github.com/mattn/go-isatty" |
||||
packages = ["."] |
||||
revision = "0360b2af4f38e8d38c7fce2a9f4e702702d73a39" |
||||
version = "v0.0.3" |
||||
|
||||
[[projects]] |
||||
name = "github.com/mattn/go-sqlite3" |
||||
packages = ["."] |
||||
revision = "6c771bb9887719704b210e87e934f08be014bdb1" |
||||
version = "v1.6.0" |
||||
|
||||
[[projects]] |
||||
name = "github.com/matttproud/golang_protobuf_extensions" |
||||
packages = ["pbutil"] |
||||
revision = "3247c84500bff8d9fb6d579d800f20b3e091582c" |
||||
version = "v1.0.0" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/mitchellh/go-testing-interface" |
||||
packages = ["."] |
||||
revision = "a61a99592b77c9ba629d254a693acffaeb4b7e28" |
||||
|
||||
[[projects]] |
||||
name = "github.com/opentracing/opentracing-go" |
||||
packages = [ |
||||
".", |
||||
"ext", |
||||
"log" |
||||
] |
||||
revision = "1949ddbfd147afd4d964a9f00b24eb291e0e7c38" |
||||
version = "v1.0.2" |
||||
|
||||
[[projects]] |
||||
name = "github.com/patrickmn/go-cache" |
||||
packages = ["."] |
||||
revision = "a3647f8e31d79543b2d0f0ae2fe5c379d72cedc0" |
||||
version = "v2.1.0" |
||||
|
||||
[[projects]] |
||||
name = "github.com/prometheus/client_golang" |
||||
packages = [ |
||||
"api", |
||||
"api/prometheus/v1", |
||||
"prometheus", |
||||
"prometheus/promhttp" |
||||
] |
||||
revision = "967789050ba94deca04a5e84cce8ad472ce313c1" |
||||
version = "v0.9.0-pre1" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/prometheus/client_model" |
||||
packages = ["go"] |
||||
revision = "99fa1f4be8e564e8a6b613da7fa6f46c9edafc6c" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/prometheus/common" |
||||
packages = [ |
||||
"expfmt", |
||||
"internal/bitbucket.org/ww/goautoneg", |
||||
"model" |
||||
] |
||||
revision = "89604d197083d4781071d3c65855d24ecfb0a563" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/prometheus/procfs" |
||||
packages = [ |
||||
".", |
||||
"internal/util", |
||||
"nfsd", |
||||
"xfs" |
||||
] |
||||
revision = "85fadb6e89903ef7cca6f6a804474cd5ea85b6e1" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/rainycape/unidecode" |
||||
packages = ["."] |
||||
revision = "cb7f23ec59bec0d61b19c56cd88cee3d0cc1870c" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/sergi/go-diff" |
||||
packages = ["diffmatchpatch"] |
||||
revision = "1744e2970ca51c86172c8190fadad617561ed6e7" |
||||
|
||||
[[projects]] |
||||
name = "github.com/smartystreets/assertions" |
||||
packages = [ |
||||
".", |
||||
"internal/go-render/render", |
||||
"internal/oglematchers" |
||||
] |
||||
revision = "0b37b35ec7434b77e77a4bb29b79677cced992ea" |
||||
version = "1.8.1" |
||||
|
||||
[[projects]] |
||||
name = "github.com/smartystreets/goconvey" |
||||
packages = [ |
||||
"convey", |
||||
"convey/gotest", |
||||
"convey/reporting" |
||||
] |
||||
revision = "9e8dc3f972df6c8fcc0375ef492c24d0bb204857" |
||||
version = "1.6.3" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/teris-io/shortid" |
||||
packages = ["."] |
||||
revision = "771a37caa5cf0c81f585d7b6df4dfc77e0615b5c" |
||||
|
||||
[[projects]] |
||||
name = "github.com/uber/jaeger-client-go" |
||||
packages = [ |
||||
".", |
||||
"config", |
||||
"internal/baggage", |
||||
"internal/baggage/remote", |
||||
"internal/spanlog", |
||||
"log", |
||||
"rpcmetrics", |
||||
"thrift-gen/agent", |
||||
"thrift-gen/baggage", |
||||
"thrift-gen/jaeger", |
||||
"thrift-gen/sampling", |
||||
"thrift-gen/zipkincore", |
||||
"utils" |
||||
] |
||||
revision = "3ac96c6e679cb60a74589b0d0aa7c70a906183f7" |
||||
version = "v2.11.2" |
||||
|
||||
[[projects]] |
||||
name = "github.com/uber/jaeger-lib" |
||||
packages = ["metrics"] |
||||
revision = "7f95f4f7e80028096410abddaae2556e4c61b59f" |
||||
version = "v1.3.1" |
||||
|
||||
[[projects]] |
||||
name = "github.com/yudai/gojsondiff" |
||||
packages = [ |
||||
".", |
||||
"formatter" |
||||
] |
||||
revision = "7b1b7adf999dab73a6eb02669c3d82dbb27a3dd6" |
||||
version = "1.0.0" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "github.com/yudai/golcs" |
||||
packages = ["."] |
||||
revision = "ecda9a501e8220fae3b4b600c3db4b0ba22cfc68" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "golang.org/x/crypto" |
||||
packages = [ |
||||
"md4", |
||||
"pbkdf2" |
||||
] |
||||
revision = "3d37316aaa6bd9929127ac9a527abf408178ea7b" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "golang.org/x/net" |
||||
packages = [ |
||||
"context", |
||||
"context/ctxhttp", |
||||
"http2", |
||||
"http2/hpack", |
||||
"idna", |
||||
"internal/timeseries", |
||||
"lex/httplex", |
||||
"trace" |
||||
] |
||||
revision = "5ccada7d0a7ba9aeb5d3aca8d3501b4c2a509fec" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "golang.org/x/oauth2" |
||||
packages = [ |
||||
".", |
||||
"google", |
||||
"internal", |
||||
"jws", |
||||
"jwt" |
||||
] |
||||
revision = "b28fcf2b08a19742b43084fb40ab78ac6c3d8067" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "golang.org/x/sync" |
||||
packages = ["errgroup"] |
||||
revision = "fd80eb99c8f653c847d294a001bdf2a3a6f768f5" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "golang.org/x/sys" |
||||
packages = ["unix"] |
||||
revision = "af50095a40f9041b3b38960738837185c26e9419" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "golang.org/x/text" |
||||
packages = [ |
||||
"collate", |
||||
"collate/build", |
||||
"internal/colltab", |
||||
"internal/gen", |
||||
"internal/tag", |
||||
"internal/triegen", |
||||
"internal/ucd", |
||||
"language", |
||||
"secure/bidirule", |
||||
"transform", |
||||
"unicode/bidi", |
||||
"unicode/cldr", |
||||
"unicode/norm", |
||||
"unicode/rangetable" |
||||
] |
||||
revision = "e19ae1496984b1c655b8044a65c0300a3c878dd3" |
||||
|
||||
[[projects]] |
||||
name = "google.golang.org/appengine" |
||||
packages = [ |
||||
".", |
||||
"cloudsql", |
||||
"internal", |
||||
"internal/app_identity", |
||||
"internal/base", |
||||
"internal/datastore", |
||||
"internal/log", |
||||
"internal/modules", |
||||
"internal/remote_api", |
||||
"internal/urlfetch", |
||||
"urlfetch" |
||||
] |
||||
revision = "150dc57a1b433e64154302bdc40b6bb8aefa313a" |
||||
version = "v1.0.0" |
||||
|
||||
[[projects]] |
||||
branch = "master" |
||||
name = "google.golang.org/genproto" |
||||
packages = ["googleapis/rpc/status"] |
||||
revision = "a8101f21cf983e773d0c1133ebc5424792003214" |
||||
|
||||
[[projects]] |
||||
name = "google.golang.org/grpc" |
||||
packages = [ |
||||
".", |
||||
"balancer", |
||||
"balancer/base", |
||||
"balancer/roundrobin", |
||||
"codes", |
||||
"connectivity", |
||||
"credentials", |
||||
"encoding", |
||||
"grpclb/grpc_lb_v1/messages", |
||||
"grpclog", |
||||
"health", |
||||
"health/grpc_health_v1", |
||||
"internal", |
||||
"keepalive", |
||||
"metadata", |
||||
"naming", |
||||
"peer", |
||||
"resolver", |
||||
"resolver/dns", |
||||
"resolver/passthrough", |
||||
"stats", |
||||
"status", |
||||
"tap", |
||||
"transport" |
||||
] |
||||
revision = "6b51017f791ae1cfbec89c52efdf444b13b550ef" |
||||
version = "v1.9.2" |
||||
|
||||
[[projects]] |
||||
branch = "v3" |
||||
name = "gopkg.in/alexcesaro/quotedprintable.v3" |
||||
packages = ["."] |
||||
revision = "2caba252f4dc53eaf6b553000885530023f54623" |
||||
|
||||
[[projects]] |
||||
name = "gopkg.in/asn1-ber.v1" |
||||
packages = ["."] |
||||
revision = "379148ca0225df7a432012b8df0355c2a2063ac0" |
||||
version = "v1.2" |
||||
|
||||
[[projects]] |
||||
name = "gopkg.in/bufio.v1" |
||||
packages = ["."] |
||||
revision = "567b2bfa514e796916c4747494d6ff5132a1dfce" |
||||
version = "v1" |
||||
|
||||
[[projects]] |
||||
branch = "v2" |
||||
name = "gopkg.in/gomail.v2" |
||||
packages = ["."] |
||||
revision = "81ebce5c23dfd25c6c67194b37d3dd3f338c98b1" |
||||
|
||||
[[projects]] |
||||
name = "gopkg.in/ini.v1" |
||||
packages = ["."] |
||||
revision = "32e4c1e6bc4e7d0d8451aa6b75200d19e37a536a" |
||||
version = "v1.32.0" |
||||
|
||||
[[projects]] |
||||
name = "gopkg.in/macaron.v1" |
||||
packages = ["."] |
||||
revision = "75f2e9b42e99652f0d82b28ccb73648f44615faa" |
||||
version = "v1.2.4" |
||||
|
||||
[[projects]] |
||||
name = "gopkg.in/redis.v2" |
||||
packages = ["."] |
||||
revision = "e6179049628164864e6e84e973cfb56335748dea" |
||||
version = "v2.3.2" |
||||
|
||||
[[projects]] |
||||
branch = "v2" |
||||
name = "gopkg.in/yaml.v2" |
||||
packages = ["."] |
||||
revision = "d670f9405373e636a5a2765eea47fac0c9bc91a4" |
||||
|
||||
[solve-meta] |
||||
analyzer-name = "dep" |
||||
analyzer-version = 1 |
||||
inputs-digest = "d2f67abb94028a388f051164896bfb69b1ff3a7255d285dc4d78d298f4793383" |
||||
solver-name = "gps-cdcl" |
||||
solver-version = 1 |
@ -0,0 +1,203 @@ |
||||
# Gopkg.toml example |
||||
# |
||||
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md |
||||
# for detailed Gopkg.toml documentation. |
||||
# |
||||
# required = ["github.com/user/thing/cmd/thing"] |
||||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] |
||||
# |
||||
# [[constraint]] |
||||
# name = "github.com/user/project" |
||||
# version = "1.0.0" |
||||
# |
||||
# [[constraint]] |
||||
# name = "github.com/user/project2" |
||||
# branch = "dev" |
||||
# source = "github.com/myfork/project2" |
||||
# |
||||
# [[override]] |
||||
# name = "github.com/x/y" |
||||
# version = "2.4.0" |
||||
|
||||
ignored = [ |
||||
"github.com/grafana/grafana/data/*", |
||||
"github.com/grafana/grafana/public/*", |
||||
"github.com/grafana/grafana/node_modules/*" |
||||
] |
||||
|
||||
[[constraint]] |
||||
name = "github.com/BurntSushi/toml" |
||||
version = "0.3.0" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/Unknwon/com" |
||||
#version = "1.0.0" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/aws/aws-sdk-go" |
||||
version = "1.12.65" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/benbjohnson/clock" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/bmizerany/assert" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/codegangsta/cli" |
||||
version = "1.20.0" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/davecgh/go-spew" |
||||
version = "1.1.0" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/fatih/color" |
||||
version = "1.5.0" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/go-ldap/ldap" |
||||
version = "2.5.1" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/go-macaron/binding" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/go-macaron/gzip" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/go-macaron/session" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/go-sql-driver/mysql" |
||||
revision = "2cc627ac8defc45d65066ae98f898166f580f9a4" |
||||
#version = "1.3.0" //keeping this since we would rather depend on version then commit |
||||
|
||||
[[constraint]] |
||||
name = "github.com/go-stack/stack" |
||||
version = "1.7.0" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/go-xorm/core" |
||||
revision = "e8409d73255791843585964791443dbad877058c" |
||||
#version = "0.5.7" //keeping this since we would rather depend on version then commit |
||||
|
||||
[[constraint]] |
||||
name = "github.com/go-xorm/xorm" |
||||
revision = "6687a2b4e824f4d87f2d65060ec5cb0d896dff1e" |
||||
#version = "0.6.4" //keeping this since we would rather depend on version then commit |
||||
|
||||
[[constraint]] |
||||
name = "github.com/gorilla/websocket" |
||||
version = "1.2.0" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/gosimple/slug" |
||||
version = "1.1.1" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/grafana/grafana_plugin_model" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/hashicorp/go-hclog" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/hashicorp/go-version" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/inconshreveable/log15" |
||||
version = "2.13.0" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/lib/pq" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/mattn/go-isatty" |
||||
version = "0.0.3" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/mattn/go-sqlite3" |
||||
version = "1.6.0" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/opentracing/opentracing-go" |
||||
version = "1.0.2" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/patrickmn/go-cache" |
||||
version = "2.1.0" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/prometheus/client_golang" |
||||
version = "0.9.0-pre1" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/prometheus/client_model" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/prometheus/common" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/smartystreets/goconvey" |
||||
version = "1.6.3" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/uber/jaeger-client-go" |
||||
version = "2.11.2" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/yudai/gojsondiff" |
||||
version = "1.0.0" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "golang.org/x/net" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "golang.org/x/oauth2" |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "golang.org/x/sync" |
||||
|
||||
[[constraint]] |
||||
name = "gopkg.in/gomail.v2" |
||||
branch = "v2" |
||||
|
||||
[[constraint]] |
||||
name = "gopkg.in/ini.v1" |
||||
version = "1.32.0" |
||||
|
||||
[[constraint]] |
||||
name = "gopkg.in/macaron.v1" |
||||
version = "1.2.4" |
||||
|
||||
[[constraint]] |
||||
branch = "v2" |
||||
name = "gopkg.in/yaml.v2" |
||||
|
||||
[prune] |
||||
non-go = true |
||||
go-tests = true |
||||
unused-packages = true |
||||
|
||||
[[constraint]] |
||||
branch = "master" |
||||
name = "github.com/teris-io/shortid" |
||||
|
||||
[[constraint]] |
||||
name = "github.com/denisenkom/go-mssqldb" |
||||
revision = "ee492709d4324cdcb051d2ac266b77ddc380f5c5" |
@ -1,57 +1,135 @@ |
||||
machine: |
||||
node: |
||||
version: 6.11.4 |
||||
python: |
||||
version: 2.7.3 |
||||
services: |
||||
- docker |
||||
environment: |
||||
GOPATH: "/home/ubuntu/.go_workspace" |
||||
ORG_PATH: "github.com/grafana" |
||||
REPO_PATH: "${ORG_PATH}/grafana" |
||||
GODIST: "go1.9.2.linux-amd64.tar.gz" |
||||
post: |
||||
- mkdir -p ~/download |
||||
- mkdir -p ~/docker |
||||
- test -e download/$GODIST || curl -o download/$GODIST https://storage.googleapis.com/golang/$GODIST |
||||
- sudo rm -rf /usr/local/go |
||||
- sudo tar -C /usr/local -xzf download/$GODIST |
||||
version: 2 |
||||
|
||||
dependencies: |
||||
cache_directories: |
||||
- "~/docker" |
||||
- "~/download" |
||||
override: |
||||
- rm -rf ${GOPATH}/src/${REPO_PATH} |
||||
- mkdir -p ${GOPATH}/src/${ORG_PATH} |
||||
- cp -r ~/grafana ${GOPATH}/src/${ORG_PATH} |
||||
pre: |
||||
- pip install awscli |
||||
- sudo apt-get update; sudo apt-get install rpm; sudo apt-get install expect |
||||
- ./scripts/build/build_container.sh |
||||
jobs: |
||||
test-frontend: |
||||
docker: |
||||
- image: circleci/node:6.11.4 |
||||
steps: |
||||
- checkout |
||||
- run: |
||||
name: install yarn |
||||
command: 'sudo npm install -g yarn --quiet' |
||||
- restore_cache: |
||||
key: dependency-cache-{{ checksum "yarn.lock" }} |
||||
# Could we skip this step if the cache has been restored? `[ -d node_modules ] || yarn install ...` should be able to apply to build step as well |
||||
- run: |
||||
name: yarn install |
||||
command: 'yarn install --pure-lockfile --no-progress' |
||||
- save_cache: |
||||
key: dependency-cache-{{ checksum "yarn.lock" }} |
||||
paths: |
||||
- node_modules |
||||
- run: |
||||
name: frontend tests |
||||
command: './scripts/circle-test-frontend.sh' |
||||
|
||||
test: |
||||
override: |
||||
- bash scripts/circle-test-frontend.sh |
||||
- bash scripts/circle-test-backend.sh |
||||
test-backend: |
||||
docker: |
||||
- image: circleci/golang:1.10 |
||||
working_directory: /go/src/github.com/grafana/grafana |
||||
steps: |
||||
- checkout |
||||
- run: |
||||
name: build backend and run go tests |
||||
command: './scripts/circle-test-backend.sh' |
||||
|
||||
deployment: |
||||
gh_branch: |
||||
branch: master |
||||
commands: |
||||
- ./scripts/build/deploy.sh |
||||
- ./scripts/build/sign_packages.sh |
||||
- go run build.go sha-dist |
||||
- aws s3 sync ./dist s3://$BUCKET_NAME/master |
||||
- ./scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} master |
||||
- ./scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} |
||||
- go run ./scripts/build/publish.go -apiKey ${GRAFANA_COM_API_KEY} |
||||
gh_tag: |
||||
tag: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ |
||||
commands: |
||||
- ./scripts/build/deploy.sh |
||||
- ./scripts/build/sign_packages.sh |
||||
- go run build.go sha-dist |
||||
- aws s3 sync ./dist s3://$BUCKET_NAME/release |
||||
- ./scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} release |
||||
- ./scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} ${CIRCLE_TAG} |
||||
build: |
||||
docker: |
||||
- image: grafana/build-container:v0.1 |
||||
working_directory: /go/src/github.com/grafana/grafana |
||||
steps: |
||||
- checkout |
||||
- run: |
||||
name: build and package grafana |
||||
command: './scripts/build/build.sh' |
||||
- run: |
||||
name: sign packages |
||||
command: './scripts/build/sign_packages.sh' |
||||
- run: |
||||
name: sha-sum packages |
||||
command: 'go run build.go sha-dist' |
||||
- run: |
||||
name: Build Grafana.com publisher |
||||
command: 'go build -o scripts/publish scripts/build/publish.go' |
||||
- persist_to_workspace: |
||||
root: . |
||||
paths: |
||||
- dist/grafana* |
||||
- scripts/*.sh |
||||
- scripts/publish |
||||
|
||||
deploy-master: |
||||
docker: |
||||
- image: circleci/python:2.7-stretch |
||||
steps: |
||||
- attach_workspace: |
||||
at: . |
||||
- run: |
||||
name: install awscli |
||||
command: 'sudo pip install awscli' |
||||
- run: |
||||
name: deploy to s3 |
||||
command: 'aws s3 sync ./dist s3://$BUCKET_NAME/master' |
||||
- run: |
||||
name: Trigger Windows build |
||||
command: './scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} master' |
||||
- run: |
||||
name: Trigger Docker build |
||||
command: './scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN}' |
||||
- run: |
||||
name: Publish to Grafana.com |
||||
command: './scripts/publish -apiKey ${GRAFANA_COM_API_KEY}' |
||||
|
||||
deploy-release: |
||||
docker: |
||||
- image: circleci/python:2.7-stretch |
||||
steps: |
||||
- attach_workspace: |
||||
at: dist |
||||
- run: |
||||
name: install awscli |
||||
command: 'sudo pip install awscli' |
||||
- run: |
||||
name: deploy to s3 |
||||
command: 'aws s3 sync ./dist s3://$BUCKET_NAME/release' |
||||
- run: |
||||
name: Trigger Windows build |
||||
command: './scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} release' |
||||
- run: |
||||
name: Trigger Docker build |
||||
command: './scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} ${CIRCLE_TAG}' |
||||
|
||||
workflows: |
||||
version: 2 |
||||
test-and-build: |
||||
jobs: |
||||
- build: |
||||
filters: |
||||
tags: |
||||
only: /.*/ |
||||
- test-frontend: |
||||
filters: |
||||
tags: |
||||
only: /.*/ |
||||
- test-backend: |
||||
filters: |
||||
tags: |
||||
only: /.*/ |
||||
- deploy-master: |
||||
requires: |
||||
- test-backend |
||||
- test-frontend |
||||
- build |
||||
filters: |
||||
branches: |
||||
only: master |
||||
- deploy-release: |
||||
requires: |
||||
- test-backend |
||||
- test-frontend |
||||
- build |
||||
filters: |
||||
branches: |
||||
ignore: /.*/ |
||||
tags: |
||||
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ |
||||
|
@ -1,6 +1,10 @@ |
||||
# # config file version |
||||
apiVersion: 1 |
||||
|
||||
#providers: |
||||
# - name: 'default' |
||||
# org_id: 1 |
||||
# orgId: 1 |
||||
# folder: '' |
||||
# type: file |
||||
# options: |
||||
# folder: /var/lib/grafana/dashboards |
||||
# path: /var/lib/grafana/dashboards |
||||
|
@ -0,0 +1,4 @@ |
||||
FROM jmferrer/apache2-reverse-proxy:latest |
||||
|
||||
COPY ports.conf /etc/apache2/sites-enabled |
||||
COPY proxy.conf /etc/apache2/sites-enabled |
@ -0,0 +1,9 @@ |
||||
# This will proxy all requests for http://localhost:10081/grafana/ to |
||||
# http://localhost:3000 (Grafana running locally) |
||||
# |
||||
# Please note that you'll need to change the root_url in the Grafana configuration: |
||||
# root_url = %(protocol)s://%(domain)s:/grafana/ |
||||
|
||||
apacheproxy: |
||||
build: blocks/apache_proxy |
||||
network_mode: host |
@ -0,0 +1 @@ |
||||
Listen 10081 |
@ -0,0 +1,4 @@ |
||||
<VirtualHost *:10081> |
||||
ProxyPass /grafana/ http://localhost:3000/ |
||||
ProxyPassReverse /grafana/ http://localhost:3000/ |
||||
</VirtualHost> |
@ -0,0 +1,549 @@ |
||||
{ |
||||
"__inputs": [ |
||||
{ |
||||
"name": "DS_MYSQL", |
||||
"label": "Mysql", |
||||
"description": "", |
||||
"type": "datasource", |
||||
"pluginId": "mysql", |
||||
"pluginName": "MySQL" |
||||
} |
||||
], |
||||
"__requires": [ |
||||
{ |
||||
"type": "grafana", |
||||
"id": "grafana", |
||||
"name": "Grafana", |
||||
"version": "5.0.0" |
||||
}, |
||||
{ |
||||
"type": "panel", |
||||
"id": "graph", |
||||
"name": "Graph", |
||||
"version": "" |
||||
}, |
||||
{ |
||||
"type": "datasource", |
||||
"id": "mysql", |
||||
"name": "MySQL", |
||||
"version": "1.0.0" |
||||
}, |
||||
{ |
||||
"type": "panel", |
||||
"id": "table", |
||||
"name": "Table", |
||||
"version": "" |
||||
} |
||||
], |
||||
"annotations": { |
||||
"list": [ |
||||
{ |
||||
"builtIn": 1, |
||||
"datasource": "-- Grafana --", |
||||
"enable": true, |
||||
"hide": true, |
||||
"iconColor": "rgba(0, 211, 255, 1)", |
||||
"name": "Annotations & Alerts", |
||||
"type": "dashboard" |
||||
} |
||||
] |
||||
}, |
||||
"description": "A dashboard visualizing data generated from grafana/fake-data-gen", |
||||
"editable": true, |
||||
"gnetId": null, |
||||
"graphTooltip": 0, |
||||
"id": null, |
||||
"iteration": 1518602729468, |
||||
"links": [], |
||||
"panels": [ |
||||
{ |
||||
"aliasColors": { |
||||
"total avg": "#6ed0e0" |
||||
}, |
||||
"bars": false, |
||||
"dashLength": 10, |
||||
"dashes": false, |
||||
"datasource": "${DS_MYSQL}", |
||||
"fill": 2, |
||||
"gridPos": { |
||||
"h": 9, |
||||
"w": 12, |
||||
"x": 0, |
||||
"y": 0 |
||||
}, |
||||
"id": 2, |
||||
"legend": { |
||||
"avg": false, |
||||
"current": false, |
||||
"max": false, |
||||
"min": false, |
||||
"show": true, |
||||
"total": false, |
||||
"values": false |
||||
}, |
||||
"lines": true, |
||||
"linewidth": 2, |
||||
"links": [], |
||||
"nullPointMode": "null", |
||||
"percentage": false, |
||||
"pointradius": 5, |
||||
"points": false, |
||||
"renderer": "flot", |
||||
"seriesOverrides": [ |
||||
{ |
||||
"alias": "total avg", |
||||
"fill": 0, |
||||
"pointradius": 3, |
||||
"points": true |
||||
} |
||||
], |
||||
"spaceLength": 10, |
||||
"stack": false, |
||||
"steppedLine": false, |
||||
"targets": [ |
||||
{ |
||||
"alias": "", |
||||
"format": "time_series", |
||||
"hide": false, |
||||
"rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time_sec,\n avg(value) as value,\n hostname as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'logins.count' AND\n hostname IN($host)\nGROUP BY 1, 3\nORDER BY 1", |
||||
"refId": "A", |
||||
"target": "" |
||||
}, |
||||
{ |
||||
"alias": "", |
||||
"format": "time_series", |
||||
"rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time_sec,\n min(value) as value,\n 'total avg' as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'logins.count'\nGROUP BY 1\nORDER BY 1", |
||||
"refId": "B" |
||||
} |
||||
], |
||||
"thresholds": [], |
||||
"timeFrom": null, |
||||
"timeShift": "1h", |
||||
"title": "Average logins / $summarize", |
||||
"tooltip": { |
||||
"shared": true, |
||||
"sort": 0, |
||||
"value_type": "individual" |
||||
}, |
||||
"type": "graph", |
||||
"xaxis": { |
||||
"buckets": null, |
||||
"mode": "time", |
||||
"name": null, |
||||
"show": true, |
||||
"values": [] |
||||
}, |
||||
"yaxes": [ |
||||
{ |
||||
"format": "short", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
}, |
||||
{ |
||||
"format": "short", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"aliasColors": {}, |
||||
"bars": false, |
||||
"dashLength": 10, |
||||
"dashes": false, |
||||
"datasource": "${DS_MYSQL}", |
||||
"fill": 2, |
||||
"gridPos": { |
||||
"h": 18, |
||||
"w": 12, |
||||
"x": 12, |
||||
"y": 0 |
||||
}, |
||||
"id": 4, |
||||
"legend": { |
||||
"avg": false, |
||||
"current": false, |
||||
"max": false, |
||||
"min": false, |
||||
"show": true, |
||||
"total": false, |
||||
"values": false |
||||
}, |
||||
"lines": true, |
||||
"linewidth": 2, |
||||
"links": [], |
||||
"nullPointMode": "null", |
||||
"percentage": false, |
||||
"pointradius": 5, |
||||
"points": false, |
||||
"renderer": "flot", |
||||
"seriesOverrides": [], |
||||
"spaceLength": 10, |
||||
"stack": false, |
||||
"steppedLine": false, |
||||
"targets": [ |
||||
{ |
||||
"alias": "", |
||||
"format": "time_series", |
||||
"rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time_sec,\n avg(value) as value,\n 'started' as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'payment.started'\nGROUP BY 1, 3\nORDER BY 1", |
||||
"refId": "A", |
||||
"target": "" |
||||
}, |
||||
{ |
||||
"alias": "", |
||||
"format": "time_series", |
||||
"rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time_sec,\n avg(value) as value,\n 'ended' as \"metric\"\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'payment.ended'\nGROUP BY 1, 3\nORDER BY 1", |
||||
"refId": "B" |
||||
} |
||||
], |
||||
"thresholds": [], |
||||
"timeFrom": null, |
||||
"timeShift": "1h", |
||||
"title": "Average payments started/ended / $summarize", |
||||
"tooltip": { |
||||
"shared": true, |
||||
"sort": 0, |
||||
"value_type": "individual" |
||||
}, |
||||
"type": "graph", |
||||
"xaxis": { |
||||
"buckets": null, |
||||
"mode": "time", |
||||
"name": null, |
||||
"show": true, |
||||
"values": [] |
||||
}, |
||||
"yaxes": [ |
||||
{ |
||||
"format": "short", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
}, |
||||
{ |
||||
"format": "short", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"aliasColors": {}, |
||||
"bars": false, |
||||
"dashLength": 10, |
||||
"dashes": false, |
||||
"datasource": "${DS_MYSQL}", |
||||
"fill": 2, |
||||
"gridPos": { |
||||
"h": 9, |
||||
"w": 12, |
||||
"x": 0, |
||||
"y": 9 |
||||
}, |
||||
"id": 3, |
||||
"legend": { |
||||
"avg": false, |
||||
"current": false, |
||||
"max": false, |
||||
"min": false, |
||||
"show": true, |
||||
"total": false, |
||||
"values": false |
||||
}, |
||||
"lines": true, |
||||
"linewidth": 2, |
||||
"links": [], |
||||
"nullPointMode": "null", |
||||
"percentage": false, |
||||
"pointradius": 5, |
||||
"points": false, |
||||
"renderer": "flot", |
||||
"seriesOverrides": [], |
||||
"spaceLength": 10, |
||||
"stack": false, |
||||
"steppedLine": false, |
||||
"targets": [ |
||||
{ |
||||
"alias": "", |
||||
"format": "time_series", |
||||
"rawSql": "SELECT\n $__timeGroup(createdAt,'$summarize') as time_sec,\n max(value) as value,\n hostname as metric\nFROM \n grafana_metric\nWHERE\n $__timeFilter(createdAt) AND\n measurement = 'cpu' AND\n hostname IN($host)\nGROUP BY 1, 3\nORDER BY 1", |
||||
"refId": "A", |
||||
"target": "" |
||||
} |
||||
], |
||||
"thresholds": [], |
||||
"timeFrom": null, |
||||
"timeShift": "1h", |
||||
"title": "Max CPU / $summarize", |
||||
"tooltip": { |
||||
"shared": true, |
||||
"sort": 0, |
||||
"value_type": "individual" |
||||
}, |
||||
"type": "graph", |
||||
"xaxis": { |
||||
"buckets": null, |
||||
"mode": "time", |
||||
"name": null, |
||||
"show": true, |
||||
"values": [] |
||||
}, |
||||
"yaxes": [ |
||||
{ |
||||
"format": "percent", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
}, |
||||
{ |
||||
"format": "short", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"columns": [], |
||||
"datasource": "${DS_MYSQL}", |
||||
"fontSize": "100%", |
||||
"gridPos": { |
||||
"h": 9, |
||||
"w": 24, |
||||
"x": 0, |
||||
"y": 18 |
||||
}, |
||||
"id": 6, |
||||
"links": [], |
||||
"pageSize": null, |
||||
"scroll": true, |
||||
"showHeader": true, |
||||
"sort": { |
||||
"col": 0, |
||||
"desc": true |
||||
}, |
||||
"styles": [ |
||||
{ |
||||
"alias": "Time", |
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss", |
||||
"link": false, |
||||
"pattern": "Time", |
||||
"type": "date" |
||||
}, |
||||
{ |
||||
"alias": "", |
||||
"colorMode": null, |
||||
"colors": [ |
||||
"rgba(245, 54, 54, 0.9)", |
||||
"rgba(237, 129, 40, 0.89)", |
||||
"rgba(50, 172, 45, 0.97)" |
||||
], |
||||
"decimals": 2, |
||||
"pattern": "/.*/", |
||||
"thresholds": [], |
||||
"type": "number", |
||||
"unit": "short" |
||||
} |
||||
], |
||||
"targets": [ |
||||
{ |
||||
"alias": "", |
||||
"format": "table", |
||||
"rawSql": "SELECT createdAt as Time, source, datacenter, hostname, value FROM grafana_metric WHERE hostname in($host)", |
||||
"refId": "A", |
||||
"target": "" |
||||
} |
||||
], |
||||
"timeShift": "1h", |
||||
"title": "Values", |
||||
"transform": "table", |
||||
"type": "table" |
||||
} |
||||
], |
||||
"schemaVersion": 16, |
||||
"style": "dark", |
||||
"tags": [ |
||||
"fake-data-gen", |
||||
"mysql" |
||||
], |
||||
"templating": { |
||||
"list": [ |
||||
{ |
||||
"allValue": null, |
||||
"current": {}, |
||||
"datasource": "${DS_MYSQL}", |
||||
"hide": 0, |
||||
"includeAll": false, |
||||
"label": "Datacenter", |
||||
"multi": false, |
||||
"name": "datacenter", |
||||
"options": [], |
||||
"query": "SELECT DISTINCT datacenter FROM grafana_metric", |
||||
"refresh": 1, |
||||
"regex": "", |
||||
"sort": 1, |
||||
"tagValuesQuery": "", |
||||
"tags": [], |
||||
"tagsQuery": "", |
||||
"type": "query", |
||||
"useTags": false |
||||
}, |
||||
{ |
||||
"allValue": null, |
||||
"current": {}, |
||||
"datasource": "${DS_MYSQL}", |
||||
"hide": 0, |
||||
"includeAll": true, |
||||
"label": "Hostname", |
||||
"multi": true, |
||||
"name": "host", |
||||
"options": [], |
||||
"query": "SELECT DISTINCT hostname FROM grafana_metric WHERE datacenter='$datacenter'", |
||||
"refresh": 1, |
||||
"regex": "", |
||||
"sort": 1, |
||||
"tagValuesQuery": "", |
||||
"tags": [], |
||||
"tagsQuery": "", |
||||
"type": "query", |
||||
"useTags": false |
||||
}, |
||||
{ |
||||
"auto": false, |
||||
"auto_count": 5, |
||||
"auto_min": "10s", |
||||
"current": { |
||||
"selected": true, |
||||
"text": "1m", |
||||
"value": "1m" |
||||
}, |
||||
"hide": 0, |
||||
"label": "Summarize", |
||||
"name": "summarize", |
||||
"options": [ |
||||
{ |
||||
"selected": false, |
||||
"text": "1s", |
||||
"value": "1s" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "10s", |
||||
"value": "10s" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "30s", |
||||
"value": "30s" |
||||
}, |
||||
{ |
||||
"selected": true, |
||||
"text": "1m", |
||||
"value": "1m" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "5m", |
||||
"value": "5m" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "10m", |
||||
"value": "10m" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "30m", |
||||
"value": "30m" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "1h", |
||||
"value": "1h" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "6h", |
||||
"value": "6h" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "12h", |
||||
"value": "12h" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "1d", |
||||
"value": "1d" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "7d", |
||||
"value": "7d" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "14d", |
||||
"value": "14d" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "30d", |
||||
"value": "30d" |
||||
} |
||||
], |
||||
"query": "1s,10s,30s,1m,5m,10m,30m,1h,6h,12h,1d,7d,14d,30d", |
||||
"refresh": 2, |
||||
"type": "interval" |
||||
} |
||||
] |
||||
}, |
||||
"time": { |
||||
"from": "now-1h", |
||||
"to": "now" |
||||
}, |
||||
"timepicker": { |
||||
"refresh_intervals": [ |
||||
"5s", |
||||
"10s", |
||||
"30s", |
||||
"1m", |
||||
"5m", |
||||
"15m", |
||||
"30m", |
||||
"1h", |
||||
"2h", |
||||
"1d" |
||||
], |
||||
"time_options": [ |
||||
"5m", |
||||
"15m", |
||||
"1h", |
||||
"6h", |
||||
"12h", |
||||
"24h", |
||||
"2d", |
||||
"7d", |
||||
"30d" |
||||
] |
||||
}, |
||||
"timezone": "", |
||||
"title": "Grafana Fake Data Gen - MySQL", |
||||
"uid": "DGsCac3kz", |
||||
"version": 6 |
||||
} |
@ -0,0 +1,3 @@ |
||||
FROM nginx:alpine |
||||
|
||||
COPY nginx.conf /etc/nginx/nginx.conf |
@ -0,0 +1,9 @@ |
||||
# This will proxy all requests for http://localhost:10080/grafana/ to |
||||
# http://localhost:3000 (Grafana running locally) |
||||
# |
||||
# Please note that you'll need to change the root_url in the Grafana configuration: |
||||
# root_url = %(protocol)s://%(domain)s:/grafana/ |
||||
|
||||
nginxproxy: |
||||
build: blocks/nginx_proxy |
||||
network_mode: host |
@ -0,0 +1,19 @@ |
||||
events { worker_connections 1024; } |
||||
|
||||
http { |
||||
sendfile on; |
||||
|
||||
proxy_redirect off; |
||||
proxy_set_header Host $host; |
||||
proxy_set_header X-Real-IP $remote_addr; |
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||
proxy_set_header X-Forwarded-Host $server_name; |
||||
|
||||
server { |
||||
listen 10080; |
||||
|
||||
location /grafana/ { |
||||
proxy_pass http://localhost:3000/; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,547 @@ |
||||
{ |
||||
"__inputs": [ |
||||
{ |
||||
"name": "DS_POSTGRESQL", |
||||
"label": "PostgreSQL", |
||||
"description": "", |
||||
"type": "datasource", |
||||
"pluginId": "postgres", |
||||
"pluginName": "PostgreSQL" |
||||
} |
||||
], |
||||
"__requires": [ |
||||
{ |
||||
"type": "grafana", |
||||
"id": "grafana", |
||||
"name": "Grafana", |
||||
"version": "5.0.0" |
||||
}, |
||||
{ |
||||
"type": "panel", |
||||
"id": "graph", |
||||
"name": "Graph", |
||||
"version": "" |
||||
}, |
||||
{ |
||||
"type": "datasource", |
||||
"id": "postgres", |
||||
"name": "PostgreSQL", |
||||
"version": "1.0.0" |
||||
}, |
||||
{ |
||||
"type": "panel", |
||||
"id": "table", |
||||
"name": "Table", |
||||
"version": "" |
||||
} |
||||
], |
||||
"annotations": { |
||||
"list": [ |
||||
{ |
||||
"builtIn": 1, |
||||
"datasource": "-- Grafana --", |
||||
"enable": true, |
||||
"hide": true, |
||||
"iconColor": "rgba(0, 211, 255, 1)", |
||||
"name": "Annotations & Alerts", |
||||
"type": "dashboard" |
||||
} |
||||
] |
||||
}, |
||||
"description": "A dashboard visualizing data generated from grafana/fake-data-gen", |
||||
"editable": true, |
||||
"gnetId": null, |
||||
"graphTooltip": 0, |
||||
"id": null, |
||||
"iteration": 1518601837383, |
||||
"links": [], |
||||
"panels": [ |
||||
{ |
||||
"aliasColors": { |
||||
"total avg": "#6ed0e0" |
||||
}, |
||||
"bars": false, |
||||
"dashLength": 10, |
||||
"dashes": false, |
||||
"datasource": "${DS_POSTGRESQL}", |
||||
"fill": 2, |
||||
"gridPos": { |
||||
"h": 9, |
||||
"w": 12, |
||||
"x": 0, |
||||
"y": 0 |
||||
}, |
||||
"id": 2, |
||||
"legend": { |
||||
"avg": false, |
||||
"current": false, |
||||
"max": false, |
||||
"min": false, |
||||
"show": true, |
||||
"total": false, |
||||
"values": false |
||||
}, |
||||
"lines": true, |
||||
"linewidth": 2, |
||||
"links": [], |
||||
"nullPointMode": "null", |
||||
"percentage": false, |
||||
"pointradius": 5, |
||||
"points": false, |
||||
"renderer": "flot", |
||||
"seriesOverrides": [ |
||||
{ |
||||
"alias": "total avg", |
||||
"fill": 0, |
||||
"pointradius": 3, |
||||
"points": true |
||||
} |
||||
], |
||||
"spaceLength": 10, |
||||
"stack": false, |
||||
"steppedLine": false, |
||||
"targets": [ |
||||
{ |
||||
"alias": "", |
||||
"format": "time_series", |
||||
"hide": false, |
||||
"rawSql": "SELECT\n $__timeGroup(\"createdAt\",'$summarize'),\n avg(value) as \"value\",\n hostname as \"metric\"\nFROM \n grafana_metric\nWHERE\n $__timeFilter(\"createdAt\") AND\n measurement = 'logins.count' AND\n hostname IN($host)\nGROUP BY time, metric\nORDER BY time", |
||||
"refId": "A", |
||||
"target": "" |
||||
}, |
||||
{ |
||||
"alias": "", |
||||
"format": "time_series", |
||||
"rawSql": "SELECT\n $__timeGroup(\"createdAt\",'$summarize'),\n min(value) as \"value\",\n 'total avg' as \"metric\"\nFROM \n grafana_metric\nWHERE\n $__timeFilter(\"createdAt\") AND\n measurement = 'logins.count'\nGROUP BY time", |
||||
"refId": "B" |
||||
} |
||||
], |
||||
"thresholds": [], |
||||
"timeFrom": null, |
||||
"timeShift": null, |
||||
"title": "Average logins / $summarize", |
||||
"tooltip": { |
||||
"shared": true, |
||||
"sort": 0, |
||||
"value_type": "individual" |
||||
}, |
||||
"type": "graph", |
||||
"xaxis": { |
||||
"buckets": null, |
||||
"mode": "time", |
||||
"name": null, |
||||
"show": true, |
||||
"values": [] |
||||
}, |
||||
"yaxes": [ |
||||
{ |
||||
"format": "short", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
}, |
||||
{ |
||||
"format": "short", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"aliasColors": {}, |
||||
"bars": false, |
||||
"dashLength": 10, |
||||
"dashes": false, |
||||
"datasource": "${DS_POSTGRESQL}", |
||||
"fill": 2, |
||||
"gridPos": { |
||||
"h": 18, |
||||
"w": 12, |
||||
"x": 12, |
||||
"y": 0 |
||||
}, |
||||
"id": 4, |
||||
"legend": { |
||||
"avg": false, |
||||
"current": false, |
||||
"max": false, |
||||
"min": false, |
||||
"show": true, |
||||
"total": false, |
||||
"values": false |
||||
}, |
||||
"lines": true, |
||||
"linewidth": 2, |
||||
"links": [], |
||||
"nullPointMode": "null", |
||||
"percentage": false, |
||||
"pointradius": 5, |
||||
"points": false, |
||||
"renderer": "flot", |
||||
"seriesOverrides": [], |
||||
"spaceLength": 10, |
||||
"stack": false, |
||||
"steppedLine": false, |
||||
"targets": [ |
||||
{ |
||||
"alias": "", |
||||
"format": "time_series", |
||||
"rawSql": "SELECT\n $__timeGroup(\"createdAt\",'$summarize'),\n avg(value) as \"value\",\n 'started' as \"metric\"\nFROM \n grafana_metric\nWHERE\n $__timeFilter(\"createdAt\") AND\n measurement = 'payment.started'\nGROUP BY time, metric\nORDER BY time", |
||||
"refId": "A", |
||||
"target": "" |
||||
}, |
||||
{ |
||||
"alias": "", |
||||
"format": "time_series", |
||||
"rawSql": "SELECT\n $__timeGroup(\"createdAt\",'$summarize'),\n avg(value) as \"value\",\n 'ended' as \"metric\"\nFROM \n grafana_metric\nWHERE\n $__timeFilter(\"createdAt\") AND\n measurement = 'payment.ended'\nGROUP BY time, metric\nORDER BY time", |
||||
"refId": "B" |
||||
} |
||||
], |
||||
"thresholds": [], |
||||
"timeFrom": null, |
||||
"timeShift": null, |
||||
"title": "Average payments started/ended / $summarize", |
||||
"tooltip": { |
||||
"shared": true, |
||||
"sort": 0, |
||||
"value_type": "individual" |
||||
}, |
||||
"type": "graph", |
||||
"xaxis": { |
||||
"buckets": null, |
||||
"mode": "time", |
||||
"name": null, |
||||
"show": true, |
||||
"values": [] |
||||
}, |
||||
"yaxes": [ |
||||
{ |
||||
"format": "short", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
}, |
||||
{ |
||||
"format": "short", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"aliasColors": {}, |
||||
"bars": false, |
||||
"dashLength": 10, |
||||
"dashes": false, |
||||
"datasource": "${DS_POSTGRESQL}", |
||||
"fill": 2, |
||||
"gridPos": { |
||||
"h": 9, |
||||
"w": 12, |
||||
"x": 0, |
||||
"y": 9 |
||||
}, |
||||
"id": 3, |
||||
"legend": { |
||||
"avg": false, |
||||
"current": false, |
||||
"max": false, |
||||
"min": false, |
||||
"show": true, |
||||
"total": false, |
||||
"values": false |
||||
}, |
||||
"lines": true, |
||||
"linewidth": 2, |
||||
"links": [], |
||||
"nullPointMode": "null", |
||||
"percentage": false, |
||||
"pointradius": 5, |
||||
"points": false, |
||||
"renderer": "flot", |
||||
"seriesOverrides": [], |
||||
"spaceLength": 10, |
||||
"stack": false, |
||||
"steppedLine": false, |
||||
"targets": [ |
||||
{ |
||||
"alias": "", |
||||
"format": "time_series", |
||||
"rawSql": "SELECT\n $__timeGroup(\"createdAt\",'$summarize'),\n max(value) as \"value\",\n hostname as \"metric\"\nFROM \n grafana_metric\nWHERE\n $__timeFilter(\"createdAt\") AND\n measurement = 'cpu' AND\n hostname IN($host)\nGROUP BY time, metric\nORDER BY time", |
||||
"refId": "A", |
||||
"target": "" |
||||
} |
||||
], |
||||
"thresholds": [], |
||||
"timeFrom": null, |
||||
"timeShift": null, |
||||
"title": "Max CPU / $summarize", |
||||
"tooltip": { |
||||
"shared": true, |
||||
"sort": 0, |
||||
"value_type": "individual" |
||||
}, |
||||
"type": "graph", |
||||
"xaxis": { |
||||
"buckets": null, |
||||
"mode": "time", |
||||
"name": null, |
||||
"show": true, |
||||
"values": [] |
||||
}, |
||||
"yaxes": [ |
||||
{ |
||||
"format": "percent", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
}, |
||||
{ |
||||
"format": "short", |
||||
"label": null, |
||||
"logBase": 1, |
||||
"max": null, |
||||
"min": null, |
||||
"show": true |
||||
} |
||||
] |
||||
}, |
||||
{ |
||||
"columns": [], |
||||
"datasource": "${DS_POSTGRESQL}", |
||||
"fontSize": "100%", |
||||
"gridPos": { |
||||
"h": 9, |
||||
"w": 24, |
||||
"x": 0, |
||||
"y": 18 |
||||
}, |
||||
"id": 6, |
||||
"links": [], |
||||
"pageSize": null, |
||||
"scroll": true, |
||||
"showHeader": true, |
||||
"sort": { |
||||
"col": 0, |
||||
"desc": true |
||||
}, |
||||
"styles": [ |
||||
{ |
||||
"alias": "Time", |
||||
"dateFormat": "YYYY-MM-DD HH:mm:ss", |
||||
"link": false, |
||||
"pattern": "Time", |
||||
"type": "date" |
||||
}, |
||||
{ |
||||
"alias": "", |
||||
"colorMode": null, |
||||
"colors": [ |
||||
"rgba(245, 54, 54, 0.9)", |
||||
"rgba(237, 129, 40, 0.89)", |
||||
"rgba(50, 172, 45, 0.97)" |
||||
], |
||||
"decimals": 2, |
||||
"pattern": "/.*/", |
||||
"thresholds": [], |
||||
"type": "number", |
||||
"unit": "short" |
||||
} |
||||
], |
||||
"targets": [ |
||||
{ |
||||
"alias": "", |
||||
"format": "table", |
||||
"rawSql": "SELECT \"createdAt\" as \"Time\", source, datacenter, hostname, value FROM grafana_metric WHERE hostname in($host)", |
||||
"refId": "A", |
||||
"target": "" |
||||
} |
||||
], |
||||
"title": "Values", |
||||
"transform": "table", |
||||
"type": "table" |
||||
} |
||||
], |
||||
"schemaVersion": 16, |
||||
"style": "dark", |
||||
"tags": [ |
||||
"fake-data-gen", |
||||
"postgres" |
||||
], |
||||
"templating": { |
||||
"list": [ |
||||
{ |
||||
"allValue": null, |
||||
"current": {}, |
||||
"datasource": "${DS_POSTGRESQL}", |
||||
"hide": 0, |
||||
"includeAll": false, |
||||
"label": "Datacenter", |
||||
"multi": false, |
||||
"name": "datacenter", |
||||
"options": [], |
||||
"query": "SELECT DISTINCT datacenter FROM grafana_metric", |
||||
"refresh": 1, |
||||
"regex": "", |
||||
"sort": 1, |
||||
"tagValuesQuery": "", |
||||
"tags": [], |
||||
"tagsQuery": "", |
||||
"type": "query", |
||||
"useTags": false |
||||
}, |
||||
{ |
||||
"allValue": null, |
||||
"current": {}, |
||||
"datasource": "${DS_POSTGRESQL}", |
||||
"hide": 0, |
||||
"includeAll": true, |
||||
"label": "Hostname", |
||||
"multi": true, |
||||
"name": "host", |
||||
"options": [], |
||||
"query": "SELECT DISTINCT hostname FROM grafana_metric WHERE datacenter='$datacenter'", |
||||
"refresh": 1, |
||||
"regex": "", |
||||
"sort": 1, |
||||
"tagValuesQuery": "", |
||||
"tags": [], |
||||
"tagsQuery": "", |
||||
"type": "query", |
||||
"useTags": false |
||||
}, |
||||
{ |
||||
"auto": false, |
||||
"auto_count": 5, |
||||
"auto_min": "10s", |
||||
"current": { |
||||
"text": "1m", |
||||
"value": "1m" |
||||
}, |
||||
"hide": 0, |
||||
"label": "Summarize", |
||||
"name": "summarize", |
||||
"options": [ |
||||
{ |
||||
"selected": false, |
||||
"text": "1s", |
||||
"value": "1s" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "10s", |
||||
"value": "10s" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "30s", |
||||
"value": "30s" |
||||
}, |
||||
{ |
||||
"selected": true, |
||||
"text": "1m", |
||||
"value": "1m" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "5m", |
||||
"value": "5m" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "10m", |
||||
"value": "10m" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "30m", |
||||
"value": "30m" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "1h", |
||||
"value": "1h" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "6h", |
||||
"value": "6h" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "12h", |
||||
"value": "12h" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "1d", |
||||
"value": "1d" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "7d", |
||||
"value": "7d" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "14d", |
||||
"value": "14d" |
||||
}, |
||||
{ |
||||
"selected": false, |
||||
"text": "30d", |
||||
"value": "30d" |
||||
} |
||||
], |
||||
"query": "1s,10s,30s,1m,5m,10m,30m,1h,6h,12h,1d,7d,14d,30d", |
||||
"refresh": 2, |
||||
"type": "interval" |
||||
} |
||||
] |
||||
}, |
||||
"time": { |
||||
"from": "now-1h", |
||||
"to": "now" |
||||
}, |
||||
"timepicker": { |
||||
"refresh_intervals": [ |
||||
"5s", |
||||
"10s", |
||||
"30s", |
||||
"1m", |
||||
"5m", |
||||
"15m", |
||||
"30m", |
||||
"1h", |
||||
"2h", |
||||
"1d" |
||||
], |
||||
"time_options": [ |
||||
"5m", |
||||
"15m", |
||||
"1h", |
||||
"6h", |
||||
"12h", |
||||
"24h", |
||||
"2d", |
||||
"7d", |
||||
"30d" |
||||
] |
||||
}, |
||||
"timezone": "", |
||||
"title": "Grafana Fake Data Gen - PostgreSQL", |
||||
"uid": "JYola5qzz", |
||||
"version": 1 |
||||
} |
@ -1,3 +1,3 @@ |
||||
FROM prom/prometheus |
||||
FROM prom/prometheus:v1.8.2 |
||||
ADD prometheus.yml /etc/prometheus/ |
||||
ADD alert.rules /etc/prometheus/ |
||||
|
@ -1,3 +1,3 @@ |
||||
FROM prom/prometheus:v2.0.0 |
||||
FROM prom/prometheus:v2.2.0 |
||||
ADD prometheus.yml /etc/prometheus/ |
||||
ADD alert.rules /etc/prometheus/ |
||||
|
@ -0,0 +1,31 @@ |
||||
prometheus: |
||||
build: blocks/prometheus2 |
||||
network_mode: host |
||||
ports: |
||||
- "9090:9090" |
||||
|
||||
node_exporter: |
||||
image: prom/node-exporter |
||||
network_mode: host |
||||
ports: |
||||
- "9100:9100" |
||||
|
||||
fake-prometheus-data: |
||||
image: grafana/fake-data-gen |
||||
network_mode: host |
||||
ports: |
||||
- "9091:9091" |
||||
environment: |
||||
FD_DATASOURCE: prom |
||||
|
||||
alertmanager: |
||||
image: quay.io/prometheus/alertmanager |
||||
network_mode: host |
||||
ports: |
||||
- "9093:9093" |
||||
|
||||
prometheus-random-data: |
||||
build: blocks/prometheus_random_data |
||||
network_mode: host |
||||
ports: |
||||
- "8080:8080" |
@ -0,0 +1,18 @@ |
||||
# This Dockerfile builds an image for a client_golang example. |
||||
|
||||
# Builder image, where we build the example. |
||||
FROM golang:1.9.0 AS builder |
||||
# Download prometheus/client_golang/examples/random first |
||||
RUN go get github.com/prometheus/client_golang/examples/random |
||||
WORKDIR /go/src/github.com/prometheus/client_golang |
||||
WORKDIR /go/src/github.com/prometheus/client_golang/prometheus |
||||
RUN go get -d |
||||
WORKDIR /go/src/github.com/prometheus/client_golang/examples/random |
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w' |
||||
|
||||
# Final image. |
||||
FROM scratch |
||||
LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>" |
||||
COPY --from=builder /go/src/github.com/prometheus/client_golang/examples/random . |
||||
EXPOSE 8080 |
||||
ENTRYPOINT ["/random"] |
@ -1 +1 @@ |
||||
v4.3 |
||||
v5.0 |
||||
|
@ -0,0 +1,118 @@ |
||||
+++ |
||||
title = "Permissions" |
||||
description = "Grafana user permissions" |
||||
keywords = ["grafana", "configuration", "documentation", "admin", "users", "permissions"] |
||||
type = "docs" |
||||
aliases = ["/reference/admin"] |
||||
[menu.docs] |
||||
name = "Permissions" |
||||
parent = "admin" |
||||
weight = 3 |
||||
+++ |
||||
|
||||
# Permissions |
||||
|
||||
Grafana users have permissions that are determined by their: |
||||
|
||||
- **Organization Role** (Admin, Editor, Viewer) |
||||
- Via **Team** memberships where the **Team** has been assigned specific permissions. |
||||
- Via permissions assigned directly to user (on folders or dashboards) |
||||
- The Grafana Admin (i.e. Super Admin) user flag. |
||||
|
||||
## Organization Roles |
||||
|
||||
Users can be belong to one or more organizations. A user's organization membership is tied to a role that defines what the user is allowed to do |
||||
in that organization. |
||||
|
||||
### Admin Role |
||||
|
||||
Can do everything scoped to the organization. For example: |
||||
|
||||
- Add & Edit data sources. |
||||
- Add & Edit organization users & teams. |
||||
- Configure App plugins & set org settings. |
||||
|
||||
### Editor Role |
||||
|
||||
- Can create and modify dashboards & alert rules. This can be disabled on specific folders and dashboards. |
||||
- **Cannot** create or edit data sources nor invite new users. |
||||
|
||||
### Viewer Role |
||||
|
||||
- View any dashboard. This can be disabled on specific folders and dashboards. |
||||
- **Cannot** create or edit dashboards nor data sources. |
||||
|
||||
This role can be tweaked via Grafana server setting [viewers_can_edit]({{< relref "installation/configuration.md#viewers-can-edit" >}}). If you set this to true users |
||||
with **Viewer** can also make transient dashboard edits, meaning they can modify panels & queries but not save the changes (nor create new dashboards). |
||||
Useful for public Grafana installations where you want anonymous users to be able to edit panels & queries but not save or create new dashboards. |
||||
|
||||
## Grafana Admin |
||||
|
||||
This admin flag makes a user a `Super Admin`. This means they can access the `Server Admin` views where all users and organizations can be administrated. |
||||
|
||||
### Dashboard & Folder Permissions |
||||
|
||||
> Introduced in Grafana v5.0 |
||||
|
||||
{{< docs-imagebox img="/img/docs/v50/folder_permissions.png" max-width="500px" class="docs-image--right" >}} |
||||
|
||||
For dashboards and dashboard folders there is a **Permissions** page that make it possible to |
||||
remove the default role based permssions for Editors and Viewers. It's here you can add and assign permissions to specific **Users** and **Teams**. |
||||
|
||||
You can assign & remove permissions for **Organization Roles**, **Users** and **Teams**. |
||||
|
||||
Permission levels: |
||||
|
||||
- **Admin**: Can edit & create dashboards and edit permissions. |
||||
- **Edit**: Can edit & create dashboards. **Cannot** edit folder/dashboard permissions. |
||||
- **View**: Can only view existing dashboards/folders. |
||||
|
||||
#### Restricting Access |
||||
|
||||
The highest permission always wins so if you for example want to hide a folder or dashboard from others you need to remove the **Organization Role** based permission from the Access Control List (ACL). |
||||
|
||||
- You cannot override permissions for users with the **Org Admin Role**. Admins always have access to everything. |
||||
- A more specific permission with a lower permission level will not have any effect if a more general rule exists with higher permission level. You need to remove or lower the permission level of the more general rule. |
||||
|
||||
#### How Grafana Resolves Multiple Permissions - Examples |
||||
|
||||
##### Example 1 (`user1` has the Editor Role) |
||||
|
||||
Permissions for a dashboard: |
||||
|
||||
- `Everyone with Editor Role Can Edit` |
||||
- `user1 Can View` |
||||
|
||||
Result: `user1` has Edit permission as the highest permission always wins. |
||||
|
||||
##### Example 2 (`user1` has the Viewer Role and is a member of `team1`) |
||||
|
||||
Permissions for a dashboard: |
||||
|
||||
- `Everyone with Viewer Role Can View` |
||||
- `user1 Can Edit` |
||||
- `team1 Can Admin` |
||||
|
||||
Result: `user1` has Admin permission as the highest permission always wins. |
||||
|
||||
##### Example 3 |
||||
|
||||
Permissions for a dashboard: |
||||
|
||||
- `user1 Can Admin (inherited from parent folder)` |
||||
- `user1 Can Edit` |
||||
|
||||
Result: You cannot override to a lower permission. `user1` has Admin permission as the highest permission always wins. |
||||
|
||||
- **View**: Can only view existing dashboars/folders. |
||||
- You cannot override permissions for users with **Org Admin Role** |
||||
- A more specific permission with lower permission level will not have any effect if a more general rule exists with higher permission level. For example if "Everyone with Editor Role Can Edit" exists in the ACL list then **John Doe** will still have Edit permission even after you have specifically added a permission for this user with the permission set to **View**. You need to remove or lower the permission level of the more general rule. |
||||
|
||||
### Data source permissions |
||||
|
||||
Permissions on dashboards and folders **do not** include permissions on data sources. A user with `Viewer` role |
||||
can still issue any possible query to a data source, not just those queries that exist on dashboards he/she has access to. |
||||
We hope to add permissions on data sources in a future release. Until then **do not** view dashboard permissions as a secure |
||||
way to restrict user data access. Dashboard permissions only limits what dashboards & folders a user can view & edit not which |
||||
data sources a user can access nor what queries a user can issue. |
||||
|
@ -0,0 +1,152 @@ |
||||
+++ |
||||
title = "What's New in Grafana v5.0" |
||||
description = "Feature & improvement highlights for Grafana v5.0" |
||||
keywords = ["grafana", "new", "documentation", "5.0"] |
||||
type = "docs" |
||||
[menu.docs] |
||||
name = "Version 5.0" |
||||
identifier = "v5.0" |
||||
parent = "whatsnew" |
||||
weight = -6 |
||||
+++ |
||||
|
||||
# What's New in Grafana v5.0 |
||||
|
||||
This is the most substantial update that Grafana has ever seen. This article will detail the major new features and enhancements. |
||||
|
||||
- [New Dashboard Layout Engine]({{< relref "#new-dashboard-layout-engine" >}}) enables a much easier drag, drop and resize experience and new types of layouts. |
||||
- [New UX]({{< relref "#new-ux-layout-engine" >}}). The UI has big improvements in both look and function. |
||||
- [New Light Theme]({{< relref "#new-light-theme" >}}) is now looking really nice. |
||||
- [Dashboard Folders]({{< relref "#dashboard-folders" >}}) helps you keep your dashboards organized. |
||||
- [Permissions]({{< relref "#dashboard-folders" >}}) on folders and dashboards helps manage larger Grafana installations. |
||||
- [Group users into teams]({{< relref "#teams" >}}) and use them in the new permission system. |
||||
- [Datasource provisioning]({{< relref "#data-sources" >}}) makes it possible to setup datasources via config files. |
||||
- [Dashboard provisioning]({{< relref "#dashboards" >}}) makes it possible to setup dashboards via config files. |
||||
- [Persistent dashboard url's]({{< relref "#dashboard-model-persistent-url-s-and-api-changes" >}}) makes it possible to rename dashboards without breaking links. |
||||
- [Graphite Tags & Integrated Function Docs]({{< relref "#graphite-tags-integrated-function-docs" >}}). |
||||
|
||||
### Video showing new features |
||||
|
||||
<iframe width="450" height="270" src="https://www.youtube.com/embed/Izr0IBgoTZQ?rel=0&" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> |
||||
<br /> |
||||
|
||||
## New Dashboard Layout Engine |
||||
|
||||
{{< docs-imagebox img="/img/docs/v50/new_grid.png" max-width="1000px" class="docs-image--right">}} |
||||
|
||||
The new dashboard layout engine allows for much easier movement and sizing of panels, as other panels now move out of the way in |
||||
a very intuitive way. Panels are sized independently, so rows are no longer necessary to create layouts. This opens |
||||
up many new types of layouts where panels of different heights can be aligned easily. Checkout the new grid in the video |
||||
above or on the [play site](http://play.grafana.org). All your existing dashboards will automatically migrate to the |
||||
new position system and look close to identical. The new panel position makes dashboards saved in v5.0 incompatible |
||||
with older versions of Grafana. |
||||
|
||||
<div class="clearfix"></div> |
||||
|
||||
## New UX |
||||
|
||||
{{< docs-imagebox img="/img/docs/v50/new_ux_nav.png" max-width="1000px" class="docs-image--right" >}} |
||||
|
||||
Almost every page has seen significant UX improvements. All pages (except dashboard pages) have a new tab-based layout that improves navigation between pages. The side menu has also changed quite a bit. You can still hide the side menu completely if you click on the Grafana logo. |
||||
|
||||
<div class="clearfix"></div> |
||||
|
||||
## Dashboard Settings |
||||
|
||||
{{< docs-imagebox img="/img/docs/v50/dashboard_settings.png" max-width="1000px" class="docs-image--right" >}} |
||||
Dashboard pages have a new header toolbar where buttons and actions are now all moved to the right. All the dashboard |
||||
settings views have been combined with a side nav which allows you to easily move between different setting categories. |
||||
|
||||
<div class="clearfix"></div> |
||||
|
||||
## New Light Theme |
||||
|
||||
{{< docs-imagebox img="/img/docs/v50/new_white_theme.png" max-width="1000px" class="docs-image--right" >}} |
||||
|
||||
This theme has not seen a lot of love in recent years and we felt it was time to give it a major overhaul. We are very happy with the result. |
||||
|
||||
<div class="clearfix"></div> |
||||
|
||||
## Dashboard Folders |
||||
|
||||
{{< docs-imagebox img="/img/docs/v50/new_search.png" max-width="1000px" class="docs-image--right" >}} |
||||
|
||||
The big new feature that comes with Grafana v5.0 is dashboard folders. Now you can organize your dashboards in folders, |
||||
which is very useful if you have a lot of dashboards or multiple teams. |
||||
|
||||
- New search design adds expandable sections for each folder, starred and recently viewed dashboards. |
||||
- New manage dashboard pages enable batch actions and views for folder settings and permissions. |
||||
- Set permissions on folders and have dashboards inherit the permissions. |
||||
|
||||
## Teams |
||||
|
||||
A team is a new concept in Grafana v5. They are simply a group of users that can be used in the new permission system for dashboards and folders. Only an admin can create teams. |
||||
We hope to do more with teams in future releases like integration with LDAP and a team landing page. |
||||
|
||||
## Permissions |
||||
|
||||
{{< docs-imagebox img="/img/docs/v50/folder_permissions.png" max-width="1000px" class="docs-image--right" >}} |
||||
|
||||
You can assign permissions to folders and dashboards. The default user role-based permissions can be removed and |
||||
replaced with specific teams or users enabling more control over what a user can see and edit. |
||||
|
||||
Dashboard permissions only limits what dashboards & folders a user can view & edit not which |
||||
data sources a user can access nor what queries a user can issue. |
||||
|
||||
<div class="clearfix"></div> |
||||
|
||||
## Provisioning from configuration |
||||
|
||||
In previous versions of Grafana, you could only use the API for provisioning data sources and dashboards. |
||||
But that required the service to be running before you started creating dashboards and you also needed to |
||||
set up credentials for the HTTP API. In v5.0 we decided to improve this experience by adding a new active |
||||
provisioning system that uses config files. This will make GitOps more natural as data sources and dashboards can |
||||
be defined via files that can be version controlled. We hope to extend this system to later add support for users, orgs |
||||
and alerts as well. |
||||
|
||||
### Data sources |
||||
|
||||
Data sources can now be setup using config files. These data sources are by default not editable from the Grafana GUI. |
||||
It's also possible to update and delete data sources from the config file. More info in the [data source provisioning docs](/administration/provisioning/#datasources). |
||||
|
||||
### Dashboards |
||||
|
||||
We also deprecated the `[dashboard.json]` in favor of our new dashboard provisioner that keeps dashboards on disk |
||||
in sync with dashboards in Grafana's database. The dashboard provisioner has multiple advantages over the old |
||||
`[dashboard.json]` feature. Instead of storing the dashboard in memory we now insert the dashboard into the database, |
||||
which makes it possible to star them, use one as the home dashboard, set permissions and other features in Grafana that |
||||
expects the dashboards to exist in the database. More info in the [dashboard provisioning docs](/administration/provisioning/#dashboards) |
||||
|
||||
|
||||
## Graphite Tags & Integrated Function Docs |
||||
|
||||
{{< docs-imagebox img="/img/docs/v50/graphite_tags.png" max-width="1000px" class="docs-image--right" >}} |
||||
|
||||
The Graphite query editor has been updated to support the latest Graphite version (v1.2) that adds |
||||
many new functions and support for querying by tags. You can now also view function documentation right in the query editor! |
||||
|
||||
Read more on [Graphite Tag Support](http://graphite.readthedocs.io/en/latest/tags.html?highlight=tags). |
||||
|
||||
<div class="clearfix"></div> |
||||
|
||||
## Dashboard model, persistent url's and API changes |
||||
|
||||
We are introducing a new unique identifier (`uid`) in the dashboard JSON model. It's automatically |
||||
generated if not provided when creating a dashboard and will have a length of 9-12 characters. |
||||
|
||||
The unique identifier allows having persistent URL's for accessing dashboards, sharing them |
||||
between instances and when using [dashboard provisioning](#dashboards). This means that dashboard can |
||||
be renamed without breaking any links. We're changing the url format for dashboards |
||||
from `/dashboard/db/:slug` to `/d/:uid/:slug`. We'll keep supporting the old slug-based url's for dashboards |
||||
and redirects to the new one for backward compatibility. Please note that the old slug-based url's |
||||
have been deprecated and will be removed in a future release. |
||||
|
||||
Sharing dashboards between instances becomes much easier since the `uid` is unique (unique enough). |
||||
This might seem like a small change, but we are incredibly excited about it since it will make it |
||||
much easier to manage, collaborate and navigate between dashboards. |
||||
|
||||
### API changes |
||||
New uid-based routes in the dashboard API have been introduced to retrieve and delete dashboards. |
||||
The corresponding slug-based routes have been deprecated and will be removed in a future release. |
||||
|
||||
|
@ -0,0 +1,149 @@ |
||||
+++ |
||||
title = "Dashboard Permissions HTTP API " |
||||
description = "Grafana Dashboard Permissions HTTP API" |
||||
keywords = ["grafana", "http", "documentation", "api", "dashboard", "permission", "permissions", "acl"] |
||||
aliases = ["/http_api/dashboardpermissions/"] |
||||
type = "docs" |
||||
[menu.docs] |
||||
name = "Dashboard Permissions" |
||||
parent = "http_api" |
||||
+++ |
||||
|
||||
# Dashboard Permissions API |
||||
|
||||
This API can be used to update/get the permissions for a dashboard. |
||||
|
||||
Permissions with `dashboardId=-1` are the default permissions for users with the Viewer and Editor roles. Permissions can be set for a user, a team or a role (Viewer or Editor). Permissions cannot be set for Admins - they always have access to everything. |
||||
|
||||
The permission levels for the permission field: |
||||
|
||||
- 1 = View |
||||
- 2 = Edit |
||||
- 4 = Admin |
||||
|
||||
## Get permissions for a dashboard |
||||
|
||||
`GET /api/dashboards/id/:dashboardId/permissions` |
||||
|
||||
Gets all existing permissions for the dashboard with the given `dashboardId`. |
||||
|
||||
**Example request**: |
||||
|
||||
```http |
||||
GET /api/dashboards/id/1/permissions HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
``` |
||||
|
||||
**Example Response** |
||||
|
||||
```http |
||||
HTTP/1.1 200 OK |
||||
Content-Type: application/json; charset=UTF-8 |
||||
Content-Length: 551 |
||||
|
||||
[ |
||||
{ |
||||
"id": 1, |
||||
"dashboardId": -1, |
||||
"created": "2017-06-20T02:00:00+02:00", |
||||
"updated": "2017-06-20T02:00:00+02:00", |
||||
"userId": 0, |
||||
"userLogin": "", |
||||
"userEmail": "", |
||||
"teamId": 0, |
||||
"team": "", |
||||
"role": "Viewer", |
||||
"permission": 1, |
||||
"permissionName": "View", |
||||
"uid": "", |
||||
"title": "", |
||||
"slug": "", |
||||
"isFolder": false, |
||||
"url": "" |
||||
}, |
||||
{ |
||||
"id": 2, |
||||
"dashboardId": -1, |
||||
"created": "2017-06-20T02:00:00+02:00", |
||||
"updated": "2017-06-20T02:00:00+02:00", |
||||
"userId": 0, |
||||
"userLogin": "", |
||||
"userEmail": "", |
||||
"teamId": 0, |
||||
"team": "", |
||||
"role": "Editor", |
||||
"permission": 2, |
||||
"permissionName": "Edit", |
||||
"uid": "", |
||||
"title": "", |
||||
"slug": "", |
||||
"isFolder": false, |
||||
"url": "" |
||||
} |
||||
] |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Access denied |
||||
- **404** - Dashboard not found |
||||
|
||||
## Update permissions for a dashboard |
||||
|
||||
`POST /api/dashboards/id/:dashboardId/permissions` |
||||
|
||||
Updates permissions for a dashboard. This operation will remove existing permissions if they're not included in the request. |
||||
|
||||
**Example request**: |
||||
|
||||
```http |
||||
POST /api/dashboards/id/1/permissions |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
|
||||
"items": [ |
||||
{ |
||||
"role": "Viewer", |
||||
"permission": 1 |
||||
}, |
||||
{ |
||||
"role": "Editor", |
||||
"permission": 2 |
||||
}, |
||||
{ |
||||
"teamId": 1, |
||||
"permission": 1 |
||||
}, |
||||
{ |
||||
"userId": 11, |
||||
"permission": 4 |
||||
} |
||||
] |
||||
} |
||||
``` |
||||
|
||||
JSON body schema: |
||||
|
||||
- **items** - The permission items to add/update. Items that are omitted from the list will be removed. |
||||
|
||||
**Example response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 OK |
||||
Content-Type: application/json; charset=UTF-8 |
||||
Content-Length: 35 |
||||
|
||||
{"message":"Dashboard permissions updated"} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Access denied |
||||
- **404** - Dashboard not found |
@ -0,0 +1,317 @@ |
||||
+++ |
||||
title = "Folder HTTP API " |
||||
description = "Grafana Folder HTTP API" |
||||
keywords = ["grafana", "http", "documentation", "api", "folder"] |
||||
aliases = ["/http_api/folder/"] |
||||
type = "docs" |
||||
[menu.docs] |
||||
name = "Folder" |
||||
parent = "http_api" |
||||
+++ |
||||
|
||||
# Folder API |
||||
|
||||
## Identifier (id) vs unique identifier (uid) |
||||
|
||||
The identifier (id) of a folder is an auto-incrementing numeric value and is only unique per Grafana install. |
||||
|
||||
The unique identifier (uid) of a folder can be used for uniquely identify folders between multiple Grafana installs. It's automatically generated if not provided when creating a folder. The uid allows having consistent URL's for accessing folders and when syncing folders between multiple Grafana installs. This means that changing the title of a folder will not break any bookmarked links to that folder. |
||||
|
||||
The uid can have a maximum length of 40 characters. |
||||
|
||||
|
||||
## Get all folders |
||||
|
||||
`GET /api/folders` |
||||
|
||||
Returns all folders that the authenticated user has permission to view. |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
GET /api/folders?limit=10 HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
[ |
||||
{ |
||||
"id":1, |
||||
"uid": "nErXDvCkzz", |
||||
"title": "Departmenet ABC", |
||||
"url": "/dashboards/f/nErXDvCkzz/department-abc", |
||||
"hasAcl": false, |
||||
"canSave": true, |
||||
"canEdit": true, |
||||
"canAdmin": true, |
||||
"createdBy": "admin", |
||||
"created": "2018-01-31T17:43:12+01:00", |
||||
"updatedBy": "admin", |
||||
"updated": "2018-01-31T17:43:12+01:00", |
||||
"version": 1 |
||||
} |
||||
] |
||||
``` |
||||
|
||||
## Get folder by uid |
||||
|
||||
`GET /api/folders/:uid` |
||||
|
||||
Will return the folder given the folder uid. |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
GET /api/folders/nErXDvCkzzh HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{ |
||||
"id":1, |
||||
"uid": "nErXDvCkzz", |
||||
"title": "Departmenet ABC", |
||||
"url": "/dashboards/f/nErXDvCkzz/department-abc", |
||||
"hasAcl": false, |
||||
"canSave": true, |
||||
"canEdit": true, |
||||
"canAdmin": true, |
||||
"createdBy": "admin", |
||||
"created": "2018-01-31T17:43:12+01:00", |
||||
"updatedBy": "admin", |
||||
"updated": "2018-01-31T17:43:12+01:00", |
||||
"version": 1 |
||||
} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** – Found |
||||
- **401** – Unauthorized |
||||
- **403** – Access Denied |
||||
- **404** – Folder not found |
||||
|
||||
## Create folder |
||||
|
||||
`POST /api/folders` |
||||
|
||||
Creates a new folder. |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
POST /api/folders HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
|
||||
{ |
||||
"uid": "nErXDvCkzz", |
||||
"title": "Department ABC" |
||||
} |
||||
``` |
||||
|
||||
JSON Body schema: |
||||
|
||||
- **uid** – Optional [unique identifier](/http_api/folder/#identifier-id-vs-unique-identifier-uid). |
||||
- **title** – The title of the folder. |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{ |
||||
"id":1, |
||||
"uid": "nErXDvCkzz", |
||||
"title": "Departmenet ABC", |
||||
"url": "/dashboards/f/nErXDvCkzz/department-abc", |
||||
"hasAcl": false, |
||||
"canSave": true, |
||||
"canEdit": true, |
||||
"canAdmin": true, |
||||
"createdBy": "admin", |
||||
"created": "2018-01-31T17:43:12+01:00", |
||||
"updatedBy": "admin", |
||||
"updated": "2018-01-31T17:43:12+01:00", |
||||
"version": 1 |
||||
} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** – Created |
||||
- **400** – Errors (invalid json, missing or invalid fields, etc) |
||||
- **401** – Unauthorized |
||||
- **403** – Access Denied |
||||
|
||||
## Update folder |
||||
|
||||
`PUT /api/folders/:uid` |
||||
|
||||
Updates an existing folder identified by uid. |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
PUT /api/folders/nErXDvCkzz HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
|
||||
{ |
||||
"title":"Department DEF", |
||||
"version": 1 |
||||
} |
||||
``` |
||||
|
||||
JSON Body schema: |
||||
|
||||
- **uid** – Provide another [unique identifier](/http_api/folder/#identifier-id-vs-unique-identifier-uid) than stored to change the unique identifier. |
||||
- **title** – The title of the folder. |
||||
- **version** – Provide the current version to be able to update the folder. Not needed if `overwrite=true`. |
||||
- **overwrite** – Set to true if you want to overwrite existing folder with newer version. |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{ |
||||
"id":1, |
||||
"uid": "nErXDvCkzz", |
||||
"title": "Departmenet DEF", |
||||
"url": "/dashboards/f/nErXDvCkzz/department-def", |
||||
"hasAcl": false, |
||||
"canSave": true, |
||||
"canEdit": true, |
||||
"canAdmin": true, |
||||
"createdBy": "admin", |
||||
"created": "2018-01-31T17:43:12+01:00", |
||||
"updatedBy": "admin", |
||||
"updated": "2018-01-31T17:43:12+01:00", |
||||
"version": 1 |
||||
} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** – Updated |
||||
- **400** – Errors (invalid json, missing or invalid fields, etc) |
||||
- **401** – Unauthorized |
||||
- **403** – Access Denied |
||||
- **404** – Folder not found |
||||
- **412** – Precondition failed |
||||
|
||||
The **412** status code is used for explaing that you cannot update the folder and why. |
||||
There can be different reasons for this: |
||||
|
||||
- The folder has been changed by someone else, `status=version-mismatch` |
||||
|
||||
The response body will have the following properties: |
||||
|
||||
```http |
||||
HTTP/1.1 412 Precondition Failed |
||||
Content-Type: application/json; charset=UTF-8 |
||||
Content-Length: 97 |
||||
|
||||
{ |
||||
"message": "The folder has been changed by someone else", |
||||
"status": "version-mismatch" |
||||
} |
||||
``` |
||||
|
||||
## Delete folder |
||||
|
||||
`DELETE /api/folders/:uid` |
||||
|
||||
Deletes an existing folder identified by uid together with all dashboards stored in the folder, if any. This operation cannot be reverted. |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
DELETE /api/folders/nErXDvCkzz HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
|
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{ |
||||
"message":"Folder deleted" |
||||
} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** – Deleted |
||||
- **401** – Unauthorized |
||||
- **403** – Access Denied |
||||
- **404** – Folder not found |
||||
|
||||
## Get folder by id |
||||
|
||||
`GET /api/folders/:id` |
||||
|
||||
Will return the folder identified by id. |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
GET /api/folders/1 HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{ |
||||
"id":1, |
||||
"uid": "nErXDvCkzz", |
||||
"title": "Departmenet ABC", |
||||
"url": "/dashboards/f/nErXDvCkzz/department-abc", |
||||
"hasAcl": false, |
||||
"canSave": true, |
||||
"canEdit": true, |
||||
"canAdmin": true, |
||||
"createdBy": "admin", |
||||
"created": "2018-01-31T17:43:12+01:00", |
||||
"updatedBy": "admin", |
||||
"updated": "2018-01-31T17:43:12+01:00", |
||||
"version": 1 |
||||
} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** – Found |
||||
- **401** – Unauthorized |
||||
- **403** – Access Denied |
||||
- **404** – Folder not found |
@ -0,0 +1,98 @@ |
||||
+++ |
||||
title = "Folder/Dashboard Search HTTP API " |
||||
description = "Grafana Folder/Dashboard Search HTTP API" |
||||
keywords = ["grafana", "http", "documentation", "api", "search", "folder", "dashboard"] |
||||
aliases = ["/http_api/folder_dashboard_search/"] |
||||
type = "docs" |
||||
[menu.docs] |
||||
name = "Folder/dashboard search" |
||||
parent = "http_api" |
||||
+++ |
||||
|
||||
# Folder/Dashboard Search API |
||||
|
||||
## Search folders and dashboards |
||||
|
||||
`GET /api/search/` |
||||
|
||||
Query parameters: |
||||
|
||||
- **query** – Search Query |
||||
- **tag** – List of tags to search for |
||||
- **type** – Type to search for, `dash-folder` or `dash-db` |
||||
- **dashboardIds** – List of dashboard id's to search for |
||||
- **folderIds** – List of folder id's to search in for dashboards |
||||
- **starred** – Flag indicating if only starred Dashboards should be returned |
||||
- **limit** – Limit the number of returned results |
||||
|
||||
**Example request for retrieving folders and dashboards of the general folder**: |
||||
|
||||
```http |
||||
GET /api/search?folderIds=0&query=&starred=false HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
``` |
||||
|
||||
**Example response for retrieving folders and dashboards of the general folder**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
[ |
||||
{ |
||||
"id": 163, |
||||
"uid": "000000163", |
||||
"title": "Folder", |
||||
"url": "/dashboards/f/000000163/folder", |
||||
"type": "dash-folder", |
||||
"tags": [], |
||||
"isStarred": false, |
||||
"uri":"db/folder" // deprecated in Grafana v5.0 |
||||
}, |
||||
{ |
||||
"id":1, |
||||
"uid": "cIBgcSjkk", |
||||
"title":"Production Overview", |
||||
"url": "/d/cIBgcSjkk/production-overview", |
||||
"type":"dash-db", |
||||
"tags":[prod], |
||||
"isStarred":true, |
||||
"uri":"db/production-overview" // deprecated in Grafana v5.0 |
||||
} |
||||
] |
||||
``` |
||||
|
||||
**Example request searching for dashboards**: |
||||
|
||||
```http |
||||
GET /api/search?query=Production%20Overview&starred=true&tag=prod HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
``` |
||||
|
||||
**Example response searching for dashboards**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
[ |
||||
{ |
||||
"id":1, |
||||
"uid": "cIBgcSjkk", |
||||
"title":"Production Overview", |
||||
"url": "/d/cIBgcSjkk/production-overview", |
||||
"type":"dash-db", |
||||
"tags":[prod], |
||||
"isStarred":true, |
||||
"folderId": 2, |
||||
"folderUid": "000000163", |
||||
"folderTitle": "Folder", |
||||
"folderUrl": "/dashboards/f/000000163/folder", |
||||
"uri":"db/production-overview" // deprecated in Grafana v5.0 |
||||
} |
||||
] |
||||
``` |
@ -0,0 +1,149 @@ |
||||
+++ |
||||
title = "Folder Permissions HTTP API " |
||||
description = "Grafana Folder Permissions HTTP API" |
||||
keywords = ["grafana", "http", "documentation", "api", "folder", "permission", "permissions", "acl"] |
||||
aliases = ["/http_api/dashboardpermissions/"] |
||||
type = "docs" |
||||
[menu.docs] |
||||
name = "Folder Permissions" |
||||
parent = "http_api" |
||||
+++ |
||||
|
||||
# Folder Permissions API |
||||
|
||||
This API can be used to update/get the permissions for a folder. |
||||
|
||||
Permissions with `folderId=-1` are the default permissions for users with the Viewer and Editor roles. Permissions can be set for a user, a team or a role (Viewer or Editor). Permissions cannot be set for Admins - they always have access to everything. |
||||
|
||||
The permission levels for the permission field: |
||||
|
||||
- 1 = View |
||||
- 2 = Edit |
||||
- 4 = Admin |
||||
|
||||
## Get permissions for a folder |
||||
|
||||
`GET /api/folders/:uid/permissions` |
||||
|
||||
Gets all existing permissions for the folder with the given `uid`. |
||||
|
||||
**Example request**: |
||||
|
||||
```http |
||||
GET /api/folders/nErXDvCkzz/permissions HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
``` |
||||
|
||||
**Example Response** |
||||
|
||||
```http |
||||
HTTP/1.1 200 OK |
||||
Content-Type: application/json; charset=UTF-8 |
||||
Content-Length: 551 |
||||
|
||||
[ |
||||
{ |
||||
"id": 1, |
||||
"folderId": -1, |
||||
"created": "2017-06-20T02:00:00+02:00", |
||||
"updated": "2017-06-20T02:00:00+02:00", |
||||
"userId": 0, |
||||
"userLogin": "", |
||||
"userEmail": "", |
||||
"teamId": 0, |
||||
"team": "", |
||||
"role": "Viewer", |
||||
"permission": 1, |
||||
"permissionName": "View", |
||||
"uid": "nErXDvCkzz", |
||||
"title": "", |
||||
"slug": "", |
||||
"isFolder": false, |
||||
"url": "" |
||||
}, |
||||
{ |
||||
"id": 2, |
||||
"dashboardId": -1, |
||||
"created": "2017-06-20T02:00:00+02:00", |
||||
"updated": "2017-06-20T02:00:00+02:00", |
||||
"userId": 0, |
||||
"userLogin": "", |
||||
"userEmail": "", |
||||
"teamId": 0, |
||||
"team": "", |
||||
"role": "Editor", |
||||
"permission": 2, |
||||
"permissionName": "Edit", |
||||
"uid": "", |
||||
"title": "", |
||||
"slug": "", |
||||
"isFolder": false, |
||||
"url": "" |
||||
} |
||||
] |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Access denied |
||||
- **404** - Folder not found |
||||
|
||||
## Update permissions for a folder |
||||
|
||||
`POST /api/folders/:uid/permissions` |
||||
|
||||
Updates permissions for a folder. This operation will remove existing permissions if they're not included in the request. |
||||
|
||||
**Example request**: |
||||
|
||||
```http |
||||
POST /api/folders/nErXDvCkzz/permissions |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk |
||||
|
||||
"items": [ |
||||
{ |
||||
"role": "Viewer", |
||||
"permission": 1 |
||||
}, |
||||
{ |
||||
"role": "Editor", |
||||
"permission": 2 |
||||
}, |
||||
{ |
||||
"teamId": 1, |
||||
"permission": 1 |
||||
}, |
||||
{ |
||||
"userId": 11, |
||||
"permission": 4 |
||||
} |
||||
] |
||||
} |
||||
``` |
||||
|
||||
JSON body schema: |
||||
|
||||
- **items** - The permission items to add/update. Items that are omitted from the list will be removed. |
||||
|
||||
**Example response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 OK |
||||
Content-Type: application/json; charset=UTF-8 |
||||
Content-Length: 35 |
||||
|
||||
{"message":"Folder permissions updated"} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Access denied |
||||
- **404** - Dashboard not found |
@ -0,0 +1,316 @@ |
||||
+++ |
||||
title = "Team HTTP API " |
||||
description = "Grafana Team HTTP API" |
||||
keywords = ["grafana", "http", "documentation", "api", "team", "teams", "group"] |
||||
aliases = ["/http_api/team/"] |
||||
type = "docs" |
||||
[menu.docs] |
||||
name = "Teams" |
||||
parent = "http_api" |
||||
+++ |
||||
|
||||
# Team API |
||||
|
||||
This API can be used to create/update/delete Teams and to add/remove users to Teams. All actions require that the user has the Admin role for the organization. |
||||
|
||||
## Team Search With Paging |
||||
|
||||
`GET /api/teams/search?perpage=50&page=1&query=mytea` |
||||
|
||||
or |
||||
|
||||
`GET /api/teams/search?name=myteam` |
||||
|
||||
```http |
||||
GET /api/teams/search?perpage=10&page=1&query=myteam HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Basic YWRtaW46YWRtaW4= |
||||
``` |
||||
|
||||
### Using the query parameter |
||||
|
||||
Default value for the `perpage` parameter is `1000` and for the `page` parameter is `1`. |
||||
|
||||
The `totalCount` field in the response can be used for pagination of the teams list E.g. if `totalCount` is equal to 100 teams and the `perpage` parameter is set to 10 then there are 10 pages of teams. |
||||
|
||||
The `query` parameter is optional and it will return results where the query value is contained in the `name` field. Query values with spaces need to be url encoded e.g. `query=my%20team`. |
||||
|
||||
### Using the name parameter |
||||
|
||||
The `name` parameter returns a single team if the parameter matches the `name` field. |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
"totalCount": 1, |
||||
"teams": [ |
||||
{ |
||||
"id": 1, |
||||
"orgId": 1, |
||||
"name": "MyTestTeam", |
||||
"email": "", |
||||
"avatarUrl": "\/avatar\/3f49c15916554246daa714b9bd0ee398", |
||||
"memberCount": 1 |
||||
} |
||||
], |
||||
"page": 1, |
||||
"perPage": 1000 |
||||
} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Permission denied |
||||
- **404** - Team not found (if searching by name) |
||||
|
||||
## Get Team By Id |
||||
|
||||
`GET /api/teams/:id` |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
GET /api/teams/1 HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Basic YWRtaW46YWRtaW4= |
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{ |
||||
"id": 1, |
||||
"orgId": 1, |
||||
"name": "MyTestTeam", |
||||
"email": "", |
||||
"created": "2017-12-15T10:40:45+01:00", |
||||
"updated": "2017-12-15T10:40:45+01:00" |
||||
} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Permission denied |
||||
- **404** - Team not found |
||||
|
||||
## Add Team |
||||
|
||||
The Team `name` needs to be unique. `name` is required and `email` is optional. |
||||
|
||||
`POST /api/teams` |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
POST /api/teams HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Basic YWRtaW46YWRtaW4= |
||||
|
||||
{ |
||||
"name": "MyTestTeam", |
||||
"email": "email@test.com" |
||||
} |
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{"message":"Team created","teamId":2} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Permission denied |
||||
- **409** - Team name is taken |
||||
|
||||
## Update Team |
||||
|
||||
There are two fields that can be updated for a team: `name` and `email`. |
||||
|
||||
`PUT /api/teams/:id` |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
PUT /api/teams/2 HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Basic YWRtaW46YWRtaW4= |
||||
|
||||
{ |
||||
"name": "MyTestTeam", |
||||
"email": "email@test.com" |
||||
} |
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{"message":"Team updated"} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Permission denied |
||||
- **404** - Team not found |
||||
- **409** - Team name is taken |
||||
|
||||
## Delete Team By Id |
||||
|
||||
`DELETE /api/teams/:id` |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
DELETE /api/teams/2 HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Basic YWRtaW46YWRtaW4= |
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{"message":"Team deleted"} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Permission denied |
||||
- **404** - Failed to delete Team. ID not found |
||||
|
||||
## Get Team Members |
||||
|
||||
`GET /api/teams/:teamId/members` |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
GET /api/teams/1/members HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Basic YWRtaW46YWRtaW4= |
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
[ |
||||
{ |
||||
"orgId": 1, |
||||
"teamId": 1, |
||||
"userId": 3, |
||||
"email": "user1@email.com", |
||||
"login": "user1", |
||||
"avatarUrl": "\/avatar\/1b3c32f6386b0185c40d359cdc733a79" |
||||
}, |
||||
{ |
||||
"orgId": 1, |
||||
"teamId": 1, |
||||
"userId": 2, |
||||
"email": "user2@email.com", |
||||
"login": "user2", |
||||
"avatarUrl": "\/avatar\/cad3c68da76e45d10269e8ef02f8e73e" |
||||
} |
||||
] |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Permission denied |
||||
|
||||
## Add Team Member |
||||
|
||||
`POST /api/teams/:teamId/members` |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
POST /api/teams/1/members HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Basic YWRtaW46YWRtaW4= |
||||
|
||||
{ |
||||
"userId": 2 |
||||
} |
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{"message":"Member added to Team"} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **400** - User is already added to this team |
||||
- **401** - Unauthorized |
||||
- **403** - Permission denied |
||||
- **404** - Team not found |
||||
|
||||
## Remove Member From Team |
||||
|
||||
`DELETE /api/teams/:teamId/members/:userId` |
||||
|
||||
**Example Request**: |
||||
|
||||
```http |
||||
DELETE /api/teams/2/members/3 HTTP/1.1 |
||||
Accept: application/json |
||||
Content-Type: application/json |
||||
Authorization: Basic YWRtaW46YWRtaW4= |
||||
``` |
||||
|
||||
**Example Response**: |
||||
|
||||
```http |
||||
HTTP/1.1 200 |
||||
Content-Type: application/json |
||||
|
||||
{"message":"Team Member removed"} |
||||
``` |
||||
|
||||
Status Codes: |
||||
|
||||
- **200** - Ok |
||||
- **401** - Unauthorized |
||||
- **403** - Permission denied |
||||
- **404** - Team not found/Team member not found |
@ -1,53 +1,107 @@ |
||||
+++ |
||||
title = "Docs Home" |
||||
description = "Install guide for Grafana" |
||||
title = "Grafana documentation" |
||||
description = "Guides, Installation & Feature Documentation" |
||||
keywords = ["grafana", "installation", "documentation"] |
||||
type = "docs" |
||||
aliases = ["v1.1", "guides/reference/admin"] |
||||
[menu.docs] |
||||
name = "Welcome to the Docs" |
||||
identifier = "root" |
||||
weight = -1 |
||||
+++ |
||||
|
||||
# Welcome to the Grafana Documentation |
||||
# Grafana Documentation |
||||
|
||||
Grafana is an open source metric analytics & visualization suite. It is most commonly used for |
||||
visualizing time series data for infrastructure and application analytics but many use it in |
||||
other domains including industrial sensors, home automation, weather, and process control. |
||||
<h2>Installing Grafana</h2> |
||||
<div class="nav-cards"> |
||||
<a href="{{< relref "installation/debian.md" >}}" class="nav-cards__item nav-cards__item--install"> |
||||
<div class="nav-cards__icon fa fa-linux"> |
||||
</div> |
||||
<h5>Installing on Linux</h5> |
||||
</a> |
||||
<a href="{{< relref "installation/mac.md" >}}" class="nav-cards__item nav-cards__item--install"> |
||||
<div class="nav-cards__icon fa fa-apple"> |
||||
</div> |
||||
<h5>Installing on Mac OS X</h5> |
||||
</a> |
||||
<a href="{{< relref "installation/windows.md" >}}" class="nav-cards__item nav-cards__item--install"> |
||||
<div class="nav-cards__icon fa fa-windows"> |
||||
</div> |
||||
<h5>Installing on Windows</h5> |
||||
</a> |
||||
<a href="https://grafana.com/cloud/grafana" class="nav-cards__item nav-cards__item--install"> |
||||
<div class="nav-cards__icon fa fa-cloud"> |
||||
</div> |
||||
<h5>Grafana Cloud</h5> |
||||
</a> |
||||
<a href="https://grafana.com/grafana/download" class="nav-cards__item nav-cards__item--install"> |
||||
<div class="nav-cards__icon fa fa-moon-o"> |
||||
</div> |
||||
<h5>Nightly Builds</h5> |
||||
</a> |
||||
<div class="nav-cards__item nav-cards__item--install"> |
||||
<h5>For other platforms Read the <a href="{{< relref "project/building_from_source.md" >}}">build from source</a> |
||||
instructions for more information.</h5> |
||||
</div> |
||||
</div> |
||||
|
||||
## Installing Grafana |
||||
- [Installing on Debian / Ubuntu](installation/debian) |
||||
- [Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)](installation/rpm) |
||||
- [Installing on Mac OS X](installation/mac) |
||||
- [Installing on Windows](installation/windows) |
||||
- [Installing on Docker](installation/docker) |
||||
- [Installing using Provisioning (Chef, Puppet, Salt, Ansible, etc)](installation/provisioning) |
||||
- [Nightly Builds](https://grafana.com/grafana/download) |
||||
<h2>Guides</h2> |
||||
|
||||
For other platforms Read the [build from source]({{< relref "project/building_from_source.md" >}}) |
||||
instructions for more information. |
||||
<div class="nav-cards"> |
||||
<a href="https://grafana.com/grafana" class="nav-cards__item nav-cards__item--guide"> |
||||
<h4>What is Grafana?</h4> |
||||
<p>Grafana feature highlights.</p> |
||||
</a> |
||||
<a href="{{< relref "installation/configuration.md" >}}" class="nav-cards__item nav-cards__item--guide"> |
||||
<h4>Configure Grafana</h4> |
||||
<p>Article on all the Grafana configuration and setup options.</p> |
||||
</a> |
||||
<a href="{{< relref "guides/getting_started.md" >}}" class="nav-cards__item nav-cards__item--guide"> |
||||
<h4>Getting Started</h4> |
||||
<p>A guide that walks you through the basics of using Grafana</p> |
||||
</a> |
||||
<a href="{{< relref "administration/provisioning.md" >}}" class="nav-cards__item nav-cards__item--guide"> |
||||
<h4>Provisioning</h4> |
||||
<p>A guide to help you automate your Grafana setup & configuration.</p> |
||||
</a> |
||||
<a href="{{< relref "guides/whats-new-in-v5.md" >}}" class="nav-cards__item nav-cards__item--guide"> |
||||
<h4>What's new in v5.0</h4> |
||||
<p>Article on all the new cool features and enhancements in v5.0</p> |
||||
</a> |
||||
<a href="{{< relref "tutorials/screencasts.md" >}}" class="nav-cards__item nav-cards__item--guide"> |
||||
<h4>Screencasts</h4> |
||||
<p>Video tutorials & guides</p> |
||||
</a> |
||||
</div> |
||||
|
||||
## Configuring Grafana |
||||
|
||||
The back-end web server has a number of configuration options. Go the |
||||
[Configuration]({{< relref "installation/configuration.md" >}}) page for details on all |
||||
those options. |
||||
|
||||
|
||||
## Getting Started |
||||
|
||||
- [Getting Started]({{< relref "guides/getting_started.md" >}}) |
||||
- [Basic Concepts]({{< relref "guides/basic_concepts.md" >}}) |
||||
- [Screencasts]({{< relref "tutorials/screencasts.md" >}}) |
||||
|
||||
## Data Source Guides |
||||
|
||||
- [Graphite]({{< relref "features/datasources/graphite.md" >}}) |
||||
- [Elasticsearch]({{< relref "features/datasources/elasticsearch.md" >}}) |
||||
- [InfluxDB]({{< relref "features/datasources/influxdb.md" >}}) |
||||
- [Prometheus]({{< relref "features/datasources/prometheus.md" >}}) |
||||
- [OpenTSDB]({{< relref "features/datasources/opentsdb.md" >}}) |
||||
- [MySQL]({{< relref "features/datasources/mysql.md" >}}) |
||||
- [Postgres]({{< relref "features/datasources/postgres.md" >}}) |
||||
- [Cloudwatch]({{< relref "features/datasources/cloudwatch.md" >}}) |
||||
<h2>Data Source Guides</h2> |
||||
<div class="nav-cards"> |
||||
<a href="{{< relref "features/datasources/graphite.md" >}}" class="nav-cards__item nav-cards__item--ds"> |
||||
<img src="/img/docs/logos/icon_graphite.svg" > |
||||
<h5>Graphite</h5> |
||||
</a> |
||||
<a href="{{< relref "features/datasources/elasticsearch.md" >}}" class="nav-cards__item nav-cards__item--ds"> |
||||
<img src="/img/docs/logos/icon_elasticsearch.svg" > |
||||
<h5>Elasticsearch</h5> |
||||
</a> |
||||
<a href="{{< relref "features/datasources/influxdb.md" >}}" class="nav-cards__item nav-cards__item--ds"> |
||||
<img src="/img/docs/logos/icon_influxdb.svg" > |
||||
<h5>InfluxDB</h5> |
||||
</a> |
||||
<a href="{{< relref "features/datasources/prometheus.md" >}}" class="nav-cards__item nav-cards__item--ds"> |
||||
<img src="/img/docs/logos/icon_prometheus.svg" > |
||||
<h5>Prometheus</h5> |
||||
</a> |
||||
<a href="{{< relref "features/datasources/opentsdb.md" >}}" class="nav-cards__item nav-cards__item--ds"> |
||||
<img src="/img/docs/logos/icon_opentsdb.png" > |
||||
<h5>OpenTSDB</h5> |
||||
</a> |
||||
<a href="{{< relref "features/datasources/mysql.md" >}}" class="nav-cards__item nav-cards__item--ds"> |
||||
<img src="/img/docs/logos/icon_mysql.png" > |
||||
<h5>MySQL</h5> |
||||
</a> |
||||
<a href="{{< relref "features/datasources/postgres.md" >}}" class="nav-cards__item nav-cards__item--ds"> |
||||
<img src="/img/docs/logos/icon_postgres.svg" > |
||||
<h5>Postgres</h5> |
||||
</a> |
||||
<a href="{{< relref "features/datasources/cloudwatch.md" >}}" class="nav-cards__item nav-cards__item--ds"> |
||||
<img src="/img/docs/logos/icon_cloudwatch.svg"> |
||||
<h5>Cloudwatch</h5> |
||||
</a> |
||||
</div> |
||||
|
@ -1,42 +0,0 @@ |
||||
+++ |
||||
title = "Admin Roles" |
||||
description = "Users & Organization permission and administration" |
||||
keywords = ["grafana", "configuration", "documentation", "admin", "users", "permissions"] |
||||
type = "docs" |
||||
[menu.docs] |
||||
name = "Admin Roles" |
||||
parent = "admin" |
||||
weight = 3 |
||||
+++ |
||||
|
||||
# Administration |
||||
|
||||
Grafana has two levels of administrators: |
||||
|
||||
* Organizational administrators: These admins can manage users within specific organizations in a particular Grafana installation |
||||
* Grafana administrators: These super admins can manage users across all organizations in a Grafana installation. They can also change and access system-wide settings. |
||||
|
||||
## Organizational Administrators |
||||
|
||||
As an Organizational administrator, you can add `Data Sources`, add Users to your Organization and |
||||
modify Organization details and options. |
||||
|
||||
> *Note*: If Grafana is configured with `users.allow_org_create = true`, any User of any Organization will be able to |
||||
> start their own Organization and become the administrator of that Organization. |
||||
|
||||
|
||||
## Grafana Administrators |
||||
|
||||
<img src="/img/v2/admin_sidenav.png" class="pull-right" style="margin-left: 15px"> |
||||
As a Grafana Administrator, you have complete access to any Organization or User in that instance of Grafana. |
||||
When performing actions as a Grafana admin, the sidebar will change it's appearance as below to indicate you are performing global server administration. |
||||
|
||||
From the Grafana Server Admin page, you can access the System Info page which summarizes all of the backend configuration settings of the Grafana server. |
||||
|
||||
## Why would I have multiple Organizations? |
||||
|
||||
Organizations in Grafana are best suited for a **multi-tenant deployment**. In a multi-tenant deployment, |
||||
Organizations can be used to provide a full Grafana experience to different sets of users from a single Grafana instance, |
||||
at the convenience of the Grafana Administrator. |
||||
|
||||
In most cases, a Grafana installation will only have **one** Organization. Since dashboards, data sources and other configuration items are not shared between organizations, there's no need to create multiple Organizations if you want all your users to have access to the same set of dashboards and data. |
@ -0,0 +1,52 @@ |
||||
+++ |
||||
title = "Dashboard Folders" |
||||
keywords = ["grafana", "dashboard", "dashboard folders", "folder", "folders", "documentation", "guide"] |
||||
type = "docs" |
||||
[menu.docs] |
||||
name = "Folders" |
||||
parent = "dashboard_features" |
||||
weight = 3 |
||||
+++ |
||||
|
||||
# Dashboard Folders |
||||
|
||||
Folders are a way to organize and group dashboards - very useful if you have a lot of dashboards or multiple teams using the same Grafana instance. |
||||
|
||||
## How To Create A Folder |
||||
|
||||
- Create a folder by using the Create Folder link in the side menu (under the create menu (+ icon)) |
||||
- Use the create Folder button on the Manage Dashboards page. |
||||
- When saving a dashboard, you can either choose a folder for the dashboard to be saved in or create a new folder |
||||
|
||||
On the Create Folder page, fill in a unique name for the folder and press Create. |
||||
|
||||
## Manage Dashboards |
||||
|
||||
{{< docs-imagebox img="/img/docs/v50/manage_dashboard_menu.png" max-width="300px" class="docs-image--right" >}} |
||||
|
||||
There is a new Manage Dashboards page where you can carry out a variety of tasks: |
||||
|
||||
- create a folder |
||||
- create a dashboard |
||||
- move dashboards into folders |
||||
- delete multiple dashboards |
||||
- navigate to a folder page (where you can set permissions for a folder and/or its dashboards) |
||||
|
||||
## Dashboard Folder Page |
||||
|
||||
You reach the dashboard folder page by clicking on the cog icon that appears when you hover |
||||
over a folder in the dashboard list in the search result or on the Manage dashboards page. |
||||
|
||||
The Dashboard Folder Page is similar to the Manage Dashboards page and is where you can carry out the following tasks: |
||||
|
||||
- Allows you to move or delete dashboards in a folder. |
||||
- Rename a folder (under the Settings tab). |
||||
- Set permissions for the folder (inherited by dashboards in the folder). |
||||
|
||||
## Permissions |
||||
|
||||
Permissions can assigned to a folder and inherited by the containing dashboards. An Access Control List (ACL) is used where |
||||
**Organization Role**, **Team** and Individual **User** can be assigned permissions. Read the |
||||
[Dashboard & Folder Permissions]({{< relref "administration/permissions.md#dashboard-folder-permissions" >}}) docs for more detail |
||||
on the permission system. |
||||
|
@ -0,0 +1,89 @@ |
||||
+++ |
||||
title = "Grafana with IIS Reverse Proxy on Windows" |
||||
type = "docs" |
||||
keywords = ["grafana", "tutorials", "proxy", "IIS", "windows"] |
||||
[menu.docs] |
||||
parent = "tutorials" |
||||
weight = 10 |
||||
+++ |
||||
|
||||
# How to Use IIS with URL Rewrite as a Reverse Proxy for Grafana on Windows |
||||
|
||||
If you want Grafana to be a subpath or subfolder under a website in IIS then the URL Rewrite module for ISS can be used to support this. |
||||
|
||||
Example: |
||||
|
||||
- Parent site: http://localhost:8080 |
||||
- Grafana: http://localhost:3000 |
||||
|
||||
Grafana as a subpath: http://localhost:8080/grafana |
||||
|
||||
## Setup |
||||
|
||||
If you have not already done it, then a requirement is to install URL Rewrite module for IIS. |
||||
|
||||
Download and install the URL Rewrite module for IIS: https://www.iis.net/downloads/microsoft/url-rewrite |
||||
|
||||
## Grafana Config |
||||
|
||||
The Grafana config can be set by creating a file named `custom.ini` in the `conf` subdirectory of your Grafana installation. See the [installation instructions](http://docs.grafana.org/installation/windows/#configure) for more details. |
||||
|
||||
Given that the subpath should be `grafana` and the parent site is `localhost:8080` then add this to the `custom.ini` config file: |
||||
|
||||
```bash |
||||
[server] |
||||
domain = localhost:8080 |
||||
root_url = %(protocol)s://%(domain)s:/grafana |
||||
``` |
||||
|
||||
Restart the Grafana server after changing the config file. |
||||
|
||||
## IIS Config |
||||
|
||||
1. Open the IIS Manager and click on the parent website |
||||
2. In the admin console for this website, double click on the Url Rewrite option: |
||||
{{< docs-imagebox img="/img/docs/tutorials/IIS_admin_console.png" max-width= "800px" >}} |
||||
|
||||
3. Click on the `Add Rule(s)...` action |
||||
4. Choose the Blank Rule template for an Inbound Rule |
||||
{{< docs-imagebox img="/img/docs/tutorials/IIS_add_inbound_rule.png" max-width= "800px" >}} |
||||
|
||||
5. Create an Inbound Rule for the parent website (localhost:8080 in this example) with the following settings: |
||||
- pattern: `grafana(/)?(.*)` |
||||
- check the `Ignore case` checkbox |
||||
- rewrite url set to `http://localhost:3000/{R:2}` |
||||
- check the `Append query string` checkbox |
||||
- check the `Stop processing of subsequent rules` checkbox |
||||
|
||||
{{< docs-imagebox img="/img/docs/tutorials/IIS_url_rewrite.png" max-width= "800px" >}} |
||||
|
||||
Finally, navigate to `http://localhost:8080/grafana` (replace `http://localhost:8080` with your parent domain) and you should come to the Grafana login page. |
||||
|
||||
## Troubleshooting |
||||
|
||||
### 404 error |
||||
|
||||
When navigating to the grafana url (`http://localhost:8080/grafana` in the example above) and a `HTTP Error 404.0 - Not Found` error is returned then either: |
||||
|
||||
- the pattern for the Inbound Rule is incorrect. Edit the rule, click on the `Test pattern...` button, test the part of the url after `http://localhost:8080/` and make sure it matches. For `grafana/login` the test should return 3 capture groups: {R:0}: `grafana` {R:1}: `/` and {R:2}: `login`. |
||||
- The `root_url` setting in the Grafana config file does not match the parent url with subpath. |
||||
|
||||
### Grafana Website only shows text with no images or css |
||||
|
||||
{{< docs-imagebox img="/img/docs/tutorials/IIS_proxy_error.png" max-width= "800px" >}} |
||||
|
||||
1. The `root_url` setting in the Grafana config file does not match the parent url with subpath. This could happen if the root_url is commented out by mistake (`;` is used for commenting out a line in .ini files): |
||||
|
||||
`; root_url = %(protocol)s://%(domain)s:/grafana` |
||||
|
||||
2. or if the subpath in the `root_url` setting does not match the subpath used in the pattern in the Inbound Rule in IIS: |
||||
|
||||
`root_url = %(protocol)s://%(domain)s:/grafana` |
||||
|
||||
pattern in Inbound Rule: `wrongsubpath(/)?(.*)` |
||||
|
||||
3. or if the Rewrite Url in the Inbound Rule is incorrect. |
||||
|
||||
The Rewrite Url should not include the subpath. |
||||
|
||||
The Rewrite Url should contain the capture group from the pattern matching that returns the part of the url after the subpath. The pattern used above returns 3 capture groups and the third one {R:2} returns the part of the url after `http://localhost:8080/grafana/`. |
@ -0,0 +1,10 @@ |
||||
[ |
||||
{ "version": "v5.1", "path": "/v5.1", "archived": false }, |
||||
{ "version": "v5.0", "path": "/", "archived": false, "current": true }, |
||||
{ "version": "v4.6", "path": "/v4.6", "archived": true }, |
||||
{ "version": "v4.5", "path": "/v4.5", "archived": true }, |
||||
{ "version": "v4.4", "path": "/v4.4", "archived": true }, |
||||
{ "version": "v4.3", "path": "/v4.3", "archived": true }, |
||||
{ "version": "v4.1", "path": "/v4.1", "archived": true }, |
||||
{ "version": "v3.1", "path": "/v3.1", "archived": true } |
||||
] |
@ -1,4 +1,4 @@ |
||||
{ |
||||
"stable": "4.6.2", |
||||
"testing": "4.6.2" |
||||
"stable": "5.0.0", |
||||
"testing": "5.0.0" |
||||
} |
||||
|
@ -0,0 +1,96 @@ |
||||
package api |
||||
|
||||
import ( |
||||
"testing" |
||||
|
||||
"github.com/grafana/grafana/pkg/api/dtos" |
||||
"github.com/grafana/grafana/pkg/bus" |
||||
m "github.com/grafana/grafana/pkg/models" |
||||
|
||||
. "github.com/smartystreets/goconvey/convey" |
||||
) |
||||
|
||||
func TestAlertingApiEndpoint(t *testing.T) { |
||||
Convey("Given an alert in a dashboard with an acl", t, func() { |
||||
|
||||
singleAlert := &m.Alert{Id: 1, DashboardId: 1, Name: "singlealert"} |
||||
|
||||
bus.AddHandler("test", func(query *m.GetAlertByIdQuery) error { |
||||
query.Result = singleAlert |
||||
return nil |
||||
}) |
||||
|
||||
viewerRole := m.ROLE_VIEWER |
||||
editorRole := m.ROLE_EDITOR |
||||
|
||||
aclMockResp := []*m.DashboardAclInfoDTO{} |
||||
bus.AddHandler("test", func(query *m.GetDashboardAclInfoListQuery) error { |
||||
query.Result = aclMockResp |
||||
return nil |
||||
}) |
||||
|
||||
bus.AddHandler("test", func(query *m.GetTeamsByUserQuery) error { |
||||
query.Result = []*m.Team{} |
||||
return nil |
||||
}) |
||||
|
||||
Convey("When user is editor and not in the ACL", func() { |
||||
Convey("Should not be able to pause the alert", func() { |
||||
cmd := dtos.PauseAlertCommand{ |
||||
AlertId: 1, |
||||
Paused: true, |
||||
} |
||||
postAlertScenario("When calling POST on", "/api/alerts/1/pause", "/api/alerts/:alertId/pause", m.ROLE_EDITOR, cmd, func(sc *scenarioContext) { |
||||
CallPauseAlert(sc) |
||||
So(sc.resp.Code, ShouldEqual, 403) |
||||
}) |
||||
}) |
||||
}) |
||||
|
||||
Convey("When user is editor and dashboard has default ACL", func() { |
||||
aclMockResp = []*m.DashboardAclInfoDTO{ |
||||
{Role: &viewerRole, Permission: m.PERMISSION_VIEW}, |
||||
{Role: &editorRole, Permission: m.PERMISSION_EDIT}, |
||||
} |
||||
|
||||
Convey("Should be able to pause the alert", func() { |
||||
cmd := dtos.PauseAlertCommand{ |
||||
AlertId: 1, |
||||
Paused: true, |
||||
} |
||||
postAlertScenario("When calling POST on", "/api/alerts/1/pause", "/api/alerts/:alertId/pause", m.ROLE_EDITOR, cmd, func(sc *scenarioContext) { |
||||
CallPauseAlert(sc) |
||||
So(sc.resp.Code, ShouldEqual, 200) |
||||
}) |
||||
}) |
||||
}) |
||||
}) |
||||
} |
||||
|
||||
func CallPauseAlert(sc *scenarioContext) { |
||||
bus.AddHandler("test", func(cmd *m.PauseAlertCommand) error { |
||||
return nil |
||||
}) |
||||
|
||||
sc.fakeReqWithParams("POST", sc.url, map[string]string{}).exec() |
||||
} |
||||
|
||||
func postAlertScenario(desc string, url string, routePattern string, role m.RoleType, cmd dtos.PauseAlertCommand, fn scenarioFunc) { |
||||
Convey(desc+" "+url, func() { |
||||
defer bus.ClearBusHandlers() |
||||
|
||||
sc := setupScenarioContext(url) |
||||
sc.defaultHandler = wrap(func(c *m.ReqContext) Response { |
||||
sc.context = c |
||||
sc.context.UserId = TestUserID |
||||
sc.context.OrgId = TestOrgID |
||||
sc.context.OrgRole = role |
||||
|
||||
return PauseAlert(c, cmd) |
||||
}) |
||||
|
||||
sc.m.Post(routePattern, sc.defaultHandler) |
||||
|
||||
fn(sc) |
||||
}) |
||||
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue