Compare commits
109 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16b670492a | ||
|
|
d7ac94907c | ||
|
|
a666a772f3 | ||
|
|
8e078d2dd8 | ||
|
|
78c80ceb5a | ||
|
|
f2a6e8c36a | ||
|
|
3f40ee29b2 | ||
|
|
e2311454ec | ||
|
|
5bd1418a81 | ||
|
|
bddcefe517 | ||
|
|
ad3aaff617 | ||
|
|
b8eb142e85 | ||
|
|
7c2cb0786c | ||
|
|
4b68c86160 | ||
|
|
be27409c4c | ||
|
|
f3e01a2860 | ||
|
|
87e2fa0dd4 | ||
|
|
a18b0e3899 | ||
|
|
1020e52f29 | ||
|
|
89eb74730e | ||
|
|
26c5992298 | ||
|
|
433ff19f77 | ||
|
|
03e8428caa | ||
|
|
274cd740a5 | ||
|
|
6e75734bd5 | ||
|
|
1db431b5cf | ||
|
|
b688a9dede | ||
|
|
b48b55dc14 | ||
|
|
d748a2d1e0 | ||
|
|
3bcf3f50b7 | ||
|
|
c9411b4d57 | ||
|
|
2adf2a1584 | ||
|
|
027e345231 | ||
|
|
26289304f2 | ||
|
|
85edf78a46 | ||
|
|
588dc422ab | ||
|
|
3a95cdd78e | ||
|
|
76460e790d | ||
|
|
c6e6309bc5 | ||
|
|
30d3523138 | ||
|
|
c79cdf97d9 | ||
|
|
db4f50171f | ||
|
|
2f9f74b221 | ||
|
|
62ff483d13 | ||
|
|
4806851ae3 | ||
|
|
c44af3ca20 | ||
|
|
4a29cf13f0 | ||
|
|
883977bc3a | ||
|
|
f42d0b9beb | ||
|
|
667f884db1 | ||
|
|
0ac23b0446 | ||
|
|
acdf2ec806 | ||
|
|
2c033a6540 | ||
|
|
9cddb216d3 | ||
|
|
c051c5d423 | ||
|
|
e38d8cd8af | ||
|
|
9464ffa86b | ||
|
|
60a25b4022 | ||
|
|
6beca4317e | ||
|
|
c9a619e364 | ||
|
|
9b628f4742 | ||
|
|
2bd51b506e | ||
|
|
b88f3a909e | ||
|
|
4f2ffc434f | ||
|
|
8f7c031d1d | ||
|
|
30d5482a48 | ||
|
|
5af06db660 | ||
|
|
8343e79f3e | ||
|
|
ac8f1b5b6b | ||
|
|
5b37d14b7f | ||
|
|
3ce1ca5ac1 | ||
|
|
cdcbf64b67 | ||
|
|
f35f826525 | ||
|
|
30c7df22ee | ||
|
|
0d469694c6 | ||
|
|
9ddcb16298 | ||
|
|
2c1a590752 | ||
|
|
a61b1e4285 | ||
|
|
7c2b1cc9d0 | ||
|
|
872727e745 | ||
|
|
2585ad1ddc | ||
|
|
7c9c60b853 | ||
|
|
e016d4eb1b | ||
|
|
9727ba084c | ||
|
|
e80194610c | ||
|
|
a2f97a68c6 | ||
|
|
8aa31fd2d6 | ||
|
|
eccd87a564 | ||
|
|
f5abd72785 | ||
|
|
db1b31d542 | ||
|
|
7fd39889fa | ||
|
|
64fc2ecb0e | ||
|
|
42668a5e89 | ||
|
|
c335538765 | ||
|
|
3d453a6104 | ||
|
|
918cb580e8 | ||
|
|
6863f49bd0 | ||
|
|
2c502f4b36 | ||
|
|
05ccdac63a | ||
|
|
5ab2ebade3 | ||
|
|
bce40bfcf1 | ||
|
|
5bc1a0ad06 | ||
|
|
a23bacc3e2 | ||
|
|
67a3609cb8 | ||
|
|
f63ec0f43d | ||
|
|
42bffe2310 | ||
|
|
d3756d38ee | ||
|
|
db94117d84 | ||
|
|
2b967ad8ec |
@@ -1,11 +0,0 @@
|
||||
version: 2.1
|
||||
jobs:
|
||||
build:
|
||||
docker:
|
||||
- image: alpine:3.7
|
||||
steps:
|
||||
- run:
|
||||
name: The First Step
|
||||
command: |
|
||||
echo 'Fake step!'
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
load('scripts/drone/pipelines/pr.star', 'pr_pipelines')
|
||||
load('scripts/drone/pipelines/main.star', 'main_pipelines')
|
||||
load('scripts/drone/pipelines/release.star', 'release_pipelines', 'test_release_pipelines', 'publish_image_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline')
|
||||
load('scripts/drone/pipelines/docs.star', 'docs_pipelines')
|
||||
load('scripts/drone/pipelines/release.star', 'release_pipelines', 'publish_image_pipelines', 'publish_artifacts_pipelines', 'publish_npm_pipelines', 'publish_packages_pipeline')
|
||||
load('scripts/drone/version.star', 'version_branch_pipelines')
|
||||
load('scripts/drone/pipelines/cron.star', 'cronjobs')
|
||||
load('scripts/drone/vault.star', 'secrets')
|
||||
@@ -17,4 +18,4 @@ def main(ctx):
|
||||
publish_image_pipelines('public') + publish_image_pipelines('security') + \
|
||||
publish_artifacts_pipelines('security') + publish_artifacts_pipelines('public') + \
|
||||
publish_npm_pipelines('public') + publish_packages_pipeline() + \
|
||||
test_release_pipelines() + version_branch_pipelines() + cronjobs(edition=edition) + secrets()
|
||||
version_branch_pipelines() + cronjobs(edition=edition) + secrets()
|
||||
|
||||
2364
.drone.yml
2364
.drone.yml
File diff suppressed because it is too large
Load Diff
@@ -6,5 +6,6 @@ devenv
|
||||
data
|
||||
dist
|
||||
e2e/tmp
|
||||
scripts/grafana-server/tmp
|
||||
public/lib/monaco
|
||||
deployment_tools_config.json
|
||||
|
||||
12
.github/workflows/bump-version.yml
vendored
12
.github/workflows/bump-version.yml
vendored
@@ -4,7 +4,9 @@ on:
|
||||
inputs:
|
||||
version:
|
||||
required: true
|
||||
default: '7.x.x'
|
||||
default: '8.x.x'
|
||||
env:
|
||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -33,12 +35,6 @@ jobs:
|
||||
echo "::set-output name=branch_name::v${{steps.regex-match.outputs.group1}}"
|
||||
echo "::set-output name=branch_exist::$(git ls-remote --heads https://github.com/grafana/grafana.git v${{ steps.regex-match.outputs.group1 }}.x | wc -l)"
|
||||
|
||||
- name: Check input version is aligned with branch(not main)
|
||||
if: steps.intermedia.outputs.branch_exist != '0' && !contains(steps.intermedia.outputs.short_ref, steps.intermedia.outputs.branch_name)
|
||||
run: |
|
||||
echo " You need to run the workflow on branch v${{steps.regex-match.outputs.group1}}.x
|
||||
exit 1
|
||||
|
||||
- name: Check input version is aligned with branch(main)
|
||||
if: steps.intermedia.outputs.branch_exist == '0' && !contains(steps.intermedia.outputs.short_ref, 'main')
|
||||
run: |
|
||||
@@ -55,7 +51,7 @@ jobs:
|
||||
ref: main
|
||||
- uses: actions/setup-node@v2.4.1
|
||||
with:
|
||||
node-version: '14'
|
||||
node-version: '16'
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Run bump version
|
||||
|
||||
30
.github/workflows/publish-technical-documentation-next.yml
vendored
Normal file
30
.github/workflows/publish-technical-documentation-next.yml
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
name: "publish-technical-documentation-next"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- "main"
|
||||
paths:
|
||||
- "docs/sources/**"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
if: "github.repository == 'grafana/grafana'"
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v3"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Publish to website repository (next)"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-next"
|
||||
with:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
github_pat: "${{ secrets.GH_BOT_ACCESS_TOKEN }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/next"
|
||||
60
.github/workflows/publish-technical-documentation-release.yml
vendored
Normal file
60
.github/workflows/publish-technical-documentation-release.yml
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
name: "publish-technical-documentation-release"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v[0-9]+.[0-9]+.x
|
||||
tags:
|
||||
- v[0-9]+.[0-9]+.[0-9]+
|
||||
paths:
|
||||
- "docs/sources/**"
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
sync:
|
||||
if: "github.repository == 'grafana/grafana'"
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- name: "Checkout Grafana repo"
|
||||
uses: "actions/checkout@v3"
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "Checkout Actions library"
|
||||
uses: "actions/checkout@v3"
|
||||
with:
|
||||
repository: "grafana/grafana-github-actions"
|
||||
path: "./actions"
|
||||
|
||||
- name: "Install Actions from library"
|
||||
run: "npm install --production --prefix ./actions"
|
||||
|
||||
- name: "Determine if there is a matching release tag"
|
||||
id: "has-matching-release-tag"
|
||||
uses: "./actions/has-matching-release-tag"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
release_tag_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
|
||||
release_branch_regexp: "^v(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.x$"
|
||||
|
||||
- name: "Determine technical documentation version"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./actions/docs-target"
|
||||
id: "target"
|
||||
with:
|
||||
ref_name: "${{ github.ref_name }}"
|
||||
|
||||
- name: "Clone website-sync Action"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
run: "git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync"
|
||||
|
||||
- name: "Publish to website repository (release)"
|
||||
if: "steps.has-matching-release-tag.outputs.bool == 'true'"
|
||||
uses: "./.github/actions/website-sync"
|
||||
id: "publish-release"
|
||||
with:
|
||||
repository: "grafana/website"
|
||||
branch: "master"
|
||||
host: "github.com"
|
||||
github_pat: "${{ secrets.GH_BOT_ACCESS_TOKEN }}"
|
||||
source_folder: "docs/sources"
|
||||
target_folder: "content/docs/grafana/${{ steps.target.outputs.target }}"
|
||||
49
.github/workflows/publish.yml
vendored
49
.github/workflows/publish.yml
vendored
@@ -1,49 +0,0 @@
|
||||
name: publish_docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v8.3.x
|
||||
paths:
|
||||
- 'docs/sources/**'
|
||||
- 'packages/grafana-*/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- run: git clone --single-branch --no-tags --depth 1 -b master https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/website-sync ./.github/actions/website-sync
|
||||
- name: generate-packages-docs
|
||||
uses: actions/setup-node@v2.4.1
|
||||
id: generate-docs
|
||||
with:
|
||||
node-version: '14'
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
|
||||
- uses: actions/cache@v2.1.6
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
yarn-
|
||||
- run: yarn install --immutable
|
||||
- run: ./scripts/ci-reference-docs-build.sh
|
||||
- name: publish-to-git
|
||||
uses: ./.github/actions/website-sync
|
||||
id: publish
|
||||
with:
|
||||
repository: grafana/website
|
||||
branch: master
|
||||
host: github.com
|
||||
github_pat: '${{ secrets.GH_BOT_ACCESS_TOKEN }}'
|
||||
source_folder: docs/sources
|
||||
target_folder: content/docs/grafana/latest
|
||||
allow_no_changes: 'true'
|
||||
- shell: bash
|
||||
run: |
|
||||
test -n "${{ steps.publish.outputs.commit_hash }}"
|
||||
test -n "${{ steps.publish.outputs.working_directory }}"
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -13,6 +13,7 @@ public/dist/tsconfig.tsbuildinfo
|
||||
/emails/dist
|
||||
/reports
|
||||
/e2e/tmp
|
||||
/scripts/grafana-server/tmp
|
||||
vendor/
|
||||
/docs/menu.yaml
|
||||
/requests
|
||||
@@ -137,6 +138,9 @@ compilation-stats.json
|
||||
!/e2e/**/screenshots/expected/*
|
||||
/e2e/**/videos/*
|
||||
|
||||
# grafana server
|
||||
/scripts/grafana-server/server.log
|
||||
|
||||
# a11y tests
|
||||
/pa11y-ci-results.json
|
||||
/pa11y-ci-report
|
||||
|
||||
@@ -7,6 +7,7 @@ public/vendor/
|
||||
vendor/
|
||||
/data/
|
||||
e2e/tmp
|
||||
scripts/grafana-server/tmp
|
||||
public/build/
|
||||
public/sass/*.generated.scss
|
||||
devenv/
|
||||
|
||||
127
CHANGELOG.md
127
CHANGELOG.md
@@ -1,3 +1,86 @@
|
||||
<!-- 8.3.7 START -->
|
||||
|
||||
# 8.3.7 (2022-03-01)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Provisioning:** Ensure that the default value for orgID is set when provisioning datasources to be deleted. [#44244](https://github.com/grafana/grafana/pull/44244), [@filewalkwithme](https://github.com/filewalkwithme)
|
||||
|
||||
<!-- 8.3.7 END -->
|
||||
<!-- 8.3.6 START -->
|
||||
|
||||
# 8.3.6 (2022-02-09)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Cloud Monitoring:** Reduce request size when listing labels. [#44365](https://github.com/grafana/grafana/pull/44365), [@mtanda](https://github.com/mtanda)
|
||||
- **Explore:** Show scalar data result in a table instead of graph. [#44362](https://github.com/grafana/grafana/pull/44362), [@tharun208](https://github.com/tharun208)
|
||||
- **Snapshots:** Updates the default external snapshot server URL. [#44563](https://github.com/grafana/grafana/pull/44563), [@DanCech](https://github.com/DanCech)
|
||||
- **Table:** Makes footer not overlap table content. [#44210](https://github.com/grafana/grafana/pull/44210), [@dprokop](https://github.com/dprokop)
|
||||
- **Tempo:** Add request histogram to service graph datalink. [#44671](https://github.com/grafana/grafana/pull/44671), [@connorlindsey](https://github.com/connorlindsey)
|
||||
- **Tempo:** Add time range to tempo search query behind a feature flag. [#43811](https://github.com/grafana/grafana/pull/43811), [@connorlindsey](https://github.com/connorlindsey)
|
||||
- **Tempo:** Auto-clear results when changing query type. [#44390](https://github.com/grafana/grafana/pull/44390), [@connorlindsey](https://github.com/connorlindsey)
|
||||
- **Tempo:** Display start time in search results as relative time. [#44568](https://github.com/grafana/grafana/pull/44568), [@tharun208](https://github.com/tharun208)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **CloudMonitoring:** Fix resource labels in query editor. [#44550](https://github.com/grafana/grafana/pull/44550), [@iwysiu](https://github.com/iwysiu)
|
||||
- **Cursor sync:** Apply the settings without saving the dashboard. [#44270](https://github.com/grafana/grafana/pull/44270), [@dprokop](https://github.com/dprokop)
|
||||
- **LibraryPanels:** Fix for Error while cleaning library panels. [#45033](https://github.com/grafana/grafana/pull/45033), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
- **Logs Panel:** fix timestamp parsing for string dates without timezone. [#44664](https://github.com/grafana/grafana/pull/44664), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Prometheus:** Fix some of the alerting queries that use reduce/math operation. [#44380](https://github.com/grafana/grafana/pull/44380), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **TablePanel:** Fix ad-hoc variables not working on default datasources. [#44314](https://github.com/grafana/grafana/pull/44314), [@joshhunt](https://github.com/joshhunt)
|
||||
- **Text Panel:** Fix alignment of elements. [#44313](https://github.com/grafana/grafana/pull/44313), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Variables:** Fix for constant variables in self referencing links. [#44631](https://github.com/grafana/grafana/pull/44631), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
|
||||
<!-- 8.3.6 END -->
|
||||
<!-- 8.3.5 START -->
|
||||
|
||||
# 8.3.5 (2022-02-08)
|
||||
|
||||
- **Security**: Fixes CVE-2022-21702. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
|
||||
- **Security**: Fixes CVE-2022-21703. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
|
||||
- **Security**: Fixes CVE-2022-21713. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
|
||||
|
||||
<!-- 8.3.5 END -->
|
||||
<!-- 8.3.4 START -->
|
||||
|
||||
# 8.3.4 (2022-01-17)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Alerting:** Allow configuration of non-ready alertmanagers. [#43063](https://github.com/grafana/grafana/pull/43063), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Allow customization of Google chat message. [#43568](https://github.com/grafana/grafana/pull/43568), [@alexweav](https://github.com/alexweav)
|
||||
- **Alerting:** Allow customization of Google chat message (#43568). [#43723](https://github.com/grafana/grafana/pull/43723), [@alexweav](https://github.com/alexweav)
|
||||
- **AppPlugins:** Support app plugins with only default nav. [#43016](https://github.com/grafana/grafana/pull/43016), [@torkelo](https://github.com/torkelo)
|
||||
- **InfluxDB:** InfluxQL: query editor: skip fields in metadata queries. [#42543](https://github.com/grafana/grafana/pull/42543), [@gabor](https://github.com/gabor)
|
||||
- **Postgres/MySQL/MSSQL:** Cancel in-flight SQL query if user cancels query in grafana. [#43890](https://github.com/grafana/grafana/pull/43890), [@mdvictor](https://github.com/mdvictor)
|
||||
- **Prometheus:** Forward oauth tokens after prometheus datasource migration. [#43686](https://github.com/grafana/grafana/pull/43686), [@MasslessParticle](https://github.com/MasslessParticle)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Azure Monitor:** Bug fix for variable interpolations in metrics dropdowns. [#43251](https://github.com/grafana/grafana/pull/43251), [@sarahzinger](https://github.com/sarahzinger)
|
||||
- **Azure Monitor:** Improved error messages for variable queries. [#43213](https://github.com/grafana/grafana/pull/43213), [@sunker](https://github.com/sunker)
|
||||
- **CloudMonitoring:** Fixes broken variable queries that use group bys. [#43914](https://github.com/grafana/grafana/pull/43914), [@sunker](https://github.com/sunker)
|
||||
- **Configuration:** You can now see your expired API keys if you have no active ones. [#42452](https://github.com/grafana/grafana/pull/42452), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Elasticsearch:** Fix handling multiple datalinks for a single field. [#44029](https://github.com/grafana/grafana/pull/44029), [@Elfo404](https://github.com/Elfo404)
|
||||
- **Export:** Fix error being thrown when exporting dashboards using query variables that reference the default datasource. [#44034](https://github.com/grafana/grafana/pull/44034), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **ImportDashboard:** Fixes issue with importing dashboard and name ending up in uid. [#43451](https://github.com/grafana/grafana/pull/43451), [@torkelo](https://github.com/torkelo)
|
||||
- **Login:** Page no longer overflows on mobile. [#43739](https://github.com/grafana/grafana/pull/43739), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Plugins:** Set backend metadata property for core plugins. [#43349](https://github.com/grafana/grafana/pull/43349), [@marefr](https://github.com/marefr)
|
||||
- **Prometheus:** Fill missing steps with null values. [#43622](https://github.com/grafana/grafana/pull/43622), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus:** Fix interpolation of $\_\_rate_interval variable. [#44035](https://github.com/grafana/grafana/pull/44035), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus:** Interpolate variables with curly brackets syntax. [#42927](https://github.com/grafana/grafana/pull/42927), [@ivanahuckova](https://github.com/ivanahuckova)
|
||||
- **Prometheus:** Respect the http-method data source setting. [#42753](https://github.com/grafana/grafana/pull/42753), [@gabor](https://github.com/gabor)
|
||||
- **Table:** Fixes issue with field config applied to wrong fields when hiding columns. [#43376](https://github.com/grafana/grafana/pull/43376), [@torkelo](https://github.com/torkelo)
|
||||
- **Toolkit:** Fix bug with rootUrls not being properly parsed when signing a private plugin. [#43014](https://github.com/grafana/grafana/pull/43014), [@dessen-xu](https://github.com/dessen-xu)
|
||||
- **Variables:** Fix so data source variables are added to adhoc configuration. [#43881](https://github.com/grafana/grafana/pull/43881), [@hugohaggmark](https://github.com/hugohaggmark)
|
||||
|
||||
### Plugin development fixes & changes
|
||||
|
||||
- **Toolkit:** Revert build config so tslib is bundled with plugins to prevent plugins from crashing. [#43556](https://github.com/grafana/grafana/pull/43556), [@mckn](https://github.com/mckn)
|
||||
|
||||
<!-- 8.3.4 END -->
|
||||
<!-- 8.3.3 START -->
|
||||
|
||||
# 8.3.3 (2021-12-10)
|
||||
@@ -29,7 +112,7 @@
|
||||
|
||||
# 8.3.2 (2021-12-10)
|
||||
|
||||
- **Security**: Fixes CVE-2021-43813 and CVE-2021-PENDING. For more information, see our [blog](https://grafana.com/blog/2021/12/10/grafana-8.3.2-and-7.5.12-released-with-moderate-severity-security-fix/
|
||||
- **Security**: Fixes CVE-2021-43813 and CVE-2021-43815. For more information, see our [blog](https://grafana.com/blog/2021/12/10/grafana-8.3.2-and-7.5.12-released-with-moderate-severity-security-fix/
|
||||
|
||||
<!-- 8.3.2 END -->
|
||||
|
||||
@@ -213,6 +296,14 @@ The access mode "browser" is deprecated in the following data sources and will b
|
||||
|
||||
- **grafana/ui:** Enable slider marks display. [#41275](https://github.com/grafana/grafana/pull/41275), [@dprokop](https://github.com/dprokop)
|
||||
|
||||
<!-- 8.2.7 START -->
|
||||
|
||||
# 8.2.7 (2021-12-07)
|
||||
|
||||
- **Security**: Fixes CVE-2021-43798. For more information, see our [blog](https://grafana.com/blog/2021/12/07/grafana-8.3.1-8.2.7-8.1.8-and-8.0.7-released-with-high-severity-security-fix/)
|
||||
|
||||
<!-- 8.2.7 END -->
|
||||
|
||||
<!-- 8.2.6 START -->
|
||||
|
||||
# 8.2.6 (2021-12-02)
|
||||
@@ -492,6 +583,14 @@ Panel queries and/or annotation queries that used more than one statistic will b
|
||||
|
||||
<!-- 8.2.0-beta1 END -->
|
||||
|
||||
<!-- 8.1.8 START -->
|
||||
|
||||
# 8.1.8 (2021-12-07)
|
||||
|
||||
- **Security**: Fixes CVE-2021-43798. For more information, see our [blog](https://grafana.com/blog/2021/12/07/grafana-8.3.1-8.2.7-8.1.8-and-8.0.7-released-with-high-severity-security-fix/)
|
||||
|
||||
<!-- 8.1.8 END -->
|
||||
|
||||
<!-- 8.1.7 START -->
|
||||
|
||||
# 8.1.7 (2021-10-06)
|
||||
@@ -766,6 +865,14 @@ Issue [#33879](https://github.com/grafana/grafana/issues/33879)
|
||||
|
||||
<!-- 8.1.0-beta1 END -->
|
||||
|
||||
<!-- 8.0.7 START -->
|
||||
|
||||
# 8.0.7 (2021-12-07)
|
||||
|
||||
- **Security**: Fixes CVE-2021-43798. For more information, see our [blog](https://grafana.com/blog/2021/12/07/grafana-8.3.1-8.2.7-8.1.8-and-8.0.7-released-with-high-severity-security-fix/)
|
||||
|
||||
<!-- 8.0.7 END -->
|
||||
|
||||
<!-- 8.0.6 START -->
|
||||
|
||||
# 8.0.6 (2021-07-14)
|
||||
@@ -1197,6 +1304,24 @@ Issue [#33352](https://github.com/grafana/grafana/issues/33352)
|
||||
- **AGPL License:** Update license from Apache 2.0 to the GNU Affero General Public License (AGPL). [#33184](https://github.com/grafana/grafana/pull/33184)
|
||||
|
||||
<!-- 8.0.0-beta1 END -->
|
||||
<!-- 7.5.15 START -->
|
||||
|
||||
# 7.5.15 (2022-02-08)
|
||||
|
||||
- **Security**: Fixes CVE-2022-21702. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
|
||||
- **Security**: Fixes CVE-2022-21703. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
|
||||
- **Security**: Fixes CVE-2022-21713. For more information, see our [blog](https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/)
|
||||
|
||||
<!-- 7.5.15 END -->
|
||||
<!-- 7.5.13 START -->
|
||||
|
||||
# 7.5.13 (2022-01-18)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **[v7.5.x] Alerting:** Fix NoDataFound for alert rules using AND operator (#41305). [#44066](https://github.com/grafana/grafana/pull/44066), [@armandgrillet](https://github.com/armandgrillet)
|
||||
|
||||
<!-- 7.5.13 END -->
|
||||
|
||||
<!-- 7.5.11 START -->
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.17.6-alpine3.15 as go-builder
|
||||
FROM golang:1.17.8-alpine3.15 as go-builder
|
||||
|
||||
RUN apk add --no-cache gcc g++ make
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ COPY emails emails
|
||||
ENV NODE_ENV production
|
||||
RUN yarn build
|
||||
|
||||
FROM golang:1.17.6 AS go-builder
|
||||
FROM golang:1.17.8 AS go-builder
|
||||
|
||||
WORKDIR /src/grafana
|
||||
|
||||
|
||||
@@ -288,8 +288,8 @@ content_security_policy_template = """script-src 'self' 'unsafe-eval' 'unsafe-in
|
||||
[snapshots]
|
||||
# snapshot sharing options
|
||||
external_enabled = true
|
||||
external_snapshot_url = https://snapshots-origin.raintank.io
|
||||
external_snapshot_name = Publish to snapshot.raintank.io
|
||||
external_snapshot_url = https://snapshots.raintank.io
|
||||
external_snapshot_name = Publish to snapshots.raintank.io
|
||||
|
||||
# Set to true to enable this Grafana instance act as an external snapshot server and allow unauthenticated requests for
|
||||
# creating and deleting snapshots.
|
||||
@@ -957,6 +957,8 @@ container_name =
|
||||
server_url =
|
||||
# If the remote HTTP image renderer service runs on a different server than the Grafana server you may have to configure this to a URL where Grafana is reachable, e.g. http://grafana.domain/.
|
||||
callback_url =
|
||||
# An auth token that will be sent to and verified by the renderer. The renderer will deny any request without an auth token matching the one configured on the renderer side.
|
||||
renderer_token = -
|
||||
# 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 amount of concurrent requests.
|
||||
concurrent_render_request_limit = 30
|
||||
|
||||
@@ -282,8 +282,8 @@
|
||||
[snapshots]
|
||||
# snapshot sharing options
|
||||
;external_enabled = true
|
||||
;external_snapshot_url = https://snapshots-origin.raintank.io
|
||||
;external_snapshot_name = Publish to snapshot.raintank.io
|
||||
;external_snapshot_url = https://snapshots.raintank.io
|
||||
;external_snapshot_name = Publish to snapshots.raintank.io
|
||||
|
||||
# Set to true to enable this Grafana instance act as an external snapshot server and allow unauthenticated requests for
|
||||
# creating and deleting snapshots.
|
||||
@@ -931,6 +931,8 @@
|
||||
;server_url =
|
||||
# If the remote HTTP image renderer service runs on a different server than the Grafana server you may have to configure this to a URL where Grafana is reachable, e.g. http://grafana.domain/.
|
||||
;callback_url =
|
||||
# An auth token that will be sent to and verified by the renderer. The renderer will deny any request without an auth token matching the one configured on the renderer side.
|
||||
;renderer_token = -
|
||||
# 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 amount of concurrent requests.
|
||||
;concurrent_render_request_limit = 30
|
||||
|
||||
@@ -16,8 +16,8 @@ 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.
|
||||
- `./scripts/grafana-server/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>/scripts/grafana-server/tmp/pid_.
|
||||
- `./scripts/grafana-server/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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Grafana documentation"
|
||||
description = "Guides, Installation and Feature Documentation"
|
||||
keywords = ["grafana", "installation", "documentation"]
|
||||
aliases = ["/docs/grafana/v1.1", "/docs/grafana/latest/guides/reference/admin", "/docs/grafana/v3.1"]
|
||||
aliases = ["/docs/grafana/v1.1", "/docs/grafana/v8.3/guides/reference/admin", "/docs/grafana/v3.1"]
|
||||
+++
|
||||
|
||||
# Grafana documentation
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Configuration"
|
||||
description = "Configuration documentation"
|
||||
keywords = ["grafana", "configuration", "documentation"]
|
||||
aliases = ["/docs/grafana/latest/installation/configuration/"]
|
||||
aliases = ["/docs/grafana/v8.3/installation/configuration/"]
|
||||
weight = 150
|
||||
+++
|
||||
|
||||
@@ -565,11 +565,11 @@ Set to `false` to disable external snapshot publish endpoint (default `true`).
|
||||
|
||||
### external_snapshot_url
|
||||
|
||||
Set root URL to a Grafana instance where you want to publish external snapshots (defaults to https://snapshots-origin.raintank.io).
|
||||
Set root URL to a Grafana instance where you want to publish external snapshots (defaults to https://snapshots.raintank.io).
|
||||
|
||||
### external_snapshot_name
|
||||
|
||||
Set name for external snapshot button. Defaults to `Publish to snapshot.raintank.io`.
|
||||
Set name for external snapshot button. Defaults to `Publish to snapshots.raintank.io`.
|
||||
|
||||
### public_mode
|
||||
|
||||
@@ -869,8 +869,6 @@ Email server settings.
|
||||
|
||||
Enable this to allow Grafana to send email. Default is `false`.
|
||||
|
||||
If the password contains `#` or `;`, then you have to wrap it with triple quotes. Example: """#password;"""
|
||||
|
||||
### host
|
||||
|
||||
Default is `localhost:25`.
|
||||
@@ -881,7 +879,7 @@ In case of SMTP auth, default is `empty`.
|
||||
|
||||
### password
|
||||
|
||||
In case of SMTP auth, default is `empty`.
|
||||
In case of SMTP auth, default is `empty`. If the password contains `#` or `;`, then you have to wrap it with triple quotes. Example: """#password;"""
|
||||
|
||||
### cert_file
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Configure Grafana Docker image"
|
||||
description = "Guide for configuring the Grafana Docker image"
|
||||
keywords = ["grafana", "configuration", "documentation", "docker"]
|
||||
aliases = ["/docs/grafana/latest/installation/configure-docker/"]
|
||||
aliases = ["/docs/grafana/v8.3/installation/configure-docker/"]
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
|
||||
@@ -12,4 +12,6 @@ Grafana’s database contains secrets, which are used to query data sources, sen
|
||||
|
||||
Grafana encrypts these secrets before they are written to the database, by using a symmetric-key encryption algorithm called Advanced Encryption Standard (AES), and using a [secret key]({{< relref "../administration/configuration/#secret_key" >}}) that you can change when you configure a new Grafana instance.
|
||||
|
||||
You can also use envelope encryption, which complements a KMS integration by adding a layer of indirection to the encryption process.
|
||||
You can choose to use [envelope encryption]({{< relref "./envelope-encryption.md" >}}), which complements a [KMS integration]({{< relref "../enterprise/kms-integration/_index.md" >}}) in Grafana Enterprise by adding a layer of indirection to the encryption process.
|
||||
|
||||
In Grafana Enterprise, you can also choose to [encrypt secrets in AES-GCM mode]({{< relref "../administration/database-encryption-enterprise.md" >}}) instead of AES-CFB.
|
||||
|
||||
21
docs/sources/administration/envelope-encryption.md
Normal file
21
docs/sources/administration/envelope-encryption.md
Normal file
@@ -0,0 +1,21 @@
|
||||
+++
|
||||
title = "Envelope encryption"
|
||||
description = "Envelope encryption"
|
||||
keywords = ["grafana", "envelope encryption", "documentation"]
|
||||
aliases = [""]
|
||||
weight = 430
|
||||
+++
|
||||
|
||||
# Envelope encryption
|
||||
|
||||
In Grafana, you can choose to use envelope encryption. Instead of
|
||||
encrypting all secrets with a single key, Grafana uses a set of keys
|
||||
called data encryption keys (DEKs) to encrypt them. These data
|
||||
encryption keys are themselves encrypted with a single key encryption
|
||||
key (KEK).
|
||||
|
||||
To turn on envelope encryption, add the term `envelopeEncryption` to the list of feature toggles in your [Grafana configuration]({{< relref "../administration/configuration/#feature_toggles" >}}).
|
||||
|
||||
> **Note:** Avoid turning off envelope encryption once you have turned it on, and back up your database before turning it on for the first time. If you turn envelope encryption on, create new secrets or update your existing secrets (for example, by creating a new data source or alert notification channel), and then turn envelope encryption off, then those data sources, alert notification channels, and other resources using envelope encryption will stop working and you will experience errors. This is because the secrets encrypted with envelope encryption cannot be decrypted or used by Grafana when envelope encryption is turned off.
|
||||
|
||||
Refer to [Database encryption]({{< relref "../administration/database-encryption.md" >}}) to learn more about how Grafana encrypts secrets in the database.
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Preferences"
|
||||
aliases =["/docs/grafana/latest/administration/preferences.md"]
|
||||
aliases =["/docs/grafana/v8.3/administration/preferences.md"]
|
||||
weight = 50
|
||||
+++
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ weight = 100
|
||||
|
||||
In Grafana, you can change your names and emails associated with groups or accounts in the Settings or Preferences. This topic provides instructions for each task.
|
||||
|
||||
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
|
||||
{{< docs/shared lookup="preferences/some-tasks-require-permissions.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Change organization name
|
||||
|
||||
@@ -19,7 +19,7 @@ Grafana server administrators and organization administrators can change organiz
|
||||
Follow these instructions if you are a Grafana Server Admin.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "manage-users/view-server-org-list.md" >}}
|
||||
{{< docs/shared lookup="manage-users/view-server-org-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
1. In the organization list, click the name of the organization that you want to change.
|
||||
1. In **Name**, enter the new organization name.
|
||||
@@ -31,7 +31,7 @@ Follow these instructions if you are a Grafana Server Admin.
|
||||
If you are an Organization Admin, follow these steps:
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "preferences/org-preferences-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/org-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
1. In **Organization name**, enter the new name.
|
||||
1. Click **Update organization name**.
|
||||
|
||||
@@ -9,7 +9,7 @@ weight = 200
|
||||
|
||||
In Grafana, you can modify the UI theme configured in the Settings or Preferences. Set the UI theme for the server, an organization, a team, or your personal user account using the instructions in this topic.
|
||||
|
||||
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
|
||||
{{< docs/shared lookup="preferences/some-tasks-require-permissions.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Theme options
|
||||
|
||||
@@ -42,8 +42,8 @@ To see what the current settings are, refer to [View server settings]({{< relref
|
||||
Organization administrators can change the UI theme for all users in an organization.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "preferences/org-preferences-list.md" >}}
|
||||
{{< docs/shared "preferences/select-ui-theme-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/org-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< docs/shared lookup="preferences/select-ui-theme-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< /docs/list >}}
|
||||
|
||||
## Change team UI theme
|
||||
@@ -51,10 +51,10 @@ Organization administrators can change the UI theme for all users in an organiza
|
||||
Organization and team administrators can change the UI theme for all users in a team.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "manage-users/view-team-list.md" >}}
|
||||
{{< docs/shared lookup="manage-users/view-team-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
1. Click on the team that you want to change the UI theme for and then navigate to the **Settings** tab.
|
||||
{{< docs/shared "preferences/select-ui-theme-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/select-ui-theme-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< /docs/list >}}
|
||||
|
||||
## Change your personal UI theme
|
||||
@@ -62,6 +62,6 @@ Organization and team administrators can change the UI theme for all users in a
|
||||
You can change the UI theme for your user account. This setting overrides UI theme settings at higher levels.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "preferences/navigate-user-preferences-list.md" >}}
|
||||
{{< docs/shared "preferences/select-ui-theme-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/navigate-user-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< docs/shared lookup="preferences/select-ui-theme-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< /docs/list >}}
|
||||
|
||||
@@ -9,7 +9,7 @@ weight = 400
|
||||
|
||||
By default, Grafana uses the timezone in your web browser. However, you can override this setting at the server, organization, team, or individual user level. This topic provides instructions for each task.
|
||||
|
||||
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
|
||||
{{< docs/shared lookup="preferences/some-tasks-require-permissions.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Set server timezone
|
||||
|
||||
@@ -20,8 +20,8 @@ Grafana server administrators can choose a default timezone for all users on the
|
||||
Organization administrators can choose a default timezone for their organization.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "preferences/org-preferences-list.md" >}}
|
||||
{{< docs/shared "preferences/select-timezone-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/org-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< docs/shared lookup="preferences/select-timezone-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< /docs/list >}}
|
||||
|
||||
## Set team timezone
|
||||
@@ -29,10 +29,10 @@ Organization administrators can choose a default timezone for their organization
|
||||
Organization administrators and team administrators can choose a default timezone for all users in a team.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "manage-users/view-team-list.md" >}}
|
||||
{{< docs/shared lookup="manage-users/view-team-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
1. Click on the team you that you want to change the timezone for and then navigate to the **Settings** tab.
|
||||
{{< docs/shared "preferences/select-timezone-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/select-timezone-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< /docs/list >}}
|
||||
|
||||
## Set your personal timezone
|
||||
@@ -40,6 +40,6 @@ Organization administrators and team administrators can choose a default timezon
|
||||
You can change the timezone for your user account. This setting overrides timezone settings at higher levels.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "preferences/navigate-user-preferences-list.md" >}}
|
||||
{{< docs/shared "preferences/select-timezone-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/navigate-user-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< docs/shared lookup="preferences/select-timezone-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< /docs/list >}}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Change home dashboard"
|
||||
description = "How to replace the default home dashboard"
|
||||
keywords = ["grafana", "configuration", "documentation", "home"]
|
||||
aliases = ["/docs/grafana/latest/administration/change-home-dashboard/"]
|
||||
aliases = ["/docs/grafana/v8.3/administration/change-home-dashboard/"]
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
@@ -10,7 +10,7 @@ weight = 300
|
||||
|
||||
The home dashboard you set is the one all users will see by default when they log in. You can set the home dashboard for the server, an organization, a team, or your personal user account. This topic provides instructions for each task.
|
||||
|
||||
{{< docs/shared "preferences/some-tasks-require-permissions.md" >}}
|
||||
{{< docs/shared lookup="preferences/some-tasks-require-permissions.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
## Navigate to the home dashboard
|
||||
|
||||
@@ -47,9 +47,9 @@ default_home_dashboard_path = data/main-dashboard.json
|
||||
Organization administrators can choose a home dashboard for their organization.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "preferences/navigate-to-the-dashboard-list.md" >}}
|
||||
{{< docs/shared "preferences/org-preferences-list.md" >}}
|
||||
{{< docs/shared "preferences/select-home-dashboard-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/navigate-to-the-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< docs/shared lookup="preferences/org-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< docs/shared lookup="preferences/select-home-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< /docs/list >}}
|
||||
|
||||
## Set home dashboard for your team
|
||||
@@ -57,11 +57,11 @@ Organization administrators can choose a home dashboard for their organization.
|
||||
Organization administrators and Team Admins can choose a home dashboard for a team.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "preferences/navigate-to-the-dashboard-list.md" >}}
|
||||
{{< docs/shared "manage-users/view-team-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/navigate-to-the-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< docs/shared lookup="manage-users/view-team-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
1. Click on the team that you want to change the home dashboard for and then navigate to the **Settings** tab.
|
||||
{{< docs/shared "preferences/select-home-dashboard-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/select-home-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< /docs/list >}}
|
||||
|
||||
## Set your personal home dashboard
|
||||
@@ -69,7 +69,7 @@ Organization administrators and Team Admins can choose a home dashboard for a te
|
||||
You can choose your own personal home dashboard. This setting overrides all home dashboards set at higher levels.
|
||||
|
||||
{{< docs/list >}}
|
||||
{{< docs/shared "preferences/navigate-to-the-dashboard-list.md" >}}
|
||||
{{< docs/shared "preferences/navigate-user-preferences-list.md" >}}
|
||||
{{< docs/shared "preferences/select-home-dashboard-list.md" >}}
|
||||
{{< docs/shared lookup="preferences/navigate-to-the-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< docs/shared lookup="preferences/navigate-user-preferences-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< docs/shared lookup="preferences/select-home-dashboard-list.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
{{< /docs/list >}}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Provisioning"
|
||||
description = ""
|
||||
keywords = ["grafana", "provisioning"]
|
||||
aliases = ["/docs/grafana/latest/installation/provisioning"]
|
||||
aliases = ["/docs/grafana/v8.3/installation/provisioning"]
|
||||
weight = 800
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Security"
|
||||
description = "Security Docs"
|
||||
keywords = ["grafana", "security", "documentation"]
|
||||
aliases = ["/docs/grafana/latest/installation/security/"]
|
||||
aliases = ["/docs/grafana/v8.3/installation/security/"]
|
||||
weight = 500
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Set up Grafana for high availability"
|
||||
keywords = ["grafana", "tutorials", "HA", "high availability"]
|
||||
aliases = ["/docs/grafana/latest/tutorials/ha_setup/"]
|
||||
aliases = ["/docs/grafana/v8.3/tutorials/ha_setup/"]
|
||||
weight = 1200
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Internal Grafana metrics"
|
||||
description = "Internal metrics exposed by Grafana"
|
||||
keywords = ["grafana", "metrics", "internal metrics"]
|
||||
aliases = ["/docs/grafana/latest/admin/metrics/"]
|
||||
aliases = ["/docs/grafana/v8.3/admin/metrics/"]
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "View server settings"
|
||||
description = "How to view server settings in the Grafana UI"
|
||||
keywords = ["grafana", "configuration", "server", "settings"]
|
||||
aliases = ["/docs/grafana/latest/admin/view-server-settings/"]
|
||||
aliases = ["/docs/grafana/v8.3/admin/view-server-settings/"]
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "View server stats"
|
||||
keywords = ["grafana", "server", "statistics"]
|
||||
aliases = ["/docs/grafana/latest/admin/view-server-stats/"]
|
||||
aliases = ["/docs/grafana/v8.3/admin/view-server-stats/"]
|
||||
weight = 400
|
||||
+++
|
||||
|
||||
|
||||
@@ -23,4 +23,4 @@ You can perform the following tasks for alerts:
|
||||
- [Test alert rules and troubleshoot]({{< relref "troubleshoot-alerts.md" >}})
|
||||
- [Add or edit an alert contact point]({{< relref "notifications.md" >}})
|
||||
|
||||
{{< docs/shared "alerts/grafana-managed-alerts.md" >}}
|
||||
{{< docs/shared lookup="alerts/grafana-managed-alerts.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Alert notification templating"
|
||||
keywords = ["grafana", "documentation", "alerting", "alerts", "notification", "templating"]
|
||||
weight = 110
|
||||
aliases = ["/docs/grafana/latest/alerting/add-notification-template/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/add-notification-template/"]
|
||||
+++
|
||||
|
||||
# Alert notification templating
|
||||
|
||||
@@ -3,7 +3,7 @@ title = "Create alerts"
|
||||
description = "Configure alert rules"
|
||||
keywords = ["grafana", "alerting", "guide", "rules"]
|
||||
weight = 200
|
||||
aliases = ["/docs/grafana/latest/alerting/create-alerts/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/create-alerts/"]
|
||||
+++
|
||||
|
||||
# Create alerts
|
||||
|
||||
@@ -3,7 +3,7 @@ title = "Alert notifications"
|
||||
description = "Alerting notifications guide"
|
||||
keywords = ["Grafana", "alerting", "guide", "notifications"]
|
||||
weight = 100
|
||||
aliases = ["/docs/grafana/latest/alerting/notifications/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/notifications/"]
|
||||
+++
|
||||
|
||||
# Alert notifications
|
||||
|
||||
@@ -3,7 +3,7 @@ title = "Pause alert rule"
|
||||
description = "Pause an existing alert rule"
|
||||
keywords = ["grafana", "alerting", "guide", "rules", "view"]
|
||||
weight = 400
|
||||
aliases = ["/docs/grafana/latest/alerting/pause-an-alert-rule/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/pause-an-alert-rule/"]
|
||||
+++
|
||||
|
||||
# Pause an alert rule
|
||||
|
||||
@@ -3,7 +3,7 @@ title = "Troubleshoot alerts"
|
||||
description = "Troubleshoot alert rules"
|
||||
keywords = ["grafana", "alerting", "guide", "rules", "troubleshoot"]
|
||||
weight = 500
|
||||
aliases = ["/docs/grafana/latest/alerting/troubleshoot-alerts/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/troubleshoot-alerts/"]
|
||||
+++
|
||||
|
||||
# Troubleshoot alerts
|
||||
|
||||
@@ -3,7 +3,7 @@ title = "View alerts"
|
||||
description = "View existing alert rules"
|
||||
keywords = ["grafana", "alerting", "guide", "rules", "view"]
|
||||
weight = 400
|
||||
aliases = ["/docs/grafana/latest/alerting/view-alerts/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/view-alerts/"]
|
||||
+++
|
||||
|
||||
# View existing alert rules
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Grafana alerts"
|
||||
aliases = ["/docs/grafana/latest/alerting/metrics/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/metrics/"]
|
||||
weight = 113
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Create and manage rules"
|
||||
aliases = ["/docs/grafana/latest/alerting/rules/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/rules/"]
|
||||
weight = 130
|
||||
+++
|
||||
|
||||
|
||||
@@ -7,54 +7,32 @@ weight = 401
|
||||
|
||||
# Annotations and labels for alerting rules
|
||||
|
||||
Annotations and labels help customize alert messages so that you can quickly identify the service or application that needs attention.
|
||||
Annotations and labels are key value pairs associated with alerts originating from the alerting rule, datasource response, and as a result of alerting rule evaluation. They can be used in alert notifications directly or in [templates]({{< relref "../message-templating/" >}}) and [template functions]({{< relref "../message-templating/template-functions" >}}) to create notification contact dynamically.
|
||||
|
||||
## Annotations
|
||||
|
||||
Annotations are key-value pairs that provide additional meta-information about an alert. For example: a description, a summary, and runbook URL. These are displayed in rule and alert details in the UI and can be used in contact type message templates. Annotations can also be templated, for example `Instance {{ $labels.instance }} down` will have the evaluated `instance` label value added for every alert this rule produces.
|
||||
Annotations are key-value pairs that provide additional meta-information about an alert. For example: a description, a summary, and runbook URL. These are displayed in rule and alert details in the UI and can be used in contact point message templates.
|
||||
|
||||
## Labels
|
||||
|
||||
Labels are key-value pairs that categorize or identify an alert. Labels are used to match alerts in silences or match and groups alerts in notification policies. Labels are also shown in rule or alert details in the UI and can be used in contact type message templates. For example, you can add a `severity` label, then configure a separate notification policy for each severity. You can also add, for example, a `team` label and configure notification policies specific to the team or silence all alerts for a particular team. Labels can also be templated like annotations, for example, `{{ $labels.namespace }}/{{ $labels.job }}` will produce a new rule label that will have the evaluated `namespace` and `job` label value added for every alert this rule produces. The rule labels take precedence over the labels produced by the query/condition.
|
||||
Labels are key-value pairs that contain information about, and are used to uniquely identify an alert. The label set for an alert is generated and added to throughout the alerting evaluation and notification process.
|
||||
|
||||
### How are labels used?
|
||||
|
||||
- The complete set of labels for an alert is what uniquely identifies an alert within Grafana Alerts.
|
||||
- The Alertmanager uses labels to match alerts for [silences]({{< relref "../silences/" >}}) and [alert groups]({{< relref "../alert-groups/" >}}) in [notification policies]({{< relref "../notification-policies/" >}}).
|
||||
- The alerting UI displays labels for every alert instance generated by the evaluation of that rule.
|
||||
- Contact points can access labels to dynamically generate notifications that contain information specific to the alert that is resulting in a notification.
|
||||
- Labels can be added to an [alerting rule]({{< relref "../alerting-rules/" >}}). These manually configured labels are able to use template functions and reference other labels. Labels added to an alerting rule here take precedence in the event of a collision between labels.
|
||||
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-edit-details-8-0.png" max-width="550px" caption="Alert details" >}}
|
||||
|
||||
#### Template variables
|
||||
#### Variables available to alerting rule labels and annotations
|
||||
|
||||
The following template variables are available when expanding annotations and labels.
|
||||
|
||||
| Name | Description |
|
||||
| ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. This is unavailable when the rule uses a classic condition. |
|
||||
| $values | The values of all reduce and math expressions that were evaluated for this alert rule. For example, `{{ $values.A }}`, `{{ $values.A.Labels }}` and `{{ $values.A.Value }}` where `A` is the `refID` of the expression. This is unavailable when the rule uses a [classic condition]({{< relref "./create-grafana-managed-rule/#single-and-multi-dimensional-rule" >}}) |
|
||||
| $value | The value string of the alert instance. For example, `[ var='A' labels={instance=foo} value=10 ]`. |
|
||||
|
||||
#### Template functions
|
||||
|
||||
The following template functions are available when expanding annotations and labels.
|
||||
|
||||
| Name | Argument | Return | Description |
|
||||
| ------------------ | ------------------------------------------------------------ | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| humanize | number or string | string | Converts a number to a more readable format, using metric prefixes. |
|
||||
| humanize1024 | number or string | string | Like humanize, but uses 1024 as the base rather than 1000. |
|
||||
| humanizeDuration | number or string | string | Converts a duration in seconds to a more readable format. |
|
||||
| humanizePercentage | number or string | string | Converts a ratio value to a fraction of 100. |
|
||||
| humanizeTimestamp | number or string | string | Converts a Unix timestamp in seconds to a more readable format. |
|
||||
| title | string | string | strings.Title, capitalises first character of each word. |
|
||||
| toUpper | string | string | strings.ToUpper, converts all characters to upper case. |
|
||||
| toLower | string | string | strings.ToLower, converts all characters to lower case. |
|
||||
| match | pattern, text | boolean | regexp.MatchString Tests for a unanchored regexp match. |
|
||||
| reReplaceAll | pattern, replacement, text | string | Regexp.ReplaceAllString Regexp substitution, unanchored. |
|
||||
| graphLink | string - JSON Object with `"expr"` and `"datasource"` fields | string | Returns the path to graphical view in [Explore](https://grafana.com/docs/grafana/latest/explore/) for the given expression and data source. |
|
||||
| tableLink | string- JSON Object with `"expr"` and `"datasource"` fields | string | Returns the path to tabular view in [Explore](https://grafana.com/docs/grafana/latest/explore/) for the given expression and data source. |
|
||||
| args | []interface{} | map[string]interface{} | Converts a list of objects to a map with keys, for example, arg0, arg1. Use this function to pass multiple arguments to templates. |
|
||||
| externalURL | nothing | string | Returns a string representing the external URL. |
|
||||
| pathPrefix | nothing | string | Returns the path of the external URL. |
|
||||
| tmpl | string, []interface{} | nothing | Not supported |
|
||||
| safeHtml | string | string | Not supported |
|
||||
| query | query string | []sample | Not supported |
|
||||
| first | []sample | sample | Not supported |
|
||||
| label | label, sample | string | Not supported |
|
||||
| strvalue | []sample | string | Not supported |
|
||||
| value | sample | float64 | Not supported |
|
||||
| sortByLabel | label, []samples | []sample | Not supported |
|
||||
| Name | Description |
|
||||
| ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| $labels | The labels from the query or condition. For example, `{{ $labels.instance }}` and `{{ $labels.job }}`. This is unavailable when the rule uses a [classic condition]({{< relref "./create-grafana-managed-rule/#single-and-multi-dimensional-rule" >}}). |
|
||||
| $values | The values of all reduce and math expressions that were evaluated for this alert rule. For example, `{{ $values.A }}`, `{{ $values.A.Labels }}` and `{{ $values.A.Value }}` where `A` is the `refID` of the expression. This is unavailable when the rule uses a classic condition |
|
||||
| $value | The value string of the alert instance. For example, `[ var='A' labels={instance=foo} value=10 ]`. |
|
||||
|
||||
@@ -29,10 +29,10 @@ For Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the r
|
||||
- From the **Select data source** drop-down, select an external Prometheus, an external Loki, or a Grafana Cloud data source.
|
||||
- From the **Namespace** drop-down, select an existing rule namespace. Otherwise, click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose.
|
||||
- From the **Group** drop-down, select an existing group within the selected namespace. Otherwise, click **Add new** and enter a name to create a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-edit-cortex-alert-type-8-0.png" max-width="550px" caption="Alert details" >}}
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-alert-type-8-0.png" max-width="550px" caption="Alert details" >}}
|
||||
1. In Step 2, add the query to evaluate.
|
||||
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-edit-cortex-query-8-0.png" max-width="550px" caption="Alert details" >}}
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-query-8-0.png" max-width="550px" caption="Alert details" >}}
|
||||
1. In Step 3, add additional metadata associated with the rule.
|
||||
- Add a description and summary to customize alert messages. Use the guidelines in [Annotations and labels for alerting]({{< relref "./alert-annotation-label.md" >}}).
|
||||
- Add Runbook URL, panel, dashboard, and alert IDs.
|
||||
|
||||
@@ -11,11 +11,13 @@ Grafana allows you to create alerting rules for an external Cortex or Loki insta
|
||||
|
||||
## Before you begin
|
||||
|
||||
For Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the ruler API by configuring their respective services.
|
||||
- Verify that you have write permission to the Prometheus data source. Otherwise, you will not be able to create or update Cortex managed alerting rules.
|
||||
|
||||
**Loki** - The `local` rule storage type, default for the Loki data source, supports only viewing of rules. To edit rules, configure one of the other rule storage types.
|
||||
- For Cortex and Loki data sources, enable the ruler API by configuring their respective services.
|
||||
|
||||
**Cortex** - When configuring a Grafana Prometheus data source to point to Cortex, use the [legacy `/api/prom` prefix](https://cortexmetrics.io/docs/api/#path-prefixes), not `/prometheus`. The Prometheus data source supports both Cortex and Prometheus, and Grafana expects that both the [Query API](https://cortexmetrics.io/docs/api/#querier--query-frontend) and [Ruler API](https://cortexmetrics.io/docs/api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
|
||||
- **Loki** - The `local` rule storage type, default for the Loki data source, supports only viewing of rules. To edit rules, configure one of the other rule storage types.
|
||||
|
||||
- **Cortex** - use the [legacy `/api/prom` prefix](https://cortexmetrics.io/docs/api/#path-prefixes), not `/prometheus`. The Prometheus data source supports both Cortex and Prometheus, and Grafana expects that both the [Query API](https://cortexmetrics.io/docs/api/#querier--query-frontend) and [Ruler API](https://cortexmetrics.io/docs/api/#ruler) are under the same URL. You cannot provide a separate URL for the Ruler API.
|
||||
|
||||
> **Note:** If you do not want to manage alerting rules for a particular Loki or Prometheus data source, go to its settings and clear the **Manage alerts via Alerting UI** checkbox.
|
||||
|
||||
@@ -29,10 +31,10 @@ For Cortex and Loki data sources to work with Grafana 8.0 alerting, enable the r
|
||||
- From the **Select data source** drop-down, select an external Prometheus, an external Loki, or a Grafana Cloud data source.
|
||||
- From the **Namespace** drop-down, select an existing rule namespace. Otherwise, click **Add new** and enter a name to create a new one. Namespaces can contain one or more rule groups and only have an organizational purpose. For more information, see [Cortex or Loki rule groups and namespaces]({{< relref "./edit-cortex-loki-namespace-group.md" >}}).
|
||||
- From the **Group** drop-down, select an existing group within the selected namespace. Otherwise, click **Add new** and enter a name to create a new one. Newly created rules are appended to the end of the group. Rules within a group are run sequentially at a regular interval, with the same evaluation time.
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-edit-cortex-alert-type-8-0.png" max-width="550px" caption="Alert details" >}}
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-alert-type-8-0.png" max-width="550px" caption="Alert details" >}}
|
||||
1. In Step 2, add the query to evaluate.
|
||||
- Enter a PromQL or LogQL expression. The rule fires if the evaluation result has at least one series with a value that is greater than 0. An alert is created for each series.
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-edit-cortex-query-8-0.png" max-width="550px" caption="Alert details" >}}
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-edit-mimir-query-8-0.png" max-width="550px" caption="Alert details" >}}
|
||||
1. In Step 3, add conditions.
|
||||
- In the **For** text box, specify the duration for which the condition must be true before an alert fires. If you specify `5m`, the condition must be true for 5 minutes before the alert fires.
|
||||
> **Note:** Once a condition is met, the alert goes into the `Pending` state. If the condition remains active for the duration specified, the alert transitions to the `Firing` state, else it reverts to the `Normal` state.
|
||||
|
||||
@@ -9,9 +9,9 @@ weight = 405
|
||||
|
||||
A namespace contains one or more groups. The rules within a group are run sequentially at a regular interval. The default interval is one (1) minute. You can rename Cortex or Loki rule namespaces and groups, and edit group evaluation intervals.
|
||||
|
||||

|
||||

|
||||
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-list-edit-cortex-loki-icon-8-2.png" max-width="550px" caption="Alert details" >}}
|
||||
{{< figure src="/static/img/docs/alerting/unified/rule-list-edit-mimir-loki-icon-8-2.png" max-width="550px" caption="Alert details" >}}
|
||||
|
||||
## Rename a namespace
|
||||
|
||||
@@ -36,4 +36,4 @@ The rules within a group are run sequentially at a regular interval, the default
|
||||
|
||||
When you rename the group, a new group with all the rules from the old group is created. The old group is deleted.
|
||||
|
||||

|
||||

|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Alerting fundamentals"
|
||||
aliases = ["/docs/grafana/latest/alerting/metrics/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/metrics/"]
|
||||
weight = 120
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Alertmanager"
|
||||
aliases = ["/docs/grafana/latest/alerting/metrics/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/metrics/"]
|
||||
weight = 116
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Alerting on numeric data"
|
||||
aliases = ["/docs/grafana/latest/alerting/metrics/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/metrics/"]
|
||||
weight = 116
|
||||
+++
|
||||
|
||||
@@ -17,7 +17,7 @@ Grafana managed alerts query the following backend data sources that have alerti
|
||||
|
||||
- built-in data sources or those developed and maintained by Grafana: `Graphite`, `Prometheus`, `Loki`, `InfluxDB`, `Elasticsearch`,
|
||||
`Google Cloud Monitoring`, `Cloudwatch`, `Azure Monitor`, `MySQL`, `PostgreSQL`, `MSSQL`, `OpenTSDB`, `Oracle`, and `Azure Monitor`
|
||||
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json]({{< relref "../../../developers/plugins/metadata.md" >}}))
|
||||
- community developed backend data sources with alerting enabled (`backend` and `alerting` properties are set in the [plugin.json](https://grafana.com/developers/plugin-tools/reference-plugin-json))
|
||||
|
||||
### Metrics from the alerting engine
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Message templating"
|
||||
description = "Message templating"
|
||||
aliases = ["/docs/grafana/latest/alerting/message-templating/"]
|
||||
aliases = ["/docs/grafana/v8.3/alerting/message-templating/"]
|
||||
keywords = ["grafana", "alerting", "guide", "contact point", "templating"]
|
||||
weight = 440
|
||||
+++
|
||||
|
||||
@@ -59,17 +59,3 @@ In addition to direct access of data (labels and annotations) stored as KeyValue
|
||||
| Remove | []string | KeyValue | Returns a copy of the Key/Value map without the given keys. |
|
||||
| Names | | []string | List of label names |
|
||||
| Values | | []string | List of label values |
|
||||
|
||||
## Functions
|
||||
|
||||
Some functions to transform values are also available, along with [default functions provided by Go templating](https://golang.org/pkg/text/template/#hdr-Functions).
|
||||
|
||||
| Name | Arguments | Returns |
|
||||
| ------------ | ---------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| title | string | Capitalizes first character of each word. |
|
||||
| toUpper | string | Converts all characters to upper case. |
|
||||
| match | pattern, string | Match a string using RegExp. |
|
||||
| reReplaceAll | pattern, replacement, string | RegExp substitution, unanchored. |
|
||||
| join | string, []string | Concatenates the elements of the second argument to create a single string. First argument is the separator. |
|
||||
| safeHtml | string | Marks string as HTML, not requiring auto-escaping. |
|
||||
| stringSlice | ...string | Returns passed strings as slice of strings. |
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
+++
|
||||
title = "Template functions"
|
||||
keywords = ["grafana", "alerting", "guide", "contact point", "templating"]
|
||||
+++
|
||||
|
||||
# Template Functions
|
||||
|
||||
Template functions allow you to process labels and annotations to generate dynamic notifications.
|
||||
|
||||
| Name | Argument type | Return type | Description |
|
||||
| ----------------------------------------- | ------------------------------------------------------------ | ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| [humanize](#humanize) | number or string | string | Converts a number to a more readable format, using metric prefixes. |
|
||||
| [humanize1024](#humanize1024) | number or string | string | Like humanize, but uses 1024 as the base rather than 1000. |
|
||||
| [humanizeDuration](#humanizeduration) | number or string | string | Converts a duration in seconds to a more readable format. |
|
||||
| [humanizePercentage](#humanizepercentage) | number or string | string | Converts a ratio value to a fraction of 100. |
|
||||
| [humanizeTimestamp](#humanizetimestamp) | number or string | string | Converts a Unix timestamp in seconds to a more readable format. |
|
||||
| [title](#title) | string | string | strings.Title, capitalises first character of each word. |
|
||||
| [toUpper](#toupper) | string | string | strings.ToUpper, converts all characters to upper case. |
|
||||
| [toLower](#tolower) | string | string | strings.ToLower, converts all characters to lower case. |
|
||||
| [match](#match) | pattern, text | boolean | regexp.MatchString Tests for a unanchored regexp match. |
|
||||
| [reReplaceAll](#rereplaceall) | pattern, replacement, text | string | Regexp.ReplaceAllString Regexp substitution, unanchored. |
|
||||
| [graphLink](#graphlink) | string - JSON Object with `"expr"` and `"datasource"` fields | string | Returns the path to graphical view in [Explore](https://grafana.com/docs/grafana/v8.3/explore/) for the given expression and data source. |
|
||||
| [tableLink](#tablelink) | string- JSON Object with `"expr"` and `"datasource"` fields | string | Returns the path to tabular view in [Explore](https://grafana.com/docs/grafana/v8.3/explore/) for the given expression and data source. |
|
||||
| [args](#args) | []interface{} | map[string]interface{} | Converts a list of objects to a map with keys, for example, arg0, arg1. Use this function to pass multiple arguments to templates. |
|
||||
| [externalURL](#externalurl) | nothing | string | Returns a string representing the external URL. |
|
||||
| [pathPrefix](#pathprefix) | nothing | string | Returns the path of the external URL. |
|
||||
|
||||
## Examples
|
||||
|
||||
### humanize
|
||||
|
||||
**Template string** `{ humanize $value }`
|
||||
|
||||
**Input** `1234567.0`
|
||||
|
||||
**Expected** `1.235M`
|
||||
|
||||
### humanize1024
|
||||
|
||||
**TemplateString** `{ humanize1024 $value } `
|
||||
|
||||
**Input** `1048576.0`
|
||||
|
||||
**Expected** `1Mi`
|
||||
|
||||
### humanizeDuration
|
||||
|
||||
**TemplateString** `{ humanizeDuration $value }`
|
||||
|
||||
**Input** `899.99`
|
||||
|
||||
**Expected** `14m 59s`
|
||||
|
||||
### humanizePercentage
|
||||
|
||||
**TemplateString** `{ humanizePercentage $value }`
|
||||
|
||||
**Input** `0.1234567`
|
||||
|
||||
**Expected** `12.35%`
|
||||
|
||||
### humanizeTimestamp
|
||||
|
||||
**TemplateString** `{ $value | humanizeTimestamp }`
|
||||
|
||||
**Input** `1435065584.128`
|
||||
|
||||
**Expected** `2015-06-23 13:19:44.128 +0000 UTC`
|
||||
|
||||
### title
|
||||
|
||||
**TemplateString** `{ $value | title }`
|
||||
|
||||
**Input** `aa bb CC`
|
||||
|
||||
**Expected** `Aa Bb Cc`
|
||||
|
||||
### toUpper
|
||||
|
||||
**TemplateString** `{ $value | toUpper }`
|
||||
|
||||
**Input** `aa bb CC`
|
||||
|
||||
**Expected** `AA BB CC`
|
||||
|
||||
### toLower
|
||||
|
||||
**TemplateString** `{ $value | toLower }`
|
||||
|
||||
**Input** `aA bB CC`
|
||||
|
||||
**Expected** `aa bb cc`
|
||||
|
||||
### match
|
||||
|
||||
**TemplateString** `{ match "a+" $labels.instance }`
|
||||
|
||||
**Input** `aa`
|
||||
|
||||
**Expected** `true`
|
||||
|
||||
### reReplaceAll
|
||||
|
||||
**TemplateString** `{{ reReplaceAll "localhost:(.*)" "my.domain:$1" $labels.instance }}`
|
||||
|
||||
**Input** `localhost:3000`
|
||||
|
||||
**Expected** `my.domain:3000`
|
||||
|
||||
### graphLink
|
||||
|
||||
**TemplateString** `{{ graphLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}`
|
||||
|
||||
**Expected** `/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":false,"range":true}]`
|
||||
|
||||
### tableLink
|
||||
|
||||
**TemplateString** `{{ tableLink "{\"expr\": \"up\", \"datasource\": \"gdev-prometheus\"}" }}`
|
||||
|
||||
**Expected** `/explore?left=["now-1h","now","gdev-prometheus",{"datasource":"gdev-prometheus","expr":"up","instant":true,"range":false}]`
|
||||
|
||||
### args
|
||||
|
||||
**TemplateString** `{{define "x"}}{{.arg0}} {{.arg1}}{{end}}{{template "x" (args 1 "2")}}`
|
||||
|
||||
**Expected** `1 2`
|
||||
|
||||
### externalURL
|
||||
|
||||
**TemplateString** `{ externalURL }`
|
||||
|
||||
**Expected** `http://localhost/path/prefix`
|
||||
|
||||
### pathPrefix
|
||||
|
||||
**TemplateString** `{ pathPrefix }`
|
||||
|
||||
**Expected** `/path/prefix`
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Auth Proxy"
|
||||
description = "Grafana Auth Proxy Guide "
|
||||
keywords = ["grafana", "configuration", "documentation", "proxy"]
|
||||
aliases = ["/docs/grafana/latest/tutorials/authproxy/"]
|
||||
aliases = ["/docs/grafana/v8.3/tutorials/authproxy/"]
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ settings page). When you create the application you will need to specify
|
||||
a callback URL. Specify this as callback:
|
||||
|
||||
```bash
|
||||
http://<my_grafana_server_name_or_ip>:<grafana_server_port>/login/github
|
||||
http://<my_grafana_server_name_or_ip>:<grafana_server_port>/grafana/login/github
|
||||
```
|
||||
|
||||
This callback URL must match the full HTTP address that you use in your
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "LDAP Authentication"
|
||||
description = "Grafana LDAP Authentication Guide "
|
||||
keywords = ["grafana", "configuration", "documentation", "ldap", "active directory"]
|
||||
aliases = ["/docs/grafana/latest/installation/ldap/"]
|
||||
aliases = ["/docs/grafana/v8.3/installation/ldap/"]
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "SAML Authentication"
|
||||
description = "Grafana SAML Authentication"
|
||||
keywords = ["grafana", "saml", "documentation", "saml-auth"]
|
||||
aliases = ["/docs/grafana/latest/auth/saml/"]
|
||||
aliases = ["/docs/grafana/v8.3/auth/saml/"]
|
||||
weight = 1100
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Team Sync"
|
||||
description = "Grafana Team Sync"
|
||||
keywords = ["grafana", "auth", "documentation"]
|
||||
aliases = ["/docs/grafana/latest/auth/saml/"]
|
||||
aliases = ["/docs/grafana/v8.3/auth/saml/"]
|
||||
weight = 1200
|
||||
+++
|
||||
|
||||
|
||||
@@ -7,8 +7,8 @@ weight = 15
|
||||
|
||||
This section provides basic information about observability topics in general and Grafana in particular. These topics will help people who are just starting out with observability and monitoring.
|
||||
|
||||
{{< docs/shared "basics/what-is-grafana.md" >}}
|
||||
{{< docs/shared lookup="basics/what-is-grafana.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared "basics/grafana-cloud.md" >}}
|
||||
{{< docs/shared lookup="basics/grafana-cloud.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
{{< docs/shared "basics/grafana-enterprise.md" >}}
|
||||
{{< docs/shared lookup="basics/grafana-enterprise.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Glossary"
|
||||
description = "Grafana glossary"
|
||||
keywords = ["grafana", "intro", "glossary", "dictionary"]
|
||||
aliases = ["/docs/grafana/latest/guides/glossary", "/docs/grafana/latest/getting-started/glossary"]
|
||||
aliases = ["/docs/grafana/v8.3/guides/glossary", "/docs/grafana/v8.3/getting-started/glossary"]
|
||||
weight = 800
|
||||
+++
|
||||
|
||||
@@ -44,7 +44,7 @@ This topic lists words and abbreviations that are commonly used in the Grafana d
|
||||
<tr>
|
||||
<td style="vertical-align: top">Explore</td>
|
||||
<td>
|
||||
Explore allows a user to focus on building a query. Users can refine the query to return the expected metrics before building a dashboard. For more information, refer to the <a href="https://grafana.com/docs/grafana/latest/explore">Explore</a> topic.
|
||||
Explore allows a user to focus on building a query. Users can refine the query to return the expected metrics before building a dashboard. For more information, refer to the <a href="https://grafana.com/docs/grafana/v8.3/explore">Explore</a> topic.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -116,7 +116,7 @@ This topic lists words and abbreviations that are commonly used in the Grafana d
|
||||
<tr>
|
||||
<td style="vertical-align: top">transformation</td>
|
||||
<td>
|
||||
Transformations process the result set of a query before it’s passed on for visualization. For more information, refer to the <a href="https://grafana.com/docs/grafana/latest/panels/transformations">Transformations overview</a> topic.
|
||||
Transformations process the result set of a query before it’s passed on for visualization. For more information, refer to the <a href="https://grafana.com/docs/grafana/v8.3/panels/transformations">Transformations overview</a> topic.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Histograms and heatmaps"
|
||||
description = "An introduction to histograms and heatmaps"
|
||||
keywords = ["grafana", "heatmap", "panel", "documentation", "histogram"]
|
||||
aliases = ["/docs/grafana/latest/getting-started/intro-histograms"]
|
||||
aliases = ["/docs/grafana/v8.3/getting-started/intro-histograms"]
|
||||
weight = 700
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Time series dimensions"
|
||||
description = "time series dimensions"
|
||||
keywords = ["grafana", "intro", "guide", "concepts", "timeseries", "labels"]
|
||||
aliases = ["/docs/grafana/latest/guides/timeseries-dimensions", "/docs/grafana/latest/getting-started/timeseries-dimensions"]
|
||||
aliases = ["/docs/grafana/v8.3/guides/timeseries-dimensions", "/docs/grafana/v8.3/getting-started/timeseries-dimensions"]
|
||||
weight = 600
|
||||
+++
|
||||
|
||||
@@ -82,4 +82,4 @@ In this case the labels that represent the dimensions will have two keys based o
|
||||
|
||||
In the case of SQL-like data sources, more than one numeric column can be selected, with or without additional string columns to be used as dimensions. For example, `AVG(Temperature) AS AvgTemp, MAX(Temperature) AS MaxTemp`. This, if combined with multiple dimensions, can result in a lot of series. Selecting multiple values is currently only designed to be used with visualization.
|
||||
|
||||
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series]({{< relref "../developers/plugins/data-frames.md#data-frames-as-time-series" >}}).
|
||||
Additional technical information on tabular time series formats and how dimensions are extracted can be found in [the developer documentation on data frames as time series](https://grafana.com/developers/plugin-tools/introduction/data-frames#data-frames-as-time-series).
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Common observability strategies"
|
||||
description = "Common observability strategies"
|
||||
keywords = ["grafana", "intro", "guide", "concepts", "methods"]
|
||||
aliases = ["/docs/grafana/latest/getting-started/strategies/"]
|
||||
aliases = ["/docs/grafana/v8.3/getting-started/strategies/"]
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Dashboards"
|
||||
aliases = ["/docs/grafana/latest/features/dashboard/dashboards/"]
|
||||
aliases = ["/docs/grafana/v8.3/features/dashboard/dashboards/"]
|
||||
weight = 80
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Annotations"
|
||||
keywords = ["grafana", "annotations", "documentation", "guide"]
|
||||
aliases = ["/docs/grafana/latest/reference/annotations/"]
|
||||
aliases = ["/docs/grafana/v8.3/reference/annotations/"]
|
||||
weight = 2
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Dashboard Folders"
|
||||
keywords = ["grafana", "dashboard", "dashboard folders", "folder", "folders", "documentation", "guide"]
|
||||
aliases = ["/docs/grafana/latest/reference/dashboard_folders/"]
|
||||
aliases = ["/docs/grafana/v8.3/reference/dashboard_folders/"]
|
||||
weight = 3
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Dashboard Version History"
|
||||
keywords = ["grafana", "dashboard", "documentation", "version", "history"]
|
||||
aliases = ["/docs/grafana/latest/reference/dashboard_history/"]
|
||||
aliases = ["/docs/grafana/v8.3/reference/dashboard_history/"]
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Export and import"
|
||||
keywords = ["grafana", "dashboard", "documentation", "export", "import"]
|
||||
aliases = ["/docs/grafana/latest/reference/export_import/"]
|
||||
aliases = ["/docs/grafana/v8.3/reference/export_import/"]
|
||||
weight = 800
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "JSON model"
|
||||
keywords = ["grafana", "dashboard", "documentation", "json", "model"]
|
||||
aliases = ["/docs/grafana/latest/reference/dashboard/"]
|
||||
aliases = ["/docs/grafana/v8.3/reference/dashboard/"]
|
||||
weight = 1200
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Playlist"
|
||||
keywords = ["grafana", "dashboard", "documentation", "playlist"]
|
||||
aliases = ["/docs/grafana/latest/reference/playlist/"]
|
||||
aliases = ["/docs/grafana/v8.3/reference/playlist/"]
|
||||
weight = 4
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Reporting"
|
||||
description = ""
|
||||
keywords = ["grafana", "reporting"]
|
||||
aliases = ["/docs/grafana/latest/administration/reports"]
|
||||
aliases = ["/docs/grafana/v8.3/administration/reports"]
|
||||
weight = 8
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Scripted dashboards"
|
||||
keywords = ["grafana", "dashboard", "documentation", "scripted"]
|
||||
aliases = ["/docs/grafana/latest/reference/scripting/"]
|
||||
aliases = ["/docs/grafana/v8.3/reference/scripting/"]
|
||||
weight = 1500
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Search"
|
||||
keywords = ["grafana", "dashboard", "documentation", "search"]
|
||||
aliases =["/docs/grafana/latest/reference/search/"]
|
||||
aliases =["/docs/grafana/v8.3/reference/search/"]
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
+++
|
||||
title = "Time range controls"
|
||||
keywords = ["grafana", "dashboard", "documentation", "time range"]
|
||||
aliases = ["/docs/grafana/latest/reference/timerange/"]
|
||||
aliases = ["/docs/grafana/v8.3/reference/timerange/"]
|
||||
weight = 7
|
||||
+++
|
||||
|
||||
# Time range controls
|
||||
|
||||
Grafana provides several ways to manage the time ranges of the data being visualized, both at the dashboard level and the panel level.
|
||||
Grafana provides several ways to manage the time ranges of the data being visualized, for dashboard, panels and also for alerting.
|
||||
|
||||
This page describes supported time units and relative ranges, the common time controls, dashboard-wide time settings, and panel-specific time settings.
|
||||
|
||||
@@ -34,11 +34,18 @@ Here are some examples:
|
||||
| This Year | `now/Y` | `now/Y` |
|
||||
| Previous fiscal year | `now-1y/fy` | `now-1y/fy` |
|
||||
|
||||
### Note about Grafana alerting
|
||||
|
||||
For Grafana alerting, we do not support are the following syntaxes at this time.
|
||||
|
||||
- now+n for future timestamps.
|
||||
- now-1n/n for "start of n until end of n" since this is an absolute timestamp.
|
||||
|
||||
## Common time range controls
|
||||
|
||||
The dashboard and panel time controls have a common user interface (UI).
|
||||
|
||||
<img class="no-shadow" src="/static/img/docs/time-range-controls/common-time-controls-8-2.png" max-width="700px">
|
||||
<img class="no-shadow" src="/static/img/docs/time-range-controls/common-time-controls-7-0.png" max-width="700px">
|
||||
|
||||
The options are defined below.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Data sources"
|
||||
aliases = ["/docs/grafana/latest/datasources/overview/"]
|
||||
aliases = ["/docs/grafana/v8.3/datasources/overview/"]
|
||||
weight = 60
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Add data source"
|
||||
aliases = ["/docs/grafana/latest/features/datasources/add-a-data-source/"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/add-a-data-source/"]
|
||||
weight = 100
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
title = "Alertmanager"
|
||||
description = "Guide for using Alertmanager in Grafana"
|
||||
keywords = ["grafana", "prometheus", "guide"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/alertmanager"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/alertmanager"]
|
||||
weight = 150
|
||||
+++
|
||||
|
||||
# Alertmanager data source
|
||||
|
||||
Grafana includes built-in support for Prometheus Alertmanager. It is presently in alpha and not accessible unless [alpha plugins are enabled in Grafana settings](https://grafana.com/docs/grafana/latest/administration/configuration/#enable_alpha). Once you add it as a data source, you can use the [Grafana alerting UI](https://grafana.com/docs/grafana/latest/alerting/) to manage silences, contact points as well as notification policies. A drop-down option in these pages allows you to switch between Grafana and any configured Alertmanager data sources.
|
||||
Grafana includes built-in support for Prometheus Alertmanager. It is presently in alpha and not accessible unless [alpha plugins are enabled in Grafana settings](https://grafana.com/docs/grafana/v8.3/administration/configuration/#enable_alpha). Once you add it as a data source, you can use the [Grafana alerting UI](https://grafana.com/docs/grafana/v8.3/alerting/) to manage silences, contact points as well as notification policies. A drop-down option in these pages allows you to switch between Grafana and any configured Alertmanager data sources.
|
||||
|
||||
## Alertmanager implementations
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "AWS CloudWatch"
|
||||
description = "Guide for using CloudWatch in Grafana"
|
||||
keywords = ["grafana", "cloudwatch", "guide"]
|
||||
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||
aliases = ["/docs/grafana/v8.3/datasources/cloudwatch"]
|
||||
weight = 200
|
||||
+++
|
||||
|
||||
@@ -119,7 +119,7 @@ You can monitor a dynamic list of metrics by using the asterisk (\*) wildcard fo
|
||||
|
||||
In this example, the query returns all metrics in the namespace `AWS/EC2` with a metric name of `CPUUtilization` and ANY value for the `InstanceId` dimension are queried. This can help you monitor metrics for AWS resources, like EC2 instances or containers. When new instances are created as part of an auto scaling event, they will automatically appear in the graph without you having to track the new instance IDs. This capability is currently limited to retrieving up to 100 metrics.
|
||||
|
||||
You can expand the [Query inspector](https://grafana.com/docs/grafana/latest/panels/queries/#query-inspector-button) button and click `Meta Data` to see the search expression that is automatically built to support wildcards. To learn more about search expressions, visit the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html). By default, the search expression is defined in such a way that the queried metrics must match the defined dimension names exactly. This means that in the example only metrics with exactly one dimension with the name ‘InstanceId’ will be returned.
|
||||
You can expand the [Query inspector](https://grafana.com/docs/grafana/v8.3/panels/queries/#query-inspector-button) button and click `Meta Data` to see the search expression that is automatically built to support wildcards. To learn more about search expressions, visit the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/search-expression-syntax.html). By default, the search expression is defined in such a way that the queried metrics must match the defined dimension names exactly. This means that in the example only metrics with exactly one dimension with the name ‘InstanceId’ will be returned.
|
||||
|
||||

|
||||
|
||||
@@ -261,11 +261,11 @@ For more information on Grafana alerts, refer to [Alerting]({{< relref "../../al
|
||||
|
||||
The Grafana [configuration]({{< relref "../../administration/configuration.md#aws" >}}) file includes an `AWS` section where you can customize the data source.
|
||||
|
||||
| Configuration option | Description |
|
||||
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `allowed_auth_providers` | Specifies which authentication providers are allowed for the CloudWatch data source. The following providers are enabled by default in OSS Grafana: `default` (AWS SDK default), keys (Access and secret key), credentials (Credentials file), ec2_IAM_role (EC2 IAM role). |
|
||||
| `assume_role_enabled` | Allows you to disable `assume role (ARN)` in the CloudWatch data source. By default, assume role (ARN) is enabled for OSS Grafana. |
|
||||
| `list_metrics_page_limit` | When a custom namespace is specified in the query editor, the [List Metrics API](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) is used to populate the _Metrics_ field and the _Dimension_ fields. The API is paginated and returns up to 500 results per page. The CloudWatch data source also limits the number of pages to 500. However, you can change this limit using the `list_metrics_page_limit` variable in the [grafana configuration file](https://grafana.com/docs/grafana/latest/administration/configuration/#aws). |
|
||||
| Configuration option | Description |
|
||||
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `allowed_auth_providers` | Specifies which authentication providers are allowed for the CloudWatch data source. The following providers are enabled by default in OSS Grafana: `default` (AWS SDK default), keys (Access and secret key), credentials (Credentials file), ec2_IAM_role (EC2 IAM role). |
|
||||
| `assume_role_enabled` | Allows you to disable `assume role (ARN)` in the CloudWatch data source. By default, assume role (ARN) is enabled for OSS Grafana. |
|
||||
| `list_metrics_page_limit` | When a custom namespace is specified in the query editor, the [List Metrics API](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) is used to populate the _Metrics_ field and the _Dimension_ fields. The API is paginated and returns up to 500 results per page. The CloudWatch data source also limits the number of pages to 500. However, you can change this limit using the `list_metrics_page_limit` variable in the [grafana configuration file](https://grafana.com/docs/grafana/v8.3/administration/configuration/#aws). |
|
||||
|
||||
## Pricing
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Authentication"
|
||||
description = "AWS authentication"
|
||||
keywords = ["grafana", "aws", "authentication"]
|
||||
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||
aliases = ["/docs/grafana/v8.3/datasources/cloudwatch"]
|
||||
weight = 5
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Curated CloudWatch dashboards"
|
||||
description = "Guide for using AWS CloudWatch in Grafana"
|
||||
keywords = ["grafana", "stackdriver", "google", "guide", "cloud", "monitoring"]
|
||||
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||
aliases = ["/docs/grafana/v8.3/datasources/cloudwatch"]
|
||||
weight = 15
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Provision CloudWatch"
|
||||
description = "Guide for provisioning CloudWatch"
|
||||
weight = 400
|
||||
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||
aliases = ["/docs/grafana/v8.3/datasources/cloudwatch"]
|
||||
+++
|
||||
|
||||
# Provision CloudWatch data source
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Template variables in CloudWatch query"
|
||||
description = "Template variables in CloudWatch queryh"
|
||||
weight = 10
|
||||
aliases = ["/docs/grafana/latest/datasources/cloudwatch"]
|
||||
aliases = ["/docs/grafana/v8.3/datasources/cloudwatch"]
|
||||
+++
|
||||
|
||||
# Using template variables in CloudWatch queries
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Azure Monitor"
|
||||
description = "Guide for using Azure Monitor in Grafana"
|
||||
keywords = ["grafana", "microsoft", "azure", "monitor", "application", "insights", "log", "analytics", "guide"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/azuremonitor"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/azuremonitor"]
|
||||
weight = 300
|
||||
+++
|
||||
|
||||
@@ -265,7 +265,7 @@ See the following topics to learn more about the Azure Monitor data source:
|
||||
|
||||
Customers who host Grafana in Azure (e.g. App Service, Azure Virtual Machines) and have managed identity enabled on their VM, will now be able to use the managed identity to configure Azure Monitor in Grafana. This will simplify the data source configuration, requiring the data source to be securely authenticated without having to manually configure credentials via Azure AD App Registrations for each data source. For more details on Azure managed identities, refer to the [Azure documentation](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview).
|
||||
|
||||
To enable managed identity for Grafana, set the `managed_identity_enabled` flag in the `[azure]` section of the [Grafana server config](https://grafana.com/docs/grafana/latest/administration/configuration/#azure).
|
||||
To enable managed identity for Grafana, set the `managed_identity_enabled` flag in the `[azure]` section of the [Grafana server config](https://grafana.com/docs/grafana/v8.3/administration/configuration/#azure).
|
||||
|
||||
```ini
|
||||
[azure]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Elasticsearch"
|
||||
description = "Guide for using Elasticsearch in Grafana"
|
||||
keywords = ["grafana", "elasticsearch", "guide"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/elasticsearch"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/elasticsearch"]
|
||||
weight = 325
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Google Cloud Monitoring"
|
||||
description = "Guide for using Google Cloud Monitoring in Grafana"
|
||||
keywords = ["grafana", "stackdriver", "google", "guide", "cloud", "monitoring"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/stackdriver", "/docs/grafana/next/datasources/cloudmonitoring/", "/docs/grafana/next/features/datasources/cloudmonitoring/"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/stackdriver", "/docs/grafana/next/datasources/cloudmonitoring/", "/docs/grafana/next/features/datasources/cloudmonitoring/"]
|
||||
weight = 350
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Preconfigured dashboards"
|
||||
description = "Guide for using Google Cloud Monitoring in Grafana"
|
||||
keywords = ["grafana", "stackdriver", "google", "guide", "cloud", "monitoring"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/stackdriver", "/docs/grafana/next/features/datasources/cloudmonitoring/"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/stackdriver", "/docs/grafana/next/features/datasources/cloudmonitoring/"]
|
||||
weight = 10
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Graphite"
|
||||
description = "Guide for using graphite in Grafana"
|
||||
keywords = ["grafana", "graphite", "guide"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/graphite"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/graphite"]
|
||||
weight = 600
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
title = "InfluxDB data source"
|
||||
description = "Guide for using InfluxDB in Grafana"
|
||||
keywords = ["grafana", "influxdb", "guide", "flux"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/influxdb", "/docs/grafana/latest/datasources/influxdb"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/influxdb", "/docs/grafana/v8.3/datasources/influxdb"]
|
||||
weight = 700
|
||||
+++
|
||||
|
||||
# InfluxDB data source
|
||||
|
||||
{{< docs/shared "influxdb/intro.md" >}}
|
||||
{{< docs/shared lookup="influxdb/intro.md" source="grafana" version="<GRAFANA VERSION>" >}}
|
||||
|
||||
This topic explains options, variables, querying, and other options specific to this data source. Refer to [Add a data source]({{< relref "../add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Jaeger"
|
||||
description = "Guide for using Jaeger in Grafana"
|
||||
keywords = ["grafana", "jaeger", "guide", "tracing"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/jaeger"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/jaeger"]
|
||||
weight = 800
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Loki"
|
||||
description = "Guide for using Loki in Grafana"
|
||||
keywords = ["grafana", "loki", "logging", "guide"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/loki"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/loki"]
|
||||
weight = 800
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Microsoft SQL Server"
|
||||
description = "Guide for using Microsoft SQL Server in Grafana"
|
||||
keywords = ["grafana", "MSSQL", "Microsoft", "SQL", "guide", "Azure SQL Database"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/mssql/"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/mssql/"]
|
||||
weight = 900
|
||||
+++
|
||||
|
||||
@@ -170,7 +170,7 @@ The resulting table panel:
|
||||
|
||||
If you set Format as to _Time series_, then the query must have a column named time that returns either a SQL datetime or any numeric datatype representing Unix epoch in seconds. In addition, result sets of time series queries must be sorted by time for panels to properly visualize the result.
|
||||
|
||||
A time series query result is returned in a [wide data frame format]({{< relref "../developers/plugins/data-frames.md#wide-format" >}}). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
A time series query result is returned in a [wide data frame format](https://grafana.com/developers/plugin-tools/introduction/data-frames#wide-format). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
|
||||
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "MySQL"
|
||||
description = "Guide for using MySQL in Grafana"
|
||||
keywords = ["grafana", "mysql", "guide"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/mysql/"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/mysql/"]
|
||||
weight = 1000
|
||||
+++
|
||||
|
||||
@@ -182,7 +182,7 @@ The resulting table panel:
|
||||
|
||||
If you set Format as to _Time series_, then the query must have a column named time that returns either a SQL datetime or any numeric datatype representing Unix epoch in seconds. In addition, result sets of time series queries must be sorted by time for panels to properly visualize the result.
|
||||
|
||||
A time series query result is returned in a [wide data frame format]({{< relref "../developers/plugins/data-frames.md#wide-format" >}}). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
A time series query result is returned in a [wide data frame format](https://grafana.com/developers/plugin-tools/introduction/data-frames#wide-format). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
|
||||
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "OpenTSDB"
|
||||
description = "Guide for using OpenTSDB in Grafana"
|
||||
keywords = ["grafana", "opentsdb", "guide"]
|
||||
aliases = ["/docs/grafana/latest/features/opentsdb", "/docs/grafana/latest/features/datasources/opentsdb/"]
|
||||
aliases = ["/docs/grafana/v8.3/features/opentsdb", "/docs/grafana/v8.3/features/datasources/opentsdb/"]
|
||||
weight = 1100
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "PostgreSQL"
|
||||
description = "Guide for using PostgreSQL in Grafana"
|
||||
keywords = ["grafana", "postgresql", "guide"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/postgres/"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/postgres/"]
|
||||
weight = 1200
|
||||
+++
|
||||
|
||||
@@ -12,7 +12,7 @@ Grafana ships with a built-in PostgreSQL data source plugin that allows you to q
|
||||
|
||||
## PostgreSQL settings
|
||||
|
||||
To access PostgreSQL settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the Prometheus data source.
|
||||
To access PostgreSQL settings, hover your mouse over the **Configuration** (gear) icon, then click **Data Sources**, and then click the PostgreSQL data source.
|
||||
|
||||
| Name | Description |
|
||||
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
@@ -187,7 +187,7 @@ The resulting table panel:
|
||||
|
||||
If you set Format as to _Time series_, then the query must have a column named time that returns either a SQL datetime or any numeric datatype representing Unix epoch in seconds. In addition, result sets of time series queries must be sorted by time for panels to properly visualize the result.
|
||||
|
||||
A time series query result is returned in a [wide data frame format]({{< relref "../developers/plugins/data-frames.md#wide-format" >}}). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
A time series query result is returned in a [wide data frame format](https://grafana.com/developers/plugin-tools/introduction/data-frames#wide-format). Any column except time or of type string transforms into value fields in the data frame query result. Any string column transforms into field labels in the data frame query result.
|
||||
|
||||
> For backward compatibility, there's an exception to the above rule for queries that return three columns including a string column named metric. Instead of transforming the metric column into field labels, it becomes the field name, and then the series name is formatted as the value of the metric column. See the example with the metric column below.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Prometheus"
|
||||
description = "Guide for using Prometheus in Grafana"
|
||||
keywords = ["grafana", "prometheus", "guide"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/prometheus"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/prometheus"]
|
||||
weight = 1300
|
||||
+++
|
||||
|
||||
@@ -10,7 +10,7 @@ weight = 1300
|
||||
|
||||
Grafana includes built-in support for Prometheus. This topic explains options, variables, querying, and other options specific to the Prometheus data source. Refer to [Add a data source]({{< relref "add-a-data-source.md" >}}) for instructions on how to add a data source to Grafana. Only users with the organization admin role can add data sources.
|
||||
|
||||
> **Note:** You can use [Grafana Cloud](https://grafana.com/products/cloud/features/#cloud-logs) to avoid the overhead of installing, maintaining, and scaling your observability stack. The free forever plan includes Grafana, 10K Prometheus series, 50 GB logs, and more.[Create a free account to get started](https://grafana.com/auth/sign-up/create-user?pg=docs-grafana-install&plcmt=in-text).
|
||||
> **Note:** You can use [Grafana Cloud](https://grafana.com/products/cloud/features/#cloud-logs) to avoid the overhead of installing, maintaining, and scaling your observability stack. The free forever plan includes Grafana, 10K Prometheus series, 50 GB logs, and more. [Create a free account to get started](https://grafana.com/auth/sign-up/create-user?pg=docs-grafana-install&plcmt=in-text).
|
||||
|
||||
## Prometheus settings
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Tempo"
|
||||
description = "High volume, minimal dependency trace storage. OSS tracing solution from Grafana Labs."
|
||||
keywords = ["grafana", "tempo", "guide", "tracing"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/tempo"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/tempo"]
|
||||
weight = 1400
|
||||
+++
|
||||
|
||||
@@ -130,7 +130,7 @@ To display the service graph:
|
||||
- Select the **Service Graph** query type and run the query
|
||||
- Optionally, filter by service name
|
||||
|
||||
You can pan and zoom the view with buttons or you mouse. For details about the visualization, refer to [Node graph panel](https://grafana.com/docs/grafana/latest/panels/visualizations/node-graph/).
|
||||
You can pan and zoom the view with buttons or you mouse. For details about the visualization, refer to [Node graph panel](https://grafana.com/docs/grafana/v8.3/panels/visualizations/node-graph/).
|
||||
|
||||
Each service in the graph is represented as a circle. Numbers on the inside shows average time per request and request per second.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "TestData"
|
||||
keywords = ["grafana", "dashboard", "documentation", "panels", "testdata"]
|
||||
aliases = ["/docs/grafana/latest/features/datasources/testdata"]
|
||||
aliases = ["/docs/grafana/v8.3/features/datasources/testdata"]
|
||||
weight = 1500
|
||||
+++
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
title = "Zipkin"
|
||||
description = "Guide for using Zipkin in Grafana"
|
||||
keywords = ["grafana", "zipkin", "guide", "tracing"]
|
||||
aliases = ["/docs/grafana/latest/datasources/zipkin"]
|
||||
aliases = ["/docs/grafana/v8.3/datasources/zipkin"]
|
||||
weight = 1600
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
+++
|
||||
title = "Developers"
|
||||
aliases = ["/docs/grafana/latest/plugins/developing/"]
|
||||
aliases = ["/docs/grafana/v8.3/plugins/developing/"]
|
||||
weight = 190
|
||||
+++
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
+++
|
||||
title = "Contributor License Agreement (CLA)"
|
||||
description = "Contributor License Agreement (CLA)"
|
||||
aliases = ["/docs/grafana/latest/project/cla", "docs/contributing/cla.html"]
|
||||
aliases = ["/docs/grafana/v8.3/project/cla", "docs/contributing/cla.html"]
|
||||
+++
|
||||
|
||||
# Grafana Labs Software Grant and Contributor License Agreement ("Agreement")
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
+++
|
||||
title = "Build a plugin"
|
||||
aliases = ["/docs/grafana/latest/plugins/developing/"]
|
||||
+++
|
||||
|
||||
# Build a plugin
|
||||
|
||||
For more information on the types of plugins you can build, refer to the [Plugin Overview]({{< relref "../../plugins/_index.md" >}}).
|
||||
|
||||
## Get started
|
||||
|
||||
The easiest way to start developing Grafana plugins is to use the [Grafana Toolkit](https://www.npmjs.com/package/@grafana/toolkit).
|
||||
|
||||
Open the terminal, and run the following command in your [plugin directory]({{< relref "../../administration/configuration.md#plugins" >}}):
|
||||
|
||||
```bash
|
||||
npx @grafana/toolkit plugin:create my-grafana-plugin
|
||||
```
|
||||
|
||||
> **Note:** If running NPM 7+ the `npx` commands mentioned in this article may hang. The workaround is to use `npx --legacy-peer-deps <command to run>`.
|
||||
|
||||
If you want a more guided introduction to plugin development, check out our tutorials:
|
||||
|
||||
- [Build a panel plugin]({{< relref "/tutorials/build-a-panel-plugin.md" >}})
|
||||
- [Build a data source plugin]({{< relref "/tutorials/build-a-data-source-plugin.md" >}})
|
||||
|
||||
## Go further
|
||||
|
||||
Learn more about specific areas of plugin development.
|
||||
|
||||
### Tutorials
|
||||
|
||||
If you're looking to build your first plugin, check out these introductory tutorials:
|
||||
|
||||
- [Build a panel plugin]({{< relref "/tutorials/build-a-panel-plugin.md" >}})
|
||||
- [Build a data source plugin]({{< relref "/tutorials/build-a-data-source-plugin.md" >}})
|
||||
- [Build a data source backend plugin]({{< relref "/tutorials/build-a-data-source-backend-plugin.md" >}})
|
||||
|
||||
Ready to learn more? Check out our other tutorials:
|
||||
|
||||
- [Build a panel plugin with D3.js]({{< relref "/tutorials/build-a-panel-plugin-with-d3.md" >}})
|
||||
|
||||
### Guides
|
||||
|
||||
Improve an existing plugin with one of our guides:
|
||||
|
||||
- [Add authentication for data source plugins]({{< relref "add-authentication-for-data-source-plugins" >}})
|
||||
- [Add support for annotations]({{< relref "add-support-for-annotations.md" >}})
|
||||
- [Add support for Explore queries]({{< relref "add-support-for-explore-queries.md" >}})
|
||||
- [Add support for variables]({{< relref "add-support-for-variables.md" >}})
|
||||
- [Add a query editor help component]({{< relref "add-query-editor-help.md" >}})
|
||||
- [Build a logs data source plugin]({{< relref "build-a-logs-data-source-plugin.md" >}})
|
||||
- [Build a streaming data source plugin]({{< relref "build-a-streaming-data-source-plugin.md" >}})
|
||||
- [Error handling]({{< relref "error-handling.md" >}})
|
||||
- [Working with data frames]({{< relref "working-with-data-frames.md" >}})
|
||||
|
||||
### Concepts
|
||||
|
||||
Deepen your knowledge through a series of high-level overviews of plugin concepts:
|
||||
|
||||
- [Data frames]({{< relref "data-frames.md" >}})
|
||||
|
||||
### UI library
|
||||
|
||||
Explore the many UI components in our [Grafana UI library](https://developers.grafana.com/ui).
|
||||
|
||||
### Examples
|
||||
|
||||
For inspiration, check out our [plugin examples](https://github.com/grafana/grafana-plugin-examples).
|
||||
|
||||
### API reference
|
||||
|
||||
Learn more about Grafana options and packages.
|
||||
|
||||
#### Metadata
|
||||
|
||||
- [Plugin metadata]({{< relref "metadata.md" >}})
|
||||
|
||||
#### Typescript
|
||||
|
||||
- Grafana Data
|
||||
- Grafana Runtime
|
||||
- Grafana UI
|
||||
|
||||
#### Go
|
||||
|
||||
- [Grafana Plugin SDK for Go]({{< relref "backend/grafana-plugin-sdk-for-go" >}})
|
||||
@@ -1,307 +0,0 @@
|
||||
+++
|
||||
title = "Add authentication for data source plugins"
|
||||
aliases = ["/docs/grafana/latest/plugins/developing/auth-for-datasources/", "/docs/grafana/next/developers/plugins/authentication/"]
|
||||
+++
|
||||
|
||||
# Add authentication for data source plugins
|
||||
|
||||
This page explains how to configure your data source plugin to authenticate against a third-party API.
|
||||
|
||||
There are two ways you can perform authenticated requests from your plugin—using the [_data source proxy_](#authenticate-using-the-data-source-proxy), or by building a [_backend plugin_](#authenticate-using-a-backend-plugin). The one you choose depends on how your plugin authenticates against the third-party API.
|
||||
|
||||
- Use the data source proxy if you need to authenticate using Basic Auth or API keys
|
||||
- Use the data source proxy if the API supports OAuth 2.0 using client credentials
|
||||
- Use a backend plugin if the API uses a custom authentication method that isn't supported by the data source proxy, or if your API communicates over a different protocol than HTTP
|
||||
|
||||
Regardless of which approach you use, you first need to encrypt any sensitive information that the plugin needs to store.
|
||||
|
||||
## Encrypt data source configuration
|
||||
|
||||
Data source plugins have two ways of storing custom configuration: `jsonData` and `secureJsonData`.
|
||||
|
||||
Users with the _Viewer_ role can access data source configuration—such as the contents of `jsonData`—in cleartext. If you've enabled anonymous access, anyone that can access Grafana in their browser can see the contents of `jsonData`. **Only use `jsonData` to store non-sensitive configuration.**
|
||||
|
||||
> **Note:** You can see the settings that the current user has access to by entering `window.grafanaBootData` in the developer console of your browser.
|
||||
|
||||
> **Note:** Users of [Grafana Enterprise](https://grafana.com/products/enterprise/grafana/) can restrict access to data sources to specific users and teams. For more information, refer to [Data source permissions](https://grafana.com/docs/grafana/latest/enterprise/datasource_permissions).
|
||||
|
||||
If you need to store sensitive information, such as passwords, tokens and API keys, use `secureJsonData` instead. Whenever the user saves the data source configuration, the secrets in `secureJsonData` are sent to the Grafana server and encrypted before they're stored.
|
||||
|
||||
Once the secure configuration has been encrypted, it can no longer be accessed from the browser. The only way to access secrets after they've been saved is by using the [_data source proxy_](#authenticate-using-the-data-source-proxy).
|
||||
|
||||
#### Add secret configuration to your data source plugin
|
||||
|
||||
To demonstrate how you can add secrets to a data source plugin, let's add support for configuring an API key.
|
||||
|
||||
Create a new interface in `types.go` to hold the API key.
|
||||
|
||||
```ts
|
||||
export interface MySecureJsonData {
|
||||
apiKey?: string;
|
||||
}
|
||||
```
|
||||
|
||||
Add type information to your `secureJsonData` object by updating the props for your `ConfigEditor` to accept the interface as a second type parameter.
|
||||
|
||||
```ts
|
||||
interface Props extends DataSourcePluginOptionsEditorProps<MyDataSourceOptions, MySecureJsonData> {}
|
||||
```
|
||||
|
||||
You can access the value of the secret from the `options` prop inside your `ConfigEditor` until the user saves the configuration. When the user saves the configuration, Grafana clears the value. After that, you can use the `secureJsonFields` to determine whether the property has been configured.
|
||||
|
||||
```ts
|
||||
const { secureJsonData, secureJsonFields } = options;
|
||||
const { apiKey } = secureJsonData;
|
||||
```
|
||||
|
||||
To securely update the secret in your plugin's configuration editor, update the `secureJsonData` object using the `onOptionsChange` prop.
|
||||
|
||||
```ts
|
||||
const onAPIKeyChange = (event: ChangeEvent<HTMLInputElement>) => {
|
||||
onOptionsChange({
|
||||
...options,
|
||||
secureJsonData: {
|
||||
apiKey: event.target.value,
|
||||
},
|
||||
});
|
||||
};
|
||||
```
|
||||
|
||||
Next, define a component that can accept user input.
|
||||
|
||||
```ts
|
||||
<Input
|
||||
type="password"
|
||||
placeholder={secureJsonFields?.apiKey ? 'configured' : ''}
|
||||
value={secureJsonData.apiKey ?? ''}
|
||||
onChange={onAPIKeyChange}
|
||||
/>
|
||||
```
|
||||
|
||||
Finally, if you want the user to be able to reset the API key, then you need to set the property to `false` in the `secureJsonFields` object.
|
||||
|
||||
```ts
|
||||
const onResetAPIKey = () => {
|
||||
onOptionsChange({
|
||||
...options,
|
||||
secureJsonFields: {
|
||||
...options.secureJsonFields,
|
||||
apiKey: false,
|
||||
},
|
||||
secureJsonData: {
|
||||
...options.secureJsonData,
|
||||
apiKey: '',
|
||||
},
|
||||
});
|
||||
};
|
||||
```
|
||||
|
||||
Now that users can configure secrets, the next step is to see how we can add them to our requests.
|
||||
|
||||
## Authenticate using the data source proxy
|
||||
|
||||
Once the user has saved the configuration for a data source, any secret data source configuration will no longer be available in the browser. Encrypted secrets can only be accessed on the server. So how do you add them to you request?
|
||||
|
||||
The Grafana server comes with a proxy that lets you define templates for your requests. We call them _proxy routes_. Grafana sends the proxy route to the server, decrypts the secrets along with other configuration, and adds them to the request before sending it off.
|
||||
|
||||
> **Note:** Be sure not to confuse the data source proxy with the [auth proxy]({{< relref "../../auth/auth-proxy.md" >}}). The data source proxy is used to authenticate a data source, while the auth proxy is used to log into Grafana itself.
|
||||
|
||||
### Add a proxy route to your plugin
|
||||
|
||||
To forward requests through the Grafana proxy, you need to configure one or more proxy routes. A proxy route is a template for any outgoing request that is handled by the proxy. You can configure proxy routes in the [plugin.json](https://grafana.com/docs/grafana/latest/developers/plugins/metadata/) file.
|
||||
|
||||
1. Add the route to plugin.json. Note that you need to restart the Grafana server every time you make a change to your plugin.json file.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "https://api.example.com"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
1. In the `DataSource`, extract the proxy URL from `instanceSettings` to a class property called `url`.
|
||||
|
||||
```ts
|
||||
export class DataSource extends DataSourceApi<MyQuery, MyDataSourceOptions> {
|
||||
url?: string;
|
||||
|
||||
constructor(instanceSettings: DataSourceInstanceSettings<MyDataSourceOptions>) {
|
||||
super(instanceSettings);
|
||||
|
||||
this.url = instanceSettings.url;
|
||||
}
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
1. In the `query` method, make a request using `BackendSrv`. The first section of the URL path needs to match the `path` of your proxy route. The data source proxy replaces `this.url + routePath` with the `url` of the route. The following request will be made to `https://api.example.com/v1/users`.
|
||||
|
||||
```ts
|
||||
import { getBackendSrv } from '@grafana/runtime';
|
||||
```
|
||||
|
||||
```ts
|
||||
const routePath = '/example';
|
||||
|
||||
getBackendSrv().datasourceRequest({
|
||||
url: this.url + routePath + '/v1/users',
|
||||
method: 'GET',
|
||||
});
|
||||
```
|
||||
|
||||
### Add a dynamic proxy route to your plugin
|
||||
|
||||
Grafana sends the proxy route to the server, where the data source proxy decrypts any sensitive data and interpolates the template variables with the decrypted data before making the request.
|
||||
|
||||
To add user-defined configuration to your routes, add `{{ .JsonData.apiKey }}` to the route, where `apiKey` is the name of a property in the `jsonData` object.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "https://api.example.com/projects/{{ .JsonData.projectId }}"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
You can also configure your route to use sensitive data by using `.SecureJsonData`.
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "https://{{ .JsonData.username }}:{{ .SecureJsonData.password }}@api.example.com"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
In addition to the URL, you can also add headers, URL parameters, and a request body, to a proxy route.
|
||||
|
||||
#### Add HTTP headers to a proxy route
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "https://api.example.com",
|
||||
"headers": [
|
||||
{
|
||||
"name": "Authorization",
|
||||
"content": "Bearer {{ .SecureJsonData.apiToken }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
#### Add URL parameters to a proxy route
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "http://api.example.com",
|
||||
"urlParams": [
|
||||
{
|
||||
"name": "apiKey",
|
||||
"content": "{{ .SecureJsonData.apiKey }}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
#### Add a request body to a proxy route
|
||||
|
||||
```json
|
||||
"routes": [
|
||||
{
|
||||
"path": "example",
|
||||
"url": "http://api.example.com",
|
||||
"body": {
|
||||
"username": "{{ .JsonData.username }}",
|
||||
"password": "{{ .SecureJsonData.password }}"
|
||||
}
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
### Add a OAuth 2.0 proxy route to your plugin
|
||||
|
||||
The data source proxy supports OAuth 2.0 authentication.
|
||||
|
||||
Since the request to each route is made server-side, only machine-to-machine authentication is supported. In order words, if you need to use a different grant than client credentials, you need to implement it yourself.
|
||||
|
||||
To authenticate using OAuth 2.0, add a `tokenAuth` object to the proxy route definition. If necessary, Grafana performs a request to the URL defined in `tokenAuth` to retrieve a token before making the request to the URL in your proxy route. Grafana automatically renews the token when it expires.
|
||||
|
||||
Any parameters defined in `tokenAuth.params` are encoded as `application/x-www-form-urlencoded` and sent to the token URL.
|
||||
|
||||
```json
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"path": "api",
|
||||
"url": "https://api.example.com/v1",
|
||||
"tokenAuth": {
|
||||
"url": "https://api.example.com/v1/oauth/token",
|
||||
"params": {
|
||||
"grant_type": "client_credentials",
|
||||
"client_id": "{{ .SecureJsonData.clientId }}",
|
||||
"client_secret": "{{ .SecureJsonData.clientSecret }}"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Authenticate using a backend plugin
|
||||
|
||||
While the data source proxy supports the most common authentication methods for HTTP APIs, using proxy routes has a few limitations:
|
||||
|
||||
- Proxy routes only support HTTP or HTTPS
|
||||
- Proxy routes don't support custom token authentication
|
||||
|
||||
If any of these limitations apply to your plugin, you need to add a [backend plugin]({{< relref "./backend/_index.md" >}}). Since backend plugins run on the server they can access decrypted secrets, which makes it easier to implement custom authentication methods.
|
||||
|
||||
The decrypted secrets are available from the `DecryptedSecureJSONData` field in the instance settings.
|
||||
|
||||
```go
|
||||
func (ds *dataSource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) {
|
||||
instanceSettings := req.PluginContext.DataSourceInstanceSettings
|
||||
|
||||
if apiKey, exists := settings.DecryptedSecureJSONData["apiKey"]; exists {
|
||||
// Use the decrypted API key.
|
||||
}
|
||||
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
## Forward OAuth identity for the logged-in user
|
||||
|
||||
If your data source uses the same OAuth provider as Grafana itself, for example using [Generic OAuth Authentication]({{< relref "../../auth/generic-oauth.md" >}}), your data source plugin can reuse the access token for the logged-in Grafana user.
|
||||
|
||||
To allow Grafana to pass the access token to the plugin, update the data source configuration and set the` jsonData.oauthPassThru` property to `true`. The [DataSourceHttpSettings](https://developers.grafana.com/ui/latest/index.html?path=/story/data-source-datasourcehttpsettings--basic) provides a toggle, the **Forward OAuth Identity** option, for this. You can also build an appropriate toggle to set `jsonData.oauthPassThru` in your data source configuration page UI.
|
||||
|
||||
When configured, Grafana will pass the user's token to the plugin in an Authorization header, available on the `QueryDataRequest` object on the `QueryData` request in your backend data source.
|
||||
|
||||
```go
|
||||
func (ds *dataSource) QueryData(ctx context.Context, req *backend.QueryDataRequest) (*backend.QueryDataResponse, error) {
|
||||
for _, q := range req.Queries {
|
||||
token := strings.Fields(q.Headers.Get("Authorization"))
|
||||
|
||||
var (
|
||||
tokenType = token[0]
|
||||
accessToken = token[1]
|
||||
)
|
||||
|
||||
// ...
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
> **Note:** Due to a bug in Grafana, using this feature with PostgreSQL can cause a deadlock. For more information, refer to [Grafana causes deadlocks in PostgreSQL, while trying to refresh users token](https://github.com/grafana/grafana/issues/20515).
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user