mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge branch 'master' of https://github.com/grafana/grafana
This commit is contained in:
commit
c9a69c3ed9
@ -9,8 +9,9 @@
|
||||
* **Elasticsearch**: Support to set Precision Threshold for Unique Count metric, closes [#4689](https://github.com/grafana/grafana/issues/4689)
|
||||
* **Navigation**: Add search to org swithcer, closes [#2609](https://github.com/grafana/grafana/issues/2609)
|
||||
* **Database**: Allow database config using one propertie, closes [#5456](https://github.com/grafana/grafana/pull/5456)
|
||||
* **Graphite**: Add support for groupByNode, closes [#5613](https://github.com/grafana/grafana/pull/5613)
|
||||
* **Graphite**: Add support for groupByNodes, closes [#5613](https://github.com/grafana/grafana/pull/5613)
|
||||
* **Influxdb**: Add support for elapsed(), closes [#5827](https://github.com/grafana/grafana/pull/5827)
|
||||
* **OpenTSDB**: Add support for explicitTags for OpenTSDB>=2.3, closes [#6360](https://github.com/grafana/grafana/pull/6361)
|
||||
* **OAuth**: Add support for generic oauth, closes [#4718](https://github.com/grafana/grafana/pull/4718)
|
||||
* **Cloudwatch**: Add support to expand multi select template variable, closes [#5003](https://github.com/grafana/grafana/pull/5003)
|
||||
* **Graph Panel**: Now supports flexible lower/upper bounds on Y-Max and Y-Min, PR [#5720](https://github.com/grafana/grafana/pull/5720)
|
||||
@ -27,6 +28,7 @@
|
||||
* **Graph panel**: Fixed problem with auto decimals on y axis when datamin=datamax, fixes [#6070](https://github.com/grafana/grafana/pull/6070)
|
||||
* **Snapshot**: Can view embedded panels/png rendered panels in snapshots without login, fixes [#3769](https://github.com/grafana/grafana/pull/3769)
|
||||
* **Elasticsearch**: Fix for query template variable when looking up terms without query, no longer relies on elasticsearch default field, fixes [#3887](https://github.com/grafana/grafana/pull/3887)
|
||||
* **Elasticsearch**: Fix for displaying IP address used in terms aggregations, fixes [#4393](https://github.com/grafana/grafana/pull/4393)
|
||||
* **PNG Rendering**: Fix for server side rendering when using auth proxy, fixes [#5906](https://github.com/grafana/grafana/pull/5906)
|
||||
|
||||
# 3.1.2 (unreleased)
|
||||
|
12
Gruntfile.js
12
Gruntfile.js
@ -12,11 +12,15 @@ module.exports = function (grunt) {
|
||||
platform: process.platform.replace('win32', 'windows'),
|
||||
};
|
||||
|
||||
if (process.platform.match(/^win/)) {
|
||||
config.arch = process.env.hasOwnProperty('ProgramFiles(x86)') ? 'x64' : 'x86';
|
||||
}
|
||||
if (grunt.option('arch')) {
|
||||
config.arch = grunt.option('arch');
|
||||
} else {
|
||||
config.arch = os.arch();
|
||||
|
||||
config.arch = grunt.option('arch') || os.arch();
|
||||
if (process.platform.match(/^win/)) {
|
||||
config.arch = process.env.hasOwnProperty('ProgramFiles(x86)') ? 'x64' : 'x86';
|
||||
}
|
||||
}
|
||||
|
||||
config.phjs = grunt.option('phjsToRelease');
|
||||
|
||||
|
18
Makefile
18
Makefile
@ -1,16 +1,28 @@
|
||||
all: deps build
|
||||
|
||||
deps:
|
||||
deps-go:
|
||||
go run build.go setup
|
||||
|
||||
deps-js:
|
||||
npm install
|
||||
|
||||
build:
|
||||
deps: deps-go deps-js
|
||||
|
||||
build-go:
|
||||
go run build.go build
|
||||
|
||||
build-js:
|
||||
npm run build
|
||||
|
||||
test:
|
||||
build: build-go build-js
|
||||
|
||||
test-go:
|
||||
go test -v ./pkg/...
|
||||
|
||||
test-js:
|
||||
npm test
|
||||
|
||||
test: test-go test-js
|
||||
|
||||
run:
|
||||
./bin/grafana-server
|
||||
|
18
README.md
18
README.md
@ -3,7 +3,7 @@
|
||||
[Website](http://grafana.org) |
|
||||
[Twitter](https://twitter.com/grafana) |
|
||||
[IRC](https://webchat.freenode.net/?channels=grafana) |
|
||||

|
||||
[](http://slack.raintank.io)
|
||||
[Slack](http://slack.raintank.io) |
|
||||
[Email](mailto:contact@grafana.org)
|
||||
|
||||
@ -74,7 +74,7 @@ Be sure to read the [getting started guide](http://docs.grafana.org/guides/getti
|
||||
|
||||
## Run from master
|
||||
If you want to build a package yourself, or contribute. Here is a guide for how to do that. You can always find
|
||||
the latest master builds [here](http://grafana.org/download/builds)
|
||||
the latest master builds [here](http://grafana.org/builds)
|
||||
|
||||
### Dependencies
|
||||
|
||||
@ -87,11 +87,11 @@ the latest master builds [here](http://grafana.org/download/builds)
|
||||
go get github.com/grafana/grafana
|
||||
```
|
||||
|
||||
Since imports of dependencies use the absolute path github.com/grafana/grafana within the $GOPATH,
|
||||
you will need to put your version of the code in $GOPATH/src/github.com/grafana/grafana to be able
|
||||
Since imports of dependencies use the absolute path `github.com/grafana/grafana` within the `$GOPATH`,
|
||||
you will need to put your version of the code in `$GOPATH/src/github.com/grafana/grafana` to be able
|
||||
to develop and build grafana on a cloned repository. To do so, you can clone your forked repository
|
||||
directly to $GOPATH/src/github.com/grafana or you can create a symbolic link from your version
|
||||
of the code to $GOPATH/src/github.com/grafana/grafana. The last options makes it possible to change
|
||||
directly to `$GOPATH/src/github.com/grafana` or you can create a symbolic link from your version
|
||||
of the code to `$GOPATH/src/github.com/grafana/grafana`. The last options makes it possible to change
|
||||
easily the grafana repository you want to build.
|
||||
```bash
|
||||
go get github.com/*your_account*/grafana
|
||||
@ -108,7 +108,7 @@ go run build.go build
|
||||
|
||||
### Building frontend assets
|
||||
|
||||
To build less to css for the frontend you will need a recent version of of **node (v4+)**,
|
||||
To build less to css for the frontend you will need a recent version of **node (v4+)**,
|
||||
npm (v2.5.0) and grunt (v0.4.5). Run the following:
|
||||
|
||||
```bash
|
||||
@ -135,7 +135,7 @@ bra run
|
||||
./bin/grafana-server
|
||||
```
|
||||
|
||||
Open grafana in your browser (default http://localhost:3000) and login with admin user (default user/pass = admin/admin).
|
||||
Open grafana in your browser (default: `http://localhost:3000`) and login with admin user (default: `user/pass = admin/admin`).
|
||||
|
||||
### Dev config
|
||||
|
||||
@ -147,7 +147,7 @@ You only need to add the options you want to override. Config files are applied
|
||||
3. custom.ini
|
||||
|
||||
## Create a pull request
|
||||
Before or after you create a pull request, sign the [contributor license agreement](http://grafana.org/docs/contributing/cla.html).
|
||||
Before or after you create a pull request, sign the [contributor license agreement](http://docs.grafana.org/project/cla/).
|
||||
|
||||
## Contribute
|
||||
If you have any idea for an improvement or found a bug do not hesitate to open an issue.
|
||||
|
@ -25,7 +25,13 @@ install:
|
||||
build_script:
|
||||
- go run build.go build
|
||||
- grunt release
|
||||
- go run build.go sha1-dist
|
||||
- cp dist/* .
|
||||
|
||||
artifacts:
|
||||
- path: dist/*
|
||||
- path: grafana-*windows-*.*
|
||||
name: binzip
|
||||
|
||||
deploy:
|
||||
- provider: Environment
|
||||
name: GrafanaBuildsS3
|
||||
|
43
build.go
43
build.go
@ -5,6 +5,7 @@ package main
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"crypto/sha1"
|
||||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
@ -85,17 +86,24 @@ func main() {
|
||||
case "package":
|
||||
grunt(gruntBuildArg("release")...)
|
||||
createLinuxPackages()
|
||||
sha1FilesInDist()
|
||||
|
||||
case "pkg-rpm":
|
||||
grunt(gruntBuildArg("release")...)
|
||||
createRpmPackages()
|
||||
sha1FilesInDist()
|
||||
|
||||
case "pkg-deb":
|
||||
grunt(gruntBuildArg("release")...)
|
||||
createDebPackages()
|
||||
sha1FilesInDist()
|
||||
|
||||
case "sha1-dist":
|
||||
sha1FilesInDist()
|
||||
|
||||
case "latest":
|
||||
makeLatestDistCopies()
|
||||
sha1FilesInDist()
|
||||
|
||||
case "clean":
|
||||
clean()
|
||||
@ -501,3 +509,38 @@ func md5File(file string) error {
|
||||
|
||||
return out.Close()
|
||||
}
|
||||
|
||||
func sha1FilesInDist() {
|
||||
filepath.Walk("./dist", func(path string, f os.FileInfo, err error) error {
|
||||
if strings.Contains(path, ".sha1") == false {
|
||||
sha1File(path)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
}
|
||||
|
||||
func sha1File(file string) error {
|
||||
fd, err := os.Open(file)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer fd.Close()
|
||||
|
||||
h := sha1.New()
|
||||
_, err = io.Copy(h, fd)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
out, err := os.Create(file + ".sha1")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
_, err = fmt.Fprintf(out, "%x\n", h.Sum(nil))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return out.Close()
|
||||
}
|
||||
|
@ -28,3 +28,4 @@ deployment:
|
||||
owner: grafana
|
||||
commands:
|
||||
- ./scripts/trigger_grafana_packer.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN}
|
||||
- ./scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN}
|
||||
|
@ -267,6 +267,7 @@ auto_sign_up = true
|
||||
[auth.ldap]
|
||||
enabled = false
|
||||
config_file = /etc/grafana/ldap.toml
|
||||
allow_sign_up = true
|
||||
|
||||
#################################### SMTP / Emailing #####################
|
||||
[smtp]
|
||||
@ -292,6 +293,9 @@ mode = console, file
|
||||
# Either "debug", "info", "warn", "error", "critical", default is "info"
|
||||
level = info
|
||||
|
||||
# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
|
||||
filters =
|
||||
|
||||
# For "console" mode only
|
||||
[log.console]
|
||||
level =
|
||||
@ -401,7 +405,8 @@ global_session = -1
|
||||
# \______(_______;;;)__;;;)
|
||||
|
||||
[alerting]
|
||||
enabled = true
|
||||
# Makes it possible to turn off alert rule execution.
|
||||
execute_alerts = true
|
||||
|
||||
#################################### Internal Grafana Metrics ############
|
||||
# Metrics available at HTTP API Url /api/metrics
|
||||
@ -421,7 +426,7 @@ url = https://grafana.net
|
||||
#################################### External Image Storage ##############
|
||||
[external_image_storage]
|
||||
# You can choose between (s3, webdav)
|
||||
provider = s3
|
||||
provider =
|
||||
|
||||
[external_image_storage.s3]
|
||||
bucket_url =
|
||||
|
@ -252,6 +252,7 @@
|
||||
[auth.ldap]
|
||||
;enabled = false
|
||||
;config_file = /etc/grafana/ldap.toml
|
||||
;allow_sign_up = true
|
||||
|
||||
#################################### SMTP / Emailing ##########################
|
||||
[smtp]
|
||||
@ -276,6 +277,10 @@
|
||||
# Either "trace", "debug", "info", "warn", "error", "critical", default is "info"
|
||||
;level = info
|
||||
|
||||
# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
|
||||
;filters =
|
||||
|
||||
|
||||
# For "console" mode only
|
||||
[log.console]
|
||||
;level =
|
||||
@ -350,7 +355,8 @@
|
||||
# \______(_______;;;)__;;;)
|
||||
|
||||
[alerting]
|
||||
;enabled = false
|
||||
# Makes it possible to turn off alert rule execution.
|
||||
;execute_alerts = true
|
||||
|
||||
#################################### Internal Grafana Metrics ##########################
|
||||
# Metrics available at HTTP API Url /api/metrics
|
||||
@ -375,8 +381,8 @@
|
||||
#################################### External image storage ##########################
|
||||
[external_image_storage]
|
||||
# Used for uploading images to public servers so they can be included in slack/email messages.
|
||||
# you can choose between (s3, webdav or internal)
|
||||
;provider = s3
|
||||
# you can choose between (s3, webdav)
|
||||
;provider =
|
||||
|
||||
[external_image_storage.s3]
|
||||
;bucket_url =
|
||||
|
@ -1,75 +0,0 @@
|
||||
bind-address = "0.0.0.0"
|
||||
|
||||
[logging]
|
||||
level = "debug"
|
||||
file = "/opt/influxdb/shared/data/influxdb.log" # stdout to log to standard out
|
||||
|
||||
[admin]
|
||||
port = 8083 # binding is disabled if the port isn't set
|
||||
assets = "/opt/influxdb/current/admin"
|
||||
|
||||
[api]
|
||||
port = 8086 # binding is disabled if the port isn't set
|
||||
|
||||
read-timeout = "5s"
|
||||
|
||||
[input_plugins]
|
||||
|
||||
[input_plugins.graphite]
|
||||
enabled = true
|
||||
port = 2004
|
||||
database = "graphite" # store graphite data in this database
|
||||
|
||||
|
||||
[raft]
|
||||
port = 8090
|
||||
dir = "/opt/influxdb/shared/data/raft"
|
||||
|
||||
[storage]
|
||||
dir = "/opt/influxdb/shared/data/db"
|
||||
# How many requests to potentially buffer in memory. If the buffer gets filled then writes
|
||||
# will still be logged and once the local storage has caught up (or compacted) the writes
|
||||
# will be replayed from the WAL
|
||||
write-buffer-size = 10000
|
||||
default-engine = "rocksdb"
|
||||
max-open-shards = 0
|
||||
point-batch-size = 100
|
||||
write-batch-size = 5000000
|
||||
retention-sweep-period = "10m"
|
||||
|
||||
[storage.engines.rocksdb]
|
||||
max-open-files = 1000
|
||||
lru-cache-size = "200m"
|
||||
|
||||
[storage.engines.leveldb]
|
||||
max-open-files = 1000
|
||||
lru-cache-size = "200m"
|
||||
|
||||
[cluster]
|
||||
protobuf_port = 8099
|
||||
protobuf_timeout = "2s" # the write timeout on the protobuf conn any duration parseable by time.ParseDuration
|
||||
protobuf_heartbeat = "200ms" # the heartbeat interval between the servers. must be parseable by time.ParseDuration
|
||||
protobuf_min_backoff = "1s" # the minimum backoff after a failed heartbeat attempt
|
||||
protobuf_max_backoff = "10s" # the maxmimum backoff after a failed heartbeat attempt
|
||||
write-buffer-size = 10000
|
||||
ax-response-buffer-size = 100000
|
||||
oncurrent-shard-query-limit = 10
|
||||
|
||||
[sharding]
|
||||
replication-factor = 1
|
||||
|
||||
[sharding.short-term]
|
||||
duration = "7d"
|
||||
split = 1
|
||||
|
||||
[sharding.long-term]
|
||||
duration = "30d"
|
||||
split = 1
|
||||
# split-random = "/^Hf.*/"
|
||||
|
||||
[wal]
|
||||
dir = "/opt/influxdb/shared/data/wal"
|
||||
flush-after = 1000 # the number of writes after which wal will be flushed, 0 for flushing on every write
|
||||
bookmark-after = 1000 # the number of writes after which a bookmark will be created
|
||||
index-after = 1000
|
||||
requests-per-logfile = 10000
|
@ -1,9 +1,12 @@
|
||||
influxdb:
|
||||
image: tutum/influxdb:0.12
|
||||
image: influxdb:latest
|
||||
container_name: influxdb
|
||||
ports:
|
||||
- "2004:2004"
|
||||
- "8083:8083"
|
||||
- "8086:8086"
|
||||
volumes:
|
||||
- ./blocks/influxdb/influxdb.conf:/etc/influxdb/influxdb.conf
|
||||
|
||||
fake-influxdb-data:
|
||||
image: grafana/fake-data-gen
|
||||
|
92
docker/blocks/influxdb/influxdb.conf
Normal file
92
docker/blocks/influxdb/influxdb.conf
Normal file
@ -0,0 +1,92 @@
|
||||
reporting-disabled = false
|
||||
|
||||
[meta]
|
||||
# Where the metadata/raft database is stored
|
||||
dir = "/var/lib/influxdb/meta"
|
||||
|
||||
retention-autocreate = true
|
||||
|
||||
# If log messages are printed for the meta service
|
||||
logging-enabled = true
|
||||
pprof-enabled = false
|
||||
|
||||
# The default duration for leases.
|
||||
lease-duration = "1m0s"
|
||||
|
||||
[data]
|
||||
# Controls if this node holds time series data shards in the cluster
|
||||
enabled = true
|
||||
|
||||
dir = "/var/lib/influxdb/data"
|
||||
|
||||
# These are the WAL settings for the storage engine >= 0.9.3
|
||||
wal-dir = "/var/lib/influxdb/wal"
|
||||
wal-logging-enabled = true
|
||||
|
||||
|
||||
[coordinator]
|
||||
write-timeout = "10s"
|
||||
max-concurrent-queries = 0
|
||||
query-timeout = "0"
|
||||
log-queries-after = "0"
|
||||
max-select-point = 0
|
||||
max-select-series = 0
|
||||
max-select-buckets = 0
|
||||
|
||||
[retention]
|
||||
enabled = true
|
||||
check-interval = "30m"
|
||||
|
||||
[shard-precreation]
|
||||
enabled = true
|
||||
check-interval = "10m"
|
||||
advance-period = "30m"
|
||||
|
||||
[monitor]
|
||||
store-enabled = true # Whether to record statistics internally.
|
||||
store-database = "_internal" # The destination database for recorded statistics
|
||||
store-interval = "10s" # The interval at which to record statistics
|
||||
|
||||
[admin]
|
||||
enabled = true
|
||||
bind-address = ":8083"
|
||||
https-enabled = false
|
||||
https-certificate = "/etc/ssl/influxdb.pem"
|
||||
|
||||
[http]
|
||||
enabled = true
|
||||
bind-address = ":8086"
|
||||
auth-enabled = true
|
||||
log-enabled = true
|
||||
write-tracing = false
|
||||
pprof-enabled = false
|
||||
https-enabled = false
|
||||
https-certificate = "/etc/ssl/influxdb.pem"
|
||||
### Use a separate private key location.
|
||||
# https-private-key = ""
|
||||
max-row-limit = 10000
|
||||
realm = "InfluxDB"
|
||||
|
||||
unix-socket-enabled = false # enable http service over unix domain socket
|
||||
# bind-socket = "/var/run/influxdb.sock"
|
||||
|
||||
[subscriber]
|
||||
enabled = true
|
||||
|
||||
[[graphite]]
|
||||
enabled = false
|
||||
|
||||
[[collectd]]
|
||||
enabled = false
|
||||
|
||||
[[opentsdb]]
|
||||
enabled = false
|
||||
|
||||
[[udp]]
|
||||
enabled = false
|
||||
|
||||
[continuous_queries]
|
||||
log-enabled = true
|
||||
enabled = true
|
||||
# run-interval = "1s" # interval for how often continuous queries will be checked if they need to run
|
||||
|
@ -1,25 +1,12 @@
|
||||
FROM grafana/docs-base:latest
|
||||
|
||||
# TODO: need the full repo source to get the git version info
|
||||
COPY . /src
|
||||
# to get the git info for this repo
|
||||
# COPY config.toml /site
|
||||
|
||||
# Reset the /docs dir so we can replace the theme meta with the new repo's git info
|
||||
RUN git reset --hard
|
||||
RUN rm -rf /site/content/*
|
||||
|
||||
# Then copy the desired docs into the /docs/sources/ dir
|
||||
COPY ./sources/ /docs/sources
|
||||
COPY ./sources /site/content/
|
||||
|
||||
COPY ./VERSION /docs/VERSION
|
||||
COPY awsconfig /site
|
||||
|
||||
COPY ./changed-files /docs/changed-files
|
||||
|
||||
# adding the image spec will require Docker 1.5 and `docker build -f docs/Dockerfile .`
|
||||
#COPY ./image/spec/v1.md /docs/sources/reference/image-spec-v1.md
|
||||
|
||||
# TODO: don't do this - look at merging the yml file in build.sh
|
||||
COPY ./mkdocs.yml /docs/mkdocs.yml
|
||||
|
||||
COPY ./s3_website.json /docs/s3_website.json
|
||||
|
||||
# Then build everything together, ready for mkdocs
|
||||
RUN /docs/build.sh
|
||||
VOLUME ["/site/content"]
|
||||
|
@ -1,28 +1,21 @@
|
||||
.PHONY: all binary build cross default docs docs-build docs-shell shell test test-unit test-integration test-integration-cli test-docker-py validate
|
||||
|
||||
# env vars passed through directly to Docker's build scripts
|
||||
# to allow things like `make DOCKER_CLIENTONLY=1 binary` easily
|
||||
# `docs/sources/contributing/devenvironment.md ` and `project/PACKAGERS.md` have some limited documentation of some of these
|
||||
DOCKER_ENVS := \
|
||||
-e BUILDFLAGS \
|
||||
-e DOCKER_CLIENTONLY \
|
||||
-e DOCKER_EXECDRIVER \
|
||||
-e DOCKER_GRAPHDRIVER \
|
||||
-e TESTDIRS \
|
||||
-e TESTFLAGS \
|
||||
-e TIMEOUT
|
||||
# note: we _cannot_ add "-e DOCKER_BUILDTAGS" here because even if it's unset in the shell, that would shadow the "ENV DOCKER_BUILDTAGS" set in our Dockerfile, which is very important for our official builds
|
||||
|
||||
# to allow `make DOCSDIR=docs docs-shell` (to create a bind mount in docs)
|
||||
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
|
||||
.PHONY: all default docs docs-build docs-shell shell test
|
||||
# to allow `make DOCSDIR=1 docs-shell` (to create a bind mount in docs)
|
||||
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR):/docs/content/grafana/)
|
||||
|
||||
# to allow `make DOCSPORT=9000 docs`
|
||||
DOCSPORT := 8180
|
||||
DOCSPORT := 3004
|
||||
|
||||
# Get the IP ADDRESS
|
||||
DOCKER_IP=$(shell python -c "import urlparse ; print urlparse.urlparse('$(DOCKER_HOST)').hostname or ''")
|
||||
HUGO_BASE_URL=$(shell test -z "$(DOCKER_IP)" && echo localhost || echo "$(DOCKER_IP)")
|
||||
HUGO_BIND_IP=0.0.0.0
|
||||
|
||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||
DOCKER_DOCS_IMAGE := grafana-docs-base$(if $(GIT_BRANCH),:$(GIT_BRANCH))
|
||||
GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g")
|
||||
DOCKER_DOCS_IMAGE := grafana/grafana-docs
|
||||
|
||||
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
|
||||
SOURCES_HOST_DIR := "$(shell pwd)/sources"
|
||||
|
||||
# for some docs workarounds (see below in "docs-build" target)
|
||||
GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
@ -30,21 +23,28 @@ GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
default: docs
|
||||
|
||||
docs: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" mkdocs serve
|
||||
$(DOCKER_RUN_DOCS) -p 3004:3004 -p 3005:3005 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt && grunt connect --port=3004"
|
||||
|
||||
docs-watch: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p 3004:3004 -p 3005:3005 -v $(SOURCES_HOST_DIR):/site/content -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs && grunt connect --port=3004 & grunt watch --port=3004 --env=dev-docs"
|
||||
|
||||
docs-watch-mac: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p 3004:3004 -p 3005:3005 -v $(SOURCES_HOST_DIR):/site/content -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs-mac && grunt connect --port=3004 & grunt watch --port=3004 --env=dev-docs-mac"
|
||||
|
||||
publish: docs-build
|
||||
$(DOCKER_RUN_DOCS) "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh staging-docs v3.1"
|
||||
|
||||
publish-prod: docs-build
|
||||
$(DOCKER_RUN_DOCS) "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh prod-docs root"
|
||||
|
||||
docs-draft: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --buildDrafts="true" --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
|
||||
|
||||
docs-shell: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash
|
||||
|
||||
docs-release: docs-build
|
||||
$(DOCKER_RUN_DOCS) -e OPTIONS -e BUILD_ROOT -e DISTRIBUTION_ID \
|
||||
-v $(CURDIR)/awsconfig:/docs/awsconfig \
|
||||
"$(DOCKER_DOCS_IMAGE)" ./release.sh
|
||||
|
||||
docs-test: docs-build
|
||||
$(DOCKER_RUN_DOCS) "$(DOCKER_DOCS_IMAGE)" ./test.sh
|
||||
test: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)"
|
||||
|
||||
docs-build:
|
||||
git fetch https://github.com/grafana/grafana.git docs-2.6 && git diff --name-status FETCH_HEAD...HEAD -- . > changed-files
|
||||
echo "$(GIT_BRANCH)" > GIT_BRANCH
|
||||
echo "$(GITCOMMIT)" > GITCOMMIT
|
||||
docker build -t "$(DOCKER_DOCS_IMAGE)" .
|
||||
|
70
docs/config.toml
Normal file
70
docs/config.toml
Normal file
@ -0,0 +1,70 @@
|
||||
baseurl = "http://localhost:3002/"
|
||||
languageCode = "en-us"
|
||||
title = "Grafana Docs"
|
||||
canonifyurls = false
|
||||
relativeURLs = false
|
||||
verbose = true
|
||||
enableRobotsTXT = true
|
||||
disableSitemap = false
|
||||
disableRSS = true
|
||||
|
||||
[[menu.top]]
|
||||
name = "Docs"
|
||||
url = ""
|
||||
weight = 1
|
||||
|
||||
[[menu.top]]
|
||||
name = "Community"
|
||||
url = "/community"
|
||||
weight = 2
|
||||
|
||||
[[menu.top]]
|
||||
name = "Support"
|
||||
url = "/support"
|
||||
weight = 3
|
||||
|
||||
[[menu.top]]
|
||||
name = "Plugins"
|
||||
url = "https://grafana.net/plugins"
|
||||
weight = 4
|
||||
|
||||
[[menu.top]]
|
||||
name = "Dashboards"
|
||||
url = "https://grafana.net/dashboards"
|
||||
weight = 5
|
||||
|
||||
[[menu.top]]
|
||||
name = "Hosting"
|
||||
url = "/hosting"
|
||||
weight = 6
|
||||
|
||||
[[menu.top]]
|
||||
name = "Github"
|
||||
url = "https://github.com/grafana/grafana"
|
||||
weight = 7
|
||||
|
||||
## Main
|
||||
[[menu.main]]
|
||||
name = "Feature Gallery"
|
||||
url = "/features"
|
||||
weight = 1
|
||||
|
||||
[[menu.main]]
|
||||
name = "Live Demo"
|
||||
url = "http://play.grafana.org"
|
||||
weight = 2
|
||||
|
||||
[[menu.main]]
|
||||
name = "Download"
|
||||
url = "/download"
|
||||
weight = 3
|
||||
|
||||
[[menu.main]]
|
||||
name = "Blog"
|
||||
url = "/blog"
|
||||
weight = 4
|
||||
|
||||
|
||||
|
||||
|
||||
|
11
docs/sources/administration/index.md
Normal file
11
docs/sources/administration/index.md
Normal file
@ -0,0 +1,11 @@
|
||||
+++
|
||||
title = "Administration"
|
||||
description = "Administration"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Administration"
|
||||
identifier = "admin"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
|
@ -1,28 +1,34 @@
|
||||
---
|
||||
page_title: Alerting
|
||||
page_description: Alerting for Grafana
|
||||
page_keywords: alerting, grafana, plugins, documentation
|
||||
---
|
||||
|
||||
# Alerting
|
||||
|
||||
> Alerting is still in very early development. Please be aware.
|
||||
|
||||
The roadmap for alerting in Grafana have been changing rapidly during last 2-3 months. So make sure you follow the disucssion in the [alerting issue](https://github.com/grafana/grafana/issues/2209).
|
||||
|
||||
## Introduction
|
||||
|
||||
> Alerting is turned off by default and have to be enabled in the config file.
|
||||
|
||||
Grafana lets you define alert rules based on metrics queries on dashboards. Every alert is connected to a panel and when ever the query for the panel is updated the alerting rule is also updated.
|
||||
So far only the graph panel supports alerting. To enable alerting for a panel go to the alerting tab and press 'Create alert' button.
|
||||
|
||||
## Alert status page
|
||||
|
||||
You can overview all your current alerts on the alert stats page at /alerting
|
||||
|
||||
## Alert notifications
|
||||
|
||||
When an alert is triggered it goes to the notification handler who takes care of sending emails or push data as webhooks.
|
||||
The alert notifications can be configured on /alerting/notifications
|
||||
|
||||
<!--- +++ --->
|
||||
<!--- title = "Alerting" --->
|
||||
<!--- description = "Alerting" --->
|
||||
<!--- keywords = ["grafana", "alerting", "guide"] --->
|
||||
<!--- type = "docs" --->
|
||||
<!--- [menu.docs] --->
|
||||
<!--- name = "Alerting" --->
|
||||
<!--- identifier = "alerting" --->
|
||||
<!--- parent = "features" --->
|
||||
<!--- weight = 6 --->
|
||||
<!--- +++ --->
|
||||
<!--- --->
|
||||
<!--- # Alerting --->
|
||||
<!--- --->
|
||||
<!--- > Alerting is still in very early development. Please be aware. --->
|
||||
<!--- --->
|
||||
<!--- The roadmap for alerting in Grafana have been changing rapidly during last 2-3 months. So make sure you follow the disucssion in the [alerting issue](https://github.com/grafana/grafana/issues/2209). --->
|
||||
<!--- --->
|
||||
<!--- ## Introduction --->
|
||||
<!--- --->
|
||||
<!--- > Alerting is turned off by default and have to be enabled in the config file. --->
|
||||
<!--- --->
|
||||
<!--- Grafana lets you define alert rules based on metrics queries on dashboards. Every alert is connected to a panel and when ever the query for the panel is updated the alerting rule is also updated. --->
|
||||
<!--- So far only the graph panel supports alerting. To enable alerting for a panel go to the alerting tab and press 'Create alert' button. --->
|
||||
<!--- --->
|
||||
<!--- ## Alert status page --->
|
||||
<!--- --->
|
||||
<!--- You can overview all your current alerts on the alert stats page at /alerting --->
|
||||
<!--- --->
|
||||
<!--- ## Alert notifications --->
|
||||
<!--- --->
|
||||
<!--- When an alert is triggered it goes to the notification handler who takes care of sending emails or push data as webhooks. --->
|
||||
<!--- The alert notifications can be configured on /alerting/notifications --->
|
||||
<!--- --->
|
||||
|
21
docs/sources/archive.md
Normal file
21
docs/sources/archive.md
Normal file
@ -0,0 +1,21 @@
|
||||
+++
|
||||
title = "Docs Archive"
|
||||
keywords = ["grafana", "archive", "documentation", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Docs Archive"
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
# Docs Archive
|
||||
|
||||
Here you can find links to older versions of the documentation that might be better suited for your version
|
||||
of Grafana.
|
||||
|
||||
- [Latest](/)
|
||||
- [Version 3.1](/v3.1)
|
||||
- [Version 3.0](/v3.0)
|
||||
- [Version 2.6](/v2.6)
|
||||
- [Version 2.5](/v2.5)
|
||||
- [Version 2.1](/v2.1)
|
||||
- [Version 2.0](/v2.0)
|
@ -1,16 +1,22 @@
|
||||
----
|
||||
page_title: Cloudwatch
|
||||
page_description: Cloudwatch grafana datasource documentation
|
||||
page_keywords: Cloudwatch, grafana, documentation, datasource, docs
|
||||
---
|
||||
+++
|
||||
title = "AWS CloudWatch"
|
||||
description = "Guide for using CloudWatch in Grafana"
|
||||
keywords = ["grafana", "cloudwatch", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "AWS Cloudwatch"
|
||||
identifier = "cloudwatch"
|
||||
parent = "datasources"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
# CloudWatch
|
||||
# Using AWS CloudWatch in Grafana
|
||||
|
||||
Grafana ships with built in support for CloudWatch. You just have to add it as a data source and you will
|
||||
be ready to build dashboards for you CloudWatch metrics.
|
||||
|
||||
## Adding the data source
|
||||

|
||||

|
||||
|
||||
1. Open the side menu by clicking the the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
@ -52,7 +58,7 @@ Example content:
|
||||
|
||||
## Metric Query Editor
|
||||
|
||||

|
||||

|
||||
|
||||
You need to specify a namespace, metric, at least one stat, and at least one dimension.
|
||||
|
||||
@ -93,7 +99,7 @@ Example `ec2_instance_attribute()` query
|
||||
|
||||
ec2_instance_attribute(us-east-1, InstanceId, { "tag:Environment": [ "production" ] })
|
||||
|
||||

|
||||

|
||||
|
||||
## Cost
|
||||
|
||||
|
@ -1,17 +1,23 @@
|
||||
----
|
||||
page_title: Elasticsearch
|
||||
page_description: Elasticsearch grafana datasource documentation
|
||||
page_keywords: Elasticsearch, grafana, kibana, documentation, datasource, docs
|
||||
---
|
||||
+++
|
||||
title = "Using Elasticsearch in Grafana"
|
||||
description = "Guide for using Elasticsearch in Grafana"
|
||||
keywords = ["grafana", "elasticsearch", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Elasticsearch"
|
||||
parent = "datasources"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# Elasticsearch
|
||||
# Using Elasticsearch in Grafana
|
||||
|
||||
Grafana ships with advanced support for Elasticsearch. You can do many types of
|
||||
simple or complex elasticsearch queries to visualize logs or metrics stored in elasticsearch. You can
|
||||
also annotate your graphs with log events stored in elasticsearch.
|
||||
|
||||
## Adding the data source
|
||||

|
||||
|
||||

|
||||
|
||||
1. Open the side menu by clicking the the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
@ -41,14 +47,14 @@ Elasticsearch from the browser. You do this by specifying these to options in yo
|
||||
|
||||
### Index settings
|
||||
|
||||

|
||||

|
||||
|
||||
Here you can specify a default for the `time field` and specify the name of your elasticsearch index. You can use
|
||||
a time pattern for the index name or a wildcard.
|
||||
|
||||
## Metric Query editor
|
||||
|
||||

|
||||

|
||||
|
||||
The Elasticsearch query editor allows you to select multiple metrics and group by multiple terms or filters. Use the plus and minus icons to the right to add / remove
|
||||
metrics or group bys. Some metrics and group by have options, click the option text to expand the the row to view and edit metric or group by options.
|
||||
@ -60,7 +66,7 @@ If you have Elasticsearch 2.x and Grafana 2.6 or above then you can use pipeline
|
||||
to hide metrics from appearing in the graph. This is useful for metrics you only have in the query to be used
|
||||
in a pipeline metric.
|
||||
|
||||

|
||||

|
||||
|
||||
## Templating
|
||||
|
||||
@ -86,7 +92,3 @@ The Elasticsearch datasource supports two types of queries you can use to fill t
|
||||
Use lucene format.
|
||||
|
||||
|
||||
|
||||
## Annotations
|
||||
TODO
|
||||
|
||||
|
@ -1,17 +1,23 @@
|
||||
----
|
||||
page_title: Graphite query guide
|
||||
page_description: Graphite query guide
|
||||
page_keywords: grafana, graphite, metrics, query, documentation
|
||||
---
|
||||
+++
|
||||
title = "Using Graphite in Grafana"
|
||||
description = "Guide for using graphite in Grafana"
|
||||
keywords = ["grafana", "graphite", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Graphite"
|
||||
identifier = "graphite"
|
||||
parent = "datasources"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Graphite
|
||||
# Using Graphite in Grafana
|
||||
|
||||
Grafana has an advanced Graphite query editor that lets you quickly navigate the metric space, add functions,
|
||||
change function parameters and much more. The editor can handle all types of graphite queries. It can even handle complex nested
|
||||
queries through the use of query references.
|
||||
|
||||
## Adding the data source
|
||||

|
||||

|
||||
|
||||
1. Open the side menu by clicking the the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
@ -40,7 +46,7 @@ Direct access is still supported because in some cases it may be useful to acces
|
||||
Click the ``Select metric`` link to start navigating the metric space. One you start you can continue using the mouse
|
||||
or keyboard arrow keys. You can select a wildcard and still continue.
|
||||
|
||||

|
||||

|
||||
|
||||
### Functions
|
||||
Click the plus icon to the right to add a function. You can search for the function or select it from the menu. Once
|
||||
@ -48,13 +54,13 @@ a function is selected it will be added and your focus will be in the text box o
|
||||
a parameter just click on it and it will turn into a text box. To delete a function click the function name followed
|
||||
by the x icon.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
### Optional parameters
|
||||
Some functions like aliasByNode support an optional second argument. To add this parameter specify for example 3,-2 as the first parameter and the function editor will adapt and move the -2 to a second parameter. To remove the second optional parameter just click on it and leave it blank and the editor will remove it.
|
||||
|
||||

|
||||

|
||||
|
||||
## Point consolidation
|
||||
|
||||
@ -74,7 +80,7 @@ values that exists in the wildcard position.
|
||||
You can also create nested variables that use other variables in their definition. For example
|
||||
`apps.$app.servers.*` uses the variable `$app` in its query definition.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
## Query Reference
|
||||
|
11
docs/sources/datasources/index.md
Normal file
11
docs/sources/datasources/index.md
Normal file
@ -0,0 +1,11 @@
|
||||
+++
|
||||
title = "Data Sources"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Data Sources"
|
||||
identifier = "datasources"
|
||||
parent = "features"
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
|
@ -1,15 +1,20 @@
|
||||
----
|
||||
page_title: InfluxDB query guide
|
||||
page_description: InfluxDB query guide
|
||||
page_keywords: grafana, influxdb, metrics, query, documentation
|
||||
---
|
||||
+++
|
||||
title = "Using InfluxDB in Grafana"
|
||||
description = "Guide for using InfluxDB in Grafana"
|
||||
keywords = ["grafana", "influxdb", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "InfluxDB"
|
||||
parent = "datasources"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# InfluxDB
|
||||
# Using InfluxDB in Grafana
|
||||
|
||||
Grafana ships with very a feature data source plugin for InfluxDB. Supporting a feature rich query editor, annotation and templating queries.
|
||||
|
||||
## Adding the data source
|
||||

|
||||

|
||||
|
||||
1. Open the side menu by clicking the the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
@ -36,7 +41,7 @@ Password | Database user's password
|
||||
|
||||
## Query Editor
|
||||
|
||||

|
||||

|
||||
|
||||
You find the InfluxDB editor in the metrics tab in Graph or Singlestat panel's edit mode. You enter edit mode by clicking the
|
||||
panel title, then edit. The editor allows you to select metrics and tags.
|
||||
@ -55,7 +60,7 @@ In the `SELECT` row you can specify what fields and functions you want to use. I
|
||||
group by time you need an aggregation function. Some functions like derivative require an aggregation function.
|
||||
|
||||
The editor tries simplify and unify this part of the query. For example:
|
||||

|
||||

|
||||
|
||||
The above will generate the following InfluxDB `SELECT` clause:
|
||||
|
||||
@ -88,7 +93,7 @@ You can switch to raw query mode by clicking hamburger icon and then `Switch edi
|
||||
|
||||
### Table query / raw data
|
||||
|
||||

|
||||

|
||||
|
||||
You can remove the group by time by clicking on the `time` part and then the `x` icon. You can
|
||||
change the option `Format As` to `Table` if you want to show raw data in the `Table` panel.
|
||||
@ -113,7 +118,7 @@ SHOW TAG VALUES WITH KEY = "hostname" WHERE region =~ /$region/
|
||||
|
||||
> Always you `regex values` or `regex wildcard` for All format or multi select format.
|
||||
|
||||

|
||||

|
||||
|
||||
## Annotations
|
||||
Annotations allows you to overlay rich event information on top of graphs.
|
||||
|
@ -8,10 +8,10 @@ page_keywords: grafana, kairosdb, documentation
|
||||
Grafana v2.1 brings initial support for KairosDB Datasources. While the process of adding the datasource is similar to adding a Graphite or OpenTSDB datasource type, Kairos DB does have a few different options for building queries.
|
||||
|
||||
## Adding the data source to Grafana
|
||||

|
||||

|
||||
|
||||
1. Open the side menu by clicking the the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
1. Open the side menu by clicking the the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
|
||||
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
|
||||
|
||||
@ -30,7 +30,7 @@ Access | Proxy = access via Grafana backend, Direct = access directly from brows
|
||||
## Query editor
|
||||
Open a graph in edit mode by click the title.
|
||||
|
||||

|
||||

|
||||
|
||||
For details on KairosDB metric queries checkout the official.
|
||||
- [Query Metrics - KairosDB 0.9.4 documentation](http://kairosdb.github.io/kairosdocs/restapi/QueryMetrics.html).
|
||||
|
@ -1,14 +1,20 @@
|
||||
---
|
||||
page_title: OpenTSDB Guide
|
||||
page_description: OpenTSDB guide for Grafana
|
||||
page_keywords: grafana, opentsdb, documentation
|
||||
---
|
||||
+++
|
||||
title = "Using OpenTSDB in Grafana"
|
||||
description = "Guide for using OpenTSDB in Grafana"
|
||||
keywords = ["grafana", "opentsdb", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "OpenTSDB"
|
||||
parent = "datasources"
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
# Using OpenTSDB in Grafana
|
||||
|
||||
{{< docs-imagebox img="img/docs/v2/add_OpenTSDB.png" max-width="14rem" >}}
|
||||
|
||||
# OpenTSDB Guide
|
||||
The newest release of Grafana adds additional functionality when using an OpenTSDB Data source.
|
||||
|
||||

|
||||
|
||||
1. Open the side menu by clicking the the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
|
||||
@ -31,7 +37,7 @@ Open a graph in edit mode by click the title. Query editor will differ if the da
|
||||
|
||||
> Note: While using Opentsdb 2.2 datasource, make sure you use either Filters or Tags as they are mutually exclusive. If used together, might give you weird results.
|
||||
|
||||

|
||||

|
||||
|
||||
### Auto complete suggestions
|
||||
As soon as you start typing metric names, tag names and tag values , you should see highlighted auto complete suggestions for them.
|
||||
@ -55,7 +61,7 @@ If you do not see template variables being populated in `Preview of values` sect
|
||||
|
||||
One template variable can be used to filter tag values for another template varible. Very importantly, the order of the parameters matter in tag_values function. First parameter is the metric name, second parameter is the tag key for which you need to find tag values, and after that all other dependent template variables. Some examples are mentioned below to make nested template queries work successfully.
|
||||
|
||||
tag_values(cpu, hostname, env=$env) // return tag values for cpu metric, selected env tag value and tag key hostname
|
||||
tag_values(cpu, hostname, env=$env) // return tag values for cpu metric, selected env tag value and tag key hostname
|
||||
tag_values(cpu, hostanme, env=$env, region=$region) // return tag values for cpu metric, selected env tag value, selected region tag value and tag key hostname
|
||||
|
||||
> Note: This is required for the OpenTSDB `lookup` api to work.
|
||||
|
@ -1,17 +1,24 @@
|
||||
----
|
||||
page_title: Prometheus query guide
|
||||
page_description: Prometheus query guide
|
||||
page_keywords: grafana, prometheus, metrics, query, documentation
|
||||
---
|
||||
+++
|
||||
title = "Using Prometheus in Grafana"
|
||||
description = "Guide for using Prometheus in Grafana"
|
||||
keywords = ["grafana", "prometheus", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Prometheus"
|
||||
parent = "datasources"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
|
||||
# Using Prometheus in Grafana
|
||||
|
||||
# Prometheus
|
||||
Grafana includes support for Prometheus Datasources. While the process of adding the datasource is similar to adding a Graphite or OpenTSDB datasource type, Prometheus does have a few different options for building queries.
|
||||
|
||||
## Adding the data source to Grafana
|
||||

|
||||

|
||||
|
||||
1. Open the side menu by clicking the the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
1. Open the side menu by clicking the the Grafana icon in the top header.
|
||||
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
|
||||
|
||||
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
|
||||
|
||||
@ -35,7 +42,7 @@ Password | Database user's password
|
||||
## Query editor
|
||||
Open a graph in edit mode by click the title.
|
||||
|
||||

|
||||

|
||||
|
||||
For details on Prometheus metric queries check out the Prometheus documentation
|
||||
- [Query Metrics - Prometheus documentation](http://prometheus.io/docs/querying/basics/).
|
||||
@ -65,4 +72,4 @@ label_values(hostname)
|
||||
|
||||
You can also use raw queries & regular expressions to extract anything you might need.
|
||||
|
||||

|
||||

|
||||
|
8
docs/sources/features/dashboard/index.md
Normal file
8
docs/sources/features/dashboard/index.md
Normal file
@ -0,0 +1,8 @@
|
||||
+++
|
||||
title = "Dashboard Features"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
identifier = "dashboard_features"
|
||||
parent = "features"
|
||||
weight = 4
|
||||
+++
|
11
docs/sources/features/index.md
Normal file
11
docs/sources/features/index.md
Normal file
@ -0,0 +1,11 @@
|
||||
+++
|
||||
title = "Beginner Guides"
|
||||
description = "Beginner guides"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Features"
|
||||
identifier = "features"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
|
8
docs/sources/features/panels/index.md
Normal file
8
docs/sources/features/panels/index.md
Normal file
@ -0,0 +1,8 @@
|
||||
+++
|
||||
title = "Panels"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "features"
|
||||
identifier = "panels"
|
||||
weight = 3
|
||||
+++
|
9
docs/sources/features/whatsnew/index.md
Normal file
9
docs/sources/features/whatsnew/index.md
Normal file
@ -0,0 +1,9 @@
|
||||
+++
|
||||
title = "What's New in Grafana"
|
||||
[menu.docs]
|
||||
name = "What's New In Grafana"
|
||||
identifier = "whatsnew"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
|
@ -1,27 +1,31 @@
|
||||
----
|
||||
page_title: Graphite query guide
|
||||
page_description: Graphite query guide
|
||||
page_keywords: grafana, graphite, metrics, query, documentation
|
||||
---
|
||||
+++
|
||||
title = "Basic Concepts"
|
||||
description = "Grafana intro and concept guide"
|
||||
keywords = ["grafana", "intro", "guide", "concepts"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Basic Concepts"
|
||||
identifier = "basic_concepts"
|
||||
parent = "guides"
|
||||
+++
|
||||
|
||||
# Basic Concepts
|
||||
|
||||
This document is a “bottom up” introduction to basic concepts in Grafana, and can be used as a starting point to get familiar with core features.
|
||||
|
||||
### Data Source
|
||||
Grafana supports many different storage backends for your time series data (Data Source). Each Data Source has a specific Query Editor that is customized for the features and capabilities that the particular Data Source exposes.
|
||||
|
||||
### ** Data Source **
|
||||
Grafana supports many different storage backends for your time series data (Data Source). Each Data Source has a specific Query Editor that is customized for the features and capabilities that the particular Data Source exposes.
|
||||
|
||||
The following datasources are officially supported: [Graphite](/datasources/graphite/), [InfluxDB](/datasources/influxdb/), [OpenTSDB](/datasources/opentsdb/), and [KairosDB](/datasources/kairosdb)
|
||||
The following datasources are officially supported: [Graphite](/datasources/graphite/), [InfluxDB](/datasources/influxdb/), [OpenTSDB](/datasources/opentsdb/), [Prometheus](/datasources/prometheus/), [Elasticsearch](/datasources/elasticsearch/), [CloudWatch](/datasources/cloudwatch/), and [KairosDB](/datasources/kairosdb)
|
||||
|
||||
The query language and capabilities of each Data Source are obviously very different. You can combine data from multiple Data Sources onto a single Dashboard, but each Panel is tied to a specific Data Source that belongs to a particular Organization.
|
||||
|
||||
### ** Organization **
|
||||
### Organization
|
||||
Grafana supports multiple organizations in order to support a wide variety of deployment models, including using a single Grafana instance to provide service to multiple potentially untrusted Organizations.
|
||||
|
||||
In many cases, Grafana will be deployed with a single Organization.
|
||||
|
||||
Each Organization can have one or more Data Sources.
|
||||
Each Organization can have one or more Data Sources.
|
||||
|
||||
All Dashboards are owned by a particular Organization.
|
||||
|
||||
@ -29,20 +33,20 @@ All Dashboards are owned by a particular Organization.
|
||||
|
||||
For more details on the user model for Grafana, please refer to [Admin](/reference/admin/)
|
||||
|
||||
### ** User **
|
||||
A User is a named account in Grafana. A user can belong to one or more Organizations, and can be assigned different levels of privileges through roles.
|
||||
### User
|
||||
A User is a named account in Grafana. A user can belong to one or more Organizations, and can be assigned different levels of privileges through roles.
|
||||
|
||||
Grafana supports a wide variety of internal and external ways for Users to authenticate themselves. These include from its own integrated database, from an external SQL server, or from an external LDAP server.
|
||||
Grafana supports a wide variety of internal and external ways for Users to authenticate themselves. These include from its own integrated database, from an external SQL server, or from an external LDAP server.
|
||||
|
||||
For more details please refer to [User Auth](/reference/http_api/#users)
|
||||
|
||||
### ** Row **
|
||||
### Row
|
||||
|
||||
A Row is a logical divider within a Dashboard, and is used to group Panels together.
|
||||
|
||||
Rows are always 12 “units” wide. These units are automatically scaled dependent on the horizontal resolution of your browser. You can control the relative width of Panels within a row by setting their own width.
|
||||
|
||||
We utilize a unit abstraction so that Grafana looks great on all screens both small and huge.
|
||||
We utilize a unit abstraction so that Grafana looks great on all screens both small and huge.
|
||||
|
||||
> Note: With MaxDataPoint functionality, Grafana can show you the perfect amount of datapoints no matter your resolution or time-range.
|
||||
|
||||
@ -50,7 +54,7 @@ Utilize the [Repeating Row functionality](/reference/templating/#utilizing-templ
|
||||
|
||||
Rows can be collapsed by clicking on the Row Title. If you save a Dashboard with a Row collapsed, it will save in that state and will not preload those graphs until the row is expanded.
|
||||
|
||||
### ** Panel **
|
||||
### Panel
|
||||
|
||||
The Panel is the basic visualization building block in Grafana. Each Panel provides a Query Editor (dependent on the Data Source selected in the panel) that allows you to extract the perfect visualization to display on the Panel by utilizing the Query Editor
|
||||
|
||||
@ -58,7 +62,7 @@ There are a wide variety of styling and formatting options that each Panel expos
|
||||
|
||||
Panels can be dragged and dropped and rearranged on the Dashboard. They can also be resized.
|
||||
|
||||
There are currently four Panel types: [Graph](/reference/graph/), [Singlestat](/reference/singlestat/), [Dashlist](/reference/dashlist/), and [Text](/reference/text/).
|
||||
There are currently four Panel types: [Graph](/reference/graph/), [Singlestat](/reference/singlestat/), [Dashlist](/reference/dashlist/), [Table](/reference/table_panel/),and [Text](/reference/text/).
|
||||
|
||||
Panels like the [Graph](/reference/graph/) panel allow you to graph as many metrics and series as you want. Other panels like [Singlestat](/reference/singlestat/) require a reduction of a single query into a single number. [Dashlist](/reference/dashlist/) and [Text](/reference/text/) are special panels that do not connect to any Data Source.
|
||||
|
||||
@ -66,14 +70,14 @@ Panels can be made more dynamic by utilizing [Dashboard Templating](/reference/t
|
||||
|
||||
Utilize the [Repeating Panel](/reference/templating/#utilizing-template-variables-with-repeating-panels-and-repeating-rows) functionality to dynamically create or remove Panels based on the [Templating Variables](/reference/templating/#utilizing-template-variables-with-repeating-panels-and-repeating-rows) selected.
|
||||
|
||||
The time range on Panels is normally what is set in the [Dashboard time picker](/reference/timerange/) but this can be overridden by utilizes [Panel specific time overrides](/reference/timerange/#panel-time-override).
|
||||
The time range on Panels is normally what is set in the [Dashboard time picker](/reference/timerange/) but this can be overridden by utilizes [Panel specific time overrides](/reference/timerange/#panel-time-overrides-timeshift).
|
||||
|
||||
Panels (or an entire Dashboard) can be [Shared](/reference/sharing/) easily in a variety of ways. You can send a link to someone who has a login to your Grafana. You can use the [Snapshot](/reference/sharing/#snapshots) feature to encode all the data currently being viewed into a static and interactive JSON document; it's so much better than emailing a screenshot!
|
||||
|
||||
|
||||
### ** Query Editor **
|
||||
### Query Editor
|
||||
|
||||
The Query Editor exposes capabilities of your Data Source and allows you to query the metrics that it contains.
|
||||
The Query Editor exposes capabilities of your Data Source and allows you to query the metrics that it contains.
|
||||
|
||||
Use the Query Editor to build one or more queries (for one or more series) in your time series database. The panel will instantly update allowing you to effectively explore your data in real time and build a perfect query for that particular Panel.
|
||||
|
||||
@ -81,13 +85,13 @@ You can utilize [Template variables](/reference/templating/) in the Query Editor
|
||||
|
||||
Grafana allows you to reference queries in the Query Editor by the row that they’re on. If you add a second query to graph, you can reference the first query simply by typing in #A. This provides an easy and convenient way to build compounded queries.
|
||||
|
||||
### ** Dashboard **
|
||||
### Dashboard
|
||||
|
||||
The Dashboard is where it all comes together. Dashboards can be thought of as of a set of one or more Panels organized and arranged into one or more Rows.
|
||||
|
||||
The time period for the Dashboard can be controlled by the [Dashboard time picker](/reference/timerange/) in the upper right of the Dashboard.
|
||||
|
||||
Dashboards can utilize [Templating](/reference/templating/) to make them more dynamic and interactive.
|
||||
Dashboards can utilize [Templating](/reference/templating/) to make them more dynamic and interactive.
|
||||
|
||||
Dashboards can utilize [Annotations](/reference/annotations/) to display event data across Panels. This can help correlate the time series data in the Panel with other events.
|
||||
|
||||
|
@ -1,8 +1,13 @@
|
||||
---
|
||||
page_title: Getting started
|
||||
page_description: Getting started
|
||||
page_keywords: grafana, guide, documentation
|
||||
---
|
||||
+++
|
||||
title = "Getting Started"
|
||||
description = "Getting started with Grafana guide"
|
||||
keywords = ["grafana", "intro", "guide", "started"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Getting Started"
|
||||
identifier = "getting_started_guide"
|
||||
parent = "guides"
|
||||
+++
|
||||
|
||||
# Getting started
|
||||
This guide will help you get started and acquainted with Grafana. It assumes you have a working Grafana server up and running and have added at least one [Data Source](/datasources/overview).
|
||||
@ -10,14 +15,14 @@ This guide will help you get started and acquainted with Grafana. It assumes you
|
||||
## Beginner guides
|
||||
Watch the 10min [beginners guide to building dashboards](https://www.youtube.com/watch?v=sKNZMtoSHN4&index=7&list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2) to get a quick intro to setting up Dashboards and Panels.
|
||||
|
||||
##Basic Concepts
|
||||
## Basic Concepts
|
||||
Read the [Basic Concepts](/guides/basic_concepts) document to get a crash course in key Grafana concepts.
|
||||
|
||||
### Top header
|
||||
|
||||
Let's start with creating a new Dashboard. You can find the new Dashboard link at the bottom of the Dashboard picker. You now have a blank Dashboard.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/v2_top_nav_annotated.png">
|
||||
<img class="no-shadow" src="img/docs/v2/v2_top_nav_annotated.png">
|
||||
|
||||
The image above shows you the top header for a Dashboard.
|
||||
|
||||
@ -29,12 +34,12 @@ The image above shows you the top header for a Dashboard.
|
||||
6. Settings: Manage Dashboard settings and features such as Templating and Annotations.
|
||||
|
||||
## Dashboards, Panels, Rows, the building blocks of Grafana...
|
||||
Dashboards are at the core of what Grafana is all about. Dashboards are composed of individual Panels arranged on a number of Rows. Grafana ships with a variety of Panels. Grafana makes it easy to construct the right queries, and customize the display properties so that you can create the perfect Dashboard for your need. Each Panel can interact with data from any configured Grafana Data Source (currently InfluxDB, Graphite, OpenTSDB, and KairosDB). The [Core Concepts](/guides/basic_concepts) guide explores these key ideas in detail.
|
||||
Dashboards are at the core of what Grafana is all about. Dashboards are composed of individual Panels arranged on a number of Rows. Grafana ships with a variety of Panels. Grafana makes it easy to construct the right queries, and customize the display properties so that you can create the perfect Dashboard for your need. Each Panel can interact with data from any configured Grafana Data Source (currently InfluxDB, Graphite, OpenTSDB, and KairosDB). The [Basic Concepts](/guides/basic_concepts) guide explores these key ideas in detail.
|
||||
|
||||
|
||||
## Adding & Editing Graphs and Panels
|
||||
|
||||

|
||||

|
||||
|
||||
1. You add panels via row menu. The row menu is the green icon to the left of each row.
|
||||
2. To edit the graph you click on the graph title to open the panel menu, then `Edit`.
|
||||
@ -43,8 +48,7 @@ Dashboards are at the core of what Grafana is all about. Dashboards are composed
|
||||
When you click the `Metrics` tab, you are presented with a Query Editor that is specific to the Panel Data Source. Use the Query Editor to build your queries and Grafana will visualize them in real time.
|
||||
|
||||
|
||||
|
||||
<img src="/img/v2/dashboard_annotated.png" class="no-shadow">
|
||||
<img src="img/docs/v2/dashboard_annotated.png" class="no-shadow">
|
||||
|
||||
1. Zoom out time range
|
||||
2. Time picker dropdown. Here you can access relative time range options, auto refresh options and set custom absolute time ranges.
|
||||
@ -57,7 +61,7 @@ When you click the `Metrics` tab, you are presented with a Query Editor that is
|
||||
|
||||
You can Drag-and-Drop Panels within and between Rows. Click and hold the Panel title, and drag it to its new location. You can also easily resize panels by clicking the (-) and (+) icons.
|
||||
|
||||

|
||||

|
||||
|
||||
## Tips and shortcuts
|
||||
|
9
docs/sources/guides/index.md
Normal file
9
docs/sources/guides/index.md
Normal file
@ -0,0 +1,9 @@
|
||||
+++
|
||||
title = "Guides"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Getting Started"
|
||||
identifier = "guides"
|
||||
weight = 2
|
||||
+++
|
||||
|
@ -1,69 +0,0 @@
|
||||
page_title: Screencasts
|
||||
page_description: Grafana screencasts
|
||||
page_keywords: grafana, screencasts, documentation, guides
|
||||
no_toc: true
|
||||
|
||||
# Screencasts
|
||||
|
||||
<div class="row">
|
||||
<div class="columns medium-6">
|
||||
<h3><strong>Episode 1</strong> - Building Graphite Queries</h3>
|
||||
Learn how the Graphite Query Editor works, and how to use different graphing functions. There's also an introduction to graph display settings.
|
||||
<div class="video-container" style="margin-top:10px;">
|
||||
<iframe height="215" src="//www.youtube.com/embed/mgcJPREl3CU?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns medium-6">
|
||||
<h3><strong>Episode 2</strong> - Templated Graphite Queries</h3>
|
||||
The screencast focuses on Templating with the Graphite Data Source. Learn how to make dynamic and adaptable Dashboards for your Graphite metrics.
|
||||
<div class="video-container" style="margin-top:10px;">
|
||||
<iframe height="215" src="//www.youtube.com/embed/FhNUrueWwOk?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="columns medium-6">
|
||||
<h3><strong>Episode 3</strong> - Whats New In Grafana 2.0</h3>
|
||||
This screencast highlights many of the great new features that were included in the Grafana 2.0 release.
|
||||
<div class="video-container" style="margin-top:10px;">
|
||||
<iframe height="215" src="https://www.youtube.com/embed/FC13uhFRsVw?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns medium-6">
|
||||
<h3><strong>Episode 4</strong> - Installation & Configuration on Ubuntu / Debian</h3>
|
||||
Learn how to easily install the dependencies and packages to get Grafana 2.0 up and running on Ubuntu or Debian in just a few minutes.
|
||||
<div class="video-container" style="margin-top:10px;">
|
||||
<iframe height="215" src="https://www.youtube.com/embed/JY22EBOR9hQ?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="columns medium-6">
|
||||
<h3><strong>Episode 5</strong> - Installation & Configuration on Red Hat / CentOS</h3>
|
||||
This screencasts shows how to get Grafana 2.0 installed and configured quickly on RPM-based Linux operating systems.
|
||||
<div class="video-container" style="margin-top:10px;">
|
||||
<iframe height="215" src="https://www.youtube.com/embed/E-gMFv84FE8?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns medium-6">
|
||||
<h3><strong>Episode 6</strong> - Adding data sources, users & organizations</h3>
|
||||
Now that Grafana has been installed, learn about adding data sources and get a closer look at adding and managing Users and Organizations.
|
||||
<div class="video-container" style="margin-top:10px;">
|
||||
<iframe height="215" src="https://www.youtube.com/embed/9ZCMVNxUf6s?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<div class="row">
|
||||
<div class="columns medium-6">
|
||||
<h3><strong>Episode 7</strong> - Beginners guide to building dashboards</h3>
|
||||
For newer users of Grafana, this screencast will familiarize you with the general UI and teach you how to build your first Dashboard.
|
||||
<div class="video-container" style="margin-top:10px;">
|
||||
<iframe height="215" src="https://www.youtube.com/embed/sKNZMtoSHN4?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" frameborder="0" allowfullscreen></iframe>
|
||||
</div>
|
||||
</div>
|
||||
<div class="columns medium-6">
|
||||
</div>
|
||||
</div>
|
@ -1,8 +1,14 @@
|
||||
---
|
||||
page_title: What's New in Grafana v2.1
|
||||
page_description: What's new in Grafana v2.1
|
||||
page_keywords: grafana, new, changes, features, documentation
|
||||
---
|
||||
+++
|
||||
title = "What's New in Grafana v2.1"
|
||||
description = "Feature & improvement highlights for Grafana v2.1"
|
||||
keywords = ["grafana", "new", "documentation", "2.1"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 2.1"
|
||||
identifier = "v2.1"
|
||||
parent = "whatsnew"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
# What's new in Grafana v2.1
|
||||
Grafana 2.1 brings improvements in three core areas: dashboarding, authentication, and data sources.
|
||||
@ -17,7 +23,7 @@ A template variable with Multi-Value enabled allows for the selection of multipl
|
||||
These variables can then be used in any Panel to make them more dynamic, and to give you the perfect view of your data.
|
||||
Multi-Value variables is also enabling the new `row repeat` and `panel repeat` feature described below.
|
||||
|
||||

|
||||

|
||||
<br/><br/>
|
||||
|
||||
### Repeating Rows and Panels
|
||||
@ -25,7 +31,7 @@ It’s now possible to create a dashboard that automatically adds (or removes) b
|
||||
on selected variable values. Any row or any panel can be configured to repeat (duplicate itself) based
|
||||
on a multi-value template variable.</p>
|
||||
|
||||

|
||||

|
||||
<br/><br/>
|
||||
|
||||
### Dashboard Links & Navigation
|
||||
@ -33,7 +39,7 @@ To support better navigation between dashboards, it's now possible to create cus
|
||||
panels to appropriate Dashboards. You also have the ability to create flexible top-level links on any
|
||||
given dashboard thanks to the new dashboard navigation bar feature.
|
||||
|
||||

|
||||

|
||||
|
||||
Dashboard links can be added under dashboard settings. Either defined as static URLs with a custom icon or as dynamic
|
||||
dashboard links or dropdowns based on custom dashboard search query. These links appear in the same
|
||||
@ -82,7 +88,7 @@ The Viewer role has been modified in Grafana 2.1 so that users assigned this rol
|
||||
Grafana 2.1 now comes with full support for InfluxDB 0.9. There is a new query editor designed from scratch
|
||||
for the new features InfluxDB 0.9 enables.
|
||||
|
||||

|
||||

|
||||
|
||||
<br/>
|
||||
|
||||
@ -110,15 +116,15 @@ Define series color using regex rule. This is useful when you have templated gra
|
||||
that change depending selected template variables. Using a regex style override rule you could
|
||||
for example make all series that contain the word **CPU** `red` and assigned to the second y axis.
|
||||
|
||||

|
||||

|
||||
|
||||
New series style override, negative-y transform and stack groups. Negative y transform is
|
||||
very useful if you want to plot a series on the negative y scale without affecting the legend values like min or max or
|
||||
the values shown in the hover tooltip.
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
### Singlestat Panel
|
||||
Now support string values. Useful for time series database like InfluxDB that supports
|
||||
|
@ -1,8 +1,14 @@
|
||||
---
|
||||
page_title: What's New in Grafana v2.5
|
||||
page_description: What's new in Grafana v2.5
|
||||
page_keywords: grafana, new, changes, features, documentation
|
||||
---
|
||||
+++
|
||||
title = "What's New in Grafana v2.5"
|
||||
description = "Feature & improvement highlights for Grafana v2.5"
|
||||
keywords = ["grafana", "new", "documentation", "2.5"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 2.5"
|
||||
identifier = "v2.5"
|
||||
parent = "whatsnew"
|
||||
weight = 9
|
||||
+++
|
||||
|
||||
# What's new in Grafana v2.5
|
||||
|
||||
@ -12,7 +18,7 @@ fixes and enhancements to all areas of Grafana, like new Data Sources, a new and
|
||||
resize handles and improved InfluxDB and OpenTSDB support.
|
||||
|
||||
### New time range controls
|
||||
<img src="/img/whatsnew_2_5/timepicker.png" alt="New Time picker">
|
||||
<img src="img/docs/whatsnew_2_5/timepicker.png" alt="New Time picker">
|
||||
|
||||
A new timepicker with room for more quick ranges as well as new types of relative ranges, like `Today`,
|
||||
`The day so far` and `This day last week`. Also an improved time & calendar picker that now works
|
||||
@ -20,7 +26,7 @@ correctly in UTC mode.
|
||||
|
||||
### Elasticsearch
|
||||
|
||||
<img src="/img/whatsnew_2_5/elasticsearch_metrics_ex1.png" alt="Elasticsearch example">
|
||||
<img src="img/docs/whatsnew_2_5/elasticsearch_metrics_ex1.png" alt="Elasticsearch example">
|
||||
<br>
|
||||
|
||||
This release brings a fully featured query editor for Elasticsearch. You will now be able to visualize
|
||||
@ -40,7 +46,7 @@ Try the new Elasticsearch query editor on the [play.grafana.org](http://play.gra
|
||||
|
||||
### CloudWatch
|
||||
|
||||
<img src="/img/whatsnew_2_5/cloudwatch.png" alt="Cloudwatch editor">
|
||||
<img src="img/docs/whatsnew_2_5/cloudwatch.png" alt="Cloudwatch editor">
|
||||
|
||||
Grafana 2.5 ships with a new CloudWatch datasource that will allow you to query and visualize CloudWatch
|
||||
metrics directly from Grafana.
|
||||
@ -51,14 +57,14 @@ metrics directly from Grafana.
|
||||
|
||||
### Prometheus
|
||||
|
||||
<img src="/img/whatsnew_2_5/prometheus_editor.png" alt="Prometheus editor">
|
||||
<img src="img/docs/whatsnew_2_5/prometheus_editor.png" alt="Prometheus editor">
|
||||
|
||||
Grafana 2.5 ships with a new Prometheus datasource that will allow you to query and visualize data
|
||||
stored in Prometheus.
|
||||
|
||||
|
||||
### Mix different data sources
|
||||
<img src="/img/whatsnew_2_5/mixed_data.png" alt="Mix data sources in the same dashboard or in the same graph!">
|
||||
<img src="img/docs/whatsnew_2_5/mixed_data.png" alt="Mix data sources in the same dashboard or in the same graph!">
|
||||
|
||||
In previous releases you have been able to mix different data sources on the same dashboard. In v2.5 you
|
||||
will be able to mix then on the same graph! You can enable this by selecting the built in `-- Mixed --` data source.
|
||||
@ -67,12 +73,12 @@ to plot metrics from different Graphite servers on the same Graph or plot data f
|
||||
data from Prometheus. Mixing different data sources on the same graph works for any data source, even custom ones.
|
||||
|
||||
### Panel Resize handles
|
||||
<img src="/img/whatsnew_2_5/panel_resize.gif" alt="">
|
||||
<img src="img/docs/whatsnew_2_5/panel_resize.gif" alt="">
|
||||
|
||||
This release adds resize handles to the the bottom right corners of panels making is easy to resize both width and height.
|
||||
|
||||
### User invites
|
||||
<img src="/img/whatsnew_2_5/org_invite.png" alt="">
|
||||
<img src="img/docs/whatsnew_2_5/org_invite.png" alt="">
|
||||
|
||||
This version also brings some new features for user management.
|
||||
|
||||
|
@ -1,8 +1,14 @@
|
||||
---
|
||||
page_title: What's New in Grafana v2.6
|
||||
page_description: What's new in Grafana v2.6
|
||||
page_keywords: grafana, new, changes, features, documentation, table
|
||||
---
|
||||
+++
|
||||
title = "What's New in Grafana v2.6"
|
||||
description = "Feature & improvement highlights for Grafana v2.6"
|
||||
keywords = ["grafana", "new", "documentation", "2.6"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 2.6"
|
||||
identifier = "v2.6"
|
||||
parent = "whatsnew"
|
||||
weight = 7
|
||||
+++
|
||||
|
||||
# What's new in Grafana v2.6
|
||||
|
||||
@ -11,7 +17,7 @@ The release includes a new Table panel, a new InfluxDB query editor, support for
|
||||
support for multiple Cloudwatch credentials.
|
||||
|
||||
## Table Panel
|
||||
<img src="/img/v2/table-panel.png">
|
||||
<img src="assets/img/features/table-panel.png">
|
||||
|
||||
The new table panel is very flexible, supporting both multiple modes for time series as well as for
|
||||
table, annotation and raw JSON data. It also provides date formating and value formating and coloring options.
|
||||
@ -21,7 +27,7 @@ table, annotation and raw JSON data. It also provides date formating and value f
|
||||
In the most simple mode you can turn time series to rows. This means you get a `Time`, `Metric` and a `Value` column.
|
||||
Where `Metric` is the name of the time series.
|
||||
|
||||
<img src="/img/v2.6/table_ts_to_rows.png">
|
||||
<img src="img/docs/v2/table_ts_to_rows.png">
|
||||
|
||||
### Table Transform
|
||||
Above you see the options tab for the **Table Panel**. The most important option is the `To Table Transform`.
|
||||
@ -34,7 +40,7 @@ The column styles allow you control how dates and numbers are formatted.
|
||||
This transform allows you to take multiple time series and group them by time. Which will result in a `Time` column
|
||||
and a column for each time series.
|
||||
|
||||
<img src="/img/v2.6/table_ts_to_columns.png">
|
||||
<img src="img/docs/v2/table_ts_to_columns.png">
|
||||
|
||||
In the screenshot above you can see how the same time series query as in the previous example can be transformed into
|
||||
a different table by changing the `To Table Transform` to `Time series to columns`.
|
||||
@ -43,7 +49,7 @@ a different table by changing the `To Table Transform` to `Time series to colum
|
||||
This transform works very similar to the legend values in the Graph panel. Each series gets its own row. In the Options
|
||||
tab you can select which aggregations you want using the plus button the Columns section.
|
||||
|
||||
<img src="/img/v2.6/table_ts_to_aggregations.png">
|
||||
<img src="img/docs/v2/table_ts_to_aggregations.png">
|
||||
|
||||
You have to think about how accurate the aggregations will be. It depends on what aggregation is used in the time series query,
|
||||
how many data points are fetched, etc. The time series aggregations are calculated by Grafana after aggregation is performed
|
||||
@ -53,38 +59,39 @@ by the time series database.
|
||||
|
||||
If you want to show documents from Elasticsearch pick `Raw Document` as the first metric.
|
||||
|
||||
<img src="/img/v2.6/elastic_raw_doc.png">
|
||||
<img src="img/docs/v2/elastic_raw_doc.png">
|
||||
|
||||
This in combination with the `JSON Data` table transform will allow you to pick which fields in the document
|
||||
you want to show in the table.
|
||||
|
||||
<img src="/img/v2.6/table_json_data.png">
|
||||
<img src="img/docs/v2/table_json_data.png">
|
||||
|
||||
### Elasticsearch aggregations
|
||||
|
||||
You can also make Elasticsearch aggregation queries without a `Date Histogram`. This allows you to
|
||||
use Elasticsearch metric aggregations to get accurate aggregations for the selected time range.
|
||||
|
||||
<img src="/img/v2.6/elastic_aggregations.png">
|
||||
<img src="img/docs/v2/elastic_aggregations.png">
|
||||
|
||||
### Annotations
|
||||
|
||||
The table can also show any annotations you have enabled in the dashboard.
|
||||
|
||||
<img src="/img/v2.6/table_annotations.png">
|
||||
<img src="img/docs/v2/table_annotations.png">
|
||||
|
||||
## The New InfluxDB Editor
|
||||
The new InfluxDB editor is a lot more flexible and powerful. It supports nested functions, like `derivative`.
|
||||
It also uses the same technique as the Graphite query editor in that it presents nested functions as chain of function
|
||||
transformations. It tries to simplify and unify the complicated nature of InfluxDB's query language.
|
||||
|
||||
<img src="/img/v2.6/influxdb_editor_v3.gif">
|
||||
<img src="assets/img/blog/v2.6/influxdb_editor_v3.gif">
|
||||
|
||||
In the `SELECT` row you can specify what fields and functions you want to use. If you have a
|
||||
group by time you need an aggregation function. Some functions like derivative require an aggregation function.
|
||||
|
||||
The editor tries simplify and unify this part of the query. For example:
|
||||

|
||||
|
||||

|
||||
|
||||
The above will generate the following InfluxDB `SELECT` clause:
|
||||
|
||||
@ -103,7 +110,7 @@ You can remove the group by by clicking on the `tag` and then click on the x ico
|
||||
The new editor also allows you to remove group by time and select `raw` table data. Which is very useful
|
||||
in combination with the new Table panel to show raw log data stored in InfluxDB.
|
||||
|
||||
<img src="/img/v2.6/table_influxdb_logs.png">
|
||||
<img src="assets/img/blog/v2.6/table_influxdb_logs.png">
|
||||
|
||||
## Pipeline metrics
|
||||
|
||||
@ -111,7 +118,7 @@ If you have Elasticsearch 2.x and Grafana 2.6 or above then you can use pipeline
|
||||
**Moving Average** and **Derivative**. Elasticsearch pipeline metrics require another metric to be based on. Use the eye icon next to the metric
|
||||
to hide metrics from appearing in the graph.
|
||||
|
||||

|
||||

|
||||
|
||||
## Changelog
|
||||
For a detailed list and link to github issues for everything included in the 2.6 release please
|
||||
|
@ -1,8 +1,14 @@
|
||||
---
|
||||
page_title: What's New in Grafana v2.0
|
||||
page_description: What's new in Grafana v2.0
|
||||
page_keywords: grafana, new, changes, features, documentation
|
||||
---
|
||||
+++
|
||||
title = "What's New in Grafana v2.0"
|
||||
description = "Feature & improvement highlights for Grafana v2.0"
|
||||
keywords = ["grafana", "new", "documentation", "2.0"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 2.0"
|
||||
identifier = "v2.0"
|
||||
parent = "whatsnew"
|
||||
weight = 11
|
||||
+++
|
||||
|
||||
# What's New in Grafana v2.0
|
||||
|
||||
@ -49,7 +55,7 @@ even zoom in). Also they are fast to load as they aren't actually connected to a
|
||||
|
||||
They're a great way to communicate about a particular incident with specific people who aren't Users of your Grafana instance. You can also use them to show off your dashboards over the Internet.
|
||||
|
||||

|
||||

|
||||
|
||||
### Publish snapshots
|
||||
|
||||
@ -61,11 +67,11 @@ Either way, anyone with the link (and access to your Grafana instance for local
|
||||
|
||||
In Grafana v2.x you can now override the relative time range for individual panels, causing them to be different than what is selected in the Dashboard time picker in the upper right. You can also add a time shift to individual panels. This allows you to show metrics from different time periods or days at the same time.
|
||||
|
||||

|
||||

|
||||
|
||||
You control these overrides in panel editor mode and the new tab `Time Range`.
|
||||
|
||||

|
||||

|
||||
|
||||
When you zoom or change the Dashboard time to a custom absolute time range, all panel overrides will be disabled. The panel relative time override is only active when the dashboard time is also relative. The panel timeshift override however is always active, even when the dashboard time is absolute.
|
||||
|
||||
@ -90,7 +96,7 @@ This feature makes it easy to include interactive visualizations from your Grafa
|
||||
|
||||
The top header has gotten a major streamlining in Grafana V2.0.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/v2_top_nav_annotated.png">
|
||||
<img class="no-shadow" src="img/docs/v2/v2_top_nav_annotated.png">
|
||||
|
||||
1. `Side menubar toggle` Toggle the side menubar on or off. This allows you to focus on the data presented on the Dashboard. The side menubar provides access to features unrelated to a Dashboard such as Users, Organizations, and Data Sources.
|
||||
2. `Dashboard dropdown` The main dropdown shows you which Dashboard you are currently viewing, and allows you to easily switch to a new Dashboard. From here you can also create a new Dashboard, Import existing Dashboards, and manage the Playlist.
|
||||
@ -115,7 +121,7 @@ You can easily collapse or re-open the side menubar at any time by clicking the
|
||||
|
||||
## New search view & starring dashboards
|
||||
|
||||

|
||||

|
||||
|
||||
The dashboard search view has gotten a big overhaul. You can now see and filter by which dashboard you have personally starred.
|
||||
|
||||
@ -124,11 +130,11 @@ The dashboard search view has gotten a big overhaul. You can now see and filter
|
||||
The Graph panel now supports 3 logarithmic scales, `log base 10`, `log base 32`, `log base 1024`. Logarithmic y-axis scales are very useful when rendering many series of different order of magnitude on the same scale (eg.
|
||||
latency, network traffic, and storage)
|
||||
|
||||

|
||||

|
||||
|
||||
## Dashlist panel
|
||||
|
||||

|
||||

|
||||
|
||||
The dashlist is a new panel in Grafana v2.0. It allows you to show your personal starred dashboards, as well as do custom searches based on search strings or tags.
|
||||
|
||||
@ -147,7 +153,7 @@ In addition, connections to Data Sources can be better controlled and secured, a
|
||||
A commonly reported problem has been graphs dipping to zero at the the end, because metric data for the last interval has yet to be written to the Data Source. These graphs then "self correct" once the data comes in, but can look deceiving or alarming at times.
|
||||
|
||||
You can avoid this problem by adding a `now delay` in `Dashboard Settings` > `Time Picker` tab. This new feature will cause Grafana to ignore the most recent data up to the set delay.
|
||||

|
||||

|
||||
|
||||
The delay that may be necessary depends on how much latency you have in your collection pipeline.
|
||||
|
||||
@ -155,7 +161,7 @@ The delay that may be necessary depends on how much latency you have in your col
|
||||
|
||||
Grafana v2.0 protects Users from accidentally overwriting each others Dashboard changes. Similar protections are in place if you try to create a new Dashboard with the same name as an existing one.
|
||||
|
||||

|
||||

|
||||
|
||||
These protections are only the first step; we will be building out additional capabilities around dashboard versioning and management in future versions of Grafana.
|
||||
|
||||
@ -171,6 +177,6 @@ Grafana now supports server-side PNG rendering. From the Panel share dialog you
|
||||
|
||||
> **Note** This requires that your Data Source is accessible from your Grafana instance.
|
||||
|
||||

|
||||

|
||||
|
||||
|
||||
|
@ -1,8 +1,14 @@
|
||||
---
|
||||
page_title: What's New in Grafana v3.1
|
||||
page_description: What's new in Grafana v3.1
|
||||
page_keywords: grafana, new, changes, features, documentation
|
||||
---
|
||||
+++
|
||||
title = "What's New in Grafana v3.1"
|
||||
description = "Feature & improvement highlights for Grafana v3.1"
|
||||
keywords = ["grafana", "new", "documentation", "3.1"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 3.1 (Latest)"
|
||||
identifier = "v3.1"
|
||||
parent = "whatsnew"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# What's New in Grafana v3.1
|
||||
|
||||
@ -10,21 +16,21 @@ page_keywords: grafana, new, changes, features, documentation
|
||||
|
||||
The export feature is now accessed from the share menu.
|
||||
|
||||
<img src="/img/v31/export_menu.png">
|
||||
<img src="img/docs/v31/export_menu.png">
|
||||
|
||||
Dashboards exported from Grafana 3.1 are now more portable and easier for others to import than before.
|
||||
The export process extracts information data source types used by panels and adds these to a new `inputs`
|
||||
section in the dashboard json. So when you or another person tries to import the dashboard they will be asked to
|
||||
select data source and optional metrix prefix options.
|
||||
|
||||
<img src="/img/v31/import_step1.png">
|
||||
<img src="img/docs/v31/import_step1.png">
|
||||
|
||||
The above screenshot shows the new import modal that gives you 3 options for how to import a dashboard.
|
||||
One notable new addition here is the ability to import directly from Dashboards shared on [Grafana.net](https://grafana.net).
|
||||
|
||||
The next step in the import process:
|
||||
|
||||
<img src="/img/v31/import_step2.png">
|
||||
<img src="img/docs/v31/import_step2.png">
|
||||
|
||||
Here you can change the name of the dashboard and also pick what data sources you want the dashboard to use. The above screenshot
|
||||
shows a CollectD dashboard for Graphite that requires a metric prefix be specified.
|
||||
@ -35,7 +41,7 @@ On [Grafana.net](https://grafana.net) you can now browse & search for dashboards
|
||||
more are being uploaded every day. To import a dashboard just copy the dashboard url and head back to Grafana,
|
||||
then Dashboard Search -> Import -> Paste Grafana.net Dashboard URL.
|
||||
|
||||
<img src="/img/v31/gnet_dashboards_list.png">
|
||||
<img src="img/docs/v31/gnet_dashboards_list.png">
|
||||
|
||||
## Constant template variables
|
||||
|
||||
@ -63,6 +69,5 @@ Its now possible to configure different log levels for different modules.
|
||||
## CHANGELOG
|
||||
|
||||
For a detailed list and link to github issues for everything included
|
||||
in the 3.1 release please view the
|
||||
[CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md)
|
||||
in the 3.1 release please view the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md)
|
||||
file.
|
||||
|
@ -1,8 +1,14 @@
|
||||
---
|
||||
page_title: What's New in Grafana v3.0
|
||||
page_description: What's new in Grafana v3.0
|
||||
page_keywords: grafana, new, changes, features, documentation
|
||||
---
|
||||
+++
|
||||
title = "What's New in Grafana v3.0"
|
||||
description = "Feature & improvement highlights for Grafana v3.0"
|
||||
keywords = ["grafana", "new", "documentation", "3.0"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Version 3.0"
|
||||
identifier = "v3.0"
|
||||
parent = "whatsnew"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
# What's New in Grafana v3.0
|
||||
|
||||
@ -37,7 +43,7 @@ entire experience right within Grafana.
|
||||
|
||||
## Grafana.net
|
||||
|
||||
<img src="/img/v3/grafana_net_tour.png">
|
||||
<img src="img/docs/v3/grafana_net_tour.png">
|
||||
|
||||
[Grafana.net](https://grafana.net) offers a central repository where the community can come together to discover, create and
|
||||
share plugins (data sources, panels, apps) and dashboards.
|
||||
@ -96,7 +102,7 @@ periodically and remotely.
|
||||
You can also make Playlists dynamic by using Dashboard **tags** to
|
||||
define the Playlist.
|
||||
|
||||
<img src="/img/v3/playlist.png">
|
||||
<img src="img/docs/v3/playlist.png">
|
||||
|
||||
## Improved UI
|
||||
|
||||
@ -116,11 +122,11 @@ are literally hundreds of UI improvements and refinements.
|
||||
|
||||
Here’s the new side menu in action:
|
||||
|
||||
<img src="/img/v3/menu.gif">
|
||||
<img src="img/docs/v3/menu.gif">
|
||||
|
||||
And here's the new look for Dashboard settings:
|
||||
|
||||
<img src="/img/v3/dashboard_settings.png">
|
||||
<img src="img/docs/v3/dashboard_settings.png">
|
||||
|
||||
Check out the <a href="http://play.grafana.org" target="_blank">Play
|
||||
Site</a> to get a feel for some of the UI changes.
|
||||
@ -132,7 +138,7 @@ over the link and click the annotation text. This feature is very
|
||||
useful for linking to particular commits or tickets where more
|
||||
detailed information can be presented to the user.
|
||||
|
||||
<img src="/img/v3/annotation_links.gif">
|
||||
<img src="img/docs/v3/annotation_links.gif">
|
||||
|
||||
## Data source variables
|
||||
|
||||
@ -140,11 +146,11 @@ This has been a top requested feature for very long we are exited to finally pro
|
||||
this feature. You can now add a new `Data source` type variable. That will
|
||||
automatically be filled with instance names of your data sources.
|
||||
|
||||
<img src="/img/v3/data_source_variable.png">
|
||||
<img src="img/docs/v3/data_source_variable.png">
|
||||
|
||||
You can then use this variable as the panel data source:
|
||||
|
||||
<img src="/img/v3/data_source_variable_use.png">
|
||||
<img src="img/docs/v3/data_source_variable_use.png">
|
||||
|
||||
This will allow you to quickly change data source server and reuse the
|
||||
same dashboard for different instances of your metrics backend. For example
|
||||
@ -162,7 +168,7 @@ The Prometheus Data Source now supports annotations.
|
||||
### InfluxDB
|
||||
|
||||
You can now select the InfluxDB policy from the query editor.
|
||||
<img src="/img/v3/influxdb_policy.png">
|
||||
<img src="img/docs/v3/influxdb_policy.png">
|
||||
|
||||
Grafana 3.0 also comes with support for InfluxDB 0.11 and InfluxDB 0.12.
|
||||
|
||||
@ -195,23 +201,23 @@ are a couple that I incurage you try!
|
||||
|
||||
#### [Clock Panel](https://grafana.net/plugins/grafana-clock-panel)
|
||||
Support's both current time and count down mode.
|
||||
<img src="/img/v3/clock_panel.png">
|
||||
<img src="img/docs/v3/clock_panel.png">
|
||||
|
||||
#### [Pie Chart Panel](https://grafana.net/plugins/grafana-piechart-panel)
|
||||
A simple pie chart panel is now available as an external plugin.
|
||||
<img src="/img/v3/pie_chart_panel.png">
|
||||
<img src="img/docs/v3/pie_chart_panel.png">
|
||||
|
||||
#### [WorldPing App](https://grafana.net/plugins/raintank-worldping-app)
|
||||
This is full blown Grafana App that adds new panels, data sources and pages to give
|
||||
feature rich global performance monitoring directly from your on-prem Grafana.
|
||||
|
||||
<img src="/img/v3/wP-Screenshot-dash-web.png">
|
||||
<img src="img/docs/v3/wP-Screenshot-dash-web.png">
|
||||
|
||||
#### [Zabbix App](https://grafana.net/plugins/alexanderzobnin-zabbix-app)
|
||||
This app contains the already very pouplar Zabbix data source plugin, 2 dashboards and a triggers panel. It is
|
||||
created and maintained by [Alexander Zobnin](https://github.com/alexanderzobnin/grafana-zabbix).
|
||||
|
||||
<img src="/img/v3/zabbix_app.png">
|
||||
<img src="img/docs/v3/zabbix_app.png">
|
||||
|
||||
Checkout the full list of plugins on [Grafana.net](https://grafana.net/plugins)
|
||||
|
||||
|
@ -25,7 +25,7 @@ curl example:
|
||||
|
||||
Open the sidemenu and click the organization dropdown and select the `API Keys` option.
|
||||
|
||||

|
||||

|
||||
|
||||
You use the token in all requests in the `Authorization` header, like this:
|
||||
|
||||
|
7
docs/sources/http_api/index.md
Normal file
7
docs/sources/http_api/index.md
Normal file
@ -0,0 +1,7 @@
|
||||
+++
|
||||
title = "HTTP API"
|
||||
[menu.docs]
|
||||
name = "HTTP API"
|
||||
identifier = "http_api"
|
||||
weight = 9
|
||||
+++
|
@ -1,10 +1,15 @@
|
||||
----
|
||||
page_title: User API
|
||||
page_description: Grafana User API Reference
|
||||
page_keywords: grafana, admin, http, api, documentation, user
|
||||
---
|
||||
+++
|
||||
title = "User HTTP API "
|
||||
description = "Grafana User HTTP API"
|
||||
keywords = ["grafana", "http", "documentation", "api", "user"]
|
||||
aliases = ["/http_api/user/"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Users"
|
||||
parent = "http_api"
|
||||
+++
|
||||
|
||||
# User API
|
||||
# User HTTP resources / actions
|
||||
|
||||
## Search Users
|
||||
|
||||
|
@ -1,37 +1,50 @@
|
||||
---
|
||||
page_title: Grafana Installation
|
||||
page_description: Install guide for Grafana
|
||||
page_keywords: grafana, installation, documentation
|
||||
---
|
||||
+++
|
||||
title = "Grafana Installation"
|
||||
description = "Install guide for Grafana"
|
||||
keywords = ["grafana", "installation", "documentation"]
|
||||
type = "docs_root"
|
||||
[menu.docs]
|
||||
name = "Welcome to the Docs"
|
||||
identifier = "root"
|
||||
weight = -1
|
||||
+++
|
||||
|
||||
# Installation
|
||||
# Welcome to the Grafana Documentation
|
||||
|
||||
Grafana is easily installed via a Debian/Ubuntu package (.deb), via
|
||||
Redhat/Centos package (.rpm) or manually via a tarball that contains all
|
||||
required files and binaries. If you can't find a package or binary for
|
||||
your platform, you might be able to build one yourself. Read the [build
|
||||
from source](../project/building_from_source) instructions for more
|
||||
information.
|
||||
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.
|
||||
|
||||
## Platforms
|
||||
- [Installing on Debian / Ubuntu](installation/debian.md)
|
||||
- [Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)](installation/rpm.md)
|
||||
- [Installing on Mac OS X](installation/mac.md)
|
||||
- [Installing on Windows](installation/windows.md)
|
||||
- [Installing on Docker](installation/docker.md)
|
||||
- [Installing using Provisioning (Chef, Puppet, Salt, Ansible, etc)](installation/provisioning.md)
|
||||
- [Nightly Builds](http://grafana.org/download/builds.html)
|
||||
## 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](http://grafana.org/builds)
|
||||
|
||||
## Configuration
|
||||
For other platforms Read the [build from source]({{< relref "project/building_from_source.md" >}})
|
||||
instructions for more information.
|
||||
|
||||
## Configuring Grafana
|
||||
|
||||
The back-end web server has a number of configuration options. Go the
|
||||
[Configuration](/installation/configuration) page for details on all
|
||||
those options.
|
||||
|
||||
|
||||
## Getting started
|
||||
|
||||
- [Getting Started](guides/getting_started)
|
||||
- [Basic Concepts](guides/basic_concepts)
|
||||
- [Screencasts](tutorials/screencasts)
|
||||
|
||||
## Data sources guides
|
||||
|
||||
- [Graphite](datasources/graphite.md)
|
||||
- [Elasticsearch](datasources/elasticsearch.md)
|
||||
- [InfluxDB](datasources/influxdb.md)
|
||||
- [OpenTSDB](datasources/opentsdb.md)
|
||||
- [Graphite](datasources/graphite)
|
||||
- [Elasticsearch](datasources/elasticsearch)
|
||||
- [InfluxDB](datasources/influxdb)
|
||||
- [OpenTSDB](datasources/opentsdb)
|
||||
|
||||
|
||||
|
@ -1,21 +1,27 @@
|
||||
---
|
||||
page_title: Running Grafana behind a reverse proxy
|
||||
page_description: Guide for running Grafana behind a reverse proxy
|
||||
page_keywords: Grafana, reverse proxy, nginx, haproxy
|
||||
---
|
||||
+++
|
||||
title = "Running Grafana behind a reverse proxy"
|
||||
description = "Guide for running Grafana behind a reverse proxy"
|
||||
keywords = ["grafana", "nginx", "documentation", "haproxy", "reverse"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Running Grafana behind a reverse proxy"
|
||||
parent = "tutorials"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
|
||||
# Running Grafana behind a reverse proxy
|
||||
|
||||
It should be straight forward to get Grafana up and running behind a reverse proxy. But here are some things that you might run into.
|
||||
It should be straight forward to get Grafana up and running behind a reverse proxy. But here are some things that you might run into.
|
||||
|
||||
Links and redirects will not be rendered correctly unless you set the server.domain setting.
|
||||
Links and redirects will not be rendered correctly unless you set the server.domain setting.
|
||||
```
|
||||
[server]
|
||||
domain = foo.bar
|
||||
```
|
||||
|
||||
To use sub *path* ex `http://foo.bar/grafana` make sure to include `/grafana` in the end of root_url.
|
||||
Otherwise Grafana will not behave correctly. See example below.
|
||||
To use sub *path* ex `http://foo.bar/grafana` make sure to include `/grafana` in the end of root_url.
|
||||
Otherwise Grafana will not behave correctly. See example below.
|
||||
|
||||
# Examples
|
||||
Here are some example configurations for running Grafana behind a reverse proxy.
|
||||
@ -26,7 +32,7 @@ Here are some example configurations for running Grafana behind a reverse proxy.
|
||||
domain = foo.bar
|
||||
```
|
||||
|
||||
## Nginx configuration
|
||||
## Nginx configuration
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
|
@ -1,8 +1,14 @@
|
||||
---
|
||||
page_title: Configuration
|
||||
page_description: Configuration guide for Grafana.
|
||||
page_keywords: grafana, configuration, documentation
|
||||
---
|
||||
+++
|
||||
title = "Configuration"
|
||||
description = "Configuration Docs"
|
||||
keywords = ["grafana", "configuration", "documentation"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Configuration"
|
||||
identifier = "config"
|
||||
parent = "admin"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Configuration
|
||||
|
||||
@ -30,6 +36,9 @@ using environment variables using the syntax:
|
||||
Where the section name is the text within the brackets. Everything
|
||||
should be upper case, `.` should be replaced by `_`. For example, given these configuration settings:
|
||||
|
||||
# default section
|
||||
instance_name = ${HOSTNAME}
|
||||
|
||||
[security]
|
||||
admin_user = admin
|
||||
|
||||
@ -39,6 +48,7 @@ should be upper case, `.` should be replaced by `_`. For example, given these co
|
||||
|
||||
Then you can override them using:
|
||||
|
||||
export GF_DEFAULT_INSTANCE_NAME=my-instance
|
||||
export GF_SECURITY_ADMIN_USER=true
|
||||
export GF_AUTH_GOOGLE_CLIENT_SECRET=newS3cretKey
|
||||
|
||||
@ -382,9 +392,12 @@ browser to access Grafana, but with the prefix path of `/login/generic_oauth`.
|
||||
scopes =
|
||||
auth_url =
|
||||
token_url =
|
||||
api_url =
|
||||
allowed_domains = mycompany.com mycompany.org
|
||||
allow_sign_up = false
|
||||
|
||||
Set api_url to the resource that returns basic user info.
|
||||
|
||||
<hr>
|
||||
|
||||
## [auth.basic]
|
||||
@ -528,7 +541,7 @@ Use space to separate multiple modes, e.g. "console file"
|
||||
### level
|
||||
Either "debug", "info", "warn", "error", "critical", default is "info"
|
||||
|
||||
### filter
|
||||
### filters
|
||||
optional settings to set different levels for specific loggers.
|
||||
Ex `filters = sqlstore:debug`
|
||||
|
||||
|
@ -1,13 +1,17 @@
|
||||
---
|
||||
page_title: Installing on Debian / Ubuntu
|
||||
page_description: Grafana Installation guide for Debian / Ubuntu.
|
||||
page_keywords: grafana, installation, debian, ubuntu, guide
|
||||
---
|
||||
+++
|
||||
title = "Installing on Debian / Ubuntu"
|
||||
description = "Install guide for Grafana"
|
||||
keywords = ["grafana", "installation", "documentation"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Installing on Ubuntu / Debian"
|
||||
identifier = "debian"
|
||||
parent = "installation"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Installing on Debian / Ubuntu
|
||||
|
||||
## Download
|
||||
|
||||
Description | Download
|
||||
------------ | -------------
|
||||
Stable .deb for Debian-based Linux | [3.1.1 (x86-64 deb)](https://grafanarel.s3.amazonaws.com/builds/grafana_3.1.1-1470047149_amd64.deb)
|
||||
@ -97,23 +101,24 @@ By default Grafana will log to `/var/log/grafana`
|
||||
|
||||
The default configuration specifies a sqlite3 database located at
|
||||
`/var/lib/grafana/grafana.db`. Please backup this database before
|
||||
upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on [the configuration page](configuration.md#database).
|
||||
upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on [the configuration page]({{< relref "configuration.md#database" >}}).
|
||||
|
||||
## Configuration
|
||||
|
||||
The configuration file is located at `/etc/grafana/grafana.ini`. Go the
|
||||
[Configuration](/installation/configuration) page for details on all
|
||||
[Configuration]({{< relref "configuration.md" >}}) page for details on all
|
||||
those options.
|
||||
|
||||
### Adding data sources
|
||||
|
||||
- [Graphite](../datasources/graphite.md)
|
||||
- [InfluxDB](../datasources/influxdb.md)
|
||||
- [OpenTSDB](../datasources/opentsdb.md)
|
||||
- [Graphite]({{< relref "datasources/graphite.md" >}})
|
||||
- [InfluxDB]({{< relref "datasources/influxdb.md" >}})
|
||||
- [OpenTSDB]({{< relref "datasources/opentsdb.md" >}})
|
||||
- [Prometheus]({{< relref "datasources/prometheus.md" >}})
|
||||
|
||||
## Installing from binary tar file
|
||||
|
||||
Download [the latest `.tar.gz` file](http://grafana.org/download/builds) and
|
||||
Download [the latest `.tar.gz` file](http://grafana.org/download) and
|
||||
extract it. This will extract into a folder named after the version you
|
||||
downloaded. This folder contains all files required to run Grafana. There are
|
||||
no init scripts or install scripts in this package.
|
||||
|
@ -1,17 +1,18 @@
|
||||
---
|
||||
page_title: Installing using Docker
|
||||
page_description: Grafana Installation guide using Docker container
|
||||
page_keywords: grafana, installation, docker, container, guide
|
||||
---
|
||||
+++
|
||||
title = "Installing using Docker"
|
||||
description = "Installing Grafana using Docker guide"
|
||||
keywords = ["grafana", "configuration", "documentation", "docker"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Installing using Docker"
|
||||
identifier = "docker"
|
||||
parent = "installation"
|
||||
weight = 4
|
||||
+++
|
||||
|
||||
# Installing using Docker
|
||||
|
||||
> **2.0.2 -> 2.1.0 Upgrade NOTICE!**
|
||||
> The data and log paths were not correct in the previous image. The grafana database was placed by default in /usr/share/grafana/data instead of the correct path /var/lib/grafana. This means it was not in a dir that was marked as a volume. So if you remove the container it will remove the grafana database. So before updating make sure you copy the /usr/share/grafana/data path from inside the container to the host.
|
||||
|
||||
## Install from official docker image
|
||||
|
||||
Grafana has an official Docker container.
|
||||
Grafana is very easy to install and run using the offical docker container.
|
||||
|
||||
$ docker run -i -p 3000:3000 grafana/grafana
|
||||
|
||||
@ -36,6 +37,6 @@ an `ENV` instruction.
|
||||
## Configuration
|
||||
|
||||
The back-end web server has a number of configuration options. Go the
|
||||
[Configuration](../installation/configuration.md) page for details on all
|
||||
[Configuration]({{< relref "configuration.md" >}}) page for details on all
|
||||
those options.
|
||||
|
||||
|
@ -1,37 +1,10 @@
|
||||
---
|
||||
page_title: Grafana Installation
|
||||
page_description: Install guide for Grafana.
|
||||
page_keywords: grafana, installation, documentation
|
||||
---
|
||||
|
||||
# Installation
|
||||
|
||||
Grafana is easily installed via a Debian/Ubuntu package (.deb), via
|
||||
Redhat/Centos package (.rpm) or manually via a tarball that contains all
|
||||
required files and binaries. If you can't find a package or binary for
|
||||
your platform, you might be able to build one yourself. Read the [build
|
||||
from source](../project/building_from_source) instructions for more
|
||||
information.
|
||||
|
||||
## Platforms
|
||||
- [Installing on Debian / Ubuntu](debian.md)
|
||||
- [Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)](rpm.md)
|
||||
- [Installing on Mac OS X](mac.md)
|
||||
- [Installing on Windows](windows.md)
|
||||
- [Installing on Docker](docker.md)
|
||||
- [Installing using Provisioning (Chef, Puppet, Salt, Ansible, etc)](provisioning.md)
|
||||
- [Nightly Builds](http://grafana.org/download/builds.html)
|
||||
|
||||
## Configuration
|
||||
|
||||
The back-end web server has a number of configuration options. Go the
|
||||
[Configuration](/installation/configuration) page for details on all
|
||||
those options.
|
||||
|
||||
## Adding data sources
|
||||
|
||||
- [Graphite](../datasources/graphite.md)
|
||||
- [InfluxDB](../datasources/influxdb.md)
|
||||
- [OpenTSDB](../datasources/opentsdb.md)
|
||||
|
||||
+++
|
||||
title = "Installation"
|
||||
description = "Install guide for Grafana"
|
||||
keywords = ["grafana", "installation", "documentation"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Installation"
|
||||
identifier = "installation"
|
||||
+++
|
||||
|
||||
|
@ -1,17 +1,23 @@
|
||||
---
|
||||
page_title: LDAP Integration
|
||||
page_description: LDAP Integration guide for Grafana.
|
||||
page_keywords: grafana, ldap, configuration, documentation, integration
|
||||
---
|
||||
+++
|
||||
title = "LDAP Authentication"
|
||||
description = "Grafana LDAP Authentication Guide "
|
||||
keywords = ["grafana", "configuration", "documentation", "ldap"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "LDAP Authentication"
|
||||
identifier = "ldap"
|
||||
parent = "admin"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
# LDAP Integration
|
||||
# LDAP Authentication
|
||||
|
||||
Grafana (2.1 and newer) ships with a strong LDAP integration feature. The LDAP integration in Grafana allows your
|
||||
Grafana users to login with their LDAP credentials. You can also specify mappings between LDAP
|
||||
group memberships and Grafana Organization user roles.
|
||||
|
||||
## Configuration
|
||||
You turn on LDAP in the [main config file](../configuration/#authldap) as well as specify the path to the LDAP
|
||||
You turn on LDAP in the [main config file]({{< relref "configuration.md#auth-ldap" >}}) as well as specify the path to the LDAP
|
||||
specific configuration file (default: `/etc/grafana/ldap.toml`).
|
||||
|
||||
### Example config
|
||||
|
@ -1,8 +1,13 @@
|
||||
---
|
||||
page_title: Installing on Mac OS X
|
||||
page_description: Grafana Installation guide for Mac OS X
|
||||
page_keywords: grafana, installation, mac, osx, guide
|
||||
---
|
||||
+++
|
||||
title = "Installing on Mac"
|
||||
description = "Installing Grafana on Mac"
|
||||
keywords = ["grafana", "configuration", "documentation", "mac", "homebrew", "osx"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "installation"
|
||||
weight = 4
|
||||
+++
|
||||
|
||||
|
||||
# Installing on Mac
|
||||
|
||||
|
@ -1,8 +1,17 @@
|
||||
---
|
||||
page_title: Migrating from v1.x to 2.x
|
||||
page_description: Migration guide for Grafana v1.x to v2.x
|
||||
page_keywords: grafana, installation, migration, documentation
|
||||
---
|
||||
+++
|
||||
title = "Migrating from older versions"
|
||||
description = "Upgrading & Migrating Grafana from older versions"
|
||||
keywords = ["grafana", "configuration", "documentation", "migration"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "installation"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
# Migrating from older versions
|
||||
|
||||
Normally new versions of Grafana are backward compatible. Any changes to database or dashboard schema will
|
||||
be automatically migrated when Grafana-server start up without any user action required.
|
||||
|
||||
# Migrating from v1.x to v2.x
|
||||
|
||||
@ -20,8 +29,7 @@ migrate to Grafana 2.0.
|
||||
## Adding Data sources
|
||||
|
||||
The `config.js` file has been deprecated. Data sources are now managed via
|
||||
the UI or [HTTP API](../http_api/overview.md). Manage your
|
||||
organizations data sources by clicking on the `Data Sources` menu on the
|
||||
the UI or HTTP API. Manage your organizations data sources by clicking on the `Data Sources` menu on the
|
||||
side menu (which can be toggled via the Grafana icon in the upper left
|
||||
of your browser).
|
||||
|
||||
@ -53,7 +61,7 @@ sure your Elasticsearch data source is added. Specify the Elasticsearch
|
||||
index name where your existing Grafana v1.x dashboards are stored
|
||||
(the default is `grafana-dash`).
|
||||
|
||||

|
||||

|
||||
|
||||
### Importing dashboards from InfluxDB
|
||||
|
||||
@ -66,7 +74,7 @@ your Grafana v1.x dashboards are stored, the default is `grafana`.
|
||||
Go to the `Dashboards` view and click on the dashboards search drop
|
||||
down. Click the `Import` button at the bottom of the search drop down.
|
||||
|
||||

|
||||

|
||||
|
||||
### Import view
|
||||
|
||||
@ -74,7 +82,7 @@ In the Import view you find the section `Migrate dashboards`. Pick the
|
||||
data source you added (from Elasticsearch or InfluxDB), and click the
|
||||
`Import` button.
|
||||
|
||||

|
||||

|
||||
|
||||
Your dashboards should be automatically imported into the Grafana 2.0
|
||||
back-end.
|
||||
|
@ -1,22 +0,0 @@
|
||||
---
|
||||
page_title: Performance Tips
|
||||
page_description: Grafana performance tips
|
||||
page_keywords: grafana, performance, documentation
|
||||
---
|
||||
|
||||
# Performance tips
|
||||
|
||||
## Graphite
|
||||
|
||||
Graphite 0.9.14 adds a much needed feature to the JSON rendering API
|
||||
that is very important for Grafana. If you are experiencing slow load &
|
||||
rendering times for large time ranges then it is most likely caused by
|
||||
running Graphite 0.9.12 or lower.
|
||||
|
||||
The latest version of Graphite adds a `maxDataPoints` parameter to the
|
||||
JSON render API. Without this feature Graphite can return hundreds of
|
||||
thousands of data points per graph, which can hang your browser. Be sure
|
||||
to upgrade to
|
||||
[0.9.14](http://graphite.readthedocs.org/en/latest/releases/0_9_14.html).
|
||||
|
||||
|
@ -1,20 +1,23 @@
|
||||
---
|
||||
page_title: Provisioning
|
||||
page_description: Grafana provisioning
|
||||
page_keywords: grafana, provisioning, documentation
|
||||
---
|
||||
+++
|
||||
title = "Installing via provisioning tools"
|
||||
description = "Guide to install Grafana via provisioning tools like puppet & chef"
|
||||
keywords = ["grafana", "provisioning", "documentation", "puppet", "chef", "ansible"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "installation"
|
||||
weight = 8
|
||||
+++
|
||||
|
||||
# Provisioning
|
||||
|
||||
# Installing via provisioning tools
|
||||
|
||||
Here are links for how to install Grafana (and some include Graphite or
|
||||
InfluxDB as well) via a provisioning system. These are not maintained by
|
||||
any core Grafana team member and might be out of date.
|
||||
|
||||
Some of the linked cookbooks/manifests/etc. will install and configure Grafana 2.x, while some will only install the older Grafana 1.x versions. They've been broken apart below for your convenience.
|
||||
|
||||
### Puppet
|
||||
|
||||
* [forge.puppetlabs.com/bfraser/grafana](https://forge.puppetlabs.com/bfraser/grafana) **Note:** The current version works with Grafana 2.x. To install older versions of Grafana use the 1.x series of releases.
|
||||
* [forge.puppetlabs.com/bfraser/grafana](https://forge.puppetlabs.com/bfraser/grafana)
|
||||
|
||||
### Ansible
|
||||
|
||||
@ -25,6 +28,6 @@ Some of the linked cookbooks/manifests/etc. will install and configure Grafana 2
|
||||
|
||||
### Chef
|
||||
|
||||
* [github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana) **Note:** The current version works with Grafana 2.x. To install older versions of Grafana use the 1.x series of releases.
|
||||
* [github.com/JonathanTron/chef-grafana](https://github.com/JonathanTron/chef-grafana)
|
||||
* [github.com/Nordstrom/grafana2-cookbook](https://github.com/Nordstrom/grafana2-cookbook)
|
||||
|
||||
|
@ -1,18 +1,22 @@
|
||||
---
|
||||
page_title: Installing on RPM-based Linux
|
||||
page_description: Grafana Installation guide for Centos, Fedora, OpenSuse, Redhat.
|
||||
page_keywords: grafana, installation, centos, fedora, opensuse, redhat, guide
|
||||
---
|
||||
+++
|
||||
title = "Installing on RPM-based Linux"
|
||||
description = "Grafana Installation guide for Centos, Fedora, OpenSuse, Redhat."
|
||||
keywords = ["grafana", "installation", "documentation", "centos", "fedora", "opensuse", "redhat"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Installing on Centos / Redhat"
|
||||
identifier = "rpm"
|
||||
parent = "installation"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
# Installing on RPM-based Linux (CentOS, Fedora, OpenSuse, RedHat)
|
||||
|
||||
## Download
|
||||
|
||||
Description | Download
|
||||
------------ | -------------
|
||||
Stable .RPM for CentOS / Fedora / OpenSuse / Redhat Linux | [3.1.1 (x86-64 rpm)](https://grafanarel.s3.amazonaws.com/builds/grafana-3.1.1-1470047149.x86_64.rpm)
|
||||
|
||||
## Install Latest Stable
|
||||
## Install Stable
|
||||
|
||||
You can install Grafana using Yum directly.
|
||||
|
||||
@ -106,18 +110,34 @@ By default Grafana will log to `/var/log/grafana`
|
||||
|
||||
The default configuration specifies a sqlite3 database located at
|
||||
`/var/lib/grafana/grafana.db`. Please backup this database before
|
||||
upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on [the configuration page](configuration.md#database).
|
||||
upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on [the configuration page]({{< relref "configuration.md#database" >}}).
|
||||
|
||||
## Configuration
|
||||
|
||||
The configuration file is located at `/etc/grafana/grafana.ini`. Go the
|
||||
[Configuration](/installation/configuration) page for details on all
|
||||
[Configuration]({{< relref "configuration.md" >}}) page for details on all
|
||||
those options.
|
||||
|
||||
### Adding data sources
|
||||
|
||||
- [Graphite](../datasources/graphite.md)
|
||||
- [InfluxDB](../datasources/influxdb.md)
|
||||
- [OpenTSDB](../datasources/opentsdb.md)
|
||||
- [Graphite]({{< relref "datasources/graphite.md" >}})
|
||||
- [InfluxDB]({{< relref "datasources/influxdb.md" >}})
|
||||
- [OpenTSDB]({{< relref "datasources/opentsdb.md" >}})
|
||||
- [Prometheus]({{< relref "datasources/prometheus.md" >}})
|
||||
|
||||
|
||||
## Installing from binary tar file
|
||||
|
||||
Download [the latest `.tar.gz` file](http://grafana.org/download) and
|
||||
extract it. This will extract into a folder named after the version you
|
||||
downloaded. This folder contains all files required to run Grafana. There are
|
||||
no init scripts or install scripts in this package.
|
||||
|
||||
To configure Grafana add a configuration file named `custom.ini` to the
|
||||
`conf` folder and override any of the settings defined in
|
||||
`conf/defaults.ini`.
|
||||
|
||||
Start Grafana by executing `./bin/grafana-server web`. The `grafana-server`
|
||||
binary needs the working directory to be the root install directory (where the
|
||||
binary and the `public` folder is located).
|
||||
|
||||
|
@ -1,6 +1,13 @@
|
||||
page_title: Troubleshooting
|
||||
page_description: Troubleshooting
|
||||
page_keywords: grafana, support, documentation
|
||||
+++
|
||||
title = "Troubleshooting"
|
||||
description = "Guide to troubleshooting Grafana problems"
|
||||
keywords = ["grafana", "troubleshooting", "documentation", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "admin"
|
||||
weight = 8
|
||||
+++
|
||||
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
@ -16,7 +23,7 @@ with Grafana being unable to query Graphite, OpenTSDB or InfluxDB. You
|
||||
might not be able to get metric name completion or the graph might show
|
||||
an error like this:
|
||||
|
||||

|
||||

|
||||
|
||||
For some types of errors, the `View details` link will show you error
|
||||
details. For many types of HTTP connection errors, however, there is very
|
||||
@ -24,7 +31,7 @@ little information. The best way to troubleshoot these issues is use
|
||||
the [Chrome developer tools](https://developer.chrome.com/devtools/index).
|
||||
By pressing `F12` you can bring up the chrome dev tools.
|
||||
|
||||

|
||||

|
||||
|
||||
There are two important tabs in the Chrome developer tools: `Network`
|
||||
and `Console`. The `Console` tab will show you Javascript errors and
|
||||
@ -42,32 +49,10 @@ chrome console error, request and response information from the
|
||||
|
||||
### Inspecting Grafana metric requests
|
||||
|
||||

|
||||

|
||||
|
||||
After opening the Chrome developer tools for the first time the
|
||||
`Network` tab is empty. You will need to refresh the page to get
|
||||
requests to show. For some type of errors, especially CORS-related,
|
||||
there might not be a response at all.
|
||||
|
||||
## Graphite connection issues
|
||||
|
||||
If your Graphite web server is on another domain or IP address from your
|
||||
Grafana web server you will need to [setup
|
||||
CORS](../install/#graphite-server-config) (Cross Origin Resource
|
||||
Sharing).
|
||||
|
||||
You know if you are having CORS-related issues if you get an error like
|
||||
this in the Chrome developer tools:
|
||||
|
||||

|
||||
|
||||
If the request failed on method `OPTIONS` then you need to review your
|
||||
Graphite web server configuration.
|
||||
|
||||
## Only blank white page
|
||||
|
||||
When you load Grafana and all you get is a blank white page then you
|
||||
probably have a Javascript syntax error in `config.js`. In the Chrome
|
||||
developer tools console you will quickly identify the line of the syntax
|
||||
error.
|
||||
|
||||
|
@ -1,13 +1,16 @@
|
||||
---
|
||||
page_title: Installing on Windows
|
||||
page_description: Grafana Installation guide for Windows
|
||||
page_keywords: grafana, installation, windows guide
|
||||
---
|
||||
+++
|
||||
title = "Installing on Windows"
|
||||
description = "Installing Grafana on Windows"
|
||||
keywords = ["grafana", "configuration", "documentation", "windows"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "installation"
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
|
||||
# Installing on Windows
|
||||
|
||||
## Download
|
||||
|
||||
Description | Download
|
||||
------------ | -------------
|
||||
Stable Zip package for Windows | [grafana.3.1.1.windows-x64.zip](https://grafanarel.s3.amazonaws.com/winbuilds/dist/grafana-3.1.1.windows-x64.zip)
|
||||
@ -29,7 +32,7 @@ command line. If you want to run Grafana as windows service, download
|
||||
[NSSM](https://nssm.cc/). It is very easy add Grafana as a Windows
|
||||
service using that tool.
|
||||
|
||||
Read more about the [configuration options](/installation/configuration).
|
||||
Read more about the [configuration options]({{< relref "configuration.md" >}}).
|
||||
|
||||
## Building on Windows
|
||||
|
||||
|
@ -11,7 +11,7 @@ App plugins is a new kind of grafana plugin that can bundle datasource and panel
|
||||
|
||||
Datasource and panel plugins will show up like normal plugins. The app pages will be available in the main menu.
|
||||
|
||||
<img class="no-shadow" src="/img/v3/app-in-main-menu.png">
|
||||
<img class="no-shadow" src="img/v3/app-in-main-menu.png">
|
||||
|
||||
## Enabling app plugins
|
||||
After installing an app it have to be enabled before it show up as an datasource or panel. You can do that on the app page in the config tab.
|
||||
|
@ -1,9 +1,3 @@
|
||||
---
|
||||
page_title: Plugin datasources
|
||||
page_description: Datasource plugins for Grafana
|
||||
page_keywords: grafana, plugins, documentation
|
||||
---
|
||||
|
||||
|
||||
# Datasources
|
||||
|
||||
|
@ -1,10 +1,14 @@
|
||||
---
|
||||
page_title: Plugin development guide
|
||||
page_description: Plugin development for Grafana
|
||||
page_keywords: grafana, plugins, documentation, development
|
||||
---
|
||||
+++
|
||||
title = "Developer Guide"
|
||||
type = "docs"
|
||||
aliases = ["/plugins/datasources/", "/plugins/apps/", "/plugins/panels/"]
|
||||
[menu.docs]
|
||||
name = "Developer Guide"
|
||||
parent = "plugins"
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
# Plugin development
|
||||
# Developer Guide
|
||||
|
||||
From grafana 3.0 it's very easy to develop your own plugins and share them with other grafana users.
|
||||
|
||||
@ -32,6 +36,7 @@ will be expected to export different things. You can find what's expected for [d
|
||||
and [apps](./apps.md) plugins in the documentation.
|
||||
|
||||
## Start developing your plugin
|
||||
|
||||
There are three ways that you can start developing a Grafana plugin.
|
||||
|
||||
1. Setup a Grafana development environment. [(described here)](http://docs.grafana.org/project/building_from_source/) and place your plugin in the ```data/plugins``` folder.
|
||||
@ -45,8 +50,11 @@ the folder contains a subfolder named dist. In that case grafana will mount the
|
||||
This makes it possible to have both built and src content in the same plugin git repo.
|
||||
|
||||
## Examples
|
||||
|
||||
We currently have three different examples that you can fork/download to get started developing your grafana plugin.
|
||||
|
||||
- [simple-json-datasource](https://github.com/grafana/simple-json-datasource) (small datasource plugin for querying json data from backends)
|
||||
- [piechart-panel](https://github.com/grafana/piechart-panel)
|
||||
- [example-app](https://github.com/grafana/example-app)
|
||||
- [clock-panel](https://github.com/grafana/clock-panel)
|
||||
- [singlestat-panel](https://github.com/grafana/grafana/blob/master/public/app/plugins/panel/singlestat/module.ts)
|
||||
- [piechart-panel](https://github.com/grafana/piechart-panel)
|
||||
|
@ -1,8 +1,11 @@
|
||||
---
|
||||
page_title: Plugin overview
|
||||
page_description: Plugins for Grafana
|
||||
page_keywords: grafana, plugins, documentation
|
||||
---
|
||||
+++
|
||||
title = "Plugins"
|
||||
[menu.docs]
|
||||
name = "Plugins"
|
||||
identifier = "plugins"
|
||||
weight = 8
|
||||
+++
|
||||
|
||||
|
||||
# Plugins
|
||||
|
||||
|
@ -1,14 +1,30 @@
|
||||
---
|
||||
page_title: Plugin installation
|
||||
page_description: Plugin installation for Grafana
|
||||
page_keywords: grafana, plugins, documentation
|
||||
---
|
||||
+++
|
||||
title = "Installing Plugins"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "plugins"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Grafana Plugins
|
||||
|
||||
From Grafana 3.0+ not only are datasource plugins supported but also panel plugins and apps.
|
||||
Having panels as plugins make it easy to create and add any kind of panel, to show your data
|
||||
or improve your favorite dashboards. Apps is something new in Grafana that enables
|
||||
bundling of datasources, panels, dashboards and Grafana pages into a cohesive experience.
|
||||
|
||||
Grafana already have a strong community of contributors and plugin developers.
|
||||
By making it easier to develop and install plugins we hope that the community
|
||||
can grow even stronger and develop new plugins that we would never think about.
|
||||
|
||||
To discover plugins checkout the official [Plugin Repository](https://grafana.net/plugins).
|
||||
|
||||
# Installing plugins
|
||||
|
||||
The easiest way to install plugins is by using the CLI tool grafana-cli which is bundled with grafana. Before any modification take place after modifying plugins, grafana-server needs to be restarted.
|
||||
|
||||
### Grafana plugin directory
|
||||
|
||||
On Linux systems the grafana-cli will assume that the grafana plugin directory is `/var/lib/grafana/plugins`. It's possible to override the directory which grafana-cli will operate on by specifying the --pluginsDir flag. On Windows systems this parameter have to be specified for every call.
|
||||
|
||||
### Grafana-cli commands
|
||||
|
@ -5,6 +5,15 @@ page_keywords: grafana, plugins, documentation
|
||||
---
|
||||
|
||||
|
||||
+++
|
||||
title = "Installing Plugins"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "plugins"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
|
||||
# Panels
|
||||
|
||||
Panels are the main building blocks of dashboards.
|
||||
|
@ -1,8 +1,10 @@
|
||||
---
|
||||
page_title: Building from source
|
||||
page_description: Building from source Grafana.
|
||||
page_keywords: grafana, build, contribute, documentation
|
||||
---
|
||||
+++
|
||||
title = "Building from source"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "installation"
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
# Building Grafana from source
|
||||
|
||||
@ -24,7 +26,7 @@ go get github.com/grafana/grafana
|
||||
## Building the backend
|
||||
```
|
||||
cd $GOPATH/src/github.com/grafana/grafana
|
||||
go run build.go setup
|
||||
go run build.go setup
|
||||
go run build.go build # (or 'go build ./pkg/cmd/grafana-server')
|
||||
```
|
||||
|
||||
|
@ -1,8 +1,13 @@
|
||||
----
|
||||
page_title: Administration
|
||||
page_description: Grafana Administration
|
||||
page_keywords: grafana, admin, administration, documentation
|
||||
---
|
||||
+++
|
||||
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
|
||||
|
||||
@ -22,7 +27,7 @@ modify Organization details and options.
|
||||
|
||||
## Grafana Administrators
|
||||
|
||||
<img src="/img/v2/admin_sidenav.png" class="right" style="margin-left: 15px">
|
||||
<img src="img/v2/admin_sidenav.png" class="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.
|
||||
|
||||
@ -32,6 +37,6 @@ From the Grafana Server Admin page, you can access the System Info page which su
|
||||
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
|
@ -1,15 +1,19 @@
|
||||
----
|
||||
page_title: Annotations
|
||||
page_description: Annotations user guide
|
||||
page_keywords: grafana, annotations, guide, documentation
|
||||
---
|
||||
+++
|
||||
title = "Annotations"
|
||||
keywords = ["grafana", "annotations", "documentation", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Annotations"
|
||||
parent = "dashboard_features"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
# Annotations
|
||||
|
||||
Annotations provide a way to mark points on the graph with rich events. When you hover over an annotation
|
||||
you can get title, tags, and text information for the event.
|
||||
|
||||

|
||||

|
||||
|
||||
To add an annotation query click dashboard settings icon in top menu and select `Annotations` from the
|
||||
dropdown. This will open the `Annotations` edit view. Click the `Add` tab to add a new annotation query.
|
||||
@ -24,7 +28,7 @@ Graphite supports two ways to query annotations.
|
||||
- Graphite events query, use the `Graphite event tags` text input, specify an tag or wildcard (leave empty should also work)
|
||||
|
||||
## Elasticsearch annotations
|
||||

|
||||

|
||||
|
||||
Grafana can query any Elasticsearch index for annotation events. The index name can be the name of an alias or an index wildcard pattern.
|
||||
You can leave the search query blank or specify a lucene query.
|
||||
@ -35,13 +39,14 @@ as the name for the fields that should be used for the annotation title, tags an
|
||||
> **Note** The annotation timestamp field in elasticsearch need to be in UTC format.
|
||||
|
||||
## InfluxDB Annotations
|
||||

|
||||

|
||||
|
||||
For InfluxDB you need to enter a query like in the above screenshot. You need to have the ```where $timeFilter``` part.
|
||||
If you only select one column you will not need to enter anything in the column mapping fields.
|
||||
|
||||
## Prometheus Annotations
|
||||

|
||||
|
||||

|
||||
|
||||
Prometheus supports two ways to query annotations.
|
||||
|
||||
|
@ -1,13 +1,15 @@
|
||||
----
|
||||
page_title: Dashboard JSON
|
||||
page_description: Dashboard JSON Reference
|
||||
page_keywords: grafana, dashboard, json, documentation
|
||||
---
|
||||
+++
|
||||
title = "JSON Model"
|
||||
keywords = ["grafana", "dashboard", "documentation", "json", "model"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "JSON Model"
|
||||
parent = "dashboard_features"
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Dashboard JSON
|
||||
|
||||
## Overview
|
||||
|
||||
A dashboard in Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from rows, panels, template variables, panel queries, etc.
|
||||
|
||||
To view the JSON of a dashboard, follow the steps mentioned below:
|
||||
|
@ -1,29 +1,32 @@
|
||||
----
|
||||
page_title: Dashlist Panel
|
||||
page_description: Dashlist Panel Reference
|
||||
page_keywords: grafana, dashlist, panel, documentation
|
||||
---
|
||||
+++
|
||||
title = "Dashboard List"
|
||||
keywords = ["grafana", "dashboard list", "documentation", "panel", "dashlist"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Dashboard list"
|
||||
parent = "panels"
|
||||
weight = 4
|
||||
+++
|
||||
|
||||
# Dashlist Panel
|
||||
|
||||
## Overview
|
||||
# Dashboard List Panel
|
||||
|
||||
The dashboard list panel allows you to display dynamic links to other dashboards. The list can be configured to use starred dashboards, a search query and/or dashboard tags.
|
||||
The dashboard list panel allows you to display dynamic links to other dashboards. The list can be configured to use starred dashboards, a search query and/or dashboard tags.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/dashboard_list_panels.png">
|
||||
<img class="no-shadow" src="img/docs/v2/dashboard_list_panels.png">
|
||||
|
||||
> On each dashboard load, the dashlist panel will re-query the dashboard list, always providing the most up to date results.
|
||||
|
||||
## Mode: Starred Dashboards
|
||||
|
||||
The `starred` dashboard selection displays starred dashboards, up to the number specified in the `Limit Number to` field, in alphabetical order. On dashboard load, the dashlist panel will re-query the favorites to appear in dashboard list panel, always providing the most up to date results.
|
||||
The `starred` dashboard selection displays starred dashboards, up to the number specified in the `Limit Number to` field, in alphabetical order. On dashboard load, the dashlist panel will re-query the favorites to appear in dashboard list panel, always providing the most up to date results.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/dashboard_list_config_starred.png">
|
||||
<img class="no-shadow" src="img/docs/v2/dashboard_list_config_starred.png">
|
||||
|
||||
|
||||
## Mode: Search Dashboards
|
||||
|
||||
The panel may be configured to search by either string query or tag(s). On dashboard load, the dashlist panel will re-query the dashboard list, always providing the most up to date results.
|
||||
The panel may be configured to search by either string query or tag(s). On dashboard load, the dashlist panel will re-query the dashboard list, always providing the most up to date results.
|
||||
|
||||
To configure dashboard list in this manner, select `search` from the Mode select box. When selected, the Search Options section will appear.
|
||||
|
||||
@ -38,14 +41,14 @@ Limit number to | Specify the maximum number of dashboards
|
||||
|
||||
### Search by string
|
||||
|
||||
To search by a string, enter a search query in the `Search Options: Query` field. Queries are case-insensitive, and partial values are accepted.
|
||||
<img class="no-shadow" src="/img/v2/dashboard_list_config_string.png">
|
||||
To search by a string, enter a search query in the `Search Options: Query` field. Queries are case-insensitive, and partial values are accepted.
|
||||
<img class="no-shadow" src="img/docs/v2/dashboard_list_config_string.png">
|
||||
|
||||
### Search by tag
|
||||
To search by one or more tags, enter your selection in the `Search Options: Tags:` field. Note that existing tags will not appear as you type, and *are* case sensitive. To see a list of existing tags, you can always return to the dashboard, open the Dashboard Picker at the top and click `tags` link in the search bar.
|
||||
<img class="no-shadow" src="/img/v2/dashboard_list_config_tags.png">
|
||||
To search by one or more tags, enter your selection in the `Search Options: Tags:` field. Note that existing tags will not appear as you type, and *are* case sensitive. To see a list of existing tags, you can always return to the dashboard, open the Dashboard Picker at the top and click `tags` link in the search bar.
|
||||
<img class="no-shadow" src="img/docs/v2/dashboard_list_config_tags.png">
|
||||
|
||||
> When multiple tags and strings appear, the dashboard list will display those matching ALL conditions.
|
||||
> When multiple tags and strings appear, the dashboard list will display those matching ALL conditions.
|
||||
|
||||
|
||||
|
||||
|
@ -1,18 +1,23 @@
|
||||
---
|
||||
page_title: Export & Import Guide
|
||||
page_description: Export & Import Guide for Grafana
|
||||
page_keywords: grafana, export, import, documentation
|
||||
---
|
||||
+++
|
||||
title = "Export & Import"
|
||||
keywords = ["grafana", "dashboard", "documentation", "export", "import"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "dashboard_features"
|
||||
weight = 8
|
||||
+++
|
||||
|
||||
# Export and Import
|
||||
|
||||
Grafana Dashboads can easily be exported and imported, either from the UI or from the HTTP API.
|
||||
|
||||
## Exporting a dashboard
|
||||
|
||||
Dashboards are exported in Grafana JSON format, and contain everything you need (layout, variables, styles, data sources, queries, etc)to import the dashboard at a later time.
|
||||
|
||||
The export feature is accessed from the share menu.
|
||||
|
||||
<img src="/img/v31/export_menu.png">
|
||||
<img src="img/docs/v31/export_menu.png">
|
||||
|
||||
### Making a dashboard portable
|
||||
|
||||
@ -26,12 +31,12 @@ the dashboard, and will also be added as an required input when the dashboard is
|
||||
|
||||
To import a dashboard open dashboard search and then hit the import button.
|
||||
|
||||
<img src="/img/v31/import_step1.png">
|
||||
<img src="img/docs/v31/import_step1.png">
|
||||
|
||||
From here you can upload a dashboard json file, paste a [Grafana.net](https://grafana.net) dashboard
|
||||
url or paste dashboard json text directly into the text area.
|
||||
|
||||
<img src="/img/v31/import_step2.png">
|
||||
<img src="img/docs/v31/import_step2.png">
|
||||
|
||||
In step 2 of the import process Grafana will let you change the name of the dashboard, pick what
|
||||
data source you want the dashboard to use and specify any metric prefixes (if the dashboard use any).
|
||||
@ -40,7 +45,7 @@ data source you want the dashboard to use and specify any metric prefixes (if th
|
||||
|
||||
Find dashboads for common server applications at [Grafana.net/dashboards](https://grafana.net/dashboards).
|
||||
|
||||
<img src="/img/v31/gnet_dashboards_list.png">
|
||||
<img src="img/docs/v31/gnet_dashboards_list.png">
|
||||
|
||||
## Import & Sharing with Grafana 2.x or 3.0
|
||||
|
||||
|
@ -1,20 +1,24 @@
|
||||
----
|
||||
page_title: Graph Panel
|
||||
page_description: Graph Panel Reference
|
||||
page_keywords: grafana, graph, panel, documentation
|
||||
---
|
||||
+++
|
||||
title = "Graph Panel"
|
||||
keywords = ["grafana", "graph panel", "documentation", "guide", "graph"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Graph"
|
||||
parent = "panels"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Graph Panel
|
||||
|
||||
The main panel in Grafana is simply named Graph. It provides a very rich set of graphing options.
|
||||
|
||||
<img src="/img/v1/graph_overview.png" class="no-shadow">
|
||||
<img src="img/docs/v1/graph_overview.png" class="no-shadow">
|
||||
|
||||
Clicking the title for a panel exposes a menu. The `edit` option opens additional configuration
|
||||
options for the panel.
|
||||
|
||||
## General
|
||||

|
||||

|
||||
|
||||
The general tab allows customization of a panel's appearance and menu options.
|
||||
|
||||
@ -52,7 +56,7 @@ options.
|
||||
|
||||
## Axes & Grid
|
||||
|
||||

|
||||

|
||||
|
||||
The Axes & Grid tab controls the display of axes, grids and legend.
|
||||
|
||||
@ -91,11 +95,11 @@ The legend values are calculated client side by Grafana and depend on what type
|
||||
aggregation or point consolidation you metric query is using. All the above legend values cannot
|
||||
be correct at the same time. For example if you plot a rate like requests/second, this is probably
|
||||
using average as aggregator, then the Total in the legend will not represent the total number of requests.
|
||||
It is just the sum of all data data points received by Grafana.
|
||||
It is just the sum of all data points received by Grafana.
|
||||
|
||||
## Display styles
|
||||
|
||||

|
||||

|
||||
|
||||
Display styles controls properties of the graph.
|
||||
|
||||
@ -140,4 +144,4 @@ a thicker line width to make it standout.
|
||||
|
||||
## Time range
|
||||
|
||||

|
||||

|
||||
|
@ -1,7 +1,11 @@
|
||||
page_title: Keyboard Shortcuts
|
||||
page_description: Keyboard Shortcuts for Grafana
|
||||
page_keywords: grafana, export, import, documentation
|
||||
---
|
||||
+++
|
||||
title = "Keyboard shortcuts"
|
||||
keywords = ["grafana", "dashboard", "documentation", "shortcuts"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "dashboard_features"
|
||||
weight = 8
|
||||
+++
|
||||
|
||||
# Keyboard Shortcuts
|
||||
|
||||
@ -11,7 +15,7 @@ No mouse? No problem. Grafana has extensive keyboard shortcuts to allow you to n
|
||||
|
||||
Press `Shift`+`?` to open the keyboard shortcut dialog from anywhere within the dashboard views.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/Grafana-Keyboard-Shortcuts.gif" style="width:80%;">
|
||||
<img class="no-shadow" src="img/docs/v2/Grafana-Keyboard-Shortcuts.gif" style="width:80%;">
|
||||
|
||||
|
||||
|Shortcut|Action|
|
||||
|
@ -1,8 +1,12 @@
|
||||
---
|
||||
page_title: Playlist Guide
|
||||
page_description: Playlist guide for Grafana
|
||||
page_keywords: grafana, playlist, documentation
|
||||
---
|
||||
+++
|
||||
title = "Playlist"
|
||||
keywords = ["grafana", "dashboard", "documentation", "playlist"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "dashboard_features"
|
||||
weight = 4
|
||||
+++
|
||||
|
||||
|
||||
# Playlist
|
||||
|
||||
@ -12,9 +16,9 @@ Since Grafana automatically scales Dashboards to any resolution they're perfect
|
||||
|
||||
## Creating a Playlist
|
||||
|
||||
The Playlist feature can be accessed from Grafana's sidemenu. Click the 'Playlist' button from the sidemenu to access the Playlist functionality. When 'Playlist' button is clicked, playlist view will open up showing saved playlists and an option to create new playlists.
|
||||
{{< docs-imagebox img="img/docs/v3/playlist.png" max-width="25rem" >}}
|
||||
|
||||
<img src="/img/v3/playlist.png" class="no-shadow">
|
||||
The Playlist feature can be accessed from Grafana's sidemenu, in the Dashboard submenu.
|
||||
|
||||
Click on "New Playlist" button to create a new playlist. Firstly, name your playlist and configure a time interval for Grafana to wait on a particular Dashboard before advancing to the next one on the Playlist.
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
----
|
||||
page_title: Scripted dashboards
|
||||
page_description: Scripted dashboards
|
||||
page_keywords: grafana, scripted, guide, documentation
|
||||
---
|
||||
+++
|
||||
title = "Scripted Dashboards"
|
||||
keywords = ["grafana", "dashboard", "documentation", "scripted"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "dashboard_features"
|
||||
weight = 9
|
||||
+++
|
||||
|
||||
|
||||
# Scripted Dashboards
|
||||
|
||||
|
@ -1,54 +1,58 @@
|
||||
----
|
||||
page_title: Dashboard Search
|
||||
page_description: Dashboard Search in Grafana
|
||||
page_keywords: grafana, search, guide, documentation
|
||||
---
|
||||
+++
|
||||
title = "Search"
|
||||
keywords = ["grafana", "dashboard", "documentation", "search"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "dashboard_features"
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
|
||||
# Dashboard Search
|
||||
|
||||
Dashboards can be searched by the dashboard name, filtered by one (or many) tags or filtered by starred status. The dashboard search is accessed through the dashboard picker, available in the dashboard top nav area.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/dashboard_search.png">
|
||||
<img class="no-shadow" src="img/docs/v2/dashboard_search.png">
|
||||
|
||||
1. `Dashboard Picker`: The Dashboard Picker is your primary navigation tool to move between dashboards. It is present on all dashboards, and open the Dashboard Search. The dashboard picker also doubles as the title of the current dashboard.
|
||||
2. `Search Bar`: The search bar allows you to enter any string and search both database and file based dashboards in real-time.
|
||||
3. `Starred`: The starred link allows you to filter the list to display only starred dashboards.
|
||||
4. `Tags`: The tags filter allows you to filter the list by dashboard tags.
|
||||
3. `Starred`: The starred link allows you to filter the list to display only starred dashboards.
|
||||
4. `Tags`: The tags filter allows you to filter the list by dashboard tags.
|
||||
|
||||
When using only a keyboard, you can use your keyboard arrow keys to navigate the results, hit enter to open the selected dashboard.
|
||||
|
||||
## Find by dashboard name
|
||||
|
||||
<img class="no-shadow" src="/img/v2/dashboard_search_text.gif">
|
||||
<img class="no-shadow" src="img/docs/v2/dashboard_search_text.gif">
|
||||
|
||||
To search and load dashboards click the open folder icon in the header or use the shortcut `CTRL`+`F`. Begin typing any part of the desired dashboard names. Search will return results for for any partial string match in real-time, as you type.
|
||||
To search and load dashboards click the open folder icon in the header or use the shortcut `CTRL`+`F`. Begin typing any part of the desired dashboard names. Search will return results for for any partial string match in real-time, as you type.
|
||||
|
||||
Dashboard search is:
|
||||
- Real-time
|
||||
- *Not* case sensitive
|
||||
- Functional across stored *and* file based dashboards.
|
||||
- Functional across stored *and* file based dashboards.
|
||||
|
||||
## Filter by Tag(s)
|
||||
|
||||
Tags are a great way to organize your dashboards, especially as the number of dashboards grow. Tags can be added and managed in the dashboard `Settings`.
|
||||
|
||||
To filter the dashboard list by tag, click on any tag appearing in the right column. The list may be further filtered by clicking on additional tags:
|
||||
To filter the dashboard list by tag, click on any tag appearing in the right column. The list may be further filtered by clicking on additional tags:
|
||||
|
||||
<img class="no-shadow" src="/img/v2/dashboard_search_tag_filtering.gif">
|
||||
<img class="no-shadow" src="img/docs/v2/dashboard_search_tag_filtering.gif">
|
||||
|
||||
Alternately, to see a list of all available tags, click the tags link in the search bar. All tags will be shown, and when a tag is selected, the dashboard search will be instantly filtered:
|
||||
|
||||
<img class="no-shadow" src="/img/v2/dashboard_search_tags_all_filtering.gif">
|
||||
<img class="no-shadow" src="img/docs/v2/dashboard_search_tags_all_filtering.gif">
|
||||
|
||||
When using only a keyboard: `tab` to focus on the *tags* link, `▼` down arrow key to find a tag and select with the `Enter` key.
|
||||
|
||||
**Note**: When multiple tags are selected, Grafana will show dashboards that include **all**.
|
||||
**Note**: When multiple tags are selected, Grafana will show dashboards that include **all**.
|
||||
|
||||
|
||||
## Filter by Starred
|
||||
|
||||
Starring is a great way to organize and find commonly used dashboards. To show only starred dashboards in the list, click the *starred* link in the search bar:
|
||||
|
||||
<img class="no-shadow" src="/img/v2/dashboard_search_starred_filtering.gif">
|
||||
<img class="no-shadow" src="img/docs/v2/dashboard_search_starred_filtering.gif">
|
||||
|
||||
When using only a keyboard: `tab` to focus on the *stars* link, `▼` down arrow key to find a tag and select with the `Enter` key.
|
||||
When using only a keyboard: `tab` to focus on the *stars* link, `▼` down arrow key to find a tag and select with the `Enter` key.
|
||||
|
@ -1,8 +1,11 @@
|
||||
----
|
||||
page_title: Sharing
|
||||
page_description: Sharing
|
||||
page_keywords: grafana, sharing, guide, documentation
|
||||
---
|
||||
+++
|
||||
title = "Sharing"
|
||||
keywords = ["grafana", "dashboard", "documentation", "sharing"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "dashboard_features"
|
||||
weight = 6
|
||||
+++
|
||||
|
||||
# Sharing features
|
||||
Grafana provides a number of ways to share a dashboard or a specific panel to other users within your
|
||||
@ -19,7 +22,7 @@ A dashboard snapshot is an instant way to share an interactive dashboard publicl
|
||||
(metric, template and annotation) and panel links, leaving only the visible metric data and series names embedded into your dashboard. Dashboard
|
||||
snapshots can be accessed by anyone who has the link and can reach the URL.
|
||||
|
||||

|
||||

|
||||
|
||||
### Publish snapshots
|
||||
You can publish snapshots to you local instance or to [snapshot.raintank.io](http://snapshot.raintank.io). The later is a free service
|
||||
|
@ -1,12 +1,17 @@
|
||||
----
|
||||
page_title: Singlestat Panel
|
||||
page_description: Singlestat Panel Reference
|
||||
page_keywords: grafana, singlestat, panel, documentation
|
||||
---
|
||||
+++
|
||||
title = "Singletat Panel"
|
||||
keywords = ["grafana", "dashboard", "documentation", "panels", "singlestat"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Singlestat"
|
||||
parent = "panels"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
|
||||
# Singlestat Panel
|
||||
|
||||

|
||||

|
||||
|
||||
The Singlestat Panel allows you to show the one main summary stat of a SINGLE series. It reduces the series into a single number (by looking at the max, min, average, or sum of values in the series). Singlestat also provides thresholds to color the stat or the Panel background. It can also translate the single number into a text value, and show a sparkline summary of the series.
|
||||
|
||||
@ -14,7 +19,7 @@ The Singlestat Panel allows you to show the one main summary stat of a SINGLE se
|
||||
|
||||
The singlestat panel has a normal query editor to allow you define your exact metric queries like many other Panels. Through the Options tab, you can access the Singlestat-specific functionality.
|
||||
|
||||
<img class="no-shadow" src="/img/v1/Singlestat-BaseSettings.png">
|
||||
<img class="no-shadow" src="img/docs/v1/Singlestat-BaseSettings.png">
|
||||
|
||||
1. `Big Value`: Big Value refers to how we display the main stat for the Singlestat Panel. This is always a single value that is displayed in the Panel in between two strings, `Prefix` and `Suffix`. The single number is calculated by choosing a function (min,max,average,current,total) of your metric query. This functions reduces your query into a single numeric value.
|
||||
2. `Font Size`: You can use this section to select the font size of the different texts in the Singlestat Panel, i.e. prefix, value and postfix.
|
||||
@ -27,19 +32,19 @@ The singlestat panel has a normal query editor to allow you define your exact me
|
||||
|
||||
The coloring options of the Singlestat Panel config allow you to dynamically change the colors based on the Singlestat value.
|
||||
|
||||
<img class="no-shadow" src="/img/v1/Singlestat-Coloring.png">
|
||||
<img class="no-shadow" src="img/docs/v1/Singlestat-Coloring.png">
|
||||
|
||||
1. `Background`: This checkbox applies the configured thresholds and colors to the entirety of the Singlestat Panel background.
|
||||
2. `Value`: This checkbox applies the configured thresholds and colors to the summary stat.
|
||||
3. `Thresholds`: Change the background and value colors dynamically within the panel, depending on the Singlestat value. The threshold field accepts **2 comma-separated** values which represent 3 ranges that correspond to the three colors directly to the right. For example: if the thresholds are 70, 90 then the first color represents < 70, the second color represents between 70 and 90 and the third color represents > 90.
|
||||
4. `Colors`: Select a color and opacity
|
||||
5. `Invert order`: This link toggles the threshold color order.</br>For example: Green, Orange, Red (<img class="no-shadow" src="/img/v1/gyr.png">) will become Red, Orange, Green (<img class="no-shadow" src="/img/v1/ryg.png">).
|
||||
5. `Invert order`: This link toggles the threshold color order.</br>For example: Green, Orange, Red (<img class="no-shadow" src="img/docs(v1/gyr.png">) will become Red, Orange, Green (<img class="no-shadow" src="img/docs/v1/ryg.png">).
|
||||
|
||||
### Spark Lines
|
||||
|
||||
Sparklines are a great way of seeing the historical data related to the summary stat, providing valuable context at a glance. Sparklines act differently than traditional Graph Panels and do not include x or y axis, coordinates, a legend, or ability to interact with the graph.
|
||||
|
||||
<img class="no-shadow" src="/img/v1/Singlestat-Sparklines.png">
|
||||
<img class="no-shadow" src="img/docs/v1/Singlestat-Sparklines.png">
|
||||
|
||||
1. `Show`: The show checkbox will toggle whether the spark line is shown in the Panel. When unselected, only the Singlestat value will appear.
|
||||
2. `Background`: Check if you want the sparklines to take up the full panel width, or uncheck if they should be below the main Singlestat value.
|
||||
@ -52,13 +57,13 @@ Sparklines are a great way of seeing the historical data related to the summary
|
||||
|
||||
Value to text mapping allows you to translate the value of the summary stat into explicit text. The text will respect all styling, thresholds and customization defined for the value. This can be useful to translate the number of the main Singlestat value into a context-specific human-readable word or message.
|
||||
|
||||
<img class="no-shadow" src="/img/v1/Singlestat-ValueMapping.png">
|
||||
<img class="no-shadow" src="img/docs/v1/Singlestat-ValueMapping.png">
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Multiple Series Error
|
||||
|
||||
<img class="no-shadow" src="/img/v2/Singlestat-MultiSeriesError.png">
|
||||
<img class="no-shadow" src="img/docs/v2/Singlestat-MultiSeriesError.png">
|
||||
|
||||
|
||||
Grafana 2.5 introduced stricter checking for multiple-series on singlestat panels. In previous versions, the panel logic did not verify that only a single series was used, and instead, displayed the first series encountered. Depending on your data source, this could have lead to inconsistent data being shown and/or a general confusion about which metric was being displayed.
|
||||
|
@ -1,12 +1,17 @@
|
||||
----
|
||||
page_title: Table Panel
|
||||
page_description: Table Panel Reference
|
||||
page_keywords: grafana, table, panel, documentation
|
||||
---
|
||||
+++
|
||||
title = "Table Panel"
|
||||
keywords = ["grafana", "dashboard", "documentation", "panels", "table panel"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Table"
|
||||
parent = "panels"
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
|
||||
# Table Panel
|
||||
|
||||
<img src="/img/v2/table-panel.png">
|
||||
<img src="assets/img/features/table-panel.png">
|
||||
|
||||
The new table panel is very flexible, supporting both multiple modes for time series as well as for
|
||||
table, annotation and raw JSON data. It also provides date formatting and value formatting and coloring options.
|
||||
@ -17,7 +22,7 @@ To view table panels in action and test different configurations with sample dat
|
||||
|
||||
The table panel has many ways to manipulate your data for optimal presentation.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/table-config2.png">
|
||||
<img class="no-shadow" src="img/docs/v2/table-config2.png">
|
||||
|
||||
1. `Data`: Control how your query is transformed into a table.
|
||||
2. `Table Display`: Table display options.
|
||||
@ -25,7 +30,7 @@ The table panel has many ways to manipulate your data for optimal presentation.
|
||||
|
||||
## Data to Table
|
||||
|
||||
<img class="no-shadow" src="/img/v2/table-data-options.png">
|
||||
<img class="no-shadow" src="img/docs/v2/table-data-options.png">
|
||||
|
||||
The data section contains the **To Table Transform (1)**. This is the primary option for how your data/metric
|
||||
query should be transformed into a table format. The **Columns (2)** option allows you to select what columns
|
||||
@ -33,38 +38,38 @@ you want in the table. Only applicable for some transforms.
|
||||
|
||||
### Time series to rows
|
||||
|
||||
<img src="/img/v2/table_ts_to_rows2.png">
|
||||
<img src="img/docs/v2/table_ts_to_rows2.png">
|
||||
|
||||
In the most simple mode you can turn time series to rows. This means you get a `Time`, `Metric` and a `Value` column. Where `Metric` is the name of the time series.
|
||||
|
||||
### Time series to columns
|
||||
|
||||

|
||||

|
||||
|
||||
This transform allows you to take multiple time series and group them by time. Which will result in the primary column being `Time` and a column for each time series.
|
||||
|
||||
### Time series aggregations
|
||||
|
||||

|
||||

|
||||
This table transformation will lay out your table into rows by metric, allowing columns of `Avg`, `Min`, `Max`, `Total`, `Current` and `Count`. More than one column can be added.
|
||||
|
||||
### Annotations
|
||||

|
||||

|
||||
|
||||
If you have annotations enabled in the dashboard you can have the table show them. If you configure this
|
||||
mode then any queries you have in the metrics tab will be ignored.
|
||||
|
||||
### JSON Data
|
||||

|
||||

|
||||
|
||||
If you have an Elasticsearch **Raw Document** query or an Elasticsearch query without a `date histogram` use this
|
||||
transform mode and pick the columns using the **Columns** section.
|
||||
|
||||

|
||||

|
||||
|
||||
## Table Display
|
||||
|
||||
<img class="no-shadow" src="/img/v2/table-display.png">
|
||||
<img class="no-shadow" src="img/docs/v2/table-display.png">
|
||||
|
||||
1. `Pagination (Page Size)`: The table display fields allow you to control The `Pagination` (page size) is the threshold at which the table rows will be broken into pages. For example, if your table had 95 records with a pagination value of 10, your table would be split across 9 pages.
|
||||
2. `Scroll`: The `scroll bar` checkbox toggles the ability to scroll within the panel, when unchecked, the panel height will grow to display all rows.
|
||||
@ -75,7 +80,7 @@ transform mode and pick the columns using the **Columns** section.
|
||||
|
||||
The column styles allow you control how dates and numbers are formatted.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/Column-Options.png">
|
||||
<img class="no-shadow" src="img/docs/v2/Column-Options.png">
|
||||
|
||||
1. `Name or regex`: The Name or Regex field controls what columns the rule should be applied to. The regex or name filter will be matched against the column name not against column values.
|
||||
2. `Type`: The three supported types of types are `Number`, `String` and `Date`.
|
||||
|
@ -1,15 +1,18 @@
|
||||
----
|
||||
page_title: Dashboard Templating
|
||||
page_description: Dashboard Templating
|
||||
page_keywords: grafana, templating, variables, guide, documentation
|
||||
---
|
||||
+++
|
||||
title = "Templating"
|
||||
keywords = ["grafana", "templating", "documentation", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Templating"
|
||||
parent = "dashboard_features"
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Dashboard Templating
|
||||

|
||||
# Templating
|
||||
|
||||
## Overview
|
||||
<img class="no-shadow" src="img/docs/v2/templating_var_list.png">
|
||||
|
||||
Dashboard Templating allows you to make your Dashboards more interactive and dynamic.
|
||||
Dashboard Templating allows you to make your Dashboards more interactive and dynamic.
|
||||
|
||||
They’re one of the most powerful and most used features of Grafana, and they’ve recently gotten even more attention in Grafana 2.0 and Grafana 2.1.
|
||||
|
||||
@ -40,13 +43,13 @@ You can utilize the special ** All ** value to allow the Dashboard user to query
|
||||
#### Multi-select
|
||||
As of Grafana 2.1, it is now possible to select a subset of Query Template variables (previously it was possible to select an individual value or 'All', not multiple values that were less than All). This is accomplished via the Multi-Select option. If enabled, the Dashboard user will be able to enable and disable individual variables.
|
||||
|
||||
The Multi-Select functionality is taken a step further with the introduction of Multi-Select Tagging. This functionality allows you to group individual Template variables together under a Tag or Group name.
|
||||
The Multi-Select functionality is taken a step further with the introduction of Multi-Select Tagging. This functionality allows you to group individual Template variables together under a Tag or Group name.
|
||||
|
||||
For example, if you were using Templating to list all 20 of your applications, you could use Multi-Select Tagging to group your applications by function or region or criticality, etc.
|
||||
For example, if you were using Templating to list all 20 of your applications, you could use Multi-Select Tagging to group your applications by function or region or criticality, etc.
|
||||
|
||||
> Note: Multi-Select Tagging functionality is currently experimental but is part of Grafana 2.1. To enable this feature click the enable icon when editing Template options for a particular variable.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/template-tags-config.png">
|
||||
<img class="no-shadow" src="img/docs/v2/template-tags-config.png">
|
||||
|
||||
Grafana gets the list of tags and the list of values in each tag by performing two queries on your metric namespace.
|
||||
|
||||
@ -58,20 +61,19 @@ Note: a proof of concept shim that translates the metric query into a SQL call i
|
||||
|
||||
Once configured, Multi-Select Tagging provides a convenient way to group and your template variables, and slice your data in the exact way you want. The Tags can be seen on the right side of the template pull-down.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### Interval
|
||||
|
||||
Use the `Interval` type to create Template variables around time ranges (eg. `1m`,`1h`, `1d`). There is also a special `auto` option that will change depending on the current time range, you can specify how many times the current time range should be divided to calculate the current `auto` range.
|
||||
|
||||

|
||||

|
||||
|
||||
### Custom
|
||||
|
||||
Use the `Custom` type to manually create Template variables around explicit values that are hard-coded into the Dashboard, and not dependent on any Data Source. You can specify multiple Custom Template values by separating them with a comma.
|
||||
Use the `Custom` type to manually create Template variables around explicit values that are hard-coded into the Dashboard, and not dependent on any Data Source. You can specify multiple Custom Template values by separating them with a comma.
|
||||
|
||||
## Utilizing Template Variables with Repeating Panels and Repeating Rows
|
||||
## Repeating Panels and Repeating Rows
|
||||
|
||||
Template Variables can be very useful to dynamically change what you're visualizing on a given panel. Sometimes, you might want to create entire new Panels (or Rows) based on what Template Variables have been selected. This is now possible in Grafana 2.1.
|
||||
|
||||
|
@ -1,32 +1,37 @@
|
||||
----
|
||||
page_title: Time Range options
|
||||
page_description: Time range user guide
|
||||
page_keywords: grafana, time range, guide, documentation
|
||||
---
|
||||
+++
|
||||
title = "Time Range"
|
||||
keywords = ["grafana", "dashboard", "documentation", "time range"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Time Range"
|
||||
parent = "dashboard_features"
|
||||
weight = 7
|
||||
+++
|
||||
|
||||
|
||||
# Time Range Controls
|
||||
|
||||
Grafana provides numerous ways to manage the time ranges of the data being visualized, both at the Dashboard-level and the Panel-level.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/time_range_controls.png">
|
||||
<img class="no-shadow" src="img/docs/whatsnew_2_5/timepicker.png">
|
||||
|
||||
In the top right, you have the master Dashboard time picker (it's in between the 'Zoom out' and the 'Refresh' links).
|
||||
|
||||
1. `Current time range & refresh interval`: This shows the current dashboard time and refresh interval. It also acts as the menu button to toggle the time range controls.
|
||||
2. `Quick ranges`: Quick ranges are preset values to choose a relative time. At this time, quick ranges are not configurable, and will appear on every dashboard.
|
||||
1. `Current time range & refresh interval`: This shows the current dashboard time and refresh interval. It also acts as the menu button to toggle the time range controls.
|
||||
2. `Quick ranges`: Quick ranges are preset values to choose a relative time. At this time, quick ranges are not configurable, and will appear on every dashboard.
|
||||
3. `Time range`: The time range section allows you to mix both explicit and relative ranges. The explicit time range format is `YYYY-MM-DD HH:MM:SS`
|
||||
4. `Refreshing every:` When enabled, auto-refresh will reload the dashboard at the specified time range. Auto-refresh is most commonly used with relative time ranges ending in `now`, so new data will appear when the dashboard refreshes.
|
||||
4. `Refreshing every:` When enabled, auto-refresh will reload the dashboard at the specified time range. Auto-refresh is most commonly used with relative time ranges ending in `now`, so new data will appear when the dashboard refreshes.
|
||||
|
||||
These settings apply to all Panels in the Dashboard (except those with Panel Time Overrides enabled)
|
||||
|
||||
## Time Units
|
||||
|
||||
The following time units are supported: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `y (years)`. The minus operator allows you to step back in time, relative to now. If you wish to display the full period of the unit (day, week, month, etc...), append `/$unit` to the end.
|
||||
The following time units are supported: `s (seconds)`, `m (minutes)`, `h (hours)`, `d (days)`, `w (weeks)`, `M (months)`, `y (years)`. The minus operator allows you to step back in time, relative to now. If you wish to display the full period of the unit (day, week, month, etc...), append `/$unit` to the end.
|
||||
|
||||
Take a look at some examples to seen these concepts in practice:
|
||||
|
||||
Example Relative Range | From: | To:
|
||||
-------------- | ----- | ---
|
||||
Example Relative Range | From: | To:
|
||||
-------------- | ----- | ---
|
||||
Last 5 minutes | `now-5m` | `now`
|
||||
The day so far | `now/d` | `now`
|
||||
This week | `now/w` | `now/w`
|
||||
@ -38,7 +43,7 @@ Previous Month | `now-1M/M` | `now-1M/M`
|
||||
|
||||
There are two settings available from the Dashboard Settings area, allowing customization of the auto-refresh intervals and the definition of `now`.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/TimePicker-TimeOptions.png">
|
||||
<img class="no-shadow" src="img/docs/v2/TimePicker-TimeOptions.png">
|
||||
|
||||
### Auto-Refresh Options
|
||||
|
||||
@ -54,15 +59,15 @@ Users often ask, [when will then be now](https://www.youtube.com/watch?v=VeZ9HhH
|
||||
|
||||
You can override the relative time range for individual panels, causing them to be different than what is selected in the Dashboard time picker in the upper right. This allows you to show metrics from different time periods or days at the same time.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/panel_time_override.jpg">
|
||||
<img class="no-shadow" src="img/docs/v2/panel_time_override.jpg">
|
||||
|
||||
You control these overrides in panel editor mode and the tab `Time Range`.
|
||||
|
||||
<img class="no-shadow" src="/img/v2/time_range_tab.jpg">
|
||||
<img class="no-shadow" src="img/docs/v2/time_range_tab.jpg">
|
||||
|
||||
When you zoom or change the Dashboard time to a custom absolute time range, all panel overrides will be disabled. The panel relative time override is only active when the dashboard time is also relative. The panel timeshift override is always active, even when the dashboard time is absolute.
|
||||
|
||||
The `Hide time override info` option allows you to hide the override info text that is by default shown in the
|
||||
upper right of a panel when overridden time range options.
|
||||
|
||||
Note: You can only override the dashboard time with relative time ranges. Absolute time ranges are not available.
|
||||
Note: You can only override the dashboard time with relative time ranges. Absolute time ranges are not available.
|
||||
|
@ -1,9 +1,11 @@
|
||||
---
|
||||
page_title: How To integrate Hubot and Grafana
|
||||
page_description: Hubot Grafana install guide
|
||||
page_keywords: grafana, tutorials, hubot, slack, hipchat, setup, install, config
|
||||
author: Torkel Ödegaard
|
||||
---
|
||||
+++
|
||||
title = "How To integrate Hubot and Grafana"
|
||||
type = "docs"
|
||||
keywords = ["grafana", "tutorials", "hubot", "slack", "hipchat", "setup", "install", "config"]
|
||||
[menu.docs]
|
||||
parent = "tutorials"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
# How to integrate Hubot with Grafana
|
||||
|
||||
@ -20,7 +22,7 @@ take you to the graph.
|
||||
> is so Hipchat and Slack can show them reliably (they require the image to be publicly available).
|
||||
|
||||
<div class="text-center">
|
||||
<img src="/img/tutorials/hubot_grafana.png" class="center"></a>
|
||||
<img src="img/tutorials/hubot_grafana.png" class="center"></a>
|
||||
</div>
|
||||
|
||||
## What is Hubot?
|
||||
@ -68,7 +70,7 @@ To verify that this feature works try the `Direct link to rendered image` link i
|
||||
If you do not get an image when opening this link verify that the required font packages are installed for phantomjs to work.
|
||||
|
||||
### Grafana API Key
|
||||
<img src="/img/v2/orgdropdown_api_keys.png" style="width: 150px" class="right"></img>
|
||||
<img src="img/v2/orgdropdown_api_keys.png" style="width: 150px" class="right"></img>
|
||||
You need to set the environment variable `HUBOT_GRAFANA_API_KEY` to a Grafana API Key.
|
||||
You can add these from the API Keys page which you find in the Organization dropdown.
|
||||
|
||||
@ -113,7 +115,7 @@ Now you can add an alias like this:
|
||||
|
||||
<div class="text-center">
|
||||
Using the alias:<br>
|
||||
<img src="/img/tutorials/hubot_grafana2.png" class="center"></a>
|
||||
<img src="img/tutorials/hubot_grafana2.png" class="center"></a>
|
||||
</div>
|
||||
|
||||
## Summary
|
||||
|
@ -1,8 +1,9 @@
|
||||
---
|
||||
page_title: Grafana Tutorials
|
||||
page_description: Tutorials
|
||||
page_keywords: grafana, tutorials
|
||||
---
|
||||
+++
|
||||
title = "Tutorials"
|
||||
[menu.docs]
|
||||
identifier = "tutorials"
|
||||
weight = 6
|
||||
+++
|
||||
|
||||
# Tutorials
|
||||
|
||||
|
66
docs/sources/tutorials/screencasts.md
Normal file
66
docs/sources/tutorials/screencasts.md
Normal file
@ -0,0 +1,66 @@
|
||||
+++
|
||||
title = "Screencasts"
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
identifier = "screencasts"
|
||||
parent = "guides"
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
# Screencasts
|
||||
|
||||
|
||||
{{< screencast src="https://www.youtube.com/embed/sKNZMtoSHN4?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
|
||||
|
||||
### Episode 7 - Beginners guide to building dashboards
|
||||
|
||||
For newer users of Grafana, this screencast will familiarize you with the general UI and teach you how to build your first Dashboard.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
{{< screencast src="https://www.youtube.com/embed/9ZCMVNxUf6s?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
|
||||
|
||||
### Episode 6 - Adding data sources, users & organizations
|
||||
|
||||
Now that Grafana has been installed, learn about adding data sources and get a closer look at adding and managing Users and Organizations.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
{{< screencast src="https://www.youtube.com/embed/E-gMFv85FE8?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
|
||||
|
||||
### Episode 5 - Installation & Configuration on Red Hat / CentOS
|
||||
|
||||
This screencasts shows how to get Grafana 2.0 installed and configured quickly on RPM-based Linux operating systems.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
{{< screencast src="https://www.youtube.com/embed/JY22EBOR9hQ?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
|
||||
|
||||
### Episode 4 - Installation & Configuration on Ubuntu / Debian
|
||||
|
||||
Learn how to easily install the dependencies and packages to get Grafana 2.0 up and running on Ubuntu or Debian in just a few minutes.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
{{< screencast src="https://www.youtube.com/embed/FC13uhFRsVw?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
|
||||
|
||||
### Episode 3 - Whats New In Grafana 2.0
|
||||
|
||||
This screencast highlights many of the great new features that were included in the Grafana 2.0 release.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
{{< screencast src="//www.youtube.com/embed/FhNUrueWwOk?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
|
||||
### Episode 2 - Templated Graphite Queries
|
||||
|
||||
The screencast focuses on Templating with the Graphite Data Source. Learn how to make dynamic and adaptable Dashboards for your Graphite metrics.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
{{< screencast src="//www.youtube.com/embed/mgcJPREl3CU?list=PLDGkOdUX1Ujo3wHw9-z5Vo12YLqXRjzg2" >}}
|
||||
### Episode 1 - Building Graphite Queries
|
||||
|
||||
Learn how the Graphite Query Editor works, and how to use different graphing functions. There's also an introduction to graph display settings.
|
||||
|
||||
<div class="clearfix"></div>
|
||||
|
||||
|
@ -65,7 +65,12 @@
|
||||
<table class="twelve columns">
|
||||
<tr>
|
||||
<td class="center">
|
||||
<img src="[[.ImageLink]]" />
|
||||
[[if ne .ImageLink "" ]]
|
||||
<img src="[[.ImageLink]]" alt="Alerting Panel"/>
|
||||
[[end]]
|
||||
[[if ne .EmbededImage "" ]]
|
||||
<img src="cid:[[.EmbededImage]]" alt="Alerting Panel"/>
|
||||
[[end]]
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -252,33 +252,30 @@ func NotificationTest(c *middleware.Context, dto dtos.NotificationTestCommand) R
|
||||
return ApiSuccess("Test notification sent")
|
||||
}
|
||||
|
||||
func getAlertIdForRequest(c *middleware.Context) (int64, error) {
|
||||
alertId := c.QueryInt64("alertId")
|
||||
panelId := c.QueryInt64("panelId")
|
||||
dashboardId := c.QueryInt64("dashboardId")
|
||||
|
||||
if alertId == 0 && dashboardId == 0 && panelId == 0 {
|
||||
return 0, fmt.Errorf("Missing alertId or dashboardId and panelId")
|
||||
//POST /api/alerts/:alertId/pause
|
||||
func PauseAlert(c *middleware.Context, dto dtos.PauseAlertCommand) Response {
|
||||
cmd := models.PauseAlertCommand{
|
||||
OrgId: c.OrgId,
|
||||
AlertId: c.ParamsInt64("alertId"),
|
||||
Paused: dto.Paused,
|
||||
}
|
||||
|
||||
if alertId == 0 {
|
||||
//fetch alertId
|
||||
query := models.GetAlertsQuery{
|
||||
OrgId: c.OrgId,
|
||||
DashboardId: dashboardId,
|
||||
PanelId: panelId,
|
||||
}
|
||||
|
||||
if err := bus.Dispatch(&query); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
|
||||
if len(query.Result) != 1 {
|
||||
return 0, fmt.Errorf("PanelId is not unique on dashboard")
|
||||
}
|
||||
|
||||
alertId = query.Result[0].Id
|
||||
if err := bus.Dispatch(&cmd); err != nil {
|
||||
return ApiError(500, "", err)
|
||||
}
|
||||
|
||||
return alertId, nil
|
||||
var response models.AlertStateType = models.AlertStateNoData
|
||||
pausedState := "un paused"
|
||||
if cmd.Paused {
|
||||
response = models.AlertStatePaused
|
||||
pausedState = "paused"
|
||||
}
|
||||
|
||||
result := map[string]interface{}{
|
||||
"alertId": cmd.AlertId,
|
||||
"state": response,
|
||||
"message": "alert " + pausedState,
|
||||
}
|
||||
|
||||
return Json(200, result)
|
||||
}
|
||||
|
@ -44,3 +44,19 @@ func GetAnnotations(c *middleware.Context) Response {
|
||||
|
||||
return Json(200, result)
|
||||
}
|
||||
|
||||
func DeleteAnnotations(c *middleware.Context, cmd dtos.DeleteAnnotationsCmd) Response {
|
||||
repo := annotations.GetRepository()
|
||||
|
||||
err := repo.Delete(&annotations.DeleteParams{
|
||||
AlertId: cmd.PanelId,
|
||||
DashboardId: cmd.DashboardId,
|
||||
PanelId: cmd.PanelId,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
return ApiError(500, "Failed to delete annotations", err)
|
||||
}
|
||||
|
||||
return ApiSuccess("Annotations deleted")
|
||||
}
|
||||
|
@ -252,6 +252,7 @@ func Register(r *macaron.Macaron) {
|
||||
|
||||
r.Group("/alerts", func() {
|
||||
r.Post("/test", bind(dtos.AlertTestCommand{}), wrap(AlertTest))
|
||||
r.Post("/:alertId/pause", bind(dtos.PauseAlertCommand{}), wrap(PauseAlert), reqEditorRole)
|
||||
r.Get("/:alertId", ValidateOrgAlert, wrap(GetAlert))
|
||||
r.Get("/", wrap(GetAlerts))
|
||||
r.Get("/states-for-dashboard", wrap(GetAlertStatesForDashboard))
|
||||
@ -265,9 +266,10 @@ func Register(r *macaron.Macaron) {
|
||||
r.Put("/:notificationId", bind(m.UpdateAlertNotificationCommand{}), wrap(UpdateAlertNotification))
|
||||
r.Get("/:notificationId", wrap(GetAlertNotificationById))
|
||||
r.Delete("/:notificationId", wrap(DeleteAlertNotification))
|
||||
}, reqOrgAdmin)
|
||||
}, reqEditorRole)
|
||||
|
||||
r.Get("/annotations", wrap(GetAnnotations))
|
||||
r.Post("/annotations/mass-delete", reqOrgAdmin, bind(dtos.DeleteAnnotationsCmd{}), wrap(DeleteAnnotations))
|
||||
|
||||
// error test
|
||||
r.Get("/metrics/error", wrap(GenerateError))
|
||||
|
@ -29,7 +29,7 @@ var customMetricsDimensionsMap map[string]map[string]map[string]*CustomMetricsCa
|
||||
func init() {
|
||||
metricsMap = map[string][]string{
|
||||
"AWS/ApiGateway": {"4XXError", "5XXError", "CacheHitCount", "CacheMissCount", "Count", "IntegrationLatency", "Latency"},
|
||||
"AWS/ApplicationELB": {"ActiveConnectionCount", "ClientTLSNegotiationErrorCount", "HealthyHostCount", "HTTPCode_ELB_4XX_Count", "HTTPCode_ELB_5XX_Count", "HTTPCode_Target_2XX_Count", "HTTPCode_Target_3XX_Count", "HTTPCode_Target_4XX_Count", "HTTPCode_Target_5XX_Count", "NewConnectionCount", "ProcessedBytes", "RejectedConnectionCount", "RequestCount", "TargetConnectionErrorCount", "TargetResponseTime", "TargetTLSNegotiationErrorCount", "UnhealthyHostCount"},
|
||||
"AWS/ApplicationELB": {"ActiveConnectionCount", "ClientTLSNegotiationErrorCount", "HealthyHostCount", "HTTPCode_ELB_4XX_Count", "HTTPCode_ELB_5XX_Count", "HTTPCode_Target_2XX_Count", "HTTPCode_Target_3XX_Count", "HTTPCode_Target_4XX_Count", "HTTPCode_Target_5XX_Count", "NewConnectionCount", "ProcessedBytes", "RejectedConnectionCount", "RequestCount", "TargetConnectionErrorCount", "TargetResponseTime", "TargetTLSNegotiationErrorCount", "UnHealthyHostCount"},
|
||||
"AWS/AutoScaling": {"GroupMinSize", "GroupMaxSize", "GroupDesiredCapacity", "GroupInServiceInstances", "GroupPendingInstances", "GroupStandbyInstances", "GroupTerminatingInstances", "GroupTotalInstances"},
|
||||
"AWS/Billing": {"EstimatedCharges"},
|
||||
"AWS/CloudFront": {"Requests", "BytesDownloaded", "BytesUploaded", "TotalErrorRate", "4xxErrorRate", "5xxErrorRate"},
|
||||
|
@ -79,7 +79,7 @@ func Json(status int, body interface{}) *NormalResponse {
|
||||
func ApiSuccess(message string) *NormalResponse {
|
||||
resp := make(map[string]interface{})
|
||||
resp["message"] = message
|
||||
return Respond(200, resp)
|
||||
return Json(200, resp)
|
||||
}
|
||||
|
||||
func ApiError(status int, message string, err error) *NormalResponse {
|
||||
|
@ -153,16 +153,14 @@ func PostDashboard(c *middleware.Context, cmd m.SaveDashboardCommand) Response {
|
||||
return ApiError(500, "Failed to save dashboard", err)
|
||||
}
|
||||
|
||||
if setting.AlertingEnabled {
|
||||
alertCmd := alerting.UpdateDashboardAlertsCommand{
|
||||
OrgId: c.OrgId,
|
||||
UserId: c.UserId,
|
||||
Dashboard: cmd.Result,
|
||||
}
|
||||
alertCmd := alerting.UpdateDashboardAlertsCommand{
|
||||
OrgId: c.OrgId,
|
||||
UserId: c.UserId,
|
||||
Dashboard: cmd.Result,
|
||||
}
|
||||
|
||||
if err := bus.Dispatch(&alertCmd); err != nil {
|
||||
return ApiError(500, "Failed to save alerts", err)
|
||||
}
|
||||
if err := bus.Dispatch(&alertCmd); err != nil {
|
||||
return ApiError(500, "Failed to save alerts", err)
|
||||
}
|
||||
|
||||
c.TimeRequest(metrics.M_Api_Dashboard_Save)
|
||||
|
@ -95,6 +95,13 @@ func ProxyDataSourceRequest(c *middleware.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
if ds.Type == m.DS_INFLUXDB {
|
||||
if c.Query("db") != ds.Database {
|
||||
c.JsonApiErr(403, "Datasource is not configured to allow this database", nil)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
targetUrl, _ := url.Parse(ds.Url)
|
||||
if len(setting.DataProxyWhiteList) > 0 {
|
||||
if _, exists := setting.DataProxyWhiteList[targetUrl.Host]; !exists {
|
||||
|
@ -92,6 +92,11 @@ func AddDataSource(c *middleware.Context, cmd m.AddDataSourceCommand) {
|
||||
cmd.OrgId = c.OrgId
|
||||
|
||||
if err := bus.Dispatch(&cmd); err != nil {
|
||||
if err == m.ErrDataSourceNameExists {
|
||||
c.JsonApiErr(409, err.Error(), err)
|
||||
return
|
||||
}
|
||||
|
||||
c.JsonApiErr(500, "Failed to add datasource", err)
|
||||
return
|
||||
}
|
||||
|
@ -58,3 +58,8 @@ type NotificationTestCommand struct {
|
||||
Type string `json:"type"`
|
||||
Settings *simplejson.Json `json:"settings"`
|
||||
}
|
||||
|
||||
type PauseAlertCommand struct {
|
||||
AlertId int64 `json:"alertId"`
|
||||
Paused bool `json:"paused"`
|
||||
}
|
||||
|
@ -15,3 +15,9 @@ type Annotation struct {
|
||||
|
||||
Data *simplejson.Json `json:"data"`
|
||||
}
|
||||
|
||||
type DeleteAnnotationsCmd struct {
|
||||
AlertId int64 `json:"alertId"`
|
||||
DashboardId int64 `json:"dashboardId"`
|
||||
PanelId int64 `json:"panelId"`
|
||||
}
|
||||
|
@ -145,7 +145,6 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
|
||||
"hasUpdate": plugins.GrafanaHasUpdate,
|
||||
"env": setting.Env,
|
||||
},
|
||||
"alertingEnabled": setting.AlertingEnabled,
|
||||
}
|
||||
|
||||
return jsonObj, nil
|
||||
|
@ -36,6 +36,7 @@ func ReverseProxyGnetReq(proxyPath string) *httputil.ReverseProxy {
|
||||
// clear cookie headers
|
||||
req.Header.Del("Cookie")
|
||||
req.Header.Del("Set-Cookie")
|
||||
req.Header.Del("Authorization")
|
||||
}
|
||||
|
||||
return &httputil.ReverseProxy{Director: director}
|
||||
|
@ -102,7 +102,7 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
|
||||
Children: dashboardChildNavs,
|
||||
})
|
||||
|
||||
if setting.AlertingEnabled && (c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR) {
|
||||
if c.OrgRole == m.ROLE_ADMIN || c.OrgRole == m.ROLE_EDITOR {
|
||||
alertChildNavs := []*dtos.NavLink{
|
||||
{Text: "Alert List", Url: setting.AppSubUrl + "/alerting/list"},
|
||||
{Text: "Notifications", Url: setting.AppSubUrl + "/alerting/notifications"},
|
||||
|
@ -1,9 +1,17 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"crypto/rand"
|
||||
"crypto/tls"
|
||||
"crypto/x509"
|
||||
"encoding/base64"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"golang.org/x/net/context"
|
||||
"golang.org/x/oauth2"
|
||||
|
||||
"github.com/grafana/grafana/pkg/bus"
|
||||
@ -14,6 +22,12 @@ import (
|
||||
"github.com/grafana/grafana/pkg/social"
|
||||
)
|
||||
|
||||
func GenStateString() string {
|
||||
rnd := make([]byte, 32)
|
||||
rand.Read(rnd)
|
||||
return base64.StdEncoding.EncodeToString(rnd)
|
||||
}
|
||||
|
||||
func OAuthLogin(ctx *middleware.Context) {
|
||||
if setting.OAuthService == nil {
|
||||
ctx.Handle(404, "login.OAuthLogin(oauth service not enabled)", nil)
|
||||
@ -27,14 +41,63 @@ func OAuthLogin(ctx *middleware.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
error := ctx.Query("error")
|
||||
if error != "" {
|
||||
errorDesc := ctx.Query("error_description")
|
||||
ctx.Logger.Info("OAuthLogin Failed", "error", error, "errorDesc", errorDesc)
|
||||
ctx.Redirect(setting.AppSubUrl + "/login?failCode=1003")
|
||||
return
|
||||
}
|
||||
|
||||
code := ctx.Query("code")
|
||||
if code == "" {
|
||||
ctx.Redirect(connect.AuthCodeURL("", oauth2.AccessTypeOnline))
|
||||
state := GenStateString()
|
||||
ctx.Session.Set(middleware.SESS_KEY_OAUTH_STATE, state)
|
||||
ctx.Redirect(connect.AuthCodeURL(state, oauth2.AccessTypeOnline))
|
||||
return
|
||||
}
|
||||
|
||||
// verify state string
|
||||
savedState := ctx.Session.Get(middleware.SESS_KEY_OAUTH_STATE).(string)
|
||||
queryState := ctx.Query("state")
|
||||
if savedState != queryState {
|
||||
ctx.Handle(500, "login.OAuthLogin(state mismatch)", nil)
|
||||
return
|
||||
}
|
||||
|
||||
// handle call back
|
||||
token, err := connect.Exchange(oauth2.NoContext, code)
|
||||
|
||||
// initialize oauth2 context
|
||||
oauthCtx := oauth2.NoContext
|
||||
if setting.OAuthService.OAuthInfos[name].TlsClientCert != "" {
|
||||
cert, err := tls.LoadX509KeyPair(setting.OAuthService.OAuthInfos[name].TlsClientCert, setting.OAuthService.OAuthInfos[name].TlsClientKey)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// Load CA cert
|
||||
caCert, err := ioutil.ReadFile(setting.OAuthService.OAuthInfos[name].TlsClientCa)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
caCertPool := x509.NewCertPool()
|
||||
caCertPool.AppendCertsFromPEM(caCert)
|
||||
|
||||
tr := &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: true,
|
||||
Certificates: []tls.Certificate{cert},
|
||||
RootCAs: caCertPool,
|
||||
},
|
||||
}
|
||||
sslcli := &http.Client{Transport: tr}
|
||||
|
||||
oauthCtx = context.TODO()
|
||||
oauthCtx = context.WithValue(oauthCtx, oauth2.HTTPClient, sslcli)
|
||||
}
|
||||
|
||||
// get token from provider
|
||||
token, err := connect.Exchange(oauthCtx, code)
|
||||
if err != nil {
|
||||
ctx.Handle(500, "login.OAuthLogin(NewTransportWithCode)", err)
|
||||
return
|
||||
@ -42,7 +105,11 @@ func OAuthLogin(ctx *middleware.Context) {
|
||||
|
||||
ctx.Logger.Debug("OAuthLogin Got token")
|
||||
|
||||
userInfo, err := connect.UserInfo(token)
|
||||
// set up oauth2 client
|
||||
client := connect.Client(oauthCtx, token)
|
||||
|
||||
// get user info
|
||||
userInfo, err := connect.UserInfo(client)
|
||||
if err != nil {
|
||||
if err == social.ErrMissingTeamMembership {
|
||||
ctx.Redirect(setting.AppSubUrl + "/login?failCode=1000")
|
||||
@ -63,7 +130,7 @@ func OAuthLogin(ctx *middleware.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
userQuery := m.GetUserByLoginQuery{LoginOrEmail: userInfo.Email}
|
||||
userQuery := m.GetUserByEmailQuery{Email: userInfo.Email}
|
||||
err = bus.Dispatch(&userQuery)
|
||||
|
||||
// create account if missing
|
||||
@ -82,7 +149,7 @@ func OAuthLogin(ctx *middleware.Context) {
|
||||
return
|
||||
}
|
||||
cmd := m.CreateUserCommand{
|
||||
Login: userInfo.Email,
|
||||
Login: userInfo.Login,
|
||||
Email: userInfo.Email,
|
||||
Name: userInfo.Name,
|
||||
Company: userInfo.Company,
|
||||
|
@ -1,6 +1,7 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"net/http"
|
||||
|
||||
@ -31,7 +32,7 @@ func QueryMetrics(c *middleware.Context, reqDto dtos.MetricRequest) Response {
|
||||
})
|
||||
}
|
||||
|
||||
resp, err := tsdb.HandleRequest(request)
|
||||
resp, err := tsdb.HandleRequest(context.TODO(), request)
|
||||
if err != nil {
|
||||
return ApiError(500, "Metric request error", err)
|
||||
}
|
||||
|
@ -1,18 +1,22 @@
|
||||
package bus
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
type HandlerFunc interface{}
|
||||
type CtxHandlerFunc func()
|
||||
type Msg interface{}
|
||||
|
||||
type Bus interface {
|
||||
Dispatch(msg Msg) error
|
||||
DispatchCtx(ctx context.Context, msg Msg) error
|
||||
Publish(msg Msg) error
|
||||
|
||||
AddHandler(handler HandlerFunc)
|
||||
AddCtxHandler(handler HandlerFunc)
|
||||
AddEventListener(handler HandlerFunc)
|
||||
AddWildcardListener(handler HandlerFunc)
|
||||
}
|
||||
@ -34,6 +38,27 @@ func New() Bus {
|
||||
return bus
|
||||
}
|
||||
|
||||
func (b *InProcBus) DispatchCtx(ctx context.Context, msg Msg) error {
|
||||
var msgName = reflect.TypeOf(msg).Elem().Name()
|
||||
|
||||
var handler = b.handlers[msgName]
|
||||
if handler == nil {
|
||||
return fmt.Errorf("handler not found for %s", msgName)
|
||||
}
|
||||
|
||||
var params = make([]reflect.Value, 2)
|
||||
params[0] = reflect.ValueOf(ctx)
|
||||
params[1] = reflect.ValueOf(msg)
|
||||
|
||||
ret := reflect.ValueOf(handler).Call(params)
|
||||
err := ret[0].Interface()
|
||||
if err == nil {
|
||||
return nil
|
||||
} else {
|
||||
return err.(error)
|
||||
}
|
||||
}
|
||||
|
||||
func (b *InProcBus) Dispatch(msg Msg) error {
|
||||
var msgName = reflect.TypeOf(msg).Elem().Name()
|
||||
|
||||
@ -90,6 +115,12 @@ func (b *InProcBus) AddHandler(handler HandlerFunc) {
|
||||
b.handlers[queryTypeName] = handler
|
||||
}
|
||||
|
||||
func (b *InProcBus) AddCtxHandler(handler HandlerFunc) {
|
||||
handlerType := reflect.TypeOf(handler)
|
||||
queryTypeName := handlerType.In(1).Elem().Name()
|
||||
b.handlers[queryTypeName] = handler
|
||||
}
|
||||
|
||||
func (b *InProcBus) AddEventListener(handler HandlerFunc) {
|
||||
handlerType := reflect.TypeOf(handler)
|
||||
eventName := handlerType.In(0).Elem().Name()
|
||||
@ -105,6 +136,11 @@ func AddHandler(implName string, handler HandlerFunc) {
|
||||
globalBus.AddHandler(handler)
|
||||
}
|
||||
|
||||
// Package level functions
|
||||
func AddCtxHandler(implName string, handler HandlerFunc) {
|
||||
globalBus.AddCtxHandler(handler)
|
||||
}
|
||||
|
||||
// Package level functions
|
||||
func AddEventListener(handler HandlerFunc) {
|
||||
globalBus.AddEventListener(handler)
|
||||
@ -118,6 +154,10 @@ func Dispatch(msg Msg) error {
|
||||
return globalBus.Dispatch(msg)
|
||||
}
|
||||
|
||||
func DispatchCtx(ctx context.Context, msg Msg) error {
|
||||
return globalBus.DispatchCtx(ctx, msg)
|
||||
}
|
||||
|
||||
func Publish(msg Msg) error {
|
||||
return globalBus.Publish(msg)
|
||||
}
|
||||
|
@ -35,11 +35,11 @@ func Init(version string) {
|
||||
}
|
||||
|
||||
func ListAllPlugins(repoUrl string) (m.PluginRepo, error) {
|
||||
body, err := createRequest(repoUrl, "repo")
|
||||
body, err := sendRequest(repoUrl, "repo")
|
||||
|
||||
if err != nil {
|
||||
logger.Info("Failed to create request", "error", err)
|
||||
return m.PluginRepo{}, fmt.Errorf("Failed to create request. error: %v", err)
|
||||
logger.Info("Failed to send request", "error", err)
|
||||
return m.PluginRepo{}, fmt.Errorf("Failed to send request. error: %v", err)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
@ -112,11 +112,11 @@ func RemoveInstalledPlugin(pluginPath, pluginName string) error {
|
||||
}
|
||||
|
||||
func GetPlugin(pluginId, repoUrl string) (m.Plugin, error) {
|
||||
body, err := createRequest(repoUrl, "repo", pluginId)
|
||||
body, err := sendRequest(repoUrl, "repo", pluginId)
|
||||
|
||||
if err != nil {
|
||||
logger.Info("Failed to create request", "error", err)
|
||||
return m.Plugin{}, fmt.Errorf("Failed to create request. error: %v", err)
|
||||
logger.Info("Failed to send request", "error", err)
|
||||
return m.Plugin{}, fmt.Errorf("Failed to send request. error: %v", err)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
@ -133,7 +133,7 @@ func GetPlugin(pluginId, repoUrl string) (m.Plugin, error) {
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func createRequest(repoUrl string, subPaths ...string) ([]byte, error) {
|
||||
func sendRequest(repoUrl string, subPaths ...string) ([]byte, error) {
|
||||
u, _ := url.Parse(repoUrl)
|
||||
for _, v := range subPaths {
|
||||
u.Path = path.Join(u.Path, v)
|
||||
@ -149,6 +149,13 @@ func createRequest(repoUrl string, subPaths ...string) ([]byte, error) {
|
||||
}
|
||||
|
||||
res, err := HttpClient.Do(req)
|
||||
if err != nil {
|
||||
return []byte{}, err
|
||||
}
|
||||
|
||||
if res.StatusCode/100 != 2 {
|
||||
return []byte{}, fmt.Errorf("Api returned invalid status: %s", res.Status)
|
||||
}
|
||||
|
||||
body, err := ioutil.ReadAll(res.Body)
|
||||
defer res.Body.Close()
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user