diff --git a/.betterer.results b/.betterer.results
index 3ec225ceb44..12d1729d2e1 100644
--- a/.betterer.results
+++ b/.betterer.results
@@ -5,7 +5,7 @@
//
exports[`better eslint`] = {
value: `{
- "e2e/scenes/utils/support/types.ts:5381": [
+ "e2e/old-arch/utils/support/types.ts:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
"e2e/utils/support/types.ts:5381": [
@@ -1655,8 +1655,7 @@ exports[`better eslint`] = {
"public/app/features/alerting/unified/components/contact-points/ContactPoints.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "3"]
+ [0, 0, 0, "No untranslated strings. Wrap text with ", "2"]
],
"public/app/features/alerting/unified/components/contact-points/components/ContactPointsFilter.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with ", "0"]
@@ -1766,12 +1765,6 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
[0, 0, 0, "No untranslated strings. Wrap text with ", "2"]
],
- "public/app/features/alerting/unified/components/receivers/DuplicateTemplateView.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"]
- ],
- "public/app/features/alerting/unified/components/receivers/EditTemplateView.tsx:5381": [
- [0, 0, 0, "No untranslated strings. Wrap text with ", "0"]
- ],
"public/app/features/alerting/unified/components/receivers/GlobalConfigForm.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
@@ -1895,8 +1888,7 @@ exports[`better eslint`] = {
],
"public/app/features/alerting/unified/components/rule-editor/AnnotationsStep.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "2"]
+ [0, 0, 0, "No untranslated strings. Wrap text with ", "1"]
],
"public/app/features/alerting/unified/components/rule-editor/CloudAlertPreview.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
@@ -2091,8 +2083,7 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings. Wrap text with ", "2"],
[0, 0, 0, "No untranslated strings. Wrap text with ", "3"],
[0, 0, 0, "No untranslated strings. Wrap text with ", "4"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "5"],
- [0, 0, 0, "No untranslated strings. Wrap text with ", "6"]
+ [0, 0, 0, "No untranslated strings. Wrap text with ", "5"]
],
"public/app/features/alerting/unified/components/rule-editor/query-and-alert-condition/SmartAlertTypeDetector.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
@@ -2776,6 +2767,9 @@ exports[`better eslint`] = {
"public/app/features/dashboard-scene/scene/PanelMenuBehavior.tsx:5381": [
[0, 0, 0, "Do not use any type assertions.", "0"]
],
+ "public/app/features/dashboard-scene/scene/PanelSearchLayout.tsx:5381": [
+ [0, 0, 0, "Do not use any type assertions.", "0"]
+ ],
"public/app/features/dashboard-scene/scene/row-actions/RowActions.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with ", "1"],
@@ -2785,6 +2779,10 @@ exports[`better eslint`] = {
[0, 0, 0, "No untranslated strings. Wrap text with ", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with ", "1"]
],
+ "public/app/features/dashboard-scene/scene/types.ts:5381": [
+ [0, 0, 0, "Unexpected any. Specify a different type.", "0"],
+ [0, 0, 0, "Unexpected any. Specify a different type.", "1"]
+ ],
"public/app/features/dashboard-scene/serialization/angularMigration.test.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
@@ -7228,7 +7226,7 @@ exports[`no undocumented stories`] = {
exports[`no gf-form usage`] = {
value: `{
- "e2e/scenes/utils/flows/addDataSource.ts:5381": [
+ "e2e/old-arch/utils/flows/addDataSource.ts:5381": [
[0, 0, 0, "gf-form usage has been deprecated. Use a component from @grafana/ui or custom CSS instead.", "5381"]
],
"e2e/utils/flows/addDataSource.ts:5381": [
diff --git a/.drone.yml b/.drone.yml
index 09e7ec86cc7..207e0d20ecb 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -18,7 +18,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
@@ -69,7 +69,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
@@ -120,7 +120,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -178,7 +178,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -279,7 +279,7 @@ steps:
name: clone-enterprise
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -367,7 +367,7 @@ steps:
name: clone-enterprise
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -454,7 +454,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
@@ -543,11 +543,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- mkdir -p bin
- - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
+ - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -648,7 +648,7 @@ steps:
GF_APP_MODE: development
GF_SERVER_HTTP_PORT: "3001"
GF_SERVER_ROUTER_LOGGING: "1"
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: grafana-server
- commands:
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite
@@ -660,14 +660,14 @@ steps:
image: cypress/included:13.10.0
name: end-to-end-tests-dashboards-suite
- commands:
- - ./bin/build e2e-tests --port 3001 --suite scenes/dashboards-suite
+ - ./bin/build e2e-tests --port 3001 --suite old-arch/dashboards-suite
depends_on:
- grafana-server
- build-test-plugins
environment:
HOST: grafana-server
image: cypress/included:13.10.0
- name: end-to-end-tests-scenes/dashboards-suite
+ name: end-to-end-tests-old-arch/dashboards-suite
- commands:
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite
depends_on:
@@ -678,14 +678,14 @@ steps:
image: cypress/included:13.10.0
name: end-to-end-tests-smoke-tests-suite
- commands:
- - ./bin/build e2e-tests --port 3001 --suite scenes/smoke-tests-suite
+ - ./bin/build e2e-tests --port 3001 --suite old-arch/smoke-tests-suite
depends_on:
- grafana-server
- build-test-plugins
environment:
HOST: grafana-server
image: cypress/included:13.10.0
- name: end-to-end-tests-scenes/smoke-tests-suite
+ name: end-to-end-tests-old-arch/smoke-tests-suite
- commands:
- ./bin/build e2e-tests --port 3001 --suite panels-suite
depends_on:
@@ -696,14 +696,14 @@ steps:
image: cypress/included:13.10.0
name: end-to-end-tests-panels-suite
- commands:
- - ./bin/build e2e-tests --port 3001 --suite scenes/panels-suite
+ - ./bin/build e2e-tests --port 3001 --suite old-arch/panels-suite
depends_on:
- grafana-server
- build-test-plugins
environment:
HOST: grafana-server
image: cypress/included:13.10.0
- name: end-to-end-tests-scenes/panels-suite
+ name: end-to-end-tests-old-arch/panels-suite
- commands:
- ./bin/build e2e-tests --port 3001 --suite various-suite
depends_on:
@@ -714,14 +714,14 @@ steps:
image: cypress/included:13.10.0
name: end-to-end-tests-various-suite
- commands:
- - ./bin/build e2e-tests --port 3001 --suite scenes/various-suite
+ - ./bin/build e2e-tests --port 3001 --suite old-arch/various-suite
depends_on:
- grafana-server
- build-test-plugins
environment:
HOST: grafana-server
image: cypress/included:13.10.0
- name: end-to-end-tests-scenes/various-suite
+ name: end-to-end-tests-old-arch/various-suite
- commands:
- cd /
- ./cpp-e2e/scripts/ci-run.sh azure ${DRONE_SOURCE_BRANCH}
@@ -868,7 +868,7 @@ steps:
- /src/grafana-build artifacts -a docker:grafana:linux/amd64 -a docker:grafana:linux/amd64:ubuntu
-a docker:grafana:linux/arm64 -a docker:grafana:linux/arm64:ubuntu -a docker:grafana:linux/arm/v7
-a docker:grafana:linux/arm/v7:ubuntu --yarn-cache=$$YARN_CACHE_FOLDER --build-id=$$DRONE_BUILD_NUMBER
- --go-version=1.23.1 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.19.1 --tag-format='{{
+ --go-version=1.23.1 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.20.3 --tag-format='{{
.version_base }}-{{ .buildID }}-{{ .arch }}' --grafana-dir=$$PWD --ubuntu-tag-format='{{
.version_base }}-{{ .buildID }}-ubuntu-{{ .arch }}' > docker.txt
- find ./dist -name '*docker*.tar.gz' -type f | xargs -n1 docker load -i
@@ -1003,7 +1003,7 @@ steps:
name: clone-enterprise
- commands:
- mkdir -p bin
- - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
+ - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -1016,7 +1016,7 @@ steps:
name: compile-build-cmd
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -1205,7 +1205,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -1562,7 +1562,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -1638,7 +1638,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -1696,7 +1696,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -1762,7 +1762,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -1842,7 +1842,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
@@ -1908,7 +1908,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -1968,11 +1968,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- mkdir -p bin
- - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
+ - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -2072,7 +2072,7 @@ steps:
GF_APP_MODE: development
GF_SERVER_HTTP_PORT: "3001"
GF_SERVER_ROUTER_LOGGING: "1"
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: grafana-server
- commands:
- ./bin/build e2e-tests --port 3001 --suite dashboards-suite
@@ -2084,14 +2084,14 @@ steps:
image: cypress/included:13.10.0
name: end-to-end-tests-dashboards-suite
- commands:
- - ./bin/build e2e-tests --port 3001 --suite scenes/dashboards-suite
+ - ./bin/build e2e-tests --port 3001 --suite old-arch/dashboards-suite
depends_on:
- grafana-server
- build-test-plugins
environment:
HOST: grafana-server
image: cypress/included:13.10.0
- name: end-to-end-tests-scenes/dashboards-suite
+ name: end-to-end-tests-old-arch/dashboards-suite
- commands:
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite
depends_on:
@@ -2102,14 +2102,14 @@ steps:
image: cypress/included:13.10.0
name: end-to-end-tests-smoke-tests-suite
- commands:
- - ./bin/build e2e-tests --port 3001 --suite scenes/smoke-tests-suite
+ - ./bin/build e2e-tests --port 3001 --suite old-arch/smoke-tests-suite
depends_on:
- grafana-server
- build-test-plugins
environment:
HOST: grafana-server
image: cypress/included:13.10.0
- name: end-to-end-tests-scenes/smoke-tests-suite
+ name: end-to-end-tests-old-arch/smoke-tests-suite
- commands:
- ./bin/build e2e-tests --port 3001 --suite panels-suite
depends_on:
@@ -2120,14 +2120,14 @@ steps:
image: cypress/included:13.10.0
name: end-to-end-tests-panels-suite
- commands:
- - ./bin/build e2e-tests --port 3001 --suite scenes/panels-suite
+ - ./bin/build e2e-tests --port 3001 --suite old-arch/panels-suite
depends_on:
- grafana-server
- build-test-plugins
environment:
HOST: grafana-server
image: cypress/included:13.10.0
- name: end-to-end-tests-scenes/panels-suite
+ name: end-to-end-tests-old-arch/panels-suite
- commands:
- ./bin/build e2e-tests --port 3001 --suite various-suite
depends_on:
@@ -2138,14 +2138,14 @@ steps:
image: cypress/included:13.10.0
name: end-to-end-tests-various-suite
- commands:
- - ./bin/build e2e-tests --port 3001 --suite scenes/various-suite
+ - ./bin/build e2e-tests --port 3001 --suite old-arch/various-suite
depends_on:
- grafana-server
- build-test-plugins
environment:
HOST: grafana-server
image: cypress/included:13.10.0
- name: end-to-end-tests-scenes/various-suite
+ name: end-to-end-tests-old-arch/various-suite
- commands:
- cd /
- ./cpp-e2e/scripts/ci-run.sh azure ${DRONE_SOURCE_BRANCH}
@@ -2328,7 +2328,7 @@ steps:
- /src/grafana-build artifacts -a docker:grafana:linux/amd64 -a docker:grafana:linux/amd64:ubuntu
-a docker:grafana:linux/arm64 -a docker:grafana:linux/arm64:ubuntu -a docker:grafana:linux/arm/v7
-a docker:grafana:linux/arm/v7:ubuntu --yarn-cache=$$YARN_CACHE_FOLDER --build-id=$$DRONE_BUILD_NUMBER
- --go-version=1.23.1 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.19.1 --tag-format='{{
+ --go-version=1.23.1 --ubuntu-base=ubuntu:22.04 --alpine-base=alpine:3.20.3 --tag-format='{{
.version_base }}-{{ .buildID }}-{{ .arch }}' --grafana-dir=$$PWD --ubuntu-tag-format='{{
.version_base }}-{{ .buildID }}-ubuntu-{{ .arch }}' > docker.txt
- find ./dist -name '*docker*.tar.gz' -type f | xargs -n1 docker load -i
@@ -2525,7 +2525,7 @@ services:
steps:
- commands:
- mkdir -p bin
- - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
+ - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -2538,7 +2538,7 @@ steps:
name: compile-build-cmd
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -2730,7 +2730,7 @@ steps:
name: identify-runner
- commands:
- $$ProgressPreference = "SilentlyContinue"
- - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/windows/grabpl.exe
+ - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/windows/grabpl.exe
-OutFile grabpl.exe
image: grafana/ci-wix:0.1.1
name: windows-init
@@ -2856,7 +2856,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -2912,7 +2912,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -2976,7 +2976,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -3054,7 +3054,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
@@ -3157,7 +3157,7 @@ services:
steps:
- commands:
- mkdir -p bin
- - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
+ - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3170,7 +3170,7 @@ steps:
name: compile-build-cmd
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -3398,11 +3398,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- mkdir -p bin
- - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
+ - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3529,11 +3529,11 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- mkdir -p bin
- - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
+ - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
@@ -3868,14 +3868,14 @@ steps:
- echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable
main" | tee -a /etc/apt/sources.list.d/grafana.list
- 'echo "Step 5: Installing Grafana..."'
- - for i in $(seq 1 10); do
+ - for i in $(seq 1 60); do
- ' if apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get
install -yq grafana=${TAG} >/dev/null 2>&1; then'
- ' echo "Command succeeded on attempt $i"'
- ' break'
- ' else'
- ' echo "Attempt $i failed"'
- - ' if [ $i -eq 10 ]; then'
+ - ' if [ $i -eq 60 ]; then'
- ' echo ''All attempts failed'''
- ' exit 1'
- ' fi'
@@ -3918,13 +3918,13 @@ steps:
- dnf list available grafana-${TAG}
- if [ $? -eq 0 ]; then
- ' echo "Grafana package found in repository. Installing from repo..."'
- - for i in $(seq 1 5); do
+ - for i in $(seq 1 60); do
- ' if dnf install -y --nogpgcheck grafana-${TAG} >/dev/null 2>&1; then'
- ' echo "Command succeeded on attempt $i"'
- ' break'
- ' else'
- ' echo "Attempt $i failed"'
- - ' if [ $i -eq 5 ]; then'
+ - ' if [ $i -eq 60 ]; then'
- ' echo ''All attempts failed'''
- ' exit 1'
- ' fi'
@@ -4045,14 +4045,14 @@ steps:
- echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable
main" | tee -a /etc/apt/sources.list.d/grafana.list
- 'echo "Step 5: Installing Grafana..."'
- - for i in $(seq 1 10); do
+ - for i in $(seq 1 60); do
- ' if apt-get update >/dev/null 2>&1 && DEBIAN_FRONTEND=noninteractive apt-get
install -yq grafana=${TAG} >/dev/null 2>&1; then'
- ' echo "Command succeeded on attempt $i"'
- ' break'
- ' else'
- ' echo "Attempt $i failed"'
- - ' if [ $i -eq 10 ]; then'
+ - ' if [ $i -eq 60 ]; then'
- ' echo ''All attempts failed'''
- ' exit 1'
- ' fi'
@@ -4096,13 +4096,13 @@ steps:
- dnf list available grafana-${TAG}
- if [ $? -eq 0 ]; then
- ' echo "Grafana package found in repository. Installing from repo..."'
- - for i in $(seq 1 5); do
+ - for i in $(seq 1 60); do
- ' if dnf install -y --nogpgcheck grafana-${TAG} >/dev/null 2>&1; then'
- ' echo "Command succeeded on attempt $i"'
- ' break'
- ' else'
- ' echo "Attempt $i failed"'
- - ' if [ $i -eq 5 ]; then'
+ - ' if [ $i -eq 60 ]; then'
- ' echo ''All attempts failed'''
- ' exit 1'
- ' fi'
@@ -4165,6 +4165,49 @@ volumes:
path: /var/run/docker.sock
name: docker
---
+clone:
+ retries: 3
+depends_on: []
+image_pull_secrets:
+- gcr
+- gar
+kind: pipeline
+name: publish-grafanacom
+node:
+ type: no-parallel
+platform:
+ arch: amd64
+ os: linux
+services: []
+steps:
+- commands:
+ - go build -o ./bin/build -ldflags '-extldflags -static' ./pkg/build/cmd
+ depends_on: []
+ environment:
+ CGO_ENABLED: 0
+ image: golang:1.23.1-alpine
+ name: compile-build-cmd
+- commands:
+ - ./bin/build publish grafana-com --edition oss ${DRONE_TAG}
+ depends_on:
+ - compile-build-cmd
+ environment:
+ GCP_KEY:
+ from_secret: gcp_grafanauploads_base64
+ GRAFANA_COM_API_KEY:
+ from_secret: grafana_api_key
+ image: grafana/grafana-ci-deploy:1.3.3
+ name: publish-grafanacom
+trigger:
+ event:
+ - promote
+ target: publish-grafanacom
+type: docker
+volumes:
+- host:
+ path: /var/run/docker.sock
+ name: docker
+---
clone:
retries: 3
depends_on:
@@ -4188,7 +4231,7 @@ steps:
environment:
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
from_secret: dagger_token
- ALPINE_BASE: alpine:3.19.1
+ ALPINE_BASE: alpine:3.20.3
CDN_DESTINATION:
from_secret: rgm_cdn_destination
DESTINATION:
@@ -4305,7 +4348,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -4361,7 +4404,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -4443,7 +4486,7 @@ steps:
environment:
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
from_secret: dagger_token
- ALPINE_BASE: alpine:3.19.1
+ ALPINE_BASE: alpine:3.20.3
CDN_DESTINATION:
from_secret: rgm_cdn_destination
DESTINATION:
@@ -4514,7 +4557,7 @@ steps:
name: identify-runner
- commands:
- $$ProgressPreference = "SilentlyContinue"
- - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/windows/grabpl.exe
+ - Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/windows/grabpl.exe
-OutFile grabpl.exe
image: grafana/ci-wix:0.1.1
name: windows-init
@@ -4626,7 +4669,7 @@ steps:
environment:
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
from_secret: dagger_token
- ALPINE_BASE: alpine:3.19.1
+ ALPINE_BASE: alpine:3.20.3
CDN_DESTINATION:
from_secret: rgm_cdn_destination
DESTINATION:
@@ -4728,7 +4771,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- yarn install --immutable || yarn install --immutable
@@ -4782,7 +4825,7 @@ services: []
steps:
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -4862,7 +4905,7 @@ steps:
environment:
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
from_secret: dagger_token
- ALPINE_BASE: alpine:3.19.1
+ ALPINE_BASE: alpine:3.20.3
CDN_DESTINATION:
from_secret: rgm_cdn_destination
DESTINATION:
@@ -5009,7 +5052,7 @@ steps:
environment:
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
from_secret: dagger_token
- ALPINE_BASE: alpine:3.19.1
+ ALPINE_BASE: alpine:3.20.3
CDN_DESTINATION:
from_secret: rgm_cdn_destination
DESTINATION:
@@ -5119,7 +5162,7 @@ steps:
environment:
_EXPERIMENTAL_DAGGER_CLOUD_TOKEN:
from_secret: dagger_token
- ALPINE_BASE: alpine:3.19.1
+ ALPINE_BASE: alpine:3.20.3
CDN_DESTINATION:
from_secret: rgm_cdn_destination
DESTINATION:
@@ -5316,13 +5359,13 @@ services:
steps:
- commands:
- mkdir -p bin
- - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.50/grabpl
+ - curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v3.0.53/grabpl
- chmod +x bin/grabpl
image: byrnedo/alpine-curl:0.1.8
name: grabpl
- commands:
- echo $DRONE_RUNNER_NAME
- image: alpine:3.19.1
+ image: alpine:3.20.3
name: identify-runner
- commands:
- '# It is required that code generated from Thema/CUE be committed and in sync
@@ -5820,7 +5863,7 @@ steps:
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM node:20-bookworm
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM google/cloud-sdk:431.0.0
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/grafana-ci-deploy:1.3.3
- - trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM alpine:3.19.1
+ - trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM alpine:3.20.3
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM ubuntu:22.04
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM byrnedo/alpine-curl:0.1.8
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM plugins/slack
@@ -5857,7 +5900,7 @@ steps:
- trivy --exit-code 1 --severity HIGH,CRITICAL node:20-bookworm
- trivy --exit-code 1 --severity HIGH,CRITICAL google/cloud-sdk:431.0.0
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/grafana-ci-deploy:1.3.3
- - trivy --exit-code 1 --severity HIGH,CRITICAL alpine:3.19.1
+ - trivy --exit-code 1 --severity HIGH,CRITICAL alpine:3.20.3
- trivy --exit-code 1 --severity HIGH,CRITICAL ubuntu:22.04
- trivy --exit-code 1 --severity HIGH,CRITICAL byrnedo/alpine-curl:0.1.8
- trivy --exit-code 1 --severity HIGH,CRITICAL plugins/slack
@@ -6108,6 +6151,6 @@ kind: secret
name: gcr_credentials
---
kind: signature
-hmac: 7335b2e56769f72716f5dac524741e423abb99eacf775fa635e59c2d658c8aee
+hmac: 766cd43d479f82bdb5bbaa3b48ed87ad13ea71d3418deb5d0c89ec7b77ae0475
...
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index c30c40ee279..9e0a8720582 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -80,7 +80,16 @@
/pkg/apis/query @grafana/grafana-datasources-core-services
/pkg/bus/ @grafana/grafana-search-and-storage
/pkg/cmd/ @grafana/grafana-backend-group
-/pkg/cmd/grafana/apiserver @grafana/grafana-app-platform-squad
+/pkg/cmd/grafana-cli/commands/install_command.go @grafana/plugins-platform-backend
+/pkg/cmd/grafana-cli/commands/install_command_test.go @grafana/plugins-platform-backend
+/pkg/cmd/grafana-cli/commands/listremote_command.go @grafana/plugins-platform-backend
+/pkg/cmd/grafana-cli/commands/listversions_command.go @grafana/plugins-platform-backend
+/pkg/cmd/grafana-cli/commands/ls_command_test.go @grafana/plugins-platform-backend
+/pkg/cmd/grafana-cli/commands/ls_command.go @grafana/plugins-platform-backend
+/pkg/cmd/grafana-cli/commands/remove_command.go @grafana/plugins-platform-backend
+/pkg/cmd/grafana-cli/commands/upgrade_command.go @grafana/plugins-platform-backend
+/pkg/cmd/grafana-cli/commands/upgrade_all_command.go @grafana/plugins-platform-backend
+/pkg/cmd/grafana-cli/commands/upgrade_all_command_test.go @grafana/plugins-platform-backend
/pkg/components/apikeygen/ @grafana/identity-squad
/pkg/components/satokengen/ @grafana/identity-squad
/pkg/components/dashdiffs/ @grafana/grafana-app-platform-squad
@@ -440,7 +449,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
/public/app/features/invites/ @grafana/grafana-frontend-platform
/public/app/features/library-panels/ @grafana/dashboards-squad
/public/app/features/logs/ @grafana/observability-logs
-/public/app/features/live/ @grafana/grafana-app-platform-squad
+/public/app/features/live/ @grafana/dashboards-squad
/public/app/features/apiserver/ @grafana/grafana-app-platform-squad
/public/app/features/manage-dashboards/ @grafana/dashboards-squad
/public/app/features/notifications/ @grafana/grafana-frontend-platform
@@ -492,7 +501,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
/public/app/plugins/panel/geomap/ @grafana/dataviz-squad
/public/app/plugins/panel/canvas/ @grafana/dataviz-squad
/public/app/plugins/panel/candlestick/ @grafana/dataviz-squad
-/public/app/plugins/panel/live/ @grafana/grafana-app-platform-squad
+/public/app/plugins/panel/live/ @grafana/dashboards-squad
/public/app/plugins/panel/news/ @grafana/grafana-frontend-platform
/public/app/plugins/panel/stat/ @grafana/dataviz-squad
/public/app/plugins/panel/text/ @grafana/grafana-frontend-platform
@@ -737,7 +746,6 @@ embed.go @grafana/grafana-as-code
/.github/workflows/i18n-crowdin-download.yml @grafana/grafana-frontend-platform
/.github/workflows/pr-go-workspace-check.yml @grafana/grafana-app-platform-squad
/.github/workflows/pr-k8s-codegen-check.yml @grafana/grafana-app-platform-squad
-/.github/workflows/run-scenes-e2e.yml @grafana/dashboards-squad
/.github/workflows/go_lint.yml @grafana/grafana-backend-services-squad
/.github/workflows/trivy-scan.yml @grafana/grafana-backend-services-squad
/.github/workflows/changelog.yml @zserge
diff --git a/.github/commands.json b/.github/commands.json
index fdf90eb4722..af047be4341 100644
--- a/.github/commands.json
+++ b/.github/commands.json
@@ -475,14 +475,6 @@
"url": "https://github.com/orgs/grafana/projects/665"
}
},
- {
- "type": "label",
- "name": "area/dashboard",
- "action": "addToProject",
- "addToProject": {
- "url": "https://github.com/orgs/grafana/projects/202"
- }
- },
{
"type": "label",
"name": "type/build-packaging",
@@ -507,14 +499,6 @@
"url": "https://github.com/orgs/grafana/projects/56"
}
},
- {
- "type": "label",
- "name": "area/dashboard/templating",
- "action": "addToProject",
- "addToProject": {
- "url": "https://github.com/orgs/grafana/projects/202"
- }
- },
{
"type": "label",
"name": "area/auth",
@@ -579,14 +563,6 @@
"url": "https://github.com/orgs/grafana/projects/203"
}
},
- {
- "type": "label",
- "name": "area/dashboards/panel",
- "action": "addToProject",
- "addToProject": {
- "url": "https://github.com/orgs/grafana/projects/202"
- }
- },
{
"type": "label",
"name": "area/public-dashboards",
@@ -635,14 +611,6 @@
"url": "https://github.com/orgs/grafana/projects/112"
}
},
- {
- "type": "label",
- "name": "area/dashboard/data-links",
- "action": "addToProject",
- "addToProject": {
- "url": "https://github.com/orgs/grafana/projects/202"
- }
- },
{
"type": "label",
"name": "area/backend/api",
@@ -675,22 +643,6 @@
"url": "https://github.com/orgs/grafana/projects/221"
}
},
- {
- "type": "label",
- "name": "area/dashboard/snapshot",
- "action": "addToProject",
- "addToProject": {
- "url": "https://github.com/orgs/grafana/projects/202"
- }
- },
- {
- "type": "label",
- "name": "area/dashboard/folders",
- "action": "addToProject",
- "addToProject": {
- "url": "https://github.com/orgs/grafana/projects/202"
- }
- },
{
"type": "label",
"name": "area/configuration",
@@ -715,14 +667,6 @@
"url": "https://github.com/orgs/grafana/projects/660"
}
},
- {
- "type": "label",
- "name": "area/dashboard/timerange",
- "action": "addToProject",
- "addToProject": {
- "url": "https://github.com/orgs/grafana/projects/202"
- }
- },
{
"type": "label",
"name": "datasource/MSSQL",
@@ -827,6 +771,174 @@
"url": "https://github.com/orgs/grafana/projects/202"
}
},
+ {
+ "type": "label",
+ "name": "area/dashboard/links",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/templating",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/variables",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboards/panel",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/data-links",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/rows",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/edit",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/panel/edit",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/scenes",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/snapshot",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/folders",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/timerange",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/repeating",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/annotations",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/library-panel",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/kiosk",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/tv",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/import",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/panel/field-override",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/panel/repeat",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
+ {
+ "type": "label",
+ "name": "area/dashboard/settings",
+ "action": "addToProject",
+ "addToProject": {
+ "url": "https://github.com/orgs/grafana/projects/202"
+ }
+ },
{
"type": "label",
"name": "area/backend/db/sqlite",
@@ -859,14 +971,6 @@
"url": "https://github.com/orgs/grafana/projects/78"
}
},
- {
- "type": "label",
- "name": "area/dashboard/links",
- "action": "addToProject",
- "addToProject": {
- "url": "https://github.com/orgs/grafana/projects/202"
- }
- },
{
"type": "label",
"name": "datasource/Zipkin",
diff --git a/.github/workflows/run-scenes-e2e.yml b/.github/workflows/run-scenes-e2e.yml
deleted file mode 100644
index 53425680492..00000000000
--- a/.github/workflows/run-scenes-e2e.yml
+++ /dev/null
@@ -1,47 +0,0 @@
-name: Run dashboard scenes e2e
-
-on:
- schedule:
- - cron: "0 8 * * 1-5" # every day at 08:00UTC on weekdays
- # push # uncomment for test run during PR
-
-env:
- ARCH: linux-amd64
-
-jobs:
- dashboard-scenes-e2e:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Pin Go version to mod file
- uses: actions/setup-go@v5
- with:
- go-version-file: 'go.mod'
- - run: go version
- - uses: actions/setup-node@v4
- with:
- node-version: 20
- - name: Install dependencies
- run: yarn install --immutable
- - name: Build grafana
- run: make build
- - name: Install Cypress dependencies
- uses: cypress-io/github-action@v6
- with:
- runTests: false
- - name: Run dashboard scenes e2e
- run: yarn e2e:scenes
- - name: "Send Slack notification"
- if: ${{ failure() }}
- uses: slackapi/slack-github-action@v1.26.0
- with:
- payload: >
- {
- "icon_emoji": ":this-is-fine-fire:",
- "username": "Dashboard scenes e2e tests failed",
- "text": "Link to run: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}",
- "channel": "#grafana-dashboards-squad"
- }
- env:
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 28a7201ada6..b1ad791c62d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,92 @@
+
+
+# 11.2.2 (2024-10-01)
+
+### Features and enhancements
+
+- **Chore:** Bump Go to 1.22.7 [#93353](https://github.com/grafana/grafana/pull/93353), [@hairyhenderson](https://github.com/hairyhenderson)
+- **Chore:** Bump Go to 1.22.7 (Enterprise)
+- **Data sources:** Hide the datasource redirection banner for users who can't interact with data sources [#93103](https://github.com/grafana/grafana/pull/93103), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
+
+### Bug fixes
+
+- **Alerting:** Fix preview of silences when label name contains spaces [#93051](https://github.com/grafana/grafana/pull/93051), [@tomratcliffe](https://github.com/tomratcliffe)
+- **Alerting:** Make query wrapper match up datasource UIDs if necessary [#93114](https://github.com/grafana/grafana/pull/93114), [@tomratcliffe](https://github.com/tomratcliffe)
+- **AzureMonitor:** Deduplicate resource picker rows [#93705](https://github.com/grafana/grafana/pull/93705), [@aangelisc](https://github.com/aangelisc)
+- **AzureMonitor:** Improve resource picker efficiency [#93440](https://github.com/grafana/grafana/pull/93440), [@aangelisc](https://github.com/aangelisc)
+- **AzureMonitor:** Remove Basic Logs retention warning [#93123](https://github.com/grafana/grafana/pull/93123), [@aangelisc](https://github.com/aangelisc)
+- **CloudWatch:** Fix segfault when migrating legacy queries [#93544](https://github.com/grafana/grafana/pull/93544), [@iwysiu](https://github.com/iwysiu)
+- **Correlations:** Limit access to correlations page to users who can access Explore [#93676](https://github.com/grafana/grafana/pull/93676), [@ifrost](https://github.com/ifrost)
+- **DashboardScene:** Fix broken error handling and error rendering [#93690](https://github.com/grafana/grafana/pull/93690), [@torkelo](https://github.com/torkelo)
+- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93488](https://github.com/grafana/grafana/pull/93488), [@wbrowne](https://github.com/wbrowne)
+
+
+
+
+# 11.1.7 (2024-10-01)
+
+### Features and enhancements
+
+- **Chore:** Bump Go to 1.22.7 [#93355](https://github.com/grafana/grafana/pull/93355), [@hairyhenderson](https://github.com/hairyhenderson)
+- **Chore:** Bump Go to 1.22.7 (Enterprise)
+
+### Bug fixes
+
+- **Alerting:** Fix preview of silences when label name contains spaces [#93050](https://github.com/grafana/grafana/pull/93050), [@tomratcliffe](https://github.com/tomratcliffe)
+- **Alerting:** Make query wrapper match up datasource UIDs if necessary [#93115](https://github.com/grafana/grafana/pull/93115), [@tomratcliffe](https://github.com/tomratcliffe)
+- **AzureMonitor:** Deduplicate resource picker rows [#93704](https://github.com/grafana/grafana/pull/93704), [@aangelisc](https://github.com/aangelisc)
+- **AzureMonitor:** Improve resource picker efficiency [#93439](https://github.com/grafana/grafana/pull/93439), [@aangelisc](https://github.com/aangelisc)
+- **AzureMonitor:** Remove Basic Logs retention warning [#93122](https://github.com/grafana/grafana/pull/93122), [@aangelisc](https://github.com/aangelisc)
+- **Correlations:** Limit access to correlations page to users who can access Explore [#93675](https://github.com/grafana/grafana/pull/93675), [@ifrost](https://github.com/ifrost)
+- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93487](https://github.com/grafana/grafana/pull/93487), [@wbrowne](https://github.com/wbrowne)
+
+
+
+
+# 11.0.6 (2024-10-01)
+
+### Features and enhancements
+
+- **Chore:** Bump Go to 1.22.7 [#93358](https://github.com/grafana/grafana/pull/93358), [@hairyhenderson](https://github.com/hairyhenderson)
+- **Chore:** Bump Go to 1.22.7 (Enterprise)
+
+### Bug fixes
+
+- **AzureMonitor:** Deduplicate resource picker rows [#93703](https://github.com/grafana/grafana/pull/93703), [@aangelisc](https://github.com/aangelisc)
+- **AzureMonitor:** Improve resource picker efficiency [#93438](https://github.com/grafana/grafana/pull/93438), [@aangelisc](https://github.com/aangelisc)
+- **Correlations:** Limit access to correlations page to users who can access Explore [#93674](https://github.com/grafana/grafana/pull/93674), [@ifrost](https://github.com/ifrost)
+- **Plugins:** Avoid returning 404 for `AutoEnabled` apps [#93486](https://github.com/grafana/grafana/pull/93486), [@wbrowne](https://github.com/wbrowne)
+
+
+
+
+# 10.4.10 (2024-10-01)
+
+### Features and enhancements
+
+- **Chore:** Bump Go to 1.22.7 [#93359](https://github.com/grafana/grafana/pull/93359), [@hairyhenderson](https://github.com/hairyhenderson)
+- **Chore:** Bump Go to 1.22.7 (Enterprise)
+
+### Bug fixes
+
+- **AzureMonitor:** Deduplicate resource picker rows [#93702](https://github.com/grafana/grafana/pull/93702), [@aangelisc](https://github.com/aangelisc)
+- **Correlations:** Limit access to correlations page to users who can access Explore [#93673](https://github.com/grafana/grafana/pull/93673), [@ifrost](https://github.com/ifrost)
+
+
+
+
+# 10.3.11 (2024-10-01)
+
+### Features and enhancements
+
+- **Chore:** Bump Go to 1.22.7 [#93360](https://github.com/grafana/grafana/pull/93360), [@hairyhenderson](https://github.com/hairyhenderson)
+- **Chore:** Bump Go to 1.22.7 (Enterprise)
+
+### Bug fixes
+
+- **Correlations:** Limit access to correlations page to users who can access Explore [#93672](https://github.com/grafana/grafana/pull/93672), [@ifrost](https://github.com/ifrost)
+
+
# 11.2.1 (2024-09-26)
@@ -21,6 +110,7 @@
- **Reporting:** Disable dashboardSceneSolo when rendering PDFs the old way (Enterprise)
- **Templating:** Fix searching non-latin template variables [#92893](https://github.com/grafana/grafana/pull/92893), [@leeoniya](https://github.com/leeoniya)
- **TutorialCard:** Fix link to tutorial not opening [#92647](https://github.com/grafana/grafana/pull/92647), [@eledobleefe](https://github.com/eledobleefe)
+- **Alerting:** Fixed CVE-2024-8118.
### Plugin development fixes & changes
@@ -43,6 +133,7 @@
### Plugin development fixes & changes
- **Bugfix:** QueryField typeahead missing background color [#92316](https://github.com/grafana/grafana/pull/92316), [@mckn](https://github.com/mckn)
+- **Alerting:** Fixed CVE-2024-8118.
@@ -57,6 +148,7 @@
- **Provisioning:** Prevent provisioning folder errors from failing startup [#92588](https://github.com/grafana/grafana/pull/92588), [@suntala](https://github.com/suntala)
- **TutorialCard:** Fix link to tutorial not opening [#92645](https://github.com/grafana/grafana/pull/92645), [@eledobleefe](https://github.com/eledobleefe)
+- **Alerting:** Fixed CVE-2024-8118.
@@ -70,12 +162,17 @@
### Bug fixes
- **Provisioning:** Prevent provisioning folder errors from failing startup [#92591](https://github.com/grafana/grafana/pull/92591), [@suntala](https://github.com/suntala)
+- **Alerting:** Fixed CVE-2024-8118.
# 10.3.10 (2024-09-26)
+### Bug fixes
+
+- **Alerting:** Fixed CVE-2024-8118.
+
diff --git a/conf/defaults.ini b/conf/defaults.ini
index 3e7fc20ef90..8baa6296110 100644
--- a/conf/defaults.ini
+++ b/conf/defaults.ini
@@ -582,6 +582,9 @@ oauth_auto_login = false
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
oauth_state_cookie_max_age = 600
+# Sets a custom oAuth error message. This is useful if you need to point the users to a specific location for support.
+oauth_login_error_message = oauth.login.error
+
# Minimum wait time in milliseconds for the server lock retry mechanism.
# The server lock retry mechanism is used to prevent multiple Grafana instances from
# simultaneously refreshing OAuth tokens. This mechanism waits at least this amount
@@ -615,6 +618,10 @@ id_response_header_prefix = X-Grafana
# The header value will encode the namespace ("user:", "api-key:", "service-account:")
id_response_header_namespaces = user api-key service-account
+# Enables the use of managed service accounts for plugin authentication
+# This feature currently **only supports single-organization deployments**
+managed_service_accounts_enabled = false
+
#################################### SSO Settings ###########################
[sso_settings]
# interval for reloading the SSO Settings from the database
diff --git a/conf/sample.ini b/conf/sample.ini
index a36d17ff618..099de883121 100644
--- a/conf/sample.ini
+++ b/conf/sample.ini
@@ -583,6 +583,9 @@
# Deprecated, use auto_login option for specific provider instead.
;oauth_auto_login = false
+# Sets a custom oAuth error message. This is useful if you need to point the users to a specific location for support.
+;oauth_login_error_message = oauth.login.error
+
# OAuth state max age cookie duration in seconds. Defaults to 600 seconds.
;oauth_state_cookie_max_age = 600
@@ -619,6 +622,10 @@
# The header value will encode the namespace ("user:", "api-key:", "service-account:")
;id_response_header_namespaces = user api-key service-account
+# Enables the use of managed service accounts for plugin authentication
+# This feature currently **only supports single-organization deployments**
+; managed_service_accounts_enabled = false
+
#################################### Anonymous Auth ######################
[auth.anonymous]
# enable anonymous access
diff --git a/docs/sources/administration/correlations/_index.md b/docs/sources/administration/correlations/_index.md
index 977849d2948..3a61b1800b5 100644
--- a/docs/sources/administration/correlations/_index.md
+++ b/docs/sources/administration/correlations/_index.md
@@ -12,16 +12,18 @@ weight: 900
# Correlations
-You can create interactive links for Explore visualizations to run queries related to presented data by setting up Correlations.
+You can create interactive links for Explore visualizations by setting up Correlations. These links can either run queries or generate external URLs related to presented data.
-A correlation defines how data in one [data source]({{< relref "../../datasources" >}}) is used to query data in another data source.
+A correlation defines how data in one [data source]({{< relref "../../datasources" >}}) is used to query data in another data source or to generate an external URL.
Some examples:
- an application name returned in a logs data source can be used to query metrics related to that application in a metrics data source, or
- a user name returned by an SQL data source can be used to query logs related to that particular user in a logs data source
+- a customer ID in a logs data source can link to a different platform that has a profile on that customer.
[Explore]({{< relref "../../explore" >}}) takes user-defined correlations to display links inside the visualizations.
-You can click on a link to run the related query and see results in [Explore Split View]({{< relref "../../explore#split-and-compare" >}}).
+If a correlation links to a query, you can click on that link to run the related query and see results in [Explore Split View]({{< relref "../../explore#split-and-compare" >}}).
+If a correlation links to an external URL, you can click on the link to open the URL in a new tab in your browser.
Explore visualizations that currently support showing links based on correlations:
diff --git a/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md b/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md
index b0e4cd732cd..33d5b94b1df 100644
--- a/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md
+++ b/docs/sources/alerting/alerting-rules/create-grafana-managed-rule.md
@@ -86,12 +86,26 @@ Multiple alert instances can be created as a result of one alert rule (also know
For Grafana Cloud Free Forever, you can create up to 100 free Grafana-managed alert rules with each alert rule having a maximum of 1000 alert instances.
{{% /admonition %}}
-Grafana managed alert rules can only be edited or deleted by users with Edit permissions for the folder storing the rules.
+Grafana-managed alert rules can only be edited or deleted by users with Edit permissions for the folder storing the rules.
-If you delete an alerting resource created in the UI, you can no longer retrieve it.
+If you delete an alert resource created in the UI, you can no longer retrieve it.
To make a backup of your configuration and to be able to restore deleted alerting resources, create your alerting resources using file provisioning, Terraform, or the Alerting API.
-In the following sections, we’ll guide you through the process of creating your Grafana-managed alert rules.
+## Before you begin
+
+You can use default or advanced options for Grafana-managed alert rule creation. The default options streamline rule creation with a cleaner header and a single query and condition. For more complex rules, use advanced options to add multiple queries and expressions.
+
+Default and advanced options are enabled by default for Grafana Cloud users and this feature is being rolled out progressively.
+
+For OSS users,enable the `alertingQueryAndExpressionsStepMode` feature toggle.
+
+{{% admonition type="note" %}}
+Once you have created an alert rule using one of the options, the system defaults to this option for the next alert rule you create.
+
+You can toggle between the two options. However, if you want to switch from advanced options to the default, it may be that your query and expressions cannot be converted. In this case, a warning message checks whether you want to continue to reset to default settings.
+{{% /admonition %}}
+
+## Steps
To create a Grafana-managed alert rule, use the in-product alert creation flow and follow these steps.
@@ -108,14 +122,26 @@ To get started quickly, refer to our [tutorial on getting started with Grafana a
Define a query to get the data you want to measure and a condition that needs to be met before an alert rule fires.
+{{< collapse title="Default options" >}}
+
+1. Add a query.
+1. Add an alert condition.
+
+ The **When** input includes the reducer function and the last input is the threshold.
+
+1. Click **Preview** to verify.
+ {{< /collapse >}}
+
+{{< collapse title="Advanced options" >}}
+
1. Select a data source.
1. From the **Options** dropdown, specify a [time range](ref:time-units-and-relative-ranges).
- **Note:**
+{{% admonition type="note" %}}
+Grafana Alerting only supports fixed relative time ranges, for example, `now-24hr: now`.
- Grafana Alerting only supports fixed relative time ranges, for example, `now-24hr: now`.
-
- It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:59:592` or semi-relative time ranges: `now/d to: now`.
+It does not support absolute time ranges: `2021-12-02 00:00:00 to 2021-12-05 23:59:592` or semi-relative time ranges: `now/d to: now`.
+{{% /admonition %}}
1. Add a query.
@@ -138,6 +164,7 @@ Define a query to get the data you want to measure and a condition that needs to
You can only add one recovery threshold in a query and it must be the alert condition.
1. Click **Set as alert condition** on the query or expression you want to set as your alert condition.
+ {{< /collapse >}}
## Set alert evaluation behavior
diff --git a/docs/sources/alerting/alerting-rules/templating-labels-annotations.md b/docs/sources/alerting/alerting-rules/templating-labels-annotations.md
index 321d8bfd720..d25fa40daec 100644
--- a/docs/sources/alerting/alerting-rules/templating-labels-annotations.md
+++ b/docs/sources/alerting/alerting-rules/templating-labels-annotations.md
@@ -36,6 +36,64 @@ Each template is evaluated whenever the alert rule is evaluated, and is evaluate
Extra whitespace in label templates can break matches with notification policies.
{{% /admonition %}}
+## Variables
+
+In Grafana templating, the `$` and `.` symbols are used to reference variables and their properties. You can reference variables directly in your alert rule definitions using the `$` symbol followed by the variable name. Similarly, you can access properties of variables using the dot (`.`) notation within alert rule definitions.
+
+The following variables are available to you when templating labels and annotations:
+
+### The labels variable
+
+The `$labels` variable contains all labels from the query. For example, suppose you have a query that returns CPU usage for all of your servers, and you have an alert rule that fires when any of your servers have exceeded 80% CPU usage for the last 5 minutes. You want to add a summary annotation to the alert that tells you which server is experiencing high CPU usage. With the `$labels` variable you can write a template that prints a human-readable sentence such as:
+
+```
+CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
+```
+
+> If you are using a classic condition then `$labels` will not contain any labels from the query. Classic conditions discard these labels in order to enforce uni-dimensional behavior (at most one alert per alert rule). If you want to use labels from the query in your template then use the example [here](#print-all-labels-from-a-classic-condition).
+
+### The value variable
+
+The `$value` variable is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule. It does not contain the results of range queries, as these can return anywhere from 10s to 10,000s of rows or metrics. If it did, for especially large queries a single alert could use 10s of MBs of memory and Grafana would run out of memory very quickly.
+
+To print the `$value` variable in the summary you would write something like this:
+
+```
+CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
+```
+
+And would look something like this:
+
+```
+CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
+```
+
+Here `var='A'` refers to the instant query with Ref ID A, `labels={instance=instance1}` refers to the labels, and `value=81.234` refers to the average CPU usage over the last 5 minutes.
+
+If you want to print just some of the string instead of the full string then use the `$values` variable. It contains the same information as `$value`, but in a structured table, and is much easier to use then writing a regular expression to match just the text you want.
+
+### The values variable
+
+The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs.
+
+To print the value of the instant query with Ref ID A:
+
+```
+CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
+```
+
+For example, given an alert with the labels `instance=server1` and an instant query with the value `81.2345`, this would print:
+
+```
+CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
+```
+
+If the query in Ref ID A is a range query rather than an instant query then add a reduce expression with Ref ID B and replace `(index $values "A")` with `(index $values "B")`:
+
+```
+CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "B" }}
+```
+
## Examples
The following examples attempt to show the most common use-cases we have seen for templates. You can use these examples verbatim, or adapt them as necessary for your use case. For more information on how to write text/template refer see [the beginner's guide to alert notification templates in Grafana](https://grafana.com/blog/2023/04/05/grafana-alerting-a-beginners-guide-to-templating-alert-notifications/).
@@ -216,62 +274,6 @@ B2: 84.5678
B3: 95.6789
```
-## Variables
-
-The following variables are available to you when templating labels and annotations:
-
-### The labels variable
-
-The `$labels` variable contains all labels from the query. For example, suppose you have a query that returns CPU usage for all of your servers, and you have an alert rule that fires when any of your servers have exceeded 80% CPU usage for the last 5 minutes. You want to add a summary annotation to the alert that tells you which server is experiencing high CPU usage. With the `$labels` variable you can write a template that prints a human-readable sentence such as:
-
-```
-CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
-```
-
-> If you are using a classic condition then `$labels` will not contain any labels from the query. Classic conditions discard these labels in order to enforce uni-dimensional behavior (at most one alert per alert rule). If you want to use labels from the query in your template then use the example [here](#print-all-labels-from-a-classic-condition).
-
-### The value variable
-
-The `$value` variable is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule. It does not contain the results of range queries, as these can return anywhere from 10s to 10,000s of rows or metrics. If it did, for especially large queries a single alert could use 10s of MBs of memory and Grafana would run out of memory very quickly.
-
-To print the `$value` variable in the summary you would write something like this:
-
-```
-CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
-```
-
-And would look something like this:
-
-```
-CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
-```
-
-Here `var='A'` refers to the instant query with Ref ID A, `labels={instance=instance1}` refers to the labels, and `value=81.234` refers to the average CPU usage over the last 5 minutes.
-
-If you want to print just some of the string instead of the full string then use the `$values` variable. It contains the same information as `$value`, but in a structured table, and is much easier to use then writing a regular expression to match just the text you want.
-
-### The values variable
-
-The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs.
-
-To print the value of the instant query with Ref ID A:
-
-```
-CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
-```
-
-For example, given an alert with the labels `instance=server1` and an instant query with the value `81.2345`, this would print:
-
-```
-CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
-```
-
-If the query in Ref ID A is a range query rather than an instant query then add a reduce expression with Ref ID B and replace `(index $values "A")` with `(index $values "B")`:
-
-```
-CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "B" }}
-```
-
## Functions
The following functions are available to you when templating labels and annotations:
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/_index.md b/docs/sources/alerting/configure-notifications/manage-contact-points/_index.md
index 1fa195f52fb..7ab9ffe5385 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/_index.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/_index.md
@@ -87,6 +87,8 @@ refs:
Use contact points to select your preferred communication channel for receiving notifications when your alert rules are firing. You can add, edit, delete, export, and test a contact point.
+Testing a contact point is only available for Grafana Alertmanager.
+
On the **Contact Points** tab, you can:
- Search for name and type of contact points and integrations.
@@ -144,6 +146,8 @@ Complete the following steps to add templates to your contact point.
## Test a contact point
+** For Grafana Alertmanager only.**
+
Complete the following steps to test a contact point.
1. In the left-side menu, click **Alerts & IRM** and then **Alerting**.
@@ -162,6 +166,7 @@ The following table lists the contact point integrations supported by Grafana.
| Name | Type |
| ---------------------------- | ------------------------- |
| Alertmanager | `prometheus-alertmanager` |
+| Amazon SNS | `sns` |
| Cisco Webex Teams | `webex` |
| DingDing | `dingding` |
| [Discord](ref:discord) | `discord` |
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-amazon-sns.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-amazon-sns.md
index 6cd38615744..e0209ac8f50 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-amazon-sns.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-amazon-sns.md
@@ -18,34 +18,59 @@ weight: 0
# Configure Amazon SNS for Alerting
-Use the Grafana Alerting - Amazon SNS integration to send notifications to Amazon SNS when your alerts are firing.
+Use the Grafana Alerting - Amazon SNS integration to send notifications to Amazon SNS when your alerts are firing. You can receive notifications via the various subscriber channels supported by SNS.
## Before you begin
-To configure Amazon SNS to receive alert notifications, complete the following steps.
+Before you begin, ensure you have the following:
-1. Create a new topic in https://console.aws.amazon.com/sns.
-1. Open the topic and create a new subscription.
-1. Choose the protocol HTTPS.
-1. Copy the URL.
+- **AWS SNS Topic**: An SNS topic to send notifications to.
+- **AWS IAM Identity with necessary access**: An IAM identity (e.g. user, role) with the necessary permissions to publish messages to the SNS topic.
-For more information, refer to [Amazon SNS documentation](https://docs.aws.amazon.com/sns/latest/dg/welcome.html).
+For an example setup, see [Example Minimal Setup Using Assumed IAM Role]({{< relref "#example-minimal-setup-using-assumed-iam-role" >}}).
-## Procedure
+## Adding the SNS Contact Point in Grafana
-To create your Amazon SNS integration in Grafana Alerting, complete the following steps.
+With AWS resources configured, proceed to add SNS as a contact point in Grafana.
-1. Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
-1. Click **+ Add contact point**.
-1. Enter a contact point name.
-1. From the Integration list, select **AWS SNS**.
-1. Copy in the URL from above into the **The Amazon SNS API URL** field.
-1. Click **Test** to check that your integration works.
-1. Click **Save contact point**.
+- Navigate to **Alerts & IRM** -> **Alerting** -> **Contact points**.
+- Click on **"Add contact point"**.
+- **Name**: Enter a descriptive name (e.g., `AWS SNS`).
+- Choose **"AWS SNS"** from the list of contact point types.
-## Next steps
+### 2. Configure SNS Settings
-The Amazon SNS contact point is ready to receive alert notifications.
+#### SNS Settings
+
+- **The Amazon SNS API URL**: (Optional) The SNS API URL, e.g., `https://sns.us-east-2.amazonaws.com`. If not specified, the SNS API URL from the SNS SDK will be used.
+- **Signature Version (sigv4)**: Configures AWS's Signature Verification 4 signing process to sign requests.
+ - **Region**: (Optional) The AWS region. If blank, the region from the default credentials chain is used.
+ - **Access Key**: The AWS API access key.
+ - **Secret Key**: The AWS API secret key.
+ - **Profile**: (Optional) Named AWS profile used to authenticate.
+ - **Role ARN**: (Optional) The ARN of an AWS IAM role to assume for authentication, serving as an alternative to using AWS API keys.
+- **SNS topic ARN**: (Optional) If you don't specify this value, you must specify a value for the `Phone number` or `Target ARN`. If you are using a FIFO SNS topic you should set a message group interval longer than 5 minutes to prevent messages with the same group key being deduplicated by the SNS default deduplication window.
+- **Phone number**: (Optional) Phone number if message is delivered via SMS in E.164 format. If you don't specify this value, you must specify a value for the `SNS topic ARN` or `Target ARN`.
+- **Target ARN**: (Optional) The mobile platform endpoint ARN if message is delivered via mobile notifications. If you don't specify this value, you must specify a value for the `SNS topic ARN` or `Phone number`.
+- **Subject**: (Optional) Customize the subject line or use the default template. This field is templateable.
+- **Message**: (Optional) Customize the message content or use the default template. This field is templateable.
+- **Attributes**: (Optional) Add any SNS message attributes.
+
+{{< admonition type="note" >}}
+Both `Access Key` and `Secret Key` must be provided together or left blank together. If blank it defaults to a chain of credential
+providers to search for credentials in environment variables, shared credential file, and EC2 Instance Roles.
+
+Environment variables: `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY`.
+{{< /admonition >}}
+
+### 3. Test & Save the Contact Point
+
+- Click **"Test"** to verify that the SNS configuration is working correctly.
+- After the test is successful, click **"Save contact point"** to add the SNS contact point.
+
+### 4. Next steps
+
+The SNS contact point is ready to receive alert notifications.
To add this contact point to your alert, complete the following steps.
@@ -55,3 +80,124 @@ To add this contact point to your alert, complete the following steps.
1. Under Notifications click **Select contact point**.
1. From the drop-down menu, select the previously created contact point.
1. **Click Save rule and exit**.
+
+## Example Minimal Setup Using Assumed IAM Role
+
+This section outlines a minimal setup to configure SNS with Grafana using an assumed IAM Role.
+
+### 1. Create an SNS Topic
+
+1. **Navigate to SNS in AWS Console**:
+
+ - Go to the [Amazon SNS Console](https://console.aws.amazon.com/sns/v3/home).
+
+2. **Create a new topic** [[AWS Documentation](https://docs.aws.amazon.com/sns/latest/dg/sns-create-topic.html)]:
+
+ - On the **Topics** page, choose **"Create topic"**.
+ - Select **"Standard"** as the type.
+ - Enter a **Name** for your topic, e.g., `My-Topic`.
+ - **Encryption**: Leave disabled for this minimal setup.
+ - Click **"Create topic"**.
+
+3. (Optional) **Add an email subscriber to help test** [[AWS Documentation](https://docs.aws.amazon.com/sns/latest/dg/sns-email-notifications.html)]:
+ - Within your newly created topic, click on **"Create subscription"**.
+ - **Protocol**: Choose `Email`.
+ - **Endpoint**: Enter your email address to receive test notifications.
+ - Click **"Create subscription"**.
+ - **Confirm Subscription**: Check your email and confirm the subscription by clicking the provided link.
+
+### 2. Create an IAM Role
+
+1. **Navigate to IAM in AWS Console**:
+
+ - Go to the [IAM Console](https://console.aws.amazon.com/iam/home).
+
+2. **Create a new role** [[AWS Documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_create_for-user.html)]:
+
+ - On the **Roles** page, choose **"Create role"**.
+ - **Trusted Entity**: Select **"This account"**.
+ - Click **"Next"** until the end, name it (e.g., `GrafanaSNSRole`), and click **"Create role"**.
+
+3. **Attach Inline Policy**:
+
+ - After creating the role, select it and navigate to the **"Permissions"** tab.
+ - Click on **"Add permission"** > **"Create inline policy"**.
+ - Switch to the **"JSON"** tab and paste the following policy, replacing `Resource` with your SNS topic ARN:
+
+ ```json
+ {
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Action": ["sns:Publish", "sns:GetTopicAttributes"],
+ "Resource": "arn:aws:sns:::"
+ }
+ ]
+ }
+ ```
+
+ - Click **"Next"**, name it (e.g., `SNSPublishPolicy`), and click **"Create policy"**.
+
+### 3. Create an IAM Policy
+
+1. **Create a new policy to allow assuming the above IAM role** [[AWS Documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_create-console.html)]:
+
+ - In the IAM Console, on the **Policies** page, choose **"Create policy"**.
+ - Switch to the **"JSON"** tab and paste the following policy, replacing `Resource` with the ARN of the role you created earlier:
+
+ ```json
+ {
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Action": "sts:AssumeRole",
+ "Resource": "arn:aws:iam:::role/GrafanaSNSRole"
+ }
+ ]
+ }
+ ```
+
+2. **Review and Create**:
+ - Click **"Next"**, name it (e.g., `AssumeSNSRolePolicy`), and click **"Create policy"**.
+
+### 4. Create an IAM User
+
+1. **Create a new IAM user to assume the above role** [[AWS Documentation](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html)]:
+
+ - In the IAM Console, on the **Users** page, choose **"Create user"**.
+ - Enter a **User name**, e.g., `grafana-sns-user`.
+ - Click **"Next"**.
+ - Select **"Attach policies directly"**.
+ - Search for the policy you created earlier (`AssumeSNSRolePolicy`) and select it.
+ - Click **"Next"** , and click **"Create user"**.
+
+2. **Generate credentials**:
+ - Within your newly created user, click on **"Create access key"**.
+ - Select an appropriate use-case, e.g., `Application running outside AWS`.
+ - Click **"Next"** , and click **"Create access key"**.
+ - **Save Credentials**: Note the **Access key ID** and **Secret access key**. You'll need these for Grafana's configuration.
+
+### 5. Add the SNS Contact Point in Grafana
+
+After creating the IAM user and obtaining the necessary credentials, proceed to [configure the SNS contact point in Grafana]({{< relref "#adding-the-sns-contact-point-in-grafana" >}}) using the following details:
+
+- **The Amazon SNS API URL**: `https://sns.us-east-1.amazonaws.com`
+- **Signature Version (sigv4)**:
+ - **Region**: `us-east-1`
+ - **Access Key**: ``.
+ - **Secret Key**: ``
+ - **Role ARN**: `arn:aws:iam:::role/GrafanaSNSRole`
+- **SNS topic ARN**: `arn:aws:sns:::My-Topic`
+
+{{< admonition type="note" >}}
+Replace the placeholder values (`https://sns.us-east-1.amazonaws.com`, `us-east-1`, ``, ``, `arn:aws:iam:::role/GrafanaSNSRole`, `arn:aws:sns:::My-Topic`) with your actual AWS credentials and ARNs.
+{{< /admonition >}}
+
+## Additional Resources
+
+- [Amazon SNS Documentation](https://docs.aws.amazon.com/sns/index.html)
+- [AWS IAM Documentation](https://docs.aws.amazon.com/iam/index.html)
+- [Prometheus Alertmanager SNS Integration](https://prometheus.io/docs/alerting/configuration/#sns_config)
+- [Cloudwatch AWS Authentication]({{< relref "../../../../datasources/aws-cloudwatch/aws-authentication" >}})
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-discord.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-discord.md
index 7c5baff4446..399c3b31579 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-discord.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-discord.md
@@ -39,6 +39,8 @@ To create your Discord integration in Grafana Alerting, complete the following s
1. In the **Webhook URL** field, paste in your Webhook URL.
1. Click **Test** to check that your integration works.
+ ** For Grafana Alertmanager only.**
+
A test alert notification should be sent to the Discord channel that you associated with the Webhook.
1. Click **Save contact point**.
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-email.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-email.md
index 81b6ccac4d8..3b2b1898dc5 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-email.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-email.md
@@ -79,6 +79,9 @@ To set up email integration, complete the following steps.
E-mail addresses are case sensitive. Ensure that the e-mail address entered is correct.
1. Click **Test** to check that your integration works.
+
+ ** For Grafana Alertmanager only.**
+
1. Click **Save contact point**.
## Next steps
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-google-chat.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-google-chat.md
index e20a31606e9..b0440d06ff2 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-google-chat.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-google-chat.md
@@ -39,6 +39,8 @@ To create your Google Chat integration in Grafana Alerting, complete the followi
1. In the **URL** field, paste in your Webhook URL.
1. Click **Test** to check that your integration works.
+ ** For Grafana Alertmanager only.**
+
A test alert notification should be sent to the Google Chat space that you associated with the Webhook.
1. Click **Save contact point**.
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-mqtt.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-mqtt.md
index 0ded51cd145..0f9567a0a21 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-mqtt.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-mqtt.md
@@ -14,7 +14,7 @@ labels:
- oss
menuTitle: MQTT notifier
title: Configure the MQTT notifier for Alerting
-weight: 80
+weight: 0
---
# Configure the MQTT notifier for Alerting
@@ -33,7 +33,11 @@ To configure the MQTT integration for Alerting, complete the following steps.
1. Enter the MQTT topic name in the **Topic** field.
1. In **Optional MQTT settings**, specify additional settings for the MQTT integration if needed.
1. Click **Test** to check that your integration works.
+
+ ** For Grafana Alertmanager only.**
+
A test alert notification should be sent to the MQTT broker.
+
1. Click **Save** contact point.
The integration sends data in JSON format by default. You can change that using **Message format** field in the **Optional MQTT settings** section. There are two supported formats:
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-opsgenie.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-opsgenie.md
index 0ffa3dcf20e..e1f455af2dc 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-opsgenie.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-opsgenie.md
@@ -44,6 +44,8 @@ To create your Opsgenie integration in Grafana Alerting, complete the following
1. In the **Alert API URL**, enter `https://api.opsgenie.com/v2/alerts`.
1. Click **Test** to check that your integration works.
+ ** For Grafana Alertmanager only.**
+
A test alert notification is sent to the Alerts page in Opsgenie.
1. Click **Save contact point**.
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-slack.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-slack.md
index 6777771bf9a..359cebc1bd3 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-slack.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-slack.md
@@ -78,6 +78,9 @@ To create your Slack integration in Grafana Alerting, complete the following ste
- In the **Token** field, copy in the Bot User OAuth Token that starts with “xoxb-”.
1. If you are using a Webhook URL, in the **Webhook** field, copy in your Slack app Webhook URL.
1. Click **Test** to check that your integration works.
+
+ ** For Grafana Alertmanager only.**
+
1. Click **Save contact point**.
## Next steps
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-teams.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-teams.md
index 1141af8db6c..4f720bb616d 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-teams.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-teams.md
@@ -43,7 +43,11 @@ To create your MS Teams integration in Grafana Alerting, complete the following
1. From the Integration list, select **Microsoft Teams**.
1. In the **URL** field, copy in your Webhook URL.
1. Click **Test** to check that your integration works.
+
+ ** For Grafana Alertmanager only.**
+
A test alert notification should be sent to the MS Team channel.
+
1. Click **Save** contact point.
## Next steps
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram.md
index dd5ca20d7bb..1c86f94d0cc 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/configure-telegram.md
@@ -64,6 +64,9 @@ To create your Telegram integration in Grafana Alerting, complete the following
1. In the **BOT API Token** field, copy in the bot API token.
1. In the **Chat ID** field, copy in the chat ID.
1. Click **Test** to check that your integration works.
+
+ ** For Grafana Alertmanager only.**
+
1. Click **Save contact point**.
## Next steps
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/pager-duty.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/pager-duty.md
index d6202d7adc4..ebfdec1f364 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/pager-duty.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/pager-duty.md
@@ -57,6 +57,8 @@ To create your PagerDuty integration in Grafana Alerting, complete the following
1. In the **Integration Key** field, copy in your integration key.
1. Click **Test** to check that your integration works.
+ ** For Grafana Alertmanager only.**
+
An incident should display in the Service’s Activity tab in PagerDuty.
1. Click **Save contact point**.
diff --git a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier.md b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier.md
index 556d66755ce..17468cac706 100644
--- a/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier.md
+++ b/docs/sources/alerting/configure-notifications/manage-contact-points/integrations/webhook-notifier.md
@@ -152,6 +152,9 @@ To create your Webhook integration in Grafana Alerting, complete the following s
1. From the Integration list, select **Webhook**.
1. In the **URL** field, copy in your Webhook URL.
1. Click **Test** to check that your integration works.
+
+ ** For Grafana Alertmanager only.**
+
1. Click **Save contact point**.
## Next steps
diff --git a/docs/sources/alerting/fundamentals/alert-rule-evaluation/_index.md b/docs/sources/alerting/fundamentals/alert-rule-evaluation/_index.md
index ea83debb9dc..5de512dd012 100644
--- a/docs/sources/alerting/fundamentals/alert-rule-evaluation/_index.md
+++ b/docs/sources/alerting/fundamentals/alert-rule-evaluation/_index.md
@@ -53,19 +53,6 @@ The pending period specifies how long the condition must be met before firing, e
You can also set the pending period to zero to skip it and have the alert fire immediately once the condition is met.
-## Condition operator
-
-There are several condition operators available.
-
-- **and**: Two conditions before and after must be true for the overall condition to be true.
-- **or**: If one of conditions before and after are true, the overall condition is true.
-- **logic-or**: If the condition before logic-or is true, the overall condition is immediately true, without evaluating subsequent conditions.
-
-Here are some examples of operators.
-
-- `TRUE and TRUE or FALSE and FALSE` evaluate to `FALSE`, because last two conditions return `FALSE`.
-- `TRUE and TRUE logic-or FALSE and FALSE` evaluate to `TRUE`, because the preceding condition returns `TRUE`.
-
## Evaluation example
Keep in mind:
diff --git a/docs/sources/alerting/fundamentals/alert-rules/queries-conditions.md b/docs/sources/alerting/fundamentals/alert-rules/queries-conditions.md
index 9e6ece241e1..a3caf9f1f07 100644
--- a/docs/sources/alerting/fundamentals/alert-rules/queries-conditions.md
+++ b/docs/sources/alerting/fundamentals/alert-rules/queries-conditions.md
@@ -111,6 +111,12 @@ Classic conditions exist mainly for compatibility reasons and should be avoided
Classic condition checks if any time series data matches the alert condition. It always produce one alert instance only, no matter how many time series meet the condition.
+| Condition operators | How it works |
+| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| and | Two conditions before and after must be true for the overall condition to be true. |
+| or | If one of conditions before and after are true, the overall condition is true. |
+| logic-or | If the condition before `logic-or` is true, the overall condition is immediately true, without evaluating subsequent conditions. For instance, `TRUE and TRUE logic-or FALSE and FALSE` evaluate to `TRUE`, because the preceding condition returns `TRUE`. |
+
## Aggregations
Grafana Alerting provides the following aggregation functions to enable you to further refine your query.
diff --git a/docs/sources/alerting/fundamentals/notifications/templates.md b/docs/sources/alerting/fundamentals/notifications/templates.md
deleted file mode 100644
index d0ac6b2775b..00000000000
--- a/docs/sources/alerting/fundamentals/notifications/templates.md
+++ /dev/null
@@ -1,164 +0,0 @@
----
-aliases:
- - ../../contact-points/message-templating/ # /docs/grafana//alerting/contact-points/message-templating/
- - ../../alert-rules/message-templating/ # /docs/grafana//alerting/alert-rules/message-templating/
- - ../../unified-alerting/message-templating/ # /docs/grafana//alerting/unified-alerting/message-templating/
-canonical: https://grafana.com/docs/grafana/latest/alerting/fundamentals/notifications/templates/
-description: Learn about templates
-keywords:
- - grafana
- - alerting
- - guide
- - contact point
- - templating
-labels:
- products:
- - cloud
- - enterprise
- - oss
-title: Templates
-weight: 115
-refs:
- variables-label-annotation:
- - pattern: /docs/grafana/
- destination: /docs/grafana//alerting/alerting-rules/templating-labels-annotations/
- - pattern: /docs/grafana-cloud/
- destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templating-labels-annotations/
----
-
-# Templates
-
-Use templating to customize, format, and reuse alert notification messages. Create more flexible and informative alert notification messages by incorporating dynamic content, such as metric values, labels, and other contextual information.
-
-In Grafana, there are two ways to template your alert notification messages:
-
-1. Labels and annotations
-
- - Template labels and annotations in alert rules.
- - Labels and annotations contain information about an alert.
- - Labels are used to differentiate an alert from all other alerts, while annotations are used to add additional information to an existing alert.
-
-2. Notification templates
-
- - Template notifications in contact points.
- - Add notification templates to contact points for reuse and consistent messaging in your notifications.
- - Use notification templates to change the title, message, and format of the message in your notifications.
-
-This diagram illustrates the entire process of templating, from the creation of labels and annotations in alert rules or notification templates in contact points, to what they look like when exported and applied in your alert notification messages.
-
-{{< figure src="/media/docs/alerting/grafana-templating-diagram-2.jpg" max-width="1200px" caption="How Templating works" >}}
-
-In this diagram:
-
-- **Monitored Application**: A web server, database, or any other service generating metrics. For example, it could be an NGINX server providing metrics about request rates, response times, and so on.
-- **Prometheus**: Prometheus collects metrics from the monitored application. For example, it might scrape metrics from the NGINX server, including labels like instance (the server hostname) and job (the service name).
-- **Grafana**: Grafana queries Prometheus to retrieve metrics data. For example, you might create an alert rule to monitor NGINX request rates over time, and template labels or annotations based on the instance label.
-- **Alertmanager**: Part of the Prometheus ecosystem, Alertmanager handles alert notifications. For example, if the request rate exceeds a certain threshold on a particular NGINX server, Alertmanager can send an alert notification to, for example, Slack or email, including the server name and the exceeded threshold (the instance label will be interpolated, and the actual server name will appear in the alert notification).
-- **Alert notification**: When an alert rule condition is met, Alertmanager sends a notification to various channels such as Slack, Grafana OnCall, etc. These notifications can include information from the labels associated with the alerting rule. For example, if an alert triggers due to high CPU usage on a specific server, the notification message can include details like server name (instance label), disk usage percentage, and the threshold that was exceeded.
-
-## Labels and annotations
-
-Labels and annotations contain information about an alert. Labels are used to differentiate an alert from all other alerts, while annotations are used to add additional information to an existing alert.
-
-### Template labels
-
-Label templates are applied in the alert rule itself (i.e. in the Configure labels and notifications section of an alert).
-
-{{}}
-Think about templating labels when you need to improve or change how alerts are uniquely identified. This is especially helpful if the labels you get from your query aren't detailed enough. Keep in mind that it's better to keep long sentences for summaries and descriptions. Also, avoid using the query's value in labels because it may result in the creation of many alerts when you actually only need one.
-{{}}
-
-Templating can be applied by using variables and functions. These variables can represent dynamic values retrieved from your data queries.
-
-{{}}
-In Grafana templating, the $ and . symbols are used to reference variables and their properties. You can reference variables directly in your alert rule definitions using the $ symbol followed by the variable name. Similarly, you can access properties of variables using the dot (.) notation within alert rule definitions.
-{{}}
-
-Here are some commonly used built-in [variables](ref:variables-label-annotation) to interact with the name and value of labels in Grafana alerting:
-
-- The `$labels` variable, which contains all labels from the query.
-
- For example, let's say you have an alert rule that triggers when the CPU usage exceeds a certain threshold. You want to create annotations that provide additional context when this alert is triggered, such as including the specific server that experienced the high CPU usage.
-
- The host {{ index $labels "instance" }} has exceeded 80% CPU usage for the last 5 minutes
-
- The outcome of this template would print:
-
- The host instance 1 has exceeded 80% CPU usage for the last 5 minutes
-
-- The `$value` variable, which is a string containing the labels and values of all instant queries; threshold, reduce and math expressions, and classic conditions in the alert rule.
-
- In the context of the previous example, $value variable would write something like this:
-
- CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ $value }}
-
- The outcome of this template would print:
-
- CPU usage for instance1 has exceeded 80% for the last 5 minutes: [ var='A' labels={instance=instance1} value=81.234 ]
-
-- The `$values` variable is a table containing the labels and floating point values of all instant queries and expressions, indexed by their Ref IDs (i.e. the id that identifies the query or expression. By default the Red ID of the query is “A”).
-
- Given an alert with the labels instance=server1 and an instant query with the value 81.2345, would write like this:
-
- CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes: {{ index $values "A" }}
-
- And it would print:
-
- CPU usage for instance1 has exceeded 80% for the last 5 minutes: 81.2345
-
-{{% admonition type="caution" %}}
-Extra whitespace in label templates can break matches with notification policies.
-{{% /admonition %}}
-
-### Template annotations
-
-Both labels and annotations have the same structure: a set of named values; however their intended uses are different. The purpose of annotations is to add additional information to existing alerts.
-
-There are a number of suggested annotations in Grafana such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`. Like labels, annotations must have a name, and their value can contain a combination of text and template code that is evaluated when an alert is fired.
-
-Here is an example of templating an annotation in the context of an alert rule. The text/template is added into the Add annotations section.
-
- CPU usage for {{ index $labels "instance" }} has exceeded 80% for the last 5 minutes
-
-The outcome of this template would print
-
- CPU usage for Instance 1 has exceeded 80% for the last 5 minutes
-
-### Template notifications
-
-Notification templates represent the alternative approach to templating designed for reusing templates. Notifications are messages to inform users about events or conditions triggered by alerts. You can create reusable notification templates to customize the content and format of alert notifications. Variables, labels, or other context-specific details can be added to the templates to dynamically insert information like metric values.
-
-Here is an example of a notification template:
-
-```go
-{{ define "alerts.message" -}}
-{{ if .Alerts.Firing -}}
-{{ len .Alerts.Firing }} firing alert(s)
-{{ template "alerts.summarize" .Alerts.Firing }}
-{{- end }}
-{{- if .Alerts.Resolved -}}
-{{ len .Alerts.Resolved }} resolved alert(s)
-{{ template "alerts.summarize" .Alerts.Resolved }}
-{{- end }}
-{{- end }}
-
-{{ define "alerts.summarize" -}}
-{{ range . -}}
-- {{ index .Annotations "summary" }}
-{{ end }}
-{{ end }}
-```
-
-This is the message you would receive in your contact point:
-
- 1 firing alert(s)
- - The database server db1 has exceeded 75% of available disk space. Disk space used is 76%, please resize the disk size within the next 24 hours
-
- 1 resolved alert(s)
- - The web server web1 has been responding to 5% of HTTP requests with 5xx errors for the last 5 minutes
-
-Once the template is created, you need to make reference to it in your **Contact point** (in the Optional `[contact point]` settings) .
-
-{{}}
-It's not recommended to include individual alert information within notification templates. Instead, it's more effective to incorporate such details within the rule using labels and annotations.
-{{}}
diff --git a/docs/sources/alerting/fundamentals/templates.md b/docs/sources/alerting/fundamentals/templates.md
new file mode 100644
index 00000000000..42b0900ff4c
--- /dev/null
+++ b/docs/sources/alerting/fundamentals/templates.md
@@ -0,0 +1,187 @@
+---
+aliases:
+ - ../fundamentals/notifications/templates/ # /docs/grafana//alerting/fundamentals/notifications/templates/
+ - ../contact-points/message-templating/ # /docs/grafana//alerting/contact-points/message-templating/
+ - ../alert-rules/message-templating/ # /docs/grafana//alerting/alert-rules/message-templating/
+ - ../unified-alerting/message-templating/ # /docs/grafana//alerting/unified-alerting/message-templating/
+canonical: https://grafana.com/docs/grafana/latest/alerting/fundamentals/notifications/templates/
+description: Use templating to customize, format, and reuse alert notification messages. Create more flexible and informative alert notification messages by incorporating dynamic content, such as metric values, labels, and other contextual information.
+keywords:
+ - grafana
+ - alerting
+ - guide
+ - contact point
+ - templating
+labels:
+ products:
+ - cloud
+ - enterprise
+ - oss
+title: Templates
+meta_image: /media/docs/alerting/how-notification-templates-works.png
+weight: 115
+refs:
+ labels:
+ - pattern: /docs/grafana/
+ destination: /docs/grafana//alerting/fundamentals/alert-rules/annotation-label/#labels
+ - pattern: /docs/grafana-cloud/
+ destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#labels
+ annotations:
+ - pattern: /docs/grafana/
+ destination: /docs/grafana//alerting/fundamentals/alert-rules/annotation-label/#annotations
+ - pattern: /docs/grafana-cloud/
+ destination: /docs/grafana-cloud/alerting-and-irm/alerting/fundamentals/alert-rules/annotation-label/#annotations
+ templating-labels-annotations:
+ - pattern: /docs/grafana/
+ destination: /docs/grafana//alerting/alerting-rules/templating-labels-annotations/
+ - pattern: /docs/grafana-cloud/
+ destination: /docs/grafana-cloud/alerting-and-irm/alerting/alerting-rules/templating-labels-annotations/
+ notification-message-reference:
+ - pattern: /docs/grafana/
+ destination: /docs/grafana//alerting/configure-notifications/template-notifications/reference/
+ - pattern: /docs/grafana-cloud/
+ destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/reference/
+ notification-messages:
+ - pattern: /docs/grafana/
+ destination: /docs/grafana//alerting/configure-notifications/template-notifications/
+ - pattern: /docs/grafana-cloud/
+ destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/
+ create-notification-templates:
+ - pattern: /docs/grafana/
+ destination: /docs/grafana//alerting/configure-notifications/template-notifications/create-notification-templates/
+ - pattern: /docs/grafana-cloud/
+ destination: /docs/grafana-cloud/alerting-and-irm/alerting/configure-notifications/template-notifications/create-notification-templates/
+---
+
+# Templates
+
+Use templating to customize, format, and reuse alert notification messages. Create more flexible and informative alert notification messages by incorporating dynamic content, such as metric values, labels, and other contextual information.
+
+In Grafana, you have various options to template your alert notification messages:
+
+1. [Alert rule annotations](#template-annotations)
+
+ - Annotations add extra information, like `summary` and `description`, to alert instances for notification messages.
+ - Template annotations to display query values that are meaningful to the alert, for example, the server name or the threshold query value.
+
+1. [Alert rule labels](#template-labels)
+
+ - Labels are used to differentiate an alert instance from all other alert instances.
+ - Template labels to add an additional label based on a query value, or when the labels from the query are incomplete or not descriptive enough.
+
+1. [Notification templates](#template-notifications)
+ - Notification templates are used by contact points for consistent messaging in notification titles and descriptions.
+ - Template notifications when you want to customize the appearance and information of your notifications.
+ - Avoid using notification templates to add extra information to alert instances—use annotations instead.
+
+This diagram illustrates the entire templating process, from querying labels and templating the alert summary and notification to the final alert notification message.
+
+{{< figure src="/media/docs/alerting/how-notification-templates-works.png" max-width="1200px" caption="How templating works" >}}
+
+In this diagram:
+
+1. The alert rule query returns `12345`, along with the values of the `instance` and `job` labels.
+1. This query result breaches the alert rule condition, firing the alert instance.
+1. The alert instance generates an annotation summary, defined by the template used in the alert rule summary. In this case, it displays the value of the `instance` label: `server1`.
+1. The Alertmanager receives the firing alert instance, including the final annotation summary, and determines the contact point that will process the alert.
+1. The Alertmanager uses the contact point's notification template to format the message, then sends the notification to the configured destination(s)—an email address.
+
+## Template annotations
+
+[Annotations](ref:annotations) can be defined in the alert rule to add extra information to alert instances.
+
+When creating an alert rule, Grafana suggests several optional annotations, such as `description`, `summary`, `runbook_url`, `dashboardUId` and `panelId`, which help identify and respond to alerts. You can also create custom annotations.
+
+Annotations are key-value pairs, and their values can contain a combination of text and template code that is evaluated when the alert fires.
+
+Annotations can contain plain text, but you should template annotations if you need to display query values that are relevant to the alert, for example:
+
+- Show the query value that triggers the alert.
+- Include labels returned by the query that identify the alert.
+- Format the annotation message depending on a query value.
+
+Here’s an example of templating an annotation, which explains where and why the alert was triggered. In this case, the alert triggers when CPU usage exceeds a threshold, and the `summary` annotation provides the relevant details.
+
+```
+CPU usage for {{ index $labels "instance" }} has exceeded 80% ({{ index $values "A" }}) for the last 5 minutes.
+```
+
+The outcome of this template would be:
+
+```
+CPU usage for Instance 1 has exceeded 80% (81.2345) for the last 5 minutes.
+```
+
+Implement annotations that provide meaningful information to respond to your alerts. Annotations are displayed in the Grafana alert detail view and are included by default in notifications.
+
+For more details on how to template annotations, refer to [Template annotations and labels](ref:templating-labels-annotations).
+
+## Template labels
+
+[Labels](ref:labels) are used to differentiate one alert instance from all other alert instances, as the set of labels uniquely identifies an alert instance. Notification policies and silences use labels to handle alert instances.
+
+Template labels when you need to improve or change how alerts are uniquely identified. This is helpful if the labels you get from your query aren't detailed enough.
+
+Here’s an example of templating a `severity` label based on the query value:
+
+```
+{{ if (gt $values.A.Value 90.0) -}}
+critical
+{{ else if (gt $values.A.Value 80.0) -}}
+high
+{{ else if (gt $values.A.Value 60.0) -}}
+medium
+{{ else -}}
+low
+{{- end }}
+```
+
+Avoid using query values in labels, as this may result in the creation of numerous alerts when only one is needed. Use annotation to inform about the query value instead.
+
+For more details on how to template labels, refer to [Template annotations and labels](ref:templating-labels-annotations).
+
+## Template notifications
+
+[Notification templates](ref:notification-messages) allow you to customize the content of your notifications, such as the subject of an email or the body of a Slack message.
+
+Notification templates differ from templating annotations and labels in the following ways:
+
+- Notification templates are assigned to the **Contact point**, rather than the alert rule.
+- If not specified, the contact point uses a default template that includes relevant alert information.
+- You can create reusable notification templates and reference them in other templates.
+- The same template can be shared across multiple contact points, making it easier to maintain and ensuring consistency.
+- While both annotation/label templates and notification templates use the same templating language, the available variables and functions differ. For more details, refer to the [notification template reference](ref:notification-message-reference) and [annotation/label template reference](ref:templating-labels-annotations).
+- Notification templates should not be used to add additional information to individual alerts—use annotations for that purpose.
+
+Here is an example of a notification template that summarizes all firing and resolved alerts in a notification group:
+
+```
+{{ define "alerts.message" -}}
+ {{ if .Alerts.Firing -}}
+ {{ len .Alerts.Firing }} firing alert(s)
+ {{ template "alerts.summarize" .Alerts.Firing }}
+ {{- end }}
+ {{- if .Alerts.Resolved -}}
+ {{ len .Alerts.Resolved }} resolved alert(s)
+ {{ template "alerts.summarize" .Alerts.Resolved }}
+ {{- end }}
+{{- end }}
+
+{{ define "alerts.summarize" -}}
+ {{ range . -}}
+ - {{ index .Annotations "summary" }}
+ {{ end }}
+{{ end }}
+```
+
+The notification message to the contact point would look like this:
+
+```
+1 firing alert(s)
+- The database server db1 has exceeded 75% of available disk space. Disk space used is 76%, please resize the disk size within the next 24 hours.
+
+1 resolved alert(s)
+- The web server web1 has been responding to 5% of HTTP requests with 5xx errors for the last 5 minutes.
+```
+
+For instructions on creating and using notification templates, refer to [Create notification templates.](ref:create-notification-templates)
diff --git a/docs/sources/dashboards/create-reports/index.md b/docs/sources/dashboards/create-reports/index.md
index 5ce55c6b50e..29beabb4794 100644
--- a/docs/sources/dashboards/create-reports/index.md
+++ b/docs/sources/dashboards/create-reports/index.md
@@ -1,10 +1,10 @@
---
aliases:
- - ../administration/reports/
- - ../enterprise/export-pdf/
- - ../enterprise/reporting/
- - ../panels/create-reports/
- - reporting/
+ - ../administration/reports/ # /docs/grafana/latest/administration/reports/
+ - ../enterprise/export-pdf/ # /docs/grafana/latest/enterprise/export-pdf/
+ - ../enterprise/reporting/ # /docs/grafana/latest/enterprise/reporting/
+ - ../panels/create-reports/ # /docs/grafana/latest/panels/create-reports/
+ - reporting/ # /docs/grafana/latest/dashboards/reporting/
keywords:
- grafana
- reporting
diff --git a/docs/sources/dashboards/share-dashboards-panels/_index.md b/docs/sources/dashboards/share-dashboards-panels/_index.md
index 26b269b1231..68c8715c570 100644
--- a/docs/sources/dashboards/share-dashboards-panels/_index.md
+++ b/docs/sources/dashboards/share-dashboards-panels/_index.md
@@ -1,18 +1,13 @@
---
aliases:
- - ../administration/reports/
- - ../enterprise/export-pdf/
- - ../enterprise/reporting/
- - ../reference/share_dashboard/
- - ../reference/share_panel/
- - ../share-dashboards-panels/
- - ../sharing/
- - ../sharing/playlists/
- - ../sharing/share-dashboard/
- - ../sharing/share-panel/
- - ./
- - reporting/
- - share-dashboard/
+ - ../reference/share_dashboard/ # /docs/grafana/latest/reference/share_dashboard/
+ - ../reference/share_panel/ # /docs/grafana/latest/reference/share_panel/
+ - ../share-dashboards-panels/ # /docs/grafana/latest/share-dashboards-panels/
+ - ../sharing/ # /docs/grafana/latest/sharing/
+ - ../sharing/playlists/ # /docs/grafana/latest/sharing/playlists/
+ - ../sharing/share-dashboard/ # /docs/grafana/latest/sharing/share-dashboard/
+ - ../sharing/share-panel/ # /docs/grafana/latest/sharing/share-panel/
+ - share-dashboard/ # /docs/grafana/latest/dashboards/share-dashboard/
keywords:
- grafana
- dashboard
diff --git a/docs/sources/datasources/loki/query-editor/index.md b/docs/sources/datasources/loki/query-editor/index.md
index 3ff47a25215..37750aadd10 100644
--- a/docs/sources/datasources/loki/query-editor/index.md
+++ b/docs/sources/datasources/loki/query-editor/index.md
@@ -171,6 +171,8 @@ The following options are the same for both **Builder** and **Code** mode:
- **Line limit** -Defines the upper limit for the number of log lines returned by a query. The default is `1000`
+- **Direction** - Determines the search order. **Backward** is a backward search starting at the end of the time range. **Forward** is a forward search starting at the beginning of the time range. The default is **Backward**
+
- **Step** Sets the step parameter of Loki metrics queries. The default value equals to the value of `$__interval` variable, which is calculated using the time range and the width of the graph (the number of pixels).
- **Resolution** Deprecated. Sets the step parameter of Loki metrics range queries. With a resolution of `1/1`, each pixel corresponds to one data point. `1/2` retrieves one data point for every other pixel, `1/10` retrieves one data point per 10 pixels, and so on. Lower resolutions perform better.
diff --git a/docs/sources/datasources/mysql/_index.md b/docs/sources/datasources/mysql/_index.md
index 3125a0b2452..783d7ee1a2f 100644
--- a/docs/sources/datasources/mysql/_index.md
+++ b/docs/sources/datasources/mysql/_index.md
@@ -73,7 +73,7 @@ For instructions on how to add a data source to Grafana, refer to the [administr
Only users with the organization administrator role can add data sources.
Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system.
-{{< docs/play title="MySQL: Cities of the World Sample Data Set" url="https://play.grafana.org/d/8JOvPQr7k/" >}}
+{{< docs/play title="MySQL Overview" url="https://play.grafana.org/d/edyh1ib7db6rkb/mysql-overview" >}}
## Configure the data source
diff --git a/docs/sources/datasources/postgres/_index.md b/docs/sources/datasources/postgres/_index.md
index 86f769d5a77..4b1ab7898c4 100644
--- a/docs/sources/datasources/postgres/_index.md
+++ b/docs/sources/datasources/postgres/_index.md
@@ -66,6 +66,8 @@ For instructions on how to add a data source to Grafana, refer to the [administr
Only users with the organization administrator role can add data sources.
Administrators can also [configure the data source via YAML](#provision-the-data-source) with Grafana's provisioning system.
+{{< docs/play title="PostgreSQL Overview" url="https://play.grafana.org/d/ddvpgdhiwjvuod/postgresql-overview" >}}
+
## PostgreSQL settings
To configure basic settings for the data source, complete the following steps:
diff --git a/docs/sources/datasources/tempo/query-editor/_index.md b/docs/sources/datasources/tempo/query-editor/_index.md
index 28dd3659f63..d2f37e700f7 100644
--- a/docs/sources/datasources/tempo/query-editor/_index.md
+++ b/docs/sources/datasources/tempo/query-editor/_index.md
@@ -46,6 +46,11 @@ refs:
destination: /docs/grafana//explore/explore-inspector/
- pattern: /docs/grafana-cloud/
destination: /docs/grafana//explore/explore-inspector/
+ explore-traces-app:
+ - pattern: /docs/grafana/
+ destination: /docs/grafana//explore/simplified-exploration/traces/
+ - pattern: /docs/grafana-cloud/
+ destination: /docs/grafana-cloud/visualizations/simplified-exploration/traces/
---
# Query tracing data
@@ -55,6 +60,10 @@ The queries use [TraceQL](/docs/tempo/latest/traceql), the query language design
For general documentation on querying data sources in Grafana, refer to [Query and transform data](ref:query-transform-data).
+{{< admonition type="tip" >}}
+Don't know TraceQL? Try [Explore Traces](ref:explore-traces-app), an intuitive, queryless app that lets you explore your tracing data using RED metrics.
+{{< /admonition >}}
+
## Before you begin
You can compose TraceQL queries in Grafana and Grafana Cloud using **Explore** and a Tempo data source.
diff --git a/docs/sources/explore/simplified-exploration/_index.md b/docs/sources/explore/simplified-exploration/_index.md
index b3b454a2c5c..2162eb693ce 100644
--- a/docs/sources/explore/simplified-exploration/_index.md
+++ b/docs/sources/explore/simplified-exploration/_index.md
@@ -40,4 +40,8 @@ The Grafana Explore apps are designed for effortless data exploration through in
Easily explore telemetry signals with these specialized tools, tailored specifically for the Grafana databases to provide quick and accurate insights.
+To learn more, read [A queryless experience for exploring metrics, logs, traces, and profiles: Introducing the Explore apps suite for Grafana](https://grafana.com/blog/2024/09/24/queryless-metrics-logs-traces-profiles/).
+
+{{< youtube id="MSHeWWsHaIA" >}}
+
{{< card-grid key="cards" type="simple" >}}
diff --git a/docs/sources/panels-visualizations/visualizations/geomap/index.md b/docs/sources/panels-visualizations/visualizations/geomap/index.md
index d1578cc5063..b42d1f78a6c 100644
--- a/docs/sources/panels-visualizations/visualizations/geomap/index.md
+++ b/docs/sources/panels-visualizations/visualizations/geomap/index.md
@@ -51,7 +51,7 @@ refs:
Geomaps allow you to view and customize the world map using geospatial data. It's the ideal visualization if you have data that includes location information and you want to see it displayed in a map.
-You can configure and overlay [map layers](#types), like heatmaps and networks, and blend included basemaps or your own custom maps. This helps you to easily focus on the important location-based characteristics of the data.
+You can configure and overlay [map layers](#layer-type), like heatmaps and networks, and blend included basemaps or your own custom maps. This helps you to easily focus on the important location-based characteristics of the data.
{{< figure src="/static/img/docs/geomap-panel/geomap-example-8-1-0.png" max-width="1200px" alt="Geomap visualization" >}}
@@ -141,42 +141,42 @@ The other location types— airport codes or US state codes—aren't aut
If you want to use other codes or give the field a custom name, you can follow the steps in the [Location mode](#location-mode) section.
-## Panel options
+## Configuration options
+
+### Panel options
{{< docs/shared lookup="visualizations/panel-options.md" source="grafana" version="" >}}
-## Map View
+### Map view options
The map view controls the initial view of the map when the dashboard loads.
-### Initial View
+#### Initial View
The initial view configures how the geomap renders when the panel is first loaded.
-- **View** sets the center for the map when the panel first loads.
- - **Fit to data** fits the map view based on the data extents of Map layers and updates when data changes.
- - **Data** option allows selection of extent based on data from "All layers", a single "Layer", or the "Last value" from a selected layer.
- - **Layer** can be selected if fitting data from a single "Layer" or the "Last value" of a layer.
- - **Padding** sets padding in relative percent beyond data extent (not available when looking at "Last value" only).
- - **Max Zoom** sets the maximum zoom level when fitting data.
- - **Coordinates** sets the map view based on:
- - **Latitude**
- - **Longitude**
- - Default Views are also available including:
- - **(0°, 0°)**
- - **North America**
- - **South America**
- - **Europe**
- - **Africa**
- - **West Asia**
- - **South Asia**
- - **South-East Asia**
- - **East Asia**
- - **Australia**
- - **Oceania**
-- **Zoom** sets the initial zoom level.
+- **View** - Sets the center for the map when the panel first loads. Refer to the table following this list for view selections.
+- **Zoom** - Sets the initial zoom level.
+- **Use current map settings** - Use the settings of the current map to set the center.
-### Share view
+
+| View selection | Description |
+|---|---|
+| Fit to data | fits the map view based on the data extents of Map layers and updates when data changes.
**Data** - option allows selection of extent based on data from "All layers", a single "Layer", or the "Last value" from a selected layer.
**Layer** - can be selected if fitting data from a single "Layer" or the "Last value" of a layer.
**Padding** - sets padding in relative percent beyond data extent (not available when looking at "Last value" only).
**Max zoom** - sets the maximum zoom level when fitting data.
|
+| (0°, 0°) | |
+| Coordinates | sets the map view based on: **Latitude** and **Longitude**. |
+
+
+Default Views are also available including:
+
+
+| | | | | |
+| ------------- | ------------- | ------ | ------ | --------- |
+| North America | South America | Europe | Africa | West Asia |
+| South Asia | South-East Asia | East Asia | Australia | Oceania |
+
+
+#### Share view
The **Share view** option allows you to link the movement and zoom actions of multiple map visualizations within the same dashboard. The map visualizations that have this option enabled act in tandem when one of them is moved or zoomed, leaving the other ones independent.
@@ -184,11 +184,28 @@ The **Share view** option allows you to link the movement and zoom actions of mu
You might need to reload the dashboard for this feature to work.
{{< /admonition >}}
-## Map layers
+### Map layers options
Geomaps support showing multiple layers. Each layer determines how you visualize geospatial data on top of the base map.
-### Types
+There are three options that you need to set for all maps:
+
+- [Layer type](#layer-type)
+- [Data](#data)
+- [Location mode](#location-mode)
+
+Other options are dependent on your map layer type and are described within the layer type section.
+
+The layer controls allow you to create layers, change their name, reorder and delete layers.
+
+- **Add layer** creates an additional, configurable data layer for the geomap. When you add a layer, you are prompted to select a layer type. You can change the layer type at any point during panel configuration. See the **Layer Types** section above for details on each layer type.
+- **Edit layer name (pencil icon)** renames the layer.
+- **Trash Bin** deletes the layer.
+- **Reorder (six dots/grab handle)** allows you to change the layer order. Data on higher layers will appear above data on lower layers. The visualization will update the layer order as you drag and drop to help simplify choosing a layer order.
+
+You can add multiple layers of data to a single geomap in order to create rich, detailed visualizations.
+
+#### Layer type
There are seven map layer types to choose from in a geomap.
@@ -199,6 +216,10 @@ There are seven map layer types to choose from in a geomap.
- [Route (Beta)](#route-layer-beta) render data points as a route.
- [Photos (Beta)](#photos-layer-beta) renders a photo at each data point.
- [Network (Beta)](#network-layer-beta) visualizes a network graph from the data.
+- [Open Street Map](#open-street-map-layer) adds a map from a collaborative free geographic world database.
+- [CARTO basemap](#carto-basemap-layer) adds a layer from CARTO Raster basemaps.
+- [ArcGIS MapServer](#arcgis-mapserver-layer) adds a layer from an ESRI ArcGIS MapServer.
+- [XYZ Tile layer](#xyz-tile-layer) adds a map from a generic tile layer.
{{% admonition type="note" %}}
Beta is equivalent to the [public preview](/docs/release-life-cycle/) release stage.
@@ -209,9 +230,7 @@ There are also two experimental (or alpha) layer types.
- **Icon at last point (alpha)** renders an icon at the last data point.
- **Dynamic GeoJSON (alpha)** styles a GeoJSON file based on query results.
-{{% admonition type="note" %}}
-To enable experimental layers:
-Set `enable_alpha` to `true` in your configuration file:
+To enable experimental layers. Set `enable_alpha` to `true` in your configuration file:
```
[panels]
@@ -224,29 +243,11 @@ To enable the experimental layers using Docker, run the following command:
docker run -p 3000:3000 -e "GF_PANELS_ENABLE_ALPHA=true" grafana/grafana:
```
-{{% /admonition %}}
-
-{{% admonition type="note" %}}
-[Basemap layer types](#types-1) can also be added as layers. You can specify an opacity.
-{{% /admonition %}}
-
-### Layer Controls
-
-The layer controls allow you to create layers, change their name, reorder and delete layers.
-
-- **Add layer** creates an additional, configurable data layer for the geomap. When you add a layer, you are prompted to select a layer type. You can change the layer type at any point during panel configuration. See the **Layer Types** section above for details on each layer type.
-- The layer controls allow you to rename, delete, and reorder the layers of the visualization.
- - **Edit layer name (pencil icon)** renames the layer.
- - **Trash Bin** deletes the layer.
- - **Reorder (six dots/grab handle)** allows you to change the layer order. Data on higher layers will appear above data on lower layers. The visualization will update the layer order as you drag and drop to help simplify choosing a layer order.
-
-You can add multiple layers of data to a single geomap in order to create rich, detailed visualizations.
-
-### Data
+#### Data
Geomaps need a source of geographical data gathered from a data source query which can return multiple datasets. By default Grafana picks the first dataset, but this drop-down allows you to pick other datasets if the query returns more than one.
-### Location mode
+#### Location mode
There are four options to map the data returned by the selected query:
@@ -259,23 +260,290 @@ There are four options to map the data returned by the selected query:
- **Geohash** specifies that your query holds geohash data. You will be prompted to select a string data field for the geohash from your database query.
- **Lookup** specifies that your query holds location name data that needs to be mapped to a value. You will be prompted to select the lookup field from your database query and a gazetteer. The gazetteer is the directory that is used to map your queried data to a geographical point.
-## Basemap layer
+#### Markers layer
+
+The markers layer allows you to display data points as different marker shapes such as circles, squares, triangles, stars, and more.
+
+
+
+
+| Option | Description |
+| ------ | ----------- |
+| Data | Configure the data settings for the layer. For more information, refer to [Data](#data). |
+| Location | Configure the data settings for the layer. For more information, refer to [Location mode](#location-mode). |
+| Size | Configures the size of the markers. The default is `Fixed size`, which makes all marker sizes the same regardless of the data; however, there is also an option to size the markers based on data corresponding to a selected field. `Min` and `Max` marker sizes have to be set such that the markers can scale within this range. |
+| Symbol | Allows you to choose the symbol, icon, or graphic to aid in providing additional visual context to your data. Choose from assets that are included with Grafana such as simple symbols or the Unicon library. You can also specify a URL containing an image asset. The image must be a scalable vector graphic (SVG). |
+| Symbol Vertical Align | Configures the vertical alignment of the symbol relative to the data point. Note that the symbol's rotation angle is applied first around the data point, then the vertical alignment is applied relative to the rotation of the symbol. |
+| Symbol Horizontal Align | Configures the horizontal alignment of the symbol relative to the data point. Note that the symbol's rotation angle is applied first around the data point, then the horizontal alignment is applied relative to the rotation of the symbol. |
+| Color | Configures the color of the markers. The default `Fixed color` sets all markers to a specific color. There is also an option to have conditional colors depending on the selected field data point values and the color scheme set in the `Standard options` section. |
+| Fill opacity | Configures the transparency of each marker. |
+| Rotation angle | Configures the rotation angle of each marker. The default is `Fixed value`, which makes all markers rotate to the same angle regardless of the data; however, there is also an option to set the rotation of the markers based on data corresponding to a selected field. |
+| Text label | Configures a text label for each marker. |
+| Show legend | Allows you to toggle the legend for the layer. |
+| Display tooltip | Allows you to toggle tooltips for the layer. |
+
+
+#### Heatmap layer
+
+The heatmap layer clusters various data points to visualize locations with different densities.
+To add a heatmap layer:
+
+Click on the drop-down menu under Data Layer and choose `Heatmap`.
+
+Similar to `Markers`, you are prompted with various options to determine which data points to visualize and how you want to visualize them.
+
+
+
+
+| Option | Description |
+| ------ | ----------- |
+| Data | Configure the data settings for the layer. For more information, refer to [Data](#data). |
+| Location | Configure the data settings for the layer. For more information, refer to [Location mode](#location-mode). |
+| Weight values | Configures the size of the markers. The default is `Fixed size`, which makes all marker sizes the same regardless of the data; however, there is also an option to size the markers based on data corresponding to a selected field. `Min` and `Max` marker sizes have to be set such that the markers can scale within this range. |
+| Radius | Configures the size of the heatmap clusters. |
+| Blur | Configures the amount of blur on each cluster. |
+| Opacity | Configures the opacity of each cluster. |
+| Display tooltip | Allows you to toggle tooltips for the layer. |
+
+
+#### GeoJSON layer
+
+The GeoJSON layer allows you to select and load a static GeoJSON file from the filesystem.
+
+
+| Option | Description |
+| ------ | ----------- |
+| GeoJSON URL | Provides a choice of GeoJSON files that ship with Grafana. |
+| Default Style | Controls which styles to apply when no rules above match.
**Color** - configures the color of the default style
**Opacity** - configures the default opacity
|
+| Style Rules | Apply styles based on feature properties
**Rule** - allows you to select a _feature_, _condition_, and _value_ from the GeoJSON file in order to define a rule. The trash bin icon can be used to delete the current rule.
**Color** - configures the color of the style for the current rule
**Opacity** - configures the transparency level for the current rule
|
+| Display tooltip | Allows you to toggle tooltips for the layer. |
+
+
+Styles can be set within the "properties" object of the GeoJSON with support for the following geometries:
+
+**Polygon, MultiPolygon**
+
+- **"fill"** - The color of the interior of the polygon(s)
+- **"fill-opacity"** - The opacity of the interior of the polygon(s)
+- **"stroke-width"** - The width of the line component of the polygon(s)
+
+**Point, MultiPoint**
+
+- **"marker-color"** - The color of the point(s)
+- **"marker-size"** - The size of the point(s)
+
+**LineString, MultiLineString**
+
+- **"stroke"** - The color of the line(s)
+- **"stroke-width"** - The width of the line(s)
+
+#### Night / Day layer
+
+The Night / Day layer displays night and day regions based on the current time range.
+
+{{< figure src="/static/img/docs/geomap-panel/geomap-day-night-9-1-0.png" max-width="1200px" alt="Geomap panel Night / Day" >}}
+
+
+| Option | Description |
+| ------ | ----------- |
+| Data | Configures the data set for the layer. For more information, refer to [Data](#data). |
+| Show | Toggles the time source from panel time range. |
+| Night region color | Picks the color for the night region. |
+| Display sun | Toggles the sun icon. |
+| Opacity | Set the opacity from `0` (transparent) to `1` (opaque). |
+| Display tooltip | Allows you to toggle tooltips for the layer. |
+
+
+[Extensions for OpenLayers - DayNight](https://viglino.github.io/ol-ext/examples/layer/map.daynight.html)
+
+#### Route layer (Beta)
+
+{{% admonition type="caution" %}}
+The Route layer is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
+{{% /admonition %}}
+
+The Route layer renders data points as a route.
+
+{{< figure src="/media/docs/grafana/geomap-route-layer-basic-9-4-0.png" max-width="1200px" alt="Geomap panel Route" >}}
+
+The layer can also render a route with arrows.
+
+{{< figure src="/media/docs/grafana/geomap-route-layer-arrow-size-9-4-0.png" max-width="1200px" alt="Geomap panel Route arrows with size" >}}
+
+
+| Option | Description |
+| ------ | ----------- |
+| Data | configure the data settings for the layer. For more information, refer to [Data](#data). |
+| Location | configure the data settings for the layer. For more information, refer to [Location mode](#location-mode). |
+| Size | sets the route thickness. Fixed value by default. When field data is selected you can set the Min and Max range in which field data can scale. |
+| Color | sets the route color. Set to `Fixed color` by default. You can also tie the color to field data. |
+| Fill opacity | configures the opacity of the route. |
+| Text label | configures a text label for each route. |
+| Arrow | sets the arrow styling to display along route, in order of data. Choose from: **None**, **Forward**, and **Reverse** |
+| Display tooltip | allows you to toggle tooltips for the layer. |
+
+
+[Extensions for OpenLayers - Flow Line Style](http://viglino.github.io/ol-ext/examples/style/map.style.gpxline.html)
+
+#### Photos layer (Beta)
+
+{{% admonition type="caution" %}}
+The Photos layer is currently in [public preview](/docs/release-life-cycle/). Grafana Labs offers limited support, and breaking changes might occur prior to the feature being made generally available.
+{{% /admonition %}}
+
+The Photos layer renders a photo at each data point.
+
+{{< figure src="/static/img/docs/geomap-panel/geomap-photos-9-3-0.png" max-width="1200px" alt="Geomap panel Photos" >}}
+
+
+| Option | Description |
+| ------ | ----------- |
+| Data | Configure the data settings for the layer. For more information, refer to [Data](#data). |
+| Location | Configure the data settings for the layer. For more information, refer to [Location mode](#location-mode). |
+| Image Source field | Allows you to select a string field containing image data in either of the following formats: