diff --git a/.circleci/config.yml b/.circleci/config.yml index 0cd47bfa6d1d..1d74e6e64316 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -69,11 +69,11 @@ jobs: - run: name: cache server tests command: './scripts/circle-test-cache-servers.sh' - + end-to-end-test: docker: - image: circleci/node:8-browsers - - image: grafana/grafana:master + - image: grafana/grafana-dev:master-$CIRCLE_SHA1 steps: - run: dockerize -wait tcp://127.0.0.1:3000 -timeout 120s - checkout @@ -91,6 +91,12 @@ jobs: name: run end-to-end tests command: 'env BASE_URL=http://127.0.0.1:3000 yarn e2e-tests' no_output_timeout: 5m + - store_artifacts: + path: public/e2e-test/screenShots/theTruth + destination: expected-screenshots + - store_artifacts: + path: public/e2e-test/screenShots/theOutput + destination: output-screenshots codespell: docker: @@ -103,7 +109,7 @@ jobs: - run: # Important: all words have to be in lowercase, and separated by "\n". name: exclude known exceptions - command: 'echo -e "unknwon" > words_to_ignore.txt' + command: 'echo -e "unknwon\nreferer\nerrorstring" > words_to_ignore.txt' - run: name: check documentation spelling errors command: 'codespell -I ./words_to_ignore.txt docs/' @@ -588,6 +594,7 @@ jobs: root: . paths: - dist/grafana-*.msi + - dist/grafana-*.msi.sha256 store-build-artifacts: docker: @@ -628,7 +635,7 @@ workflows: - mysql-integration-test - postgres-integration-test - build-oss-msi - filters: *filter-only-master + filters: *filter-only-master - grafana-docker-master: requires: - build-all @@ -661,7 +668,10 @@ workflows: - mysql-integration-test - postgres-integration-test filters: *filter-only-master - + - end-to-end-test: + requires: + - grafana-docker-master + filters: *filter-only-master release: jobs: - build-all: @@ -722,7 +732,7 @@ workflows: - backend-lint - mysql-integration-test - postgres-integration-test - filters: *filter-only-master + filters: *filter-only-release build-branches-and-prs: jobs: diff --git a/.gitignore b/.gitignore index 50bfceb36861..2df94cb35c98 100644 --- a/.gitignore +++ b/.gitignore @@ -79,10 +79,12 @@ debug.test /scripts/build/release_publisher/release_publisher *.patch - # Ignoring frontend packages specifics /packages/**/dist /packages/**/compiled /packages/**/.rpt2_cache -theOutput/ \ No newline at end of file +theOutput/ + +# Ignore go local build dependencies +/scripts/go/bin/** diff --git a/CHANGELOG.md b/CHANGELOG.md index 7183196d91f4..64d8d41d5f5b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,59 @@ -# 6.2.0 (unreleased) +# 6.3.0 (unreleased) + +# 6.2.1 (2019-05-27) + +### Features / Enhancements + * **CLI**: Add command to migrate all datasources to use encrypted password fields . [#17118](https://github.com/grafana/grafana/pull/17118), [@aocenas](https://github.com/aocenas) + * **Gauge/BarGauge**: Improvements to auto value font size . [#17292](https://github.com/grafana/grafana/pull/17292), [@torkelo](https://github.com/torkelo) + +### Bug Fixes + * **Auth Proxy**: Resolve database is locked errors. [#17274](https://github.com/grafana/grafana/pull/17274), [@marefr](https://github.com/marefr) + * **Database**: Retry transaction if sqlite returns database is locked error. [#17276](https://github.com/grafana/grafana/pull/17276), [@marefr](https://github.com/marefr) + * **Explore**: Fixes so clicking in a Prometheus Table the query is filtered by clicked value. [#17083](https://github.com/grafana/grafana/pull/17083), [@hugohaggmark](https://github.com/hugohaggmark) + * **Singlestat**: Fixes issue with value placement and line wraps. [#17249](https://github.com/grafana/grafana/pull/17249), [@torkelo](https://github.com/torkelo) + * **Tech**: Update jQuery to 3.4.1 to fix issue on iOS 10 based browers as well as Chrome 53.x . [#17290](https://github.com/grafana/grafana/pull/17290), [@timbutler](https://github.com/timbutler) + +# 6.2.0 (2019-05-22) + +### Bug Fixes +* **BarGauge**: Fix for negative min values. [#17192](https://github.com/grafana/grafana/pull/17192), [@torkelo](https://github.com/torkelo) +* **Gauge/BarGauge**: Fix for issues editing min & max options. [#17174](https://github.com/grafana/grafana/pull/17174) +* **Search**: Make only folder name only open search with current folder filter. [#17226](https://github.com/grafana/grafana/pull/17226) +* **AzureMonitor**: Revert to clearing chained dropdowns. [#17212](https://github.com/grafana/grafana/pull/17212) + +### Breaking Changes +* **Plugins**: Data source plugins that process hidden queries need to add a "hiddenQueries: true" attribute in plugin.json. [#17124](https://github.com/grafana/grafana/pull/17124), [@ryantxu](https://github.com/ryantxu) + +### Removal of old deprecated package repository + +5 months ago we deprecated our old package cloud repository and [replaced it](https://grafana.com/blog/2019/01/05/moving-to-packages.grafana.com/) with our own. We will remove the old depreciated +repo on July 1st. Make sure you have switched to the new repo by then. The new repository has all our old releases so you are not required to upgrade just to switch package repository. + +# 6.2.0-beta2 (2019-05-15) + +### Features / Enhancements + * **Plugins**: Support templated urls in plugin routes. [#16599](https://github.com/grafana/grafana/pull/16599), [@briangann](https://github.com/briangann) + * **Packaging**: New MSI windows installer package**. [#17073](https://github.com/grafana/grafana/pull/17073), [@briangann](https://github.com/briangann) + + ### Bug Fixes + * **Dashboard**: Fixes blank dashboard after window resize with panel without title. [#16942](https://github.com/grafana/grafana/pull/16942), [@torkelo](https://github.com/torkelo) + * **Dashboard**: Fixes lazy loading & expanding collapsed rows on mobile. [#17055](https://github.com/grafana/grafana/pull/17055), [@torkelo](https://github.com/torkelo) + * **Dashboard**: Fixes scrolling issues for Edge browser. [#17033](https://github.com/grafana/grafana/pull/17033), [@jschill](https://github.com/jschill) + * **Dashboard**: Show refresh button in first kiosk(tv) mode. [#17032](https://github.com/grafana/grafana/pull/17032), [@torkelo](https://github.com/torkelo) + * **Explore**: Fix empty result from datasource should render logs container. [#16999](https://github.com/grafana/grafana/pull/16999), [@marefr](https://github.com/marefr) + * **Explore**: Fixes so clicking in a Prometheus Table the query is filtered by clicked value. [#17083](https://github.com/grafana/grafana/pull/17083), [@hugohaggmark](https://github.com/hugohaggmark) + * **Explore**: Makes it possible to zoom in Explore/Loki/Graph without exception. [#16991](https://github.com/grafana/grafana/pull/16991), [@hugohaggmark](https://github.com/hugohaggmark) + * **Gauge**: Fixes orientation issue after switching from BarGauge to Gauge. [#17064](https://github.com/grafana/grafana/pull/17064), [@torkelo](https://github.com/torkelo) + * **GettingStarted**: Fixes layout issues in getting started panel. [#16941](https://github.com/grafana/grafana/pull/16941), [@torkelo](https://github.com/torkelo) + * **InfluxDB**: Fix HTTP method should default to GET. [#16949](https://github.com/grafana/grafana/pull/16949), [@StephenSorriaux](https://github.com/StephenSorriaux) + * **Panels**: Fixed alert icon position in panel header. [#17070](https://github.com/grafana/grafana/pull/17070), [@torkelo](https://github.com/torkelo) + * **Panels**: Fixes panel error tooltip not showing. [#16993](https://github.com/grafana/grafana/pull/16993), [@torkelo](https://github.com/torkelo) + * **Plugins**: Fix how datemath utils are exposed to plugins. [#16976](https://github.com/grafana/grafana/pull/16976), [@marefr](https://github.com/marefr) + * **Singlestat**: fixed centering issue for very small panels. [#16944](https://github.com/grafana/grafana/pull/16944), [@torkelo](https://github.com/torkelo) + * **Search**: Scroll issue in dashboard search in latest Chrome. [#17054](https://github.com/grafana/grafana/pull/17054), [@jschill](https://github.com/jschill) + * **Docker**: Prevent a permission denied error when writing files to the default provisioning directory. [#16831](https://github.com/grafana/grafana/pull/16831), [@wmedlar](https://github.com/wmedlar) + * **Gauge**: Adds background shade to gauge track and improves height usage. [#17019](https://github.com/grafana/grafana/pull/17019), [@torkelo](https://github.com/torkelo) + * **RemoteCache**: Avoid race condition in Set causing error on insert. . [#17082](https://github.com/grafana/grafana/pull/17082), [@bergquist](https://github.com/bergquist) # 6.2.0-beta1 (2019-05-07) @@ -30,6 +85,7 @@ * **Provisioning**: Add API endpoint to reload provisioning configs. [#16579](https://github.com/grafana/grafana/pull/16579), [@aocenas](https://github.com/aocenas) * **Provisioning**: Do not allow deletion of provisioned dashboards. [#16211](https://github.com/grafana/grafana/pull/16211), [@aocenas](https://github.com/aocenas) * **Provisioning**: Interpolate env vars in provisioning files. [#16499](https://github.com/grafana/grafana/pull/16499), [@aocenas](https://github.com/aocenas) + * **Provisioning**: Support FolderUid in Dashboard Provisioning Config. [#16559](https://github.com/grafana/grafana/pull/16559), [@swtch1](https://github.com/swtch1) * **Security**: Add new setting allow_embedding. [#16853](https://github.com/grafana/grafana/pull/16853), [@marefr](https://github.com/marefr) * **Security**: Store datasource passwords encrypted in secureJsonData. [#16175](https://github.com/grafana/grafana/pull/16175), [@aocenas](https://github.com/aocenas) * **UX**: Improve Grafana usage for smaller screens. [#16783](https://github.com/grafana/grafana/pull/16783), [@torkelo](https://github.com/torkelo) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 272e53787601..db02d4134948 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,6 +31,8 @@ To setup a local development environment we recommend reading [Building Grafana * Add tests relevant to the fixed bug or new feature. +* Follow [PR and commit messages guidelines](#PR-and-commit-messages-guidelines) + ### Pull requests with new features Commits should be as small as possible, while ensuring that each commit is correct independently (i.e., each commit should compile and pass tests). @@ -38,12 +40,12 @@ Make sure to include `Closes #` or `Fixes #` in the ### Pull requests with bug fixes Please make all changes in one commit if possible. Include `Closes #` in bottom of the commit message. -A commit message for a bug fix should look something like this. +A commit message for a bug fix should look something like this: ``` -avoid infinite loop in the dashboard provisioner +Dashboard: Avoid infinite loop in the dashboard provisioner -if one dashboard with an uid is refered to by two +If one dashboard with an uid is refered to by two provsioners each provisioner overwrite each other. filling up dashboard_versions quite fast if using default settings. @@ -51,6 +53,8 @@ default settings. Closes #12864 ``` +For more details about PR naming and commit messages please see [PR and commit messages guidelines](#PR-and-commit-messages-guidelines) + If the pull request needs changes before its merged the new commits should be rebased into one commit before its merged. ## Backend dependency management @@ -80,3 +84,22 @@ GO111MODULE=on go mod vendor ``` You have to commit the changes to `go.mod`, `go.sum` and the `vendor/` directory before submitting the pull request. + +## PR and commit messages guidelines +PR title and squash commit messages should follow guidelines below: + +``` +Area of changes: Message + +Detailed description +``` + +The `Area of changes` is related either to functional domain (i.e. Build, Release) or feature domain (i.e. Explore, Plugins, BarGaugePanel). + + +`Message` should be concise, written in present tense and start with capitalised verb. Detailed description should be provided as commit message body, by entering a blank line between commit title and the description. + +### Examples of good PR titles/commit messages: +- `Explore: Adds Live option for supported datasources` +- `GraphPanel: Don't sort series when legend table & sort column is not visible` +- `Build: Support publishing MSI to grafana.com` diff --git a/Dockerfile b/Dockerfile index 537aaca840cb..fd305d8af3ee 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,8 @@ RUN ./node_modules/.bin/grunt build # Final container FROM debian:stretch-slim +LABEL maintainer="Grafana team " + ARG GF_UID="472" ARG GF_GID="472" diff --git a/Makefile b/Makefile index 2e06a9569651..1d71675dbaba 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,9 @@ -include local/Makefile -.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go test-go test-js test run clean +.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go test-go test-js test run clean gosec revive devenv devenv-down revive-alerting + +GO := GO111MODULE=on go +GO_FILES := ./pkg/... all: deps build @@ -66,3 +69,52 @@ clean: node_modules: package.json yarn.lock @echo "install frontend dependencies" yarn install --pure-lockfile --no-progress + +scripts/go/bin/revive: scripts/go/go.mod + @cd scripts/go; \ + $(GO) build -o ./bin/revive github.com/mgechev/revive + +scripts/go/bin/gosec: scripts/go/go.mod + @cd scripts/go; \ + $(GO) build -o ./bin/gosec github.com/securego/gosec/cmd/gosec + +revive: scripts/go/bin/revive + @scripts/go/bin/revive \ + -formatter stylish \ + -config ./scripts/go/configs/revive.toml \ + $(GO_FILES) + +revive-alerting: scripts/go/bin/revive + @scripts/go/bin/revive \ + -formatter stylish \ + ./pkg/services/alerting/... + +# create docker-compose file with provided sources and start them +# example: make devenv sources=postgres,openldap +ifeq ($(sources),) +devenv: + @printf 'You have to define sources for this command \nexample: make devenv sources=postgres,openldap\n' +else +devenv: devenv-down + $(eval targets := $(shell echo '$(sources)' | tr "," " ")) + + @cd devenv; \ + ./create_docker_compose.sh $(targets) || \ + (rm -rf docker-compose.yaml; exit 1) + + @cd devenv; \ + docker-compose up -d --build +endif + +# drop down the envs +devenv-down: + @cd devenv; \ + test -f docker-compose.yaml && \ + docker-compose down || exit 0; + +# TODO recheck the rules and leave only necessary exclusions +gosec: scripts/go/bin/gosec + @scripts/go/bin/gosec -quiet \ + -exclude=G104,G107,G201,G202,G204,G301,G304,G401,G402,G501 \ + -conf=./scripts/go/configs/gosec.json \ + $(GO_FILES) diff --git a/conf/defaults.ini b/conf/defaults.ini index acbf080b5d32..7fcb02d3115a 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -47,6 +47,9 @@ enforce_domain = false # The full public facing url root_url = %(protocol)s://%(domain)s:%(http_port)s/ +# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons. +serve_from_sub_path = false + # Log web requests router_logging = false diff --git a/conf/sample.ini b/conf/sample.ini index e318026b73ad..e942f6d1b014 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -48,6 +48,9 @@ # If you use reverse proxy and sub path specify full url (with sub path) ;root_url = http://localhost:3000 +# Serve Grafana from subpath specified in `root_url` setting. By default it is set to `false` for compatibility reasons. +;serve_from_sub_path = false + # Log web requests ;router_logging = false diff --git a/devenv/datasources.yaml b/devenv/datasources.yaml index e0f63bef2999..33dde611bdcd 100644 --- a/devenv/datasources.yaml +++ b/devenv/datasources.yaml @@ -1,10 +1,11 @@ + apiVersion: 1 datasources: - name: gdev-graphite type: graphite access: proxy - url: http://localhost:8080 + url: http://localhost:8180 jsonData: graphiteVersion: "1.1" @@ -142,6 +143,17 @@ datasources: timeField: "@timestamp" esVersion: 70 + - name: gdev-elasticsearch-v7-metricbeat + type: elasticsearch + access: proxy + database: "[metricbeat-]YYYY.MM.DD" + url: http://localhost:12200 + jsonData: + interval: Daily + timeField: "@timestamp" + esVersion: 70 + timeInterval: "10s" + - name: gdev-mysql type: mysql url: localhost:3306 diff --git a/devenv/dev-dashboards/datasource-testdata/new_features_in_v62.json b/devenv/dev-dashboards/datasource-testdata/new_features_in_v62.json new file mode 100644 index 000000000000..f3844bea1f39 --- /dev/null +++ b/devenv/dev-dashboards/datasource-testdata/new_features_in_v62.json @@ -0,0 +1,1337 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "content": "# v6.2 Feature Demos \n\nScroll down to view all demo panels. \n", + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 13, + "links": [], + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "text" + }, + { + "datasource": "gdev-testdata", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 15, + "title": "Bar Gauge", + "type": "row" + }, + { + "datasource": "gdev-testdata", + "gridPos": { + "h": 7, + "w": 24, + "x": 0, + "y": 4 + }, + "id": 7, + "links": [], + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": null, + "max": 100, + "min": 0, + "unit": "watt" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "green", + "index": 0, + "value": null + }, + { + "color": "orange", + "index": 1, + "value": 40 + }, + { + "color": "red", + "index": 2, + "value": 80 + } + ], + "values": false + }, + "orientation": "vertical" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "refId": "A", + "scenarioId": "random_walk" + }, + { + "refId": "B", + "scenarioId": "random_walk" + }, + { + "refId": "C", + "scenarioId": "random_walk" + }, + { + "refId": "D", + "scenarioId": "random_walk" + }, + { + "refId": "E", + "scenarioId": "csv_metric_values", + "stringInput": "10003,33333" + }, + { + "refId": "F", + "scenarioId": "random_walk" + }, + { + "refId": "G", + "scenarioId": "random_walk" + }, + { + "refId": "H", + "scenarioId": "csv_metric_values", + "stringInput": "100,100,100" + }, + { + "refId": "I", + "scenarioId": "random_walk" + }, + { + "refId": "J", + "scenarioId": "random_walk" + }, + { + "refId": "K", + "scenarioId": "random_walk" + }, + { + "refId": "L", + "scenarioId": "random_walk" + }, + { + "refId": "M", + "scenarioId": "random_walk" + }, + { + "refId": "N", + "scenarioId": "random_walk" + }, + { + "refId": "O", + "scenarioId": "random_walk" + }, + { + "refId": "P", + "scenarioId": "random_walk" + }, + { + "refId": "Q", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Retro LED mode", + "type": "bargauge" + }, + { + "datasource": "gdev-testdata", + "gridPos": { + "h": 10, + "w": 18, + "x": 0, + "y": 11 + }, + "id": 6, + "links": [], + "options": { + "displayMode": "gradient", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": null, + "max": 100, + "min": 0, + "unit": "celsius" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "blue", + "index": 0, + "value": null + }, + { + "color": "green", + "index": 1, + "value": 20 + }, + { + "color": "orange", + "index": 2, + "value": 40 + }, + { + "color": "red", + "index": 3, + "value": 80 + } + ], + "values": false + }, + "orientation": "horizontal" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "alias": "Inside", + "refId": "H", + "scenarioId": "csv_metric_values", + "stringInput": "100,100,100" + }, + { + "alias": "Outhouse", + "refId": "A", + "scenarioId": "random_walk" + }, + { + "alias": "Area B", + "refId": "B", + "scenarioId": "random_walk" + }, + { + "alias": "Basement", + "refId": "C", + "scenarioId": "random_walk" + }, + { + "alias": "Garage", + "refId": "D", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Gradient mode", + "type": "bargauge" + }, + { + "datasource": "gdev-testdata", + "gridPos": { + "h": 10, + "w": 6, + "x": 18, + "y": 11 + }, + "id": 8, + "links": [], + "options": { + "displayMode": "basic", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": null, + "max": 100, + "min": 0, + "unit": "watt" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "blue", + "index": 0, + "value": null + }, + { + "color": "green", + "index": 1, + "value": 42.5 + }, + { + "color": "orange", + "index": 2, + "value": 80 + }, + { + "color": "red", + "index": 3, + "value": 90 + } + ], + "values": false + }, + "orientation": "horizontal" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "refId": "H", + "scenarioId": "csv_metric_values", + "stringInput": "100,100,100" + }, + { + "refId": "A", + "scenarioId": "random_walk" + }, + { + "refId": "J", + "scenarioId": "random_walk" + }, + { + "refId": "K", + "scenarioId": "random_walk" + }, + { + "refId": "L", + "scenarioId": "random_walk" + }, + { + "refId": "M", + "scenarioId": "random_walk" + }, + { + "refId": "N", + "scenarioId": "random_walk" + }, + { + "refId": "O", + "scenarioId": "random_walk" + }, + { + "refId": "P", + "scenarioId": "random_walk" + }, + { + "refId": "Q", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Basic", + "type": "bargauge" + }, + { + "collapsed": false, + "datasource": "gdev-testdata", + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 36, + "panels": [], + "title": "Gauge multi series", + "type": "row" + }, + { + "datasource": "gdev-testdata", + "gridPos": { + "h": 6, + "w": 18, + "x": 0, + "y": 22 + }, + "id": 38, + "links": [], + "options": { + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "max": 100, + "min": 0, + "unit": "decgbytes" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "green", + "index": 0, + "value": null + }, + { + "color": "red", + "index": 1, + "value": 80 + } + ], + "values": false + }, + "orientation": "auto", + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "6.3.0-pre", + "targets": [ + { + "alias": "sda1", + "refId": "A", + "scenarioId": "random_walk" + }, + { + "alias": "sda2", + "refId": "B", + "scenarioId": "random_walk" + }, + { + "alias": "sda3", + "refId": "C", + "scenarioId": "random_walk" + }, + { + "alias": "sda4", + "refId": "D", + "scenarioId": "random_walk" + }, + { + "alias": "sda5", + "refId": "E", + "scenarioId": "random_walk" + }, + { + "alias": "sda6", + "refId": "F", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "gauge" + }, + { + "content": " \n* The new Gauge and Bar Gauge repeat for every series, row or column your queries return.\n* Works great with table & time series data \n", + "gridPos": { + "h": 6, + "w": 6, + "x": 18, + "y": 22 + }, + "id": 40, + "links": [], + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "Multiple Series or Rows", + "transparent": true, + "type": "text" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 28 + }, + "id": 19, + "panels": [], + "title": "Panels With No Title", + "type": "row" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": ["#299c46", "#73BF69", "#d44a3a"], + "datasource": "gdev-testdata", + "decimals": null, + "format": "ms", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 29 + }, + "id": 20, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.2.0-pre", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "p99", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "refId": "Q", + "scenarioId": "random_walk" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "singlestat", + "valueFontSize": "120%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": ["#299c46", "#73BF69", "#d44a3a"], + "datasource": "gdev-testdata", + "decimals": null, + "format": "ms", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 29 + }, + "id": 23, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.2.0-pre", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "p95", + "prefixFontSize": "80%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "refId": "Q", + "scenarioId": "random_walk" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "singlestat", + "valueFontSize": "120%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": ["#299c46", "#73BF69", "#d44a3a"], + "datasource": "gdev-testdata", + "decimals": null, + "format": "ms", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 29 + }, + "id": 24, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "pluginVersion": "6.2.0-pre", + "postfix": "", + "postfixFontSize": "50%", + "prefix": "p90", + "prefixFontSize": "80%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "tableColumn": "", + "targets": [ + { + "refId": "Q", + "scenarioId": "random_walk" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "singlestat", + "valueFontSize": "120%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "avg" + }, + { + "content": "In v6.2 if you remove the panel title the visualization will take up all the space available. \nThe panel header menu will be overlayed on top if you hover over the panel so you can still move & edit the panel. ", + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 29 + }, + "id": 42, + "links": [], + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "text" + }, + { + "datasource": "gdev-testdata", + "gridPos": { + "h": 4, + "w": 24, + "x": 0, + "y": 33 + }, + "id": 17, + "links": [], + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "max": 100, + "min": 0, + "title": "Completion rate", + "unit": "percent" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "red", + "index": 0, + "value": null + }, + { + "color": "red", + "index": 1, + "value": 80 + } + ], + "values": false + }, + "orientation": "horizontal" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "refId": "Q", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "", + "type": "bargauge" + }, + { + "aliasColors": { + "A-series": "blue", + "B-series": "dark-purple", + "C-series": "purple", + "Q-series": "dark-blue" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "gdev-testdata", + "fill": 3, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 37 + }, + "id": 26, + "legend": { + "alignAsTable": true, + "avg": false, + "current": false, + "max": false, + "min": false, + "rightSide": true, + "show": true, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pluginVersion": "6.2.0-pre", + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": true, + "steppedLine": false, + "targets": [ + { + "refId": "Q", + "scenarioId": "random_walk" + }, + { + "refId": "A", + "scenarioId": "random_walk" + }, + { + "refId": "B", + "scenarioId": "random_walk" + }, + { + "refId": "C", + "scenarioId": "random_walk" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 43 + }, + "id": 22, + "panels": [], + "title": "Lazy loading of panels", + "type": "row" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "gdev-testdata", + "fill": 1, + "gridPos": { + "h": 8, + "w": 15, + "x": 0, + "y": 44 + }, + "id": 28, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "refId": "A", + "scenarioId": "slow_query", + "stringInput": "5s" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Slow Query (5s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "content": "\n# Lazy Loading\n\nAs you scroll down you will see that Grafana only loads & issues queries for these panels as they are scrolled in to view. \nThis greatly reduces the load on your data source backends if you have many long dashboards with many panels. \n\n\n", + "gridPos": { + "h": 40, + "w": 9, + "x": 15, + "y": 44 + }, + "id": 34, + "links": [], + "mode": "markdown", + "timeFrom": null, + "timeShift": null, + "title": "", + "transparent": true, + "type": "text" + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "gdev-testdata", + "fill": 1, + "gridPos": { + "h": 8, + "w": 15, + "x": 0, + "y": 52 + }, + "id": 30, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "refId": "A", + "scenarioId": "slow_query", + "stringInput": "5s" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Slow Query (5s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "gdev-testdata", + "fill": 1, + "gridPos": { + "h": 8, + "w": 15, + "x": 0, + "y": 60 + }, + "id": 31, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "refId": "A", + "scenarioId": "slow_query", + "stringInput": "5s" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Slow Query (5s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "gdev-testdata", + "fill": 1, + "gridPos": { + "h": 8, + "w": 15, + "x": 0, + "y": 68 + }, + "id": 32, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "refId": "A", + "scenarioId": "slow_query", + "stringInput": "5s" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Slow Query (5s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + }, + { + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "gdev-testdata", + "fill": 1, + "gridPos": { + "h": 8, + "w": 15, + "x": 0, + "y": 76 + }, + "id": 29, + "legend": { + "avg": false, + "current": false, + "max": false, + "min": false, + "show": false, + "total": false, + "values": false + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "refId": "A", + "scenarioId": "slow_query", + "stringInput": "5s" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Slow Query (5s)", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } + } + ], + "refresh": "", + "schemaVersion": 18, + "style": "dark", + "tags": ["gdev", "demo"], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], + "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] + }, + "timezone": "", + "title": "New Features in v6.2", + "uid": "ZvPm55mWk", + "version": 1 +} diff --git a/devenv/dev-dashboards/home.json b/devenv/dev-dashboards/home.json index 8608b0b82647..f4cdfed9d53e 100644 --- a/devenv/dev-dashboards/home.json +++ b/devenv/dev-dashboards/home.json @@ -48,39 +48,39 @@ "y": 0 }, "headings": false, - "id": 8, + "id": 2, "limit": 1000, "links": [], "query": "", "recent": false, "search": true, "starred": false, - "tags": ["panel-demo"], + "tags": ["panel-tests"], "timeFrom": null, "timeShift": null, - "title": "tag: panel-demo", + "title": "tag: panel-tests", "type": "dashlist" }, { "folderId": null, "gridPos": { - "h": 13, + "h": 26, "w": 6, "x": 12, "y": 0 }, "headings": false, - "id": 2, + "id": 3, "limit": 1000, "links": [], "query": "", "recent": false, "search": true, "starred": false, - "tags": ["panel-tests"], + "tags": ["gdev", "demo"], "timeFrom": null, "timeShift": null, - "title": "tag: panel-tests", + "title": "tag: dashboard-demo", "type": "dashlist" }, { @@ -114,28 +114,6 @@ "y": 13 }, "headings": false, - "id": 3, - "limit": 1000, - "links": [], - "query": "", - "recent": false, - "search": true, - "starred": false, - "tags": ["gdev", "demo"], - "timeFrom": null, - "timeShift": null, - "title": "tag: dashboard-demo", - "type": "dashlist" - }, - { - "folderId": null, - "gridPos": { - "h": 13, - "w": 6, - "x": 12, - "y": 13 - }, - "headings": false, "id": 4, "limit": 1000, "links": [], @@ -146,7 +124,7 @@ "tags": ["templating", "gdev"], "timeFrom": null, "timeShift": null, - "title": "tag: templating", + "title": "tag: templating ", "type": "dashlist" } ], @@ -167,5 +145,5 @@ "timezone": "", "title": "Grafana Dev Overview & Home", "uid": "j6T00KRZz", - "version": 1 + "version": 2 } diff --git a/devenv/dev-dashboards/panel-bargauge/animated_demo.json b/devenv/dev-dashboards/panel-bargauge/bar_gauge_demo.json similarity index 62% rename from devenv/dev-dashboards/panel-bargauge/animated_demo.json rename to devenv/dev-dashboards/panel-bargauge/bar_gauge_demo.json index a061f5766d1f..dcbc7fd1343d 100644 --- a/devenv/dev-dashboards/panel-bargauge/animated_demo.json +++ b/devenv/dev-dashboards/panel-bargauge/bar_gauge_demo.json @@ -15,26 +15,27 @@ "editable": true, "gnetId": null, "graphTooltip": 0, + "id": 7501, "links": [], "panels": [ { + "datasource": "gdev-testdata", "gridPos": { "h": 7, - "w": 18, + "w": 24, "x": 0, "y": 0 }, - "id": 7, + "id": 2, "links": [], "options": { - "displayMode": "gradient", + "displayMode": "lcd", "fieldOptions": { "calcs": ["mean"], "defaults": { - "decimals": null, "max": 100, "min": 0, - "unit": "watt" + "unit": "decgbytes" }, "mappings": [], "override": {}, @@ -47,7 +48,7 @@ { "color": "orange", "index": 1, - "value": 40 + "value": 60 }, { "color": "red", @@ -59,92 +60,103 @@ }, "orientation": "vertical" }, - "pluginVersion": "6.2.0-pre", "targets": [ { + "alias": "sda1", "refId": "A", "scenarioId": "random_walk" }, { + "alias": "sda2", "refId": "B", "scenarioId": "random_walk" }, { + "alias": "sda3", "refId": "C", "scenarioId": "random_walk" }, { + "alias": "sda4", "refId": "D", "scenarioId": "random_walk" }, { + "alias": "sda5", "refId": "E", - "scenarioId": "csv_metric_values", - "stringInput": "10003,33333" + "scenarioId": "random_walk" }, { + "alias": "sda6", "refId": "F", "scenarioId": "random_walk" }, { + "alias": "sda7", "refId": "G", "scenarioId": "random_walk" }, { + "alias": "sda8", "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" + "scenarioId": "random_walk" }, { + "alias": "sda9", "refId": "I", "scenarioId": "random_walk" }, { + "alias": "sda10", "refId": "J", "scenarioId": "random_walk" }, { + "alias": "sda11", "refId": "K", "scenarioId": "random_walk" }, { + "alias": "sda12", "refId": "L", "scenarioId": "random_walk" }, { + "alias": "sda13", "refId": "M", "scenarioId": "random_walk" }, { + "alias": "sda14", "refId": "N", "scenarioId": "random_walk" }, { + "alias": "sda15", "refId": "O", "scenarioId": "random_walk" }, { + "alias": "sda16", "refId": "P", "scenarioId": "random_walk" - }, - { - "refId": "Q", - "scenarioId": "random_walk" } ], "timeFrom": null, "timeShift": null, - "title": "Usage", + "title": "", + "transparent": true, "type": "bargauge" }, { + "datasource": "gdev-testdata", "gridPos": { - "h": 22, - "w": 6, - "x": 18, - "y": 0 + "h": 10, + "w": 16, + "x": 0, + "y": 7 }, - "id": 8, + "id": 4, "links": [], "options": { "displayMode": "gradient", @@ -154,25 +166,30 @@ "decimals": null, "max": 100, "min": 0, - "unit": "watt" + "unit": "celsius" }, "mappings": [], "override": {}, "thresholds": [ { - "color": "green", + "color": "blue", "index": 0, "value": null }, { - "color": "orange", + "color": "green", "index": 1, - "value": 55 + "value": 20 }, { - "color": "red", + "color": "orange", "index": 2, - "value": 95 + "value": 40 + }, + { + "color": "red", + "index": 3, + "value": 80 } ], "values": false @@ -182,32 +199,94 @@ "pluginVersion": "6.2.0-pre", "targets": [ { - "refId": "E", - "scenarioId": "random_walk" - }, - { + "alias": "Inside", "refId": "H", "scenarioId": "csv_metric_values", "stringInput": "100,100,100" }, { + "alias": "Outhouse", "refId": "A", "scenarioId": "random_walk" }, { + "alias": "Area B", "refId": "B", "scenarioId": "random_walk" }, { + "alias": "Basement", "refId": "C", "scenarioId": "random_walk" }, { + "alias": "Garage", "refId": "D", "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Gradient mode", + "type": "bargauge" + }, + { + "datasource": "gdev-testdata", + "gridPos": { + "h": 10, + "w": 6, + "x": 16, + "y": 7 + }, + "id": 6, + "links": [], + "options": { + "displayMode": "basic", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": null, + "max": 100, + "min": 0, + "unit": "watt" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "blue", + "index": 0, + "value": null + }, + { + "color": "green", + "index": 1, + "value": 42.5 + }, + { + "color": "orange", + "index": 2, + "value": 80 + }, + { + "color": "red", + "index": 3, + "value": 90 + } + ], + "values": false + }, + "orientation": "horizontal" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "refId": "H", + "scenarioId": "csv_metric_values", + "stringInput": "100,100,100" }, { - "refId": "I", + "refId": "A", "scenarioId": "random_walk" }, { @@ -241,47 +320,78 @@ { "refId": "Q", "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Basic", + "type": "bargauge" + }, + { + "datasource": "gdev-testdata", + "gridPos": { + "h": 22, + "w": 2, + "x": 22, + "y": 7 + }, + "id": 8, + "links": [], + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "max": 100, + "min": 0 + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "red", + "index": 0, + "value": null + }, + { + "color": "red", + "index": 1, + "value": 90 + } + ], + "values": false }, + "orientation": "vertical" + }, + "targets": [ { - "refId": "F", - "scenarioId": "random_walk" - }, - { - "refId": "G", - "scenarioId": "random_walk" - }, - { - "refId": "R", - "scenarioId": "random_walk" - }, - { - "refId": "S", + "refId": "A", "scenarioId": "random_walk" } ], "timeFrom": null, "timeShift": null, - "title": "Usage", + "title": "Completion", "type": "bargauge" }, { + "datasource": "gdev-testdata", "gridPos": { - "h": 15, - "w": 11, + "h": 12, + "w": 22, "x": 0, - "y": 7 + "y": 17 }, - "id": 6, + "id": 10, "links": [], "options": { "displayMode": "gradient", "fieldOptions": { "calcs": ["mean"], "defaults": { - "decimals": null, "max": 100, "min": 0, - "unit": "celsius" + "unit": "decgbytes" }, "mappings": [], "override": {}, @@ -294,12 +404,12 @@ { "color": "green", "index": 1, - "value": 20 + "value": 30 }, { "color": "orange", "index": 2, - "value": 40 + "value": 60 }, { "color": "red", @@ -309,69 +419,113 @@ ], "values": false }, - "orientation": "horizontal" + "orientation": "vertical" }, - "pluginVersion": "6.2.0-pre", "targets": [ { - "alias": "Inside", - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "alias": "Outhouse", + "alias": "sda1", "refId": "A", "scenarioId": "random_walk" }, { - "alias": "Area B", + "alias": "sda2", "refId": "B", "scenarioId": "random_walk" }, { - "alias": "Basement", + "alias": "sda3", "refId": "C", "scenarioId": "random_walk" }, { - "alias": "Garage", + "alias": "sda4", "refId": "D", "scenarioId": "random_walk" }, { - "alias": "Attic", + "alias": "sda5", "refId": "E", "scenarioId": "random_walk" }, { + "alias": "sda6", "refId": "F", "scenarioId": "random_walk" + }, + { + "alias": "sda7", + "refId": "G", + "scenarioId": "random_walk" + }, + { + "alias": "sda8", + "refId": "H", + "scenarioId": "random_walk" + }, + { + "alias": "sda9", + "refId": "I", + "scenarioId": "random_walk" + }, + { + "alias": "sda10", + "refId": "J", + "scenarioId": "random_walk" + }, + { + "alias": "sda11", + "refId": "K", + "scenarioId": "random_walk" + }, + { + "alias": "sda12", + "refId": "L", + "scenarioId": "random_walk" + }, + { + "alias": "sda13", + "refId": "M", + "scenarioId": "random_walk" + }, + { + "alias": "sda14", + "refId": "N", + "scenarioId": "random_walk" + }, + { + "alias": "sda15", + "refId": "O", + "scenarioId": "random_walk" + }, + { + "alias": "sda16", + "refId": "P", + "scenarioId": "random_walk" } ], "timeFrom": null, "timeShift": null, - "title": "Temperature", + "title": "", "type": "bargauge" }, { + "datasource": "gdev-testdata", "gridPos": { - "h": 15, - "w": 7, - "x": 11, - "y": 7 + "h": 8, + "w": 24, + "x": 0, + "y": 29 }, - "id": 9, + "id": 11, "links": [], "options": { "displayMode": "basic", "fieldOptions": { "calcs": ["mean"], "defaults": { - "decimals": null, "max": 100, "min": 0, - "unit": "celsius" + "unit": "decgbytes" }, "mappings": [], "override": {}, @@ -384,12 +538,12 @@ { "color": "green", "index": 1, - "value": 20 + "value": 30 }, { "color": "orange", "index": 2, - "value": 40 + "value": 60 }, { "color": "red", @@ -399,89 +553,113 @@ ], "values": false }, - "orientation": "horizontal" + "orientation": "vertical" }, - "pluginVersion": "6.2.0-pre", "targets": [ { - "alias": "Inside", - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "alias": "Outhouse", + "alias": "sda1", "refId": "A", "scenarioId": "random_walk" }, { - "alias": "Area B", + "alias": "sda2", "refId": "B", "scenarioId": "random_walk" }, { - "alias": "Basement", + "alias": "sda3", "refId": "C", "scenarioId": "random_walk" }, { - "alias": "Garage", + "alias": "sda4", "refId": "D", "scenarioId": "random_walk" }, { - "alias": "Attic", + "alias": "sda5", "refId": "E", "scenarioId": "random_walk" }, { + "alias": "sda6", "refId": "F", "scenarioId": "random_walk" }, { + "alias": "sda7", "refId": "G", "scenarioId": "random_walk" }, { + "alias": "sda8", + "refId": "H", + "scenarioId": "random_walk" + }, + { + "alias": "sda9", "refId": "I", "scenarioId": "random_walk" }, { + "alias": "sda10", "refId": "J", "scenarioId": "random_walk" }, { + "alias": "sda11", "refId": "K", "scenarioId": "random_walk" }, { + "alias": "sda12", "refId": "L", "scenarioId": "random_walk" + }, + { + "alias": "sda13", + "refId": "M", + "scenarioId": "random_walk" + }, + { + "alias": "sda14", + "refId": "N", + "scenarioId": "random_walk" + }, + { + "alias": "sda15", + "refId": "O", + "scenarioId": "random_walk" + }, + { + "alias": "sda16", + "refId": "P", + "scenarioId": "random_walk" } ], "timeFrom": null, "timeShift": null, - "title": "Temperature", + "title": "", "type": "bargauge" } ], - "refresh": false, + "refresh": "10s", "schemaVersion": 18, "style": "dark", - "tags": ["gdev", "bargauge", "panel-demo"], + "tags": ["gdev", "demo"], "templating": { "list": [] }, "time": { - "from": "now-30m", + "from": "now-6h", "to": "now" }, "timepicker": { - "refresh_intervals": ["1s", "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], + "refresh_intervals": ["2s", "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] }, "timezone": "", - "title": "Bar Gauge Animated Demo", - "uid": "k5IUwQeikaa", - "version": 1 + "title": "Bar Gauge Demo", + "uid": "vmie2cmWz", + "version": 3 } diff --git a/devenv/dev-dashboards/panel-bargauge/gradient_demo.json b/devenv/dev-dashboards/panel-bargauge/gradient_demo.json deleted file mode 100644 index ffe68eb7a863..000000000000 --- a/devenv/dev-dashboards/panel-bargauge/gradient_demo.json +++ /dev/null @@ -1,376 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "panels": [ - { - "gridPos": { - "h": 7, - "w": 18, - "x": 0, - "y": 0 - }, - "id": 7, - "links": [], - "options": { - "displayMode": "gradient", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "watt" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "green", - "index": 0, - "value": null - }, - { - "color": "orange", - "index": 1, - "value": 40 - }, - { - "color": "red", - "index": 2, - "value": 80 - } - ], - "values": false - }, - "orientation": "vertical" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "refId": "A", - "scenarioId": "random_walk" - }, - { - "refId": "B", - "scenarioId": "random_walk" - }, - { - "refId": "C", - "scenarioId": "random_walk" - }, - { - "refId": "D", - "scenarioId": "random_walk" - }, - { - "refId": "E", - "scenarioId": "csv_metric_values", - "stringInput": "10003,33333" - }, - { - "refId": "F", - "scenarioId": "random_walk" - }, - { - "refId": "G", - "scenarioId": "random_walk" - }, - { - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "refId": "I", - "scenarioId": "random_walk" - }, - { - "refId": "J", - "scenarioId": "random_walk" - }, - { - "refId": "K", - "scenarioId": "random_walk" - }, - { - "refId": "L", - "scenarioId": "random_walk" - }, - { - "refId": "M", - "scenarioId": "random_walk" - }, - { - "refId": "N", - "scenarioId": "random_walk" - }, - { - "refId": "O", - "scenarioId": "random_walk" - }, - { - "refId": "P", - "scenarioId": "random_walk" - }, - { - "refId": "Q", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Usage", - "type": "bargauge" - }, - { - "gridPos": { - "h": 20, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 8, - "links": [], - "options": { - "displayMode": "gradient", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "watt" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "green", - "index": 0, - "value": null - }, - { - "color": "orange", - "index": 1, - "value": 65 - }, - { - "color": "red", - "index": 2, - "value": 95 - } - ], - "values": false - }, - "orientation": "horizontal" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "refId": "E", - "scenarioId": "random_walk" - }, - { - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "refId": "A", - "scenarioId": "random_walk" - }, - { - "refId": "B", - "scenarioId": "random_walk" - }, - { - "refId": "C", - "scenarioId": "random_walk" - }, - { - "refId": "D", - "scenarioId": "random_walk" - }, - { - "refId": "I", - "scenarioId": "random_walk" - }, - { - "refId": "J", - "scenarioId": "random_walk" - }, - { - "refId": "K", - "scenarioId": "random_walk" - }, - { - "refId": "L", - "scenarioId": "random_walk" - }, - { - "refId": "M", - "scenarioId": "random_walk" - }, - { - "refId": "N", - "scenarioId": "random_walk" - }, - { - "refId": "O", - "scenarioId": "random_walk" - }, - { - "refId": "P", - "scenarioId": "random_walk" - }, - { - "refId": "Q", - "scenarioId": "random_walk" - }, - { - "refId": "F", - "scenarioId": "random_walk" - }, - { - "refId": "G", - "scenarioId": "random_walk" - }, - { - "refId": "R", - "scenarioId": "random_walk" - }, - { - "refId": "S", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Usage", - "type": "bargauge" - }, - { - "gridPos": { - "h": 13, - "w": 18, - "x": 0, - "y": 7 - }, - "id": 6, - "links": [], - "options": { - "displayMode": "gradient", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "celsius" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "blue", - "index": 0, - "value": null - }, - { - "color": "green", - "index": 1, - "value": 20 - }, - { - "color": "orange", - "index": 2, - "value": 40 - }, - { - "color": "red", - "index": 3, - "value": 80 - } - ], - "values": false - }, - "orientation": "horizontal" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "alias": "Inside", - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "alias": "Outhouse", - "refId": "A", - "scenarioId": "random_walk" - }, - { - "alias": "Area B", - "refId": "B", - "scenarioId": "random_walk" - }, - { - "alias": "Basement", - "refId": "C", - "scenarioId": "random_walk" - }, - { - "alias": "Garage", - "refId": "D", - "scenarioId": "random_walk" - }, - { - "alias": "Attic", - "refId": "E", - "scenarioId": "random_walk" - }, - { - "refId": "F", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Temperature", - "type": "bargauge" - } - ], - "schemaVersion": 18, - "style": "dark", - "tags": ["gdev", "bargauge", "panel-demo"], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], - "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] - }, - "timezone": "", - "title": "Bar Gauge Gradient Demo", - "uid": "RndRQw6mz", - "version": 1 -} diff --git a/devenv/dev-dashboards/panel-bargauge/many_modes_demo.json b/devenv/dev-dashboards/panel-bargauge/many_modes_demo.json deleted file mode 100644 index 8b498e78ef15..000000000000 --- a/devenv/dev-dashboards/panel-bargauge/many_modes_demo.json +++ /dev/null @@ -1,405 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "panels": [ - { - "gridPos": { - "h": 7, - "w": 22, - "x": 0, - "y": 0 - }, - "id": 7, - "links": [], - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "watt" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "green", - "index": 0, - "value": null - }, - { - "color": "orange", - "index": 1, - "value": 40 - }, - { - "color": "red", - "index": 2, - "value": 80 - } - ], - "values": false - }, - "orientation": "vertical" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "refId": "A", - "scenarioId": "random_walk" - }, - { - "refId": "B", - "scenarioId": "random_walk" - }, - { - "refId": "C", - "scenarioId": "random_walk" - }, - { - "refId": "D", - "scenarioId": "random_walk" - }, - { - "refId": "E", - "scenarioId": "csv_metric_values", - "stringInput": "10003,33333" - }, - { - "refId": "F", - "scenarioId": "random_walk" - }, - { - "refId": "G", - "scenarioId": "random_walk" - }, - { - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "refId": "I", - "scenarioId": "random_walk" - }, - { - "refId": "J", - "scenarioId": "random_walk" - }, - { - "refId": "K", - "scenarioId": "random_walk" - }, - { - "refId": "L", - "scenarioId": "random_walk" - }, - { - "refId": "M", - "scenarioId": "random_walk" - }, - { - "refId": "N", - "scenarioId": "random_walk" - }, - { - "refId": "O", - "scenarioId": "random_walk" - }, - { - "refId": "P", - "scenarioId": "random_walk" - }, - { - "refId": "Q", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Usage", - "type": "bargauge" - }, - { - "gridPos": { - "h": 20, - "w": 2, - "x": 22, - "y": 0 - }, - "id": 11, - "links": [], - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "percent" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "green", - "index": 0, - "value": null - }, - { - "color": "red", - "index": 1, - "value": 80 - } - ], - "values": false - }, - "orientation": "vertical" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "refId": "A", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Progress", - "type": "bargauge" - }, - { - "gridPos": { - "h": 13, - "w": 10, - "x": 0, - "y": 7 - }, - "id": 6, - "links": [], - "options": { - "displayMode": "gradient", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "celsius" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "blue", - "index": 0, - "value": null - }, - { - "color": "green", - "index": 1, - "value": 20 - }, - { - "color": "orange", - "index": 2, - "value": 40 - }, - { - "color": "red", - "index": 3, - "value": 80 - } - ], - "values": false - }, - "orientation": "horizontal" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "alias": "Inside", - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "alias": "Outhouse", - "refId": "A", - "scenarioId": "random_walk" - }, - { - "alias": "Area B", - "refId": "B", - "scenarioId": "random_walk" - }, - { - "alias": "Basement", - "refId": "C", - "scenarioId": "random_walk" - }, - { - "alias": "Garage", - "refId": "D", - "scenarioId": "random_walk" - }, - { - "alias": "Attic", - "refId": "E", - "scenarioId": "random_walk" - }, - { - "refId": "F", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Temperature", - "type": "bargauge" - }, - { - "gridPos": { - "h": 13, - "w": 12, - "x": 10, - "y": 7 - }, - "id": 8, - "links": [], - "options": { - "displayMode": "basic", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "watt" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "green", - "index": 0, - "value": null - }, - { - "color": "purple", - "index": 1, - "value": 50 - }, - { - "color": "blue", - "index": 2, - "value": 70 - } - ], - "values": false - }, - "orientation": "horizontal" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "refId": "A", - "scenarioId": "random_walk" - }, - { - "refId": "B", - "scenarioId": "random_walk" - }, - { - "refId": "C", - "scenarioId": "random_walk" - }, - { - "refId": "D", - "scenarioId": "random_walk" - }, - { - "refId": "I", - "scenarioId": "random_walk" - }, - { - "refId": "J", - "scenarioId": "random_walk" - }, - { - "refId": "K", - "scenarioId": "random_walk" - }, - { - "refId": "L", - "scenarioId": "random_walk" - }, - { - "refId": "M", - "scenarioId": "random_walk" - }, - { - "refId": "N", - "scenarioId": "random_walk" - }, - { - "refId": "O", - "scenarioId": "random_walk" - }, - { - "refId": "P", - "scenarioId": "random_walk" - }, - { - "refId": "Q", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Usage", - "type": "bargauge" - } - ], - "schemaVersion": 18, - "style": "dark", - "tags": ["gdev", "bargauge", "panel-demo"], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], - "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] - }, - "timezone": "", - "title": "Bar Gauge All Modes Demo", - "uid": "zt2f6NgZzaa", - "version": 1 -} diff --git a/devenv/dev-dashboards/panel-bargauge/panel_tests_bar_gauge.json b/devenv/dev-dashboards/panel-bargauge/panel_tests_bar_gauge.json new file mode 100644 index 000000000000..6230bb6c3055 --- /dev/null +++ b/devenv/dev-dashboards/panel-bargauge/panel_tests_bar_gauge.json @@ -0,0 +1,829 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "links": [], + "panels": [ + { + "gridPos": { + "h": 7, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 6, + "links": [], + "options": { + "displayMode": "gradient", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": null, + "max": 100, + "min": 0, + "unit": "celsius" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "blue", + "index": 0, + "value": null + }, + { + "color": "green", + "index": 1, + "value": 20 + }, + { + "color": "orange", + "index": 2, + "value": 40 + }, + { + "color": "red", + "index": 3, + "value": 80 + } + ], + "values": false + }, + "orientation": "horizontal" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "alias": "Inside", + "refId": "H", + "scenarioId": "csv_metric_values", + "stringInput": "100,100,100" + }, + { + "alias": "Outhouse", + "refId": "A", + "scenarioId": "random_walk" + }, + { + "refId": "F", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Title above bar", + "type": "bargauge" + }, + { + "gridPos": { + "h": 7, + "w": 5, + "x": 6, + "y": 0 + }, + "id": 12, + "links": [], + "options": { + "displayMode": "gradient", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": null, + "max": 100, + "min": 0, + "unit": "celsius" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "blue", + "index": 0, + "value": null + }, + { + "color": "green", + "index": 1, + "value": 20 + }, + { + "color": "orange", + "index": 2, + "value": 40 + }, + { + "color": "red", + "index": 3, + "value": 80 + } + ], + "values": false + }, + "orientation": "horizontal" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "alias": "Inside", + "refId": "H", + "scenarioId": "csv_metric_values", + "stringInput": "100,100,100" + }, + { + "alias": "Outhouse", + "refId": "A", + "scenarioId": "random_walk" + }, + { + "refId": "F", + "scenarioId": "random_walk" + }, + { + "refId": "B", + "scenarioId": "random_walk" + }, + { + "refId": "C", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Title to left of bar", + "type": "bargauge" + }, + { + "gridPos": { + "h": 7, + "w": 7, + "x": 11, + "y": 0 + }, + "id": 13, + "links": [], + "options": { + "displayMode": "basic", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": null, + "max": 100, + "min": 0, + "unit": "celsius" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "blue", + "index": 0, + "value": null + }, + { + "color": "green", + "index": 1, + "value": 20 + }, + { + "color": "orange", + "index": 2, + "value": 40 + }, + { + "color": "red", + "index": 3, + "value": 80 + } + ], + "values": false + }, + "orientation": "horizontal" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "alias": "Inside", + "refId": "H", + "scenarioId": "csv_metric_values", + "stringInput": "100,100,100" + }, + { + "alias": "Outhouse", + "refId": "A", + "scenarioId": "random_walk" + }, + { + "refId": "F", + "scenarioId": "random_walk" + }, + { + "refId": "B", + "scenarioId": "random_walk" + }, + { + "refId": "C", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Basic mode", + "type": "bargauge" + }, + { + "gridPos": { + "h": 7, + "w": 6, + "x": 18, + "y": 0 + }, + "id": 14, + "links": [], + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": null, + "max": 100, + "min": 0, + "unit": "celsius" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "blue", + "index": 0, + "value": null + }, + { + "color": "green", + "index": 1, + "value": 20 + }, + { + "color": "orange", + "index": 2, + "value": 40 + }, + { + "color": "red", + "index": 3, + "value": 80 + } + ], + "values": false + }, + "orientation": "horizontal" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "alias": "Inside", + "refId": "H", + "scenarioId": "csv_metric_values", + "stringInput": "100,100,100" + }, + { + "alias": "Outhouse", + "refId": "A", + "scenarioId": "random_walk" + }, + { + "refId": "F", + "scenarioId": "random_walk" + }, + { + "refId": "B", + "scenarioId": "random_walk" + }, + { + "refId": "C", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "LED", + "type": "bargauge" + }, + { + "gridPos": { + "h": 9, + "w": 11, + "x": 0, + "y": 7 + }, + "id": 7, + "links": [], + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": null, + "max": 100, + "min": 0, + "unit": "watt" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "green", + "index": 0, + "value": null + }, + { + "color": "orange", + "index": 1, + "value": 40 + }, + { + "color": "red", + "index": 2, + "value": 80 + } + ], + "values": false + }, + "orientation": "vertical" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "refId": "E", + "scenarioId": "csv_metric_values", + "stringInput": "10003,33333" + }, + { + "refId": "F", + "scenarioId": "random_walk" + }, + { + "refId": "G", + "scenarioId": "random_walk" + }, + { + "refId": "H", + "scenarioId": "csv_metric_values", + "stringInput": "100,100,100" + }, + { + "refId": "I", + "scenarioId": "random_walk" + }, + { + "refId": "J", + "scenarioId": "random_walk" + }, + { + "refId": "K", + "scenarioId": "random_walk" + }, + { + "refId": "L", + "scenarioId": "random_walk" + }, + { + "refId": "M", + "scenarioId": "random_walk" + }, + { + "refId": "N", + "scenarioId": "random_walk" + }, + { + "refId": "O", + "scenarioId": "random_walk" + }, + { + "refId": "P", + "scenarioId": "random_walk" + }, + { + "refId": "Q", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "LED Vertical", + "type": "bargauge" + }, + { + "gridPos": { + "h": 9, + "w": 13, + "x": 11, + "y": 7 + }, + "id": 8, + "links": [], + "options": { + "displayMode": "basic", + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": null, + "max": 100, + "min": 0, + "unit": "watt" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "green", + "index": 0, + "value": null + }, + { + "color": "purple", + "index": 1, + "value": 50 + }, + { + "color": "blue", + "index": 2, + "value": 70 + } + ], + "values": false + }, + "orientation": "vertical" + }, + "pluginVersion": "6.2.0-pre", + "targets": [ + { + "refId": "H", + "scenarioId": "csv_metric_values", + "stringInput": "100,100,100" + }, + { + "refId": "A", + "scenarioId": "random_walk" + }, + { + "refId": "B", + "scenarioId": "random_walk" + }, + { + "refId": "C", + "scenarioId": "random_walk" + }, + { + "refId": "D", + "scenarioId": "random_walk" + }, + { + "refId": "I", + "scenarioId": "random_walk" + }, + { + "refId": "J", + "scenarioId": "random_walk" + }, + { + "refId": "K", + "scenarioId": "random_walk" + }, + { + "refId": "L", + "scenarioId": "random_walk" + }, + { + "refId": "M", + "scenarioId": "random_walk" + }, + { + "refId": "N", + "scenarioId": "random_walk" + }, + { + "refId": "O", + "scenarioId": "random_walk" + }, + { + "refId": "P", + "scenarioId": "random_walk" + }, + { + "refId": "Q", + "scenarioId": "random_walk" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Basic vertical ", + "type": "bargauge" + }, + { + "gridPos": { + "h": 7, + "w": 11, + "x": 0, + "y": 16 + }, + "id": 16, + "links": [], + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": ["last"], + "defaults": { + "max": 100, + "min": 0 + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "green", + "index": 0, + "value": null + }, + { + "color": "blue", + "index": 1, + "value": 40 + }, + { + "color": "red", + "index": 2, + "value": 80 + } + ], + "values": false + }, + "orientation": "horizontal" + }, + "pluginVersion": "6.3.0-pre", + "targets": [ + { + "refId": "A", + "scenarioId": "csv_metric_values", + "stringInput": "1,20,90,30,5,0,-100" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Negative value below min", + "type": "bargauge" + }, + { + "gridPos": { + "h": 7, + "w": 3, + "x": 11, + "y": 16 + }, + "id": 17, + "links": [], + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": ["last"], + "defaults": { + "max": 100, + "min": 0 + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "green", + "index": 0, + "value": null + }, + { + "color": "blue", + "index": 1, + "value": 40 + }, + { + "color": "red", + "index": 2, + "value": 80 + } + ], + "values": false + }, + "orientation": "vertical" + }, + "pluginVersion": "6.3.0-pre", + "targets": [ + { + "refId": "A", + "scenarioId": "csv_metric_values", + "stringInput": "1,20,90,30,5,0,-100" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Negative value below min", + "type": "bargauge" + }, + { + "gridPos": { + "h": 7, + "w": 3, + "x": 14, + "y": 16 + }, + "id": 18, + "links": [], + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": ["last"], + "defaults": { + "max": 100, + "min": -10 + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "green", + "index": 0, + "value": null + }, + { + "color": "blue", + "index": 1, + "value": 40 + }, + { + "color": "red", + "index": 2, + "value": 80 + } + ], + "values": false + }, + "orientation": "vertical" + }, + "pluginVersion": "6.3.0-pre", + "targets": [ + { + "refId": "A", + "scenarioId": "csv_metric_values", + "stringInput": "1,20,90,30,5,6" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Positive value above min", + "type": "bargauge" + }, + { + "gridPos": { + "h": 7, + "w": 3, + "x": 17, + "y": 16 + }, + "id": 19, + "links": [], + "options": { + "displayMode": "lcd", + "fieldOptions": { + "calcs": ["last"], + "defaults": { + "max": 35, + "min": -20 + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "blue", + "index": 0, + "value": null + }, + { + "color": "green", + "index": 1, + "value": 5 + }, + { + "color": "#EAB839", + "index": 2, + "value": 25 + }, + { + "color": "red", + "index": 3, + "value": 30 + } + ], + "values": false + }, + "orientation": "vertical" + }, + "pluginVersion": "6.3.0-pre", + "targets": [ + { + "refId": "A", + "scenarioId": "csv_metric_values", + "stringInput": "1,20,90,30,5,6" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Negative min ", + "type": "bargauge" + }, + { + "gridPos": { + "h": 7, + "w": 4, + "x": 20, + "y": 16 + }, + "id": 20, + "links": [], + "options": { + "displayMode": "gradient", + "fieldOptions": { + "calcs": ["last"], + "defaults": { + "max": 35, + "min": -20 + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "blue", + "index": 0, + "value": null + }, + { + "color": "green", + "index": 1, + "value": 5 + }, + { + "color": "#EAB839", + "index": 2, + "value": 25 + }, + { + "color": "red", + "index": 3, + "value": 30 + } + ], + "values": false + }, + "orientation": "vertical" + }, + "pluginVersion": "6.3.0-pre", + "targets": [ + { + "refId": "A", + "scenarioId": "csv_metric_values", + "stringInput": "30,30" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Negative min", + "type": "bargauge" + } + ], + "schemaVersion": 18, + "style": "dark", + "tags": ["gdev", "panel-tests"], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], + "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] + }, + "timezone": "", + "title": "Panel Tests - Bar Gauge", + "uid": "O6f11TZWk", + "version": 12 +} diff --git a/devenv/dev-dashboards/panel-bargauge/retro_led_demo.json b/devenv/dev-dashboards/panel-bargauge/retro_led_demo.json deleted file mode 100644 index 3fe8272c4dfe..000000000000 --- a/devenv/dev-dashboards/panel-bargauge/retro_led_demo.json +++ /dev/null @@ -1,400 +0,0 @@ -{ - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "panels": [ - { - "gridPos": { - "h": 8, - "w": 22, - "x": 0, - "y": 0 - }, - "id": 7, - "links": [], - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "watt" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "green", - "index": 0, - "value": null - }, - { - "color": "orange", - "index": 1, - "value": 40 - }, - { - "color": "red", - "index": 2, - "value": 80 - } - ], - "values": false - }, - "orientation": "vertical" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "refId": "A", - "scenarioId": "random_walk" - }, - { - "refId": "B", - "scenarioId": "random_walk" - }, - { - "refId": "C", - "scenarioId": "random_walk" - }, - { - "refId": "D", - "scenarioId": "random_walk" - }, - { - "refId": "E", - "scenarioId": "csv_metric_values", - "stringInput": "10003,33333" - }, - { - "refId": "F", - "scenarioId": "random_walk" - }, - { - "refId": "G", - "scenarioId": "random_walk" - }, - { - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "refId": "I", - "scenarioId": "random_walk" - }, - { - "refId": "J", - "scenarioId": "random_walk" - }, - { - "refId": "K", - "scenarioId": "random_walk" - }, - { - "refId": "L", - "scenarioId": "random_walk" - }, - { - "refId": "M", - "scenarioId": "random_walk" - }, - { - "refId": "N", - "scenarioId": "random_walk" - }, - { - "refId": "O", - "scenarioId": "random_walk" - }, - { - "refId": "P", - "scenarioId": "random_walk" - }, - { - "refId": "Q", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Usage", - "type": "bargauge" - }, - { - "gridPos": { - "h": 21, - "w": 2, - "x": 22, - "y": 0 - }, - "id": 11, - "links": [], - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "percent" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "green", - "index": 0, - "value": null - }, - { - "color": "red", - "index": 1, - "value": 80 - } - ], - "values": false - }, - "orientation": "vertical" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "refId": "A", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Progress", - "type": "bargauge" - }, - { - "gridPos": { - "h": 13, - "w": 10, - "x": 0, - "y": 8 - }, - "id": 6, - "links": [], - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "celsius" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "green", - "index": 0, - "value": null - }, - { - "color": "orange", - "index": 1, - "value": 40 - }, - { - "color": "red", - "index": 2, - "value": 80 - } - ], - "values": false - }, - "orientation": "horizontal" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "alias": "Inside", - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "alias": "Outhouse", - "refId": "A", - "scenarioId": "random_walk" - }, - { - "alias": "Area B", - "refId": "B", - "scenarioId": "random_walk" - }, - { - "alias": "Basement", - "refId": "C", - "scenarioId": "random_walk" - }, - { - "alias": "Garage", - "refId": "D", - "scenarioId": "random_walk" - }, - { - "alias": "Attic", - "refId": "E", - "scenarioId": "random_walk" - }, - { - "refId": "F", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Temperature", - "type": "bargauge" - }, - { - "gridPos": { - "h": 13, - "w": 12, - "x": 10, - "y": 8 - }, - "id": 8, - "links": [], - "options": { - "displayMode": "lcd", - "fieldOptions": { - "calcs": ["mean"], - "defaults": { - "decimals": null, - "max": 100, - "min": 0, - "unit": "watt" - }, - "mappings": [], - "override": {}, - "thresholds": [ - { - "color": "green", - "index": 0, - "value": null - }, - { - "color": "orange", - "index": 1, - "value": 85 - }, - { - "color": "red", - "index": 2, - "value": 95 - } - ], - "values": false - }, - "orientation": "horizontal" - }, - "pluginVersion": "6.2.0-pre", - "targets": [ - { - "refId": "H", - "scenarioId": "csv_metric_values", - "stringInput": "100,100,100" - }, - { - "refId": "A", - "scenarioId": "random_walk" - }, - { - "refId": "B", - "scenarioId": "random_walk" - }, - { - "refId": "C", - "scenarioId": "random_walk" - }, - { - "refId": "D", - "scenarioId": "random_walk" - }, - { - "refId": "I", - "scenarioId": "random_walk" - }, - { - "refId": "J", - "scenarioId": "random_walk" - }, - { - "refId": "K", - "scenarioId": "random_walk" - }, - { - "refId": "L", - "scenarioId": "random_walk" - }, - { - "refId": "M", - "scenarioId": "random_walk" - }, - { - "refId": "N", - "scenarioId": "random_walk" - }, - { - "refId": "O", - "scenarioId": "random_walk" - }, - { - "refId": "P", - "scenarioId": "random_walk" - }, - { - "refId": "Q", - "scenarioId": "random_walk" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Usage", - "type": "bargauge" - } - ], - "schemaVersion": 18, - "style": "dark", - "tags": ["gdev", "bargauge", "panel-demo"], - "templating": { - "list": [] - }, - "time": { - "from": "now-6h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], - "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] - }, - "timezone": "", - "title": "Bar Gauge LED Demo", - "uid": "0G3rbkqmkaa", - "version": 1 -} diff --git a/devenv/dev-dashboards/panel-gauge/gauge-multi-series.json b/devenv/dev-dashboards/panel-gauge/gauge-multi-series.json index 2f89d3ea9f31..3e1428a98657 100644 --- a/devenv/dev-dashboards/panel-gauge/gauge-multi-series.json +++ b/devenv/dev-dashboards/panel-gauge/gauge-multi-series.json @@ -21,79 +21,62 @@ "datasource": "gdev-testdata", "gridPos": { "h": 8, - "w": 24, + "w": 20, "x": 0, "y": 0 }, "id": 6, "links": [], - "options-gauge": { - "decimals": 0, - "maxValue": 100, - "minValue": 0, - "options": { - "decimals": 0, - "maxValue": 100, - "minValue": 0, - "prefix": "", - "showThresholdLabels": false, - "showThresholdMarkers": true, - "stat": "avg", - "suffix": "", - "thresholds": [], - "unit": "none", - "valueMappings": [] + "options": { + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": 0, + "max": 100, + "min": 0, + "unit": "none" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "#7EB26D", + "index": 0, + "value": null + }, + { + "color": "#EAB839", + "index": 1, + "value": 50 + }, + { + "color": "#6ED0E0", + "index": 2, + "value": 75 + }, + { + "color": "#EF843C", + "index": 3, + "value": 87.5 + }, + { + "color": "#E24D42", + "index": 4, + "value": 93.75 + }, + { + "color": "#1F78C1", + "index": 5, + "value": 96.875 + } + ], + "values": false }, - "prefix": "", + "orientation": "auto", "showThresholdLabels": false, - "showThresholdMarkers": true, - "stat": "avg", - "suffix": "", - "thresholds": [ - { - "color": "#1F78C1", - "index": 5, - "value": 96.875 - }, - { - "color": "#E24D42", - "index": 4, - "value": 93.75 - }, - { - "color": "#EF843C", - "index": 3, - "value": 87.5 - }, - { - "color": "#6ED0E0", - "index": 2, - "value": 75 - }, - { - "color": "#EAB839", - "index": 1, - "value": 50 - }, - { - "color": "#7EB26D", - "index": 0, - "value": null - } - ], - "unit": "none", - "valueMappings": [ - { - "from": "50", - "id": 1, - "operator": "", - "text": "Hello :) ", - "to": "90", - "type": 2, - "value": "" - } - ] + "showThresholdMarkers": true }, + "pluginVersion": "6.3.0-pre", "targets": [ { "refId": "A", @@ -124,50 +107,48 @@ { "datasource": "gdev-testdata", "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 8 + "h": 28, + "w": 4, + "x": 20, + "y": 0 }, - "id": 2, + "id": 4, "links": [], - "options-gauge": { - "decimals": 0, - "maxValue": 100, - "minValue": 0, - "options": { - "decimals": 0, - "maxValue": 100, - "minValue": 0, - "prefix": "", - "showThresholdLabels": false, - "showThresholdMarkers": true, - "stat": "avg", - "suffix": "", - "thresholds": [], - "unit": "none", - "valueMappings": [] + "options": { + "fieldOptions": { + "calcs": ["max"], + "defaults": { + "decimals": 0, + "max": "200", + "min": 0, + "unit": "none" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "#7EB26D", + "index": 0, + "value": null + }, + { + "color": "#EAB839", + "index": 1, + "value": 50 + }, + { + "color": "#6ED0E0", + "index": 2, + "value": 75 + } + ], + "values": false }, - "prefix": "", + "orientation": "auto", "showThresholdLabels": false, - "showThresholdMarkers": true, - "stat": "avg", - "suffix": "", - "thresholds": [ - { - "color": "#EAB839", - "index": 1, - "value": 50 - }, - { - "color": "#7EB26D", - "index": 0, - "value": null - } - ], - "unit": "none", - "valueMappings": [] + "showThresholdMarkers": true }, + "pluginVersion": "6.3.0-pre", "targets": [ { "refId": "A", @@ -192,61 +173,49 @@ ], "timeFrom": null, "timeShift": null, - "title": "Repeat horizontal", + "title": "Vertical", "type": "gauge" }, { "datasource": "gdev-testdata", "gridPos": { - "h": 14, - "w": 5, + "h": 20, + "w": 20, "x": 0, - "y": 16 + "y": 8 }, - "id": 4, + "id": 2, "links": [], - "options-gauge": { - "decimals": 0, - "maxValue": "200", - "minValue": 0, - "options": { - "decimals": 0, - "maxValue": 100, - "minValue": 0, - "prefix": "", - "showThresholdLabels": false, - "showThresholdMarkers": true, - "stat": "avg", - "suffix": "", - "thresholds": [], - "unit": "none", - "valueMappings": [] + "options": { + "fieldOptions": { + "calcs": ["mean"], + "defaults": { + "decimals": 0, + "max": 100, + "min": 0, + "unit": "none" + }, + "mappings": [], + "override": {}, + "thresholds": [ + { + "color": "#7EB26D", + "index": 0, + "value": null + }, + { + "color": "#EAB839", + "index": 1, + "value": 50 + } + ], + "values": false }, - "prefix": "", + "orientation": "auto", "showThresholdLabels": false, - "showThresholdMarkers": true, - "stat": "max", - "suffix": "", - "thresholds": [ - { - "color": "#6ED0E0", - "index": 2, - "value": 75 - }, - { - "color": "#EAB839", - "index": 1, - "value": 50 - }, - { - "color": "#7EB26D", - "index": 0, - "value": null - } - ], - "unit": "none", - "valueMappings": [] + "showThresholdMarkers": true }, + "pluginVersion": "6.3.0-pre", "targets": [ { "refId": "A", @@ -271,11 +240,11 @@ ], "timeFrom": null, "timeShift": null, - "title": "Vertical", + "title": "Repeat horizontal", "type": "gauge" } ], - "schemaVersion": 17, + "schemaVersion": 18, "style": "dark", "tags": ["panel-tests", "gdev", "gauge"], "templating": { @@ -292,5 +261,5 @@ "timezone": "", "title": "Panel Tests - Gauge Multi Series", "uid": "szkuR1umk", - "version": 7 + "version": 2 } diff --git a/devenv/docker/blocks/elastic7/docker-compose.yaml b/devenv/docker/blocks/elastic7/docker-compose.yaml index 3ef922c890c3..45e2836f870e 100644 --- a/devenv/docker/blocks/elastic7/docker-compose.yaml +++ b/devenv/docker/blocks/elastic7/docker-compose.yaml @@ -21,3 +21,19 @@ - ./docker/blocks/elastic7/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro - /var/log:/var/log:ro - ../data/log:/var/log/grafana:ro + + metricbeat7: + image: docker.elastic.co/beats/metricbeat-oss:7.0.0 + network_mode: host + command: metricbeat -e -strict.perms=false + user: root + volumes: + - ./docker/blocks/elastic7/metricbeat.yml:/usr/share/metricbeat/metricbeat.yml:ro + - /var/run/docker.sock:/var/run/docker.sock:ro + + kibana7: + image: docker.elastic.co/kibana/kibana-oss:7.0.0 + ports: + - "5601:5601" + environment: + ELASTICSEARCH_HOSTS: http://elasticsearch7:9200 diff --git a/devenv/docker/blocks/elastic7/metricbeat.yml b/devenv/docker/blocks/elastic7/metricbeat.yml new file mode 100644 index 000000000000..4788c0cdd9a5 --- /dev/null +++ b/devenv/docker/blocks/elastic7/metricbeat.yml @@ -0,0 +1,38 @@ +metricbeat.config: + modules: + path: ${path.config}/modules.d/*.yml + # Reload module configs as they change: + reload.enabled: false + +metricbeat.autodiscover: + providers: + - type: docker + hints.enabled: true + +metricbeat.modules: +- module: docker + metricsets: + - "container" + - "cpu" + - "diskio" + - "healthcheck" + - "info" + #- "image" + - "memory" + - "network" + hosts: ["unix:///var/run/docker.sock"] + period: 10s + enabled: true + +processors: + - add_cloud_metadata: ~ + +output.elasticsearch: + hosts: ["localhost:12200"] + index: "metricbeat-%{+yyyy.MM.dd}" + +setup.template.name: "metricbeat" +setup.template.pattern: "metricbeat-*" +setup.template.settings: + index.number_of_shards: 1 + index.number_of_replicas: 1 \ No newline at end of file diff --git a/devenv/docker/blocks/multiple-openldap/admins-ldap-server.Dockerfile b/devenv/docker/blocks/multiple-openldap/admins-ldap-server.Dockerfile new file mode 100644 index 000000000000..29e581d2b137 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/admins-ldap-server.Dockerfile @@ -0,0 +1,30 @@ +# Fork of https://github.com/dinkel/docker-openldap + +FROM debian:jessie + +LABEL maintainer="Grafana team " + +ENV OPENLDAP_VERSION 2.4.40 + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ + slapd=${OPENLDAP_VERSION}* \ + ldap-utils && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN mv /etc/ldap /etc/ldap.dist + +EXPOSE 389 + +VOLUME ["/etc/ldap", "/var/lib/ldap"] + +COPY admins-ldap-server/modules/ /etc/ldap.dist/modules +COPY admins-ldap-server/prepopulate/ /etc/ldap.dist/prepopulate + +COPY ./entrypoint.sh /entrypoint.sh +COPY ./prepopulate.sh /prepopulate.sh + +ENTRYPOINT ["/entrypoint.sh"] + +CMD ["slapd", "-d", "32768", "-u", "openldap", "-g", "openldap"] diff --git a/devenv/docker/blocks/multiple-openldap/admins-ldap-server/modules/memberof.ldif b/devenv/docker/blocks/multiple-openldap/admins-ldap-server/modules/memberof.ldif new file mode 100644 index 000000000000..fd9cce957c33 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/admins-ldap-server/modules/memberof.ldif @@ -0,0 +1,33 @@ +dn: cn=module,cn=config +cn: module +objectClass: olcModuleList +objectClass: top +olcModulePath: /usr/lib/ldap +olcModuleLoad: memberof.la + +dn: olcOverlay={0}memberof,olcDatabase={1}hdb,cn=config +objectClass: olcConfig +objectClass: olcMemberOf +objectClass: olcOverlayConfig +objectClass: top +olcOverlay: memberof +olcMemberOfDangling: ignore +olcMemberOfRefInt: TRUE +olcMemberOfGroupOC: groupOfNames +olcMemberOfMemberAD: member +olcMemberOfMemberOfAD: memberOf + +dn: cn=module,cn=config +cn: module +objectClass: olcModuleList +objectClass: top +olcModulePath: /usr/lib/ldap +olcModuleLoad: refint.la + +dn: olcOverlay={1}refint,olcDatabase={1}hdb,cn=config +objectClass: olcConfig +objectClass: olcOverlayConfig +objectClass: olcRefintConfig +objectClass: top +olcOverlay: {1}refint +olcRefintAttribute: memberof member manager owner diff --git a/devenv/docker/blocks/multiple-openldap/admins-ldap-server/prepopulate/1_units.ldif b/devenv/docker/blocks/multiple-openldap/admins-ldap-server/prepopulate/1_units.ldif new file mode 100644 index 000000000000..22e063036889 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/admins-ldap-server/prepopulate/1_units.ldif @@ -0,0 +1,9 @@ +dn: ou=groups,dc=grafana,dc=org +ou: Groups +objectclass: top +objectclass: organizationalUnit + +dn: ou=users,dc=grafana,dc=org +ou: Users +objectclass: top +objectclass: organizationalUnit diff --git a/devenv/docker/blocks/multiple-openldap/admins-ldap-server/prepopulate/2_users.ldif b/devenv/docker/blocks/multiple-openldap/admins-ldap-server/prepopulate/2_users.ldif new file mode 100644 index 000000000000..1ee592dc7a06 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/admins-ldap-server/prepopulate/2_users.ldif @@ -0,0 +1,20 @@ +# ldap-admin +dn: cn=ldap-admin,ou=users,dc=grafana,dc=org +mail: ldap-admin@grafana.com +userPassword: grafana +objectClass: person +objectClass: top +objectClass: inetOrgPerson +objectClass: organizationalPerson +sn: ldap-admin +cn: ldap-admin + +dn: cn=ldap-torkel,ou=users,dc=grafana,dc=org +mail: ldap-torkel@grafana.com +userPassword: grafana +objectClass: person +objectClass: top +objectClass: inetOrgPerson +objectClass: organizationalPerson +sn: ldap-torkel +cn: ldap-torkel diff --git a/devenv/docker/blocks/multiple-openldap/admins-ldap-server/prepopulate/3_groups.ldif b/devenv/docker/blocks/multiple-openldap/admins-ldap-server/prepopulate/3_groups.ldif new file mode 100644 index 000000000000..f7285f8a9c32 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/admins-ldap-server/prepopulate/3_groups.ldif @@ -0,0 +1,6 @@ +dn: cn=admins,ou=groups,dc=grafana,dc=org +cn: admins +objectClass: groupOfNames +objectClass: top +member: cn=ldap-admin,ou=users,dc=grafana,dc=org +member: cn=ldap-torkel,ou=users,dc=grafana,dc=org diff --git a/devenv/docker/blocks/multiple-openldap/docker-compose.yaml b/devenv/docker/blocks/multiple-openldap/docker-compose.yaml new file mode 100644 index 000000000000..7ed0ca2e840a --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/docker-compose.yaml @@ -0,0 +1,23 @@ + admins-openldap: + build: + context: docker/blocks/multiple-openldap + dockerfile: ./admins-ldap-server.Dockerfile + environment: + SLAPD_PASSWORD: grafana + SLAPD_DOMAIN: grafana.org + SLAPD_ADDITIONAL_MODULES: memberof + ports: + - "389:389" + + openldap: + build: + context: docker/blocks/multiple-openldap + dockerfile: ./ldap-server.Dockerfile + environment: + SLAPD_PASSWORD: grafana + SLAPD_DOMAIN: grafana.org + SLAPD_ADDITIONAL_MODULES: memberof + ports: + - "388:389" + + diff --git a/devenv/docker/blocks/multiple-openldap/entrypoint.sh b/devenv/docker/blocks/multiple-openldap/entrypoint.sh new file mode 100755 index 000000000000..d202ed14b31f --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/entrypoint.sh @@ -0,0 +1,98 @@ +#!/bin/bash + +# When not limiting the open file descritors limit, the memory consumption of +# slapd is absurdly high. See https://github.com/docker/docker/issues/8231 +ulimit -n 8192 + + +set -e + +chown -R openldap:openldap /var/lib/ldap/ + +if [[ ! -d /etc/ldap/slapd.d ]]; then + + if [[ -z "$SLAPD_PASSWORD" ]]; then + echo -n >&2 "Error: Container not configured and SLAPD_PASSWORD not set. " + echo >&2 "Did you forget to add -e SLAPD_PASSWORD=... ?" + exit 1 + fi + + if [[ -z "$SLAPD_DOMAIN" ]]; then + echo -n >&2 "Error: Container not configured and SLAPD_DOMAIN not set. " + echo >&2 "Did you forget to add -e SLAPD_DOMAIN=... ?" + exit 1 + fi + + SLAPD_ORGANIZATION="${SLAPD_ORGANIZATION:-${SLAPD_DOMAIN}}" + + cp -a /etc/ldap.dist/* /etc/ldap + + cat <<-EOF | debconf-set-selections + slapd slapd/no_configuration boolean false + slapd slapd/password1 password $SLAPD_PASSWORD + slapd slapd/password2 password $SLAPD_PASSWORD + slapd shared/organization string $SLAPD_ORGANIZATION + slapd slapd/domain string $SLAPD_DOMAIN + slapd slapd/backend select HDB + slapd slapd/allow_ldap_v2 boolean false + slapd slapd/purge_database boolean false + slapd slapd/move_old_database boolean true +EOF + + dpkg-reconfigure -f noninteractive slapd >/dev/null 2>&1 + + dc_string="" + + IFS="."; declare -a dc_parts=($SLAPD_DOMAIN) + + for dc_part in "${dc_parts[@]}"; do + dc_string="$dc_string,dc=$dc_part" + done + + base_string="BASE ${dc_string:1}" + + sed -i "s/^#BASE.*/${base_string}/g" /etc/ldap/ldap.conf + + if [[ -n "$SLAPD_CONFIG_PASSWORD" ]]; then + password_hash=`slappasswd -s "${SLAPD_CONFIG_PASSWORD}"` + + sed_safe_password_hash=${password_hash//\//\\\/} + + slapcat -n0 -F /etc/ldap/slapd.d -l /tmp/config.ldif + sed -i "s/\(olcRootDN: cn=admin,cn=config\)/\1\nolcRootPW: ${sed_safe_password_hash}/g" /tmp/config.ldif + rm -rf /etc/ldap/slapd.d/* + slapadd -n0 -F /etc/ldap/slapd.d -l /tmp/config.ldif >/dev/null 2>&1 + fi + + if [[ -n "$SLAPD_ADDITIONAL_SCHEMAS" ]]; then + IFS=","; declare -a schemas=($SLAPD_ADDITIONAL_SCHEMAS); unset IFS + + for schema in "${schemas[@]}"; do + slapadd -n0 -F /etc/ldap/slapd.d -l "/etc/ldap/schema/${schema}.ldif" >/dev/null 2>&1 + done + fi + + if [[ -n "$SLAPD_ADDITIONAL_MODULES" ]]; then + IFS=","; declare -a modules=($SLAPD_ADDITIONAL_MODULES); unset IFS + + for module in "${modules[@]}"; do + echo "Adding module ${module}" + slapadd -n0 -F /etc/ldap/slapd.d -l "/etc/ldap/modules/${module}.ldif" >/dev/null 2>&1 + done + fi + + # This needs to run in background + # Will prepopulate entries after ldap daemon has started + ./prepopulate.sh & + + chown -R openldap:openldap /etc/ldap/slapd.d/ /var/lib/ldap/ /var/run/slapd/ +else + slapd_configs_in_env=`env | grep 'SLAPD_'` + + if [ -n "${slapd_configs_in_env:+x}" ]; then + echo "Info: Container already configured, therefore ignoring SLAPD_xxx environment variables" + fi +fi + +exec "$@" + diff --git a/devenv/docker/blocks/multiple-openldap/ldap-server.Dockerfile b/devenv/docker/blocks/multiple-openldap/ldap-server.Dockerfile new file mode 100644 index 000000000000..7604d1118a3f --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/ldap-server.Dockerfile @@ -0,0 +1,30 @@ +# Fork of https://github.com/dinkel/docker-openldap + +FROM debian:jessie + +LABEL maintainer="Grafana team " + +ENV OPENLDAP_VERSION 2.4.40 + +RUN apt-get update && \ + DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ + slapd=${OPENLDAP_VERSION}* \ + ldap-utils && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN mv /etc/ldap /etc/ldap.dist + +EXPOSE 389 + +VOLUME ["/etc/ldap", "/var/lib/ldap"] + +COPY ldap-server/modules/ /etc/ldap.dist/modules +COPY ldap-server/prepopulate/ /etc/ldap.dist/prepopulate + +COPY ./entrypoint.sh /entrypoint.sh +COPY ./prepopulate.sh /prepopulate.sh + +ENTRYPOINT ["/entrypoint.sh"] + +CMD ["slapd", "-d", "32768", "-u", "openldap", "-g", "openldap"] diff --git a/devenv/docker/blocks/multiple-openldap/ldap-server/modules/memberof.ldif b/devenv/docker/blocks/multiple-openldap/ldap-server/modules/memberof.ldif new file mode 100644 index 000000000000..fd9cce957c33 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/ldap-server/modules/memberof.ldif @@ -0,0 +1,33 @@ +dn: cn=module,cn=config +cn: module +objectClass: olcModuleList +objectClass: top +olcModulePath: /usr/lib/ldap +olcModuleLoad: memberof.la + +dn: olcOverlay={0}memberof,olcDatabase={1}hdb,cn=config +objectClass: olcConfig +objectClass: olcMemberOf +objectClass: olcOverlayConfig +objectClass: top +olcOverlay: memberof +olcMemberOfDangling: ignore +olcMemberOfRefInt: TRUE +olcMemberOfGroupOC: groupOfNames +olcMemberOfMemberAD: member +olcMemberOfMemberOfAD: memberOf + +dn: cn=module,cn=config +cn: module +objectClass: olcModuleList +objectClass: top +olcModulePath: /usr/lib/ldap +olcModuleLoad: refint.la + +dn: olcOverlay={1}refint,olcDatabase={1}hdb,cn=config +objectClass: olcConfig +objectClass: olcOverlayConfig +objectClass: olcRefintConfig +objectClass: top +olcOverlay: {1}refint +olcRefintAttribute: memberof member manager owner diff --git a/devenv/docker/blocks/multiple-openldap/ldap-server/prepopulate/1_units.ldif b/devenv/docker/blocks/multiple-openldap/ldap-server/prepopulate/1_units.ldif new file mode 100644 index 000000000000..22e063036889 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/ldap-server/prepopulate/1_units.ldif @@ -0,0 +1,9 @@ +dn: ou=groups,dc=grafana,dc=org +ou: Groups +objectclass: top +objectclass: organizationalUnit + +dn: ou=users,dc=grafana,dc=org +ou: Users +objectclass: top +objectclass: organizationalUnit diff --git a/devenv/docker/blocks/multiple-openldap/ldap-server/prepopulate/2_users.ldif b/devenv/docker/blocks/multiple-openldap/ldap-server/prepopulate/2_users.ldif new file mode 100644 index 000000000000..8e1dfbf603ad --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/ldap-server/prepopulate/2_users.ldif @@ -0,0 +1,59 @@ +dn: cn=ldap-editor,ou=users,dc=grafana,dc=org +mail: ldap-editor@grafana.com +userPassword: grafana +objectClass: person +objectClass: top +objectClass: inetOrgPerson +objectClass: organizationalPerson +sn: ldap-editor +cn: ldap-editor + +dn: cn=ldap-viewer,ou=users,dc=grafana,dc=org +mail: ldap-viewer@grafana.com +userPassword: grafana +objectClass: person +objectClass: top +objectClass: inetOrgPerson +objectClass: organizationalPerson +sn: ldap-viewer +cn: ldap-viewer + +dn: cn=ldap-carl,ou=users,dc=grafana,dc=org +mail: ldap-carl@grafana.com +userPassword: grafana +objectClass: person +objectClass: top +objectClass: inetOrgPerson +objectClass: organizationalPerson +sn: ldap-carl +cn: ldap-carl + +dn: cn=ldap-daniel,ou=users,dc=grafana,dc=org +mail: ldap-daniel@grafana.com +userPassword: grafana +objectClass: person +objectClass: top +objectClass: inetOrgPerson +objectClass: organizationalPerson +sn: ldap-daniel +cn: ldap-daniel + +dn: cn=ldap-leo,ou=users,dc=grafana,dc=org +mail: ldap-leo@grafana.com +userPassword: grafana +objectClass: person +objectClass: top +objectClass: inetOrgPerson +objectClass: organizationalPerson +sn: ldap-leo +cn: ldap-leo + +dn: cn=ldap-tobias,ou=users,dc=grafana,dc=org +mail: ldap-tobias@grafana.com +userPassword: grafana +objectClass: person +objectClass: top +objectClass: inetOrgPerson +objectClass: organizationalPerson +sn: ldap-tobias +cn: ldap-tobias diff --git a/devenv/docker/blocks/multiple-openldap/ldap-server/prepopulate/3_groups.ldif b/devenv/docker/blocks/multiple-openldap/ldap-server/prepopulate/3_groups.ldif new file mode 100644 index 000000000000..8d55eaaa7079 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/ldap-server/prepopulate/3_groups.ldif @@ -0,0 +1,23 @@ +dn: cn=admins,ou=groups,dc=grafana,dc=org +cn: admins +objectClass: groupOfNames +objectClass: top + +dn: cn=editors,ou=groups,dc=grafana,dc=org +cn: editors +objectClass: groupOfNames +member: cn=ldap-editor,ou=users,dc=grafana,dc=org + +dn: cn=backend,ou=groups,dc=grafana,dc=org +cn: backend +objectClass: groupOfNames +member: cn=ldap-carl,ou=users,dc=grafana,dc=org +member: cn=ldap-leo,ou=users,dc=grafana,dc=org +member: cn=ldap-torkel,ou=users,dc=grafana,dc=org + +dn: cn=frontend,ou=groups,dc=grafana,dc=org +cn: frontend +objectClass: groupOfNames +member: cn=ldap-torkel,ou=users,dc=grafana,dc=org +member: cn=ldap-daniel,ou=users,dc=grafana,dc=org +member: cn=ldap-leo,ou=users,dc=grafana,dc=org diff --git a/devenv/docker/blocks/multiple-openldap/ldap_dev.toml b/devenv/docker/blocks/multiple-openldap/ldap_dev.toml new file mode 100644 index 000000000000..c4c2516694f4 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/ldap_dev.toml @@ -0,0 +1,59 @@ +# To troubleshoot and get more log info enable ldap debug logging in grafana.ini +# [log] +# filters = ldap:debug + +# For the verbose comments options see "openldap" env block + +# --- First LDAP Server (only admins) --- + +[[servers]] +host = "127.0.0.1" +port = 389 +use_ssl = false +start_tls = false +ssl_skip_verify = false +bind_dn = "cn=admin,dc=grafana,dc=org" +bind_password = 'grafana' +search_filter = "(cn=%s)" +search_base_dns = ["ou=users,dc=grafana,dc=org"] + +[servers.attributes] +name = "givenName" +surname = "sn" +username = "cn" +member_of = "memberOf" +email = "email" + +[[servers.group_mappings]] +group_dn = "cn=admins,ou=groups,dc=grafana,dc=org" +org_role = "Admin" +grafana_admin = true + +# --- Second LDAP Server (rest of the users) --- + +[[servers]] +host = "127.0.0.1" +port = 388 +use_ssl = false +start_tls = false +ssl_skip_verify = false + +bind_dn = "cn=admin,dc=grafana,dc=org" +bind_password = 'grafana' +search_filter = "(cn=%s)" +search_base_dns = ["ou=users,dc=grafana,dc=org"] + +[servers.attributes] +name = "givenName" +surname = "sn" +username = "cn" +member_of = "memberOf" +email = "email" + +[[servers.group_mappings]] +group_dn = "cn=editors,ou=groups,dc=grafana,dc=org" +org_role = "Editor" + +[[servers.group_mappings]] +group_dn = "*" +org_role = "Viewer" diff --git a/devenv/docker/blocks/multiple-openldap/notes.md b/devenv/docker/blocks/multiple-openldap/notes.md new file mode 100644 index 000000000000..1fcbfa013db0 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/notes.md @@ -0,0 +1,38 @@ +# Notes on Multiple OpenLdap Docker Block + +This is very similar to openldap docker block, but it creates multiple ldap servers instead of one. + +Any ldif files added to the prepopulate subdirectory will be automatically imported into the OpenLdap database. + +"admins-ldap-server" block contains admin group and admin users. The "ldap-server" block has all the rest of the users. See below for the full list of users. + +This blocks are here to help with testing multiple LDAP servers, for any other LDAP related development and testing "openldap" block should be used. + +## Enabling LDAP in Grafana + +Copy the ldap_dev.toml file in this folder into your `conf` folder (it is gitignored already). To enable it in the .ini file to get Grafana to use this block: + +```ini +[auth.ldap] +enabled = true +config_file = conf/ldap_dev.toml +; allow_sign_up = true +``` + +## Groups & Users + +admins + ldap-admin + ldap-torkel +backend + ldap-carl + ldap-torkel + ldap-leo +frontend + ldap-torkel + ldap-tobias + ldap-daniel +editors + ldap-editor +no groups + ldap-viewer diff --git a/devenv/docker/blocks/multiple-openldap/prepopulate.sh b/devenv/docker/blocks/multiple-openldap/prepopulate.sh new file mode 100755 index 000000000000..aa11f8aba4f7 --- /dev/null +++ b/devenv/docker/blocks/multiple-openldap/prepopulate.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "Pre-populating ldap entries, first waiting for ldap to start" + +sleep 3 + +adminUserDn="cn=admin,dc=grafana,dc=org" +adminPassword="grafana" + +for file in `ls /etc/ldap/prepopulate/*.ldif`; do + ldapadd -x -D $adminUserDn -w $adminPassword -f "$file" +done + + diff --git a/devenv/docker/blocks/openldap/Dockerfile b/devenv/docker/blocks/openldap/Dockerfile index 76172e133a45..b0d23b9e0c91 100644 --- a/devenv/docker/blocks/openldap/Dockerfile +++ b/devenv/docker/blocks/openldap/Dockerfile @@ -2,7 +2,7 @@ FROM debian:jessie -LABEL maintainer="Christian Luginbühl " +LABEL maintainer="Grafana team " ENV OPENLDAP_VERSION 2.4.40 diff --git a/devenv/docker/blocks/openldap/notes.md b/devenv/docker/blocks/openldap/notes.md index fb4130859706..a74c1427901f 100644 --- a/devenv/docker/blocks/openldap/notes.md +++ b/devenv/docker/blocks/openldap/notes.md @@ -2,8 +2,6 @@ Any ldif files added to the prepopulate subdirectory will be automatically imported into the OpenLdap database. -The ldif files add eight users, `ldap-admin`, `ldap-editor`, `ldap-viewer`, `ldap-carl`, `ldap-daniel`, `ldap-leo`, `ldap-tobias` and `ldap-torkel`. Two groups, `admins` and `users`, are added that correspond with the group mappings in the default conf/ldap.toml. `ldap-admin` is a member of `admins` and `ldap-editor` is a member of `users`. - Note that users that are added here need to specify a `memberOf` attribute manually as well as the `member` attribute for the group. The `memberOf` module usually does this automatically (if you add a group in Apache Directory Studio for example) but this does not work in the entrypoint script as it uses the `slapadd` command to add entries before the server has started and before the `memberOf` module is loaded. After adding ldif files to `prepopulate`: @@ -23,12 +21,11 @@ config_file = conf/ldap_dev.toml ; allow_sign_up = true ``` -Test groups & users +## Groups & Users admins ldap-admin ldap-torkel - ldap-daniel backend ldap-carl ldap-torkel diff --git a/devenv/docker/loadtest/README.md b/devenv/docker/loadtest/README.md index ca70a77dc74f..95f5c38dc0eb 100644 --- a/devenv/docker/loadtest/README.md +++ b/devenv/docker/loadtest/README.md @@ -6,6 +6,9 @@ Runs load tests and checks using [k6](https://k6.io/). Docker +To run the auth proxy test you'll need to setup nginx proxy from docker block and +enable auth proxy together with configuring Grafana for auth proxy. + ## Run Run load test for 15 minutes using 2 virtual users and targeting http://localhost:3000. @@ -32,6 +35,13 @@ Run load test for 10 virtual users: $ ./run.sh -v 10 ``` +Run auth proxy test: + +```bash +$ ./run.sh -c auth_proxy_test +``` + + Example output: ```bash diff --git a/devenv/docker/loadtest/auth_proxy_test.js b/devenv/docker/loadtest/auth_proxy_test.js new file mode 100644 index 000000000000..f506701e44e0 --- /dev/null +++ b/devenv/docker/loadtest/auth_proxy_test.js @@ -0,0 +1,56 @@ +import { sleep, check, group } from 'k6'; +import { createBasicAuthClient } from './modules/client.js'; + +export let options = { + noCookiesReset: true +}; + +let endpoint = __ENV.URL || 'http://localhost:10080/grafana'; +const client = createBasicAuthClient(endpoint, 'user1', 'grafana'); +client.withOrgId(1); + +export const setup = () => { + const adminClient = createBasicAuthClient(endpoint, 'admin', 'admin'); + let res = adminClient.datasources.getByName('gdev-prometheus'); + if (res.status !== 200) { + throw new Error('Expected 200 response status when creating datasource'); + } + + return { + datasourceId: res.json().id, + }; +} + +export default (data) => { + group("auth proxy test", () => { + group("batch proxy requests", () => { + const d = new Date(); + const batchCount = 300; + const requests = []; + const query = encodeURI('topk(5, max(scrape_duration_seconds) by (job))'); + const start = (d.getTime() / 1000) - 3600; + const end = (d.getTime() / 1000); + const step = 20; + + requests.push({ method: 'GET', url: '/api/annotations?dashboardId=8&from=1558670300607&to=1558691900607' }); + + for (let n = 0; n < batchCount; n++) { + requests.push({ + method: 'GET', + url: `/api/datasources/proxy/${data.datasourceId}/api/v1/query_range?query=${query}&start=${start}&end=${end}&step=${step}`, + }); + } + + let responses = client.batch(requests); + for (let n = 0; n < batchCount; n++) { + check(responses[n], { + 'response status is 200': (r) => r.status === 200, + }); + } + }); + }); + + sleep(5) +} + +export const teardown = (data) => {} diff --git a/devenv/docker/loadtest/run.sh b/devenv/docker/loadtest/run.sh index 9517edf5d743..0d5d9cc441c8 100755 --- a/devenv/docker/loadtest/run.sh +++ b/devenv/docker/loadtest/run.sh @@ -6,8 +6,9 @@ run() { duration='15m' url='http://localhost:3000' vus='2' + testcase='auth_token_test' - while getopts ":d:u:v:" o; do + while getopts ":d:u:v:c:" o; do case "${o}" in d) duration=${OPTARG} @@ -18,11 +19,14 @@ run() { v) vus=${OPTARG} ;; + c) + testcase=${OPTARG} + ;; esac done shift $((OPTIND-1)) - docker run -t --network=host -v $PWD:/src -e URL=$url --rm -i loadimpact/k6:master run --vus $vus --duration $duration src/auth_token_test.js + docker run -t --network=host -v $PWD:/src -e URL=$url --rm -i loadimpact/k6:master run --vus $vus --duration $duration src/$testcase.js } run "$@" diff --git a/docs/sources/administration/provisioning.md b/docs/sources/administration/provisioning.md index da95a311635b..d09fb0bbc51b 100644 --- a/docs/sources/administration/provisioning.md +++ b/docs/sources/administration/provisioning.md @@ -179,6 +179,24 @@ Secure json data is a map of settings that will be encrypted with [secret key](/ | accessKey | string | Cloudwatch | Access key for connecting to Cloudwatch | | secretKey | string | Cloudwatch | Secret key for connecting to Cloudwatch | +#### Custom HTTP headers for datasources +Datasources managed by Grafanas provisioning can be configured to add HTTP headers to all requests +going to that datasource. The header name is configured in the `jsonData` field and the header value should be +configured in `secureJsonData`. + +```yaml +apiVersion: 1 + +datasources: +- name: Graphite + jsonData: + httpHeaderName1: "HeaderName" + httpHeaderName2: "Authorization" + secureJsonData: + httpHeaderValue1: "HeaderValue" + httpHeaderValue2: "Bearer XXXXXXXXX" +``` + ### Dashboards It's possible to manage dashboards in Grafana by adding one or more yaml config files in the [`provisioning/dashboards`](/installation/configuration/#provisioning) directory. Each config file can contain a list of `dashboards providers` that will load dashboards into Grafana from the local filesystem. @@ -204,7 +222,7 @@ providers: # enable dashboard editing editable: true # how often Grafana will scan for changed dashboards - updateIntervalSeconds: 10 + updateIntervalSeconds: 10 options: # path to dashboard files on disk. Required path: /var/lib/grafana/dashboards @@ -274,7 +292,7 @@ notifiers: # or org_name: Main Org. is_default: true - send_reminders: true + send_reminder: true frequency: 1h disable_resolve_message: false # See `Supported Settings` section for settings supporter for each diff --git a/docs/sources/auth/ldap.md b/docs/sources/auth/ldap.md index d0ae9094d66a..a3a01e6b6c67 100644 --- a/docs/sources/auth/ldap.md +++ b/docs/sources/auth/ldap.md @@ -215,6 +215,67 @@ email = "email" # [[servers.group_mappings]] omitted for clarity ``` +### Multiple LDAP servers + +Grafana does support receiving information from multiple LDAP servers. + +**LDAP specific configuration file (ldap.toml):** +```bash +# --- First LDAP Server --- + +[[servers]] +host = "10.0.0.1" +port = 389 +use_ssl = false +start_tls = false +ssl_skip_verify = false +bind_dn = "cn=admin,dc=grafana,dc=org" +bind_password = 'grafana' +search_filter = "(cn=%s)" +search_base_dns = ["ou=users,dc=grafana,dc=org"] + +[servers.attributes] +name = "givenName" +surname = "sn" +username = "cn" +member_of = "memberOf" +email = "email" + +[[servers.group_mappings]] +group_dn = "cn=admins,ou=groups,dc=grafana,dc=org" +org_role = "Admin" +grafana_admin = true + +# --- Second LDAP Server --- + +[[servers]] +host = "10.0.0.2" +port = 389 +use_ssl = false +start_tls = false +ssl_skip_verify = false + +bind_dn = "cn=admin,dc=grafana,dc=org" +bind_password = 'grafana' +search_filter = "(cn=%s)" +search_base_dns = ["ou=users,dc=grafana,dc=org"] + +[servers.attributes] +name = "givenName" +surname = "sn" +username = "cn" +member_of = "memberOf" +email = "email" + +[[servers.group_mappings]] +group_dn = "cn=editors,ou=groups,dc=grafana,dc=org" +org_role = "Editor" + +[[servers.group_mappings]] +group_dn = "*" +org_role = "Viewer" +``` + ### Active Directory [Active Directory](https://technet.microsoft.com/en-us/library/hh831484(v=ws.11).aspx) is a directory service which is commonly used in Windows environments. @@ -247,6 +308,8 @@ email = "mail" # [[servers.group_mappings]] omitted for clarity ``` + + #### Port requirements In above example SSL is enabled and an encrypted port have been configured. If your Active Directory don't support SSL please change `enable_ssl = false` and `port = 389`. diff --git a/docs/sources/features/datasources/azuremonitor.md b/docs/sources/features/datasources/azuremonitor.md index d72f5273925f..114187499f17 100644 --- a/docs/sources/features/datasources/azuremonitor.md +++ b/docs/sources/features/datasources/azuremonitor.md @@ -31,34 +31,37 @@ The datasource can access metrics from four different services. You can configur - [Guide to setting up an Azure Active Directory Application for Azure Log Analytics.](https://dev.loganalytics.io/documentation/Authorization/AAD-Setup) - [Quickstart Guide for Application Insights.](https://dev.applicationinsights.io/quickstart/) -1. Accessed from the Grafana main menu, newly installed data sources can be added immediately within the Data Sources section. Next, click the "Add data source" button in the upper right. The data source will be available for selection in the Type select box. +1. Accessed from the Grafana main menu, newly installed data sources can be added immediately within the Data Sources section. Next, click the "Add data source" button in the upper right. The Azure Monitor data source will be available for selection in the Cloud section in the list of data sources. -2. Select Azure Monitor from the Type dropdown:
-![Data Source Type](https://raw.githubusercontent.com/grafana/azure-monitor-datasource/master/src/img/config_1_select_type.png) -3. In the name field, fill in a name for the data source. It can be anything. Some suggestions are Azure Monitor or App Insights. +2. In the name field, Grafana will automatically fill in a name for the data source - `Azure Monitor` or something like `Azure Monitor - 3`. If you are going to configure multiple data sources then change the name to something more informative. -4. If you are using Azure Monitor, then you need 4 pieces of information from the Azure portal (see link above for detailed instructions): - - **Tenant Id** (Azure Active Directory -> Properties -> Directory ID) - - **Subscription Id** (Subscriptions -> Choose subscription -> Overview -> Subscription ID) - - **Client Id** (Azure Active Directory -> App Registrations -> Choose your app -> Application ID) - - **Client Secret** ( Azure Active Directory -> App Registrations -> Choose your app -> Keys) +3. If you are using Azure Monitor, you need 4 pieces of information from the Azure portal (see link above for detailed instructions): -5. Paste these four items into the fields in the Azure Monitor API Details section:
-![Azure Monitor API Details](https://raw.githubusercontent.com/grafana/azure-monitor-datasource/master/src/img/config_2_azure_monitor_api_details.png) + - **Tenant Id** (Azure Active Directory -> Properties -> Directory ID) + - **Client Id** (Azure Active Directory -> App Registrations -> Choose your app -> Application ID) + - **Client Secret** ( Azure Active Directory -> App Registrations -> Choose your app -> Keys) + - **Default Subscription Id** (Subscriptions -> Choose subscription -> Overview -> Subscription ID) -6. If you are also using the Azure Log Analytics service, then you need to specify these two config values (or you can reuse the Client Id and Secret from the previous step). - - Client Id (Azure Active Directory -> App Registrations -> Choose your app -> Application ID) - - Client Secret ( Azure Active Directory -> App Registrations -> Choose your app -> Keys -> Create a key -> Use client secret) +4. Paste these four items into the fields in the Azure Monitor API Details section: + {{< docs-imagebox img="/img/docs/v62/config_1_azure_monitor_details.png" class="docs-image--no-shadow" caption="Azure Monitor Configuration Details" >}} -7. If you are are using Application Insights, then you need two pieces of information from the Azure Portal (see link above for detailed instructions): - - Application ID - - API Key + - The Subscription Id can be changed per query. Save the datasource and refresh the page to see the list of subscriptions available for the specified Client Id. -8. Paste these two items into the appropriate fields in the Application Insights API Details section:
-![Application Insights API Details](https://raw.githubusercontent.com/grafana/azure-monitor-datasource/master/src/img/config_3_app_insights_api_details.png) +5. If you are also using the Azure Log Analytics service, then you need to specify these two config values (or you can reuse the Client Id and Secret from the previous step). -9. Test that the configuration details are correct by clicking on the "Save & Test" button:
-![Azure Monitor API Details](https://raw.githubusercontent.com/grafana/azure-monitor-datasource/master/src/img/config_4_save_and_test.png) + - Client Id (Azure Active Directory -> App Registrations -> Choose your app -> Application ID) + - Client Secret (Azure Active Directory -> App Registrations -> Choose your app -> Keys -> Create a key -> Use client secret) + +6. If you are using Application Insights, then you need two pieces of information from the Azure Portal (see link above for detailed instructions): + + - Application ID + - API Key + +7. Paste these two items into the appropriate fields in the Application Insights API Details section: + {{< docs-imagebox img="/img/docs/v62/config_2_app_insights_api_details.png" class="docs-image--no-shadow" caption="Application Insights Configuration Details" >}} + +8. Test that the configuration details are correct by clicking on the "Save & Test" button: + {{< docs-imagebox img="/img/docs/v62/config_3_save_and_test.png" class="docs-image--no-shadow" caption="Save and Test" >}} Alternatively on step 4 if creating a new Azure Active Directory App, use the [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/?view=azure-cli-latest): @@ -68,17 +71,25 @@ az ad sp create-for-rbac -n "http://localhost:3000" ## Choose a Service -In the query editor for a panel, after choosing your Azure Monitor datasource, the first option is to choose a service. There are three options here: Azure Monitor, Application Insights and Azure Log Analytics. The query editor will change depending on which one you pick. Azure Monitor is the default. +In the query editor for a panel, after choosing your Azure Monitor datasource, the first option is to choose a service. There are three options here: + +- `Azure Monitor` +- `Application Insights` +- `Azure Log Analytics` + +The query editor will change depending on which one you pick. Azure Monitor is the default. ## Querying the Azure Monitor Service The Azure Monitor service provides metrics for all the Azure services that you have running. It helps you understand how your applications on Azure are performing and to proactively find issues affecting your applications. +If your Azure Monitor credentials give you access to multiple subscriptions then choose the appropriate subscription first. + Examples of metrics that you can get from the service are: -- Microsoft.Compute/virtualMachines - Percentage CPU -- Microsoft.Network/networkInterfaces - Bytes sent -- Microsoft.Storage/storageAccounts - Used Capacity +- `Microsoft.Compute/virtualMachines - Percentage CPU` +- `Microsoft.Network/networkInterfaces - Bytes sent` +- `Microsoft.Storage/storageAccounts - Used Capacity` {{< docs-imagebox img="/img/docs/v60/azuremonitor-service-query-editor.png" class="docs-image--no-shadow" caption="Azure Monitor Query Editor" >}} @@ -112,12 +123,17 @@ Note that the Azure Monitor service does not support multiple values yet. If you The Azure Monitor Datasource Plugin provides the following queries you can specify in the `Query` field in the Variable edit view. They allow you to fill a variable's options list. -| Name | Description | -| -------------------------------------------------------- | -------------------------------------------------------------- | -| *ResourceGroups()* | Returns a list of resource groups. | -| *Namespaces(aResourceGroup)* | Returns a list of namespaces for the specified resource group. | -| *ResourceNames(aResourceGroup, aNamespace)* | Returns a list of resource names. | -| *MetricNames(aResourceGroup, aNamespace, aResourceName)* | Returns a list of metric names. | +| Name | Description | +| -------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | +| _Subscriptions()_ | Returns a list of subscriptions. | +| _ResourceGroups()_ | Returns a list of resource groups. | +| _ResourceGroups(12345678-aaaa-bbbb-cccc-123456789aaa)_ | Returns a list of resource groups for a specified subscription. | +| _Namespaces(aResourceGroup)_ | Returns a list of namespaces for the specified resource group. | +| _Namespaces(12345678-aaaa-bbbb-cccc-123456789aaa, aResourceGroup)_ | Returns a list of namespaces for the specified resource group and subscription. | +| _ResourceNames(aResourceGroup, aNamespace)_ | Returns a list of resource names. | +| _ResourceNames(12345678-aaaa-bbbb-cccc-123456789aaaaResourceGroup, aNamespace)_ | Returns a list of resource names for a specified subscription. | +| _MetricNames(aResourceGroup, aNamespace, aResourceName)_ | Returns a list of metric names. | +| _MetricNames(12345678-aaaa-bbbb-cccc-123456789aaaaResourceGroup, aNamespace, aResourceName)_ | Returns a list of metric names for a specified subscription. | Examples: @@ -185,8 +201,8 @@ types of template variables. | Name | Description | | ---------------------------------- | ---------------------------------------------------------- | -| *AppInsightsMetricNames()* | Returns a list of metric names. | -| *AppInsightsGroupBys(aMetricName)* | Returns a list of group bys for the specified metric name. | +| _AppInsightsMetricNames()_ | Returns a list of metric names. | +| _AppInsightsGroupBys(aMetricName)_ | Returns a list of group bys for the specified metric name. | Examples: @@ -222,6 +238,8 @@ AzureActivity | order by TimeGenerated desc ``` +If your credentials give you access to multiple subscriptions then choose the appropriate subscription first. + {{< docs-imagebox img="/img/docs/v60/azureloganalytics-service-query-editor.png" class="docs-image--no-shadow" caption="Azure Log Analytics Query Editor" >}} ### Azure Log Analytics Macros @@ -229,25 +247,27 @@ AzureActivity To make writing queries easier there are several Grafana macros that can be used in the where clause of a query: - `$__timeFilter()` - Expands to - `TimeGenerated ≥ datetime(2018-06-05T18:09:58.907Z) and` - `TimeGenerated ≤ datetime(2018-06-05T20:09:58.907Z)` where the from and to datetimes are from the Grafana time picker. + `TimeGenerated ≥ datetime(2018-06-05T18:09:58.907Z) and` + `TimeGenerated ≤ datetime(2018-06-05T20:09:58.907Z)` where the from and to datetimes are from the Grafana time picker. - `$__timeFilter(datetimeColumn)` - Expands to - `datetimeColumn ≥ datetime(2018-06-05T18:09:58.907Z) and` - `datetimeColumn ≤ datetime(2018-06-05T20:09:58.907Z)` where the from and to datetimes are from the Grafana time picker. + `datetimeColumn ≥ datetime(2018-06-05T18:09:58.907Z) and` + `datetimeColumn ≤ datetime(2018-06-05T20:09:58.907Z)` where the from and to datetimes are from the Grafana time picker. + +- `$__timeFrom()` - Returns the From datetime from the Grafana picker. Example: `datetime(2018-06-05T18:09:58.907Z)`. + +- `$__timeTo()` - Returns the From datetime from the Grafana picker. Example: `datetime(2018-06-05T20:09:58.907Z)`. -- `$__escapeMulti($myVar)` - is to be used with multi-value template variables that contains illegal characters. If $myVar has the value `'\\grafana-vm\Network(eth0)\Total','\\hello!'`, it expands to: `@'\\grafana-vm\Network(eth0)\Total', @'\\hello!'`. If using single value variables there no need for this macro, simply escape the variable inline instead - `@'\$myVar'` +- `$__escapeMulti($myVar)` - is to be used with multi-value template variables that contain illegal characters. If `$myVar` has the following two values as a string `'\\grafana-vm\Network(eth0)\Total','\\hello!'`, then it expands to: `@'\\grafana-vm\Network(eth0)\Total', @'\\hello!'`. If using single value variables there is no need for this macro, simply escape the variable inline instead - `@'\$myVar'`. -- `$__contains(colName, $myVar)` - is to be used with multi-value template variables. If $myVar has the value `'value1','value2'`, it expands to: `colName in ('value1','value2')`. +- `$__contains(colName, $myVar)` - is to be used with multi-value template variables. If `$myVar` has the value `'value1','value2'`, it expands to: `colName in ('value1','value2')`. - If using the `All` option, then check the `Include All Option` checkbox and in the `Custom all value` field type in the following value: `all`. If $myVar has value `all` then the macro will instead expand to `1 == 1`. For template variables with a lot of options, this will increase the query performance by not building a large where..in clause. + If using the `All` option, then check the `Include All Option` checkbox and in the `Custom all value` field type in the following value: `all`. If `$myVar` has value `all` then the macro will instead expand to `1 == 1`. For template variables with a lot of options, this will increase the query performance by not building a large where..in clause. ### Azure Log Analytics Builtin Variables There are also some Grafana variables that can be used in Azure Log Analytics queries: -- `$__from` - Returns the From datetime from the Grafana picker. Example: `datetime(2018-06-05T18:09:58.907Z)`. -- `$__to` - Returns the From datetime from the Grafana picker. Example: `datetime(2018-06-05T20:09:58.907Z)`. - `$__interval` - Grafana calculates the minimum time grain that can be used to group by time in queries. More details on how it works [here]({{< relref "reference/templating.md#interval-variables" >}}). It returns a time grain like `5m` or `1h` that can be used in the bin function. E.g. `summarize count() by bin(TimeGenerated, $__interval)` ### Azure Log Analytics Alerting diff --git a/docs/sources/guides/basic_concepts.md b/docs/sources/guides/basic_concepts.md index d3f8dd0ba633..3c610e21ce23 100644 --- a/docs/sources/guides/basic_concepts.md +++ b/docs/sources/guides/basic_concepts.md @@ -66,7 +66,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/), [Table](/reference/table_panel/),and [Text](/reference/text/). +There are currently five 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. diff --git a/docs/sources/guides/whats-new-in-v6-2.md b/docs/sources/guides/whats-new-in-v6-2.md index 00337c8ef2a2..8ee2e7a66c70 100644 --- a/docs/sources/guides/whats-new-in-v6-2.md +++ b/docs/sources/guides/whats-new-in-v6-2.md @@ -12,19 +12,21 @@ weight = -13 # What's New in Grafana v6.2 -> More content will be added to this guide before the stable release. - -Grafana v6.2 Beta is now [available for download](https://grafana.com/grafana/download/beta). - For all details please read the full [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) If you use a password for your datasources please read the [upgrade notes](/installation/upgrading/#upgrading-to-v6-2). +Checkout the [demo dashboard](https://play.grafana.org/d/ZvPm55mWk/new-features-in-v6-2?orgId=1) of some the new features in v6.2. + ## Improved security -- Ensure encryption of datasource secrets -- Embedding Grafana not allowed per default -- Disable browser caching for full page requests +Datasources now store passwords and basic auth passwords in `secureJsonData` encrypted by default. Existing datasource with unencrypted passwords will keep working. +Read the [upgrade notes](/installation/upgrading/#upgrading-to-v6-2) on how to migrate existing datasources to use encrypted storage. + +To mitigate the risk of [Clickjacking](https://www.owasp.org/index.php/Clickjacking), embedding Grafana is no longer allowed per default. +Read the [upgrade notes](/installation/upgrading/#upgrading-to-v6-2) for further details of how this may affect you. + +To mitigate the risk of sensitive information being cached in browser after a user has logged out, browser caching is now disabled for full page requests. ## Provisioning @@ -79,10 +81,11 @@ This release contains a lot of small features and fixes: - Explore - Adds user time zone support, reconnect for failing datasources and a fix that prevents killing Prometheus instances when Histogram metrics are loaded. - Alerting - Adds support for configuring timeout durations and retries, see [configuration](/installation/configuration/#evaluation-timeout-seconds) for more information. +- Azure Monitor - Adds support for multiple subscriptions per datasource. - Elasticsearch - A small bug fix to properly display percentiles metrics in table panel. - InfluxDB - Support for POST HTTP verb. - CloudWatch - Important fix for default alias disappearing in v6.1. -- Search - Works in a scope of dashboard's folder by default when viewing dashboard +- Search - Works in a scope of dashboard's folder by default when viewing dashboard. Checkout the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) file for a complete list of new features, changes, and bug fixes. diff --git a/docs/sources/http_api/alerting_notification_channels.md b/docs/sources/http_api/alerting_notification_channels.md index b8db1595aaa1..aa6e7297ac2d 100644 --- a/docs/sources/http_api/alerting_notification_channels.md +++ b/docs/sources/http_api/alerting_notification_channels.md @@ -54,7 +54,7 @@ Content-Type: application/json "sendReminder": false, "disableResolveMessage": false, "settings": { - "addresses": "carl@grafana.com;dev@grafana.com" + "addresses": "dev@grafana.com" }, "created": "2018-04-23T14:44:09+02:00", "updated": "2018-08-20T15:47:49+02:00" @@ -93,7 +93,7 @@ Content-Type: application/json "sendReminder": false, "disableResolveMessage": false, "settings": { - "addresses": "carl@grafana.com;dev@grafana.com" + "addresses": "dev@grafana.com" }, "created": "2018-04-23T14:44:09+02:00", "updated": "2018-08-20T15:47:49+02:00" @@ -130,7 +130,7 @@ Content-Type: application/json "sendReminder": false, "disableResolveMessage": false, "settings": { - "addresses": "carl@grafana.com;dev@grafana.com" + "addresses": "dev@grafana.com" }, "created": "2018-04-23T14:44:09+02:00", "updated": "2018-08-20T15:47:49+02:00" @@ -158,7 +158,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk "isDefault": false, "sendReminder": false, "settings": { - "addresses": "carl@grafana.com;dev@grafana.com" + "addresses": "dev@grafana.com" } } ``` @@ -177,7 +177,7 @@ Content-Type: application/json "isDefault": false, "sendReminder": false, "settings": { - "addresses": "carl@grafana.com;dev@grafana.com" + "addresses": "dev@grafana.com" }, "created": "2018-04-23T14:44:09+02:00", "updated": "2018-08-20T15:47:49+02:00" @@ -206,7 +206,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk "sendReminder": true, "frequency": "15m", "settings": { - "addresses": "carl@grafana.com;dev@grafana.com" + "addresses": "dev@grafana.com" } } ``` @@ -226,7 +226,7 @@ Content-Type: application/json "sendReminder": true, "frequency": "15m", "settings": { - "addresses": "carl@grafana.com;dev@grafana.com" + "addresses": "dev@grafana.com" }, "created": "2017-01-01 12:34", "updated": "2017-01-01 12:34" @@ -256,7 +256,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk "sendReminder": true, "frequency": "15m", "settings": { - "addresses": "carl@grafana.com;dev@grafana.com" + "addresses": "dev@grafana.com" } } ``` @@ -276,7 +276,7 @@ Content-Type: application/json "sendReminder": true, "frequency": "15m", "settings": { - "addresses": "carl@grafana.com;dev@grafana.com" + "addresses": "dev@grafana.com" }, "created": "2017-01-01 12:34", "updated": "2017-01-01 12:34" @@ -353,7 +353,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk { "type": "email", "settings": { - "addresses": "carl@grafana.com;dev@grafana.com" + "addresses": "dev@grafana.com" } } ``` diff --git a/docs/sources/http_api/data_source.md b/docs/sources/http_api/data_source.md index 364b55b0cfcb..4ddeb5a520ed 100644 --- a/docs/sources/http_api/data_source.md +++ b/docs/sources/http_api/data_source.md @@ -51,7 +51,7 @@ Content-Type: application/json ] ``` -## Get a single data sources by Id +## Get a single data source by Id `GET /api/datasources/:datasourceId` @@ -149,7 +149,7 @@ Content-Type: application/json } ``` -## Create data source +## Create a data source `POST /api/datasources` diff --git a/docs/sources/installation/configuration.md b/docs/sources/installation/configuration.md index 6e249a7130e0..af0261032d4b 100644 --- a/docs/sources/installation/configuration.md +++ b/docs/sources/installation/configuration.md @@ -154,6 +154,15 @@ callback URL to be correct). > in front of Grafana that exposes it through a subpath. In that > case add the subpath to the end of this URL setting. +### serve_from_sub_path + +Serve Grafana from subpath specified in `root_url` setting. By +default it is set to `false` for compatibility reasons. + +By enabling this setting and using a subpath in `root_url` above, e.g. +`root_url = http://localhost:3000/grafana`, Grafana will be accessible on +`http://localhost:3000/grafana`. + ### static_root_path The path to the directory where the front end files (HTML, JS, and CSS @@ -579,7 +588,7 @@ Service Account keys can be created and downloaded from https://console.develope Service Account should have "Storage Object Writer" role. The access control model of the bucket needs to be "Set object-level and bucket-level permissions". Grafana itself will make the images public readable. -### bucket name +### bucket Bucket Name on Google Cloud Storage. ### path diff --git a/docs/sources/installation/upgrading.md b/docs/sources/installation/upgrading.md index bd2a5434b25f..22195cb9df50 100644 --- a/docs/sources/installation/upgrading.md +++ b/docs/sources/installation/upgrading.md @@ -169,3 +169,9 @@ configuration. If you're embedding Grafana in a ``, `