Compare commits
102 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3039f9c3bd | ||
|
|
ba5886d42c | ||
|
|
9c7776cd58 | ||
|
|
5b7d1c7fe1 | ||
|
|
e44acff11c | ||
|
|
758c47e13f | ||
|
|
100819fe09 | ||
|
|
cada7a4eb8 | ||
|
|
2d2963561a | ||
|
|
754597e116 | ||
|
|
58a23cd27d | ||
|
|
7031793d06 | ||
|
|
7c0c77cc1c | ||
|
|
3199365ead | ||
|
|
3570bd0cca | ||
|
|
e353e42e96 | ||
|
|
65c46c08d4 | ||
|
|
534feb1e5e | ||
|
|
8101355285 | ||
|
|
226cba97e1 | ||
|
|
7d7f2d9262 | ||
|
|
7ac9057f71 | ||
|
|
8673bd4974 | ||
|
|
f870bea288 | ||
|
|
1ab8109892 | ||
|
|
3655752bae | ||
|
|
d44da8786f | ||
|
|
2df8fe30da | ||
|
|
562e811179 | ||
|
|
2747607805 | ||
|
|
10a9031b1b | ||
|
|
a74d03b807 | ||
|
|
e621f54fe3 | ||
|
|
05a0019fcb | ||
|
|
dfb2119afa | ||
|
|
e931df8ab9 | ||
|
|
1e35109d3e | ||
|
|
ee35db1b8b | ||
|
|
236ac5c394 | ||
|
|
81014a717d | ||
|
|
fab8bea6f7 | ||
|
|
ea469bf48f | ||
|
|
85ca9c933b | ||
|
|
051c7a7c8e | ||
|
|
28978db293 | ||
|
|
56a0b90559 | ||
|
|
461fc94103 | ||
|
|
ee21c1be81 | ||
|
|
a3a9ce7f24 | ||
|
|
1e3265d047 | ||
|
|
88270a2bf8 | ||
|
|
f8bdda7adf | ||
|
|
7618fd36ac | ||
|
|
bca82d8814 | ||
|
|
783e5d12c7 | ||
|
|
e39fef1649 | ||
|
|
2145633e9b | ||
|
|
6503962013 | ||
|
|
40a33c56c2 | ||
|
|
42069bb254 | ||
|
|
4684c7971c | ||
|
|
903eccad20 | ||
|
|
2bc9374a9e | ||
|
|
47e162d6b2 | ||
|
|
b8c5174461 | ||
|
|
eedf6e53de | ||
|
|
5f539230da | ||
|
|
c14ac88b8d | ||
|
|
9417a0c277 | ||
|
|
4c27708b7b | ||
|
|
763d28ad96 | ||
|
|
949988219f | ||
|
|
4aa1d28683 | ||
|
|
a4846ee4fd | ||
|
|
c2403767a0 | ||
|
|
fce35e7aa9 | ||
|
|
0d47601175 | ||
|
|
28e50ae4fd | ||
|
|
fc96444b23 | ||
|
|
9eb16756b1 | ||
|
|
cde6a2de68 | ||
|
|
111c238df2 | ||
|
|
1630f21aee | ||
|
|
c2125493a7 | ||
|
|
33eec937dd | ||
|
|
073f46e289 | ||
|
|
7c1c0bc8c1 | ||
|
|
a9fc5ff45d | ||
|
|
7d1f0d619d | ||
|
|
aa1cdf0a20 | ||
|
|
0b109a1637 | ||
|
|
6a1f05d7ec | ||
|
|
1576b16219 | ||
|
|
44ba5482f1 | ||
|
|
972e07bd2e | ||
|
|
22211e5bdd | ||
|
|
d95c494d9d | ||
|
|
6e3a9d7927 | ||
|
|
4a68ba7b23 | ||
|
|
74ca7121eb | ||
|
|
4d1ea72426 | ||
|
|
11385c6cfe |
@@ -2,12 +2,29 @@ version: 2.1
|
||||
|
||||
aliases:
|
||||
# Workflow filters
|
||||
# filter-all triggers for all branches and version tags
|
||||
- &filter-all
|
||||
tags:
|
||||
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
|
||||
- &filter-only-release
|
||||
branches:
|
||||
only: chore/test-release-pipeline
|
||||
tags:
|
||||
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
|
||||
- &filter-not-release-or-master
|
||||
tags:
|
||||
ignore: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
|
||||
branches:
|
||||
ignore:
|
||||
- master
|
||||
- chore/test-release-pipeline
|
||||
- &filter-only-master
|
||||
branches:
|
||||
only: master
|
||||
- &filter-release
|
||||
- &filter-master-or-release
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- chore/test-release-pipeline
|
||||
tags:
|
||||
only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/
|
||||
@@ -22,12 +39,9 @@ executors:
|
||||
go:
|
||||
docker:
|
||||
- image: cimg/go:1.14
|
||||
e2e:
|
||||
docker:
|
||||
- image: srclosson/grafana-plugin-ci-e2e:latest
|
||||
grafana-build:
|
||||
docker:
|
||||
- image: grafana/build-container:1.2.27
|
||||
- image: grafana/build-container:1.2.20
|
||||
grafana-publish:
|
||||
docker:
|
||||
- image: grafana/grafana-ci-deploy:1.2.5
|
||||
@@ -42,7 +56,7 @@ commands:
|
||||
- run:
|
||||
name: "Install Grafana build pipeline tool"
|
||||
command: |
|
||||
VERSION=0.5.16
|
||||
VERSION=0.4.19
|
||||
curl -fLO https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v${VERSION}/grabpl
|
||||
chmod +x grabpl
|
||||
mv grabpl /tmp
|
||||
@@ -80,6 +94,10 @@ jobs:
|
||||
# We're testing the release pipeline
|
||||
/tmp/grabpl build-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
|
||||
--variants << parameters.variant >> v7.0.0-test
|
||||
else
|
||||
# A master or PR build
|
||||
/tmp/grabpl build-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
|
||||
--variants << parameters.variant >> --build-id $CIRCLE_WORKFLOW_ID
|
||||
fi
|
||||
- run:
|
||||
name: Move artifacts
|
||||
@@ -105,6 +123,13 @@ jobs:
|
||||
resource_class: large
|
||||
executor: grafana-build
|
||||
steps:
|
||||
- run:
|
||||
name: Exit if enterprise and forked PR
|
||||
command: |
|
||||
if [[ "<< parameters.edition >>" == "enterprise" && -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
echo "Nothing to do for forked PRs, so marking this step successful"
|
||||
circleci step halt
|
||||
fi
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
@@ -137,6 +162,9 @@ jobs:
|
||||
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
/tmp/grabpl build-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> 7.0.0-test
|
||||
else
|
||||
# A master or PR build
|
||||
/tmp/grabpl build-frontend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> --build-id $CIRCLE_WORKFLOW_ID
|
||||
fi
|
||||
- run:
|
||||
name: Move artifacts
|
||||
@@ -176,8 +204,13 @@ jobs:
|
||||
- run:
|
||||
name: Build internal Grafana plug-ins
|
||||
command: |
|
||||
export GRAFANA_API_KEY=$GRAFANA_COM_API_KEY
|
||||
/tmp/grabpl build-plugins --jobs 2 --edition << parameters.edition >> --sign --signing-admin
|
||||
if [[ -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
# This is a forked PR, so don't sign as it requires an API secret
|
||||
/tmp/grabpl build-plugins --jobs 2 --edition << parameters.edition >>
|
||||
else
|
||||
export GRAFANA_API_KEY=$GRAFANA_COM_API_KEY
|
||||
/tmp/grabpl build-plugins --jobs 2 --edition << parameters.edition >> --sign --signing-admin
|
||||
fi
|
||||
- run:
|
||||
name: Move artifacts
|
||||
command: |
|
||||
@@ -324,6 +357,38 @@ jobs:
|
||||
command: "./scripts/ci-job-succeeded.sh"
|
||||
when: on_success
|
||||
|
||||
release-next-packages:
|
||||
executor: grafana-build
|
||||
steps:
|
||||
- run:
|
||||
name: Exit if forked PR
|
||||
command: |
|
||||
if [[ -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
echo "Nothing to do for forked PRs, so marking this step successful"
|
||||
circleci step halt
|
||||
fi
|
||||
- checkout
|
||||
- run:
|
||||
name: CI job started
|
||||
command: ./scripts/ci-job-started.sh
|
||||
- run:
|
||||
name: Bootstrap lerna
|
||||
command: npx lerna bootstrap
|
||||
- run:
|
||||
name: npm - Prepare auth token
|
||||
command: "echo //registry.npmjs.org/:_authToken=$NPM_TOKEN >> ~/.npmrc"
|
||||
- run:
|
||||
name: Release next packages
|
||||
command: ./scripts/circle-release-next-packages.sh
|
||||
- run:
|
||||
name: CI job failed
|
||||
command: ./scripts/ci-job-failed.sh
|
||||
when: on_fail
|
||||
- run:
|
||||
name: CI job succeeded
|
||||
command: ./scripts/ci-job-succeeded.sh
|
||||
when: on_success
|
||||
|
||||
package-oss:
|
||||
executor: grafana-build
|
||||
steps:
|
||||
@@ -340,6 +405,11 @@ jobs:
|
||||
- run:
|
||||
name: Package Grafana
|
||||
command: |
|
||||
if [[ -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
echo Using test GPG key pair since building a forked PR
|
||||
source scripts/build/gpg-test-vars.sh
|
||||
fi
|
||||
|
||||
# Necessary for signing bundled plugins
|
||||
export GRAFANA_API_KEY=$GRAFANA_COM_API_KEY
|
||||
if [[ -n $CIRCLE_TAG ]]; then
|
||||
@@ -348,6 +418,17 @@ jobs:
|
||||
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign v7.0.0-test
|
||||
elif [[ $CIRCLE_BRANCH == "master" ]]; then
|
||||
# A master build
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID
|
||||
elif [[ -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
# A forked PR build, don't sign as it requires an API secret
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
linux-x64,linux-x64-musl,osx64,win64
|
||||
else
|
||||
# A non-forked PR build
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition oss --sign --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
linux-x64,linux-x64-musl,osx64,win64
|
||||
fi
|
||||
- run:
|
||||
name: Move artifacts
|
||||
@@ -399,6 +480,17 @@ jobs:
|
||||
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign v7.0.0-test
|
||||
elif [[ $CIRCLE_BRANCH == "master" ]]; then
|
||||
# A master build
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID
|
||||
elif [[ -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
# A forked PR build, don't sign as it requires an API secret
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
linux-x64,linux-x64-musl,osx64,win64
|
||||
else
|
||||
# A PR build
|
||||
/tmp/grabpl package --github-token "${GITHUB_GRAFANABOT_TOKEN}" --jobs 2 --edition enterprise --sign --build-id $CIRCLE_WORKFLOW_ID --variants \
|
||||
linux-x64,linux-x64-musl,osx64,win64
|
||||
fi
|
||||
- run:
|
||||
name: Move artifacts
|
||||
@@ -474,9 +566,18 @@ jobs:
|
||||
yarn install --frozen-lockfile --no-progress
|
||||
yarn storybook:build
|
||||
|
||||
if [[ -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
echo "Nothing to do for forked PRs, so marking this step successful"
|
||||
circleci step halt
|
||||
fi
|
||||
|
||||
if [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
echo Testing release
|
||||
elif [[ $CIRCLE_BRANCH == "master" ]]; then
|
||||
echo $GCP_GRAFANA_UPLOAD_KEY > /tmp/gcpkey.json
|
||||
gcloud auth activate-service-account --key-file=/tmp/gcpkey.json
|
||||
gsutil -m rsync -d -r ./packages/grafana-ui/dist/storybook gs://grafana-storybook/canary
|
||||
elif [[ -n $CIRCLE_TAG ]]; then
|
||||
echo $GCP_GRAFANA_UPLOAD_KEY > /tmp/gcpkey.json
|
||||
gcloud auth activate-service-account --key-file=/tmp/gcpkey.json
|
||||
@@ -540,7 +641,7 @@ jobs:
|
||||
name: Build Docker images
|
||||
command: |
|
||||
source google-cloud-sdk/path.bash.inc
|
||||
if [[ -n $CIRCLE_TAG || $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
if [[ -n $CIRCLE_TAG || $CIRCLE_BRANCH == "chore/test-release-pipeline" || $CIRCLE_BRANCH == "master" ]]; then
|
||||
# It's a full build
|
||||
/tmp/grabpl build-docker --jobs 4 --edition << parameters.edition >> \
|
||||
--ubuntu=<< parameters.ubuntu >>
|
||||
@@ -552,7 +653,7 @@ jobs:
|
||||
- run:
|
||||
name: Exit if PR
|
||||
command: |
|
||||
if [[ -z $CIRCLE_TAG && $CIRCLE_BRANCH != "chore/test-release-pipeline" ]]; then
|
||||
if [[ -z $CIRCLE_TAG && $CIRCLE_BRANCH != "chore/test-release-pipeline" && $CIRCLE_BRANCH != "master" ]]; then
|
||||
echo "Nothing to do for PRs, so marking this step successful"
|
||||
circleci step halt
|
||||
fi
|
||||
@@ -566,7 +667,8 @@ jobs:
|
||||
# This is a release
|
||||
/tmp/grabpl publish-docker --jobs 4 --edition << parameters.edition >> --ubuntu=<< parameters.ubuntu >>
|
||||
else
|
||||
/tmp/grabpl publish-docker --jobs 4 --edition << parameters.edition >> --ubuntu=<< parameters.ubuntu >>
|
||||
# TODO: Don't ignore errors, temporary workaround until we fix #22955
|
||||
/tmp/grabpl publish-docker --jobs 4 --edition << parameters.edition >> --ubuntu=<< parameters.ubuntu >> || echo Publishing failed!
|
||||
fi
|
||||
- run:
|
||||
name: CI job failed
|
||||
@@ -578,7 +680,8 @@ jobs:
|
||||
when: on_success
|
||||
|
||||
end-to-end-tests:
|
||||
executor: e2e
|
||||
docker:
|
||||
- image: circleci/node:12-browsers
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: /tmp/workspace
|
||||
@@ -710,9 +813,9 @@ jobs:
|
||||
name: Install Go linters
|
||||
command: |
|
||||
pushd /tmp
|
||||
VERSION=1.28.0
|
||||
VERSION=1.27.0
|
||||
curl -fLO https://github.com/golangci/golangci-lint/releases/download/v${VERSION}/golangci-lint-${VERSION}-linux-amd64.tar.gz
|
||||
echo 179d34edf4baf6454a7081fbaaf74dc99397a3be8e1a535dee04d835a977bf76 \
|
||||
echo 8d345e4e88520e21c113d81978e89ad77fc5b13bfdf20e5bca86b83fc4261272 \
|
||||
golangci-lint-${VERSION}-linux-amd64.tar.gz | sha256sum --check --strict --status
|
||||
tar -xf golangci-lint-${VERSION}-linux-amd64.tar.gz
|
||||
sudo mv golangci-lint-${VERSION}-linux-amd64/golangci-lint /usr/local/bin/
|
||||
@@ -723,9 +826,8 @@ jobs:
|
||||
command: |
|
||||
# To save memory, run in two batches
|
||||
golangci-lint run -v -j 4 --config scripts/go/configs/ci/.golangci.toml -E deadcode -E depguard -E dogsled \
|
||||
-E errcheck -E goconst -E golint -E gosec -E gosimple -E govet -E exportloopref -E whitespace \
|
||||
-E goprintffuncname ./pkg/...
|
||||
golangci-lint run -v -j 4 --config scripts/go/configs/ci/.golangci.toml -E ineffassign -E gocritic -E nakedret \
|
||||
-E errcheck -E goconst -E golint -E gosec -E gosimple -E govet -E scopelint ./pkg/...
|
||||
golangci-lint run -v -j 4 --config scripts/go/configs/ci/.golangci.toml -E ineffassign \
|
||||
-E rowserrcheck -E staticcheck -E structcheck -E typecheck -E unconvert -E unused -E varcheck ./pkg/...
|
||||
./scripts/go/bin/revive -formatter stylish -config ./scripts/go/configs/revive.toml ./pkg/...
|
||||
./scripts/go/bin/revive -formatter stylish -config ./scripts/go/configs/revive-strict.toml \
|
||||
@@ -736,12 +838,8 @@ jobs:
|
||||
./pkg/services/provisioning/notifiers/... \
|
||||
./pkg/services/provisioning/values/... \
|
||||
./pkg/plugins/backendplugin/...
|
||||
./scripts/tidy-check.sh
|
||||
|
||||
test-frontend:
|
||||
parameters:
|
||||
edition:
|
||||
type: string
|
||||
executor: node
|
||||
steps:
|
||||
- checkout
|
||||
@@ -761,17 +859,9 @@ jobs:
|
||||
key: v2-yarn-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- node_modules
|
||||
- install-grabpl
|
||||
- run:
|
||||
name: frontend tests
|
||||
command: |
|
||||
if [[ -n $CIRCLE_TAG ]]; then
|
||||
# A release build
|
||||
./scripts/circle-test-frontend.sh --edition << parameters.edition >> $CIRCLE_TAG
|
||||
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
./scripts/circle-test-frontend.sh --edition << parameters.edition >> v7.0.0-test
|
||||
fi
|
||||
command: "./scripts/circle-test-frontend.sh"
|
||||
- store_test_results:
|
||||
path: reports/junit
|
||||
- run:
|
||||
@@ -785,27 +875,14 @@ jobs:
|
||||
|
||||
test-backend:
|
||||
executor: go
|
||||
parameters:
|
||||
edition:
|
||||
type: string
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
name: CI job started
|
||||
command: "./scripts/ci-job-started.sh"
|
||||
- install-grabpl
|
||||
- run:
|
||||
name: back-end tests
|
||||
command: |
|
||||
if [[ -n $CIRCLE_TAG ]]; then
|
||||
# A release build
|
||||
/tmp/grabpl test-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
|
||||
$CIRCLE_TAG
|
||||
elif [[ $CIRCLE_BRANCH == "chore/test-release-pipeline" ]]; then
|
||||
# We're testing the release pipeline
|
||||
/tmp/grabpl test-backend --github-token "${GITHUB_GRAFANABOT_TOKEN}" --edition << parameters.edition >> \
|
||||
v7.0.0-test
|
||||
fi
|
||||
name: build backend and run go tests
|
||||
command: "./scripts/circle-test-backend.sh"
|
||||
- run:
|
||||
name: CI job failed
|
||||
command: "./scripts/ci-job-failed.sh"
|
||||
@@ -815,9 +892,55 @@ jobs:
|
||||
command: "./scripts/ci-job-succeeded.sh"
|
||||
when: on_success
|
||||
|
||||
build-docs-website:
|
||||
executor: base
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: CI job started
|
||||
command: "./scripts/ci-job-started.sh"
|
||||
- run:
|
||||
name: Build Grafana docs website
|
||||
command: |
|
||||
# Use latest revision here, since we want to catch if it breaks
|
||||
IMAGE=grafana/docs-base:latest
|
||||
|
||||
# In order to copy sources into the remote container, we need to employ a trick of creating a container
|
||||
# with a volume, that we copy the sources into. Then, we launch the build container, with the volume
|
||||
# from the other container
|
||||
docker create -v /hugo/content/docs/grafana --name docs alpine:3.11 /bin/true
|
||||
docker cp ${PWD}/docs/sources docs:/hugo/content/docs/grafana/latest
|
||||
docker run --volumes-from docs $IMAGE /bin/bash -c 'make prod'
|
||||
- run:
|
||||
name: CI job failed
|
||||
command: "./scripts/ci-job-failed.sh"
|
||||
when: on_fail
|
||||
- run:
|
||||
name: CI job succeeded
|
||||
command: "./scripts/ci-job-succeeded.sh"
|
||||
when: on_success
|
||||
|
||||
deploy-to-kubernetes:
|
||||
description: "Deploy Grafana master Docker image to Kubernetes"
|
||||
executor: base
|
||||
steps:
|
||||
- install-grabpl
|
||||
- run:
|
||||
name: Deploy to Kubernetes
|
||||
command: |
|
||||
/tmp/grabpl deploy-to-k8s $CIRCLE_WORKFLOW_ID
|
||||
|
||||
release-packages:
|
||||
executor: node
|
||||
steps:
|
||||
- run:
|
||||
name: Exit if forked PR
|
||||
command: |
|
||||
if [[ -n "$CIRCLE_PR_NUMBER" ]]; then
|
||||
echo "Nothing to do for forked PRs, so marking this step successful"
|
||||
circleci step halt
|
||||
fi
|
||||
- checkout
|
||||
- run:
|
||||
name: CI job started
|
||||
@@ -891,193 +1014,179 @@ workflows:
|
||||
build-pipeline:
|
||||
jobs:
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
edition: oss
|
||||
variant: armv6
|
||||
name: build-oss-backend-armv6
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
edition: oss
|
||||
variant: armv7
|
||||
name: build-oss-backend-armv7
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
edition: oss
|
||||
variant: armv7-musl
|
||||
name: build-oss-backend-armv7-musl
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
edition: oss
|
||||
variant: arm64
|
||||
name: build-oss-backend-arm64
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
edition: oss
|
||||
variant: arm64-musl
|
||||
name: build-oss-backend-arm64-musl
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
edition: oss
|
||||
variant: osx64
|
||||
name: build-oss-backend-osx64
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
edition: oss
|
||||
variant: win64
|
||||
name: build-oss-backend-win64
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
edition: oss
|
||||
variant: linux-x64
|
||||
name: build-oss-backend-linux-x64
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
edition: oss
|
||||
variant: linux-x64-musl
|
||||
name: build-oss-backend-linux-x64-musl
|
||||
requires:
|
||||
- lint-go
|
||||
- build-frontend:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-oss-frontend
|
||||
edition: oss
|
||||
- build-plugins:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-oss-plugins
|
||||
edition: oss
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
name: build-enterprise-backend-armv6
|
||||
edition: enterprise
|
||||
variant: armv6
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
name: build-enterprise-backend-armv7
|
||||
edition: enterprise
|
||||
variant: armv7
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
name: build-enterprise-backend-armv7-musl
|
||||
edition: enterprise
|
||||
variant: armv7-musl
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
name: build-enterprise-backend-arm64
|
||||
edition: enterprise
|
||||
variant: arm64
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
name: build-enterprise-backend-arm64-musl
|
||||
edition: enterprise
|
||||
variant: arm64-musl
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-enterprise-backend-osx64
|
||||
edition: enterprise
|
||||
variant: osx64
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-enterprise-backend-win64
|
||||
edition: enterprise
|
||||
variant: win64
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-enterprise-backend-linux-x64
|
||||
edition: enterprise
|
||||
variant: linux-x64
|
||||
requires:
|
||||
- lint-go
|
||||
- build-backend:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-enterprise-backend-linux-x64-musl
|
||||
edition: enterprise
|
||||
variant: linux-x64-musl
|
||||
requires:
|
||||
- lint-go
|
||||
- build-frontend:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-enterprise-frontend
|
||||
edition: enterprise
|
||||
- build-plugins:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-enterprise-plugins
|
||||
edition: enterprise
|
||||
requires:
|
||||
- lint-go
|
||||
- build-release-publisher:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
- codespell:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
- lint-go:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
- shellcheck:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
- test-backend:
|
||||
filters: *filter-release
|
||||
name: test-oss-backend
|
||||
edition: oss
|
||||
requires:
|
||||
- lint-go
|
||||
- test-backend:
|
||||
filters: *filter-release
|
||||
name: test-enterprise-backend
|
||||
edition: enterprise
|
||||
filters: *filter-all
|
||||
requires:
|
||||
- lint-go
|
||||
- test-frontend:
|
||||
filters: *filter-release
|
||||
name: test-oss-frontend
|
||||
edition: oss
|
||||
- test-frontend:
|
||||
filters: *filter-release
|
||||
name: test-enterprise-frontend
|
||||
edition: enterprise
|
||||
filters: *filter-all
|
||||
- mysql-integration-test:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
requires:
|
||||
- lint-go
|
||||
- test-oss-backend
|
||||
- test-oss-frontend
|
||||
- test-backend
|
||||
- test-frontend
|
||||
- postgres-integration-test:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
requires:
|
||||
- lint-go
|
||||
- test-oss-backend
|
||||
- test-oss-frontend
|
||||
- test-backend
|
||||
- test-frontend
|
||||
- package-oss:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
requires:
|
||||
- build-oss-backend-armv6
|
||||
- build-oss-backend-armv7
|
||||
@@ -1089,13 +1198,13 @@ workflows:
|
||||
- build-oss-backend-linux-x64
|
||||
- build-oss-backend-linux-x64-musl
|
||||
- build-oss-frontend
|
||||
- test-oss-backend
|
||||
- test-oss-frontend
|
||||
- test-backend
|
||||
- test-frontend
|
||||
- codespell
|
||||
- shellcheck
|
||||
- build-oss-plugins
|
||||
- package-enterprise:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
requires:
|
||||
- build-enterprise-backend-armv6
|
||||
- build-enterprise-backend-armv7
|
||||
@@ -1107,27 +1216,31 @@ workflows:
|
||||
- build-enterprise-backend-linux-x64
|
||||
- build-enterprise-backend-linux-x64-musl
|
||||
- build-enterprise-frontend
|
||||
- test-enterprise-backend
|
||||
- test-enterprise-frontend
|
||||
- test-backend
|
||||
- test-frontend
|
||||
- codespell
|
||||
- shellcheck
|
||||
- build-enterprise-plugins
|
||||
- build-oss-windows-installer:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
requires:
|
||||
- package-oss
|
||||
- build-enterprise-windows-installer:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
requires:
|
||||
- package-enterprise
|
||||
- release-next-packages:
|
||||
filters: *filter-only-master
|
||||
requires:
|
||||
- end-to-end-tests
|
||||
- release-packages:
|
||||
filters: *filter-release
|
||||
filters: *filter-only-release
|
||||
requires:
|
||||
- end-to-end-tests
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- publish-packages:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
name: publish-oss-packages
|
||||
edition: oss
|
||||
requires:
|
||||
@@ -1138,7 +1251,7 @@ workflows:
|
||||
- postgres-integration-test
|
||||
- build-release-publisher
|
||||
- publish-packages:
|
||||
filters: *filter-release
|
||||
filters: *filter-master-or-release
|
||||
name: publish-enterprise-packages
|
||||
edition: enterprise
|
||||
requires:
|
||||
@@ -1149,12 +1262,12 @@ workflows:
|
||||
- postgres-integration-test
|
||||
- build-release-publisher
|
||||
- publish-storybook:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
requires:
|
||||
- test-oss-backend
|
||||
- test-oss-frontend
|
||||
- test-backend
|
||||
- test-frontend
|
||||
- build-docker-images:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-oss-docker-images
|
||||
edition: oss
|
||||
ubuntu: false
|
||||
@@ -1165,7 +1278,7 @@ workflows:
|
||||
- package-oss
|
||||
- build-oss-windows-installer
|
||||
- build-docker-images:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-oss-ubuntu-docker-images
|
||||
edition: oss
|
||||
ubuntu: true
|
||||
@@ -1176,7 +1289,7 @@ workflows:
|
||||
- package-oss
|
||||
- build-oss-windows-installer
|
||||
- build-docker-images:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-enterprise-docker-images
|
||||
edition: enterprise
|
||||
ubuntu: false
|
||||
@@ -1187,7 +1300,7 @@ workflows:
|
||||
- package-enterprise
|
||||
- build-enterprise-windows-installer
|
||||
- build-docker-images:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
name: build-enterprise-ubuntu-docker-images
|
||||
edition: enterprise
|
||||
ubuntu: true
|
||||
@@ -1198,9 +1311,18 @@ workflows:
|
||||
- package-enterprise
|
||||
- build-enterprise-windows-installer
|
||||
- end-to-end-tests:
|
||||
filters: *filter-release
|
||||
filters: *filter-all
|
||||
requires:
|
||||
- package-oss
|
||||
- build-docs-website:
|
||||
filters: *filter-not-release-or-master
|
||||
requires:
|
||||
- mysql-integration-test
|
||||
- postgres-integration-test
|
||||
- deploy-to-kubernetes:
|
||||
filters: *filter-only-master
|
||||
requires:
|
||||
- build-enterprise-docker-images
|
||||
|
||||
nightly:
|
||||
triggers:
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
load('scripts/pr.star', 'pr_pipelines')
|
||||
load('scripts/master.star', 'master_pipelines')
|
||||
load('scripts/release.star', 'release_pipelines', 'test_release_pipelines')
|
||||
|
||||
def main(ctx):
|
||||
edition = 'oss'
|
||||
return pr_pipelines(edition=edition) + master_pipelines(edition=edition) + release_pipelines() + \
|
||||
test_release_pipelines()
|
||||
2249
.drone.yml
2249
.drone.yml
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,3 @@ trim_trailing_whitespace = false
|
||||
[Makefile]
|
||||
indent_style = tab
|
||||
indent_size = 2
|
||||
|
||||
[*.star]
|
||||
indent_size = 4
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
node_modules
|
||||
compiled
|
||||
build
|
||||
vendor
|
||||
devenv
|
||||
data
|
||||
dist
|
||||
11
.eslintrc
11
.eslintrc
@@ -1,13 +1,4 @@
|
||||
{
|
||||
"extends": ["@grafana/eslint-config"],
|
||||
"root": true,
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["packages/grafana-ui/**/*/!(*.story).{ts,tsx}", "public/app/**/*.{ts,tsx}"],
|
||||
"rules": {
|
||||
"react-hooks/rules-of-hooks": "off",
|
||||
"react-hooks/exhaustive-deps": "off"
|
||||
}
|
||||
}
|
||||
]
|
||||
"root": true
|
||||
}
|
||||
|
||||
6
.github/CODEOWNERS
vendored
6
.github/CODEOWNERS
vendored
@@ -12,9 +12,9 @@
|
||||
# This should make it easy to add new rules without breaking existing ones.
|
||||
|
||||
# Documentation owner: Diana Payton
|
||||
/docs/ @oddlittlebird @achatterjee-grafana
|
||||
/contribute/ @oddlittlebird @marcusolsson @achatterjee-grafana
|
||||
/docs/sources/developers/plugins/ @marcusolsson
|
||||
/docs/ @oddlittlebird
|
||||
/contribute/ @oddlittlebird @marcusolsson
|
||||
|
||||
|
||||
# Backend code
|
||||
*.go @grafana/backend-platform
|
||||
|
||||
6
.github/ISSUE_TEMPLATE/1-bug_report.md
vendored
6
.github/ISSUE_TEMPLATE/1-bug_report.md
vendored
@@ -9,9 +9,9 @@ Please use this template to create your bug report. By providing as much info as
|
||||
|
||||
PROTIP: record your screen and attach it as a gif to showcase the issue.
|
||||
|
||||
- Questions should be posted to: https://community.grafana.com
|
||||
- Use query inspector to troubleshoot issues: https://bit.ly/2XNF6YS
|
||||
- How to record and attach gif: https://bit.ly/2Mi8T6K
|
||||
* Questions should be posted to: https://community.grafana.com
|
||||
* Use query inspector to troubleshoot issues: https://bit.ly/2XNF6YS
|
||||
* How to record and attach gif: https://bit.ly/2Mi8T6K
|
||||
-->
|
||||
|
||||
**What happened**:
|
||||
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -22,7 +22,7 @@ Thank you for sending a pull request! Here are some tips:
|
||||
|
||||
<!--
|
||||
|
||||
- Automatically closes linked issue when the Pull Request is merged.
|
||||
* Automatically closes linked issue when the Pull Request is merged.
|
||||
|
||||
Usage: "Fixes #<issue number>", or "Fixes (paste link of issue)"
|
||||
|
||||
|
||||
2
.github/actions/gha-publish-to-git/README.md
vendored
2
.github/actions/gha-publish-to-git/README.md
vendored
@@ -8,7 +8,7 @@ This can be especially useful for publishing static website, such as with
|
||||
[GitHub Pages](https://pages.github.com/), from built files in other job
|
||||
steps, such as [Doxygen](http://www.doxygen.nl/) generated HTML files.
|
||||
|
||||
> **Note:** GitHub currently requires the use of a Personal Access Token for
|
||||
**NOTE**: GitHub currently requires the use of a Personal Access Token for
|
||||
pushing to other repositories. Pushing to the current repository should work
|
||||
with the always-available GitHub Token (available via
|
||||
`{{ secrets.GITHUB_TOKEN }}`. If pushing to another repository, a Personal
|
||||
|
||||
27
.github/commands.json
vendored
27
.github/commands.json
vendored
@@ -1,27 +0,0 @@
|
||||
[
|
||||
{
|
||||
"type": "label",
|
||||
"name": "type/question",
|
||||
"action": "close",
|
||||
"comment": "Please ask your question on [community.grafana.com/](https://community.grafana.com/). To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
|
||||
},
|
||||
{
|
||||
"type": "comment",
|
||||
"name": "duplicate",
|
||||
"allowUsers": [],
|
||||
"action": "updateLabels",
|
||||
"addLabel": "type/duplicate"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "type/duplicate",
|
||||
"action": "close",
|
||||
"comment": "Thanks for creating this issue! It looks like this has already been reported by another user. We’ve closed this in favor of the existing one. Please consider adding any details you think is missing to that issue.\n\nTo avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"name": "no new info",
|
||||
"action": "close",
|
||||
"comment": "We've closed this issue since it needs more information and hasn't had any activity recently. We can re-open it after you you add more information. To avoid having your issue closed in the future, please read our [CONTRIBUTING](https://github.com/grafana/grafana/blob/master/CONTRIBUTING.md) guidelines.\n\nHappy graphing!"
|
||||
}
|
||||
]
|
||||
71
.github/workflows/codeql-analysis.yml
vendored
71
.github/workflows/codeql-analysis.yml
vendored
@@ -1,71 +0,0 @@
|
||||
# For most projects, this workflow file will not need changing; you simply need
|
||||
# to commit it to your repository.
|
||||
#
|
||||
# You may wish to alter this file to override the set of languages analyzed,
|
||||
# or to provide custom queries or build logic.
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, v1.8.x, v2.0.x, v2.1.x, v2.6.x, v3.0.x, v3.1.x, v4.0.x, v4.1.x, v4.2.x, v4.3.x, v4.4.x, v4.5.x, v4.6.x, v4.7.x, v5.0.x, v5.1.x, v5.2.x, v5.3.x, v5.4.x, v6.0.x, v6.1.x, v6.2.x, v6.3.x, v6.4.x, v6.5.x, v6.6.x, v6.7.x, v7.0.x, v7.1.x, v7.2.x]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 4 * * 6'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['javascript', 'go', 'python']
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||
# By default, queries listed here will override any specified in a config file.
|
||||
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
25
.github/workflows/commands.yml
vendored
25
.github/workflows/commands.yml
vendored
@@ -1,25 +0,0 @@
|
||||
name: Run commands when issues are labeled or comments added
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Run Commands
|
||||
uses: ./actions/commands
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
|
||||
config-path: commands
|
||||
34
.github/workflows/metrics-collector.yml
vendored
34
.github/workflows/metrics-collector.yml
vendored
@@ -1,34 +0,0 @@
|
||||
#
|
||||
# When triggered by the cron job it will also collect metrics for:
|
||||
# * number of issues without label
|
||||
# * number of issues with "needs more info"
|
||||
# * number of issues with "needs investigation"
|
||||
# * number of issues with label type/bug
|
||||
# * number of open issues in current milestone
|
||||
#
|
||||
# https://github.com/grafana/grafana-github-actions/blob/main/metrics-collector/index.ts
|
||||
#
|
||||
name: Github issue metrics collection
|
||||
on:
|
||||
schedule:
|
||||
- cron: "*/10 * * * *"
|
||||
issues:
|
||||
types: [opened, closed]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: ./actions
|
||||
ref: main
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Run metrics collector
|
||||
uses: ./actions/metrics-collector
|
||||
with:
|
||||
metricsWriteAPIKey: ${{secrets.GRAFANA_MISC_STATS_API_KEY}}
|
||||
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
|
||||
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@@ -6,7 +6,6 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- 'docs/sources/**'
|
||||
- 'packages/grafana-*/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -15,13 +14,6 @@ jobs:
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: generate-packages-docs
|
||||
uses: actions/setup-node@v1
|
||||
id: generate-docs
|
||||
with:
|
||||
node-version: '12'
|
||||
- run: yarn install --pure-lockfile --no-progress
|
||||
- run: ./scripts/ci-reference-docs-build.sh
|
||||
- name: publish-to-git
|
||||
uses: ./.github/actions/gha-publish-to-git
|
||||
id: publish
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -15,6 +15,7 @@ awsconfig
|
||||
.yarnrc
|
||||
.yarn/
|
||||
vendor/
|
||||
.eslintcache
|
||||
|
||||
# Enterprise emails
|
||||
/emails/templates/enterprise_*
|
||||
|
||||
@@ -6,4 +6,4 @@ node_modules
|
||||
public/vendor/
|
||||
vendor/
|
||||
data/
|
||||
e2e/tmp
|
||||
|
||||
|
||||
386
CHANGELOG.md
386
CHANGELOG.md
@@ -1,369 +1,3 @@
|
||||
# 7.3.0-beta1 (2020-10-14)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- **CloudWatch**: The AWS CloudWatch data source's authentication scheme has changed. See the [upgrade notes](https://grafana.com/docs/grafana/latest/installation/upgrading/#upgrading-to-v73) for details and how this may affect you.
|
||||
|
||||
# 7.2.1 (2020-10-08)
|
||||
|
||||
### Features / Enhancements
|
||||
* **Api**: Add /healthz endpoint for health checks. [#27536](https://github.com/grafana/grafana/pull/27536), [@bergquist](https://github.com/bergquist)
|
||||
* **Api**: Healthchecks should not be rejected due to domain enforcement checks. [#27981](https://github.com/grafana/grafana/pull/27981), [@bergquist](https://github.com/bergquist)
|
||||
* **Instrumentation**: Removes invalid chars from label names. [#27921](https://github.com/grafana/grafana/pull/27921), [@bergquist](https://github.com/bergquist)
|
||||
* **Orgs**: Remove organisations deprecation notice from backend. [#27788](https://github.com/grafana/grafana/pull/27788), [@wbrowne](https://github.com/wbrowne)
|
||||
* **Toolkit**: Add --coverage flag to plugin build command. [#27743](https://github.com/grafana/grafana/pull/27743), [@gassiss](https://github.com/gassiss)
|
||||
|
||||
### Bug Fixes
|
||||
* **BarGauge**: Fixed scrollbar showing for bar gauge in Firefox. [#27784](https://github.com/grafana/grafana/pull/27784), [@torkelo](https://github.com/torkelo)
|
||||
* **Dashboard**: Honour root_url for Explore link. [#27654](https://github.com/grafana/grafana/pull/27654), [@tiagomotasantos](https://github.com/tiagomotasantos)
|
||||
* **DashboardLinks**: values in links are updated when variables change. [#27926](https://github.com/grafana/grafana/pull/27926), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
* **Elasticsearch**: Add query's refId to each series returned by a query. [#27614](https://github.com/grafana/grafana/pull/27614), [@Elfo404](https://github.com/Elfo404)
|
||||
* **Elasticsearch**: Fix ad-hoc filter support for Raw Data query and new table panel. [#28064](https://github.com/grafana/grafana/pull/28064), [@Elfo404](https://github.com/Elfo404)
|
||||
* **Graph**: Fixed histogram bucket calculations to avoid missing buckets. [#27883](https://github.com/grafana/grafana/pull/27883), [@torkelo](https://github.com/torkelo)
|
||||
* **Loki**: Run instant query only in Explore. [#27974](https://github.com/grafana/grafana/pull/27974), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
* **Units**: bps & Bps default scale remains decimal (backwards-compatibility). [#27838](https://github.com/grafana/grafana/pull/27838), [@Berbe](https://github.com/Berbe)
|
||||
* **ValueMappings**: Fix issue with value mappings in override applying to all columns. [#27718](https://github.com/grafana/grafana/pull/27718), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
# 7.2.0 (2020-09-23)
|
||||
|
||||
### Features / Enhancements
|
||||
- **Alerting**: Ensuring notifications displayed correctly in mobile device with Google Chat. [#27578](https://github.com/grafana/grafana/pull/27578), [@alvarolmedo](https://github.com/alvarolmedo)
|
||||
- **TraceView**: Show full traceID and better discern multiple stackTraces in span details. [#27710](https://github.com/grafana/grafana/pull/27710), [@aocenas](https://github.com/aocenas)
|
||||
|
||||
### Bug Fixes
|
||||
- **DataLinks**: Fixes issue with data links not interpolating values with correct field config. [#27622](https://github.com/grafana/grafana/pull/27622), [@torkelo](https://github.com/torkelo)
|
||||
- **DataProxy**: Ignore empty URL's in plugin routes. [#27653](https://github.com/grafana/grafana/pull/27653), [@domasx2](https://github.com/domasx2)
|
||||
- **Field config**: Respect config paths when rendering default value of field config property. [#27652](https://github.com/grafana/grafana/pull/27652), [@dprokop](https://github.com/dprokop)
|
||||
- **Field config**: Fix mismatch in field config editor types. [#27657](https://github.com/grafana/grafana/pull/27657), [@dprokop](https://github.com/dprokop)
|
||||
- **Panel editor**: Prevents adding transformations in panels with alerts. [#27706](https://github.com/grafana/grafana/pull/27706), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Stat panel**: Fix problem where string values where always green. [#27656](https://github.com/grafana/grafana/pull/27656), [@peterholmberg](https://github.com/peterholmberg)
|
||||
|
||||
# 7.2.0-beta2 (2020-09-17)
|
||||
|
||||
### Features / Enhancements
|
||||
- **API**: Enrich add user to org endpoints with user ID in the response. [#27551](https://github.com/grafana/grafana/pull/27551), [@AgnesToulet](https://github.com/AgnesToulet)
|
||||
- **API**: Enrich responses and improve error handling for alerting API endpoints. [#27550](https://github.com/grafana/grafana/pull/27550), [@AgnesToulet](https://github.com/AgnesToulet)
|
||||
- **Auth**: Replace maximum inactive/lifetime settings of days to duration. [#27150](https://github.com/grafana/grafana/pull/27150), [@Hansuuuuuuuuuu](https://github.com/Hansuuuuuuuuuu)
|
||||
- **Dashboard**: Support configuring default timezone via config file. [#27404](https://github.com/grafana/grafana/pull/27404), [@woutersmeenk](https://github.com/woutersmeenk)
|
||||
- **Elasticsearch**: Add support for date_nanos type. [#27538](https://github.com/grafana/grafana/pull/27538), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Elasticsearch**: Allow fields starting with underscore. [#27520](https://github.com/grafana/grafana/pull/27520), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Elasticsearch**: Increase maximum geohash aggregation precision to 12. [#27539](https://github.com/grafana/grafana/pull/27539), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Field config**: Add support for paths in default field config setup. [#27570](https://github.com/grafana/grafana/pull/27570), [@dprokop](https://github.com/dprokop)
|
||||
- **Postgres**: Support request cancellation properly (Uses new backendSrv.fetch Observable request API). [#27478](https://github.com/grafana/grafana/pull/27478), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Provisioning**: Remove provisioned dashboards without parental reader. [#26143](https://github.com/grafana/grafana/pull/26143), [@nabokihms](https://github.com/nabokihms)
|
||||
- **Variables**: Limit rendering of options in dropdown to improve search performance. [#27525](https://github.com/grafana/grafana/pull/27525), [@guoqn](https://github.com/guoqn)
|
||||
- **Units**: Binary-prefixed data rates. [#27022](https://github.com/grafana/grafana/pull/27022), [@Berbe](https://github.com/Berbe)
|
||||
|
||||
### Bug Fixes
|
||||
- **Admin**: Fixes close('X') button layout issue in API keys page. [#27625](https://github.com/grafana/grafana/pull/27625), [@nikasvan](https://github.com/nikasvan)
|
||||
- **Alerting**: Fix integration key so it's stored encrypted for Pagerduty notifier. [#27484](https://github.com/grafana/grafana/pull/27484), [@marefr](https://github.com/marefr)
|
||||
- **Annotations**: Fixes issue with showing error notice for cancelled annotation queries. [#27557](https://github.com/grafana/grafana/pull/27557), [@torkelo](https://github.com/torkelo)
|
||||
- **Azure/Insights**: Fix handling of legacy dimension values. [#27513](https://github.com/grafana/grafana/pull/27513), [@marefr](https://github.com/marefr)
|
||||
- **DataLinks**: Respects display name and adds field quoting. [#27616](https://github.com/grafana/grafana/pull/27616), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **ImageRendering**: Fix rendering panel using shared query in png, PDF reports and embedded scenarios. [#27628](https://github.com/grafana/grafana/pull/27628), [@torkelo](https://github.com/torkelo)
|
||||
- **InputControl**: Fixed using InputControl in unit tests from plugins. [#27615](https://github.com/grafana/grafana/pull/27615), [@torkelo](https://github.com/torkelo)
|
||||
- **NewsPanel**: Fixed XSS issue when rendering rss links. [#27612](https://github.com/grafana/grafana/pull/27612), [@torkelo](https://github.com/torkelo)
|
||||
- **Transforms**: Fix for issue in labels to fields transform where the new option value field name did not work properly. [#27501](https://github.com/grafana/grafana/pull/27501), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
# 7.2.0-beta1 (2020-09-09)
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- **Units**: The date time units `YYYY-MM-DD HH:mm:ss` and `MM/DD/YYYY h:mm:ss a` have been renamed to `Datetime ISO`
|
||||
and `Datetime US` respectively. This is no breaking change just a visual name change (the unit id is unchanged). The
|
||||
unit behavior is different however, it no longer hides the date part if the date is today. If you want this old
|
||||
behavior you need to change unit to `Datetime ISO (No date if today)` or `Datetime US (No date if today)`.
|
||||
|
||||
### Features / Enhancements
|
||||
|
||||
- **API**: Return ID of the deleted resource for dashboard, datasource and folder DELETE endpoints. [#26691](https://github.com/grafana/grafana/pull/26691), [@AgnesToulet](https://github.com/AgnesToulet)
|
||||
- **API**: Support paging in the admin orgs list API. [#26932](https://github.com/grafana/grafana/pull/26932), [@benjaminjb](https://github.com/benjaminjb)
|
||||
- **API**: return resource ID for auth key creation, folder permissions update and user invite complete endpoints. [#27419](https://github.com/grafana/grafana/pull/27419), [@AgnesToulet](https://github.com/AgnesToulet)
|
||||
- **Alerting**: Add toggle to disable alert threshold visibility in graph panel. [#25705](https://github.com/grafana/grafana/pull/25705), [@jpalpant](https://github.com/jpalpant)
|
||||
- **Alerting**: Adds support for overriding 'dedup_key' via alert tags when using the Pagerduty notifier. [#27356](https://github.com/grafana/grafana/pull/27356), [@alavrovinfb](https://github.com/alavrovinfb)
|
||||
- **Alerting**: Change alert rule link in alert notifications to open panel in view mode. [#27378](https://github.com/grafana/grafana/pull/27378), [@robertlestak](https://github.com/robertlestak)
|
||||
- **Alerting**: Support storing sensitive notifier settings securely/encrypted. [#25114](https://github.com/grafana/grafana/pull/25114), [@mtanda](https://github.com/mtanda)
|
||||
- **Annotation**: Add clean up job for old annotations. [#26156](https://github.com/grafana/grafana/pull/26156), [@bergquist](https://github.com/bergquist)
|
||||
- **AzureMonitor**: select plugin route from cloudname. [#27273](https://github.com/grafana/grafana/pull/27273), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **BackendSrv**: Uses credentials, deprecates withCredentials & defaults to same-origin. [#27385](https://github.com/grafana/grafana/pull/27385), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Chore**: Upgrade to Go 1.15.1. [#27326](https://github.com/grafana/grafana/pull/27326), [@aknuds1](https://github.com/aknuds1)
|
||||
- **CloudWatch**: Update list of AmazonMQ metrics and dimensions. [#27332](https://github.com/grafana/grafana/pull/27332), [@szymonpk](https://github.com/szymonpk)
|
||||
- **Cloudwatch**: Add Support for external ID in assume role. [#23685](https://github.com/grafana/grafana/pull/23685), [@gdhananjay](https://github.com/gdhananjay)
|
||||
- **Cloudwatch**: Add af-south-1 region. [#26513](https://github.com/grafana/grafana/pull/26513), [@ruanbekker](https://github.com/ruanbekker)
|
||||
- **Dashboard**: Add Duplicate dashboard links button to links list. [#26600](https://github.com/grafana/grafana/pull/26600), [@Hmerac](https://github.com/Hmerac)
|
||||
- **Dashboard**: Adds folder name and link to the dashboard overview on the homepage. [#27214](https://github.com/grafana/grafana/pull/27214), [@michelengelen](https://github.com/michelengelen)
|
||||
- **Database**: Set 0640 permissions on SQLite database file. [#26339](https://github.com/grafana/grafana/pull/26339), [@aknuds1](https://github.com/aknuds1)
|
||||
- **DateFormats**: Default ISO & US formats never omit date part even if date is today (breaking change). [#27300](https://github.com/grafana/grafana/pull/27300), [@torkelo](https://github.com/torkelo)
|
||||
- **Explore/Loki**: POC for toggling parsed fields in the list view. [#26178](https://github.com/grafana/grafana/pull/26178), [@fredr](https://github.com/fredr)
|
||||
- **Explore**: Sort order of log results. [#26669](https://github.com/grafana/grafana/pull/26669), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore**: Transform prometheus query to elasticsearch query. [#23670](https://github.com/grafana/grafana/pull/23670), [@melchiormoulin](https://github.com/melchiormoulin)
|
||||
- **Field overrides**: Overrides UI improvements. [#27073](https://github.com/grafana/grafana/pull/27073), [@dprokop](https://github.com/dprokop)
|
||||
- **Heatmap**: Reduce the aggressiveness of hiding ticks/labels when panel is small. [#27016](https://github.com/grafana/grafana/pull/27016), [@lrstanley](https://github.com/lrstanley)
|
||||
- **Image Store**: Add support for using signed URLs when uploading images to GCS. [#26840](https://github.com/grafana/grafana/pull/26840), [@marcosrmendezthd](https://github.com/marcosrmendezthd)
|
||||
- **Image Store**: Fallback to application default credentials when no key file is specified for GCS. [#25948](https://github.com/grafana/grafana/pull/25948), [@Eraac](https://github.com/Eraac)
|
||||
- **InfluxDB/Flux**: Increase series limit for Flux datasource. [#26746](https://github.com/grafana/grafana/pull/26746), [@sneddrs](https://github.com/sneddrs)
|
||||
- **InfluxDB**: exclude result and table column from Flux table results. [#27081](https://github.com/grafana/grafana/pull/27081), [@ryantxu](https://github.com/ryantxu)
|
||||
- **InfluxDB**: return a table rather than an error when timeseries is missing time. [#27320](https://github.com/grafana/grafana/pull/27320), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Instrumentation**: Adds instrumentation for outgoing datasource requests. [#27427](https://github.com/grafana/grafana/pull/27427), [@bergquist](https://github.com/bergquist)
|
||||
- **Loki**: Add scopedVars support in legend formatting for repeated variables. [#27046](https://github.com/grafana/grafana/pull/27046), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki**: Re-introduce running of instant queries. [#27213](https://github.com/grafana/grafana/pull/27213), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Loki**: Support request cancellation properly (Uses new backendSrv.fetch Observable request API). [#27265](https://github.com/grafana/grafana/pull/27265), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **MixedDatasource**: Shows retrieved data even if a data source fails. [#27024](https://github.com/grafana/grafana/pull/27024), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **OAuth**: Handle DEFLATE compressed payloads in JWT for Generic OAuth. [#26969](https://github.com/grafana/grafana/pull/26969), [@billoley](https://github.com/billoley)
|
||||
- **OAuth**: Increase state cookie max age. [#27258](https://github.com/grafana/grafana/pull/27258), [@bergquist](https://github.com/bergquist)
|
||||
- **Orgs**: Remove org deprecation notice as we have decided to preserve multi-org support. [#26853](https://github.com/grafana/grafana/pull/26853), [@torkelo](https://github.com/torkelo)
|
||||
- **PanelInspector**: Adds a Raw display mode but defaults to Formatted display mode. [#27306](https://github.com/grafana/grafana/pull/27306), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Postgres**: Support Unix socket for host. [#25778](https://github.com/grafana/grafana/pull/25778), [@aknuds1](https://github.com/aknuds1)
|
||||
- **Prometheus**: Add scopedVars support in legend formatting for repeated variables. [#27047](https://github.com/grafana/grafana/pull/27047), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus**: Support request cancellation properly (Uses new backendSrv.fetch Observable request API). [#27090](https://github.com/grafana/grafana/pull/27090), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Prometheus**: add $__rate_interval variable. [#26937](https://github.com/grafana/grafana/pull/26937), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Provisioning**: Validate that datasource access field equals to direct or proxy. [#26440](https://github.com/grafana/grafana/pull/26440), [@nabokihms](https://github.com/nabokihms)
|
||||
- **RangeUtils**: migrate logic from kbn to grafana/data. [#27347](https://github.com/grafana/grafana/pull/27347), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Table**: Adds column filtering. [#27225](https://github.com/grafana/grafana/pull/27225), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Table**: Support showing numbers in strings with full original value. [#27097](https://github.com/grafana/grafana/pull/27097), [@torkelo](https://github.com/torkelo)
|
||||
- **TablePanel**: Add support for basic gauge as a cell display mode. [#26595](https://github.com/grafana/grafana/pull/26595), [@jutley](https://github.com/jutley)
|
||||
- **Transformations**: Group by and aggregate on multiple fields. [#25498](https://github.com/grafana/grafana/pull/25498), [@Totalus](https://github.com/Totalus)
|
||||
- **Transformations**: enable transformations reorder. [#27197](https://github.com/grafana/grafana/pull/27197), [@dprokop](https://github.com/dprokop)
|
||||
- **Units**: Allow re-scaling nanoseconds up to days. [#26458](https://github.com/grafana/grafana/pull/26458), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **grafana-cli**: Add ability to read password from stdin to reset admin password. [#26016](https://github.com/grafana/grafana/pull/26016), [@nabokihms](https://github.com/nabokihms)
|
||||
- **Reporting**: add branding options. (Enterprise)
|
||||
- **Reporting**: allow setting custom timerange. (Enterprise)
|
||||
|
||||
### Bug Fixes
|
||||
- **Auth**: Fix signup workflow and UI when verify email is enabled. [#26263](https://github.com/grafana/grafana/pull/26263), [@KamalGalrani](https://github.com/KamalGalrani)
|
||||
- **AzureMonitor**: Change filterDimensions property to match what is stored. [#27459](https://github.com/grafana/grafana/pull/27459), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Cloud Monitoring**: Fix missing title and text from cloud monitoring annotations. [#27187](https://github.com/grafana/grafana/pull/27187), [@atotto](https://github.com/atotto)
|
||||
- **CloudWatch**: Fix error message returned from tag:GetResources. [#27205](https://github.com/grafana/grafana/pull/27205), [@kichik](https://github.com/kichik)
|
||||
- **Cloudwatch**: Update AWS/MediaConnect metrics and dimensions. [#26093](https://github.com/grafana/grafana/pull/26093), [@papagian](https://github.com/papagian)
|
||||
- **DashboardSettings**: Fixes auto refresh crash with space in interval. [#27438](https://github.com/grafana/grafana/pull/27438), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Elasticsearch**: Fix localized dates in index pattern. [#27351](https://github.com/grafana/grafana/pull/27351), [@domasx2](https://github.com/domasx2)
|
||||
- **Elasticsearch**: Fix using multiple bucket script aggregations when only grouping by terms. [#24064](https://github.com/grafana/grafana/pull/24064), [@MarceloNunesAlves](https://github.com/MarceloNunesAlves)
|
||||
- **Explore**: Expand template variables when redirecting from dashboard panel. [#27354](https://github.com/grafana/grafana/pull/27354), [@Elfo404](https://github.com/Elfo404)
|
||||
- **FolderPicker**: Fixes not being able to create new folder. [#27092](https://github.com/grafana/grafana/pull/27092), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Graphite**: Show and hide query editor function popup on click. [#26923](https://github.com/grafana/grafana/pull/26923), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **InfluxDB/Flux**: Fix for Alerts on InfluxDB Flux datasources only use the first series. [#27463](https://github.com/grafana/grafana/pull/27463), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Loki**: Send current time range when fetching labels and values. [#26622](https://github.com/grafana/grafana/pull/26622), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus**: Add backslash escaping for template variables. [#26205](https://github.com/grafana/grafana/pull/26205), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus**: Correctly format multi values variables in queries. [#26896](https://github.com/grafana/grafana/pull/26896), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Provisioning**: Add validation for missing organisations in datasource, dashboard, and notifier configurations. [#26601](https://github.com/grafana/grafana/pull/26601), [@nabokihms](https://github.com/nabokihms)
|
||||
- **Rendering**: Fixed issue rendering text panel to image via image renderer plugin. [#27083](https://github.com/grafana/grafana/pull/27083), [@torkelo](https://github.com/torkelo)
|
||||
- **Stats**: Use more efficient SQL and add timeouts. [#27390](https://github.com/grafana/grafana/pull/27390), [@sakjur](https://github.com/sakjur)
|
||||
- **Table**: Support date unit formats on string values. [#26879](https://github.com/grafana/grafana/pull/26879), [@torkelo](https://github.com/torkelo)
|
||||
- **Thresholds**: Fixed issue with thresholds in overrides not working after save and reload. [#27297](https://github.com/grafana/grafana/pull/27297), [@torkelo](https://github.com/torkelo)
|
||||
- **Transformations**: Fixes outer join transformation when frames are missing field to join by. [#27453](https://github.com/grafana/grafana/pull/27453), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Transformations**: merge will properly handle empty frames and frames with multiple rows where values are overlapping. [#27362](https://github.com/grafana/grafana/pull/27362), [@mckn](https://github.com/mckn)
|
||||
- **grafana-cli**: Fix installing of plugins missing directory entries in zip. [#26945](https://github.com/grafana/grafana/pull/26945), [@adrianlzt](https://github.com/adrianlzt)
|
||||
|
||||
# 7.1.5 (2020-08-25)
|
||||
|
||||
### Features / Enhancements
|
||||
- **Stats**: Stop counting the same user multiple times. [#26777](https://github.com/grafana/grafana/pull/26777), [@sakjur](https://github.com/sakjur)
|
||||
|
||||
### Bug Fixes
|
||||
- **Alerting**: remove LongToWide call in alerting. [#27140](https://github.com/grafana/grafana/pull/27140), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **AzureMonitor**: fix panic introduced in 7.1.4 when unit was unspecified and alias was used. [#27113](https://github.com/grafana/grafana/pull/27113), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Variables**: Fixes issue with All variable not being resolved. [#27151](https://github.com/grafana/grafana/pull/27151), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
|
||||
# 7.1.4 (2020-08-20)
|
||||
|
||||
### Features / Enhancements
|
||||
- **Azure App Insights Alert error - tsdb.HandleRequest() failed to convert dataframe "" to tsdb.TimeSeriesSlice**. [#26897](https://github.com/grafana/grafana/issues/26897)
|
||||
- **AzureMonitor**: map more units. [#26990](https://github.com/grafana/grafana/pull/26990), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Azuremonitor**: do not set unit if literal "Unspecified". [#26839](https://github.com/grafana/grafana/pull/26839), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Dataframe/Alerting**: to tsdb.TimeSeriesSlice - accept "empty" time series. [#26903](https://github.com/grafana/grafana/pull/26903), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Field overrides**: Filter by field name using regex. [#27070](https://github.com/grafana/grafana/pull/27070), [@dprokop](https://github.com/dprokop)
|
||||
- **Overrides**: expose byType matcher UI. [#27056](https://github.com/grafana/grafana/pull/27056), [@ryantxu](https://github.com/ryantxu)
|
||||
|
||||
### Bug Fixes
|
||||
- **CloudWatch**: Add FreeStorageCapacity metric. [#26503](https://github.com/grafana/grafana/pull/26503), [@waqark3389](https://github.com/waqark3389)
|
||||
- **CloudWatch**: Fix sorting of metrics results. [#26835](https://github.com/grafana/grafana/pull/26835), [@aknuds1](https://github.com/aknuds1)
|
||||
- **Cloudwatch**: Add FileSystemId as a dimension key for the AWS/FSx namespace. [#26662](https://github.com/grafana/grafana/pull/26662), [@waqark3389](https://github.com/waqark3389)
|
||||
- **InfluxDB**: Update Flux placeholder URL with respect to latest Go client. [#27086](https://github.com/grafana/grafana/pull/27086), [@aknuds1](https://github.com/aknuds1)
|
||||
- **InfluxDB**: Upgrade Go client, use data source HTTP client. [#27012](https://github.com/grafana/grafana/pull/27012), [@aknuds1](https://github.com/aknuds1)
|
||||
- **Proxy**: Fix updating refresh token in OAuth pass-thru. [#26885](https://github.com/grafana/grafana/pull/26885), [@seanlaff](https://github.com/seanlaff)
|
||||
- **Templating**: Fixes so texts show in picker not the values. [#27002](https://github.com/grafana/grafana/pull/27002), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
|
||||
# 7.1.3 (2020-08-06)
|
||||
|
||||
### Bug Fixes
|
||||
- **Templating**: Templating: Fix undefined result when using raw interpolation format [#26818](https://github.com/grafana/grafana/pull/26818)
|
||||
|
||||
# 7.1.2 (2020-08-05)
|
||||
|
||||
### Features / Enhancements
|
||||
- **Explore**: Don't run queries on datasource change. [#26033](https://github.com/grafana/grafana/pull/26033), [@davkal](https://github.com/davkal)
|
||||
- **TemplateSrv**: Formatting options for ${__from} and ${__to}, unix seconds epoch, ISO 8601/RFC 3339. [#26466](https://github.com/grafana/grafana/pull/26466), [@torkelo](https://github.com/torkelo)
|
||||
- **Toolkit/Plugin**: throw an Error instead of a string. [#26618](https://github.com/grafana/grafana/pull/26618), [@leventebalogh](https://github.com/leventebalogh)
|
||||
|
||||
### Bug Fixes
|
||||
- **Dashbard**: Fix refresh interval settings to allow setting it to equal min_refresh_interval. [#26615](https://github.com/grafana/grafana/pull/26615), [@torkelo](https://github.com/torkelo)
|
||||
- **Flux**: Ensure connections to InfluxDB are closed. [#26735](https://github.com/grafana/grafana/pull/26735), [@sneddrs](https://github.com/sneddrs)
|
||||
- **Query history**: Fix search filtering if null value. [#26768](https://github.com/grafana/grafana/pull/26768), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **QueryOptions**: Fix not being able to change cache timeout setting. [#26614](https://github.com/grafana/grafana/pull/26614), [@torkelo](https://github.com/torkelo)
|
||||
- **StatPanel**: Fix stat panel display name not showing when explicitly set. [#26616](https://github.com/grafana/grafana/pull/26616), [@torkelo](https://github.com/torkelo)
|
||||
- **Templating**: Fixed access to system variables like __dashboard, __user & __org during dashboard load & variable queries. [#26637](https://github.com/grafana/grafana/pull/26637), [@torkelo](https://github.com/torkelo)
|
||||
- **TextPanel**: Fix content overflowing panel boundaries. [#26612](https://github.com/grafana/grafana/pull/26612), [@torkelo](https://github.com/torkelo)
|
||||
- **TimePicker**: Fix position and responsive behavior. [#26570](https://github.com/grafana/grafana/pull/26570), [@torkelo](https://github.com/torkelo)
|
||||
- **TimePicker**: Fixes app crash when changing custom range to nothing. [#26775](https://github.com/grafana/grafana/pull/26775), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Units**: Remove duplicate SI prefix from mSv and µSv. [#26598](https://github.com/grafana/grafana/pull/26598), [@tofurky](https://github.com/tofurky)
|
||||
|
||||
# 7.1.1 (2020-07-24)
|
||||
|
||||
### Features / Enhancements
|
||||
- **Graph**: Support setting field unit & override data source (automatic) unit. [#26529](https://github.com/grafana/grafana/pull/26529), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Tracing**: Add errorIconColor prop to TraceSpanData. [#26509](https://github.com/grafana/grafana/pull/26509), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
|
||||
### Bug Fixes
|
||||
- **Branding**: Fix login app title. [#26425](https://github.com/grafana/grafana/pull/26425), [@benrubson](https://github.com/benrubson)
|
||||
- **Bring back scripts evaluation in TextPanel**. [#26413](https://github.com/grafana/grafana/pull/26413), [@dprokop](https://github.com/dprokop)
|
||||
- **Dashboard**: Fix empty panels after scrolling on Safari/iOS. [#26495](https://github.com/grafana/grafana/pull/26495), [@torkelo](https://github.com/torkelo)
|
||||
- **Dashboard**: Fix for viewer can enter panel edit mode by modifying url (but cannot not save anything). [#26556](https://github.com/grafana/grafana/pull/26556), [@torkelo](https://github.com/torkelo)
|
||||
- **Elasticsearch**: Fix displaying of bucket script input. [#26552](https://github.com/grafana/grafana/pull/26552), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore**: parse queryType from explore url. [#26349](https://github.com/grafana/grafana/pull/26349), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Tracing**: upstream fix for hovering on log lines. [#26426](https://github.com/grafana/grafana/pull/26426), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
|
||||
# 7.1.0 (2020-07-16)
|
||||
|
||||
### Features / Enhancements
|
||||
- **Backend**: Use latest go plugin sdk (0.74.0) to sort wide frames. [#26207](https://github.com/grafana/grafana/pull/26207), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Elasticsearch**: Create Raw Doc metric to render raw JSON docs in columns in the new table panel. [#26233](https://github.com/grafana/grafana/pull/26233), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **PluginsListPage**: More plugins button should open in new window. [#26305](https://github.com/grafana/grafana/pull/26305), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
|
||||
### Bug Fixes
|
||||
- **AdminUsers**: Reset page to zero on query change. [#26293](https://github.com/grafana/grafana/pull/26293), [@hshoff](https://github.com/hshoff)
|
||||
- **CloudWatch Logs**: Fixes grouping of results by numeric field. [#26298](https://github.com/grafana/grafana/pull/26298), [@kaydelaney](https://github.com/kaydelaney)
|
||||
- **DashboardLinks**: Do not over-query search endpoint. [#26311](https://github.com/grafana/grafana/pull/26311), [@torkelo](https://github.com/torkelo)
|
||||
- **Docker**: Make sure to create default plugin provisioning directory. [#26017](https://github.com/grafana/grafana/pull/26017), [@marefr](https://github.com/marefr)
|
||||
- **Elastic**: Fix error "e.buckets[Symbol.iterator] is not a function" when using filter. [#26217](https://github.com/grafana/grafana/pull/26217), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore/Loki**: Escape \ in labels for show context queries. [#26116](https://github.com/grafana/grafana/pull/26116), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Jaeger/Zipkin**: URL-encode service names and trace ids for API calls. [#26115](https://github.com/grafana/grafana/pull/26115), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus**: Fix prom links in mixed mode. [#26244](https://github.com/grafana/grafana/pull/26244), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Provisioning**: Fix bug when provision app plugins using Enterprise edition. [#26340](https://github.com/grafana/grafana/pull/26340), [@marefr](https://github.com/marefr)
|
||||
- **Sign In** Use correct url for the Sign In button. [#26239](https://github.com/grafana/grafana/pull/26239), [@dprokop](https://github.com/dprokop)
|
||||
|
||||
# 7.1.0-beta3 (2020-07-13)
|
||||
|
||||
### Features / Enhancements
|
||||
- **Explore**: Unification of logs/metrics/traces user interface. [#25890](https://github.com/grafana/grafana/pull/25890), [@aocenas](https://github.com/aocenas)
|
||||
- **Graph panel**: Move Stacking and null values before Hover tooltip options (#26035). [#26037](https://github.com/grafana/grafana/pull/26037), [@jsoref](https://github.com/jsoref)
|
||||
- **LDAP**: Get all groups for all group base search DNs. [#25825](https://github.com/grafana/grafana/pull/25825), [@Annegies](https://github.com/Annegies)
|
||||
- **Table**: JSON Cell should try to convert strings to JSON. [#26024](https://github.com/grafana/grafana/pull/26024), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Transform**: adding missing "table"-transform and "series to rows"-transform to Grafana v7-transforms. [#26042](https://github.com/grafana/grafana/pull/26042), [@mckn](https://github.com/mckn)
|
||||
|
||||
### Bug Fixes
|
||||
- **AdminUsersTable**: Fix width issues. [#26019](https://github.com/grafana/grafana/pull/26019), [@tskarhed](https://github.com/tskarhed)
|
||||
- **BarGauge**: Fix space bug in single series mode. [#26176](https://github.com/grafana/grafana/pull/26176), [@torkelo](https://github.com/torkelo)
|
||||
- **Dashboard**: Allow removing min refresh interval from refresh options (5s or other). [#26150](https://github.com/grafana/grafana/pull/26150), [@torkelo](https://github.com/torkelo)
|
||||
- **DataLinks**: Fixed interpolation of repeated variables used in Graph data links. [#26147](https://github.com/grafana/grafana/pull/26147), [@torkelo](https://github.com/torkelo)
|
||||
- **Do not break dashboard settings UI when time intervals end with trailing comma**. [#26126](https://github.com/grafana/grafana/pull/26126), [@dprokop](https://github.com/dprokop)
|
||||
- **Elastic**: Display correct log message based on selected log field. [#26020](https://github.com/grafana/grafana/pull/26020), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **InfluxDB**: Fixed new group by dropdown now showing after first use. [#26031](https://github.com/grafana/grafana/pull/26031), [@torkelo](https://github.com/torkelo)
|
||||
- **StatPanel**: Fixes issue with name showing for single series / field results. [#26070](https://github.com/grafana/grafana/pull/26070), [@torkelo](https://github.com/torkelo)
|
||||
- **Templating**: Fix recursive loop of template variable queries when changing ad-hoc-variable. [#26191](https://github.com/grafana/grafana/pull/26191), [@torkelo](https://github.com/torkelo)
|
||||
|
||||
# 7.0.6 (2020-07-09)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Templating**: Fixed recursive queries triggered when switching dashboard settings view [#26137](https://github.com/grafana/grafana/pull/26137)
|
||||
- **Templating**: Fix recursive loop of template variable queries when changing ad-hoc-variable [#26191](https://github.com/grafana/grafana/pull/26191)
|
||||
- **Auth**: Add support for forcing authentication in anonymous mode and modify SignIn to use it instead of redirect [#25567](https://github.com/grafana/grafana/pull/25567)
|
||||
- **Auth**: Fix POST request failures with anonymous access [#26049](https://github.com/grafana/grafana/pull/26049)
|
||||
|
||||
# 7.1.0-beta 2 (2020-07-02)
|
||||
|
||||
### Features / Enhancements
|
||||
- **Loki**: Allow aliasing Loki queries in dashboard. [#25706](https://github.com/grafana/grafana/pull/25706), [@bastjan](https://github.com/bastjan)
|
||||
|
||||
### Bug Fixes
|
||||
- **Explore**: Fix href when jumping from Explore to Add data source. [#25991](https://github.com/grafana/grafana/pull/25991), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Fix**: Build-in plugins failed to load in windows. [#25982](https://github.com/grafana/grafana/pull/25982), [@papagian](https://github.com/papagian)
|
||||
|
||||
# 7.1.0-beta 1 (2020-07-01)
|
||||
|
||||
### Features / Enhancements
|
||||
- **Alerting**: Adds support for multiple URLs in Alertmanager notifier. [#24196](https://github.com/grafana/grafana/pull/24196), [@alistarle](https://github.com/alistarle)
|
||||
- **Alerting**: updating the victorops alerter to handle the no_data alert type. [#23761](https://github.com/grafana/grafana/pull/23761), [@rrusso1982](https://github.com/rrusso1982)
|
||||
- **Azure**: Application Insights metrics to Frame and support multiple query dimensions. [#25849](https://github.com/grafana/grafana/pull/25849), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Azure**: Multiple dimension support for Azure Monitor Service. [#25947](https://github.com/grafana/grafana/pull/25947), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Azure**: Split Insights into two services. [#25410](https://github.com/grafana/grafana/pull/25410), [@kylebrandt](https://github.com/kylebrandt)
|
||||
- **Backend plugins**: Refactor to allow shared contract between core and external backend plugins. [#25472](https://github.com/grafana/grafana/pull/25472), [@marefr](https://github.com/marefr)
|
||||
- **Branding**: Use AppTitle as document title. [#25271](https://github.com/grafana/grafana/pull/25271), [@benrubson](https://github.com/benrubson)
|
||||
- **Chore**: upgrade to typescript 3.9.3. [#25154](https://github.com/grafana/grafana/pull/25154), [@ryantxu](https://github.com/ryantxu)
|
||||
- **CloudWatch**: Add Route53 DNSQueries metric and dimension. [#25125](https://github.com/grafana/grafana/pull/25125), [@erkolson](https://github.com/erkolson)
|
||||
- **CloudWatch**: Added AWS DataSync metrics and dimensions. [#25054](https://github.com/grafana/grafana/pull/25054), [@ilyastoli](https://github.com/ilyastoli)
|
||||
- **CloudWatch**: Added AWS MediaStore metrics and dimensions. [#25492](https://github.com/grafana/grafana/pull/25492), [@ilyastoli](https://github.com/ilyastoli)
|
||||
- **CloudWatch**: Added AWS RoboMaker metrics and dimensions. [#25090](https://github.com/grafana/grafana/pull/25090), [@ilyastoli](https://github.com/ilyastoli)
|
||||
- **CloudWatch**: Added AWS SDKMetrics metrics and dimensions. [#25150](https://github.com/grafana/grafana/pull/25150), [@ilyastoli](https://github.com/ilyastoli)
|
||||
- **CloudWatch**: Added AWS ServiceCatalog metrics and dimensions. [#25812](https://github.com/grafana/grafana/pull/25812), [@ilyastoli](https://github.com/ilyastoli)
|
||||
- **CloudWatch**: Added AWS WAFV2 metrics. [#24048](https://github.com/grafana/grafana/pull/24048), [@mikkokupsu](https://github.com/mikkokupsu)
|
||||
- **Dashboards**: Make path to default dashboard configurable. [#25595](https://github.com/grafana/grafana/pull/25595), [@bergquist](https://github.com/bergquist)
|
||||
- **Elastic**: Internal data links. [#25942](https://github.com/grafana/grafana/pull/25942), [@aocenas](https://github.com/aocenas)
|
||||
- **Elasticsearch**: Add support for template variable in date histogram min_doc_count. [#21064](https://github.com/grafana/grafana/pull/21064), [@faxm0dem](https://github.com/faxm0dem)
|
||||
- **Elasticsearch**: Adds cumulative sum aggregation support. [#24820](https://github.com/grafana/grafana/pull/24820), [@retzkek](https://github.com/retzkek)
|
||||
- **Elasticsearch**: Support using a variable for histogram and terms min doc count. [#25392](https://github.com/grafana/grafana/pull/25392), [@marefr](https://github.com/marefr)
|
||||
- **Explore/Loki**: Show results of instant queries only in table and time series only in graph. [#25845](https://github.com/grafana/grafana/pull/25845), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore**: Remove legend formatting when switching from panel to Explore. [#25848](https://github.com/grafana/grafana/pull/25848), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Footer**: Add back footer to login page. [#25656](https://github.com/grafana/grafana/pull/25656), [@torkelo](https://github.com/torkelo)
|
||||
- **ForgottenPassword**: Move view to login screen. [#25366](https://github.com/grafana/grafana/pull/25366), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Gauge**: Hide orientation option in panel options. [#25511](https://github.com/grafana/grafana/pull/25511), [@torkelo](https://github.com/torkelo)
|
||||
- **Grafana-UI**: Add FileUpload. [#25835](https://github.com/grafana/grafana/pull/25835), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **GraphPanel**: Make legend values clickable series toggles. [#25581](https://github.com/grafana/grafana/pull/25581), [@hshoff](https://github.com/hshoff)
|
||||
- **Influx**: Support flux in the influx datasource. [#25308](https://github.com/grafana/grafana/pull/25308), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Migration**: Select org. [#24739](https://github.com/grafana/grafana/pull/24739), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Migration**: Settings forms. [#24741](https://github.com/grafana/grafana/pull/24741), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Panel Inspect**: use Monaco editor for json display. [#25251](https://github.com/grafana/grafana/pull/25251), [@ryantxu](https://github.com/ryantxu)
|
||||
- **Panel edit**: Clicking twice on a visualization closes the VizPicker. [#25739](https://github.com/grafana/grafana/pull/25739), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **PanelInspect**: Update UI for Data display options. [#25478](https://github.com/grafana/grafana/pull/25478), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Plugins**: move jaeger trace type to grafana data. [#25403](https://github.com/grafana/grafana/pull/25403), [@zoltanbedi](https://github.com/zoltanbedi)
|
||||
- **Provisioning**: Adds support for enabling app plugins. [#25649](https://github.com/grafana/grafana/pull/25649), [@marefr](https://github.com/marefr)
|
||||
- **Provisioning**: Use folders structure from the file system to create desired folders in dashboard provisioning. [#23117](https://github.com/grafana/grafana/pull/23117), [@nabokihms](https://github.com/nabokihms)
|
||||
- **Query history**: Add keyboard shortcut support for commenting. [#24736](https://github.com/grafana/grafana/pull/24736), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Query history**: Add search for query history and starred queries. [#25747](https://github.com/grafana/grafana/pull/25747), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Rich history**: Updates for default settings and starred queries deletion. [#25732](https://github.com/grafana/grafana/pull/25732), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Search**: support URL query params. [#25541](https://github.com/grafana/grafana/pull/25541), [@Clarity-89](https://github.com/Clarity-89)
|
||||
- **Stackdriver**: Deep linking from Grafana panels to the Metrics Explorer. [#25858](https://github.com/grafana/grafana/pull/25858), [@papagian](https://github.com/papagian)
|
||||
- **Stackdriver**: Rename Stackdriver to Google Cloud Monitoring. [#25807](https://github.com/grafana/grafana/pull/25807), [@papagian](https://github.com/papagian)
|
||||
- **StatPanel**: Option showing name instead of value and more. [#25676](https://github.com/grafana/grafana/pull/25676), [@torkelo](https://github.com/torkelo)
|
||||
- **Switch**: Deprecate checked prop in favor of value. [#25862](https://github.com/grafana/grafana/pull/25862), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Tab**: Make active tab clickable and add hyperlink functionality. [#25546](https://github.com/grafana/grafana/pull/25546), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Table**: Adds adhoc filtering. [#25467](https://github.com/grafana/grafana/pull/25467), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Teams**: Add index for permission check. [#25736](https://github.com/grafana/grafana/pull/25736), [@sakjur](https://github.com/sakjur)
|
||||
- **Template variable filters**: Hide overflowing text. [#25801](https://github.com/grafana/grafana/pull/25801), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Templating**: Add bult in __user {name, id, login, email} variable to templating system. [#23378](https://github.com/grafana/grafana/pull/23378), [@aidanmountford](https://github.com/aidanmountford)
|
||||
- **Templating**: removes old Angular variable system and featureToggle. [#24779](https://github.com/grafana/grafana/pull/24779), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **TextPanel**: Adds proper editor for markdown and html. [#25618](https://github.com/grafana/grafana/pull/25618), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **TextPanel**: Removes Angular Text Panel. [#25504](https://github.com/grafana/grafana/pull/25504), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **TextPanel**: Removes text mode. [#25589](https://github.com/grafana/grafana/pull/25589), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **TimeZone**: unify the time zone pickers to one that can rule them all. [#24803](https://github.com/grafana/grafana/pull/24803), [@mckn](https://github.com/mckn)
|
||||
- **Transform**: added merge transform that will merge multiple series/tables into one table. [#25490](https://github.com/grafana/grafana/pull/25490), [@mckn](https://github.com/mckn)
|
||||
- **Units**: add base-pascals and rotational speed units. [#22879](https://github.com/grafana/grafana/pull/22879), [@sakjur](https://github.com/sakjur)
|
||||
- **Units**: add new unit for duration, it is optimized for displaying days, hours, minutes and seconds. [#24175](https://github.com/grafana/grafana/pull/24175), [@pabigot](https://github.com/pabigot)
|
||||
- **Variables**: enables cancel for slow query variables queries. [#24430](https://github.com/grafana/grafana/pull/24430), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **switches default value for security settings**. [#25175](https://github.com/grafana/grafana/pull/25175), [@bergquist](https://github.com/bergquist)
|
||||
- **Reporting:** add monthly schedule option. (Enterprise)
|
||||
|
||||
### Bug Fixes
|
||||
- **DatatLinks**: Fix open in new tab state mismatch. [#25826](https://github.com/grafana/grafana/pull/25826), [@tskarhed](https://github.com/tskarhed)
|
||||
- **Explore/Loki**: Fix field type in table for instant queries. [#25907](https://github.com/grafana/grafana/pull/25907), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore/Loki**: Fix scrolling of context when leaving context window. [#25838](https://github.com/grafana/grafana/pull/25838), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore/SQL data sources**: Show correctly interpolated queries. [#25110](https://github.com/grafana/grafana/pull/25110), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore/Tooltip**: Fix label value in tooltip. [#25940](https://github.com/grafana/grafana/pull/25940), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore**: Fix query editors on mobile. [#25148](https://github.com/grafana/grafana/pull/25148), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Explore**: adds an ability to exit log row context with ESC key. [#24205](https://github.com/grafana/grafana/pull/24205), [@Estrax](https://github.com/Estrax)
|
||||
- **Fix**: Value mappings match against string values. [#25929](https://github.com/grafana/grafana/pull/25929), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **GraphPanel**: Fix annotations overflowing panels. [#25606](https://github.com/grafana/grafana/pull/25606), [@hshoff](https://github.com/hshoff)
|
||||
- **Instrumentation**: Fix setting Jaeger tracing address through Grafana config. [#25768](https://github.com/grafana/grafana/pull/25768), [@marefr](https://github.com/marefr)
|
||||
- **Prometheus**: Fix performance issue in processing of histogram labels. [#25813](https://github.com/grafana/grafana/pull/25813), [@bsherrod](https://github.com/bsherrod)
|
||||
- **Provisioning**: Makes file the default dashboard provisioner type. [#24856](https://github.com/grafana/grafana/pull/24856), [@bergquist](https://github.com/bergquist)
|
||||
- **Templating**: fixes variables not being interpolated after dashboard refresh. [#25698](https://github.com/grafana/grafana/pull/25698), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Units**: Custom unit suffix and docs for custom units. [#25710](https://github.com/grafana/grafana/pull/25710), [@torkelo](https://github.com/torkelo)
|
||||
- **ValueFormats**: Fix byte-format data rates. [#25424](https://github.com/grafana/grafana/pull/25424), [@mueslo](https://github.com/mueslo)
|
||||
- **Variables**: Fixes maximum call stack bug for empty value. [#25503](https://github.com/grafana/grafana/pull/25503), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
|
||||
### Security fixes
|
||||
- **Graph**: Fix XSS vulnerability with series overrides [#25401](https://github.com/grafana/grafana/pull/25401). Thanks to Rotem Reiss for reporting this.
|
||||
|
||||
# 7.0.5 (2020-06-30)
|
||||
|
||||
### Bug Fixes
|
||||
@@ -550,7 +184,7 @@ We have also extended the time zone options so you can select any of the standar
|
||||
- **Dashboard**: Fix for strange "dashboard not found" errors when opening links in dashboard settings. [#24416](https://github.com/grafana/grafana/pull/24416), [@torkelo](https://github.com/torkelo)
|
||||
- **Dashboard**: Fix so default data source is selected when data source can't be found in panel editor. [#24526](https://github.com/grafana/grafana/pull/24526), [@mckn](https://github.com/mckn)
|
||||
- **Dashboard**: Fixed issue changing a panel from transparent back to normal in panel editor. [#24483](https://github.com/grafana/grafana/pull/24483), [@torkelo](https://github.com/torkelo)
|
||||
- **Dashboard**: Make header names reflect the field name when exporting to CSV file from the panel inspector. [#24624](https://github.com/grafana/grafana/pull/24624), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **Dashboard**: Make header names reflect the field name when exporting to CSV file from the the panel inspector. [#24624](https://github.com/grafana/grafana/pull/24624), [@peterholmberg](https://github.com/peterholmberg)
|
||||
- **Dashboard**: Make sure side pane is displayed with tabs by default in panel editor. [#24636](https://github.com/grafana/grafana/pull/24636), [@dprokop](https://github.com/dprokop)
|
||||
- **Data source**: Fix query/annotation help content formatting. [#24687](https://github.com/grafana/grafana/pull/24687), [@AgnesToulet](https://github.com/AgnesToulet)
|
||||
- **Data source**: Fixes async mount errors. [#24579](https://github.com/grafana/grafana/pull/24579), [@Estrax](https://github.com/Estrax)
|
||||
@@ -2261,7 +1895,7 @@ See [security announcement](https://community.grafana.com/t/grafana-5-3-3-and-4-
|
||||
- **Docker**: Make it possible to set a specific plugin url [#12861](https://github.com/grafana/grafana/pull/12861), thx [ClementGautier](https://github.com/ClementGautier)
|
||||
- **GrafanaCli**: Fixed issue with grafana-cli install plugin resulting in corrupt http response from source error. Fixes [#13079](https://github.com/grafana/grafana/issues/13079)
|
||||
- **Provisioning**: Should allow one default data source per organization [#12229](https://github.com/grafana/grafana/issues/12229)
|
||||
- **GitHub OAuth**: Allow changes of user info at GitHub to be synched to Grafana when signing in [#11818](https://github.com/grafana/grafana/issues/11818), thx [@rwaweber](https://github.com/rwaweber)
|
||||
- **Github OAuth**: Allow changes of user info at Github to be synched to Grafana when signing in [#11818](https://github.com/grafana/grafana/issues/11818), thx [@rwaweber](https://github.com/rwaweber)
|
||||
- **OAuth**: Fix overriding tls_skip_verify_insecure using environment variable [#12747](https://github.com/grafana/grafana/issues/12747), thx [@jangaraj](https://github.com/jangaraj)
|
||||
- **Prometheus**: Fix graph panel bar width issue in aligned prometheus queries [#12379](https://github.com/grafana/grafana/issues/12379)
|
||||
- **Prometheus**: Heatmap - fix unhandled error when some points are missing [#12484](https://github.com/grafana/grafana/issues/12484)
|
||||
@@ -2576,7 +2210,7 @@ See [security announcement](https://community.grafana.com/t/grafana-5-2-3-and-4-
|
||||
|
||||
### Fixes
|
||||
|
||||
- **oauth** Fix GitHub OAuth not working with private Organizations [#11028](https://github.com/grafana/grafana/pull/11028) [@lostick](https://github.com/lostick)
|
||||
- **oauth** Fix Github OAuth not working with private Organizations [#11028](https://github.com/grafana/grafana/pull/11028) [@lostick](https://github.com/lostick)
|
||||
- **kiosk** white area over bottom panels in kiosk mode [#11010](https://github.com/grafana/grafana/issues/11010)
|
||||
- **alerting** Fix OK state doesn't show up in Microsoft Teams [#11032](https://github.com/grafana/grafana/pull/11032), thx [@manacker](https://github.com/manacker)
|
||||
|
||||
@@ -2588,7 +2222,7 @@ See [security announcement](https://community.grafana.com/t/grafana-5-2-3-and-4-
|
||||
- **Folders** Make it easier/explicit to access/modify folders using the API [#10630](https://github.com/grafana/grafana/issues/10630)
|
||||
- **Dashboard** Scrollbar works incorrectly in Grafana 5.0 Beta4 in some cases [#10982](https://github.com/grafana/grafana/issues/10982)
|
||||
- **ElasticSearch** Custom aggregation sizes no longer allowed for Elasticsearch [#10124](https://github.com/grafana/grafana/issues/10124)
|
||||
- **oauth** GitHub OAuth with allowed organizations fails to login [#10964](https://github.com/grafana/grafana/issues/10964)
|
||||
- **oauth** Github OAuth with allowed organizations fails to login [#10964](https://github.com/grafana/grafana/issues/10964)
|
||||
- **heatmap** Heatmap panel has partially hidden legend [#10793](https://github.com/grafana/grafana/issues/10793)
|
||||
- **snapshots** Expired snapshots not being cleaned up [#10996](https://github.com/grafana/grafana/pull/10996)
|
||||
|
||||
@@ -2621,7 +2255,7 @@ See [security announcement](https://community.grafana.com/t/grafana-5-2-3-and-4-
|
||||
- **Light theme** Fixed problem with light theme in safari, [#10869](https://github.com/grafana/grafana/issues/10869)
|
||||
- **Provisioning** Now handles deletes when dashboard json files removed from disk [#10865](https://github.com/grafana/grafana/issues/10865)
|
||||
- **MySQL** Fixed issue with schema migration on old mysql (index too long) [#10779](https://github.com/grafana/grafana/issues/10779)
|
||||
- **GitHub OAuth** Fixed fetching github orgs from private github org [#10823](https://github.com/grafana/grafana/issues/10823)
|
||||
- **Github OAuth** Fixed fetching github orgs from private github org [#10823](https://github.com/grafana/grafana/issues/10823)
|
||||
- **Embedding** Fixed issues embedding panel [#10787](https://github.com/grafana/grafana/issues/10787)
|
||||
|
||||
# 5.0.0-beta1 (2018-02-05)
|
||||
@@ -2680,7 +2314,7 @@ Dashboard panels and rows are positioned using a gridPos object `{x: 0, y: 0, w:
|
||||
- **Dashboard**: Make it possible to start dashboards from search and dashboard list panel [#1871](https://github.com/grafana/grafana/issues/1871)
|
||||
- **Annotations**: Posting annotations now return the id of the annotation [#9798](https://github.com/grafana/grafana/issues/9798)
|
||||
- **Systemd**: Use systemd notification ready flag [#10024](https://github.com/grafana/grafana/issues/10024), thx [@jgrassler](https://github.com/jgrassler)
|
||||
- **GitHub**: Use organizations_url provided from github to verify user belongs in org. [#10111](https://github.com/grafana/grafana/issues/10111), thx
|
||||
- **Github**: Use organizations_url provided from github to verify user belongs in org. [#10111](https://github.com/grafana/grafana/issues/10111), thx
|
||||
[@adiletmaratov](https://github.com/adiletmaratov)
|
||||
- **Backend**: Fixed bug where Grafana exited before all sub routines where finished [#10131](https://github.com/grafana/grafana/issues/10131)
|
||||
- **Azure**: Adds support for Azure blob storage as external image stor [#8955](https://github.com/grafana/grafana/issues/8955), thx [@saada](https://github.com/saada)
|
||||
@@ -2860,7 +2494,7 @@ See [security announcement](https://community.grafana.com/t/grafana-5-2-3-and-4-
|
||||
- **Graphite**: Calls to Graphite api /metrics/find now include panel or dashboard time range (from & until) in most cases, [#8055](https://github.com/grafana/grafana/issues/8055)
|
||||
- **Graphite**: Added new graphite 1.0 functions, available if you set version to 1.0.x in data source settings. New Functions: mapSeries, reduceSeries, isNonNull, groupByNodes, offsetToZero, grep, weightedAverage, removeEmptySeries, aggregateLine, averageOutsidePercentile, delay, exponentialMovingAverage, fallbackSeries, integralByInterval, interpolate, invert, linearRegression, movingMin, movingMax, movingSum, multiplySeriesWithWildcards, pow, powSeries, removeBetweenPercentile, squareRoot, timeSlice, closes [#8261](https://github.com/grafana/grafana/issues/8261)
|
||||
|
||||
- **Elasticsearch**: Ad-hoc filters now use query phrase match filters instead of term filters, works on non keyword/raw fields [#9095](https://github.com/grafana/grafana/issues/9095).
|
||||
* **Elasticsearch**: Ad-hoc filters now use query phrase match filters instead of term filters, works on non keyword/raw fields [#9095](https://github.com/grafana/grafana/issues/9095).
|
||||
|
||||
### Breaking change
|
||||
|
||||
@@ -3687,8 +3321,8 @@ Grunt & Watch tasks:
|
||||
|
||||
- [Issue #2218](https://github.com/grafana/grafana/issues/2218). Auth: You can now authenticate against api with username / password using basic auth
|
||||
- [Issue #2095](https://github.com/grafana/grafana/issues/2095). Search: Search now supports filtering by multiple dashboard tags
|
||||
- [Issue #1905](https://github.com/grafana/grafana/issues/1905). GitHub OAuth: You can now configure a GitHub team membership requirement, thx @dewski
|
||||
- [Issue #2052](https://github.com/grafana/grafana/issues/2052). GitHub OAuth: You can now configure a GitHub organization requirement, thx @indrekj
|
||||
- [Issue #1905](https://github.com/grafana/grafana/issues/1905). Github OAuth: You can now configure a Github team membership requirement, thx @dewski
|
||||
- [Issue #2052](https://github.com/grafana/grafana/issues/2052). Github OAuth: You can now configure a Github organization requirement, thx @indrekj
|
||||
- [Issue #1891](https://github.com/grafana/grafana/issues/1891). Security: New config option to disable the use of gravatar for profile images
|
||||
- [Issue #1921](https://github.com/grafana/grafana/issues/1921). Auth: Support for user authentication via reverse proxy header (like X-Authenticated-User, or X-WEBAUTH-USER)
|
||||
- [Issue #960](https://github.com/grafana/grafana/issues/960). Search: Backend can now index a folder with json files, will be available in search (saving back to folder is not supported, this feature is meant for static generated json dashboards)
|
||||
@@ -3730,7 +3364,7 @@ Grunt & Watch tasks:
|
||||
- [Issue #1749](https://github.com/grafana/grafana/issues/1749). Graph Panel: Table legends are now visible when rendered to PNG
|
||||
- [Issue #1786](https://github.com/grafana/grafana/issues/1786). Graph Panel: Legend in table mode now aligns, graph area is reduced depending on how many series
|
||||
- [Issue #1734](https://github.com/grafana/grafana/issues/1734). Support for unicode / international characters in dashboard title (improved slugify)
|
||||
- [Issue #1782](https://github.com/grafana/grafana/issues/1782). GitHub OAuth: Now works with GitHub for Enterprise, thanks @williamjoy
|
||||
- [Issue #1782](https://github.com/grafana/grafana/issues/1782). Github OAuth: Now works with Github for Enterprise, thanks @williamjoy
|
||||
- [Issue #1780](https://github.com/grafana/grafana/issues/1780). Dashboard snapshot: Should not require login to view snapshot, Fixes #1780
|
||||
|
||||
# 2.0.0-Beta3 (2015-04-12)
|
||||
|
||||
@@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo
|
||||
|
||||
Examples of behavior that contributes to creating a positive environment include:
|
||||
|
||||
- Using welcoming and inclusive language
|
||||
- Being respectful of differing viewpoints and experiences
|
||||
- Gracefully accepting constructive criticism
|
||||
- Focusing on what is best for the community
|
||||
- Showing empathy towards other community members
|
||||
* Using welcoming and inclusive language
|
||||
* Being respectful of differing viewpoints and experiences
|
||||
* Gracefully accepting constructive criticism
|
||||
* Focusing on what is best for the community
|
||||
* Showing empathy towards other community members
|
||||
|
||||
Examples of unacceptable behavior by participants include:
|
||||
|
||||
- The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
- Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
* The use of sexualized language or imagery and unwelcome sexual attention or advances
|
||||
* Trolling, insulting/derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or electronic address, without explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Our Responsibilities
|
||||
|
||||
@@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at conduct@grafana.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@grafana.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
|
||||
|
||||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
|
||||
|
||||
|
||||
@@ -65,4 +65,3 @@ Before we can accept your pull request, you need to [sign our CLA](https://grafa
|
||||
- Set up your [development environment](contribute/developer-guide.md).
|
||||
- Learn how to [contribute documentation](contribute/documentation.md).
|
||||
- Get started [developing plugins](https://grafana.com/docs/grafana/latest/developers/plugins/) for Grafana.
|
||||
- Look through the resources in the [contribute](https://github.com/grafana/grafana/tree/master/contribute) folder.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM node:12.19.0-alpine3.12 as js-builder
|
||||
FROM node:12.18.1-alpine3.12 as js-builder
|
||||
|
||||
WORKDIR /usr/src/app/
|
||||
|
||||
@@ -16,7 +16,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN ./node_modules/.bin/grunt build
|
||||
|
||||
FROM golang:1.15.1-alpine3.12 as go-builder
|
||||
FROM golang:1.14.4-alpine3.12 as go-builder
|
||||
|
||||
RUN apk add --no-cache gcc g++
|
||||
|
||||
@@ -50,7 +50,7 @@ ENV PATH="/usr/share/grafana/bin:$PATH" \
|
||||
WORKDIR $GF_PATHS_HOME
|
||||
|
||||
RUN apk add --no-cache ca-certificates bash tzdata && \
|
||||
apk add --no-cache openssl musl-utils
|
||||
apk add --no-cache --upgrade openssl musl-utils
|
||||
|
||||
COPY conf ./conf
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FROM node:12.19.0-slim AS js-builder
|
||||
FROM node:12.16.3-slim AS js-builder
|
||||
|
||||
WORKDIR /usr/src/app/
|
||||
|
||||
@@ -16,7 +16,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN ./node_modules/.bin/grunt build
|
||||
|
||||
FROM golang:1.15.1 AS go-builder
|
||||
FROM golang:1.14.2 AS go-builder
|
||||
|
||||
WORKDIR /src/grafana
|
||||
|
||||
@@ -50,7 +50,7 @@ WORKDIR $GF_PATHS_HOME
|
||||
COPY conf conf
|
||||
|
||||
# curl should be part of the image
|
||||
RUN apt-get update && apt-get install -y ca-certificates curl
|
||||
RUN apt-get update && apt-get upgrade -y && apt-get install -y ca-certificates curl
|
||||
|
||||
RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
|
||||
addgroup --system --gid $GF_GID grafana && \
|
||||
@@ -66,6 +66,7 @@ RUN mkdir -p "$GF_PATHS_HOME/.aws" && \
|
||||
chown -R grafana:grafana "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING" && \
|
||||
chmod -R 777 "$GF_PATHS_DATA" "$GF_PATHS_HOME/.aws" "$GF_PATHS_LOGS" "$GF_PATHS_PLUGINS" "$GF_PATHS_PROVISIONING"
|
||||
|
||||
|
||||
COPY --from=go-builder /src/grafana/bin/linux-amd64/grafana-server /src/grafana/bin/linux-amd64/grafana-cli bin/
|
||||
COPY --from=js-builder /usr/src/app/public public
|
||||
COPY --from=js-builder /usr/src/app/tools tools
|
||||
|
||||
@@ -66,7 +66,6 @@ In case a member leaves, the [offboarding](#offboarding) procedure is applied.
|
||||
The current team members are:
|
||||
|
||||
- Alexander Zobnin ([Grafana Labs](https://grafana.com/))
|
||||
- Alex Khomenko ([Grafana Labs](https://grafana.com/))
|
||||
- Andrej Ocenas ([Grafana Labs](https://grafana.com/))
|
||||
- Arve Knudsen ([Grafana Labs](https://grafana.com/))
|
||||
- Brian Gann ([Grafana Labs](https://grafana.com/))
|
||||
@@ -78,7 +77,6 @@ The current team members are:
|
||||
- Diana Sarlinska ([Grafana Labs](https://grafana.com/))
|
||||
- Dominik Prokop ([Grafana Labs](https://grafana.com/))
|
||||
- Emil Tullstedt ([Grafana Labs](https://grafana.com/))
|
||||
- Fredrik Enestad ([Soundtrack Your Brand](https://www.soundtrackyourbrand.com/))
|
||||
- Hugo Häggmark ([Grafana Labs](https://grafana.com/))
|
||||
- Ivana Huckova ([Grafana Labs](https://grafana.com/))
|
||||
- Jeroen Op 't Eynde ([Grafana Labs](https://grafana.com/))
|
||||
|
||||
18
Gruntfile.js
18
Gruntfile.js
@@ -1,5 +1,5 @@
|
||||
'use strict';
|
||||
module.exports = function(grunt) {
|
||||
module.exports = function (grunt) {
|
||||
var os = require('os');
|
||||
var config = {
|
||||
pkg: grunt.file.readJSON('package.json'),
|
||||
@@ -47,20 +47,18 @@ module.exports = function(grunt) {
|
||||
|
||||
// Utility function to load plugin settings into config
|
||||
function loadConfig(config, path) {
|
||||
require('glob')
|
||||
.sync('*', { cwd: path })
|
||||
.forEach(function(option) {
|
||||
var key = option.replace(/\.js$/, '');
|
||||
// If key already exists, extend it. It is your responsibility to avoid naming collisions
|
||||
config[key] = config[key] || {};
|
||||
grunt.util._.extend(config[key], require(path + option)(config, grunt));
|
||||
});
|
||||
require('glob').sync('*', {cwd: path}).forEach(function(option) {
|
||||
var key = option.replace(/\.js$/,'');
|
||||
// If key already exists, extend it. It is your responsibility to avoid naming collisions
|
||||
config[key] = config[key] || {};
|
||||
grunt.util._.extend(config[key], require(path + option)(config,grunt));
|
||||
});
|
||||
// technically not required
|
||||
return config;
|
||||
}
|
||||
|
||||
// Merge that object with what with whatever we have here
|
||||
loadConfig(config, './scripts/grunt/options/');
|
||||
loadConfig(config,'./scripts/grunt/options/');
|
||||
// pass the config to grunt
|
||||
grunt.initConfig(config);
|
||||
};
|
||||
|
||||
110
ISSUE_TRIAGE.md
110
ISSUE_TRIAGE.md
@@ -2,16 +2,16 @@
|
||||
|
||||
The main goal of issue triage is to categorize all incoming Grafana issues and make sure each issue has all basic information needed for anyone else to understand and be able to start working on it.
|
||||
|
||||
> **Note:** This information is for Grafana project Maintainers, Owners, and Admins. If you are a Contributor, then you will not be able to perform most of the tasks in this topic.
|
||||
**Note:** This information is for Grafana project Maintainers, Owners, and Admins. If you are a Contributor, then you will not be able to perform most of the tasks in this topic.
|
||||
|
||||
The core maintainers of the Grafana project are responsible for categorizing all incoming issues and delegating any critical or important issue to other maintainers. Currently one maintainer each week is responsible. Besides that part, triage provides an important way to contribute to an open source project.
|
||||
|
||||
Triage helps ensure issues resolve quickly by:
|
||||
|
||||
- Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for an issue to explain how an end user experiences a problem and what actions they took.
|
||||
- Giving a contributor the information they need before they commit to resolving an issue.
|
||||
- Lowering the issue count by preventing duplicate issues.
|
||||
- Streamlining the development process by preventing duplicate discussions.
|
||||
* Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for an issue to explain how an end user experiences a problem and what actions they took.
|
||||
* Giving a contributor the information they need before they commit to resolving an issue.
|
||||
* Lowering the issue count by preventing duplicate issues.
|
||||
* Streamlining the development process by preventing duplicate discussions.
|
||||
|
||||
If you don't have the knowledge or time to code, consider helping with triage. The community will thank you for saving them time by spending some of yours.
|
||||
|
||||
@@ -32,7 +32,7 @@ If you don't have the knowledge or time to code, consider helping with triage. T
|
||||
| | |
|
||||
+------+-------+-------------+ +------------+---------+ +----------------------------+
|
||||
| | | | | |
|
||||
| label: needs more info | | Needs investigation? +--YES---+ label: needs investigation |
|
||||
| label: needs more details | | Needs investigation? +--YES---+ label: needs investigation |
|
||||
| | | | | |
|
||||
+----------------------------+ +----------------+-----+ +--------------+-------------+
|
||||
NO | |
|
||||
@@ -82,7 +82,7 @@ Before triaging an issue very far, make sure that the issue's author provided th
|
||||
|
||||
Given a certain [issue template]([template](https://github.com/grafana/grafana/issues/new/choose)) have been used by the issue author or depending how the issue is perceived by the issue triage responsible, the following should help you understand what standard issue information that must be included.
|
||||
|
||||
#### Bug reports
|
||||
#### Bug report?
|
||||
|
||||
Should explain what happened, what was expected and how to reproduce it together with any additional information that may help giving a complete picture of what happened such as screenshots, [query inspector](https://community.grafana.com/t/using-grafanas-query-inspector-to-troubleshoot-issues/2630) output and any environment related information that's applicable and/or maybe related to the reported problem:
|
||||
- Grafana version
|
||||
@@ -96,15 +96,15 @@ Should explain what happened, what was expected and how to reproduce it together
|
||||
- Non-default configuration settings
|
||||
- Development environment like Go and Node versions, if applicable
|
||||
|
||||
#### Enhancement requests
|
||||
#### Enhancement request?
|
||||
|
||||
Should explain what enhancement or feature that the author wants to be added and why that is needed.
|
||||
|
||||
#### Accessibility issues
|
||||
#### Accessibility issue?
|
||||
|
||||
This is a mix between a bug report and enhancement request but focused on accessibility issues to help make Grafana improve keyboard navigation, screen-reader support and being accessible to everyone. The report should include relevant WCAG criteria, if applicable.
|
||||
|
||||
#### Support requests
|
||||
#### Support request?
|
||||
|
||||
In general, if the issue description and title is perceived as a question no more information is needed.
|
||||
|
||||
@@ -112,11 +112,11 @@ In general, if the issue description and title is perceived as a question no mor
|
||||
|
||||
To make it easier for everyone to understand and find issues they're searching for it's suggested as a general rule of thumbs to:
|
||||
|
||||
- Make sure that issue titles are named to explain the subject of the issue, has a correct spelling and doesn't include irrelevant information and/or sensitive information.
|
||||
- Make sure that issue descriptions doesn't include irrelevant information, information from template that haven't been filled out and/or sensitive information.
|
||||
- Do your best effort to change title and description or request suggested changes by adding a comment.
|
||||
* Make sure that issue titles are named to explain the subject of the issue, has a correct spelling and doesn't include irrelevant information and/or sensitive information.
|
||||
* Make sure that issue descriptions doesn't include irrelevant information, information from template that haven't been filled out and/or sensitive information.
|
||||
* Do your best effort to change title and description or request suggested changes by adding a comment.
|
||||
|
||||
> **Note:** Above rules is applicable to both new and existing issues of the Grafana project.
|
||||
Note: Above rules is applicable to both new and existing issues of the Grafana project.
|
||||
|
||||
### Do you have all the information needed to categorize an issue?
|
||||
|
||||
@@ -137,28 +137,29 @@ An issue can have multiple of the following labels. Typically, a properly catego
|
||||
- One label identifying its type (`type/*`).
|
||||
- One or multiple labels identifying the functional areas of interest or component (`area/*`) and/or data source (`datasource/*`), if applicable.
|
||||
|
||||
| Label | Description |
|
||||
| ------------------------ | ------------------------------------------------------------------------- |
|
||||
| `type/bug` | A feature isn't working as expected given design or documentation. |
|
||||
| `type/feature-request` | Request for a new feature or enhancement. |
|
||||
| `type/docs` | Documentation problem or enhancement. |
|
||||
| `type/accessibility` | Accessibility problem or enhancement. |
|
||||
| `type/question` | Issue is a question or is perceived as such. |
|
||||
| `type/duplicate` | An existing issue of the same subject/request have already been reported. |
|
||||
| `type/works-as-intended` | A reported bug works as intended/by design. |
|
||||
| `type/build-packaging` | Build or packaging problem or enhancement. |
|
||||
| `area/*` | Subject is related to a functional area of interest or component. |
|
||||
| `datasource/*` | Subject is related to a core data source plugin. |
|
||||
Label | Description
|
||||
------- | --------
|
||||
`type/bug` | A feature isn't working as expected given design or documentation.
|
||||
`type/feature-request` | Request for a new feature or enhancement.
|
||||
`type/docs` | Documentation problem or enhancement.
|
||||
`type/accessibility` | Accessibility problem or enhancement.
|
||||
`type/question` | Issue is a question or is perceived as such.
|
||||
`type/duplicate` | An existing issue of the same subject/request have already been reported.
|
||||
`type/works-as-intended` | A reported bug works as intended/by design.
|
||||
`type/build-packaging` | Build or packaging problem or enhancement.
|
||||
`area/*` | Subject is related to a functional area of interest or component.
|
||||
`datasource/*` | Subject is related to a core data source plugin.
|
||||
|
||||
### Duplicate issues
|
||||
### Duplicate issue?
|
||||
|
||||
Make sure it's not a duplicate by searching existing issues using related terms from the issue title and description. If you think you know there is an existing issue, but can't find it, please reach out to one of the maintainers and ask for help. If you identify that the issue is a duplicate of an existing issue:
|
||||
|
||||
1. Add a comment `/duplicate of #<issue number>`. GitHub will recognize this and add some additional context to the issue activity.
|
||||
2. The Grafana bot will do the rest, adding the correct label and closing comment
|
||||
1. Add a comment `Duplicate of #<issue number>`. GitHub will recognize this and add some additional context to the issue activity.
|
||||
2. Close the issue and label it with `type/duplicate`.
|
||||
3. Optionally add any related `area/*` or `datasource/*` labels.
|
||||
4. If applicable, add a comment with additional information.
|
||||
|
||||
### Bug reports
|
||||
### Bug report?
|
||||
|
||||
If it's not perfectly clear that it's an actual bug, quickly try to reproduce it.
|
||||
|
||||
@@ -203,11 +204,11 @@ There's a minor typo/error/lack of information that adds a lot of confusion for
|
||||
1. Label the issue with `help wanted` and `beginner friendly`, if applicable, to signal that we find this important to fix and we would appreciate any help we can get from the community.
|
||||
2. Move on to [prioritizing the issue](#4-prioritization-of-issues).
|
||||
|
||||
### Accessibility issues
|
||||
### Accessibility issue?
|
||||
|
||||
1. Label the issue `type/accessibility` and at least one `area/*` or `datasource/*` label.
|
||||
|
||||
### Support requests
|
||||
### Support request?
|
||||
|
||||
1. Kindly and politely direct the issue author to the [community site](https://community.grafana.com/) and explain that GitHub is mainly used for tracking bugs and feature requests. If possible, it's usually a good idea to add some pointers to the issue author's question.
|
||||
2. Close the issue and label it with `type/question`.
|
||||
@@ -222,17 +223,17 @@ The key here is asking for help and discuss issues to understand how more experi
|
||||
|
||||
In case there is an uncertainty around the prioritization of an issue, please ask the maintainers for help.
|
||||
|
||||
| Label | Description |
|
||||
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `priority/critical` | Highest priority. Must be actively worked on as someone's top priority right now. |
|
||||
| `priority/support-subscription` | This is important for one or several customers having a paid Grafana support subscription. |
|
||||
| `priority/important-soon` | Must be staffed and worked on either currently, or very soon, ideally in time for the next release. |
|
||||
| `priority/important-longterm` | Important over the long term, but may not be staffed and/or may need multiple releases to complete. |
|
||||
| `priority/nice-to-have` | It's a good idea, but not scheduled for any release. |
|
||||
| `priority/awaiting-more-evidence` | Lowest priority. Possibly useful, but not yet enough interest in it. |
|
||||
| `priority/unscheduled` | Something to look into before and to be discussed during the planning of the next (upcoming) major/minor stable release. |
|
||||
Label | Description
|
||||
------- | --------
|
||||
`priority/critical` | Highest priority. Must be actively worked on as someone's top priority right now.
|
||||
`priority/support-subscription` | This is important for one or several customers having a paid Grafana support subscription.
|
||||
`priority/important-soon` | Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
|
||||
`priority/important-longterm` | Important over the long term, but may not be staffed and/or may need multiple releases to complete.
|
||||
`priority/nice-to-have` | It's a good idea, but not scheduled for any release.
|
||||
`priority/awaiting-more-evidence` | Lowest priority. Possibly useful, but not yet enough interest in it.
|
||||
`priority/unscheduled` | Something to look into before and to be discussed during the planning of the next (upcoming) major/minor stable release.
|
||||
|
||||
**Critical bugs**
|
||||
**Critical bug?**
|
||||
|
||||
1. If a bug has been categorized and any of the following criteria apply, the bug should be labeled as critical and must be actively worked on as someone's top priority right now.
|
||||
|
||||
@@ -247,7 +248,7 @@ In case there is an uncertainty around the prioritization of an issue, please as
|
||||
5. Escalate the problem to the maintainers.
|
||||
6. Assign or ask a maintainer for help assigning someone to make this issue their top priority right now.
|
||||
|
||||
**Important short-term**
|
||||
**Important short-term?**
|
||||
|
||||
1. Label the issue `priority/important-soon`.
|
||||
2. If applicable, label the issue `priority/support-subscription`.
|
||||
@@ -255,12 +256,12 @@ In case there is an uncertainty around the prioritization of an issue, please as
|
||||
4. Make sure to add the issue to a suitable backlog of a GitHub project and prioritize it or assign someone to work on it now or very soon.
|
||||
5. Consider requesting [help from the community](#5-requesting-help-from-the-community), even though it may be problematic given a short amount of time until it should be released.
|
||||
|
||||
**Important long-term**
|
||||
**Important long-term?**
|
||||
|
||||
1. Label the issue `priority/important-longterm`.
|
||||
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
|
||||
|
||||
**Nice to have**
|
||||
**Nice to have?**
|
||||
|
||||
1. Label the issue `priority/nice-to-have`.
|
||||
2. Consider requesting [help from the community](#5-requesting-help-from-the-community).
|
||||
@@ -283,7 +284,7 @@ In many cases the issue author or community as a whole is more suitable to contr
|
||||
- Alert notifiers
|
||||
|
||||
1. Kindly and politely add a comment to signal to users subscribed to updates of the issue.
|
||||
- Explain that the issue would be nice to get resolved, but it isn't prioritized to work on by maintainers for an unforeseen future.
|
||||
- Explain that the issue would be nice to get resolved, but it isn't prioritized to work on by maintainers for an unforseen future.
|
||||
- If possible or applicable, try to help contributors getting starting by adding pointers and references to what code/files need to be changed and/or ideas of a good way to solve/implement the issue.
|
||||
2. Label the issue with `help wanted`.
|
||||
3. If applicable, label the issue with `beginner friendly` to denote that the issue is suitable for a beginner to work on.
|
||||
@@ -299,13 +300,6 @@ For some other combinations it may not be possible at all for a maintainer to se
|
||||
|
||||
Even if you don't have the time or knowledge to investigate an issue we highly recommend that you [upvote](https://help.github.com/en/articles/about-conversations-on-github#reacting-to-ideas-in-comments) the issue if you happen to have the same problem. If you have further details that may help investigating the issue please provide as much information as possible.
|
||||
|
||||
## Automation
|
||||
|
||||
We have some automation that triggers on comments or labels being added to issues. Many of these automated behaviors are defined in [commands.json](https://github.com/grafana/grafana/blob/master/.github/commands.json). Or in other [GitHub Actions](https://github.com/grafana/grafana/tree/master/.github/workflows)
|
||||
|
||||
* Add /duplicate `#<issue number>` to have Grafana label & close issue with an appropriate message.
|
||||
* Add `type/question` and the bot will close it with an appropriate message.
|
||||
|
||||
## External PRs
|
||||
|
||||
Part of issue triage should also be triaging of external PRs. Main goal should be to make sure PRs from external contributors have an owner/reviewer and are not forgotten.
|
||||
@@ -333,14 +327,14 @@ This will give you a structure of labels in the sidebar similar to the following
|
||||
```
|
||||
- Inbox
|
||||
...
|
||||
- GitHub (mine)
|
||||
- Github (mine)
|
||||
- activity
|
||||
- assigned
|
||||
- mentions
|
||||
- GitHub (other)
|
||||
- Github (other)
|
||||
- Grafana
|
||||
```
|
||||
|
||||
- All notifications you’ll need to read/take action on show up as unread in GitHub (mine) and its sub-labels.
|
||||
- All other notifications you don’t need to take action on show up as unread in GitHub (other) and its sub-labels
|
||||
- This is convenient for issue triage and to follow the activity in the Grafana project.
|
||||
* All notifications you’ll need to read/take action on show up as unread in Github (mine) and its sub-labels.
|
||||
* All other notifications you don’t need to take action on show up as unread in Github (other) and its sub-labels
|
||||
* This is convenient for issue triage and to follow the activity in the Grafana project.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@torkelo is the main/default maintainer, some parts of the codebase have other maintainers:
|
||||
|
||||
- Backend:
|
||||
- @bergquist
|
||||
- Plugins:
|
||||
- @ryantxu
|
||||
- UX/UI:
|
||||
- @davkal
|
||||
* Backend:
|
||||
* @bergquist
|
||||
* Plugins:
|
||||
* @ryantxu
|
||||
* UX/UI:
|
||||
* @davkal
|
||||
|
||||
19
Makefile
19
Makefile
@@ -4,7 +4,7 @@
|
||||
|
||||
-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 revive golangci-lint tidy-check test-go test-js test run run-frontend clean devenv devenv-down revive-strict protobuf help
|
||||
.PHONY: all deps-go deps-js deps build-go build-server build-cli build-js build build-docker-dev build-docker-full lint-go revive golangci-lint test-go test-js test run run-frontend clean devenv devenv-down revive-strict protobuf help
|
||||
|
||||
GO = GO111MODULE=on go
|
||||
GO_FILES ?= ./pkg/...
|
||||
@@ -83,7 +83,16 @@ revive: scripts/go/bin/revive
|
||||
|
||||
revive-strict: scripts/go/bin/revive
|
||||
@echo "lint via revive (strict)"
|
||||
@scripts/revive-strict scripts/go/bin/revive
|
||||
@scripts/go/bin/revive \
|
||||
-formatter stylish \
|
||||
-config ./scripts/go/configs/revive-strict.toml \
|
||||
-exclude ./pkg/plugins/backendplugin/pluginextensionv2/... \
|
||||
./pkg/services/alerting/... \
|
||||
./pkg/services/provisioning/datasources/... \
|
||||
./pkg/services/provisioning/dashboards/... \
|
||||
./pkg/services/provisioning/notifiers/... \
|
||||
./pkg/services/provisioning/values/... \
|
||||
./pkg/plugins/backendplugin/...
|
||||
|
||||
scripts/go/bin/golangci-lint: scripts/go/go.mod
|
||||
@cd scripts/go; \
|
||||
@@ -95,11 +104,7 @@ golangci-lint: scripts/go/bin/golangci-lint
|
||||
--config ./scripts/go/configs/.golangci.toml \
|
||||
$(GO_FILES)
|
||||
|
||||
tidy-check:
|
||||
@echo "check whether go.mod and go.sum are consistent"
|
||||
@scripts/tidy-check.sh
|
||||
|
||||
lint-go: golangci-lint revive revive-strict tidy-check # Run all code checks for backend.
|
||||
lint-go: golangci-lint revive revive-strict # Run all code checks for backend.
|
||||
|
||||
# with disabled SC1071 we are ignored some TCL,Expect `/usr/bin/env expect` scripts
|
||||
shellcheck: $(SH_FILES) ## Run checks for shell scripts.
|
||||
|
||||
@@ -20,7 +20,7 @@ Upgrading Go or Node.js requires making changes in many different files. See bel
|
||||
|
||||
The Grafana project uses [Go modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) to manage dependencies on external packages. This requires a working Go environment with version 1.11 or greater installed.
|
||||
|
||||
> **Note:** Since most developers of Grafana still use the `GOPATH` we need to specify `GO111MODULE=on` to make `go mod` and `got get` work as intended. If you have setup Grafana outside of the `GOPATH` on your machine you can skip `GO111MODULE=on` when running the commands below.
|
||||
_Note:_ Since most developers of Grafana still use the `GOPATH` we need to specify `GO111MODULE=on` to make `go mod` and `got get` work as intended. If you have setup Grafana outside of the `GOPATH` on your machine you can skip `GO111MODULE=on` when running the commands below.
|
||||
|
||||
To add or update a new dependency, use the `go get` command:
|
||||
|
||||
|
||||
46
WORKFLOW.md
46
WORKFLOW.md
@@ -13,10 +13,10 @@ Team members and their access to repositories is maintained through [GitHub team
|
||||
## Proposing changes
|
||||
|
||||
Examples of proposed changes are overarching architecture, component design, and specific code or graphical elements. Proposed changes SHOULD cover the big picture and intention, but individual parts SHOULD be split into the smallest possible changes. Changes SHOULD be based on and target the master branch. Depending on size of the proposed change, each change SHOULD be discussed, in increasing order of change size and complexity:
|
||||
- Directly in a RR (Pull Request) - this MAY be done, but SHOULD not be the common case.
|
||||
- Issue
|
||||
- Developer mailing list
|
||||
- Design document, shared via Google Docs, accessible to at least all team members.
|
||||
* Directly in a RR (Pull Request) - this MAY be done, but SHOULD not be the common case.
|
||||
* Issue
|
||||
* Developer mailing list
|
||||
* Design document, shared via Google Docs, accessible to at least all team members.
|
||||
|
||||
Significant changes MUST be discussed and agreed upon with the relevant subsystem maintainers.
|
||||
|
||||
@@ -24,17 +24,17 @@ Significant changes MUST be discussed and agreed upon with the relevant subsyste
|
||||
|
||||
Depending on the size and complexity of a PR, different requirements MUST be applied. Any team member contributing substantially to a PR MUST NOT count against review requirements.
|
||||
Commits MUST be merged into master using PRs. They MUST NOT be merged into master directly.
|
||||
- Every merge MUST be approved by at least one team member.
|
||||
- Non-trivial changes MUST be approved by at least
|
||||
- two team members, or
|
||||
- one subsystem maintainer.
|
||||
- Significant changes MUST be approved by at least
|
||||
- two team members, AND
|
||||
- the relevant subsystem maintainer.
|
||||
* Every merge MUST be approved by at least one team member.
|
||||
* Non-trivial changes MUST be approved by at least
|
||||
* two team members, or
|
||||
* one subsystem maintainer.
|
||||
* Significant changes MUST be approved by at least
|
||||
* two team members, AND
|
||||
* the relevant subsystem maintainer.
|
||||
|
||||
PRs MUST be [reviewed](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/reviewing-changes-in-pull-requests) and [approved](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/approving-a-pull-request-with-required-reviews) via GitHub’s review system.
|
||||
- Reviewers MAY write comments if approving
|
||||
- Reviewers MUST write comments if rejecting a PR or if requesting changes.
|
||||
* Reviewers MAY write comments if approving
|
||||
* Reviewers MUST write comments if rejecting a PR or if requesting changes.
|
||||
|
||||
Once a PR is approved as per above, any team member MAY merge the PR.
|
||||
|
||||
@@ -45,28 +45,28 @@ Once a PR is approved as per above, any team member MAY merge the PR.
|
||||
Grafana uses trunk-based development.
|
||||
|
||||
In particular, we found that the following principles match how we work:
|
||||
- Master and release branches MUST always build without failure.
|
||||
- Branches SHOULD be merged often. Larger changes SHOULD be activated with feature flags until they are ready. Long-lived development branches SHOULD be avoided.
|
||||
- Changes MAY be enabled by default once they are in a complete state
|
||||
- Changes which span multiple PRs MUST be described in an overarching issue or Google Doc.
|
||||
* Master and release branches MUST always build without failure.
|
||||
* Branches SHOULD be merged often. Larger changes SHOULD be activated with feature flags until they are ready. Long-lived development branches SHOULD be avoided.
|
||||
* Changes MAY be enabled by default once they are in a complete state
|
||||
* Changes which span multiple PRs MUST be described in an overarching issue or Google Doc.
|
||||
|
||||
## Releases
|
||||
|
||||
Releases MUST follow [Semantic Versioning](https://semver.org/) in naming and SHOULD follow Semantic Versioning as closely as reasonably possible for non-library software.
|
||||
|
||||
Release branches MUST be split from the following branches.
|
||||
- MAJOR release branches MUST be based on master.
|
||||
- MINOR release branches MUST be based on master.
|
||||
- PATCH release branches MUST be split from the relevant MINOR release branch’s most current PATCH
|
||||
* MAJOR release branches MUST be based on master.
|
||||
* MINOR release branches MUST be based on master.
|
||||
* PATCH release branches MUST be split from the relevant MINOR release branch’s most current PATCH
|
||||
|
||||
Security releases follow the same process but MUST be prepared in secret. Security releases MUST NOT include changes which are not related to the security fix. Normal release processes MUST accommodate the security release process. SECURITY.md MUST be followed.
|
||||
|
||||
PRs intended for inclusion in the next PATCH release MUST be labeled with `cherry-pick-needed` so they can be picked up by automated release tooling.
|
||||
|
||||
Releases follow the following cadence
|
||||
- MAJOR: Yearly
|
||||
- MINOR: Every 4-6 weeks
|
||||
- PATCH: As needed
|
||||
* MAJOR: Yearly
|
||||
* MINOR: Every 4-6 weeks
|
||||
* PATCH: As needed
|
||||
|
||||
Releases SHOULD NOT be delayed by pending changes.
|
||||
|
||||
|
||||
@@ -130,25 +130,7 @@ logging = false
|
||||
# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set.
|
||||
timeout = 30
|
||||
|
||||
# How many seconds the data proxy waits before sending a keepalive request.
|
||||
keep_alive_seconds = 30
|
||||
|
||||
# How many seconds the data proxy waits for a successful TLS Handshake before timing out.
|
||||
tls_handshake_timeout_seconds = 10
|
||||
|
||||
# How many seconds the data proxy will wait for a server's first response headers after
|
||||
# fully writing the request headers if the request has an "Expect: 100-continue"
|
||||
# header. A value of 0 will result in the body being sent immediately, without
|
||||
# waiting for the server to approve.
|
||||
expect_continue_timeout_seconds = 1
|
||||
|
||||
# The maximum number of idle connections that Grafana will keep alive.
|
||||
max_idle_connections = 100
|
||||
|
||||
# How many seconds the data proxy keeps an idle connection open before timing out.
|
||||
idle_conn_timeout_seconds = 90
|
||||
|
||||
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request.
|
||||
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false.
|
||||
send_user_header = false
|
||||
|
||||
#################################### Analytics ###########################
|
||||
@@ -293,18 +275,15 @@ viewers_can_edit = false
|
||||
# Editors can administrate dashboard, folders and teams they create
|
||||
editors_can_admin = false
|
||||
|
||||
# The duration in time a user invitation remains valid before expiring. This setting should be expressed as a duration. Examples: 6h (hours), 2d (days), 1w (week). Default is 24h (24 hours). The minimum supported duration is 15m (15 minutes).
|
||||
user_invite_max_lifetime_duration = 24h
|
||||
|
||||
[auth]
|
||||
# Login cookie name
|
||||
login_cookie_name = grafana_session
|
||||
|
||||
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation (token_rotation_interval_minutes).
|
||||
login_maximum_inactive_lifetime_duration =
|
||||
# The lifetime (days) an authenticated user can be inactive before being required to login at next visit. Default is 7 days.
|
||||
login_maximum_inactive_lifetime_days = 7
|
||||
|
||||
# The maximum lifetime (duration) an authenticated user can be logged in since login time before being required to login. Default is 30 days (30d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
login_maximum_lifetime_duration =
|
||||
# The maximum lifetime (days) an authenticated user can be logged in since login time before being required to login. Default is 30 days.
|
||||
login_maximum_lifetime_days = 30
|
||||
|
||||
# How often should auth tokens be rotated for authenticated users when being active. The default is each 10 minutes.
|
||||
token_rotation_interval_minutes = 10
|
||||
@@ -322,15 +301,12 @@ signout_redirect_url =
|
||||
# This setting is ignored if multiple OAuth providers are configured.
|
||||
oauth_auto_login = false
|
||||
|
||||
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
|
||||
oauth_state_cookie_max_age = 600
|
||||
# OAuth state max age cookie duration. Defaults to 60 seconds.
|
||||
oauth_state_cookie_max_age = 60
|
||||
|
||||
# limit of api_key seconds to live before expiration
|
||||
api_key_max_seconds_to_live = -1
|
||||
|
||||
# Set to true to enable SigV4 authentication option for HTTP-based datasources
|
||||
sigv4_auth_enabled = false
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
@@ -345,12 +321,12 @@ org_role = Viewer
|
||||
# mask the Grafana version number for unauthenticated users
|
||||
hide_version = false
|
||||
|
||||
#################################### GitHub Auth #########################
|
||||
#################################### Github Auth #########################
|
||||
[auth.github]
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
client_secret = some_secret
|
||||
scopes = user:email,read:org
|
||||
auth_url = https://github.com/login/oauth/authorize
|
||||
token_url = https://github.com/login/oauth/access_token
|
||||
@@ -364,7 +340,7 @@ allowed_organizations =
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
client_secret = some_secret
|
||||
scopes = api
|
||||
auth_url = https://gitlab.com/oauth/authorize
|
||||
token_url = https://gitlab.com/oauth/token
|
||||
@@ -377,7 +353,7 @@ allowed_groups =
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
client_id = some_client_id
|
||||
client_secret =
|
||||
client_secret = some_client_secret
|
||||
scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email
|
||||
auth_url = https://accounts.google.com/o/oauth2/auth
|
||||
token_url = https://accounts.google.com/o/oauth2/token
|
||||
@@ -391,7 +367,7 @@ hosted_domain =
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
client_secret = some_secret
|
||||
scopes = user:email
|
||||
allowed_organizations =
|
||||
|
||||
@@ -399,7 +375,7 @@ allowed_organizations =
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
client_secret = some_secret
|
||||
scopes = user:email
|
||||
allowed_organizations =
|
||||
|
||||
@@ -409,7 +385,7 @@ name = Azure AD
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
client_id = some_client_id
|
||||
client_secret =
|
||||
client_secret = some_client_secret
|
||||
scopes = openid email profile
|
||||
auth_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/authorize
|
||||
token_url = https://login.microsoftonline.com/<tenant-id>/oauth2/v2.0/token
|
||||
@@ -422,7 +398,7 @@ name = Okta
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
client_secret = some_secret
|
||||
scopes = openid profile email groups
|
||||
auth_url = https://<tenant-id>.okta.com/oauth2/v1/authorize
|
||||
token_url = https://<tenant-id>.okta.com/oauth2/v1/token
|
||||
@@ -437,13 +413,11 @@ name = OAuth
|
||||
enabled = false
|
||||
allow_sign_up = true
|
||||
client_id = some_id
|
||||
client_secret =
|
||||
client_secret = some_secret
|
||||
scopes = user:email
|
||||
email_attribute_name = email:primary
|
||||
email_attribute_path =
|
||||
login_attribute_path =
|
||||
role_attribute_path =
|
||||
id_token_attribute_name =
|
||||
auth_url =
|
||||
token_url =
|
||||
api_url =
|
||||
@@ -623,36 +597,6 @@ max_attempts = 3
|
||||
# Makes it possible to enforce a minimal interval between evaluations, to reduce load on the backend
|
||||
min_interval_seconds = 1
|
||||
|
||||
# Configures for how long alert annotations are stored. Default is 0, which keeps them forever.
|
||||
# This setting should be expressed as an duration. Ex 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
max_annotation_age =
|
||||
|
||||
# Configures max number of alert annotations that Grafana stores. Default value is 0, which keeps all alert annotations.
|
||||
max_annotations_to_keep =
|
||||
|
||||
#################################### Annotations #########################
|
||||
|
||||
[annotations.dashboard]
|
||||
# Dashboard annotations means that annotations are associated with the dashboard they are created on.
|
||||
|
||||
# Configures how long dashboard annotations are stored. Default is 0, which keeps them forever.
|
||||
# This setting should be expressed as a duration. Examples: 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
max_age =
|
||||
|
||||
# Configures max number of dashboard annotations that Grafana stores. Default value is 0, which keeps all dashboard annotations.
|
||||
max_annotations_to_keep =
|
||||
|
||||
[annotations.api]
|
||||
# API annotations means that the annotations have been created using the API without any
|
||||
# association with a dashboard.
|
||||
|
||||
# Configures how long Grafana stores API annotations. Default is 0, which keeps them forever.
|
||||
# This setting should be expressed as a duration. Examples: 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
max_age =
|
||||
|
||||
# Configures max number of API annotations that Grafana keeps. Default value is 0, which keeps all API annotations.
|
||||
max_annotations_to_keep =
|
||||
|
||||
#################################### Explore #############################
|
||||
[explore]
|
||||
# Enable the Explore section
|
||||
@@ -731,8 +675,6 @@ public_url =
|
||||
key_file =
|
||||
bucket =
|
||||
path =
|
||||
enable_signed_urls = false
|
||||
signed_url_expiration =
|
||||
|
||||
[external_image_storage.azure_blob]
|
||||
account_name =
|
||||
@@ -829,23 +771,3 @@ license_path =
|
||||
[feature_toggles]
|
||||
# enable features, separated by spaces
|
||||
enable =
|
||||
|
||||
[date_formats]
|
||||
# For information on what formatting patterns that are supported https://momentjs.com/docs/#/displaying/
|
||||
|
||||
# Default system date format used in time range picker and other places where full time is displayed
|
||||
full_date = YYYY-MM-DD HH:mm:ss
|
||||
|
||||
# Used by graph and other places where we only show small intervals
|
||||
interval_second = HH:mm:ss
|
||||
interval_minute = HH:mm
|
||||
interval_hour = MM/DD HH:mm
|
||||
interval_day = MM/DD
|
||||
interval_month = YYYY-MM
|
||||
interval_year = YYYY
|
||||
|
||||
# Experimental feature
|
||||
use_browser_locale = false
|
||||
|
||||
# Default timezone for user preferences. Options are 'browser' for the browser local timezone or a timezone name from IANA Time Zone database, e.g. 'UTC' or 'Europe/Amsterdam' etc.
|
||||
default_timezone = browser
|
||||
|
||||
@@ -131,24 +131,6 @@
|
||||
# This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set.
|
||||
;timeout = 30
|
||||
|
||||
# How many seconds the data proxy waits before sending a keepalive probe request.
|
||||
;keep_alive_seconds = 30
|
||||
|
||||
# How many seconds the data proxy waits for a successful TLS Handshake before timing out.
|
||||
;tls_handshake_timeout_seconds = 10
|
||||
|
||||
# How many seconds the data proxy will wait for a server's first response headers after
|
||||
# fully writing the request headers if the request has an "Expect: 100-continue"
|
||||
# header. A value of 0 will result in the body being sent immediately, without
|
||||
# waiting for the server to approve.
|
||||
;expect_continue_timeout_seconds = 1
|
||||
|
||||
# The maximum number of idle connections that Grafana will keep alive.
|
||||
;max_idle_connections = 100
|
||||
|
||||
# How many seconds the data proxy keeps an idle connection open before timing out.
|
||||
;idle_conn_timeout_seconds = 90
|
||||
|
||||
# If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request, default is false.
|
||||
;send_user_header = false
|
||||
|
||||
@@ -292,18 +274,15 @@
|
||||
# Editors can administrate dashboard, folders and teams they create
|
||||
;editors_can_admin = false
|
||||
|
||||
# The duration in time a user invitation remains valid before expiring. This setting should be expressed as a duration. Examples: 6h (hours), 2d (days), 1w (week). Default is 24h (24 hours). The minimum supported duration is 15m (15 minutes).
|
||||
;user_invite_max_lifetime_duration = 24h
|
||||
|
||||
[auth]
|
||||
# Login cookie name
|
||||
;login_cookie_name = grafana_session
|
||||
|
||||
# The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation.
|
||||
;login_maximum_inactive_lifetime_duration =
|
||||
# The lifetime (days) an authenticated user can be inactive before being required to login at next visit. Default is 7 days,
|
||||
;login_maximum_inactive_lifetime_days = 7
|
||||
|
||||
# The maximum lifetime (duration) an authenticated user can be logged in since login time before being required to login. Default is 30 days (30d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
;login_maximum_lifetime_duration =
|
||||
# The maximum lifetime (days) an authenticated user can be logged in since login time before being required to login. Default is 30 days.
|
||||
;login_maximum_lifetime_days = 30
|
||||
|
||||
# How often should auth tokens be rotated for authenticated users when being active. The default is each 10 minutes.
|
||||
;token_rotation_interval_minutes = 10
|
||||
@@ -321,15 +300,12 @@
|
||||
# This setting is ignored if multiple OAuth providers are configured.
|
||||
;oauth_auto_login = false
|
||||
|
||||
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
|
||||
;oauth_state_cookie_max_age = 600
|
||||
# OAuth state max age cookie duration. Defaults to 60 seconds.
|
||||
;oauth_state_cookie_max_age = 60
|
||||
|
||||
# limit of api_key seconds to live before expiration
|
||||
;api_key_max_seconds_to_live = -1
|
||||
|
||||
# Set to true to enable SigV4 authentication option for HTTP-based datasources.
|
||||
;sigv4_auth_enabled = false
|
||||
|
||||
#################################### Anonymous Auth ######################
|
||||
[auth.anonymous]
|
||||
# enable anonymous access
|
||||
@@ -344,7 +320,7 @@
|
||||
# mask the Grafana version number for unauthenticated users
|
||||
;hide_version = false
|
||||
|
||||
#################################### GitHub Auth ##########################
|
||||
#################################### Github Auth ##########################
|
||||
[auth.github]
|
||||
;enabled = false
|
||||
;allow_sign_up = true
|
||||
@@ -431,8 +407,6 @@
|
||||
;scopes = user:email,read:org
|
||||
;email_attribute_name = email:primary
|
||||
;email_attribute_path =
|
||||
;login_attribute_path =
|
||||
;id_token_attribute_name =
|
||||
;auth_url = https://foo.bar/login/oauth/authorize
|
||||
;token_url = https://foo.bar/login/oauth/access_token
|
||||
;api_url = https://foo.bar/user
|
||||
@@ -615,36 +589,6 @@
|
||||
# Makes it possible to enforce a minimal interval between evaluations, to reduce load on the backend
|
||||
;min_interval_seconds = 1
|
||||
|
||||
# Configures for how long alert annotations are stored. Default is 0, which keeps them forever.
|
||||
# This setting should be expressed as a duration. Examples: 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
;max_annotation_age =
|
||||
|
||||
# Configures max number of alert annotations that Grafana stores. Default value is 0, which keeps all alert annotations.
|
||||
;max_annotations_to_keep =
|
||||
|
||||
#################################### Annotations #########################
|
||||
|
||||
[annotations.dashboard]
|
||||
# Dashboard annotations means that annotations are associated with the dashboard they are created on.
|
||||
|
||||
# Configures how long dashboard annotations are stored. Default is 0, which keeps them forever.
|
||||
# This setting should be expressed as a duration. Examples: 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
;max_age =
|
||||
|
||||
# Configures max number of dashboard annotations that Grafana stores. Default value is 0, which keeps all dashboard annotations.
|
||||
;max_annotations_to_keep =
|
||||
|
||||
[annotations.api]
|
||||
# API annotations means that the annotations have been created using the API without any
|
||||
# association with a dashboard.
|
||||
|
||||
# Configures how long Grafana stores API annotations. Default is 0, which keeps them forever.
|
||||
# This setting should be expressed as a duration. Examples: 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
;max_age =
|
||||
|
||||
# Configures max number of API annotations that Grafana keeps. Default value is 0, which keeps all API annotations.
|
||||
;max_annotations_to_keep =
|
||||
|
||||
#################################### Explore #############################
|
||||
[explore]
|
||||
# Enable the Explore section
|
||||
@@ -818,23 +762,3 @@
|
||||
[feature_toggles]
|
||||
# enable features, separated by spaces
|
||||
;enable =
|
||||
|
||||
[date_formats]
|
||||
# For information on what formatting patterns that are supported https://momentjs.com/docs/#/displaying/
|
||||
|
||||
# Default system date format used in time range picker and other places where full time is displayed
|
||||
;full_date = YYYY-MM-DD HH:mm:ss
|
||||
|
||||
# Used by graph and other places where we only show small intervals
|
||||
;interval_second = HH:mm:ss
|
||||
;interval_minute = HH:mm
|
||||
;interval_hour = MM/DD HH:mm
|
||||
;interval_day = MM/DD
|
||||
;interval_month = YYYY-MM
|
||||
;interval_year = YYYY
|
||||
|
||||
# Experimental feature
|
||||
;use_browser_locale = false
|
||||
|
||||
# Default timezone for user preferences. Options are 'browser' for the browser local timezone or a timezone name from IANA Time Zone database, e.g. 'UTC' or 'Europe/Amsterdam' etc.
|
||||
;default_timezone = browser
|
||||
|
||||
@@ -66,7 +66,7 @@ if err := s.bus.Dispatch(cmd); err != nil {
|
||||
}
|
||||
```
|
||||
|
||||
> **Note:** `Dispatch` will return an error if no handler is registered for that command.
|
||||
**Note:** `Dispatch` will return an error if no handler is registered for that command.
|
||||
|
||||
**Tip:** Browse the available commands in the `models` package.
|
||||
|
||||
@@ -87,7 +87,7 @@ func (s *MyService) SendStickers(cmd *models.SendStickersCommand) error {
|
||||
}
|
||||
```
|
||||
|
||||
> **Note:** The handler method may return an error if unable to complete the command.
|
||||
**Note:** The handler method may return an error if unable to complete the command.
|
||||
|
||||
## Queries
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ func init() {
|
||||
}
|
||||
```
|
||||
|
||||
`init` functions are only run whenever a package is imported, so we also need to import the package in the application. In the `server.go` file under `pkg/server`, import the package we just created:
|
||||
`init` functions are only run whenever a package is imported, so we also need to import the package in the application. In the `server.go` file under `pkg/cmd/grafana-server`, import the package we just created:
|
||||
|
||||
```go
|
||||
import _ "github.com/grafana/grafana/pkg/services/mysvc"
|
||||
@@ -66,4 +66,4 @@ type MyService struct {
|
||||
}
|
||||
```
|
||||
|
||||
> **Note:** Any injected dependency needs to be an exported field. Any unexported fields result in a runtime error.
|
||||
**Note:** Any injected dependency needs to be an exported field. Any unexported fields result in a runtime error.
|
||||
|
||||
@@ -27,14 +27,11 @@ npm install -g yarn
|
||||
|
||||
## Download Grafana
|
||||
|
||||
We recommend using the Git command-line interface to download the source code for the Grafana project:
|
||||
We recommend using Go to download the source code for the Grafana project:
|
||||
|
||||
1. Open a terminal and run `git clone https://github.com/grafana/grafana.git`. This command downloads Grafana to a new `grafana` directory in your current directory.
|
||||
1. Open the `grafana` directory in your favorite code editor.
|
||||
|
||||
For alternative ways of cloning the Grafana repository, please refer to [GitHub's cloning a repository](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository) documentation.
|
||||
|
||||
**Warning:** Do not use `go get` to download Grafana. Recent versions of Go have added behavior which isn't compatible with the way the Grafana repository is structured.
|
||||
1. Add `export GOPATH=$HOME/go/` to the bottom of your `$HOME/.bash_profile`.
|
||||
1. Open a terminal and run `go get github.com/grafana/grafana` in your terminal. This command downloads, and installs Grafana to your `$GOPATH`.
|
||||
1. Open `$GOPATH/src/github.com/grafana/grafana` in your favorite code editor.
|
||||
|
||||
## Build Grafana
|
||||
|
||||
@@ -128,7 +125,7 @@ yarn e2e:dev
|
||||
|
||||
## Configure Grafana for development
|
||||
|
||||
The default configuration, `defaults.ini`, is located in the `conf` directory.
|
||||
The default configuration, `grafana.ini`, is located in the `conf` directory.
|
||||
|
||||
To override the default configuration, create a `custom.ini` file in the `conf` directory. You only need to add the options you wish to override.
|
||||
|
||||
@@ -174,7 +171,7 @@ make build-docker-full
|
||||
|
||||
The resulting image will be tagged as grafana/grafana:dev.
|
||||
|
||||
> **Note:** If you've already set up a local development environment, and you're running a `linux/amd64` machine, you can speed up building the Docker image:
|
||||
**Note:** If you've already set up a local development environment, and you're running a `linux/amd64` machine, you can speed up building the Docker image:
|
||||
|
||||
1. Build the frontend: `go run build.go build-frontend`.
|
||||
1. Build the Docker image: `make build-docker-dev`.
|
||||
@@ -187,7 +184,7 @@ Are you having issues with setting up your environment? Here are some tips that
|
||||
|
||||
### Too many open files when running `make run`
|
||||
|
||||
Depending on your environment, you may have to increase the maximum number of open files allowed. For the rest of this section, we will assume you are on a Unix like OS (e.g. Linux/macOS), where you can control the maximum number of open files through the [ulimit](https://ss64.com/bash/ulimit.html) shell command.
|
||||
Depending on your environment, you may have to increase the maximum number of open files allowed. For the rest of this section, we will assume you are on a Unix like OS (e.g. Linux/MacOS), where you can control the maximum number of open files through the [ulimit](https://ss64.com/bash/ulimit.html) shell command.
|
||||
|
||||
To see how many open files are allowed, run:
|
||||
|
||||
@@ -211,8 +208,8 @@ Another alternative is to limit the files being watched. The directories that ar
|
||||
|
||||
To retain your `ulimit` configuration, i.e. so it will be remembered for future sessions, you need to commit it to your command line shell initialization file. Which file this will be depends on the shell you are using, here are some examples:
|
||||
|
||||
- zsh -> ~/.zshrc
|
||||
- bash -> ~/.bashrc
|
||||
* zsh -> ~/.zshrc
|
||||
* bash -> ~/.bashrc
|
||||
|
||||
Commit your ulimit configuration to your shell initialization file as follows ($LIMIT being your chosen limit and $INIT_FILE being the initialization file for your shell):
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Backend style guide
|
||||
|
||||
Grafana's backend has been developed for a long time with a mix of code styles. This guide explains how we want to write Go code in the future.
|
||||
Grafanas backend has been developed for a long time with a mix of code styles. This guide explains how we want to write Go code in the future.
|
||||
|
||||
Unless stated otherwise, use the guidelines listed in the following articles:
|
||||
|
||||
|
||||
@@ -1,41 +1,46 @@
|
||||
# Markdown style guide
|
||||
|
||||
This guide for Markdown style helps keep contributions consistent across all documentation created for Grafana products. Refer to the guide and update its sections as needed when a Subject Matter Expert answers a question on Markdown style, or a decision is made about how to apply Markdown.
|
||||
This guide for Markdown style helps keep contributions consistent across all documentation
|
||||
created for Grafana products. Refer to the guide and update its sections as needed when a
|
||||
Subject Matter Expert answers a question on Markdown style, or a decision is made about
|
||||
how to apply Markdown.
|
||||
|
||||
## Headers
|
||||
|
||||
In Markdown, the number of "#" symbols creates different heading levels, similar to HTML heading levels:
|
||||
In Markdown, the number of "#" symbols creates different heading levels, similar to
|
||||
HTML heading levels:
|
||||
|
||||
**Example**
|
||||
|
||||
- \# is \<h1>.
|
||||
- \#\# is \<h2>.
|
||||
- \#\#\# is \<h3>.
|
||||
* \# is \<h1>.
|
||||
* \#\# is \<h2>.
|
||||
* \#\#\# is \<h3>.
|
||||
|
||||
Start your document with a single ``#`` for the title of the page. Add the sub-headings with two ``##``.
|
||||
|
||||
## Bold and emphasis
|
||||
|
||||
- Make text **bold** using two asterisks.
|
||||
* Make text **bold** using two asterisks.
|
||||
|
||||
**Example:** It is ``**important**`` to use GitHub-flavored Markdown emoji consistently.
|
||||
**Example:** It is ``**important**`` to use Github Flavored Markdown emoji consistently.
|
||||
|
||||
- Make text ``_emphasized_`` using single `` _underscores_``. Do not use the single asterisk, it can be easily confused with bold.
|
||||
* Make text ``*emphasized*`` using single `` _underscores_`` or a single asterisk.
|
||||
|
||||
**Example:** GitHub-flavored markdown emoji should _only_ appear in specific cases.
|
||||
**Example:** Github Flavored Markdown emoji should _only_ appear in specific cases.
|
||||
|
||||
|
||||
## Links and references
|
||||
|
||||
Create links to other website by wrapping the display text in square brackets, and the web URL in curved brackets.
|
||||
Create links to other website by wrapping the display text in square brackets, and
|
||||
the web URL in curved brackets.
|
||||
|
||||
\[text to display](www.website.com)
|
||||
|
||||
**Example:** For more information on including emoji in GitHub-flavored markdown, refer to the [webfx page on emoji](https://www.webfx.com/tools/emoji-cheat-sheet/) for a list of emoji.
|
||||
**Example:** For more information on including emoji in Github flavored Markdown, refer to the [webfx page on emoji](https://www.webfx.com/tools/emoji-cheat-sheet/) for a list of emoji.
|
||||
|
||||
## Block quotes
|
||||
|
||||
Include block quotes inside text using right-facing arrows:
|
||||
Include Block quotes inside text using right-facing arrows:
|
||||
|
||||
**Example**
|
||||
|
||||
@@ -45,7 +50,8 @@ Include block quotes inside text using right-facing arrows:
|
||||
|
||||
## Code blocks
|
||||
|
||||
Code blocks written with markdown can show off syntax highlighting specific to different languages. Use three back tics to create a code block:
|
||||
Code blocks written with markdown can show off syntax highlighting specific
|
||||
to different languages. Use three back tics to create a code block:
|
||||
|
||||
```
|
||||
function testNum(a) {
|
||||
@@ -57,7 +63,8 @@ function testNum(a) {
|
||||
}
|
||||
```
|
||||
|
||||
Write the name of the language after the first set of back tics, no spaces, to show specific syntax highlighting. For example; "\```javascript" produces the following:
|
||||
Write the name of the language after the first set of back tics, no spaces,
|
||||
to show specific syntax highlighting. For example; "\```javascript" produces the following:
|
||||
|
||||
```javascript
|
||||
function testNum(a) {
|
||||
@@ -70,7 +77,10 @@ function testNum(a) {
|
||||
```
|
||||
## Tables
|
||||
|
||||
Construct a table by typing the table headings, and separating them with a "|" character. Then, add a second line of dashes ("-") separated by another "|" character. When constructing the table cells, separate each cell data with another "|".
|
||||
Construct a table by typing the table headings, and separating them with
|
||||
a "|" character. Then, add a second line of dashes ("-") separated by
|
||||
another "|" character. When constructing the table cells, separate each cell data with another
|
||||
"|".
|
||||
|
||||
**Example**
|
||||
|
||||
@@ -106,13 +116,14 @@ The list above will always display as:
|
||||
|
||||
### Unordered lists
|
||||
|
||||
Build a list of points - an unordered or unnumbered list - by using "\-" (hyphen) characters.
|
||||
Build a list of points - an unordered or unnumbered list - by
|
||||
using "\*" characters.
|
||||
|
||||
**Example**
|
||||
|
||||
- First
|
||||
- Another item
|
||||
- The last list item
|
||||
* First
|
||||
* Another item
|
||||
* The last list item
|
||||
|
||||
## Images
|
||||
|
||||
@@ -124,8 +135,10 @@ This follows the format of "!", alt text wrapped in "[]" and the link URL wrappe
|
||||
|
||||
## Comments
|
||||
|
||||
You can include comments that will not appear in published markdown using the following syntax:
|
||||
You can include comments that will not appear in published markdown using the
|
||||
following syntax:
|
||||
|
||||
\[comment]: <> (Comment text to display)
|
||||
|
||||
The word "comment" wrapped in "[]" followed by a ":", a space, "<>", and then the comment itself wrapped in "()".
|
||||
The word "comment" wrapped in "[]" followed by a ":", a space, "<>", and then
|
||||
the comment itself wrapped in "()".
|
||||
|
||||
@@ -4,7 +4,7 @@ This style guide applies to all documentation created for Grafana products.
|
||||
|
||||
For information about how to write technical documentation, we suggest reviewing the content of the [Google Technical Writing courses](https://developers.google.com/tech-writing).
|
||||
|
||||
The [Divio documentation system](https://documentation.divio.com/) site and the [Vue writing principles](https://v3.vuejs.org/guide/contributing/writing-guide.html#principles) are also good resources.
|
||||
The [Divio documentation system](https://documentation.divio.com/) site is also a good resource.
|
||||
|
||||
## Contributing
|
||||
|
||||
@@ -26,8 +26,8 @@ This section provides guidelines on how to avoid using charged language in docum
|
||||
|
||||
Don't use "whitelist" or "blacklist" when referring to allowing or blocking content or traffic.
|
||||
|
||||
- When used as a noun, use "allowlist" or "blocklist".
|
||||
- When used as a verb, use "allow" or "block"
|
||||
* When used as a noun, use "allowlist" or "blocklist".
|
||||
* When used as a verb, use "allow" or "block"
|
||||
|
||||
Example: _To **allow** outgoing traffic, add the IP to the **allowlist**._
|
||||
|
||||
@@ -35,8 +35,8 @@ Example: _To **allow** outgoing traffic, add the IP to the **allowlist**._
|
||||
|
||||
Don't use "master" or "slave" to describe relationships between nodes or processes.
|
||||
|
||||
- Use "leader", "main" or "primary," instead of "master."
|
||||
- Use "follower" or "secondary," instead of "slave."
|
||||
* Use "leader", "main" or "primary," instead of "master."
|
||||
* Use "follower" or "secondary," instead of "slave."
|
||||
|
||||
### Exceptions
|
||||
|
||||
@@ -50,19 +50,16 @@ The following sections provide general guidelines on topics specific to Grafana
|
||||
|
||||
### General
|
||||
|
||||
- Use active voice. Avoid passive voice.
|
||||
* Use active voice. Avoid passive voice.
|
||||
- Passive: The heatmap visualization is displayed.
|
||||
- Active: Grafana displays the heatmap visualization.
|
||||
- Write in the imperative second person. Examples: You can write a query. Click the panel. Close the window.
|
||||
- Write in present tense.
|
||||
* Write in the imperative second person. Examples: You can write a query. Click the panel. Close the window.
|
||||
* Write in present tense.
|
||||
- Not: The panel will open.
|
||||
- Use: The panel opens. Grafana opens the panel.
|
||||
- Do not use an ampersand (&) as an abbreviation for "and."
|
||||
* Do not use an ampersand (&) as an abbreviation for "and."
|
||||
- **Exceptions:** If an ampersand is used in the Grafana UI, then match the UI.
|
||||
- Avoid using internal slang and jargon in technical documentation.
|
||||
- Do not use two spaces after a period. Only add one space after each sentence. Do not add a space at the end of the paragraph.
|
||||
- Sentence length should be 25 words or less. If your thought is longer than 25 words, consider breaking up the sentence or changing the format to a list.
|
||||
- Paragraphs should be three sentences or fewer. Break up long paragraphs.
|
||||
* Avoid using internal slang and jargon in technical documentation.
|
||||
|
||||
### File naming conventions
|
||||
|
||||
@@ -72,39 +69,39 @@ The following sections provide general guidelines on topics specific to Grafana
|
||||
|
||||
### Headings
|
||||
|
||||
- Write headings in sentence case, not title case.
|
||||
* Write headings in sentence case, not title case.
|
||||
- This is sentence case
|
||||
- This Is Title Case
|
||||
- Task topic headings start with a verb.
|
||||
* Task topic headings start with a verb.
|
||||
- Write a query. Create a dashboard.
|
||||
- Concept and reference topic headings should be nouns or gerunds. Examples: Contributing to docs, Visualizations, Style guide
|
||||
- Avoid following one heading with another heading.
|
||||
- Avoid skipping heading levels. For example, an h1 should be followed by an h2 rather than an h3.
|
||||
- Avoid having just one lower-level heading. For example, h1, h2, h2, h3, h3, h2 is a good order. Do not go h1, h2, h3, h2, h3, h2.
|
||||
- Don't include parenthetical words like (Important!) in headings.
|
||||
* Concept and reference topic headings should be nouns or gerunds. Examples: Contributing to docs, Visualizations, Style guide
|
||||
* Avoid following one heading with another heading.
|
||||
* Avoid skipping heading levels. For example, an h1 should be followed by an h2 rather than an h3.
|
||||
* Avoid having just one lower-level heading. For example, h1, h2, h2, h3, h3, h2 is a good order. Do no go h1, h2, h3, h2, h3, h2.
|
||||
* Don't include parenthetical words like (Important!) in headings.
|
||||
|
||||
### Images
|
||||
|
||||
- Preferred format is .png
|
||||
- File extension should be all lowercase.
|
||||
- Preferred DPI is 72.
|
||||
- Assume all graphics will be exclusively viewed on the web.
|
||||
- Maximum image size is 3840px X 2160px.
|
||||
- Screenshots should be readable, but not too large.
|
||||
* Preferred format is .png
|
||||
* File extension should be all lowercase.
|
||||
* Preferred DPI is 72.
|
||||
* Assume all graphics will be exclusively viewed on the web.
|
||||
* Maximum image size is 3840px X 2160px.
|
||||
* Screenshots should be readable, but not too large.
|
||||
|
||||
### Capitalization
|
||||
|
||||
- Grafana, Loki, and Prometheus are always capitalized unless part of a code block.
|
||||
- API names are always Title Case, followed by "API"—for example, "Dashboard Permissions API"
|
||||
- Git is always capitalized, unless part of a code block.
|
||||
- Abbreviations are always capitalized (such as API, HTTP, ID, JSON, SQL, or URL) unless they are part of a code block.
|
||||
- Menu and submenu titles always use sentence case: capitalize the first word, and lowercase the rest.
|
||||
* Grafana, Loki, and Prometheus are always capitalized unless part of a code block.
|
||||
* API names are always Title Case, followed by "API"—for example, "Dashboard Permissions API"
|
||||
* Git is always capitalized, unless part of a code block.
|
||||
* Abbreviations are always capitalized (such as API, HTTP, ID, JSON, SQL, or URL) unless they are part of a code block.
|
||||
* Menu and submenu titles always use sentence case: capitalize the first word, and lowercase the rest.
|
||||
- "Dashboards" when referring to the submenu title.
|
||||
- "Keyboard shortcuts" when referring to the submenu topic.
|
||||
- Generic and plural versions are always lowercase.
|
||||
* Generic and plural versions are always lowercase.
|
||||
- Lowercase "dashboard" when referring to a dashboard generally.
|
||||
- Lowercase "dashboards" when referring to multiple dashboards.
|
||||
- **Exceptions:** If a term is lowercased in the Grafana UI, then match the UI.
|
||||
* **Exceptions:** If a term is lowercased in the Grafana UI, then match the UI.
|
||||
|
||||
### Links and references
|
||||
|
||||
@@ -117,46 +114,16 @@ When possible, use the exact title of the page or section you are linking to as
|
||||
**Example**
|
||||
Refer to the [Documentation style guide](documentation-style-guide.md) for information about word usage and capitalization guidelines.
|
||||
|
||||
### Notes, tips, cautions, and warnings
|
||||
|
||||
Grafana documentation uses notes, tips, cautions, and warnings. Notes are the most common. The format for all of them is indented, bold, sentence case:
|
||||
|
||||
```
|
||||
> **Note:**
|
||||
```
|
||||
|
||||
#### Notes
|
||||
|
||||
Notes provide additional information that the user should be extra aware of. For example:
|
||||
|
||||
> **Note:** This page describes a feature for Grafana 7.0 beta.
|
||||
|
||||
#### Tips
|
||||
|
||||
Tips describe alternate or more efficient ways of doing things. Rarely used.
|
||||
|
||||
#### Cautions
|
||||
|
||||
Cautions warn the user that they should proceed with caution. Use cautions to emphasize the potential downside of a course of action.
|
||||
|
||||
> **Caution:** If you turn off authentication requirements, then anyone can access your Grafana instance. This poses a considerable security risk.
|
||||
|
||||
#### Warnings
|
||||
|
||||
Warnings tell the user not to do something. For example:
|
||||
|
||||
> **Warning:** Grafana does not back up your dashboards. If you delete a dashboard, then you might not be able to recover it.
|
||||
|
||||
### Command line examples
|
||||
|
||||
- Do not assume everyone is using Linux. Make sure instructions include enough information for Windows and Mac users to successfully complete procedures.
|
||||
* Do not assume everyone is using Linux. Make sure instructions include enough information for Windows and Mac users to successfully complete procedures.
|
||||
|
||||
- Do not add `$` before commands. Make it easy for users to copy and paste commands.
|
||||
* Do not add `$` before commands. Make it easy for users to copy and paste commands.
|
||||
|
||||
- **Wrong:** `$ sudo yum install grafana`
|
||||
- **Right:** `sudo yum install grafana`
|
||||
* **Wrong:** `$ sudo yum install grafana`
|
||||
* **Right:** `sudo yum install grafana`
|
||||
|
||||
- Include `sudo` before commands that require `sudo` to work.
|
||||
* Include `sudo` before commands that require `sudo` to work.
|
||||
|
||||
For terminal examples and Grafana configuration, use a `bash` code block:
|
||||
```bash
|
||||
@@ -180,26 +147,26 @@ Two words if used as a verb, one word if used as a noun.
|
||||
|
||||
**Examples**
|
||||
|
||||
- Check out these new features!
|
||||
- Proceed to checkout.
|
||||
* Check out these new features!
|
||||
* Proceed to checkout.
|
||||
|
||||
#### data source
|
||||
|
||||
Two words, not one
|
||||
|
||||
**Exceptions:**
|
||||
- "datasource" used as an identifier
|
||||
- "datasource" in a URL
|
||||
- Use "data source" instead of "datasource" unless used as an identifier, in code, or as part of a URL.
|
||||
- Spell out "repository" and avoid the shorter "repo."
|
||||
- Use "Unix" as the preferred spelling (as opposed to "UNIX", or "unix") when referring to the family of operating systems.
|
||||
* "datasource" used as an identifier
|
||||
* "datasource" in a URL
|
||||
* Use "data source" instead of "datasource" unless used as an identifier, in code, or as part of a URL.
|
||||
* Spell out "repository" and avoid the shorter "repo."
|
||||
* Use "Unix" as the preferred spelling (as opposed to "UNIX", or "unix") when referring to the family of operating systems.
|
||||
|
||||
#### display (verb)
|
||||
|
||||
*Display* is a transitive verb, which means it always needs a direct object.
|
||||
- Correct, active voice: Grafana displays your list of active alarms.
|
||||
- Correct, but passive voice: Your list of active alarms is displayed.
|
||||
- Incorrect: The list of active alarms displays.
|
||||
* Correct, active voice: Grafana displays your list of active alarms.
|
||||
* Correct, but passive voice: Your list of active alarms is displayed.
|
||||
* Incorrect: The list of active alarms displays.
|
||||
|
||||
#### drawer
|
||||
|
||||
@@ -225,5 +192,5 @@ Two words if used as a verb, one word if used as a noun.
|
||||
|
||||
**Examples**
|
||||
|
||||
- Set up the workspace.
|
||||
- Initial setup might take five minutes.
|
||||
* Set up the workspace.
|
||||
* Initial setup might take five minutes.
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
# End-to-End Tests for core Grafana
|
||||
|
||||
This document is specific to the [Grafana repository](https://github.com/grafana/grafana). Be sure that you've read the [generalized E2E document](e2e.md).
|
||||
|
||||
## Commands
|
||||
|
||||
- `yarn e2e` Creates an isolated `grafana-server` home under _\<repo-root>/e2e/tmp_ with provisioned data sources and dashboards. This copies locally build binary and frontend assets from your repo root so you need to have a built backend and frontend for this to run locally. The server starts on port 3001 so it does not conflict with your normal dev server.
|
||||
- `yarn e2e:debug` Same as above but runs the tests in chrome and does not shutdown after completion.
|
||||
- `yarn e2e:dev` Same as above but does not run any tests on startup. It lets you pick a test first.
|
||||
|
||||
If you already have a Grafana instance running, you can provide a specific URL by setting the `BASE_URL` environment variable:
|
||||
|
||||
```shell
|
||||
BASE_URL=http://172.0.10.2:3333 yarn e2e
|
||||
```
|
||||
|
||||
The above commands use some utils scripts under [_\<repo-root>/e2e_](../../e2e) that can also be used for more control.
|
||||
|
||||
- `./e2e/start-server` This creates a fresh new grafana server working dir, setup's config and starts the server. It will also kill any previously started server that is still running using pid file at _\<repo-root>/e2e/tmp/pid_.
|
||||
- `./e2e/wait-for-grafana` waits for `$HOST` and `$PORT` to be available. Per default localhost and 3001.
|
||||
- `./e2e/run-suite <debug|dev|noarg>` Starts cypress in different modes.
|
||||
|
||||
## Test suites
|
||||
|
||||
All the integration tests are located at _\<repo-root>/e2e/suite\<x>/specs_. The page objects and reusable flows are in the [_\<repo-root>/packages/grafana-e2e_](../../packages/grafana-e2e) package.
|
||||
@@ -1,28 +0,0 @@
|
||||
# End-to-End Tests for plugins
|
||||
|
||||
Be sure that you've read the [generalized E2E document](e2e.md).
|
||||
|
||||
## Commands
|
||||
|
||||
- `yarn test:e2e` will run [Grafana's E2E utility](../../packages/grafana-e2e) against an already running Grafana server.
|
||||
- `yarn test:e2e:update` will run `test:e2e` but instead of asserting that screenshots match their expected fixtures, they'll be replaced with new ones.
|
||||
|
||||
Your running Grafana instance can be targeted by setting the `CYPRESS_BASE_URL`, `CYPRESS_USERNAME` and `CYPRESS_PASSWORD` environment variableS:
|
||||
|
||||
```shell
|
||||
CYPRESS_BASE_URL=https://localhost:3000 CYPRESS_USERNAME=admin CYPRESS_PASSWORD=admin yarn test:e2e
|
||||
```
|
||||
|
||||
## Test suites
|
||||
|
||||
All tests are located at _\<repo-root>/cypress/integration_ by default.
|
||||
|
||||
## Things to test
|
||||
|
||||
- Add data source (if applicable)
|
||||
- Add panel
|
||||
- Edit panel
|
||||
- Annotations (if applicable)
|
||||
- Aliases (if applicable)
|
||||
- Template variables
|
||||
- "Explore" view
|
||||
@@ -1,122 +1,139 @@
|
||||
# End-to-End tests
|
||||
# End to end test framework
|
||||
|
||||
Grafana Labs uses a minimal [homegrown solution](../../packages/grafana-e2e) built on top of [Cypress](https://cypress.io) for its end-to-end (E2E) tests.
|
||||
Grafana Labs uses a minimal home grown solution built on top of Cypress for our end to end (e2e) tests.
|
||||
|
||||
Important notes:
|
||||
## Commands
|
||||
|
||||
- We generally store all element identifiers ([CSS selectors](https://mdn.io/docs/Web/CSS/CSS_Selectors)) within the framework for reuse and maintainability.
|
||||
- We generally do not use stubs or mocks as to fully simulate a real user.
|
||||
- Cypress' promises [do not behave as you'd expect](https://docs.cypress.io/guides/core-concepts/introduction-to-cypress.html#Mixing-Async-and-Sync-code).
|
||||
- [Testing core Grafana](e2e-core.md) is slightly different than [testing plugins](e2e-plugins.md).
|
||||
- `yarn e2e` Creates an isolated grafana-server home under `<repo-root>/e2e/tmp` with provisioned data sources and dashboards. This
|
||||
copies locally build binary and frontend assets from your repo root so you need to have a built backend and frontend
|
||||
for this to run locally. The server starts on port 3001 so it does not conflict with your normal dev server.
|
||||
- `yarn e2e:debug` Same as above but runs the tests in chrome and does not shutdown after completion.
|
||||
- `yarn e2e:dev` Same as above but does not run any tests on startup. It lets you pick a test first.
|
||||
|
||||
## Framework structure
|
||||
If you already have a Grafana instance running, you can provide a specific URL by setting the `BASE_URL` environment variable:
|
||||
|
||||
Inspired by https://martinfowler.com/bliki/PageObject.html
|
||||
```
|
||||
BASE_URL=http://172.0.10.2:3333 yarn e2e
|
||||
```
|
||||
|
||||
- `Selector`: A unique identifier that is used from the E2E framework to retrieve an element from the Browser
|
||||
The above commands use some utils scripts under `<repo-root>/e2e` that can also be used for more control.
|
||||
|
||||
- `./e2e/start-server` This creates a fresh new grafana server working dir, setup's config and starts the server. It
|
||||
will also kill any previously started server that is still running using pid file at `<repo-root>/e2e/tmp/pid`.
|
||||
- `./e2e/wait-for-grafana` waits for `$HOST` and `$PORT` to be available. Per default localhost and 3001.
|
||||
- `./e2e/run-suite <debug|dev|noarg>` Starts cypress in different modes.
|
||||
|
||||
## Test Suites
|
||||
|
||||
All the integration tests are located at `e2e/suite<x>/specs`. The page objects and reusable flows are in the
|
||||
`packages/grafana-e2e` package.
|
||||
|
||||
## Basic concepts
|
||||
|
||||
Here is a good introduction to e2e best practices: https://martinfowler.com/bliki/PageObject.html.
|
||||
|
||||
- `Selector`: A unique identifier that is used from the e2e framework to retrieve an element from the Browser
|
||||
- `Page`: An abstraction for an object that contains one or more `Selectors` with `visit` function to navigate to the page.
|
||||
- `Component`: An abstraction for an object that contains one or more `Selectors` but without `visit` function
|
||||
- `Flow`: An abstraction that contains a sequence of actions on one or more `Pages` that can be reused and shared between tests
|
||||
|
||||
## Basic example
|
||||
|
||||
Let's start with a simple [JSX](https://reactjs.org/docs/introducing-jsx.html) example containing a single input field that we want to populate during our E2E test:
|
||||
Let's start with a simple example with a single selector. For simplicity, all examples are in JSX.
|
||||
|
||||
```jsx
|
||||
<input
|
||||
className="gf-form-input login-form-input"
|
||||
type="text"
|
||||
/>
|
||||
In our example app, we have an input that we want to type some text into during our e2e test.
|
||||
|
||||
```jsx harmony
|
||||
<div>
|
||||
<input type="text" className="gf-form-input login-form-input" />
|
||||
</div>
|
||||
```
|
||||
|
||||
We _could_ target the field with a CSS selector like `.gf-form-input.login-form-input` but that would be brittle as style changes occur frequently. Furthermore there is nothing that signals to future developers that this input is part of an E2E test. At Grafana, we use `aria-label` attributes as our preferred way of defining selectors instead of [`data-*`](https://mdn.io/docs/Web/HTML/Global_attributes/data-*) as they also aid in [accessibility](https://mdn.io/docs/Learn/Accessibility/What_is_accessibility):
|
||||
We could define a selector using `JQuery` [type selectors](https://api.jquery.com/category/selectors/) with a string like `'.gf-form-input.login-form-input'` but that would be brittle as style changes occur frequently. Furthermore there is nothing that signals to future developers that this input is part of an e2e test.
|
||||
|
||||
```jsx
|
||||
<input
|
||||
aria-label="Username input field"
|
||||
className="gf-form-input login-form-input"
|
||||
type="text"
|
||||
/>
|
||||
At Grafana, we use `aria-label` as our preferred way of defining selectors instead of `data-*` attributes. This also aids in accessibility.
|
||||
Let's add a descriptive `aria-label` to our simple example.
|
||||
|
||||
```jsx harmony
|
||||
<div>
|
||||
<input type="text" className="gf-form-input login-form-input" aria-label="Username input field" />
|
||||
</div>
|
||||
```
|
||||
|
||||
The next step is to create a `Page` representation in our E2E framework to glue the test with the real implementation using the `pageFactory` function. For that function we can supply a `url` and `selectors` like in the example below:
|
||||
Now that we added the `aria-label` we suddenly get more information about this particular field. It's an input field that represents a username, but there it's still not really signaling that it's part of an e2e test.
|
||||
|
||||
The next step is to create a `Page` representation in our e2e test framework to glue the test with the real implementation using the `pageFactory` function. For that function we can supply a `url` and `selectors` like in the example below:
|
||||
|
||||
```typescript
|
||||
export const Login = {
|
||||
// Called via `Login.visit()`
|
||||
url: '/login',
|
||||
|
||||
// Called via `Login.username()`
|
||||
username: 'Username input field',
|
||||
url: "/login", // used when called from Login.visit()
|
||||
username: "Username input field", // used when called from Login.username().type('Hello World')
|
||||
};
|
||||
```
|
||||
|
||||
The next step is to add the `Login` page to the `Pages` export within [_\<repo-root>/packages/grafana-e2e-selectors/src/selectors/pages.ts_](../../packages/grafana-e2e-selectors/src/selectors/pages.ts) so that it appears when we type `e2e.pages` in our IDE.
|
||||
The next step is to add the `Login` page to the exported const `Pages` in `packages/grafana-e2e-selectors/src/selectors/pages.ts` so that it appears when we type `e2e.pages` in our IDE.
|
||||
|
||||
```typescript
|
||||
```ecmascript 6
|
||||
export const Pages = {
|
||||
Login,
|
||||
…,
|
||||
…,
|
||||
…,
|
||||
...,
|
||||
...,
|
||||
...,
|
||||
};
|
||||
|
||||
```
|
||||
|
||||
Now that we have a `Page` called `Login` in our `Pages` const we can use that to add a selector in our html like shown below and now this really signals to future developers that it is part of an E2E test.
|
||||
Now that we have a `Page` called `Login` in our `Pages` const we can use that to add a selector in our html like shown below and now this really signals to future developers that it is part of an e2e test.
|
||||
|
||||
```jsx
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
|
||||
<input
|
||||
aria-label={selectors.pages.Login.username}
|
||||
className="gf-form-input login-form-input"
|
||||
type="text"
|
||||
/>
|
||||
```jsx harmony
|
||||
<div>
|
||||
<input type="text" className="gf-form-input login-form-input" aria-label={selectors.pages.Login.username} />
|
||||
</div>
|
||||
```
|
||||
|
||||
The last step in our example is to use our `Login` page as part of a test.
|
||||
|
||||
- The `url` property is used whenever we call the `visit` function and is equivalent to the Cypress' [`cy.visit()`](https://docs.cypress.io/api/commands/visit.html#Syntax).
|
||||
- The `url` property is used whenever we call the `visit` function and is equivalent to the Cypress function [cy.visit()](https://docs.cypress.io/api/commands/visit.html#Syntax).
|
||||
> Best practice after calling `visit` is to always call `should` on a selector to prevent flaky tests when you try to access an element that isn't ready. For more information, refer to [Commands vs. assertions](https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions).
|
||||
- Any defined selector can be accessed from the `Login` page by invoking it. This is equivalent to the result of the Cypress function [cy.get(...)](https://docs.cypress.io/api/commands/get.html#Syntax).
|
||||
|
||||
- Any defined selector can be accessed from the `Login` page by invoking it. This is equivalent to the result of the Cypress function [`cy.get(…)`](https://docs.cypress.io/api/commands/get.html#Syntax).
|
||||
|
||||
```typescript
|
||||
```ecmascript 6
|
||||
describe('Login test', () => {
|
||||
it('passes', () => {
|
||||
it('Should pass', () => {
|
||||
e2e.pages.Login.visit();
|
||||
// To prevent flaky tests, always do a `.should` on any selector that you expect to be in the DOM.
|
||||
// To prevent flaky tests, always do a .should on any selector that you expect to be in the DOM.
|
||||
// Read more here: https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions
|
||||
e2e.pages.Login.username()
|
||||
.should('be.visible')
|
||||
.type('admin');
|
||||
e2e.pages.Login.username().should('be.visible');
|
||||
e2e.pages.Login.username().type('admin');
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Advanced example
|
||||
|
||||
Let's take a look at an example that uses the same `selector` for multiple items in a list for instance. In this example app we have a list of data sources that we want to click on during an E2E test.
|
||||
Let's take a look at an example that uses the same `selector` for multiple items in a list for instance. In this example app we have a list of data sources that we want to click on during an e2e test.
|
||||
|
||||
```jsx
|
||||
```jsx harmony
|
||||
<ul>
|
||||
{dataSources.map(({ id, name }) => (
|
||||
<li className="card-item-wrapper" key={id}>
|
||||
<a className="card-item" href={`datasources/edit/${id}`}>
|
||||
<div className="card-item-name">{name}</div>
|
||||
{dataSources.map(dataSource => (
|
||||
<li className="card-item-wrapper" key={dataSource.id}>
|
||||
<a className="card-item" href={`datasources/edit/${dataSource.id}`}>
|
||||
<div className="card-item-name">{dataSource.name}</div>
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
```
|
||||
|
||||
Just as before in the basic example we'll start by creating a page abstraction using the `pageFactory` function:
|
||||
````
|
||||
|
||||
Just as before in the basic example we'll start by creating a page abstraction using the `pageFactory` function:
|
||||
```typescript
|
||||
export const DataSources = {
|
||||
url: '/datasources',
|
||||
dataSources: (dataSourceName: string) => `Data source list item ${dataSourceName}`,
|
||||
};
|
||||
```
|
||||
````
|
||||
|
||||
You might have noticed that instead of a simple `string` as the `selector`, we're using a `function` that takes a string parameter as an argument and returns a formatted string using the argument.
|
||||
|
||||
@@ -124,13 +141,13 @@ Just as before we need to add the `DataSources` page to the exported const `Page
|
||||
|
||||
The next step is to use the `dataSources` selector function as in our example below:
|
||||
|
||||
```jsx
|
||||
```jsx harmony
|
||||
<ul>
|
||||
{dataSources.map(({ id, name }) => (
|
||||
<li className="card-item-wrapper" key={id}>
|
||||
<a className="card-item" href={`datasources/edit/${id}`}>
|
||||
<div className="card-item-name" aria-label={selectors.pages.DataSources.dataSources(name)}>
|
||||
{name}
|
||||
{dataSources.map(dataSource => (
|
||||
<li className="card-item-wrapper" key={dataSource.id}>
|
||||
<a className="card-item" href={`datasources/edit/${dataSource.id}`}>
|
||||
<div className="card-item-name" aria-label={selectors.pages.DataSources.dataSources(dataSource.name)}>
|
||||
{dataSource.name}
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
@@ -138,25 +155,55 @@ The next step is to use the `dataSources` selector function as in our example be
|
||||
</ul>
|
||||
```
|
||||
|
||||
When this list is rendered with the data sources with names `A`, `B` and `C` ,the resulting HTML would look like:
|
||||
When this list is rendered with the data sources with names `A`, `B`, `C` the resulting html would become:
|
||||
|
||||
```html
|
||||
<div class="card-item-name" aria-label="Data source list item A">A</div>
|
||||
<div class="card-item-name" aria-label="Data source list item B">B</div>
|
||||
<div class="card-item-name" aria-label="Data source list item C">C</div>
|
||||
```jsx harmony
|
||||
<div class="card-item-name" aria-label="Data source list item A">
|
||||
A
|
||||
</div>
|
||||
...
|
||||
<div class="card-item-name" aria-label="Data source list item B">
|
||||
B
|
||||
</div>
|
||||
...
|
||||
<div class="card-item-name" aria-label="Data source list item C">
|
||||
C
|
||||
</div>
|
||||
```
|
||||
|
||||
Now we can write our test. The one thing that differs from the [basic example](#basic-example) above is that we pass in which data source we want to click on as an argument to the selector function:
|
||||
Now we can write our test. The one thing that differs from the `Basic example` is that we pass in which data source we want to click on as an argument to the selector function:
|
||||
|
||||
```typescript
|
||||
> Best practice after calling `visit` is to always call `should` on a selector to prevent flaky tests when you try to access an element that isn't ready. For more information, refer to [Commands vs. assertions](https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions).
|
||||
|
||||
```ecmascript 6
|
||||
describe('List test', () => {
|
||||
it('clicks on data source named B', () => {
|
||||
it('Clicking on data source named B', () => {
|
||||
e2e.pages.DataSources.visit();
|
||||
// To prevent flaky tests, always do a .should on any selector that you expect to be in the DOM.
|
||||
// Read more here: https://docs.cypress.io/guides/core-concepts/retry-ability.html#Commands-vs-assertions
|
||||
e2e.pages.DataSources.dataSources('B')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
e2e.pages.DataSources.dataSources('B').should('be.visible');
|
||||
e2e.pages.DataSources.dataSources('B').click();
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
## Debugging PhantomJS image rendering
|
||||
|
||||
### Common Error
|
||||
|
||||
The most common error with PhantomJs image rendering is when a PR introduces an import that has functionality that's not supported by PhantomJs. To quickly identify which new import causes this you can use a tool like `es-check`.
|
||||
|
||||
1. Run > `npx es-check es5 './public/build/*.js'`
|
||||
2. Check the output for files that break es5 compatibility.
|
||||
3. Lazy load the failing imports if possible.
|
||||
|
||||
### Debugging
|
||||
|
||||
There is no easy or comprehensive way to debug PhantomJS smoke test (image rendering) failures. However, PhantomJS exposes remote debugging interface which can give you a sense of what is going wrong in the smoke test. Before performing the steps described below make sure your local Grafana instance is running:
|
||||
|
||||
1. Go to `tools/phantomjs` directory
|
||||
2. Execute `phantomjs` binary against `render.js` file: `./phantomjs --remote-debugger-port=9009 --remote-debugger-autorun=yes ./render.js url="http://localhost:3000"`
|
||||
3. In your browser navigate to `http://localhost:9009/`
|
||||
4. Select `http://localhost:3000/login` from the list. You will get access to Webkit's inspector to see the console's output from the smoke test.
|
||||
|
||||
The method described above is not perfect, but is helpful to evaluate smoke tests breaking due to bundle errors.
|
||||
|
||||
@@ -7,31 +7,13 @@ Generally we follow the Airbnb [React Style Guide](https://github.com/airbnb/jav
|
||||
- [Frontend Style Guide](#frontend-style-guide)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Basic rules](#basic-rules)
|
||||
- [Naming conventions](#naming-conventions)
|
||||
- [Use `PascalCase` for:](#use-pascalcase-for)
|
||||
- [Typescript class names](#typescript-class-names)
|
||||
- [Types and interfaces](#types-and-interfaces)
|
||||
- [Enums](#enums)
|
||||
- [Use `camelCase` for:](#use-camelcase-for)
|
||||
- [Functions](#functions)
|
||||
- [Methods](#methods)
|
||||
- [Variables](#variables)
|
||||
- [React state and properties](#react-state-and-properties)
|
||||
- [Emotion class names](#emotion-class-names)
|
||||
- [Use `ALL_CAPS` for constants.](#use-all_caps-for-constants)
|
||||
- [Use BEM convention for SASS styles.](#use-bem-convention-for-sass-styles)
|
||||
- [Typing](#typing)
|
||||
- [File and directory naming conventions](#file-and-directory-naming-conventions)
|
||||
- [Code organization](#code-organization)
|
||||
- [Exports](#exports)
|
||||
- [Comments](#comments)
|
||||
- [Linting](#linting)
|
||||
- [Naming conventions](#naming-conventions)
|
||||
- [File and directory naming conventions](#file-and-directory-naming-conventions)
|
||||
- [Code organization](#code-organization)
|
||||
- [Exports](#exports)
|
||||
- [Comments](#comments)
|
||||
- [React](#react)
|
||||
- [Props](#props)
|
||||
- [Name callback props and handlers with an "on" prefix.](#name-callback-props-and-handlers-with-an-on-prefix)
|
||||
- [React Component definitions](#react-component-definitions)
|
||||
- [React Component constructor](#react-component-constructor)
|
||||
- [React Component defaultProps](#react-component-defaultprops)
|
||||
- [State management](#state-management)
|
||||
|
||||
- [Proposal for removing or replacing Angular dependencies](https://github.com/grafana/grafana/pull/23048)
|
||||
@@ -210,7 +192,7 @@ const stringArray: string[] = [];
|
||||
|
||||
Specify function return types explicitly in new code. This improves readability by being able to tell what a function returns just by looking at the signature. It also prevents errors when a function's return type is broader than expected by the author.
|
||||
|
||||
> **Note:** We don't have linting for this enabled because of lots of old code that needs to be fixed first.
|
||||
> Note: We don't have linting for this enabled because of lots of old code that needs to be fixed first.
|
||||
|
||||
```typescript
|
||||
// bad
|
||||
|
||||
@@ -26,19 +26,19 @@ Try to *chunk* your content. This means you should organize the document so that
|
||||
If I was writing content for a site called *Doggie handbook*, I might organize it like this.
|
||||
|
||||
**Concept**
|
||||
- What a dog is
|
||||
- Brief history of dogs
|
||||
- Why you might want a dog
|
||||
- Tasks dogs can be trained to do
|
||||
* What a dog is
|
||||
* Brief history of dogs
|
||||
* Why you might want a dog
|
||||
* Tasks dogs can be trained to do
|
||||
|
||||
**Tasks**
|
||||
- Feed the dog
|
||||
- Groom the dog
|
||||
- Train the dog
|
||||
* Feed the dog
|
||||
* Groom the dog
|
||||
* Train the dog
|
||||
|
||||
**Reference**
|
||||
- List of dog equipment you will need
|
||||
- Table of breeds that includes breed name, size range, short or long hair, and type of dog
|
||||
* List of dog equipment you will need
|
||||
* Table of breeds that includes breed name, size range, short or long hair, and type of dog
|
||||
|
||||
### Audience
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@ Concept topics or sections explain *what* and *why*. They do not explain *how*.
|
||||
Continuing the example in the previous section, here is a sample Grafana workflow.
|
||||
|
||||
1. Install Grafana. <link to task for installing Grafana>
|
||||
1. Set up data sources. <link to data sources concept topic, which links to data source task topics>
|
||||
1. Create panels. <link to panel concept topic, which links to tasks>
|
||||
1. Create dashboards. <link to panel concept topic, which links to tasks>
|
||||
1. Enter queries. <link to query editor concept topic>
|
||||
1. Add users. <link to user management concept topic, which links to tasks>
|
||||
1. Create playlists. <link to Playlist topic that contains concept information and tasks>
|
||||
2. Set up data sources. <link to data sources concept topic, which links to data source task topics>
|
||||
3. Create panels. <link to panel concept topic, which links to tasks>
|
||||
4. Create dashboards. <link to panel concept topic, which links to tasks>
|
||||
5. Enter queries. <link to query editor concept topic>
|
||||
6. Add users. <link to user management concept topic, which links to tasks>
|
||||
7. Create playlists. <link to Playlist topic that contains concept information and tasks>
|
||||
|
||||
## Next steps
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ Often reference topics are linked from *task* topics, because they contain infor
|
||||
|
||||
Lists of commands or parameters are often organized in reference topics. The information you need to present will dictate the format.
|
||||
|
||||
- They might
|
||||
- be in
|
||||
- unordered lists.
|
||||
* They might
|
||||
* be in
|
||||
* unordered lists.
|
||||
|
||||
[Configuration](https://grafana.com/docs/grafana/latest/installation/configuration/) is an example of lists.
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ Write one-step tasks as simple sentences, not as unordered lists or numbered lis
|
||||
Short tasks can be grouped. How short constitutes "short" is a judgment call based on number of steps and how long individual steps are.
|
||||
|
||||
1. Use your judgment.
|
||||
1. Ask your coworkers or someone on the Comm team for advice if you aren't sure.
|
||||
2. Ask your coworkers or someone on the Comm team for advice if you aren't sure.
|
||||
|
||||
## Next steps
|
||||
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
This folder contains useful scripts and configuration so you can:
|
||||
|
||||
- Configure data sources in Grafana for development.
|
||||
- Configure dashboards for development and test scenarios.
|
||||
- Create docker-compose file with databases and fake data.
|
||||
* Configure data sources in Grafana for development.
|
||||
* Configure dashboards for development and test scenarios.
|
||||
* Create docker-compose file with databases and fake data.
|
||||
|
||||
## Install Docker
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
apiVersion: 1
|
||||
|
||||
datasources:
|
||||
@@ -225,7 +226,6 @@ datasources:
|
||||
jsonData:
|
||||
authType: credentials
|
||||
defaultRegion: eu-west-2
|
||||
customMetricsNamespaces: "CWAgent"
|
||||
|
||||
# Keep to test old /api/prom API
|
||||
- name: gdev-loki-0.3
|
||||
@@ -270,3 +270,5 @@ datasources:
|
||||
access: proxy
|
||||
url: http://localhost:9411
|
||||
editable: false
|
||||
|
||||
|
||||
|
||||
@@ -1,110 +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,
|
||||
"iteration": 1596705352582,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 16,
|
||||
"w": 24,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 11,
|
||||
"options": {
|
||||
"content": "## Global variables\n\n* `__dashboard` = `${__dashboard}`\n* `__dashboard.name` = `${__dashboard.name}`\n* `__dashboard.uid` = `${__dashboard.uid}`\n* `__org.name` = `${__org.name}`\n* `__org.id` = `${__org.id}`\n* `__user.id` = `${__user.id}`\n* `__user.login` = `${__user.login}`\n \n## Formats\n\n* `Server:raw` = `${Server:raw}`\n* `Server:regex` = `${Server:regex}`\n* `Server:lucene` = `${Server:lucene}`\n* `Server:glob` = `${Server:glob}`\n* `Server:pipe` = `${Server:pipe}`\n* `Server:distributed` = `${Server:distributed}`\n* `Server:csv` = `${Server:csv}`\n* `Server:html` = `${Server:html}`\n* `Server:json` = `${Server:json}`\n* `Server:percentencode` = `${Server:percentencode}`\n* `Server:singlequote` = `${Server:singlequote}`\n* `Server:doublequote` = `${Server:doublequote}`\n* `Server:sqlstring` = `${Server:sqlstring}`\n* `Server:date` = `${Server:date}`\n* `Server:text` = `${Server:text}`\n\n",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "7.1.0",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Variable interpolation",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 26,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "templating"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {
|
||||
"selected": true,
|
||||
"text": "All",
|
||||
"value": ["$__all"]
|
||||
},
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"label": null,
|
||||
"multi": true,
|
||||
"name": "Server",
|
||||
"options": [
|
||||
{
|
||||
"selected": true,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
},
|
||||
{
|
||||
"selected": false,
|
||||
"text": "A'A\"A",
|
||||
"value": "A'A\"A"
|
||||
},
|
||||
{
|
||||
"selected": false,
|
||||
"text": "BB\\B",
|
||||
"value": "BB\\B"
|
||||
},
|
||||
{
|
||||
"selected": false,
|
||||
"text": "CCC",
|
||||
"value": "CCC"
|
||||
}
|
||||
],
|
||||
"query": "A'A\"A,BB\\B,CCC",
|
||||
"queryValue": "",
|
||||
"skipUrlSync": false,
|
||||
"type": "custom"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Templating - Global variables and interpolation",
|
||||
"uid": "HYaGDGIMk",
|
||||
"version": 5
|
||||
}
|
||||
@@ -1,132 +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,
|
||||
"id": null,
|
||||
"iteration": 1601526910610,
|
||||
"links": [
|
||||
{
|
||||
"icon": "external link",
|
||||
"includeVars": true,
|
||||
"tags": [],
|
||||
"title": "Grafana",
|
||||
"tooltip": "",
|
||||
"type": "link",
|
||||
"url": "http://www.grafana.com"
|
||||
},
|
||||
{
|
||||
"asDropdown": true,
|
||||
"icon": "external link",
|
||||
"includeVars": true,
|
||||
"tags": ["templating"],
|
||||
"title": "Link as DropDown",
|
||||
"type": "dashboards"
|
||||
},
|
||||
{
|
||||
"icon": "external link",
|
||||
"includeVars": true,
|
||||
"tags": ["demo"],
|
||||
"type": "dashboards"
|
||||
}
|
||||
],
|
||||
"panels": [
|
||||
{
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"content": "# ${custom.text}\n ",
|
||||
"mode": "markdown"
|
||||
},
|
||||
"pluginVersion": "7.3.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "${custom.text}",
|
||||
"type": "text"
|
||||
}
|
||||
],
|
||||
"schemaVersion": 26,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "templating"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"allValue": null,
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
},
|
||||
"hide": 0,
|
||||
"includeAll": true,
|
||||
"label": null,
|
||||
"multi": true,
|
||||
"name": "custom",
|
||||
"options": [
|
||||
{
|
||||
"selected": true,
|
||||
"text": "All",
|
||||
"value": "$__all"
|
||||
},
|
||||
{
|
||||
"selected": false,
|
||||
"text": "p1",
|
||||
"value": "p1"
|
||||
},
|
||||
{
|
||||
"selected": false,
|
||||
"text": "p2",
|
||||
"value": "p2"
|
||||
},
|
||||
{
|
||||
"selected": false,
|
||||
"text": "p3",
|
||||
"value": "p3"
|
||||
}
|
||||
],
|
||||
"query": "p1,p2,p3",
|
||||
"skipUrlSync": false,
|
||||
"type": "custom"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"timezone": "",
|
||||
"title": "Templating - Dashboard Links and Variables",
|
||||
"uid": "yBCC3aKGk",
|
||||
"version": 7
|
||||
}
|
||||
@@ -1,235 +0,0 @@
|
||||
{
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": "-- Grafana --",
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
}
|
||||
]
|
||||
},
|
||||
"editable": true,
|
||||
"gnetId": null,
|
||||
"graphTooltip": 0,
|
||||
"iteration": 1597300832273,
|
||||
"links": [],
|
||||
"panels": [
|
||||
{
|
||||
"datasource": "CsvData",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"align": null
|
||||
},
|
||||
"mappings": [],
|
||||
"thresholds": {
|
||||
"mode": "absolute",
|
||||
"steps": [
|
||||
{
|
||||
"color": "green",
|
||||
"value": null
|
||||
},
|
||||
{
|
||||
"color": "red",
|
||||
"value": 80
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"matcher": {
|
||||
"id": "byName",
|
||||
"options": "Query"
|
||||
},
|
||||
"properties": [
|
||||
{
|
||||
"id": "links",
|
||||
"value": [
|
||||
{
|
||||
"title": "Search",
|
||||
"url": "/d/spVR9LSMk/templating-textbox-and-data-links?var-query=${__value.raw:percentencode}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"options": {
|
||||
"showHeader": true
|
||||
},
|
||||
"pluginVersion": "7.2.0-pre",
|
||||
"targets": [
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"fields": [
|
||||
{
|
||||
"config": {},
|
||||
"name": "Query",
|
||||
"type": "string",
|
||||
"values": ["Contains+Plus", "Contains&Ampersand", "Contains white space"]
|
||||
},
|
||||
{
|
||||
"config": {},
|
||||
"name": " Test",
|
||||
"type": "string",
|
||||
"values": ["asd", "asd", "asd"]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"refId": "A"
|
||||
}
|
||||
],
|
||||
"timeFrom": null,
|
||||
"timeShift": null,
|
||||
"title": "Data",
|
||||
"type": "table"
|
||||
},
|
||||
{
|
||||
"aliasColors": {},
|
||||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": null,
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {}
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"fill": 1,
|
||||
"fillGradient": 0,
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
"x": 12,
|
||||
"y": 0
|
||||
},
|
||||
"hiddenSeries": false,
|
||||
"id": 4,
|
||||
"legend": {
|
||||
"avg": false,
|
||||
"current": false,
|
||||
"max": false,
|
||||
"min": false,
|
||||
"show": true,
|
||||
"total": false,
|
||||
"values": false
|
||||
},
|
||||
"lines": true,
|
||||
"linewidth": 1,
|
||||
"nullPointMode": "null",
|
||||
"options": {
|
||||
"alertThreshold": true
|
||||
},
|
||||
"percentage": false,
|
||||
"pluginVersion": "7.2.0-pre",
|
||||
"pointradius": 2,
|
||||
"points": false,
|
||||
"renderer": "flot",
|
||||
"seriesOverrides": [],
|
||||
"spaceLength": 10,
|
||||
"stack": false,
|
||||
"steppedLine": false,
|
||||
"targets": [
|
||||
{
|
||||
"alias": "${query}",
|
||||
"refId": "A",
|
||||
"scenarioId": "random_walk"
|
||||
}
|
||||
],
|
||||
"thresholds": [],
|
||||
"timeFrom": null,
|
||||
"timeRegions": [],
|
||||
"timeShift": null,
|
||||
"title": "Query: ${query}",
|
||||
"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
|
||||
}
|
||||
}
|
||||
],
|
||||
"schemaVersion": 26,
|
||||
"style": "dark",
|
||||
"tags": ["gdev", "templating"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {
|
||||
"selected": false,
|
||||
"text": "asdasda+",
|
||||
"value": "asdasda+"
|
||||
},
|
||||
"hide": 0,
|
||||
"label": null,
|
||||
"name": "query",
|
||||
"options": [
|
||||
{
|
||||
"selected": true,
|
||||
"text": "asdasda+",
|
||||
"value": "asdasda+"
|
||||
}
|
||||
],
|
||||
"query": "asdasda+",
|
||||
"skipUrlSync": false,
|
||||
"type": "textbox"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"]
|
||||
},
|
||||
"timezone": "",
|
||||
"title": "Templating - Textbox & data links",
|
||||
"uid": "spVR9LSMk",
|
||||
"version": 9
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,7 +10,7 @@ ADD etc_mtab /etc/mtab
|
||||
|
||||
ADD collectd.conf.tpl /etc/collectd/collectd.conf.tpl
|
||||
|
||||
RUN pip install --no-cache-dir envtpl
|
||||
RUN pip install envtpl
|
||||
ADD start_container /usr/bin/start_container
|
||||
RUN chmod +x /usr/bin/start_container
|
||||
CMD start_container
|
||||
|
||||
@@ -5,33 +5,33 @@ Basic collectd-based server monitoring. Sends stats to Graphite.
|
||||
|
||||
Collectd metrics:
|
||||
|
||||
- CPU used/free/idle/etc
|
||||
- Free disk (via mounting hosts '/' into container, eg: -v /:/hostfs:ro)
|
||||
- Disk performance
|
||||
- Load average
|
||||
- Memory used/free/etc
|
||||
- Uptime
|
||||
- Network interface
|
||||
- Swap
|
||||
* CPU used/free/idle/etc
|
||||
* Free disk (via mounting hosts '/' into container, eg: -v /:/hostfs:ro)
|
||||
* Disk performance
|
||||
* Load average
|
||||
* Memory used/free/etc
|
||||
* Uptime
|
||||
* Network interface
|
||||
* Swap
|
||||
|
||||
Environment variables
|
||||
---------------------
|
||||
|
||||
- `HOST_NAME`
|
||||
* `HOST_NAME`
|
||||
- Will be sent to Graphite
|
||||
- Required
|
||||
- `GRAPHITE_HOST`
|
||||
* `GRAPHITE_HOST`
|
||||
- Graphite IP or hostname
|
||||
- Required
|
||||
- `GRAPHITE_PORT`
|
||||
* `GRAPHITE_PORT`
|
||||
- Graphite port
|
||||
- Optional, defaults to 2003
|
||||
- `GRAPHITE_PREFIX`
|
||||
* `GRAPHITE_PREFIX`
|
||||
- Graphite prefix
|
||||
- Optional, defaults to collectd.
|
||||
- `REPORT_BY_CPU`
|
||||
* `REPORT_BY_CPU`
|
||||
- Report per-CPU metrics if true, global sum of CPU metrics if false (details: [collectd.conf man page](https://collectd.org/documentation/manpages/collectd.conf.5.shtml#plugin_cpu))
|
||||
- Optional, defaults to false.
|
||||
- `COLLECT_INTERVAL`
|
||||
* `COLLECT_INTERVAL`
|
||||
- Collection interval and thus resolution of metrics
|
||||
- Optional, defaults to 10
|
||||
|
||||
@@ -821,7 +821,7 @@ filebeat.inputs:
|
||||
|
||||
# By default Ingest pipelines are not updated if a pipeline with the same ID
|
||||
# already exists. If this option is enabled Filebeat overwrites pipelines
|
||||
# every time a new Elasticsearch connection is established.
|
||||
# everytime a new Elasticsearch connection is established.
|
||||
#filebeat.overwrite_pipelines: false
|
||||
|
||||
# How long filebeat waits on shutdown for the publisher to finish.
|
||||
|
||||
@@ -821,7 +821,7 @@ filebeat.inputs:
|
||||
|
||||
# By default Ingest pipelines are not updated if a pipeline with the same ID
|
||||
# already exists. If this option is enabled Filebeat overwrites pipelines
|
||||
# every time a new Elasticsearch connection is established.
|
||||
# everytime a new Elasticsearch connection is established.
|
||||
#filebeat.overwrite_pipelines: false
|
||||
|
||||
# How long filebeat waits on shutdown for the publisher to finish.
|
||||
|
||||
@@ -35,7 +35,7 @@ RUN if [ ! -z "${CONTAINER_TIMEZONE}" ]; \
|
||||
|
||||
# fix python dependencies (LTS Django and newer memcached/txAMQP)
|
||||
RUN pip install --upgrade pip && \
|
||||
pip install --no-cache-dir django==1.8.18 \
|
||||
pip install django==1.8.18 \
|
||||
python-memcached==1.53 \
|
||||
txAMQP==0.6.2
|
||||
|
||||
@@ -62,13 +62,13 @@ RUN python ./setup.py install
|
||||
# install carbon
|
||||
RUN git clone -b ${carbon_version} --depth 1 ${carbon_repo} /usr/local/src/carbon
|
||||
WORKDIR /usr/local/src/carbon
|
||||
RUN pip install --no-cache-dir -r requirements.txt \
|
||||
RUN pip install -r requirements.txt \
|
||||
&& python ./setup.py install
|
||||
|
||||
# install graphite
|
||||
RUN git clone -b ${graphite_version} --depth 1 ${graphite_repo} /usr/local/src/graphite-web
|
||||
WORKDIR /usr/local/src/graphite-web
|
||||
RUN pip install --no-cache-dir -r requirements.txt \
|
||||
RUN pip install -r requirements.txt \
|
||||
&& python ./setup.py install
|
||||
|
||||
# install statsd
|
||||
|
||||
@@ -30,7 +30,7 @@ fi
|
||||
# - /opt/statsd
|
||||
statsd_dir_contents=$(find /opt/statsd -mindepth 1 -print -quit)
|
||||
if [[ -z $statsd_dir_contents ]]; then
|
||||
git clone --depth 1 -b v0.7.2 https://github.com/etsy/statsd.git /opt/statsd
|
||||
git clone -b v0.7.2 https://github.com/etsy/statsd.git /opt/statsd
|
||||
cp $conf_dir/opt/statsd/config.js /opt/statsd/config.js
|
||||
fi
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
influxdb_version=1.8.1-alpine
|
||||
@@ -1,5 +1,5 @@
|
||||
influxdb:
|
||||
image: influxdb:${influxdb_version}
|
||||
image: influxdb:1.7.6
|
||||
container_name: influxdb
|
||||
ports:
|
||||
- '2004:2004'
|
||||
|
||||
@@ -1057,7 +1057,7 @@
|
||||
# ## Custom resource type
|
||||
# # resource_type = "generic_node"
|
||||
#
|
||||
# ## Additional resource labels
|
||||
# ## Additonal resource labels
|
||||
# # [outputs.stackdriver.resource_labels]
|
||||
# # node_id = "$HOSTNAME"
|
||||
# # namespace = "myapp"
|
||||
@@ -2169,7 +2169,7 @@
|
||||
#
|
||||
# ## Metrics list
|
||||
# ## List of metrics can be found on Graylog webservice documentation.
|
||||
# ## Or by hitting the web service api at:
|
||||
# ## Or by hitting the the web service api at:
|
||||
# ## http://[graylog-host]:12900/system/metrics
|
||||
# metrics = [
|
||||
# "jvm.cl.loaded",
|
||||
@@ -3346,7 +3346,7 @@
|
||||
# # pid_finder = "pgrep"
|
||||
|
||||
|
||||
# # Reads last_run_summary.yaml file and converts to measurements
|
||||
# # Reads last_run_summary.yaml file and converts to measurments
|
||||
# [[inputs.puppetagent]]
|
||||
# ## Location of puppet last run summary file
|
||||
# location = "/var/lib/puppet/state/last_run_summary.yaml"
|
||||
@@ -5196,11 +5196,11 @@
|
||||
# ## separator character to use for measurement and field names (default: "_")
|
||||
# # separator = "_"
|
||||
#
|
||||
# ## number of objects to retrieve per query for realtime resources (vms and hosts)
|
||||
# ## number of objects to retreive per query for realtime resources (vms and hosts)
|
||||
# ## set to 64 for vCenter 5.5 and 6.0 (default: 256)
|
||||
# # max_query_objects = 256
|
||||
#
|
||||
# ## number of metrics to retrieve per query for non-realtime resources (clusters and datastores)
|
||||
# ## number of metrics to retreive per query for non-realtime resources (clusters and datastores)
|
||||
# ## set to 64 for vCenter 5.5 and 6.0 (default: 256)
|
||||
# # max_query_metrics = 256
|
||||
#
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# This Dockerfile builds an image for a client_golang example.
|
||||
|
||||
# Builder image, where we build the example.
|
||||
FROM golang:1.15.1 AS builder
|
||||
FROM golang:1.14.1 AS builder
|
||||
# Download prometheus/client_golang/examples/random first
|
||||
RUN go get github.com/prometheus/client_golang/examples/random
|
||||
WORKDIR /go/src/github.com/prometheus/client_golang
|
||||
|
||||
@@ -5,10 +5,10 @@ scaling up/down number of Grafana instances.
|
||||
|
||||
Included services
|
||||
|
||||
- Grafana
|
||||
- Mysql - Grafana configuration database and session storage
|
||||
- Prometheus - Monitoring of Grafana and used as data source of provisioned alert rules
|
||||
- Nginx - Reverse proxy for Grafana and Prometheus. Enables browsing Grafana/Prometheus UI using a hostname
|
||||
* Grafana
|
||||
* Mysql - Grafana configuration database and session storage
|
||||
* Prometheus - Monitoring of Grafana and used as data source of provisioned alert rules
|
||||
* Nginx - Reverse proxy for Grafana and Prometheus. Enables browsing Grafana/Prometheus UI using a hostname
|
||||
|
||||
## Prerequisites
|
||||
|
||||
@@ -53,8 +53,8 @@ $ docker-compose up -d
|
||||
```
|
||||
|
||||
Browse
|
||||
- http://grafana.loc/
|
||||
- http://prometheus.loc/
|
||||
* http://grafana.loc/
|
||||
* http://prometheus.loc/
|
||||
|
||||
Check for any errors
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ Example output:
|
||||
|
||||
█ user auth token test
|
||||
|
||||
█ user authenticates through ui with username and password
|
||||
█ user authenticates thru ui with username and password
|
||||
|
||||
✓ response status is 200
|
||||
✓ response has cookie 'grafana_session' with 32 characters
|
||||
|
||||
@@ -3,7 +3,7 @@ import { createClient, createBasicAuthClient } from './modules/client.js';
|
||||
import { createTestOrgIfNotExists, createTestdataDatasourceIfNotExists } from './modules/util.js';
|
||||
|
||||
export let options = {
|
||||
noCookiesReset: true,
|
||||
noCookiesReset: true
|
||||
};
|
||||
|
||||
let endpoint = __ENV.URL || 'http://localhost:3000';
|
||||
@@ -18,38 +18,35 @@ export const setup = () => {
|
||||
orgId: orgId,
|
||||
datasourceId: datasourceId,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export default data => {
|
||||
group('annotation by tag test', () => {
|
||||
export default (data) => {
|
||||
group("annotation by tag test", () => {
|
||||
if (__ITER === 0) {
|
||||
group('user authenticates through ui with username and password', () => {
|
||||
group("user authenticates thru ui with username and password", () => {
|
||||
let res = client.ui.login('admin', 'admin');
|
||||
|
||||
check(res, {
|
||||
'response status is 200': r => r.status === 200,
|
||||
"response has cookie 'grafana_session' with 32 characters": r =>
|
||||
r.cookies.grafana_session[0].value.length === 32,
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
'response has cookie \'grafana_session\' with 32 characters': (r) => r.cookies.grafana_session[0].value.length === 32,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (__ITER !== 0) {
|
||||
group('batch tsdb requests with annotations by tag', () => {
|
||||
group("batch tsdb requests with annotations by tag", () => {
|
||||
const batchCount = 20;
|
||||
const requests = [];
|
||||
const payload = {
|
||||
from: '1547765247624',
|
||||
to: '1547768847624',
|
||||
queries: [
|
||||
{
|
||||
refId: 'A',
|
||||
scenarioId: 'random_walk',
|
||||
intervalMs: 10000,
|
||||
maxDataPoints: 433,
|
||||
datasourceId: data.datasourceId,
|
||||
},
|
||||
],
|
||||
queries: [{
|
||||
refId: 'A',
|
||||
scenarioId: 'random_walk',
|
||||
intervalMs: 10000,
|
||||
maxDataPoints: 433,
|
||||
datasourceId: data.datasourceId,
|
||||
}]
|
||||
};
|
||||
|
||||
requests.push({ method: 'GET', url: '/api/annotations?from=1580825186534&to=1580846786535' });
|
||||
@@ -61,14 +58,14 @@ export default data => {
|
||||
let responses = client.batch(requests);
|
||||
for (let n = 0; n < batchCount; n++) {
|
||||
check(responses[n], {
|
||||
'response status is 200': r => r.status === 200,
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
sleep(5);
|
||||
};
|
||||
sleep(5)
|
||||
}
|
||||
|
||||
export const teardown = data => {};
|
||||
export const teardown = (data) => {}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { sleep, check, group } from 'k6';
|
||||
import { createBasicAuthClient } from './modules/client.js';
|
||||
|
||||
export let options = {
|
||||
noCookiesReset: true,
|
||||
noCookiesReset: true
|
||||
};
|
||||
|
||||
let endpoint = __ENV.URL || 'http://localhost:10080/grafana';
|
||||
@@ -19,17 +19,17 @@ export const setup = () => {
|
||||
return {
|
||||
datasourceId: res.json().id,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export default data => {
|
||||
group('auth proxy test', () => {
|
||||
group('batch proxy requests', () => {
|
||||
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 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' });
|
||||
@@ -44,13 +44,13 @@ export default data => {
|
||||
let responses = client.batch(requests);
|
||||
for (let n = 0; n < batchCount; n++) {
|
||||
check(responses[n], {
|
||||
'response status is 200': r => r.status === 200,
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
sleep(5);
|
||||
};
|
||||
sleep(5)
|
||||
}
|
||||
|
||||
export const teardown = data => {};
|
||||
export const teardown = (data) => {}
|
||||
|
||||
@@ -3,11 +3,11 @@ import { createClient, createBasicAuthClient } from './modules/client.js';
|
||||
import { createTestOrgIfNotExists, createTestdataDatasourceIfNotExists } from './modules/util.js';
|
||||
|
||||
export let options = {
|
||||
noCookiesReset: true,
|
||||
noCookiesReset: true
|
||||
};
|
||||
|
||||
let endpoint = __ENV.URL || 'http://localhost:3000';
|
||||
const slowQuery = __ENV.SLOW_QUERY && __ENV.SLOW_QUERY.length > 0 ? parseInt(__ENV.SLOW_QUERY, 10) : 5;
|
||||
const slowQuery = (__ENV.SLOW_QUERY && __ENV.SLOW_QUERY.length > 0) ? parseInt(__ENV.SLOW_QUERY, 10) : 5;
|
||||
const client = createClient(endpoint);
|
||||
|
||||
export const setup = () => {
|
||||
@@ -19,18 +19,17 @@ export const setup = () => {
|
||||
orgId: orgId,
|
||||
datasourceId: datasourceId,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export default data => {
|
||||
export default (data) => {
|
||||
group(`user auth token slow test (queries between 1 and ${slowQuery} seconds)`, () => {
|
||||
if (__ITER === 0) {
|
||||
group('user authenticates through ui with username and password', () => {
|
||||
group("user authenticates thru ui with username and password", () => {
|
||||
let res = client.ui.login('admin', 'admin');
|
||||
|
||||
check(res, {
|
||||
'response status is 200': r => r.status === 200,
|
||||
"response has cookie 'grafana_session' with 32 characters": r =>
|
||||
r.cookies.grafana_session[0].value.length === 32,
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
'response has cookie \'grafana_session\' with 32 characters': (r) => r.cookies.grafana_session[0].value.length === 32,
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -42,16 +41,14 @@ export default data => {
|
||||
const payload = {
|
||||
from: '1547765247624',
|
||||
to: '1547768847624',
|
||||
queries: [
|
||||
{
|
||||
refId: 'A',
|
||||
scenarioId: 'slow_query',
|
||||
stringInput: `${Math.floor(Math.random() * slowQuery) + 1}s`,
|
||||
intervalMs: 10000,
|
||||
maxDataPoints: 433,
|
||||
datasourceId: data.datasourceId,
|
||||
},
|
||||
],
|
||||
queries: [{
|
||||
refId: 'A',
|
||||
scenarioId: 'slow_query',
|
||||
stringInput: `${Math.floor(Math.random() * slowQuery) + 1}s`,
|
||||
intervalMs: 10000,
|
||||
maxDataPoints: 433,
|
||||
datasourceId: data.datasourceId,
|
||||
}]
|
||||
};
|
||||
|
||||
requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' });
|
||||
@@ -63,14 +60,14 @@ export default data => {
|
||||
let responses = client.batch(requests);
|
||||
for (let n = 0; n < batchCount; n++) {
|
||||
check(responses[n], {
|
||||
'response status is 200': r => r.status === 200,
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
sleep(5);
|
||||
};
|
||||
sleep(5)
|
||||
}
|
||||
|
||||
export const teardown = data => {};
|
||||
export const teardown = (data) => {}
|
||||
|
||||
@@ -3,7 +3,7 @@ import { createClient, createBasicAuthClient } from './modules/client.js';
|
||||
import { createTestOrgIfNotExists, createTestdataDatasourceIfNotExists } from './modules/util.js';
|
||||
|
||||
export let options = {
|
||||
noCookiesReset: true,
|
||||
noCookiesReset: true
|
||||
};
|
||||
|
||||
let endpoint = __ENV.URL || 'http://localhost:3000';
|
||||
@@ -18,38 +18,35 @@ export const setup = () => {
|
||||
orgId: orgId,
|
||||
datasourceId: datasourceId,
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export default data => {
|
||||
group('user auth token test', () => {
|
||||
export default (data) => {
|
||||
group("user auth token test", () => {
|
||||
if (__ITER === 0) {
|
||||
group('user authenticates through ui with username and password', () => {
|
||||
group("user authenticates thru ui with username and password", () => {
|
||||
let res = client.ui.login('admin', 'admin');
|
||||
|
||||
check(res, {
|
||||
'response status is 200': r => r.status === 200,
|
||||
"response has cookie 'grafana_session' with 32 characters": r =>
|
||||
r.cookies.grafana_session[0].value.length === 32,
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
'response has cookie \'grafana_session\' with 32 characters': (r) => r.cookies.grafana_session[0].value.length === 32,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
if (__ITER !== 0) {
|
||||
group('batch tsdb requests', () => {
|
||||
group("batch tsdb requests", () => {
|
||||
const batchCount = 20;
|
||||
const requests = [];
|
||||
const payload = {
|
||||
from: '1547765247624',
|
||||
to: '1547768847624',
|
||||
queries: [
|
||||
{
|
||||
refId: 'A',
|
||||
scenarioId: 'random_walk',
|
||||
intervalMs: 10000,
|
||||
maxDataPoints: 433,
|
||||
datasourceId: data.datasourceId,
|
||||
},
|
||||
],
|
||||
queries: [{
|
||||
refId: 'A',
|
||||
scenarioId: 'random_walk',
|
||||
intervalMs: 10000,
|
||||
maxDataPoints: 433,
|
||||
datasourceId: data.datasourceId,
|
||||
}]
|
||||
};
|
||||
|
||||
requests.push({ method: 'GET', url: '/api/annotations?dashboardId=2074&from=1548078832772&to=1548082432772' });
|
||||
@@ -61,14 +58,14 @@ export default data => {
|
||||
let responses = client.batch(requests);
|
||||
for (let n = 0; n < batchCount; n++) {
|
||||
check(responses[n], {
|
||||
'response status is 200': r => r.status === 200,
|
||||
'response status is 200': (r) => r.status === 200,
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
sleep(5);
|
||||
};
|
||||
sleep(5)
|
||||
}
|
||||
|
||||
export const teardown = data => {};
|
||||
export const teardown = (data) => {}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import http from 'k6/http';
|
||||
import http from "k6/http";
|
||||
import encoding from 'k6/encoding';
|
||||
|
||||
export const UIEndpoint = class UIEndpoint {
|
||||
@@ -10,7 +10,7 @@ export const UIEndpoint = class UIEndpoint {
|
||||
const payload = { user: username, password: pwd };
|
||||
return this.httpClient.formPost('/login', payload);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export const DatasourcesEndpoint = class DatasourcesEndpoint {
|
||||
constructor(httpClient) {
|
||||
@@ -32,7 +32,7 @@ export const DatasourcesEndpoint = class DatasourcesEndpoint {
|
||||
delete(id) {
|
||||
return this.httpClient.delete(`/datasources/${id}`);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export const OrganizationsEndpoint = class OrganizationsEndpoint {
|
||||
constructor(httpClient) {
|
||||
@@ -57,7 +57,7 @@ export const OrganizationsEndpoint = class OrganizationsEndpoint {
|
||||
delete(id) {
|
||||
return this.httpClient.delete(`/orgs/${id}`);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export const GrafanaClient = class GrafanaClient {
|
||||
constructor(httpClient) {
|
||||
@@ -79,10 +79,10 @@ export const GrafanaClient = class GrafanaClient {
|
||||
onBeforeRequest(params) {
|
||||
if (this.orgId && this.orgId > 0) {
|
||||
params = params.headers || {};
|
||||
params.headers['X-Grafana-Org-Id'] = this.orgId;
|
||||
params.headers["X-Grafana-Org-Id"] = this.orgId;
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export const BaseClient = class BaseClient {
|
||||
constructor(url, subUrl) {
|
||||
@@ -99,12 +99,14 @@ export const BaseClient = class BaseClient {
|
||||
}
|
||||
|
||||
withUrl(subUrl) {
|
||||
let c = new BaseClient(this.url, subUrl);
|
||||
let c = new BaseClient(this.url, subUrl);
|
||||
c.onBeforeRequest = this.onBeforeRequest;
|
||||
return c;
|
||||
}
|
||||
|
||||
beforeRequest(params) {}
|
||||
beforeRequest(params) {
|
||||
|
||||
}
|
||||
|
||||
get(url, params) {
|
||||
params = params || {};
|
||||
@@ -154,7 +156,7 @@ export const BaseClient = class BaseClient {
|
||||
|
||||
return http.batch(requests);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export class BasicAuthClient extends BaseClient {
|
||||
constructor(url, subUrl, username, password) {
|
||||
@@ -164,7 +166,7 @@ export class BasicAuthClient extends BaseClient {
|
||||
}
|
||||
|
||||
withUrl(subUrl) {
|
||||
let c = new BasicAuthClient(this.url, subUrl, this.username, this.password);
|
||||
let c = new BasicAuthClient(this.url, subUrl, this.username, this.password);
|
||||
c.onBeforeRequest = this.onBeforeRequest;
|
||||
return c;
|
||||
}
|
||||
@@ -177,10 +179,10 @@ export class BasicAuthClient extends BaseClient {
|
||||
}
|
||||
}
|
||||
|
||||
export const createClient = url => {
|
||||
export const createClient = (url) => {
|
||||
return new GrafanaClient(new BaseClient(url, ''));
|
||||
};
|
||||
}
|
||||
|
||||
export const createBasicAuthClient = (url, username, password) => {
|
||||
return new GrafanaClient(new BasicAuthClient(url, '', username, password));
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const createTestOrgIfNotExists = client => {
|
||||
export const createTestOrgIfNotExists = (client) => {
|
||||
let orgId = 0;
|
||||
let res = client.orgs.getByName('k6');
|
||||
if (res.status === 404) {
|
||||
@@ -13,9 +13,9 @@ export const createTestOrgIfNotExists = client => {
|
||||
|
||||
client.withOrgId(orgId);
|
||||
return orgId;
|
||||
};
|
||||
}
|
||||
|
||||
export const createTestdataDatasourceIfNotExists = client => {
|
||||
export const createTestdataDatasourceIfNotExists = (client) => {
|
||||
const payload = {
|
||||
access: 'proxy',
|
||||
isDefault: false,
|
||||
@@ -32,4 +32,4 @@ export const createTestdataDatasourceIfNotExists = client => {
|
||||
}
|
||||
|
||||
return res.json().id;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,15 +1,19 @@
|
||||
module.exports = {
|
||||
verbose: true,
|
||||
globals: {
|
||||
'ts-jest': {
|
||||
tsConfigFile: 'tsconfig.json',
|
||||
},
|
||||
"globals": {
|
||||
"ts-jest": {
|
||||
"tsConfigFile": "tsconfig.json"
|
||||
}
|
||||
},
|
||||
transform: {
|
||||
'^.+\\.tsx?$': '<rootDir>/../../node_modules/ts-jest/preprocessor.js',
|
||||
"transform": {
|
||||
"^.+\\.tsx?$": "<rootDir>/../../node_modules/ts-jest/preprocessor.js"
|
||||
},
|
||||
moduleDirectories: ['node_modules'],
|
||||
testRegex: '(\\.|/)(test)\\.ts$',
|
||||
testEnvironment: 'node',
|
||||
moduleFileExtensions: ['ts', 'js', 'json'],
|
||||
"moduleDirectories": ["node_modules"],
|
||||
"testRegex": "(\\.|/)(test)\\.ts$",
|
||||
"testEnvironment": "node",
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"js",
|
||||
"json"
|
||||
],
|
||||
};
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
FROM tutum/nginx
|
||||
RUN rm /etc/nginx/sites-enabled/default
|
||||
ADD sites-enabled /etc/nginx/sites-enabled
|
||||
@@ -1,14 +0,0 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
access_log /var/log/nginx/verdaccio.log;
|
||||
charset utf-8;
|
||||
location / {
|
||||
proxy_pass http://grafana-npm.local:4873/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
proxy_ssl_session_reuse off;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
verdaccio:
|
||||
image: verdaccio/verdaccio:4
|
||||
container_name: verdaccio_root_path
|
||||
ports:
|
||||
- "4873:4873"
|
||||
volumes:
|
||||
- verdaccio:/verdaccio
|
||||
|
||||
nginx:
|
||||
restart: always
|
||||
build: conf/nginx
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- /www/public
|
||||
volumes_from:
|
||||
- verdaccio
|
||||
links:
|
||||
- verdaccio:verdaccio
|
||||
|
||||
volumes:
|
||||
verdaccio:
|
||||
driver: local
|
||||
@@ -6,9 +6,6 @@ docs:
|
||||
docker pull ${IMAGE}
|
||||
docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it $(IMAGE) /bin/bash -c 'make server'
|
||||
|
||||
docs-no-pull:
|
||||
docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest -p 3002:3002 --rm -it $(IMAGE) /bin/bash -c 'make server'
|
||||
|
||||
docs-test:
|
||||
docker pull ${IMAGE}
|
||||
docker run -v $(shell pwd)/sources:/hugo/content/docs/grafana/latest --rm -it $(IMAGE) /bin/bash -c 'make prod'
|
||||
|
||||
@@ -9,7 +9,7 @@ Docker >= 2.1.0.3
|
||||
## Build the doc site
|
||||
|
||||
1. In the command line, make sure you are in the docs folder: `cd docs`.
|
||||
1. Run `make docs`. This launches a preview of the docs website at `http://localhost:3002/docs/grafana/latest/` which will refresh automatically when changes to content in the `sources` directory are made.
|
||||
2. Run `make docs`. This launches a preview of the docs website at `http://localhost:3002/docs/grafana/latest/` which will refresh automatically when changes to content in the `sources` directory are made.
|
||||
|
||||
---
|
||||
|
||||
@@ -33,6 +33,6 @@ Images are currently hosted in the grafana/website repo.
|
||||
|
||||
## Deploy changes to grafana.com
|
||||
|
||||
When a PR is merged to master with changes in the `docs/sources` directory, those changes are automatically synched to the grafana/website repo and published to the staging site.
|
||||
When a PR is merged to master with changes in the `docs` directory, those changes are automatically synched to the grafana/website repo on the `docs-grafana` branch.
|
||||
|
||||
Generally, someone from marketing will publish to production each day, so as long as the sync is successful your docs edits will be published. Alternatively, you can refer to [publishing to production](https://github.com/grafana/website#publishing-to-production-grafanacom) if you'd like to do it yourself.
|
||||
In order to make those changes live, open a PR in the website repo that merges the `docs-grafana` branch into `master`. Then follow the publishing guidelines in that repo.
|
||||
|
||||
@@ -30,7 +30,7 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
|
||||
<img src="/static/img/logos/logo-docker.svg">
|
||||
<h5>Run Docker image</h5>
|
||||
</a>
|
||||
<a href="https://grafana.com/docs/grafana-cloud/" class="nav-cards__item nav-cards__item--install">
|
||||
<a href="https://grafana.com/cloud/grafana" class="nav-cards__item nav-cards__item--install">
|
||||
<div class="nav-cards__icon fa fa-cloud">
|
||||
</div>
|
||||
<h5>Grafana Cloud</h5>
|
||||
@@ -65,8 +65,8 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
|
||||
<h4>Provisioning</h4>
|
||||
<p>Learn how to automate your Grafana configuration.</p>
|
||||
</a>
|
||||
<a href="{{< relref "whatsnew/whats-new-in-v7-2.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v7.2</h4>
|
||||
<a href="{{< relref "guides/whats-new-in-v7-0.md" >}}" class="nav-cards__item nav-cards__item--guide">
|
||||
<h4>What's new in v7.0</h4>
|
||||
<p>Explore the features and enhancements in the latest release.</p>
|
||||
</a>
|
||||
|
||||
@@ -75,51 +75,51 @@ aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin",
|
||||
## Data source guides
|
||||
|
||||
<div class="nav-cards">
|
||||
<a href="{{< relref "datasources/graphite.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/graphite.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_graphite.svg" >
|
||||
<h5>Graphite</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/elasticsearch.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/elasticsearch.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_elasticsearch.svg" >
|
||||
<h5>Elasticsearch</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/influxdb.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/influxdb.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_influxdb.svg" >
|
||||
<h5>InfluxDB</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/prometheus.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/prometheus.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_prometheus.svg" >
|
||||
<h5>Prometheus</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/cloudmonitoring.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/cloudmonitoring.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_cloudmonitoring.svg">
|
||||
<h5>Google Cloud Monitoring</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/cloudwatch.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/cloudwatch.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_cloudwatch.svg">
|
||||
<h5>AWS CloudWatch</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/azuremonitor.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/azuremonitor.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_azure_monitor.jpg">
|
||||
<h5>Azure Monitor</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/loki.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/loki.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_loki.svg">
|
||||
<h5>Loki</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/mysql.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/mysql.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_mysql.png" >
|
||||
<h5>MySQL</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/postgres.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/postgres.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_postgres.svg" >
|
||||
<h5>Postgres</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/mssql.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/mssql.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/sql_server_logo.svg">
|
||||
<h5>Microsoft SQL Server</h5>
|
||||
</a>
|
||||
<a href="{{< relref "datasources/opentsdb.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<a href="{{< relref "features/datasources/opentsdb.md" >}}" class="nav-cards__item nav-cards__item--ds">
|
||||
<img src="/img/docs/logos/icon_opentsdb.png" >
|
||||
<h5>OpenTSDB</h5>
|
||||
</a>
|
||||
|
||||
@@ -5,15 +5,9 @@ type = "docs"
|
||||
[menu.docs]
|
||||
name = "Administration"
|
||||
identifier = "admin"
|
||||
weight = 20
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
# Administration
|
||||
|
||||
This section includes information for Grafana administrators, team administrators, and users performing administrative tasks:
|
||||
|
||||
- [Change password]({{< relref "change-your-password" >}})
|
||||
- [Change Preferences]({{< relref "preferences" >}})
|
||||
- [Configuration]({{< relref "configuration" >}})
|
||||
- [Configure Docker image]({{< relref "configure-docker" >}})
|
||||
- [Security]({{< relref "security" >}})
|
||||
This section provides resources for Grafana administrators.
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
+++
|
||||
title = "Change the default home dashboard"
|
||||
description = "How to replace the default home dashboard"
|
||||
keywords = ["grafana", "configuration", "documentation", "home"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Home Dashboard"
|
||||
identifier = "change-home-dashboard"
|
||||
parent = "admin"
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Change the default home dashboard
|
||||
|
||||
You can change the default dashboard on the organization, team and user level. The home dashboard you set for the whole organization is the one all users will see by default. The team dashboard applies to all users assigned to the team in Grafana. The team dashboard overrides the organization dashboard settings. Personal dashboard settings override team dashboard settings.
|
||||
|
||||
## Set the home dashboard for your organization
|
||||
|
||||
### Set the default dashboard through preferences
|
||||
|
||||
1. Navigate to the dashboard you want to set as the home dashboard.
|
||||
1. Star this dashboard by clicking on the star next to the dashboard title.
|
||||
1. On the left menu, hover your cursor over the **Configuration** (gear) icon and then click **Preferences**.
|
||||
1. In the **Home Dashboard** field, select the dashboard you want to use for your home dashboard. Options include all starred dashboards.
|
||||
|
||||
### Set the default dashboard through configuration
|
||||
|
||||
If preferences are set as described above, then they override this value.
|
||||
You can provide your own JSON file to change the home dashboard. No user will be able to update this dashboard in Grafana.
|
||||
|
||||
#### [Optional] Convert an existing dashboard into a JSON file
|
||||
1. Navigate to your dashboard page.
|
||||
1. Click the **Share dashboard** icon next to the dashboard title.
|
||||
1. In the **Export** tab, click on **Save to file**.
|
||||
|
||||
#### Use a JSON file as the home dashboard
|
||||
1. Save your JSON file somewhere that Grafana can access it, for example, in the Grafana `data` folder of Grafana.
|
||||
1. Update your configuration file to set the path to the JSON file. Read how to update this file in the [configuration]({{< relref "./configuration.md">}}) documentation.
|
||||
```ini
|
||||
[dashboards]
|
||||
# Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
|
||||
default_home_dashboard_path = data/main-dashboard.json
|
||||
```
|
||||
|
||||
## Set home dashboard for your team
|
||||
|
||||
1. Navigate to the dashboard you want to set as the home dashboard.
|
||||
1. Star this dashboard by clicking on the star next to the dashboard title.
|
||||
1. On the left menu, hover your cursor over the **Configuration** (gear) icon and then click **Teams**.
|
||||
1. Click on the team you want to change the home dashboard for and then navigate to the **Settings** tab.
|
||||
1. In the **Home Dashboard** field, select the dashboard you want to use for your home dashboard. Options include all starred dashboards.
|
||||
|
||||
## Set your personal home dashboard
|
||||
|
||||
1. Navigate to the dashboard you want to set as the home dashboard.
|
||||
1. Star this dashboard by clicking on the star next to the dashboard title.
|
||||
1. On the left menu, hover your cursor over your avatar and then click **Preferences**.
|
||||
1. In the **Home Dashboard** field, select the dashboard you want to use for your home dashboard. Options include all starred dashboards.
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
+++
|
||||
title = "Change your password"
|
||||
description = "How to change your Grafana password"
|
||||
keywords = ["grafana", "password", "change", "preferences"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
identifier = "change-your-password"
|
||||
parent = "administration"
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
# Change your Grafana password
|
||||
|
||||
You can change your password in the Change Password tab.
|
||||
|
||||
> **Note:** If your Grafana instance uses an external authentication provider, then you might not be able to change your password. Contact your Grafana administrator for more information.
|
||||
|
||||
## Change your password
|
||||
|
||||
1. Hover your mouse over your user icon in the lower left corner of the screen.
|
||||
1. Click **Change Password**. Grafana opens the Change Password tab.
|
||||
1. Enter your **Old password** to authorize the change.
|
||||
1. Enter your **New password** and then **Confirm password**.
|
||||
1. Click **Change Password**.
|
||||
|
||||
## Admin user management resources
|
||||
|
||||
Grafana admins can use the following tools:
|
||||
|
||||
- Use the [User API]({{< relref "../http_api/user.md" >}}) to change your password programmatically or to manage users.
|
||||
- The [Manage users]({{< relref "../manage-users/_index.md" >}}) section explains how to manage users and teams.
|
||||
@@ -205,7 +205,7 @@ If there are two flags being used to set the homepath and the config file path,
|
||||
To correct this, use the `--homepath` global option to specify the Grafana default homepath for this command:
|
||||
|
||||
```bash
|
||||
grafana-cli admin reset-admin-password --homepath "/usr/share/grafana" <new password>
|
||||
grafana-cli --homepath "/usr/share/grafana" admin reset-admin-password <new password>
|
||||
```
|
||||
|
||||
If you have not lost the admin password, we recommend that you change the user password either in the User Preferences or in the Server Admin > User tab.
|
||||
|
||||
@@ -8,7 +8,7 @@ aliases = ["/docs/grafana/latest/installation/configuration/"]
|
||||
name = "Configuration"
|
||||
identifier = "config"
|
||||
parent = "admin"
|
||||
weight = 300
|
||||
weight = 1
|
||||
+++
|
||||
|
||||
# Configuration
|
||||
@@ -31,13 +31,13 @@ If you installed Grafana using the `deb` or `rpm` packages, then your configurat
|
||||
|
||||
### Docker
|
||||
|
||||
Refer to [Configure a Grafana Docker image]({{< relref "configure-docker.md" >}}) for information about environmental variables, persistent storage, and building custom Docker images.
|
||||
Refer to [Configure a Grafana Docker image]({{< relref "../installation/configure-docker.md" >}}) for information about environmental variables, persistent storage, and building custom Docker images.
|
||||
|
||||
### Windows
|
||||
|
||||
`sample.ini` is in the same directory as `defaults.ini` and contains all the settings commented out. Copy `sample.ini` and name it `custom.ini`.
|
||||
|
||||
### macOS
|
||||
### MacOS
|
||||
|
||||
By default, the configuration file is located at `/usr/local/etc/grafana/grafana.ini`. To configure Grafana, add a configuration file named `custom.ini` to the `conf` folder to override any of the settings defined in `conf/defaults.ini`.
|
||||
|
||||
@@ -173,13 +173,13 @@ Override log path using the command line argument `cfg:default.paths.log`:
|
||||
|
||||
### plugins
|
||||
|
||||
Directory where Grafana automatically scans and looks for plugins. Manually or automatically install any [plugins](https://grafana.com/docs/grafana/latest/plugins/installation/) here.
|
||||
Directory where Grafana automatically scans and looks for plugins. Manually or automatically install any plugins here.
|
||||
|
||||
**macOS:** By default, the Mac plugin location is: `/usr/local/var/lib/grafana/plugins`.
|
||||
|
||||
### provisioning
|
||||
|
||||
Folder that contains [provisioning]({{< relref "provisioning.md" >}}) config files that Grafana will apply on startup. Dashboards will be reloaded when the json files changes.
|
||||
Folder that contains [provisioning]({{< relref "provisioning.md" >}}) config files that grafana will apply on startup. Dashboards will be reloaded when the json files changes
|
||||
|
||||
<hr />
|
||||
|
||||
@@ -189,6 +189,8 @@ Folder that contains [provisioning]({{< relref "provisioning.md" >}}) config fil
|
||||
|
||||
`http`,`https`,`h2` or `socket`
|
||||
|
||||
> **Note:** Grafana versions earlier than 3.0 are vulnerable to [POODLE](https://en.wikipedia.org/wiki/POODLE). So we strongly recommend to upgrade to 3.x or use a reverse proxy for SSL termination.
|
||||
|
||||
### http_addr
|
||||
|
||||
The IP address to bind to. If empty will bind to all interfaces
|
||||
@@ -229,6 +231,8 @@ callback URL to be correct).
|
||||
|
||||
### serve_from_sub_path
|
||||
|
||||
> Available in Grafana 6.3+.
|
||||
|
||||
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.
|
||||
@@ -269,7 +273,7 @@ Path where the socket should be created when `protocol=socket`. Make sure that G
|
||||
## [database]
|
||||
|
||||
Grafana needs a database to store users and dashboards (and other
|
||||
things). By default it is configured to use [`sqlite3`](https://www.sqlite.org/index.html) which is an
|
||||
things). By default it is configured to use `sqlite3` which is an
|
||||
embedded database (included in the main Grafana binary).
|
||||
|
||||
### type
|
||||
@@ -389,26 +393,6 @@ How long the data proxy should wait before timing out. Default is 30 seconds.
|
||||
|
||||
This setting also applies to core backend HTTP data sources where query requests use an HTTP client with timeout set.
|
||||
|
||||
### keep_alive_seconds
|
||||
|
||||
Interval between keep-alive probes. Default is `30` seconds. For more details check the [Dialer.KeepAlive](https://golang.org/pkg/net/#Dialer.KeepAlive) documentation.
|
||||
|
||||
### tls_handshake_timeout_seconds
|
||||
|
||||
The length of time that Grafana will wait for a successful TLS handshake with the datasource. Default is `10` seconds. For more details check the [Transport.TLSHandshakeTimeout](https://golang.org/pkg/net/http/#Transport.TLSHandshakeTimeout) documentation.
|
||||
|
||||
### expect_continue_timeout_seconds
|
||||
|
||||
The length of time that Grafana will wait for a datasource’s first response headers after fully writing the request headers, if the request has an “Expect: 100-continue” header. A value of `0` will result in the body being sent immediately. Default is `1` second. For more details check the [Transport.ExpectContinueTimeout](https://golang.org/pkg/net/http/#Transport.ExpectContinueTimeout) documentation.
|
||||
|
||||
### max_idle_connections
|
||||
|
||||
The maximum number of idle connections that Grafana will maintain. Default is `100`. For more details check the [Transport.MaxIdleConns](https://golang.org/pkg/net/http/#Transport.MaxIdleConns) documentation.
|
||||
|
||||
### idle_conn_timeout_seconds
|
||||
|
||||
The length of time that Grafana maintains idle connections before closing them. Default is `90` seconds. For more details check the [Transport.IdleConnTimeout](https://golang.org/pkg/net/http/#Transport.IdleConnTimeout) documentation.
|
||||
|
||||
### send_user_header
|
||||
|
||||
If enabled and user is not anonymous, data proxy will add X-Grafana-User header with username into the request. Default is `false`.
|
||||
@@ -481,7 +465,7 @@ Set to `true` if you host Grafana behind HTTPS. Default is `false`.
|
||||
|
||||
### cookie_samesite
|
||||
|
||||
Sets the `SameSite` cookie attribute and prevents the browser from sending this cookie along with cross-site requests. The main goal is to mitigate the risk of cross-origin information leakage. This setting also provides some protection against cross-site request forgery attacks (CSRF), [read more about SameSite here](https://owasp.org/www-community/SameSite). Valid values are `lax`, `strict`, `none`, and `disabled`. Default is `lax`. Using value `disabled` does not add any `SameSite` attribute to cookies.
|
||||
Sets the `SameSite` cookie attribute and prevents the browser from sending this cookie along with cross-site requests. The main goal is to mitigate the risk of cross-origin information leakage. This setting also provides some protection against cross-site request forgery attacks (CSRF), [read more about SameSite here](https://www.owasp.org/index.php/SameSite). Valid values are `lax`, `strict`, `none`, and `disabled`. Default is `lax`. Using value `disabled` does not add any `SameSite` attribute to cookies.
|
||||
|
||||
### allow_embedding
|
||||
|
||||
@@ -552,10 +536,6 @@ Number dashboard versions to keep (per dashboard). Default: `20`, Minimum: `1`.
|
||||
This prevents users from setting the dashboard refresh interval of a lower than given interval. Per default this is 5 seconds.
|
||||
The interval string is a possibly signed sequence of decimal numbers, followed by a unit suffix (ms, s, m, h, d), e.g. `30s` or `1m`.
|
||||
|
||||
### default_home_dashboard_path
|
||||
|
||||
Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
|
||||
|
||||
<hr />
|
||||
|
||||
## [users]
|
||||
@@ -621,12 +601,6 @@ Default is `false`.
|
||||
Editors can administrate dashboards, folders and teams they create.
|
||||
Default is `false`.
|
||||
|
||||
### user_invite_max_lifetime_duration
|
||||
|
||||
The duration in time a user invitation remains valid before expiring.
|
||||
This setting should be expressed as a duration. Examples: 6h (hours), 2d (days), 1w (week).
|
||||
Default is `24h` (24 hours). The minimum supported duration is `15m` (15 minutes).
|
||||
|
||||
<hr>
|
||||
|
||||
## [auth]
|
||||
@@ -668,24 +642,22 @@ This setting is ignored if multiple OAuth providers are configured. Default is `
|
||||
|
||||
### oauth_state_cookie_max_age
|
||||
|
||||
How many seconds the OAuth state cookie lives before being deleted. Default is `600` (seconds)
|
||||
How long the OAuth state cookie lives before being deleted. Default is `60` (seconds)
|
||||
Administrators can increase this if they experience OAuth login state mismatch errors.
|
||||
|
||||
### api_key_max_seconds_to_live
|
||||
|
||||
Limit of API key seconds to live before expiration. Default is -1 (unlimited).
|
||||
|
||||
### sigv4_auth_enabled
|
||||
### default_home_dashboard_path
|
||||
|
||||
> Only available in Grafana 7.3+.
|
||||
|
||||
Set to `true` to enable the AWS Signature Version 4 Authentication option for HTTP-based datasources. Default is `false`.
|
||||
Path to the default home dashboard. If this value is empty, then Grafana uses StaticRootPath + "dashboards/home.json"
|
||||
|
||||
<hr />
|
||||
|
||||
## [auth.anonymous]
|
||||
|
||||
Refer to [Anonymous authentication]({{< relref "../auth/grafana.md/#anonymous-authentication" >}}) for detailed instructions.
|
||||
Refer to [Anonymous authentication]({{< relref "../auth/#anonymous-authentication" >}}) for detailed instructions.
|
||||
|
||||
<hr />
|
||||
|
||||
@@ -751,7 +723,7 @@ Refer to [Auth proxy authentication]({{< relref "../auth/auth-proxy.md" >}}) for
|
||||
|
||||
## [auth.ldap]
|
||||
|
||||
Refer to [LDAP authentication]({{< relref "../auth/ldap.md" >}}) for detailed instructions.
|
||||
Refer to [LDAO authentication]({{< relref "../auth/ldap.md" >}}) for detailed instructions.
|
||||
|
||||
<hr />
|
||||
|
||||
@@ -1004,48 +976,11 @@ Sets the minimum interval between rule evaluations. Default value is `1`.
|
||||
|
||||
> **Note.** This setting has precedence over each individual rule frequency. If a rule frequency is lower than this value, then this value is enforced.
|
||||
|
||||
### max_annotation_age =
|
||||
|
||||
Configures for how long alert annotations are stored. Default is 0, which keeps them forever.
|
||||
This setting should be expressed as a duration. Examples: 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
|
||||
### max_annotations_to_keep =
|
||||
|
||||
Configures max number of alert annotations that Grafana stores. Default value is 0, which keeps all alert annotations.
|
||||
|
||||
<hr>
|
||||
|
||||
## [annotations.dashboard]
|
||||
|
||||
Dashboard annotations means that annotations are associated with the dashboard they are created on.
|
||||
|
||||
### max_age
|
||||
|
||||
Configures how long dashboard annotations are stored. Default is 0, which keeps them forever.
|
||||
This setting should be expressed as a duration. Examples: 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
|
||||
### max_annotations_to_keep
|
||||
|
||||
Configures max number of dashboard annotations that Grafana stores. Default value is 0, which keeps all dashboard annotations.
|
||||
|
||||
## [annotations.api]
|
||||
|
||||
API annotations means that the annotations have been created using the API without any association with a dashboard.
|
||||
|
||||
### max_age
|
||||
|
||||
Configures how long Grafana stores API annotations. Default is 0, which keeps them forever.
|
||||
This setting should be expressed as a duration. Examples: 6h (hours), 10d (days), 2w (weeks), 1M (month).
|
||||
|
||||
### max_annotations_to_keep
|
||||
|
||||
Configures max number of API annotations that Grafana keeps. Default value is 0, which keeps all API annotations.
|
||||
|
||||
<hr>
|
||||
|
||||
## [explore]
|
||||
|
||||
For more information about this feature, refer to [Explore]({{< relref "../explore/index.md" >}}).
|
||||
For more information about this feature, refer to [Explore]({{< relref "../features/explore/index.md" >}}).
|
||||
|
||||
### enabled
|
||||
|
||||
@@ -1186,7 +1121,7 @@ keep the default, just leave this empty. You must still provide a `region` value
|
||||
Set this to true to force path-style addressing in S3 requests, i.e., `http://s3.amazonaws.com/BUCKET/KEY`, instead
|
||||
of the default, which is virtual hosted bucket addressing when possible (`http://BUCKET.s3.amazonaws.com/KEY`).
|
||||
|
||||
> **Note:** This option is specific to the Amazon S3 service.
|
||||
> Note: This option is specific to the Amazon S3 service.
|
||||
|
||||
### bucket_url
|
||||
|
||||
@@ -1244,10 +1179,10 @@ Optional URL to send to users in notifications. If the string contains the seque
|
||||
|
||||
### key_file
|
||||
|
||||
Optional path to JSON key file associated with a Google service account to authenticate and authorize. If no value is provided it tries to use the [application default credentials](https://cloud.google.com/docs/authentication/production#finding_credentials_automatically).
|
||||
Path to JSON key file associated with a Google service account to authenticate and authorize.
|
||||
Service Account keys can be created and downloaded from https://console.developers.google.com/permissions/serviceaccounts.
|
||||
|
||||
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 when signed urls are not enabled.
|
||||
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
|
||||
|
||||
@@ -1257,15 +1192,6 @@ Bucket Name on Google Cloud Storage.
|
||||
|
||||
Optional extra path inside bucket.
|
||||
|
||||
### enable_signed_urls
|
||||
|
||||
If set to true, Grafana creates a [signed URL](https://cloud.google.com/storage/docs/access-control/signed-urls] for
|
||||
the image uploaded to Google Cloud Storage.
|
||||
|
||||
### signed_url_expiration
|
||||
|
||||
Sets the signed URL expiration, which defaults to seven days.
|
||||
|
||||
## [external_image_storage.azure_blob]
|
||||
|
||||
### account_name
|
||||
@@ -1303,7 +1229,7 @@ If the remote HTTP image renderer service runs on a different server than the Gr
|
||||
### concurrent_render_request_limit
|
||||
|
||||
Concurrent render request limit affects when the /render HTTP endpoint is used. Rendering many images at the same time can overload the server,
|
||||
which this setting can help protect against by only allowing a certain number of concurrent requests. Default is `30`.
|
||||
which this setting can help protect against by only allowing a certain amount of concurrent requests. Default is `30`.
|
||||
|
||||
## [panels]
|
||||
|
||||
@@ -1313,7 +1239,7 @@ Set to `true` if you want to test alpha panels that are not yet ready for genera
|
||||
|
||||
### disable_sanitize_html
|
||||
|
||||
If set to true Grafana will allow script tags in text panels. Not recommended as it enables XSS vulnerabilities. Default is false. This setting was introduced in Grafana v6.0.
|
||||
If set to true Grafana will allow script tags in text panels. Not recommended as it enable XSS vulnerabilities. Default is false. This settings was introduced in Grafana v6.0.
|
||||
|
||||
## [plugins]
|
||||
|
||||
@@ -1389,7 +1315,7 @@ Mode `context` will cluster using incognito pages.
|
||||
|
||||
### rendering_clustering_max_concurrency
|
||||
|
||||
When rendering_mode = clustered you can define the maximum number of browser instances/incognito pages that can execute concurrently.
|
||||
When rendering_mode = clustered you can define maximum number of browser instances/incognito pages that can execute concurrently..
|
||||
|
||||
### rendering_viewport_max_width
|
||||
|
||||
@@ -1423,40 +1349,4 @@ For more information about Grafana Enterprise, refer to [Grafana Enterprise]({{<
|
||||
|
||||
### enable
|
||||
|
||||
Keys of alpha features to enable, separated by space. Available alpha features are: `transformations`,`ngalert`
|
||||
|
||||
## [date_formats]
|
||||
|
||||
> **Note:** The date format options below are only available in Grafana v7.2+.
|
||||
|
||||
This section controls system-wide defaults for date formats used in time ranges, graphs, and date input boxes.
|
||||
|
||||
The format patterns use [Moment.js](https://momentjs.com/docs/#/displaying/) formatting tokens.
|
||||
|
||||
### full_date
|
||||
|
||||
Full date format used by time range picker and in other places where a full date is rendered.
|
||||
|
||||
### intervals
|
||||
|
||||
These intervals formats are used in the graph to show only a partial date or time. For example, if there are only
|
||||
minutes between Y-axis tick labels then the `interval_minute` format is used.
|
||||
|
||||
Defaults
|
||||
|
||||
```
|
||||
interval_second = HH:mm:ss
|
||||
interval_minute = HH:mm
|
||||
interval_hour = MM/DD HH:mm
|
||||
interval_day = MM/DD
|
||||
interval_month = YYYY-MM
|
||||
interval_year = YYYY
|
||||
```
|
||||
|
||||
### use_browser_locale
|
||||
|
||||
Set this to `true` to have date formats automatically derived from your browser location. Defaults to `false`. This is an experimental feature.
|
||||
|
||||
### default_timezone
|
||||
|
||||
Used as the default time zone for user preferences. Can be either `browser` for the browser local time zone or a time zone name from the IANA Time Zone database, such as `UTC` or `Europe/Amsterdam`.
|
||||
Keys of alpha features to enable, separated by space. Available alpha features are: `transformations`
|
||||
|
||||
@@ -83,20 +83,20 @@ docker-compose up
|
||||
The following example describes how to build and run the remote HTTP rendering service as a standalone Node.js application and configure Grafana appropriately.
|
||||
|
||||
1. Clone the [Grafana image renderer plugin](https://grafana.com/grafana/plugins/grafana-image-renderer) Git repository.
|
||||
1. Install dependencies and build:
|
||||
2. Install dependencies and build:
|
||||
|
||||
```bash
|
||||
yarn install --pure-lockfile
|
||||
yarn run build
|
||||
```
|
||||
|
||||
1. Run the server:
|
||||
3. Run the server:
|
||||
|
||||
```bash
|
||||
node build/app.js server --port=8081
|
||||
```
|
||||
|
||||
1. Update Grafana configuration:
|
||||
4. Update Grafana configuration:
|
||||
|
||||
```
|
||||
[rendering]
|
||||
@@ -104,7 +104,7 @@ The following example describes how to build and run the remote HTTP rendering s
|
||||
callback_url = http://localhost:3000/
|
||||
```
|
||||
|
||||
1. Restart Grafana.
|
||||
5. Restart Grafana.
|
||||
|
||||
## PhantomJS
|
||||
|
||||
@@ -162,12 +162,6 @@ On Debian 9 (Stretch) the following dependencies have been confirmed as needed f
|
||||
libx11 libcairo bcairo2 libcairo2 libxtst6 libxcomposite1 libx11-xcb1 libxcursor1 libxdamage1 libnss3 libcups libcups2 libXss libXss1 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0
|
||||
```
|
||||
|
||||
On Debian 10 (Buster) the following dependencies have been confirmed as needed for the image rendering to function.
|
||||
|
||||
```bash
|
||||
libxdamage1 libxext6 libxi6 libxtst6 libnss3 libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libpango-1.0-0 libcairo2 libatspi2.0-0 libgtk3.0-cil libgdk3.0-cil libx11-xcb-dev
|
||||
```
|
||||
|
||||
**Centos:**
|
||||
|
||||
On a minimal Centos installation, the following dependencies have been confirmed as needed for the image rendering to function:
|
||||
@@ -178,7 +172,7 @@ libXcomposite libXdamage libXtst cups libXScrnSaver pango atk adwaita-cursor-the
|
||||
|
||||
### Certificate signed by internal certificate authorities
|
||||
|
||||
In many cases, Grafana runs on internal servers and uses certificates that have not been signed by a CA ([Certificate Authority](https://en.wikipedia.org/wiki/Certificate_authority)) known to Chrome, and therefore cannot be validated. Chrome internally uses NSS ([Network Security Services](https://en.wikipedia.org/wiki/Network_Security_Services)) for cryptographic operations such as the validation of certificates.
|
||||
In many cases, Grafana runs on internal servers and uses certificates that have not been signed by a CA ([Certificate Authority](https://en.wikipedia.org/wiki/Certificate_authority)) known to Chrome, and therefore cannot be validated. Chrome internally uses NSS ([Network Security Services](https://en.wikipedia.org/wiki/Network_Security_Services)) for cryptogtraphic operations such as the validation of certificates.
|
||||
|
||||
If you are using the Grafana Image Renderer with a Grafana server that uses a certificate signed by such a custom CA (for example a company-internal CA), rendering images will fail and you will see messages like this in the Grafana log:
|
||||
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
+++
|
||||
title = "Jaeger instrumentation"
|
||||
description = "Jaeger traces emitted and propagation by Grafana"
|
||||
keywords = ["grafana", "jaeger", "tracing"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
parent = "admin"
|
||||
weight = 9
|
||||
+++
|
||||
|
||||
# Jaeger instrumentation
|
||||
|
||||
Grafana supports [Jaeger tracing](https://www.jaegertracing.io/).
|
||||
|
||||
Grafana can emit Jaeger traces for its HTTP API endpoints and propagate Jaeger trace information to data sources.
|
||||
All HTTP endpoints are logged evenly (annotations, dashboard, tags, and so on).
|
||||
When a trace ID is propagated, it is reported with operation 'HTTP /datasources/proxy/:id/*'.
|
||||
|
||||
Refer to [Configuration]({{< relref "configuration.md#tracing-jaeger" >}}) for information about enabling Jaeger tracing.
|
||||
@@ -18,12 +18,12 @@ For more information about configuration options related to Grafana metrics, ref
|
||||
|
||||
When enabled, Grafana exposes a number of metrics, including:
|
||||
|
||||
- Active Grafana instances
|
||||
- Number of dashboards, users, and playlists
|
||||
- HTTP status codes
|
||||
- Requests by routing group
|
||||
- Grafana active alerts
|
||||
- Grafana performance
|
||||
* Active Grafana instances
|
||||
* Number of dashboards, users, and playlists
|
||||
* HTTP status codes
|
||||
* Requests by routing group
|
||||
* Grafana active alerts
|
||||
* Grafana performance
|
||||
|
||||
## Pull metrics from Grafana into Prometheus
|
||||
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
+++
|
||||
title = "Change your preferences"
|
||||
description = "How to change your Grafana preferences"
|
||||
keywords = ["grafana", "profile", "change", "preferences"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
identifier = "preferences"
|
||||
parent = "administration"
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
# Change your Grafana preferences
|
||||
|
||||
You can perform several tasks in the Preferences tab. You can edit your profile, change your Grafana preferences, and view information about your profile and Grafana usage.
|
||||
|
||||
## Edit your Grafana profile
|
||||
|
||||
Your profile includes your name, user name, and email address.
|
||||
|
||||
1. Navigate to the Preferences tab. Hover your cursor over your user icon in the lower left corner of the screen, and then click **Preferences.**
|
||||
1. In the Edit Profile section, you can edit any of the following:
|
||||
- **Name -** Edit this field to change the display name associated with your profile.
|
||||
- **Email -** Edit this field to change the email address associated with your profile.
|
||||
- **Username -** Edit this field to change your user name.
|
||||
1. Click **Save**.
|
||||
|
||||
## Edit your Grafana preferences
|
||||
|
||||
Your Grafana preferences include whether uses the dark or light theme, your home dashboard, and your timezone.
|
||||
|
||||
> **Note:** Settings on your personal instance override settings made by your administrator at the instance or team level.
|
||||
|
||||
1. Navigate to the Preferences tab. Hover your cursor over your user icon in the lower left corner of the screen, and then click **Preferences.**
|
||||
1. In the Preferences section, you can edit any of the following:
|
||||
- **UI Theme -** Click to set the **Dark** or **Light** to select a theme. **Default** is either the dark theme or the theme selected by your Grafana administrator.
|
||||
- **Home Dashboard -** Refer to [Set your personal home dashboard]({{< relref "change-home-dashboard.md#set-your-personal-home-dashboard" >}}) for more information.
|
||||
- **Timezone -** Click to select an option in the **Timezone** list. **Default** is either the browser local timezone or the timezone selected by your Grafana administrator. Refer to [Time range controls]({{< relref "../dashboards/time-range-controls.md" >}}) for more information about Grafana time settings.
|
||||
1. Click **Save**.
|
||||
|
||||
## View your assigned organizations
|
||||
|
||||
Every user is a member of at least one organization. You can have different roles in every organization that you are a member of.
|
||||
|
||||
1. Navigate to the Preferences tab. Hover your cursor over your user icon in the lower left corner of the screen, and then click **Preferences.**
|
||||
1. Scroll down to the Organizations section.
|
||||
- **Name -** The name of the organizations you are a member of in that Grafana instance.
|
||||
- **Role -** The role you are assigned in the organization. Refer to [Organization roles]({{< relref "../permissions/organization_roles.md" >}}) about permissions assigned to each role.
|
||||
- **Current -** Grafana tags the organization that you are currently signed in to as _Current_.
|
||||
|
||||
## View your Grafana sessions
|
||||
|
||||
Grafana logs your sessions in each Grafana instance. You can review this section if you suspect someone has misused your Grafana credentials.
|
||||
|
||||
1. Navigate to the Preferences tab. Hover your cursor over your user icon in the lower left corner of the screen, and then click **Preferences.**
|
||||
1. Scroll down to the Sessions section. Grafana displays the following:
|
||||
- **Last seen -** How long ago you logged on.
|
||||
- **Logged on -** The date you logged on to the current Grafana instance.
|
||||
- **IP address -** The IP address that you logged on from.
|
||||
- **Browser & OS -** The web browser and operating system used to log on to Grafana.
|
||||
- If you are a Grafana Admin for the instance, then you can revoke a session by clicking the red signout icon in the session row.
|
||||
@@ -23,7 +23,7 @@ Check out the [configuration]({{< relref "configuration.md" >}}) page for more i
|
||||
- Custom configuration from `$WORKING_DIR/conf/custom.ini`
|
||||
- The custom configuration file path can be overridden using the `--config` parameter
|
||||
|
||||
> **Note:** If you have installed Grafana using the `deb` or `rpm`
|
||||
> **Note.** If you have installed Grafana using the `deb` or `rpm`
|
||||
> packages, then your configuration file is located at
|
||||
> `/etc/grafana/grafana.ini`. This path is specified in the Grafana
|
||||
> init.d script using `--config` file parameter.
|
||||
@@ -32,7 +32,7 @@ Check out the [configuration]({{< relref "configuration.md" >}}) page for more i
|
||||
|
||||
It is possible to use environment variable interpolation in all 3 provisioning config types. Allowed syntax
|
||||
is either `$ENV_VAR_NAME` or `${ENV_VAR_NAME}` and can be used only for values not for keys or bigger parts
|
||||
of the configs. It is not available in the dashboard's definition files just the dashboard provisioning
|
||||
of the configs. It is not available in the dashboards definition files just the dashboard provisioning
|
||||
configuration.
|
||||
Example:
|
||||
|
||||
@@ -65,7 +65,7 @@ Currently we do not provide any scripts/manifests for configuring Grafana. Rathe
|
||||
|
||||
> This feature is available from v5.0
|
||||
|
||||
It's possible to manage data sources in Grafana by adding one or more YAML config files in the [`provisioning/datasources`](/administration/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will get added or updated during start up. If the data source already exists, then Grafana updates it to match the configuration file. The config file can also contain a list of data sources that should be deleted. That list is called `deleteDatasources`. Grafana will delete data sources listed in `deleteDatasources` before inserting/updating those in the `datasource` list.
|
||||
It's possible to manage data sources in Grafana by adding one or more yaml config files in the [`provisioning/datasources`](/administration/configuration/#provisioning) directory. Each config file can contain a list of `datasources` that will be added or updated during start up. If the data source already exists, then Grafana updates it to match the configuration file. The config file can also contain a list of data sources that should be deleted. That list is called `deleteDatasources`. Grafana will delete data sources listed in `deleteDatasources` before inserting/updating those in the `datasource` list.
|
||||
|
||||
### Running Multiple Grafana Instances
|
||||
|
||||
@@ -140,7 +140,7 @@ Please refer to each datasource documentation for specific provisioning examples
|
||||
| ------------- | ---------------------------------------------------------------------------------- |
|
||||
| Elasticsearch | Elasticsearch uses the `database` property to configure the index for a datasource |
|
||||
|
||||
#### JSON Data
|
||||
#### Json Data
|
||||
|
||||
Since not all datasources have the same configuration settings we only have the most common ones as fields. The rest should be stored as a json blob in the `jsonData` field. Here are the most common settings that the core datasources use.
|
||||
|
||||
@@ -151,18 +151,15 @@ Since not all datasources have the same configuration settings we only have the
|
||||
| tlsSkipVerify | boolean | _All_ | Controls whether a client verifies the server's certificate chain and host name. |
|
||||
| graphiteVersion | string | Graphite | Graphite version |
|
||||
| timeInterval | string | Prometheus, Elasticsearch, InfluxDB, MySQL, PostgreSQL and MSSQL | Lowest interval/step value that should be used for this data source |
|
||||
| httpMode | string | Influxdb, Prometheus | HTTP Method. 'GET', 'POST', defaults to GET |
|
||||
| esVersion | number | Elasticsearch | Elasticsearch version as a number (2/5/56/60/70) |
|
||||
| timeField | string | Elasticsearch | Which field that should be used as timestamp |
|
||||
| interval | string | Elasticsearch | Index date time format. nil(No Pattern), 'Hourly', 'Daily', 'Weekly', 'Monthly' or 'Yearly' |
|
||||
| logMessageField | string | Elasticsearch | Which field should be used as the log message |
|
||||
| logLevelField | string | Elasticsearch | Which field should be used to indicate the priority of the log message |
|
||||
| authType | string | Cloudwatch | Auth provider. default/credentials/keys |
|
||||
| externalId | string | Cloudwatch | Optional External ID |
|
||||
| assumeRoleArn | string | Cloudwatch | Optional ARN role to assume |
|
||||
| defaultRegion | string | Cloudwatch | Optional default AWS region |
|
||||
| authType | string | Cloudwatch | Auth provider. keys/credentials/arn |
|
||||
| assumeRoleArn | string | Cloudwatch | ARN of Assume Role |
|
||||
| defaultRegion | string | Cloudwatch | AWS region |
|
||||
| customMetricsNamespaces | string | Cloudwatch | Namespaces of Custom Metrics |
|
||||
| profile | string | Cloudwatch | Optional credentials profile |
|
||||
| tsdbVersion | string | OpenTSDB | Version |
|
||||
| tsdbResolution | string | OpenTSDB | Resolution |
|
||||
| sslmode | string | PostgreSQL | SSLmode. 'disable', 'require', 'verify-ca' or 'verify-full' |
|
||||
@@ -263,6 +260,8 @@ providers:
|
||||
type: file
|
||||
# <bool> disable dashboard deletion
|
||||
disableDeletion: false
|
||||
# <bool> enable dashboard editing
|
||||
editable: true
|
||||
# <int> how often Grafana will scan for changed dashboards
|
||||
updateIntervalSeconds: 10
|
||||
# <bool> allow updating provisioned dashboards from the UI
|
||||
@@ -276,8 +275,6 @@ providers:
|
||||
|
||||
When Grafana starts, it will update/insert all dashboards available in the configured path. Then later on poll that path every **updateIntervalSeconds** and look for updated json files and update/insert those into the database.
|
||||
|
||||
> **Note:** Dashboards are provisioned to the General folder if the `folder` option is missing or empty.
|
||||
|
||||
#### Making changes to a provisioned dashboard
|
||||
|
||||
It's possible to make changes to a provisioned dashboard in the Grafana UI. However, it is not possible to automatically save the changes back to the provisioning source.
|
||||
@@ -298,11 +295,11 @@ Note: The JSON definition in the input field when using `Copy JSON to Clipboard`
|
||||
|
||||
### Reusable Dashboard URLs
|
||||
|
||||
If the dashboard in the json file contains an [uid](/reference/dashboard/#json-fields), Grafana will force insert/update on that uid. This allows you to migrate dashboards between Grafana instances and provisioning Grafana from configuration without breaking the URLs given since the new dashboard URL uses the uid as identifier.
|
||||
If the dashboard in the json file contains an [uid](/reference/dashboard/#json-fields), Grafana will force insert/update on that uid. This allows you to migrate dashboards betweens Grafana instances and provisioning Grafana from configuration without breaking the URLs given since the new dashboard URL uses the uid as identifier.
|
||||
When Grafana starts, it will update/insert all dashboards available in the configured folders. If you modify the file, the dashboard will also be updated.
|
||||
By default, Grafana will delete dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
|
||||
By default Grafana will delete dashboards in the database if the file is removed. You can disable this behavior using the `disableDeletion` setting.
|
||||
|
||||
> **Note:** Provisioning allows you to overwrite existing dashboards
|
||||
> **Note.** Provisioning allows you to overwrite existing dashboards
|
||||
> which leads to problems if you re-use settings that are supposed to be unique.
|
||||
> Be careful not to re-use the same `title` multiple times within a folder
|
||||
> or `uid` within the same installation as this will cause weird behaviors.
|
||||
@@ -310,7 +307,7 @@ By default, Grafana will delete dashboards in the database if the file is remove
|
||||
### Provision folders structure from filesystem to Grafana
|
||||
If you already store your dashboards using folders in a git repo or on a filesystem, and also you want to have the same folder names in the Grafana menu, you can use `foldersFromFilesStructure` option.
|
||||
|
||||
For example, to replicate these dashboards structure from the filesystem to Grafana,
|
||||
For example, to replicate these dashboards structure from the filesystem to Grafana,
|
||||
```
|
||||
/etc/dashboards
|
||||
├── /server
|
||||
@@ -323,24 +320,22 @@ For example, to replicate these dashboards structure from the filesystem to Graf
|
||||
you need to specify just this short provision configuration file.
|
||||
```yaml
|
||||
apiVersion: 1
|
||||
|
||||
|
||||
providers:
|
||||
- name: dashboards
|
||||
type: file
|
||||
updateIntervalSeconds: 30
|
||||
options:
|
||||
path: /etc/dashboards
|
||||
foldersFromFilesStructure: true
|
||||
foldersFromFileStructure: true
|
||||
```
|
||||
`server` and `application` will become new folders in Grafana menu.
|
||||
|
||||
> **Note:** `folder` and `folderUid` options should be empty or missing to make `foldersFromFilesStructure` work.
|
||||
|
||||
> **Note:** To provision dashboards to the General folder, store them in the root of your `path`.
|
||||
> **Note.** `folder` and `folderUid` options should be empty or missing to make `foldersFromFileStructure` works.
|
||||
|
||||
## Alert Notification Channels
|
||||
|
||||
Alert Notification Channels can be provisioned by adding one or more YAML config files in the [`provisioning/notifiers`](/administration/configuration/#provisioning) directory.
|
||||
Alert Notification Channels can be provisioned by adding one or more yaml config files in the [`provisioning/notifiers`](/administration/configuration/#provisioning) directory.
|
||||
|
||||
Each config file can contain the following top-level fields:
|
||||
|
||||
@@ -383,16 +378,12 @@ notifiers:
|
||||
send_reminder: true
|
||||
frequency: 1h
|
||||
disable_resolve_message: false
|
||||
# See `Supported Settings` section for settings supported for each
|
||||
# See `Supported Settings` section for settings supporter for each
|
||||
# alert notification type.
|
||||
settings:
|
||||
recipient: 'XXX'
|
||||
uploadImage: true
|
||||
token: 'xoxb' # legacy setting since Grafana v7.2 (stored non-encrypted)
|
||||
url: https://slack.com # legacy setting since Grafana v7.2 (stored non-encrypted)
|
||||
# Secure settings that will be encrypted in the database (supported since Grafana v7.2). See `Supported Settings` section for secure settings supported for each notifier.
|
||||
secure_settings:
|
||||
token: 'xoxb'
|
||||
uploadImage: true
|
||||
url: https://slack.com
|
||||
|
||||
delete_notifiers:
|
||||
@@ -408,34 +399,32 @@ delete_notifiers:
|
||||
|
||||
### Supported Settings
|
||||
|
||||
The following sections detail the supported settings and secure settings for each alert notification type. Secure settings are stored encrypted in the database and you add them to `secure_settings` in the YAML file instead of `settings`.
|
||||
|
||||
> **Note:** Secure settings is supported since Grafana v7.2.
|
||||
The following sections detail the supported settings for each alert notification type.
|
||||
|
||||
#### Alert notification `pushover`
|
||||
|
||||
| Name | Secure setting |
|
||||
| -------- | -------------- |
|
||||
| apiToken | yes |
|
||||
| userKey | yes |
|
||||
| device | |
|
||||
| retry | |
|
||||
| expire | |
|
||||
| Name |
|
||||
| -------- |
|
||||
| apiToken |
|
||||
| userKey |
|
||||
| device |
|
||||
| retry |
|
||||
| expire |
|
||||
|
||||
#### Alert notification `slack`
|
||||
|
||||
| Name | Secure setting |
|
||||
| -------------- | -------------- |
|
||||
| url | yes |
|
||||
| recipient | |
|
||||
| username | |
|
||||
| icon_emoji | |
|
||||
| icon_url | |
|
||||
| uploadImage | |
|
||||
| mentionUsers | |
|
||||
| mentionGroups | |
|
||||
| mentionChannel | |
|
||||
| token | yes |
|
||||
| Name |
|
||||
| -------------- |
|
||||
| url |
|
||||
| recipient |
|
||||
| username |
|
||||
| icon_emoji |
|
||||
| icon_url |
|
||||
| uploadImage |
|
||||
| mentionUsers |
|
||||
| mentionGroups |
|
||||
| mentionChannel |
|
||||
| token |
|
||||
|
||||
#### Alert notification `victorops`
|
||||
|
||||
@@ -453,34 +442,34 @@ The following sections detail the supported settings and secure settings for eac
|
||||
|
||||
#### Alert notification `LINE`
|
||||
|
||||
| Name | Secure setting |
|
||||
| ----- | -------------- |
|
||||
| token | yes |
|
||||
| Name |
|
||||
| ----- |
|
||||
| token |
|
||||
|
||||
#### Alert notification `pagerduty`
|
||||
|
||||
| Name | Secure setting |
|
||||
| -------------- | -------------- |
|
||||
| integrationKey | yes |
|
||||
| autoResolve | |
|
||||
| Name |
|
||||
| -------------- |
|
||||
| integrationKey |
|
||||
| autoResolve |
|
||||
|
||||
#### Alert notification `sensu`
|
||||
|
||||
| Name | Secure setting |
|
||||
| -------- | -------------- |
|
||||
| url | |
|
||||
| source | |
|
||||
| handler | |
|
||||
| username | |
|
||||
| password | yes |
|
||||
| Name |
|
||||
| -------- |
|
||||
| url |
|
||||
| source |
|
||||
| handler |
|
||||
| username |
|
||||
| password |
|
||||
|
||||
#### Alert notification `prometheus-alertmanager`
|
||||
|
||||
| Name | Secure setting |
|
||||
| ----------------- | -------------- |
|
||||
| url | |
|
||||
| basicAuthUser | |
|
||||
| basicAuthPassword | yes |
|
||||
| Name |
|
||||
| ----------------- |
|
||||
| url |
|
||||
| basicAuthUser |
|
||||
| basicAuthPassword |
|
||||
|
||||
#### Alert notification `teams`
|
||||
|
||||
@@ -511,36 +500,36 @@ The following sections detail the supported settings and secure settings for eac
|
||||
|
||||
#### Alert notification `opsgenie`
|
||||
|
||||
| Name | Secure setting |
|
||||
| ---------------- | -------------- |
|
||||
| apiKey | yes |
|
||||
| apiUrl | |
|
||||
| autoClose | |
|
||||
| overridePriority | |
|
||||
| Name |
|
||||
| ---------------- |
|
||||
| apiKey |
|
||||
| apiUrl |
|
||||
| autoClose |
|
||||
| overridePriority |
|
||||
|
||||
#### Alert notification `telegram`
|
||||
|
||||
| Name | Secure setting |
|
||||
| ----------- | -------------- |
|
||||
| bottoken | yes |
|
||||
| chatid | |
|
||||
| uploadImage | |
|
||||
| Name |
|
||||
| ----------- |
|
||||
| bottoken |
|
||||
| chatid |
|
||||
| uploadImage |
|
||||
|
||||
#### Alert notification `threema`
|
||||
|
||||
| Name | Secure setting |
|
||||
| ------------ | -------------- |
|
||||
| gateway_id | |
|
||||
| recipient_id | |
|
||||
| api_secret | yes |
|
||||
| Name |
|
||||
| ------------ |
|
||||
| gateway_id |
|
||||
| recipient_id |
|
||||
| api_secret |
|
||||
|
||||
#### Alert notification `webhook`
|
||||
|
||||
| Name | Secure setting |
|
||||
| -------- | -------------- |
|
||||
| url | |
|
||||
| username | |
|
||||
| password | yes |
|
||||
| Name |
|
||||
| -------- |
|
||||
| url |
|
||||
| username |
|
||||
| password |
|
||||
|
||||
#### Alert notification `googlechat`
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ type = "docs"
|
||||
[menu.docs]
|
||||
identifier = "alerting"
|
||||
parent = "features"
|
||||
weight = 100
|
||||
weight = 6
|
||||
+++
|
||||
|
||||
# Alerts overview
|
||||
|
||||
@@ -5,7 +5,6 @@ keywords = ["grafana", "alerting", "guide", "rules"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Create alerts"
|
||||
identifier = "create-alerts"
|
||||
parent = "alerting"
|
||||
weight = 200
|
||||
+++
|
||||
@@ -79,7 +78,7 @@ We plan to add other condition types in the future, like `Other Alert`, where yo
|
||||
|
||||
#### Multiple Series
|
||||
|
||||
If a query returns multiple series, then the aggregation function and threshold check will be evaluated for each series. What Grafana does not do currently is track alert rule state **per series**. This has implications that are detailed in the scenario below.
|
||||
If a query returns multiple series then the aggregation function and threshold check will be evaluated for each series. What Grafana does not do currently is track alert rule state **per series**. This has implications that are detailed in the scenario below.
|
||||
|
||||
- Alert condition with query that returns 2 series: **server1** and **server2**
|
||||
- **server1** series causes the alert rule to fire and switch to state `Alerting`
|
||||
@@ -87,7 +86,7 @@ If a query returns multiple series, then the aggregation function and threshold
|
||||
- In a subsequent evaluation of the same alert rule, the **server2** series also causes the alert rule to fire
|
||||
- No new notifications are sent as the alert rule is already in state `Alerting`.
|
||||
|
||||
So, as you can see from the above scenario Grafana will not send out notifications when other series cause the alert to fire if the rule already is in state `Alerting`. To improve support for queries that return multiple series we plan to track state **per series** in a future release.
|
||||
So as you can see from the above scenario Grafana will not send out notifications when other series cause the alert to fire if the rule already is in state `Alerting`. To improve support for queries that return multiple series we plan to track state **per series** in a future release.
|
||||
|
||||
> Starting with Grafana v5.3 you can configure reminders to be sent for triggered alerts. This will send additional notifications
|
||||
> when an alert continues to fire. If other series (like server2 in the example above) also cause the alert rule to fire they will be included in the reminder notification. Depending on what notification channel you're using you may be able to take advantage of this feature for identifying new/existing series causing alert to fire.
|
||||
@@ -100,7 +99,7 @@ Below are conditions you can configure how the rule evaluation engine should han
|
||||
| --------------- | ------------------------------------------------------------------------------------------ |
|
||||
| No Data | Set alert rule state to `NoData` |
|
||||
| Alerting | Set alert rule state to `Alerting` |
|
||||
| Keep Last State | Keep the current alert rule state, whatever it is. |
|
||||
| Keep Last State | Keep the current alert rule state, what ever it is. |
|
||||
| Ok | Not sure why you would want to send yourself an alert when things are okay, but you could. |
|
||||
|
||||
### Execution errors or timeouts
|
||||
@@ -110,7 +109,7 @@ Tell Grafana how to handle execution or timeout errors.
|
||||
| Error or timeout option | Description |
|
||||
| ----------------------- | --------------------------------------------------- |
|
||||
| Alerting | Set alert rule state to `Alerting` |
|
||||
| Keep Last State | Keep the current alert rule state, whatever it is. |
|
||||
| Keep Last State | Keep the current alert rule state, what ever it is. |
|
||||
|
||||
If you have an unreliable time series store from which queries sometime timeout or fail randomly you can set this option to `Keep Last State` in order to basically ignore them.
|
||||
|
||||
|
||||
@@ -5,9 +5,8 @@ keywords = ["Grafana", "alerting", "guide", "notifications"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Notifications"
|
||||
identifier = "alert-notification"
|
||||
parent = "alerting"
|
||||
weight = 100
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
# Alert notifications
|
||||
@@ -74,18 +73,15 @@ Telegram | `telegram` | yes | no
|
||||
Threema | `threema` | yes, external only | no
|
||||
VictorOps | `victorops` | yes, external only | no
|
||||
[Webhook](#webhook) | `webhook` | yes, external only | yes
|
||||
[Zenduty](#zenduty) | `webhook` | yes, external only | yes
|
||||
|
||||
### Email
|
||||
|
||||
To enable email notifications you have to set up [SMTP settings]({{< relref "../administration/configuration/#smtp" >}})
|
||||
To enable email notifications you have to setup [SMTP settings]({{< relref "../administration/configuration/#smtp" >}})
|
||||
in the Grafana config. Email notifications will upload an image of the alert graph to an
|
||||
external image destination if available or fallback to attaching the image to the email.
|
||||
Be aware that if you use the `local` image storage email servers and clients might not be
|
||||
able to access the image.
|
||||
|
||||
> **Note:** Template variables are not supported in email alerts.
|
||||
|
||||
Setting | Description
|
||||
---------- | -----------
|
||||
Single email | Send a single email to all recipients. Disabled per default.
|
||||
@@ -126,14 +122,13 @@ Severity | Level for dynamic notifications, default is `critical` (1)
|
||||
Auto resolve incidents | Resolve incidents in PagerDuty once the alert goes back to ok
|
||||
Message in details | Removes the Alert message from the PD summary field and puts it into custom details instead (2)
|
||||
|
||||
>**Note:** The tags `Severity`, `Class`, `Group`, `dedup_key`, and `Component` have special meaning in the [Pagerduty Common Event Format - PD-CEF](https://support.pagerduty.com/docs/pd-cef). If an alert panel defines these tag keys, then they are transposed to the root of the event sent to Pagerduty. This means they will be available within the Pagerduty UI and Filtering tools. A Severity tag set on an alert overrides the global Severity set on the notification channel if it's a valid level.
|
||||
>**Note:** The tags `Severity`, `Class`, `Group`, and `Component` have special meaning in the [Pagerduty Common Event Format - PD-CEF](https://support.pagerduty.com/docs/pd-cef). If an alert panel defines these tag keys, then they are transposed to the root of the event sent to Pagerduty. This means they will be available within the Pagerduty UI and Filtering tools. A Severity tag set on an alert overrides the global Severity set on the notification channel if it's a valid level.
|
||||
|
||||
>Using Message In Details will change the structure of the `custom_details` field in the PagerDuty Event.
|
||||
This might break custom event rules in your PagerDuty rules if you rely on the fields in `payload.custom_details`.
|
||||
Move any existing rules using `custom_details.myMetric` to `custom_details.queries.myMetric`.
|
||||
This behavior will become the default in a future version of Grafana.
|
||||
|
||||
> Using `dedup_key` tag will override Grafana generated `dedup_key` with a custom key.
|
||||
### Webhook
|
||||
|
||||
The webhook notification is a simple way to send information about a state change over HTTP to a custom endpoint.
|
||||
@@ -176,17 +171,17 @@ In DingTalk PC Client:
|
||||
|
||||
1. Click "more" icon on upper right of the panel.
|
||||
|
||||
1. Click "Robot Manage" item in the pop menu, there will be a new panel call "Robot Manage".
|
||||
2. Click "Robot Manage" item in the pop menu, there will be a new panel call "Robot Manage".
|
||||
|
||||
1. In the "Robot Manage" panel, select "customized: customized robot with Webhook".
|
||||
3. In the "Robot Manage" panel, select "customized: customized robot with Webhook".
|
||||
|
||||
1. In the next new panel named "robot detail", click "Add" button.
|
||||
4. In the next new panel named "robot detail", click "Add" button.
|
||||
|
||||
1. In "Add Robot" panel, input a nickname for the robot and select a "message group" which the robot will join in. click "next".
|
||||
5. In "Add Robot" panel, input a nickname for the robot and select a "message group" which the robot will join in. click "next".
|
||||
|
||||
1. There will be a Webhook URL in the panel, looks like this: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx. Copy this URL to the Grafana DingTalk setting page and then click "finish".
|
||||
6. There will be a Webhook URL in the panel, looks like this: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx. Copy this URL to the grafana Dingtalk setting page and then click "finish".
|
||||
|
||||
DingTalk supports the following "message type": `text`, `link` and `markdown`. Only the `link` message type is supported.
|
||||
Dingtalk supports the following "message type": `text`, `link` and `markdown`. Only the `link` message type is supported.
|
||||
|
||||
### Kafka
|
||||
|
||||
@@ -195,13 +190,13 @@ There are a couple of configuration options which need to be set up in Grafana U
|
||||
|
||||
1. Kafka REST Proxy endpoint.
|
||||
|
||||
1. Kafka Topic.
|
||||
2. Kafka Topic.
|
||||
|
||||
Once these two properties are set, you can send the alerts to Kafka for further processing or throttling.
|
||||
|
||||
### Google Hangouts Chat
|
||||
|
||||
Notifications can be sent by setting up an incoming webhook in Google Hangouts chat. For more information about configuring a webhook, refer to [webhooks](https://developers.google.com/hangouts/chat/how-tos/webhooks).
|
||||
Notifications can be sent by setting up an incoming webhook in Google Hangouts chat. Configuring such a webhook is described [here](https://developers.google.com/hangouts/chat/how-tos/webhooks).
|
||||
|
||||
### Squadcast
|
||||
|
||||
@@ -213,10 +208,6 @@ Alertmanager handles alerts sent by client applications such as Prometheus serve
|
||||
|
||||
> **Caution:** In case of a high-availability setup, do not load balance traffic between Grafana and Alertmanagers to keep coherence between all your Alertmanager instances. Instead, point Grafana to a list of all Alertmanagers, by listing their URLs comma-separated in the notification channel configuration.
|
||||
|
||||
### Zenduty
|
||||
|
||||
[Zenduty](https://www.zenduty.com) is an incident alerting and response orchestration platform that not alerts the right teams via SMS, Phone(Voice), Email, Slack, Microsoft Teams and Push notifications(Android/iOS) whenever a Grafana alert is triggered, but also helps you rapidly triage and remediate critical, user impacting incidents. Grafana alert are sent to Zenduty through Grafana's native webhook dispatcher. Refer the Zenduty-Grafana [integration documentation](https://docs.zenduty.com/docs/grafana) for configuring the integration.
|
||||
|
||||
## Enable images in notifications {#external-image-store}
|
||||
|
||||
Grafana can render the panel associated with the alert rule as a PNG image and include that in the notification. Read more about the requirements and how to configure
|
||||
|
||||
@@ -4,7 +4,6 @@ description = "Pause an existing alert rule"
|
||||
keywords = ["grafana", "alerting", "guide", "rules", "view"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
identifier = "pause-alerts"
|
||||
parent = "alerting"
|
||||
weight = 400
|
||||
+++
|
||||
|
||||
@@ -5,7 +5,6 @@ keywords = ["grafana", "alerting", "guide", "rules", "troubleshoot"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Troubleshoot alerts"
|
||||
identifier = "troubleshoot-alerts"
|
||||
parent = "alerting"
|
||||
weight = 500
|
||||
+++
|
||||
|
||||
@@ -5,7 +5,6 @@ keywords = ["grafana", "alerting", "guide", "rules", "view"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "View alerts"
|
||||
identifier = "view-alerts"
|
||||
parent = "alerting"
|
||||
weight = 400
|
||||
+++
|
||||
|
||||
21
docs/sources/archive.md
Normal file
21
docs/sources/archive.md
Normal file
@@ -0,0 +1,21 @@
|
||||
+++
|
||||
title = "Docs Archive"
|
||||
keywords = ["grafana", "archive", "documentation", "guide"]
|
||||
type = "docs"
|
||||
[menu.docs]
|
||||
name = "Docs Archive"
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
# Docs Archive
|
||||
|
||||
Here you can find links to older versions of the documentation that might be better suited for your version
|
||||
of Grafana.
|
||||
|
||||
- [Latest](/docs/grafana/latest/)
|
||||
- [Version 4.5](/docs/grafana/v4.5)
|
||||
- [Version 4.4](/docs/grafana/v4.4)
|
||||
- [Version 4.3](/docs/grafana/v4.3)
|
||||
- [Version 4.2](/docs/grafana/v4.2)
|
||||
- [Version 4.1](/docs/grafana/v4.1)
|
||||
- [Version 3.1](/docs/grafana/v3.1)
|
||||
@@ -6,7 +6,7 @@ type = "docs"
|
||||
name = "Authentication"
|
||||
identifier = "authentication"
|
||||
parent = "admin"
|
||||
weight = 30
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# User Authentication Overview
|
||||
@@ -15,8 +15,6 @@ Grafana provides many ways to authenticate users. Some authentication integratio
|
||||
|
||||
Here is a table showing all supported authentication providers and the features available for them. [Team sync]({{< relref "../enterprise/team-sync.md" >}}) and [active sync]({{< relref "../enterprise/enhanced_ldap.md#active-ldap-synchronization" >}}) are only available in Grafana Enterprise.
|
||||
|
||||
See also, [Grafana Authentication]({{< relref "grafana.md" >}}).
|
||||
|
||||
Provider | Support | Role mapping | Team sync<br> *(Enterprise only)* | Active sync<br> *(Enterprise only)*
|
||||
-------- | :-----: | :----------: | :-------: | :---------:
|
||||
[Auth Proxy]({{< relref "auth-proxy.md" >}}) | v2.1+ | - | v6.3+ | -
|
||||
@@ -28,3 +26,118 @@ Provider | Support | Role mapping | Team sync<br> *(Enterprise only)* | Active s
|
||||
[LDAP]({{< relref "ldap.md" >}}) | v2.1+ | v2.1+ | v5.3+ | v6.3+
|
||||
[Okta OAuth]({{< relref "okta.md" >}}) | v7.0+ | v7.0+ | v7.0+ | -
|
||||
[SAML]({{< relref "../enterprise/saml.md" >}}) (Enterprise only) | v6.3+ | v7.0+ | v7.0+ | -
|
||||
|
||||
## Grafana Auth
|
||||
|
||||
Grafana of course has a built in user authentication system with password authentication enabled by default. You can
|
||||
disable authentication by enabling anonymous access. You can also hide login form and only allow login through an auth
|
||||
provider (listed above). There is also options for allowing self sign up.
|
||||
|
||||
### Login and short-lived tokens
|
||||
|
||||
> The following applies when using Grafana's built in user authentication, LDAP (without Auth proxy) or OAuth integration.
|
||||
|
||||
Grafana are using short-lived tokens as a mechanism for verifying authenticated users.
|
||||
These short-lived tokens are rotated each `token_rotation_interval_minutes` for an active authenticated user.
|
||||
|
||||
An active authenticated user that gets it token rotated will extend the `login_maximum_inactive_lifetime_days` time from "now" that Grafana will remember the user.
|
||||
This means that a user can close its browser and come back before `now + login_maximum_inactive_lifetime_days` and still being authenticated.
|
||||
This is true as long as the time since user login is less than `login_maximum_lifetime_days`.
|
||||
|
||||
#### Remote logout
|
||||
|
||||
You can logout from other devices by removing login sessions from the bottom of your profile page. If you are
|
||||
a Grafana admin user you can also do the same for any user from the Server Admin / Edit User view.
|
||||
|
||||
## Settings
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
|
||||
# Login cookie name
|
||||
login_cookie_name = grafana_session
|
||||
|
||||
# The lifetime (days) an authenticated user can be inactive before being required to login at next visit. Default is 7 days.
|
||||
login_maximum_inactive_lifetime_days = 7
|
||||
|
||||
# The maximum lifetime (days) an authenticated user can be logged in since login time before being required to login. Default is 30 days.
|
||||
login_maximum_lifetime_days = 30
|
||||
|
||||
# How often should auth tokens be rotated for authenticated users when being active. The default is each 10 minutes.
|
||||
token_rotation_interval_minutes = 10
|
||||
|
||||
# The maximum lifetime (seconds) an api key can be used. If it is set all the api keys should have limited lifetime that is lower than this value.
|
||||
api_key_max_seconds_to_live = -1
|
||||
```
|
||||
|
||||
### Anonymous authentication
|
||||
|
||||
You can make Grafana accessible without any login required by enabling anonymous access in the configuration file.
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
[auth.anonymous]
|
||||
enabled = true
|
||||
|
||||
# Organization name that should be used for unauthenticated users
|
||||
org_name = Main Org.
|
||||
|
||||
# Role for unauthenticated users, other valid values are `Editor` and `Admin`
|
||||
org_role = Viewer
|
||||
```
|
||||
|
||||
If you change your organization name in the Grafana UI this setting needs to be updated to match the new name.
|
||||
|
||||
### Basic authentication
|
||||
|
||||
Basic auth is enabled by default and works with the built in Grafana user password authentication system and LDAP
|
||||
authentication integration.
|
||||
|
||||
To disable basic auth:
|
||||
|
||||
```bash
|
||||
[auth.basic]
|
||||
enabled = false
|
||||
```
|
||||
|
||||
### Disable login form
|
||||
|
||||
You can hide the Grafana login form using the below configuration settings.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
disable_login_form = true
|
||||
```
|
||||
|
||||
### Automatic OAuth login
|
||||
|
||||
Set to true to attempt login with OAuth automatically, skipping the login screen.
|
||||
This setting is ignored if multiple OAuth providers are configured.
|
||||
Defaults to `false`.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
oauth_auto_login = true
|
||||
```
|
||||
|
||||
### Hide sign-out menu
|
||||
|
||||
Set the option detailed below to true to hide sign-out menu link. Useful if you use an auth proxy.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
disable_signout_menu = true
|
||||
```
|
||||
|
||||
### URL redirect after signing out
|
||||
|
||||
URL to redirect the user to after signing out from Grafana. This can for example be used to enable signout from oauth provider.
|
||||
|
||||
```bash
|
||||
[auth]
|
||||
signout_redirect_url =
|
||||
```
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ aliases = ["/docs/grafana/latest/tutorials/authproxy/"]
|
||||
name = "Auth Proxy"
|
||||
identifier = "auth-proxy"
|
||||
parent = "authentication"
|
||||
weight = 200
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
# Auth Proxy Authentication
|
||||
@@ -108,25 +108,25 @@ In this example we use Apache as a reverse proxy in front of Grafana. Apache han
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
- The first four lines of the virtualhost configuration are standard, so we won’t go into detail on what they do.
|
||||
* The first 4 lines of the virtualhost configuration are standard, so we won’t go into detail on what they do.
|
||||
|
||||
- We use a **\<proxy>** configuration block for applying our authentication rules to every proxied request. These rules include requiring basic authentication where user:password credentials are stored in the **/etc/apache2/grafana_htpasswd** file. This file can be created with the `htpasswd` command.
|
||||
* We use a **\<proxy>** configuration block for applying our authentication rules to every proxied request. These rules include requiring basic authentication where user:password credentials are stored in the **/etc/apache2/grafana_htpasswd** file. This file can be created with the `htpasswd` command.
|
||||
|
||||
- The next part of the configuration is the tricky part. We use Apache’s rewrite engine to create our **X-WEBAUTH-USER header**, populated with the authenticated user.
|
||||
* The next part of the configuration is the tricky part. We use Apache’s rewrite engine to create our **X-WEBAUTH-USER header**, populated with the authenticated user.
|
||||
|
||||
- **RewriteRule .* - [E=PROXY_USER:%{LA-U:REMOTE_USER}, NS]**: This line is a little bit of magic. What it does, is for every request use the rewriteEngines look-ahead (LA-U) feature to determine what the REMOTE_USER variable would be set to after processing the request. Then assign the result to the variable PROXY_USER. This is necessary as the REMOTE_USER variable is not available to the RequestHeader function.
|
||||
* **RewriteRule .* - [E=PROXY_USER:%{LA-U:REMOTE_USER}, NS]**: This line is a little bit of magic. What it does, is for every request use the rewriteEngines look-ahead (LA-U) feature to determine what the REMOTE_USER variable would be set to after processing the request. Then assign the result to the variable PROXY_USER. This is necessary as the REMOTE_USER variable is not available to the RequestHeader function.
|
||||
|
||||
- **RequestHeader set X-WEBAUTH-USER “%{PROXY_USER}e”**: With the authenticated username now stored in the PROXY_USER variable, we create a new HTTP request header that will be sent to our backend Grafana containing the username.
|
||||
* **RequestHeader set X-WEBAUTH-USER “%{PROXY_USER}e”**: With the authenticated username now stored in the PROXY_USER variable, we create a new HTTP request header that will be sent to our backend Grafana containing the username.
|
||||
|
||||
- The **RequestHeader unset Authorization** removes the Authorization header from the HTTP request before it is forwarded to Grafana. This ensures that Grafana does not try to authenticate the user using these credentials (BasicAuth is a supported authentication handler in Grafana).
|
||||
* The **RequestHeader unset Authorization** removes the Authorization header from the HTTP request before it is forwarded to Grafana. This ensures that Grafana does not try to authenticate the user using these credentials (BasicAuth is a supported authentication handler in Grafana).
|
||||
|
||||
- The last 3 lines are then just standard reverse proxy configuration to direct all authenticated requests to our Grafana server running on port 3000.
|
||||
* The last 3 lines are then just standard reverse proxy configuration to direct all authenticated requests to our Grafana server running on port 3000.
|
||||
|
||||
## Full walkthrough using Docker.
|
||||
## Full walk through using Docker.
|
||||
|
||||
For this example, we use the official Grafana Docker image available at [Docker Hub](https://hub.docker.com/r/grafana/grafana/).
|
||||
For this example, we use the official Grafana docker image available at [Docker Hub](https://hub.docker.com/r/grafana/grafana/)
|
||||
|
||||
- Create a file `grafana.ini` with the following contents
|
||||
* Create a file `grafana.ini` with the following contents
|
||||
|
||||
```bash
|
||||
[users]
|
||||
@@ -152,7 +152,7 @@ docker run -i -v $(pwd)/grafana.ini:/etc/grafana/grafana.ini --name grafana graf
|
||||
|
||||
For this example we use the official Apache docker image available at [Docker Hub](https://hub.docker.com/_/httpd/)
|
||||
|
||||
- Create a file `httpd.conf` with the following contents
|
||||
* Create a file `httpd.conf` with the following contents
|
||||
|
||||
```bash
|
||||
ServerRoot "/usr/local/apache2"
|
||||
@@ -207,13 +207,13 @@ ProxyPass / http://grafana:3000/
|
||||
ProxyPassReverse / http://grafana:3000/
|
||||
```
|
||||
|
||||
- Create a htpasswd file. We create a new user **anthony** with the password **password**
|
||||
* Create a htpasswd file. We create a new user **anthony** with the password **password**
|
||||
|
||||
```bash
|
||||
htpasswd -bc htpasswd anthony password
|
||||
```
|
||||
|
||||
- Launch the httpd container using our custom httpd.conf and our htpasswd file. The container will listen on port 80, and we create a link to the **grafana** container so that this container can resolve the hostname **grafana** to the Grafana container’s IP address.
|
||||
* Launch the httpd container using our custom httpd.conf and our htpasswd file. The container will listen on port 80, and we create a link to the **grafana** container so that this container can resolve the hostname **grafana** to the grafana container’s ip address.
|
||||
|
||||
```bash
|
||||
docker run -i -p 80:80 --link grafana:grafana -v $(pwd)/httpd.conf:/usr/local/apache2/conf/httpd.conf -v $(pwd)/htpasswd:/tmp/htpasswd httpd:2.4
|
||||
|
||||
@@ -7,7 +7,7 @@ type = "docs"
|
||||
name = "Azure AD"
|
||||
identifier = "azuread_oauth2"
|
||||
parent = "authentication"
|
||||
weight = 700
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# Azure AD OAuth2 authentication
|
||||
@@ -20,30 +20,32 @@ The Azure AD authentication provides the possibility to use an Azure Active Dire
|
||||
|
||||
To enable the Azure AD OAuth2 you must register your application with Azure AD.
|
||||
|
||||
1. Log in to [Azure Portal](https://portal.azure.com) and click **Azure Active Directory** in the side menu. If you have access to more than one tenant, select your account in the upper right. Set your session to the Azure AD tenant you wish to use.
|
||||
1. Log in to [Azure Portal](https://portal.azure.com) and click **Azure Active Directory** in the side menu.
|
||||
|
||||
1. Under **Manage** in the side menu, click **App Registrations** and then **New Registration**. Provide a fitting name.
|
||||
1. Click **App Registrations** and add a new application registration:
|
||||
- Name: Grafana
|
||||
- Application type: Web app / API
|
||||
- Sign-on URL: `https://<grafana domain>/login/azuread`
|
||||
|
||||
1. Under **Redirect URI**, select **Web** as the app type.
|
||||
1. Click the name of the new application to open the application details page.
|
||||
|
||||
1. Add the redirect URL `https://<grafana domain>/login/azuread`, then click **Register**.
|
||||
1. Click **Endpoints**.
|
||||
- Note down the **OAuth 2.0 authorization endpoint (v2)**, this will be the auth URL.
|
||||
- Note down the **OAuth 2.0 token endpoint (v2)**, this will be the token URL.
|
||||
|
||||
1. The app's **Overview** page is displayed. Note the **Application ID**, this is the OAuth client id.
|
||||
1. Close the Endpoints page to come back to the application details page.
|
||||
|
||||
1. Click **Endpoints** from the top menu.
|
||||
|
||||
- Note the **OAuth 2.0 authorization endpoint (v2)**, this is the auth URL.
|
||||
- Note the **OAuth 2.0 token endpoint (v2)**, this is the token URL.
|
||||
1. Note down the "Application ID", this will be the OAuth client id.
|
||||
|
||||
1. Click **Certificates & secrets** and add a new entry under Client secrets.
|
||||
- Description: Grafana OAuth
|
||||
- Expires: Never
|
||||
|
||||
1. Click **Add**, then copy the key value. This is the OAuth client secret.
|
||||
1. Click **Add** then copy the key value, this will be the OAuth client secret.
|
||||
|
||||
1. Click **Manifest**.
|
||||
- Add definitions for the required Application Roles for Grafana (Viewer, Editor, Admin). Without this configuration, all users will be assigned the Viewer role.
|
||||
- Every role requires a unique id. On Linux, this can be created with `uuidgen`. For example:
|
||||
- Add definitions for the required Application Roles for Grafana (Viewer, Editor, Admin). Without this configuration all users will be assigned to the Viewer role.
|
||||
- Every role has to have a unique id. On Linux this can be created with `uuidgen` for instance.
|
||||
|
||||
```json
|
||||
"appRoles": [
|
||||
@@ -86,9 +88,9 @@ To enable the Azure AD OAuth2 you must register your application with Azure AD.
|
||||
],
|
||||
```
|
||||
|
||||
1. Go to **Azure Active Directory** and then to **Enterprise Applications**. Search for your application and click on it.
|
||||
1. Click Overview and then on **Managed application in local directory** to show the Enterprise Application details.
|
||||
|
||||
1. Click on **Users and Groups** and add Users/Groups to the Grafana roles by using **Add User**.
|
||||
1. Click on **Users and groups** and add Users/Groups to the Grafana roles by using **Add User**.
|
||||
|
||||
## Enable Azure AD OAuth in Grafana
|
||||
|
||||
@@ -108,7 +110,7 @@ allowed_domains =
|
||||
allowed_groups =
|
||||
```
|
||||
|
||||
> **Note:** Ensure that the [root_url]({{< relref "../administration/configuration/#root-url" >}}) in Grafana is set in your Azure Application Reply URLs (App -> Settings -> Reply URLs)
|
||||
> Note: Ensure that the [root_url]({{< relref "../administration/configuration/#root-url" >}}) in Grafana is set in your Azure Application Reply URLs (App -> Settings -> Reply URLs)
|
||||
|
||||
### Configure allowed groups and domains
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ type = "docs"
|
||||
name = "Enhanced LDAP"
|
||||
identifier = "enhanced-ldap"
|
||||
parent = "authentication"
|
||||
weight = 400
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# Enhanced LDAP integration
|
||||
|
||||
@@ -7,19 +7,13 @@ type = "docs"
|
||||
name = "Generic OAuth"
|
||||
identifier = "generic_oauth"
|
||||
parent = "authentication"
|
||||
weight = 500
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
# Generic OAuth Authentication
|
||||
|
||||
You can configure many different OAuth2 authentication services with Grafana using the generic OAuth2 feature. Examples:
|
||||
- [Generic OAuth Authentication](#generic-oauth-authentication)
|
||||
- [Set up OAuth2 with Auth0](#set-up-oauth2-with-auth0)
|
||||
- [Set up OAuth2 with Bitbucket](#set-up-oauth2-with-bitbucket)
|
||||
- [Set up OAuth2 with Centrify](#set-up-oauth2-with-centrify)
|
||||
- [Set up OAuth2 with OneLogin](#set-up-oauth2-with-onelogin)
|
||||
- [JMESPath examples](#jmespath-examples)
|
||||
- [Role mapping](#role-mapping)
|
||||
You can configure many different OAuth2 authentication services with Grafana using the generic OAuth2 feature. Below you
|
||||
can find examples using Okta, BitBucket, OneLogin and Azure.
|
||||
|
||||
This callback URL must match the full HTTP address that you use in your browser to access Grafana, but with the prefix path of `/login/generic_oauth`.
|
||||
|
||||
@@ -39,29 +33,18 @@ token_url =
|
||||
api_url =
|
||||
allowed_domains = mycompany.com mycompany.org
|
||||
allow_sign_up = true
|
||||
tls_skip_verify_insecure = false
|
||||
tls_client_cert =
|
||||
tls_client_key =
|
||||
tls_client_ca =
|
||||
```
|
||||
|
||||
Set `api_url` to the resource that returns [OpenID UserInfo](https://connect2id.com/products/server/docs/api/userinfo) compatible information.
|
||||
|
||||
You can also specify the SSL/TLS configuration used by the client.
|
||||
- Set `tls_client_cert` to the path of the certificate.
|
||||
- Set `tls_client_key` to the path containing the key.
|
||||
- Set `tls_client_ca` to the path containing a trusted certificate authority list.
|
||||
|
||||
`tls_skip_verify_insecure` controls whether a client verifies the server's certificate chain and host name. If it is true, then SSL/TLS accepts any certificate presented by the server and any host name in that certificate. _You should only use this for testing_, because this mode leaves SSL/TLS susceptible to man-in-the-middle attacks.
|
||||
|
||||
Grafana will attempt to determine the user's e-mail address by querying the OAuth provider as described below in the following order until an e-mail address is found:
|
||||
|
||||
1. Check for the presence of an e-mail address via the `email` field encoded in the OAuth `id_token` parameter.
|
||||
1. Check for the presence of an e-mail address using the [JMESPath](http://jmespath.org/examples.html) specified via the `email_attribute_path` configuration option. The JSON used for the path lookup is the HTTP response obtained from querying the UserInfo endpoint specified via the `api_url` configuration option.
|
||||
2. Check for the presence of an e-mail address using the [JMESPath](http://jmespath.org/examples.html) specified via the `email_attribute_path` configuration option. The JSON used for the path lookup is the HTTP response obtained from querying the UserInfo endpoint specified via the `api_url` configuration option.
|
||||
**Note**: Only available in Grafana v6.4+.
|
||||
1. Check for the presence of an e-mail address in the `attributes` map encoded in the OAuth `id_token` parameter. By default Grafana will perform a lookup into the attributes map using the `email:primary` key, however, this is configurable and can be adjusted by using the `email_attribute_name` configuration option.
|
||||
1. Query the `/emails` endpoint of the OAuth provider's API (configured with `api_url`) and check for the presence of an e-mail address marked as a primary address.
|
||||
1. If no e-mail address is found in steps (1-4), then the e-mail address of the user is set to the empty string.
|
||||
3. Check for the presence of an e-mail address in the `attributes` map encoded in the OAuth `id_token` parameter. By default Grafana will perform a lookup into the attributes map using the `email:primary` key, however, this is configurable and can be adjusted by using the `email_attribute_name` configuration option.
|
||||
4. Query the `/emails` endpoint of the OAuth provider's API (configured with `api_url`) and check for the presence of an e-mail address marked as a primary address.
|
||||
5. If no e-mail address is found in steps (1-4), then the e-mail address of the user is set to the empty string.
|
||||
|
||||
Grafana will also attempt to do role mapping through OAuth as described below.
|
||||
|
||||
@@ -71,41 +54,6 @@ Check for the presence of a role using the [JMESPath](http://jmespath.org/exampl
|
||||
|
||||
See [JMESPath examples](#jmespath-examples) for more information.
|
||||
|
||||
> Only available in Grafana v7.2+.
|
||||
|
||||
Customize user login using `login_attribute_path` configuration option. Order of operations is as follows:
|
||||
|
||||
1. Grafana evaluates the `login_attribute_path` JMESPath expression against the ID token.
|
||||
1. If Grafana finds no value, then Grafana evaluates expression against the JSON data obtained from UserInfo endpoint. The UserInfo endpoint URL is specified in the `api_url` configuration option.
|
||||
|
||||
You can customize the attribute name used to extract the ID token from the returned OAuth token with the `id_token_attribute_name` option.
|
||||
|
||||
## Set up OAuth2 with Auth0
|
||||
|
||||
1. Create a new Client in Auth0
|
||||
- Name: Grafana
|
||||
- Type: Regular Web Application
|
||||
|
||||
1. Go to the Settings tab and set:
|
||||
- Allowed Callback URLs: `https://<grafana domain>/login/generic_oauth`
|
||||
|
||||
1. Click Save Changes, then use the values at the top of the page to configure Grafana:
|
||||
|
||||
```bash
|
||||
[auth.generic_oauth]
|
||||
enabled = true
|
||||
allow_sign_up = true
|
||||
team_ids =
|
||||
allowed_organizations =
|
||||
name = Auth0
|
||||
client_id = <client id>
|
||||
client_secret = <client secret>
|
||||
scopes = openid profile email
|
||||
auth_url = https://<domain>/authorize
|
||||
token_url = https://<domain>/oauth/token
|
||||
api_url = https://<domain>/userinfo
|
||||
```
|
||||
|
||||
## Set up OAuth2 with Bitbucket
|
||||
|
||||
```bash
|
||||
@@ -123,40 +71,9 @@ team_ids =
|
||||
allowed_organizations =
|
||||
```
|
||||
|
||||
## Set up OAuth2 with Centrify
|
||||
|
||||
1. Create a new Custom OpenID Connect application configuration in the Centrify dashboard.
|
||||
|
||||
1. Create a memorable unique Application ID, e.g. "grafana", "grafana_aws", etc.
|
||||
|
||||
1. Put in other basic configuration (name, description, logo, category)
|
||||
|
||||
1. On the Trust tab, generate a long password and put it into the OpenID Connect Client Secret field.
|
||||
|
||||
1. Put the URL to the front page of your Grafana instance into the "Resource Application URL" field.
|
||||
|
||||
1. Add an authorized Redirect URI like https://your-grafana-server/login/generic_oauth
|
||||
|
||||
1. Set up permissions, policies, etc. just like any other Centrify app
|
||||
|
||||
1. Configure Grafana as follows:
|
||||
|
||||
```bash
|
||||
[auth.generic_oauth]
|
||||
name = Centrify
|
||||
enabled = true
|
||||
allow_sign_up = true
|
||||
client_id = <OpenID Connect Client ID from Centrify>
|
||||
client_secret = <your generated OpenID Connect Client Secret"
|
||||
scopes = openid profile email
|
||||
auth_url = https://<your domain>.my.centrify.com/OAuth2/Authorize/<Application ID>
|
||||
token_url = https://<your domain>.my.centrify.com/OAuth2/Token/<Application ID>
|
||||
api_url = https://<your domain>.my.centrify.com/OAuth2/UserInfo/<Application ID>
|
||||
```
|
||||
|
||||
## Set up OAuth2 with OneLogin
|
||||
|
||||
1. Create a new Custom Connector with the following settings:
|
||||
1. Create a new Custom Connector with the following settings:
|
||||
- Name: Grafana
|
||||
- Sign On Method: OpenID Connect
|
||||
- Redirect URI: `https://<grafana domain>/login/generic_oauth`
|
||||
@@ -164,11 +81,11 @@ allowed_organizations =
|
||||
- Login URL: `https://<grafana domain>/login/generic_oauth`
|
||||
|
||||
then:
|
||||
1. Add an App to the Grafana Connector:
|
||||
2. Add an App to the Grafana Connector:
|
||||
- Display Name: Grafana
|
||||
|
||||
then:
|
||||
1. Under the SSO tab on the Grafana App details page you'll find the Client ID and Client Secret.
|
||||
3. Under the SSO tab on the Grafana App details page you'll find the Client ID and Client Secret.
|
||||
|
||||
Your OneLogin Domain will match the URL you use to access OneLogin.
|
||||
|
||||
@@ -189,6 +106,63 @@ allowed_organizations =
|
||||
allowed_organizations =
|
||||
```
|
||||
|
||||
## Set up OAuth2 with Auth0
|
||||
|
||||
1. Create a new Client in Auth0
|
||||
- Name: Grafana
|
||||
- Type: Regular Web Application
|
||||
|
||||
2. Go to the Settings tab and set:
|
||||
- Allowed Callback URLs: `https://<grafana domain>/login/generic_oauth`
|
||||
|
||||
3. Click Save Changes, then use the values at the top of the page to configure Grafana:
|
||||
|
||||
```bash
|
||||
[auth.generic_oauth]
|
||||
enabled = true
|
||||
allow_sign_up = true
|
||||
team_ids =
|
||||
allowed_organizations =
|
||||
name = Auth0
|
||||
client_id = <client id>
|
||||
client_secret = <client secret>
|
||||
scopes = openid profile email
|
||||
auth_url = https://<domain>/authorize
|
||||
token_url = https://<domain>/oauth/token
|
||||
api_url = https://<domain>/userinfo
|
||||
```
|
||||
|
||||
## Set up OAuth2 with Centrify
|
||||
|
||||
1. Create a new Custom OpenID Connect application configuration in the Centrify dashboard.
|
||||
|
||||
2. Create a memorable unique Application ID, e.g. "grafana", "grafana_aws", etc.
|
||||
|
||||
3. Put in other basic configuration (name, description, logo, category)
|
||||
|
||||
4. On the Trust tab, generate a long password and put it into the OpenID Connect Client Secret field.
|
||||
|
||||
5. Put the URL to the front page of your Grafana instance into the "Resource Application URL" field.
|
||||
|
||||
6. Add an authorized Redirect URI like https://your-grafana-server/login/generic_oauth
|
||||
|
||||
7. Set up permissions, policies, etc. just like any other Centrify app
|
||||
|
||||
8. Configure Grafana as follows:
|
||||
|
||||
```bash
|
||||
[auth.generic_oauth]
|
||||
name = Centrify
|
||||
enabled = true
|
||||
allow_sign_up = true
|
||||
client_id = <OpenID Connect Client ID from Centrify>
|
||||
client_secret = <your generated OpenID Connect Client Secret"
|
||||
scopes = openid profile email
|
||||
auth_url = https://<your domain>.my.centrify.com/OAuth2/Authorize/<Application ID>
|
||||
token_url = https://<your domain>.my.centrify.com/OAuth2/Token/<Application ID>
|
||||
api_url = https://<your domain>.my.centrify.com/OAuth2/UserInfo/<Application ID>
|
||||
```
|
||||
|
||||
## JMESPath examples
|
||||
|
||||
To ease configuration of a proper JMESPath expression, you can test/evaluate expressions with custom payloads at http://jmespath.org/.
|
||||
|
||||
@@ -7,7 +7,7 @@ type = "docs"
|
||||
name = "GitHub"
|
||||
identifier = "github_oauth2"
|
||||
parent = "authentication"
|
||||
weight = 800
|
||||
weight = 4
|
||||
+++
|
||||
|
||||
# GitHub OAuth2 Authentication
|
||||
|
||||
@@ -7,7 +7,7 @@ type = "docs"
|
||||
name = "GitLab"
|
||||
identifier = "gitlab_oauth"
|
||||
parent = "authentication"
|
||||
weight = 900
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
# GitLab OAuth2 Authentication
|
||||
@@ -31,9 +31,9 @@ instance, if you access Grafana at `http://203.0.113.31:3000`, you should use
|
||||
http://203.0.113.31:3000/login/gitlab
|
||||
```
|
||||
|
||||
Finally, select *read_api* as the *Scope* and submit the form. Note that if you're
|
||||
Finally, select *api* as the *Scope* and submit the form. Note that if you're
|
||||
not going to use GitLab groups for authorization (i.e. not setting
|
||||
`allowed_groups`, see below), you can select *read_user* instead of *read_api* as
|
||||
`allowed_groups`, see below), you can select *read_user* instead of *api* as
|
||||
the *Scope*, thus giving a more restricted access to your GitLab API.
|
||||
|
||||
You'll get an *Application Id* and a *Secret* in return; we'll call them
|
||||
@@ -51,7 +51,7 @@ enabled = true
|
||||
allow_sign_up = false
|
||||
client_id = GITLAB_APPLICATION_ID
|
||||
client_secret = GITLAB_SECRET
|
||||
scopes = read_api
|
||||
scopes = api
|
||||
auth_url = https://gitlab.com/oauth/authorize
|
||||
token_url = https://gitlab.com/oauth/token
|
||||
api_url = https://gitlab.com/api/v4
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user